From 02cf781c2930b704248a39459d11b68bec7bc233 Mon Sep 17 00:00:00 2001 From: Pieter Vincent Date: Wed, 23 Oct 2024 18:01:57 +0200 Subject: [PATCH] Fix missing initial scrollIntoView, fix missing hooks dep breaking a setting --- docs/demo/dist/bundle.js | 56 +++++++++++++++---------------- docs/demo/dist/bundle.js.map | 2 +- docs/demo/dist/main.css | 15 ++++++++- docs/demo/dist/main.css.map | 2 +- src/components/ResizableFrame.jsx | 5 +-- 5 files changed, 47 insertions(+), 33 deletions(-) diff --git a/docs/demo/dist/bundle.js b/docs/demo/dist/bundle.js index 1f78e87..69e7825 100644 --- a/docs/demo/dist/bundle.js +++ b/docs/demo/dist/bundle.js @@ -1,4 +1,4 @@ -var DC=Object.defineProperty,_C=Object.defineProperties;var TC=Object.getOwnPropertyDescriptors;var dl=Object.getOwnPropertySymbols;var P0=Object.prototype.hasOwnProperty,M0=Object.prototype.propertyIsEnumerable;var B0=(e,t,n)=>t in e?DC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t)=>{for(var n in t||(t={}))P0.call(t,n)&&B0(e,n,t[n]);if(dl)for(var n of dl(t))M0.call(t,n)&&B0(e,n,t[n]);return e},q=(e,t)=>_C(e,TC(t));var pc=e=>typeof e=="symbol"?e:e+"",mn=(e,t)=>{var n={};for(var r in e)P0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dl)for(var r of dl(e))t.indexOf(r)<0&&M0.call(e,r)&&(n[r]=e[r]);return n};var BC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ve=(e,t,n)=>new Promise((r,o)=>{var i=s=>{try{l(n.next(s))}catch(u){o(u)}},a=s=>{try{l(n.throw(s))}catch(u){o(u)}},l=s=>s.done?r(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});var dW=BC((xe,zt)=>{var pl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gv={exports:{}},tu={},Wv={exports:{}},fe={};/** +var DC=Object.defineProperty,_C=Object.defineProperties;var TC=Object.getOwnPropertyDescriptors;var fl=Object.getOwnPropertySymbols;var P0=Object.prototype.hasOwnProperty,M0=Object.prototype.propertyIsEnumerable;var B0=(e,t,n)=>t in e?DC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,z=(e,t)=>{for(var n in t||(t={}))P0.call(t,n)&&B0(e,n,t[n]);if(fl)for(var n of fl(t))M0.call(t,n)&&B0(e,n,t[n]);return e},q=(e,t)=>_C(e,TC(t));var pc=e=>typeof e=="symbol"?e:e+"",mn=(e,t)=>{var n={};for(var r in e)P0.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&M0.call(e,r)&&(n[r]=e[r]);return n};var BC=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ve=(e,t,n)=>new Promise((r,o)=>{var i=s=>{try{l(n.next(s))}catch(u){o(u)}},a=s=>{try{l(n.throw(s))}catch(u){o(u)}},l=s=>s.done?r(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});var dW=BC((xe,zt)=>{var dl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gv={exports:{}},eu={},Wv={exports:{}},fe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var DC=Object.defineProperty,_C=Object.defineProperties;var TC=Object.getOwnProp * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ja=Symbol.for("react.element"),PC=Symbol.for("react.portal"),MC=Symbol.for("react.fragment"),OC=Symbol.for("react.strict_mode"),RC=Symbol.for("react.profiler"),NC=Symbol.for("react.provider"),IC=Symbol.for("react.context"),LC=Symbol.for("react.forward_ref"),zC=Symbol.for("react.suspense"),jC=Symbol.for("react.memo"),HC=Symbol.for("react.lazy"),O0=Symbol.iterator;function GC(e){return e===null||typeof e!="object"?null:(e=O0&&e[O0]||e["@@iterator"],typeof e=="function"?e:null)}var Uv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vv=Object.assign,Kv={};function fi(e,t,n){this.props=e,this.context=t,this.refs=Kv,this.updater=n||Uv}fi.prototype.isReactComponent={};fi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yv(){}Yv.prototype=fi.prototype;function cp(e,t,n){this.props=e,this.context=t,this.refs=Kv,this.updater=n||Uv}var fp=cp.prototype=new Yv;fp.constructor=cp;Vv(fp,fi.prototype);fp.isPureReactComponent=!0;var R0=Array.isArray,Xv=Object.prototype.hasOwnProperty,dp={current:null},qv={key:!0,ref:!0,__self:!0,__source:!0};function Jv(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Xv.call(t,r)&&!qv.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1t}return!1}function kt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ut[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var hp=/[\-:]([a-z])/g;function gp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function mp(e,t,n,r){var o=ut.hasOwnProperty(t)?ut[t]:null;(o!==null?o.type!==0:r||!(2t}return!1}function kt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ut[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var hp=/[\-:]([a-z])/g;function gp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hp,gp);ut[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function mp(e,t,n,r){var o=ut.hasOwnProperty(t)?ut[t]:null;(o!==null?o.type!==0:r||!(2l||o[a]!==i[l]){var s=` -`+o[a].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{mc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vi(e):""}function iS(e){switch(e.tag){case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 2:case 15:return e=vc(e.type,!1),e;case 11:return e=vc(e.type.render,!1),e;case 1:return e=vc(e.type,!0),e;default:return""}}function Uf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case To:return"Fragment";case _o:return"Portal";case Hf:return"Profiler";case vp:return"StrictMode";case Gf:return"Suspense";case Wf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ay:return(e.displayName||"Context")+".Consumer";case iy:return(e._context.displayName||"Context")+".Provider";case yp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bp:return t=e.displayName||null,t!==null?t:Uf(e.type)||"Memo";case Xn:t=e._payload,e=e._init;try{return Uf(e(t))}catch(n){}}return null}function aS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uf(t);case 8:return t===vp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lS(e){var t=sy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ml(e){e._valueTracker||(e._valueTracker=lS(e))}function uy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function as(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Vf(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function j0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cy(e,t){t=t.checked,t!=null&&mp(e,"checked",t,!1)}function Kf(e,t){cy(e,t);var n=hr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Yf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yf(e,t.type,hr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Yf(e,t,n){(t!=="number"||as(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ki=Array.isArray;function Ho(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=vl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ba(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ra={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sS=["Webkit","ms","Moz","O"];Object.keys(ra).forEach(function(e){sS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ra[t]=ra[e]})});function hy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ra.hasOwnProperty(e)&&ra[e]?(""+t).trim():t+"px"}function gy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=hy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var uS=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Jf(e,t){if(t){if(uS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Qf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zf=null;function wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ed=null,Go=null,Wo=null;function U0(e){if(e=Wa(e)){if(typeof ed!="function")throw Error(R(280));var t=e.stateNode;t&&(t=au(t),ed(e.stateNode,e.type,t))}}function my(e){Go?Wo?Wo.push(e):Wo=[e]:Go=e}function vy(){if(Go){var e=Go,t=Wo;if(Wo=Go=null,U0(e),t)for(e=0;e>>=0,e===0?32:31-(wS(e)/xS|0)|0}var yl=64,bl=4194304;function Yi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function cs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=Yi(l):(i&=a,i!==0&&(r=Yi(i)))}else a=n&~o,a!==0?r=Yi(a):i!==0&&(r=Yi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ha(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-cn(t),e[t]=n}function FS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ia),eg=" ",tg=!1;function Ny(e,t){switch(e){case"keyup":return ZS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bo=!1;function t3(e,t){switch(e){case"compositionend":return Iy(t);case"keypress":return t.which!==32?null:(tg=!0,eg);case"textInput":return e=t.data,e===eg&&tg?null:e;default:return null}}function n3(e,t){if(Bo)return e==="compositionend"||!$p&&Ny(e,t)?(e=Oy(),Kl=Fp=er=null,Bo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ig(n)}}function Hy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gy(){for(var e=window,t=as();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=as(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function f3(e){var t=Gy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hy(n.ownerDocument.documentElement,n)){if(r!==null&&Dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ag(n,i);var a=ag(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Po=null,ad=null,la=null,ld=!1;function lg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ld||Po==null||Po!==as(r)||(r=Po,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),la&&Fa(la,r)||(la=r,r=ps(ad,"onSelect"),0Ro||(e.current=pd[Ro],pd[Ro]=null,Ro--)}function ke(e,t){Ro++,pd[Ro]=e.current,e.current=t}var gr={},wt=Er(gr),Tt=Er(!1),jr=gr;function Zo(e,t){var n=e.type.contextTypes;if(!n)return gr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Bt(e){return e=e.childContextTypes,e!=null}function gs(){_e(Tt),_e(wt)}function hg(e,t,n){if(wt.current!==gr)throw Error(R(168));ke(wt,t),ke(Tt,n)}function Qy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,aS(e)||"Unknown",o));return Ie({},n,r)}function ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gr,jr=wt.current,ke(wt,e),ke(Tt,Tt.current),!0}function gg(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Qy(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,_e(Tt),_e(wt),ke(wt,e)):_e(Tt),ke(Tt,n)}var Dn=null,lu=!1,Tc=!1;function Zy(e){Dn===null?Dn=[e]:Dn.push(e)}function S3(e){lu=!0,Zy(e)}function Fr(){if(!Tc&&Dn!==null){Tc=!0;var e=0,t=we;try{var n=Dn;for(we=1;e>=a,o-=a,_n=1<<32-cn(t)+o|n<T?(B=_,_=null):B=_.sibling;var P=p(g,_,b[T],F);if(P===null){_===null&&(_=B);break}e&&_&&P.alternate===null&&t(g,_),v=i(P,v,T),$===null?D=P:$.sibling=P,$=P,_=B}if(T===b.length)return n(g,_),Be&&$r(g,T),D;if(_===null){for(;TT?(B=_,_=null):B=_.sibling;var L=p(g,_,P.value,F);if(L===null){_===null&&(_=B);break}e&&_&&L.alternate===null&&t(g,_),v=i(L,v,T),$===null?D=L:$.sibling=L,$=L,_=B}if(P.done)return n(g,_),Be&&$r(g,T),D;if(_===null){for(;!P.done;T++,P=b.next())P=d(g,P.value,F),P!==null&&(v=i(P,v,T),$===null?D=P:$.sibling=P,$=P);return Be&&$r(g,T),D}for(_=r(g,_);!P.done;T++,P=b.next())P=h(_,g,T,P.value,F),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?T:P.key),v=i(P,v,T),$===null?D=P:$.sibling=P,$=P);return e&&_.forEach(function(K){return t(g,K)}),Be&&$r(g,T),D}function E(g,v,b,F){if(typeof b=="object"&&b!==null&&b.type===To&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case gl:e:{for(var D=b.key,$=v;$!==null;){if($.key===D){if(D=b.type,D===To){if($.tag===7){n(g,$.sibling),v=o($,b.props.children),v.return=g,g=v;break e}}else if($.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Xn&&Cg(D)===$.type){n(g,$.sibling),v=o($,b.props),v.ref=Mi(g,$,b),v.return=g,g=v;break e}n(g,$);break}else t(g,$);$=$.sibling}b.type===To?(v=Ir(b.props.children,g.mode,F,b.key),v.return=g,g=v):(F=ts(b.type,b.key,b.props,null,g.mode,F),F.ref=Mi(g,v,b),F.return=g,g=F)}return a(g);case _o:e:{for($=b.key;v!==null;){if(v.key===$)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=o(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Lc(b,g.mode,F),v.return=g,g=v}return a(g);case Xn:return $=b._init,E(g,v,$(b._payload),F)}if(Ki(b))return m(g,v,b,F);if(Di(b))return y(g,v,b,F);kl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=o(v,b),v.return=g,g=v):(n(g,v),v=Ic(b,g.mode,F),v.return=g,g=v),a(g)):n(g,v)}return E}var ti=lb(!0),sb=lb(!1),Ua={},Cn=Er(Ua),Da=Er(Ua),_a=Er(Ua);function Or(e){if(e===Ua)throw Error(R(174));return e}function Ip(e,t){switch(ke(_a,t),ke(Da,e),ke(Cn,Ua),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qf(t,e)}_e(Cn),ke(Cn,t)}function ni(){_e(Cn),_e(Da),_e(_a)}function ub(e){Or(_a.current);var t=Or(Cn.current),n=qf(t,e.type);t!==n&&(ke(Da,e),ke(Cn,n))}function Lp(e){Da.current===e&&(_e(Cn),_e(Da))}var Oe=Er(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bc=[];function zp(){for(var e=0;en?n:4,e(!0);var r=Pc.transition;Pc.transition={};try{e(!1),t()}finally{we=n,Pc.transition=r}}function Fb(){return en().memoizedState}function A3(e,t,n){var r=ur(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kb(e))Ab(t,n);else if(n=rb(e,t,n,r),n!==null){var o=St();fn(n,e,r,o),$b(n,t,r)}}function $3(e,t,n){var r=ur(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kb(e))Ab(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,pn(l,a)){var s=t.interleaved;s===null?(o.next=o,Rp(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch(u){}finally{}n=rb(e,t,o,r),n!==null&&(o=St(),fn(n,e,r,o),$b(n,t,r))}}function kb(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ab(e,t){sa=Ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $b(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cp(e,n)}}var Es={readContext:Zt,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},D3={readContext:Zt,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Eg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Jl(4194308,4,wb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jl(4,2,e,t)},useMemo:function(e,t){var n=yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=A3.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:Sg,useDebugValue:Up,useDeferredValue:function(e){return yn().memoizedState=e},useTransition:function(){var e=Sg(!1),t=e[0];return e=k3.bind(null,e[1]),yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=yn();if(Be){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),nt===null)throw Error(R(349));Gr&30||db(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Eg(hb.bind(null,r,i,e),[e]),r.flags|=2048,Pa(9,pb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=yn(),t=nt.identifierPrefix;if(Be){var n=Tn,r=_n;n=(r&~(1<<32-cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ta++,0")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{mc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vi(e):""}function iS(e){switch(e.tag){case 5:return Vi(e.type);case 16:return Vi("Lazy");case 13:return Vi("Suspense");case 19:return Vi("SuspenseList");case 0:case 2:case 15:return e=vc(e.type,!1),e;case 11:return e=vc(e.type.render,!1),e;case 1:return e=vc(e.type,!0),e;default:return""}}function Uf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bo:return"Fragment";case To:return"Portal";case Hf:return"Profiler";case vp:return"StrictMode";case Gf:return"Suspense";case Wf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ay:return(e.displayName||"Context")+".Consumer";case iy:return(e._context.displayName||"Context")+".Provider";case yp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bp:return t=e.displayName||null,t!==null?t:Uf(e.type)||"Memo";case Xn:t=e._payload,e=e._init;try{return Uf(e(t))}catch(n){}}return null}function aS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Uf(t);case 8:return t===vp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lS(e){var t=sy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gl(e){e._valueTracker||(e._valueTracker=lS(e))}function uy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function is(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Vf(e,t){var n=t.checked;return Ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function j0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cy(e,t){t=t.checked,t!=null&&mp(e,"checked",t,!1)}function Kf(e,t){cy(e,t);var n=hr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Yf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Yf(e,t.type,hr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Yf(e,t,n){(t!=="number"||is(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ki=Array.isArray;function Go(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ml.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ba(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ra={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},sS=["Webkit","ms","Moz","O"];Object.keys(ra).forEach(function(e){sS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ra[t]=ra[e]})});function hy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ra.hasOwnProperty(e)&&ra[e]?(""+t).trim():t+"px"}function gy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=hy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var uS=Ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Jf(e,t){if(t){if(uS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Qf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zf=null;function wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ed=null,Wo=null,Uo=null;function U0(e){if(e=Wa(e)){if(typeof ed!="function")throw Error(R(280));var t=e.stateNode;t&&(t=iu(t),ed(e.stateNode,e.type,t))}}function my(e){Wo?Uo?Uo.push(e):Uo=[e]:Wo=e}function vy(){if(Wo){var e=Wo,t=Uo;if(Uo=Wo=null,U0(e),t)for(e=0;e>>=0,e===0?32:31-(wS(e)/xS|0)|0}var vl=64,yl=4194304;function Yi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function us(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=Yi(l):(i&=a,i!==0&&(r=Yi(i)))}else a=n&~o,a!==0?r=Yi(a):i!==0&&(r=Yi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ha(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-cn(t),e[t]=n}function FS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ia),eg=" ",tg=!1;function Ny(e,t){switch(e){case"keyup":return ZS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Po=!1;function t3(e,t){switch(e){case"compositionend":return Iy(t);case"keypress":return t.which!==32?null:(tg=!0,eg);case"textInput":return e=t.data,e===eg&&tg?null:e;default:return null}}function n3(e,t){if(Po)return e==="compositionend"||!$p&&Ny(e,t)?(e=Oy(),Vl=Fp=er=null,Po=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ig(n)}}function Hy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gy(){for(var e=window,t=is();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=is(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function f3(e){var t=Gy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hy(n.ownerDocument.documentElement,n)){if(r!==null&&Dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ag(n,i);var a=ag(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Mo=null,ad=null,la=null,ld=!1;function lg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ld||Mo==null||Mo!==is(r)||(r=Mo,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),la&&Fa(la,r)||(la=r,r=ds(ad,"onSelect"),0No||(e.current=pd[No],pd[No]=null,No--)}function ke(e,t){No++,pd[No]=e.current,e.current=t}var gr={},wt=Er(gr),Tt=Er(!1),jr=gr;function ei(e,t){var n=e.type.contextTypes;if(!n)return gr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Bt(e){return e=e.childContextTypes,e!=null}function hs(){_e(Tt),_e(wt)}function hg(e,t,n){if(wt.current!==gr)throw Error(R(168));ke(wt,t),ke(Tt,n)}function Qy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(R(108,aS(e)||"Unknown",o));return Ie({},n,r)}function gs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gr,jr=wt.current,ke(wt,e),ke(Tt,Tt.current),!0}function gg(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=Qy(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,_e(Tt),_e(wt),ke(wt,e)):_e(Tt),ke(Tt,n)}var Dn=null,au=!1,Tc=!1;function Zy(e){Dn===null?Dn=[e]:Dn.push(e)}function S3(e){au=!0,Zy(e)}function Fr(){if(!Tc&&Dn!==null){Tc=!0;var e=0,t=we;try{var n=Dn;for(we=1;e>=a,o-=a,_n=1<<32-cn(t)+o|n<T?(B=_,_=null):B=_.sibling;var P=p(g,_,b[T],F);if(P===null){_===null&&(_=B);break}e&&_&&P.alternate===null&&t(g,_),v=i(P,v,T),$===null?D=P:$.sibling=P,$=P,_=B}if(T===b.length)return n(g,_),Be&&$r(g,T),D;if(_===null){for(;TT?(B=_,_=null):B=_.sibling;var L=p(g,_,P.value,F);if(L===null){_===null&&(_=B);break}e&&_&&L.alternate===null&&t(g,_),v=i(L,v,T),$===null?D=L:$.sibling=L,$=L,_=B}if(P.done)return n(g,_),Be&&$r(g,T),D;if(_===null){for(;!P.done;T++,P=b.next())P=d(g,P.value,F),P!==null&&(v=i(P,v,T),$===null?D=P:$.sibling=P,$=P);return Be&&$r(g,T),D}for(_=r(g,_);!P.done;T++,P=b.next())P=h(_,g,T,P.value,F),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?T:P.key),v=i(P,v,T),$===null?D=P:$.sibling=P,$=P);return e&&_.forEach(function(K){return t(g,K)}),Be&&$r(g,T),D}function E(g,v,b,F){if(typeof b=="object"&&b!==null&&b.type===Bo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:e:{for(var D=b.key,$=v;$!==null;){if($.key===D){if(D=b.type,D===Bo){if($.tag===7){n(g,$.sibling),v=o($,b.props.children),v.return=g,g=v;break e}}else if($.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Xn&&Cg(D)===$.type){n(g,$.sibling),v=o($,b.props),v.ref=Mi(g,$,b),v.return=g,g=v;break e}n(g,$);break}else t(g,$);$=$.sibling}b.type===Bo?(v=Ir(b.props.children,g.mode,F,b.key),v.return=g,g=v):(F=es(b.type,b.key,b.props,null,g.mode,F),F.ref=Mi(g,v,b),F.return=g,g=F)}return a(g);case To:e:{for($=b.key;v!==null;){if(v.key===$)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),v=o(v,b.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=Lc(b,g.mode,F),v.return=g,g=v}return a(g);case Xn:return $=b._init,E(g,v,$(b._payload),F)}if(Ki(b))return m(g,v,b,F);if(Di(b))return y(g,v,b,F);Fl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),v=o(v,b),v.return=g,g=v):(n(g,v),v=Ic(b,g.mode,F),v.return=g,g=v),a(g)):n(g,v)}return E}var ni=lb(!0),sb=lb(!1),Ua={},Cn=Er(Ua),Da=Er(Ua),_a=Er(Ua);function Or(e){if(e===Ua)throw Error(R(174));return e}function Ip(e,t){switch(ke(_a,t),ke(Da,e),ke(Cn,Ua),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qf(t,e)}_e(Cn),ke(Cn,t)}function ri(){_e(Cn),_e(Da),_e(_a)}function ub(e){Or(_a.current);var t=Or(Cn.current),n=qf(t,e.type);t!==n&&(ke(Da,e),ke(Cn,n))}function Lp(e){Da.current===e&&(_e(Cn),_e(Da))}var Oe=Er(0);function xs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bc=[];function zp(){for(var e=0;en?n:4,e(!0);var r=Pc.transition;Pc.transition={};try{e(!1),t()}finally{we=n,Pc.transition=r}}function Fb(){return en().memoizedState}function A3(e,t,n){var r=ur(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},kb(e))Ab(t,n);else if(n=rb(e,t,n,r),n!==null){var o=St();fn(n,e,r,o),$b(n,t,r)}}function $3(e,t,n){var r=ur(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(kb(e))Ab(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,pn(l,a)){var s=t.interleaved;s===null?(o.next=o,Rp(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch(u){}finally{}n=rb(e,t,o,r),n!==null&&(o=St(),fn(n,e,r,o),$b(n,t,r))}}function kb(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ab(e,t){sa=Cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $b(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cp(e,n)}}var Ss={readContext:Zt,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},D3={readContext:Zt,useCallback:function(e,t){return yn().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Eg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ql(4194308,4,wb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return ql(4,2,e,t)},useMemo:function(e,t){var n=yn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=A3.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=yn();return e={current:e},t.memoizedState=e},useState:Sg,useDebugValue:Up,useDeferredValue:function(e){return yn().memoizedState=e},useTransition:function(){var e=Sg(!1),t=e[0];return e=k3.bind(null,e[1]),yn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=yn();if(Be){if(n===void 0)throw Error(R(407));n=n()}else{if(n=t(),nt===null)throw Error(R(349));Gr&30||db(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Eg(hb.bind(null,r,i,e),[e]),r.flags|=2048,Pa(9,pb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=yn(),t=nt.identifierPrefix;if(Be){var n=Tn,r=_n;n=(r&~(1<<32-cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ta++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bn]=t,e[$a]=r,Nb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Qf(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),o=r;break;case"iframe":case"object":case"embed":Ae("load",e),o=r;break;case"video":case"audio":for(o=0;ooi&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Be)return ht(t),null}else 2*He()-i.renderingStartTime>oi&&n!==1073741824&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=He(),t.sibling=null,n=Oe.current,ke(Oe,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return Jp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?It&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function N3(e,t){switch(Tp(t),t.tag){case 1:return Bt(t.type)&&gs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ni(),_e(Tt),_e(wt),zp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lp(t),null;case 13:if(_e(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ei()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Oe),null;case 4:return ni(),null;case 10:return Op(t.type._context),null;case 22:case 23:return Jp(),null;case 24:return null;default:return null}}var $l=!1,yt=!1,I3=typeof WeakSet=="function"?WeakSet:Set,Y=null;function zo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Fd(e,t,n){try{n()}catch(r){je(e,t,r)}}var Pg=!1;function L3(e,t){if(sd=fs,e=Gy(),Dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(F){n=null;break e}var a=0,l=-1,s=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(l=a+o),d!==i||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++c===r&&(s=a),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ud={focusedElem:e,selectionRange:n},fs=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,E=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:an(t.type,y),E);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(F){je(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=Pg,Pg=!1,m}function ua(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Fd(t,n,i)}o=o.next}while(o!==r)}}function cu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function kd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zb(e){var t=e.alternate;t!==null&&(e.alternate=null,zb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bn],delete t[$a],delete t[dd],delete t[x3],delete t[C3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jb(e){return e.tag===5||e.tag===3||e.tag===4}function Mg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ad(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hs));else if(r!==4&&(e=e.child,e!==null))for(Ad(e,t,n),e=e.sibling;e!==null;)Ad(e,t,n),e=e.sibling}function $d(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($d(e,t,n),e=e.sibling;e!==null;)$d(e,t,n),e=e.sibling}var at=null,ln=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Hb(e,t,n),n=n.sibling}function Hb(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(nu,n)}catch(l){}switch(n.tag){case 5:yt||zo(n,t);case 6:var r=at,o=ln;at=null,Vn(e,t,n),at=r,ln=o,at!==null&&(ln?(e=at,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):at.removeChild(n.stateNode));break;case 18:at!==null&&(ln?(e=at,n=n.stateNode,e.nodeType===8?_c(e.parentNode,n):e.nodeType===1&&_c(e,n),Sa(e)):_c(at,n.stateNode));break;case 4:r=at,o=ln,at=n.stateNode.containerInfo,ln=!0,Vn(e,t,n),at=r,ln=o;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Fd(n,t,a),o=o.next}while(o!==r)}Vn(e,t,n);break;case 1:if(!yt&&(zo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){je(n,t,l)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Vn(e,t,n),yt=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function Og(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I3),t.forEach(function(r){var o=Y3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=He()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*j3(r/1960))-r,10e?16:e,tr===null)var r=!1;else{if(e=tr,tr=null,As=0,me&6)throw Error(R(331));var o=me;for(me|=4,Y=e.current;Y!==null;){var i=Y,a=i.child;if(Y.flags&16){var l=i.deletions;if(l!==null){for(var s=0;sHe()-Xp?Nr(e,0):Yp|=n),Pt(e,t)}function qb(e,t){t===0&&(e.mode&1?(t=bl,bl<<=1,!(bl&130023424)&&(bl=4194304)):t=1);var n=St();e=Nn(e,t),e!==null&&(Ha(e,t,n),Pt(e,n))}function K3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qb(e,n)}function Y3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),qb(e,n)}var Jb;Jb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,O3(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Be&&t.flags&1048576&&eb(t,ys,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ql(e,t),e=t.pendingProps;var o=Zo(t,wt.current);Vo(t,n),o=Hp(null,t,r,e,o,n);var i=Gp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(r)?(i=!0,ms(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Np(t),o.updater=su,t.stateNode=o,o._reactInternals=t,yd(t,r,e,n),t=xd(null,t,r,!0,i,n)):(t.tag=0,Be&&i&&_p(t),Ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ql(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=q3(r),e=an(r,e),o){case 0:t=wd(null,t,r,e,n);break e;case 1:t=_g(null,t,r,e,n);break e;case 11:t=$g(null,t,r,e,n);break e;case 14:t=Dg(null,t,r,an(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),wd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),_g(e,t,r,o,n);case 3:e:{if(Mb(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),xs(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ri(Error(R(423)),t),t=Tg(e,t,r,n,o);break e}else if(r!==o){o=ri(Error(R(424)),t),t=Tg(e,t,r,n,o);break e}else for(Lt=ar(t.stateNode.containerInfo.firstChild),jt=t,Be=!0,sn=null,n=sb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ei(),r===o){t=In(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return ub(t),e===null&&gd(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,cd(r,o)?a=null:i!==null&&cd(r,i)&&(t.flags|=32),Pb(e,t),Ct(e,t,a,n),t.child;case 6:return e===null&&gd(t),null;case 13:return Ob(e,t,n);case 4:return Ip(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ti(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),$g(e,t,r,o,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ke(bs,r._currentValue),r._currentValue=a,i!==null)if(pn(i.value,a)){if(i.children===o.children&&!Tt.current){t=In(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Pn(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),md(i.return,n,t),l.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(R(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),md(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vo(t,n),o=Zt(o),r=r(o),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,o=an(r,t.pendingProps),o=an(r.type,o),Dg(e,t,r,o,n);case 15:return Tb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),Ql(e,t),t.tag=1,Bt(r)?(e=!0,ms(t)):e=!1,Vo(t,n),ab(t,r,o),yd(t,r,o,n),xd(null,t,r,!0,e,n);case 19:return Rb(e,t,n);case 22:return Bb(e,t,n)}throw Error(R(156,t.tag))};function Qb(e,t){return Ey(e,t)}function X3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new X3(e,t,n,r)}function Zp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function q3(e){if(typeof e=="function")return Zp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yp)return 11;if(e===bp)return 14}return 2}function cr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ts(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Zp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case To:return Ir(n.children,o,i,t);case vp:a=8,o|=8;break;case Hf:return e=Jt(12,n,t,o|2),e.elementType=Hf,e.lanes=i,e;case Gf:return e=Jt(13,n,t,o),e.elementType=Gf,e.lanes=i,e;case Wf:return e=Jt(19,n,t,o),e.elementType=Wf,e.lanes=i,e;case ly:return du(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iy:a=10;break e;case ay:a=9;break e;case yp:a=11;break e;case bp:a=14;break e;case Xn:a=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Jt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ir(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function du(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=ly,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function Lc(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function J3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bc(0),this.expirationTimes=bc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eh(e,t,n,r,o,i,a,l,s){return e=new J3(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Np(i),e}function Q3(e,t,n){var r=3ow;/*! +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Rc(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function bd(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var B3=typeof WeakMap=="function"?WeakMap:Map;function Db(e,t,n){n=Pn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fs||(Fs=!0,Dd=r),bd(e,t)},n}function _b(e,t,n){n=Pn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){bd(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){bd(e,t),typeof r!="function"&&(sr===null?sr=new Set([this]):sr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Fg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new B3;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=V3.bind(null,e,t,n),t.then(e,e))}function kg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ag(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pn(-1,1),t.tag=2,lr(n,t,1))),n.lanes|=1),e)}var P3=Ln.ReactCurrentOwner,_t=!1;function Ct(e,t,n,r){t.child=e===null?sb(t,null,n,r):ni(t,e.child,n,r)}function $g(e,t,n,r,o){n=n.render;var i=t.ref;return Ko(t,o),r=Hp(e,t,n,r,i,o),n=Gp(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,In(e,t,o)):(Be&&n&&_p(t),t.flags|=1,Ct(e,t,r,o),t.child)}function Dg(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Zp(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Tb(e,t,i,r,o)):(e=es(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Fa,n(a,r)&&e.ref===t.ref)return In(e,t,o)}return t.flags|=1,e=cr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Tb(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Fa(i,r)&&e.ref===t.ref)if(_t=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(_t=!0);else return t.lanes=e.lanes,In(e,t,o)}return wd(e,t,n,r,o)}function Bb(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(Ho,It),It|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(Ho,It),It|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ke(Ho,It),It|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ke(Ho,It),It|=r;return Ct(e,t,o,n),t.child}function Pb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function wd(e,t,n,r,o){var i=Bt(n)?jr:wt.current;return i=ei(t,i),Ko(t,o),n=Hp(e,t,n,r,i,o),r=Gp(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,In(e,t,o)):(Be&&r&&_p(t),t.flags|=1,Ct(e,t,n,o),t.child)}function _g(e,t,n,r,o){if(Bt(n)){var i=!0;gs(t)}else i=!1;if(Ko(t,o),t.stateNode===null)Jl(e,t),ab(t,n,r),yd(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Zt(u):(u=Bt(n)?jr:wt.current,u=ei(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&xg(t,a,r,u),qn=!1;var p=t.memoizedState;a.state=p,ws(t,r,a,o),s=t.memoizedState,l!==r||p!==s||Tt.current||qn?(typeof c=="function"&&(vd(t,n,c,r),s=t.memoizedState),(l=qn||wg(t,n,l,r,p,s,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ob(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:an(t.type,l),a.props=u,d=t.pendingProps,p=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=Zt(s):(s=Bt(n)?jr:wt.current,s=ei(t,s));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||p!==s)&&xg(t,a,r,s),qn=!1,p=t.memoizedState,a.state=p,ws(t,r,a,o);var m=t.memoizedState;l!==d||p!==m||Tt.current||qn?(typeof h=="function"&&(vd(t,n,h,r),m=t.memoizedState),(u=qn||wg(t,n,u,r,p,m,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=s,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return xd(e,t,n,r,i,o)}function xd(e,t,n,r,o,i){Pb(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&gg(t,n,!1),In(e,t,i);r=t.stateNode,P3.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=ni(t,e.child,null,i),t.child=ni(t,null,l,i)):Ct(e,t,l,i),t.memoizedState=r.state,o&&gg(t,n,!0),t.child}function Mb(e){var t=e.stateNode;t.pendingContext?hg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hg(e,t.context,!1),Ip(e,t.containerInfo)}function Tg(e,t,n,r,o){return ti(),Bp(o),t.flags|=256,Ct(e,t,n,r),t.child}var Cd={dehydrated:null,treeContext:null,retryLane:0};function Sd(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ob(e,t,n){var r=t.pendingProps,o=Oe.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ke(Oe,o&1),e===null)return gd(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=fu(a,r,0,null),e=Ir(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Sd(n),t.memoizedState=Cd,e):Vp(t,a));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return M3(e,t,a,r,l,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,l=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=cr(o,s),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=cr(l,i):(i=Ir(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Sd(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Cd,r}return i=e.child,e=i.sibling,r=cr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Vp(e,t){return t=fu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function kl(e,t,n,r){return r!==null&&Bp(r),ni(t,e.child,null,n),e=Vp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function M3(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Rc(Error(R(422))),kl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=fu({mode:"visible",children:r.children},o,0,null),i=Ir(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&ni(t,e.child,null,a),t.child.memoizedState=Sd(a),t.memoizedState=Cd,i);if(!(t.mode&1))return kl(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(R(419)),r=Rc(i,r,void 0),kl(e,t,a,r)}if(l=(a&e.childLanes)!==0,_t||l){if(r=nt,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Nn(e,o),fn(r,e,o,-1))}return Qp(),r=Rc(Error(R(421))),kl(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=K3.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Lt=ar(o.nextSibling),jt=t,Be=!0,sn=null,e!==null&&(Yt[Xt++]=_n,Yt[Xt++]=Tn,Yt[Xt++]=Hr,_n=e.id,Tn=e.overflow,Hr=t),t=Vp(t,r.children),t.flags|=4096,t)}function Bg(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),md(e.return,t,n)}function Nc(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Rb(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ct(e,t,r.children,n),r=Oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bg(e,n,t);else if(e.tag===19)Bg(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ke(Oe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&xs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Nc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&xs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Nc(t,!0,n,null,i);break;case"together":Nc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function In(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(R(153));if(t.child!==null){for(e=t.child,n=cr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function O3(e,t,n){switch(t.tag){case 3:Mb(t),ti();break;case 5:ub(t);break;case 1:Bt(t.type)&&gs(t);break;case 4:Ip(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ke(ys,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ke(Oe,Oe.current&1),t.flags|=128,null):n&t.child.childLanes?Ob(e,t,n):(ke(Oe,Oe.current&1),e=In(e,t,n),e!==null?e.sibling:null);ke(Oe,Oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ke(Oe,Oe.current),r)break;return null;case 22:case 23:return t.lanes=0,Bb(e,t,n)}return In(e,t,n)}var Nb,Ed,Ib,Lb;Nb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ed=function(){};Ib=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Or(Cn.current);var i=null;switch(n){case"input":o=Vf(e,o),r=Vf(e,r),i=[];break;case"select":o=Ie({},o,{value:void 0}),r=Ie({},r,{value:void 0}),i=[];break;case"textarea":o=Xf(e,o),r=Xf(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ps)}Jf(n,r);var a;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ya.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var s=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&l[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(i=i||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ya.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ae("scroll",e),i||l===s||(i=[])):(i=i||[]).push(u,s))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Lb=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oi(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function R3(e,t,n){var r=t.pendingProps;switch(Tp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return Bt(t.type)&&hs(),ht(t),null;case 3:return r=t.stateNode,ri(),_e(Tt),_e(wt),zp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(El(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,sn!==null&&(Bd(sn),sn=null))),Ed(e,t),ht(t),null;case 5:Lp(t);var o=Or(_a.current);if(n=t.type,e!==null&&t.stateNode!=null)Ib(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(R(166));return ht(t),null}if(e=Or(Cn.current),El(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bn]=t,r[$a]=i,e=(t.mode&1)!==0,n){case"dialog":Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":case"embed":Ae("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bn]=t,e[$a]=r,Nb(e,t,!1,!1),t.stateNode=e;e:{switch(a=Qf(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),o=r;break;case"iframe":case"object":case"embed":Ae("load",e),o=r;break;case"video":case"audio":for(o=0;oii&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304)}else{if(!r)if(e=xs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Be)return ht(t),null}else 2*He()-i.renderingStartTime>ii&&n!==1073741824&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=He(),t.sibling=null,n=Oe.current,ke(Oe,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return Jp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?It&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function N3(e,t){switch(Tp(t),t.tag){case 1:return Bt(t.type)&&hs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ri(),_e(Tt),_e(wt),zp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lp(t),null;case 13:if(_e(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Oe),null;case 4:return ri(),null;case 10:return Op(t.type._context),null;case 22:case 23:return Jp(),null;case 24:return null;default:return null}}var Al=!1,yt=!1,I3=typeof WeakSet=="function"?WeakSet:Set,Y=null;function jo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Fd(e,t,n){try{n()}catch(r){je(e,t,r)}}var Pg=!1;function L3(e,t){if(sd=cs,e=Gy(),Dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(F){n=null;break e}var a=0,l=-1,s=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(l=a+o),d!==i||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++c===r&&(s=a),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ud={focusedElem:e,selectionRange:n},cs=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,E=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:an(t.type,y),E);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(F){je(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=Pg,Pg=!1,m}function ua(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Fd(t,n,i)}o=o.next}while(o!==r)}}function uu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function kd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zb(e){var t=e.alternate;t!==null&&(e.alternate=null,zb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bn],delete t[$a],delete t[dd],delete t[x3],delete t[C3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jb(e){return e.tag===5||e.tag===3||e.tag===4}function Mg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ad(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ps));else if(r!==4&&(e=e.child,e!==null))for(Ad(e,t,n),e=e.sibling;e!==null;)Ad(e,t,n),e=e.sibling}function $d(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($d(e,t,n),e=e.sibling;e!==null;)$d(e,t,n),e=e.sibling}var at=null,ln=!1;function Vn(e,t,n){for(n=n.child;n!==null;)Hb(e,t,n),n=n.sibling}function Hb(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(tu,n)}catch(l){}switch(n.tag){case 5:yt||jo(n,t);case 6:var r=at,o=ln;at=null,Vn(e,t,n),at=r,ln=o,at!==null&&(ln?(e=at,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):at.removeChild(n.stateNode));break;case 18:at!==null&&(ln?(e=at,n=n.stateNode,e.nodeType===8?_c(e.parentNode,n):e.nodeType===1&&_c(e,n),Sa(e)):_c(at,n.stateNode));break;case 4:r=at,o=ln,at=n.stateNode.containerInfo,ln=!0,Vn(e,t,n),at=r,ln=o;break;case 0:case 11:case 14:case 15:if(!yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Fd(n,t,a),o=o.next}while(o!==r)}Vn(e,t,n);break;case 1:if(!yt&&(jo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){je(n,t,l)}Vn(e,t,n);break;case 21:Vn(e,t,n);break;case 22:n.mode&1?(yt=(r=yt)||n.memoizedState!==null,Vn(e,t,n),yt=r):Vn(e,t,n);break;default:Vn(e,t,n)}}function Og(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new I3),t.forEach(function(r){var o=Y3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=He()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*j3(r/1960))-r,10e?16:e,tr===null)var r=!1;else{if(e=tr,tr=null,ks=0,me&6)throw Error(R(331));var o=me;for(me|=4,Y=e.current;Y!==null;){var i=Y,a=i.child;if(Y.flags&16){var l=i.deletions;if(l!==null){for(var s=0;sHe()-Xp?Nr(e,0):Yp|=n),Pt(e,t)}function qb(e,t){t===0&&(e.mode&1?(t=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):t=1);var n=St();e=Nn(e,t),e!==null&&(Ha(e,t,n),Pt(e,n))}function K3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qb(e,n)}function Y3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),qb(e,n)}var Jb;Jb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,O3(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Be&&t.flags&1048576&&eb(t,vs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Jl(e,t),e=t.pendingProps;var o=ei(t,wt.current);Ko(t,n),o=Hp(null,t,r,e,o,n);var i=Gp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(r)?(i=!0,gs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Np(t),o.updater=lu,t.stateNode=o,o._reactInternals=t,yd(t,r,e,n),t=xd(null,t,r,!0,i,n)):(t.tag=0,Be&&i&&_p(t),Ct(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Jl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=q3(r),e=an(r,e),o){case 0:t=wd(null,t,r,e,n);break e;case 1:t=_g(null,t,r,e,n);break e;case 11:t=$g(null,t,r,e,n);break e;case 14:t=Dg(null,t,r,an(r.type,e),n);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),wd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),_g(e,t,r,o,n);case 3:e:{if(Mb(t),e===null)throw Error(R(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ob(e,t),ws(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=oi(Error(R(423)),t),t=Tg(e,t,r,n,o);break e}else if(r!==o){o=oi(Error(R(424)),t),t=Tg(e,t,r,n,o);break e}else for(Lt=ar(t.stateNode.containerInfo.firstChild),jt=t,Be=!0,sn=null,n=sb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ti(),r===o){t=In(e,t,n);break e}Ct(e,t,r,n)}t=t.child}return t;case 5:return ub(t),e===null&&gd(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,cd(r,o)?a=null:i!==null&&cd(r,i)&&(t.flags|=32),Pb(e,t),Ct(e,t,a,n),t.child;case 6:return e===null&&gd(t),null;case 13:return Ob(e,t,n);case 4:return Ip(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ni(t,null,r,n):Ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),$g(e,t,r,o,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,ke(ys,r._currentValue),r._currentValue=a,i!==null)if(pn(i.value,a)){if(i.children===o.children&&!Tt.current){t=In(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Pn(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),md(i.return,n,t),l.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(R(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),md(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ko(t,n),o=Zt(o),r=r(o),t.flags|=1,Ct(e,t,r,n),t.child;case 14:return r=t.type,o=an(r,t.pendingProps),o=an(r.type,o),Dg(e,t,r,o,n);case 15:return Tb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:an(r,o),Jl(e,t),t.tag=1,Bt(r)?(e=!0,gs(t)):e=!1,Ko(t,n),ab(t,r,o),yd(t,r,o,n),xd(null,t,r,!0,e,n);case 19:return Rb(e,t,n);case 22:return Bb(e,t,n)}throw Error(R(156,t.tag))};function Qb(e,t){return Ey(e,t)}function X3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,n,r){return new X3(e,t,n,r)}function Zp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function q3(e){if(typeof e=="function")return Zp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yp)return 11;if(e===bp)return 14}return 2}function cr(e,t){var n=e.alternate;return n===null?(n=Jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function es(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Zp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Bo:return Ir(n.children,o,i,t);case vp:a=8,o|=8;break;case Hf:return e=Jt(12,n,t,o|2),e.elementType=Hf,e.lanes=i,e;case Gf:return e=Jt(13,n,t,o),e.elementType=Gf,e.lanes=i,e;case Wf:return e=Jt(19,n,t,o),e.elementType=Wf,e.lanes=i,e;case ly:return fu(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case iy:a=10;break e;case ay:a=9;break e;case yp:a=11;break e;case bp:a=14;break e;case Xn:a=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=Jt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ir(e,t,n,r){return e=Jt(7,e,r,t),e.lanes=n,e}function fu(e,t,n,r){return e=Jt(22,e,r,t),e.elementType=ly,e.lanes=n,e.stateNode={isHidden:!1},e}function Ic(e,t,n){return e=Jt(6,e,null,t),e.lanes=n,e}function Lc(e,t,n){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function J3(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bc(0),this.expirationTimes=bc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eh(e,t,n,r,o,i,a,l,s){return e=new J3(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Np(i),e}function Q3(e,t,n){var r=3ow;/*! * hotkeys-js v3.8.3 * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. * @@ -45,10 +45,10 @@ Error generating stack: `+i.message+` * http://jaywcjlove.github.io/hotkeys * * Licensed under the MIT license. - */var zc=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function jc(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function iw(e,t){for(var n=t.slice(0,t.length-1),r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function o5(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i=0&&Te.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Te.splice(0,Te.length),(t===93||t===224)&&(t=91),t in lt){lt[t]=!1;for(var r in Vr)Vr[r]===t&&(un[r]=!1)}}function c5(e){if(!e)Object.keys(et).forEach(function(a){return delete et[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&Hc(a)});else if(typeof e=="object")e.key&&Hc(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?iw(Vr,u):[];et[p]=et[p].map(function(m){var y=o?m.method===o:!0;return y&&m.scope===r&&o5(m.mods,h)?{}:m})}})};function Ug(e,t,n){var r;if(t.scope===n||t.scope==="all"){r=t.mods.length>0;for(var o in lt)Object.prototype.hasOwnProperty.call(lt,o)&&(!lt[o]&&t.mods.indexOf(+o)>-1||lt[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!lt[16]&&!lt[18]&&!lt[17]&&!lt[91]||r||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Vg(e){var t=et["*"],n=e.keyCode||e.which||e.charCode;if(un.filter.call(this,e)){if((n===93||n===224)&&(n=91),Te.indexOf(n)===-1&&n!==229&&Te.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var m=Wg[h];e[h]&&Te.indexOf(m)===-1?Te.push(m):!e[h]&&Te.indexOf(m)>-1?Te.splice(Te.indexOf(m),1):h==="metaKey"&&e[h]&&Te.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Te=Te.slice(Te.indexOf(m))))}),n in lt){lt[n]=!0;for(var r in Vr)Vr[r]===n&&(un[r]=!0);if(!t)return}for(var o in lt)Object.prototype.hasOwnProperty.call(lt,o)&&(lt[o]=e[Wg[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Te.indexOf(17)===-1&&Te.push(17),Te.indexOf(18)===-1&&Te.push(18),lt[17]=!0,lt[18]=!0);var i=Oa();if(t)for(var a=0;a-1}function un(e,t,n){Te=[];var r=aw(e),o=[],i="all",a=document,l=0,s=!1,u=!0,c="+";for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(a=t.element),t.keyup&&(s=t.keyup),t.keydown!==void 0&&(u=t.keydown),typeof t.splitKey=="string"&&(c=t.splitKey)),typeof t=="string"&&(i=t);l1&&(o=iw(Vr,e)),e=e[e.length-1],e=e==="*"?"*":vu(e),e in et||(et[e]=[]),et[e].push({keyup:s,keydown:u,scope:i,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:c});typeof a!="undefined"&&!f5(a)&&window&&(uw.push(a),jc(a,"keydown",function(d){Vg(d)}),jc(window,"focus",function(){Te=[]}),jc(a,"keyup",function(d){Vg(d),u5(d)}))}var Gc={setScope:cw,getScope:Oa,deleteScope:s5,getPressedKeyCodes:i5,isPressed:l5,filter:a5,unbind:c5};for(var Wc in Gc)Object.prototype.hasOwnProperty.call(Gc,Wc)&&(un[Wc]=Gc[Wc]);if(typeof window!="undefined"){var d5=window.hotkeys;un.noConflict=function(e){return e&&window.hotkeys===un&&(window.hotkeys=d5),un},window.hotkeys=un}un.filter=function(){return!0};var fw=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},p5=function(t){return fw(t,["INPUT","TEXTAREA","SELECT"])};function qi(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},i=o.enableOnTags,a=o.filter,l=o.keyup,s=o.keydown,u=o.filterPreventDefault,c=u===void 0?!0:u,d=o.enabled,p=d===void 0?!0:d,h=o.enableOnContentEditable,m=h===void 0?!1:h,y=x.useRef(null),E=x.useCallback(function(g,v){var b;return a&&!a(g)?!c:p5(g)&&!fw(g,i)||(b=g.target)!=null&&b.isContentEditable&&!m?!0:y.current===null||document.activeElement===y.current?(t(g,v),!0):!1},r?[y,i,a].concat(r):[y,i,a]);return x.useEffect(function(){if(p)return l&&s!==!0&&(n.keydown=!1),un(e,n||{},E),function(){return un.unbind(e,E)}},[E,n,e,p]),y}const Bl=new Map,Tr={_deps:{}};function h5(e){for(const t in e)Object.defineProperty(Tr,t,{get(){const n=ae[t];return Tr._deps[t]=n,n}})}function g5(e){const t=Tr._deps;Tr._deps={};const n=e(Tr),r=Tr._deps;return Tr._deps=t,[n,r]}function m5(e){const t={};let n=!1;for(const r in e){const o=ae[r];e[r]!==o&&(n=!0),t[r]=o}return[t,n]}function co(e){const t=e.toString();if(Bl.has(t)){const[o,i]=Bl.get(t),[a,l]=m5(i);if(!l)return o;const s=e(a,[o,i]);return Bl.set(t,[s,a]),s}const[n,r]=g5(e);return Bl.set(t,[n,r]),n}function v5(e){const t={};for(const n in e){const r=e[n];Object.defineProperty(t,n,{get(){return r()[0]}})}return h5(e),t}function y5(e){const t={};for(const n in e){const r=e[n],o=()=>r()[0],i=f(o,{});i.toString=o,t[n]=i}return t}const dw=e=>e.map(({dims:t,label:n})=>({label:`${n} (${t.join(" x ")})`,value:t.join(),dims:t})),b5=dw([{dims:[360,640],label:"Phone"},{dims:[768,1024],label:"Tablet Portrait"},{dims:[800,1280],label:"Tablet Large Portrait"},{dims:[1024,768],label:"Tablet Landscape"},{dims:[1280,800],label:"Tablet Large Landscape"},{dims:[1536,864],label:"Laptop Wide"}]),w5=dw([{dims:[360,640],label:"Phone"},{dims:[360,780],label:"Apple iPhone 12 mini"},{dims:[390,844],label:"Apple iPhone 12 Pro"},{dims:[768,1024],label:"Tablet Portrait"},{dims:[800,1280],label:"Tablet Large Portrait"},{dims:[1024,768],label:"Tablet Landscape"},{dims:[1280,800],label:"Tablet Large Landscape"},{dims:[1366,768],label:"Laptop Small"},{dims:[1440,900],label:"Laptop Medium"},{dims:[900,1440],label:"Laptop Medium Portrait"},{dims:[1536,864],label:"Laptop Wide"},{dims:[1920,1080],label:"Full HD"},{dims:[2560,1080],label:"Ultrawide HD"},{dims:[2560,1440],label:"UHD"},{dims:[3440,1440],label:"Ultrawide UHD"},{dims:[3840,2160],label:"4K"}]),Br=new Map,Kg=new Map,Uc={},Ji={};function Rr(e,t){const n=Uc.hasOwnProperty(e),r=n?Uc[e]:()=>Br.has(e)?Br.get(e):(Br.set(e,t),Ji[e]=new Set,Kg.set(e,a=>{const l=typeof a=="function"?a(Br.get(e)):a;Br.set(e,l);for(const s of Ji[e].values())s(l)}),t);n||(Uc[e]=r);const[o,i]=x.useState(r);return x.useInsertionEffect(()=>(Ji[e].add(i),()=>{Ji[e].delete(i)}),[]),[o,Kg.get(e)]}const Yg=new Set;function x5(e){return Br.get(e)}function C5(e,t){Yg.has(e)||(t(Br.get(e)),Ji[e].add(t),Yg.add(e))}let pw={};function S5(e){pw=e}const E5=()=>{const{fetchThemes:e,uploadTheme:t,deleteTheme:n}=pw,[r,o]=Rr("serverThemes",[]),[i,a]=Rr("serverThemesLoading",!0),[l,s]=Rr("serverThemesDirty",!1);return C5("serverThemesDirty",()=>{Ve(xe,null,function*(){const c=yield e();o(z({default:{scopes:{}}},c)),a(!1)})}),[r,{serverThemes:r,serverThemesLoading:i,uploadTheme:(u,c)=>Ve(xe,null,function*(){a(!0),yield t(u,{name:u,scopes:c}),s(!l)}),deleteTheme:u=>Ve(xe,null,function*(){a(!0),yield n(u),s(!l)})}]};function F5(e){return function(t,{type:n,payload:r}){const o=typeof n=="function"?n.name:n;if(typeof e[o]!="function")throw new Error(`No handler for action ${o}`);return e[o](t,r)}}var k5=hw;function hw(e,t,n){e instanceof RegExp&&(e=Xg(e,n)),t instanceof RegExp&&(t=Xg(t,n));const r=gw(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Xg(e,t){const n=t.match(e);return n?n[0]:null}hw.range=gw;function gw(e,t,n){let r,o,i,a,l,s=n.indexOf(e),u=n.indexOf(t,s+1),c=s;if(s>=0&&u>0){if(e===t)return[s,u];for(r=[],i=n.length;c>=0&&!l;)c===s?(r.push(c),s=n.indexOf(e,c+1)):r.length===1?l=[r.pop(),u]:(o=r.pop(),o=0?s:u;r.length&&(l=[i,a])}return l}const A5=ci(k5);function Pd(e){let t;try{t=A5("(",")",e)}catch(o){return}if(!t)return;if(/(?:^|[^\w-])var$/.test(t.pre))return{pre:t.pre.slice(0,-3),body:t.body,post:t.post};const n=Pd(t.body);if(n)return{pre:t.pre+"("+n.pre,body:n.body,post:n.post+")"+t.post};const r=Pd(t.post);if(r)return{pre:t.pre+"("+t.body+")"+r.pre,body:r.body,post:r.post}}const ah=/:(active|focus(-(visible|within))?|visited|hover|disabled|:[\w-]+)/g,mw=/:not\([\s,\*]*\)/g;function $5(e){return e===""||e==="*"||e===":root"?"*":`${e}, :where(${e}) *`.replace("\\\\","\\")}let ns;function D5(e,t){if(typeof t.matches!="function")return!1;const n=e.statelessSelector;if(ns.has(n))return ns.get(n);try{const r=t.matches(n);return ns.set(n,r),r}catch(r){return console.log("Failed testing a selector",e),!1}}const vw=({cssVars:e,target:t})=>{ns=new Map;let n;try{n=e.filter(r=>D5(r,t))}catch(r){console.log(t,r),n=[]}return n},lh=({href:e})=>!e||e.indexOf(window.location.origin)===0,da={},_5=e=>e.map(t=>T5(t)),qg=[],T5=e=>Ve(xe,null,function*(){if(!qg.includes(e)){if(!da[e]){const t=e.split("?")[0]+".map";try{let n=yield(yield fetch(t)).json();da[e]=yield new window.sourceMap.SourceMapConsumer(n)}catch(n){qg.push(e);return}}return da[e]}}),B5=(e,t,n)=>(r,o)=>{const{text:i,index:a}=o;if(/^\s*--/.test(i))return r;const l=`var(${e}`,[s,...u]=i.split(l);let c=s.length;for(const d of u){const p=a+1;if(!/^[\w-]/.test(d))return r.push(q(z({},t.originalPositionFor({line:p,column:c})),{generated:{line:p,column:c,sheet:n}})),r;c+=l.length+d.length}return r},pa={},P5=e=>Ve(xe,null,function*(){if(!(e in pa)){const t=yield(yield fetch(e)).text();pa[e]=t.split(` -`).reduce((n,r,o)=>(r.includes("var(")&&n.push({text:r,index:o}),n),[])}return pa[e]}),M5=e=>e.map(t=>P5(t)),O5=(e,t,n)=>{if(!e)return[];const r=pa[e];return r?r.reduce(B5(t,n,e),[]):(console.warn("no lines",e,Object.keys(pa)),[])},R5=(e,t)=>Ve(xe,null,function*(){let n;if(lh(t))n=t.cssRules;else try{const r=yield(yield fetch(t.href)).text(),o=document.createElement("style");o.innerText=r,document.head.appendChild(o),n=document.styleSheets[document.styleSheets.length-1].cssRules,document.head.removeChild(o)}catch(r){return yield e}return[...n].reduce((r,o)=>Md(r,o,t),yield e)}),N5=(e,t)=>e.some(({usages:n})=>n.some(r=>r.sheet===t.href)),I5=(e,t)=>Ve(xe,null,function*(){const r=t.filter(i=>i.href&&N5(e,i)&&lh(i)).map(i=>[..._5([i.href]),...M5([i.href])]);if(r.length===0)return yield Promise.allSettled([]);const o=r.reduce((i,a)=>[...i,...a],[]);return yield Promise.allSettled(o)});let Jg=[];function _s(e){const t=e.replaceAll(ah,"").replace(/:?:(before|after|first\-letter)/,"").trim().replaceAll(/^\s*[\>+~]/g,"").replaceAll(/,\s*[\>+~]/g,",").replaceAll(/\(,/g,"(").replaceAll(/[\>+~]\s*,/g,">*,").replaceAll(/>\s*~/g,">*~").replaceAll(/[\>+~]\s*$/g,"~*").replaceAll(/[\>+~]\s*\)/g,"~*)").replaceAll(/\(\s*[\>+~]/g,"(").replaceAll(/,(\s*,)+/g,",").replaceAll(/:(where|is|not)\([\s,]*\)/g,"").replace(/^(\s*,\s*)+/,"").replace(/(\s*,\s*)+$/,"").replaceAll(/\s*,\s*/g,",").replaceAll(/,\s*\)/g,")");return $5(t)}const L5=()=>Ve(xe,null,function*(){const e=performance.now(),t=[...document.styleSheets].filter(l=>{var s;return((s=l.ownerNode)==null?void 0:s.id)!==T0}),n=yield t.reduce(R5,{});Jg=Object.keys(rt).filter(l=>document.querySelectorAll(l).length>0),Jg.filter(l=>document.querySelector(l)===document.documentElement);const r=Object.entries(n).map(([l,s])=>q(z({name:l},s),{statelessSelector:[...new Set(s.usages.map(u=>u.statelessSelector))].join()}));yield I5(r,t);const o=r.map(l=>{const{name:s,usages:u}=l,d=[...new Set(u.filter(p=>p.sheet).map(p=>p.sheet))].reduce((p,h)=>{const m=da[h];if(!m)return p;const y=O5(h,s,m);return p.push(...y),p},[]);return l.usages=l.usages.map((p,h)=>(p.position=d[h],p)),l.positions=d,l}),i=yield Promise.allSettled(o);Object.values(da).forEach(l=>l&&l.destroy());const a=performance.now()-e;return console.info(`Extracted data in ${a}ms`),yield i.filter(z5).map(l=>l.value)}),z5=e=>e.status==="fulfilled",yu="theme-editor-highlight",Ra=e=>!!e&&e.classList.add(yu),Yo=e=>!!e&&e.classList.remove(yu);function j5(e,t){let n=e,r="",o=/^border\-\w+-/.test(e)?e.replace(/(.*-)*/,""):"",i=!1,a=o!==""&&!["source","slice","outset","repeat"].includes(o);if(o==="radius")return["border-radius",t.style["border-radius"]];const l=H5(e);if(l)return[l,t.style[l]];for(;r===""||typeof r=="undefined";){const s=n.replace(/-\w+$/,"");if(s===n)break;const u=s==="border";n=u&&!i&&a?`border-${o}`:s,i=u||i,r=t.style[n]}return[n,r]}function H5(e){switch(e){case"column-count":case"column-width":return"columns";case"flex-direction":case"flex-wrap":return"flex-flow";case"line-height":return"font";case"row-gap":case"column-gap":return"gap";case"grid-column-end":case"grid-column-start":return"grid-column";case"grid-row-end":case"grid-row-start":return"grid-row";case"align-content":case"justify-content":return"place-content";case"align-items":case"justify-items":return"place-items"}}const rt={":root":{},":where(html)":{}},Xo={},Md=(e,t,n,r=null,o=null)=>{if(t.type===1){const i=[],a=t.selectorText;if(a===`.${yu}`||a.includes("::part"))return e;for(let l of t.style){const s=l.startsWith("--"),c=t.style.getPropertyValue(l)==="";let d=t.style.getPropertyValue(l).trim();if(s){rt[a]||(rt[a]={}),(!r||!/prefers\-color\-scheme\: ?dark/.test(r)&&r!=="print")&&(rt[a][l]=d,Xo[l]||(Xo[l]={}),Xo[l][a]=d);continue}let p,h=!0,m=0;if(c){const[v,b]=j5(l,t);if(i.includes(v)||b===""||b===void 0)continue;i.push(v),d=b,l=v}const y=d,E=t.style.getPropertyPriority(l)==="important";for(;p=Pd(d);){const v=p.body.split(",").map(P=>P.trim()),b=h&&p.pre.trim()===""&&p.post.replace(/\s*\!important$/,"")==="",D=/^\s*\)\s*/.test(p.post)&&/\w+(-\w+)*\(\s*$/.test(p.pre)?p.pre.match(/(\w+(-\w+)*)\(\s*$/)[1]:null;h=!1;const[$,..._]=v,T=_.join(","),B={selector:a,statelessSelector:_s(a),property:l,defaultValue:T,media:r,supports:o,sheet:n.href,isFullProperty:b,fullValue:y,isImportant:E,index:m,cssFunc:D};m++,e.hasOwnProperty($)||(e[$]={properties:{},usages:[],statelessSelector:null,cssFunc:D}),e[$].usages.push(B),e[$].cssFunc=e[$].cssFunc||D,e[$].properties[l]={isFullProperty:b,fullValue:y,isImportant:E},d=(p.pre||"")+p.body.replace($,"")+(p.post||"")}const g=(d==null?void 0:d.trim())||"";g!==""&&!g.startsWith(",")&&(y in e||(e[y]={isRawValue:!0,properties:{},usages:[],statelessSelector:null}),e[y].usages.push({selector:a,statelessSelector:_s(a),property:l,defaultValue:y,media:r,supports:o,sheet:n.href,isFullProperty:!0,fullValue:y,isImportant:E,index:m}),e[y].properties[l]={isFullProperty:!0,fullValue:y,isImportant:E})}}return t.type===4&&[...t.cssRules].forEach(i=>Md(e,i,n,t.conditionText,o)),t.type===12&&[...t.cssRules].forEach(i=>Md(e,i,n,r,t.conditionText)),e},G5={scopes:{}},At=":root",Ce={set:(e,{name:t,value:n,scope:r=At})=>{const{scopes:o}=e;if(t==="")return e;const i=mn(o,[]);return i[r]=q(z({},o[r]||{}),{[t]:n}),q(z({},e),{scopes:i})},unset:(e,{name:t,scope:n=At})=>{const{scopes:r}=e;if(!(r[n]&&t in r[n]))return e;const{[n]:o}=r,l=o,{[t]:i}=l,a=mn(l,[pc(t)]);return q(z({},e),{scopes:q(z({},r),{[n]:a})})},createAlias(e,t){const{name:n,value:r,generatedName:o}=t;let i;if(o)i=o;else{let u=function(p){return p.hasOwnProperty(i)&&p[i]!==r},c=function(){return Object.values(rt).some(u)||Object.values(e.scopes).some(u)};i=`--${n.replaceAll(" ","-")}`;let d=0;for(;c();)d++,i=`--${n.replaceAll(" ","-")}-${d}`;t.generatedName=i}const a=`var(${i})`,l={};let s=!1;for(const u of Object.keys(rt))for(const[c,d]of Object.entries(rt[u]))d===r&&(l.hasOwnProperty(u)||(l[u]={}),l[u][c]=a);for(const u in e.scopes){l[u]||(l[u]={});const c=e.scopes[u];for(const d in c){const p=c[d]===r;l[u][d]=p?a:c[d]}u===At&&(l[u][i]=r,s=!0)}return s||(l[At]||(l[At]={}),l[At][i]=r),q(z({},e),{scopes:l})},loadTheme:(e,{theme:t={}})=>{const n="scopes"in t;return q(z({},e),{scopes:n?t.scopes:{[At]:t}})}},W5=F5(Ce);function U5(){return B2(W5,G5,null,"themeEditor")}function rn(){return v0("themeEditor")}var qt={},Va={},V5=typeof pl=="object"&&pl&&pl.Object===Object&&pl,yw=V5,K5=yw,Y5=typeof self=="object"&&self&&self.Object===Object&&self,X5=K5||Y5||Function("return this")(),En=X5,q5=En,J5=q5.Symbol,Ka=J5,Qg=Ka,bw=Object.prototype,Q5=bw.hasOwnProperty,Z5=bw.toString,Ni=Qg?Qg.toStringTag:void 0;function eE(e){var t=Q5.call(e,Ni),n=e[Ni];try{e[Ni]=void 0;var r=!0}catch(i){}var o=Z5.call(e);return r&&(t?e[Ni]=n:delete e[Ni]),o}var tE=eE,nE=Object.prototype,rE=nE.toString;function oE(e){return rE.call(e)}var iE=oE,Zg=Ka,aE=tE,lE=iE,sE="[object Null]",uE="[object Undefined]",em=Zg?Zg.toStringTag:void 0;function cE(e){return e==null?e===void 0?uE:sE:em&&em in Object(e)?aE(e):lE(e)}var Zr=cE,fE=Array.isArray,hn=fE;function dE(e){return e!=null&&typeof e=="object"}var zn=dE,pE=Zr,hE=hn,gE=zn,mE="[object String]";function vE(e){return typeof e=="string"||!hE(e)&&gE(e)&&pE(e)==mE}var yE=vE;function bE(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(n(i[s],s,i)===!1)break}return t}}var wE=bE,xE=wE,CE=xE(),SE=CE;function EE(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=zE}var uh=jE,HE=Zr,GE=uh,WE=zn,UE="[object Arguments]",VE="[object Array]",KE="[object Boolean]",YE="[object Date]",XE="[object Error]",qE="[object Function]",JE="[object Map]",QE="[object Number]",ZE="[object Object]",eF="[object RegExp]",tF="[object Set]",nF="[object String]",rF="[object WeakMap]",oF="[object ArrayBuffer]",iF="[object DataView]",aF="[object Float32Array]",lF="[object Float64Array]",sF="[object Int8Array]",uF="[object Int16Array]",cF="[object Int32Array]",fF="[object Uint8Array]",dF="[object Uint8ClampedArray]",pF="[object Uint16Array]",hF="[object Uint32Array]",$e={};$e[aF]=$e[lF]=$e[sF]=$e[uF]=$e[cF]=$e[fF]=$e[dF]=$e[pF]=$e[hF]=!0;$e[UE]=$e[VE]=$e[oF]=$e[KE]=$e[iF]=$e[YE]=$e[XE]=$e[qE]=$e[JE]=$e[QE]=$e[ZE]=$e[eF]=$e[tF]=$e[nF]=$e[rF]=!1;function gF(e){return WE(e)&&GE(e.length)&&!!$e[HE(e)]}var mF=gF;function vF(e){return function(t){return e(t)}}var ch=vF,Bs={exports:{}};Bs.exports;(function(e,t){var n=yw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var s=o&&o.require&&o.require("util").types;return s||a&&a.binding&&a.binding("util")}catch(u){}}();e.exports=l})(Bs,Bs.exports);var fh=Bs.exports,yF=mF,bF=ch,nm=fh,rm=nm&&nm.isTypedArray,wF=rm?bF(rm):yF,Sw=wF,xF=FE,CF=xw,SF=hn,EF=sh,FF=Cw,kF=Sw,AF=Object.prototype,$F=AF.hasOwnProperty;function DF(e,t){var n=SF(e),r=!n&&CF(e),o=!n&&!r&&EF(e),i=!n&&!r&&!o&&kF(e),a=n||r||o||i,l=a?xF(e.length,String):[],s=l.length;for(var u in e)(t||$F.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||FF(u,s)))&&l.push(u);return l}var Ew=DF,_F=Object.prototype;function TF(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_F;return e===n}var dh=TF;function BF(e,t){return function(n){return e(t(n))}}var Fw=BF,PF=Fw,MF=PF(Object.keys,Object),OF=MF,RF=dh,NF=OF,IF=Object.prototype,LF=IF.hasOwnProperty;function zF(e){if(!RF(e))return NF(e);var t=[];for(var n in Object(e))LF.call(e,n)&&n!="constructor"&&t.push(n);return t}var jF=zF;function HF(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hi=HF,GF=Zr,WF=hi,UF="[object AsyncFunction]",VF="[object Function]",KF="[object GeneratorFunction]",YF="[object Proxy]";function XF(e){if(!WF(e))return!1;var t=GF(e);return t==VF||t==KF||t==UF||t==YF}var kw=XF,qF=kw,JF=uh;function QF(e){return e!=null&&JF(e.length)&&!qF(e)}var bu=QF,ZF=Ew,e4=jF,t4=bu;function n4(e){return t4(e)?ZF(e):e4(e)}var Ya=n4,r4=SE,o4=Ya;function i4(e,t){return e&&r4(e,t,o4)}var Aw=i4;function a4(e){return e}var $w=a4,l4=$w;function s4(e){return typeof e=="function"?e:l4}var u4=s4,c4=Aw,f4=u4;function d4(e,t){return e&&c4(e,f4(t))}var ph=d4,p4=Fw,h4=p4(Object.getPrototypeOf,Object),hh=h4,g4=Zr,m4=hh,v4=zn,y4="[object Object]",b4=Function.prototype,w4=Object.prototype,Dw=b4.toString,x4=w4.hasOwnProperty,C4=Dw.call(Object);function S4(e){if(!v4(e)||g4(e)!=y4)return!1;var t=m4(e);if(t===null)return!0;var n=x4.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Dw.call(n)==C4}var E4=S4;function F4(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var j4=z4,H4=wu;function G4(e,t){var n=this.__data__,r=H4(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var W4=G4,U4=A4,V4=O4,K4=I4,Y4=j4,X4=W4;function gi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&l9?new r9:void 0;for(i.set(e,t),i.set(t,e);++d0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,JA.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,XA.default)(r)?(0,KA.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,UA.default)(r)&&n.push(r)}),n};Va.default=QA;var Xa={};function ZA(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,bT.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,vT.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=wT({},r[l],i[l])}),o}),r};Xa.default=xT;var qa={};Object.defineProperty(qa,"__esModule",{value:!0});qa.autoprefix=void 0;var CT=ph,Nm=ET(CT),ST=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){TT(o,r);function o(){var i,a,l,s;_T(this,o);for(var u=arguments.length,c=Array(u),d=0;d1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){NT(o,r);function o(){var i,a,l,s;RT(this,o);for(var u=arguments.length,c=Array(u),d=0;d1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Fh.default=LT;Object.defineProperty(qt,"__esModule",{value:!0});qt.ReactCSS=qt.loop=qt.handleActive=kh=qt.handleHover=qt.hover=void 0;var zT=Va,jT=wi(zT),HT=Xa,GT=wi(HT),WT=qa,UT=wi(WT),VT=Ja,ex=wi(VT),KT=Qa,YT=wi(KT),XT=Fh,qT=wi(XT);function wi(e){return e&&e.__esModule?e:{default:e}}qt.hover=ex.default;var kh=qt.handleHover=ex.default;qt.handleActive=YT.default;qt.loop=qT.default;var JT=qt.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;ol?p=1:p=Math.round(d*100/l)/100,n.a!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}else{var h=void 0;if(c<0?h=0:c>a?h=1:h=Math.round(c*100/a)/100,o!==h)return{h:n.h,s:n.s,l:n.l,a:h,source:"rgb"}}return null},Jc={},ZT=function(t,n,r,o){if(typeof document=="undefined"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},eB=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Jc[i])return Jc[i];var a=ZT(t,n,r,o);return Jc[i]=a,a},zm=Object.assign||function(e){for(var t=1;t0:!1;function jc(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function iw(e,t){for(var n=t.slice(0,t.length-1),r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function o5(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i=0&&Te.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Te.splice(0,Te.length),(t===93||t===224)&&(t=91),t in lt){lt[t]=!1;for(var r in Vr)Vr[r]===t&&(un[r]=!1)}}function c5(e){if(!e)Object.keys(et).forEach(function(a){return delete et[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&Hc(a)});else if(typeof e=="object")e.key&&Hc(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?iw(Vr,u):[];et[p]=et[p].map(function(m){var y=o?m.method===o:!0;return y&&m.scope===r&&o5(m.mods,h)?{}:m})}})};function Ug(e,t,n){var r;if(t.scope===n||t.scope==="all"){r=t.mods.length>0;for(var o in lt)Object.prototype.hasOwnProperty.call(lt,o)&&(!lt[o]&&t.mods.indexOf(+o)>-1||lt[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!lt[16]&&!lt[18]&&!lt[17]&&!lt[91]||r||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Vg(e){var t=et["*"],n=e.keyCode||e.which||e.charCode;if(un.filter.call(this,e)){if((n===93||n===224)&&(n=91),Te.indexOf(n)===-1&&n!==229&&Te.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var m=Wg[h];e[h]&&Te.indexOf(m)===-1?Te.push(m):!e[h]&&Te.indexOf(m)>-1?Te.splice(Te.indexOf(m),1):h==="metaKey"&&e[h]&&Te.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Te=Te.slice(Te.indexOf(m))))}),n in lt){lt[n]=!0;for(var r in Vr)Vr[r]===n&&(un[r]=!0);if(!t)return}for(var o in lt)Object.prototype.hasOwnProperty.call(lt,o)&&(lt[o]=e[Wg[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Te.indexOf(17)===-1&&Te.push(17),Te.indexOf(18)===-1&&Te.push(18),lt[17]=!0,lt[18]=!0);var i=Oa();if(t)for(var a=0;a-1}function un(e,t,n){Te=[];var r=aw(e),o=[],i="all",a=document,l=0,s=!1,u=!0,c="+";for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(a=t.element),t.keyup&&(s=t.keyup),t.keydown!==void 0&&(u=t.keydown),typeof t.splitKey=="string"&&(c=t.splitKey)),typeof t=="string"&&(i=t);l1&&(o=iw(Vr,e)),e=e[e.length-1],e=e==="*"?"*":mu(e),e in et||(et[e]=[]),et[e].push({keyup:s,keydown:u,scope:i,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:c});typeof a!="undefined"&&!f5(a)&&window&&(uw.push(a),jc(a,"keydown",function(d){Vg(d)}),jc(window,"focus",function(){Te=[]}),jc(a,"keyup",function(d){Vg(d),u5(d)}))}var Gc={setScope:cw,getScope:Oa,deleteScope:s5,getPressedKeyCodes:i5,isPressed:l5,filter:a5,unbind:c5};for(var Wc in Gc)Object.prototype.hasOwnProperty.call(Gc,Wc)&&(un[Wc]=Gc[Wc]);if(typeof window!="undefined"){var d5=window.hotkeys;un.noConflict=function(e){return e&&window.hotkeys===un&&(window.hotkeys=d5),un},window.hotkeys=un}un.filter=function(){return!0};var fw=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},p5=function(t){return fw(t,["INPUT","TEXTAREA","SELECT"])};function qi(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},i=o.enableOnTags,a=o.filter,l=o.keyup,s=o.keydown,u=o.filterPreventDefault,c=u===void 0?!0:u,d=o.enabled,p=d===void 0?!0:d,h=o.enableOnContentEditable,m=h===void 0?!1:h,y=x.useRef(null),E=x.useCallback(function(g,v){var b;return a&&!a(g)?!c:p5(g)&&!fw(g,i)||(b=g.target)!=null&&b.isContentEditable&&!m?!0:y.current===null||document.activeElement===y.current?(t(g,v),!0):!1},r?[y,i,a].concat(r):[y,i,a]);return x.useEffect(function(){if(p)return l&&s!==!0&&(n.keydown=!1),un(e,n||{},E),function(){return un.unbind(e,E)}},[E,n,e,p]),y}const Tl=new Map,Tr={_deps:{}};function h5(e){for(const t in e)Object.defineProperty(Tr,t,{get(){const n=ae[t];return Tr._deps[t]=n,n}})}function g5(e){const t=Tr._deps;Tr._deps={};const n=e(Tr),r=Tr._deps;return Tr._deps=t,[n,r]}function m5(e){const t={};let n=!1;for(const r in e){const o=ae[r];e[r]!==o&&(n=!0),t[r]=o}return[t,n]}function fo(e){const t=e.toString();if(Tl.has(t)){const[o,i]=Tl.get(t),[a,l]=m5(i);if(!l)return o;const s=e(a,[o,i]);return Tl.set(t,[s,a]),s}const[n,r]=g5(e);return Tl.set(t,[n,r]),n}function v5(e){const t={};for(const n in e){const r=e[n];Object.defineProperty(t,n,{get(){return r()[0]}})}return h5(e),t}function y5(e){const t={};for(const n in e){const r=e[n],o=()=>r()[0],i=f(o,{});i.toString=o,t[n]=i}return t}const dw=e=>e.map(({dims:t,label:n})=>({label:`${n} (${t.join(" x ")})`,value:t.join(),dims:t})),b5=dw([{dims:[360,640],label:"Phone"},{dims:[768,1024],label:"Tablet Portrait"},{dims:[800,1280],label:"Tablet Large Portrait"},{dims:[1024,768],label:"Tablet Landscape"},{dims:[1280,800],label:"Tablet Large Landscape"},{dims:[1536,864],label:"Laptop Wide"}]),w5=dw([{dims:[360,640],label:"Phone"},{dims:[360,780],label:"Apple iPhone 12 mini"},{dims:[390,844],label:"Apple iPhone 12 Pro"},{dims:[768,1024],label:"Tablet Portrait"},{dims:[800,1280],label:"Tablet Large Portrait"},{dims:[1024,768],label:"Tablet Landscape"},{dims:[1280,800],label:"Tablet Large Landscape"},{dims:[1366,768],label:"Laptop Small"},{dims:[1440,900],label:"Laptop Medium"},{dims:[900,1440],label:"Laptop Medium Portrait"},{dims:[1536,864],label:"Laptop Wide"},{dims:[1920,1080],label:"Full HD"},{dims:[2560,1080],label:"Ultrawide HD"},{dims:[2560,1440],label:"UHD"},{dims:[3440,1440],label:"Ultrawide UHD"},{dims:[3840,2160],label:"4K"}]),Br=new Map,Kg=new Map,Uc={},Ji={};function Rr(e,t){const n=Uc.hasOwnProperty(e),r=n?Uc[e]:()=>Br.has(e)?Br.get(e):(Br.set(e,t),Ji[e]=new Set,Kg.set(e,a=>{const l=typeof a=="function"?a(Br.get(e)):a;Br.set(e,l);for(const s of Ji[e].values())s(l)}),t);n||(Uc[e]=r);const[o,i]=x.useState(r);return x.useInsertionEffect(()=>(Ji[e].add(i),()=>{Ji[e].delete(i)}),[]),[o,Kg.get(e)]}const Yg=new Set;function x5(e){return Br.get(e)}function C5(e,t){Yg.has(e)||(t(Br.get(e)),Ji[e].add(t),Yg.add(e))}let pw={};function S5(e){pw=e}const E5=()=>{const{fetchThemes:e,uploadTheme:t,deleteTheme:n}=pw,[r,o]=Rr("serverThemes",[]),[i,a]=Rr("serverThemesLoading",!0),[l,s]=Rr("serverThemesDirty",!1);return C5("serverThemesDirty",()=>{Ve(xe,null,function*(){const c=yield e();o(z({default:{scopes:{}}},c)),a(!1)})}),[r,{serverThemes:r,serverThemesLoading:i,uploadTheme:(u,c)=>Ve(xe,null,function*(){a(!0),yield t(u,{name:u,scopes:c}),s(!l)}),deleteTheme:u=>Ve(xe,null,function*(){a(!0),yield n(u),s(!l)})}]};function F5(e){return function(t,{type:n,payload:r}){const o=typeof n=="function"?n.name:n;if(typeof e[o]!="function")throw new Error(`No handler for action ${o}`);return e[o](t,r)}}var k5=hw;function hw(e,t,n){e instanceof RegExp&&(e=Xg(e,n)),t instanceof RegExp&&(t=Xg(t,n));const r=gw(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Xg(e,t){const n=t.match(e);return n?n[0]:null}hw.range=gw;function gw(e,t,n){let r,o,i,a,l,s=n.indexOf(e),u=n.indexOf(t,s+1),c=s;if(s>=0&&u>0){if(e===t)return[s,u];for(r=[],i=n.length;c>=0&&!l;)c===s?(r.push(c),s=n.indexOf(e,c+1)):r.length===1?l=[r.pop(),u]:(o=r.pop(),o=0?s:u;r.length&&(l=[i,a])}return l}const A5=fi(k5);function Pd(e){let t;try{t=A5("(",")",e)}catch(o){return}if(!t)return;if(/(?:^|[^\w-])var$/.test(t.pre))return{pre:t.pre.slice(0,-3),body:t.body,post:t.post};const n=Pd(t.body);if(n)return{pre:t.pre+"("+n.pre,body:n.body,post:n.post+")"+t.post};const r=Pd(t.post);if(r)return{pre:t.pre+"("+t.body+")"+r.pre,body:r.body,post:r.post}}const ah=/:(active|focus(-(visible|within))?|visited|hover|disabled|:[\w-]+)/g,mw=/:not\([\s,\*]*\)/g;function $5(e){return e===""||e==="*"||e===":root"?"*":`${e}, :where(${e}) *`.replace("\\\\","\\")}let ts;function D5(e,t){if(typeof t.matches!="function")return!1;const n=e.statelessSelector;if(ts.has(n))return ts.get(n);try{const r=t.matches(n);return ts.set(n,r),r}catch(r){return console.log("Failed testing a selector",e),!1}}const vw=({cssVars:e,target:t})=>{ts=new Map;let n;try{n=e.filter(r=>D5(r,t))}catch(r){console.log(t,r),n=[]}return n},lh=({href:e})=>!e||e.indexOf(window.location.origin)===0,da={},_5=e=>e.map(t=>T5(t)),qg=[],T5=e=>Ve(xe,null,function*(){if(!qg.includes(e)){if(!da[e]){const t=e.split("?")[0]+".map";try{let n=yield(yield fetch(t)).json();da[e]=yield new window.sourceMap.SourceMapConsumer(n)}catch(n){qg.push(e);return}}return da[e]}}),B5=(e,t,n)=>(r,o)=>{const{text:i,index:a}=o;if(/^\s*--/.test(i))return r;const l=`var(${e}`,[s,...u]=i.split(l);let c=s.length;for(const d of u){const p=a+1;if(!/^[\w-]/.test(d))return r.push(q(z({},t.originalPositionFor({line:p,column:c})),{generated:{line:p,column:c,sheet:n}})),r;c+=l.length+d.length}return r},pa={},P5=e=>Ve(xe,null,function*(){if(!(e in pa)){const t=yield(yield fetch(e)).text();pa[e]=t.split(` +`).reduce((n,r,o)=>(r.includes("var(")&&n.push({text:r,index:o}),n),[])}return pa[e]}),M5=e=>e.map(t=>P5(t)),O5=(e,t,n)=>{if(!e)return[];const r=pa[e];return r?r.reduce(B5(t,n,e),[]):(console.warn("no lines",e,Object.keys(pa)),[])},R5=(e,t)=>Ve(xe,null,function*(){let n;if(lh(t))n=t.cssRules;else try{const r=yield(yield fetch(t.href)).text(),o=document.createElement("style");o.innerText=r,document.head.appendChild(o),n=document.styleSheets[document.styleSheets.length-1].cssRules,document.head.removeChild(o)}catch(r){return yield e}return[...n].reduce((r,o)=>Md(r,o,t),yield e)}),N5=(e,t)=>e.some(({usages:n})=>n.some(r=>r.sheet===t.href)),I5=(e,t)=>Ve(xe,null,function*(){const r=t.filter(i=>i.href&&N5(e,i)&&lh(i)).map(i=>[..._5([i.href]),...M5([i.href])]);if(r.length===0)return yield Promise.allSettled([]);const o=r.reduce((i,a)=>[...i,...a],[]);return yield Promise.allSettled(o)});let Jg=[];function Ds(e){const t=e.replaceAll(ah,"").replace(/:?:(before|after|first\-letter)/,"").trim().replaceAll(/^\s*[\>+~]/g,"").replaceAll(/,\s*[\>+~]/g,",").replaceAll(/\(,/g,"(").replaceAll(/[\>+~]\s*,/g,">*,").replaceAll(/>\s*~/g,">*~").replaceAll(/[\>+~]\s*$/g,"~*").replaceAll(/[\>+~]\s*\)/g,"~*)").replaceAll(/\(\s*[\>+~]/g,"(").replaceAll(/,(\s*,)+/g,",").replaceAll(/:(where|is|not)\([\s,]*\)/g,"").replace(/^(\s*,\s*)+/,"").replace(/(\s*,\s*)+$/,"").replaceAll(/\s*,\s*/g,",").replaceAll(/,\s*\)/g,")");return $5(t)}const L5=()=>Ve(xe,null,function*(){const e=performance.now(),t=[...document.styleSheets].filter(l=>{var s;return((s=l.ownerNode)==null?void 0:s.id)!==T0}),n=yield t.reduce(R5,{});Jg=Object.keys(rt).filter(l=>document.querySelectorAll(l).length>0),Jg.filter(l=>document.querySelector(l)===document.documentElement);const r=Object.entries(n).map(([l,s])=>q(z({name:l},s),{statelessSelector:[...new Set(s.usages.map(u=>u.statelessSelector))].join()}));yield I5(r,t);const o=r.map(l=>{const{name:s,usages:u}=l,d=[...new Set(u.filter(p=>p.sheet).map(p=>p.sheet))].reduce((p,h)=>{const m=da[h];if(!m)return p;const y=O5(h,s,m);return p.push(...y),p},[]);return l.usages=l.usages.map((p,h)=>(p.position=d[h],p)),l.positions=d,l}),i=yield Promise.allSettled(o);Object.values(da).forEach(l=>l&&l.destroy());const a=performance.now()-e;return console.info(`Extracted data in ${a}ms`),yield i.filter(z5).map(l=>l.value)}),z5=e=>e.status==="fulfilled",vu="theme-editor-highlight",Ra=e=>!!e&&e.classList.add(vu),Xo=e=>!!e&&e.classList.remove(vu);function j5(e,t){let n=e,r="",o=/^border\-\w+-/.test(e)?e.replace(/(.*-)*/,""):"",i=!1,a=o!==""&&!["source","slice","outset","repeat"].includes(o);if(o==="radius")return["border-radius",t.style["border-radius"]];const l=H5(e);if(l)return[l,t.style[l]];for(;r===""||typeof r=="undefined";){const s=n.replace(/-\w+$/,"");if(s===n)break;const u=s==="border";n=u&&!i&&a?`border-${o}`:s,i=u||i,r=t.style[n]}return[n,r]}function H5(e){switch(e){case"column-count":case"column-width":return"columns";case"flex-direction":case"flex-wrap":return"flex-flow";case"line-height":return"font";case"row-gap":case"column-gap":return"gap";case"grid-column-end":case"grid-column-start":return"grid-column";case"grid-row-end":case"grid-row-start":return"grid-row";case"align-content":case"justify-content":return"place-content";case"align-items":case"justify-items":return"place-items"}}const rt={":root":{},":where(html)":{}},qo={},Md=(e,t,n,r=null,o=null)=>{if(t.type===1){const i=[],a=t.selectorText;if(a===`.${vu}`||a.includes("::part"))return e;for(let l of t.style){const s=l.startsWith("--"),c=t.style.getPropertyValue(l)==="";let d=t.style.getPropertyValue(l).trim();if(s){rt[a]||(rt[a]={}),(!r||!/prefers\-color\-scheme\: ?dark/.test(r)&&r!=="print")&&(rt[a][l]=d,qo[l]||(qo[l]={}),qo[l][a]=d);continue}let p,h=!0,m=0;if(c){const[v,b]=j5(l,t);if(i.includes(v)||b===""||b===void 0)continue;i.push(v),d=b,l=v}const y=d,E=t.style.getPropertyPriority(l)==="important";for(;p=Pd(d);){const v=p.body.split(",").map(P=>P.trim()),b=h&&p.pre.trim()===""&&p.post.replace(/\s*\!important$/,"")==="",D=/^\s*\)\s*/.test(p.post)&&/\w+(-\w+)*\(\s*$/.test(p.pre)?p.pre.match(/(\w+(-\w+)*)\(\s*$/)[1]:null;h=!1;const[$,..._]=v,T=_.join(","),B={selector:a,statelessSelector:Ds(a),property:l,defaultValue:T,media:r,supports:o,sheet:n.href,isFullProperty:b,fullValue:y,isImportant:E,index:m,cssFunc:D};m++,e.hasOwnProperty($)||(e[$]={properties:{},usages:[],statelessSelector:null,cssFunc:D}),e[$].usages.push(B),e[$].cssFunc=e[$].cssFunc||D,e[$].properties[l]={isFullProperty:b,fullValue:y,isImportant:E},d=(p.pre||"")+p.body.replace($,"")+(p.post||"")}const g=(d==null?void 0:d.trim())||"";g!==""&&!g.startsWith(",")&&(y in e||(e[y]={isRawValue:!0,properties:{},usages:[],statelessSelector:null}),e[y].usages.push({selector:a,statelessSelector:Ds(a),property:l,defaultValue:y,media:r,supports:o,sheet:n.href,isFullProperty:!0,fullValue:y,isImportant:E,index:m}),e[y].properties[l]={isFullProperty:!0,fullValue:y,isImportant:E})}}return t.type===4&&[...t.cssRules].forEach(i=>Md(e,i,n,t.conditionText,o)),t.type===12&&[...t.cssRules].forEach(i=>Md(e,i,n,r,t.conditionText)),e},G5={scopes:{}},At=":root",Ce={set:(e,{name:t,value:n,scope:r=At})=>{const{scopes:o}=e;if(t==="")return e;const i=mn(o,[]);return i[r]=q(z({},o[r]||{}),{[t]:n}),q(z({},e),{scopes:i})},unset:(e,{name:t,scope:n=At})=>{const{scopes:r}=e;if(!(r[n]&&t in r[n]))return e;const{[n]:o}=r,l=o,{[t]:i}=l,a=mn(l,[pc(t)]);return q(z({},e),{scopes:q(z({},r),{[n]:a})})},createAlias(e,t){const{name:n,value:r,generatedName:o}=t;let i;if(o)i=o;else{let u=function(p){return p.hasOwnProperty(i)&&p[i]!==r},c=function(){return Object.values(rt).some(u)||Object.values(e.scopes).some(u)};i=`--${n.replaceAll(" ","-")}`;let d=0;for(;c();)d++,i=`--${n.replaceAll(" ","-")}-${d}`;t.generatedName=i}const a=`var(${i})`,l={};let s=!1;for(const u of Object.keys(rt))for(const[c,d]of Object.entries(rt[u]))d===r&&(l.hasOwnProperty(u)||(l[u]={}),l[u][c]=a);for(const u in e.scopes){l[u]||(l[u]={});const c=e.scopes[u];for(const d in c){const p=c[d]===r;l[u][d]=p?a:c[d]}u===At&&(l[u][i]=r,s=!0)}return s||(l[At]||(l[At]={}),l[At][i]=r),q(z({},e),{scopes:l})},loadTheme:(e,{theme:t={}})=>{const n="scopes"in t;return q(z({},e),{scopes:n?t.scopes:{[At]:t}})}},W5=F5(Ce);function U5(){return B2(W5,G5,null,"themeEditor")}function rn(){return v0("themeEditor")}var qt={},Va={},V5=typeof dl=="object"&&dl&&dl.Object===Object&&dl,yw=V5,K5=yw,Y5=typeof self=="object"&&self&&self.Object===Object&&self,X5=K5||Y5||Function("return this")(),En=X5,q5=En,J5=q5.Symbol,Ka=J5,Qg=Ka,bw=Object.prototype,Q5=bw.hasOwnProperty,Z5=bw.toString,Ni=Qg?Qg.toStringTag:void 0;function eE(e){var t=Q5.call(e,Ni),n=e[Ni];try{e[Ni]=void 0;var r=!0}catch(i){}var o=Z5.call(e);return r&&(t?e[Ni]=n:delete e[Ni]),o}var tE=eE,nE=Object.prototype,rE=nE.toString;function oE(e){return rE.call(e)}var iE=oE,Zg=Ka,aE=tE,lE=iE,sE="[object Null]",uE="[object Undefined]",em=Zg?Zg.toStringTag:void 0;function cE(e){return e==null?e===void 0?uE:sE:em&&em in Object(e)?aE(e):lE(e)}var Zr=cE,fE=Array.isArray,hn=fE;function dE(e){return e!=null&&typeof e=="object"}var zn=dE,pE=Zr,hE=hn,gE=zn,mE="[object String]";function vE(e){return typeof e=="string"||!hE(e)&&gE(e)&&pE(e)==mE}var yE=vE;function bE(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(n(i[s],s,i)===!1)break}return t}}var wE=bE,xE=wE,CE=xE(),SE=CE;function EE(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=zE}var uh=jE,HE=Zr,GE=uh,WE=zn,UE="[object Arguments]",VE="[object Array]",KE="[object Boolean]",YE="[object Date]",XE="[object Error]",qE="[object Function]",JE="[object Map]",QE="[object Number]",ZE="[object Object]",eF="[object RegExp]",tF="[object Set]",nF="[object String]",rF="[object WeakMap]",oF="[object ArrayBuffer]",iF="[object DataView]",aF="[object Float32Array]",lF="[object Float64Array]",sF="[object Int8Array]",uF="[object Int16Array]",cF="[object Int32Array]",fF="[object Uint8Array]",dF="[object Uint8ClampedArray]",pF="[object Uint16Array]",hF="[object Uint32Array]",$e={};$e[aF]=$e[lF]=$e[sF]=$e[uF]=$e[cF]=$e[fF]=$e[dF]=$e[pF]=$e[hF]=!0;$e[UE]=$e[VE]=$e[oF]=$e[KE]=$e[iF]=$e[YE]=$e[XE]=$e[qE]=$e[JE]=$e[QE]=$e[ZE]=$e[eF]=$e[tF]=$e[nF]=$e[rF]=!1;function gF(e){return WE(e)&&GE(e.length)&&!!$e[HE(e)]}var mF=gF;function vF(e){return function(t){return e(t)}}var ch=vF,Ts={exports:{}};Ts.exports;(function(e,t){var n=yw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var s=o&&o.require&&o.require("util").types;return s||a&&a.binding&&a.binding("util")}catch(u){}}();e.exports=l})(Ts,Ts.exports);var fh=Ts.exports,yF=mF,bF=ch,nm=fh,rm=nm&&nm.isTypedArray,wF=rm?bF(rm):yF,Sw=wF,xF=FE,CF=xw,SF=hn,EF=sh,FF=Cw,kF=Sw,AF=Object.prototype,$F=AF.hasOwnProperty;function DF(e,t){var n=SF(e),r=!n&&CF(e),o=!n&&!r&&EF(e),i=!n&&!r&&!o&&kF(e),a=n||r||o||i,l=a?xF(e.length,String):[],s=l.length;for(var u in e)(t||$F.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||FF(u,s)))&&l.push(u);return l}var Ew=DF,_F=Object.prototype;function TF(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_F;return e===n}var dh=TF;function BF(e,t){return function(n){return e(t(n))}}var Fw=BF,PF=Fw,MF=PF(Object.keys,Object),OF=MF,RF=dh,NF=OF,IF=Object.prototype,LF=IF.hasOwnProperty;function zF(e){if(!RF(e))return NF(e);var t=[];for(var n in Object(e))LF.call(e,n)&&n!="constructor"&&t.push(n);return t}var jF=zF;function HF(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var gi=HF,GF=Zr,WF=gi,UF="[object AsyncFunction]",VF="[object Function]",KF="[object GeneratorFunction]",YF="[object Proxy]";function XF(e){if(!WF(e))return!1;var t=GF(e);return t==VF||t==KF||t==UF||t==YF}var kw=XF,qF=kw,JF=uh;function QF(e){return e!=null&&JF(e.length)&&!qF(e)}var yu=QF,ZF=Ew,e4=jF,t4=yu;function n4(e){return t4(e)?ZF(e):e4(e)}var Ya=n4,r4=SE,o4=Ya;function i4(e,t){return e&&r4(e,t,o4)}var Aw=i4;function a4(e){return e}var $w=a4,l4=$w;function s4(e){return typeof e=="function"?e:l4}var u4=s4,c4=Aw,f4=u4;function d4(e,t){return e&&c4(e,f4(t))}var ph=d4,p4=Fw,h4=p4(Object.getPrototypeOf,Object),hh=h4,g4=Zr,m4=hh,v4=zn,y4="[object Object]",b4=Function.prototype,w4=Object.prototype,Dw=b4.toString,x4=w4.hasOwnProperty,C4=Dw.call(Object);function S4(e){if(!v4(e)||g4(e)!=y4)return!1;var t=m4(e);if(t===null)return!0;var n=x4.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Dw.call(n)==C4}var E4=S4;function F4(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var j4=z4,H4=bu;function G4(e,t){var n=this.__data__,r=H4(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var W4=G4,U4=A4,V4=O4,K4=I4,Y4=j4,X4=W4;function mi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&l9?new r9:void 0;for(i.set(e,t),i.set(t,e);++d0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,JA.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,XA.default)(r)?(0,KA.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,UA.default)(r)&&n.push(r)}),n};Va.default=QA;var Xa={};function ZA(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,bT.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,vT.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=wT({},r[l],i[l])}),o}),r};Xa.default=xT;var qa={};Object.defineProperty(qa,"__esModule",{value:!0});qa.autoprefix=void 0;var CT=ph,Nm=ET(CT),ST=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){TT(o,r);function o(){var i,a,l,s;_T(this,o);for(var u=arguments.length,c=Array(u),d=0;d1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){NT(o,r);function o(){var i,a,l,s;RT(this,o);for(var u=arguments.length,c=Array(u),d=0;d1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&o("first-child"),t===n-1&&o("last-child"),(t===0||t%2===0)&&o("even"),Math.abs(t%2)===1&&o("odd"),o("nth-child",t),r};Fh.default=LT;Object.defineProperty(qt,"__esModule",{value:!0});qt.ReactCSS=qt.loop=qt.handleActive=kh=qt.handleHover=qt.hover=void 0;var zT=Va,jT=xi(zT),HT=Xa,GT=xi(HT),WT=qa,UT=xi(WT),VT=Ja,ex=xi(VT),KT=Qa,YT=xi(KT),XT=Fh,qT=xi(XT);function xi(e){return e&&e.__esModule?e:{default:e}}qt.hover=ex.default;var kh=qt.handleHover=ex.default;qt.handleActive=YT.default;qt.loop=qT.default;var JT=qt.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;ol?p=1:p=Math.round(d*100/l)/100,n.a!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}else{var h=void 0;if(c<0?h=0:c>a?h=1:h=Math.round(c*100/a)/100,o!==h)return{h:n.h,s:n.s,l:n.l,a:h,source:"rgb"}}return null},Jc={},ZT=function(t,n,r,o){if(typeof document=="undefined"&&!o)return null;var i=o?new o:document.createElement("canvas");i.width=r*2,i.height=r*2;var a=i.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,i.width,i.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),i.toDataURL()):null},eB=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Jc[i])return Jc[i];var a=ZT(t,n,r,o);return Jc[i]=a,a},zm=Object.assign||function(e){for(var t=1;t-1},hB=function(t){return Number(String(t).replace(/%/g,""))},gB=1,de=function(e){uB(t,e);function t(n){lB(this,t);var r=sB(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=hB(o.target.value);if(!isNaN(i)&&pB(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===tx?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+gB++,r}return iB(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return aB({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||cB}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=te({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return w.createElement("div",{style:o.wrap},w.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?w.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(x.PureComponent||x.Component),mB=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(o.getBoundingClientRect().left+window.pageXOffset),c=s-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var d=void 0;if(c<0)d=359;else if(c>a)d=0;else{var p=-(c*100/a)+100;d=360*p/100}if(r.h!==d)return{h:d,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var h=void 0;if(u<0)h=0;else if(u>i)h=359;else{var m=u*100/i;h=360*m/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},vB=function(){function e(t,n){for(var r=0;r-1},hB=function(t){return Number(String(t).replace(/%/g,""))},gB=1,de=function(e){uB(t,e);function t(n){lB(this,t);var r=sB(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(o){r.setUpdatedValue(o.target.value,o)},r.handleKeyDown=function(o){var i=hB(o.target.value);if(!isNaN(i)&&pB(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===tx?i+a:i-a;r.setUpdatedValue(l,o)}},r.handleDrag=function(o){if(r.props.dragLabel){var i=Math.round(r.props.value+o.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),o)}},r.handleMouseDown=function(o){r.props.dragLabel&&(o.preventDefault(),r.handleDrag(o),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+gB++,r}return iB(t,[{key:"componentDidUpdate",value:function(r,o){this.props.value!==this.state.value&&(r.value!==this.props.value||o.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return aB({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||cB}},{key:"setUpdatedValue",value:function(r,o){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,o),this.setState({value:r})}},{key:"render",value:function(){var r=this,o=te({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return w.createElement("div",{style:o.wrap},w.createElement("input",{id:this.inputId,style:o.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?w.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(x.PureComponent||x.Component),mB=function(t,n,r,o){var i=o.clientWidth,a=o.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(o.getBoundingClientRect().left+window.pageXOffset),c=s-(o.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var d=void 0;if(c<0)d=359;else if(c>a)d=0;else{var p=-(c*100/a)+100;d=360*p/100}if(r.h!==d)return{h:d,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var h=void 0;if(u<0)h=0;else if(u>i)h=359;else{var m=u*100/i;h=360*m/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},vB=function(){function e(t,n){for(var r=0;r-1}function TB(e,t){var n=this.__data__,r=$u(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=IP}function Si(e){return e!=null&&Th(e.length)&&!$h(e)}function LP(e){return vr(e)&&Si(e)}function zP(){return!1}var dx=typeof xe=="object"&&xe&&!xe.nodeType&&xe,Xm=dx&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,jP=Xm&&Xm.exports===dx,qm=jP?gn.Buffer:void 0,HP=qm?qm.isBuffer:void 0,Is=HP||zP,GP="[object Object]",WP=Function.prototype,UP=Object.prototype,px=WP.toString,VP=UP.hasOwnProperty,KP=px.call(Object);function YP(e){if(!vr(e)||to(e)!=GP)return!1;var t=cx(e);if(t===null)return!0;var n=VP.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&px.call(n)==KP}var XP="[object Arguments]",qP="[object Array]",JP="[object Boolean]",QP="[object Date]",ZP="[object Error]",eM="[object Function]",tM="[object Map]",nM="[object Number]",rM="[object Object]",oM="[object RegExp]",iM="[object Set]",aM="[object String]",lM="[object WeakMap]",sM="[object ArrayBuffer]",uM="[object DataView]",cM="[object Float32Array]",fM="[object Float64Array]",dM="[object Int8Array]",pM="[object Int16Array]",hM="[object Int32Array]",gM="[object Uint8Array]",mM="[object Uint8ClampedArray]",vM="[object Uint16Array]",yM="[object Uint32Array]",De={};De[cM]=De[fM]=De[dM]=De[pM]=De[hM]=De[gM]=De[mM]=De[vM]=De[yM]=!0;De[XP]=De[qP]=De[sM]=De[JP]=De[uM]=De[QP]=De[ZP]=De[eM]=De[tM]=De[nM]=De[rM]=De[oM]=De[iM]=De[aM]=De[lM]=!1;function bM(e){return vr(e)&&Th(e.length)&&!!De[to(e)]}function wM(e){return function(t){return e(t)}}var hx=typeof xe=="object"&&xe&&!xe.nodeType&&xe,ha=hx&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,xM=ha&&ha.exports===hx,Zc=xM&&ix.process,Jm=function(){try{var e=ha&&ha.require&&ha.require("util").types;return e||Zc&&Zc.binding&&Zc.binding("util")}catch(t){}}(),Qm=Jm&&Jm.isTypedArray,Bh=Qm?wM(Qm):bM;function jd(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var CM=Object.prototype,SM=CM.hasOwnProperty;function EM(e,t,n){var r=e[t];(!(SM.call(e,t)&&Za(r,n))||n===void 0&&!(t in e))&&Dh(e,t,n)}function FM(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e0){if(++t>=jM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var UM=WM(zM);function VM(e,t){return UM(IM(e,t,_u),e+"")}function KM(e,t,n){if(!tn(n))return!1;var r=typeof t;return(r=="number"?Si(n)&&Ph(t,n.length):r=="string"&&t in n)?Za(n[t],e):!1}function YM(e){return VM(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&KM(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r=t||_<0||d&&T>=i}function g(){var $=ef();if(E($))return v($);l=setTimeout(g,y($))}function v($){return l=void 0,p&&r?h($):(r=o=void 0,a)}function b(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0}function F(){return l===void 0?a:v(ef())}function D(){var $=ef(),_=E($);if(r=arguments,o=this,s=$,_){if(l===void 0)return m(s);if(d)return clearTimeout(l),l=setTimeout(g,t),h(s)}return l===void 0&&(l=setTimeout(g,t)),a}return D.cancel=b,D.flush=F,D}var lO="Expected a function";function sO(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(lO);return tn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),yx(e,t,{leading:r,maxWait:t,trailing:o})}var uO=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(r.getBoundingClientRect().left+window.pageXOffset),c=s-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i&&(u=i),c<0?c=0:c>a&&(c=a);var d=u/i,p=1-c/a;return{h:n.h,s:d,v:p,a:n.a,source:"hsv"}},cO=function(){function e(t,n){for(var r=0;r-1}function TB(e,t){var n=this.__data__,r=Au(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=IP}function Ei(e){return e!=null&&Th(e.length)&&!$h(e)}function LP(e){return vr(e)&&Ei(e)}function zP(){return!1}var dx=typeof xe=="object"&&xe&&!xe.nodeType&&xe,Xm=dx&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,jP=Xm&&Xm.exports===dx,qm=jP?gn.Buffer:void 0,HP=qm?qm.isBuffer:void 0,Ns=HP||zP,GP="[object Object]",WP=Function.prototype,UP=Object.prototype,px=WP.toString,VP=UP.hasOwnProperty,KP=px.call(Object);function YP(e){if(!vr(e)||to(e)!=GP)return!1;var t=cx(e);if(t===null)return!0;var n=VP.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&px.call(n)==KP}var XP="[object Arguments]",qP="[object Array]",JP="[object Boolean]",QP="[object Date]",ZP="[object Error]",eM="[object Function]",tM="[object Map]",nM="[object Number]",rM="[object Object]",oM="[object RegExp]",iM="[object Set]",aM="[object String]",lM="[object WeakMap]",sM="[object ArrayBuffer]",uM="[object DataView]",cM="[object Float32Array]",fM="[object Float64Array]",dM="[object Int8Array]",pM="[object Int16Array]",hM="[object Int32Array]",gM="[object Uint8Array]",mM="[object Uint8ClampedArray]",vM="[object Uint16Array]",yM="[object Uint32Array]",De={};De[cM]=De[fM]=De[dM]=De[pM]=De[hM]=De[gM]=De[mM]=De[vM]=De[yM]=!0;De[XP]=De[qP]=De[sM]=De[JP]=De[uM]=De[QP]=De[ZP]=De[eM]=De[tM]=De[nM]=De[rM]=De[oM]=De[iM]=De[aM]=De[lM]=!1;function bM(e){return vr(e)&&Th(e.length)&&!!De[to(e)]}function wM(e){return function(t){return e(t)}}var hx=typeof xe=="object"&&xe&&!xe.nodeType&&xe,ha=hx&&typeof zt=="object"&&zt&&!zt.nodeType&&zt,xM=ha&&ha.exports===hx,Zc=xM&&ix.process,Jm=function(){try{var e=ha&&ha.require&&ha.require("util").types;return e||Zc&&Zc.binding&&Zc.binding("util")}catch(t){}}(),Qm=Jm&&Jm.isTypedArray,Bh=Qm?wM(Qm):bM;function jd(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var CM=Object.prototype,SM=CM.hasOwnProperty;function EM(e,t,n){var r=e[t];(!(SM.call(e,t)&&Za(r,n))||n===void 0&&!(t in e))&&Dh(e,t,n)}function FM(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e0){if(++t>=jM)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var UM=WM(zM);function VM(e,t){return UM(IM(e,t,Du),e+"")}function KM(e,t,n){if(!tn(n))return!1;var r=typeof t;return(r=="number"?Ei(n)&&Ph(t,n.length):r=="string"&&t in n)?Za(n[t],e):!1}function YM(e){return VM(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&KM(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r=t||_<0||d&&T>=i}function g(){var $=ef();if(E($))return v($);l=setTimeout(g,y($))}function v($){return l=void 0,p&&r?h($):(r=o=void 0,a)}function b(){l!==void 0&&clearTimeout(l),u=0,r=s=o=l=void 0}function F(){return l===void 0?a:v(ef())}function D(){var $=ef(),_=E($);if(r=arguments,o=this,s=$,_){if(l===void 0)return m(s);if(d)return clearTimeout(l),l=setTimeout(g,t),h(s)}return l===void 0&&(l=setTimeout(g,t)),a}return D.cancel=b,D.flush=F,D}var lO="Expected a function";function sO(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(lO);return tn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),yx(e,t,{leading:r,maxWait:t,trailing:o})}var uO=function(t,n,r){var o=r.getBoundingClientRect(),i=o.width,a=o.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(r.getBoundingClientRect().left+window.pageXOffset),c=s-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i&&(u=i),c<0?c=0:c>a&&(c=a);var d=u/i,p=1-c/a;return{h:n.h,s:d,v:p,a:n.a,source:"hsv"}},cO=function(){function e(t,n){for(var r=0;r=0,V=!A&&O&&(C==="hex"||C==="hex6"||C==="hex3"||C==="hex4"||C==="hex8"||C==="name");return V?C==="name"&&this._a===0?this.toName():this.toRgbString():(C==="rgb"&&(S=this.toRgbString()),C==="prgb"&&(S=this.toPercentageRgbString()),(C==="hex"||C==="hex6")&&(S=this.toHexString()),C==="hex3"&&(S=this.toHexString(!0)),C==="hex4"&&(S=this.toHex8String(!0)),C==="hex8"&&(S=this.toHex8String()),C==="name"&&(S=this.toName()),C==="hsl"&&(S=this.toHslString()),C==="hsv"&&(S=this.toHsvString()),S||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(C,A){var S=C.apply(null,[this].concat([].slice.call(A)));return this._r=S._r,this._g=S._g,this._b=S._b,this.setAlpha(S._a),this},lighten:function(){return this._applyModification($,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(T,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(D,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(C,A){return C.apply(null,[this].concat([].slice.call(A)))},analogous:function(){return this._applyCombination(pe,arguments)},complement:function(){return this._applyCombination(P,arguments)},monochromatic:function(){return this._applyCombination(oe,arguments)},splitcomplement:function(){return this._applyCombination(X,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(K,arguments)}},u.fromRatio=function(C,A){if(typeof C=="object"){var S={};for(var O in C)C.hasOwnProperty(O)&&(O==="a"?S[O]=C[O]:S[O]=ge(C[O]));C=S}return u(C,A)};function c(C){var A={r:0,g:0,b:0},S=1,O=null,V=null,M=null,ee=!1,ie=!1;return typeof C=="string"&&(C=Fn(C)),typeof C=="object"&&(Vt(C.r)&&Vt(C.g)&&Vt(C.b)?(A=d(C.r,C.g,C.b),ee=!0,ie=String(C.r).substr(-1)==="%"?"prgb":"rgb"):Vt(C.h)&&Vt(C.s)&&Vt(C.v)?(O=ge(C.s),V=ge(C.v),A=y(C.h,O,V),ee=!0,ie="hsv"):Vt(C.h)&&Vt(C.s)&&Vt(C.l)&&(O=ge(C.s),M=ge(C.l),A=h(C.h,O,M),ee=!0,ie="hsl"),C.hasOwnProperty("a")&&(S=C.a)),S=Q(S),{ok:ee,format:C.format||ie,r:a(255,l(A.r,0)),g:a(255,l(A.g,0)),b:a(255,l(A.b,0)),a:S}}function d(C,A,S){return{r:G(C,255)*255,g:G(A,255)*255,b:G(S,255)*255}}function p(C,A,S){C=G(C,255),A=G(A,255),S=G(S,255);var O=l(C,A,S),V=a(C,A,S),M,ee,ie=(O+V)/2;if(O==V)M=ee=0;else{var ve=O-V;switch(ee=ie>.5?ve/(2-O-V):ve/(O+V),O){case C:M=(A-S)/ve+(A1&&(xt-=1),xt<1/6?Ee+(Qe-Ee)*6*xt:xt<1/2?Qe:xt<2/3?Ee+(Qe-Ee)*(2/3-xt)*6:Ee}if(A===0)O=V=M=S;else{var ie=S<.5?S*(1+A):S+A-S*A,ve=2*S-ie;O=ee(ve,ie,C+1/3),V=ee(ve,ie,C),M=ee(ve,ie,C-1/3)}return{r:O*255,g:V*255,b:M*255}}function m(C,A,S){C=G(C,255),A=G(A,255),S=G(S,255);var O=l(C,A,S),V=a(C,A,S),M,ee,ie=O,ve=O-V;if(ee=O===0?0:ve/O,O==V)M=0;else{switch(O){case C:M=(A-S)/ve+(A>1)+720)%360;--A;)O.h=(O.h+V)%360,M.push(u(O));return M}function oe(C,A){A=A||6;for(var S=u(C).toHsv(),O=S.h,V=S.s,M=S.v,ee=[],ie=1/A;A--;)ee.push(u({h:O,s:V,v:M})),M=(M+ie)%1;return ee}u.mix=function(C,A,S){S=S===0?0:S||50;var O=u(C).toRgb(),V=u(A).toRgb(),M=S/100,ee={r:(V.r-O.r)*M+O.r,g:(V.g-O.g)*M+O.g,b:(V.b-O.b)*M+O.b,a:(V.a-O.a)*M+O.a};return u(ee)},u.readability=function(C,A){var S=u(C),O=u(A);return(t.max(S.getLuminance(),O.getLuminance())+.05)/(t.min(S.getLuminance(),O.getLuminance())+.05)},u.isReadable=function(C,A,S){var O=u.readability(C,A),V,M;switch(M=!1,V=Kt(S),V.level+V.size){case"AAsmall":case"AAAlarge":M=O>=4.5;break;case"AAlarge":M=O>=3;break;case"AAAsmall":M=O>=7;break}return M},u.mostReadable=function(C,A,S){var O=null,V=0,M,ee,ie,ve;S=S||{},ee=S.includeFallbackColors,ie=S.level,ve=S.size;for(var Ee=0;EeV&&(V=M,O=u(A[Ee]));return u.isReadable(C,O,{level:ie,size:ve})||!ee?O:(S.includeFallbackColors=!1,u.mostReadable(C,["#fff","#000"],S))};var ye=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Le=u.hexNames=N(ye);function N(C){var A={};for(var S in C)C.hasOwnProperty(S)&&(A[C[S]]=S);return A}function Q(C){return C=parseFloat(C),(isNaN(C)||C<0||C>1)&&(C=1),C}function G(C,A){le(C)&&(C="100%");var S=he(C);return C=a(A,l(0,parseFloat(C))),S&&(C=parseInt(C*A,10)/100),t.abs(C-A)<1e-6?1:C%A/parseFloat(A)}function re(C){return a(1,l(0,C))}function U(C){return parseInt(C,16)}function le(C){return typeof C=="string"&&C.indexOf(".")!=-1&&parseFloat(C)===1}function he(C){return typeof C=="string"&&C.indexOf("%")!=-1}function Se(C){return C.length==1?"0"+C:""+C}function ge(C){return C<=1&&(C=C*100+"%"),C}function ze(C){return t.round(parseFloat(C)*255).toString(16)}function Je(C){return U(C)/255}var dt=function(){var C="[-\\+]?\\d+%?",A="[-\\+]?\\d*\\.\\d+%?",S="(?:"+A+")|(?:"+C+")",O="[\\s|\\(]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?",V="[\\s|\\(]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?";return{CSS_UNIT:new RegExp(S),rgb:new RegExp("rgb"+O),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+O),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+O),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Vt(C){return!!dt.CSS_UNIT.exec(C)}function Fn(C){C=C.replace(n,"").replace(r,"").toLowerCase();var A=!1;if(ye[C])C=ye[C],A=!0;else if(C=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var S;return(S=dt.rgb.exec(C))?{r:S[1],g:S[2],b:S[3]}:(S=dt.rgba.exec(C))?{r:S[1],g:S[2],b:S[3],a:S[4]}:(S=dt.hsl.exec(C))?{h:S[1],s:S[2],l:S[3]}:(S=dt.hsla.exec(C))?{h:S[1],s:S[2],l:S[3],a:S[4]}:(S=dt.hsv.exec(C))?{h:S[1],s:S[2],v:S[3]}:(S=dt.hsva.exec(C))?{h:S[1],s:S[2],v:S[3],a:S[4]}:(S=dt.hex8.exec(C))?{r:U(S[1]),g:U(S[2]),b:U(S[3]),a:Je(S[4]),format:A?"name":"hex8"}:(S=dt.hex6.exec(C))?{r:U(S[1]),g:U(S[2]),b:U(S[3]),format:A?"name":"hex"}:(S=dt.hex4.exec(C))?{r:U(S[1]+""+S[1]),g:U(S[2]+""+S[2]),b:U(S[3]+""+S[3]),a:Je(S[4]+""+S[4]),format:A?"name":"hex8"}:(S=dt.hex3.exec(C))?{r:U(S[1]+""+S[1]),g:U(S[2]+""+S[2]),b:U(S[3]+""+S[3]),format:A?"name":"hex"}:!1}function Kt(C){var A,S;return C=C||{level:"AA",size:"small"},A=(C.level||"AA").toUpperCase(),S=(C.size||"small").toLowerCase(),A!=="AA"&&A!=="AAA"&&(A="AA"),S!=="small"&&S!=="large"&&(S="small"),{level:A,size:S}}e.exports?e.exports=u:window.tinycolor=u})(Math)})(wx);var SO=wx.exports;const yr=ci(SO);var n1=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return CO(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},Qi=function(t,n){var r=t.hex?yr(t.hex):yr(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var s=l==="000000"&&a.a===0;return{hsl:o,hex:s?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},kr=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&yr(t).isValid()},Oh=function(t){if(!t)return"#fff";var n=Qi(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},tf=function(t,n){var r=t.replace("°","");return yr(n+" ("+r+")")._ok},Li=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){TO(o,r);function o(){var i,a,l,s;_O(this,o);for(var u=arguments.length,c=Array(u),d=0;dl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&GO?new Ls:void 0;for(i.set(e,t),i.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ol=24,iN=_x.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Ol:r,i=e.height,a=i===void 0?Ol:i,l=e.style,s=l===void 0?{}:l,u=oN(e,["fill","width","height","style"]);return w1.default.createElement("svg",b1({viewBox:"0 0 "+Ol+" "+Ol,style:b1({fill:n,width:o,height:a},s)},u),w1.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},aN=function(){function e(t,n){for(var r=0;r1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(y1(o.s)?r.props.hsl.s:o.s),l:Number(y1(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return aN(t,[{key:"render",value:function(){var r=this,o=te({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),w.createElement("div",{style:o.alpha},w.createElement(de,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),w.createElement("div",{style:o.alpha},w.createElement(de,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),w.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,w.createElement("div",{style:o.toggle},w.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},w.createElement(iN,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(w.Component);Tx.defaultProps={view:"hex"};var x1=function(){var t=te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return w.createElement("div",{style:t.picker})},cN=function(){var t=te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return w.createElement("div",{style:t.picker})},jh=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,s=t.hex,u=t.renderers,c=t.styles,d=c===void 0?{}:c,p=t.className,h=p===void 0?"":p,m=t.defaultView,y=te(Rt({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:o});return w.createElement("div",{style:y.picker,className:"chrome-picker "+h},w.createElement("div",{style:y.saturation},w.createElement(Bu,{style:y.Saturation,hsl:a,hsv:l,pointer:cN,onChange:r})),w.createElement("div",{style:y.body},w.createElement("div",{style:y.controls,className:"flexbox-fix"},w.createElement("div",{style:y.color},w.createElement("div",{style:y.swatch},w.createElement("div",{style:y.active}),w.createElement(xi,{renderers:u}))),w.createElement("div",{style:y.toggles},w.createElement("div",{style:y.hue},w.createElement(Ci,{style:y.Hue,hsl:a,pointer:x1,onChange:r})),w.createElement("div",{style:y.alpha},w.createElement(Ah,{style:y.Alpha,rgb:i,hsl:a,pointer:x1,renderers:u,onChange:r})))),w.createElement(Tx,{rgb:i,hsl:a,hex:s,view:m,onChange:r,disableAlpha:o})))};jh.propTypes={width:H.oneOfType([H.string,H.number]),disableAlpha:H.bool,styles:H.object,defaultView:H.oneOf(["hex","rgb","hsl"])};jh.defaultProps={width:225,disableAlpha:!1,styles:{}};const fN=Nt(jh);var dN=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=te({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Oh(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return w.createElement(oo,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},w.createElement("div",{style:l.dot}))},pN=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=te({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(s,u){s.r||s.g||s.b?o({r:s.r||r.r,g:s.g||r.g,b:s.b||r.b,source:"rgb"},u):o({hex:s.hex,source:"hex"},u)};return w.createElement("div",{style:i.fields,className:"flexbox-fix"},w.createElement("div",{style:i.active}),w.createElement(de,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},Hh=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,d=te(Rt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),p=function(m,y){m.hex?kr(m.hex)&&n({hex:m.hex,source:"hex"},y):n(m,y)};return w.createElement(el,{style:d.Compact,styles:s},w.createElement("div",{style:d.compact,className:"compact-picker "+c},w.createElement("div",null,io(o,function(h){return w.createElement(dN,{key:h,color:h,active:h.toLowerCase()===i,onClick:p,onSwatchHover:r})}),w.createElement("div",{style:d.clear})),w.createElement(pN,{hex:i,rgb:a,onChange:p})))};Hh.propTypes={colors:H.arrayOf(H.string),styles:H.object};Hh.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Nt(Hh);var hN=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=te({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return w.createElement("div",{style:l.swatch},w.createElement(oo,{color:r,onClick:o,onHover:i,focusStyle:a}))};const gN=kh(hN);var Gh=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,d=te(Rt({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),p=function(m,y){return o({hex:m,source:"hex"},y)};return w.createElement("div",{style:d.card,className:"github-picker "+c},w.createElement("div",{style:d.triangleShadow}),w.createElement("div",{style:d.triangle}),io(r,function(h){return w.createElement(gN,{color:h,key:h,onClick:p,onSwatchHover:i})}))};Gh.propTypes={width:H.oneOfType([H.string,H.number]),colors:H.arrayOf(H.string),triangle:H.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:H.object};Gh.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Nt(Gh);var mN=function(t){var n=t.direction,r=te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return w.createElement("div",{style:r.picker})},vN=Object.assign||function(e){for(var t=1;t.5});return w.createElement("div",{style:r.picker})},xN=function(){var t=te({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return w.createElement("div",{style:t.pointer},w.createElement("div",{style:t.left},w.createElement("div",{style:t.leftInside})),w.createElement("div",{style:t.right},w.createElement("div",{style:t.rightInside})))},C1=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=te({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return w.createElement("div",{style:a.button,onClick:n},r||o)},CN=function(t){var n=t.rgb,r=t.currentColor,o=te({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return w.createElement("div",null,w.createElement("div",{style:o.label},"new"),w.createElement("div",{style:o.swatches},w.createElement("div",{style:o.new}),w.createElement("div",{style:o.current})),w.createElement("div",{style:o.label},"current"))},SN=function(){function e(t,n){for(var r=0;r100&&(c.a=100),c.a/=100,n({h:o.h,s:o.s,l:o.l,a:c.a,source:"rgb"},d))};return w.createElement("div",{style:l.fields,className:"flexbox-fix"},w.createElement("div",{style:l.double},w.createElement(de,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.alpha},w.createElement(de,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},$N=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Rl=24,NN=Px.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Rl:r,i=e.height,a=i===void 0?Rl:i,l=e.style,s=l===void 0?{}:l,u=RN(e,["fill","width","height","style"]);return E1.default.createElement("svg",S1({viewBox:"0 0 "+Rl+" "+Rl,style:S1({fill:n,width:o,height:a},s)},u),E1.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},IN=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,s=t.active,u=te({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Oh(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return w.createElement(oo,{color:n,style:u.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},w.createElement("div",{style:u.check},w.createElement(NN,null)))},LN=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=te({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return w.createElement("div",{style:a.group},io(o,function(l,s){return w.createElement(IN,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===o.length-1,onClick:n,onSwatchHover:r})}))},Yh=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,s=t.styles,u=s===void 0?{}:s,c=t.className,d=c===void 0?"":c,p=te(Rt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(y,E){return o({hex:y,source:"hex"},E)};return w.createElement("div",{style:p.picker,className:"swatches-picker "+d},w.createElement(el,null,w.createElement("div",{style:p.overflow},w.createElement("div",{style:p.body},io(a,function(m){return w.createElement(LN,{key:m.toString(),group:m,active:l,onClick:h,onSwatchHover:i})}),w.createElement("div",{style:p.clear})))))};Yh.propTypes={width:H.oneOfType([H.string,H.number]),height:H.oneOfType([H.string,H.number]),colors:H.arrayOf(H.arrayOf(H.string)),styles:H.object};Yh.defaultProps={width:320,height:240,colors:[[po[900],po[700],po[500],po[300],po[100]],[ho[900],ho[700],ho[500],ho[300],ho[100]],[go[900],go[700],go[500],go[300],go[100]],[mo[900],mo[700],mo[500],mo[300],mo[100]],[vo[900],vo[700],vo[500],vo[300],vo[100]],[yo[900],yo[700],yo[500],yo[300],yo[100]],[bo[900],bo[700],bo[500],bo[300],bo[100]],[wo[900],wo[700],wo[500],wo[300],wo[100]],[xo[900],xo[700],xo[500],xo[300],xo[100]],["#194D33",Zi[700],Zi[500],Zi[300],Zi[100]],[Co[900],Co[700],Co[500],Co[300],Co[100]],[So[900],So[700],So[500],So[300],So[100]],[Eo[900],Eo[700],Eo[500],Eo[300],Eo[100]],[Fo[900],Fo[700],Fo[500],Fo[300],Fo[100]],[ko[900],ko[700],ko[500],ko[300],ko[100]],[Ao[900],Ao[700],Ao[500],Ao[300],Ao[100]],[$o[900],$o[700],$o[500],$o[300],$o[100]],[Do[900],Do[700],Do[500],Do[300],Do[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Nt(Yh);var Xh=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,s=t.styles,u=s===void 0?{}:s,c=t.className,d=c===void 0?"":c,p=te(Rt({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),h=function(y,E){kr(y)&&n({hex:y,source:"hex"},E)};return w.createElement("div",{style:p.card,className:"twitter-picker "+d},w.createElement("div",{style:p.triangleShadow}),w.createElement("div",{style:p.triangle}),w.createElement("div",{style:p.body},io(i,function(m,y){return w.createElement(oo,{key:y,color:m,hex:m,style:p.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+m}})}),w.createElement("div",{style:p.hash},"#"),w.createElement(de,{label:null,style:{input:p.input},value:o.replace("#",""),onChange:h}),w.createElement("div",{style:p.clear})))};Xh.propTypes={width:H.oneOfType([H.string,H.number]),triangle:H.oneOf(["hide","top-left","top-right"]),colors:H.arrayOf(H.string),styles:H.object};Xh.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Nt(Xh);var qh=function(t){var n=te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return w.createElement("div",{style:n.picker})};qh.propTypes={hsl:H.shape({h:H.number,s:H.number,l:H.number,a:H.number})};qh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Jh=function(t){var n=te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return w.createElement("div",{style:n.picker})};Jh.propTypes={hsl:H.shape({h:H.number,s:H.number,l:H.number,a:H.number})};Jh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var zN=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(h,m){if(h.hex)kr(h.hex)&&n({hex:h.hex,source:"hex"},m);else if(h.rgb){var y=h.rgb.split(",");tf(h.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},m)}else if(h.hsv){var E=h.hsv.split(",");tf(h.hsv,"hsv")&&(E[2]=E[2].replace("%",""),E[1]=E[1].replace("%",""),E[0]=E[0].replace("°",""),E[1]==1?E[1]=.01:E[2]==1&&(E[2]=.01),n({h:Number(E[0]),s:Number(E[1]),v:Number(E[2]),source:"hsv"},m))}else if(h.hsl){var g=h.hsl.split(",");tf(h.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),n({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},m))}},s=te({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",d=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return w.createElement("div",{style:s.wrap,className:"flexbox-fix"},w.createElement("div",{style:s.fields},w.createElement("div",{style:s.double},w.createElement(de,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),w.createElement("div",{style:s.column},w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"hsv",value:d,onChange:l})),w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:l})))))},Qh=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,s=t.header,u=t.styles,c=u===void 0?{}:u,d=t.className,p=d===void 0?"":d,h=te(Rt({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return w.createElement("div",{style:h.picker,className:"google-picker "+p},w.createElement("div",{style:h.head},s),w.createElement("div",{style:h.swatch}),w.createElement("div",{style:h.saturation},w.createElement(Bu,{hsl:i,hsv:a,pointer:qh,onChange:r})),w.createElement("div",{style:h.body},w.createElement("div",{style:h.controls,className:"flexbox-fix"},w.createElement("div",{style:h.hue},w.createElement(Ci,{style:h.Hue,hsl:i,radius:"4px",pointer:Jh,onChange:r}))),w.createElement(zN,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};Qh.propTypes={width:H.oneOfType([H.string,H.number]),styles:H.object,header:H.string};Qh.defaultProps={width:652,styles:{},header:"Color picker"};const jN=Nt(Qh);function F1(e){const{onChange:t,value:n,allowGradients:r}=e,{colorUsages:o}=ae;return o.map(({color:i,usages:a,isGradient:l})=>!r&&l?null:k("span",{onClick:()=>{t(i,!0)},title:`${i} + `),w.createElement("div",{style:c.white,className:"saturation-white"},w.createElement("div",{style:c.black,className:"saturation-black"}),w.createElement("div",{style:c.pointer},this.props.pointer?w.createElement(this.props.pointer,this.props):w.createElement("div",{style:c.circle}))))}}]),t}(x.PureComponent||x.Component);function hO(e,t){for(var n=-1,r=e==null?0:e.length;++n=0,V=!A&&O&&(C==="hex"||C==="hex6"||C==="hex3"||C==="hex4"||C==="hex8"||C==="name");return V?C==="name"&&this._a===0?this.toName():this.toRgbString():(C==="rgb"&&(S=this.toRgbString()),C==="prgb"&&(S=this.toPercentageRgbString()),(C==="hex"||C==="hex6")&&(S=this.toHexString()),C==="hex3"&&(S=this.toHexString(!0)),C==="hex4"&&(S=this.toHex8String(!0)),C==="hex8"&&(S=this.toHex8String()),C==="name"&&(S=this.toName()),C==="hsl"&&(S=this.toHslString()),C==="hsv"&&(S=this.toHsvString()),S||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(C,A){var S=C.apply(null,[this].concat([].slice.call(A)));return this._r=S._r,this._g=S._g,this._b=S._b,this.setAlpha(S._a),this},lighten:function(){return this._applyModification($,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(T,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(D,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(C,A){return C.apply(null,[this].concat([].slice.call(A)))},analogous:function(){return this._applyCombination(pe,arguments)},complement:function(){return this._applyCombination(P,arguments)},monochromatic:function(){return this._applyCombination(oe,arguments)},splitcomplement:function(){return this._applyCombination(X,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(K,arguments)}},u.fromRatio=function(C,A){if(typeof C=="object"){var S={};for(var O in C)C.hasOwnProperty(O)&&(O==="a"?S[O]=C[O]:S[O]=ge(C[O]));C=S}return u(C,A)};function c(C){var A={r:0,g:0,b:0},S=1,O=null,V=null,M=null,ee=!1,ie=!1;return typeof C=="string"&&(C=Fn(C)),typeof C=="object"&&(Vt(C.r)&&Vt(C.g)&&Vt(C.b)?(A=d(C.r,C.g,C.b),ee=!0,ie=String(C.r).substr(-1)==="%"?"prgb":"rgb"):Vt(C.h)&&Vt(C.s)&&Vt(C.v)?(O=ge(C.s),V=ge(C.v),A=y(C.h,O,V),ee=!0,ie="hsv"):Vt(C.h)&&Vt(C.s)&&Vt(C.l)&&(O=ge(C.s),M=ge(C.l),A=h(C.h,O,M),ee=!0,ie="hsl"),C.hasOwnProperty("a")&&(S=C.a)),S=Q(S),{ok:ee,format:C.format||ie,r:a(255,l(A.r,0)),g:a(255,l(A.g,0)),b:a(255,l(A.b,0)),a:S}}function d(C,A,S){return{r:G(C,255)*255,g:G(A,255)*255,b:G(S,255)*255}}function p(C,A,S){C=G(C,255),A=G(A,255),S=G(S,255);var O=l(C,A,S),V=a(C,A,S),M,ee,ie=(O+V)/2;if(O==V)M=ee=0;else{var ve=O-V;switch(ee=ie>.5?ve/(2-O-V):ve/(O+V),O){case C:M=(A-S)/ve+(A1&&(xt-=1),xt<1/6?Ee+(Qe-Ee)*6*xt:xt<1/2?Qe:xt<2/3?Ee+(Qe-Ee)*(2/3-xt)*6:Ee}if(A===0)O=V=M=S;else{var ie=S<.5?S*(1+A):S+A-S*A,ve=2*S-ie;O=ee(ve,ie,C+1/3),V=ee(ve,ie,C),M=ee(ve,ie,C-1/3)}return{r:O*255,g:V*255,b:M*255}}function m(C,A,S){C=G(C,255),A=G(A,255),S=G(S,255);var O=l(C,A,S),V=a(C,A,S),M,ee,ie=O,ve=O-V;if(ee=O===0?0:ve/O,O==V)M=0;else{switch(O){case C:M=(A-S)/ve+(A>1)+720)%360;--A;)O.h=(O.h+V)%360,M.push(u(O));return M}function oe(C,A){A=A||6;for(var S=u(C).toHsv(),O=S.h,V=S.s,M=S.v,ee=[],ie=1/A;A--;)ee.push(u({h:O,s:V,v:M})),M=(M+ie)%1;return ee}u.mix=function(C,A,S){S=S===0?0:S||50;var O=u(C).toRgb(),V=u(A).toRgb(),M=S/100,ee={r:(V.r-O.r)*M+O.r,g:(V.g-O.g)*M+O.g,b:(V.b-O.b)*M+O.b,a:(V.a-O.a)*M+O.a};return u(ee)},u.readability=function(C,A){var S=u(C),O=u(A);return(t.max(S.getLuminance(),O.getLuminance())+.05)/(t.min(S.getLuminance(),O.getLuminance())+.05)},u.isReadable=function(C,A,S){var O=u.readability(C,A),V,M;switch(M=!1,V=Kt(S),V.level+V.size){case"AAsmall":case"AAAlarge":M=O>=4.5;break;case"AAlarge":M=O>=3;break;case"AAAsmall":M=O>=7;break}return M},u.mostReadable=function(C,A,S){var O=null,V=0,M,ee,ie,ve;S=S||{},ee=S.includeFallbackColors,ie=S.level,ve=S.size;for(var Ee=0;EeV&&(V=M,O=u(A[Ee]));return u.isReadable(C,O,{level:ie,size:ve})||!ee?O:(S.includeFallbackColors=!1,u.mostReadable(C,["#fff","#000"],S))};var ye=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Le=u.hexNames=N(ye);function N(C){var A={};for(var S in C)C.hasOwnProperty(S)&&(A[C[S]]=S);return A}function Q(C){return C=parseFloat(C),(isNaN(C)||C<0||C>1)&&(C=1),C}function G(C,A){le(C)&&(C="100%");var S=he(C);return C=a(A,l(0,parseFloat(C))),S&&(C=parseInt(C*A,10)/100),t.abs(C-A)<1e-6?1:C%A/parseFloat(A)}function re(C){return a(1,l(0,C))}function U(C){return parseInt(C,16)}function le(C){return typeof C=="string"&&C.indexOf(".")!=-1&&parseFloat(C)===1}function he(C){return typeof C=="string"&&C.indexOf("%")!=-1}function Se(C){return C.length==1?"0"+C:""+C}function ge(C){return C<=1&&(C=C*100+"%"),C}function ze(C){return t.round(parseFloat(C)*255).toString(16)}function Je(C){return U(C)/255}var dt=function(){var C="[-\\+]?\\d+%?",A="[-\\+]?\\d*\\.\\d+%?",S="(?:"+A+")|(?:"+C+")",O="[\\s|\\(]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?",V="[\\s|\\(]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")[,|\\s]+("+S+")\\s*\\)?";return{CSS_UNIT:new RegExp(S),rgb:new RegExp("rgb"+O),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+O),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+O),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Vt(C){return!!dt.CSS_UNIT.exec(C)}function Fn(C){C=C.replace(n,"").replace(r,"").toLowerCase();var A=!1;if(ye[C])C=ye[C],A=!0;else if(C=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var S;return(S=dt.rgb.exec(C))?{r:S[1],g:S[2],b:S[3]}:(S=dt.rgba.exec(C))?{r:S[1],g:S[2],b:S[3],a:S[4]}:(S=dt.hsl.exec(C))?{h:S[1],s:S[2],l:S[3]}:(S=dt.hsla.exec(C))?{h:S[1],s:S[2],l:S[3],a:S[4]}:(S=dt.hsv.exec(C))?{h:S[1],s:S[2],v:S[3]}:(S=dt.hsva.exec(C))?{h:S[1],s:S[2],v:S[3],a:S[4]}:(S=dt.hex8.exec(C))?{r:U(S[1]),g:U(S[2]),b:U(S[3]),a:Je(S[4]),format:A?"name":"hex8"}:(S=dt.hex6.exec(C))?{r:U(S[1]),g:U(S[2]),b:U(S[3]),format:A?"name":"hex"}:(S=dt.hex4.exec(C))?{r:U(S[1]+""+S[1]),g:U(S[2]+""+S[2]),b:U(S[3]+""+S[3]),a:Je(S[4]+""+S[4]),format:A?"name":"hex8"}:(S=dt.hex3.exec(C))?{r:U(S[1]+""+S[1]),g:U(S[2]+""+S[2]),b:U(S[3]+""+S[3]),format:A?"name":"hex"}:!1}function Kt(C){var A,S;return C=C||{level:"AA",size:"small"},A=(C.level||"AA").toUpperCase(),S=(C.size||"small").toLowerCase(),A!=="AA"&&A!=="AAA"&&(A="AA"),S!=="small"&&S!=="large"&&(S="small"),{level:A,size:S}}e.exports?e.exports=u:window.tinycolor=u})(Math)})(wx);var SO=wx.exports;const yr=fi(SO);var n1=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return CO(n,function(i){if(t[i]&&(r+=1,isNaN(t[i])||(o+=1),i==="s"||i==="l")){var a=/^\d+%$/;a.test(t[i])&&(o+=1)}}),r===o?t:!1},Qi=function(t,n){var r=t.hex?yr(t.hex):yr(t),o=r.toHsl(),i=r.toHsv(),a=r.toRgb(),l=r.toHex();o.s===0&&(o.h=n||0,i.h=n||0);var s=l==="000000"&&a.a===0;return{hsl:o,hex:s?"transparent":"#"+l,rgb:a,hsv:i,oldHue:t.h||n||o.h,source:t.source}},kr=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&yr(t).isValid()},Oh=function(t){if(!t)return"#fff";var n=Qi(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},tf=function(t,n){var r=t.replace("°","");return yr(n+" ("+r+")")._ok},Li=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){TO(o,r);function o(){var i,a,l,s;_O(this,o);for(var u=arguments.length,c=Array(u),d=0;dl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var d=-1,p=!0,h=n&GO?new Is:void 0;for(i.set(e,t),i.set(t,e);++d=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ml=24,iN=_x.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Ml:r,i=e.height,a=i===void 0?Ml:i,l=e.style,s=l===void 0?{}:l,u=oN(e,["fill","width","height","style"]);return w1.default.createElement("svg",b1({viewBox:"0 0 "+Ml+" "+Ml,style:b1({fill:n,width:o,height:a},s)},u),w1.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},aN=function(){function e(t,n){for(var r=0;r1&&(o.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(o.a*100)/100,source:"rgb"},i)):(o.h||o.s||o.l)&&(typeof o.s=="string"&&o.s.includes("%")&&(o.s=o.s.replace("%","")),typeof o.l=="string"&&o.l.includes("%")&&(o.l=o.l.replace("%","")),o.s==1?o.s=.01:o.l==1&&(o.l=.01),r.props.onChange({h:o.h||r.props.hsl.h,s:Number(y1(o.s)?r.props.hsl.s:o.s),l:Number(y1(o.l)?r.props.hsl.l:o.l),source:"hsl"},i))},r.showHighlight=function(o){o.currentTarget.style.background="#eee"},r.hideHighlight=function(o){o.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return aN(t,[{key:"render",value:function(){var r=this,o=te({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),i=void 0;return this.state.view==="hex"?i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),w.createElement("div",{style:o.alpha},w.createElement(de,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=w.createElement("div",{style:o.fields,className:"flexbox-fix"},w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),w.createElement("div",{style:o.field},w.createElement(de,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),w.createElement("div",{style:o.alpha},w.createElement(de,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),w.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,w.createElement("div",{style:o.toggle},w.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},w.createElement(iN,{style:o.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.hsl.a!==1&&o.view==="hex"?{view:"rgb"}:null}}]),t}(w.Component);Tx.defaultProps={view:"hex"};var x1=function(){var t=te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return w.createElement("div",{style:t.picker})},cN=function(){var t=te({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return w.createElement("div",{style:t.picker})},jh=function(t){var n=t.width,r=t.onChange,o=t.disableAlpha,i=t.rgb,a=t.hsl,l=t.hsv,s=t.hex,u=t.renderers,c=t.styles,d=c===void 0?{}:c,p=t.className,h=p===void 0?"":p,m=t.defaultView,y=te(Rt({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},d),{disableAlpha:o});return w.createElement("div",{style:y.picker,className:"chrome-picker "+h},w.createElement("div",{style:y.saturation},w.createElement(Tu,{style:y.Saturation,hsl:a,hsv:l,pointer:cN,onChange:r})),w.createElement("div",{style:y.body},w.createElement("div",{style:y.controls,className:"flexbox-fix"},w.createElement("div",{style:y.color},w.createElement("div",{style:y.swatch},w.createElement("div",{style:y.active}),w.createElement(Ci,{renderers:u}))),w.createElement("div",{style:y.toggles},w.createElement("div",{style:y.hue},w.createElement(Si,{style:y.Hue,hsl:a,pointer:x1,onChange:r})),w.createElement("div",{style:y.alpha},w.createElement(Ah,{style:y.Alpha,rgb:i,hsl:a,pointer:x1,renderers:u,onChange:r})))),w.createElement(Tx,{rgb:i,hsl:a,hex:s,view:m,onChange:r,disableAlpha:o})))};jh.propTypes={width:H.oneOfType([H.string,H.number]),disableAlpha:H.bool,styles:H.object,defaultView:H.oneOf(["hex","rgb","hsl"])};jh.defaultProps={width:225,disableAlpha:!1,styles:{}};const fN=Nt(jh);var dN=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=te({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Oh(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return w.createElement(oo,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},w.createElement("div",{style:l.dot}))},pN=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=te({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(s,u){s.r||s.g||s.b?o({r:s.r||r.r,g:s.g||r.g,b:s.b||r.b,source:"rgb"},u):o({hex:s.hex,source:"hex"},u)};return w.createElement("div",{style:i.fields,className:"flexbox-fix"},w.createElement("div",{style:i.active}),w.createElement(de,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),w.createElement(de,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},Hh=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.colors,i=t.hex,a=t.rgb,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,d=te(Rt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),p=function(m,y){m.hex?kr(m.hex)&&n({hex:m.hex,source:"hex"},y):n(m,y)};return w.createElement(el,{style:d.Compact,styles:s},w.createElement("div",{style:d.compact,className:"compact-picker "+c},w.createElement("div",null,io(o,function(h){return w.createElement(dN,{key:h,color:h,active:h.toLowerCase()===i,onClick:p,onSwatchHover:r})}),w.createElement("div",{style:d.clear})),w.createElement(pN,{hex:i,rgb:a,onChange:p})))};Hh.propTypes={colors:H.arrayOf(H.string),styles:H.object};Hh.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Nt(Hh);var hN=function(t){var n=t.hover,r=t.color,o=t.onClick,i=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=te({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return w.createElement("div",{style:l.swatch},w.createElement(oo,{color:r,onClick:o,onHover:i,focusStyle:a}))};const gN=kh(hN);var Gh=function(t){var n=t.width,r=t.colors,o=t.onChange,i=t.onSwatchHover,a=t.triangle,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,d=te(Rt({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),p=function(m,y){return o({hex:m,source:"hex"},y)};return w.createElement("div",{style:d.card,className:"github-picker "+c},w.createElement("div",{style:d.triangleShadow}),w.createElement("div",{style:d.triangle}),io(r,function(h){return w.createElement(gN,{color:h,key:h,onClick:p,onSwatchHover:i})}))};Gh.propTypes={width:H.oneOfType([H.string,H.number]),colors:H.arrayOf(H.string),triangle:H.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:H.object};Gh.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Nt(Gh);var mN=function(t){var n=t.direction,r=te({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return w.createElement("div",{style:r.picker})},vN=Object.assign||function(e){for(var t=1;t.5});return w.createElement("div",{style:r.picker})},xN=function(){var t=te({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return w.createElement("div",{style:t.pointer},w.createElement("div",{style:t.left},w.createElement("div",{style:t.leftInside})),w.createElement("div",{style:t.right},w.createElement("div",{style:t.rightInside})))},C1=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=te({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return w.createElement("div",{style:a.button,onClick:n},r||o)},CN=function(t){var n=t.rgb,r=t.currentColor,o=te({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return w.createElement("div",null,w.createElement("div",{style:o.label},"new"),w.createElement("div",{style:o.swatches},w.createElement("div",{style:o.new}),w.createElement("div",{style:o.current})),w.createElement("div",{style:o.label},"current"))},SN=function(){function e(t,n){for(var r=0;r100&&(c.a=100),c.a/=100,n({h:o.h,s:o.s,l:o.l,a:c.a,source:"rgb"},d))};return w.createElement("div",{style:l.fields,className:"flexbox-fix"},w.createElement("div",{style:l.double},w.createElement(de,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.single},w.createElement(de,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),w.createElement("div",{style:l.alpha},w.createElement(de,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},$N=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ol=24,NN=Px.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?Ol:r,i=e.height,a=i===void 0?Ol:i,l=e.style,s=l===void 0?{}:l,u=RN(e,["fill","width","height","style"]);return E1.default.createElement("svg",S1({viewBox:"0 0 "+Ol+" "+Ol,style:S1({fill:n,width:o,height:a},s)},u),E1.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},IN=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.first,l=t.last,s=t.active,u=te({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Oh(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return w.createElement(oo,{color:n,style:u.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},w.createElement("div",{style:u.check},w.createElement(NN,null)))},LN=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=te({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return w.createElement("div",{style:a.group},io(o,function(l,s){return w.createElement(IN,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===o.length-1,onClick:n,onSwatchHover:r})}))},Yh=function(t){var n=t.width,r=t.height,o=t.onChange,i=t.onSwatchHover,a=t.colors,l=t.hex,s=t.styles,u=s===void 0?{}:s,c=t.className,d=c===void 0?"":c,p=te(Rt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(y,E){return o({hex:y,source:"hex"},E)};return w.createElement("div",{style:p.picker,className:"swatches-picker "+d},w.createElement(el,null,w.createElement("div",{style:p.overflow},w.createElement("div",{style:p.body},io(a,function(m){return w.createElement(LN,{key:m.toString(),group:m,active:l,onClick:h,onSwatchHover:i})}),w.createElement("div",{style:p.clear})))))};Yh.propTypes={width:H.oneOfType([H.string,H.number]),height:H.oneOfType([H.string,H.number]),colors:H.arrayOf(H.arrayOf(H.string)),styles:H.object};Yh.defaultProps={width:320,height:240,colors:[[ho[900],ho[700],ho[500],ho[300],ho[100]],[go[900],go[700],go[500],go[300],go[100]],[mo[900],mo[700],mo[500],mo[300],mo[100]],[vo[900],vo[700],vo[500],vo[300],vo[100]],[yo[900],yo[700],yo[500],yo[300],yo[100]],[bo[900],bo[700],bo[500],bo[300],bo[100]],[wo[900],wo[700],wo[500],wo[300],wo[100]],[xo[900],xo[700],xo[500],xo[300],xo[100]],[Co[900],Co[700],Co[500],Co[300],Co[100]],["#194D33",Zi[700],Zi[500],Zi[300],Zi[100]],[So[900],So[700],So[500],So[300],So[100]],[Eo[900],Eo[700],Eo[500],Eo[300],Eo[100]],[Fo[900],Fo[700],Fo[500],Fo[300],Fo[100]],[ko[900],ko[700],ko[500],ko[300],ko[100]],[Ao[900],Ao[700],Ao[500],Ao[300],Ao[100]],[$o[900],$o[700],$o[500],$o[300],$o[100]],[Do[900],Do[700],Do[500],Do[300],Do[100]],[_o[900],_o[700],_o[500],_o[300],_o[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Nt(Yh);var Xh=function(t){var n=t.onChange,r=t.onSwatchHover,o=t.hex,i=t.colors,a=t.width,l=t.triangle,s=t.styles,u=s===void 0?{}:s,c=t.className,d=c===void 0?"":c,p=te(Rt({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),h=function(y,E){kr(y)&&n({hex:y,source:"hex"},E)};return w.createElement("div",{style:p.card,className:"twitter-picker "+d},w.createElement("div",{style:p.triangleShadow}),w.createElement("div",{style:p.triangle}),w.createElement("div",{style:p.body},io(i,function(m,y){return w.createElement(oo,{key:y,color:m,hex:m,style:p.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+m}})}),w.createElement("div",{style:p.hash},"#"),w.createElement(de,{label:null,style:{input:p.input},value:o.replace("#",""),onChange:h}),w.createElement("div",{style:p.clear})))};Xh.propTypes={width:H.oneOfType([H.string,H.number]),triangle:H.oneOf(["hide","top-left","top-right"]),colors:H.arrayOf(H.string),styles:H.object};Xh.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Nt(Xh);var qh=function(t){var n=te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return w.createElement("div",{style:n.picker})};qh.propTypes={hsl:H.shape({h:H.number,s:H.number,l:H.number,a:H.number})};qh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Jh=function(t){var n=te({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return w.createElement("div",{style:n.picker})};Jh.propTypes={hsl:H.shape({h:H.number,s:H.number,l:H.number,a:H.number})};Jh.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var zN=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(h,m){if(h.hex)kr(h.hex)&&n({hex:h.hex,source:"hex"},m);else if(h.rgb){var y=h.rgb.split(",");tf(h.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},m)}else if(h.hsv){var E=h.hsv.split(",");tf(h.hsv,"hsv")&&(E[2]=E[2].replace("%",""),E[1]=E[1].replace("%",""),E[0]=E[0].replace("°",""),E[1]==1?E[1]=.01:E[2]==1&&(E[2]=.01),n({h:Number(E[0]),s:Number(E[1]),v:Number(E[2]),source:"hsv"},m))}else if(h.hsl){var g=h.hsl.split(",");tf(h.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),d[1]==1?d[1]=.01:d[2]==1&&(d[2]=.01),n({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},m))}},s=te({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(o.h)+"°, "+Math.round(o.s*100)+"%, "+Math.round(o.l*100)+"%",d=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return w.createElement("div",{style:s.wrap,className:"flexbox-fix"},w.createElement("div",{style:s.fields},w.createElement("div",{style:s.double},w.createElement(de,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),w.createElement("div",{style:s.column},w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"hsv",value:d,onChange:l})),w.createElement("div",{style:s.single},w.createElement(de,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:l})))))},Qh=function(t){var n=t.width,r=t.onChange,o=t.rgb,i=t.hsl,a=t.hsv,l=t.hex,s=t.header,u=t.styles,c=u===void 0?{}:u,d=t.className,p=d===void 0?"":d,h=te(Rt({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return w.createElement("div",{style:h.picker,className:"google-picker "+p},w.createElement("div",{style:h.head},s),w.createElement("div",{style:h.swatch}),w.createElement("div",{style:h.saturation},w.createElement(Tu,{hsl:i,hsv:a,pointer:qh,onChange:r})),w.createElement("div",{style:h.body},w.createElement("div",{style:h.controls,className:"flexbox-fix"},w.createElement("div",{style:h.hue},w.createElement(Si,{style:h.Hue,hsl:i,radius:"4px",pointer:Jh,onChange:r}))),w.createElement(zN,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};Qh.propTypes={width:H.oneOfType([H.string,H.number]),styles:H.object,header:H.string};Qh.defaultProps={width:652,styles:{},header:"Color picker"};const jN=Nt(Qh);function F1(e){const{onChange:t,value:n,allowGradients:r}=e,{colorUsages:o}=ae;return o.map(({color:i,usages:a,isGradient:l})=>!r&&l?null:k("span",{onClick:()=>{t(i,!0)},title:`${i} Used for: `+a.join(` -`),style:{width:li,height:li,border:i===n?"3px solid yellow":"1px solid black",marginRight:"5px",marginBottom:"2px",borderRadius:"5px",background:i,display:"inline-block",marginTop:"2px",cursor:"pointer",boxSizing:"border-box"},children:[f("span",{style:{fontSize:"10px",backgroundColor:"white"},children:a.length},`${i}---usages`),/^var\(/.test(i)&&"var"]},i))}function HN(e,t,n,r){const o=r.leading!==!1;if(e.current.latest=n,e.current.running)return;const i=(a=!1)=>{e.current.running=e.current.latest!==null,e.current.running&&((!a||o)&&(t(e.current.latest),e.current.latest=null),setTimeout(i,r.ms))};i(!0)}const GN=e=>{const t=x.useRef({});return x.useMemo(()=>(n,r)=>HN(t,n,r,e),[])},WN=90;function UN(e){if(e.keyCode==WN&&e.ctrlKey)return e.preventDefault(),!1}function Re(i){var a=i,{label:e,value:t,className:n,onChange:r}=a,o=mn(a,["label","value","className","onChange"]);return f("input",z({type:"text",value:t,onChange:s=>r(s.target.value),onKeyDown:UN,className:"components-text-control__input",autoCapitalize:"off"},o))}var VN=function(t){if(KN(),t=t.toUpperCase(),t.length<3||t.length>7)return{exactMatch:!1,closestColor:"#000000",colorName:"Invalid Color: "+t};t.length%3==0&&(t="#"+t),t.length==4&&(t="#"+t.substr(1,1)+t.substr(1,1)+t.substr(2,1)+t.substr(2,1)+t.substr(3,1)+t.substr(3,1));for(var n=Ox(t),r=n[0],o=n[1],i=n[2],a=Mx(t),l=a[0],s=a[1],u=a[2],c=0,d=0,p=0,h=-1,m=-1,y=0;yp)&&(m=p,h=y)}return{exactMatch:!1,colorName:gt[h][1],closestColor:`#${gt[h][0]}`}};const KN=function(){for(var e=0;e0&&l<1&&(a=o/(l<.5?2*l:2-2*l)),i=0,o>0&&(r==s&&r!=u&&(i+=(u-c)/o),r==u&&r!=c&&(i+=2+(c-s)/o),r==c&&r!=s&&(i+=4+(s-u)/o),i/=6),[parseInt(i*255),parseInt(a*255),parseInt(l*255)]}function Ox(e){return[parseInt("0x"+e.substring(1,3)),parseInt("0x"+e.substring(3,5)),parseInt("0x"+e.substring(5,7))]}let gt=[["000000","Black"],["000080","Navy Blue"],["0000C8","Dark Blue"],["0000FF","Blue"],["000741","Stratos"],["001B1C","Swamp"],["002387","Resolution Blue"],["002900","Deep Fir"],["002E20","Burnham"],["002FA7","International Klein Blue"],["003153","Prussian Blue"],["003366","Midnight Blue"],["003399","Smalt"],["003532","Deep Teal"],["003E40","Cyprus"],["004620","Kaitoke Green"],["0047AB","Cobalt"],["004816","Crusoe"],["004950","Sherpa Blue"],["0056A7","Endeavour"],["00581A","Camarone"],["0066CC","Science Blue"],["0066FF","Blue Ribbon"],["00755E","Tropical Rain Forest"],["0076A3","Allports"],["007BA7","Deep Cerulean"],["007EC7","Lochmara"],["007FFF","Azure Radiance"],["008080","Teal"],["0095B6","Bondi Blue"],["009DC4","Pacific Blue"],["00A693","Persian Green"],["00A86B","Jade"],["00CC99","Caribbean Green"],["00CCCC","Robin's Egg Blue"],["00FF00","Green"],["00FF7F","Spring Green"],["00FFFF","Cyan / Aqua"],["010D1A","Blue Charcoal"],["011635","Midnight"],["011D13","Holly"],["012731","Daintree"],["01361C","Cardin Green"],["01371A","County Green"],["013E62","Astronaut Blue"],["013F6A","Regal Blue"],["014B43","Aqua Deep"],["015E85","Orient"],["016162","Blue Stone"],["016D39","Fun Green"],["01796F","Pine Green"],["017987","Blue Lagoon"],["01826B","Deep Sea"],["01A368","Green Haze"],["022D15","English Holly"],["02402C","Sherwood Green"],["02478E","Congress Blue"],["024E46","Evening Sea"],["026395","Bahama Blue"],["02866F","Observatory"],["02A4D3","Cerulean"],["03163C","Tangaroa"],["032B52","Green Vogue"],["036A6E","Mosque"],["041004","Midnight Moss"],["041322","Black Pearl"],["042E4C","Blue Whale"],["044022","Zuccini"],["044259","Teal Blue"],["051040","Deep Cove"],["051657","Gulf Blue"],["055989","Venice Blue"],["056F57","Watercourse"],["062A78","Catalina Blue"],["063537","Tiber"],["069B81","Gossamer"],["06A189","Niagara"],["073A50","Tarawera"],["080110","Jaguar"],["081910","Black Bean"],["082567","Deep Sapphire"],["088370","Elf Green"],["08E8DE","Bright Turquoise"],["092256","Downriver"],["09230F","Palm Green"],["09255D","Madison"],["093624","Bottle Green"],["095859","Deep Sea Green"],["097F4B","Salem"],["0A001C","Black Russian"],["0A480D","Dark Fern"],["0A6906","Japanese Laurel"],["0A6F75","Atoll"],["0B0B0B","Cod Gray"],["0B0F08","Marshland"],["0B1107","Gordons Green"],["0B1304","Black Forest"],["0B6207","San Felix"],["0BDA51","Malachite"],["0C0B1D","Ebony"],["0C0D0F","Woodsmoke"],["0C1911","Racing Green"],["0C7A79","Surfie Green"],["0C8990","Blue Chill"],["0D0332","Black Rock"],["0D1117","Bunker"],["0D1C19","Aztec"],["0D2E1C","Bush"],["0E0E18","Cinder"],["0E2A30","Firefly"],["0F2D9E","Torea Bay"],["10121D","Vulcan"],["101405","Green Waterloo"],["105852","Eden"],["110C6C","Arapawa"],["120A8F","Ultramarine"],["123447","Elephant"],["126B40","Jewel"],["130000","Diesel"],["130A06","Asphalt"],["13264D","Blue Zodiac"],["134F19","Parsley"],["140600","Nero"],["1450AA","Tory Blue"],["151F4C","Bunting"],["1560BD","Denim"],["15736B","Genoa"],["161928","Mirage"],["161D10","Hunter Green"],["162A40","Big Stone"],["163222","Celtic"],["16322C","Timber Green"],["163531","Gable Green"],["171F04","Pine Tree"],["175579","Chathams Blue"],["182D09","Deep Forest Green"],["18587A","Blumine"],["19330E","Palm Leaf"],["193751","Nile Blue"],["1959A8","Fun Blue"],["1A1A68","Lucky Point"],["1AB385","Mountain Meadow"],["1B0245","Tolopea"],["1B1035","Haiti"],["1B127B","Deep Koamaru"],["1B1404","Acadia"],["1B2F11","Seaweed"],["1B3162","Biscay"],["1B659D","Matisse"],["1C1208","Crowshead"],["1C1E13","Rangoon Green"],["1C39BB","Persian Blue"],["1C402E","Everglade"],["1C7C7D","Elm"],["1D6142","Green Pea"],["1E0F04","Creole"],["1E1609","Karaka"],["1E1708","El Paso"],["1E385B","Cello"],["1E433C","Te Papa Green"],["1E90FF","Dodger Blue"],["1E9AB0","Eastern Blue"],["1F120F","Night Rider"],["1FC2C2","Java"],["20208D","Jacksons Purple"],["202E54","Cloud Burst"],["204852","Blue Dianne"],["211A0E","Eternity"],["220878","Deep Blue"],["228B22","Forest Green"],["233418","Mallard"],["240A40","Violet"],["240C02","Kilamanjaro"],["242A1D","Log Cabin"],["242E16","Black Olive"],["24500F","Green House"],["251607","Graphite"],["251706","Cannon Black"],["251F4F","Port Gore"],["25272C","Shark"],["25311C","Green Kelp"],["2596D1","Curious Blue"],["260368","Paua"],["26056A","Paris M"],["261105","Wood Bark"],["261414","Gondola"],["262335","Steel Gray"],["26283B","Ebony Clay"],["273A81","Bay of Many"],["27504B","Plantation"],["278A5B","Eucalyptus"],["281E15","Oil"],["283A77","Astronaut"],["286ACD","Mariner"],["290C5E","Violent Violet"],["292130","Bastille"],["292319","Zeus"],["292937","Charade"],["297B9A","Jelly Bean"],["29AB87","Jungle Green"],["2A0359","Cherry Pie"],["2A140E","Coffee Bean"],["2A2630","Baltic Sea"],["2A380B","Turtle Green"],["2A52BE","Cerulean Blue"],["2B0202","Sepia Black"],["2B194F","Valhalla"],["2B3228","Heavy Metal"],["2C0E8C","Blue Gem"],["2C1632","Revolver"],["2C2133","Bleached Cedar"],["2C8C84","Lochinvar"],["2D2510","Mikado"],["2D383A","Outer Space"],["2D569B","St Tropaz"],["2E0329","Jacaranda"],["2E1905","Jacko Bean"],["2E3222","Rangitoto"],["2E3F62","Rhino"],["2E8B57","Sea Green"],["2EBFD4","Scooter"],["2F270E","Onion"],["2F3CB3","Governor Bay"],["2F519E","Sapphire"],["2F5A57","Spectra"],["2F6168","Casal"],["300529","Melanzane"],["301F1E","Cocoa Brown"],["302A0F","Woodrush"],["304B6A","San Juan"],["30D5C8","Turquoise"],["311C17","Eclipse"],["314459","Pickled Bluewood"],["315BA1","Azure"],["31728D","Calypso"],["317D82","Paradiso"],["32127A","Persian Indigo"],["32293A","Blackcurrant"],["323232","Mine Shaft"],["325D52","Stromboli"],["327C14","Bilbao"],["327DA0","Astral"],["33036B","Christalle"],["33292F","Thunder"],["33CC99","Shamrock"],["341515","Tamarind"],["350036","Mardi Gras"],["350E42","Valentino"],["350E57","Jagger"],["353542","Tuna"],["354E8C","Chambray"],["363050","Martinique"],["363534","Tuatara"],["363C0D","Waiouru"],["36747D","Ming"],["368716","La Palma"],["370202","Chocolate"],["371D09","Clinker"],["37290E","Brown Tumbleweed"],["373021","Birch"],["377475","Oracle"],["380474","Blue Diamond"],["381A51","Grape"],["383533","Dune"],["384555","Oxford Blue"],["384910","Clover"],["394851","Limed Spruce"],["396413","Dell"],["3A0020","Toledo"],["3A2010","Sambuca"],["3A2A6A","Jacarta"],["3A686C","William"],["3A6A47","Killarney"],["3AB09E","Keppel"],["3B000B","Temptress"],["3B0910","Aubergine"],["3B1F1F","Jon"],["3B2820","Treehouse"],["3B7A57","Amazon"],["3B91B4","Boston Blue"],["3C0878","Windsor"],["3C1206","Rebel"],["3C1F76","Meteorite"],["3C2005","Dark Ebony"],["3C3910","Camouflage"],["3C4151","Bright Gray"],["3C4443","Cape Cod"],["3C493A","Lunar Green"],["3D0C02","Bean "],["3D2B1F","Bistre"],["3D7D52","Goblin"],["3E0480","Kingfisher Daisy"],["3E1C14","Cedar"],["3E2B23","English Walnut"],["3E2C1C","Black Marlin"],["3E3A44","Ship Gray"],["3EABBF","Pelorous"],["3F2109","Bronze"],["3F2500","Cola"],["3F3002","Madras"],["3F307F","Minsk"],["3F4C3A","Cabbage Pont"],["3F583B","Tom Thumb"],["3F5D53","Mineral Green"],["3FC1AA","Puerto Rico"],["3FFF00","Harlequin"],["401801","Brown Pod"],["40291D","Cork"],["403B38","Masala"],["403D19","Thatch Green"],["405169","Fiord"],["40826D","Viridian"],["40A860","Chateau Green"],["410056","Ripe Plum"],["411F10","Paco"],["412010","Deep Oak"],["413C37","Merlin"],["414257","Gun Powder"],["414C7D","East Bay"],["4169E1","Royal Blue"],["41AA78","Ocean Green"],["420303","Burnt Maroon"],["423921","Lisbon Brown"],["427977","Faded Jade"],["431560","Scarlet Gum"],["433120","Iroko"],["433E37","Armadillo"],["434C59","River Bed"],["436A0D","Green Leaf"],["44012D","Barossa"],["441D00","Morocco Brown"],["444954","Mako"],["454936","Kelp"],["456CAC","San Marino"],["45B1E8","Picton Blue"],["460B41","Loulou"],["462425","Crater Brown"],["465945","Gray Asparagus"],["4682B4","Steel Blue"],["480404","Rustic Red"],["480607","Bulgarian Rose"],["480656","Clairvoyant"],["481C1C","Cocoa Bean"],["483131","Woody Brown"],["483C32","Taupe"],["49170C","Van Cleef"],["492615","Brown Derby"],["49371B","Metallic Bronze"],["495400","Verdun Green"],["496679","Blue Bayoux"],["497183","Bismark"],["4A2A04","Bracken"],["4A3004","Deep Bronze"],["4A3C30","Mondo"],["4A4244","Tundora"],["4A444B","Gravel"],["4A4E5A","Trout"],["4B0082","Pigment Indigo"],["4B5D52","Nandor"],["4C3024","Saddle"],["4C4F56","Abbey"],["4D0135","Blackberry"],["4D0A18","Cab Sav"],["4D1E01","Indian Tan"],["4D282D","Cowboy"],["4D282E","Livid Brown"],["4D3833","Rock"],["4D3D14","Punga"],["4D400F","Bronzetone"],["4D5328","Woodland"],["4E0606","Mahogany"],["4E2A5A","Bossanova"],["4E3B41","Matterhorn"],["4E420C","Bronze Olive"],["4E4562","Mulled Wine"],["4E6649","Axolotl"],["4E7F9E","Wedgewood"],["4EABD1","Shakespeare"],["4F1C70","Honey Flower"],["4F2398","Daisy Bush"],["4F69C6","Indigo"],["4F7942","Fern Green"],["4F9D5D","Fruit Salad"],["4FA83D","Apple"],["504351","Mortar"],["507096","Kashmir Blue"],["507672","Cutty Sark"],["50C878","Emerald"],["514649","Emperor"],["516E3D","Chalet Green"],["517C66","Como"],["51808F","Smalt Blue"],["52001F","Castro"],["520C17","Maroon Oak"],["523C94","Gigas"],["533455","Voodoo"],["534491","Victoria"],["53824B","Hippie Green"],["541012","Heath"],["544333","Judge Gray"],["54534D","Fuscous Gray"],["549019","Vida Loca"],["55280C","Cioccolato"],["555B10","Saratoga"],["556D56","Finlandia"],["5590D9","Havelock Blue"],["56B4BE","Fountain Blue"],["578363","Spring Leaves"],["583401","Saddle Brown"],["585562","Scarpa Flow"],["587156","Cactus"],["589AAF","Hippie Blue"],["591D35","Wine Berry"],["592804","Brown Bramble"],["593737","Congo Brown"],["594433","Millbrook"],["5A6E9C","Waikawa Gray"],["5A87A0","Horizon"],["5B3013","Jambalaya"],["5C0120","Bordeaux"],["5C0536","Mulberry Wood"],["5C2E01","Carnaby Tan"],["5C5D75","Comet"],["5D1E0F","Redwood"],["5D4C51","Don Juan"],["5D5C58","Chicago"],["5D5E37","Verdigris"],["5D7747","Dingley"],["5DA19F","Breaker Bay"],["5E483E","Kabul"],["5E5D3B","Hemlock"],["5F3D26","Irish Coffee"],["5F5F6E","Mid Gray"],["5F6672","Shuttle Gray"],["5FA777","Aqua Forest"],["5FB3AC","Tradewind"],["604913","Horses Neck"],["605B73","Smoky"],["606E68","Corduroy"],["6093D1","Danube"],["612718","Espresso"],["614051","Eggplant"],["615D30","Costa Del Sol"],["61845F","Glade Green"],["622F30","Buccaneer"],["623F2D","Quincy"],["624E9A","Butterfly Bush"],["625119","West Coast"],["626649","Finch"],["639A8F","Patina"],["63B76C","Fern"],["6456B7","Blue Violet"],["646077","Dolphin"],["646463","Storm Dust"],["646A54","Siam"],["646E75","Nevada"],["6495ED","Cornflower Blue"],["64CCDB","Viking"],["65000B","Rosewood"],["651A14","Cherrywood"],["652DC1","Purple Heart"],["657220","Fern Frond"],["65745D","Willow Grove"],["65869F","Hoki"],["660045","Pompadour"],["660099","Purple"],["66023C","Tyrian Purple"],["661010","Dark Tan"],["66B58F","Silver Tree"],["66FF00","Bright Green"],["66FF66","Screamin' Green"],["67032D","Black Rose"],["675FA6","Scampi"],["676662","Ironside Gray"],["678975","Viridian Green"],["67A712","Christi"],["683600","Nutmeg Wood Finish"],["685558","Zambezi"],["685E6E","Salt Box"],["692545","Tawny Port"],["692D54","Finn"],["695F62","Scorpion"],["697E9A","Lynch"],["6A442E","Spice"],["6A5D1B","Himalaya"],["6A6051","Soya Bean"],["6B2A14","Hairy Heath"],["6B3FA0","Royal Purple"],["6B4E31","Shingle Fawn"],["6B5755","Dorado"],["6B8BA2","Bermuda Gray"],["6B8E23","Olive Drab"],["6C3082","Eminence"],["6CDAE7","Turquoise Blue"],["6D0101","Lonestar"],["6D5E54","Pine Cone"],["6D6C6C","Dove Gray"],["6D9292","Juniper"],["6D92A1","Gothic"],["6E0902","Red Oxide"],["6E1D14","Moccaccino"],["6E4826","Pickled Bean"],["6E4B26","Dallas"],["6E6D57","Kokoda"],["6E7783","Pale Sky"],["6F440C","Cafe Royale"],["6F6A61","Flint"],["6F8E63","Highland"],["6F9D02","Limeade"],["6FD0C5","Downy"],["701C1C","Persian Plum"],["704214","Sepia"],["704A07","Antique Bronze"],["704F50","Ferra"],["706555","Coffee"],["708090","Slate Gray"],["711A00","Cedar Wood Finish"],["71291D","Metallic Copper"],["714693","Affair"],["714AB2","Studio"],["715D47","Tobacco Brown"],["716338","Yellow Metal"],["716B56","Peat"],["716E10","Olivetone"],["717486","Storm Gray"],["718080","Sirocco"],["71D9E2","Aquamarine Blue"],["72010F","Venetian Red"],["724A2F","Old Copper"],["726D4E","Go Ben"],["727B89","Raven"],["731E8F","Seance"],["734A12","Raw Umber"],["736C9F","Kimberly"],["736D58","Crocodile"],["737829","Crete"],["738678","Xanadu"],["74640D","Spicy Mustard"],["747D63","Limed Ash"],["747D83","Rolling Stone"],["748881","Blue Smoke"],["749378","Laurel"],["74C365","Mantis"],["755A57","Russett"],["7563A8","Deluge"],["76395D","Cosmic"],["7666C6","Blue Marguerite"],["76BD17","Lima"],["76D7EA","Sky Blue"],["770F05","Dark Burgundy"],["771F1F","Crown of Thorns"],["773F1A","Walnut"],["776F61","Pablo"],["778120","Pacifika"],["779E86","Oxley"],["77DD77","Pastel Green"],["780109","Japanese Maple"],["782D19","Mocha"],["782F16","Peanut"],["78866B","Camouflage Green"],["788A25","Wasabi"],["788BBA","Ship Cove"],["78A39C","Sea Nymph"],["795D4C","Roman Coffee"],["796878","Old Lavender"],["796989","Rum"],["796A78","Fedora"],["796D62","Sandstone"],["79DEEC","Spray"],["7A013A","Siren"],["7A58C1","Fuchsia Blue"],["7A7A7A","Boulder"],["7A89B8","Wild Blue Yonder"],["7AC488","De York"],["7B3801","Red Beech"],["7B3F00","Cinnamon"],["7B6608","Yukon Gold"],["7B7874","Tapa"],["7B7C94","Waterloo "],["7B8265","Flax Smoke"],["7B9F80","Amulet"],["7BA05B","Asparagus"],["7C1C05","Kenyan Copper"],["7C7631","Pesto"],["7C778A","Topaz"],["7C7B7A","Concord"],["7C7B82","Jumbo"],["7C881A","Trendy Green"],["7CA1A6","Gumbo"],["7CB0A1","Acapulco"],["7CB7BB","Neptune"],["7D2C14","Pueblo"],["7DA98D","Bay Leaf"],["7DC8F7","Malibu"],["7DD8C6","Bermuda"],["7E3A15","Copper Canyon"],["7F1734","Claret"],["7F3A02","Peru Tan"],["7F626D","Falcon"],["7F7589","Mobster"],["7F76D3","Moody Blue"],["7FFF00","Chartreuse"],["7FFFD4","Aquamarine"],["800000","Maroon"],["800B47","Rose Bud Cherry"],["801818","Falu Red"],["80341F","Red Robin"],["803790","Vivid Violet"],["80461B","Russet"],["807E79","Friar Gray"],["808000","Olive"],["808080","Gray"],["80B3AE","Gulf Stream"],["80B3C4","Glacier"],["80CCEA","Seagull"],["81422C","Nutmeg"],["816E71","Spicy Pink"],["817377","Empress"],["819885","Spanish Green"],["826F65","Sand Dune"],["828685","Gunsmoke"],["828F72","Battleship Gray"],["831923","Merlot"],["837050","Shadow"],["83AA5D","Chelsea Cucumber"],["83D0C6","Monte Carlo"],["843179","Plum"],["84A0A0","Granny Smith"],["8581D9","Chetwode Blue"],["858470","Bandicoot"],["859FAF","Bali Hai"],["85C4CC","Half Baked"],["860111","Red Devil"],["863C3C","Lotus"],["86483C","Ironstone"],["864D1E","Bull Shot"],["86560A","Rusty Nail"],["868974","Bitter"],["86949F","Regent Gray"],["871550","Disco"],["87756E","Americano"],["877C7B","Hurricane"],["878D91","Oslo Gray"],["87AB39","Sushi"],["885342","Spicy Mix"],["886221","Kumera"],["888387","Suva Gray"],["888D65","Avocado"],["893456","Camelot"],["893843","Solid Pink"],["894367","Cannon Pink"],["897D6D","Makara"],["8A3324","Burnt Umber"],["8A73D6","True V"],["8A8360","Clay Creek"],["8A8389","Monsoon"],["8A8F8A","Stack"],["8AB9F1","Jordy Blue"],["8B00FF","Electric Violet"],["8B0723","Monarch"],["8B6B0B","Corn Harvest"],["8B8470","Olive Haze"],["8B847E","Schooner"],["8B8680","Natural Gray"],["8B9C90","Mantle"],["8B9FEE","Portage"],["8BA690","Envy"],["8BA9A5","Cascade"],["8BE6D8","Riptide"],["8C055E","Cardinal Pink"],["8C472F","Mule Fawn"],["8C5738","Potters Clay"],["8C6495","Trendy Pink"],["8D0226","Paprika"],["8D3D38","Sanguine Brown"],["8D3F3F","Tosca"],["8D7662","Cement"],["8D8974","Granite Green"],["8D90A1","Manatee"],["8DA8CC","Polo Blue"],["8E0000","Red Berry"],["8E4D1E","Rope"],["8E6F70","Opium"],["8E775E","Domino"],["8E8190","Mamba"],["8EABC1","Nepal"],["8F021C","Pohutukawa"],["8F3E33","El Salva"],["8F4B0E","Korma"],["8F8176","Squirrel"],["8FD6B4","Vista Blue"],["900020","Burgundy"],["901E1E","Old Brick"],["907874","Hemp"],["907B71","Almond Frost"],["908D39","Sycamore"],["92000A","Sangria"],["924321","Cumin"],["926F5B","Beaver"],["928573","Stonewall"],["928590","Venus"],["9370DB","Medium Purple"],["93CCEA","Cornflower"],["93DFB8","Algae Green"],["944747","Copper Rust"],["948771","Arrowtown"],["950015","Scarlett"],["956387","Strikemaster"],["959396","Mountain Mist"],["960018","Carmine"],["964B00","Brown"],["967059","Leather"],["9678B6","Purple Mountain's Majesty"],["967BB6","Lavender Purple"],["96A8A1","Pewter"],["96BBAB","Summer Green"],["97605D","Au Chico"],["9771B5","Wisteria"],["97CD2D","Atlantis"],["983D61","Vin Rouge"],["9874D3","Lilac Bush"],["98777B","Bazaar"],["98811B","Hacienda"],["988D77","Pale Oyster"],["98FF98","Mint Green"],["990066","Fresh Eggplant"],["991199","Violet Eggplant"],["991613","Tamarillo"],["991B07","Totem Pole"],["996666","Copper Rose"],["9966CC","Amethyst"],["997A8D","Mountbatten Pink"],["9999CC","Blue Bell"],["9A3820","Prairie Sand"],["9A6E61","Toast"],["9A9577","Gurkha"],["9AB973","Olivine"],["9AC2B8","Shadow Green"],["9B4703","Oregon"],["9B9E8F","Lemon Grass"],["9C3336","Stiletto"],["9D5616","Hawaiian Tan"],["9DACB7","Gull Gray"],["9DC209","Pistachio"],["9DE093","Granny Smith Apple"],["9DE5FF","Anakiwa"],["9E5302","Chelsea Gem"],["9E5B40","Sepia Skin"],["9EA587","Sage"],["9EA91F","Citron"],["9EB1CD","Rock Blue"],["9EDEE0","Morning Glory"],["9F381D","Cognac"],["9F821C","Reef Gold"],["9F9F9C","Star Dust"],["9FA0B1","Santas Gray"],["9FD7D3","Sinbad"],["9FDD8C","Feijoa"],["A02712","Tabasco"],["A1750D","Buttered Rum"],["A1ADB5","Hit Gray"],["A1C50A","Citrus"],["A1DAD7","Aqua Island"],["A1E9DE","Water Leaf"],["A2006D","Flirt"],["A23B6C","Rouge"],["A26645","Cape Palliser"],["A2AAB3","Gray Chateau"],["A2AEAB","Edward"],["A3807B","Pharlap"],["A397B4","Amethyst Smoke"],["A3E3ED","Blizzard Blue"],["A4A49D","Delta"],["A4A6D3","Wistful"],["A4AF6E","Green Smoke"],["A50B5E","Jazzberry Jam"],["A59B91","Zorba"],["A5CB0C","Bahia"],["A62F20","Roof Terracotta"],["A65529","Paarl"],["A68B5B","Barley Corn"],["A69279","Donkey Brown"],["A6A29A","Dawn"],["A72525","Mexican Red"],["A7882C","Luxor Gold"],["A85307","Rich Gold"],["A86515","Reno Sand"],["A86B6B","Coral Tree"],["A8989B","Dusty Gray"],["A899E6","Dull Lavender"],["A8A589","Tallow"],["A8AE9C","Bud"],["A8AF8E","Locust"],["A8BD9F","Norway"],["A8E3BD","Chinook"],["A9A491","Gray Olive"],["A9ACB6","Aluminium"],["A9B2C3","Cadet Blue"],["A9B497","Schist"],["A9BDBF","Tower Gray"],["A9BEF2","Perano"],["A9C6C2","Opal"],["AA375A","Night Shadz"],["AA4203","Fire"],["AA8B5B","Muesli"],["AA8D6F","Sandal"],["AAA5A9","Shady Lady"],["AAA9CD","Logan"],["AAABB7","Spun Pearl"],["AAD6E6","Regent St Blue"],["AAF0D1","Magic Mint"],["AB0563","Lipstick"],["AB3472","Royal Heath"],["AB917A","Sandrift"],["ABA0D9","Cold Purple"],["ABA196","Bronco"],["AC8A56","Limed Oak"],["AC91CE","East Side"],["AC9E22","Lemon Ginger"],["ACA494","Napa"],["ACA586","Hillary"],["ACA59F","Cloudy"],["ACACAC","Silver Chalice"],["ACB78E","Swamp Green"],["ACCBB1","Spring Rain"],["ACDD4D","Conifer"],["ACE1AF","Celadon"],["AD781B","Mandalay"],["ADBED1","Casper"],["ADDFAD","Moss Green"],["ADE6C4","Padua"],["ADFF2F","Green Yellow"],["AE4560","Hippie Pink"],["AE6020","Desert"],["AE809E","Bouquet"],["AF4035","Medium Carmine"],["AF4D43","Apple Blossom"],["AF593E","Brown Rust"],["AF8751","Driftwood"],["AF8F2C","Alpine"],["AF9F1C","Lucky"],["AFA09E","Martini"],["AFB1B8","Bombay"],["AFBDD9","Pigeon Post"],["B04C6A","Cadillac"],["B05D54","Matrix"],["B05E81","Tapestry"],["B06608","Mai Tai"],["B09A95","Del Rio"],["B0E0E6","Powder Blue"],["B0E313","Inch Worm"],["B10000","Bright Red"],["B14A0B","Vesuvius"],["B1610B","Pumpkin Skin"],["B16D52","Santa Fe"],["B19461","Teak"],["B1E2C1","Fringy Flower"],["B1F4E7","Ice Cold"],["B20931","Shiraz"],["B2A1EA","Biloba Flower"],["B32D29","Tall Poppy"],["B35213","Fiery Orange"],["B38007","Hot Toddy"],["B3AF95","Taupe Gray"],["B3C110","La Rioja"],["B43332","Well Read"],["B44668","Blush"],["B4CFD3","Jungle Mist"],["B57281","Turkish Rose"],["B57EDC","Lavender"],["B5A27F","Mongoose"],["B5B35C","Olive Green"],["B5D2CE","Jet Stream"],["B5ECDF","Cruise"],["B6316C","Hibiscus"],["B69D98","Thatch"],["B6B095","Heathered Gray"],["B6BAA4","Eagle"],["B6D1EA","Spindle"],["B6D3BF","Gum Leaf"],["B7410E","Rust"],["B78E5C","Muddy Waters"],["B7A214","Sahara"],["B7A458","Husk"],["B7B1B1","Nobel"],["B7C3D0","Heather"],["B7F0BE","Madang"],["B81104","Milano Red"],["B87333","Copper"],["B8B56A","Gimblet"],["B8C1B1","Green Spring"],["B8C25D","Celery"],["B8E0F9","Sail"],["B94E48","Chestnut"],["B95140","Crail"],["B98D28","Marigold"],["B9C46A","Wild Willow"],["B9C8AC","Rainee"],["BA0101","Guardsman Red"],["BA450C","Rock Spray"],["BA6F1E","Bourbon"],["BA7F03","Pirate Gold"],["BAB1A2","Nomad"],["BAC7C9","Submarine"],["BAEEF9","Charlotte"],["BB3385","Medium Red Violet"],["BB8983","Brandy Rose"],["BBD009","Rio Grande"],["BBD7C1","Surf"],["BCC9C2","Powder Ash"],["BD5E2E","Tuscany"],["BD978E","Quicksand"],["BDB1A8","Silk"],["BDB2A1","Malta"],["BDB3C7","Chatelle"],["BDBBD7","Lavender Gray"],["BDBDC6","French Gray"],["BDC8B3","Clay Ash"],["BDC9CE","Loblolly"],["BDEDFD","French Pass"],["BEA6C3","London Hue"],["BEB5B7","Pink Swan"],["BEDE0D","Fuego"],["BF5500","Rose of Sharon"],["BFB8B0","Tide"],["BFBED8","Blue Haze"],["BFC1C2","Silver Sand"],["BFC921","Key Lime Pie"],["BFDBE2","Ziggurat"],["BFFF00","Lime"],["C02B18","Thunderbird"],["C04737","Mojo"],["C08081","Old Rose"],["C0C0C0","Silver"],["C0D3B9","Pale Leaf"],["C0D8B6","Pixie Green"],["C1440E","Tia Maria"],["C154C1","Fuchsia Pink"],["C1A004","Buddha Gold"],["C1B7A4","Bison Hide"],["C1BAB0","Tea"],["C1BECD","Gray Suit"],["C1D7B0","Sprout"],["C1F07C","Sulu"],["C26B03","Indochine"],["C2955D","Twine"],["C2BDB6","Cotton Seed"],["C2CAC4","Pumice"],["C2E8E5","Jagged Ice"],["C32148","Maroon Flush"],["C3B091","Indian Khaki"],["C3BFC1","Pale Slate"],["C3C3BD","Gray Nickel"],["C3CDE6","Periwinkle Gray"],["C3D1D1","Tiara"],["C3DDF9","Tropical Blue"],["C41E3A","Cardinal"],["C45655","Fuzzy Wuzzy Brown"],["C45719","Orange Roughy"],["C4C4BC","Mist Gray"],["C4D0B0","Coriander"],["C4F4EB","Mint Tulip"],["C54B8C","Mulberry"],["C59922","Nugget"],["C5994B","Tussock"],["C5DBCA","Sea Mist"],["C5E17A","Yellow Green"],["C62D42","Brick Red"],["C6726B","Contessa"],["C69191","Oriental Pink"],["C6A84B","Roti"],["C6C3B5","Ash"],["C6C8BD","Kangaroo"],["C6E610","Las Palmas"],["C7031E","Monza"],["C71585","Red Violet"],["C7BCA2","Coral Reef"],["C7C1FF","Melrose"],["C7C4BF","Cloud"],["C7C9D5","Ghost"],["C7CD90","Pine Glade"],["C7DDE5","Botticelli"],["C88A65","Antique Brass"],["C8A2C8","Lilac"],["C8A528","Hokey Pokey"],["C8AABF","Lily"],["C8B568","Laser"],["C8E3D7","Edgewater"],["C96323","Piper"],["C99415","Pizza"],["C9A0DC","Light Wisteria"],["C9B29B","Rodeo Dust"],["C9B35B","Sundance"],["C9B93B","Earls Green"],["C9C0BB","Silver Rust"],["C9D9D2","Conch"],["C9FFA2","Reef"],["C9FFE5","Aero Blue"],["CA3435","Flush Mahogany"],["CABB48","Turmeric"],["CADCD4","Paris White"],["CAE00D","Bitter Lemon"],["CAE6DA","Skeptic"],["CB8FA9","Viola"],["CBCAB6","Foggy Gray"],["CBD3B0","Green Mist"],["CBDBD6","Nebula"],["CC3333","Persian Red"],["CC5500","Burnt Orange"],["CC7722","Ochre"],["CC8899","Puce"],["CCCAA8","Thistle Green"],["CCCCFF","Periwinkle"],["CCFF00","Electric Lime"],["CD5700","Tenn"],["CD5C5C","Chestnut Rose"],["CD8429","Brandy Punch"],["CDF4FF","Onahau"],["CEB98F","Sorrell Brown"],["CEBABA","Cold Turkey"],["CEC291","Yuma"],["CEC7A7","Chino"],["CFA39D","Eunry"],["CFB53B","Old Gold"],["CFDCCF","Tasman"],["CFE5D2","Surf Crest"],["CFF9F3","Humming Bird"],["CFFAF4","Scandal"],["D05F04","Red Stage"],["D06DA1","Hopbush"],["D07D12","Meteor"],["D0BEF8","Perfume"],["D0C0E5","Prelude"],["D0F0C0","Tea Green"],["D18F1B","Geebung"],["D1BEA8","Vanilla"],["D1C6B4","Soft Amber"],["D1D2CA","Celeste"],["D1D2DD","Mischka"],["D1E231","Pear"],["D2691E","Hot Cinnamon"],["D27D46","Raw Sienna"],["D29EAA","Careys Pink"],["D2B48C","Tan"],["D2DA97","Deco"],["D2F6DE","Blue Romance"],["D2F8B0","Gossip"],["D3CBBA","Sisal"],["D3CDC5","Swirl"],["D47494","Charm"],["D4B6AF","Clam Shell"],["D4BF8D","Straw"],["D4C4A8","Akaroa"],["D4CD16","Bird Flower"],["D4D7D9","Iron"],["D4DFE2","Geyser"],["D4E2FC","Hawkes Blue"],["D54600","Grenadier"],["D591A4","Can Can"],["D59A6F","Whiskey"],["D5D195","Winter Hazel"],["D5F6E3","Granny Apple"],["D69188","My Pink"],["D6C562","Tacha"],["D6CEF6","Moon Raker"],["D6D6D1","Quill Gray"],["D6FFDB","Snowy Mint"],["D7837F","New York Pink"],["D7C498","Pavlova"],["D7D0FF","Fog"],["D84437","Valencia"],["D87C63","Japonica"],["D8BFD8","Thistle"],["D8C2D5","Maverick"],["D8FCFA","Foam"],["D94972","Cabaret"],["D99376","Burning Sand"],["D9B99B","Cameo"],["D9D6CF","Timberwolf"],["D9DCC1","Tana"],["D9E4F5","Link Water"],["D9F7FF","Mabel"],["DA3287","Cerise"],["DA5B38","Flame Pea"],["DA6304","Bamboo"],["DA6A41","Red Damask"],["DA70D6","Orchid"],["DA8A67","Copperfield"],["DAA520","Golden Grass"],["DAECD6","Zanah"],["DAF4F0","Iceberg"],["DAFAFF","Oyster Bay"],["DB5079","Cranberry"],["DB9690","Petite Orchid"],["DB995E","Di Serria"],["DBDBDB","Alto"],["DBFFF8","Frosted Mint"],["DC143C","Crimson"],["DC4333","Punch"],["DCB20C","Galliano"],["DCB4BC","Blossom"],["DCD747","Wattle"],["DCD9D2","Westar"],["DCDDCC","Moon Mist"],["DCEDB4","Caper"],["DCF0EA","Swans Down"],["DDD6D5","Swiss Coffee"],["DDF9F1","White Ice"],["DE3163","Cerise Red"],["DE6360","Roman"],["DEA681","Tumbleweed"],["DEBA13","Gold Tips"],["DEC196","Brandy"],["DECBC6","Wafer"],["DED4A4","Sapling"],["DED717","Barberry"],["DEE5C0","Beryl Green"],["DEF5FF","Pattens Blue"],["DF73FF","Heliotrope"],["DFBE6F","Apache"],["DFCD6F","Chenin"],["DFCFDB","Lola"],["DFECDA","Willow Brook"],["DFFF00","Chartreuse Yellow"],["E0B0FF","Mauve"],["E0B646","Anzac"],["E0B974","Harvest Gold"],["E0C095","Calico"],["E0FFFF","Baby Blue"],["E16865","Sunglo"],["E1BC64","Equator"],["E1C0C8","Pink Flare"],["E1E6D6","Periglacial Blue"],["E1EAD4","Kidnapper"],["E1F6E8","Tara"],["E25465","Mandy"],["E2725B","Terracotta"],["E28913","Golden Bell"],["E292C0","Shocking"],["E29418","Dixie"],["E29CD2","Light Orchid"],["E2D8ED","Snuff"],["E2EBED","Mystic"],["E2F3EC","Apple Green"],["E30B5C","Razzmatazz"],["E32636","Alizarin Crimson"],["E34234","Cinnabar"],["E3BEBE","Cavern Pink"],["E3F5E1","Peppermint"],["E3F988","Mindaro"],["E47698","Deep Blush"],["E49B0F","Gamboge"],["E4C2D5","Melanie"],["E4CFDE","Twilight"],["E4D1C0","Bone"],["E4D422","Sunflower"],["E4D5B7","Grain Brown"],["E4D69B","Zombie"],["E4F6E7","Frostee"],["E4FFD1","Snow Flurry"],["E52B50","Amaranth"],["E5841B","Zest"],["E5CCC9","Dust Storm"],["E5D7BD","Stark White"],["E5D8AF","Hampton"],["E5E0E1","Bon Jour"],["E5E5E5","Mercury"],["E5F9F6","Polar"],["E64E03","Trinidad"],["E6BE8A","Gold Sand"],["E6BEA5","Cashmere"],["E6D7B9","Double Spanish White"],["E6E4D4","Satin Linen"],["E6F2EA","Harp"],["E6F8F3","Off Green"],["E6FFE9","Hint of Green"],["E6FFFF","Tranquil"],["E77200","Mango Tango"],["E7730A","Christine"],["E79F8C","Tonys Pink"],["E79FC4","Kobi"],["E7BCB4","Rose Fog"],["E7BF05","Corn"],["E7CD8C","Putty"],["E7ECE6","Gray Nurse"],["E7F8FF","Lily White"],["E7FEFF","Bubbles"],["E89928","Fire Bush"],["E8B9B3","Shilo"],["E8E0D5","Pearl Bush"],["E8EBE0","Green White"],["E8F1D4","Chrome White"],["E8F2EB","Gin"],["E8F5F2","Aqua Squeeze"],["E96E00","Clementine"],["E97451","Burnt Sienna"],["E97C07","Tahiti Gold"],["E9CECD","Oyster Pink"],["E9D75A","Confetti"],["E9E3E3","Ebb"],["E9F8ED","Ottoman"],["E9FFFD","Clear Day"],["EA88A8","Carissma"],["EAAE69","Porsche"],["EAB33B","Tulip Tree"],["EAC674","Rob Roy"],["EADAB8","Raffia"],["EAE8D4","White Rock"],["EAF6EE","Panache"],["EAF6FF","Solitude"],["EAF9F5","Aqua Spring"],["EAFFFE","Dew"],["EB9373","Apricot"],["EBC2AF","Zinnwaldite"],["ECA927","Fuel Yellow"],["ECC54E","Ronchi"],["ECC7EE","French Lilac"],["ECCDB9","Just Right"],["ECE090","Wild Rice"],["ECEBBD","Fall Green"],["ECEBCE","Aths Special"],["ECF245","Starship"],["ED0A3F","Red Ribbon"],["ED7A1C","Tango"],["ED9121","Carrot Orange"],["ED989E","Sea Pink"],["EDB381","Tacao"],["EDC9AF","Desert Sand"],["EDCDAB","Pancho"],["EDDCB1","Chamois"],["EDEA99","Primrose"],["EDF5DD","Frost"],["EDF5F5","Aqua Haze"],["EDF6FF","Zumthor"],["EDF9F1","Narvik"],["EDFC84","Honeysuckle"],["EE82EE","Lavender Magenta"],["EEC1BE","Beauty Bush"],["EED794","Chalky"],["EED9C4","Almond"],["EEDC82","Flax"],["EEDEDA","Bizarre"],["EEE3AD","Double Colonial White"],["EEEEE8","Cararra"],["EEEF78","Manz"],["EEF0C8","Tahuna Sands"],["EEF0F3","Athens Gray"],["EEF3C3","Tusk"],["EEF4DE","Loafer"],["EEF6F7","Catskill White"],["EEFDFF","Twilight Blue"],["EEFF9A","Jonquil"],["EEFFE2","Rice Flower"],["EF863F","Jaffa"],["EFEFEF","Gallery"],["EFF2F3","Porcelain"],["F091A9","Mauvelous"],["F0D52D","Golden Dream"],["F0DB7D","Golden Sand"],["F0DC82","Buff"],["F0E2EC","Prim"],["F0E68C","Khaki"],["F0EEFD","Selago"],["F0EEFF","Titan White"],["F0F8FF","Alice Blue"],["F0FCEA","Feta"],["F18200","Gold Drop"],["F19BAB","Wewak"],["F1E788","Sahara Sand"],["F1E9D2","Parchment"],["F1E9FF","Blue Chalk"],["F1EEC1","Mint Julep"],["F1F1F1","Seashell"],["F1F7F2","Saltpan"],["F1FFAD","Tidal"],["F1FFC8","Chiffon"],["F2552A","Flamingo"],["F28500","Tangerine"],["F2C3B2","Mandys Pink"],["F2F2F2","Concrete"],["F2FAFA","Black Squeeze"],["F34723","Pomegranate"],["F3AD16","Buttercup"],["F3D69D","New Orleans"],["F3D9DF","Vanilla Ice"],["F3E7BB","Sidecar"],["F3E9E5","Dawn Pink"],["F3EDCF","Wheatfield"],["F3FB62","Canary"],["F3FBD4","Orinoco"],["F3FFD8","Carla"],["F400A1","Hollywood Cerise"],["F4A460","Sandy brown"],["F4C430","Saffron"],["F4D81C","Ripe Lemon"],["F4EBD3","Janna"],["F4F2EE","Pampas"],["F4F4F4","Wild Sand"],["F4F8FF","Zircon"],["F57584","Froly"],["F5C85C","Cream Can"],["F5C999","Manhattan"],["F5D5A0","Maize"],["F5DEB3","Wheat"],["F5E7A2","Sandwisp"],["F5E7E2","Pot Pourri"],["F5E9D3","Albescent White"],["F5EDEF","Soft Peach"],["F5F3E5","Ecru White"],["F5F5DC","Beige"],["F5FB3D","Golden Fizz"],["F5FFBE","Australian Mint"],["F64A8A","French Rose"],["F653A6","Brilliant Rose"],["F6A4C9","Illusion"],["F6F0E6","Merino"],["F6F7F7","Black Haze"],["F6FFDC","Spring Sun"],["F7468A","Violet Red"],["F77703","Chilean Fire"],["F77FBE","Persian Pink"],["F7B668","Rajah"],["F7C8DA","Azalea"],["F7DBE6","We Peep"],["F7F2E1","Quarter Spanish White"],["F7F5FA","Whisper"],["F7FAF7","Snow Drift"],["F8B853","Casablanca"],["F8C3DF","Chantilly"],["F8D9E9","Cherub"],["F8DB9D","Marzipan"],["F8DD5C","Energy Yellow"],["F8E4BF","Givry"],["F8F0E8","White Linen"],["F8F4FF","Magnolia"],["F8F6F1","Spring Wood"],["F8F7DC","Coconut Cream"],["F8F7FC","White Lilac"],["F8F8F7","Desert Storm"],["F8F99C","Texas"],["F8FACD","Corn Field"],["F8FDD3","Mimosa"],["F95A61","Carnation"],["F9BF58","Saffron Mango"],["F9E0ED","Carousel Pink"],["F9E4BC","Dairy Cream"],["F9E663","Portica"],["F9EAF3","Amour"],["F9F8E4","Rum Swizzle"],["F9FF8B","Dolly"],["F9FFF6","Sugar Cane"],["FA7814","Ecstasy"],["FA9D5A","Tan Hide"],["FAD3A2","Corvette"],["FADFAD","Peach Yellow"],["FAE600","Turbo"],["FAEAB9","Astra"],["FAECCC","Champagne"],["FAF0E6","Linen"],["FAF3F0","Fantasy"],["FAF7D6","Citrine White"],["FAFAFA","Alabaster"],["FAFDE4","Hint of Yellow"],["FAFFA4","Milan"],["FB607F","Brink Pink"],["FB8989","Geraldine"],["FBA0E3","Lavender Rose"],["FBA129","Sea Buckthorn"],["FBAC13","Sun"],["FBAED2","Lavender Pink"],["FBB2A3","Rose Bud"],["FBBEDA","Cupid"],["FBCCE7","Classic Rose"],["FBCEB1","Apricot Peach"],["FBE7B2","Banana Mania"],["FBE870","Marigold Yellow"],["FBE96C","Festival"],["FBEA8C","Sweet Corn"],["FBEC5D","Candy Corn"],["FBF9F9","Hint of Red"],["FBFFBA","Shalimar"],["FC0FC0","Shocking Pink"],["FC80A5","Tickle Me Pink"],["FC9C1D","Tree Poppy"],["FCC01E","Lightning Yellow"],["FCD667","Goldenrod"],["FCD917","Candlelight"],["FCDA98","Cherokee"],["FCF4D0","Double Pearl Lusta"],["FCF4DC","Pearl Lusta"],["FCF8F7","Vista White"],["FCFBF3","Bianca"],["FCFEDA","Moon Glow"],["FCFFE7","China Ivory"],["FCFFF9","Ceramic"],["FD0E35","Torch Red"],["FD5B78","Wild Watermelon"],["FD7B33","Crusta"],["FD7C07","Sorbus"],["FD9FA2","Sweet Pink"],["FDD5B1","Light Apricot"],["FDD7E4","Pig Pink"],["FDE1DC","Cinderella"],["FDE295","Golden Glow"],["FDE910","Lemon"],["FDF5E6","Old Lace"],["FDF6D3","Half Colonial White"],["FDF7AD","Drover"],["FDFEB8","Pale Prim"],["FDFFD5","Cumulus"],["FE28A2","Persian Rose"],["FE4C40","Sunset Orange"],["FE6F5E","Bittersweet"],["FE9D04","California"],["FEA904","Yellow Sea"],["FEBAAD","Melon"],["FED33C","Bright Sun"],["FED85D","Dandelion"],["FEDB8D","Salomie"],["FEE5AC","Cape Honey"],["FEEBF3","Remy"],["FEEFCE","Oasis"],["FEF0EC","Bridesmaid"],["FEF2C7","Beeswax"],["FEF3D8","Bleach White"],["FEF4CC","Pipi"],["FEF4DB","Half Spanish White"],["FEF4F8","Wisp Pink"],["FEF5F1","Provincial Pink"],["FEF7DE","Half Dutch White"],["FEF8E2","Solitaire"],["FEF8FF","White Pointer"],["FEF9E3","Off Yellow"],["FEFCED","Orange White"],["FF0000","Red"],["FF007F","Rose"],["FF00CC","Purple Pizzazz"],["FF00FF","Magenta / Fuchsia"],["FF2400","Scarlet"],["FF3399","Wild Strawberry"],["FF33CC","Razzle Dazzle Rose"],["FF355E","Radical Red"],["FF3F34","Red Orange"],["FF4040","Coral Red"],["FF4D00","Vermilion"],["FF4F00","International Orange"],["FF6037","Outrageous Orange"],["FF6600","Blaze Orange"],["FF66FF","Pink Flamingo"],["FF681F","Orange"],["FF69B4","Hot Pink"],["FF6B53","Persimmon"],["FF6FFF","Blush Pink"],["FF7034","Burning Orange"],["FF7518","Pumpkin"],["FF7D07","Flamenco"],["FF7F00","Flush Orange"],["FF7F50","Coral"],["FF8C69","Salmon"],["FF9000","Pizazz"],["FF910F","West Side"],["FF91A4","Pink Salmon"],["FF9933","Neon Carrot"],["FF9966","Atomic Tangerine"],["FF9980","Vivid Tangerine"],["FF9E2C","Sunshade"],["FFA000","Orange Peel"],["FFA194","Mona Lisa"],["FFA500","Web Orange"],["FFA6C9","Carnation Pink"],["FFAB81","Hit Pink"],["FFAE42","Yellow Orange"],["FFB0AC","Cornflower Lilac"],["FFB1B3","Sundown"],["FFB31F","My Sin"],["FFB555","Texas Rose"],["FFB7D5","Cotton Candy"],["FFB97B","Macaroni and Cheese"],["FFBA00","Selective Yellow"],["FFBD5F","Koromiko"],["FFBF00","Amber"],["FFC0A8","Wax Flower"],["FFC0CB","Pink"],["FFC3C0","Your Pink"],["FFC901","Supernova"],["FFCBA4","Flesh"],["FFCC33","Sunglow"],["FFCC5C","Golden Tainoi"],["FFCC99","Peach Orange"],["FFCD8C","Chardonnay"],["FFD1DC","Pastel Pink"],["FFD2B7","Romantic"],["FFD38C","Grandis"],["FFD700","Gold"],["FFD800","School bus Yellow"],["FFD8D9","Cosmos"],["FFDB58","Mustard"],["FFDCD6","Peach Schnapps"],["FFDDAF","Caramel"],["FFDDCD","Tuft Bush"],["FFDDCF","Watusi"],["FFDDF4","Pink Lace"],["FFDEAD","Navajo White"],["FFDEB3","Frangipani"],["FFE1DF","Pippin"],["FFE1F2","Pale Rose"],["FFE2C5","Negroni"],["FFE5A0","Cream Brulee"],["FFE5B4","Peach"],["FFE6C7","Tequila"],["FFE772","Kournikova"],["FFEAC8","Sandy Beach"],["FFEAD4","Karry"],["FFEC13","Broom"],["FFEDBC","Colonial White"],["FFEED8","Derby"],["FFEFA1","Vis Vis"],["FFEFC1","Egg White"],["FFEFD5","Papaya Whip"],["FFEFEC","Fair Pink"],["FFF0DB","Peach Cream"],["FFF0F5","Lavender blush"],["FFF14F","Gorse"],["FFF1B5","Buttermilk"],["FFF1D8","Pink Lady"],["FFF1EE","Forget Me Not"],["FFF1F9","Tutu"],["FFF39D","Picasso"],["FFF3F1","Chardon"],["FFF46E","Paris Daisy"],["FFF4CE","Barley White"],["FFF4DD","Egg Sour"],["FFF4E0","Sazerac"],["FFF4E8","Serenade"],["FFF4F3","Chablis"],["FFF5EE","Seashell Peach"],["FFF5F3","Sauvignon"],["FFF6D4","Milk Punch"],["FFF6DF","Varden"],["FFF6F5","Rose White"],["FFF8D1","Baja White"],["FFF9E2","Gin Fizz"],["FFF9E6","Early Dawn"],["FFFACD","Lemon Chiffon"],["FFFAF4","Bridal Heath"],["FFFBDC","Scotch Mist"],["FFFBF9","Soapstone"],["FFFC99","Witch Haze"],["FFFCEA","Buttery White"],["FFFCEE","Island Spice"],["FFFDD0","Cream"],["FFFDE6","Chilean Heath"],["FFFDE8","Travertine"],["FFFDF3","Orchid White"],["FFFDF4","Quarter Pearl Lusta"],["FFFEE1","Half and Half"],["FFFEEC","Apricot White"],["FFFEF0","Rice Cake"],["FFFEF6","Black White"],["FFFEFD","Romance"],["FFFF00","Yellow"],["FFFF66","Laser Lemon"],["FFFF99","Pale Canary"],["FFFFB4","Portafino"],["FFFFF0","Ivory"],["FFFFFF","White"]];const YN=ci(VN),Rx=(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}}},XN={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},qN=e=>Rx(XN[e.toLowerCase()],6),JN=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,QN=e=>{let t;return(t=e.match(JN))?Rx(parseInt(t[1],16),t[1].length):void 0},fr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ga=`${fr}%`,Zh=`(?:${fr}%|${fr})`,ZN=`(?:${fr}(deg|grad|rad|turn)|${fr})`,ii="\\s*,\\s*",eI=new RegExp(`^rgba?\\(\\s*${fr}${ii}${fr}${ii}${fr}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),tI=new RegExp(`^rgba?\\(\\s*${ga}${ii}${ga}${ii}${ga}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),nI=e=>{let t={mode:"rgb"},n;if(n=e.match(eI))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(tI))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},zs=(e,t)=>e===void 0?void 0:typeof e!="object"?Ou(e):e.mode!==void 0?e:t?q(z({},e),{mode:t}):void 0,nn=(e="rgb")=>t=>(t=zs(t,e))!==void 0?t.mode===e?t:wn[t.mode][e]?wn[t.mode][e](t):e==="rgb"?wn[t.mode].rgb(t):wn.rgb[e](wn[t.mode].rgb(t)):void 0,wn={},Nx={},js=[],Ix={},rI=e=>e,be=e=>(wn[e.mode]=z(z({},wn[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{wn[t]||(wn[t]={}),wn[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=rI)}),Nx[e.mode]=e,(e.parse||[]).forEach(t=>{oI(t,e.mode)}),nn(e.mode)),Mu=e=>Nx[e],oI=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Ix[e]=t}else typeof e=="function"&&js.indexOf(e)<0&&js.push(e)},Vd=/[^\x00-\x7F]|[a-zA-Z_]/,iI=/[^\x00-\x7F]|[-\w]/,I={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Z=0;function Nl(e){let t=e[Z],n=e[Z+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Z+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Kd(e){if(Z>=e.length)return!1;let t=e[Z];if(Vd.test(t))return!0;if(t==="-"){if(e.length-Z<2)return!1;let n=e[Z+1];return!!(n==="-"||Vd.test(n))}return!1}const aI={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ji(e){let t="";if((e[Z]==="-"||e[Z]==="+")&&(t+=e[Z++]),t+=Il(e),e[Z]==="."&&/\d/.test(e[Z+1])&&(t+=e[Z++]+Il(e)),(e[Z]==="e"||e[Z]==="E")&&((e[Z+1]==="-"||e[Z+1]==="+")&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+Il(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+Il(e))),Kd(e)){let n=Hs(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:I.Hue,value:t*aI[n]}:void 0}return e[Z]==="%"?(Z++,{type:I.Percentage,value:+t}):{type:I.Number,value:+t}}function Il(e){let t="";for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function Hs(e){let t="";for(;Z{e.current.running=e.current.latest!==null,e.current.running&&((!a||o)&&(t(e.current.latest),e.current.latest=null),setTimeout(i,r.ms))};i(!0)}const GN=e=>{const t=x.useRef({});return x.useMemo(()=>(n,r)=>HN(t,n,r,e),[])},WN=90;function UN(e){if(e.keyCode==WN&&e.ctrlKey)return e.preventDefault(),!1}function Re(i){var a=i,{label:e,value:t,className:n,onChange:r}=a,o=mn(a,["label","value","className","onChange"]);return f("input",z({type:"text",value:t,onChange:s=>r(s.target.value),onKeyDown:UN,className:"components-text-control__input",autoCapitalize:"off"},o))}var VN=function(t){if(KN(),t=t.toUpperCase(),t.length<3||t.length>7)return{exactMatch:!1,closestColor:"#000000",colorName:"Invalid Color: "+t};t.length%3==0&&(t="#"+t),t.length==4&&(t="#"+t.substr(1,1)+t.substr(1,1)+t.substr(2,1)+t.substr(2,1)+t.substr(3,1)+t.substr(3,1));for(var n=Ox(t),r=n[0],o=n[1],i=n[2],a=Mx(t),l=a[0],s=a[1],u=a[2],c=0,d=0,p=0,h=-1,m=-1,y=0;yp)&&(m=p,h=y)}return{exactMatch:!1,colorName:gt[h][1],closestColor:`#${gt[h][0]}`}};const KN=function(){for(var e=0;e0&&l<1&&(a=o/(l<.5?2*l:2-2*l)),i=0,o>0&&(r==s&&r!=u&&(i+=(u-c)/o),r==u&&r!=c&&(i+=2+(c-s)/o),r==c&&r!=s&&(i+=4+(s-u)/o),i/=6),[parseInt(i*255),parseInt(a*255),parseInt(l*255)]}function Ox(e){return[parseInt("0x"+e.substring(1,3)),parseInt("0x"+e.substring(3,5)),parseInt("0x"+e.substring(5,7))]}let gt=[["000000","Black"],["000080","Navy Blue"],["0000C8","Dark Blue"],["0000FF","Blue"],["000741","Stratos"],["001B1C","Swamp"],["002387","Resolution Blue"],["002900","Deep Fir"],["002E20","Burnham"],["002FA7","International Klein Blue"],["003153","Prussian Blue"],["003366","Midnight Blue"],["003399","Smalt"],["003532","Deep Teal"],["003E40","Cyprus"],["004620","Kaitoke Green"],["0047AB","Cobalt"],["004816","Crusoe"],["004950","Sherpa Blue"],["0056A7","Endeavour"],["00581A","Camarone"],["0066CC","Science Blue"],["0066FF","Blue Ribbon"],["00755E","Tropical Rain Forest"],["0076A3","Allports"],["007BA7","Deep Cerulean"],["007EC7","Lochmara"],["007FFF","Azure Radiance"],["008080","Teal"],["0095B6","Bondi Blue"],["009DC4","Pacific Blue"],["00A693","Persian Green"],["00A86B","Jade"],["00CC99","Caribbean Green"],["00CCCC","Robin's Egg Blue"],["00FF00","Green"],["00FF7F","Spring Green"],["00FFFF","Cyan / Aqua"],["010D1A","Blue Charcoal"],["011635","Midnight"],["011D13","Holly"],["012731","Daintree"],["01361C","Cardin Green"],["01371A","County Green"],["013E62","Astronaut Blue"],["013F6A","Regal Blue"],["014B43","Aqua Deep"],["015E85","Orient"],["016162","Blue Stone"],["016D39","Fun Green"],["01796F","Pine Green"],["017987","Blue Lagoon"],["01826B","Deep Sea"],["01A368","Green Haze"],["022D15","English Holly"],["02402C","Sherwood Green"],["02478E","Congress Blue"],["024E46","Evening Sea"],["026395","Bahama Blue"],["02866F","Observatory"],["02A4D3","Cerulean"],["03163C","Tangaroa"],["032B52","Green Vogue"],["036A6E","Mosque"],["041004","Midnight Moss"],["041322","Black Pearl"],["042E4C","Blue Whale"],["044022","Zuccini"],["044259","Teal Blue"],["051040","Deep Cove"],["051657","Gulf Blue"],["055989","Venice Blue"],["056F57","Watercourse"],["062A78","Catalina Blue"],["063537","Tiber"],["069B81","Gossamer"],["06A189","Niagara"],["073A50","Tarawera"],["080110","Jaguar"],["081910","Black Bean"],["082567","Deep Sapphire"],["088370","Elf Green"],["08E8DE","Bright Turquoise"],["092256","Downriver"],["09230F","Palm Green"],["09255D","Madison"],["093624","Bottle Green"],["095859","Deep Sea Green"],["097F4B","Salem"],["0A001C","Black Russian"],["0A480D","Dark Fern"],["0A6906","Japanese Laurel"],["0A6F75","Atoll"],["0B0B0B","Cod Gray"],["0B0F08","Marshland"],["0B1107","Gordons Green"],["0B1304","Black Forest"],["0B6207","San Felix"],["0BDA51","Malachite"],["0C0B1D","Ebony"],["0C0D0F","Woodsmoke"],["0C1911","Racing Green"],["0C7A79","Surfie Green"],["0C8990","Blue Chill"],["0D0332","Black Rock"],["0D1117","Bunker"],["0D1C19","Aztec"],["0D2E1C","Bush"],["0E0E18","Cinder"],["0E2A30","Firefly"],["0F2D9E","Torea Bay"],["10121D","Vulcan"],["101405","Green Waterloo"],["105852","Eden"],["110C6C","Arapawa"],["120A8F","Ultramarine"],["123447","Elephant"],["126B40","Jewel"],["130000","Diesel"],["130A06","Asphalt"],["13264D","Blue Zodiac"],["134F19","Parsley"],["140600","Nero"],["1450AA","Tory Blue"],["151F4C","Bunting"],["1560BD","Denim"],["15736B","Genoa"],["161928","Mirage"],["161D10","Hunter Green"],["162A40","Big Stone"],["163222","Celtic"],["16322C","Timber Green"],["163531","Gable Green"],["171F04","Pine Tree"],["175579","Chathams Blue"],["182D09","Deep Forest Green"],["18587A","Blumine"],["19330E","Palm Leaf"],["193751","Nile Blue"],["1959A8","Fun Blue"],["1A1A68","Lucky Point"],["1AB385","Mountain Meadow"],["1B0245","Tolopea"],["1B1035","Haiti"],["1B127B","Deep Koamaru"],["1B1404","Acadia"],["1B2F11","Seaweed"],["1B3162","Biscay"],["1B659D","Matisse"],["1C1208","Crowshead"],["1C1E13","Rangoon Green"],["1C39BB","Persian Blue"],["1C402E","Everglade"],["1C7C7D","Elm"],["1D6142","Green Pea"],["1E0F04","Creole"],["1E1609","Karaka"],["1E1708","El Paso"],["1E385B","Cello"],["1E433C","Te Papa Green"],["1E90FF","Dodger Blue"],["1E9AB0","Eastern Blue"],["1F120F","Night Rider"],["1FC2C2","Java"],["20208D","Jacksons Purple"],["202E54","Cloud Burst"],["204852","Blue Dianne"],["211A0E","Eternity"],["220878","Deep Blue"],["228B22","Forest Green"],["233418","Mallard"],["240A40","Violet"],["240C02","Kilamanjaro"],["242A1D","Log Cabin"],["242E16","Black Olive"],["24500F","Green House"],["251607","Graphite"],["251706","Cannon Black"],["251F4F","Port Gore"],["25272C","Shark"],["25311C","Green Kelp"],["2596D1","Curious Blue"],["260368","Paua"],["26056A","Paris M"],["261105","Wood Bark"],["261414","Gondola"],["262335","Steel Gray"],["26283B","Ebony Clay"],["273A81","Bay of Many"],["27504B","Plantation"],["278A5B","Eucalyptus"],["281E15","Oil"],["283A77","Astronaut"],["286ACD","Mariner"],["290C5E","Violent Violet"],["292130","Bastille"],["292319","Zeus"],["292937","Charade"],["297B9A","Jelly Bean"],["29AB87","Jungle Green"],["2A0359","Cherry Pie"],["2A140E","Coffee Bean"],["2A2630","Baltic Sea"],["2A380B","Turtle Green"],["2A52BE","Cerulean Blue"],["2B0202","Sepia Black"],["2B194F","Valhalla"],["2B3228","Heavy Metal"],["2C0E8C","Blue Gem"],["2C1632","Revolver"],["2C2133","Bleached Cedar"],["2C8C84","Lochinvar"],["2D2510","Mikado"],["2D383A","Outer Space"],["2D569B","St Tropaz"],["2E0329","Jacaranda"],["2E1905","Jacko Bean"],["2E3222","Rangitoto"],["2E3F62","Rhino"],["2E8B57","Sea Green"],["2EBFD4","Scooter"],["2F270E","Onion"],["2F3CB3","Governor Bay"],["2F519E","Sapphire"],["2F5A57","Spectra"],["2F6168","Casal"],["300529","Melanzane"],["301F1E","Cocoa Brown"],["302A0F","Woodrush"],["304B6A","San Juan"],["30D5C8","Turquoise"],["311C17","Eclipse"],["314459","Pickled Bluewood"],["315BA1","Azure"],["31728D","Calypso"],["317D82","Paradiso"],["32127A","Persian Indigo"],["32293A","Blackcurrant"],["323232","Mine Shaft"],["325D52","Stromboli"],["327C14","Bilbao"],["327DA0","Astral"],["33036B","Christalle"],["33292F","Thunder"],["33CC99","Shamrock"],["341515","Tamarind"],["350036","Mardi Gras"],["350E42","Valentino"],["350E57","Jagger"],["353542","Tuna"],["354E8C","Chambray"],["363050","Martinique"],["363534","Tuatara"],["363C0D","Waiouru"],["36747D","Ming"],["368716","La Palma"],["370202","Chocolate"],["371D09","Clinker"],["37290E","Brown Tumbleweed"],["373021","Birch"],["377475","Oracle"],["380474","Blue Diamond"],["381A51","Grape"],["383533","Dune"],["384555","Oxford Blue"],["384910","Clover"],["394851","Limed Spruce"],["396413","Dell"],["3A0020","Toledo"],["3A2010","Sambuca"],["3A2A6A","Jacarta"],["3A686C","William"],["3A6A47","Killarney"],["3AB09E","Keppel"],["3B000B","Temptress"],["3B0910","Aubergine"],["3B1F1F","Jon"],["3B2820","Treehouse"],["3B7A57","Amazon"],["3B91B4","Boston Blue"],["3C0878","Windsor"],["3C1206","Rebel"],["3C1F76","Meteorite"],["3C2005","Dark Ebony"],["3C3910","Camouflage"],["3C4151","Bright Gray"],["3C4443","Cape Cod"],["3C493A","Lunar Green"],["3D0C02","Bean "],["3D2B1F","Bistre"],["3D7D52","Goblin"],["3E0480","Kingfisher Daisy"],["3E1C14","Cedar"],["3E2B23","English Walnut"],["3E2C1C","Black Marlin"],["3E3A44","Ship Gray"],["3EABBF","Pelorous"],["3F2109","Bronze"],["3F2500","Cola"],["3F3002","Madras"],["3F307F","Minsk"],["3F4C3A","Cabbage Pont"],["3F583B","Tom Thumb"],["3F5D53","Mineral Green"],["3FC1AA","Puerto Rico"],["3FFF00","Harlequin"],["401801","Brown Pod"],["40291D","Cork"],["403B38","Masala"],["403D19","Thatch Green"],["405169","Fiord"],["40826D","Viridian"],["40A860","Chateau Green"],["410056","Ripe Plum"],["411F10","Paco"],["412010","Deep Oak"],["413C37","Merlin"],["414257","Gun Powder"],["414C7D","East Bay"],["4169E1","Royal Blue"],["41AA78","Ocean Green"],["420303","Burnt Maroon"],["423921","Lisbon Brown"],["427977","Faded Jade"],["431560","Scarlet Gum"],["433120","Iroko"],["433E37","Armadillo"],["434C59","River Bed"],["436A0D","Green Leaf"],["44012D","Barossa"],["441D00","Morocco Brown"],["444954","Mako"],["454936","Kelp"],["456CAC","San Marino"],["45B1E8","Picton Blue"],["460B41","Loulou"],["462425","Crater Brown"],["465945","Gray Asparagus"],["4682B4","Steel Blue"],["480404","Rustic Red"],["480607","Bulgarian Rose"],["480656","Clairvoyant"],["481C1C","Cocoa Bean"],["483131","Woody Brown"],["483C32","Taupe"],["49170C","Van Cleef"],["492615","Brown Derby"],["49371B","Metallic Bronze"],["495400","Verdun Green"],["496679","Blue Bayoux"],["497183","Bismark"],["4A2A04","Bracken"],["4A3004","Deep Bronze"],["4A3C30","Mondo"],["4A4244","Tundora"],["4A444B","Gravel"],["4A4E5A","Trout"],["4B0082","Pigment Indigo"],["4B5D52","Nandor"],["4C3024","Saddle"],["4C4F56","Abbey"],["4D0135","Blackberry"],["4D0A18","Cab Sav"],["4D1E01","Indian Tan"],["4D282D","Cowboy"],["4D282E","Livid Brown"],["4D3833","Rock"],["4D3D14","Punga"],["4D400F","Bronzetone"],["4D5328","Woodland"],["4E0606","Mahogany"],["4E2A5A","Bossanova"],["4E3B41","Matterhorn"],["4E420C","Bronze Olive"],["4E4562","Mulled Wine"],["4E6649","Axolotl"],["4E7F9E","Wedgewood"],["4EABD1","Shakespeare"],["4F1C70","Honey Flower"],["4F2398","Daisy Bush"],["4F69C6","Indigo"],["4F7942","Fern Green"],["4F9D5D","Fruit Salad"],["4FA83D","Apple"],["504351","Mortar"],["507096","Kashmir Blue"],["507672","Cutty Sark"],["50C878","Emerald"],["514649","Emperor"],["516E3D","Chalet Green"],["517C66","Como"],["51808F","Smalt Blue"],["52001F","Castro"],["520C17","Maroon Oak"],["523C94","Gigas"],["533455","Voodoo"],["534491","Victoria"],["53824B","Hippie Green"],["541012","Heath"],["544333","Judge Gray"],["54534D","Fuscous Gray"],["549019","Vida Loca"],["55280C","Cioccolato"],["555B10","Saratoga"],["556D56","Finlandia"],["5590D9","Havelock Blue"],["56B4BE","Fountain Blue"],["578363","Spring Leaves"],["583401","Saddle Brown"],["585562","Scarpa Flow"],["587156","Cactus"],["589AAF","Hippie Blue"],["591D35","Wine Berry"],["592804","Brown Bramble"],["593737","Congo Brown"],["594433","Millbrook"],["5A6E9C","Waikawa Gray"],["5A87A0","Horizon"],["5B3013","Jambalaya"],["5C0120","Bordeaux"],["5C0536","Mulberry Wood"],["5C2E01","Carnaby Tan"],["5C5D75","Comet"],["5D1E0F","Redwood"],["5D4C51","Don Juan"],["5D5C58","Chicago"],["5D5E37","Verdigris"],["5D7747","Dingley"],["5DA19F","Breaker Bay"],["5E483E","Kabul"],["5E5D3B","Hemlock"],["5F3D26","Irish Coffee"],["5F5F6E","Mid Gray"],["5F6672","Shuttle Gray"],["5FA777","Aqua Forest"],["5FB3AC","Tradewind"],["604913","Horses Neck"],["605B73","Smoky"],["606E68","Corduroy"],["6093D1","Danube"],["612718","Espresso"],["614051","Eggplant"],["615D30","Costa Del Sol"],["61845F","Glade Green"],["622F30","Buccaneer"],["623F2D","Quincy"],["624E9A","Butterfly Bush"],["625119","West Coast"],["626649","Finch"],["639A8F","Patina"],["63B76C","Fern"],["6456B7","Blue Violet"],["646077","Dolphin"],["646463","Storm Dust"],["646A54","Siam"],["646E75","Nevada"],["6495ED","Cornflower Blue"],["64CCDB","Viking"],["65000B","Rosewood"],["651A14","Cherrywood"],["652DC1","Purple Heart"],["657220","Fern Frond"],["65745D","Willow Grove"],["65869F","Hoki"],["660045","Pompadour"],["660099","Purple"],["66023C","Tyrian Purple"],["661010","Dark Tan"],["66B58F","Silver Tree"],["66FF00","Bright Green"],["66FF66","Screamin' Green"],["67032D","Black Rose"],["675FA6","Scampi"],["676662","Ironside Gray"],["678975","Viridian Green"],["67A712","Christi"],["683600","Nutmeg Wood Finish"],["685558","Zambezi"],["685E6E","Salt Box"],["692545","Tawny Port"],["692D54","Finn"],["695F62","Scorpion"],["697E9A","Lynch"],["6A442E","Spice"],["6A5D1B","Himalaya"],["6A6051","Soya Bean"],["6B2A14","Hairy Heath"],["6B3FA0","Royal Purple"],["6B4E31","Shingle Fawn"],["6B5755","Dorado"],["6B8BA2","Bermuda Gray"],["6B8E23","Olive Drab"],["6C3082","Eminence"],["6CDAE7","Turquoise Blue"],["6D0101","Lonestar"],["6D5E54","Pine Cone"],["6D6C6C","Dove Gray"],["6D9292","Juniper"],["6D92A1","Gothic"],["6E0902","Red Oxide"],["6E1D14","Moccaccino"],["6E4826","Pickled Bean"],["6E4B26","Dallas"],["6E6D57","Kokoda"],["6E7783","Pale Sky"],["6F440C","Cafe Royale"],["6F6A61","Flint"],["6F8E63","Highland"],["6F9D02","Limeade"],["6FD0C5","Downy"],["701C1C","Persian Plum"],["704214","Sepia"],["704A07","Antique Bronze"],["704F50","Ferra"],["706555","Coffee"],["708090","Slate Gray"],["711A00","Cedar Wood Finish"],["71291D","Metallic Copper"],["714693","Affair"],["714AB2","Studio"],["715D47","Tobacco Brown"],["716338","Yellow Metal"],["716B56","Peat"],["716E10","Olivetone"],["717486","Storm Gray"],["718080","Sirocco"],["71D9E2","Aquamarine Blue"],["72010F","Venetian Red"],["724A2F","Old Copper"],["726D4E","Go Ben"],["727B89","Raven"],["731E8F","Seance"],["734A12","Raw Umber"],["736C9F","Kimberly"],["736D58","Crocodile"],["737829","Crete"],["738678","Xanadu"],["74640D","Spicy Mustard"],["747D63","Limed Ash"],["747D83","Rolling Stone"],["748881","Blue Smoke"],["749378","Laurel"],["74C365","Mantis"],["755A57","Russett"],["7563A8","Deluge"],["76395D","Cosmic"],["7666C6","Blue Marguerite"],["76BD17","Lima"],["76D7EA","Sky Blue"],["770F05","Dark Burgundy"],["771F1F","Crown of Thorns"],["773F1A","Walnut"],["776F61","Pablo"],["778120","Pacifika"],["779E86","Oxley"],["77DD77","Pastel Green"],["780109","Japanese Maple"],["782D19","Mocha"],["782F16","Peanut"],["78866B","Camouflage Green"],["788A25","Wasabi"],["788BBA","Ship Cove"],["78A39C","Sea Nymph"],["795D4C","Roman Coffee"],["796878","Old Lavender"],["796989","Rum"],["796A78","Fedora"],["796D62","Sandstone"],["79DEEC","Spray"],["7A013A","Siren"],["7A58C1","Fuchsia Blue"],["7A7A7A","Boulder"],["7A89B8","Wild Blue Yonder"],["7AC488","De York"],["7B3801","Red Beech"],["7B3F00","Cinnamon"],["7B6608","Yukon Gold"],["7B7874","Tapa"],["7B7C94","Waterloo "],["7B8265","Flax Smoke"],["7B9F80","Amulet"],["7BA05B","Asparagus"],["7C1C05","Kenyan Copper"],["7C7631","Pesto"],["7C778A","Topaz"],["7C7B7A","Concord"],["7C7B82","Jumbo"],["7C881A","Trendy Green"],["7CA1A6","Gumbo"],["7CB0A1","Acapulco"],["7CB7BB","Neptune"],["7D2C14","Pueblo"],["7DA98D","Bay Leaf"],["7DC8F7","Malibu"],["7DD8C6","Bermuda"],["7E3A15","Copper Canyon"],["7F1734","Claret"],["7F3A02","Peru Tan"],["7F626D","Falcon"],["7F7589","Mobster"],["7F76D3","Moody Blue"],["7FFF00","Chartreuse"],["7FFFD4","Aquamarine"],["800000","Maroon"],["800B47","Rose Bud Cherry"],["801818","Falu Red"],["80341F","Red Robin"],["803790","Vivid Violet"],["80461B","Russet"],["807E79","Friar Gray"],["808000","Olive"],["808080","Gray"],["80B3AE","Gulf Stream"],["80B3C4","Glacier"],["80CCEA","Seagull"],["81422C","Nutmeg"],["816E71","Spicy Pink"],["817377","Empress"],["819885","Spanish Green"],["826F65","Sand Dune"],["828685","Gunsmoke"],["828F72","Battleship Gray"],["831923","Merlot"],["837050","Shadow"],["83AA5D","Chelsea Cucumber"],["83D0C6","Monte Carlo"],["843179","Plum"],["84A0A0","Granny Smith"],["8581D9","Chetwode Blue"],["858470","Bandicoot"],["859FAF","Bali Hai"],["85C4CC","Half Baked"],["860111","Red Devil"],["863C3C","Lotus"],["86483C","Ironstone"],["864D1E","Bull Shot"],["86560A","Rusty Nail"],["868974","Bitter"],["86949F","Regent Gray"],["871550","Disco"],["87756E","Americano"],["877C7B","Hurricane"],["878D91","Oslo Gray"],["87AB39","Sushi"],["885342","Spicy Mix"],["886221","Kumera"],["888387","Suva Gray"],["888D65","Avocado"],["893456","Camelot"],["893843","Solid Pink"],["894367","Cannon Pink"],["897D6D","Makara"],["8A3324","Burnt Umber"],["8A73D6","True V"],["8A8360","Clay Creek"],["8A8389","Monsoon"],["8A8F8A","Stack"],["8AB9F1","Jordy Blue"],["8B00FF","Electric Violet"],["8B0723","Monarch"],["8B6B0B","Corn Harvest"],["8B8470","Olive Haze"],["8B847E","Schooner"],["8B8680","Natural Gray"],["8B9C90","Mantle"],["8B9FEE","Portage"],["8BA690","Envy"],["8BA9A5","Cascade"],["8BE6D8","Riptide"],["8C055E","Cardinal Pink"],["8C472F","Mule Fawn"],["8C5738","Potters Clay"],["8C6495","Trendy Pink"],["8D0226","Paprika"],["8D3D38","Sanguine Brown"],["8D3F3F","Tosca"],["8D7662","Cement"],["8D8974","Granite Green"],["8D90A1","Manatee"],["8DA8CC","Polo Blue"],["8E0000","Red Berry"],["8E4D1E","Rope"],["8E6F70","Opium"],["8E775E","Domino"],["8E8190","Mamba"],["8EABC1","Nepal"],["8F021C","Pohutukawa"],["8F3E33","El Salva"],["8F4B0E","Korma"],["8F8176","Squirrel"],["8FD6B4","Vista Blue"],["900020","Burgundy"],["901E1E","Old Brick"],["907874","Hemp"],["907B71","Almond Frost"],["908D39","Sycamore"],["92000A","Sangria"],["924321","Cumin"],["926F5B","Beaver"],["928573","Stonewall"],["928590","Venus"],["9370DB","Medium Purple"],["93CCEA","Cornflower"],["93DFB8","Algae Green"],["944747","Copper Rust"],["948771","Arrowtown"],["950015","Scarlett"],["956387","Strikemaster"],["959396","Mountain Mist"],["960018","Carmine"],["964B00","Brown"],["967059","Leather"],["9678B6","Purple Mountain's Majesty"],["967BB6","Lavender Purple"],["96A8A1","Pewter"],["96BBAB","Summer Green"],["97605D","Au Chico"],["9771B5","Wisteria"],["97CD2D","Atlantis"],["983D61","Vin Rouge"],["9874D3","Lilac Bush"],["98777B","Bazaar"],["98811B","Hacienda"],["988D77","Pale Oyster"],["98FF98","Mint Green"],["990066","Fresh Eggplant"],["991199","Violet Eggplant"],["991613","Tamarillo"],["991B07","Totem Pole"],["996666","Copper Rose"],["9966CC","Amethyst"],["997A8D","Mountbatten Pink"],["9999CC","Blue Bell"],["9A3820","Prairie Sand"],["9A6E61","Toast"],["9A9577","Gurkha"],["9AB973","Olivine"],["9AC2B8","Shadow Green"],["9B4703","Oregon"],["9B9E8F","Lemon Grass"],["9C3336","Stiletto"],["9D5616","Hawaiian Tan"],["9DACB7","Gull Gray"],["9DC209","Pistachio"],["9DE093","Granny Smith Apple"],["9DE5FF","Anakiwa"],["9E5302","Chelsea Gem"],["9E5B40","Sepia Skin"],["9EA587","Sage"],["9EA91F","Citron"],["9EB1CD","Rock Blue"],["9EDEE0","Morning Glory"],["9F381D","Cognac"],["9F821C","Reef Gold"],["9F9F9C","Star Dust"],["9FA0B1","Santas Gray"],["9FD7D3","Sinbad"],["9FDD8C","Feijoa"],["A02712","Tabasco"],["A1750D","Buttered Rum"],["A1ADB5","Hit Gray"],["A1C50A","Citrus"],["A1DAD7","Aqua Island"],["A1E9DE","Water Leaf"],["A2006D","Flirt"],["A23B6C","Rouge"],["A26645","Cape Palliser"],["A2AAB3","Gray Chateau"],["A2AEAB","Edward"],["A3807B","Pharlap"],["A397B4","Amethyst Smoke"],["A3E3ED","Blizzard Blue"],["A4A49D","Delta"],["A4A6D3","Wistful"],["A4AF6E","Green Smoke"],["A50B5E","Jazzberry Jam"],["A59B91","Zorba"],["A5CB0C","Bahia"],["A62F20","Roof Terracotta"],["A65529","Paarl"],["A68B5B","Barley Corn"],["A69279","Donkey Brown"],["A6A29A","Dawn"],["A72525","Mexican Red"],["A7882C","Luxor Gold"],["A85307","Rich Gold"],["A86515","Reno Sand"],["A86B6B","Coral Tree"],["A8989B","Dusty Gray"],["A899E6","Dull Lavender"],["A8A589","Tallow"],["A8AE9C","Bud"],["A8AF8E","Locust"],["A8BD9F","Norway"],["A8E3BD","Chinook"],["A9A491","Gray Olive"],["A9ACB6","Aluminium"],["A9B2C3","Cadet Blue"],["A9B497","Schist"],["A9BDBF","Tower Gray"],["A9BEF2","Perano"],["A9C6C2","Opal"],["AA375A","Night Shadz"],["AA4203","Fire"],["AA8B5B","Muesli"],["AA8D6F","Sandal"],["AAA5A9","Shady Lady"],["AAA9CD","Logan"],["AAABB7","Spun Pearl"],["AAD6E6","Regent St Blue"],["AAF0D1","Magic Mint"],["AB0563","Lipstick"],["AB3472","Royal Heath"],["AB917A","Sandrift"],["ABA0D9","Cold Purple"],["ABA196","Bronco"],["AC8A56","Limed Oak"],["AC91CE","East Side"],["AC9E22","Lemon Ginger"],["ACA494","Napa"],["ACA586","Hillary"],["ACA59F","Cloudy"],["ACACAC","Silver Chalice"],["ACB78E","Swamp Green"],["ACCBB1","Spring Rain"],["ACDD4D","Conifer"],["ACE1AF","Celadon"],["AD781B","Mandalay"],["ADBED1","Casper"],["ADDFAD","Moss Green"],["ADE6C4","Padua"],["ADFF2F","Green Yellow"],["AE4560","Hippie Pink"],["AE6020","Desert"],["AE809E","Bouquet"],["AF4035","Medium Carmine"],["AF4D43","Apple Blossom"],["AF593E","Brown Rust"],["AF8751","Driftwood"],["AF8F2C","Alpine"],["AF9F1C","Lucky"],["AFA09E","Martini"],["AFB1B8","Bombay"],["AFBDD9","Pigeon Post"],["B04C6A","Cadillac"],["B05D54","Matrix"],["B05E81","Tapestry"],["B06608","Mai Tai"],["B09A95","Del Rio"],["B0E0E6","Powder Blue"],["B0E313","Inch Worm"],["B10000","Bright Red"],["B14A0B","Vesuvius"],["B1610B","Pumpkin Skin"],["B16D52","Santa Fe"],["B19461","Teak"],["B1E2C1","Fringy Flower"],["B1F4E7","Ice Cold"],["B20931","Shiraz"],["B2A1EA","Biloba Flower"],["B32D29","Tall Poppy"],["B35213","Fiery Orange"],["B38007","Hot Toddy"],["B3AF95","Taupe Gray"],["B3C110","La Rioja"],["B43332","Well Read"],["B44668","Blush"],["B4CFD3","Jungle Mist"],["B57281","Turkish Rose"],["B57EDC","Lavender"],["B5A27F","Mongoose"],["B5B35C","Olive Green"],["B5D2CE","Jet Stream"],["B5ECDF","Cruise"],["B6316C","Hibiscus"],["B69D98","Thatch"],["B6B095","Heathered Gray"],["B6BAA4","Eagle"],["B6D1EA","Spindle"],["B6D3BF","Gum Leaf"],["B7410E","Rust"],["B78E5C","Muddy Waters"],["B7A214","Sahara"],["B7A458","Husk"],["B7B1B1","Nobel"],["B7C3D0","Heather"],["B7F0BE","Madang"],["B81104","Milano Red"],["B87333","Copper"],["B8B56A","Gimblet"],["B8C1B1","Green Spring"],["B8C25D","Celery"],["B8E0F9","Sail"],["B94E48","Chestnut"],["B95140","Crail"],["B98D28","Marigold"],["B9C46A","Wild Willow"],["B9C8AC","Rainee"],["BA0101","Guardsman Red"],["BA450C","Rock Spray"],["BA6F1E","Bourbon"],["BA7F03","Pirate Gold"],["BAB1A2","Nomad"],["BAC7C9","Submarine"],["BAEEF9","Charlotte"],["BB3385","Medium Red Violet"],["BB8983","Brandy Rose"],["BBD009","Rio Grande"],["BBD7C1","Surf"],["BCC9C2","Powder Ash"],["BD5E2E","Tuscany"],["BD978E","Quicksand"],["BDB1A8","Silk"],["BDB2A1","Malta"],["BDB3C7","Chatelle"],["BDBBD7","Lavender Gray"],["BDBDC6","French Gray"],["BDC8B3","Clay Ash"],["BDC9CE","Loblolly"],["BDEDFD","French Pass"],["BEA6C3","London Hue"],["BEB5B7","Pink Swan"],["BEDE0D","Fuego"],["BF5500","Rose of Sharon"],["BFB8B0","Tide"],["BFBED8","Blue Haze"],["BFC1C2","Silver Sand"],["BFC921","Key Lime Pie"],["BFDBE2","Ziggurat"],["BFFF00","Lime"],["C02B18","Thunderbird"],["C04737","Mojo"],["C08081","Old Rose"],["C0C0C0","Silver"],["C0D3B9","Pale Leaf"],["C0D8B6","Pixie Green"],["C1440E","Tia Maria"],["C154C1","Fuchsia Pink"],["C1A004","Buddha Gold"],["C1B7A4","Bison Hide"],["C1BAB0","Tea"],["C1BECD","Gray Suit"],["C1D7B0","Sprout"],["C1F07C","Sulu"],["C26B03","Indochine"],["C2955D","Twine"],["C2BDB6","Cotton Seed"],["C2CAC4","Pumice"],["C2E8E5","Jagged Ice"],["C32148","Maroon Flush"],["C3B091","Indian Khaki"],["C3BFC1","Pale Slate"],["C3C3BD","Gray Nickel"],["C3CDE6","Periwinkle Gray"],["C3D1D1","Tiara"],["C3DDF9","Tropical Blue"],["C41E3A","Cardinal"],["C45655","Fuzzy Wuzzy Brown"],["C45719","Orange Roughy"],["C4C4BC","Mist Gray"],["C4D0B0","Coriander"],["C4F4EB","Mint Tulip"],["C54B8C","Mulberry"],["C59922","Nugget"],["C5994B","Tussock"],["C5DBCA","Sea Mist"],["C5E17A","Yellow Green"],["C62D42","Brick Red"],["C6726B","Contessa"],["C69191","Oriental Pink"],["C6A84B","Roti"],["C6C3B5","Ash"],["C6C8BD","Kangaroo"],["C6E610","Las Palmas"],["C7031E","Monza"],["C71585","Red Violet"],["C7BCA2","Coral Reef"],["C7C1FF","Melrose"],["C7C4BF","Cloud"],["C7C9D5","Ghost"],["C7CD90","Pine Glade"],["C7DDE5","Botticelli"],["C88A65","Antique Brass"],["C8A2C8","Lilac"],["C8A528","Hokey Pokey"],["C8AABF","Lily"],["C8B568","Laser"],["C8E3D7","Edgewater"],["C96323","Piper"],["C99415","Pizza"],["C9A0DC","Light Wisteria"],["C9B29B","Rodeo Dust"],["C9B35B","Sundance"],["C9B93B","Earls Green"],["C9C0BB","Silver Rust"],["C9D9D2","Conch"],["C9FFA2","Reef"],["C9FFE5","Aero Blue"],["CA3435","Flush Mahogany"],["CABB48","Turmeric"],["CADCD4","Paris White"],["CAE00D","Bitter Lemon"],["CAE6DA","Skeptic"],["CB8FA9","Viola"],["CBCAB6","Foggy Gray"],["CBD3B0","Green Mist"],["CBDBD6","Nebula"],["CC3333","Persian Red"],["CC5500","Burnt Orange"],["CC7722","Ochre"],["CC8899","Puce"],["CCCAA8","Thistle Green"],["CCCCFF","Periwinkle"],["CCFF00","Electric Lime"],["CD5700","Tenn"],["CD5C5C","Chestnut Rose"],["CD8429","Brandy Punch"],["CDF4FF","Onahau"],["CEB98F","Sorrell Brown"],["CEBABA","Cold Turkey"],["CEC291","Yuma"],["CEC7A7","Chino"],["CFA39D","Eunry"],["CFB53B","Old Gold"],["CFDCCF","Tasman"],["CFE5D2","Surf Crest"],["CFF9F3","Humming Bird"],["CFFAF4","Scandal"],["D05F04","Red Stage"],["D06DA1","Hopbush"],["D07D12","Meteor"],["D0BEF8","Perfume"],["D0C0E5","Prelude"],["D0F0C0","Tea Green"],["D18F1B","Geebung"],["D1BEA8","Vanilla"],["D1C6B4","Soft Amber"],["D1D2CA","Celeste"],["D1D2DD","Mischka"],["D1E231","Pear"],["D2691E","Hot Cinnamon"],["D27D46","Raw Sienna"],["D29EAA","Careys Pink"],["D2B48C","Tan"],["D2DA97","Deco"],["D2F6DE","Blue Romance"],["D2F8B0","Gossip"],["D3CBBA","Sisal"],["D3CDC5","Swirl"],["D47494","Charm"],["D4B6AF","Clam Shell"],["D4BF8D","Straw"],["D4C4A8","Akaroa"],["D4CD16","Bird Flower"],["D4D7D9","Iron"],["D4DFE2","Geyser"],["D4E2FC","Hawkes Blue"],["D54600","Grenadier"],["D591A4","Can Can"],["D59A6F","Whiskey"],["D5D195","Winter Hazel"],["D5F6E3","Granny Apple"],["D69188","My Pink"],["D6C562","Tacha"],["D6CEF6","Moon Raker"],["D6D6D1","Quill Gray"],["D6FFDB","Snowy Mint"],["D7837F","New York Pink"],["D7C498","Pavlova"],["D7D0FF","Fog"],["D84437","Valencia"],["D87C63","Japonica"],["D8BFD8","Thistle"],["D8C2D5","Maverick"],["D8FCFA","Foam"],["D94972","Cabaret"],["D99376","Burning Sand"],["D9B99B","Cameo"],["D9D6CF","Timberwolf"],["D9DCC1","Tana"],["D9E4F5","Link Water"],["D9F7FF","Mabel"],["DA3287","Cerise"],["DA5B38","Flame Pea"],["DA6304","Bamboo"],["DA6A41","Red Damask"],["DA70D6","Orchid"],["DA8A67","Copperfield"],["DAA520","Golden Grass"],["DAECD6","Zanah"],["DAF4F0","Iceberg"],["DAFAFF","Oyster Bay"],["DB5079","Cranberry"],["DB9690","Petite Orchid"],["DB995E","Di Serria"],["DBDBDB","Alto"],["DBFFF8","Frosted Mint"],["DC143C","Crimson"],["DC4333","Punch"],["DCB20C","Galliano"],["DCB4BC","Blossom"],["DCD747","Wattle"],["DCD9D2","Westar"],["DCDDCC","Moon Mist"],["DCEDB4","Caper"],["DCF0EA","Swans Down"],["DDD6D5","Swiss Coffee"],["DDF9F1","White Ice"],["DE3163","Cerise Red"],["DE6360","Roman"],["DEA681","Tumbleweed"],["DEBA13","Gold Tips"],["DEC196","Brandy"],["DECBC6","Wafer"],["DED4A4","Sapling"],["DED717","Barberry"],["DEE5C0","Beryl Green"],["DEF5FF","Pattens Blue"],["DF73FF","Heliotrope"],["DFBE6F","Apache"],["DFCD6F","Chenin"],["DFCFDB","Lola"],["DFECDA","Willow Brook"],["DFFF00","Chartreuse Yellow"],["E0B0FF","Mauve"],["E0B646","Anzac"],["E0B974","Harvest Gold"],["E0C095","Calico"],["E0FFFF","Baby Blue"],["E16865","Sunglo"],["E1BC64","Equator"],["E1C0C8","Pink Flare"],["E1E6D6","Periglacial Blue"],["E1EAD4","Kidnapper"],["E1F6E8","Tara"],["E25465","Mandy"],["E2725B","Terracotta"],["E28913","Golden Bell"],["E292C0","Shocking"],["E29418","Dixie"],["E29CD2","Light Orchid"],["E2D8ED","Snuff"],["E2EBED","Mystic"],["E2F3EC","Apple Green"],["E30B5C","Razzmatazz"],["E32636","Alizarin Crimson"],["E34234","Cinnabar"],["E3BEBE","Cavern Pink"],["E3F5E1","Peppermint"],["E3F988","Mindaro"],["E47698","Deep Blush"],["E49B0F","Gamboge"],["E4C2D5","Melanie"],["E4CFDE","Twilight"],["E4D1C0","Bone"],["E4D422","Sunflower"],["E4D5B7","Grain Brown"],["E4D69B","Zombie"],["E4F6E7","Frostee"],["E4FFD1","Snow Flurry"],["E52B50","Amaranth"],["E5841B","Zest"],["E5CCC9","Dust Storm"],["E5D7BD","Stark White"],["E5D8AF","Hampton"],["E5E0E1","Bon Jour"],["E5E5E5","Mercury"],["E5F9F6","Polar"],["E64E03","Trinidad"],["E6BE8A","Gold Sand"],["E6BEA5","Cashmere"],["E6D7B9","Double Spanish White"],["E6E4D4","Satin Linen"],["E6F2EA","Harp"],["E6F8F3","Off Green"],["E6FFE9","Hint of Green"],["E6FFFF","Tranquil"],["E77200","Mango Tango"],["E7730A","Christine"],["E79F8C","Tonys Pink"],["E79FC4","Kobi"],["E7BCB4","Rose Fog"],["E7BF05","Corn"],["E7CD8C","Putty"],["E7ECE6","Gray Nurse"],["E7F8FF","Lily White"],["E7FEFF","Bubbles"],["E89928","Fire Bush"],["E8B9B3","Shilo"],["E8E0D5","Pearl Bush"],["E8EBE0","Green White"],["E8F1D4","Chrome White"],["E8F2EB","Gin"],["E8F5F2","Aqua Squeeze"],["E96E00","Clementine"],["E97451","Burnt Sienna"],["E97C07","Tahiti Gold"],["E9CECD","Oyster Pink"],["E9D75A","Confetti"],["E9E3E3","Ebb"],["E9F8ED","Ottoman"],["E9FFFD","Clear Day"],["EA88A8","Carissma"],["EAAE69","Porsche"],["EAB33B","Tulip Tree"],["EAC674","Rob Roy"],["EADAB8","Raffia"],["EAE8D4","White Rock"],["EAF6EE","Panache"],["EAF6FF","Solitude"],["EAF9F5","Aqua Spring"],["EAFFFE","Dew"],["EB9373","Apricot"],["EBC2AF","Zinnwaldite"],["ECA927","Fuel Yellow"],["ECC54E","Ronchi"],["ECC7EE","French Lilac"],["ECCDB9","Just Right"],["ECE090","Wild Rice"],["ECEBBD","Fall Green"],["ECEBCE","Aths Special"],["ECF245","Starship"],["ED0A3F","Red Ribbon"],["ED7A1C","Tango"],["ED9121","Carrot Orange"],["ED989E","Sea Pink"],["EDB381","Tacao"],["EDC9AF","Desert Sand"],["EDCDAB","Pancho"],["EDDCB1","Chamois"],["EDEA99","Primrose"],["EDF5DD","Frost"],["EDF5F5","Aqua Haze"],["EDF6FF","Zumthor"],["EDF9F1","Narvik"],["EDFC84","Honeysuckle"],["EE82EE","Lavender Magenta"],["EEC1BE","Beauty Bush"],["EED794","Chalky"],["EED9C4","Almond"],["EEDC82","Flax"],["EEDEDA","Bizarre"],["EEE3AD","Double Colonial White"],["EEEEE8","Cararra"],["EEEF78","Manz"],["EEF0C8","Tahuna Sands"],["EEF0F3","Athens Gray"],["EEF3C3","Tusk"],["EEF4DE","Loafer"],["EEF6F7","Catskill White"],["EEFDFF","Twilight Blue"],["EEFF9A","Jonquil"],["EEFFE2","Rice Flower"],["EF863F","Jaffa"],["EFEFEF","Gallery"],["EFF2F3","Porcelain"],["F091A9","Mauvelous"],["F0D52D","Golden Dream"],["F0DB7D","Golden Sand"],["F0DC82","Buff"],["F0E2EC","Prim"],["F0E68C","Khaki"],["F0EEFD","Selago"],["F0EEFF","Titan White"],["F0F8FF","Alice Blue"],["F0FCEA","Feta"],["F18200","Gold Drop"],["F19BAB","Wewak"],["F1E788","Sahara Sand"],["F1E9D2","Parchment"],["F1E9FF","Blue Chalk"],["F1EEC1","Mint Julep"],["F1F1F1","Seashell"],["F1F7F2","Saltpan"],["F1FFAD","Tidal"],["F1FFC8","Chiffon"],["F2552A","Flamingo"],["F28500","Tangerine"],["F2C3B2","Mandys Pink"],["F2F2F2","Concrete"],["F2FAFA","Black Squeeze"],["F34723","Pomegranate"],["F3AD16","Buttercup"],["F3D69D","New Orleans"],["F3D9DF","Vanilla Ice"],["F3E7BB","Sidecar"],["F3E9E5","Dawn Pink"],["F3EDCF","Wheatfield"],["F3FB62","Canary"],["F3FBD4","Orinoco"],["F3FFD8","Carla"],["F400A1","Hollywood Cerise"],["F4A460","Sandy brown"],["F4C430","Saffron"],["F4D81C","Ripe Lemon"],["F4EBD3","Janna"],["F4F2EE","Pampas"],["F4F4F4","Wild Sand"],["F4F8FF","Zircon"],["F57584","Froly"],["F5C85C","Cream Can"],["F5C999","Manhattan"],["F5D5A0","Maize"],["F5DEB3","Wheat"],["F5E7A2","Sandwisp"],["F5E7E2","Pot Pourri"],["F5E9D3","Albescent White"],["F5EDEF","Soft Peach"],["F5F3E5","Ecru White"],["F5F5DC","Beige"],["F5FB3D","Golden Fizz"],["F5FFBE","Australian Mint"],["F64A8A","French Rose"],["F653A6","Brilliant Rose"],["F6A4C9","Illusion"],["F6F0E6","Merino"],["F6F7F7","Black Haze"],["F6FFDC","Spring Sun"],["F7468A","Violet Red"],["F77703","Chilean Fire"],["F77FBE","Persian Pink"],["F7B668","Rajah"],["F7C8DA","Azalea"],["F7DBE6","We Peep"],["F7F2E1","Quarter Spanish White"],["F7F5FA","Whisper"],["F7FAF7","Snow Drift"],["F8B853","Casablanca"],["F8C3DF","Chantilly"],["F8D9E9","Cherub"],["F8DB9D","Marzipan"],["F8DD5C","Energy Yellow"],["F8E4BF","Givry"],["F8F0E8","White Linen"],["F8F4FF","Magnolia"],["F8F6F1","Spring Wood"],["F8F7DC","Coconut Cream"],["F8F7FC","White Lilac"],["F8F8F7","Desert Storm"],["F8F99C","Texas"],["F8FACD","Corn Field"],["F8FDD3","Mimosa"],["F95A61","Carnation"],["F9BF58","Saffron Mango"],["F9E0ED","Carousel Pink"],["F9E4BC","Dairy Cream"],["F9E663","Portica"],["F9EAF3","Amour"],["F9F8E4","Rum Swizzle"],["F9FF8B","Dolly"],["F9FFF6","Sugar Cane"],["FA7814","Ecstasy"],["FA9D5A","Tan Hide"],["FAD3A2","Corvette"],["FADFAD","Peach Yellow"],["FAE600","Turbo"],["FAEAB9","Astra"],["FAECCC","Champagne"],["FAF0E6","Linen"],["FAF3F0","Fantasy"],["FAF7D6","Citrine White"],["FAFAFA","Alabaster"],["FAFDE4","Hint of Yellow"],["FAFFA4","Milan"],["FB607F","Brink Pink"],["FB8989","Geraldine"],["FBA0E3","Lavender Rose"],["FBA129","Sea Buckthorn"],["FBAC13","Sun"],["FBAED2","Lavender Pink"],["FBB2A3","Rose Bud"],["FBBEDA","Cupid"],["FBCCE7","Classic Rose"],["FBCEB1","Apricot Peach"],["FBE7B2","Banana Mania"],["FBE870","Marigold Yellow"],["FBE96C","Festival"],["FBEA8C","Sweet Corn"],["FBEC5D","Candy Corn"],["FBF9F9","Hint of Red"],["FBFFBA","Shalimar"],["FC0FC0","Shocking Pink"],["FC80A5","Tickle Me Pink"],["FC9C1D","Tree Poppy"],["FCC01E","Lightning Yellow"],["FCD667","Goldenrod"],["FCD917","Candlelight"],["FCDA98","Cherokee"],["FCF4D0","Double Pearl Lusta"],["FCF4DC","Pearl Lusta"],["FCF8F7","Vista White"],["FCFBF3","Bianca"],["FCFEDA","Moon Glow"],["FCFFE7","China Ivory"],["FCFFF9","Ceramic"],["FD0E35","Torch Red"],["FD5B78","Wild Watermelon"],["FD7B33","Crusta"],["FD7C07","Sorbus"],["FD9FA2","Sweet Pink"],["FDD5B1","Light Apricot"],["FDD7E4","Pig Pink"],["FDE1DC","Cinderella"],["FDE295","Golden Glow"],["FDE910","Lemon"],["FDF5E6","Old Lace"],["FDF6D3","Half Colonial White"],["FDF7AD","Drover"],["FDFEB8","Pale Prim"],["FDFFD5","Cumulus"],["FE28A2","Persian Rose"],["FE4C40","Sunset Orange"],["FE6F5E","Bittersweet"],["FE9D04","California"],["FEA904","Yellow Sea"],["FEBAAD","Melon"],["FED33C","Bright Sun"],["FED85D","Dandelion"],["FEDB8D","Salomie"],["FEE5AC","Cape Honey"],["FEEBF3","Remy"],["FEEFCE","Oasis"],["FEF0EC","Bridesmaid"],["FEF2C7","Beeswax"],["FEF3D8","Bleach White"],["FEF4CC","Pipi"],["FEF4DB","Half Spanish White"],["FEF4F8","Wisp Pink"],["FEF5F1","Provincial Pink"],["FEF7DE","Half Dutch White"],["FEF8E2","Solitaire"],["FEF8FF","White Pointer"],["FEF9E3","Off Yellow"],["FEFCED","Orange White"],["FF0000","Red"],["FF007F","Rose"],["FF00CC","Purple Pizzazz"],["FF00FF","Magenta / Fuchsia"],["FF2400","Scarlet"],["FF3399","Wild Strawberry"],["FF33CC","Razzle Dazzle Rose"],["FF355E","Radical Red"],["FF3F34","Red Orange"],["FF4040","Coral Red"],["FF4D00","Vermilion"],["FF4F00","International Orange"],["FF6037","Outrageous Orange"],["FF6600","Blaze Orange"],["FF66FF","Pink Flamingo"],["FF681F","Orange"],["FF69B4","Hot Pink"],["FF6B53","Persimmon"],["FF6FFF","Blush Pink"],["FF7034","Burning Orange"],["FF7518","Pumpkin"],["FF7D07","Flamenco"],["FF7F00","Flush Orange"],["FF7F50","Coral"],["FF8C69","Salmon"],["FF9000","Pizazz"],["FF910F","West Side"],["FF91A4","Pink Salmon"],["FF9933","Neon Carrot"],["FF9966","Atomic Tangerine"],["FF9980","Vivid Tangerine"],["FF9E2C","Sunshade"],["FFA000","Orange Peel"],["FFA194","Mona Lisa"],["FFA500","Web Orange"],["FFA6C9","Carnation Pink"],["FFAB81","Hit Pink"],["FFAE42","Yellow Orange"],["FFB0AC","Cornflower Lilac"],["FFB1B3","Sundown"],["FFB31F","My Sin"],["FFB555","Texas Rose"],["FFB7D5","Cotton Candy"],["FFB97B","Macaroni and Cheese"],["FFBA00","Selective Yellow"],["FFBD5F","Koromiko"],["FFBF00","Amber"],["FFC0A8","Wax Flower"],["FFC0CB","Pink"],["FFC3C0","Your Pink"],["FFC901","Supernova"],["FFCBA4","Flesh"],["FFCC33","Sunglow"],["FFCC5C","Golden Tainoi"],["FFCC99","Peach Orange"],["FFCD8C","Chardonnay"],["FFD1DC","Pastel Pink"],["FFD2B7","Romantic"],["FFD38C","Grandis"],["FFD700","Gold"],["FFD800","School bus Yellow"],["FFD8D9","Cosmos"],["FFDB58","Mustard"],["FFDCD6","Peach Schnapps"],["FFDDAF","Caramel"],["FFDDCD","Tuft Bush"],["FFDDCF","Watusi"],["FFDDF4","Pink Lace"],["FFDEAD","Navajo White"],["FFDEB3","Frangipani"],["FFE1DF","Pippin"],["FFE1F2","Pale Rose"],["FFE2C5","Negroni"],["FFE5A0","Cream Brulee"],["FFE5B4","Peach"],["FFE6C7","Tequila"],["FFE772","Kournikova"],["FFEAC8","Sandy Beach"],["FFEAD4","Karry"],["FFEC13","Broom"],["FFEDBC","Colonial White"],["FFEED8","Derby"],["FFEFA1","Vis Vis"],["FFEFC1","Egg White"],["FFEFD5","Papaya Whip"],["FFEFEC","Fair Pink"],["FFF0DB","Peach Cream"],["FFF0F5","Lavender blush"],["FFF14F","Gorse"],["FFF1B5","Buttermilk"],["FFF1D8","Pink Lady"],["FFF1EE","Forget Me Not"],["FFF1F9","Tutu"],["FFF39D","Picasso"],["FFF3F1","Chardon"],["FFF46E","Paris Daisy"],["FFF4CE","Barley White"],["FFF4DD","Egg Sour"],["FFF4E0","Sazerac"],["FFF4E8","Serenade"],["FFF4F3","Chablis"],["FFF5EE","Seashell Peach"],["FFF5F3","Sauvignon"],["FFF6D4","Milk Punch"],["FFF6DF","Varden"],["FFF6F5","Rose White"],["FFF8D1","Baja White"],["FFF9E2","Gin Fizz"],["FFF9E6","Early Dawn"],["FFFACD","Lemon Chiffon"],["FFFAF4","Bridal Heath"],["FFFBDC","Scotch Mist"],["FFFBF9","Soapstone"],["FFFC99","Witch Haze"],["FFFCEA","Buttery White"],["FFFCEE","Island Spice"],["FFFDD0","Cream"],["FFFDE6","Chilean Heath"],["FFFDE8","Travertine"],["FFFDF3","Orchid White"],["FFFDF4","Quarter Pearl Lusta"],["FFFEE1","Half and Half"],["FFFEEC","Apricot White"],["FFFEF0","Rice Cake"],["FFFEF6","Black White"],["FFFEFD","Romance"],["FFFF00","Yellow"],["FFFF66","Laser Lemon"],["FFFF99","Pale Canary"],["FFFFB4","Portafino"],["FFFFF0","Ivory"],["FFFFFF","White"]];const YN=fi(VN),Rx=(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}}},XN={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},qN=e=>Rx(XN[e.toLowerCase()],6),JN=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,QN=e=>{let t;return(t=e.match(JN))?Rx(parseInt(t[1],16),t[1].length):void 0},fr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ga=`${fr}%`,Zh=`(?:${fr}%|${fr})`,ZN=`(?:${fr}(deg|grad|rad|turn)|${fr})`,ai="\\s*,\\s*",eI=new RegExp(`^rgba?\\(\\s*${fr}${ai}${fr}${ai}${fr}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),tI=new RegExp(`^rgba?\\(\\s*${ga}${ai}${ga}${ai}${ga}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),nI=e=>{let t={mode:"rgb"},n;if(n=e.match(eI))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(tI))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},Ls=(e,t)=>e===void 0?void 0:typeof e!="object"?Mu(e):e.mode!==void 0?e:t?q(z({},e),{mode:t}):void 0,nn=(e="rgb")=>t=>(t=Ls(t,e))!==void 0?t.mode===e?t:wn[t.mode][e]?wn[t.mode][e](t):e==="rgb"?wn[t.mode].rgb(t):wn.rgb[e](wn[t.mode].rgb(t)):void 0,wn={},Nx={},zs=[],Ix={},rI=e=>e,be=e=>(wn[e.mode]=z(z({},wn[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{wn[t]||(wn[t]={}),wn[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=rI)}),Nx[e.mode]=e,(e.parse||[]).forEach(t=>{oI(t,e.mode)}),nn(e.mode)),Pu=e=>Nx[e],oI=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Ix[e]=t}else typeof e=="function"&&zs.indexOf(e)<0&&zs.push(e)},Vd=/[^\x00-\x7F]|[a-zA-Z_]/,iI=/[^\x00-\x7F]|[-\w]/,I={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Z=0;function Rl(e){let t=e[Z],n=e[Z+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Z+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Kd(e){if(Z>=e.length)return!1;let t=e[Z];if(Vd.test(t))return!0;if(t==="-"){if(e.length-Z<2)return!1;let n=e[Z+1];return!!(n==="-"||Vd.test(n))}return!1}const aI={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ji(e){let t="";if((e[Z]==="-"||e[Z]==="+")&&(t+=e[Z++]),t+=Nl(e),e[Z]==="."&&/\d/.test(e[Z+1])&&(t+=e[Z++]+Nl(e)),(e[Z]==="e"||e[Z]==="E")&&((e[Z+1]==="-"||e[Z+1]==="+")&&/\d/.test(e[Z+2])?t+=e[Z++]+e[Z++]+Nl(e):/\d/.test(e[Z+1])&&(t+=e[Z++]+Nl(e))),Kd(e)){let n=js(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:I.Hue,value:t*aI[n]}:void 0}return e[Z]==="%"?(Z++,{type:I.Percentage,value:+t}):{type:I.Number,value:+t}}function Nl(e){let t="";for(;/\d/.test(e[Z]);)t+=e[Z++];return t}function js(e){let t="";for(;Z4)){if(n.length===4){if(n[3].type!==I.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:I.None,value:void 0}),n.every(o=>o.type!==I.Alpha)?n:void 0}}function cI(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==I.Function)return;let r=Lx(e,t);if(r)return r.unshift(n.value),r}const Ou=e=>{if(typeof e!="string")return;const t=sI(e),n=t?cI(t,!0):void 0;let r,o=0,i=js.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,pI=(e,t,n)=>e+n*(t-e),hI=e=>{let t=[];for(let n=0;nt=>{let n=hI(t);return r=>{let o=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(o),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],o-i)}},W=gI(pI),qe=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},Ei={mode:"rgb",channels:["r","g","b","alpha"],parse:[fI,QN,nI,qN,dI,"srgb"],serialize:"srgb",interpolate:{r:W,g:W,b:W,alpha:{use:W,fixup:qe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},rf=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),k1=e=>{let t=rf(e.r),n=rf(e.g),r=rf(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},of=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),A1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"a98",r:of(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:of(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:of(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},af=(e=0)=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Fi=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:af(e),g:af(t),b:af(n)};return r!==void 0&&(o.alpha=r),o},ao=e=>{let{r:t,g:n,b:r,alpha:o}=Fi(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},lf=(e=0)=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},ki=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:lf(e),g:lf(t),b:lf(n)};return r!==void 0&&(i.alpha=r),i},lo=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=ki({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},mI=q(z({},Ei),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>A1(ao(e)),xyz65:A1},toMode:{rgb:e=>lo(k1(e)),xyz65:k1}}),ct=e=>(e=e%360)<0?e+360:e,vI=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=ct(n);return r===0||e[r-1]===void 0?i:t(i-ct(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),Gn=e=>vI(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),tt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],yI=Math.PI/180,bI=180/Math.PI;let $1=tt[3]*tt[4],D1=tt[1]*tt[4],_1=tt[1]*tt[2]-tt[0]*tt[3];const wI=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(_1*n+e*$1-t*D1)/(_1+$1-D1),i=n-o,a=(tt[4]*(t-o)-tt[2]*i)/tt[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+a*a)/(tt[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(a,i)*bI-120),r!==void 0&&(l.alpha=r),l},xI=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*yI,n===void 0&&(n=0);let i=t===void 0?0:t*n*(1-n),a=Math.cos(e),l=Math.sin(e);return o.r=n+i*(tt[0]*a+tt[1]*l),o.g=n+i*(tt[2]*a+tt[3]*l),o.b=n+i*(tt[4]*a+tt[5]*l),r!==void 0&&(o.alpha=r),o},Ru=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=ct(e.h),r=ct(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},CI=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=ct(e.h),r=ct(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},Nu=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=ct(e.h),r=ct(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},Wn=e=>{let t=e.reduce((r,o)=>{if(o!==void 0){let i=o*Math.PI/180;r.sin+=Math.sin(i),r.cos+=Math.cos(i)}return r},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},SI={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:wI},toMode:{rgb:xI},interpolate:{h:{use:W,fixup:Gn},s:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}},br=({l:e,a:t,b:n,alpha:r},o="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:o,l:e,c:i};return i&&(a.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},wr=({l:e,c:t,h:n,alpha:r},o="lab")=>{n===void 0&&(n=0);let i={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},zx=Math.pow(29,3)/Math.pow(3,3),jx=Math.pow(6,3)/Math.pow(29,3),Ue={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},qo={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let sf=e=>Math.pow(e,3)>jx?Math.pow(e,3):(116*e-16)/zx;const Hx=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,i=t/500+o,a=o-n/200,l={mode:"xyz65",x:sf(i)*qo.X,y:sf(o)*qo.Y,z:sf(a)*qo.Z};return r!==void 0&&(l.alpha=r),l},Iu=e=>lo(Hx(e)),uf=e=>e>jx?Math.cbrt(e):(zx*e+16)/116,Gx=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=uf(e/qo.X),i=uf(t/qo.Y),a=uf(n/qo.Z),l={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},Lu=e=>{let t=Gx(ao(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Gs=1,Wx=1,La=26/180*Math.PI,Ws=Math.cos(La),Us=Math.sin(La),Ux=100/Math.log(139/100),Yd=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"lab65",l:(Math.exp(e*Gs/Ux)-1)/.0039},i=(Math.exp(.0435*t*Wx*Gs)-1)/.075,a=i*Math.cos(n/180*Math.PI-La),l=i*Math.sin(n/180*Math.PI-La);return o.a=a*Ws-l/.83*Us,o.b=a*Us+l/.83*Ws,r!==void 0&&(o.alpha=r),o},Xd=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=t*Ws+n*Us,i=.83*(n*Ws-t*Us),a=Math.sqrt(o*o+i*i),l={mode:"dlch",l:Ux/Gs*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*Wx*Gs)};return l.c&&(l.h=ct((Math.atan2(i,o)+La)/Math.PI*180)),r!==void 0&&(l.alpha=r),l},T1=e=>Yd(br(e,"dlch")),B1=e=>wr(Xd(e),"dlab"),EI={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:T1,rgb:e=>Iu(T1(e))},fromMode:{lab65:B1,rgb:e=>B1(Lu(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:W,a:W,b:W,alpha:{use:W,fixup:qe}}},FI={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Yd,dlab:e=>wr(e,"dlab"),rgb:e=>Iu(Yd(e))},fromMode:{lab65:Xd,dlab:e=>br(e,"dlch"),rgb:e=>Xd(Lu(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:W,c:W,h:{use:W,fixup:Gn},alpha:{use:W,fixup:qe}},difference:{h:Nu},average:{h:Wn}};function kI({h:e,s:t,i:n,alpha:r}){e=ct(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function AI({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),i=Math.min(e,t,n),a={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return o-i!==0&&(a.h=(o===e?(t-n)/(o-i)+(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}},BI=new RegExp(`^hsla?\\(\\s*${ZN}${ii}${ga}${ii}${ga}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),PI=e=>{let t=e.match(BI);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=TI(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n};function MI(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Percentage)return;n.h=r.value}if(o.type!==I.None){if(o.type===I.Hue)return;n.s=o.value/100}if(i.type!==I.None){if(i.type===I.Hue)return;n.l=i.value/100}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const Vx={mode:"hsl",toMode:{rgb:DI},fromMode:{rgb:_I},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[MI,PI],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:W,fixup:Gn},s:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}};function Kx({h:e,s:t,v:n,alpha:r}){e=ct(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:i={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:i={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:i={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Yx({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),i=Math.min(e,t,n),a={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(a.h=(o===e?(t-n)/(o-i)+(t1){let o=t+n;t/=o,n/=o}return Kx({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function RI(e){let t=Yx(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,r=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-n)*r,b:1-r};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function NI(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Percentage)return;n.h=r.value}if(o.type!==I.None){if(o.type===I.Hue)return;n.w=o.value/100}if(i.type!==I.None){if(i.type===I.Hue)return;n.b=i.value/100}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const II={mode:"hwb",toMode:{rgb:OI},fromMode:{rgb:RI},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[NI],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:W,fixup:Gn},w:W,b:W,alpha:{use:W,fixup:qe}},difference:{h:CI},average:{h:Wn}},qx=203,zu=.1593017578125,Jx=78.84375,ju=.8359375,Hu=18.8515625,Gu=18.6875;function cf(e){if(e<0)return 0;const t=Math.pow(e,1/Jx);return 1e4*Math.pow(Math.max(0,t-ju)/(Hu-Gu*t),1/zu)}function ff(e){if(e<0)return 0;const t=Math.pow(e/1e4,zu);return Math.pow((ju+Hu*t)/(1+Gu*t),Jx)}const df=e=>Math.max(e/qx,0),P1=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=cf(e+.008609037037932761*t+.11102962500302593*n),i=cf(e-.00860903703793275*t-.11102962500302599*n),a=cf(e+.5600313357106791*t-.32062717498731885*n),l={mode:"xyz65",x:df(2.070152218389422*o-1.3263473389671556*i+.2066510476294051*a),y:df(.3647385209748074*o+.680566024947227*i-.0453045459220346*a),z:df(-.049747207535812*o-.0492609666966138*i+1.1880659249923042*a)};return r!==void 0&&(l.alpha=r),l},pf=(e=0)=>Math.max(e*qx,0),M1=({x:e,y:t,z:n,alpha:r})=>{const o=pf(e),i=pf(t),a=pf(n),l=ff(.3592832590121217*o+.6976051147779502*i-.0358915932320289*a),s=ff(-.1920808463704995*o+1.1004767970374323*i+.0753748658519118*a),u=ff(.0070797844607477*o+.0748396662186366*i+.8433265453898765*a),c=.5*l+.5*s,d=1.61376953125*l-3.323486328125*s+1.709716796875*u,p=4.378173828125*l-4.24560546875*s-.132568359375*u,h={mode:"itp",i:c,t:d,p};return r!==void 0&&(h.alpha=r),h},LI={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:P1,rgb:e=>lo(P1(e))},fromMode:{xyz65:M1,rgb:e=>M1(ao(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:W,t:W,p:W,alpha:{use:W,fixup:qe}}},zI=134.03437499999998,jI=16295499532821565e-27,hf=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,zu);return Math.pow((ju+Hu*t)/(1+Gu*t),zI)},gf=(e=0)=>Math.max(e*203,0),Qx=({x:e,y:t,z:n,alpha:r})=>{e=gf(e),t=gf(t),n=gf(n);let o=1.15*e-.15*n,i=.66*t+.34*e,a=hf(.41478972*o+.579999*i+.014648*n),l=hf(-.20151*o+1.120649*i+.0531008*n),s=hf(-.0166008*o+.2648*i+.6684799*n),u=(a+l)/2,c={mode:"jab",j:.44*u/(1-.56*u)-jI,a:3.524*a-4.066708*l+.542708*s,b:.199076*a+1.096799*l-1.295875*s};return r!==void 0&&(c.alpha=r),c},HI=134.03437499999998,O1=16295499532821565e-27,mf=e=>{if(e<0)return 0;let t=Math.pow(e,1/HI);return 1e4*Math.pow((ju-t)/(Gu*t-Hu),1/zu)},vf=e=>e/203,Zx=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+O1)/(.44+.56*(e+O1)),i=mf(o+.13860504*t+.058047316*n),a=mf(o-.13860504*t-.058047316*n),l=mf(o-.096019242*t-.8118919*n),s={mode:"xyz65",x:vf(1.661373024652174*i-.914523081304348*a+.23136208173913045*l),y:vf(-.3250758611844533*i+1.571847026732543*a-.21825383453227928*l),z:vf(-.090982811*i-.31272829*a+1.5227666*l)};return r!==void 0&&(s.alpha=r),s},e2=e=>{let t=Qx(ao(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},t2=e=>lo(Zx(e)),GI={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:e2,xyz65:Qx},toMode:{rgb:t2,xyz65:Zx},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:W,a:W,b:W,alpha:{use:W,fixup:qe}}},R1=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:o};return o&&(i.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},N1=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},WI={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:N1,rgb:e=>t2(N1(e))},fromMode:{rgb:e=>R1(e2(e)),jab:R1},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:W,fixup:Gn},c:W,j:W,alpha:{use:W,fixup:qe}},difference:{h:Nu},average:{h:Wn}},Wu=Math.pow(29,3)/Math.pow(3,3),e0=Math.pow(6,3)/Math.pow(29,3);let yf=e=>Math.pow(e,3)>e0?Math.pow(e,3):(116*e-16)/Wu;const t0=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,i=t/500+o,a=o-n/200,l={mode:"xyz50",x:yf(i)*Ue.X,y:yf(o)*Ue.Y,z:yf(a)*Ue.Z};return r!==void 0&&(l.alpha=r),l},tl=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=ki({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},n2=e=>tl(t0(e)),nl=e=>{let{r:t,g:n,b:r,alpha:o}=Fi(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},bf=e=>e>e0?Math.cbrt(e):(Wu*e+16)/116,n0=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=bf(e/Ue.X),i=bf(t/Ue.Y),a=bf(n/Ue.Z),l={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},r2=e=>{let t=n0(nl(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function UI(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,a]=t;if(!(r.type===I.Hue||o.type===I.Hue||i.type===I.Hue))return r.type!==I.None&&(n.l=Math.min(Math.max(0,r.value),100)),o.type!==I.None&&(n.a=o.type===I.Number?o.value:o.value*125/100),i.type!==I.None&&(n.b=i.type===I.Number?i.value:i.value*125/100),a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const r0={mode:"lab",toMode:{xyz50:t0,rgb:n2},fromMode:{xyz50:n0,rgb:r2},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[UI],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:W,a:W,b:W,alpha:{use:W,fixup:qe}}},VI=q(z({},r0),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Hx,rgb:Iu},fromMode:{xyz65:Gx,rgb:Lu},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}});function KI(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(o.type!==I.None&&(n.c=Math.max(0,o.type===I.Number?o.value:o.value*150/100)),i.type!==I.None){if(i.type===I.Percentage)return;n.h=i.value}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const o0={mode:"lch",toMode:{lab:wr,rgb:e=>n2(wr(e))},fromMode:{rgb:e=>br(r2(e)),lab:br},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[KI],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:W,fixup:Gn},c:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Nu},average:{h:Wn}},YI=q(z({},o0),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>wr(e,"lab65"),rgb:e=>Iu(wr(e,"lab65"))},fromMode:{rgb:e=>br(Lu(e),"lch65"),lab65:e=>br(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),o2=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:o};return o&&(i.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},i2=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},a2=(e,t,n)=>4*e/(e+15*t+3*n),l2=(e,t,n)=>9*t/(e+15*t+3*n),XI=a2(Ue.X,Ue.Y,Ue.Z),qI=l2(Ue.X,Ue.Y,Ue.Z),JI=e=>e<=e0?Wu*e:116*Math.cbrt(e)-16,qd=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=JI(t/Ue.Y),i=a2(e,t,n),a=l2(e,t,n);!isFinite(i)||!isFinite(a)?o=i=a=0:(i=13*o*(i-XI),a=13*o*(a-qI));let l={mode:"luv",l:o,u:i,v:a};return r!==void 0&&(l.alpha=r),l},QI=(e,t,n)=>4*e/(e+15*t+3*n),ZI=(e,t,n)=>9*t/(e+15*t+3*n),eL=QI(Ue.X,Ue.Y,Ue.Z),tL=ZI(Ue.X,Ue.Y,Ue.Z),Jd=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let o=t/(13*e)+eL,i=n/(13*e)+tL,a=Ue.Y*(e<=8?e/Wu:Math.pow((e+16)/116,3)),l=a*(9*o)/(4*i),s=a*(12-3*o-20*i)/(4*i),u={mode:"xyz50",x:l,y:a,z:s};return r!==void 0&&(u.alpha=r),u},nL=e=>o2(qd(nl(e))),rL=e=>tl(Jd(i2(e))),oL={mode:"lchuv",toMode:{luv:i2,rgb:rL},fromMode:{rgb:nL,luv:o2},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:W,fixup:Gn},c:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Nu},average:{h:Wn}},iL=q(z({},Ei),{mode:"lrgb",toMode:{rgb:ki},fromMode:{rgb:Fi},parse:["srgb-linear"],serialize:"srgb-linear"}),aL={mode:"luv",toMode:{xyz50:Jd,rgb:e=>tl(Jd(e))},fromMode:{xyz50:qd,rgb:e=>qd(nl(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:W,u:W,v:W,alpha:{use:W,fixup:qe}}},s2=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),a=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),l={mode:"oklab",l:.2104542553*o+.793617785*i-.0040720468*a,a:1.9779984951*o-2.428592205*i+.4505937099*a,b:.0259040371*o+.7827717662*i-.808675766*a};return r!==void 0&&(l.alpha=r),l},Uu=e=>{let t=s2(Fi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},rl=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n,3),i=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n,3),a=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*i+.230969928729428*a,g:-1.2684380040921763*o+2.6097574006633715*i-.3413193963102197*a,b:-.004196086541837188*o-.7034186144594493*i+1.7076147009309444*a};return r!==void 0&&(l.alpha=r),l},Vu=e=>ki(rl(e));function Qd(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Vs(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function lL(e,t){let n,r,o,i,a,l,s,u;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,i=.75515197,a=.56771245,l=4.0767416621,s=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,i=.1254107,a=.14503204,l=-1.2684380046,s=2.6097574011,u=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,a=.00692167,l=-.0041960863,s=-.7034186147,u=1.707614701);let c=n+r*e+o*t+i*e*e+a*e*t,d=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let m=1+c*d,y=1+c*p,E=1+c*h,g=m*m*m,v=y*y*y,b=E*E*E,F=3*d*m*m,D=3*p*y*y,$=3*h*E*E,_=6*d*d*m,T=6*p*p*y,B=6*h*h*E,P=l*g+s*v+u*b,L=l*F+s*D+u*$,K=l*_+s*T+u*B;c=c-P*L/(L*L-.5*P*K)}return c}function i0(e,t){let n=lL(e,t),r=rl({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*n;return[o,i]}function sL(e,t,n,r,o,i=null){i||(i=i0(e,t));let a;if((n-o)*i[1]-(i[0]-o)*r<=0)a=i[1]*o/(r*i[0]+i[1]*(o-n));else{a=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-n));{let l=n-o,s=r,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t,p=l+s*u,h=l+s*c,m=l+s*d;{let y=o*(1-a)+a*n,E=a*r,g=y+E*u,v=y+E*c,b=y+E*d,F=g*g*g,D=v*v*v,$=b*b*b,_=3*p*g*g,T=3*h*v*v,B=3*m*b*b,P=6*p*p*g,L=6*h*h*v,K=6*m*m*b,X=4.0767416621*F-3.3077115913*D+.2309699292*$-1,pe=4.0767416621*_-3.3077115913*T+.2309699292*B,oe=4.0767416621*P-3.3077115913*L+.2309699292*K,ye=pe/(pe*pe-.5*X*oe),Le=-X*ye,N=-1.2684380046*F+2.6097574011*D-.3413193965*$-1,Q=-1.2684380046*_+2.6097574011*T-.3413193965*B,G=-1.2684380046*P+2.6097574011*L-.3413193965*K,re=Q/(Q*Q-.5*N*G),U=-N*re,le=-.0041960863*F-.7034186147*D+1.707614701*$-1,he=-.0041960863*_-.7034186147*T+1.707614701*B,Se=-.0041960863*P-.7034186147*L+1.707614701*K,ge=he/(he*he-.5*le*Se),ze=-le*ge;Le=ye>=0?Le:1e6,U=re>=0?U:1e6,ze=ge>=0?ze:1e6,a+=Math.min(Le,Math.min(U,ze))}}}return a}function a0(e,t,n=null){n||(n=i0(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function u2(e,t,n){let r=i0(t,n),o=sL(t,n,e,1,e,r),i=a0(t,n,r),a=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),s=o/Math.min(e*i[0],(1-e)*i[1]),u=e*a,c=(1-e)*l,d=.9*s*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),d,o]}function I1(e){const t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Qd(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let i=Math.sqrt(n*n+r*r);if(!i)return o.s=0,o;let[a,l,s]=u2(t,n/i,r/i),u;if(iI1(Uu(e))},toMode:{oklab:L1,rgb:e=>Vu(L1(e))}});function z1(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o=Math.sqrt(n*n+r*r),i=o?n/o:1,a=o?r/o:1,[l,s]=a0(i,a),u=.5,c=1-u/l,d=s/(o+t*s),p=d*t,h=d*o,m=Vs(p),y=h*m/p,E=rl({l:m,a:i*y,b:a*y}),g=Math.cbrt(1/Math.max(E.r,E.g,E.b,0));t=t/g,o=o/g*Qd(t)/t,t=Qd(t);const v={mode:"okhsv",s:o?(u+s)*h/(s*u+s*c*h):0,v:t?t/p:0};return v.s&&(v.h=ct(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function j1(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,i=Math.cos(n/180*Math.PI),a=Math.sin(n/180*Math.PI),[l,s]=a0(i,a),u=.5,c=1-u/l,d=1-r*u/(u+s-s*c*r),p=r*s*u/(u+s-s*c*r),h=Vs(d),m=p*h/d,y=rl({l:h,a:i*m,b:a*m}),E=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),g=Vs(o*d),v=p*g/d;return t.l=g*E,t.a=v*i*E,t.b=v*a*E,t}const cL=q(z({},Xx),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:z1,rgb:e=>z1(Uu(e))},toMode:{oklab:j1,rgb:e=>Vu(j1(e))}});function fL(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,a]=t;if(!(r.type===I.Hue||o.type===I.Hue||i.type===I.Hue))return r.type!==I.None&&(n.l=Math.min(Math.max(0,r.type===I.Number?r.value:r.value/100),1)),o.type!==I.None&&(n.a=o.type===I.Number?o.value:o.value*.4/100),i.type!==I.None&&(n.b=i.type===I.Number?i.value:i.value*.4/100),a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const dL=q(z({},r0),{mode:"oklab",toMode:{lrgb:rl,rgb:Vu},fromMode:{lrgb:s2,rgb:Uu},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[fL],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}`:""})`});function pL(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Hue)return;n.l=Math.min(Math.max(0,r.type===I.Number?r.value:r.value/100),1)}if(o.type!==I.None&&(n.c=Math.max(0,o.type===I.Number?o.value:o.value*.4/100)),i.type!==I.None){if(i.type===I.Percentage)return;n.h=i.value}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const hL=q(z({},o0),{mode:"oklch",toMode:{oklab:e=>wr(e,"oklab"),rgb:e=>Vu(wr(e,"oklab"))},fromMode:{rgb:e=>br(Uu(e),"oklch"),oklab:e=>br(e,"oklch")},parse:[pL],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]}}),H1=e=>{let{r:t,g:n,b:r,alpha:o}=Fi(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},G1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=ki({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},gL=q(z({},Ei),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>G1(ao(e)),xyz65:G1},toMode:{rgb:e=>lo(H1(e)),xyz65:H1}}),wf=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},W1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"prophoto",r:wf(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:wf(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:wf(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},xf=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},U1=e=>{let t=xf(e.r),n=xf(e.g),r=xf(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},mL=q(z({},Ei),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:W1,rgb:e=>W1(nl(e))},toMode:{xyz50:U1,rgb:e=>tl(U1(e))}}),V1=1.09929682680944,vL=.018053968510807,Cf=e=>{const t=Math.abs(e);return t>vL?(Math.sign(e)||1)*(V1*Math.pow(t,.45)-(V1-1)):4.5*e},K1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"rec2020",r:Cf(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Cf(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Cf(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},Y1=1.09929682680944,yL=.018053968510807,Sf=(e=0)=>{let t=Math.abs(e);return t{let t=Sf(e.r),n=Sf(e.g),r=Sf(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},bL=q(z({},Ei),{mode:"rec2020",fromMode:{xyz65:K1,rgb:e=>K1(ao(e))},toMode:{xyz65:X1,rgb:e=>lo(X1(e))},parse:["rec2020"],serialize:"rec2020"}),Lr=.0037930732552754493,c2=Math.cbrt(Lr),Ef=e=>Math.cbrt(e)-c2,wL=e=>{const{r:t,g:n,b:r,alpha:o}=Fi(e),i=Ef(.3*t+.622*n+.078*r+Lr),a=Ef(.23*t+.692*n+.078*r+Lr),l=Ef(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Lr),s={mode:"xyb",x:(i-a)/2,y:(i+a)/2,b:l-(i+a)/2};return o!==void 0&&(s.alpha=o),s},Ff=e=>Math.pow(e+c2,3),xL=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=Ff(e+t)-Lr,i=Ff(t-e)-Lr,a=Ff(n+t)-Lr,l=ki({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*a,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*a,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*a});return r!==void 0&&(l.alpha=r),l},CL={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:xL},fromMode:{rgb:wL},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:W,y:W,b:W,alpha:{use:W,fixup:qe}}},SL={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:tl,lab:n0},fromMode:{rgb:nl,lab:t0},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:W,y:W,z:W,alpha:{use:W,fixup:qe}}},EL=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i},FL=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i},kL={mode:"xyz65",toMode:{rgb:lo,xyz50:EL},fromMode:{rgb:ao,xyz50:FL},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:W,y:W,z:W,alpha:{use:W,fixup:qe}}},AL=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o},$L=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o},DL={mode:"yiq",toMode:{rgb:$L},fromMode:{rgb:AL},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:W,i:W,q:W,alpha:{use:W,fixup:qe}}},_L=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,TL=(e=4)=>t=>typeof t=="number"?_L(t,e):t;let Ll=TL(2);const os=e=>Math.max(0,Math.min(1,e||0)),kf=e=>Math.round(os(e)*255),BL=nn("rgb"),PL=nn("hsl"),ML=e=>{if(e===void 0)return;let t=kf(e.r),n=kf(e.g),r=kf(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},OL=e=>{if(e===void 0)return;const t=Ll(e.h||0),n=Ll(os(e.s)*100)+"%",r=Ll(os(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${n}, ${r})`:`hsla(${t}, ${n}, ${r}, ${Ll(os(e.alpha))})`},RL=e=>ML(BL(e)),NL=e=>OL(PL(e)),f2=nn("rgb"),d2=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},IL=e=>d2(f2(e)),p2=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function LL(e){return p2(f2(e))}function h2(e="rgb"){const{gamut:t}=Mu(e);if(!t)return r=>!0;const n=nn(typeof t=="string"?t:e);return r=>p2(n(r))}function l0(e="rgb"){const{gamut:t}=Mu(e);if(!t)return i=>zs(i);const n=typeof t=="string"?t:e,r=nn(n),o=h2(n);return i=>{const a=zs(i);if(!a)return;const l=r(a);if(o(l))return a;const s=d2(l);return a.mode===s.mode?s:nn(a.mode)(s)}}function ai(e,t="lch",n="rgb"){e=zs(e);let r=n==="rgb"?LL:h2(n),o=n==="rgb"?IL:l0(n);if(e===void 0||r(e))return e;let i=nn(e.mode);e=nn(t)(e);let a=q(z({},e),{c:0});if(!r(a))return i(o(a));let l=0,s=e.c!==void 0?e.c:0,u=Mu(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),d=a.c;for(;s-l>c;)a.c=l+(s-l)*.5,r(a)?(d=a.c,l=a.c):s=a.c;return i(r(a)?a:q(z({},a),{c:d}))}be(mI);be(SI);be(EI);be(FI);be($I);be(Vx);be(Xx);be(II);be(LI);be(GI);be(WI);be(r0);be(VI);be(o0);be(YI);be(oL);be(iL);be(aL);be(uL);be(cL);be(dL);be(hL);be(gL);be(mL);be(bL);be(Ei);be(CL);be(SL);be(kL);be(DL);const zL=/[^\w\-]/,jL=nn("rgb");function q1(e){const{value:t}=e,n=rn(),[r,o]=x.useState(!1),[i,a]=x.useState(!1),l=x.useMemo(()=>{if(!i)return null;const c=Ou(t);if(c){const d=jL(l0("rgb")(c)),{alpha:p=1}=d,h=p===1?"":` ${p.toString().replace(".","")}`;return YN(RL(d)).colorName.toLowerCase().replace(zL,"")+h}return""},[i]),[s,u]=x.useState("");return r?k(x.Fragment,{children:[f(Re,{value:s||l,onChange:u}),f("button",{onClick:()=>{n({type:Ce.createAlias,payload:{name:s||l,value:t}})},children:"submit"}),f("button",{onClick:()=>o(!1),children:"cancel"})]}):f("button",{onClick:()=>{a(!0),o(!0)},children:"Add alias"})}function HL(e){return f("option",{value:e.value,children:e.label},e.value)}function mt(e){const{options:t=[],value:n,onChange:r,title:o,style:i}=e,a=x.useCallback(s=>{r(s.target.value)},[r]),l=x.useMemo(()=>t.map(HL),t);return f("select",{value:n,onChange:a,title:o,style:i,children:l})}const GL=nn("oklch");function zr(e){return GL(e)}const g2=0,m2=1,Ks=.01,v2=.001;function WL(e,t){let n=1/0,r=g2,o=Ou(`oklch(${r}% ${e} ${t})`);for(;r=n)break}const i=r;for(r-=Ks,n=1/0;r=n)break}return r*100}function UL(e,t){let n=1/0,r=m2,o=Ou(`oklch(${r}% ${e} ${t})`);for(;r>g2;){r-=Ks;const a=Math.abs(ai(q(z({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r*100;if(a>=n)break}const i=r;for(r-=Ks,n=1/0;r>i;){r-=v2;const a=Math.abs(ai(q(z({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r;if(a>=n)break}return r*100}function VL({l:e,c:t,h:n,a:r=100}){return f("a",{href:`https://oklch.com/#${e},${t},${n},${r}`,target:"_blank",children:"online picker"})}function $n(e,t,n,r){const o=r===1?"":`/ ${r}`;return`oklch(${e.toFixed(2)}% ${t.toFixed(4)} ${n.toFixed(2)}${o})`}function KL({value:e,onChange:t}){const{l:n,c:r,h:o=0,alpha:i=1}=zr(e)||{l:0,c:0,h:0,alpha:1},a=100*n,l=ai(`oklch(${a}% 0.4 ${o})`,"oklch","p3"),s=(l==null?void 0:l.c)||0,u=r-s>.001,c=WL(r,o),d=UL(r,o);return k("div",{className:"oklch-picker",style:{"--picked-lightness":`${a}%`,"--picked-chroma":r,"--picked-hue":o,"--picked-alpha":i,"--max-chroma":s,"--min-lightness":`${c}%`,"--max-lightness":`${d}%`,"--max-lightness-scalar":d},children:[f("div",{className:"lightness",onDrop:p=>{const h=p.dataTransfer.getData("value"),{l:m}=zr(h);m>0&&(p.preventDefault(),p.stopPropagation(),t($n(m*100,r,o,i)))},children:f("input",{onChange:p=>t($n(Number(p.target.value),r,o,i)),id:"lightness",type:"range",min:0,max:100,value:a,step:.1})}),f("div",{className:"chroma",children:f("input",{id:"chroma",type:"range",min:0,max:.37,value:r,step:.001,onInput:p=>{const h=Math.min(s,Number(p.target.value));return t($n(a,h,o,i))}})}),f("div",{className:"hue",onDrop:p=>{const h=p.dataTransfer.getData("value");if(!h)return;const{h:m}=zr(h);p.preventDefault(),p.stopPropagation(),t($n(a,r,m,i))},children:f("input",{id:"hue",type:"range",min:0,max:360,value:o,step:.1,onChange:p=>t($n(a,r,Number(p.target.value),i))})}),f("div",{className:"alpha",children:f("input",{id:"alpha",type:"range",min:0,max:1,value:i,step:.01,onChange:p=>t($n(a,r,o,Number(p.target.value)))})}),f(VL,{l:a,c:r,h:o}),!e.startsWith("oklch(")&&f("button",{onClick:()=>{t($n(a,r,o,i))},children:"convert"}),u&&f("span",{style:{color:"red",fontWeight:"bold"},children:"NOT IN GAMUT"})]})}const Ys=/(#[\da-fA-F]{3}|rgba?\()|oklch\(/,za=/(linear|radial|conic)-gradient\(.+\)/,YL=/^(--var-control|--server-theme|--theme-editor)/,li="39px",J1=(e,t)=>t===1?e.toHexString():e.setAlpha(t).toRgbString(),XL=(e,[t,n])=>(/px/.test(n)||(Ys.test(n)||za.test(n))&&(n in e||(e[n]={color:n,usages:[],isGradient:za.test(n)}),e[n].usages.push(t)),e),qL=(e,t)=>{if(e===null)return[];const n=z(z({},t),e);return Object.values(Object.entries(n).filter(([r])=>!YL.test(r)).reduce(XL,{}))},JL=({color:e},{color:t})=>{const n=yr(e).toHex(),r=yr(t).toHex();return n===r?e===t?0:e({label:e,value:e})),ZL=nn("rgb"),ez=e=>{const{onChange:t,onUnset:n,value:r,resolvedValue:o,cssVar:i,cssFunc:a}=e,l=ZL(l0("hsl")(o))||{},s=o,{nativeColorPicker:u}=ae,{name:c,usages:d}=i,p=rn(),h=GN({ms:20}),m=l.alpha||1,y=!d.some(({property:$})=>$!=="background"),E=NL(l),[g,v]=se("color-picker-variant","chrome"),b=y2[g],[F,D]=se("ok-picker",!1);return u?k("div",{style:{minHeight:"120px",clear:"both"},children:[f(q1,{value:s},s),f("input",{type:"color",style:{width:Q1,height:Q1,float:"right",opacity:m},value:E,onChange:$=>{const _=yr($.target.value),T=J1(_,m);h(t,T)}}),f("input",{type:"number",style:{float:"right"},min:0,max:1,step:.05,value:l.a,onChange:$=>{const _=Number($.target.value),T=yr(s);t(J1(T,_))}}),f("button",{onClick:()=>{s==="transparent"?p({type:Ce.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",float:"right",width:li,opacity:s==="transparent"?1:.4},children:"👻"}),f("div",{style:{clear:"both"},children:f(F1,{value:s,onChange:t,name:c,allowGradients:y})})]}):k(x.Fragment,{children:[F&&f(KL,{value:s,onChange:t}),k("div",{style:{display:"flex",clear:"both"},children:[f(q1,{value:s},s),k("div",{style:{display:"flex"},children:[f("button",{style:{borderTopRightRadius:0,borderBottomRightRadius:0,marginRight:0,borderRight:"none"},onClick:()=>D(!1),disabled:!F,children:"rgb/hsl"}),f("button",{style:{borderTopLeftRadius:0,borderBottomLeftRadius:0},onClick:()=>D(!0),disabled:F,children:"oklch"})]})]}),!F&&k(x.Fragment,{children:[f(b,{header:"",width:"100%",styles:{picker:{width:"100%"}},color:E,onChange:$=>{const _=$.rgb.a!==1,{r:T,g:B,b:P,a:L}=$.rgb;t(_?`rgba(${T} , ${B}, ${P}, ${L})`:$.hex)}}),k("div",{children:[f(Re,{style:{marginTop:"6px"},value:s,onChange:$=>t($,!0)}),f("button",{onClick:()=>{s==="transparent"?p({type:Ce.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",opacity:s==="transparent"?1:.4},children:"👻"}),f(mt,{title:"Change color picker style",style:{float:"right"},options:QL,value:g,onChange:v})]})]}),f(F1,{value:s,onChange:t,name:c,allowGradients:y})]})},J={isSimpleSizes:()=>Ge("isSimpleSizes",!0),screenOptions:()=>[ae.isSimpleSizes?b5:w5],width:()=>Ge("width",1024),height:()=>Ge("height",768),scales:()=>Ge("scales",{}),uiLayout:()=>Ge("uiLayout",{map:{}}),propertyFilter:()=>Ge("propertyFilter","all"),search:()=>Ge("search",""),filteredSelectors:()=>[[]],showRawValues:()=>Ge("showRawValues",!1),excludedRawValues:()=>Ge("excludedRawValues",["initial","none"]),frameClickBehavior:()=>Rr("frameClickBehavior","any"),nativeColorPicker:()=>se("nativeColorPicker",!1),includeDefaultPalette:()=>se("includeDefaultPalette",!1),colorUsages:()=>[co(e=>qL(e.themeEditor.scopes[At],e.includeDefaultPalette?cW():{}).sort(JL))],fileName:()=>Ge("fileName","theme"),annoyingPrefix:()=>se("annoyingPrefix",""),nameReplacements:()=>se("nameReplacements",[]),showCssProperties:()=>se("showCssProperties",!0),linkCssProperties:()=>se("linkCssProperties",!1),showSourceLinks:()=>se("showSourceLinks",!1),windowArrangments:()=>se("windowArrangments",{}),webpackHome:()=>se("webpackHome",""),visualizeHistory:()=>se("visualizeHistory",!1),visualizeHistoryAlways:()=>se("visualizeHistoryAlways",!0),svgDarkBg:()=>se("svgDarkBg",!1),inspectedPath:()=>Bn("inspectedPath",""),openGroups:()=>Bn("openGroups",{}),frameLoaded:()=>Rr("frameLoaded",!1),openFirstOnInspect:()=>se("open-first-inspect",!0),serverThemes:()=>E5(),existsOnServer:()=>[ae.fileName in ae.serverThemes],localThemeJson:()=>[co(e=>JSON.stringify(e.themeEditor.scopes))],remoteThemeJson:()=>[co(e=>{var t;return JSON.stringify((t=e.serverThemes[e.fileName])==null?void 0:t.scopes)})],modifiedServerVersion:()=>[co(e=>{const t=e.localThemeJson!==e.remoteThemeJson;return e.existsOnServer&&t})],themeEditor:()=>U5(),path:()=>Ge("path",""),fullHeightFrameShowFixed:()=>Rr("fullHeightFrameShowFixed",!0),fullHeightFrameScale:()=>Ge("fullHeightFrameScale",.05),maximizeChroma:()=>se("maximizeChroma",!1),pickedValue:()=>Rr("pickedValue",""),palette:()=>se("palette",[]),area:()=>[co(e=>e.width*e.height)],areaDoubled:()=>[co(e=>e.area*2)],areaNomemo:()=>[ae.width*ae.height]};console.time("Getters and signals");const ae=v5(J);y5(J);console.timeEnd("Getters and signals");const Z1={};let ev=0;const tz=()=>{++ev;for(const e in Z1)Z1[e](ev)},ea={enableOnTags:["INPUT","SELECT","RADIO"]};function nz(e){const{frameRef:t}=e;return k(x.Fragment,{children:[f(Af,{keys:"alt+r",updater:tz}),f(Af,{keys:"alt+s",hook:()=>[ae.fileName,ae.modifiedServerVersion,ae.themeEditor.scopes,J.serverThemes()],updater:(n,r,o,[,{uploadTheme:i}])=>{n&&n!=="default"&&r&&i(n,o)}}),f(Af,{keys:"alt+a",hook:J.frameClickBehavior,updater:(n,r)=>{const o=n==="alt"?"any":"alt";r(o),t.current.contentDocument.documentElement.classList.toggle("force-cursor",o!=="alt")}})]})}function Af({keys:e,hook:t=()=>[],updater:n=(r,o)=>{}}){const[...r]=t();qi(e,()=>{n(...r)},ea,[r])}let Ku;const Zd=window.indexedDB.open("history",1),Yr="actions";Zd.onupgradeneeded=function(e){const t=e.target.result;t.onerror=function(n){console.log("upgrade failed",n)},t.createObjectStore(Yr,{autoIncrement:!0})};const Xs="history-start-snapshot";let b2=JSON.parse(localStorage.getItem(Xs)),rz=0,ep;Zd.onsuccess=function(e){window.self===window.top&&(Ku=Zd.result)};function oz(){if(window.self!==window.top)return;const t=Ku.transaction([Yr],"readonly").objectStore(Yr);t.getAll().onsuccess=n=>{const r=n.target.result;Sz(new Map(b2)),S2(r),ep=rz===0,cz(),$z()}}let qs=1/0;function Xr(e,t,n){if(ep){const i=JSON.stringify([...Xe.entries()].filter(([a])=>J.hasOwnProperty(a)));localStorage.setItem(Xs,i),localStorage.setItem("originalUrl",window.location.href),ep=!1,b2=i}const o=Ku.transaction([Yr],"readwrite").objectStore(Yr);if(t){const i=IDBKeyRange.lowerBound(n);o.delete(i)}n<=qs&&(e[0].push(window.location.href),qs=n),o.put(e,n)}function s0(e=!1,t=null){const n=performance.now(),r=Ku.transaction([Yr],"readwrite");if(r.oncomplete=i=>{console.log("Deleted store in",performance.now()-n)},r.objectStore(Yr).clear(),localStorage.removeItem(Xs),t){const i=JSON.stringify([...t.entries()].filter(([a])=>c0.includes(a)));localStorage.setItem(Xs,i)}qs=1/0,console.log("Start store delete transaction in ",performance.now()-n)}const iz=(e,t)=>{w2({scopes:t},e)};function w2(e,t){document.exitFullscreen();const n=JSON.stringify(e,null,2),r=new Blob([n],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a");i.download=`${t||"theme"}.json`,i.href=o,i.textContent="Download backup.json",i.click()}const az=e=>Object.keys(e).map(n=>` ${n}: ${e[n]};`).join(` +`||t[Z]===" "||t[Z]===" ");)Z++;continue}if(r===",")return;if(r===")"){n.push({type:I.ParenClose});continue}if(r==="+"){if(Z--,Rl(t)){n.push(ji(t));continue}return}if(r==="-"){if(Z--,Rl(t)){n.push(ji(t));continue}if(Kd(t)){n.push({type:I.Ident,value:js(t)});continue}return}if(r==="."){if(Z--,Rl(t)){n.push(ji(t));continue}return}if(r==="/"){for(;Z4)){if(n.length===4){if(n[3].type!==I.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:I.None,value:void 0}),n.every(o=>o.type!==I.Alpha)?n:void 0}}function cI(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==I.Function)return;let r=Lx(e,t);if(r)return r.unshift(n.value),r}const Mu=e=>{if(typeof e!="string")return;const t=sI(e),n=t?cI(t,!0):void 0;let r,o=0,i=zs.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,pI=(e,t,n)=>e+n*(t-e),hI=e=>{let t=[];for(let n=0;nt=>{let n=hI(t);return r=>{let o=r*n.length,i=r>=1?n.length-1:Math.max(Math.floor(o),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],o-i)}},W=gI(pI),qe=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},Fi={mode:"rgb",channels:["r","g","b","alpha"],parse:[fI,QN,nI,qN,dI,"srgb"],serialize:"srgb",interpolate:{r:W,g:W,b:W,alpha:{use:W,fixup:qe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},rf=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),k1=e=>{let t=rf(e.r),n=rf(e.g),r=rf(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},of=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),A1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"a98",r:of(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:of(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:of(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},af=(e=0)=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},ki=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:af(e),g:af(t),b:af(n)};return r!==void 0&&(o.alpha=r),o},ao=e=>{let{r:t,g:n,b:r,alpha:o}=ki(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return o!==void 0&&(i.alpha=o),i},lf=(e=0)=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Ai=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:lf(e),g:lf(t),b:lf(n)};return r!==void 0&&(i.alpha=r),i},lo=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Ai({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(o.alpha=r),o},mI=q(z({},Fi),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>A1(ao(e)),xyz65:A1},toMode:{rgb:e=>lo(k1(e)),xyz65:k1}}),ct=e=>(e=e%360)<0?e+360:e,vI=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=ct(n);return r===0||e[r-1]===void 0?i:t(i-ct(o[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),Gn=e=>vI(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),tt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],yI=Math.PI/180,bI=180/Math.PI;let $1=tt[3]*tt[4],D1=tt[1]*tt[4],_1=tt[1]*tt[2]-tt[0]*tt[3];const wI=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(_1*n+e*$1-t*D1)/(_1+$1-D1),i=n-o,a=(tt[4]*(t-o)-tt[2]*i)/tt[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+a*a)/(tt[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(a,i)*bI-120),r!==void 0&&(l.alpha=r),l},xI=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*yI,n===void 0&&(n=0);let i=t===void 0?0:t*n*(1-n),a=Math.cos(e),l=Math.sin(e);return o.r=n+i*(tt[0]*a+tt[1]*l),o.g=n+i*(tt[2]*a+tt[3]*l),o.b=n+i*(tt[4]*a+tt[5]*l),r!==void 0&&(o.alpha=r),o},Ou=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=ct(e.h),r=ct(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},CI=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=ct(e.h),r=ct(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},Ru=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=ct(e.h),r=ct(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},Wn=e=>{let t=e.reduce((r,o)=>{if(o!==void 0){let i=o*Math.PI/180;r.sin+=Math.sin(i),r.cos+=Math.cos(i)}return r},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},SI={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:wI},toMode:{rgb:xI},interpolate:{h:{use:W,fixup:Gn},s:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ou},average:{h:Wn}},br=({l:e,a:t,b:n,alpha:r},o="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),a={mode:o,l:e,c:i};return i&&(a.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},wr=({l:e,c:t,h:n,alpha:r},o="lab")=>{n===void 0&&(n=0);let i={mode:o,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},zx=Math.pow(29,3)/Math.pow(3,3),jx=Math.pow(6,3)/Math.pow(29,3),Ue={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Jo={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let sf=e=>Math.pow(e,3)>jx?Math.pow(e,3):(116*e-16)/zx;const Hx=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,i=t/500+o,a=o-n/200,l={mode:"xyz65",x:sf(i)*Jo.X,y:sf(o)*Jo.Y,z:sf(a)*Jo.Z};return r!==void 0&&(l.alpha=r),l},Nu=e=>lo(Hx(e)),uf=e=>e>jx?Math.cbrt(e):(zx*e+16)/116,Gx=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=uf(e/Jo.X),i=uf(t/Jo.Y),a=uf(n/Jo.Z),l={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},Iu=e=>{let t=Gx(ao(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Hs=1,Wx=1,La=26/180*Math.PI,Gs=Math.cos(La),Ws=Math.sin(La),Ux=100/Math.log(139/100),Yd=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"lab65",l:(Math.exp(e*Hs/Ux)-1)/.0039},i=(Math.exp(.0435*t*Wx*Hs)-1)/.075,a=i*Math.cos(n/180*Math.PI-La),l=i*Math.sin(n/180*Math.PI-La);return o.a=a*Gs-l/.83*Ws,o.b=a*Ws+l/.83*Gs,r!==void 0&&(o.alpha=r),o},Xd=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=t*Gs+n*Ws,i=.83*(n*Gs-t*Ws),a=Math.sqrt(o*o+i*i),l={mode:"dlch",l:Ux/Hs*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*Wx*Hs)};return l.c&&(l.h=ct((Math.atan2(i,o)+La)/Math.PI*180)),r!==void 0&&(l.alpha=r),l},T1=e=>Yd(br(e,"dlch")),B1=e=>wr(Xd(e),"dlab"),EI={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:T1,rgb:e=>Nu(T1(e))},fromMode:{lab65:B1,rgb:e=>B1(Iu(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:W,a:W,b:W,alpha:{use:W,fixup:qe}}},FI={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Yd,dlab:e=>wr(e,"dlab"),rgb:e=>Nu(Yd(e))},fromMode:{lab65:Xd,dlab:e=>br(e,"dlch"),rgb:e=>Xd(Iu(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:W,c:W,h:{use:W,fixup:Gn},alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}};function kI({h:e,s:t,i:n,alpha:r}){e=ct(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1-t)};break;case 1:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1+t*(3/(2-o)-1)),b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n*(1+t*(3/(2-o)-1)),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:i={r:n*(1-t),g:n*(1+t*(3*(1-o)/(2-o)-1)),b:n*(1+t*(3/(2-o)-1))};break;case 4:i={r:n*(1+t*(3*(1-o)/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3/(2-o)-1))};break;case 5:i={r:n*(1+t*(3/(2-o)-1)),g:n*(1-t),b:n*(1+t*(3*(1-o)/(2-o)-1))};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function AI({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),i=Math.min(e,t,n),a={mode:"hsi",s:e+t+n===0?0:1-3*i/(e+t+n),i:(e+t+n)/3};return o-i!==0&&(a.h=(o===e?(t-n)/(o-i)+(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}},BI=new RegExp(`^hsla?\\(\\s*${ZN}${ai}${ga}${ai}${ga}\\s*(?:,\\s*${Zh}\\s*)?\\)$`),PI=e=>{let t=e.match(BI);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=TI(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n};function MI(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Percentage)return;n.h=r.value}if(o.type!==I.None){if(o.type===I.Hue)return;n.s=o.value/100}if(i.type!==I.None){if(i.type===I.Hue)return;n.l=i.value/100}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const Vx={mode:"hsl",toMode:{rgb:DI},fromMode:{rgb:_I},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[MI,PI],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:W,fixup:Gn},s:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ou},average:{h:Wn}};function Kx({h:e,s:t,v:n,alpha:r}){e=ct(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:n,g:n*(1-t*o),b:n*(1-t)};break;case 1:i={r:n*(1-t*o),g:n,b:n*(1-t)};break;case 2:i={r:n*(1-t),g:n,b:n*(1-t*o)};break;case 3:i={r:n*(1-t),g:n*(1-t*o),b:n};break;case 4:i={r:n*(1-t*o),g:n*(1-t),b:n};break;case 5:i={r:n,g:n*(1-t),b:n*(1-t*o)};break;default:i={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return i.mode="rgb",r!==void 0&&(i.alpha=r),i}function Yx({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.max(e,t,n),i=Math.min(e,t,n),a={mode:"hsv",s:o===0?0:1-i/o,v:o};return o-i!==0&&(a.h=(o===e?(t-n)/(o-i)+(t1){let o=t+n;t/=o,n/=o}return Kx({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function RI(e){let t=Yx(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,r=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-n)*r,b:1-r};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function NI(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Percentage)return;n.h=r.value}if(o.type!==I.None){if(o.type===I.Hue)return;n.w=o.value/100}if(i.type!==I.None){if(i.type===I.Hue)return;n.b=i.value/100}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const II={mode:"hwb",toMode:{rgb:OI},fromMode:{rgb:RI},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[NI],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:W,fixup:Gn},w:W,b:W,alpha:{use:W,fixup:qe}},difference:{h:CI},average:{h:Wn}},qx=203,Lu=.1593017578125,Jx=78.84375,zu=.8359375,ju=18.8515625,Hu=18.6875;function cf(e){if(e<0)return 0;const t=Math.pow(e,1/Jx);return 1e4*Math.pow(Math.max(0,t-zu)/(ju-Hu*t),1/Lu)}function ff(e){if(e<0)return 0;const t=Math.pow(e/1e4,Lu);return Math.pow((zu+ju*t)/(1+Hu*t),Jx)}const df=e=>Math.max(e/qx,0),P1=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=cf(e+.008609037037932761*t+.11102962500302593*n),i=cf(e-.00860903703793275*t-.11102962500302599*n),a=cf(e+.5600313357106791*t-.32062717498731885*n),l={mode:"xyz65",x:df(2.070152218389422*o-1.3263473389671556*i+.2066510476294051*a),y:df(.3647385209748074*o+.680566024947227*i-.0453045459220346*a),z:df(-.049747207535812*o-.0492609666966138*i+1.1880659249923042*a)};return r!==void 0&&(l.alpha=r),l},pf=(e=0)=>Math.max(e*qx,0),M1=({x:e,y:t,z:n,alpha:r})=>{const o=pf(e),i=pf(t),a=pf(n),l=ff(.3592832590121217*o+.6976051147779502*i-.0358915932320289*a),s=ff(-.1920808463704995*o+1.1004767970374323*i+.0753748658519118*a),u=ff(.0070797844607477*o+.0748396662186366*i+.8433265453898765*a),c=.5*l+.5*s,d=1.61376953125*l-3.323486328125*s+1.709716796875*u,p=4.378173828125*l-4.24560546875*s-.132568359375*u,h={mode:"itp",i:c,t:d,p};return r!==void 0&&(h.alpha=r),h},LI={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:P1,rgb:e=>lo(P1(e))},fromMode:{xyz65:M1,rgb:e=>M1(ao(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:W,t:W,p:W,alpha:{use:W,fixup:qe}}},zI=134.03437499999998,jI=16295499532821565e-27,hf=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Lu);return Math.pow((zu+ju*t)/(1+Hu*t),zI)},gf=(e=0)=>Math.max(e*203,0),Qx=({x:e,y:t,z:n,alpha:r})=>{e=gf(e),t=gf(t),n=gf(n);let o=1.15*e-.15*n,i=.66*t+.34*e,a=hf(.41478972*o+.579999*i+.014648*n),l=hf(-.20151*o+1.120649*i+.0531008*n),s=hf(-.0166008*o+.2648*i+.6684799*n),u=(a+l)/2,c={mode:"jab",j:.44*u/(1-.56*u)-jI,a:3.524*a-4.066708*l+.542708*s,b:.199076*a+1.096799*l-1.295875*s};return r!==void 0&&(c.alpha=r),c},HI=134.03437499999998,O1=16295499532821565e-27,mf=e=>{if(e<0)return 0;let t=Math.pow(e,1/HI);return 1e4*Math.pow((zu-t)/(Hu*t-ju),1/Lu)},vf=e=>e/203,Zx=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+O1)/(.44+.56*(e+O1)),i=mf(o+.13860504*t+.058047316*n),a=mf(o-.13860504*t-.058047316*n),l=mf(o-.096019242*t-.8118919*n),s={mode:"xyz65",x:vf(1.661373024652174*i-.914523081304348*a+.23136208173913045*l),y:vf(-.3250758611844533*i+1.571847026732543*a-.21825383453227928*l),z:vf(-.090982811*i-.31272829*a+1.5227666*l)};return r!==void 0&&(s.alpha=r),s},e2=e=>{let t=Qx(ao(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},t2=e=>lo(Zx(e)),GI={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:e2,xyz65:Qx},toMode:{rgb:t2,xyz65:Zx},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:W,a:W,b:W,alpha:{use:W,fixup:qe}}},R1=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),i={mode:"jch",j:e,c:o};return o&&(i.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},N1=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},WI={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:N1,rgb:e=>t2(N1(e))},fromMode:{rgb:e=>R1(e2(e)),jab:R1},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:W,fixup:Gn},c:W,j:W,alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}},Gu=Math.pow(29,3)/Math.pow(3,3),e0=Math.pow(6,3)/Math.pow(29,3);let yf=e=>Math.pow(e,3)>e0?Math.pow(e,3):(116*e-16)/Gu;const t0=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=(e+16)/116,i=t/500+o,a=o-n/200,l={mode:"xyz50",x:yf(i)*Ue.X,y:yf(o)*Ue.Y,z:yf(a)*Ue.Z};return r!==void 0&&(l.alpha=r),l},tl=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Ai({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(o.alpha=r),o},n2=e=>tl(t0(e)),nl=e=>{let{r:t,g:n,b:r,alpha:o}=ki(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return o!==void 0&&(i.alpha=o),i},bf=e=>e>e0?Math.cbrt(e):(Gu*e+16)/116,n0=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=bf(e/Ue.X),i=bf(t/Ue.Y),a=bf(n/Ue.Z),l={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},r2=e=>{let t=n0(nl(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function UI(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,a]=t;if(!(r.type===I.Hue||o.type===I.Hue||i.type===I.Hue))return r.type!==I.None&&(n.l=Math.min(Math.max(0,r.value),100)),o.type!==I.None&&(n.a=o.type===I.Number?o.value:o.value*125/100),i.type!==I.None&&(n.b=i.type===I.Number?i.value:i.value*125/100),a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const r0={mode:"lab",toMode:{xyz50:t0,rgb:n2},fromMode:{xyz50:n0,rgb:r2},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[UI],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:W,a:W,b:W,alpha:{use:W,fixup:qe}}},VI=q(z({},r0),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Hx,rgb:Nu},fromMode:{xyz65:Gx,rgb:Iu},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}});function KI(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(o.type!==I.None&&(n.c=Math.max(0,o.type===I.Number?o.value:o.value*150/100)),i.type!==I.None){if(i.type===I.Percentage)return;n.h=i.value}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const o0={mode:"lch",toMode:{lab:wr,rgb:e=>n2(wr(e))},fromMode:{rgb:e=>br(r2(e)),lab:br},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[KI],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:W,fixup:Gn},c:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}},YI=q(z({},o0),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>wr(e,"lab65"),rgb:e=>Nu(wr(e,"lab65"))},fromMode:{rgb:e=>br(Iu(e),"lch65"),lab65:e=>br(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),o2=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),i={mode:"lchuv",l:e,c:o};return o&&(i.h=ct(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},i2=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let o={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},a2=(e,t,n)=>4*e/(e+15*t+3*n),l2=(e,t,n)=>9*t/(e+15*t+3*n),XI=a2(Ue.X,Ue.Y,Ue.Z),qI=l2(Ue.X,Ue.Y,Ue.Z),JI=e=>e<=e0?Gu*e:116*Math.cbrt(e)-16,qd=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=JI(t/Ue.Y),i=a2(e,t,n),a=l2(e,t,n);!isFinite(i)||!isFinite(a)?o=i=a=0:(i=13*o*(i-XI),a=13*o*(a-qI));let l={mode:"luv",l:o,u:i,v:a};return r!==void 0&&(l.alpha=r),l},QI=(e,t,n)=>4*e/(e+15*t+3*n),ZI=(e,t,n)=>9*t/(e+15*t+3*n),eL=QI(Ue.X,Ue.Y,Ue.Z),tL=ZI(Ue.X,Ue.Y,Ue.Z),Jd=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let o=t/(13*e)+eL,i=n/(13*e)+tL,a=Ue.Y*(e<=8?e/Gu:Math.pow((e+16)/116,3)),l=a*(9*o)/(4*i),s=a*(12-3*o-20*i)/(4*i),u={mode:"xyz50",x:l,y:a,z:s};return r!==void 0&&(u.alpha=r),u},nL=e=>o2(qd(nl(e))),rL=e=>tl(Jd(i2(e))),oL={mode:"lchuv",toMode:{luv:i2,rgb:rL},fromMode:{rgb:nL,luv:o2},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:W,fixup:Gn},c:W,l:W,alpha:{use:W,fixup:qe}},difference:{h:Ru},average:{h:Wn}},iL=q(z({},Fi),{mode:"lrgb",toMode:{rgb:Ai},fromMode:{rgb:ki},parse:["srgb-linear"],serialize:"srgb-linear"}),aL={mode:"luv",toMode:{xyz50:Jd,rgb:e=>tl(Jd(e))},fromMode:{xyz50:qd,rgb:e=>qd(nl(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:W,u:W,v:W,alpha:{use:W,fixup:qe}}},s2=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.cbrt(.41222147079999993*e+.5363325363*t+.0514459929*n),i=Math.cbrt(.2119034981999999*e+.6806995450999999*t+.1073969566*n),a=Math.cbrt(.08830246189999998*e+.2817188376*t+.6299787005000002*n),l={mode:"oklab",l:.2104542553*o+.793617785*i-.0040720468*a,a:1.9779984951*o-2.428592205*i+.4505937099*a,b:.0259040371*o+.7827717662*i-.808675766*a};return r!==void 0&&(l.alpha=r),l},Wu=e=>{let t=s2(ki(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},rl=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.pow(e*.9999999984505198+.39633779217376786*t+.2158037580607588*n,3),i=Math.pow(e*1.0000000088817609-.10556134232365635*t-.06385417477170591*n,3),a=Math.pow(e*1.0000000546724108-.08948418209496575*t-1.2914855378640917*n,3),l={mode:"lrgb",r:4.076741661347994*o-3.307711590408193*i+.230969928729428*a,g:-1.2684380040921763*o+2.6097574006633715*i-.3413193963102197*a,b:-.004196086541837188*o-.7034186144594493*i+1.7076147009309444*a};return r!==void 0&&(l.alpha=r),l},Uu=e=>Ai(rl(e));function Qd(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Us(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function lL(e,t){let n,r,o,i,a,l,s,u;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,o=.59662641,i=.75515197,a=.56771245,l=4.0767416621,s=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,o=.08285427,i=.1254107,a=.14503204,l=-1.2684380046,s=2.6097574011,u=-.3413193965):(n=1.35733652,r=-.00915799,o=-1.1513021,i=-.50559606,a=.00692167,l=-.0041960863,s=-.7034186147,u=1.707614701);let c=n+r*e+o*t+i*e*e+a*e*t,d=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let m=1+c*d,y=1+c*p,E=1+c*h,g=m*m*m,v=y*y*y,b=E*E*E,F=3*d*m*m,D=3*p*y*y,$=3*h*E*E,_=6*d*d*m,T=6*p*p*y,B=6*h*h*E,P=l*g+s*v+u*b,L=l*F+s*D+u*$,K=l*_+s*T+u*B;c=c-P*L/(L*L-.5*P*K)}return c}function i0(e,t){let n=lL(e,t),r=rl({l:1,a:n*e,b:n*t}),o=Math.cbrt(1/Math.max(r.r,r.g,r.b)),i=o*n;return[o,i]}function sL(e,t,n,r,o,i=null){i||(i=i0(e,t));let a;if((n-o)*i[1]-(i[0]-o)*r<=0)a=i[1]*o/(r*i[0]+i[1]*(o-n));else{a=i[1]*(o-1)/(r*(i[0]-1)+i[1]*(o-n));{let l=n-o,s=r,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t,p=l+s*u,h=l+s*c,m=l+s*d;{let y=o*(1-a)+a*n,E=a*r,g=y+E*u,v=y+E*c,b=y+E*d,F=g*g*g,D=v*v*v,$=b*b*b,_=3*p*g*g,T=3*h*v*v,B=3*m*b*b,P=6*p*p*g,L=6*h*h*v,K=6*m*m*b,X=4.0767416621*F-3.3077115913*D+.2309699292*$-1,pe=4.0767416621*_-3.3077115913*T+.2309699292*B,oe=4.0767416621*P-3.3077115913*L+.2309699292*K,ye=pe/(pe*pe-.5*X*oe),Le=-X*ye,N=-1.2684380046*F+2.6097574011*D-.3413193965*$-1,Q=-1.2684380046*_+2.6097574011*T-.3413193965*B,G=-1.2684380046*P+2.6097574011*L-.3413193965*K,re=Q/(Q*Q-.5*N*G),U=-N*re,le=-.0041960863*F-.7034186147*D+1.707614701*$-1,he=-.0041960863*_-.7034186147*T+1.707614701*B,Se=-.0041960863*P-.7034186147*L+1.707614701*K,ge=he/(he*he-.5*le*Se),ze=-le*ge;Le=ye>=0?Le:1e6,U=re>=0?U:1e6,ze=ge>=0?ze:1e6,a+=Math.min(Le,Math.min(U,ze))}}}return a}function a0(e,t,n=null){n||(n=i0(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function u2(e,t,n){let r=i0(t,n),o=sL(t,n,e,1,e,r),i=a0(t,n,r),a=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),l=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),s=o/Math.min(e*i[0],(1-e)*i[1]),u=e*a,c=(1-e)*l,d=.9*s*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),d,o]}function I1(e){const t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Qd(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let i=Math.sqrt(n*n+r*r);if(!i)return o.s=0,o;let[a,l,s]=u2(t,n/i,r/i),u;if(iI1(Wu(e))},toMode:{oklab:L1,rgb:e=>Uu(L1(e))}});function z1(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,o=Math.sqrt(n*n+r*r),i=o?n/o:1,a=o?r/o:1,[l,s]=a0(i,a),u=.5,c=1-u/l,d=s/(o+t*s),p=d*t,h=d*o,m=Us(p),y=h*m/p,E=rl({l:m,a:i*y,b:a*y}),g=Math.cbrt(1/Math.max(E.r,E.g,E.b,0));t=t/g,o=o/g*Qd(t)/t,t=Qd(t);const v={mode:"okhsv",s:o?(u+s)*h/(s*u+s*c*h):0,v:t?t/p:0};return v.s&&(v.h=ct(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function j1(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,i=Math.cos(n/180*Math.PI),a=Math.sin(n/180*Math.PI),[l,s]=a0(i,a),u=.5,c=1-u/l,d=1-r*u/(u+s-s*c*r),p=r*s*u/(u+s-s*c*r),h=Us(d),m=p*h/d,y=rl({l:h,a:i*m,b:a*m}),E=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),g=Us(o*d),v=p*g/d;return t.l=g*E,t.a=v*i*E,t.b=v*a*E,t}const cL=q(z({},Xx),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:z1,rgb:e=>z1(Wu(e))},toMode:{oklab:j1,rgb:e=>Uu(j1(e))}});function fL(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,a]=t;if(!(r.type===I.Hue||o.type===I.Hue||i.type===I.Hue))return r.type!==I.None&&(n.l=Math.min(Math.max(0,r.type===I.Number?r.value:r.value/100),1)),o.type!==I.None&&(n.a=o.type===I.Number?o.value:o.value*.4/100),i.type!==I.None&&(n.b=i.type===I.Number?i.value:i.value*.4/100),a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const dL=q(z({},r0),{mode:"oklab",toMode:{lrgb:rl,rgb:Uu},fromMode:{lrgb:s2,rgb:Wu},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[fL],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}`:""})`});function pL(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,a]=t;if(r.type!==I.None){if(r.type===I.Hue)return;n.l=Math.min(Math.max(0,r.type===I.Number?r.value:r.value/100),1)}if(o.type!==I.None&&(n.c=Math.max(0,o.type===I.Number?o.value:o.value*.4/100)),i.type!==I.None){if(i.type===I.Percentage)return;n.h=i.value}return a.type!==I.None&&(n.alpha=Math.min(1,Math.max(0,a.type===I.Number?a.value:a.value/100))),n}const hL=q(z({},o0),{mode:"oklch",toMode:{oklab:e=>wr(e,"oklab"),rgb:e=>Uu(wr(e,"oklab"))},fromMode:{rgb:e=>br(Wu(e),"oklch"),oklab:e=>br(e,"oklch")},parse:[pL],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]}}),H1=e=>{let{r:t,g:n,b:r,alpha:o}=ki(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return o!==void 0&&(i.alpha=o),i},G1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o=Ai({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(o.alpha=r),o},gL=q(z({},Fi),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>G1(ao(e)),xyz65:G1},toMode:{rgb:e=>lo(H1(e)),xyz65:H1}}),wf=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},W1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"prophoto",r:wf(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:wf(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:wf(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},xf=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},U1=e=>{let t=xf(e.r),n=xf(e.g),r=xf(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},mL=q(z({},Fi),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:W1,rgb:e=>W1(nl(e))},toMode:{xyz50:U1,rgb:e=>tl(U1(e))}}),V1=1.09929682680944,vL=.018053968510807,Cf=e=>{const t=Math.abs(e);return t>vL?(Math.sign(e)||1)*(V1*Math.pow(t,.45)-(V1-1)):4.5*e},K1=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let o={mode:"rec2020",r:Cf(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Cf(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Cf(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},Y1=1.09929682680944,yL=.018053968510807,Sf=(e=0)=>{let t=Math.abs(e);return t{let t=Sf(e.r),n=Sf(e.g),r=Sf(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(o.alpha=e.alpha),o},bL=q(z({},Fi),{mode:"rec2020",fromMode:{xyz65:K1,rgb:e=>K1(ao(e))},toMode:{xyz65:X1,rgb:e=>lo(X1(e))},parse:["rec2020"],serialize:"rec2020"}),Lr=.0037930732552754493,c2=Math.cbrt(Lr),Ef=e=>Math.cbrt(e)-c2,wL=e=>{const{r:t,g:n,b:r,alpha:o}=ki(e),i=Ef(.3*t+.622*n+.078*r+Lr),a=Ef(.23*t+.692*n+.078*r+Lr),l=Ef(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+Lr),s={mode:"xyb",x:(i-a)/2,y:(i+a)/2,b:l-(i+a)/2};return o!==void 0&&(s.alpha=o),s},Ff=e=>Math.pow(e+c2,3),xL=({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=Ff(e+t)-Lr,i=Ff(t-e)-Lr,a=Ff(n+t)-Lr,l=Ai({r:11.031566904639861*o-9.866943908131562*i-.16462299650829934*a,g:-3.2541473810744237*o+4.418770377582723*i-.16462299650829934*a,b:-3.6588512867136815*o+2.7129230459360922*i+1.9459282407775895*a});return r!==void 0&&(l.alpha=r),l},CL={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:xL},fromMode:{rgb:wL},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:W,y:W,b:W,alpha:{use:W,fixup:qe}}},SL={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:tl,lab:n0},fromMode:{rgb:nl,lab:t0},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:W,y:W,z:W,alpha:{use:W,fixup:qe}}},EL=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return o!==void 0&&(i.alpha=o),i},FL=e=>{let{x:t,y:n,z:r,alpha:o}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return o!==void 0&&(i.alpha=o),i},kL={mode:"xyz65",toMode:{rgb:lo,xyz50:EL},fromMode:{rgb:ao,xyz50:FL},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:W,y:W,z:W,alpha:{use:W,fixup:qe}}},AL=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(o.alpha=r),o},$L=({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(o.alpha=r),o},DL={mode:"yiq",toMode:{rgb:$L},fromMode:{rgb:AL},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:W,i:W,q:W,alpha:{use:W,fixup:qe}}},_L=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,TL=(e=4)=>t=>typeof t=="number"?_L(t,e):t;let Il=TL(2);const rs=e=>Math.max(0,Math.min(1,e||0)),kf=e=>Math.round(rs(e)*255),BL=nn("rgb"),PL=nn("hsl"),ML=e=>{if(e===void 0)return;let t=kf(e.r),n=kf(e.g),r=kf(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},OL=e=>{if(e===void 0)return;const t=Il(e.h||0),n=Il(rs(e.s)*100)+"%",r=Il(rs(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${n}, ${r})`:`hsla(${t}, ${n}, ${r}, ${Il(rs(e.alpha))})`},RL=e=>ML(BL(e)),NL=e=>OL(PL(e)),f2=nn("rgb"),d2=e=>{const t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},IL=e=>d2(f2(e)),p2=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function LL(e){return p2(f2(e))}function h2(e="rgb"){const{gamut:t}=Pu(e);if(!t)return r=>!0;const n=nn(typeof t=="string"?t:e);return r=>p2(n(r))}function l0(e="rgb"){const{gamut:t}=Pu(e);if(!t)return i=>Ls(i);const n=typeof t=="string"?t:e,r=nn(n),o=h2(n);return i=>{const a=Ls(i);if(!a)return;const l=r(a);if(o(l))return a;const s=d2(l);return a.mode===s.mode?s:nn(a.mode)(s)}}function li(e,t="lch",n="rgb"){e=Ls(e);let r=n==="rgb"?LL:h2(n),o=n==="rgb"?IL:l0(n);if(e===void 0||r(e))return e;let i=nn(e.mode);e=nn(t)(e);let a=q(z({},e),{c:0});if(!r(a))return i(o(a));let l=0,s=e.c!==void 0?e.c:0,u=Pu(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),d=a.c;for(;s-l>c;)a.c=l+(s-l)*.5,r(a)?(d=a.c,l=a.c):s=a.c;return i(r(a)?a:q(z({},a),{c:d}))}be(mI);be(SI);be(EI);be(FI);be($I);be(Vx);be(Xx);be(II);be(LI);be(GI);be(WI);be(r0);be(VI);be(o0);be(YI);be(oL);be(iL);be(aL);be(uL);be(cL);be(dL);be(hL);be(gL);be(mL);be(bL);be(Fi);be(CL);be(SL);be(kL);be(DL);const zL=/[^\w\-]/,jL=nn("rgb");function q1(e){const{value:t}=e,n=rn(),[r,o]=x.useState(!1),[i,a]=x.useState(!1),l=x.useMemo(()=>{if(!i)return null;const c=Mu(t);if(c){const d=jL(l0("rgb")(c)),{alpha:p=1}=d,h=p===1?"":` ${p.toString().replace(".","")}`;return YN(RL(d)).colorName.toLowerCase().replace(zL,"")+h}return""},[i]),[s,u]=x.useState("");return r?k(x.Fragment,{children:[f(Re,{value:s||l,onChange:u}),f("button",{onClick:()=>{n({type:Ce.createAlias,payload:{name:s||l,value:t}})},children:"submit"}),f("button",{onClick:()=>o(!1),children:"cancel"})]}):f("button",{onClick:()=>{a(!0),o(!0)},children:"Add alias"})}function HL(e){return f("option",{value:e.value,children:e.label},e.value)}function mt(e){const{options:t=[],value:n,onChange:r,title:o,style:i}=e,a=x.useCallback(s=>{r(s.target.value)},[r]),l=x.useMemo(()=>t.map(HL),t);return f("select",{value:n,onChange:a,title:o,style:i,children:l})}const GL=nn("oklch");function zr(e){return GL(e)}const g2=0,m2=1,Vs=.01,v2=.001;function WL(e,t){let n=1/0,r=g2,o=Mu(`oklch(${r}% ${e} ${t})`);for(;r=n)break}const i=r;for(r-=Vs,n=1/0;r=n)break}return r*100}function UL(e,t){let n=1/0,r=m2,o=Mu(`oklch(${r}% ${e} ${t})`);for(;r>g2;){r-=Vs;const a=Math.abs(li(q(z({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r*100;if(a>=n)break}const i=r;for(r-=Vs,n=1/0;r>i;){r-=v2;const a=Math.abs(li(q(z({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r;if(a>=n)break}return r*100}function VL({l:e,c:t,h:n,a:r=100}){return f("a",{href:`https://oklch.com/#${e},${t},${n},${r}`,target:"_blank",children:"online picker"})}function $n(e,t,n,r){const o=r===1?"":`/ ${r}`;return`oklch(${e.toFixed(2)}% ${t.toFixed(4)} ${n.toFixed(2)}${o})`}function KL({value:e,onChange:t}){const{l:n,c:r,h:o=0,alpha:i=1}=zr(e)||{l:0,c:0,h:0,alpha:1},a=100*n,l=li(`oklch(${a}% 0.4 ${o})`,"oklch","p3"),s=(l==null?void 0:l.c)||0,u=r-s>.001,c=WL(r,o),d=UL(r,o);return k("div",{draggable:!0,onDragStart:p=>{p.stopPropagation(),p.preventDefault()},className:"oklch-picker",style:{"--picked-lightness":`${a}%`,"--picked-chroma":r,"--picked-hue":o,"--picked-alpha":i,"--max-chroma":s,"--min-lightness":`${c}%`,"--max-lightness":`${d}%`,"--max-lightness-scalar":d},children:[f("div",{className:"lightness",onDrop:p=>{const h=p.dataTransfer.getData("value"),{l:m}=zr(h);m>0&&(p.preventDefault(),p.stopPropagation(),t($n(m*100,r,o,i)))},children:f("input",{onChange:p=>t($n(Number(p.target.value),r,o,i)),id:"lightness",type:"range",min:0,max:100,value:a,step:.1})}),f("div",{className:"chroma",children:f("input",{id:"chroma",type:"range",min:0,max:.37,value:r,step:.001,onInput:p=>{const h=Math.min(s,Number(p.target.value));return t($n(a,h,o,i))}})}),f("div",{className:"hue",onDrop:p=>{const h=p.dataTransfer.getData("value");if(!h)return;const{h:m}=zr(h);p.preventDefault(),p.stopPropagation(),t($n(a,r,m,i))},children:f("input",{id:"hue",type:"range",min:0,max:360,value:o,step:.1,onChange:p=>t($n(a,r,Number(p.target.value),i))})}),f("div",{className:"alpha",children:f("input",{id:"alpha",type:"range",min:0,max:1,value:i,step:.01,onChange:p=>t($n(a,r,o,Number(p.target.value)))})}),f(VL,{l:a,c:r,h:o}),!e.startsWith("oklch(")&&f("button",{onClick:()=>{t($n(a,r,o,i))},children:"convert"}),u&&f("span",{style:{color:"red",fontWeight:"bold"},children:"NOT IN GAMUT"})]})}const Ks=/(#[\da-fA-F]{3}|rgba?\()|oklch\(/,za=/(linear|radial|conic)-gradient\(.+\)/,YL=/^(--var-control|--server-theme|--theme-editor)/,si="39px",J1=(e,t)=>t===1?e.toHexString():e.setAlpha(t).toRgbString(),XL=(e,[t,n])=>(/px/.test(n)||(Ks.test(n)||za.test(n))&&(n in e||(e[n]={color:n,usages:[],isGradient:za.test(n)}),e[n].usages.push(t)),e),qL=(e,t)=>{if(e===null)return[];const n=z(z({},t),e);return Object.values(Object.entries(n).filter(([r])=>!YL.test(r)).reduce(XL,{}))},JL=({color:e},{color:t})=>{const n=yr(e).toHex(),r=yr(t).toHex();return n===r?e===t?0:e({label:e,value:e})),ZL=nn("rgb"),ez=e=>{const{onChange:t,onUnset:n,value:r,resolvedValue:o,cssVar:i,cssFunc:a}=e,l=ZL(l0("hsl")(o))||{},s=o,{nativeColorPicker:u}=ae,{name:c,usages:d}=i,p=rn(),h=GN({ms:20}),m=l.alpha||1,y=!d.some(({property:$})=>$!=="background"),E=NL(l),[g,v]=se("color-picker-variant","chrome"),b=y2[g],[F,D]=se("ok-picker",!1);return u?k("div",{style:{minHeight:"120px",clear:"both"},children:[f(q1,{value:s},s),f("input",{type:"color",style:{width:Q1,height:Q1,float:"right",opacity:m},value:E,onChange:$=>{const _=yr($.target.value),T=J1(_,m);h(t,T)}}),f("input",{type:"number",style:{float:"right"},min:0,max:1,step:.05,value:l.a,onChange:$=>{const _=Number($.target.value),T=yr(s);t(J1(T,_))}}),f("button",{onClick:()=>{s==="transparent"?p({type:Ce.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",float:"right",width:si,opacity:s==="transparent"?1:.4},children:"👻"}),f("div",{style:{clear:"both"},children:f(F1,{value:s,onChange:t,name:c,allowGradients:y})})]}):k(x.Fragment,{children:[F&&f(KL,{value:s,onChange:t}),k("div",{style:{display:"flex",clear:"both"},children:[f(q1,{value:s},s),k("div",{style:{display:"flex"},children:[f("button",{style:{borderTopRightRadius:0,borderBottomRightRadius:0,marginRight:0,borderRight:"none"},onClick:()=>D(!1),disabled:!F,children:"rgb/hsl"}),f("button",{style:{borderTopLeftRadius:0,borderBottomLeftRadius:0},onClick:()=>D(!0),disabled:F,children:"oklch"})]})]}),!F&&k(x.Fragment,{children:[f(b,{header:"",width:"100%",styles:{picker:{width:"100%"}},color:E,onChange:$=>{const _=$.rgb.a!==1,{r:T,g:B,b:P,a:L}=$.rgb;t(_?`rgba(${T} , ${B}, ${P}, ${L})`:$.hex)}}),k("div",{children:[f(Re,{style:{marginTop:"6px"},value:s,onChange:$=>t($,!0)}),f("button",{onClick:()=>{s==="transparent"?p({type:Ce.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",opacity:s==="transparent"?1:.4},children:"👻"}),f(mt,{title:"Change color picker style",style:{float:"right"},options:QL,value:g,onChange:v})]})]}),f(F1,{value:s,onChange:t,name:c,allowGradients:y})]})},J={isSimpleSizes:()=>Ge("isSimpleSizes",!0),screenOptions:()=>[ae.isSimpleSizes?b5:w5],width:()=>Ge("width",1024),height:()=>Ge("height",768),scales:()=>Ge("scales",{}),uiLayout:()=>Ge("uiLayout",{map:{}}),propertyFilter:()=>Ge("propertyFilter","all"),search:()=>Ge("search",""),filteredSelectors:()=>[[]],showRawValues:()=>Ge("showRawValues",!1),excludedRawValues:()=>Ge("excludedRawValues",["initial","none"]),frameClickBehavior:()=>Rr("frameClickBehavior","any"),nativeColorPicker:()=>se("nativeColorPicker",!1),includeDefaultPalette:()=>se("includeDefaultPalette",!1),colorUsages:()=>[fo(e=>qL(e.themeEditor.scopes[At],e.includeDefaultPalette?cW():{}).sort(JL))],fileName:()=>Ge("fileName","theme"),annoyingPrefix:()=>se("annoyingPrefix",""),nameReplacements:()=>se("nameReplacements",[]),showCssProperties:()=>se("showCssProperties",!0),linkCssProperties:()=>se("linkCssProperties",!1),showSourceLinks:()=>se("showSourceLinks",!1),windowArrangments:()=>se("windowArrangments",{}),webpackHome:()=>se("webpackHome",""),visualizeHistory:()=>se("visualizeHistory",!1),visualizeHistoryAlways:()=>se("visualizeHistoryAlways",!0),svgDarkBg:()=>se("svgDarkBg",!1),inspectedPath:()=>Bn("inspectedPath",""),openGroups:()=>Bn("openGroups",{}),frameLoaded:()=>Rr("frameLoaded",!1),openFirstOnInspect:()=>se("open-first-inspect",!0),serverThemes:()=>E5(),existsOnServer:()=>[ae.fileName in ae.serverThemes],localThemeJson:()=>[fo(e=>JSON.stringify(e.themeEditor.scopes))],remoteThemeJson:()=>[fo(e=>{var t;return JSON.stringify((t=e.serverThemes[e.fileName])==null?void 0:t.scopes)})],modifiedServerVersion:()=>[fo(e=>{const t=e.localThemeJson!==e.remoteThemeJson;return e.existsOnServer&&t})],themeEditor:()=>U5(),path:()=>Ge("path",""),fullHeightFrameShowFixed:()=>Rr("fullHeightFrameShowFixed",!0),fullHeightFrameScale:()=>Ge("fullHeightFrameScale",.05),maximizeChroma:()=>se("maximizeChroma",!1),pickedValue:()=>Rr("pickedValue",""),palette:()=>se("palette",[]),area:()=>[fo(e=>e.width*e.height)],areaDoubled:()=>[fo(e=>e.area*2)],areaNomemo:()=>[ae.width*ae.height]};console.time("Getters and signals");const ae=v5(J);y5(J);console.timeEnd("Getters and signals");const Z1={};let ev=0;const tz=()=>{++ev;for(const e in Z1)Z1[e](ev)},ea={enableOnTags:["INPUT","SELECT","RADIO"]};function nz(e){const{frameRef:t}=e;return k(x.Fragment,{children:[f(Af,{keys:"alt+r",updater:tz}),f(Af,{keys:"alt+s",hook:()=>[ae.fileName,ae.modifiedServerVersion,ae.themeEditor.scopes,J.serverThemes()],updater:(n,r,o,[,{uploadTheme:i}])=>{n&&n!=="default"&&r&&i(n,o)}}),f(Af,{keys:"alt+a",hook:J.frameClickBehavior,updater:(n,r)=>{const o=n==="alt"?"any":"alt";r(o),t.current.contentDocument.documentElement.classList.toggle("force-cursor",o!=="alt")}})]})}function Af({keys:e,hook:t=()=>[],updater:n=(r,o)=>{}}){const[...r]=t();qi(e,()=>{n(...r)},ea,[r])}let Vu;const Zd=window.indexedDB.open("history",1),Yr="actions";Zd.onupgradeneeded=function(e){const t=e.target.result;t.onerror=function(n){console.log("upgrade failed",n)},t.createObjectStore(Yr,{autoIncrement:!0})};const Ys="history-start-snapshot";let b2=JSON.parse(localStorage.getItem(Ys)),rz=0,ep;Zd.onsuccess=function(e){window.self===window.top&&(Vu=Zd.result)};function oz(){if(window.self!==window.top)return;const t=Vu.transaction([Yr],"readonly").objectStore(Yr);t.getAll().onsuccess=n=>{const r=n.target.result;Sz(new Map(b2)),S2(r),ep=rz===0,cz(),$z()}}let Xs=1/0;function Xr(e,t,n){if(ep){const i=JSON.stringify([...Xe.entries()].filter(([a])=>J.hasOwnProperty(a)));localStorage.setItem(Ys,i),localStorage.setItem("originalUrl",window.location.href),ep=!1,b2=i}const o=Vu.transaction([Yr],"readwrite").objectStore(Yr);if(t){const i=IDBKeyRange.lowerBound(n);o.delete(i)}n<=Xs&&(e[0].push(window.location.href),Xs=n),o.put(e,n)}function s0(e=!1,t=null){const n=performance.now(),r=Vu.transaction([Yr],"readwrite");if(r.oncomplete=i=>{console.log("Deleted store in",performance.now()-n)},r.objectStore(Yr).clear(),localStorage.removeItem(Ys),t){const i=JSON.stringify([...t.entries()].filter(([a])=>c0.includes(a)));localStorage.setItem(Ys,i)}Xs=1/0,console.log("Start store delete transaction in ",performance.now()-n)}const iz=(e,t)=>{w2({scopes:t},e)};function w2(e,t){document.exitFullscreen();const n=JSON.stringify(e,null,2),r=new Blob([n],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a");i.download=`${t||"theme"}.json`,i.href=o,i.textContent="Download backup.json",i.click()}const az=e=>Object.keys(e).map(n=>` ${n}: ${e[n]};`).join(` `);function lz(e){return Object.entries(e).map(([t,n])=>`${t} { ${az(n)} }`).join(` -`)}const sz=(e,t)=>{const n=lz(t),r=new Blob([n],{type:"application/css"}),o=URL.createObjectURL(r),i=document.createElement("a");i.download=`${e||"theme"}.css`,i.href=o,i.textContent="Download backup.json",i.click()};let Xe=new Map,ol=new Map;const $f=new Map,dr=new Map,uz=JSON.parse(localStorage.getItem("pins")||"[]");let Pe=new Map;function cz(){Pe=new Map(uz)}const tv=new Set;function x2(e){let t;if(Pe.has(e)){const n=Pe.get(e);t=n>=j.length?ue:j[n].states}else t=bt;return t.has(e)?t.get(e):Xe.get(e)}let nv;function fz(e){const t=x2(e);Xe.set(e,t);const n=j,r=([i])=>i!==e;s0();let o=0;if(j=n.reduce((i,a)=>{if(a.states.delete(e),a.lastActions.has(e)?a.lastActions.size>1&&i.push({states:new Map([...a.states.entries()]),lastActions:new Map([...a.lastActions.entries()].filter(r))}):i.push(a),i.length>0){const l=i.at(-1);l!==nv&&l.lastActions.size>0&&(nv=l,Xr([...l.lastActions.entries()],!0,o),o++)}return i},[]),Me.has(e))if(Me.size===1){const i=j.at(-1);j=j.slice(0,-1),Me=i.lastActions,ue=i.states}else ue.delete(e),Me.delete(e);ue.delete(e),Et=new Map,ne=Math.min(ne,j.length),il(e),Un()}function dz(e,t){if(tv.has(e))return;let n=dr.get(e);n===void 0&&(n=new Set,dr.set(e,n)),n.add(()=>{t(e,x2(e))}),tv.add(e)}function u0(){localStorage.setItem("pins",JSON.stringify([...Pe.entries()]))}function Ai(e,t){Pe.set(e,t),xr(),m0(e),u0()}function C2(e){if(Me.has(e))return j.length;let t=0;for(;t=j.length;const l=i[...n.entries()]),[...Me.entries()]],t=new Date;w2({offset:ne,pins:[...Pe.entries()],initialStates:[...Xe.entries()],finalStates:[...ue.entries()],url:window.location.href,timeline:e},`theme-editor-history-${t.toLocaleString()}`)}let ta=[];function S2(e,t=!1){let n=0,r;ta.forEach((o,i)=>{delete ta[i]});for(const o of e)if(o.length!==0){kz();for(const[i,a,l]of o)l&&l!==r&&(ta.push([l,n]),r=l),g0(i,a,{force:!0,debounceTime:1/0});t&&Xr(o,!1,n),n++}ta.reverse()}let E2=localStorage.getItem("originalUrl");function vz(e){const{timeline:t,inspections:n}=e;return q(z({},e),{timeline:t.map(r=>r.map(o=>{const i=o[0];return i==="inspected-index"||i==="inspectedIndex"?["inspectedPath",n[o[1]]]:i==="OPEN_GROUPS"?["openGroups",Object.entries(o[1]).reduce((a,[l,s])=>{if(!s)return;const u=l.startsWith("body")?"body":l.startsWith("html")?"html":l.replaceAll(/\n\./g," .").replace(" .",` -.`);return a[u]=!0,a},{})]:i==="THEME_EDITOR"?["themeEditor",o[1]]:o}))})}function yz(e){const{timeline:t,initialStates:n,finalStates:r,pins:o,offset:i=0,url:a}=vz(e);Et=bt,j=[],ne=0,Pe=new Map,s0();for(const[l,s]of n)Xe.set(l,s);S2(t,!0),E2=a,a&&localStorage.setItem("originalUrl",a);for(const[l,s]of r)typeof s!="object"&&ue.get(l)!==s&&console.log("Unequal value",s,ue.get(l));Pe=new Map(o),ne=i,al(),Un()}function bz(e,t){ol.set(e,t),gz(e)}function wz(e){const t=this;let n=dr.get(t);return n===void 0&&(n=new Set,dr.set(t,n)),n.add(e),()=>{n.delete(e),n.size===0&&dr.delete(t)}}function xz(e){let t;if(Pe.has(e)){const n=Pe.get(e);t=n>=j.length?ue:j[n].states}else t=bt;return t.has(e)?t.get(e):Xe.get(e)}const c0=["themeEditor","uiLayout","inspectedPath"];function f0(e){for(const t of c0)if(!Pe.has(t)&&e.has(t))return!0;return!1}let j=[],dn=JSON.parse(localStorage.getItem("history-alternate")||"[]").map(e=>new Map(e)),Yu=parseInt(localStorage.getItem("history-alternate-index")||"0");function d0(){localStorage.setItem("history-alternate",JSON.stringify(dn.map(e=>[...e.entries()]))),localStorage.setItem("history-alternate-index",Yu.toString())}function Cz(){dn.length>F2&&!confirm(`Clear ${dn.length} steps?`)||(dn=[],d0(),xr())}let ne=0,F2=8,ue=new Map,Et=ue,bt=ue,Me=new Map,tp=0;function Sz(e){Et=ue;for(const t of e.entries())Xe.set(...t);ue=e,al()}function p0(e=1,t=!1){if(j.length-ne<1)return;Et=bt;let r=Math.min(j.length,ne+e);if(t)for(;r0&&k2(j[j.length-n]);)n--;ne=n,Un()}function k2(e){for(const t of e.lastActions.keys())if(!Pe.has(t))return!1;return!0}function A2(){p0(1)}function $2(){ma(1)}function D2(){let e=ne;for(;e0;){e--;const t=e===0?Me:j[j.length-e].lastActions;if(f0(t))break}Et=bt,ne=e,Un()}}function h0(e){e===ne||e>j.length||e<0||(ne=e,Et=bt,Un())}function Ez(){const e=ne>0;for(const[t,n]of Pe.entries())if(Pe.delete(t),n!==ne){const r=n>=j.length?ue.get(t):j[n].states.get(t);bt.set(t,r===void 0?Xe.get(t):r)}u0(),Me=e?j[j.length-ne].lastActions:Me,j=[],ne=0,ue=bt,Xe=new Map([...Xe.entries(),...bt.entries()]),s0(!0,bt),localStorage.removeItem("originalUrl"),al(),xr()}function Fz(){if(!dn)return;const e=ne===0?[]:[...j.slice(j.length-ne+1).map(({lastActions:r})=>r),Me],t=dn;Yu=j.length-ne;let n=!1;for(const r of t){let o=!0;for(const[i,a]of r.entries()){if(!n){Xu(i,a,{force:!0}),n=!0,o=!1;continue}bt=ue,g0(i,a,{force:!0,debounceTime:o?0:1/0}),o&&(o=!1)}Xr([...r.entries()],!1,j.length)}if(t.length===0){const r=j.at(-ne);ue=r.states,Me=r.lastActions,j=j.slice(0,-ne),Xr([...r.lastActions.entries()],!0,j.length),ne=0}else ne=Math.min(t.length,j.length-1);dn=e,d0(),Un()}function kz(){const e={states:ue,lastActions:Me};j.push(e),ue=new Map(ue),Me=new Map}function Xu(e,t,n){const r=ne>0;r&&(n!=null&&n.appendOnly)||!(r?Az(e,t,n):g0(e,t,n))||(typeof t.type=="function"&&(t.type=t.type.name),Xr([...Me.entries()],r,j.length),m0(e))}function g0(e,t,n={}){const r=ol.get(e)||qu;if(!r)return console.log("no reducer for",e),!1;const o=performance.now(),i=Pe.get(e),a=Pe.has(e),s=a&&i=("debounceTime"in n?n.debounceTime:500))||(n==null?void 0:n.skipHistory);function h(){const y=j[j.length-1];if(!y||y.states.get(e)!==(c?void 0:u))return!1;const E=[...y.lastActions.keys()];return E.length===1&&E[0]===e}const m=p&&h();return Et=ue,p||(ue=new Map(ue)),c?ue.delete(e):ue.set(e,u),ne=0,p?(m&&j.splice(j.length-1),Me=new Map(Me)):(j.push({states:Et,lastActions:Me}),Me=new Map),tp=m?0:o,Me.set(e,t),a&&Ai(e,j.length),!0}function Az(e,t,n={}){var v;const r=ol.get(e)||qu;if(!r||dn.length>F2&&!n.force&&!window.confirm(`You're about to lose ${dn.length} stashed changes, proceed?`))return!1;const o=performance.now(),i=j.length-ne,l=j[i].states,s=Pe.has(e)?Pe.get(e):i,u=((v=j[s])==null?void 0:v.states)||ue,c=u.has(e)?u.get(e):Xe.get(e),d=r(c,typeof t=="function"?t(c):t);if(d===c&&!n.force)return!1;const p=new Map,h=new Map,m=[];let y=!1;const E=Pe.entries();for(const[b,F]of E)if(F>i){y=!0,F>=j.length?(p.set(b,ue.get(b)),h.set(b,Me.get(b))):(p.set(b,j[F].states.get(b)),h.set(b,j[F].lastActions.get(b)));const D=Math.min(F,j.length-1);for(let $=i+1;$![...p.keys()].some(F=>b.has(F))).map(({lastActions:b})=>b),Me],Yu=j.length-ne,d0(),y){let b=l,F=0;for(const[$,_,T]of m){const B=new Map(b);B.set($,T),g.push({states:B,lastActions:new Map([[$,_]])}),Xr([[$,_]],1,i+F+1),b=B,F++}const D=new Map([...b,...p]);g.push({states:D,lastActions:h}),Xr([...h.entries()],1,i+m.length+1)}return Pe.has(e)&&Ai(e,g.length),ue=new Map([...l,...p]),d===Xe.get(e)?ue.delete(e):ue.set(e,d),Et=l,ne=0,j=g,tp=o,Me=new Map([[e,t]]),!0}let xr=()=>{};function al(){bt=ne>0?j[j.length-ne].states:ue}function T2(){localStorage.setItem("historyOffset",ne.toString())}function $z(){ne=Math.max(0,Math.min(j.length,parseInt(localStorage.getItem("historyOffset")||"0"))),Et=new Map,Un()}function m0(e){al(),T2();const t=dr.get(e);if(t)for(const n of t.values())n();xr()}function Un(){al(),T2();for(const[e,t]of bt.entries()){const n=dr.get(e);if(n&&(!Et.has(e)||Et.get(e)!==t))for(const r of n.values())r()}for(const e of Et.keys()){const t=dr.get(e);if(t&&!bt.has(e))for(const n of t.values())n()}xr()}const ot=x.createContext({});function Dz(e){const{previewComponents:t,children:n}=e,[,r]=x.useState();return qi("ctrl+z,cmd+z",A2,ea),qi("ctrl+shift+z,cmd+shift+z",$2,ea),qi("alt+z",D2,ea),qi("alt+shift+z",_2,ea),x.useLayoutEffect(()=>(xr=()=>r({}),()=>{xr=()=>{}}),[]),f(ot.Provider,{value:{past:j,historyOffset:ne,lastActions:Me,pointedStates:bt,initialStates:Xe,previewComponents:t,pins:Pe,states:ue,lastAlternate:dn,lastAlternateIndex:Yu,historyUrl:E2},children:n})}function B2(e,t,n=o=>o,r){if(!Xe.has(r)){const i=typeof n=="function"?n(t):t;Xe.set(r,i)}return e!==qu&&!ol.has(r)&&bz(r,e),[x.useSyncExternalStore(wz.bind(r),xz.bind(null,r)),Xu.bind(null,r)]}function v0(e){return Xu.bind(null,e)}const qu=(e,t)=>t;function Bn(e,t){return B2(qu,null,()=>typeof t=="function"?t():t,e)}function P2(e,t){switch(e){case"object":return t==="null"||t==="undefined"?null:JSON.parse(t);case"boolean":return!!t&&t!=="false";case"number":return Number(t);default:return t}}const Hi={},rv={},Df={},zl={};function se(e,t){const n=ih()+e,r=typeof t,o=r==="object",i=Df.hasOwnProperty(e),a=i?Df[e]:()=>{let u;if(Hi.hasOwnProperty(e))u=Hi[e];else{const c=localStorage.getItem(n),d=c===null?t:P2(r,c);Hi[e]=d,zl[e]=new Set,rv[e]=p=>{const h=typeof p=="function"?p(Hi[e]):p;localStorage.setItem(n,o?JSON.stringify(h):h),Hi[e]=h;for(const m of zl[e].values())m(h)},u=d}return u};i||(Df[e]=a);const[l,s]=x.useState(a);return x.useInsertionEffect(()=>(zl[e].add(s),()=>{zl[e].delete(s)}),[]),[l,rv[e]]}function _z(e,t){localStorage.setItem(e,t)}function Tz(e,t){localStorage.setItem(e,JSON.stringify(t))}function Ge(e,t){const n=ih()+e,r=typeof t,o=r==="object",[i,a]=Bn(e,()=>{const l=localStorage.getItem(n);return l===null?t:P2(r,l)});return dz(e,o?Tz:_z),[i,a]}const so=x.createContext({}),Bz=([,[e,t]],[,[n,r]])=>e===n?t>r?1:-1:e>n?1:-1,Pz=(e,t,n,r)=>{if(!r){const i=Object.values(e).filter(([l])=>l===n).map(([,l])=>l),a=Math.max(...i);return q(z({},e),{[t]:[n,a+1]})}const o={};return Object.entries(e).sort(Bz).reduce((i,[a,[l]])=>{if(o[l]||(o[l]=0),r===a&&n===l&&(o[l]++,i[t]=[n,o[l]]),a!==t){o[l]++;const s=o[l];i[a]=[l,s]}return i},{})},Mz={showMovers(){return x.useState(!1)},drawerOpen(){return se("drawer-open",!1)},dragEnabled(){return se("drag-on",!1)}};function Oz({stateHook:e,children:t,hooks:n=Mz,customElements:r}){const o=x.useRef({}),i=x.useRef({}),[a,l]=x.useState(null),[s,u]=x.useState(null),[c,d]=x.useState(null),[p,h]=e(),{map:m}=p,[y,E]=n.showMovers(),[g,v]=n.drawerOpen(),[b,F]=n.dragEnabled(),D=x.useCallback((K,X,pe)=>{if(l(null),!Object.values(m).some(([ye])=>ye===X&&i.current.hasOwnProperty(ye))){let ye=0;Object.entries(i.current).forEach(([Le,N])=>{N===X&&!(Le in m)&&(m[Le]=[N,ye],ye+=1)})}const oe=Pz(m,K,X,pe);h(q(z({},p),{map:oe}))},[m]),[$,_]=x.useState(!1),[T,B]=x.useState(!1);x.useLayoutEffect(()=>{if(!$){_(!0);return}B(!0)},[$]),x.useInsertionEffect(()=>{var K;if(T)for(const{current:X}of Object.values(o.current)){if(((K=X.children[0])==null?void 0:K.style.order)==="")continue;const pe=[];for(const oe of X.children){const ye=parseInt(oe.style.order);let Le,N,Q=0;for(const[G,re]of pe){if(ye{h(q(z({},p),{map:{}}))},L=x.useRef({element:null,area:null});return x.useLayoutEffect(()=>{_(!0)},[]),f(so.Provider,{value:{areaRefs:o,origLocationsRef:i,uiState:p,setUiState:h,movePanelTo:D,resetPanels:P,showMovers:y,setShowMovers:E,overElement:a,setOverElement:l,overArea:s,setOverArea:u,timeoutRef:L,draggedElement:c,setDraggedElement:d,dragEnabled:b,setDragEnabled:F,drawerOpen:g,setDrawerOpen:v},children:f("div",{className:"movable-container"+(c?" is-dragging":""),children:t})})}const M2=10;function Rz(e){const{movePanelTo:t,areaRefs:n}=x.useContext(so),{homeAreaId:r,elementId:o,hostAreaId:i}=e;return f("div",{className:"area-switcher",style:{display:"flex",position:"absolute"},children:f(mt,{style:{background:i?"white":"lightyellow"},value:i,options:Object.keys(n.current).map(a=>({value:a,label:a===r&&a!==i?`${a} (default)`:a})),onChange:a=>{t(o,a)}})})}var O2={exports:{}};/*! +`)}const sz=(e,t)=>{const n=lz(t),r=new Blob([n],{type:"application/css"}),o=URL.createObjectURL(r),i=document.createElement("a");i.download=`${e||"theme"}.css`,i.href=o,i.textContent="Download backup.json",i.click()};let Xe=new Map,ol=new Map;const $f=new Map,dr=new Map,uz=JSON.parse(localStorage.getItem("pins")||"[]");let Pe=new Map;function cz(){Pe=new Map(uz)}const tv=new Set;function x2(e){let t;if(Pe.has(e)){const n=Pe.get(e);t=n>=j.length?ue:j[n].states}else t=bt;return t.has(e)?t.get(e):Xe.get(e)}let nv;function fz(e){const t=x2(e);Xe.set(e,t);const n=j,r=([i])=>i!==e;s0();let o=0;if(j=n.reduce((i,a)=>{if(a.states.delete(e),a.lastActions.has(e)?a.lastActions.size>1&&i.push({states:new Map([...a.states.entries()]),lastActions:new Map([...a.lastActions.entries()].filter(r))}):i.push(a),i.length>0){const l=i.at(-1);l!==nv&&l.lastActions.size>0&&(nv=l,Xr([...l.lastActions.entries()],!0,o),o++)}return i},[]),Me.has(e))if(Me.size===1){const i=j.at(-1);j=j.slice(0,-1),Me=i.lastActions,ue=i.states}else ue.delete(e),Me.delete(e);ue.delete(e),Et=new Map,ne=Math.min(ne,j.length),so(e,0),Un()}function dz(e,t){if(tv.has(e))return;let n=dr.get(e);n===void 0&&(n=new Set,dr.set(e,n)),n.add(()=>{t(e,x2(e))}),tv.add(e)}function u0(){localStorage.setItem("pins",JSON.stringify([...Pe.entries()]))}function so(e,t){Pe.set(e,t),xr(),m0(e),u0()}function C2(e){if(Me.has(e))return j.length;let t=0;for(;t=j.length;const l=i[...n.entries()]),[...Me.entries()]],t=new Date;w2({offset:ne,pins:[...Pe.entries()],initialStates:[...Xe.entries()],finalStates:[...ue.entries()],url:window.location.href,timeline:e},`theme-editor-history-${t.toLocaleString()}`)}let ta=[];function S2(e,t=!1){let n=0,r;ta.forEach((o,i)=>{delete ta[i]});for(const o of e)if(o.length!==0){kz();for(const[i,a,l]of o)l&&l!==r&&(ta.push([l,n]),r=l),g0(i,a,{force:!0,debounceTime:1/0});t&&Xr(o,!1,n),n++}ta.reverse()}let E2=localStorage.getItem("originalUrl");function vz(e){const{timeline:t,inspections:n}=e;return q(z({},e),{timeline:t.map(r=>r.map(o=>{const i=o[0];return i==="inspected-index"||i==="inspectedIndex"?["inspectedPath",n[o[1]]]:i==="OPEN_GROUPS"?["openGroups",Object.entries(o[1]).reduce((a,[l,s])=>{if(!s)return;const u=l.startsWith("body")?"body":l.startsWith("html")?"html":l.replaceAll(/\n\./g," .").replace(" .",` +.`);return a[u]=!0,a},{})]:i==="THEME_EDITOR"?["themeEditor",o[1]]:o}))})}function yz(e){const{timeline:t,initialStates:n,finalStates:r,pins:o,offset:i=0,url:a}=vz(e);Et=bt,j=[],ne=0,Pe=new Map,s0();for(const[l,s]of n)Xe.set(l,s);S2(t,!0),E2=a,a&&localStorage.setItem("originalUrl",a);for(const[l,s]of r)typeof s!="object"&&ue.get(l)!==s&&console.log("Unequal value",s,ue.get(l));Pe=new Map(o),ne=i,il(),Un()}function bz(e,t){ol.set(e,t),gz(e)}function wz(e){const t=this;let n=dr.get(t);return n===void 0&&(n=new Set,dr.set(t,n)),n.add(e),()=>{n.delete(e),n.size===0&&dr.delete(t)}}function xz(e){let t;if(Pe.has(e)){const n=Pe.get(e);t=n>=j.length?ue:j[n].states}else t=bt;return t.has(e)?t.get(e):Xe.get(e)}const c0=["themeEditor","uiLayout","inspectedPath"];function f0(e){for(const t of c0)if(!Pe.has(t)&&e.has(t))return!0;return!1}let j=[],dn=JSON.parse(localStorage.getItem("history-alternate")||"[]").map(e=>new Map(e)),Yu=parseInt(localStorage.getItem("history-alternate-index")||"0");function d0(){localStorage.setItem("history-alternate",JSON.stringify(dn.map(e=>[...e.entries()]))),localStorage.setItem("history-alternate-index",Yu.toString())}function Cz(){dn.length>F2&&!confirm(`Clear ${dn.length} steps?`)||(dn=[],d0(),xr())}let ne=0,F2=8,ue=new Map,Et=ue,bt=ue,Me=new Map,tp=0;function Sz(e){Et=ue;for(const t of e.entries())Xe.set(...t);ue=e,il()}function p0(e=1,t=!1){if(j.length-ne<1)return;Et=bt;let r=Math.min(j.length,ne+e);if(t)for(;r0&&k2(j[j.length-n]);)n--;ne=n,Un()}function k2(e){for(const t of e.lastActions.keys())if(!Pe.has(t))return!1;return!0}function A2(){p0(1)}function $2(){ma(1)}function D2(){let e=ne;for(;e0;){e--;const t=e===0?Me:j[j.length-e].lastActions;if(f0(t))break}Et=bt,ne=e,Un()}}function h0(e){e===ne||e>j.length||e<0||(ne=e,Et=bt,Un())}function Ez(){const e=ne>0;for(const[t,n]of Pe.entries())if(Pe.delete(t),n!==ne){const r=n>=j.length?ue.get(t):j[n].states.get(t);bt.set(t,r===void 0?Xe.get(t):r)}u0(),Me=e?j[j.length-ne].lastActions:Me,j=[],ne=0,ue=bt,Xe=new Map([...Xe.entries(),...bt.entries()]),s0(!0,bt),localStorage.removeItem("originalUrl"),il(),xr()}function Fz(){if(!dn)return;const e=ne===0?[]:[...j.slice(j.length-ne+1).map(({lastActions:r})=>r),Me],t=dn;Yu=j.length-ne;let n=!1;for(const r of t){let o=!0;for(const[i,a]of r.entries()){if(!n){Xu(i,a,{force:!0}),n=!0,o=!1;continue}bt=ue,g0(i,a,{force:!0,debounceTime:o?0:1/0}),o&&(o=!1)}Xr([...r.entries()],!1,j.length)}if(t.length===0){const r=j.at(-ne);ue=r.states,Me=r.lastActions,j=j.slice(0,-ne),Xr([...r.lastActions.entries()],!0,j.length),ne=0}else ne=Math.min(t.length,j.length-1);dn=e,d0(),Un()}function kz(){const e={states:ue,lastActions:Me};j.push(e),ue=new Map(ue),Me=new Map}function Xu(e,t,n){const r=ne>0;r&&(n!=null&&n.appendOnly)||!(r?Az(e,t,n):g0(e,t,n))||(typeof t.type=="function"&&(t.type=t.type.name),Xr([...Me.entries()],r,j.length),m0(e))}function g0(e,t,n={}){const r=ol.get(e)||qu;if(!r)return console.log("no reducer for",e),!1;const o=performance.now(),i=Pe.get(e),a=Pe.has(e),s=a&&i=("debounceTime"in n?n.debounceTime:500))||(n==null?void 0:n.skipHistory);function h(){const y=j[j.length-1];if(!y||y.states.get(e)!==(c?void 0:u))return!1;const E=[...y.lastActions.keys()];return E.length===1&&E[0]===e}const m=p&&h();return Et=ue,p||(ue=new Map(ue)),c?ue.delete(e):ue.set(e,u),ne=0,p?(m&&j.splice(j.length-1),Me=new Map(Me)):(j.push({states:Et,lastActions:Me}),Me=new Map),tp=m?0:o,Me.set(e,t),a&&so(e,j.length),!0}function Az(e,t,n={}){var v;const r=ol.get(e)||qu;if(!r||dn.length>F2&&!n.force&&!window.confirm(`You're about to lose ${dn.length} stashed changes, proceed?`))return!1;const o=performance.now(),i=j.length-ne,l=j[i].states,s=Pe.has(e)?Pe.get(e):i,u=((v=j[s])==null?void 0:v.states)||ue,c=u.has(e)?u.get(e):Xe.get(e),d=r(c,typeof t=="function"?t(c):t);if(d===c&&!n.force)return!1;const p=new Map,h=new Map,m=[];let y=!1;const E=Pe.entries();for(const[b,F]of E)if(F>i){y=!0,F>=j.length?(p.set(b,ue.get(b)),h.set(b,Me.get(b))):(p.set(b,j[F].states.get(b)),h.set(b,j[F].lastActions.get(b)));const D=Math.min(F,j.length-1);for(let $=i+1;$![...p.keys()].some(F=>b.has(F))).map(({lastActions:b})=>b),Me],Yu=j.length-ne,d0(),y){let b=l,F=0;for(const[$,_,T]of m){const B=new Map(b);B.set($,T),g.push({states:B,lastActions:new Map([[$,_]])}),Xr([[$,_]],1,i+F+1),b=B,F++}const D=new Map([...b,...p]);g.push({states:D,lastActions:h}),Xr([...h.entries()],1,i+m.length+1)}return Pe.has(e)&&so(e,g.length),ue=new Map([...l,...p]),d===Xe.get(e)?ue.delete(e):ue.set(e,d),Et=l,ne=0,j=g,tp=o,Me=new Map([[e,t]]),!0}let xr=()=>{};function il(){bt=ne>0?j[j.length-ne].states:ue}function T2(){localStorage.setItem("historyOffset",ne.toString())}function $z(){ne=Math.max(0,Math.min(j.length,parseInt(localStorage.getItem("historyOffset")||"0"))),Et=new Map,Un()}function m0(e){il(),T2();const t=dr.get(e);if(t)for(const n of t.values())n();xr()}function Un(){il(),T2();for(const[e,t]of bt.entries()){const n=dr.get(e);if(n&&(!Et.has(e)||Et.get(e)!==t))for(const r of n.values())r()}for(const e of Et.keys()){const t=dr.get(e);if(t&&!bt.has(e))for(const n of t.values())n()}xr()}const ot=x.createContext({});function Dz(e){const{previewComponents:t,children:n}=e,[,r]=x.useState();return qi("ctrl+z,cmd+z",A2,ea),qi("ctrl+shift+z,cmd+shift+z",$2,ea),qi("alt+z",D2,ea),qi("alt+shift+z",_2,ea),x.useLayoutEffect(()=>(xr=()=>r({}),()=>{xr=()=>{}}),[]),f(ot.Provider,{value:{past:j,historyOffset:ne,lastActions:Me,pointedStates:bt,initialStates:Xe,previewComponents:t,pins:Pe,states:ue,lastAlternate:dn,lastAlternateIndex:Yu,historyUrl:E2},children:n})}function B2(e,t,n=o=>o,r){if(!Xe.has(r)){const i=typeof n=="function"?n(t):t;Xe.set(r,i)}return e!==qu&&!ol.has(r)&&bz(r,e),[x.useSyncExternalStore(wz.bind(r),xz.bind(null,r)),Xu.bind(null,r)]}function v0(e){return Xu.bind(null,e)}const qu=(e,t)=>t;function Bn(e,t){return B2(qu,null,()=>typeof t=="function"?t():t,e)}function P2(e,t){switch(e){case"object":return t==="null"||t==="undefined"?null:JSON.parse(t);case"boolean":return!!t&&t!=="false";case"number":return Number(t);default:return t}}const Hi={},rv={},Df={},Ll={};function se(e,t){const n=ih()+e,r=typeof t,o=r==="object",i=Df.hasOwnProperty(e),a=i?Df[e]:()=>{let u;if(Hi.hasOwnProperty(e))u=Hi[e];else{const c=localStorage.getItem(n),d=c===null?t:P2(r,c);Hi[e]=d,Ll[e]=new Set,rv[e]=p=>{const h=typeof p=="function"?p(Hi[e]):p;localStorage.setItem(n,o?JSON.stringify(h):h),Hi[e]=h;for(const m of Ll[e].values())m(h)},u=d}return u};i||(Df[e]=a);const[l,s]=x.useState(a);return x.useInsertionEffect(()=>(Ll[e].add(s),()=>{Ll[e].delete(s)}),[]),[l,rv[e]]}function _z(e,t){localStorage.setItem(e,t)}function Tz(e,t){localStorage.setItem(e,JSON.stringify(t))}function Ge(e,t){const n=ih()+e,r=typeof t,o=r==="object",[i,a]=Bn(e,()=>{const l=localStorage.getItem(n);return l===null?t:P2(r,l)});return dz(e,o?Tz:_z),[i,a]}const uo=x.createContext({}),Bz=([,[e,t]],[,[n,r]])=>e===n?t>r?1:-1:e>n?1:-1,Pz=(e,t,n,r)=>{if(!r){const i=Object.values(e).filter(([l])=>l===n).map(([,l])=>l),a=Math.max(...i);return q(z({},e),{[t]:[n,a+1]})}const o={};return Object.entries(e).sort(Bz).reduce((i,[a,[l]])=>{if(o[l]||(o[l]=0),r===a&&n===l&&(o[l]++,i[t]=[n,o[l]]),a!==t){o[l]++;const s=o[l];i[a]=[l,s]}return i},{})},Mz={showMovers(){return x.useState(!1)},drawerOpen(){return se("drawer-open",!1)},dragEnabled(){return se("drag-on",!1)}};function Oz({stateHook:e,children:t,hooks:n=Mz,customElements:r}){const o=x.useRef({}),i=x.useRef({}),[a,l]=x.useState(null),[s,u]=x.useState(null),[c,d]=x.useState(null),[p,h]=e(),{map:m}=p,[y,E]=n.showMovers(),[g,v]=n.drawerOpen(),[b,F]=n.dragEnabled(),D=x.useCallback((K,X,pe)=>{if(l(null),!Object.values(m).some(([ye])=>ye===X&&i.current.hasOwnProperty(ye))){let ye=0;Object.entries(i.current).forEach(([Le,N])=>{N===X&&!(Le in m)&&(m[Le]=[N,ye],ye+=1)})}const oe=Pz(m,K,X,pe);h(q(z({},p),{map:oe}))},[m]),[$,_]=x.useState(!1),[T,B]=x.useState(!1);x.useLayoutEffect(()=>{if(!$){_(!0);return}B(!0)},[$]),x.useInsertionEffect(()=>{var K;if(T)for(const{current:X}of Object.values(o.current)){if(((K=X.children[0])==null?void 0:K.style.order)==="")continue;const pe=[];for(const oe of X.children){const ye=parseInt(oe.style.order);let Le,N,Q=0;for(const[G,re]of pe){if(ye{h(q(z({},p),{map:{}}))},L=x.useRef({element:null,area:null});return x.useLayoutEffect(()=>{_(!0)},[]),f(uo.Provider,{value:{areaRefs:o,origLocationsRef:i,uiState:p,setUiState:h,movePanelTo:D,resetPanels:P,showMovers:y,setShowMovers:E,overElement:a,setOverElement:l,overArea:s,setOverArea:u,timeoutRef:L,draggedElement:c,setDraggedElement:d,dragEnabled:b,setDragEnabled:F,drawerOpen:g,setDrawerOpen:v},children:f("div",{className:"movable-container"+(c?" is-dragging":""),children:t})})}const M2=10;function Rz(e){const{movePanelTo:t,areaRefs:n}=x.useContext(uo),{homeAreaId:r,elementId:o,hostAreaId:i}=e;return f("div",{className:"area-switcher",style:{display:"flex",position:"absolute"},children:f(mt,{style:{background:i?"white":"lightyellow"},value:i,options:Object.keys(n.current).map(a=>({value:a,label:a===r&&a!==i?`${a} (default)`:a})),onChange:a=>{t(o,a)}})})}var O2={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o{var ye;return((ye=t.type)==null?void 0:ye.fName)||t.props.id||`${e}~~${Iz(t,n)}`},[]);r.current[g]||(r.current[g]=e);const[v,b]=o.map[g]||[],F=!v||v===e||!((oe=E.current[v])!=null&&oe.current),[D,$]=x.useState(!1),[_,T]=x.useState(!1),B=x.useMemo(()=>({homeAreaId:e,elementId:g,hostAreaId:v,forceDrag:_,setForceDrag:T}),[v,_]);if(!y&&(v||e)==="drawer")return null;const[P,L]=l||[],K=L===g,pe=k("div",{draggable:m||_,style:{position:"relative",order:b||null},title:m?g:null,className:np("movable-element",{"is-dragged":D}),onDragStart:()=>{(m||_)&&(h(g),_&&T(!1),setTimeout(()=>{$(!0)},0))},onDragEnd:()=>{if(h(null),$(!1),l){d.current.element&&(clearTimeout(d.current.element),d.current.element=null),d.current.area&&(clearTimeout(d.current.area),d.current.area=null),a(g,P,L),s(null);return}u&&a(g,u)},children:[p&&p!==g&&f("span",{style:{color:"lime",background:"rgb(0 0 0 / 56%)",position:"absolute",top:"0",fontSize:"12px",right:"0",zIndex:1001,fontWeight:"bold !important",textAlign:"right",width:"auto"},children:g}),f(si.Provider,{value:B,children:t}),i&&f(Rz,{elementId:g,homeAreaId:e,hostAreaId:v}),p&&p!==g&&f("div",{style:{zIndex:1e3},className:np("dropzone",{"drag-hovered":K}),onDragEnter:()=>{d.current.lastEntered=g,d.current.element&&(clearTimeout(d.current.element),d.current.element=null),c(null),s([v||e,g,b||n])},onDragLeave:()=>{d.current.element&&clearTimeout(d.current.element),d.current.lastEntered===g&&(d.current.element=setTimeout(()=>{s(null)},M2))}})]});return F?pe:oh.createPortal(pe,E.current[v].current)}const ov="rgba(0, 0, 0, 0.5)";function y0(){const{setForceDrag:e}=x.useContext(si);return f("button",{onMouseDown:()=>{e(!0)},style:{transform:"rotate(90deg)",background:"transparent",color:ov,borderColor:ov},children:"|||"})}function R2({controls:e},{controls:t}){return e[0]===t[0]&&e[1]===t[1]}const ce=x.memo(function(a){var l=a,{controls:[t,n],disabled:r=!1,children:o}=l,i=mn(l,["controls","disabled","children"]);return k("label",q(z({},i),{style:q(z({},i.style),{marginBottom:"2px"}),children:[f("input",{disabled:r,type:"checkbox",readOnly:!0,checked:!!t,onClick:()=>n(!t)}),o]}))},R2),zz=4;function iv(e){const t=e.replace(/^--/,"").split("-"),n=[];for(let r=0;r<3&&ri.size>zz).sort(([,i],[,a])=>a.size-i.size)}function Qu(){const{allVars:e}=x.useContext(it),[t,n]=x.useState(null),[r,o]=x.useState(!1),[i,a]=x.useState(5),[l,s]=J.annoyingPrefix(),[u,c]=x.useState(new Set);function d(m){u.has(m)?u.delete(m):u.add(m),c(new Set(u))}function p(){s(`${[...u.values()].join("|")}`),n(null)}function h(m){s(m),n(null)}return k("div",{children:[f(ft,{el:Qu,tasks:[()=>['Ignore either "bs" or "lm"',["lm","bs"].includes(ae.annoyingPrefix)]],children:`It's very common for token names to all start with a prefix that takes up valuable screen real estate. In case of Bootstrap it's "bs", for Halfmoon you find a lot of redundant "lm" prefixes.`}),f(y0,{}),f(Re,{placeholder:"Remove annoying prefix",title:"Remove annoying prefix",value:l,onChange:s,style:{textDecoration:"line-through",textDecorationColor:"grey",textDecorationThickness:"1px"}}),!t&&f("button",{onClick:()=>{n(jz(e))},children:"Detect"}),t&&f("button",{onClick:()=>{n(null)},children:"Close"}),t&&k("div",{children:[f("input",{type:"number",min:"1",value:i,onChange:m=>{a(m.target.value)}}),f(ce,{controls:[r,o],children:"Multi"}),r&&(u==null?void 0:u.size)>0&&f("button",{onClick:p,children:"Confirm multi select"}),f("button",{onClick:()=>{s("")},children:"None"}),t.slice(0,i).map(([m,y])=>f("div",{children:k("button",{style:m===l?{background:"lightblue"}:r&&u.has(m)?{background:"yellow"}:{},onClick:(r?d:h).bind(null,m),title:[...y.values()].join(` -`),children:[r&&u.has(m)&&f("input",{type:"checkbox",checked:!0}),m," (",y.size,")"]})},m))]})]})}Qu.fName="RemoveAnnoyingPrefix";function Zu(){const{uiState:e,setUiState:t,resetPanels:n,dragEnabled:r,setDragEnabled:o,showMovers:i,setShowMovers:a,drawerOpen:l}=x.useContext(so),[s,u]=J.windowArrangments(),[c,d]=se("panel-arrangements-name",""),p=x.useMemo(()=>JSON.stringify(e)===s[c],[s,e,c]);return k("div",{children:[f(y0,{}),f(ft,{el:Zu,tasks:[()=>["Enable dragging elements",x.useContext(si).hostAreaId==="area-right"||r],()=>["Move the element from the drawer to any other area",(x.useContext(si).hostAreaId||"drawer")!=="drawer"],()=>["Close the drawer",!l]],children:'Turn on "drag elements" to drag any element to any area. "Move elements" is very broken atm.'}),f(ce,{controls:[r,o],children:"Drag elements"}),f(ce,{controls:[i,a],children:"Move elements"}),Object.keys(e.map).length>0&&f("button",{onClick:()=>confirm("Reset to default?")&&n(),children:"reset"}),k("div",{children:[f(Re,{value:c,onChange:d}),f("button",{disabled:c.length===0,onClick:()=>{c in s&&!confirm("Update arrangement?")||c.length!==0&&u(q(z({},s),{[c]:JSON.stringify(e)}))},children:"Save"}),f(mt,{value:p?c:"",options:[{label:"",value:""},...Object.entries(s).map(([h])=>({label:h,value:h}))],onChange:h=>{d(h),h!==""&&t(JSON.parse(s[h]))}})]})]})}Zu.fName="MoveControls";const av=5,_f={min:.2,step:.02};function ec(){const[e,t]=J.scales(),{width:n,height:r}=ae,o=parseFloat(e[`${n}x${r}`]||1),i=o<=1?o:1+(o-1)/av,a=`${n}x${r}`,l=u=>{const c=u.target.value,d=c<=1?c:(1+(c-1)*av).toFixed(2).replace(/0+$/,"").replace(/\.$/,"");t(q(z({},e),{[a]:d}))};function s(u){const c=Math.round(u.deltaY/100),d=Math.max(.2,o+c*_f.step);t(q(z({},e),{[a]:d.toFixed(2)}))}return k("div",{onWheelCapture:s,className:"frame-scale-slider",style:{minWidth:"200px"},children:[f("input",q(z({style:{margin:0,marginTop:"-4px"},type:"range",list:"scale-points",value:i,max:1.4},_f),{onChange:l})),f("input",q(z({style:{verticalAlign:"top"},type:"number",max:3,value:o},_f),{onChange:u=>t(q(z({},e),{[a]:u.target.value}))})),k("datalist",{id:"scale-points",children:[f("option",{value:"1"}),f("option",{value:"1.2"}),f("option",{value:"1.4"})]}),f(ft,{tasks:[u=>["Increase the zoom level to 2 or more.",o>=2]],el:ec,children:"Zoom in and out here. You can also scroll above the element."})]})}ec.fName="FrameScaleSlider";const lv="responsive-size-controls";function tc(){const[e,t]=J.width(),[n,r]=J.height();return k("div",{className:lv,id:lv,children:[k("span",{children:[f("input",{type:"number",onChange:o=>t(parseInt(o.target.value)),value:e})," x ",f("input",{type:"number",onChange:o=>r(parseInt(o.target.value)),value:n})]}),f(ft,{el:tc,children:"Enter precise screen dimensions here if necessary."})]})}tc.fName="FrameSizeSettings";function Hz(e,t){return Array.from(t.children).findIndex(n=>n===e)}const Tf=new WeakMap;function Gz(e){try{return e.closest("html").querySelectorAll(`#${e.id}`).length===1}catch(t){return!1}}function b0(e){if(e.nodeName==="HTML"||e.nodeName==="BODY")return[];if(Tf.has(e))return Tf.get(e);const t=[];for(;e.nodeName!=="BODY";){const n=e.parentNode,r=[e.tagName,Hz(e,n)];e.id&&Gz(e)&&r.push(e.id),t.push(r),e=n}return t.reverse(),Tf.set(e,t),t}function ll(e,t=document){let n=t.querySelector("body"),r=0,o;for(const[,,i]of e)i&&(o=r),r++;if(o){const i=t.getElementById(e[o][2]);i&&(n=i,e=e.slice(o+1))}for(const[i,a]of e){const l=Array.from(n.children)[a];if(!l)throw new Error(`No element at index ${a}`);n=l,n.tagName}return n}function Wz(e,t){const n=ll(t,e.getRootNode());return e.contains(n)}function Uz(e){return e.replaceAll(ah,"").replaceAll(/:?:(before|after)/g,"").replaceAll(mw,"").trim()}let Vz,jl;function Bf(e){if(e.scrollIntoView({behavior:"smooth",block:"center"}),Ra(e),jl){const[n,r,o]=jl;window.clearTimeout(n),o!==e&&r()}const t=()=>{Yo(e),jl=null};jl=[setTimeout(t,1500),t,e]}function ui({selector:e,hideIfNotFound:t,hideIfOne:n,children:r,showLabel:o=!0,property:i=null,label:a}){const{frameLoaded:l}=ae,[s,u]=J.inspectedPath(),c=x.useMemo(()=>Uz(e),[]),d=c===Vz,{frameRef:p}=x.useContext(it),h=x.useMemo(()=>{if(!l||c==="")return[];try{return[...p.current.contentWindow.document.querySelectorAll(c)].map((v,b)=>({index:b,node:v,tagName:`${v.tagName}`,id:`${v.id}`,className:`${v.className}`,isCurrentlyInspected:Wz(v,s)}))}catch(g){return console.log(g),[]}},[e,l]),[m,y]=x.useState(Math.max(h.findIndex(g=>g.isCurrentlyInspected),0));if(h.length===0)return t||n?null:k("div",{style:{opacity:.6},children:[o&&k("div",{className:"monospace-code",children:[(a||e).trim(),f("span",{className:"var-control-property monospace-code",children:i})]}),r]});if(n&&h.length===1)return null;const E=h[m];return k("div",{style:{outline:d?"4px solid rgb(26, 217, 210)":"none"},children:[o&&k("div",{className:"monospace-code",children:[(a||e).trim(),f("span",{className:"var-control-property monospace-code",children:i})]}),k("div",{style:{display:"flex",alignItems:"flex-start",maxWidth:"372px",fontSize:"16px"},children:[k("div",{style:{flexShrink:0,display:"flex",flexDirection:"row"},children:[h.length>0&&f("button",{className:"scroll-in-view",onClick:()=>{Bf(h[m].node)},children:"👁"}),h.length>1&&k(x.Fragment,{children:[f("button",{onClick:()=>{const g=m===0?h.length-1:m-1;y(g),Bf(h[g].node)},children:"↑"}),f("button",{onClick:()=>{const g=m===h.length-1?0:m+1;y(g),Bf(h[g].node)},children:"↓"})]})]}),k("div",{style:{flexShrink:1},children:[!!E&&!E.isCurrentlyInspected&&f("button",{onClick:()=>{u(b0(E.node))},style:{fontSize:"10px"},children:"inspect"}),k("span",{children:[" ",m+1,"/",h.length," "]}),f("span",{style:{maxWidth:"120px",fontWeight:E&&E.isCurrentlyInspected?"bold":"normal"},children:E&&` ${E.tagName.toLowerCase()}.${E.className.trim().replaceAll(" ",".")} ${E.id?`#${E.id}`:""}`})]})]}),r]})}function Kz(e,t,n){n.dataTransfer.setData("value",typeof e=="function"?e():e),n.dataTransfer.setData("text/plain",typeof e=="function"?e():e),n.stopPropagation(),t()}function Mt(e,t=()=>{}){return Kz.bind(null,e,t)}/*! ***************************************************************************** +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o{var ye;return((ye=t.type)==null?void 0:ye.fName)||t.props.id||`${e}~~${Iz(t,n)}`},[]);r.current[g]||(r.current[g]=e);const[v,b]=o.map[g]||[],F=!v||v===e||!((oe=E.current[v])!=null&&oe.current),[D,$]=x.useState(!1),[_,T]=x.useState(!1),B=x.useMemo(()=>({homeAreaId:e,elementId:g,hostAreaId:v,forceDrag:_,setForceDrag:T}),[v,_]);if(!y&&(v||e)==="drawer")return null;const[P,L]=l||[],K=L===g,pe=k("div",{draggable:m||_,style:{position:"relative",order:b||null},className:np("movable-element",{"is-dragged":D}),onDragStart:()=>{(m||_)&&(h(g),_&&T(!1),setTimeout(()=>{$(!0)},0))},onDragEnd:()=>{if(h(null),$(!1),l){d.current.element&&(clearTimeout(d.current.element),d.current.element=null),d.current.area&&(clearTimeout(d.current.area),d.current.area=null),a(g,P,L),s(null);return}u&&a(g,u)},children:[p&&p!==g&&f("span",{style:{color:"lime",background:"rgb(0 0 0 / 56%)",position:"absolute",top:"0",fontSize:"12px",right:"0",zIndex:1001,fontWeight:"bold !important",textAlign:"right",width:"auto"},children:g}),f(ui.Provider,{value:B,children:t}),i&&f(Rz,{elementId:g,homeAreaId:e,hostAreaId:v}),p&&p!==g&&f("div",{style:{zIndex:1e3},className:np("dropzone",{"drag-hovered":K}),onDragEnter:()=>{d.current.lastEntered=g,d.current.element&&(clearTimeout(d.current.element),d.current.element=null),c(null),s([v||e,g,b||n])},onDragLeave:()=>{d.current.element&&clearTimeout(d.current.element),d.current.lastEntered===g&&(d.current.element=setTimeout(()=>{s(null)},M2))}})]});return F?pe:oh.createPortal(pe,E.current[v].current)}const ov="rgba(0, 0, 0, 0.5)";function y0(){const{setForceDrag:e}=x.useContext(ui);return f("button",{onMouseDown:()=>{e(!0)},style:{transform:"rotate(90deg)",background:"transparent",color:ov,borderColor:ov},children:"|||"})}function R2({controls:e},{controls:t}){return e[0]===t[0]&&e[1]===t[1]}const ce=x.memo(function(a){var l=a,{controls:[t,n],disabled:r=!1,children:o}=l,i=mn(l,["controls","disabled","children"]);return k("label",q(z({},i),{style:q(z({},i.style),{marginBottom:"2px"}),children:[f("input",{disabled:r,type:"checkbox",readOnly:!0,checked:!!t,onClick:()=>n(!t)}),o]}))},R2),zz=4;function iv(e){const t=e.replace(/^--/,"").split("-"),n=[];for(let r=0;r<3&&ri.size>zz).sort(([,i],[,a])=>a.size-i.size)}function Qu(){const{allVars:e}=x.useContext(it),[t,n]=x.useState(null),[r,o]=x.useState(!1),[i,a]=x.useState(5),[l,s]=J.annoyingPrefix(),[u,c]=x.useState(new Set);function d(m){u.has(m)?u.delete(m):u.add(m),c(new Set(u))}function p(){s(`${[...u.values()].join("|")}`),n(null)}function h(m){s(m),n(null)}return k("div",{children:[f(ft,{el:Qu,tasks:[()=>['Ignore either "bs" or "lm"',["lm","bs"].includes(ae.annoyingPrefix)]],children:`It's very common for token names to all start with a prefix that takes up valuable screen real estate. In case of Bootstrap it's "bs", for Halfmoon you find a lot of redundant "lm" prefixes.`}),f(y0,{}),f(Re,{placeholder:"Remove annoying prefix",title:"Remove annoying prefix",value:l,onChange:s,style:{textDecoration:"line-through",textDecorationColor:"grey",textDecorationThickness:"1px"}}),!t&&f("button",{onClick:()=>{n(jz(e))},children:"Detect"}),t&&f("button",{onClick:()=>{n(null)},children:"Close"}),t&&k("div",{children:[f("input",{type:"number",min:"1",value:i,onChange:m=>{a(m.target.value)}}),f(ce,{controls:[r,o],children:"Multi"}),r&&(u==null?void 0:u.size)>0&&f("button",{onClick:p,children:"Confirm multi select"}),f("button",{onClick:()=>{s("")},children:"None"}),t.slice(0,i).map(([m,y])=>f("div",{children:k("button",{style:m===l?{background:"lightblue"}:r&&u.has(m)?{background:"yellow"}:{},onClick:(r?d:h).bind(null,m),title:[...y.values()].join(` +`),children:[r&&u.has(m)&&f("input",{type:"checkbox",checked:!0}),m," (",y.size,")"]})},m))]})]})}Qu.fName="RemoveAnnoyingPrefix";function Zu(){const{uiState:e,setUiState:t,resetPanels:n,dragEnabled:r,setDragEnabled:o,showMovers:i,setShowMovers:a,drawerOpen:l}=x.useContext(uo),[s,u]=J.windowArrangments(),[c,d]=se("panel-arrangements-name",""),p=x.useMemo(()=>JSON.stringify(e)===s[c],[s,e,c]);return k("div",{children:[f(y0,{}),f(ft,{el:Zu,tasks:[()=>["Enable dragging elements",x.useContext(ui).hostAreaId==="area-right"||r],()=>["Move the element from the drawer to any other area",(x.useContext(ui).hostAreaId||"drawer")!=="drawer"],()=>["Close the drawer",!l]],children:'Turn on "drag elements" to drag any element to any area. "Move elements" is very broken atm.'}),f(ce,{controls:[r,o],children:"Drag elements"}),f(ce,{controls:[i,a],children:"Move elements"}),Object.keys(e.map).length>0&&f("button",{onClick:()=>confirm("Reset to default?")&&n(),children:"reset"}),k("div",{children:[f(Re,{value:c,onChange:d}),f("button",{disabled:c.length===0,onClick:()=>{c in s&&!confirm("Update arrangement?")||c.length!==0&&u(q(z({},s),{[c]:JSON.stringify(e)}))},children:"Save"}),f(mt,{value:p?c:"",options:[{label:"",value:""},...Object.entries(s).map(([h])=>({label:h,value:h}))],onChange:h=>{d(h),h!==""&&t(JSON.parse(s[h]))}})]})]})}Zu.fName="MoveControls";const av=5,_f={min:.2,step:.02};function ec(){const[e,t]=J.scales(),{width:n,height:r}=ae,o=parseFloat(e[`${n}x${r}`]||1),i=o<=1?o:1+(o-1)/av,a=`${n}x${r}`,l=u=>{const c=u.target.value,d=c<=1?c:(1+(c-1)*av).toFixed(2).replace(/0+$/,"").replace(/\.$/,"");t(q(z({},e),{[a]:d}))};function s(u){const c=Math.round(u.deltaY/100),d=Math.max(.2,o+c*_f.step);t(q(z({},e),{[a]:d.toFixed(2)}))}return k("div",{onWheelCapture:s,className:"frame-scale-slider",style:{minWidth:"200px"},children:[f("input",q(z({style:{margin:0,marginTop:"-4px"},type:"range",list:"scale-points",value:i,max:1.4},_f),{onChange:l})),f("input",q(z({style:{verticalAlign:"top"},type:"number",max:3,value:o},_f),{onChange:u=>t(q(z({},e),{[a]:u.target.value}))})),k("datalist",{id:"scale-points",children:[f("option",{value:"1"}),f("option",{value:"1.2"}),f("option",{value:"1.4"})]}),f(ft,{tasks:[u=>["Increase the zoom level to 2 or more.",o>=2]],el:ec,children:"Zoom in and out here. You can also scroll above the element."})]})}ec.fName="FrameScaleSlider";const lv="responsive-size-controls";function tc(){const[e,t]=J.width(),[n,r]=J.height();return k("div",{className:lv,id:lv,children:[k("span",{children:[f("input",{type:"number",onChange:o=>t(parseInt(o.target.value)),value:e})," x ",f("input",{type:"number",onChange:o=>r(parseInt(o.target.value)),value:n})]}),f(ft,{el:tc,children:"Enter precise screen dimensions here if necessary."})]})}tc.fName="FrameSizeSettings";function Hz(e,t){return Array.from(t.children).findIndex(n=>n===e)}const Tf=new WeakMap;function Gz(e){try{return e.closest("html").querySelectorAll(`#${e.id}`).length===1}catch(t){return!1}}function b0(e){if(e.nodeName==="HTML"||e.nodeName==="BODY")return[];if(Tf.has(e))return Tf.get(e);const t=[];for(;e.nodeName!=="BODY";){const n=e.parentNode,r=[e.tagName,Hz(e,n)];e.id&&Gz(e)&&r.push(e.id),t.push(r),e=n}return t.reverse(),Tf.set(e,t),t}function al(e,t=document){let n=t.querySelector("body"),r=0,o;for(const[,,i]of e)i&&(o=r),r++;if(o){const i=t.getElementById(e[o][2]);i&&(n=i,e=e.slice(o+1))}for(const[i,a]of e){const l=Array.from(n.children)[a];if(!l)throw new Error(`No element at index ${a}`);n=l,n.tagName}return n}function Wz(e,t){const n=al(t,e.getRootNode());return e.contains(n)}function Uz(e){return e.replaceAll(ah,"").replaceAll(/:?:(before|after)/g,"").replaceAll(mw,"").trim()}let Vz,zl;function Bf(e){if(e.scrollIntoView({behavior:"smooth",block:"center"}),Ra(e),zl){const[n,r,o]=zl;window.clearTimeout(n),o!==e&&r()}const t=()=>{Xo(e),zl=null};zl=[setTimeout(t,1500),t,e]}function ci({selector:e,hideIfNotFound:t,hideIfOne:n,children:r,showLabel:o=!0,property:i=null,label:a}){const{frameLoaded:l}=ae,[s,u]=J.inspectedPath(),c=x.useMemo(()=>Uz(e),[]),d=c===Vz,{frameRef:p}=x.useContext(it),h=x.useMemo(()=>{if(!l||c==="")return[];try{return[...p.current.contentWindow.document.querySelectorAll(c)].map((v,b)=>({index:b,node:v,tagName:`${v.tagName}`,id:`${v.id}`,className:`${v.className}`,isCurrentlyInspected:Wz(v,s)}))}catch(g){return console.log(g),[]}},[e,l]),[m,y]=x.useState(Math.max(h.findIndex(g=>g.isCurrentlyInspected),0));if(h.length===0)return t||n?null:k("div",{style:{opacity:.6},children:[o&&k("div",{className:"monospace-code",children:[(a||e).trim(),f("span",{className:"var-control-property monospace-code",children:i})]}),r]});if(n&&h.length===1)return null;const E=h[m];return k("div",{style:{outline:d?"4px solid rgb(26, 217, 210)":"none"},children:[o&&k("div",{className:"monospace-code",children:[(a||e).trim(),f("span",{className:"var-control-property monospace-code",children:i})]}),k("div",{style:{display:"flex",alignItems:"flex-start",maxWidth:"372px",fontSize:"16px"},children:[k("div",{style:{flexShrink:0,display:"flex",flexDirection:"row"},children:[h.length>0&&f("button",{className:"scroll-in-view",onClick:()=>{Bf(h[m].node)},children:"👁"}),h.length>1&&k(x.Fragment,{children:[f("button",{onClick:()=>{const g=m===0?h.length-1:m-1;y(g),Bf(h[g].node)},children:"↑"}),f("button",{onClick:()=>{const g=m===h.length-1?0:m+1;y(g),Bf(h[g].node)},children:"↓"})]})]}),k("div",{style:{flexShrink:1},children:[!!E&&!E.isCurrentlyInspected&&f("button",{onClick:()=>{u(b0(E.node))},style:{fontSize:"10px"},children:"inspect"}),k("span",{children:[" ",m+1,"/",h.length," "]}),f("span",{style:{maxWidth:"120px",fontWeight:E&&E.isCurrentlyInspected?"bold":"normal"},children:E&&` ${E.tagName.toLowerCase()}.${E.className.trim().replaceAll(" ",".")} ${E.id?`#${E.id}`:""}`})]})]}),r]})}function Kz(e,t,n){n.dataTransfer.setData("value",typeof e=="function"?e():e),n.dataTransfer.setData("text/plain",typeof e=="function"?e():e),n.stopPropagation(),t()}function Mt(e,t=()=>{}){return Kz.bind(null,e,t)}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -101,7 +101,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var Js=function(){return Js=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]=r.options.limit)return"break";!r.fonts.has(u.family)&&(r.options.families.length===0||r.options.families.includes(u.family))&&(r.options.categories.length===0||r.options.categories.includes(u.category))&&r.options.scripts.every(function(c){return u.scripts.includes(c)})&&r.options.variants.every(function(c){return u.variants.includes(c)})&&r.options.filter(u)===!0&&r.fonts.set(u.family,u)},r=this,o=0;o=r.options.limit)return"break";!r.fonts.has(u.family)&&(r.options.families.length===0||r.options.families.includes(u.family))&&(r.options.categories.length===0||r.options.categories.includes(u.category))&&r.options.scripts.every(function(c){return u.scripts.includes(c)})&&r.options.variants.every(function(c){return u.variants.includes(c)})&&r.options.filter(u)===!0&&r.fonts.set(u.family,u)},r=this,o=0;oVe(xe,null,function*(){const t=e.replace(/[^\w]/g,""),n=document.querySelector("style#"+t);if(n)return n.sheet.rules;let r;try{r=yield(yield fetch(e)).text()}catch(i){r="",console.info(`Failed fetching sheet ${e}`)}const o=document.createElement("style");return o.id=t,o.innerText=r,o.disabled=!0,document.head.appendChild(o),o.sheet.cssRules}),pj=(e,{style:{fontFamily:t,fontWeight:n,fontStyle:r}})=>{var i;const o=((i=e[t])==null?void 0:i.variants)||{};return o[`${n||"normal"}|${r||"normal"}`]={fontWeight:n||"normal",fontStyle:r||"normal"},e[t]={fontFamily:t,variants:o},e},hj=(e,t)=>Ve(xe,null,function*(){var o;return[...(o=t.href)!=null&&o.startsWith(G2)?yield dj(t.href):t.rules].filter(i=>i instanceof CSSFontFaceRule).reduce(pj,e)}),gj=e=>lh(e)||e.href.startsWith(G2),mj=()=>Ve(xe,null,function*(){const e=[...document.styleSheets].filter(gj);return Object.values(yield e.reduce(hj,{}))}),vj=e=>e.replace(/^"/,"").replace(/"$/,""),fv=e=>vj(e.replace(/,.*$/,"")),yj="AIzaSyBt0d8TsNo0wJn8Pj2zICtBY614IsEqrHw",bj=e=>{const[t,n]=x.useState(!1),{value:r,onChange:o}=e,[i,a]=x.useState([]);return x.useEffect(()=>{Ve(xe,null,function*(){const l=performance.now(),s=yield mj();console.info(`Loaded ${s.length} fonts in ms`,performance.now()-l),a(s)})},[]),k(x.Fragment,{children:[f(ce,{controls:[t,n],children:"Use Google picker (might crash)"}),!t||i.length===0?null:f(fj,{apiKey:yj,activeFontFamily:fv(r),families:i.map(l=>fv(l.fontFamily)),onChange:l=>{o(l.family)}}),f(mt,{value:r,onChange:o,options:i.map(({fontFamily:l})=>({label:l,value:l}))}),f(Re,{value:r,onChange:o})]})};var dv=function(e){var t=e,n,r={a:0,b:0,c:0},o=[],i=/(\[[^\]]+\])/g,a=/(#[^\#\s\+>~\.\[:\)]+)/g,l=/(\.[^\s\+>~\.\[:\)]+)/g,s=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,u=/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,c=/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,d=/([^\s\+>~\.\[:]+)/g;return n=function(p,h){var m,y,E,g,v,b;if(p.test(t))for(m=t.match(p),y=0,E=m.length;y~]/g," "),t=t.replace(/[#\.]/g," "),t=t.replace(/:not/g," "),t=t.replace(/:local/g," "),t=t.replace(/:global/g," "),t=t.replace(/[\(\)]/g," "),n(d,"c"),o.sort(function(p,h){return p.index-h.index}),{selector:e,specificity:"0,"+r.a.toString()+","+r.b.toString()+","+r.c.toString(),specificityArray:[0,r.a,r.b,r.c],parts:o}},wj=function(e,t){var n,r,o;if(typeof e=="string"){if(e.indexOf(",")!==-1)throw"Invalid CSS selector";n=dv(e).specificityArray}else if(Array.isArray(e)){if(e.filter(function(i){return typeof i=="number"}).length!==4)throw"Invalid specificity array";n=e}else throw"Invalid CSS selector or specificity array";if(typeof t=="string"){if(t.indexOf(",")!==-1)throw"Invalid CSS selector";r=dv(t).specificityArray}else if(Array.isArray(t)){if(t.filter(function(i){return typeof i=="number"}).length!==4)throw"Invalid specificity array";r=t}else throw"Invalid CSS selector or specificity array";for(o=0;o<4;o+=1){if(n[o]r[o])return 1}return 0};function xj(e,t){return Cr(e,t)!==e.length}function Cr(e,t){let n=!1,r=0,o=t+1;for(;o0||e[o]!==")");){if(n){n=!1,o++;continue}switch(e[o]){case"\\":n=!0;break;case")":r--;break;case"(":r++;break}o++}return o}function pv(e){let t=e,n;for(;n=new RegExp(":where\\(","d").exec(t);){const r=Cr(t,n.index+6);t=t.slice(0,n.index)+t.slice(r+1)}return t.replaceAll(/:not\([\s,]*\)/g,"").replaceAll(/,\s*,/g,",").replaceAll(/\(\s*,/g,"(")}function Qs(e,t=0){let n=e,r,o=0;for(;r=new RegExp(":not\\(","d").exec(n.slice(o));){const i=r.index+4+o,a=Cr(n,i),l=n.slice(i+1,a),u=Qs(l,t+1).split(",");let c=u[0];for(const p of u)p!==c&&Jo(c,p)===-1&&(c=p);const d=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=d.length,n=d+n.slice(a+1)}for(o=0;r=new RegExp(":is\\(","d").exec(n.slice(o));){const i=r.index+3+o,a=Cr(n,i),l=n.slice(i+1,a),u=Qs(l,t+1).split(",");let c=u[0];for(const p of u)Jo(c,p)===-1&&(c=p);const d=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=d.length,n=d+n.slice(a+1)}if(n.includes(",")){const i=n.split(",");let a;for(const l of i)(!a||Jo(a,l)===-1)&&(a=l);return a}return n}function Jo(e,t){return wj(Qs(pv(e)),Qs(pv(t)))}function Cj(e,t,n){const i=Object.keys(rt).filter(a=>{const l=_s(a);try{return e.matches(l)}catch(s){console.log("Failed testing scope selector:",l)}}).reduce((a,l)=>{const s=t.filter(({name:u})=>u in rt[l]);return a.push({selector:l,scopeVars:s}),a},[]).map(a=>{const{selector:l}=a,s=_s(l);if(!/,/.test(l))a.matchingSelector=l;else{let u=null,c=e;for(;u===null&&(c!=null&&c.parentNode);)u=ip([{selector:l,statelessSelector:s,property:"__definitely_not_exists__"}],c),c=c.parentNode;a.matchingSelector=u==null?void 0:u.winningSelector}return a});for(const a of n)a.scopes.length>i.length&&(a.scopes=a.scopes.map((l,s)=>[l,s]).sort(([l,s],[u,c])=>{const d=i.some(h=>h.selector===l.selector),p=i.some(h=>h.selector===u.selector);return d&&p||!d&&!p?s-c:d?1:-1}).map(([l])=>l));return i.sort((a,l)=>{try{const s=Jo(a.matchingSelector,l.matchingSelector);return s===0?-1:s*-1}catch(s){return console.log(a,l),console.log(s),-1}})}const Sj=e=>{const{id:t,tagName:n,classList:r}=e,o=n.toLowerCase(),i=t?`#${t}`:"";if(o==="body"||o==="html")return o;const a=[...r].filter(c=>c!==yu).map(c=>`.${c}`.replaceAll(/([^\w-.])/g,"\\$1")).join(" "),l=n.toLowerCase()+i+` -`+a;let s="";const u=e.closest("body");try{if(!i){const c=[...u.querySelectorAll(l.replaceAll(/\s+/g,""))];if(c.length===1)s="";else{for(let p=1;p<=c.length;p++);s=` (${c.indexOf(e)+1}/${c.length})`}}}catch(c){console.log(c)}return`${l}${s}`},Ej=({name:e,maxSpecific:t},{name:n,maxSpecific:r})=>{const o=new RegExp("--(?\\w+(-?-\\w+)*)(--(?(active|focus|visited|hover|disabled)))?--(?\\w+(-\\w+)*)"),{media:i,property:a}=t,{media:l,property:s}=r;if(a!==s)return a{const r=[],o={};let i,a=t,l=e;for(;i=a.parentNode;){const s=a;if(l.length===0)break;const u=vw({cssVars:l,target:i}),c={};let d=!1;for(const g of s.style)d=!0,c[g]=s.style[g];const p=u.length!u.includes(B)):[],v=p?Cj(s,n,r):[],b=Sj(s),F=o[b]||0;o[b]=F+1;const D=b+(F===0?"":`#${F}`),$=m?Fj(s):h?s.outerHTML+'
'+[...s.childNodes].reduce((B,P)=>{if(P.nodeName!=="use")return B;const L=P.href.baseVal.replace("#",""),K=document.getElementById(L);return B+(K==null?void 0:K.outerHTML)||""},"")+"
":null,_=s.tagName==="HTML"||s.tagName==="BODY",T={element:s,path:b0(s),elementInfo:{src:s.getAttribute("src"),srcset:s.getAttribute("srcset"),imgWidth:s.naturalWidth,imgHeight:s.naturalHeight,alt:s.getAttribute("alt"),html:$,width:h?s.getBoundingClientRect().width:null,title:s.getAttribute("title")},isRootElement:_,isDeepest:E,textContent:E&&[...s.childNodes].some(B=>B.nodeType===3&&B.textContent.trim()!=="")?s.textContent.trim():"",label:D,vars:g.map(B=>{let P;for(const{scopeVars:L,selector:K}of v)if(L.some(X=>X.name===B.name)){P=K;break}return q(z({},B),{currentScope:P})}),scopes:v,inlineStyles:d?c:null};r.push(T),l=u}a=i}return r},W2=ah;function Aj({selector:e,winningSelector:t="",property:n,index:r},o){const i=(t.split(",")[0].match(W2)||[]).join(""),a=(t.split(",")[0].match(/:(:(\w*(\-\w+)*)|after|before)/g)||[]).join(""),l=r?`#${r}`:"",s=n+i+o+a+l,u=n+i+"all"+a+(t===""?e:"")+l;return[s,u,i,a]}function x0(e){const t=e.split(","),n=[];let r="";for(const o of t){let i=!1,a=!1,l=0;const s=r+(r?",":"")+o;for(const u of s){if(i){i=!1;continue}if(u==="("&&!xj(s,l)){a=!0;break}u==="\\"&&(i=!0),l++}a?r+=(r?",":"")+o:(n.push(s),r="")}return r&&n.push(r),n}function ip(e,t){const n={};return e.reduce((r,o)=>{const i=o.statelessSelector;try{if(!i||!t.matches(i))return r}catch(c){return r}const a=x0(o.selector),l=(c,d)=>{const p=d.replace(W2,"").replaceAll(mw,"").trim().replaceAll(/^\s*>\s*/g,"").replaceAll(/\s*>\s*$/g,"> *");try{if(p===""||!t.matches(p))return c}catch(h){return console.log(p),c}try{const h=Jo(c,d)!==-1?d:c;if(h===d){if(n[p]&&d.length>n[p].length)return c;n[p]=d}return h}catch(h){return c}};o.winningSelector=a.reduce(l);const s=typeof t.style[o.property]!="undefined"&&t.style[o.property]!=="";if(s&&t.style.getPropertyPriority(o.property)==="important")return r;if(o.isImportant&&!(r!=null&&r.isImportant))return o;if(r!=null&&r.isImportant&&!o.isImportant||s)return r;if(r===null)return o;try{if(Jo(r.winningSelector,o.winningSelector)!==1)return o}catch(c){return console.log(c,r.winningSelector,o.winningSelector),o}return r},null)}const $j=(e,t)=>{const n=t.media||"all",r=e[n]||[];return e[n]=[...r,t],e},Dj=(e,t)=>{const n={},r=e.reduce((o,i)=>{const a=i.usages.reduce($j,{all:[]});let l=!1;return Object.entries(a).forEach(([s,u])=>{if(l)return;const c=ip(u,t)||u[0];if(!c||t.style[c.property]!==""&&/:(before|after)/.test(c.winningSelector))return;l=!0;const[d,p,h,m]=Aj(c,s);if(s!=="all"){!o[p]&&!n[p]&&(n[p]={});const y=o[p]||n[p];y.overridingMedia||(y.overridingMedia=[]),y.overridingMedia.push({media:s,cssVar:i}),i.allVar=y}if(!o[d])o[d]=q(z({},i),{maxSpecific:c,states:h,pseudos:m});else if(!o[d].usages.some(y=>y.property===c.property&&y.defaultValue&&(y.defaultValue.includes(`var(${i.name},`)||y.defaultValue.includes(`var(${i.name})`)))){const y=ip([o[d].maxSpecific,c],t);c===y&&(o[d]=q(z({},i),{maxSpecific:c,states:h,pseudos:m}))}}),o},{});return Object.values(r)},_j=e=>e.map(o=>{var i=o,{vars:t,element:n}=i,r=mn(i,["vars","element"]);return q(z({},r),{element:n,vars:Dj(t,n).sort(Ej)})});function C0(e=""){if(!e.includes("("))return!1;const t=e.indexOf("("),n=e.slice(0,t).toLowerCase();return!(!["calc","min","max","clamp"].includes(n)||Cr(e,t)oc(o.trim(),t));let r;for(const[,o]of n){if(r===void 0){r=o;continue}if(o!==r)throw new Error("All arguments need to be of the same type. "+e)}return[n.map(([o])=>o),r]}function oc(e,t){let n="",r=!1,o;const i=[];let a=0,l="",s="",u="";const c={"("(){const h=Cr(e,a);if(n==="var")throw new Error("Expression contains unresolved variable.");const m=e.substring(a+1,h),y=n.toLowerCase();if(y==="clamp"){const[E,g]=Mf(m,t);r=g;const[v,b,F]=E;n=parseFloat(b)parseFloat(F)?F:b,t.steps.push({mathFunc:"clamp",args:E,result:n})}else if(y==="min"){const[E,g]=Mf(m,t);r=g,n=E.reduce((v,b)=>bb>v?b:v,-1/0),t.steps.push({mathFunc:"max",args:E,result:n})}else{const[E,g]=oc(m,t);n=E,r=g}a=h},")"(){throw new Error("Unmatched closing bracket.")},"+"(){if(u===" "){if(l!==" "&&l!==void 0)throw new Error("Plus operator must be preceded by a space.");o=["+",n,r]}n=""},"-"(){if(u===" "){if(l!==" "&&l!==void 0)throw new Error("Minus operator must be preceded by a space.");o=["-",n,r],n=""}else n="-"},"/"(){o=["/",n,r],n=""},"*"(){o=["*",n,r],n=""}};for(;amv[o[0]]?i.push(o):([n,r]=Pf(o,n,t),o=null)),c[s]()):(n!==""||s!==" ")&&(n+=s),a++;for(o&&([n,r]=Pf(o,`${n}`.trim(),t,r));i.length>0;)[n,r]=Pf(i.pop(),n,t,r);const[d,p]=ap(`${n}`.trim(),t);return[d,p||r]}function Bj(e,t){const n=[];for(const r of t){r.steps=[];try{n.push([r,...oc(e,r)])}catch(o){r.steps.push({error:o.message}),n.push([r,o.message])}}return n}const Pj={min(e,t){return`Take lowest of [${e.join(", ")}] = ${t}`},max(e,t){return`Take highest of [${e.join(", ")}] = ${t}`},clamp([e,t,n],r){return`Clamp ${t} between ${e} and ${n} = ${r}`}};function Mj(e){const{referencedVars:t,elementScopes:n,expression:r}=e,o=rn(),{allVars:i}=x.useContext(it);return k(x.Fragment,{children:[f("br",{}),f("h5",{children:"Variables"}),f("ul",{style:{border:"1px solid black"},children:t.map(a=>{const l=i.find(s=>s.name===a)||{name:a,usages:[{property:"width"}],properties:{width:{isFullProperty:!0,fullValue:`var(--${a})`,isImportant:!1}},maxSpecific:{property:"width"},positions:[]};return f("li",{children:f($i,{cssVar:l,scopes:n,onChange:s=>{o({type:Ce.set,payload:{name:l.name,value:s}})},onUnset:()=>{o({type:Ce.unset,payload:{name:l.name}})}})},a)})})]})}function U2(e){const{value:t,resolvedValue:n,referencedVars:r,onChange:o,elementScopes:i,disabled:a=!1}=e,{width:l,height:s}=ae,{frameRef:u}=x.useContext(it),d=(t.startsWith("calc(")?t.replace(/calc\(/,"").replace(/\)$/,""):t).replaceAll("calc(","("),p=n.startsWith("calc(")?n.replace(/calc\(/,"").replace(/\)$/,""):n,h=p.replaceAll("calc(","("),m=getComputedStyle(u.current.contentWindow.document.documentElement).getPropertyValue("font-size"),y=parseFloat(m.replace("px","")),E=Bj(h,[{width:l,height:s,remFactor:y,resultUnit:"px"}]);return k("div",{children:[f("h3",{children:"Calculation"}),f(Re,{disabled:a,style:{width:"100%"},value:d,onChange:g=>o(C0(g)?g:`calc(${g})`)}),f("h4",{children:"Evaluates to"}),f("ul",{children:E.map(([{width:g,height:v,resultUnit:b,remFactor:F,steps:D},$,_])=>{const T=`${g}x${v}~${b}~${F}`;return k("li",{children:[k("code",{style:{cursor:"pointer",fontSize:"2rem"},onClick:()=>o(`${$}${b}`),children:[$,_&&b]}),f("pre",{children:k("code",{children:["at ",g,"x",v]})}),(r==null?void 0:r.length)>0&&f(Mj,{referencedVars:r,elementScopes:i,expression:d}),f("br",{}),f("code",{children:p}),f("h5",{children:"Steps"}),f("ul",{children:D.map((B,P)=>{let L;if(B.mathFunc){const{mathFunc:K,args:X,result:pe}=B;L=f("code",{children:Pj[K](X,pe)})}else if(B.operator){const{orig:{arg1:K,arg2:X},a:pe,operator:oe,b:ye,result:Le}=B;L=k("code",{title:`${K} ${oe} ${X}`,children:[pe," ",oe," ",ye," = ",Le]})}else if(B.error){const{error:K}=B;L=k("code",{children:["Error: ",K]})}else{const{before:K,result:X}=B;L=k("code",{children:[K," = ",X]})}return k("li",{children:[L,f("br",{}),f("br",{})]},P)})})]},T)})}),f("br",{}),k("i",{children:["Root font size: ",y,"px"]})]})}const Oj=["font-size","border","border-width","border-bottom","border-bottom-width","line-height","border-radius","margin","margin-bottom","margin-top","margin-left","margin-right","padding","padding-bottom","padding-left","padding-right","padding-top","padding-block-start","width","height","min-width","max-width","min-height","max-height","letter-spacing","outline-offset","top","bottom","left","right","outline-width","outline-offset","gap","block-size","inline-size","max-inline-size","min-inline-size"],V2=16,Rj=e=>e*V2,Nj=e=>e/V2,vv=e=>e&&e.match(/[\d.]+px$/),yv=e=>e&&e.match(/[\d.]+rem$/),Ij=e=>e&&e.match(/\d%$/),Lj=e=>e&&e.match(/vh$/),zj=e=>e&&e.match(/vw$/),jj=e=>{const{onChange:t,value:n,resolvedValue:r}=e,[o,i]=x.useState(.1),a=vv(n)?n.replace("px",""):yv(n)?Rj(parseFloat(n.replace("rem",""))):"",l=yv(n)?n.replace("rem",""):vv(n)?Nj(parseFloat(n.replace("px",""))):"";return C0(n)?f(U2,z({},e)):k("div",{className:"theme-length-controls",children:[k("div",{className:"theme-length-control control-px",style:{clear:"both"},children:[f("input",{type:"number",value:a,onChange:s=>{t(`${s.currentTarget.value}px`)}}),f("span",{children:"px"})]}),k("div",{className:"theme-length-control control-rem",children:[f("input",{step:.1,type:"number",value:l,onChange:s=>{t(`${s.currentTarget.value}rem`)}}),f("span",{children:"rem"})]}),k("div",{className:"theme-length-control control-pct",children:[f("input",{type:"number",value:Ij(n)?n.replace("%",""):"",onChange:s=>{t(`${s.currentTarget.value}%`)}}),f("span",{children:"%"})]}),k("div",{className:"theme-length-control control-vh",children:[f("input",{type:"number",value:Lj(n)?n.replace("vh",""):"",onChange:s=>{t(`${s.currentTarget.value}vh`)}}),f("span",{children:"vh"})]}),k("div",{className:"theme-length-control control-vw",children:[f("input",{type:"number",value:zj(n)?n.replace("vw",""):"",onChange:s=>{t(`${s.currentTarget.value}vw`)}}),f("span",{children:"vw"})]}),k("div",{className:"theme-length-control control-no-unit",children:[f("input",{step:o,type:"number",value:/(^\d+(\.\d*)?$|^\.\d+$)/.test(n)?n:"",onChange:s=>{t(s.currentTarget.value)}}),f("span",{children:"[no unit]"}),f("input",{type:"number",value:o,style:{fontSize:"10px"},onChange:s=>{i(s.currentTarget.value)}}),"step"]}),f("button",{disabled:n===0||n==="0",onClick:()=>{t("0")},children:"0"}),f("button",{onClick:()=>{t(`calc(${n})`)},children:"Calculate"}),f(Re,{value:n,onChange:t})]})},Hj=["transition-duration","animation-delay"],Gj=["1","10","100"],Wj=["0","1","100","1000","2000","3000"],Uj=e=>{const[t,n]=x.useState("100"),{value:r,onChange:o}=e,i=r.replace(/\D+/g,"");return k("div",{className:"",children:[f("input",{step:t,type:"number",value:i,onChange:a=>{o(`${a.currentTarget.value}ms`)}}),f("span",{children:"ms"}),f(mt,{style:{display:"inline"},options:Gj.map(kn),selected:t,onChange:a=>{n(a)}}),"step",Wj.map(a=>f("button",{disabled:i===a,onClick:()=>{o(`${a}ms`)},children:a},a))]})},Of=["normal","stretch","center","start","end","flex-start","flex-end","baseline","first baseline","last baseline","safe center","unsafe center"],bv=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Vj={"align-items":Of,"align-content":Of,"align-self":["self-start","self-end","stretch",...Of],"flex-direction":["row","row-reverse","column","column-reverse"],"justify-content":["center","start","end","flex-start","flex-end","left","right","normal","space-between","space-around","space-evenly","stretch","safe center","unsafe center"],"flex-wrap":["nowrap","wrap","wrap-reverse"],"border-collapse":["separate","collapse"],"empty-cells":["show","hide"],"font-variant-numeric":["normal","ordinal","slashed-zero","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","oldstyle-nums stacked-fractions"],"scroll-behavior":["auto","smooth"],"white-space":["normal","nowrap","pre","pre-wrap","pre-line","break-spaces"],"word-break":["normal","wordbreak-all","wordkeep-all","wordbreak-word"],"background-blend-mode":bv,"mix-blend-mode":bv,"border-style":["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"],"vertical-align":["baseline","sub","super","text-top","text-bottom","middle","top","bottom"],"text-rendering":["auto","optimizeSpeed","optimizeLegibility","geometricPrecision"]};function Kj(e){const{property:t}=e.usages[0];return Vj[t]}const kn=e=>({value:`${e}`,label:`${e}`}),cl=e=>e.name.includes("color")?!0:e.usages.some(({property:t})=>t.match(/color$/)||["background","background-image","fill","stroke","border-left"].includes(t)||t==="border"&&!e.name.includes("width")&&!e.name.includes("size")),Yj=({cssVar:e,value:t,resolvedValue:n,onChange:r,cssFunc:o,referencedVars:i,elementScopes:a})=>{if(!/^--/.test(e.name))return null;if(cl(e))return f(ez,{onChange:r,value:t,resolvedValue:n,cssVar:e,cssFunc:o});if(e.usages.some(s=>Oj.includes(s.property)))return f(jj,{value:t,resolvedValue:n,referencedVars:i,onChange:r,elementScopes:a});if(e.usages.some(s=>Hj.includes(s.property)))return f(Uj,{value:t,onChange:r});if(e.usages.some(s=>s.property==="font-weight")){const s=[100,200,300,400,500,600,700,800,900].map(kn),u=["normal","bold","lighter","bolder"].map(kn),c=!t||/^-?\d+$/.test(t);return k("div",{className:"font-weight-control",children:[f(mt,{value:t,onChange:r,style:{fontStyle:!t||!c?"italic":"normal"},options:[...t&&c?[]:[{value:"",label:"-- use a number --"}],...s]}),f(mt,{value:t,onChange:r,style:{fontStyle:!t||c?"italic":"normal"},options:[...t&&!c?[]:[{value:"",label:"-- use a word --"}],...u]})]})}if(e.usages.some(s=>s.property==="font-style")){const s=["normal","italic"].map(kn);return f(mt,{value:t,onChange:r,options:s})}const l=Kj(e);if(l)return f(mt,{value:t,onChange:r,options:l.map(kn)});if(e.usages.some(s=>s.property==="font-family"))return f(bj,{value:t,onChange:r});if(e.usages.some(s=>s.property==="box-shadow"||s.property==="text-shadow"))return f(x.Fragment,{children:f(Re,{value:t,onChange:r})});if(e.usages.some(s=>s.property==="display")){const s=["none","inline","inline-block","block","flex"].map(kn);return f(mt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="position")){const s=["absolute","relative","fixed","sticky"].map(kn);return f(mt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="text-align")){const s=["start","center","end"].map(kn);return k(x.Fragment,{children:[f(mt,{value:t,onChange:r,options:s}),f(Re,{value:t,onChange:r})]})}if(e.usages.some(s=>s.property==="text-decoration")){const s=["none","underline"].map(kn);return f(mt,{value:t,onChange:r,options:s})}return k(x.Fragment,{children:[!isNaN(t)&&f("input",{type:"number",onChange:s=>r(s.target.value),value:t}),e.usages.some(s=>s.property==="text-transform")&&f("button",{onClick:()=>r("none"),children:"None"}),f(Re,{value:t,onChange:r})]})};var ic={},Xj=ic.match=tH;ic.parse=K2;var qj=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,Jj=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,Qj=/^(?:(min|max)-)?(.+)/,Zj=/(em|rem|px|cm|mm|in|pt|pc)?$/,eH=/(dpi|dpcm|dppx)?$/;function tH(e,t){return K2(e).some(function(n){var r=n.inverse,o=n.type==="all"||t.type===n.type;if(o&&r||!(o||r))return!1;var i=n.expressions.every(function(a){var l=a.feature,s=a.modifier,u=a.value,c=t[l];if(!c)return!1;switch(l){case"orientation":case"scan":return c.toLowerCase()===u.toLowerCase();case"width":case"height":case"device-width":case"device-height":u=Cv(u),c=Cv(c);break;case"resolution":u=xv(u),c=xv(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":u=wv(u),c=wv(c);break;case"grid":case"color":case"color-index":case"monochrome":u=parseInt(u,10)||1,c=parseInt(c,10)||0;break}switch(s){case"min":return c>=u;case"max":return c<=u;default:return c===u}});return i&&!r||!i&&r})}function K2(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(qj),r=n[1],o=n[2],i=n[3]||"",a={};return a.inverse=!!r&&r.toLowerCase()==="not",a.type=o?o.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],a.expressions=i.map(function(l){var s=l.match(Jj),u=s[1].toLowerCase().match(Qj);return{modifier:u[1],feature:u[2],value:s[2]}}),a})}function wv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function xv(e){var t=parseFloat(e),n=String(e).match(eH)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function Cv(e){var t=parseFloat(e),n=String(e).match(Zj)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}const Y2=({media:e,width:t,cssVar:n})=>{const{overridingMedia:r}=n.allVar||n;let o=!e;return!!r&&r.some(({media:i,cssVar:a})=>o?ic.match(i,z({width:t},tC)):(a.name===n.name&&(o=!0),!1))};function nH(e){setTimeout(()=>{e==null||e.scrollIntoView({block:"center"})},0)}const rH=e=>{const{cssVar:t,media:n,element:r}=e,{screenOptions:o}=ae,[i,a]=J.width(),[,l]=J.height(),s=o.filter(({dims:[u]})=>u===i||n&&!ic.match(n,{type:"screen",width:u})?!1:!Y2({media:n,width:u,cssVar:t}));return f("ul",{className:"variable-screen-switcher",children:s.map(({label:u,dims:[c,d]})=>f("li",{children:f("button",{title:`Switch to ${u}`,onClick:p=>{a(c),l(d),nH(r),p.preventDefault(),p.stopPropagation()},children:f("span",{className:"variable-screen-switcher-screen",style:{width:`${c/42}px`,height:`${d/42}px`}})})},u))})};function Zs(e){const{source:t,line:n,column:r,generated:{sheet:o}}=e,{webpackHome:i,showSourceLinks:a}=ae;if(!a||!t||!i)return null;const l=t.replace("webpack://","");let s="";if(/\.\.\//.test(l)){let c=0,d,p;for(;typeof p!="string"||p!==d;)c++,p=d,d=l.replace("../","");const h=/\/[^\/]*$/;let m=o.replace(h,"");for(let y=0;yc.stopPropagation(),children:[t.replace("webpack://use-theme-editor/","").replace("node_modules/","")," ",n]})}const X2={background:"yellow"};function q2(e,t){return e.includes(":root")||!e||e===t||e===At||e==="body"||e==="html"||e===":where(html)"?t:` +***************************************************************************** */var op=function(e,t){return op=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},op(e,t)};function uj(e,t){op(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function cj(e){return e.replace(/\s+/g,"-").toLowerCase()}var fj=function(e){uj(t,e);function t(n){var r=e.call(this,n)||this;r.state={expanded:!1,loadingStatus:"loading"},r.componentDidMount=function(){r.fontManager.init().then(function(){r.setState({loadingStatus:"finished"})}).catch(function(g){r.setState({loadingStatus:"error"}),console.error("Error trying to fetch the list of available fonts"),console.error(g)})},r.componentDidUpdate=function(g){var v=r.props,b=v.activeFontFamily,F=v.onChange;b!==g.activeFontFamily&&r.setActiveFontFamily(b),F!==g.onChange&&r.fontManager.setOnChange(F)},r.onClose=function(g){for(var v=g.target,b=document.getElementById("font-picker"+r.fontManager.selectorSuffix);;){if(v===b)return;if(v.parentNode)v=v.parentNode;else{r.toggleExpanded();return}}},r.onSelection=function(g){var v=g.target,b=v.textContent;if(!b)throw Error("Missing font family in clicked font button");r.setActiveFontFamily(b),r.toggleExpanded()},r.setActiveFontFamily=function(g){r.fontManager.setActiveFont(g)},r.generateFontList=function(g){var v=r.props.activeFontFamily,b=r.state.loadingStatus;return b!=="finished"?w.createElement("div",null):w.createElement("ul",{className:"font-list"},g.map(function(F){var D=F.family===v,$=cj(F.family);return w.createElement("li",{key:$,className:"font-list-item"},w.createElement("button",{type:"button",id:"font-button-"+$+r.fontManager.selectorSuffix,className:"font-button "+(D?"active-font":""),onClick:r.onSelection,onKeyPress:r.onSelection},F.family))}))},r.toggleExpanded=function(){var g=r.state.expanded;g?(r.setState({expanded:!1}),document.removeEventListener("click",r.onClose)):(r.setState({expanded:!0}),document.addEventListener("click",r.onClose))},r.render=function(){var g=r.props,v=g.activeFontFamily,b=g.sort,F=r.state,D=F.expanded,$=F.loadingStatus,_=Array.from(r.fontManager.getFonts().values());return b==="alphabet"&&_.sort(function(T,B){return T.family.localeCompare(B.family)}),w.createElement("div",{id:"font-picker"+r.fontManager.selectorSuffix,className:D?"expanded":""},w.createElement("button",{type:"button",className:"dropdown-button",onClick:r.toggleExpanded,onKeyPress:r.toggleExpanded},w.createElement("p",{className:"dropdown-font-family"},v),w.createElement("p",{className:"dropdown-icon "+$})),$==="finished"&&r.generateFontList(_))};var o=r.props,i=o.apiKey,a=o.activeFontFamily,l=o.pickerId,s=o.families,u=o.categories,c=o.scripts,d=o.variants,p=o.filter,h=o.limit,m=o.sort,y=o.onChange,E={pickerId:l,families:s,categories:u,scripts:c,variants:d,filter:p,limit:h,sort:m};return r.fontManager=new sj(i,a,E,y),r}return t.defaultProps={activeFontFamily:H2,onChange:function(){},pickerId:vt.pickerId,families:vt.families,categories:vt.categories,scripts:vt.scripts,variants:vt.variants,filter:vt.filter,limit:vt.limit,sort:vt.sort},t}(x.PureComponent);const G2="https://fonts.googleapis.com",dj=e=>Ve(xe,null,function*(){const t=e.replace(/[^\w]/g,""),n=document.querySelector("style#"+t);if(n)return n.sheet.rules;let r;try{r=yield(yield fetch(e)).text()}catch(i){r="",console.info(`Failed fetching sheet ${e}`)}const o=document.createElement("style");return o.id=t,o.innerText=r,o.disabled=!0,document.head.appendChild(o),o.sheet.cssRules}),pj=(e,{style:{fontFamily:t,fontWeight:n,fontStyle:r}})=>{var i;const o=((i=e[t])==null?void 0:i.variants)||{};return o[`${n||"normal"}|${r||"normal"}`]={fontWeight:n||"normal",fontStyle:r||"normal"},e[t]={fontFamily:t,variants:o},e},hj=(e,t)=>Ve(xe,null,function*(){var o;return[...(o=t.href)!=null&&o.startsWith(G2)?yield dj(t.href):t.rules].filter(i=>i instanceof CSSFontFaceRule).reduce(pj,e)}),gj=e=>lh(e)||e.href.startsWith(G2),mj=()=>Ve(xe,null,function*(){const e=[...document.styleSheets].filter(gj);return Object.values(yield e.reduce(hj,{}))}),vj=e=>e.replace(/^"/,"").replace(/"$/,""),fv=e=>vj(e.replace(/,.*$/,"")),yj="AIzaSyBt0d8TsNo0wJn8Pj2zICtBY614IsEqrHw",bj=e=>{const[t,n]=x.useState(!1),{value:r,onChange:o}=e,[i,a]=x.useState([]);return x.useEffect(()=>{Ve(xe,null,function*(){const l=performance.now(),s=yield mj();console.info(`Loaded ${s.length} fonts in ms`,performance.now()-l),a(s)})},[]),k(x.Fragment,{children:[f(ce,{controls:[t,n],children:"Use Google picker (might crash)"}),!t||i.length===0?null:f(fj,{apiKey:yj,activeFontFamily:fv(r),families:i.map(l=>fv(l.fontFamily)),onChange:l=>{o(l.family)}}),f(mt,{value:r,onChange:o,options:i.map(({fontFamily:l})=>({label:l,value:l}))}),f(Re,{value:r,onChange:o})]})};var dv=function(e){var t=e,n,r={a:0,b:0,c:0},o=[],i=/(\[[^\]]+\])/g,a=/(#[^\#\s\+>~\.\[:\)]+)/g,l=/(\.[^\s\+>~\.\[:\)]+)/g,s=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,u=/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,c=/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,d=/([^\s\+>~\.\[:]+)/g;return n=function(p,h){var m,y,E,g,v,b;if(p.test(t))for(m=t.match(p),y=0,E=m.length;y~]/g," "),t=t.replace(/[#\.]/g," "),t=t.replace(/:not/g," "),t=t.replace(/:local/g," "),t=t.replace(/:global/g," "),t=t.replace(/[\(\)]/g," "),n(d,"c"),o.sort(function(p,h){return p.index-h.index}),{selector:e,specificity:"0,"+r.a.toString()+","+r.b.toString()+","+r.c.toString(),specificityArray:[0,r.a,r.b,r.c],parts:o}},wj=function(e,t){var n,r,o;if(typeof e=="string"){if(e.indexOf(",")!==-1)throw"Invalid CSS selector";n=dv(e).specificityArray}else if(Array.isArray(e)){if(e.filter(function(i){return typeof i=="number"}).length!==4)throw"Invalid specificity array";n=e}else throw"Invalid CSS selector or specificity array";if(typeof t=="string"){if(t.indexOf(",")!==-1)throw"Invalid CSS selector";r=dv(t).specificityArray}else if(Array.isArray(t)){if(t.filter(function(i){return typeof i=="number"}).length!==4)throw"Invalid specificity array";r=t}else throw"Invalid CSS selector or specificity array";for(o=0;o<4;o+=1){if(n[o]r[o])return 1}return 0};function xj(e,t){return Cr(e,t)!==e.length}function Cr(e,t){let n=!1,r=0,o=t+1;for(;o0||e[o]!==")");){if(n){n=!1,o++;continue}switch(e[o]){case"\\":n=!0;break;case")":r--;break;case"(":r++;break}o++}return o}function pv(e){let t=e,n;for(;n=new RegExp(":where\\(","d").exec(t);){const r=Cr(t,n.index+6);t=t.slice(0,n.index)+t.slice(r+1)}return t.replaceAll(/:not\([\s,]*\)/g,"").replaceAll(/,\s*,/g,",").replaceAll(/\(\s*,/g,"(")}function Js(e,t=0){let n=e,r,o=0;for(;r=new RegExp(":not\\(","d").exec(n.slice(o));){const i=r.index+4+o,a=Cr(n,i),l=n.slice(i+1,a),u=Js(l,t+1).split(",");let c=u[0];for(const p of u)p!==c&&Qo(c,p)===-1&&(c=p);const d=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=d.length,n=d+n.slice(a+1)}for(o=0;r=new RegExp(":is\\(","d").exec(n.slice(o));){const i=r.index+3+o,a=Cr(n,i),l=n.slice(i+1,a),u=Js(l,t+1).split(",");let c=u[0];for(const p of u)Qo(c,p)===-1&&(c=p);const d=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=d.length,n=d+n.slice(a+1)}if(n.includes(",")){const i=n.split(",");let a;for(const l of i)(!a||Qo(a,l)===-1)&&(a=l);return a}return n}function Qo(e,t){return wj(Js(pv(e)),Js(pv(t)))}function Cj(e,t,n){const i=Object.keys(rt).filter(a=>{const l=Ds(a);try{return e.matches(l)}catch(s){console.log("Failed testing scope selector:",l)}}).reduce((a,l)=>{const s=t.filter(({name:u})=>u in rt[l]);return a.push({selector:l,scopeVars:s}),a},[]).map(a=>{const{selector:l}=a,s=Ds(l);if(!/,/.test(l))a.matchingSelector=l;else{let u=null,c=e;for(;u===null&&(c!=null&&c.parentNode);)u=ip([{selector:l,statelessSelector:s,property:"__definitely_not_exists__"}],c),c=c.parentNode;a.matchingSelector=u==null?void 0:u.winningSelector}return a});for(const a of n)a.scopes.length>i.length&&(a.scopes=a.scopes.map((l,s)=>[l,s]).sort(([l,s],[u,c])=>{const d=i.some(h=>h.selector===l.selector),p=i.some(h=>h.selector===u.selector);return d&&p||!d&&!p?s-c:d?1:-1}).map(([l])=>l));return i.sort((a,l)=>{try{const s=Qo(a.matchingSelector,l.matchingSelector);return s===0?-1:s*-1}catch(s){return console.log(a,l),console.log(s),-1}})}const Sj=e=>{const{id:t,tagName:n,classList:r}=e,o=n.toLowerCase(),i=t?`#${t}`:"";if(o==="body"||o==="html")return o;const a=[...r].filter(c=>c!==vu).map(c=>`.${c}`.replaceAll(/([^\w-.])/g,"\\$1")).join(" "),l=n.toLowerCase()+i+` +`+a;let s="";const u=e.closest("body");try{if(!i){const c=[...u.querySelectorAll(l.replaceAll(/\s+/g,""))];if(c.length===1)s="";else{for(let p=1;p<=c.length;p++);s=` (${c.indexOf(e)+1}/${c.length})`}}}catch(c){console.log(c)}return`${l}${s}`},Ej=({name:e,maxSpecific:t},{name:n,maxSpecific:r})=>{const o=new RegExp("--(?\\w+(-?-\\w+)*)(--(?(active|focus|visited|hover|disabled)))?--(?\\w+(-\\w+)*)"),{media:i,property:a}=t,{media:l,property:s}=r;if(a!==s)return a{const r=[],o={};let i,a=t,l=e;for(;i=a.parentNode;){const s=a;if(l.length===0)break;const u=vw({cssVars:l,target:i}),c={};let d=!1;for(const g of s.style)d=!0,c[g]=s.style[g];const p=u.length!u.includes(B)):[],v=p?Cj(s,n,r):[],b=Sj(s),F=o[b]||0;o[b]=F+1;const D=b+(F===0?"":`#${F}`),$=m?Fj(s):h?s.outerHTML+'
'+[...s.childNodes].reduce((B,P)=>{if(P.nodeName!=="use")return B;const L=P.href.baseVal.replace("#",""),K=document.getElementById(L);return B+(K==null?void 0:K.outerHTML)||""},"")+"
":null,_=s.tagName==="HTML"||s.tagName==="BODY",T={element:s,path:b0(s),elementInfo:{src:s.getAttribute("src"),srcset:s.getAttribute("srcset"),imgWidth:s.naturalWidth,imgHeight:s.naturalHeight,alt:s.getAttribute("alt"),html:$,width:h?s.getBoundingClientRect().width:null,title:s.getAttribute("title")},isRootElement:_,isDeepest:E,textContent:E&&[...s.childNodes].some(B=>B.nodeType===3&&B.textContent.trim()!=="")?s.textContent.trim():"",label:D,vars:g.map(B=>{let P;for(const{scopeVars:L,selector:K}of v)if(L.some(X=>X.name===B.name)){P=K;break}return q(z({},B),{currentScope:P})}),scopes:v,inlineStyles:d?c:null};r.push(T),l=u}a=i}return r},W2=ah;function Aj({selector:e,winningSelector:t="",property:n,index:r},o){const i=(t.split(",")[0].match(W2)||[]).join(""),a=(t.split(",")[0].match(/:(:(\w*(\-\w+)*)|after|before)/g)||[]).join(""),l=r?`#${r}`:"",s=n+i+o+a+l,u=n+i+"all"+a+(t===""?e:"")+l;return[s,u,i,a]}function x0(e){const t=e.split(","),n=[];let r="";for(const o of t){let i=!1,a=!1,l=0;const s=r+(r?",":"")+o;for(const u of s){if(i){i=!1;continue}if(u==="("&&!xj(s,l)){a=!0;break}u==="\\"&&(i=!0),l++}a?r+=(r?",":"")+o:(n.push(s),r="")}return r&&n.push(r),n}function ip(e,t){const n={};return e.reduce((r,o)=>{const i=o.statelessSelector;try{if(!i||!t.matches(i))return r}catch(c){return r}const a=x0(o.selector),l=(c,d)=>{const p=d.replace(W2,"").replaceAll(mw,"").trim().replaceAll(/^\s*>\s*/g,"").replaceAll(/\s*>\s*$/g,"> *");try{if(p===""||!t.matches(p))return c}catch(h){return console.log(p),c}try{const h=Qo(c,d)!==-1?d:c;if(h===d){if(n[p]&&d.length>n[p].length)return c;n[p]=d}return h}catch(h){return c}};o.winningSelector=a.reduce(l);const s=typeof t.style[o.property]!="undefined"&&t.style[o.property]!=="";if(s&&t.style.getPropertyPriority(o.property)==="important")return r;if(o.isImportant&&!(r!=null&&r.isImportant))return o;if(r!=null&&r.isImportant&&!o.isImportant||s)return r;if(r===null)return o;try{if(Qo(r.winningSelector,o.winningSelector)!==1)return o}catch(c){return console.log(c,r.winningSelector,o.winningSelector),o}return r},null)}const $j=(e,t)=>{const n=t.media||"all",r=e[n]||[];return e[n]=[...r,t],e},Dj=(e,t)=>{const n={},r=e.reduce((o,i)=>{const a=i.usages.reduce($j,{all:[]});let l=!1;return Object.entries(a).forEach(([s,u])=>{if(l)return;const c=ip(u,t)||u[0];if(!c||t.style[c.property]!==""&&/:(before|after)/.test(c.winningSelector))return;l=!0;const[d,p,h,m]=Aj(c,s);if(s!=="all"){!o[p]&&!n[p]&&(n[p]={});const y=o[p]||n[p];y.overridingMedia||(y.overridingMedia=[]),y.overridingMedia.push({media:s,cssVar:i}),i.allVar=y}if(!o[d])o[d]=q(z({},i),{maxSpecific:c,states:h,pseudos:m});else if(!o[d].usages.some(y=>y.property===c.property&&y.defaultValue&&(y.defaultValue.includes(`var(${i.name},`)||y.defaultValue.includes(`var(${i.name})`)))){const y=ip([o[d].maxSpecific,c],t);c===y&&(o[d]=q(z({},i),{maxSpecific:c,states:h,pseudos:m}))}}),o},{});return Object.values(r)},_j=e=>e.map(o=>{var i=o,{vars:t,element:n}=i,r=mn(i,["vars","element"]);return q(z({},r),{element:n,vars:Dj(t,n).sort(Ej)})});function C0(e=""){if(!e.includes("("))return!1;const t=e.indexOf("("),n=e.slice(0,t).toLowerCase();return!(!["calc","min","max","clamp"].includes(n)||Cr(e,t)oc(o.trim(),t));let r;for(const[,o]of n){if(r===void 0){r=o;continue}if(o!==r)throw new Error("All arguments need to be of the same type. "+e)}return[n.map(([o])=>o),r]}function oc(e,t){let n="",r=!1,o;const i=[];let a=0,l="",s="",u="";const c={"("(){const h=Cr(e,a);if(n==="var")throw new Error("Expression contains unresolved variable.");const m=e.substring(a+1,h),y=n.toLowerCase();if(y==="clamp"){const[E,g]=Mf(m,t);r=g;const[v,b,F]=E;n=parseFloat(b)parseFloat(F)?F:b,t.steps.push({mathFunc:"clamp",args:E,result:n})}else if(y==="min"){const[E,g]=Mf(m,t);r=g,n=E.reduce((v,b)=>bb>v?b:v,-1/0),t.steps.push({mathFunc:"max",args:E,result:n})}else{const[E,g]=oc(m,t);n=E,r=g}a=h},")"(){throw new Error("Unmatched closing bracket.")},"+"(){if(u===" "){if(l!==" "&&l!==void 0)throw new Error("Plus operator must be preceded by a space.");o=["+",n,r]}n=""},"-"(){if(u===" "){if(l!==" "&&l!==void 0)throw new Error("Minus operator must be preceded by a space.");o=["-",n,r],n=""}else n="-"},"/"(){o=["/",n,r],n=""},"*"(){o=["*",n,r],n=""}};for(;amv[o[0]]?i.push(o):([n,r]=Pf(o,n,t),o=null)),c[s]()):(n!==""||s!==" ")&&(n+=s),a++;for(o&&([n,r]=Pf(o,`${n}`.trim(),t,r));i.length>0;)[n,r]=Pf(i.pop(),n,t,r);const[d,p]=ap(`${n}`.trim(),t);return[d,p||r]}function Bj(e,t){const n=[];for(const r of t){r.steps=[];try{n.push([r,...oc(e,r)])}catch(o){r.steps.push({error:o.message}),n.push([r,o.message])}}return n}const Pj={min(e,t){return`Take lowest of [${e.join(", ")}] = ${t}`},max(e,t){return`Take highest of [${e.join(", ")}] = ${t}`},clamp([e,t,n],r){return`Clamp ${t} between ${e} and ${n} = ${r}`}};function Mj(e){const{referencedVars:t,elementScopes:n,expression:r}=e,o=rn(),{allVars:i}=x.useContext(it);return k(x.Fragment,{children:[f("br",{}),f("h5",{children:"Variables"}),f("ul",{style:{border:"1px solid black"},children:t.map(a=>{const l=i.find(s=>s.name===a)||{name:a,usages:[{property:"width"}],properties:{width:{isFullProperty:!0,fullValue:`var(--${a})`,isImportant:!1}},maxSpecific:{property:"width"},positions:[]};return f("li",{children:f($i,{cssVar:l,scopes:n,onChange:s=>{o({type:Ce.set,payload:{name:l.name,value:s}})},onUnset:()=>{o({type:Ce.unset,payload:{name:l.name}})}})},a)})})]})}function U2(e){const{value:t,resolvedValue:n,referencedVars:r,onChange:o,elementScopes:i,disabled:a=!1}=e,{width:l,height:s}=ae,{frameRef:u}=x.useContext(it),d=(t.startsWith("calc(")?t.replace(/calc\(/,"").replace(/\)$/,""):t).replaceAll("calc(","("),p=n.startsWith("calc(")?n.replace(/calc\(/,"").replace(/\)$/,""):n,h=p.replaceAll("calc(","("),m=getComputedStyle(u.current.contentWindow.document.documentElement).getPropertyValue("font-size"),y=parseFloat(m.replace("px","")),E=Bj(h,[{width:l,height:s,remFactor:y,resultUnit:"px"}]);return k("div",{children:[f("h3",{children:"Calculation"}),f(Re,{disabled:a,style:{width:"100%"},value:d,onChange:g=>o(C0(g)?g:`calc(${g})`)}),f("h4",{children:"Evaluates to"}),f("ul",{children:E.map(([{width:g,height:v,resultUnit:b,remFactor:F,steps:D},$,_])=>{const T=`${g}x${v}~${b}~${F}`;return k("li",{children:[k("code",{style:{cursor:"pointer",fontSize:"2rem"},onClick:()=>o(`${$}${b}`),children:[$,_&&b]}),f("pre",{children:k("code",{children:["at ",g,"x",v]})}),(r==null?void 0:r.length)>0&&f(Mj,{referencedVars:r,elementScopes:i,expression:d}),f("br",{}),f("code",{children:p}),f("h5",{children:"Steps"}),f("ul",{children:D.map((B,P)=>{let L;if(B.mathFunc){const{mathFunc:K,args:X,result:pe}=B;L=f("code",{children:Pj[K](X,pe)})}else if(B.operator){const{orig:{arg1:K,arg2:X},a:pe,operator:oe,b:ye,result:Le}=B;L=k("code",{title:`${K} ${oe} ${X}`,children:[pe," ",oe," ",ye," = ",Le]})}else if(B.error){const{error:K}=B;L=k("code",{children:["Error: ",K]})}else{const{before:K,result:X}=B;L=k("code",{children:[K," = ",X]})}return k("li",{children:[L,f("br",{}),f("br",{})]},P)})})]},T)})}),f("br",{}),k("i",{children:["Root font size: ",y,"px"]})]})}const Oj=["font-size","border","border-width","border-bottom","border-bottom-width","line-height","border-radius","margin","margin-bottom","margin-top","margin-left","margin-right","padding","padding-bottom","padding-left","padding-right","padding-top","padding-block-start","width","height","min-width","max-width","min-height","max-height","letter-spacing","outline-offset","top","bottom","left","right","outline-width","outline-offset","gap","block-size","inline-size","max-inline-size","min-inline-size"],V2=16,Rj=e=>e*V2,Nj=e=>e/V2,vv=e=>e&&e.match(/[\d.]+px$/),yv=e=>e&&e.match(/[\d.]+rem$/),Ij=e=>e&&e.match(/\d%$/),Lj=e=>e&&e.match(/vh$/),zj=e=>e&&e.match(/vw$/),jj=e=>{const{onChange:t,value:n,resolvedValue:r}=e,[o,i]=x.useState(.1),a=vv(n)?n.replace("px",""):yv(n)?Rj(parseFloat(n.replace("rem",""))):"",l=yv(n)?n.replace("rem",""):vv(n)?Nj(parseFloat(n.replace("px",""))):"";return C0(n)?f(U2,z({},e)):k("div",{className:"theme-length-controls",children:[k("div",{className:"theme-length-control control-px",style:{clear:"both"},children:[f("input",{type:"number",value:a,onChange:s=>{t(`${s.currentTarget.value}px`)}}),f("span",{children:"px"})]}),k("div",{className:"theme-length-control control-rem",children:[f("input",{step:.1,type:"number",value:l,onChange:s=>{t(`${s.currentTarget.value}rem`)}}),f("span",{children:"rem"})]}),k("div",{className:"theme-length-control control-pct",children:[f("input",{type:"number",value:Ij(n)?n.replace("%",""):"",onChange:s=>{t(`${s.currentTarget.value}%`)}}),f("span",{children:"%"})]}),k("div",{className:"theme-length-control control-vh",children:[f("input",{type:"number",value:Lj(n)?n.replace("vh",""):"",onChange:s=>{t(`${s.currentTarget.value}vh`)}}),f("span",{children:"vh"})]}),k("div",{className:"theme-length-control control-vw",children:[f("input",{type:"number",value:zj(n)?n.replace("vw",""):"",onChange:s=>{t(`${s.currentTarget.value}vw`)}}),f("span",{children:"vw"})]}),k("div",{className:"theme-length-control control-no-unit",children:[f("input",{step:o,type:"number",value:/(^\d+(\.\d*)?$|^\.\d+$)/.test(n)?n:"",onChange:s=>{t(s.currentTarget.value)}}),f("span",{children:"[no unit]"}),f("input",{type:"number",value:o,style:{fontSize:"10px"},onChange:s=>{i(s.currentTarget.value)}}),"step"]}),f("button",{disabled:n===0||n==="0",onClick:()=>{t("0")},children:"0"}),f("button",{onClick:()=>{t(`calc(${n})`)},children:"Calculate"}),f(Re,{value:n,onChange:t})]})},Hj=["transition-duration","animation-delay"],Gj=["1","10","100"],Wj=["0","1","100","1000","2000","3000"],Uj=e=>{const[t,n]=x.useState("100"),{value:r,onChange:o}=e,i=r.replace(/\D+/g,"");return k("div",{className:"",children:[f("input",{step:t,type:"number",value:i,onChange:a=>{o(`${a.currentTarget.value}ms`)}}),f("span",{children:"ms"}),f(mt,{style:{display:"inline"},options:Gj.map(kn),selected:t,onChange:a=>{n(a)}}),"step",Wj.map(a=>f("button",{disabled:i===a,onClick:()=>{o(`${a}ms`)},children:a},a))]})},Of=["normal","stretch","center","start","end","flex-start","flex-end","baseline","first baseline","last baseline","safe center","unsafe center"],bv=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Vj={"align-items":Of,"align-content":Of,"align-self":["self-start","self-end","stretch",...Of],"flex-direction":["row","row-reverse","column","column-reverse"],"justify-content":["center","start","end","flex-start","flex-end","left","right","normal","space-between","space-around","space-evenly","stretch","safe center","unsafe center"],"flex-wrap":["nowrap","wrap","wrap-reverse"],"border-collapse":["separate","collapse"],"empty-cells":["show","hide"],"font-variant-numeric":["normal","ordinal","slashed-zero","lining-nums","oldstyle-nums","proportional-nums","tabular-nums","diagonal-fractions","stacked-fractions","oldstyle-nums stacked-fractions"],"scroll-behavior":["auto","smooth"],"white-space":["normal","nowrap","pre","pre-wrap","pre-line","break-spaces"],"word-break":["normal","wordbreak-all","wordkeep-all","wordbreak-word"],"background-blend-mode":bv,"mix-blend-mode":bv,"border-style":["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"],"vertical-align":["baseline","sub","super","text-top","text-bottom","middle","top","bottom"],"text-rendering":["auto","optimizeSpeed","optimizeLegibility","geometricPrecision"]};function Kj(e){const{property:t}=e.usages[0];return Vj[t]}const kn=e=>({value:`${e}`,label:`${e}`}),ul=e=>e.name.includes("color")?!0:e.usages.some(({property:t})=>t.match(/color$/)||["background","background-image","fill","stroke","border-left"].includes(t)||t==="border"&&!e.name.includes("width")&&!e.name.includes("size")),Yj=({cssVar:e,value:t,resolvedValue:n,onChange:r,cssFunc:o,referencedVars:i,elementScopes:a})=>{if(!/^--/.test(e.name))return null;if(ul(e))return f(ez,{onChange:r,value:t,resolvedValue:n,cssVar:e,cssFunc:o});if(e.usages.some(s=>Oj.includes(s.property)))return f(jj,{value:t,resolvedValue:n,referencedVars:i,onChange:r,elementScopes:a});if(e.usages.some(s=>Hj.includes(s.property)))return f(Uj,{value:t,onChange:r});if(e.usages.some(s=>s.property==="font-weight")){const s=[100,200,300,400,500,600,700,800,900].map(kn),u=["normal","bold","lighter","bolder"].map(kn),c=!t||/^-?\d+$/.test(t);return k("div",{className:"font-weight-control",children:[f(mt,{value:t,onChange:r,style:{fontStyle:!t||!c?"italic":"normal"},options:[...t&&c?[]:[{value:"",label:"-- use a number --"}],...s]}),f(mt,{value:t,onChange:r,style:{fontStyle:!t||c?"italic":"normal"},options:[...t&&!c?[]:[{value:"",label:"-- use a word --"}],...u]})]})}if(e.usages.some(s=>s.property==="font-style")){const s=["normal","italic"].map(kn);return f(mt,{value:t,onChange:r,options:s})}const l=Kj(e);if(l)return f(mt,{value:t,onChange:r,options:l.map(kn)});if(e.usages.some(s=>s.property==="font-family"))return f(bj,{value:t,onChange:r});if(e.usages.some(s=>s.property==="box-shadow"||s.property==="text-shadow"))return f(x.Fragment,{children:f(Re,{value:t,onChange:r})});if(e.usages.some(s=>s.property==="display")){const s=["none","inline","inline-block","block","flex"].map(kn);return f(mt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="position")){const s=["absolute","relative","fixed","sticky"].map(kn);return f(mt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="text-align")){const s=["start","center","end"].map(kn);return k(x.Fragment,{children:[f(mt,{value:t,onChange:r,options:s}),f(Re,{value:t,onChange:r})]})}if(e.usages.some(s=>s.property==="text-decoration")){const s=["none","underline"].map(kn);return f(mt,{value:t,onChange:r,options:s})}return k(x.Fragment,{children:[!isNaN(t)&&f("input",{type:"number",onChange:s=>r(s.target.value),value:t}),e.usages.some(s=>s.property==="text-transform")&&f("button",{onClick:()=>r("none"),children:"None"}),f(Re,{value:t,onChange:r})]})};var ic={},Xj=ic.match=tH;ic.parse=K2;var qj=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,Jj=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,Qj=/^(?:(min|max)-)?(.+)/,Zj=/(em|rem|px|cm|mm|in|pt|pc)?$/,eH=/(dpi|dpcm|dppx)?$/;function tH(e,t){return K2(e).some(function(n){var r=n.inverse,o=n.type==="all"||t.type===n.type;if(o&&r||!(o||r))return!1;var i=n.expressions.every(function(a){var l=a.feature,s=a.modifier,u=a.value,c=t[l];if(!c)return!1;switch(l){case"orientation":case"scan":return c.toLowerCase()===u.toLowerCase();case"width":case"height":case"device-width":case"device-height":u=Cv(u),c=Cv(c);break;case"resolution":u=xv(u),c=xv(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":u=wv(u),c=wv(c);break;case"grid":case"color":case"color-index":case"monochrome":u=parseInt(u,10)||1,c=parseInt(c,10)||0;break}switch(s){case"min":return c>=u;case"max":return c<=u;default:return c===u}});return i&&!r||!i&&r})}function K2(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(qj),r=n[1],o=n[2],i=n[3]||"",a={};return a.inverse=!!r&&r.toLowerCase()==="not",a.type=o?o.toLowerCase():"all",i=i.match(/\([^\)]+\)/g)||[],a.expressions=i.map(function(l){var s=l.match(Jj),u=s[1].toLowerCase().match(Qj);return{modifier:u[1],feature:u[2],value:s[2]}}),a})}function wv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function xv(e){var t=parseFloat(e),n=String(e).match(eH)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function Cv(e){var t=parseFloat(e),n=String(e).match(Zj)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}const Y2=({media:e,width:t,cssVar:n})=>{const{overridingMedia:r}=n.allVar||n;let o=!e;return!!r&&r.some(({media:i,cssVar:a})=>o?ic.match(i,z({width:t},tC)):(a.name===n.name&&(o=!0),!1))};function nH(e){setTimeout(()=>{e==null||e.scrollIntoView({block:"center"})},0)}const rH=e=>{const{cssVar:t,media:n,element:r}=e,{screenOptions:o}=ae,[i,a]=J.width(),[,l]=J.height(),s=o.filter(({dims:[u]})=>u===i||n&&!ic.match(n,{type:"screen",width:u})?!1:!Y2({media:n,width:u,cssVar:t}));return f("ul",{className:"variable-screen-switcher",children:s.map(({label:u,dims:[c,d]})=>f("li",{children:f("button",{title:`Switch to ${u}`,onClick:p=>{a(c),l(d),nH(r),p.preventDefault(),p.stopPropagation()},children:f("span",{className:"variable-screen-switcher-screen",style:{width:`${c/42}px`,height:`${d/42}px`}})})},u))})};function Qs(e){const{source:t,line:n,column:r,generated:{sheet:o}}=e,{webpackHome:i,showSourceLinks:a}=ae;if(!a||!t||!i)return null;const l=t.replace("webpack://","");let s="";if(/\.\.\//.test(l)){let c=0,d,p;for(;typeof p!="string"||p!==d;)c++,p=d,d=l.replace("../","");const h=/\/[^\/]*$/;let m=o.replace(h,"");for(let y=0;yc.stopPropagation(),children:[t.replace("webpack://use-theme-editor/","").replace("node_modules/","")," ",n]})}const X2={background:"yellow"};function q2(e,t){return e.includes(":root")||!e||e===t||e===At||e==="body"||e==="html"||e===":where(html)"?t:` :where( ${e}, :is(${e}) * ):where( ${t} -)`}function Sv(e){const{scope:t,selector:n,highLightMatch:r,position:o,property:i,isLocal:a,hideIfNotFound:l}=e,s=a?q2(t,n):n;return s?k("li",{style:r?X2:{},children:[!!o&&f(Zs,z({},o)),f(ui,{label:n,selector:s,initialized:!0,showLabel:!0,property:i,hideIfNotFound:l})]},n):k("li",{children:[!!o&&f(Zs,z({},o)),f("code",{children:n}),";a"]},n)}const J2=({usages:e,maxSpecificSelector:t,winningSelector:n,scope:r=":root"})=>{const[o,i]=se("use local scope selectors",!0),[a,l]=se("hide not found usages",!0),[s,u]=x.useState({}),c={},d=e.filter(({selector:h})=>h in c?(c[h]++,!1):(c[h]=1,!0));if(e.length===1&&!e[0].selector)return null;const p=r.includes(":root");return k(x.Fragment,{children:[!p&&f(ce,{controls:[o,i],title:r,children:"In local scope"}),f(ce,{controls:[a,l],title:r,children:"Only on this page"}),f("ul",{children:d.map(({property:h,selector:m,position:y})=>{const E=x0(m),g=e.length>1&&m===t;return E.length>1?k("li",{style:{border:"1px solid gray"},children:[!!y&&f(Zs,z({},y)),f("h4",{style:g?X2:{},onClick:()=>u(q(z({},s),{[m]:!s[m]})),children:f("div",{className:"monospace-code",style:{backgroundColor:"#d0d7de"},children:m.replaceAll(/\s*\,\s*/g,`, -`).trim().substring(0,100)})}),!s[m]&&f("ul",{style:{marginLeft:"16px"},children:E.map(v=>f(Sv,{scope:r,selector:v,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${v}`))})]},m):f(Sv,{scope:r,selector:m,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${m}`)})})]})};function Q2(e){const{references:t,excludedVarName:n}=e,[r,o]=x.useState(!0);return t.length===0?null:k("div",{style:{marginLeft:"24px",marginTop:"8px"},children:[f(ce,{title:"Show only elements that were found on the page ",controls:[r,o],children:"Filter found"}),f("ul",{style:{marginTop:"0"},children:t.map(([{name:i,usages:a},l])=>i===n?null:k(x.Fragment,{children:[f("h5",{style:{marginTop:"8px"},children:f(pr,{name:i})}),l.map(s=>{const u=a.reduce((d,p)=>d+","+p.selector,"").replace(/^,/,""),c=q2(s,u);return k("li",{style:{borderBottom:"1px solid gray"},children:[s!==":root"&&f("code",{style:{marginTop:"4px"},className:"monospace-code",children:s}),f("div",{draggable:!0,onDragStart:Mt(()=>`var(${i})`)}),f(ui,{label:u,hideIfNotFound:r,initialized:!0,selector:c})]},i)})]}))})]})}const oH=[":root",":where(html)","html"],Ev=20;function iH(e){const{themeEditor:{scopes:t}}=ae,n=t[At]||{},{value:r,onChange:o,elementScopes:i=[]}=e,[a,l]=x.useState(""),[s,u]=x.useState(""),[c,d]=x.useState(!0),p=x.useRef();x.useEffect(()=>{var F;return(F=p.current)==null?void 0:F.scrollIntoView({block:"nearest"})},[r]);const h=x.useMemo(()=>{const F=Object.entries(rt).reduce(($,[_,T])=>{if(i.some(B=>B.selector===_)||c&&oH.includes(_))for(const B in T)$[B]=T[B];return $},{}),D=z(z({},F),n);return Object.entries(D).filter(([$,_])=>typeof _!="undefined"&&_!==""&&(!a||new RegExp(a.replaceAll(" ","(\\-\\-?| )")).test($))&&(!s||new RegExp(s.replaceAll(" ","(\\-\\-?| )")).test(_)))},[a,s,n,c]),[m,y]=x.useState(!1),E=m?null:h.findIndex(([F])=>`var(${F})`===r),g=m?null:E-Ev,v=m?null:E+Ev,b=performance.now();return k("div",{onClick:F=>F.stopPropagation(),style:{},children:[f(ce,{controls:[c,d],children:"Global values"}),k("div",{style:{display:"flex",width:"100%"},children:[f(Re,{placeholder:`Filter name ${h.length}`,value:a,onChange:l}),f(Re,{placeholder:`Filter value ${h.length}`,value:s,onChange:u})]}),f("ul",{style:{maxHeight:"50vh",background:"white",overflowY:"scroll"},onScroll:()=>{performance.now()-b>200&&y(!0)},children:h.map(([F,D],$)=>{if(!m&&($v))return;const _=`var(${F})`,T=_===r,B=k(x.Fragment,{children:[k("span",{style:{display:"flex",justifyContent:"space-between",flexGrow:1},children:[f(pr,{name:F,style:{fontWeight:600}}),!/url\(|gradient\(/.test(D)&&f("span",{style:{maxWidth:"30%"},children:D})]}),f("span",{draggable:!0,onDragStart:Mt(_),title:D,style:{width:li,height:li,border:"1px solid black",borderRadius:"6px",background:`no-repeat left top/ cover ${D}`,float:"right",textShadow:"white 0px 10px"},children:/var\(/.test(D)&&"var"},F)]});return f("li",{ref:T?p:null,children:f("button",{onClick:()=>{!T&&o(_)},style:{display:"flex",justifyContent:"space-between",width:"100%",border:T?"4px solid black":"1px solid black"},children:B})},F)})})]})}function aH({media:e}){return f("div",{children:f("b",{className:"monospace-code",style:{fontSize:"14px",background:"#ebe9fb"},children:e})})}const Ot=x.memo(function(l){var s=l,{controls:[t,n],style:r,dispatchArgs:o=[],children:i}=s,a=mn(s,["controls","style","dispatchArgs","children"]);return f("button",q(z({},a),{title:t?"Hide":"Show",onClick:()=>n(!t,...o),style:q(z({},r),{border:t?"4px solid black":"1px solid black"}),children:i}))},R2);function Z2(e){let t,n=!1;function r(){t=setTimeout(()=>{n=!0,e()},400)}function o(){t&&clearTimeout(t),n=!1}function i(a){n&&(a.stopPropagation(),n=!1)}return{onMouseDown:r,onTouchStart:r,onMouseUp:o,onDrag:o,onMouseLeave:o,onTouchMove:o,onTouchEnd:o,onClickCapture:i}}const lH=e=>e.charAt(0).toUpperCase()+e.slice(1),sH=e=>{if(!/^--/.test(e))return["",""];const n=e.replace(/^--/,"").replace(/[-_]/g," ").split("--");return[n.slice(0,-1).join(" — "),n[n.length-1].trim().replace(/ /g,"-")]},Fv=e=>e.preventDefault(),pr=({name:e,style:t})=>{const{annoyingPrefix:n,nameReplacements:r}=ae,[o,i]=sH(e);let a=i.replaceAll(/-/g," ").trim();if(n)try{a=a.replace(new RegExp(`^${n} `),"").trim()}catch(u){}a=r?r.filter(u=>u.active&&u.to.length>0&&u.from.length>1).reduce((u,{from:c,to:d})=>{try{return u.replace(new RegExp(c),d)}catch(p){return console.log(`Failed replacing ${c} to ${d}`),u}},a):a;let l;try{l=new RegExp(`^${n}\\s*\\—\\s*`)}catch(u){}const s=o.trim().replace(l,"");return k("span",{draggable:!0,onDragStart:Mt(`var(${e})`),style:t,children:[f("span",{style:{fontSize:"13px",fontStyle:"italic",color:"black",display:"block"},children:lH(n?s:o)}),f("span",{className:"var-control-property",children:a})]})},eu=({value:e,resolvedValue:t,cssVar:n,isDefault:r,referencedVariable:o,isOpen:i})=>{const a=li,l=`${e}${r?" (default)":""}`,s=/url\(/.test(t),c=cl(n)||Ys.test(t)||za.test(t)||s;return t&&c&&!/currentcolor/i.test(t)?k(x.Fragment,{children:[k("span",{draggable:!0,onDragStart:Mt(t),title:l,style:{width:a,height:a,border:"1px solid black",borderRadius:"6px",backgroundImage:`${t}`,backgroundColor:n.cssFunc?`${n.cssFunc}(${t})`:t,backgroundRepeat:"no-repeat",backgroundSize:"cover",float:"right",textShadow:"white 0px 10px"},children:[/var\(/.test(e)&&"var",t==="transparent"&&"👻"]}),k("span",{style:{float:"right",marginRight:"4px"},children:[o&&f(pr,{name:o.name}),!o&&(s?null:e)]})]}):o&&i?null:f("span",{draggable:!0,onDragStart:Mt(e),title:l,style:{fontSize:"14px",float:"right"},children:o?f(pr,{name:o.name}):e},1)};function eC(e,t){var n;if(!e)return null;for(const{selector:r}of e)if((n=rt[r])!=null&&n.hasOwnProperty(t.name))return rt[r][t.name];return null}function uH(e,t){return[...e,t].map(n=>n.name).join()}const tC={type:"screen","any-hover":"hover","any-pointer":"fine","forced-colors":"none",hover:"hover","inverted-colors":"none",pointer:"fine","prefers-color-scheme":"no-preference","prefers-contrast":"no-preference","prefers-reduced-motion":"no-preference","prefers-reduced-transparency":"no-preference",scripting:"enabled",update:"fast"},cH=20;function S0(e="",t,n,r=0){if(r>cH)return["<>"];const o=[];let i;for(;i=e.indexOf("var(--"),i!==-1;){const a=i+3,l=Cr(e,a),s=e.slice(a+1,l).trim(),u=s.indexOf(","),c=u===-1,d=c?s:s.slice(0,u).trim();let p;for(const{selector:h}of t||[]){if(d in(n[h]||{})){p=n[h][d];break}if(d in(rt[h]||{})){p=rt[h][d];break}}if(!p){if(c)return[`<>`];p=s.slice(u+1).trim()}r===0&&!o.includes(d)&&o.push(d),e=e.slice(0,i)+S0(p,t,n,r+1)[0]+e.slice(l+1)}return[e,o]}const $i=e=>{var V;const{cssVar:t,onChange:n,onUnset:r,referenceChain:o=[],scopes:i,parentVar:a,currentScope:l=At,element:s}=e,{width:u,showCssProperties:c,linkCssProperties:d}=ae,[{scopes:p},h]=J.themeEditor(),[m,y]=J.pickedValue(),{defaultValues:E,allVars:g}=x.useContext(it),v=p[At]||{},{name:b,usages:F,maxSpecific:D,positions:$,properties:_}=t,T=new Set(F.map(M=>M.selector)).size,B=rt[l][b]||eC(i,t)||E[b]||((V=t.maxSpecific)==null?void 0:V.defaultValue)||t.usages[0].defaultValue,[P,L]=x.useState(!1),X=(!p||!p[l]?null:p[l][b])||B,pe=X===B,{media:oe}=D||{};let[ye,Le]=S0(X,i,p);const[N,Q]=x.useMemo(()=>{var ve,Ee;const M=X==null?void 0:X.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/),ee=!M||M.length===0?null:g.find(Qe=>Qe.name===M[1])||{name:M[1],usages:[{property:((ve=t.maxSpecific)==null?void 0:ve.defaultValue)||t.usages[0].property,isFake:!0}],properties:{},positions:[]};if(!ee)return[];const ie=(Ee=i==null?void 0:i.find(Qe=>Qe.scopeVars.some(xt=>xt.name===M[1])))==null?void 0:Ee.selector;return[ee,ie]},[X]),G=x.useMemo(()=>{const{overridingMedia:M}=t.allVar||t;return(!oe||Xj(oe,z({width:u},tC)))&&(!M||!Y2({media:oe,cssVar:t,width:u}))},[u]);let re=o.length;const U=uH(o,t),le=a==null?void 0:a.name,[he,Se]=Bn(`open_${U}`,re>0&&!!N),ge=()=>Se(!he),[ze,Je]=Bn(`showSelectors_${U}`,!1),[dt,Vt]=Bn(`showRefs_${U}`,!1),[Fn,Kt]=Bn(`showPicker_${U}`,!1),C=x.useMemo(()=>{if(!he)return[];if(!b.startsWith("--"))return[];const M=new RegExp(`var\\(\\s*${b.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),ee=new Map;for(const[ie,ve]of Object.entries(p))for(const[Ee,Qe]of Object.entries(ve))M.test(Qe)&&ee.set(Ee,[...ee.get(Ee)||[],ie]);for(const[ie,ve]of Object.entries(rt)){const Ee=ie in p;for(const[Qe,xt]of Object.entries(ve))Ee&&p[ie].hasOwnProperty(Qe)||M.test(xt)&&ee.set(Qe,[...ee.get(Qe)||[],ie])}return[...ee.entries()].map(([ie,ve])=>[g.find(Ee=>Ee.name===ie)||{name:ie,usages:[]},ve])},[p,he]),A=t.cssFunc;if(re>20)return null;const S=b in v||b in(p[l]||{}),O=C.length-(le?1:0);return k("li",{onDragEnter:t.isRawValue?null:Fv,onDragOver:t.isRawValue?null:Fv,onDrop:M=>{if(t.isRawValue)return;const ee=M.dataTransfer.getData("value");new RegExp(`var\\(\\s*${t.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`).test(ee)||(ee&&n(ee),M.stopPropagation())},"data-nesting-level":re,className:np("var-control",{"var-control-in-theme":S,"var-control-no-match-screen":!G}),onClick:()=>{if(m&&m!==X){n(m);return}(m===""||m===X)&&(he||ge())},style:{position:"relative",listStyleType:"none",fontSize:"15px",clear:"both",cursor:he?"auto":"pointer",paddingTop:0},children:[!G&&f(rH,{cssVar:t,media:oe,element:s}),k("div",q(z({},Z2(M=>{y(X)})),{style:{paddingTop:6},onClick:()=>{he&&ge()},children:[f("h5",{draggable:!0,onDragStart:Mt(()=>`var(${b})`),style:{display:"inline-block",fontSize:"16px",padding:"0 4px 0",fontWeight:"400",userSelect:"none",cursor:"pointer",clear:"left"},children:f(pr,{style:{fontWeight:o.length===0?"bold":"normal"},name:b})}),f(eu,{value:X,resolvedValue:ye,cssVar:t,isDefault:pe,referencedVariable:N,isOpen:he})]})),k("div",{children:[oe&&f(aH,{media:oe}),!!c&&k(x.Fragment,{children:[!!A&&f("span",{style:{color:"darkcyan"},children:A}),Object.entries(_).map(([M,{isFullProperty:ee,fullValue:ie,isImportant:ve}])=>{const Ee=M===(D==null?void 0:D.property),Qe=k("span",{className:"monospace-code",style:z({fontSize:"14px"},Ee?{}:{background:"grey"}),title:ee?"":ie,children:[M,Ee&&t.states&&!t.pseudos&&f("b",{style:{color:"purple"},children:t.states}),Ee&&t.pseudos&&f("a",{target:"_blank",href:d?`https://developer.mozilla.org/en-US/docs/Web/CSS/${t.pseudos}`:null,children:f("b",{style:{color:"indigo"},children:t.pseudos})}),!ee&&f("b",{style:{color:"red"},children:"*"}),!!ve&&f("b",{style:{fontWeight:"bold",color:"darkorange"},children:"!important"})]},M);return d?f("a",{target:"_blank",href:`https://developer.mozilla.org/en-US/docs/Web/CSS/${M.replace(/^-webkit-/,"")}`,style:{cursor:"help"},children:Qe},M):Qe})]})]}),!!$[0]&&f(Zs,z({},$[0]||{})),he&&k(x.Fragment,{children:[O>0&&k("div",{children:[k(Ot,{controls:[dt,Vt],children:[O,re>0&&" more"," links"]}),dt&&f(Q2,{references:C,excludedVarName:le})]}),k("div",{style:{display:"flex",clear:"both",justifyContent:"flex-end"},children:[pe&&!t.isRawValue&&f("span",{style:{margin:"6px 6px 0",color:"grey"},children:"default"}),S&&B!==null&&f("button",{title:`Remove from current theme? The value from the default theme will be used, which is currently: "${B}"`,onClick:()=>{r()},children:"Revert"}),N&&f("button",{style:{borderWidth:P?"4px":"1px"},onClick:()=>{L(!P)},children:"Raw"}),/^--/.test(t.name)&&f("button",{style:{borderWidth:Fn?"4px":"1px"},onClick:M=>{Kt(!Fn),M.stopPropagation()},children:"Link"}),!F[0].isFake&&k(Ot,{controls:[ze,Je],children:["Rules (",T,")"]})]}),Fn&&f(iH,{value:X,elementScopes:i,onChange:M=>{n(M)}}),ze&&!F[0].isFake&&k(x.Fragment,{children:[f("div",{children:b}),f(J2,{usages:F,maxSpecificSelector:D==null?void 0:D.selector,winningSelector:D==null?void 0:D.winningSelector,scope:l})]}),(!N||P)&&!Fn&&f("div",{children:f(Yj,{cssVar:t,value:X,resolvedValue:ye,referencedVars:Le,onChange:n,cssFunc:A,elementScopes:i})}),!b.startsWith("--")&&C0(b)&&f(U2,{disabled:!0,value:X,resolvedValue:ye,referencedVars:Le,onChange:()=>{},elementScopes:i}),!!N&&!P&&k("ul",{style:{margin:0},children:[f("span",{className:"monospace-code",children:Q}),x.createElement($i,{scopes:i,currentScope:Q,cssVar:N,onChange:M=>{h({type:Ce.set,payload:{name:N.name,value:M,scope:Q}})},onUnset:()=>{h({type:Ce.unset,payload:{name:N.name,scope:Q}})},key:N.name,referenceChain:[...o,t],parentVar:t})]})]})]},b)};function nC(e){const{path:t}=e,[n,r]=x.useState(!1),{frameRef:o}=x.useContext(it);return f("button",{draggable:!0,onDragStart:i=>{r(!0),i.stopPropagation()},onDragEnd:()=>{r(!1)},onDragLeave:i=>{if(!n)return;const a=i.clientX>i.currentTarget.getBoundingClientRect().right,l=i.clientXi.currentTarget.getBoundingClientRect().bottom,c={behavior:"smooth",block:s?"start":u?"end":"center",inline:a?"end":l?"start":"center"};o.current.contentWindow.postMessage({type:"scroll-in-view",payload:{path:t,options:c}},window.location.href)},title:"Scroll in view",className:"scroll-in-view",style:{border:"1px solid gray",background:"white",borderRadius:"5px",padding:"4px",fontSize:"12px",float:"right",cursor:"zoom-in"},onClick:()=>{if(o.current){o.current.contentWindow.postMessage({type:"scroll-in-view",payload:{path:t}},window.location.href);return}element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"})},children:"👁"})}const Hl=18;function fH({label:e}){const[t,...n]=e.replace(/\s*\(\d\/\d\)$/,"").split(".").map(i=>i.trim()),[r,o]=x.useState(!1);return k(x.Fragment,{children:[f(ce,{controls:[r,o],children:f("div",{children:r?f("span",{children:"close"}):e})}),r&&k(x.Fragment,{children:[f(ui,{selector:t,initialized:!0,showLabel:!0}),n.map(i=>f(ui,{selector:`.${i}`,initialized:!0,showLabel:!0}))]})]})}function fo({children:e}){return f("span",{style:{fontSize:"1.5rem",minWidth:"2rem",display:"inline-block",textAlign:"center"},children:e})}const rC={uiLayout:f(fo,{children:"💻"}),inspectedPath:f(fo,{children:"🔍"}),themeEditor:f(fo,{children:"🖌"}),scales:f(fo,{children:"🔬"}),width:f(fo,{children:"↔"}),height:f(fo,{children:"↕"})},dH={openGroups:({action:e})=>{const t=Object.keys(e);return t.length===0?"No open groups":f("div",{className:"history-open-groups",children:t.reverse().map(n=>f(x.Fragment,{children:f("pre",{className:"monospace-code",style:{fontSize:"10px",display:"inline-block"},children:f(fH,{label:n})},n)}))})},inspectedPath:({action:e,historyIndex:t})=>{const{frameRef:n}=x.useContext(it);let r;try{[r]=dc(ll(e,n.current.contentWindow.document))}catch(s){}const o=ts<=t)||[]:[],a=i?f("a",{href:i,children:i.replace(/http:\/\/|https:\/\//,"")}):null;if(!r)return a||"...";const l=o&&i!==window.location.href;return k(x.Fragment,{children:[f(nC,{path:e}),f("pre",{className:"monospace-code",children:r==null?void 0:r.label}),l&&a]})},themeEditor:{set:({payload:{scope:e,name:t,value:n,alternatives:r}})=>k(x.Fragment,{children:[e&&f("pre",{className:"monospace-code",children:e}),f("br",{}),f("b",{draggable:!0,onDragStart:Mt(`var(${t})`),children:f(pr,{name:t})})," ",f("br",{}),k("span",{draggable:!0,onDragStart:Mt(n),children:[(Ys.test(n)||za.test(n)||/var\(/.test(n))&&f("span",{style:{width:Hl,height:Hl,border:"1px solid black",borderRadius:"6px",backgroundImage:`${n}`,backgroundColor:`${n}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",display:"inline-block",textShadow:"white 0px 10px"}}),n]}),(r==null?void 0:r.length)>0&&k("div",{children:["Alternatives (WIP, can't switch yet):"," ",f(mt,{onChange:o=>{const i=r[o.target.value];console.log(i)},options:r.map((o,i)=>({label:`${o.varName} [element ${o.element} ${o.property}]`,value:i}))})]})]}),unset:({payload:{scope:e,name:t}})=>k(x.Fragment,{children:[e&&f("pre",{className:"monospace-code",children:e}),f("br",{}),f("b",{children:f(pr,{name:t})})," = default"]}),createAlias:({payload:{name:e,value:t,generatedName:n}})=>k("span",{draggable:!0,onDragStart:Mt(`var(${n})`),children:["Alias",f("br",{}),(Ys.test(t)||za.test(t)||/var\(/.test(t))&&f("span",{style:{width:Hl,height:Hl,border:"1px solid black",borderRadius:"6px",backgroundImage:`${t}`,backgroundColor:`${t}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",display:"inline-block",textShadow:"white 0px 10px"}}),k("b",{children:[f(pr,{name:n})," = ",t]})]})}};function pH(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length-t,r=n<1;return f("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:A2,children:"←"})}function hH(){const{historyOffset:e}=x.useContext(ot),t=e===0;return f("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:$2,children:"→"})}function gH(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length-t,r=n<1;return f("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:D2,children:"!←"})}function mH(){const{historyOffset:e}=x.useContext(ot),t=e===0;return f("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:_2,children:"→!"})}function vH({amount:e}){const t=[];for(let n=0;nf("span",{onDragEnter:()=>{h0(e-n-1)},style:{height:"6px",borderLeft:"1px solid #646262"}},n))})}const yH=k(ft,{el:E0,children:["Here's a compact version of the history timeline. You can scroll above the history section to move the timeline one step at a time, however fast you and your mouse like to work with.",f("h1",{children:"Warning!"}),f("p",{children:"This will restore the UI state across the whole screen, which definitely is a concern for people with epilepsy."}),f("p",{children:"After having changed the page background color multiple times, for example, going through this history timeline fast will cause the whole preview screen to flash."}),f("p",{children:"It's recommended to only use it when controlled, small nudges of the wheel are possible."}),f("p",{children:"Keeping some state pinned can help reduce the amount of changes happening in rapid succession."})]});function oC(e,t){const r=(t.currentTarget.closest("minitimeline")||t.currentTarget).getBoundingClientRect(),o=Math.max(0,(t.clientX-r.left)/r.width),i=Math.round(e*o);h0(e-i)}function bH(e,t,n){var r;n.pressure>.01&&((r=t.current)!=null&&r.matches(":hover"))&&oC(e,n)}function E0(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length===0?0:100-100*t/e.length,r=x.useRef(null);return k("div",{ref:r,className:"minitimeline",onPointerMove:bH.bind(null,e.length,r),onClick:oC.bind(null,e.length),style:{width:"100%",height:"8px",padding:"2px",background:"darkgrey",boxSizing:"border-box",userSelect:"none",touchAction:"none"},children:[f("div",{style:{width:`${n}%`,height:"6px",background:"rgb(26, 217, 210)",borderRight:"3px solid black",transition:"width .06s ease-out",boxSizing:"border-box"}}),f(vH,{amount:e.length+1}),yH]})}function iC({id:e}){if(e!=="themeEditor")return f("button",{title:"Clear all other values and move this one to start",onClick:fz.bind(null,e),children:"Clear others"})}function F0(){const{pins:e}=x.useContext(ot),[t,n]=x.useState(!1),r=e.size;return k(x.Fragment,{children:[k("button",{title:t?"":[...e.keys()].join(", "),onClick:o=>{n(!t)},children:[k("span",{style:{filter:r===0?"grayscale(1)":"none"},children:["📌",r]}),k(ft,{el:F0,children:[f("p",{children:"This button shows how many pins are applied and allows you to toggle each."}),f("p",{children:"Notice how the timeline now jumps over the entries we pinned earlier."})]})]}),t&&f(wH,{close:()=>n(!1)})]})}function wH({close:e}){const{pins:t,past:n,historyOffset:r,states:o}=x.useContext(ot),[i]=x.useState(new Map(t)),a=[...i.entries()],l=x.useRef();let s=0;return x.useEffect(()=>{const u=c=>{l.current.parentNode.contains(c.target)||e()};return document.addEventListener("click",u),()=>{document.removeEventListener("click",u)}},[]),f("ul",{ref:l,style:{zIndex:100,position:"absolute",background:"white",border:"1px solid black"},children:a.map(([u,c])=>{const d=t.has(u),p=()=>Ai(u,c),h=()=>il(u),m=c{h0(E),g.stopPropagation()},children:"visit"}),f(iC,{id:u})]})})})}function aC(e){const t=Math.round(e.deltaY/100);t>0?p0(t,!0):ma(-t,!0)}function ac(){const[e,t]=J.visualizeHistory(),[n,r]=J.visualizeHistoryAlways();return k("div",{onWheelCapture:aC,children:[f(E0,{}),f(F0,{}),f(ce,{controls:[e,t],children:"Visualize"}),e&&f(ce,{title:"Always or only when in a previous state",controls:[n,r],children:"Always"}),f("button",{onClick:()=>{confirm("Clear all history, keeping only current state?")&&Ez()},children:"Clear"}),k("div",{style:{display:"inline-flex"},children:[f(gH,{}),f(pH,{}),f(hH,{}),f(mH,{})]}),k(ft,{el:ac,children:[f("p",{children:"Every step you do in the editor is tracked in a history timeline. Keyboard shortcuts (control+z and others) work like anywhere else."}),f("p",{children:`On top of "normal" history buttons, there's the fast buttons (!← and →!), that jump to the most important steps like edits to style rules, newly inspected elements, and editor UI layout changes. It jumps over the less interesting steps, while still applying their result.`})]})]})}ac.fName="HistoryControls";function lc(){const{lastAlternate:e,historyOffset:t,past:n,lastAlternateIndex:r}=x.useContext(ot),o=n.length-t-r,i=e.length===0,a=i?f(x.Fragment,{children:"Stash"}):k(x.Fragment,{children:[e.length," steps stashed ",f("br",{}),o," steps since"]}),l=x.useMemo(()=>JSON.stringify(e.map(s=>[...s.entries()].map(([u])=>u)),null,2),[e]);return k("div",{className:"flex-column",style:{background:`rgba(26, 217, 210, ${Math.min(e.length/20,1)})`},children:[f("button",{title:`Apply/create stash: -`+l,onClick:Fz,style:{textAlign:"left"},disabled:i&&t===0,children:a}),!i&&f(xH,{}),f(ft,{el:lc,children:"If you travel back and discard future, it's still kept here. This allows you to splice in a new edit earlier into your history and just re-apply everything after it."})]})}function xH(){return f("button",{onClick:Cz,children:"Clear"})}lc.fName="HistoryStash";function CH(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}const kv=new Set;function SH({containerRef:e,id:t}){const{past:{length:n}}=x.useContext(ot),[r,o]=Bn(`areaOffset#${t}`,[0,n]),[i,a]=r.length?r:[r,0];x.useEffect(()=>{a===n&&e.current.scrollTo({top:i,left:0})},[]),x.useEffect(()=>{const l=performance.now(),s=u=>{if(performance.now()-l<500)return;const c=u.currentTarget.scrollTop,d=c<10?0:Math.floor(c);o([d,n],{skipHistory:!0,appendOnly:!0})};return CH(e.current,"scroll",s)},[])}function EH({containerRef:e,id:t}){const[n]=Bn(`areaOffset#${t}`,[0]),[r]=n.length?n:[n];x.useEffect(()=>{var o;(o=e.current)==null||o.scrollTo({top:r,left:0})},[r]),x.useEffect(()=>{if(kv.has(t))return;kv.add(t);const o=setTimeout(()=>{var a;(a=e.current)==null||a.scrollTo({top:r,left:0})},1e3),i=setTimeout(()=>{var a,l;((a=e.current)==null?void 0:a.scrollY)>0||(l=e.current)==null||l.scrollTo({top:r,left:0})},2e3);return()=>{clearTimeout(o),clearTimeout(i)}},[])}let lC;function FH(e){return lC=e}function kH(e){const{historyOffset:t}=x.useContext(ot);return lC===e.id||e.id==="drawer"?null:t===0?f(SH,z({},e)):f(EH,z({},e))}function Yn(r){var o=r,{id:e,children:t=[]}=o,n=mn(o,["id","children"]);const{overArea:i,setOverArea:a,setOverElement:l,timeoutRef:s,areaRefs:u}=x.useContext(so),c=i===e,d=x.useRef();return u.current[e]||(u.current[e]=d),k("div",q(z({style:{position:"relative"}},n),{id:e,ref:d,className:"area",children:[f(kH,{id:e,containerRef:d}),!!t&&x.Children.map(t,(p,h)=>f(Lz,{homeAreaId:e,element:p,index:h})),f("div",{className:"area-dropzone"+(c?" drag-hovered":""),style:{order:1e3,background:"rgba(167,238,227,0.22)",outline:"2px dashed grey",outlineOffset:"-8px"},onDragEnter:x.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area&&clearTimeout(s.current.area),a(e),l(null),s.current.lastEntered=e},[]),onDragLeave:x.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area=setTimeout(()=>{s.current.lastEntered===e&&a(null)},M2)},[])})]}))}function AH(){const{hostAreaId:e,homeAreaId:t}=x.useContext(si),n=e||t;x.useEffect(()=>{FH(n)},[n])}function Av(e){return e?typeof e.type=="function"?e.type.name:e.type:""}const sC=[()=>{const{pins:e}=x.useContext(ot);return["Pin the screen width and height.",e.has("width")&&e.has("height")]}];function uC(){return k(x.Fragment,{children:[f("p",{children:"We're tracking so many things, that it's quite likely you'll not want to use the older version of certain things, but still want to wind back to any point in history for everything else."}),f("p",{children:"To achieve this, there is a pin button, which pins the value at a particular point in time, and so allows you to browse everything else."}),f("p",{children:"Note that pinning does not prevent you from making new changes to the same type of value (e.g. screen width). Rather, the new value will now be pinned instead. You can easily unpin this value again if needed."})]})}function $H(e){const{id:t,historyIndex:n}=e,{pins:r,historyOffset:o,past:i}=x.useContext(ot),a=r.get(t),l=n===a,s=a>i.length-o;return k(x.Fragment,{children:[f("button",{className:l?"pinned-here":"",style:{outline:l?"2px solid black":"none",background:l?"white":"transparent"},onClick:u=>{l?il(t):Ai(t,n),u.stopPropagation()},children:f("span",{className:"pin",children:"📌"})}),l&&!s&&f(iC,{id:t})]})}function DH(e){const{id:t}=e,{pins:n}=x.useContext(ot),r=C2(t),i=n.get(t)===r;return k("button",{className:i?"pinned-latest":"pin-latest",style:{float:"right",outline:i?"2px solid black":"none",background:i?"white":"transparent"},onClick:i?()=>{il(t)}:()=>{pz(t)},title:"Pin to latest",children:[f("span",{className:"pin",children:"📌"}),"→"]})}function _H(e){const{id:t,historyIndex:n}=e,{pins:r}=x.useContext(ot);if(n===0)return null;const i=r.get(t)===0;return k("button",{className:i?"pinned-initial":"",style:{float:"right",outline:i?"2px solid black":"none",background:i?"white":"transparent"},onClick:i?()=>{il(t)}:()=>{hz(t)},title:"Pin to initial",children:["←",f("span",{className:"pin",children:"📌"})]})}function lp(e){const{actions:t,showPayloads:n,historyIndex:r}=e,{previewComponents:o,pins:i}=x.useContext(ot);return f("ul",{className:"history-actions",children:[...t].map(([a,l],s)=>{const u=typeof l=="object",c=u&&"type"in l,d=c?JSON.stringify(l.payload,null,2):u?JSON.stringify(l,null,2):l,p=c?"::"+Av(l):"",h=d==="{}",m=!c&&(typeof d=="boolean"||typeof d=="number"||(d==null?void 0:d.length)<40),y=o[a],E=typeof y=="function"?y:a in o?o[a][Av(l)]:null,g=i.has(a)&&i.get(a)!==r,v=rC[a]||"";return k("li",{title:g?"Overridden by pin":"",style:{clear:"both",opacity:g?.5:1},children:[f($H,{id:a,historyIndex:r}),f(DH,{id:a,historyIndex:r}),f(_H,{id:a,historyIndex:r}),v,!E&&k("span",{children:[f("b",{children:a}),p]}),!E&&m&&f("pre",{style:{margin:0,float:"right"},className:"monospace-code",children:d===!1?"false":d===!0?"true":d}),!h&&n&&f("pre",{className:"monospace-code",children:d===!1?"false":d===!0?"true":d}),E&&f(E,{action:l,historyIndex:r,payload:l.payload})]},`${r}:${s}`)})})}function TH(){const{past:e,historyOffset:t,lastActions:n,initialStates:r}=x.useContext(ot),[o,i]=x.useState(!1),a=e.length-t,l=t===0?n:e[a].lastActions,s=a===0,u=s&&o?[...r.entries()].filter(([c])=>c in J):[...l.entries()];return k("div",{onWheelCapture:aC,style:{minWidth:"280px",maxWidth:"400px",minHeight:"240px",overflow:"hidden visible"},children:[s&&f(ce,{controls:[o,i],children:"Show all initial values"}),f(lp,{historyIndex:a,actions:u}),k(ft,{el:fl,tasks:sC,children:[f(uC,{}),"Since history visualization is disabled, this only shows current history entry."]})]})}function fl(){const[e,t]=J.visualizeHistoryAlways(),[n,r]=x.useState(!1),[o,i]=se("showAllHistory",!0),[a,l]=x.useState(!1),[s,u]=x.useState(!1),{past:c,historyOffset:d,lastActions:p,pointedStates:h,pins:m}=x.useContext(ot),y=ae.visualizeHistory&&(e||d!==0);let E=x.useRef();if(x.useEffect(()=>{var b;(b=E.current)==null||b.scrollIntoView({block:"nearest"})},[d]),!y)return f(TH,{});const g=c.length-d;let v=!1;return k("div",{className:"history",children:[k(ft,{el:fl,tasks:sC,children:[f(uC,{}),"See all steps you took here."]}),f(AH,{}),f(ce,{controls:[o,i],children:"Show all"}),f(ce,{controls:[n,r],children:"Debug"}),n&&k("div",{children:[f(ce,{controls:[a,l],children:"Inspect current state"}),f(ce,{controls:[s,u],children:"Show payloads"}),f("button",{onClick:()=>console.log(h),children:"console.log"}),f("button",{onClick:mz,children:"export"}),a&&f("pre",{className:"monospace-code",children:JSON.stringify(Object.fromEntries(h),null,2)})]}),k("ul",{className:"connected-list",children:[c.map(({states:b,lastActions:F},D)=>{const $=D===g;v=v||$;const _=Math.abs(D-g),T=[...F.entries()].some(([B,P])=>typeof P=="object"||b.get(B)!==h.get(B));if(!$&&!o&&D!==0&&!f0(F)){const B=[...F.keys()];if(!B.some(L=>m.has(L)&&m.get(L)===D)&&!B.some(L=>c0.includes(L)))return null}return k("li",{id:$?"history-current-state":"",ref:D===g?E:null,style:{position:"relative",outline:D===g?"2px solid yellow":"none"},children:[f("span",{style:{marginLeft:"-32px"},children:D}),f(lp,{historyIndex:D,actions:[...F.entries()],showPayloads:s}),k("div",{className:"history-state-buttons",style:{display:"flex",justifyContent:"stretch"},children:[f("button",{style:{width:"50%"},onClick:$?()=>{t(!0),ma(d)}:v?()=>{ma(_)}:()=>{p0(_)},children:$?"jump to end":"jump here"}),T&&f("button",{style:{width:"50%"},onClick:B=>{for(const[P,L]of F.entries())Xu(P,L);B.preventDefault(),B.stopPropagation()},children:"do again"})]})]},D)}),k("li",{onClick:v?()=>{ma(d)}:null,style:{outline:d===0?"2px solid yellow":"none"},children:[f("span",{style:{marginLeft:"-32px"},children:"Latest"}),f(lp,{historyIndex:c.length,actions:[...p.entries()],showPayloads:s})]},"latest")]})]})}fl.fName="HistoryVisualization";function cC(e,t){try{return t===""||e.name.replace(/-+/g," ").match(t)?!0:e.usages.some(n=>n.property.match(t))}catch(n){return!0}}const BH=(e,t)=>{if(!t)return e;const n=t.replace(/^\!/,""),r=n.length!==t.length;try{return e.map(o=>q(z({},o),{vars:o.vars.filter(i=>{const a=cC(i,n);return r?!a:a})}))}catch(o){return e}};function PH(e,t){return t.length===0?e:e.map(n=>q(z({},n),{vars:n.vars.filter(r=>t.some(i=>r.maxSpecific.selector.includes(i)))}))}function MH(e){const t=rn(),{group:n,elementScopes:r}=e;if(!n.inlineStyles)return null;const o=Object.entries(n.inlineStyles);return k("div",{children:[f("h5",{style:{color:"red"},children:"Inline styles"}),f("ul",{children:o.map(([i,a])=>{if(typeof a=="undefined")return null;const l=a.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/);if(l&&l.length>0){const u={name:l[1],usages:[{property:i}],properties:{[i]:{isFullProperty:!0,fullValue:a,isImportant:!1}},maxSpecific:{property:i},positions:[]};return f($i,{cssVar:u,scopes:r,onChange:c=>{t({type:Ce.set,payload:{name:u.name,value:c}})},onUnset:()=>{t({type:Ce.unset,payload:{name:u.name}})}},u.name)}return f("li",{children:k("span",{className:"monospace-code",children:[i,": ",a]})},i)})})]})}function OH(e){const{scopes:t,vars:n,element:r}=e,o=rn(),[i,a]=se("show-scope-locators",!1);if(t.length===0)return null;const l=[];return k("div",{style:{background:"lightyellow",marginBottom:"24px",padding:"4px",border:"1px solid black"},children:[f(ce,{controls:[i,a],style:{float:"right"},children:"Find on page"}),f("ul",{children:t.map(({selector:s,matchingSelector:u,scopeVars:c})=>{const d=s.split();l.push(...c);const p=n.filter(h=>h.currentScope===s);return p.length===0?null:k("li",{children:[f("span",{style:{border:"1px solid gray"},className:"monospace-code",children:d.map(h=>h===u?f("b",{children:h},"selector"):h)}),i&&!s.includes(":root")&&!s.includes(":where(html)")&&f(ui,{selector:s,initialized:!0,showLabel:!1}),f("ul",{style:{marginBottom:"24px"},children:p.map(h=>x.createElement($i,{cssVar:h,scopes:t,currentScope:s,element:r,key:h.name,onChange:m=>{o({type:Ce.set,payload:{name:h.name,value:m,scope:s}})},onUnset:()=>{o({type:Ce.unset,payload:{name:h.name,scope:s}})}}))})]},s)})})]})}const RH=({amount:e=3,format:t="array",group:n=20,sample:r=10,minHue:o=0,maxHue:i=360}={})=>({amount:e,format:t,group:n,sample:r,minHue:o,maxHue:i}),NH=e=>typeof e=="string"?e:e.src,IH=(e,t)=>{const n=e.map(r=>{const[o,i,a]=Array.isArray(r)?r:r.split(",").map(Number);return`color(display-p3 ${o/255} ${i/255} ${a/255})`});return t.amount===1?n[0]:n},Rf=(e,t)=>{const n=Math.round(e/t)*t;return Math.min(n,255)},Nf=new Map,LH=e=>Nf.has(e)?Promise.resolve(Nf.get(e)):new Promise((t,n)=>{const r=new OffscreenCanvas(0,0),o=r.getContext("2d",{colorSpace:"display-p3"}),i=new Image;i.onload=()=>{r.height=i.height,r.width=i.width,o.drawImage(i,0,0);const{data:a}=o.getImageData(0,0,i.width,i.height,{colorSpace:"display-p3"});Nf.set(e,a),t(a)},i.onerror=a=>(console.log(a),n(Error("Image loading failed."))),i.crossOrigin="",i.src=e}),zH=(e,t)=>{const n=4*t.sample,r={};for(let u=0;u360,a=o?360+t.minHue:t.minHue,l=t.maxHue%360;function s(u){return o?u>=a||u<=l:i?u<=l||u>=a:u>=a&&u<=l}return IH(Object.entries(r).filter(([,u])=>u>1).map(([u,c])=>{const[d,p,h]=u.split(",");return[u,c,zr(`color(display-p3 ${d/255} ${p/255} ${h/255})`)]}).filter(([,,{h:u}])=>s(u)).sort(([,,u],[,,c])=>u.c>c.c?-1:1).slice(0,t.amount).map(([u])=>u),t)};function jH(e,t){return Ve(this,null,function*(){const n=yield LH(NH(e));return zH(n,RH(t))})}const $v=42;function HH({value:e}){const{palette:t}=ae,[n,r]=J.pickedValue(),o=t.some(({value:i})=>i===e);return f("div",{style:{background:"transparent",border:"transparent",position:"absolute",top:0,right:0,bottom:0,left:0},onClick:()=>{r(n===e?"":e)},children:o&&"V"})}function GH({color:e,minLightness:t,maxLightness:n}){const r=zr(e);if(!r)return;const{l:o,c:i,h:a=0,alpha:l=1}=r,s=o*100;if(sn)return;const u=$n(s,i,a,l);return f("div",{title:u,draggable:!0,onDragStart:c=>c.dataTransfer.setData("value",u),style:{position:"relative",display:"inline-block",fontWeight:900,verticalAlign:"top",width:$v,height:$v,backgroundColor:e,color:"green"},children:f(HH,{value:u})})}function WH(e){const{path:t}=e,[n,r]=x.useState(),[o,i]=x.useState(),[a,l]=Ge("image color group",10),[s,u]=Ge("image color sample",20),[c,d]=Ge("image color amount",90),[p,h]=Ge("image color min lightness",0),[m,y]=Ge("image color max lightness",100),[E,g]=Ge("image color min hue",0),[v,b]=Ge("image color max hue",360),[F,D]=se("image color preserve lightness range",!1),[$,_]=se("image color preserve hue range",!1),[T,B]=x.useState(!0);if(x.useEffect(()=>{const P=performance.now(),L=setTimeout(()=>Ve(this,null,function*(){B(!0),r(yield jH(t,{sample:s,group:a,amount:Math.max(2,c),minHue:E,maxHue:v})),i(performance.now()-P),B(!1)}),80);return()=>clearTimeout(L)},[t,a,s,c,E,v]),!!n)return k("div",{children:[f("br",{}),"group: ",a,k("span",{style:{float:"right"},children:[" ",o,"ms"]}),f("input",{disabled:T,type:"range",value:a,min:1,max:100,style:{width:"95%"},onChange:P=>{l(parseInt(P.target.value))}}),"sample: ",s,f("input",{disabled:T,type:"range",value:s,min:1,max:50,style:{width:"95%"},onChange:P=>{u(parseInt(P.target.value))}}),"amount: ",f("input",{type:"number",value:c,onChange:P=>d(P.target.value)}),f("input",{disabled:T,type:"range",value:c,step:9,min:9,max:90,style:{width:"95%"},onChange:P=>{d(parseInt(P.target.value))}}),k("div",{style:{display:"flex"},children:[f("input",{disabled:T,type:"number",value:E,min:0,max:359,onChange:P=>{g(parseInt(P.target.value))}}),f("input",{disabled:T,type:"number",value:v,min:1,max:360,onChange:P=>{b(parseInt(P.target.value))}}),f(ce,{disabled:E<=0&&v>=360,controls:[$,_],children:"Fix hue range"})]}),k("div",{style:{background:"linear-gradient(90deg in oklch longer hue, transparent 0%, transparent 16px, oklch(71.68% 0.1505 0) 16px, oklch(71.68% 0.1505 0) calc(100% - 16px), transparent calc(100% - 16px), transparent 100%)"},children:[f("input",{disabled:T||E<0,type:"range",value:(360+E)%360,min:0,max:359,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);g(L),L>v-5&&b(L+5),$&&b(v+L-E)}}),f("input",{disabled:T||v>360,type:"range",value:v%360,min:1,max:360,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);b(L),L{h(parseInt(P.target.value))}}),f("input",{disabled:T,type:"number",value:m,min:1,max:100,onChange:P=>{y(parseInt(P.target.value))}}),f(ce,{disabled:p<=0&&m>=100,controls:[F,D],children:"Fix lightness range"})]}),k("div",{children:[f("input",{disabled:T,type:"range",value:p,min:0,max:99,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);h(L),L>m-5&&y(L+5),F&&y(m+L-p)}}),f("input",{disabled:T,type:"range",value:m,min:1,max:100,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);y(L),Lf(GH,{color:P,minLightness:p,maxLightness:m}))]})}const If="28px",UH=1e-6;function VH(e,t){t.preventDefault(),t.stopPropagation();const n=t.dataTransfer.getData("value");n&&fC(n,e)}function fC(e,{groupColors:t,maximizeChroma:n}){const r=zr(e);if(!r)return;const o=t.filter(([l])=>!l.isRawValue).map(([{name:l}])=>`var(${l})`);let i=!1;const a=rn();return t.forEach(([{name:l,isRawValue:s},u,c,d=":root"])=>{if(s||o.includes(c))return;const p=zr(u);if(!p||p.l<.001||p.l>.999||!n&&p.c{const{group:t}=e,{propertyFilter:n,maximizeChroma:r}=ae,[{scopes:o},i]=J.themeEditor(),[a,l]=J.search(),[s,u]=J.svgDarkBg(),c=v0("pickedValue"),[d,p]=se("image color show",!1),{element:h,path:m,elementInfo:{src:y,srcset:E,imgWidth:g,imgHeight:v,alt:b,title:F,html:D,width:$},textContent:_,label:T,vars:B,scopes:P,isRootElement:L,isDeepest:K,inlineStyles:X}=t,{defaultValues:pe}=x.useContext(it),[oe,ye]=J.openGroups(),Le=U=>{const ge=oe,{[U]:le}=ge,he=mn(ge,[pc(U)]),Se=le?he:q(z({},he),{[U]:!0});ye(Se)},N=x.useMemo(()=>B.reduce((U,le)=>{var he,Se;if(cl(le)){const{name:ge}=le;if(!ge.startsWith("--"))return ge.toLowerCase()!=="currentcolor"&&U.push([le,ge]),U;const ze=Xo[ge];let Je=le.currentScope;if(!Je&&P.length>0){for(const C in ze||{})if(Je=((he=P.find(A=>A.selector===C))==null?void 0:he.selector)||Je,Je)break}const dt=rt[Je||":root"][ge]||eC(P,le)||pe[ge]||((Se=le.maxSpecific)==null?void 0:Se.defaultValue)||le.usages[0].defaultValue,Fn=(!o||!o[Je]?null:o[Je][ge])||dt;let[Kt]=S0(Fn,P,o);if(Kt.includes("calc(")){const C={steps:[]};let A=Kt;for(;A.includes("calc(");){const S=A.indexOf("calc("),O=Cr(A,S+5);try{const[V]=oc(A.slice(S+5,O-1),C);A=A.slice(0,S)+V+A.slice(O+1)}catch(V){break}}Kt=A}Kt&&Kt!=="inherit"&&Kt.toLowerCase()!=="currentcolor"&&U.push([le,le.cssFunc?`${le.cssFunc}(${Kt})`:Kt,Fn,Je])}return U},[]),[B,P,o]),G=!(B.length===0)||X||y;if(!G&&!K&&!y&&!D)return null;const re=!!oe[T];return k("li",{className:"var-group",style:{marginBottom:"12px"},children:[k("div",{style:{position:"sticky",top:0,background:"white",zIndex:12,overflow:re?"hidden":"auto"},onMouseEnter:()=>{Ra(h)},onMouseLeave:()=>{Yo(h)},children:[L?f("span",{style:{float:"right"},children:"global"}):f(nC,{path:m}),k("h4",{style:{fontWeight:400,marginBottom:0,paddingRight:"4px",cursor:G?"pointer":"initial",display:"flex",justifyContent:"space-between",alignItems:"flex-start",maxHeight:re?"128px":"300px",overflowX:"hidden",overflowY:"auto"},onClick:G?U=>{const le=x5("pickedValue");le&&fC(le,{groupColors:N,maximizeChroma:r})||(Le(T),queueMicrotask(()=>{U.target.scrollIntoView({block:"nearest"})},0))}:null,onDrop:U=>VH({groupColors:N,maximizeChroma:r},U),onDragOver:U=>{U.preventDefault()},children:[k("div",{children:[T," (",B.length,")",n!=="all"&&f("span",{style:{color:"grey",fontSize:"12px"},children:n}),a!==""&&k("span",{style:{color:"grey",fontSize:"12px"},children:['- "',a,'"',f("button",{style:{padding:"3px 3px 1px",position:"relative",bottom:"4px",borderColor:"grey"},title:"Clear search",onClick:()=>{l("")},children:"X"})]}),N.length>0&&f("div",{style:{overflowX:"hidden"},children:N.map(([{name:U},le,he,Se])=>{const ge=U.startsWith("--");return x.createElement("div",q(z({onDragOver:ze=>ze.preventDefault(),onDrop:ze=>{let Je=ze.dataTransfer.getData("value");Je===""&&(Je=ze.dataTransfer.getData("text/plain").trim()),Je!==""&&(i({type:Ce.set,payload:{name:U,value:Je,scope:Se}}),ze.stopPropagation())},draggable:!0},Z2(()=>c(le))),{onDragStart:Mt(he),key:U,title:U===le?U:`${U}: ${he}`,style:{display:"inline-block",width:If,height:If,lineHeight:"1.5",border:"1px solid black",borderRadius:"6px",backgroundImage:`${le}`,backgroundColor:`${le}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",marginTop:"3px",marginLeft:"6px",paddingTop:"3.5px",fontSize:"14px",textAlign:"center",textShadow:ge?"white 0px 3px":"white 2px 2px"}}),/^var\(/.test(he)?"v":le==="transparent"?"👻":ge?f(x.Fragment,{children:" "}):"r")})})]}),y&&f("img",{src:y,srcSet:E,alt:b,title:F||b,style:{height:"52px",float:"right",backgroundColor:"grey"}}),(D==null?void 0:D.length)>0&&f("div",{className:"svg-inspect-wrapper",style:{display:"inline",position:"relative",minWidth:`${$}px`,maxWidth:"50%",maxHeight:"160px",outline:"1px solid grey",padding:"2px",background:s?"black":"transparent"},onClick:U=>{u(!s),U.stopPropagation()},dangerouslySetInnerHTML:{__html:D}}),_&&f("div",{style:{fontSize:"12px",border:"1p solid grey",background:"lightgrey",maxWidth:"45%",margin:"4px",padding:"4px",float:"right",maxHeight:"62px",overflow:"auto"},children:_}),X&&f("span",{style:q(z({border:"1px solid black"},X),{maxHeight:If,width:"auto"}),children:"Inline"})]})]}),re&&k(x.Fragment,{children:[y&&f(ce,{controls:[d,p],children:"Extract colors"}),y&&k("code",{style:{float:"right"},children:[g," x ",v]}),y&&d&&f(WH,{path:y}),f(MH,{group:t,elementScopes:P}),f(OH,{scopes:P,vars:B,element:h}),f("ul",{className:"group-list",children:B.filter(U=>!U.currentScope).map(U=>x.createElement($i,{cssVar:U,scopes:P,element:h,key:U.name,onChange:le=>{i({type:Ce.set,payload:{name:U.name,value:le}})},onUnset:()=>{i({type:Ce.unset,payload:{name:U.name}})}}))})]})]},T)},YH=k(ft,{el:sc,children:[f("p",{children:"The appearance of each element is determined by rules. These rules can be attached to the element itself, or to one of its parents."}),f("p",{children:"They are grouped in a box per element. You can hover the title of the box to highlight the corresponding element on the page."}),k("p",{children:["You can think of it as a tree view, except:",k("ul",{style:{paddingLeft:"48px"},children:[f("li",{children:"It's upside down, so that the most useful information is easy to find"}),f("li",{children:"Doesn't include the whole tree, only the section leading to the inspected element."}),f("li",{children:"Everything related to the element is here, so it's always obvious what applies to what"})]})]})]});function sc(){var c;const{frameRef:e}=x.useContext(it),{propertyFilter:t,search:n,filteredSelectors:r,showRawValues:o,excludedRawValues:i,inspectedPath:a}=ae;let l;try{const d=ll(a,(c=e.current)==null?void 0:c.contentWindow.document);l=dc(d)}catch(d){l=[]}const s=x.useMemo(()=>{const d=PH(l,r);return BH(d,n).map(h=>q(z({},h),{vars:h.vars.filter(m=>m.isRawValue&&!o||i.some(y=>m.name===y)?!1:t==="all"?!0:cl(m))}))},[l,t,n,r]),u=x.useRef();return k(x.Fragment,{children:[YH,k("ul",{className:"group-list",ref:u,children:[s.length===0&&f("li",{children:f("span",{className:"alert",children:"No element selected"})}),s.map(d=>f(KH,{group:d},d.label))]})]})}sc.fName="Inspector";function k0(){const[e,t]=Ju();return f("button",{className:"movable-element-collapse",onClick:()=>{t(!e)},children:e?"+":"-"})}function XH(e){const{value:t,isHtml:n}=e,r=t.replace(/var\(/,"").replace(/\)$/,"").trim(),o=r!==t&&/^[\w\-]+$/.test(r),i=x.useRef();return x.useEffect(()=>{},[t]),n?f("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{__html:t}}):f("div",{ref:i,style:{listStyleType:"none"},draggable:!0,onDrag:a=>{a.dataTransfer.setData("value",t),a.stopPropagation()},children:o?f(JH,{value:t,varName:r}):f(qH,{value:t})})}function qH(e){const{value:t}=e;return f("div",{children:f(eu,{value:t,cssVar:{name:t,value:t,usages:[]}})})}function JH(e){const{value:t,varName:n}=e,{themeEditor:{scopes:r}}=ae,{allVars:o}=x.useContext(it),[i,a]=x.useState(!1),l=o.find(d=>d.name===n)||{name:n,usages:[]},s=x.useMemo(()=>{if(!i)return null;if(!l.name.startsWith("--"))return[];const d=new RegExp(`var\\(\\s*${l.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),p=[];for(const h of o){const{name:m}=h;if(!m.startsWith("--"))continue;const y=new Set;Object.entries(r).forEach(([E,g])=>{g[m]&&d.test(g[m])&&y.add(E)}),Object.entries(rt).forEach(([E,g])=>{if(y.has(E))return;const v=g[m];v&&v.includes("--")&&d.test(v)&&y.add(E)}),y.size>0&&p.push([[...y.values()],h])}return p},[r,i]),u=Object.entries(Xo[n]||{});let c;if(u.length===0){const d=[];for(const[p,h]of Object.entries(r))for(const[m,y]of Object.entries(h))m===n&&d.push([p,y]);c=d}else c=u;return c.length===0?f("div",{children:k("b",{children:[n," ",f("span",{style:{color:"red"},children:"is undefined"})]})}):c.length===1?k("div",{children:[f("b",{draggable:!0,onDragStart:Mt(t),children:n}),f(eu,{value:c[0][1],cssVar:l}),f(Ot,{controls:[i,a],children:"Usages"}),i&&k(x.Fragment,{children:[f(Q2,{references:s}),f(J2,z({},l))]})]}):k("div",{children:[k("b",{draggable:!0,onDragStart:Mt(t),children:[n," (",c.length,")"]}),f("ul",{children:c.map(([d,p])=>k("li",{style:{clear:"both"},children:[f("span",{style:{float:"right"},className:"monospace-code",children:d}),f(eu,{value:d in r&&n in r[d]?r[d][n]:p,cssVar:l})]},d))})]})}function dC({values:e,setValues:t,width:n=65}){const[r,o]=J.pickedValue(),i=e.some(({value:c})=>c===r),[a,l]=se("palette-vertical",!0),[s,u]=x.useState(!1);return x.useEffect(()=>{if(s){const c=()=>{u(!1)};return document.addEventListener("drop",c),document.addEventListener("dragend",c),()=>{document.removeEventListener("drop",c),document.removeEventListener("dragend",c)}}},[s]),x.useEffect(()=>{u(!1)},[e]),k("div",{style:{display:"flex",flexDirection:a?"column":"row"},children:[(s||i)&&f("div",{style:{fontSize:"25px",fontWeight:"bold",textAlign:"center",border:"1px dashed grey",minWidth:"42px"},onClick:()=>t(e.filter(({value:c})=>c!==r)),onDrop:c=>{const d=c.dataTransfer.getData("value");d!==void 0&&t(e.filter(({value:p})=>p!==d))},children:"🗑"}),f(ZH,{}),!s&&!i&&f(Ot,{style:{maxWidth:"28px"},controls:[a,l],children:a?"⇓":"⇒"}),e.map(({value:c,isHtml:d},p)=>d?f("div",{style:{width:n,height:n,overflow:"hidden",background:"white"},draggable:!0,onDragStart:Mt(c,()=>u(!0)),children:f("div",{style:{width:"320px",transform:"scale(.3)",transformOrigin:"left top"},dangerouslySetInnerHTML:{__html:c}})}):f("span",{style:{display:"inline-block"},children:f("span",{draggable:!0,onClick:()=>{o(r===c?"":c)},onDragStart:Mt(c,()=>u(!0)),title:c,onDrop:h=>{let m=!1,y=h.dataTransfer.getData("value");if(y===""&&(y=h.dataTransfer.getData("text/html").trim(),m=!0),y===""&&(y=h.dataTransfer.getData("text/plain").trim()),e.some(({value:E})=>E===h.dataTransfer.getData("value"))){const E=e.filter(({value:v})=>y!==v),g=[...E.slice(0,p),{value:y,isHtml:m},...E.slice(p)];t(g),h.stopPropagation()}else t([...e,{value:y,isHtml:m}]),h.stopPropagation()},style:{display:"inline-block",overflow:"hidden",margin:"2px",backgroundImage:`${c}`,backgroundColor:c,backgroundRepeat:"no-repeat",backgroundSize:"cover",fontSize:"14px",textShadow:"white 0px 10px",width:n,height:n,outline:c===r?"4px solid yellow":"none"},children:c},c)}))]})}function QH({values:e,setValues:t}){return f("ul",{style:{display:"flex",flexDirection:"column",maxWidth:"320px"},children:e.map(n=>{const{value:r}=n;return k("li",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:[f(XH,z({values:e,setValues:t},n)),f("button",{style:{alignSelf:"flex-end"},onClick:()=>{t(e.filter(o=>o!==n))},children:"X"})]},r)})})}function ZH(){const[e,t]=J.palette(),[n,r]=x.useState(!1),[o,i]=se("manage palettes open",!1),[a,l]=x.useState(""),s=a.trim(),[u,c]=se("palettes",[]),d=e.length===0;return k("div",{children:[f(Ot,{controls:[n,r],children:"..."}),n&&k(x.Fragment,{children:[f(Re,{value:a,onChange:l}),f("button",{disabled:s==="",onClick:()=>{c([...u,{name:a,contents:e}])},children:"save"}),f("button",{disabled:d,onClick:()=>{d||c([...u,{name:"tmp",contents:e}]),t([])},children:"clear"}),f(Ot,{controls:[o,i],children:"Stored palettes"}),o&&f("ul",{children:u.map(({name:p,contents:h=[],palette:m})=>k("li",{style:{display:"flex",justifyContent:"flex-end"},children:[p," (",h.length,")",f(dC,{values:h,setValues:()=>{},width:20}),f("button",{onClick:()=>{d||c([...u,{name:"tmp",contents:m}]),t(h)},children:"restore"}),f("button",{onClick:()=>{confirm(`Delete palette "${p}"?`)&&c(u.filter(({name:y})=>y!==p))},children:"X"})]},p))})]})]})}function uc(){const[e,t]=J.pickedValue(),[n,r]=J.palette(),[o]=Ju();return k("div",{onDragOver:i=>{n.some(({value:a})=>a===i.dataTransfer.getData("value"))||i.preventDefault()},onClick:()=>{e!==""&&!n.some(({value:i})=>i===e)&&(r([...n,{value:e,isHtml:!1}]),console.log("test"),t(""))},onDrop:i=>{let a=!1,l=i.dataTransfer.getData("value");l===""&&(l=i.dataTransfer.getData("text/html").trim(),a=!0),l===""&&(l=i.dataTransfer.getData("text/plain").trim()),n.some(({value:s})=>s===i.dataTransfer.getData("value"))||r([...n,{value:l,isHtml:a}]),i.stopPropagation()},children:[f(k0,{}),n.length===0&&k("span",{children:["Empty",f("br",{})]}),o?f(dC,{values:n,setValues:r}):f(QH,{values:n,setValues:r}),f(ft,{el:uc,tasks:[()=>[`Add 2 items to the palette (${Math.min(2,n.length)}/2)`,n.length>1]],children:"You can drop values here and drag them onto the page and UI elements."})]})}uc.fName="Palette";function eG(e){const l=e,{options:t,onChange:n,selected:r}=l,o=mn(l,["options","onChange","selected"]),i=x.useId(),a=x.useCallback(s=>n(s.target.value),[]);return f("div",{children:t.map((s,u)=>k("div",{children:[f("input",z({id:`${i}-${u}`,type:"radio",name:i,value:s.value,onChange:a,checked:s.value===r},o)),f("label",{htmlFor:`${i}-${u}`,children:s.label})]},s.value))})}function cc(){const[e,t]=J.width(),[n,r]=J.height(),[o,i]=J.isSimpleSizes(),{screenOptions:a}=ae,[l]=Ju(),s=l?f(mt,{style:{marginRight:"-9px"},options:a,value:`${e},${n}`,onChange:u=>{const[c,d]=u.split(",");t(parseInt(c)),r(parseInt(d))}}):k(x.Fragment,{children:[f("button",{onClick:()=>{i(!o)},children:o?"Show all sizes":"Show only simple sizes"}),f(eG,{options:a,selected:[e,n].join(),onChange:u=>{const[c,d]=u.split(",");t(parseInt(c)),r(parseInt(d))}})]});return k("div",{children:[f(k0,{}),s,f(ft,{el:cc,tasks:[u=>["Switch to a phone view",u.width<400]],children:"Use one of these preset screen dimensions. This can display as a dropdown or radio buttons. You can choose either a simple or a complete set of options."})]})}cc.fName="ScreenSwitcher";const tG=e=>{const{name:t,serverTheme:n,activeThemeRef:r,deleteTheme:o}=e,{modifiedServerVersion:i}=ae,[a,l]=J.fileName(),s=rn(),u=a===t;return k("li",{ref:u?r:null,className:"server-theme "+(u?"server-theme-current":""),children:[t," ",u&&i&&"(*)",t!=="default"&&f("button",{style:{float:"right"},onClick:()=>Ve(xe,null,function*(){confirm(`Remove theme "${t}" from server?`)&&o(t)}),children:"Delete"}),f("button",{style:{float:"right"},onClick:()=>{!u&&l(t),s({type:Ce.loadTheme,payload:{theme:n}})},children:u?"Reset":"Switch"}),Object.keys(n).length>0&&k("span",{style:{float:"right"},children:["(",Object.keys(n).length,")"]})]},t)},A0=()=>{const e=x.useRef(),[t,{serverThemesLoading:n,deleteTheme:r}]=J.serverThemes(),[o,i]=se("theme-server-theme-height-list","140px");return n?f("div",{style:{height:o},children:"Loading server themes..."}):k(x.Fragment,{children:[f("ul",{className:"server-theme-list",onMouseUp:a=>{i(a.target.closest("ul").style.height)},style:{resize:"vertical",height:o},children:Object.entries(t).map(([a,l])=>f(tG,{name:a,serverTheme:l,activeThemeRef:e,deleteTheme:r},a))}),f(ft,{el:A0,children:"Here are all your saved themes."})]})};let qr;function nG(){qr={basics:{name:"basics",steps:[fc,D0,sc,cc,tc,Qu,ec]},history:{name:"history",steps:[ac,E0,fl,F0,lc]},movable:{name:"movable",steps:[Zu]},changes:{name:"changes",steps:[uc]},themes:{name:"themes",steps:[A0]}}}let Dt;function rG(){Dt="basics",$0()}const oG=k(ft,{el:fc,children:[f("h1",{children:"Preparation"}),f("h2",{children:"Checklist"}),k("ul",{children:[k("li",{children:[f("b",{children:"Use a large screen"}),". Small screens can be made to work, but require more effort."]}),f("li",{children:f("b",{children:"Switch to one of the preset layouts (TODO)"})}),k("li",{children:[f("b",{children:"Mouse is required for some interactions"}),"Other types of input will be added at a later point to simplify development."]})]}),f("h2",{children:"Things to be aware of / watch out for"}),k("ul",{children:[f("li",{children:"While the shown data should be accurate, sometimes more specific rules are missed, causing it to not show the most specific value."}),f("li",{children:"The quality and mostly the quantity of CSS on a page has a big impact on the quality of the experience."}),f("li",{children:"You can display data that does not use CSS variables,"}),f("li",{children:"There are some bugs and possible crashes when using pin together with lock system."})]})]});function fc(){return hC()?oG:f("button",{onClick:rG,children:"Start tutorial"})}let Mn=0;function pC(){is=null,setTimeout(()=>{console.log(is),is===null&&gC(!0)},100)}function iG(e){if(Mn>=qr[Dt].steps.length-1){const t=[...Object.keys(qr)],n=t.indexOf(Dt);Dt=t[n+1],Mn=0}else Mn++;Dt||alert("Congratulations, you finished the tutorial!"),$0(),e.stopPropagation(),e.preventDefault(),Dt&&pC()}function aG(e){if(Mn===0){const t=[...Object.keys(qr)],n=t.indexOf(Dt);Dt=t[n-1],Mn=qr[Dt].steps.length-1}else Mn--;$0(),e.stopPropagation(),e.preventDefault(),pC()}function lG(){return Dt==="basics"&&Mn===0?null:f("button",{onClick:aG,children:"Previous"})}const sp=new Set;function $0(){for(const e of sp)e()}function sG(e){return sp.add(e),()=>{sp.delete(e)}}function uG(){return Dt?qr[Dt].steps[Mn]:null}function hC(){return x.useSyncExternalStore(sG,uG)}let is=null,gC;function cG({label:e,done:t}){return f("li",{"data-done":t,children:e})}function fG(e){const t=[];let n=!0;for(const r of e){const[o,i]=r(ae);t.push([o,i]),n&&(n=i)}return[n,t]}function ft({el:e,children:t,tasks:n=[]}){const[r,o]=fG(n),{setDrawerOpen:i}=x.useContext(so);gC=i;const a=x.useRef(),l=e===hC();return x.useEffect(()=>{var s;l&&(is=e),(s=a.current)==null||s.scrollIntoView({behavior:"smooth"})},[l]),l?k("div",{ref:a,className:"tutorial-content",style:{border:"4px solid purple",background:"white",borderRadius:"7px",position:"absolute",zIndex:10},children:[k("span",{style:{float:"right",fontStyle:"italic",border:"1px solid gray"},children:[Dt," ",Mn+1,"/",qr[Dt].steps.length]}),t,f("ul",{children:o.map(([s,u])=>f(cG,{label:s,done:u}))}),f(lG,{}),f("button",{disabled:!r,onClick:iG,children:"Next"})]}):null}fc.fName="StartTutorial";const Gi=16;let Dv=0,_v;function dG({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r}=ae,[o,i]=J.inspectedPath(),[,a]=J.openGroups();x.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.contentWindow.document;if(!l)return;function s(c){var m;if(n==="alt"&&!c.altKey)return;const d=c.target;if(d===_v)return;const p=b0(d);if(p===o)return;i(p);const h=dc(d);r&&a({[h[0].label]:!0},{skipHistory:!0,appendOnly:!0}),c.preventDefault(),c.stopPropagation(),Dv=performance.now(),Ra(d),setTimeout(()=>{Yo(d)},700),eW(d),d.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}),(m=document.querySelector(".area:has(.group-list)"))==null||m.scrollTo(0,0),_v=d}return l.addEventListener("click",s),()=>{l.removeEventListener("click",s)}},[n,t]),x.useEffect(()=>{var l;if(!(performance.now()-Dv<400))try{const s=ll(o,(l=e.current)==null?void 0:l.contentWindow.document);if(!s||s.nodeName==="BODY"||s.nodeName==="HTML")return;s.scrollIntoView({block:"center",inline:"nearest"}),Ra(s);const u=setTimeout(()=>{Yo(s)},700);return()=>{clearTimeout(u),Yo(s)}}catch(s){}},[o,t])}function pG({frameRef:e,loaded:t}){const n=rn();x.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.contentWindow.document;if(!r)return;function o(a){var m,y,E;const l=a.dataTransfer.getData("value")||a.dataTransfer.getData("text/plain");if(!l||l.startsWith("http"))return;const s=a.target,u=dc(s),c=[];let d=0;for(const g of u){d++;const v=["background-color","background","background-image","color","border-color","outline-color"];for(const b of v)for(const F of g.vars)((m=F.maxSpecific)==null?void 0:m.property)===b&&!F.isRawValue&&((y=F.usages[0])!=null&&y.isFullProperty)&&c.push({element:d,property:b,varName:F.name,scope:(E=g.scopes.find(D=>D.scopeVars.some($=>$.name===F.name)))==null?void 0:E.selector})}if(c.length===0)return;const[p,...h]=c;n({type:Ce.set,payload:{name:p.varName,scope:p.scope,value:l,alternatives:h}}),a.stopPropagation()}return r.addEventListener("drop",o),r.addEventListener("dragenter",Gl),r.addEventListener("dragover",Gl),()=>{r.removeEventListener("drop",o),r.removeEventListener("dragenter",Gl),r.removeEventListener("dragover",Gl)}},[t])}function Gl(e){e.preventDefault()}const D0=e=>{const{src:t}=e,{frameRef:n}=x.useContext(it),[r,o]=J.frameLoaded(),[i,a]=J.width(),[l,s]=J.height(),u=ae.scales[`${i}x${l}`]||1;return f("div",{style:{overflow:"hidden"},className:"responsive-frame-outer-container",children:k("div",{className:"responsive-frame-container",onMouseMove:c=>{if(c.buttons!==1||c.currentTarget.className!=="responsive-frame-container")return;const d=parseInt(c.currentTarget.style.height.replace("px",""))-Gi,p=parseInt(c.currentTarget.style.width.replace("px",""))-Gi;isNaN(d)||isNaN(p)||(s(d),a(p))},style:{transform:`scale(${u})`,resize:"both",minWidth:"200px",width:`max(calc(${Gi+parseInt(i)}px * ${u}), ${Gi+parseInt(i)}px)`,minHeight:"200px",height:`${Gi+parseInt(l)}px`,overflow:"hidden",padding:"0",boxSizing:"border-box"},children:[hG,f("iframe",{onLoad:()=>o(!0),className:"responsive-frame",ref:n,src:t,width:parseInt(i),height:parseInt(l)}),f(dG,{frameRef:n,loaded:r}),f(pG,{frameRef:n,loaded:r})]})})},hG=f(ft,{el:D0,tasks:[e=>["Click any element on the page",e.inspectedPath!==""]],children:"Select an element here to see all its styles."}),mC=()=>{const{themeEditor:{scopes:e}}=ae,t=rn(),[n,r]=x.useState(!1),o=e[At]||{},[i,a]=x.useState(!1),[l,s]=x.useState(""),[u,c]=x.useState(""),d=l in o,p=/^--[a-zA-Z0-9][a-zA-Z0-9_-]+/.test(l);return k("div",{style:{marginBottom:"8px"},children:[f(Ot,{controls:[n,r],children:"Custom variable"}),n&&k("div",{children:[k("form",{onSubmit:h=>(t({type:Ce.set,payload:{name:l,value:u}}),h.preventDefault(),!1),children:[f(Re,{value:l||"--",onChange:h=>{s(h.replace(" ","-").replace(/^-*/,"--"))}}),f("br",{}),f(Re,{required:!0,value:u,onChange:c}),f("button",{disabled:!p||u===o[l]||!i&&d,title:d?o[l]===u?"Variable already has this value":`Overwrite existing value of ${o[l]}`:"Add new variable",children:"Add"})]}),d&&k("div",{children:[f("button",{onClick:()=>{t({type:Ce.unset,payload:{name:l}})},children:"Unset"}),f(ce,{controls:[i,a],children:"Confirm overwrite existing"}),k("div",{children:["Current value: ",o[l]]})]})]})]})};mC.fName="CustomVariableInput";const gG=(e,t)=>{x.useEffect(()=>{var n;[...document.styleSheets].forEach(r=>{r.disabled=!!e[r.href]}),(n=t.current)==null||n.contentWindow.postMessage({type:"set-sheet-config",payload:JSON.stringify(e)})},[e])},mG=()=>{const{frameRef:e,setSheetDisablerDisplayed:t}=x.useContext(it),[n,r]=se("set-disabled-sheets",{}),o=[...document.styleSheets].filter(({href:i})=>!!i);return gG(n,e),o===null?f("div",{children:"Loading..."}):k("div",{style:{background:"white",color:"black",border:"1px solid black",borderRadius:"6px",padding:"5px"},children:[f("button",{style:{float:"right"},onClick:()=>t(!1),children:"Close"}),f("p",{children:"The following stylesheets are loaded on the page in the same order as they are shown."}),k("p",{children:["If you uncheck one it is disabled ",f("b",{children:"while in the editor"}),"."]}),f("ul",{style:{paddingLeft:"3px",listStyleType:"none"},children:o.map(({href:i})=>{const a=i.replace(/\?.*/,""),s=a.replace(window.location.origin,"").split("/"),u=s.slice(0,-1)||[];return k("li",{style:{fontSize:"14px",marginBottom:"8px",wordBreak:"break-all"},onClick:()=>{r(q(z({},n),{[a]:!n[a]||null}))},children:[f("input",{readOnly:!0,type:"checkbox",checked:!n[a]}),u.join("/"),"/",f("b",{children:s.at(-1)})]},i)})})]})},vG={all:{label:"All"},colors:{label:"Colors"}},yG=Object.entries(vG).map(([e,{label:t}])=>({value:e,label:t}));function bG(){const[e,t]=J.propertyFilter();return f(mt,{className:"property-category-filter",title:"Filter by category",value:e||"all",onChange:t,options:yG})}function wG(){const[e,t]=J.search();return k(x.Fragment,{children:[f(Re,{value:e,onChange:t,placeholder:"search (cmd+/ or ctrl+/)",style:{marginRight:e?"24px":"4px",flexShrink:1,maxWidth:"52%"},autoComplete:"on"}),!!e&&f("button",{style:{position:"relative",right:"48px",width:"30px"},title:"clear",onClick:()=>t(""),children:"x"}),f(ce,{id:"show-raw-values",controls:J.showRawValues(),title:"View only",children:"Raw values"})]})}const xG=(e,t,n,r,o)=>{var l;const i=new FileReader,a=(l=t.target.files[0])==null?void 0:l.name;i.onload=s=>{try{const u=JSON.parse(s.target.result),c=n?z(z({},r),ensured):u;e({type:Ce.loadTheme,payload:{theme:{scopes:c}}}),a&&o(a.replace(".json",""))}catch(u){console.log("File contents is not valid JSON.",s.target.result,s)}},i.readAsText(t.target.files[0])},CG={":root":{"--heading-font-text-transform":"none","--siteBackgroundColor":"oklch(18.50% 0.000 0.00)","--paragraphMediumColor":"hsla(0,0%,100%,1)","--siteTitleColor":"oklch(67.60% 0.187 56.71)","--navigationLinkColor":"oklch(92.90% 0.069 72.20)","--headingExtraLargeColor":"oklch(51.80% 0.288 264.05)","--headingSmallColor":"oklch(78.60% 0.091 72.20)","--paragraphSmallColor":"oklch(78.60% 0.091 72.20)","--paragraphLinkColor":"oklch(70.90% 0.196 56.71)","--primaryButtonBackgroundColor":"oklch(38.84% 0.269 264.05)","--primary-button-font-text-transform":"none"}},SG={scopes:CG},EG={":root":{"--heading-font-text-transform":"none","--siteBackgroundColor":"oklch(18.50% 0.000 0.00)","--paragraphMediumColor":"hsla(0,0%,100%,1)","--siteTitleColor":"oklch(67.60% 0.000 0.00)","--navigationLinkColor":"oklch(92.90% 0.000 0.00)","--headingExtraLargeColor":"oklch(92.90% 0.000 0.00)","--headingSmallColor":"oklch(52.30% 0.000 0.00)","--paragraphSmallColor":"oklch(78.60% 0.000 0.00)","--paragraphLinkColor":"oklch(70.90% 0.000 280.96)","--primaryButtonBackgroundColor":"oklch(38.84% 0.000 264.05)"}},FG={scopes:EG};function Tv(e,t){const n=rn(),r=v0("fileName");return()=>{n({type:Ce.loadTheme,payload:{theme:e}}),r(t)}}function kG(){const[e,t]=x.useState(!1);return k(x.Fragment,{children:[f(Ot,{controls:[e,t],children:"Presets"}),e&&k(x.Fragment,{children:[f("button",{onClick:Tv(FG,"kapow-gray"),children:"Kapow gray"}),f("button",{onClick:Tv(SG,"kapow-colorful"),children:"Kapow colors"})]})]})}function AG(){const[{scopes:e},t]=J.themeEditor();x.useContext(it);const n=e[At]||{},[r,o]=J.fileName(),[i,a]=x.useState(!1);return x.useState(!1),k("div",{style:{background:"white",padding:"16px"},children:[f(kG,{}),f("div",{children:f(ce,{controls:[i,a],children:"Merge into current theme"})}),k("div",{children:[f("button",{onClick:()=>iz(r,e),children:"Export JSON"}),f("button",{onClick:()=>sz(r,e),children:"Export CSS"})]}),f("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Upload JSON:",f("input",{type:"file",accept:".json",onChange:l=>{xG(t,l,i,n,o)},style:{cursor:"copy"}})]})}),f("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Import history JSON",f("input",{type:"file",accept:".json",onChange:l=>{const s=new FileReader;s.onload=u=>{try{const c=JSON.parse(u.target.result);yz(c)}catch(c){console.log("failed uploading",c)}},s.readAsText(l.target.files[0])},style:{cursor:"copy"}})]})}),f(Re,{value:"",placeholder:"Drop/paste JSON here to import as a new theme",style:{border:"1px dashed black",width:"100%"},onChange:l=>{try{const s=JSON.parse(l),u=i?z(z({},n),s):s;t({type:Ce.loadTheme,payload:{theme:u}})}catch(s){console.log(s)}}})]})}function vC(){const{existsOnServer:e,modifiedServerVersion:t,themeEditor:{scopes:n}}=ae,[r,o]=J.fileName(),[,{uploadTheme:i}]=J.serverThemes();return k("div",{children:[f(Re,{value:r,onChange:o,style:{width:"130px",clear:"both"},placeholder:"theme"}),f("button",{style:{clear:"both"},disabled:!r||r==="default",onClick:()=>Ve(this,null,function*(){e&&!confirm("Overwrite theme on server?")||i(r,n)}),children:e?`Save${t?" (*)":""}`:"Upload"})]})}vC.fName="ThemeUploadPanel";function _0(){const[e,t]=J.frameClickBehavior(),n=e==="alt";return k("div",{children:[f(ft,{el:_0,children:"Toggle whether a normal click performs an inspection and blocks default click behavior."}),f("button",{title:n?`Clicks are processed by the page and should result in normal responses. +)`}function Sv(e){const{scope:t,selector:n,highLightMatch:r,position:o,property:i,isLocal:a,hideIfNotFound:l}=e,s=a?q2(t,n):n;return s?k("li",{style:r?X2:{},children:[!!o&&f(Qs,z({},o)),f(ci,{label:n,selector:s,initialized:!0,showLabel:!0,property:i,hideIfNotFound:l})]},n):k("li",{children:[!!o&&f(Qs,z({},o)),f("code",{children:n}),";a"]},n)}const J2=({usages:e,maxSpecificSelector:t,winningSelector:n,scope:r=":root"})=>{const[o,i]=se("use local scope selectors",!0),[a,l]=se("hide not found usages",!0),[s,u]=x.useState({}),c={},d=e.filter(({selector:h})=>h in c?(c[h]++,!1):(c[h]=1,!0));if(e.length===1&&!e[0].selector)return null;const p=r.includes(":root");return k(x.Fragment,{children:[!p&&f(ce,{controls:[o,i],title:r,children:"In local scope"}),f(ce,{controls:[a,l],title:r,children:"Only on this page"}),f("ul",{children:d.map(({property:h,selector:m,position:y})=>{const E=x0(m),g=e.length>1&&m===t;return E.length>1?k("li",{style:{border:"1px solid gray"},children:[!!y&&f(Qs,z({},y)),f("h4",{style:g?X2:{},onClick:()=>u(q(z({},s),{[m]:!s[m]})),children:f("div",{className:"monospace-code",style:{backgroundColor:"#d0d7de"},children:m.replaceAll(/\s*\,\s*/g,`, +`).trim().substring(0,100)})}),!s[m]&&f("ul",{style:{marginLeft:"16px"},children:E.map(v=>f(Sv,{scope:r,selector:v,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${v}`))})]},m):f(Sv,{scope:r,selector:m,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${m}`)})})]})};function Q2(e){const{references:t,excludedVarName:n}=e,[r,o]=x.useState(!0);return t.length===0?null:k("div",{style:{marginLeft:"24px",marginTop:"8px"},children:[f(ce,{title:"Show only elements that were found on the page ",controls:[r,o],children:"Filter found"}),f("ul",{style:{marginTop:"0"},children:t.map(([{name:i,usages:a},l])=>i===n?null:k(x.Fragment,{children:[f("h5",{style:{marginTop:"8px"},children:f(pr,{name:i})}),l.map(s=>{const u=a.reduce((d,p)=>d+","+p.selector,"").replace(/^,/,""),c=q2(s,u);return k("li",{style:{borderBottom:"1px solid gray"},children:[s!==":root"&&f("code",{style:{marginTop:"4px"},className:"monospace-code",children:s}),f("div",{draggable:!0,onDragStart:Mt(()=>`var(${i})`)}),f(ci,{label:u,hideIfNotFound:r,initialized:!0,selector:c})]},i)})]}))})]})}const oH=[":root",":where(html)","html"],Ev=20;function iH(e){const{themeEditor:{scopes:t}}=ae,n=t[At]||{},{value:r,onChange:o,elementScopes:i=[]}=e,[a,l]=x.useState(""),[s,u]=x.useState(""),[c,d]=x.useState(!0),p=x.useRef();x.useEffect(()=>{var F;return(F=p.current)==null?void 0:F.scrollIntoView({block:"nearest"})},[r]);const h=x.useMemo(()=>{const F=Object.entries(rt).reduce(($,[_,T])=>{if(i.some(B=>B.selector===_)||c&&oH.includes(_))for(const B in T)$[B]=T[B];return $},{}),D=z(z({},F),n);return Object.entries(D).filter(([$,_])=>typeof _!="undefined"&&_!==""&&(!a||new RegExp(a.replaceAll(" ","(\\-\\-?| )")).test($))&&(!s||new RegExp(s.replaceAll(" ","(\\-\\-?| )")).test(_)))},[a,s,n,c]),[m,y]=x.useState(!1),E=m?null:h.findIndex(([F])=>`var(${F})`===r),g=m?null:E-Ev,v=m?null:E+Ev,b=performance.now();return k("div",{onClick:F=>F.stopPropagation(),style:{},children:[f(ce,{controls:[c,d],children:"Global values"}),k("div",{style:{display:"flex",width:"100%"},children:[f(Re,{placeholder:`Filter name ${h.length}`,value:a,onChange:l}),f(Re,{placeholder:`Filter value ${h.length}`,value:s,onChange:u})]}),f("ul",{style:{maxHeight:"50vh",background:"white",overflowY:"scroll"},onScroll:()=>{performance.now()-b>200&&y(!0)},children:h.map(([F,D],$)=>{if(!m&&($v))return;const _=`var(${F})`,T=_===r,B=k(x.Fragment,{children:[k("span",{style:{display:"flex",justifyContent:"space-between",flexGrow:1},children:[f(pr,{name:F,style:{fontWeight:600}}),!/url\(|gradient\(/.test(D)&&f("span",{style:{maxWidth:"30%"},children:D})]}),f("span",{draggable:!0,onDragStart:Mt(_),title:D,style:{width:si,height:si,border:"1px solid black",borderRadius:"6px",background:`no-repeat left top/ cover ${D}`,float:"right",textShadow:"white 0px 10px"},children:/var\(/.test(D)&&"var"},F)]});return f("li",{ref:T?p:null,children:f("button",{onClick:()=>{!T&&o(_)},style:{display:"flex",justifyContent:"space-between",width:"100%",border:T?"4px solid black":"1px solid black"},children:B})},F)})})]})}function aH({media:e}){return f("div",{children:f("b",{className:"monospace-code",style:{fontSize:"14px",background:"#ebe9fb"},children:e})})}const Ot=x.memo(function(l){var s=l,{controls:[t,n],style:r,dispatchArgs:o=[],children:i}=s,a=mn(s,["controls","style","dispatchArgs","children"]);return f("button",q(z({},a),{title:t?"Hide":"Show",onClick:()=>n(!t,...o),style:q(z({},r),{border:t?"4px solid black":"1px solid black"}),children:i}))},R2);function Z2(e){let t,n=!1;function r(){t=setTimeout(()=>{n=!0,e()},400)}function o(){t&&clearTimeout(t),n=!1}function i(a){n&&(a.stopPropagation(),n=!1)}return{onMouseDown:r,onTouchStart:r,onMouseUp:o,onDrag:o,onMouseLeave:o,onTouchMove:o,onTouchEnd:o,onClickCapture:i}}const lH=e=>e.charAt(0).toUpperCase()+e.slice(1),sH=e=>{if(!/^--/.test(e))return["",""];const n=e.replace(/^--/,"").replace(/[-_]/g," ").split("--");return[n.slice(0,-1).join(" — "),n[n.length-1].trim().replace(/ /g,"-")]},Fv=e=>e.preventDefault(),pr=({name:e,style:t})=>{const{annoyingPrefix:n,nameReplacements:r}=ae,[o,i]=sH(e);let a=i.replaceAll(/-/g," ").trim();if(n)try{a=a.replace(new RegExp(`^${n} `),"").trim()}catch(u){}a=r?r.filter(u=>u.active&&u.to.length>0&&u.from.length>1).reduce((u,{from:c,to:d})=>{try{return u.replace(new RegExp(c),d)}catch(p){return console.log(`Failed replacing ${c} to ${d}`),u}},a):a;let l;try{l=new RegExp(`^${n}\\s*\\—\\s*`)}catch(u){}const s=o.trim().replace(l,"");return k("span",{draggable:!0,onDragStart:Mt(`var(${e})`),style:t,children:[f("span",{style:{fontSize:"13px",fontStyle:"italic",color:"black",display:"block"},children:lH(n?s:o)}),f("span",{className:"var-control-property",children:a})]})},Zs=({value:e,resolvedValue:t,cssVar:n,isDefault:r,referencedVariable:o,isOpen:i})=>{const a=si,l=`${e}${r?" (default)":""}`,s=/url\(/.test(t),c=ul(n)||Ks.test(t)||za.test(t)||s;return t&&c&&!/currentcolor/i.test(t)?k(x.Fragment,{children:[k("span",{draggable:!0,onDragStart:Mt(t),title:l,style:{width:a,height:a,border:"1px solid black",borderRadius:"6px",backgroundImage:`${t}`,backgroundColor:n.cssFunc?`${n.cssFunc}(${t})`:t,backgroundRepeat:"no-repeat",backgroundSize:"cover",float:"right",textShadow:"white 0px 10px"},children:[/var\(/.test(e)&&"var",t==="transparent"&&"👻"]}),k("span",{style:{float:"right",marginRight:"4px"},children:[o&&f(pr,{name:o.name}),!o&&(s?null:e)]})]}):o&&i?null:f("span",{draggable:!0,onDragStart:Mt(e),title:l,style:{fontSize:"14px",float:"right"},children:o?f(pr,{name:o.name}):e},1)};function eC(e,t){var n;if(!e)return null;for(const{selector:r}of e)if((n=rt[r])!=null&&n.hasOwnProperty(t.name))return rt[r][t.name];return null}function uH(e,t){return[...e,t].map(n=>n.name).join()}const tC={type:"screen","any-hover":"hover","any-pointer":"fine","forced-colors":"none",hover:"hover","inverted-colors":"none",pointer:"fine","prefers-color-scheme":"no-preference","prefers-contrast":"no-preference","prefers-reduced-motion":"no-preference","prefers-reduced-transparency":"no-preference",scripting:"enabled",update:"fast"},cH=20;function S0(e="",t,n,r=0){if(r>cH)return["<>"];const o=[];let i;for(;i=e.indexOf("var(--"),i!==-1;){const a=i+3,l=Cr(e,a),s=e.slice(a+1,l).trim(),u=s.indexOf(","),c=u===-1,d=c?s:s.slice(0,u).trim();let p;for(const{selector:h}of t||[]){if(d in(n[h]||{})){p=n[h][d];break}if(d in(rt[h]||{})){p=rt[h][d];break}}if(!p){if(c)return[`<>`];p=s.slice(u+1).trim()}r===0&&!o.includes(d)&&o.push(d),e=e.slice(0,i)+S0(p,t,n,r+1)[0]+e.slice(l+1)}return[e,o]}const $i=e=>{var V;const{cssVar:t,onChange:n,onUnset:r,referenceChain:o=[],scopes:i,parentVar:a,currentScope:l=At,element:s}=e,{width:u,showCssProperties:c,linkCssProperties:d}=ae,[{scopes:p},h]=J.themeEditor(),[m,y]=J.pickedValue(),{defaultValues:E,allVars:g}=x.useContext(it),v=p[At]||{},{name:b,usages:F,maxSpecific:D,positions:$,properties:_}=t,T=new Set(F.map(M=>M.selector)).size,B=rt[l][b]||eC(i,t)||E[b]||((V=t.maxSpecific)==null?void 0:V.defaultValue)||t.usages[0].defaultValue,[P,L]=x.useState(!1),X=(!p||!p[l]?null:p[l][b])||B,pe=X===B,{media:oe}=D||{};let[ye,Le]=S0(X,i,p);const[N,Q]=x.useMemo(()=>{var ve,Ee;const M=X==null?void 0:X.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/),ee=!M||M.length===0?null:g.find(Qe=>Qe.name===M[1])||{name:M[1],usages:[{property:((ve=t.maxSpecific)==null?void 0:ve.defaultValue)||t.usages[0].property,isFake:!0}],properties:{},positions:[]};if(!ee)return[];const ie=(Ee=i==null?void 0:i.find(Qe=>Qe.scopeVars.some(xt=>xt.name===M[1])))==null?void 0:Ee.selector;return[ee,ie]},[X]),G=x.useMemo(()=>{const{overridingMedia:M}=t.allVar||t;return(!oe||Xj(oe,z({width:u},tC)))&&(!M||!Y2({media:oe,cssVar:t,width:u}))},[u]);let re=o.length;const U=uH(o,t),le=a==null?void 0:a.name,[he,Se]=Bn(`open_${U}`,re>0&&!!N),ge=()=>Se(!he),[ze,Je]=Bn(`showSelectors_${U}`,!1),[dt,Vt]=Bn(`showRefs_${U}`,!1),[Fn,Kt]=Bn(`showPicker_${U}`,!1),C=x.useMemo(()=>{if(!he)return[];if(!b.startsWith("--"))return[];const M=new RegExp(`var\\(\\s*${b.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),ee=new Map;for(const[ie,ve]of Object.entries(p))for(const[Ee,Qe]of Object.entries(ve))M.test(Qe)&&ee.set(Ee,[...ee.get(Ee)||[],ie]);for(const[ie,ve]of Object.entries(rt)){const Ee=ie in p;for(const[Qe,xt]of Object.entries(ve))Ee&&p[ie].hasOwnProperty(Qe)||M.test(xt)&&ee.set(Qe,[...ee.get(Qe)||[],ie])}return[...ee.entries()].map(([ie,ve])=>[g.find(Ee=>Ee.name===ie)||{name:ie,usages:[]},ve])},[p,he]),A=t.cssFunc;if(re>20)return null;const S=b in v||b in(p[l]||{}),O=C.length-(le?1:0);return k("li",{onDragEnter:t.isRawValue?null:Fv,onDragOver:t.isRawValue?null:Fv,onDrop:M=>{if(t.isRawValue)return;const ee=M.dataTransfer.getData("value");new RegExp(`var\\(\\s*${t.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`).test(ee)||(ee&&n(ee),M.stopPropagation())},"data-nesting-level":re,className:np("var-control",{"var-control-in-theme":S,"var-control-no-match-screen":!G}),onClick:()=>{if(m&&m!==X){n(m);return}(m===""||m===X)&&(he||ge())},style:{position:"relative",listStyleType:"none",fontSize:"15px",clear:"both",cursor:he?"auto":"pointer",paddingTop:0},children:[!G&&f(rH,{cssVar:t,media:oe,element:s}),k("div",q(z({},Z2(M=>{y(X)})),{style:{paddingTop:6},onClick:()=>{he&&ge()},children:[f("h5",{draggable:!0,onDragStart:Mt(()=>`var(${b})`),style:{display:"inline-block",fontSize:"16px",padding:"0 4px 0",fontWeight:"400",userSelect:"none",cursor:"pointer",clear:"left"},children:f(pr,{style:{fontWeight:o.length===0?"bold":"normal"},name:b})}),f(Zs,{value:X,resolvedValue:ye,cssVar:t,isDefault:pe,referencedVariable:N,isOpen:he})]})),k("div",{children:[oe&&f(aH,{media:oe}),!!c&&k(x.Fragment,{children:[!!A&&f("span",{style:{color:"darkcyan"},children:A}),Object.entries(_).map(([M,{isFullProperty:ee,fullValue:ie,isImportant:ve}])=>{const Ee=M===(D==null?void 0:D.property),Qe=k("span",{className:"monospace-code",style:z({fontSize:"14px"},Ee?{}:{background:"grey"}),title:ee?"":ie,children:[M,Ee&&t.states&&!t.pseudos&&f("b",{style:{color:"purple"},children:t.states}),Ee&&t.pseudos&&f("a",{target:"_blank",href:d?`https://developer.mozilla.org/en-US/docs/Web/CSS/${t.pseudos}`:null,children:f("b",{style:{color:"indigo"},children:t.pseudos})}),!ee&&f("b",{style:{color:"red"},children:"*"}),!!ve&&f("b",{style:{fontWeight:"bold",color:"darkorange"},children:"!important"})]},M);return d?f("a",{target:"_blank",href:`https://developer.mozilla.org/en-US/docs/Web/CSS/${M.replace(/^-webkit-/,"")}`,style:{cursor:"help"},children:Qe},M):Qe})]})]}),!!$[0]&&f(Qs,z({},$[0]||{})),he&&k(x.Fragment,{children:[O>0&&k("div",{children:[k(Ot,{controls:[dt,Vt],children:[O,re>0&&" more"," links"]}),dt&&f(Q2,{references:C,excludedVarName:le})]}),k("div",{style:{display:"flex",clear:"both",justifyContent:"flex-end"},children:[pe&&!t.isRawValue&&f("span",{style:{margin:"6px 6px 0",color:"grey"},children:"default"}),S&&B!==null&&f("button",{title:`Remove from current theme? The value from the default theme will be used, which is currently: "${B}"`,onClick:()=>{r()},children:"Revert"}),N&&f("button",{style:{borderWidth:P?"4px":"1px"},onClick:()=>{L(!P)},children:"Raw"}),/^--/.test(t.name)&&f("button",{style:{borderWidth:Fn?"4px":"1px"},onClick:M=>{Kt(!Fn),M.stopPropagation()},children:"Link"}),!F[0].isFake&&k(Ot,{controls:[ze,Je],children:["Rules (",T,")"]})]}),Fn&&f(iH,{value:X,elementScopes:i,onChange:M=>{n(M)}}),ze&&!F[0].isFake&&k(x.Fragment,{children:[f("div",{children:b}),f(J2,{usages:F,maxSpecificSelector:D==null?void 0:D.selector,winningSelector:D==null?void 0:D.winningSelector,scope:l})]}),(!N||P)&&!Fn&&f("div",{children:f(Yj,{cssVar:t,value:X,resolvedValue:ye,referencedVars:Le,onChange:n,cssFunc:A,elementScopes:i})}),!b.startsWith("--")&&C0(b)&&f(U2,{disabled:!0,value:X,resolvedValue:ye,referencedVars:Le,onChange:()=>{},elementScopes:i}),!!N&&!P&&k("ul",{style:{margin:0},children:[f("span",{className:"monospace-code",children:Q}),x.createElement($i,{scopes:i,currentScope:Q,cssVar:N,onChange:M=>{h({type:Ce.set,payload:{name:N.name,value:M,scope:Q}})},onUnset:()=>{h({type:Ce.unset,payload:{name:N.name,scope:Q}})},key:N.name,referenceChain:[...o,t],parentVar:t})]})]})]},b)};function nC(e){const{path:t}=e,[n,r]=x.useState(!1),{frameRef:o}=x.useContext(it);return f("button",{draggable:!0,onDragStart:i=>{r(!0),i.stopPropagation()},onDragEnd:()=>{r(!1)},onDragLeave:i=>{if(!n)return;const a=i.clientX>i.currentTarget.getBoundingClientRect().right,l=i.clientXi.currentTarget.getBoundingClientRect().bottom,c={behavior:"smooth",block:s?"start":u?"end":"center",inline:a?"end":l?"start":"center"};o.current.contentWindow.postMessage({type:"scroll-in-view",payload:{path:t,options:c}},window.location.href)},title:"Scroll in view",className:"scroll-in-view",style:{border:"1px solid gray",background:"white",borderRadius:"5px",padding:"4px",fontSize:"12px",float:"right",cursor:"zoom-in"},onClick:()=>{if(o.current){o.current.contentWindow.postMessage({type:"scroll-in-view",payload:{path:t}},window.location.href);return}element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"})},children:"👁"})}const jl=18;function fH({label:e}){const[t,...n]=e.replace(/\s*\(\d\/\d\)$/,"").split(".").map(i=>i.trim()),[r,o]=x.useState(!1);return k(x.Fragment,{children:[f(ce,{controls:[r,o],children:f("div",{children:r?f("span",{children:"close"}):e})}),r&&k(x.Fragment,{children:[f(ci,{selector:t,initialized:!0,showLabel:!0}),n.map(i=>f(ci,{selector:`.${i}`,initialized:!0,showLabel:!0}))]})]})}function po({children:e}){return f("span",{style:{fontSize:"1.5rem",minWidth:"2rem",display:"inline-block",textAlign:"center"},children:e})}const rC={uiLayout:f(po,{children:"💻"}),inspectedPath:f(po,{children:"🔍"}),themeEditor:f(po,{children:"🖌"}),scales:f(po,{children:"🔬"}),width:f(po,{children:"↔"}),height:f(po,{children:"↕"})},dH={openGroups:({action:e})=>{const t=Object.keys(e);return t.length===0?"No open groups":f("div",{className:"history-open-groups",children:t.reverse().map(n=>f(x.Fragment,{children:f("pre",{className:"monospace-code",style:{fontSize:"10px",display:"inline-block"},children:f(fH,{label:n})},n)}))})},inspectedPath:({action:e,historyIndex:t})=>{const{frameRef:n}=x.useContext(it);let r;try{[r]=dc(al(e,n.current.contentWindow.document))}catch(s){}const o=ts<=t)||[]:[],a=i?f("a",{href:i,children:i.replace(/http:\/\/|https:\/\//,"")}):null;if(!r)return a||"...";const l=o&&i!==window.location.href;return k(x.Fragment,{children:[f(nC,{path:e}),f("pre",{className:"monospace-code",children:r==null?void 0:r.label}),l&&a]})},themeEditor:{set:({payload:{scope:e,name:t,value:n,alternatives:r}})=>k(x.Fragment,{children:[e&&f("pre",{className:"monospace-code",children:e}),f("br",{}),f("b",{draggable:!0,onDragStart:Mt(`var(${t})`),children:f(pr,{name:t})})," ",f("br",{}),k("span",{draggable:!0,onDragStart:Mt(n),children:[(Ks.test(n)||za.test(n)||/var\(/.test(n))&&f("span",{style:{width:jl,height:jl,border:"1px solid black",borderRadius:"6px",backgroundImage:`${n}`,backgroundColor:`${n}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",display:"inline-block",textShadow:"white 0px 10px"}}),n]}),(r==null?void 0:r.length)>0&&k("div",{children:["Alternatives (WIP, can't switch yet):"," ",f(mt,{onChange:o=>{const i=r[o.target.value];console.log(i)},options:r.map((o,i)=>({label:`${o.varName} [element ${o.element} ${o.property}]`,value:i}))})]})]}),unset:({payload:{scope:e,name:t}})=>k(x.Fragment,{children:[e&&f("pre",{className:"monospace-code",children:e}),f("br",{}),f("b",{children:f(pr,{name:t})})," = default"]}),createAlias:({payload:{name:e,value:t,generatedName:n}})=>k("span",{draggable:!0,onDragStart:Mt(`var(${n})`),children:["Alias",f("br",{}),(Ks.test(t)||za.test(t)||/var\(/.test(t))&&f("span",{style:{width:jl,height:jl,border:"1px solid black",borderRadius:"6px",backgroundImage:`${t}`,backgroundColor:`${t}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",display:"inline-block",textShadow:"white 0px 10px"}}),k("b",{children:[f(pr,{name:n})," = ",t]})]})}};function pH(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length-t,r=n<1;return f("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:A2,children:"←"})}function hH(){const{historyOffset:e}=x.useContext(ot),t=e===0;return f("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:$2,children:"→"})}function gH(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length-t,r=n<1;return f("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:D2,children:"!←"})}function mH(){const{historyOffset:e}=x.useContext(ot),t=e===0;return f("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:_2,children:"→!"})}function vH({amount:e}){const t=[];for(let n=0;nf("span",{onDragEnter:()=>{h0(e-n-1)},style:{height:"6px",borderLeft:"1px solid #646262"}},n))})}const yH=k(ft,{el:E0,children:["Here's a compact version of the history timeline. You can scroll above the history section to move the timeline one step at a time, however fast you and your mouse like to work with.",f("h1",{children:"Warning!"}),f("p",{children:"This will restore the UI state across the whole screen, which definitely is a concern for people with epilepsy."}),f("p",{children:"After having changed the page background color multiple times, for example, going through this history timeline fast will cause the whole preview screen to flash."}),f("p",{children:"It's recommended to only use it when controlled, small nudges of the wheel are possible."}),f("p",{children:"Keeping some state pinned can help reduce the amount of changes happening in rapid succession."})]});function oC(e,t){const r=(t.currentTarget.closest("minitimeline")||t.currentTarget).getBoundingClientRect(),o=Math.max(0,(t.clientX-r.left)/r.width),i=Math.round(e*o);h0(e-i)}function bH(e,t,n){var r;n.pressure>.01&&((r=t.current)!=null&&r.matches(":hover"))&&oC(e,n)}function E0(){const{past:e,historyOffset:t}=x.useContext(ot),n=e.length===0?0:100-100*t/e.length,r=x.useRef(null);return k("div",{ref:r,className:"minitimeline",onPointerMove:bH.bind(null,e.length,r),onClick:oC.bind(null,e.length),style:{width:"100%",height:"8px",padding:"2px",background:"darkgrey",boxSizing:"border-box",userSelect:"none",touchAction:"none"},children:[f("div",{style:{width:`${n}%`,height:"6px",background:"rgb(26, 217, 210)",borderRight:"3px solid black",transition:"width .06s ease-out",boxSizing:"border-box"}}),f(vH,{amount:e.length+1}),yH]})}function iC({id:e}){if(e!=="themeEditor")return f("button",{title:"Clear all other values and move this one to start",onClick:fz.bind(null,e),children:"Clear others"})}function F0(){const{pins:e}=x.useContext(ot),[t,n]=x.useState(!1),r=e.size;return k(x.Fragment,{children:[k("button",{title:t?"":[...e.keys()].join(", "),onClick:o=>{n(!t)},children:[k("span",{style:{filter:r===0?"grayscale(1)":"none"},children:["📌",r]}),k(ft,{el:F0,children:[f("p",{children:"This button shows how many pins are applied and allows you to toggle each."}),f("p",{children:"Notice how the timeline now jumps over the entries we pinned earlier."})]})]}),t&&f(wH,{close:()=>n(!1)})]})}function wH({close:e}){const{pins:t,past:n,historyOffset:r,states:o}=x.useContext(ot),[i]=x.useState(new Map(t)),a=[...i.entries()],l=x.useRef();let s=0;return x.useEffect(()=>{const u=c=>{l.current.parentNode.contains(c.target)||e()};return document.addEventListener("click",u),()=>{document.removeEventListener("click",u)}},[]),f("ul",{ref:l,style:{zIndex:100,position:"absolute",background:"white",border:"1px solid black"},children:a.map(([u,c])=>{const d=t.has(u),p=()=>so(u,c),h=()=>Ku(u),m=c{h0(E),g.stopPropagation()},children:"visit"}),f(iC,{id:u})]})})})}function aC(e){const t=Math.round(e.deltaY/100);t>0?p0(t,!0):ma(-t,!0)}function ac(){const[e,t]=J.visualizeHistory(),[n,r]=J.visualizeHistoryAlways();return k("div",{onWheelCapture:aC,children:[f(E0,{}),f(F0,{}),f(ce,{controls:[e,t],children:"Visualize"}),e&&f(ce,{title:"Always or only when in a previous state",controls:[n,r],children:"Always"}),f("button",{onClick:()=>{confirm("Clear all history, keeping only current state?")&&Ez()},children:"Clear"}),k("div",{style:{display:"inline-flex"},children:[f(gH,{}),f(pH,{}),f(hH,{}),f(mH,{})]}),k(ft,{el:ac,children:[f("p",{children:"Every step you do in the editor is tracked in a history timeline. Keyboard shortcuts (control+z and others) work like anywhere else."}),f("p",{children:`On top of "normal" history buttons, there's the fast buttons (!← and →!), that jump to the most important steps like edits to style rules, newly inspected elements, and editor UI layout changes. It jumps over the less interesting steps, while still applying their result.`})]})]})}ac.fName="HistoryControls";function lc(){const{lastAlternate:e,historyOffset:t,past:n,lastAlternateIndex:r}=x.useContext(ot),o=n.length-t-r,i=e.length===0,a=i?f(x.Fragment,{children:"Stash"}):k(x.Fragment,{children:[e.length," steps stashed ",f("br",{}),o," steps since"]}),l=x.useMemo(()=>JSON.stringify(e.map(s=>[...s.entries()].map(([u])=>u)),null,2),[e]);return k("div",{className:"flex-column",style:{background:`rgba(26, 217, 210, ${Math.min(e.length/20,1)})`},children:[f("button",{title:`Apply/create stash: +`+l,onClick:Fz,style:{textAlign:"left"},disabled:i&&t===0,children:a}),!i&&f(xH,{}),f(ft,{el:lc,children:"If you travel back and discard future, it's still kept here. This allows you to splice in a new edit earlier into your history and just re-apply everything after it."})]})}function xH(){return f("button",{onClick:Cz,children:"Clear"})}lc.fName="HistoryStash";function CH(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}const kv=new Set;function SH({containerRef:e,id:t}){const{past:{length:n}}=x.useContext(ot),[r,o]=Bn(`areaOffset#${t}`,[0,n]),[i,a]=r.length?r:[r,0];x.useEffect(()=>{a===n&&e.current.scrollTo({top:i,left:0})},[]),x.useEffect(()=>{const l=performance.now(),s=u=>{if(performance.now()-l<500)return;const c=u.currentTarget.scrollTop,d=c<10?0:Math.floor(c);o([d,n],{skipHistory:!0,appendOnly:!0})};return CH(e.current,"scroll",s)},[])}function EH({containerRef:e,id:t}){const[n]=Bn(`areaOffset#${t}`,[0]),[r]=n.length?n:[n];x.useEffect(()=>{var o;(o=e.current)==null||o.scrollTo({top:r,left:0})},[r]),x.useEffect(()=>{if(kv.has(t))return;kv.add(t);const o=setTimeout(()=>{var a;(a=e.current)==null||a.scrollTo({top:r,left:0})},1e3),i=setTimeout(()=>{var a,l;((a=e.current)==null?void 0:a.scrollY)>0||(l=e.current)==null||l.scrollTo({top:r,left:0})},2e3);return()=>{clearTimeout(o),clearTimeout(i)}},[])}let lC;function FH(e){return lC=e}function kH(e){const{historyOffset:t}=x.useContext(ot);return lC===e.id||e.id==="drawer"?null:t===0?f(SH,z({},e)):f(EH,z({},e))}function Yn(r){var o=r,{id:e,children:t=[]}=o,n=mn(o,["id","children"]);const{overArea:i,setOverArea:a,setOverElement:l,timeoutRef:s,areaRefs:u}=x.useContext(uo),c=i===e,d=x.useRef();return u.current[e]||(u.current[e]=d),k("div",q(z({style:{position:"relative"}},n),{id:e,ref:d,className:"area",children:[f(kH,{id:e,containerRef:d}),!!t&&x.Children.map(t,(p,h)=>f(Lz,{homeAreaId:e,element:p,index:h})),f("div",{className:"area-dropzone"+(c?" drag-hovered":""),style:{order:1e3,background:"rgba(167,238,227,0.22)",outline:"2px dashed grey",outlineOffset:"-8px"},onDragEnter:x.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area&&clearTimeout(s.current.area),a(e),l(null),s.current.lastEntered=e},[]),onDragLeave:x.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area=setTimeout(()=>{s.current.lastEntered===e&&a(null)},M2)},[])})]}))}function AH(){const{hostAreaId:e,homeAreaId:t}=x.useContext(ui),n=e||t;x.useEffect(()=>{FH(n)},[n])}function Av(e){return e?typeof e.type=="function"?e.type.name:e.type:""}const sC=[()=>{const{pins:e}=x.useContext(ot);return["Pin the screen width and height.",e.has("width")&&e.has("height")]}];function uC(){return k(x.Fragment,{children:[f("p",{children:"We're tracking so many things, that it's quite likely you'll not want to use the older version of certain things, but still want to wind back to any point in history for everything else."}),f("p",{children:"To achieve this, there is a pin button, which pins the value at a particular point in time, and so allows you to browse everything else."}),f("p",{children:"Note that pinning does not prevent you from making new changes to the same type of value (e.g. screen width). Rather, the new value will now be pinned instead. You can easily unpin this value again if needed."})]})}function $H(e){const{id:t,historyIndex:n}=e,{pins:r,historyOffset:o,past:i}=x.useContext(ot),a=r.get(t),l=n===a,s=a>i.length-o;return k(x.Fragment,{children:[f("button",{className:l?"pinned-here":"",style:{outline:l?"2px solid black":"none",background:l?"white":"transparent"},onClick:u=>{l?Ku(t):so(t,n),u.stopPropagation()},children:f("span",{className:"pin",children:"📌"})}),l&&!s&&f(iC,{id:t})]})}function DH(e){const{id:t}=e,{pins:n}=x.useContext(ot),r=C2(t),i=n.get(t)===r;return k("button",{className:i?"pinned-latest":"pin-latest",style:{float:"right",outline:i?"2px solid black":"none",background:i?"white":"transparent"},onClick:i?()=>{Ku(t)}:()=>{pz(t)},title:"Pin to latest",children:[f("span",{className:"pin",children:"📌"}),"→"]})}function _H(e){const{id:t,historyIndex:n}=e,{pins:r}=x.useContext(ot);if(n===0)return null;const i=r.get(t)===0;return k("button",{className:i?"pinned-initial":"",style:{float:"right",outline:i?"2px solid black":"none",background:i?"white":"transparent"},onClick:i?()=>{Ku(t)}:()=>{hz(t)},title:"Pin to initial",children:["←",f("span",{className:"pin",children:"📌"})]})}function lp(e){const{actions:t,showPayloads:n,historyIndex:r}=e,{previewComponents:o,pins:i}=x.useContext(ot);return f("ul",{className:"history-actions",children:[...t].map(([a,l],s)=>{const u=typeof l=="object",c=u&&"type"in l,d=c?JSON.stringify(l.payload,null,2):u?JSON.stringify(l,null,2):l,p=c?"::"+Av(l):"",h=d==="{}",m=!c&&(typeof d=="boolean"||typeof d=="number"||(d==null?void 0:d.length)<40),y=o[a],E=typeof y=="function"?y:a in o?o[a][Av(l)]:null,g=i.has(a)&&i.get(a)!==r,v=rC[a]||"";return k("li",{title:g?"Overridden by pin":"",style:{clear:"both",opacity:g?.5:1},children:[f($H,{id:a,historyIndex:r}),f(DH,{id:a,historyIndex:r}),f(_H,{id:a,historyIndex:r}),v,!E&&k("span",{children:[f("b",{children:a}),p]}),!E&&m&&f("pre",{style:{margin:0,float:"right"},className:"monospace-code",children:d===!1?"false":d===!0?"true":d}),!h&&n&&f("pre",{className:"monospace-code",children:d===!1?"false":d===!0?"true":d}),E&&f(E,{action:l,historyIndex:r,payload:l.payload})]},`${r}:${s}`)})})}function TH(){const{past:e,historyOffset:t,lastActions:n,initialStates:r}=x.useContext(ot),[o,i]=x.useState(!1),a=e.length-t,l=t===0?n:e[a].lastActions,s=a===0,u=s&&o?[...r.entries()].filter(([c])=>c in J):[...l.entries()];return k("div",{onWheelCapture:aC,style:{minWidth:"280px",maxWidth:"400px",minHeight:"240px",overflow:"hidden visible"},children:[s&&f(ce,{controls:[o,i],children:"Show all initial values"}),f(lp,{historyIndex:a,actions:u}),k(ft,{el:cl,tasks:sC,children:[f(uC,{}),"Since history visualization is disabled, this only shows current history entry."]})]})}function cl(){const[e,t]=J.visualizeHistoryAlways(),[n,r]=x.useState(!1),[o,i]=se("showAllHistory",!0),[a,l]=x.useState(!1),[s,u]=x.useState(!1),{past:c,historyOffset:d,lastActions:p,pointedStates:h,pins:m}=x.useContext(ot),y=ae.visualizeHistory&&(e||d!==0);let E=x.useRef();if(x.useEffect(()=>{var b;(b=E.current)==null||b.scrollIntoView({block:"nearest"})},[d]),!y)return f(TH,{});const g=c.length-d;let v=!1;return k("div",{className:"history",children:[k(ft,{el:cl,tasks:sC,children:[f(uC,{}),"See all steps you took here."]}),f(AH,{}),f(ce,{controls:[o,i],children:"Show all"}),f(ce,{controls:[n,r],children:"Debug"}),n&&k("div",{children:[f(ce,{controls:[a,l],children:"Inspect current state"}),f(ce,{controls:[s,u],children:"Show payloads"}),f("button",{onClick:()=>console.log(h),children:"console.log"}),f("button",{onClick:mz,children:"export"}),a&&f("pre",{className:"monospace-code",children:JSON.stringify(Object.fromEntries(h),null,2)})]}),k("ul",{className:"connected-list",children:[c.map(({states:b,lastActions:F},D)=>{const $=D===g;v=v||$;const _=Math.abs(D-g),T=[...F.entries()].some(([B,P])=>typeof P=="object"||b.get(B)!==h.get(B));if(!$&&!o&&D!==0&&!f0(F)){const B=[...F.keys()];if(!B.some(L=>m.has(L)&&m.get(L)===D)&&!B.some(L=>c0.includes(L)))return null}return k("li",{id:$?"history-current-state":"",ref:D===g?E:null,style:{position:"relative",outline:D===g?"2px solid yellow":"none"},children:[f("span",{style:{marginLeft:"-32px"},children:D}),f(lp,{historyIndex:D,actions:[...F.entries()],showPayloads:s}),k("div",{className:"history-state-buttons",style:{display:"flex",justifyContent:"stretch"},children:[f("button",{style:{width:"50%"},onClick:$?()=>{t(!0),ma(d)}:v?()=>{ma(_)}:()=>{p0(_)},children:$?"jump to end":"jump here"}),T&&f("button",{style:{width:"50%"},onClick:B=>{for(const[P,L]of F.entries())Xu(P,L);B.preventDefault(),B.stopPropagation()},children:"do again"})]})]},D)}),k("li",{onClick:v?()=>{ma(d)}:null,style:{outline:d===0?"2px solid yellow":"none"},children:[f("span",{style:{marginLeft:"-32px"},children:"Latest"}),f(lp,{historyIndex:c.length,actions:[...p.entries()],showPayloads:s})]},"latest")]})]})}cl.fName="HistoryVisualization";function cC(e,t){try{return t===""||e.name.replace(/-+/g," ").match(t)?!0:e.usages.some(n=>n.property.match(t))}catch(n){return!0}}const BH=(e,t)=>{if(!t)return e;const n=t.replace(/^\!/,""),r=n.length!==t.length;try{return e.map(o=>q(z({},o),{vars:o.vars.filter(i=>{const a=cC(i,n);return r?!a:a})}))}catch(o){return e}};function PH(e,t){return t.length===0?e:e.map(n=>q(z({},n),{vars:n.vars.filter(r=>t.some(i=>r.maxSpecific.selector.includes(i)))}))}function MH(e){const t=rn(),{group:n,elementScopes:r}=e;if(!n.inlineStyles)return null;const o=Object.entries(n.inlineStyles);return k("div",{children:[f("h5",{style:{color:"red"},children:"Inline styles"}),f("ul",{children:o.map(([i,a])=>{if(typeof a=="undefined")return null;const l=a.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/);if(l&&l.length>0){const u={name:l[1],usages:[{property:i}],properties:{[i]:{isFullProperty:!0,fullValue:a,isImportant:!1}},maxSpecific:{property:i},positions:[]};return f($i,{cssVar:u,scopes:r,onChange:c=>{t({type:Ce.set,payload:{name:u.name,value:c}})},onUnset:()=>{t({type:Ce.unset,payload:{name:u.name}})}},u.name)}return f("li",{children:k("span",{className:"monospace-code",children:[i,": ",a]})},i)})})]})}function OH(e){const{scopes:t,vars:n,element:r}=e,o=rn(),[i,a]=se("show-scope-locators",!1);if(t.length===0)return null;const l=[];return k("div",{style:{background:"lightyellow",marginBottom:"24px",padding:"4px",border:"1px solid black"},children:[f(ce,{controls:[i,a],style:{float:"right"},children:"Find on page"}),f("ul",{children:t.map(({selector:s,matchingSelector:u,scopeVars:c})=>{const d=s.split();l.push(...c);const p=n.filter(h=>h.currentScope===s);return p.length===0?null:k("li",{children:[f("span",{style:{border:"1px solid gray"},className:"monospace-code",children:d.map(h=>h===u?f("b",{children:h},"selector"):h)}),i&&!s.includes(":root")&&!s.includes(":where(html)")&&f(ci,{selector:s,initialized:!0,showLabel:!1}),f("ul",{style:{marginBottom:"24px"},children:p.map(h=>x.createElement($i,{cssVar:h,scopes:t,currentScope:s,element:r,key:h.name,onChange:m=>{o({type:Ce.set,payload:{name:h.name,value:m,scope:s}})},onUnset:()=>{o({type:Ce.unset,payload:{name:h.name,scope:s}})}}))})]},s)})})]})}const RH=({amount:e=3,format:t="array",group:n=20,sample:r=10,minHue:o=0,maxHue:i=360}={})=>({amount:e,format:t,group:n,sample:r,minHue:o,maxHue:i}),NH=e=>typeof e=="string"?e:e.src,IH=(e,t)=>{const n=e.map(r=>{const[o,i,a]=Array.isArray(r)?r:r.split(",").map(Number);return`color(display-p3 ${o/255} ${i/255} ${a/255})`});return t.amount===1?n[0]:n},Rf=(e,t)=>{const n=Math.round(e/t)*t;return Math.min(n,255)},Nf=new Map,LH=e=>Nf.has(e)?Promise.resolve(Nf.get(e)):new Promise((t,n)=>{const r=new OffscreenCanvas(0,0),o=r.getContext("2d",{colorSpace:"display-p3"}),i=new Image;i.onload=()=>{r.height=i.height,r.width=i.width,o.drawImage(i,0,0);const{data:a}=o.getImageData(0,0,i.width,i.height,{colorSpace:"display-p3"});Nf.set(e,a),t(a)},i.onerror=a=>(console.log(a),n(Error("Image loading failed."))),i.crossOrigin="",i.src=e}),zH=(e,t)=>{const n=4*t.sample,r={};for(let u=0;u360,a=o?360+t.minHue:t.minHue,l=t.maxHue%360;function s(u){return o?u>=a||u<=l:i?u<=l||u>=a:u>=a&&u<=l}return IH(Object.entries(r).filter(([,u])=>u>1).map(([u,c])=>{const[d,p,h]=u.split(",");return[u,c,zr(`color(display-p3 ${d/255} ${p/255} ${h/255})`)]}).filter(([,,{h:u}])=>s(u)).sort(([,,u],[,,c])=>u.c>c.c?-1:1).slice(0,t.amount).map(([u])=>u),t)};function jH(e,t){return Ve(this,null,function*(){const n=yield LH(NH(e));return zH(n,RH(t))})}const $v=42;function HH({value:e}){const{palette:t}=ae,[n,r]=J.pickedValue(),o=t.some(({value:i})=>i===e);return f("div",{style:{background:"transparent",border:"transparent",position:"absolute",top:0,right:0,bottom:0,left:0},onClick:()=>{r(n===e?"":e)},children:o&&"V"})}function GH({color:e,minLightness:t,maxLightness:n}){const r=zr(e);if(!r)return;const{l:o,c:i,h:a=0,alpha:l=1}=r,s=o*100;if(sn)return;const u=$n(s,i,a,l);return f("div",{title:u,draggable:!0,onDragStart:c=>c.dataTransfer.setData("value",u),style:{position:"relative",display:"inline-block",fontWeight:900,verticalAlign:"top",width:$v,height:$v,backgroundColor:e,color:"green"},children:f(HH,{value:u})})}function WH(e){const{path:t}=e,[n,r]=x.useState(),[o,i]=x.useState(),[a,l]=Ge("image color group",10),[s,u]=Ge("image color sample",20),[c,d]=Ge("image color amount",90),[p,h]=Ge("image color min lightness",0),[m,y]=Ge("image color max lightness",100),[E,g]=Ge("image color min hue",0),[v,b]=Ge("image color max hue",360),[F,D]=se("image color preserve lightness range",!1),[$,_]=se("image color preserve hue range",!1),[T,B]=x.useState(!0);if(x.useEffect(()=>{const P=performance.now(),L=setTimeout(()=>Ve(this,null,function*(){B(!0),r(yield jH(t,{sample:s,group:a,amount:Math.max(2,c),minHue:E,maxHue:v})),i(performance.now()-P),B(!1)}),80);return()=>clearTimeout(L)},[t,a,s,c,E,v]),!!n)return k("div",{children:[f("br",{}),"group: ",a,k("span",{style:{float:"right"},children:[" ",o,"ms"]}),f("input",{disabled:T,type:"range",value:a,min:1,max:100,style:{width:"95%"},onChange:P=>{l(parseInt(P.target.value))}}),"sample: ",s,f("input",{disabled:T,type:"range",value:s,min:1,max:50,style:{width:"95%"},onChange:P=>{u(parseInt(P.target.value))}}),"amount: ",f("input",{type:"number",value:c,onChange:P=>d(P.target.value)}),f("input",{disabled:T,type:"range",value:c,step:9,min:9,max:90,style:{width:"95%"},onChange:P=>{d(parseInt(P.target.value))}}),k("div",{style:{display:"flex"},children:[f("input",{disabled:T,type:"number",value:E,min:0,max:359,onChange:P=>{g(parseInt(P.target.value))}}),f("input",{disabled:T,type:"number",value:v,min:1,max:360,onChange:P=>{b(parseInt(P.target.value))}}),f(ce,{disabled:E<=0&&v>=360,controls:[$,_],children:"Fix hue range"})]}),k("div",{style:{background:"linear-gradient(90deg in oklch longer hue, transparent 0%, transparent 16px, oklch(71.68% 0.1505 0) 16px, oklch(71.68% 0.1505 0) calc(100% - 16px), transparent calc(100% - 16px), transparent 100%)"},children:[f("input",{disabled:T||E<0,type:"range",value:(360+E)%360,min:0,max:359,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);g(L),L>v-5&&b(L+5),$&&b(v+L-E)}}),f("input",{disabled:T||v>360,type:"range",value:v%360,min:1,max:360,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);b(L),L{h(parseInt(P.target.value))}}),f("input",{disabled:T,type:"number",value:m,min:1,max:100,onChange:P=>{y(parseInt(P.target.value))}}),f(ce,{disabled:p<=0&&m>=100,controls:[F,D],children:"Fix lightness range"})]}),k("div",{children:[f("input",{disabled:T,type:"range",value:p,min:0,max:99,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);h(L),L>m-5&&y(L+5),F&&y(m+L-p)}}),f("input",{disabled:T,type:"range",value:m,min:1,max:100,style:{width:"95%"},onChange:P=>{const L=parseInt(P.target.value);y(L),Lf(GH,{color:P,minLightness:p,maxLightness:m}))]})}const If="28px",UH=1e-6;function VH(e,t){t.preventDefault(),t.stopPropagation();const n=t.dataTransfer.getData("value");n&&fC(n,e)}function fC(e,{groupColors:t,maximizeChroma:n}){const r=zr(e);if(!r)return;const o=t.filter(([l])=>!l.isRawValue).map(([{name:l}])=>`var(${l})`);let i=!1;const a=rn();return t.forEach(([{name:l,isRawValue:s},u,c,d=":root"])=>{if(s||o.includes(c))return;const p=zr(u);if(!p||p.l<.001||p.l>.999||!n&&p.c{const{group:t}=e,{propertyFilter:n,maximizeChroma:r}=ae,[{scopes:o},i]=J.themeEditor(),[a,l]=J.search(),[s,u]=J.svgDarkBg(),c=v0("pickedValue"),[d,p]=se("image color show",!1),{element:h,path:m,elementInfo:{src:y,srcset:E,imgWidth:g,imgHeight:v,alt:b,title:F,html:D,width:$},textContent:_,label:T,vars:B,scopes:P,isRootElement:L,isDeepest:K,inlineStyles:X}=t,{defaultValues:pe}=x.useContext(it),[oe,ye]=J.openGroups(),Le=U=>{const ge=oe,{[U]:le}=ge,he=mn(ge,[pc(U)]),Se=le?he:q(z({},he),{[U]:!0});ye(Se)},N=x.useMemo(()=>B.reduce((U,le)=>{var he,Se;if(ul(le)){const{name:ge}=le;if(!ge.startsWith("--"))return ge.toLowerCase()!=="currentcolor"&&U.push([le,ge]),U;const ze=qo[ge];let Je=le.currentScope;if(!Je&&P.length>0){for(const C in ze||{})if(Je=((he=P.find(A=>A.selector===C))==null?void 0:he.selector)||Je,Je)break}const dt=rt[Je||":root"][ge]||eC(P,le)||pe[ge]||((Se=le.maxSpecific)==null?void 0:Se.defaultValue)||le.usages[0].defaultValue,Fn=(!o||!o[Je]?null:o[Je][ge])||dt;let[Kt]=S0(Fn,P,o);if(Kt.includes("calc(")){const C={steps:[]};let A=Kt;for(;A.includes("calc(");){const S=A.indexOf("calc("),O=Cr(A,S+5);try{const[V]=oc(A.slice(S+5,O-1),C);A=A.slice(0,S)+V+A.slice(O+1)}catch(V){break}}Kt=A}Kt&&Kt!=="inherit"&&Kt.toLowerCase()!=="currentcolor"&&U.push([le,le.cssFunc?`${le.cssFunc}(${Kt})`:Kt,Fn,Je])}return U},[]),[B,P,o]),G=!(B.length===0)||X||y;if(!G&&!K&&!y&&!D)return null;const re=!!oe[T];return k("li",{className:"var-group",style:{marginBottom:"12px"},children:[k("div",{style:{position:"sticky",top:0,background:"white",zIndex:12,overflow:re?"hidden":"auto"},onMouseEnter:()=>{Ra(h)},onMouseLeave:()=>{Xo(h)},children:[L?f("span",{style:{float:"right"},children:"global"}):f(nC,{path:m}),k("h4",{style:{fontWeight:400,marginBottom:0,paddingRight:"4px",cursor:G?"pointer":"initial",display:"flex",justifyContent:"space-between",alignItems:"flex-start",maxHeight:re?"128px":"300px",overflowX:"hidden",overflowY:"auto"},onClick:G?U=>{const le=x5("pickedValue");le&&fC(le,{groupColors:N,maximizeChroma:r})||(Le(T),queueMicrotask(()=>{U.target.scrollIntoView({block:"nearest"})},0))}:null,onDrop:U=>VH({groupColors:N,maximizeChroma:r},U),onDragOver:U=>{U.preventDefault()},children:[k("div",{children:[T," (",B.length,")",n!=="all"&&f("span",{style:{color:"grey",fontSize:"12px"},children:n}),a!==""&&k("span",{style:{color:"grey",fontSize:"12px"},children:['- "',a,'"',f("button",{style:{padding:"3px 3px 1px",position:"relative",bottom:"4px",borderColor:"grey"},title:"Clear search",onClick:()=>{l("")},children:"X"})]}),N.length>0&&f("div",{style:{overflowX:"hidden"},children:N.map(([{name:U},le,he,Se])=>{const ge=U.startsWith("--");return x.createElement("div",q(z({onDragOver:ze=>ze.preventDefault(),onDrop:ze=>{let Je=ze.dataTransfer.getData("value");Je===""&&(Je=ze.dataTransfer.getData("text/plain").trim()),Je!==""&&(i({type:Ce.set,payload:{name:U,value:Je,scope:Se}}),ze.stopPropagation())},draggable:!0},Z2(()=>c(le))),{onDragStart:Mt(he),key:U,title:U===le?U:`${U}: ${he}`,style:{display:"inline-block",width:If,height:If,lineHeight:"1.5",border:"1px solid black",borderRadius:"6px",backgroundImage:`${le}`,backgroundColor:`${le}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",marginTop:"3px",marginLeft:"6px",paddingTop:"3.5px",fontSize:"14px",textAlign:"center",textShadow:ge?"white 0px 3px":"white 2px 2px"}}),/^var\(/.test(he)?"v":le==="transparent"?"👻":ge?f(x.Fragment,{children:" "}):"r")})})]}),y&&f("img",{src:y,srcSet:E,alt:b,title:F||b,style:{height:"52px",float:"right",backgroundColor:"grey"}}),(D==null?void 0:D.length)>0&&f("div",{className:"svg-inspect-wrapper",style:{display:"inline",position:"relative",minWidth:`${$}px`,maxWidth:"50%",maxHeight:"160px",outline:"1px solid grey",padding:"2px",background:s?"black":"transparent"},onClick:U=>{u(!s),U.stopPropagation()},dangerouslySetInnerHTML:{__html:D}}),_&&f("div",{style:{fontSize:"12px",border:"1p solid grey",background:"lightgrey",maxWidth:"45%",margin:"4px",padding:"4px",float:"right",maxHeight:"62px",overflow:"auto"},children:_}),X&&f("span",{style:q(z({border:"1px solid black"},X),{maxHeight:If,width:"auto"}),children:"Inline"})]})]}),re&&k(x.Fragment,{children:[y&&f(ce,{controls:[d,p],children:"Extract colors"}),y&&k("code",{style:{float:"right"},children:[g," x ",v]}),y&&d&&f(WH,{path:y}),f(MH,{group:t,elementScopes:P}),f(OH,{scopes:P,vars:B,element:h}),f("ul",{className:"group-list",children:B.filter(U=>!U.currentScope).map(U=>x.createElement($i,{cssVar:U,scopes:P,element:h,key:U.name,onChange:le=>{i({type:Ce.set,payload:{name:U.name,value:le}})},onUnset:()=>{i({type:Ce.unset,payload:{name:U.name}})}}))})]})]},T)},YH=k(ft,{el:sc,children:[f("p",{children:"The appearance of each element is determined by rules. These rules can be attached to the element itself, or to one of its parents."}),f("p",{children:"They are grouped in a box per element. You can hover the title of the box to highlight the corresponding element on the page."}),k("p",{children:["You can think of it as a tree view, except:",k("ul",{style:{paddingLeft:"48px"},children:[f("li",{children:"It's upside down, so that the most useful information is easy to find"}),f("li",{children:"Doesn't include the whole tree, only the section leading to the inspected element."}),f("li",{children:"Everything related to the element is here, so it's always obvious what applies to what"})]})]})]});function sc(){var c;const{frameRef:e}=x.useContext(it),{propertyFilter:t,search:n,filteredSelectors:r,showRawValues:o,excludedRawValues:i,inspectedPath:a}=ae;let l;try{const d=al(a,(c=e.current)==null?void 0:c.contentWindow.document);l=dc(d)}catch(d){l=[]}const s=x.useMemo(()=>{const d=PH(l,r);return BH(d,n).map(h=>q(z({},h),{vars:h.vars.filter(m=>m.isRawValue&&!o||i.some(y=>m.name===y)?!1:t==="all"?!0:ul(m))}))},[l,t,n,r]),u=x.useRef();return k(x.Fragment,{children:[YH,k("ul",{className:"group-list",ref:u,children:[s.length===0&&f("li",{children:f("span",{className:"alert",children:"No element selected"})}),s.map(d=>f(KH,{group:d},d.label))]})]})}sc.fName="Inspector";function k0(){const[e,t]=Ju();return f("button",{className:"movable-element-collapse",onClick:()=>{t(!e)},children:e?"+":"-"})}function XH(e){const{value:t,isHtml:n}=e,r=t.replace(/var\(/,"").replace(/\)$/,"").trim(),o=r!==t&&/^[\w\-]+$/.test(r),i=x.useRef();return x.useEffect(()=>{},[t]),n?f("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{__html:t}}):f("div",{ref:i,style:{listStyleType:"none"},draggable:!0,onDrag:a=>{a.dataTransfer.setData("value",t),a.stopPropagation()},children:o?f(JH,{value:t,varName:r}):f(qH,{value:t})})}function qH(e){const{value:t}=e;return f("div",{children:f(Zs,{value:t,cssVar:{name:t,value:t,usages:[]}})})}function JH(e){const{value:t,varName:n}=e,{themeEditor:{scopes:r}}=ae,{allVars:o}=x.useContext(it),[i,a]=x.useState(!1),l=o.find(d=>d.name===n)||{name:n,usages:[]},s=x.useMemo(()=>{if(!i)return null;if(!l.name.startsWith("--"))return[];const d=new RegExp(`var\\(\\s*${l.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),p=[];for(const h of o){const{name:m}=h;if(!m.startsWith("--"))continue;const y=new Set;Object.entries(r).forEach(([E,g])=>{g[m]&&d.test(g[m])&&y.add(E)}),Object.entries(rt).forEach(([E,g])=>{if(y.has(E))return;const v=g[m];v&&v.includes("--")&&d.test(v)&&y.add(E)}),y.size>0&&p.push([[...y.values()],h])}return p},[r,i]),u=Object.entries(qo[n]||{});let c;if(u.length===0){const d=[];for(const[p,h]of Object.entries(r))for(const[m,y]of Object.entries(h))m===n&&d.push([p,y]);c=d}else c=u;return c.length===0?f("div",{children:k("b",{children:[n," ",f("span",{style:{color:"red"},children:"is undefined"})]})}):c.length===1?k("div",{children:[f("b",{draggable:!0,onDragStart:Mt(t),children:n}),f(Zs,{value:c[0][1],cssVar:l}),f(Ot,{controls:[i,a],children:"Usages"}),i&&k(x.Fragment,{children:[f(Q2,{references:s}),f(J2,z({},l))]})]}):k("div",{children:[k("b",{draggable:!0,onDragStart:Mt(t),children:[n," (",c.length,")"]}),f("ul",{children:c.map(([d,p])=>k("li",{style:{clear:"both"},children:[f("span",{style:{float:"right"},className:"monospace-code",children:d}),f(Zs,{value:d in r&&n in r[d]?r[d][n]:p,cssVar:l})]},d))})]})}function dC({values:e,setValues:t,width:n=65}){const[r,o]=J.pickedValue(),i=e.some(({value:c})=>c===r),[a,l]=se("palette-vertical",!0),[s,u]=x.useState(!1);return x.useEffect(()=>{if(s){const c=()=>{u(!1)};return document.addEventListener("drop",c),document.addEventListener("dragend",c),()=>{document.removeEventListener("drop",c),document.removeEventListener("dragend",c)}}},[s]),x.useEffect(()=>{u(!1)},[e]),k("div",{style:{display:"flex",flexDirection:a?"column":"row"},children:[(s||i)&&f("div",{style:{fontSize:"25px",fontWeight:"bold",textAlign:"center",border:"1px dashed grey",minWidth:"42px"},onClick:()=>t(e.filter(({value:c})=>c!==r)),onDrop:c=>{const d=c.dataTransfer.getData("value");d!==void 0&&t(e.filter(({value:p})=>p!==d))},children:"🗑"}),f(ZH,{}),!s&&!i&&f(Ot,{style:{maxWidth:"28px"},controls:[a,l],children:a?"⇓":"⇒"}),e.map(({value:c,isHtml:d},p)=>d?f("div",{style:{width:n,height:n,overflow:"hidden",background:"white"},draggable:!0,onDragStart:Mt(c,()=>u(!0)),children:f("div",{style:{width:"320px",transform:"scale(.3)",transformOrigin:"left top"},dangerouslySetInnerHTML:{__html:c}})}):f("span",{style:{display:"inline-block"},children:f("span",{draggable:!0,onClick:()=>{o(r===c?"":c)},onDragStart:Mt(c,()=>u(!0)),title:c,onDrop:h=>{let m=!1,y=h.dataTransfer.getData("value");if(y===""&&(y=h.dataTransfer.getData("text/html").trim(),m=!0),y===""&&(y=h.dataTransfer.getData("text/plain").trim()),e.some(({value:E})=>E===h.dataTransfer.getData("value"))){const E=e.filter(({value:v})=>y!==v),g=[...E.slice(0,p),{value:y,isHtml:m},...E.slice(p)];t(g),h.stopPropagation()}else t([...e,{value:y,isHtml:m}]),h.stopPropagation()},style:{display:"inline-block",overflow:"hidden",margin:"2px",backgroundImage:`${c}`,backgroundColor:c,backgroundRepeat:"no-repeat",backgroundSize:"cover",fontSize:"14px",textShadow:"white 0px 10px",width:n,height:n,outline:c===r?"4px solid yellow":"none"},children:c},c)}))]})}function QH({values:e,setValues:t}){return f("ul",{style:{display:"flex",flexDirection:"column",maxWidth:"320px"},children:e.map(n=>{const{value:r}=n;return k("li",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:[f(XH,z({values:e,setValues:t},n)),f("button",{style:{alignSelf:"flex-end"},onClick:()=>{t(e.filter(o=>o!==n))},children:"X"})]},r)})})}function ZH(){const[e,t]=J.palette(),[n,r]=x.useState(!1),[o,i]=se("manage palettes open",!1),[a,l]=x.useState(""),s=a.trim(),[u,c]=se("palettes",[]),d=e.length===0;return k("div",{children:[f(Ot,{controls:[n,r],children:"..."}),n&&k(x.Fragment,{children:[f(Re,{value:a,onChange:l}),f("button",{disabled:s==="",onClick:()=>{c([...u,{name:a,contents:e}])},children:"save"}),f("button",{disabled:d,onClick:()=>{d||c([...u,{name:"tmp",contents:e}]),t([])},children:"clear"}),f(Ot,{controls:[o,i],children:"Stored palettes"}),o&&f("ul",{children:u.map(({name:p,contents:h=[],palette:m})=>k("li",{style:{display:"flex",justifyContent:"flex-end"},children:[p," (",h.length,")",f(dC,{values:h,setValues:()=>{},width:20}),f("button",{onClick:()=>{d||c([...u,{name:"tmp",contents:m}]),t(h)},children:"restore"}),f("button",{onClick:()=>{confirm(`Delete palette "${p}"?`)&&c(u.filter(({name:y})=>y!==p))},children:"X"})]},p))})]})]})}function uc(){const[e,t]=J.pickedValue(),[n,r]=J.palette(),[o]=Ju();return k("div",{onDragOver:i=>{n.some(({value:a})=>a===i.dataTransfer.getData("value"))||i.preventDefault()},onClick:()=>{e!==""&&!n.some(({value:i})=>i===e)&&(r([...n,{value:e,isHtml:!1}]),console.log("test"),t(""))},onDrop:i=>{let a=!1,l=i.dataTransfer.getData("value");l===""&&(l=i.dataTransfer.getData("text/html").trim(),a=!0),l===""&&(l=i.dataTransfer.getData("text/plain").trim()),n.some(({value:s})=>s===i.dataTransfer.getData("value"))||r([...n,{value:l,isHtml:a}]),i.stopPropagation()},children:[f(k0,{}),n.length===0&&k("span",{children:["Empty",f("br",{})]}),o?f(dC,{values:n,setValues:r}):f(QH,{values:n,setValues:r}),f(ft,{el:uc,tasks:[()=>[`Add 2 items to the palette (${Math.min(2,n.length)}/2)`,n.length>1]],children:"You can drop values here and drag them onto the page and UI elements."})]})}uc.fName="Palette";function eG(e){const l=e,{options:t,onChange:n,selected:r}=l,o=mn(l,["options","onChange","selected"]),i=x.useId(),a=x.useCallback(s=>n(s.target.value),[]);return f("div",{children:t.map((s,u)=>k("div",{children:[f("input",z({id:`${i}-${u}`,type:"radio",name:i,value:s.value,onChange:a,checked:s.value===r},o)),f("label",{htmlFor:`${i}-${u}`,children:s.label})]},s.value))})}function cc(){const[e,t]=J.width(),[n,r]=J.height(),[o,i]=J.isSimpleSizes(),{screenOptions:a}=ae,[l]=Ju(),s=l?f(mt,{style:{marginRight:"-9px"},options:a,value:`${e},${n}`,onChange:u=>{const[c,d]=u.split(",");t(parseInt(c)),r(parseInt(d))}}):k(x.Fragment,{children:[f("button",{onClick:()=>{i(!o)},children:o?"Show all sizes":"Show only simple sizes"}),f(eG,{options:a,selected:[e,n].join(),onChange:u=>{const[c,d]=u.split(",");t(parseInt(c)),r(parseInt(d))}})]});return k("div",{children:[f(k0,{}),s,f(ft,{el:cc,tasks:[u=>["Switch to a phone view",u.width<400]],children:"Use one of these preset screen dimensions. This can display as a dropdown or radio buttons. You can choose either a simple or a complete set of options."})]})}cc.fName="ScreenSwitcher";const tG=e=>{const{name:t,serverTheme:n,activeThemeRef:r,deleteTheme:o}=e,{modifiedServerVersion:i}=ae,[a,l]=J.fileName(),s=rn(),u=a===t;return k("li",{ref:u?r:null,className:"server-theme "+(u?"server-theme-current":""),children:[t," ",u&&i&&"(*)",t!=="default"&&f("button",{style:{float:"right"},onClick:()=>Ve(xe,null,function*(){confirm(`Remove theme "${t}" from server?`)&&o(t)}),children:"Delete"}),f("button",{style:{float:"right"},onClick:()=>{!u&&l(t),s({type:Ce.loadTheme,payload:{theme:n}})},children:u?"Reset":"Switch"}),Object.keys(n).length>0&&k("span",{style:{float:"right"},children:["(",Object.keys(n).length,")"]})]},t)},A0=()=>{const e=x.useRef(),[t,{serverThemesLoading:n,deleteTheme:r}]=J.serverThemes(),[o,i]=se("theme-server-theme-height-list","140px");return n?f("div",{style:{height:o},children:"Loading server themes..."}):k(x.Fragment,{children:[f("ul",{className:"server-theme-list",onMouseUp:a=>{i(a.target.closest("ul").style.height)},style:{resize:"vertical",height:o},children:Object.entries(t).map(([a,l])=>f(tG,{name:a,serverTheme:l,activeThemeRef:e,deleteTheme:r},a))}),f(ft,{el:A0,children:"Here are all your saved themes."})]})};let qr;function nG(){qr={basics:{name:"basics",steps:[fc,D0,sc,cc,tc,Qu,ec]},history:{name:"history",steps:[ac,E0,cl,F0,lc]},movable:{name:"movable",steps:[Zu]},changes:{name:"changes",steps:[uc]},themes:{name:"themes",steps:[A0]}}}let Dt;function rG(){Dt="basics",$0()}const oG=k(ft,{el:fc,children:[f("h1",{children:"Preparation"}),f("h2",{children:"Checklist"}),k("ul",{children:[k("li",{children:[f("b",{children:"Use a large screen"}),". Small screens can be made to work, but require more effort."]}),f("li",{children:f("b",{children:"Switch to one of the preset layouts (TODO)"})}),k("li",{children:[f("b",{children:"Mouse is required for some interactions"}),"Other types of input will be added at a later point to simplify development."]})]}),f("h2",{children:"Things to be aware of / watch out for"}),k("ul",{children:[f("li",{children:"While the shown data should be accurate, sometimes more specific rules are missed, causing it to not show the most specific value."}),f("li",{children:"The quality and mostly the quantity of CSS on a page has a big impact on the quality of the experience."}),f("li",{children:"You can display data that does not use CSS variables,"}),f("li",{children:"There are some bugs and possible crashes when using pin together with lock system."})]})]});function fc(){return hC()?oG:f("button",{onClick:rG,children:"Start tutorial"})}let Mn=0;function pC(){os=null,setTimeout(()=>{console.log(os),os===null&&gC(!0)},100)}function iG(e){if(Mn>=qr[Dt].steps.length-1){const t=[...Object.keys(qr)],n=t.indexOf(Dt);Dt=t[n+1],Mn=0}else Mn++;Dt||alert("Congratulations, you finished the tutorial!"),$0(),e.stopPropagation(),e.preventDefault(),Dt&&pC()}function aG(e){if(Mn===0){const t=[...Object.keys(qr)],n=t.indexOf(Dt);Dt=t[n-1],Mn=qr[Dt].steps.length-1}else Mn--;$0(),e.stopPropagation(),e.preventDefault(),pC()}function lG(){return Dt==="basics"&&Mn===0?null:f("button",{onClick:aG,children:"Previous"})}const sp=new Set;function $0(){for(const e of sp)e()}function sG(e){return sp.add(e),()=>{sp.delete(e)}}function uG(){return Dt?qr[Dt].steps[Mn]:null}function hC(){return x.useSyncExternalStore(sG,uG)}let os=null,gC;function cG({label:e,done:t}){return f("li",{"data-done":t,children:e})}function fG(e){const t=[];let n=!0;for(const r of e){const[o,i]=r(ae);t.push([o,i]),n&&(n=i)}return[n,t]}function ft({el:e,children:t,tasks:n=[]}){const[r,o]=fG(n),{setDrawerOpen:i}=x.useContext(uo);gC=i;const a=x.useRef(),l=e===hC();return x.useEffect(()=>{var s;l&&(os=e),(s=a.current)==null||s.scrollIntoView({behavior:"smooth"})},[l]),l?k("div",{ref:a,className:"tutorial-content",style:{border:"4px solid purple",background:"white",borderRadius:"7px",position:"absolute",zIndex:10},children:[k("span",{style:{float:"right",fontStyle:"italic",border:"1px solid gray"},children:[Dt," ",Mn+1,"/",qr[Dt].steps.length]}),t,f("ul",{children:o.map(([s,u])=>f(cG,{label:s,done:u}))}),f(lG,{}),f("button",{disabled:!r,onClick:iG,children:"Next"})]}):null}fc.fName="StartTutorial";const Gi=16;let Dv=-1/0,_v;function dG({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r}=ae,[o,i]=J.inspectedPath(),[,a]=J.openGroups();x.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.contentWindow.document;if(!l)return;function s(c){var m;if(n==="alt"&&!c.altKey)return;const d=c.target;if(d===_v)return;const p=b0(d);if(p===o)return;i(p);const h=dc(d);r&&a({[h[0].label]:!0},{skipHistory:!0,appendOnly:!0}),c.preventDefault(),c.stopPropagation(),Dv=performance.now(),Ra(d),setTimeout(()=>{Xo(d)},700),eW(d),d.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}),(m=document.querySelector(".area:has(.group-list)"))==null||m.scrollTo(0,0),_v=d}return l.addEventListener("click",s),()=>{l.removeEventListener("click",s)}},[n,t,r]),x.useEffect(()=>{var l;if(!(performance.now()-Dv<400))try{const s=al(o,(l=e.current)==null?void 0:l.contentWindow.document);if(!s||s.nodeName==="BODY"||s.nodeName==="HTML")return;s.scrollIntoView({block:"center",inline:"nearest"}),Ra(s);const u=setTimeout(()=>{Xo(s)},700);return()=>{clearTimeout(u),Xo(s)}}catch(s){}},[o,t])}function pG({frameRef:e,loaded:t}){const n=rn();x.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.contentWindow.document;if(!r)return;function o(a){var m,y,E;const l=a.dataTransfer.getData("value")||a.dataTransfer.getData("text/plain");if(!l||l.startsWith("http"))return;const s=a.target,u=dc(s),c=[];let d=0;for(const g of u){d++;const v=["background-color","background","background-image","color","border-color","outline-color"];for(const b of v)for(const F of g.vars)((m=F.maxSpecific)==null?void 0:m.property)===b&&!F.isRawValue&&((y=F.usages[0])!=null&&y.isFullProperty)&&c.push({element:d,property:b,varName:F.name,scope:(E=g.scopes.find(D=>D.scopeVars.some($=>$.name===F.name)))==null?void 0:E.selector})}if(c.length===0)return;const[p,...h]=c;n({type:Ce.set,payload:{name:p.varName,scope:p.scope,value:l,alternatives:h}}),a.stopPropagation()}return r.addEventListener("drop",o),r.addEventListener("dragenter",Hl),r.addEventListener("dragover",Hl),()=>{r.removeEventListener("drop",o),r.removeEventListener("dragenter",Hl),r.removeEventListener("dragover",Hl)}},[t])}function Hl(e){e.preventDefault()}const D0=e=>{const{src:t}=e,{frameRef:n}=x.useContext(it),[r,o]=J.frameLoaded(),[i,a]=J.width(),[l,s]=J.height(),u=ae.scales[`${i}x${l}`]||1;return f("div",{style:{overflow:"hidden"},className:"responsive-frame-outer-container",children:k("div",{className:"responsive-frame-container",onMouseMove:c=>{if(c.buttons!==1||c.currentTarget.className!=="responsive-frame-container")return;const d=parseInt(c.currentTarget.style.height.replace("px",""))-Gi,p=parseInt(c.currentTarget.style.width.replace("px",""))-Gi;isNaN(d)||isNaN(p)||(s(d),a(p))},style:{transform:`scale(${u})`,resize:"both",minWidth:"200px",width:`max(calc(${Gi+parseInt(i)}px * ${u}), ${Gi+parseInt(i)}px)`,minHeight:"200px",height:`${Gi+parseInt(l)}px`,overflow:"hidden",padding:"0",boxSizing:"border-box"},children:[hG,f("iframe",{onLoad:()=>o(!0),className:"responsive-frame",ref:n,src:t,width:parseInt(i),height:parseInt(l)}),f(dG,{frameRef:n,loaded:r}),f(pG,{frameRef:n,loaded:r})]})})},hG=f(ft,{el:D0,tasks:[e=>["Click any element on the page",e.inspectedPath!==""]],children:"Select an element here to see all its styles."}),mC=()=>{const{themeEditor:{scopes:e}}=ae,t=rn(),[n,r]=x.useState(!1),o=e[At]||{},[i,a]=x.useState(!1),[l,s]=x.useState(""),[u,c]=x.useState(""),d=l in o,p=/^--[a-zA-Z0-9][a-zA-Z0-9_-]+/.test(l);return k("div",{style:{marginBottom:"8px"},children:[f(Ot,{controls:[n,r],children:"Custom variable"}),n&&k("div",{children:[k("form",{onSubmit:h=>(t({type:Ce.set,payload:{name:l,value:u}}),h.preventDefault(),!1),children:[f(Re,{value:l||"--",onChange:h=>{s(h.replace(" ","-").replace(/^-*/,"--"))}}),f("br",{}),f(Re,{required:!0,value:u,onChange:c}),f("button",{disabled:!p||u===o[l]||!i&&d,title:d?o[l]===u?"Variable already has this value":`Overwrite existing value of ${o[l]}`:"Add new variable",children:"Add"})]}),d&&k("div",{children:[f("button",{onClick:()=>{t({type:Ce.unset,payload:{name:l}})},children:"Unset"}),f(ce,{controls:[i,a],children:"Confirm overwrite existing"}),k("div",{children:["Current value: ",o[l]]})]})]})]})};mC.fName="CustomVariableInput";const gG=(e,t)=>{x.useEffect(()=>{var n;[...document.styleSheets].forEach(r=>{r.disabled=!!e[r.href]}),(n=t.current)==null||n.contentWindow.postMessage({type:"set-sheet-config",payload:JSON.stringify(e)})},[e])},mG=()=>{const{frameRef:e,setSheetDisablerDisplayed:t}=x.useContext(it),[n,r]=se("set-disabled-sheets",{}),o=[...document.styleSheets].filter(({href:i})=>!!i);return gG(n,e),o===null?f("div",{children:"Loading..."}):k("div",{style:{background:"white",color:"black",border:"1px solid black",borderRadius:"6px",padding:"5px"},children:[f("button",{style:{float:"right"},onClick:()=>t(!1),children:"Close"}),f("p",{children:"The following stylesheets are loaded on the page in the same order as they are shown."}),k("p",{children:["If you uncheck one it is disabled ",f("b",{children:"while in the editor"}),"."]}),f("ul",{style:{paddingLeft:"3px",listStyleType:"none"},children:o.map(({href:i})=>{const a=i.replace(/\?.*/,""),s=a.replace(window.location.origin,"").split("/"),u=s.slice(0,-1)||[];return k("li",{style:{fontSize:"14px",marginBottom:"8px",wordBreak:"break-all"},onClick:()=>{r(q(z({},n),{[a]:!n[a]||null}))},children:[f("input",{readOnly:!0,type:"checkbox",checked:!n[a]}),u.join("/"),"/",f("b",{children:s.at(-1)})]},i)})})]})},vG={all:{label:"All"},colors:{label:"Colors"}},yG=Object.entries(vG).map(([e,{label:t}])=>({value:e,label:t}));function bG(){const[e,t]=J.propertyFilter();return f(mt,{className:"property-category-filter",title:"Filter by category",value:e||"all",onChange:t,options:yG})}function wG(){const[e,t]=J.search();return k(x.Fragment,{children:[f(Re,{value:e,onChange:t,placeholder:"search (cmd+/ or ctrl+/)",style:{marginRight:e?"24px":"4px",flexShrink:1,maxWidth:"52%"},autoComplete:"on"}),!!e&&f("button",{style:{position:"relative",right:"48px",width:"30px"},title:"clear",onClick:()=>t(""),children:"x"}),f(ce,{id:"show-raw-values",controls:J.showRawValues(),title:"View only",children:"Raw values"})]})}const xG=(e,t,n,r,o)=>{var l;const i=new FileReader,a=(l=t.target.files[0])==null?void 0:l.name;i.onload=s=>{try{const u=JSON.parse(s.target.result),c=n?z(z({},r),ensured):u;e({type:Ce.loadTheme,payload:{theme:{scopes:c}}}),a&&o(a.replace(".json",""))}catch(u){console.log("File contents is not valid JSON.",s.target.result,s)}},i.readAsText(t.target.files[0])},CG={":root":{"--heading-font-text-transform":"none","--siteBackgroundColor":"oklch(18.50% 0.000 0.00)","--paragraphMediumColor":"hsla(0,0%,100%,1)","--siteTitleColor":"oklch(67.60% 0.187 56.71)","--navigationLinkColor":"oklch(92.90% 0.069 72.20)","--headingExtraLargeColor":"oklch(51.80% 0.288 264.05)","--headingSmallColor":"oklch(78.60% 0.091 72.20)","--paragraphSmallColor":"oklch(78.60% 0.091 72.20)","--paragraphLinkColor":"oklch(70.90% 0.196 56.71)","--primaryButtonBackgroundColor":"oklch(38.84% 0.269 264.05)","--primary-button-font-text-transform":"none"}},SG={scopes:CG},EG={":root":{"--heading-font-text-transform":"none","--siteBackgroundColor":"oklch(18.50% 0.000 0.00)","--paragraphMediumColor":"hsla(0,0%,100%,1)","--siteTitleColor":"oklch(67.60% 0.000 0.00)","--navigationLinkColor":"oklch(92.90% 0.000 0.00)","--headingExtraLargeColor":"oklch(92.90% 0.000 0.00)","--headingSmallColor":"oklch(52.30% 0.000 0.00)","--paragraphSmallColor":"oklch(78.60% 0.000 0.00)","--paragraphLinkColor":"oklch(70.90% 0.000 280.96)","--primaryButtonBackgroundColor":"oklch(38.84% 0.000 264.05)"}},FG={scopes:EG};function Tv(e,t){const n=rn(),r=v0("fileName");return()=>{n({type:Ce.loadTheme,payload:{theme:e}}),r(t)}}function kG(){const[e,t]=x.useState(!1);return k(x.Fragment,{children:[f(Ot,{controls:[e,t],children:"Presets"}),e&&k(x.Fragment,{children:[f("button",{onClick:Tv(FG,"kapow-gray"),children:"Kapow gray"}),f("button",{onClick:Tv(SG,"kapow-colorful"),children:"Kapow colors"})]})]})}function AG(){const[{scopes:e},t]=J.themeEditor();x.useContext(it);const n=e[At]||{},[r,o]=J.fileName(),[i,a]=x.useState(!1);return x.useState(!1),k("div",{style:{background:"white",padding:"16px"},children:[f(kG,{}),f("div",{children:f(ce,{controls:[i,a],children:"Merge into current theme"})}),k("div",{children:[f("button",{onClick:()=>iz(r,e),children:"Export JSON"}),f("button",{onClick:()=>sz(r,e),children:"Export CSS"})]}),f("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Upload JSON:",f("input",{type:"file",accept:".json",onChange:l=>{xG(t,l,i,n,o)},style:{cursor:"copy"}})]})}),f("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Import history JSON",f("input",{type:"file",accept:".json",onChange:l=>{const s=new FileReader;s.onload=u=>{try{const c=JSON.parse(u.target.result);yz(c)}catch(c){console.log("failed uploading",c)}},s.readAsText(l.target.files[0])},style:{cursor:"copy"}})]})}),f(Re,{value:"",placeholder:"Drop/paste JSON here to import as a new theme",style:{border:"1px dashed black",width:"100%"},onChange:l=>{try{const s=JSON.parse(l),u=i?z(z({},n),s):s;t({type:Ce.loadTheme,payload:{theme:u}})}catch(s){console.log(s)}}})]})}function vC(){const{existsOnServer:e,modifiedServerVersion:t,themeEditor:{scopes:n}}=ae,[r,o]=J.fileName(),[,{uploadTheme:i}]=J.serverThemes();return k("div",{children:[f(Re,{value:r,onChange:o,style:{width:"130px",clear:"both"},placeholder:"theme"}),f("button",{style:{clear:"both"},disabled:!r||r==="default",onClick:()=>Ve(this,null,function*(){e&&!confirm("Overwrite theme on server?")||i(r,n)}),children:e?`Save${t?" (*)":""}`:"Upload"})]})}vC.fName="ThemeUploadPanel";function _0(){const[e,t]=J.frameClickBehavior(),n=e==="alt";return k("div",{children:[f(ft,{el:_0,children:"Toggle whether a normal click performs an inspection and blocks default click behavior."}),f("button",{title:n?`Clicks are processed by the page and should result in normal responses. You can still inspect by holding the ALT key while clicking.`:`Clicking on an element will inspect it. - Most normal behavior is prevented (e.g. links), but some may still get triggered (e.g. accordion state).`,onClick:()=>{t(e==="alt"?"any":"alt")},children:n?"Cursor: interact":"Cursor: inspect 🔍"})]})}_0.fName="ThemeEditorExtraOptions";function $G({children:e}){const{drawerOpen:t,setDrawerOpen:n}=x.useContext(so);return k("div",{id:"drawer-wrapper",children:[f(Yn,{id:"drawer","data-open":t,children:e}),f(Ot,{id:"drawer-opener",controls:[t,n],children:"Drawer"})]})}function yC(){const{propertyFilter:e,search:t}=ae,n=rn(),{allVars:r,defaultValues:o}=x.useContext(it),[i,a]=x.useState(!1),[l,s]=x.useState(!1),[u,c]=x.useState(!0),[d,p]=x.useState(!0),[h,m]=se("current-theme-open",!1),y="UNFOUND",E=x.useMemo(()=>h?Object.keys(o).reduce((g,v)=>{const b=r.find(_=>_.name===v),F=t.replace(/^\!/,""),D=F.length!==t.length;if(!b)return F&&v.replace(/-+/g," ").match(F)||D||(g[y]||(g[y]=[]),g[y].push({name:v})),g;if(!cC(b,F)||D||e!=="all"&&!cl(b))return g;const $=b.statelessSelector.replace(/,\s\:where.*\*$/,"");return g[$]||(g[$]=[]),g[$].push(b),g},{}):{},[h,e,t]);return k("div",{children:[k("h4",{children:[Object.keys(o).length,")",f(Ot,{style:{float:"right"},controls:[h,m],children:h?"Close":"Open"})]}),h&&k("div",{children:[f(ce,{controls:[u,c],children:"Show active"}),f(ce,{controls:[l,s],children:"Show unknown"}),f(ce,{controls:[d,p],children:"Hide not found"}),k(Ot,{controls:[i,a],children:["INIT ",i?"":"*"]})]}),h&&f("ul",{style:{background:"white",listStyleType:"none",paddingLeft:0},children:Object.entries(E).map(([g,v])=>f("li",{style:{marginTop:"12px"},children:f(ui,{hideIfNotFound:d,initialized:i,selector:g,children:f("ul",{children:v.map(b=>{const F=b.name;return g===y&&l?f("li",{children:k("p",{children:[f("em",{children:F})," was not found.",f("button",{onClick:()=>{n({type:Ce.unset,payload:{name:F}})},children:"unset"})]})},F):!u||g===y?null:f($i,{onChange:D=>{n({type:Ce.set,payload:{name:b.name,value:D}})},onUnset:()=>{n({type:Ce.unset,payload:{name:b.name}})},cssVar:b},F)})})})},g))})]})}yC.fName="CurrentTheme";function DG(){return"_"+Math.random().toString(36).substr(2,9)}function _G(e,t){return[...e,q(z({},t),{order:e.reduce((n,r)=>Math.max(n,r),-1)+1})].sort(bC)}function bC({order:e},{order:t}){return e-t}function Wi(e,t){return e.map(n=>n.id!==t.id?n:t).sort(bC)}function wC(){const[e,t]=J.nameReplacements(),[n,r]=x.useState(""),[o,i]=x.useState(""),[a]=Ju();return k("div",{children:[f(y0,{}),f(k0,{}),f("h4",{children:"Replace strings in names"}),!a&&f("ul",{style:{maxHeight:"30vh",overflowY:"auto"},children:e.map(l=>{const{id:s,from:u,to:c,order:d,active:p}=l;return k("li",{style:{display:"flex"},children:[k("div",{children:[f(Re,{value:u,onChange:h=>{t(m=>Wi(m,q(z({},l),{from:h})))},placeholder:"From"}),f(Re,{value:c,onChange:h=>{t(m=>Wi(m,q(z({},l),{to:h})))},placeholder:"From"})]}),f("button",{onClick:()=>{t(h=>Wi(h,q(z({},l),{order:d-1})))},children:"down"}),f("button",{onClick:()=>{t(h=>Wi(h,q(z({},l),{order:d+1})))},children:"up"}),f(ce,{controls:[p,()=>t(h=>Wi(h,q(z({},l),{active:!p})))]}),f("button",{onClick:()=>{t(h=>h.filter(m=>m.id!==s))},children:"X"})]},s)})}),!a&&k("div",{style:{display:"flex"},children:[k("div",{children:[f(Re,{value:n,onChange:r,placeholder:"From"}),f(Re,{value:o,onChange:i,placeholder:"To"})]}),f("button",{disabled:n.length<2||o.length<1,onClick:()=>{t(l=>_G(l,{id:DG(),to:o,from:n,active:!0})),i(""),r("")},children:"Add"})]})]})}wC.fName="NameReplacements";const xC=20;let Bv=0,Pv=0,Kn;function Mv(e){if((Kn==null?void 0:Kn.length)===0&&(Bv++,Bv===xC))return[];if(Kn&&Kn.length>0)return Kn;const t=[...e.querySelectorAll("*")].filter(n=>getComputedStyle(n).position==="fixed");return Kn=t.filter(n=>!t.some(r=>r!==n&&r.contains(n))),Kn}let Ar;function TG(e,t){let n=e.parentNode;for(;n;){if(t.includes(n))return!0;n=n.parentNode}return!1}function Ov(e,t){if((Ar==null?void 0:Ar.length)===0&&(Pv++,Pv===xC))return[];if(Ar&&Ar.length>0)return Ar;const n=[...e.querySelectorAll("*")].filter(r=>getComputedStyle(r).position==="sticky"&&!TG(r,t));return Ar=n,n}const CC="transform .07s ease-out";function BG(e,t,n,r){for(const o of e){let i=0;const{bottom:a,top:l,height:s}=getComputedStyle(o);if(s==="0px")continue;parseInt(l.replace("px",""))>n&&parseInt(a.replace("px",""))p){Rv(i);continue}const y=Math.min(m,t-d+c);y>0&&o.add(i),i.style.transform=`translateY(${y}px)`,i.style.transition=CC}}const OG=28;function RG(e){const{src:t}=e,{width:n,height:r,fullHeightFrameScale:o,fullHeightFrameShowFixed:i}=ae,a=1/o,[l,s]=x.useState(0),[u,c]=x.useState(!1),[d,p]=x.useState(0),[h,m]=x.useState(0),[y,E]=x.useState(null),[g,v]=x.useState(!1),[b,F]=x.useState(null),D=x.useRef();x.useEffect(()=>{var K;y!==null&&((K=$.current)==null||K.contentWindow.postMessage({type:"force-scroll",payload:{position:y,shouldSmoothScroll:g}},window.location.origin))},[y]);const{frameRef:$,scrollFrameRef:_}=x.useContext(it);x.useEffect(()=>{_.current.contentDocument.documentElement.classList.add("hide-scrollbars"),setTimeout(()=>{var X;_.current.contentDocument.documentElement.classList.add("hide-scrollbars");const K=({data:{type:pe,payload:oe}})=>{pe==="frame-scrolled"&&(s(oe.scrollPosition),E(null))};return window.addEventListener("message",K),(X=$.current)==null||X.contentWindow.postMessage({type:"emit-scroll"},window.location.origin),()=>{window.removeEventListener("message",K)}},2e3)},[]),x.useEffect(()=>{const K=_.current.contentWindow.document,X=Mv(K),pe=Ov(K,X);if(i)for(const oe of[...X,...pe])oe.classList.remove("hide-important");else{for(const oe of[...X,...pe])oe.classList.add("hide-important");return}},[i]),x.useEffect(()=>{F($.current.contentWindow.document.body.parentNode.scrollHeight);const K=setTimeout(()=>{F($.current.contentWindow.document.body.parentNode.scrollHeight)},800);return()=>{clearTimeout(K)}},[n,r]);let T=0;x.useLayoutEffect(()=>{if(!i)return;const K=performance.now();if(K-T>50){const X=_.current.contentWindow.document,pe=Mv(X),oe=Ov(X,pe);T=K,MG(oe,l,r,_.current),BG(pe,l,r,_.current)}return()=>{}},[l,r,i]);const B=Math.max(0,(u&&y||l)*o),P=K=>{u&&(E(h-(d-K.clientY)*a),v(!1))},L=K=>{const X=K.clientY-B-_.current.parentNode.getBoundingClientRect().top;E(Math.max(0,l+X*a-r/2)),v(!1)};return k("div",{onWheel:K=>{E(Math.max(0,l+K.deltaY)),v(!0)},style:{display:b===null?"none":"block",position:"relative",width:n*o},children:[k("div",{className:"responsive-frame-container",style:{transform:`scale(${o})`,width:`${OG+n}px`,overflow:"visible"},children:[f("div",{onMouseDown:L,onMouseUp:()=>c(!1),onMouseMove:P,style:{zIndex:1,position:"absolute",top:0,right:0,bottom:0,left:0}}),f("iframe",{className:"responsive-frame",ref:_,src:t,width:n,height:Math.max(r,b),style:{width:n}})]}),f("span",{ref:D,onClick:L,onMouseDown:K=>{c(!0),p(K.clientY),m(l)},onMouseMove:P,onMouseUp:()=>c(!1),style:{userSelect:"none",zIndex:2,top:B,position:"absolute",display:"inline-block",outline:"3px solid indigo",width:n*o,height:(r-8)*o,transition:"top .05s ease-out",boxSizing:"content-box",visibility:u?"hidden":""}})]})}function SC(){const[e,t]=J.fullHeightFrameShowFixed(),[n,r]=J.fullHeightFrameScale(),[o,i]=Ge("fullheightframescalestep","0.01");return k("div",{style:{display:"flex"},children:[f("input",{type:"number",style:{maxWidth:"72px"},value:n,step:o,onChange:a=>{r(a.target.value)}}),k("label",{children:["step",f("input",{type:"number",style:{maxWidth:"72px"},value:o,onChange:a=>{i(a.target.value)}})]}),f(ce,{controls:[e,t],children:"Show fixed and sticky"})]})}SC.fName="FullHeightFrameScale";function EC(){return k("div",{style:{display:"flex",gap:"4px"},children:[f(ce,{controls:J.includeDefaultPalette(),children:"Include default palette"}),f(ce,{controls:J.nativeColorPicker(),children:"Native color picker"}),f(ce,{controls:J.maximizeChroma(),children:"Maximize chroma when dropping"})]})}EC.fName="ColorSettings";function FC(){const[e,t]=J.showCssProperties();return k("div",{style:{display:"flex",gap:"4px"},children:[f(ce,{id:"show-css-properties",controls:[e,t],children:"Show CSS properties"}),f(ce,{id:"link-css-properties",controls:J.linkCssProperties(),children:"Link CSS properties"}),f(ce,{id:"show-source-links",controls:J.showSourceLinks(),children:"Show source links"})]})}FC.fName="InformationVisibilitySettings";function NG(){const[e,t]=J.webpackHome();return f(Re,{style:{width:"100%"},value:e,onChange:n=>t(n),label:"Webpack home",placeholder:"webpack home path",title:"Enter the root folder on your system for this page to open source links in VSCode"})}function IG(){const{themeEditor:{scopes:e},frameLoaded:t}=ae,{frameRef:n,scrollFrameRef:r}=x.useContext(it);return x.useInsertionEffect(()=>{AC(e,!0)},[e]),x.useEffect(()=>{var o;n.current.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(o=r.current)==null||o.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin)},[e,t]),null}function LG(){const e=rn();return x.useEffect(()=>{const t=n=>{if(n.data.type==="dropped-options"){const{options:r,value:o}=n.data.payload,[i,...a]=r;e({type:Ce.set,payload:{name:i.varName,scope:i.scope,value:o,alternatives:a}})}};return window.addEventListener("message",t,!1),()=>{window.removeEventListener("message",t)}},[]),null}function Lv(){document.fullscreenElement!==this?this.requestFullscreen():document.exitFullscreen()}function zG(){var i;const{frameRef:e}=x.useContext(it),[t,n]=x.useState(!1),r=f("button",{onClick:()=>{var l;const a=(l=e.current)==null?void 0:l.parentNode;n(document.fullscreenElement!==a),Lv.bind(a)()},children:"fullscreen preview"}),o=k(x.Fragment,{children:[f("button",{onClick:Lv.bind(document.body),children:"fullscreen"}),r]});return k(x.Fragment,{children:[o,t&&oh.createPortal(f("div",{style:{position:"fixed",top:0,right:0},children:r}),(i=e.current)==null?void 0:i.parentNode)]})}function jG(){const[e,t]=J.pickedValue();return f("div",{children:!(e==="")&&f("span",{onClick:()=>{t("")},style:{background:e,width:"32px",height:"32px"},children:e})})}function HG(){const[e,t]=J.pickedValue(),n=x.useRef();if(x.useEffect(()=>{if(e==="")return;const r=i=>{if(!n.current)return;const a=i.clientY,l=i.clientX;n.current.style.transform=`translate3d(${l}px, ${a}px, 0)`},o=window.addEventListener("mousemove",r);return()=>{window.removeEventListener("mousemove",o)}},[e]),x.useEffect(()=>{if(!e)return;const r=document.addEventListener("click",o=>{(o.target.classList.contains("area")||!o.target.closest(".area"))&&t("")});return()=>{document.removeEventListener("click",r)}},[e]),e!=="")return f("div",{ref:n,style:{"--picked-value":e},className:"picked-cursor",children:e})}const it=x.createContext({}),GG=e=>{const{frameLoaded:t}=ae,{allVars:n,defaultValues:r}=e,o=x.useRef(null),i=x.useRef(null),[a,l]=x.useState(!1),[s,u]=se("server-themes-displayed",!0),[c,d]=x.useState(!1),[p,h]=se("full-page-preview",!1),[m,y]=J.openFirstOnInspect();return k(it.Provider,{value:{allVars:n,defaultValues:r,frameRef:o,scrollFrameRef:i,setSheetDisablerDisplayed:d},children:[f(IG,{}),f(LG,{}),f(HG,{}),f(nz,{frameRef:o}),f("div",{className:"theme-editor",children:k(Oz,{stateHook:J.uiLayout,children:[k("div",{style:{display:"flex",columns:2,justifyContent:"space-between"},children:[k(Yn,{id:"area-top",style:{justifyContent:"flex-start",flexGrow:1},children:[k("div",{id:"Filters",style:{display:"flex",alignItems:"flex-start"},children:[f(bG,{}),f(wG,{})]}),f(jG,{}),f(cc,{}),f(uc,{})]}),k(Yn,{id:"area-top-reverse",style:{flexDirection:"row-reverse",justifyContent:"flex-start",flexGrow:1},children:[f(ac,{}),f(lc,{}),f(ec,{})]})]}),k("div",{style:{display:"flex",justifyContent:"space-between",flexGrow:"1"},children:[k(Yn,{id:"area-left",children:[f(fc,{}),f("div",{id:"Inspector",children:t&&f(sc,{})})]}),f(Yn,{id:"area-left-inner"}),!!p&&f(RG,{src:window.location.href}),f(D0,{src:window.location.href}),k(Yn,{id:"area-right",children:[f(fl,{}),f(vC,{}),k("div",{id:"ExtraPanelsMenu",className:"theme-editor-menu",children:[f(Ot,{controls:[a,l],children:"Import/export"}),f(Ot,{controls:[c,d],children:"Stylesheets"}),f(Ot,{controls:[s,u],children:"Server"})]}),f(x.Fragment,{id:"ThemesList",children:s&&f(A0,{})}),f(x.Fragment,{id:"StylesheetDisabler",children:c&&f(mG,{})}),f(x.Fragment,{id:"ImportExportTools",children:a&&f(AG,{})}),f(FC,{}),f(EC,{}),k("div",{id:"InspectionSettings",children:[f(ce,{controls:[p,h],title:"WARNING!!! 1) Affects performance on large pages 2) If scrollable section is below body, it cannot be fully shown (e.g. Halfmoon) 3) Does not work properly for pages that have different styles based on screen height.",children:"Full height preview"}),f(ce,{controls:[m,y],children:"Auto open first group on inspect"}),f(NG,{})]})]})]}),k("div",{style:{display:"flex",columns:2,justifyContent:"space-between",flexGrow:0,alignItems:"flex-end"},children:[f(Yn,{id:"area-bottom"}),f(Yn,{id:"area-bottom-reverse",style:{flexDirection:"row-reverse"}}),k($G,{children:[f(Zu,{}),f(mC,{}),f(tc,{}),f(_0,{}),f(Qu,{}),f(wC,{}),f(yC,{}),f(SC,{}),f(zG,{})]})]})]})})]})};let Lf;const WG=(e,t,n)=>{const r=f(Dz,{previewComponents:dH,children:f(GG,{allVars:t,defaultValues:n})});Lf||(Lf=rw(e)),Lf.render(r)},UG="https://unpkg.com/source-map@0.7.3/dist/source-map.js",VG=()=>new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",UG),n.addEventListener("load",e),n.addEventListener("error",t),document.head.appendChild(n)}),KG=()=>Ve(xe,null,function*(){var e;return(yield VG())&&((e=window.sourceMap)==null?void 0:e.SourceMapConsumer.initialize({"lib/mappings.wasm":"https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"}))}),YG=e=>e.reduce((n,{name:r,usages:o})=>{var a;if(!r.startsWith("--"))return n;const i=(a=o[0])==null?void 0:a.defaultValue;return i===null||(n[r]=i),n},{});function XG(e,{comments:t,rulesWithMap:n,rogueAtRules:r,sheet:o}){let i=[];const a=[];let l=0,s=0,u=0,c="",d,p,h=!1,m="",y=0,E=0,g=!1,v=!1,b=!1,F=!1,D=0,$,_="",T,B;const P={"{"(){if(g)return;B=!1;const L=c.trim();if(F){F=!1,a.push(L),c="";return}i.push([[d,p],L]),$={selectors:i,start:{line:l,col:s-u-c.length-1},end:null,stylemap:new Map,atRules:[...a],sheet:o},i=[],c="",h=!0},"}"(){if(!g){if(B=!1,h)h=!1,_&&($.stylemap.set(_,c.trim()),_=""),$.end={line:l,col:s-u-1},n.push($),$=null;else{const L=a.pop();let K=c.trim();K!==""&&(i.length>0&&(K=i.map(([,X])=>X).join()+", "+K),r.push({text:L,body:K})),i=[]}c=""}},"\n"(){B=g&&!v,v&&(t.push({line:y,col:E,text:m,inline:!0}),m="",g=!1,v=!1),D=0,l++,u=s},"/"(){g&&!v&&T==="*"?(B=!1,g=!1,t.push({line:y,col:E,text:m.slice(0,-1),inline:!1}),m=""):!g&&D===0&&T==="/"&&(B=!1,g=!0,v=!0,y=l,E=s-u-1,m="",c=c.slice(0,-1))},"*"(){!g&&T==="/"&&(B=!1,g=!0,y=l,E=s-u-1,c=c.slice(0,-1))},"@"(){!g&&!h&&(F=!0,c="")},":"(){h&&_===""&&(_=c.trim(),c="",B=!1)},";"(){h&&D===0?($.stylemap.set(_,c.trim()),c="",_="",B=!1):F&&(F=!1,c="",B=!1)},"("(){g||(D+=1)},")"(){g||(D-=1)},"\\"(){b=!0},","(){if(!g&&!h&&!F&&D===0){const L=c.trim();i.push([[d,p],L]),B=!1,c=""}}};for(const L of e){if(B=!0,b)b=!1;else{const K=P[L];K&&K()}if(B)if(g)m+=L;else{const K=L.trim()==="",X=c==="";(!K||!X)&&(c+=L),X&&!K&&(d=l,p=s-u-1)}s++,T=L}}const kC=/:(active|focus(-(visible|within))?|visited|hover)/g;function qG(e){return e.replaceAll(kC,":is(:$1, ._force-$1)")}const JG=/([\w\])-])(:(\-[\w-]+|:\-?[\w-]+|before|after|active|focus(-(visible|within))?|visited|hover))+/g;function QG(e){const t=e.replaceAll(JG,"$1").replaceAll(kC,"*").replaceAll(/\s+/g," ").replaceAll(/\s*,\s*/g,",").replaceAll(/:not\(\*\)/g,"").trim();return t===""||t.startsWith("::")?"*":t}function ZG({rulesWithMap:e=[],keyframesRules:t=[],selectorRules:n=[],testSelectors:r=new Map}){for(const o of e){const i=o.selectors.map(([,l])=>l).join(),a=o.atRules[0];if(a&&a.startsWith("@keyframes")){t.hasOwnProperty(a)||(t[a]={}),t[a][i]=o;continue}o.adaptedSelector=qG(i),o.testSelectors=new Set;for(const[,l]of o.selectors){const s=QG(l);if(r.has(s))o.testSelectors.add(r.get(s));else{const u={text:s,lastEl:null,origs:new Set};r.set(s,u),o.testSelectors.add(u)}r.get(s).origs.add(l)}n.push(o)}return{rulesWithMap:e,keyframesRules:t,selectorRules:n,testSelectors:r}}function eW(e){[...e.children].forEach(t=>{getComputedStyle(t).pointerEvents==="none"&&(t.style.pointerEvents="auto")})}const zv=window.self!==window.top,tW=KG(),jv=e=>{[...document.styleSheets].forEach(t=>{if(!t.href)return;const n=t.href.replace(/\?.*/,"");t.disabled=!!e[n]})};let nr=document.createElement("style");document.head.appendChild(nr);const T0="__forced-styles__";nr.id=T0;let na={};document.title=`🖌${document.title}`;function nW(e){let t="";for(const n in e)t+=` ${n}: ${e[n]} !important;`;return t}function rW(e,t){const n=`${e} {${nW(t)} }`;if(!(e in na)){na[e]=nr.sheet.insertRule(n,Object.keys(na).length);return}const r=na[e];nr.sheet.cssRules[r].cssText!==n&&(nr.sheet.insertRule(n,r),nr.sheet.deleteRule(r+1))}function AC(e,t=!1){t&&([...nr.sheet.cssRules].forEach(()=>nr.sheet.deleteRule(0)),na={}),Object.entries(e).forEach(([n,r])=>{rW(n,r)})}function oW(){[...document.body.childNodes].forEach(e=>{["STYLE","LINK","SCRIPT"].includes(e.nodeName)||document.body.removeChild(e)})}let Hv=[],iW=[],aW=[],lW=[],sW=[],uW=new Map,va;const zf=new WeakMap;function dc(e){if(zf.has(e))return zf.get(e);const t=vw({cssVars:va,target:e}),n=kj(t,e,va),r=_j(n);return zf.set(e,r),r}let $C;function cW(){return $C}const fW=e=>Ve(xe,null,function*(){var s;if(r5(e.localStorageNamespace||""),!zv){yield tW,S5(e.serverThemes),va=yield L5();const u=YG(va);$C=u;const c=[...document.styleSheets].filter(p=>{var h;return((h=p.ownerNode)==null?void 0:h.id)!==T0});for(const p of c){let h;if(p.href)try{h=yield(yield fetch(p.href)).text()}catch(m){continue}else if(h=(s=p.ownerNode)==null?void 0:s.innerHTML,!h)continue;XG(h,{comments:aW,rulesWithMap:Hv,rogueAtRules:iW,sheet:p})}ZG({rulesWithMap:Hv,keyframesRules:lW,selectorRules:sW,testSelectors:uW}),oW();const d=document.createElement("div");WG(d,va,u),oz(),d.id="theme-editor-root",document.body.appendChild(d)}const t={};let n=null,r=!1,o=null;if(!zv){nG();return}document.documentElement.classList.add("force-cursor");const i=localStorage.getItem(ih()+"set-disabled-sheets");if(i){const u=JSON.parse(i);jv(u)}let a;const l=u=>{const{type:c,payload:d}=u.data,{index:p,selector:h,scopes:m,resetAll:y,path:E}=d||{};switch(c){case"scroll-in-view":const g=h?t[h][p]:ll(d.path);if(g.scrollIntoView(d.options||{behavior:"smooth",block:"center",inline:"end"}),Ra(g),n){const[F,D,$]=n;window.clearTimeout(F),$!==g&&D()}const v=()=>{Yo(g),n=null};n=[setTimeout(v,1500),v,g];break;case"set-sheet-config":jv(JSON.parse(d));break;case"set-scopes-styles":AC(m,y);break;case"force-scroll":r=!0,window.scrollTo({top:d.position,behavior:d.shouldSmoothScroll?"smooth":"auto"}),r=!1;break;case"emit-scroll":const b=()=>{window.parent.postMessage({type:"frame-scrolled",payload:{scrollPosition:document.documentElement.scrollTop}},window.location.href),o=null};a=F=>{r||o||(o=setTimeout(b,20))},document.addEventListener("scroll",a,{passive:!0});break}};window.addEventListener("message",l,!1)}),Ui="all-the-themes";fW({serverThemes:{fetchThemes:()=>JSON.parse(localStorage.getItem(Ui)),uploadTheme:(e,t)=>{const n=JSON.parse(localStorage.getItem(Ui))||{};n[e]=t,localStorage.setItem(Ui,JSON.stringify(n,null,2))},deleteTheme:e=>{const t=JSON.parse(localStorage.getItem(Ui))||{};delete t[e],localStorage.setItem(Ui,JSON.stringify(t,null,2))}}})});export default dW(); + Most normal behavior is prevented (e.g. links), but some may still get triggered (e.g. accordion state).`,onClick:()=>{t(e==="alt"?"any":"alt")},children:n?"Cursor: interact":"Cursor: inspect 🔍"})]})}_0.fName="ThemeEditorExtraOptions";function $G({children:e}){const{drawerOpen:t,setDrawerOpen:n}=x.useContext(uo);return k("div",{id:"drawer-wrapper",children:[f(Yn,{id:"drawer","data-open":t,children:e}),f(Ot,{id:"drawer-opener",controls:[t,n],children:"Drawer"})]})}function yC(){const{propertyFilter:e,search:t}=ae,n=rn(),{allVars:r,defaultValues:o}=x.useContext(it),[i,a]=x.useState(!1),[l,s]=x.useState(!1),[u,c]=x.useState(!0),[d,p]=x.useState(!0),[h,m]=se("current-theme-open",!1),y="UNFOUND",E=x.useMemo(()=>h?Object.keys(o).reduce((g,v)=>{const b=r.find(_=>_.name===v),F=t.replace(/^\!/,""),D=F.length!==t.length;if(!b)return F&&v.replace(/-+/g," ").match(F)||D||(g[y]||(g[y]=[]),g[y].push({name:v})),g;if(!cC(b,F)||D||e!=="all"&&!ul(b))return g;const $=b.statelessSelector.replace(/,\s\:where.*\*$/,"");return g[$]||(g[$]=[]),g[$].push(b),g},{}):{},[h,e,t]);return k("div",{children:[k("h4",{children:[Object.keys(o).length,")",f(Ot,{style:{float:"right"},controls:[h,m],children:h?"Close":"Open"})]}),h&&k("div",{children:[f(ce,{controls:[u,c],children:"Show active"}),f(ce,{controls:[l,s],children:"Show unknown"}),f(ce,{controls:[d,p],children:"Hide not found"}),k(Ot,{controls:[i,a],children:["INIT ",i?"":"*"]})]}),h&&f("ul",{style:{background:"white",listStyleType:"none",paddingLeft:0},children:Object.entries(E).map(([g,v])=>f("li",{style:{marginTop:"12px"},children:f(ci,{hideIfNotFound:d,initialized:i,selector:g,children:f("ul",{children:v.map(b=>{const F=b.name;return g===y&&l?f("li",{children:k("p",{children:[f("em",{children:F})," was not found.",f("button",{onClick:()=>{n({type:Ce.unset,payload:{name:F}})},children:"unset"})]})},F):!u||g===y?null:f($i,{onChange:D=>{n({type:Ce.set,payload:{name:b.name,value:D}})},onUnset:()=>{n({type:Ce.unset,payload:{name:b.name}})},cssVar:b},F)})})})},g))})]})}yC.fName="CurrentTheme";function DG(){return"_"+Math.random().toString(36).substr(2,9)}function _G(e,t){return[...e,q(z({},t),{order:e.reduce((n,r)=>Math.max(n,r),-1)+1})].sort(bC)}function bC({order:e},{order:t}){return e-t}function Wi(e,t){return e.map(n=>n.id!==t.id?n:t).sort(bC)}function wC(){const[e,t]=J.nameReplacements(),[n,r]=x.useState(""),[o,i]=x.useState(""),[a]=Ju();return k("div",{children:[f(y0,{}),f(k0,{}),f("h4",{children:"Replace strings in names"}),!a&&f("ul",{style:{maxHeight:"30vh",overflowY:"auto"},children:e.map(l=>{const{id:s,from:u,to:c,order:d,active:p}=l;return k("li",{style:{display:"flex"},children:[k("div",{children:[f(Re,{value:u,onChange:h=>{t(m=>Wi(m,q(z({},l),{from:h})))},placeholder:"From"}),f(Re,{value:c,onChange:h=>{t(m=>Wi(m,q(z({},l),{to:h})))},placeholder:"From"})]}),f("button",{onClick:()=>{t(h=>Wi(h,q(z({},l),{order:d-1})))},children:"down"}),f("button",{onClick:()=>{t(h=>Wi(h,q(z({},l),{order:d+1})))},children:"up"}),f(ce,{controls:[p,()=>t(h=>Wi(h,q(z({},l),{active:!p})))]}),f("button",{onClick:()=>{t(h=>h.filter(m=>m.id!==s))},children:"X"})]},s)})}),!a&&k("div",{style:{display:"flex"},children:[k("div",{children:[f(Re,{value:n,onChange:r,placeholder:"From"}),f(Re,{value:o,onChange:i,placeholder:"To"})]}),f("button",{disabled:n.length<2||o.length<1,onClick:()=>{t(l=>_G(l,{id:DG(),to:o,from:n,active:!0})),i(""),r("")},children:"Add"})]})]})}wC.fName="NameReplacements";const xC=20;let Bv=0,Pv=0,Kn;function Mv(e){if((Kn==null?void 0:Kn.length)===0&&(Bv++,Bv===xC))return[];if(Kn&&Kn.length>0)return Kn;const t=[...e.querySelectorAll("*")].filter(n=>getComputedStyle(n).position==="fixed");return Kn=t.filter(n=>!t.some(r=>r!==n&&r.contains(n))),Kn}let Ar;function TG(e,t){let n=e.parentNode;for(;n;){if(t.includes(n))return!0;n=n.parentNode}return!1}function Ov(e,t){if((Ar==null?void 0:Ar.length)===0&&(Pv++,Pv===xC))return[];if(Ar&&Ar.length>0)return Ar;const n=[...e.querySelectorAll("*")].filter(r=>getComputedStyle(r).position==="sticky"&&!TG(r,t));return Ar=n,n}const CC="transform .07s ease-out";function BG(e,t,n,r){for(const o of e){let i=0;const{bottom:a,top:l,height:s}=getComputedStyle(o);if(s==="0px")continue;parseInt(l.replace("px",""))>n&&parseInt(a.replace("px",""))p){Rv(i);continue}const y=Math.min(m,t-d+c);y>0&&o.add(i),i.style.transform=`translateY(${y}px)`,i.style.transition=CC}}const OG=28;function RG(e){const{src:t}=e,{width:n,height:r,fullHeightFrameScale:o,fullHeightFrameShowFixed:i}=ae,a=1/o,[l,s]=x.useState(0),[u,c]=x.useState(!1),[d,p]=x.useState(0),[h,m]=x.useState(0),[y,E]=x.useState(null),[g,v]=x.useState(!1),[b,F]=x.useState(null),D=x.useRef();x.useEffect(()=>{var K;y!==null&&((K=$.current)==null||K.contentWindow.postMessage({type:"force-scroll",payload:{position:y,shouldSmoothScroll:g}},window.location.origin))},[y]);const{frameRef:$,scrollFrameRef:_}=x.useContext(it);x.useEffect(()=>{_.current.contentDocument.documentElement.classList.add("hide-scrollbars"),setTimeout(()=>{var X;_.current.contentDocument.documentElement.classList.add("hide-scrollbars");const K=({data:{type:pe,payload:oe}})=>{pe==="frame-scrolled"&&(s(oe.scrollPosition),E(null))};return window.addEventListener("message",K),(X=$.current)==null||X.contentWindow.postMessage({type:"emit-scroll"},window.location.origin),()=>{window.removeEventListener("message",K)}},2e3)},[]),x.useEffect(()=>{const K=_.current.contentWindow.document,X=Mv(K),pe=Ov(K,X);if(i)for(const oe of[...X,...pe])oe.classList.remove("hide-important");else{for(const oe of[...X,...pe])oe.classList.add("hide-important");return}},[i]),x.useEffect(()=>{F($.current.contentWindow.document.body.parentNode.scrollHeight);const K=setTimeout(()=>{F($.current.contentWindow.document.body.parentNode.scrollHeight)},800);return()=>{clearTimeout(K)}},[n,r]);let T=0;x.useLayoutEffect(()=>{if(!i)return;const K=performance.now();if(K-T>50){const X=_.current.contentWindow.document,pe=Mv(X),oe=Ov(X,pe);T=K,MG(oe,l,r,_.current),BG(pe,l,r,_.current)}return()=>{}},[l,r,i]);const B=Math.max(0,(u&&y||l)*o),P=K=>{u&&(E(h-(d-K.clientY)*a),v(!1))},L=K=>{const X=K.clientY-B-_.current.parentNode.getBoundingClientRect().top;E(Math.max(0,l+X*a-r/2)),v(!1)};return k("div",{onWheel:K=>{E(Math.max(0,l+K.deltaY)),v(!0)},style:{display:b===null?"none":"block",position:"relative",width:n*o},children:[k("div",{className:"responsive-frame-container",style:{transform:`scale(${o})`,width:`${OG+n}px`,overflow:"visible"},children:[f("div",{onMouseDown:L,onMouseUp:()=>c(!1),onMouseMove:P,style:{zIndex:1,position:"absolute",top:0,right:0,bottom:0,left:0}}),f("iframe",{className:"responsive-frame",ref:_,src:t,width:n,height:Math.max(r,b),style:{width:n}})]}),f("span",{ref:D,onClick:L,onMouseDown:K=>{c(!0),p(K.clientY),m(l)},onMouseMove:P,onMouseUp:()=>c(!1),style:{userSelect:"none",zIndex:2,top:B,position:"absolute",display:"inline-block",outline:"3px solid indigo",width:n*o,height:(r-8)*o,transition:"top .05s ease-out",boxSizing:"content-box",visibility:u?"hidden":""}})]})}function SC(){const[e,t]=J.fullHeightFrameShowFixed(),[n,r]=J.fullHeightFrameScale(),[o,i]=Ge("fullheightframescalestep","0.01");return k("div",{style:{display:"flex"},children:[f("input",{type:"number",style:{maxWidth:"72px"},value:n,step:o,onChange:a=>{r(a.target.value)}}),k("label",{children:["step",f("input",{type:"number",style:{maxWidth:"72px"},value:o,onChange:a=>{i(a.target.value)}})]}),f(ce,{controls:[e,t],children:"Show fixed and sticky"})]})}SC.fName="FullHeightFrameScale";function EC(){return k("div",{style:{display:"flex",gap:"4px"},children:[f(ce,{controls:J.includeDefaultPalette(),children:"Include default palette"}),f(ce,{controls:J.nativeColorPicker(),children:"Native color picker"}),f(ce,{controls:J.maximizeChroma(),children:"Maximize chroma when dropping"})]})}EC.fName="ColorSettings";function FC(){const[e,t]=J.showCssProperties();return k("div",{style:{display:"flex",gap:"4px"},children:[f(ce,{id:"show-css-properties",controls:[e,t],children:"Show CSS properties"}),f(ce,{id:"link-css-properties",controls:J.linkCssProperties(),children:"Link CSS properties"}),f(ce,{id:"show-source-links",controls:J.showSourceLinks(),children:"Show source links"})]})}FC.fName="InformationVisibilitySettings";function NG(){const[e,t]=J.webpackHome();return f(Re,{style:{width:"100%"},value:e,onChange:n=>t(n),label:"Webpack home",placeholder:"webpack home path",title:"Enter the root folder on your system for this page to open source links in VSCode"})}function IG(){const{themeEditor:{scopes:e},frameLoaded:t}=ae,{frameRef:n,scrollFrameRef:r}=x.useContext(it);return x.useInsertionEffect(()=>{AC(e,!0)},[e]),x.useEffect(()=>{var o;n.current.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(o=r.current)==null||o.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin)},[e,t]),null}function LG(){const e=rn();return x.useEffect(()=>{const t=n=>{if(n.data.type==="dropped-options"){const{options:r,value:o}=n.data.payload,[i,...a]=r;e({type:Ce.set,payload:{name:i.varName,scope:i.scope,value:o,alternatives:a}})}};return window.addEventListener("message",t,!1),()=>{window.removeEventListener("message",t)}},[]),null}function Lv(){document.fullscreenElement!==this?this.requestFullscreen():document.exitFullscreen()}function zG(){var i;const{frameRef:e}=x.useContext(it),[t,n]=x.useState(!1),r=f("button",{onClick:()=>{var l;const a=(l=e.current)==null?void 0:l.parentNode;n(document.fullscreenElement!==a),Lv.bind(a)()},children:"fullscreen preview"}),o=k(x.Fragment,{children:[f("button",{onClick:Lv.bind(document.body),children:"fullscreen"}),r]});return k(x.Fragment,{children:[o,t&&oh.createPortal(f("div",{style:{position:"fixed",top:0,right:0},children:r}),(i=e.current)==null?void 0:i.parentNode)]})}function jG(){const[e,t]=J.pickedValue();return f("div",{children:!(e==="")&&f("span",{onClick:()=>{t("")},style:{background:e,width:"32px",height:"32px"},children:e})})}function HG(){const[e,t]=J.pickedValue(),n=x.useRef();if(x.useEffect(()=>{if(e==="")return;const r=i=>{if(!n.current)return;const a=i.clientY,l=i.clientX;n.current.style.transform=`translate3d(${l}px, ${a}px, 0)`},o=window.addEventListener("mousemove",r);return()=>{window.removeEventListener("mousemove",o)}},[e]),x.useEffect(()=>{if(!e)return;const r=document.addEventListener("click",o=>{(o.target.classList.contains("area")||!o.target.closest(".area"))&&t("")});return()=>{document.removeEventListener("click",r)}},[e]),e!=="")return f("div",{ref:n,style:{"--picked-value":e},className:"picked-cursor",children:e})}const it=x.createContext({}),GG=e=>{const{frameLoaded:t}=ae,{allVars:n,defaultValues:r}=e,o=x.useRef(null),i=x.useRef(null),[a,l]=x.useState(!1),[s,u]=se("server-themes-displayed",!0),[c,d]=x.useState(!1),[p,h]=se("full-page-preview",!1),[m,y]=J.openFirstOnInspect();return k(it.Provider,{value:{allVars:n,defaultValues:r,frameRef:o,scrollFrameRef:i,setSheetDisablerDisplayed:d},children:[f(IG,{}),f(LG,{}),f(HG,{}),f(nz,{frameRef:o}),f("div",{className:"theme-editor",children:k(Oz,{stateHook:J.uiLayout,children:[k("div",{style:{display:"flex",columns:2,justifyContent:"space-between"},children:[k(Yn,{id:"area-top",style:{justifyContent:"flex-start",flexGrow:1},children:[k("div",{id:"Filters",style:{display:"flex",alignItems:"flex-start"},children:[f(bG,{}),f(wG,{})]}),f(jG,{}),f(cc,{}),f(uc,{})]}),k(Yn,{id:"area-top-reverse",style:{flexDirection:"row-reverse",justifyContent:"flex-start",flexGrow:1},children:[f(ac,{}),f(lc,{}),f(ec,{})]})]}),k("div",{style:{display:"flex",justifyContent:"space-between",flexGrow:"1"},children:[k(Yn,{id:"area-left",children:[f(fc,{}),f("div",{id:"Inspector",children:t&&f(sc,{})})]}),f(Yn,{id:"area-left-inner"}),!!p&&f(RG,{src:window.location.href}),f(D0,{src:window.location.href}),k(Yn,{id:"area-right",children:[f(cl,{}),f(vC,{}),k("div",{id:"ExtraPanelsMenu",className:"theme-editor-menu",children:[f(Ot,{controls:[a,l],children:"Import/export"}),f(Ot,{controls:[c,d],children:"Stylesheets"}),f(Ot,{controls:[s,u],children:"Server"})]}),f(x.Fragment,{id:"ThemesList",children:s&&f(A0,{})}),f(x.Fragment,{id:"StylesheetDisabler",children:c&&f(mG,{})}),f(x.Fragment,{id:"ImportExportTools",children:a&&f(AG,{})}),f(FC,{}),f(EC,{}),k("div",{id:"InspectionSettings",children:[f(ce,{controls:[p,h],title:"WARNING!!! 1) Affects performance on large pages 2) If scrollable section is below body, it cannot be fully shown (e.g. Halfmoon) 3) Does not work properly for pages that have different styles based on screen height.",children:"Full height preview"}),f(ce,{controls:[m,y],children:"Auto open first group on inspect"}),f(NG,{})]})]})]}),k("div",{style:{display:"flex",columns:2,justifyContent:"space-between",flexGrow:0,alignItems:"flex-end"},children:[f(Yn,{id:"area-bottom"}),f(Yn,{id:"area-bottom-reverse",style:{flexDirection:"row-reverse"}}),k($G,{children:[f(Zu,{}),f(mC,{}),f(tc,{}),f(_0,{}),f(Qu,{}),f(wC,{}),f(yC,{}),f(SC,{}),f(zG,{})]})]})]})})]})};let Lf;const WG=(e,t,n)=>{const r=f(Dz,{previewComponents:dH,children:f(GG,{allVars:t,defaultValues:n})});Lf||(Lf=rw(e)),Lf.render(r)},UG="https://unpkg.com/source-map@0.7.3/dist/source-map.js",VG=()=>new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",UG),n.addEventListener("load",e),n.addEventListener("error",t),document.head.appendChild(n)}),KG=()=>Ve(xe,null,function*(){var e;return(yield VG())&&((e=window.sourceMap)==null?void 0:e.SourceMapConsumer.initialize({"lib/mappings.wasm":"https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"}))}),YG=e=>e.reduce((n,{name:r,usages:o})=>{var a;if(!r.startsWith("--"))return n;const i=(a=o[0])==null?void 0:a.defaultValue;return i===null||(n[r]=i),n},{});function XG(e,{comments:t,rulesWithMap:n,rogueAtRules:r,sheet:o}){let i=[];const a=[];let l=0,s=0,u=0,c="",d,p,h=!1,m="",y=0,E=0,g=!1,v=!1,b=!1,F=!1,D=0,$,_="",T,B;const P={"{"(){if(g)return;B=!1;const L=c.trim();if(F){F=!1,a.push(L),c="";return}i.push([[d,p],L]),$={selectors:i,start:{line:l,col:s-u-c.length-1},end:null,stylemap:new Map,atRules:[...a],sheet:o},i=[],c="",h=!0},"}"(){if(!g){if(B=!1,h)h=!1,_&&($.stylemap.set(_,c.trim()),_=""),$.end={line:l,col:s-u-1},n.push($),$=null;else{const L=a.pop();let K=c.trim();K!==""&&(i.length>0&&(K=i.map(([,X])=>X).join()+", "+K),r.push({text:L,body:K})),i=[]}c=""}},"\n"(){B=g&&!v,v&&(t.push({line:y,col:E,text:m,inline:!0}),m="",g=!1,v=!1),D=0,l++,u=s},"/"(){g&&!v&&T==="*"?(B=!1,g=!1,t.push({line:y,col:E,text:m.slice(0,-1),inline:!1}),m=""):!g&&D===0&&T==="/"&&(B=!1,g=!0,v=!0,y=l,E=s-u-1,m="",c=c.slice(0,-1))},"*"(){!g&&T==="/"&&(B=!1,g=!0,y=l,E=s-u-1,c=c.slice(0,-1))},"@"(){!g&&!h&&(F=!0,c="")},":"(){h&&_===""&&(_=c.trim(),c="",B=!1)},";"(){h&&D===0?($.stylemap.set(_,c.trim()),c="",_="",B=!1):F&&(F=!1,c="",B=!1)},"("(){g||(D+=1)},")"(){g||(D-=1)},"\\"(){b=!0},","(){if(!g&&!h&&!F&&D===0){const L=c.trim();i.push([[d,p],L]),B=!1,c=""}}};for(const L of e){if(B=!0,b)b=!1;else{const K=P[L];K&&K()}if(B)if(g)m+=L;else{const K=L.trim()==="",X=c==="";(!K||!X)&&(c+=L),X&&!K&&(d=l,p=s-u-1)}s++,T=L}}const kC=/:(active|focus(-(visible|within))?|visited|hover)/g;function qG(e){return e.replaceAll(kC,":is(:$1, ._force-$1)")}const JG=/([\w\])-])(:(\-[\w-]+|:\-?[\w-]+|before|after|active|focus(-(visible|within))?|visited|hover))+/g;function QG(e){const t=e.replaceAll(JG,"$1").replaceAll(kC,"*").replaceAll(/\s+/g," ").replaceAll(/\s*,\s*/g,",").replaceAll(/:not\(\*\)/g,"").trim();return t===""||t.startsWith("::")?"*":t}function ZG({rulesWithMap:e=[],keyframesRules:t=[],selectorRules:n=[],testSelectors:r=new Map}){for(const o of e){const i=o.selectors.map(([,l])=>l).join(),a=o.atRules[0];if(a&&a.startsWith("@keyframes")){t.hasOwnProperty(a)||(t[a]={}),t[a][i]=o;continue}o.adaptedSelector=qG(i),o.testSelectors=new Set;for(const[,l]of o.selectors){const s=QG(l);if(r.has(s))o.testSelectors.add(r.get(s));else{const u={text:s,lastEl:null,origs:new Set};r.set(s,u),o.testSelectors.add(u)}r.get(s).origs.add(l)}n.push(o)}return{rulesWithMap:e,keyframesRules:t,selectorRules:n,testSelectors:r}}function eW(e){[...e.children].forEach(t=>{getComputedStyle(t).pointerEvents==="none"&&(t.style.pointerEvents="auto")})}const zv=window.self!==window.top,tW=KG(),jv=e=>{[...document.styleSheets].forEach(t=>{if(!t.href)return;const n=t.href.replace(/\?.*/,"");t.disabled=!!e[n]})};let nr=document.createElement("style");document.head.appendChild(nr);const T0="__forced-styles__";nr.id=T0;let na={};document.title=`🖌${document.title}`;function nW(e){let t="";for(const n in e)t+=` ${n}: ${e[n]} !important;`;return t}function rW(e,t){const n=`${e} {${nW(t)} }`;if(!(e in na)){na[e]=nr.sheet.insertRule(n,Object.keys(na).length);return}const r=na[e];nr.sheet.cssRules[r].cssText!==n&&(nr.sheet.insertRule(n,r),nr.sheet.deleteRule(r+1))}function AC(e,t=!1){t&&([...nr.sheet.cssRules].forEach(()=>nr.sheet.deleteRule(0)),na={}),Object.entries(e).forEach(([n,r])=>{rW(n,r)})}function oW(){[...document.body.childNodes].forEach(e=>{["STYLE","LINK","SCRIPT"].includes(e.nodeName)||document.body.removeChild(e)})}let Hv=[],iW=[],aW=[],lW=[],sW=[],uW=new Map,va;const zf=new WeakMap;function dc(e){if(zf.has(e))return zf.get(e);const t=vw({cssVars:va,target:e}),n=kj(t,e,va),r=_j(n);return zf.set(e,r),r}let $C;function cW(){return $C}const fW=e=>Ve(xe,null,function*(){var s;if(r5(e.localStorageNamespace||""),!zv){yield tW,S5(e.serverThemes),va=yield L5();const u=YG(va);$C=u;const c=[...document.styleSheets].filter(p=>{var h;return((h=p.ownerNode)==null?void 0:h.id)!==T0});for(const p of c){let h;if(p.href)try{h=yield(yield fetch(p.href)).text()}catch(m){continue}else if(h=(s=p.ownerNode)==null?void 0:s.innerHTML,!h)continue;XG(h,{comments:aW,rulesWithMap:Hv,rogueAtRules:iW,sheet:p})}ZG({rulesWithMap:Hv,keyframesRules:lW,selectorRules:sW,testSelectors:uW}),oW();const d=document.createElement("div");WG(d,va,u),oz(),d.id="theme-editor-root",document.body.appendChild(d)}const t={};let n=null,r=!1,o=null;if(!zv){nG();return}document.documentElement.classList.add("force-cursor");const i=localStorage.getItem(ih()+"set-disabled-sheets");if(i){const u=JSON.parse(i);jv(u)}let a;const l=u=>{const{type:c,payload:d}=u.data,{index:p,selector:h,scopes:m,resetAll:y,path:E}=d||{};switch(c){case"scroll-in-view":const g=h?t[h][p]:al(d.path);if(g.scrollIntoView(d.options||{behavior:"smooth",block:"center",inline:"end"}),Ra(g),n){const[F,D,$]=n;window.clearTimeout(F),$!==g&&D()}const v=()=>{Xo(g),n=null};n=[setTimeout(v,1500),v,g];break;case"set-sheet-config":jv(JSON.parse(d));break;case"set-scopes-styles":AC(m,y);break;case"force-scroll":r=!0,window.scrollTo({top:d.position,behavior:d.shouldSmoothScroll?"smooth":"auto"}),r=!1;break;case"emit-scroll":const b=()=>{window.parent.postMessage({type:"frame-scrolled",payload:{scrollPosition:document.documentElement.scrollTop}},window.location.href),o=null};a=F=>{r||o||(o=setTimeout(b,20))},document.addEventListener("scroll",a,{passive:!0});break}};window.addEventListener("message",l,!1)}),Ui="all-the-themes";fW({serverThemes:{fetchThemes:()=>JSON.parse(localStorage.getItem(Ui)),uploadTheme:(e,t)=>{const n=JSON.parse(localStorage.getItem(Ui))||{};n[e]=t,localStorage.setItem(Ui,JSON.stringify(n,null,2))},deleteTheme:e=>{const t=JSON.parse(localStorage.getItem(Ui))||{};delete t[e],localStorage.setItem(Ui,JSON.stringify(t,null,2))}}})});export default dW(); //# sourceMappingURL=bundle.js.map diff --git a/docs/demo/dist/bundle.js.map b/docs/demo/dist/bundle.js.map index 2438fb3..ca33223 100644 --- a/docs/demo/dist/bundle.js.map +++ b/docs/demo/dist/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../../node_modules/react/cjs/react.production.min.js","../../../node_modules/react/index.js","../../../node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/scheduler/cjs/scheduler.production.min.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.min.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/client.js","../../../src/functions/getLocalStorageNamespace.js","../../../node_modules/hotkeys-js/dist/hotkeys.esm.js","../../../node_modules/react-hotkeys-hook/dist/react-hotkeys-hook.esm.js","../../../src/hooks/mem.ts","../../../src/functions/getters.ts","../../../src/functions/signals.tsx","../../../src/screenOptions.js","../../../src/hooks/useGlobalState.ts","../../../src/hooks/useServerThemes.js","../../../src/functions/reducerOf.ts","../../../node_modules/balanced-match/index.js","../../../src/functions/balancedVar.js","../../../src/functions/getMatchingVars.js","../../../src/functions/extractPageVariables.js","../../../src/functions/highlight.js","../../../src/functions/resolveOriginalShorthand.js","../../../src/functions/collectRuleVars.js","../../../src/hooks/useThemeEditor.ts","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/isString.js","../../../node_modules/lodash/_createBaseFor.js","../../../node_modules/lodash/_baseFor.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_baseForOwn.js","../../../node_modules/lodash/identity.js","../../../node_modules/lodash/_castFunction.js","../../../node_modules/lodash/forOwn.js","../../../node_modules/lodash/_getPrototype.js","../../../node_modules/lodash/isPlainObject.js","../../../node_modules/lodash/_arrayMap.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/_baseIsMatch.js","../../../node_modules/lodash/_isStrictComparable.js","../../../node_modules/lodash/_getMatchData.js","../../../node_modules/lodash/_matchesStrictComparable.js","../../../node_modules/lodash/_baseMatches.js","../../../node_modules/lodash/isSymbol.js","../../../node_modules/lodash/_isKey.js","../../../node_modules/lodash/memoize.js","../../../node_modules/lodash/_memoizeCapped.js","../../../node_modules/lodash/_stringToPath.js","../../../node_modules/lodash/_baseToString.js","../../../node_modules/lodash/toString.js","../../../node_modules/lodash/_castPath.js","../../../node_modules/lodash/_toKey.js","../../../node_modules/lodash/_baseGet.js","../../../node_modules/lodash/get.js","../../../node_modules/lodash/_baseHasIn.js","../../../node_modules/lodash/_hasPath.js","../../../node_modules/lodash/hasIn.js","../../../node_modules/lodash/_baseMatchesProperty.js","../../../node_modules/lodash/_baseProperty.js","../../../node_modules/lodash/_basePropertyDeep.js","../../../node_modules/lodash/property.js","../../../node_modules/lodash/_baseIteratee.js","../../../node_modules/lodash/_createBaseEach.js","../../../node_modules/lodash/_baseEach.js","../../../node_modules/lodash/_baseMap.js","../../../node_modules/lodash/map.js","../../../node_modules/reactcss/lib/flattenNames.js","../../../node_modules/lodash/_arrayEach.js","../../../node_modules/lodash/_defineProperty.js","../../../node_modules/lodash/_baseAssignValue.js","../../../node_modules/lodash/_assignValue.js","../../../node_modules/lodash/_copyObject.js","../../../node_modules/lodash/_baseAssign.js","../../../node_modules/lodash/_nativeKeysIn.js","../../../node_modules/lodash/_baseKeysIn.js","../../../node_modules/lodash/keysIn.js","../../../node_modules/lodash/_baseAssignIn.js","../../../node_modules/lodash/_cloneBuffer.js","../../../node_modules/lodash/_copyArray.js","../../../node_modules/lodash/_copySymbols.js","../../../node_modules/lodash/_getSymbolsIn.js","../../../node_modules/lodash/_copySymbolsIn.js","../../../node_modules/lodash/_getAllKeysIn.js","../../../node_modules/lodash/_initCloneArray.js","../../../node_modules/lodash/_cloneArrayBuffer.js","../../../node_modules/lodash/_cloneDataView.js","../../../node_modules/lodash/_cloneRegExp.js","../../../node_modules/lodash/_cloneSymbol.js","../../../node_modules/lodash/_cloneTypedArray.js","../../../node_modules/lodash/_initCloneByTag.js","../../../node_modules/lodash/_baseCreate.js","../../../node_modules/lodash/_initCloneObject.js","../../../node_modules/lodash/_baseIsMap.js","../../../node_modules/lodash/isMap.js","../../../node_modules/lodash/_baseIsSet.js","../../../node_modules/lodash/isSet.js","../../../node_modules/lodash/_baseClone.js","../../../node_modules/lodash/cloneDeep.js","../../../node_modules/reactcss/lib/mergeClasses.js","../../../node_modules/reactcss/lib/autoprefix.js","../../../node_modules/reactcss/lib/components/hover.js","../../../node_modules/reactcss/lib/components/active.js","../../../node_modules/reactcss/lib/loop.js","../../../node_modules/reactcss/lib/index.js","../../../node_modules/react-color/es/helpers/alpha.js","../../../node_modules/react-color/es/helpers/checkboard.js","../../../node_modules/react-color/es/components/common/Checkboard.js","../../../node_modules/react-color/es/components/common/Alpha.js","../../../node_modules/react-color/es/components/common/EditableInput.js","../../../node_modules/react-color/es/helpers/hue.js","../../../node_modules/react-color/es/components/common/Hue.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/index.js","../../../node_modules/lodash-es/_listCacheClear.js","../../../node_modules/lodash-es/eq.js","../../../node_modules/lodash-es/_assocIndexOf.js","../../../node_modules/lodash-es/_listCacheDelete.js","../../../node_modules/lodash-es/_listCacheGet.js","../../../node_modules/lodash-es/_listCacheHas.js","../../../node_modules/lodash-es/_listCacheSet.js","../../../node_modules/lodash-es/_ListCache.js","../../../node_modules/lodash-es/_stackClear.js","../../../node_modules/lodash-es/_stackDelete.js","../../../node_modules/lodash-es/_stackGet.js","../../../node_modules/lodash-es/_stackHas.js","../../../node_modules/lodash-es/_freeGlobal.js","../../../node_modules/lodash-es/_root.js","../../../node_modules/lodash-es/_Symbol.js","../../../node_modules/lodash-es/_getRawTag.js","../../../node_modules/lodash-es/_objectToString.js","../../../node_modules/lodash-es/_baseGetTag.js","../../../node_modules/lodash-es/isObject.js","../../../node_modules/lodash-es/isFunction.js","../../../node_modules/lodash-es/_coreJsData.js","../../../node_modules/lodash-es/_isMasked.js","../../../node_modules/lodash-es/_toSource.js","../../../node_modules/lodash-es/_baseIsNative.js","../../../node_modules/lodash-es/_getValue.js","../../../node_modules/lodash-es/_getNative.js","../../../node_modules/lodash-es/_Map.js","../../../node_modules/lodash-es/_nativeCreate.js","../../../node_modules/lodash-es/_hashClear.js","../../../node_modules/lodash-es/_hashDelete.js","../../../node_modules/lodash-es/_hashGet.js","../../../node_modules/lodash-es/_hashHas.js","../../../node_modules/lodash-es/_hashSet.js","../../../node_modules/lodash-es/_Hash.js","../../../node_modules/lodash-es/_mapCacheClear.js","../../../node_modules/lodash-es/_isKeyable.js","../../../node_modules/lodash-es/_getMapData.js","../../../node_modules/lodash-es/_mapCacheDelete.js","../../../node_modules/lodash-es/_mapCacheGet.js","../../../node_modules/lodash-es/_mapCacheHas.js","../../../node_modules/lodash-es/_mapCacheSet.js","../../../node_modules/lodash-es/_MapCache.js","../../../node_modules/lodash-es/_stackSet.js","../../../node_modules/lodash-es/_Stack.js","../../../node_modules/lodash-es/_defineProperty.js","../../../node_modules/lodash-es/_baseAssignValue.js","../../../node_modules/lodash-es/_assignMergeValue.js","../../../node_modules/lodash-es/_createBaseFor.js","../../../node_modules/lodash-es/_baseFor.js","../../../node_modules/lodash-es/_cloneBuffer.js","../../../node_modules/lodash-es/_Uint8Array.js","../../../node_modules/lodash-es/_cloneArrayBuffer.js","../../../node_modules/lodash-es/_cloneTypedArray.js","../../../node_modules/lodash-es/_copyArray.js","../../../node_modules/lodash-es/_baseCreate.js","../../../node_modules/lodash-es/_overArg.js","../../../node_modules/lodash-es/_getPrototype.js","../../../node_modules/lodash-es/_isPrototype.js","../../../node_modules/lodash-es/_initCloneObject.js","../../../node_modules/lodash-es/isObjectLike.js","../../../node_modules/lodash-es/_baseIsArguments.js","../../../node_modules/lodash-es/isArguments.js","../../../node_modules/lodash-es/isArray.js","../../../node_modules/lodash-es/isLength.js","../../../node_modules/lodash-es/isArrayLike.js","../../../node_modules/lodash-es/isArrayLikeObject.js","../../../node_modules/lodash-es/stubFalse.js","../../../node_modules/lodash-es/isBuffer.js","../../../node_modules/lodash-es/isPlainObject.js","../../../node_modules/lodash-es/_baseIsTypedArray.js","../../../node_modules/lodash-es/_baseUnary.js","../../../node_modules/lodash-es/_nodeUtil.js","../../../node_modules/lodash-es/isTypedArray.js","../../../node_modules/lodash-es/_safeGet.js","../../../node_modules/lodash-es/_assignValue.js","../../../node_modules/lodash-es/_copyObject.js","../../../node_modules/lodash-es/_baseTimes.js","../../../node_modules/lodash-es/_isIndex.js","../../../node_modules/lodash-es/_arrayLikeKeys.js","../../../node_modules/lodash-es/_nativeKeysIn.js","../../../node_modules/lodash-es/_baseKeysIn.js","../../../node_modules/lodash-es/keysIn.js","../../../node_modules/lodash-es/toPlainObject.js","../../../node_modules/lodash-es/_baseMergeDeep.js","../../../node_modules/lodash-es/_baseMerge.js","../../../node_modules/lodash-es/identity.js","../../../node_modules/lodash-es/_apply.js","../../../node_modules/lodash-es/_overRest.js","../../../node_modules/lodash-es/constant.js","../../../node_modules/lodash-es/_baseSetToString.js","../../../node_modules/lodash-es/_shortOut.js","../../../node_modules/lodash-es/_setToString.js","../../../node_modules/lodash-es/_baseRest.js","../../../node_modules/lodash-es/_isIterateeCall.js","../../../node_modules/lodash-es/_createAssigner.js","../../../node_modules/lodash-es/merge.js","../../../node_modules/react-color/es/components/common/Raised.js","../../../node_modules/lodash-es/now.js","../../../node_modules/lodash-es/_trimmedEndIndex.js","../../../node_modules/lodash-es/_baseTrim.js","../../../node_modules/lodash-es/isSymbol.js","../../../node_modules/lodash-es/toNumber.js","../../../node_modules/lodash-es/debounce.js","../../../node_modules/lodash-es/throttle.js","../../../node_modules/react-color/es/helpers/saturation.js","../../../node_modules/react-color/es/components/common/Saturation.js","../../../node_modules/lodash-es/_arrayEach.js","../../../node_modules/lodash-es/_nativeKeys.js","../../../node_modules/lodash-es/_baseKeys.js","../../../node_modules/lodash-es/keys.js","../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js","../../../node_modules/lodash-es/_castFunction.js","../../../node_modules/lodash-es/forEach.js","../../../node_modules/tinycolor2/tinycolor.js","../../../node_modules/react-color/es/helpers/color.js","../../../node_modules/react-color/es/components/common/ColorWrap.js","../../../node_modules/react-color/es/helpers/interaction.js","../../../node_modules/react-color/es/components/common/Swatch.js","../../../node_modules/react-color/es/components/alpha/AlphaPointer.js","../../../node_modules/react-color/es/components/alpha/Alpha.js","../../../node_modules/lodash-es/_arrayMap.js","../../../node_modules/lodash-es/_setCacheAdd.js","../../../node_modules/lodash-es/_setCacheHas.js","../../../node_modules/lodash-es/_SetCache.js","../../../node_modules/lodash-es/_arraySome.js","../../../node_modules/lodash-es/_cacheHas.js","../../../node_modules/lodash-es/_equalArrays.js","../../../node_modules/lodash-es/_mapToArray.js","../../../node_modules/lodash-es/_setToArray.js","../../../node_modules/lodash-es/_equalByTag.js","../../../node_modules/lodash-es/_arrayPush.js","../../../node_modules/lodash-es/_baseGetAllKeys.js","../../../node_modules/lodash-es/_arrayFilter.js","../../../node_modules/lodash-es/stubArray.js","../../../node_modules/lodash-es/_getSymbols.js","../../../node_modules/lodash-es/_getAllKeys.js","../../../node_modules/lodash-es/_equalObjects.js","../../../node_modules/lodash-es/_DataView.js","../../../node_modules/lodash-es/_Promise.js","../../../node_modules/lodash-es/_Set.js","../../../node_modules/lodash-es/_WeakMap.js","../../../node_modules/lodash-es/_getTag.js","../../../node_modules/lodash-es/_baseIsEqualDeep.js","../../../node_modules/lodash-es/_baseIsEqual.js","../../../node_modules/lodash-es/_baseIsMatch.js","../../../node_modules/lodash-es/_isStrictComparable.js","../../../node_modules/lodash-es/_getMatchData.js","../../../node_modules/lodash-es/_matchesStrictComparable.js","../../../node_modules/lodash-es/_baseMatches.js","../../../node_modules/lodash-es/_isKey.js","../../../node_modules/lodash-es/memoize.js","../../../node_modules/lodash-es/_memoizeCapped.js","../../../node_modules/lodash-es/_stringToPath.js","../../../node_modules/lodash-es/_baseToString.js","../../../node_modules/lodash-es/toString.js","../../../node_modules/lodash-es/_castPath.js","../../../node_modules/lodash-es/_toKey.js","../../../node_modules/lodash-es/_baseGet.js","../../../node_modules/lodash-es/get.js","../../../node_modules/lodash-es/_baseHasIn.js","../../../node_modules/lodash-es/_hasPath.js","../../../node_modules/lodash-es/hasIn.js","../../../node_modules/lodash-es/_baseMatchesProperty.js","../../../node_modules/lodash-es/_baseProperty.js","../../../node_modules/lodash-es/_basePropertyDeep.js","../../../node_modules/lodash-es/property.js","../../../node_modules/lodash-es/_baseIteratee.js","../../../node_modules/lodash-es/_baseMap.js","../../../node_modules/lodash-es/map.js","../../../node_modules/react-color/es/components/block/BlockSwatches.js","../../../node_modules/react-color/es/components/block/Block.js","../../../node_modules/material-colors/dist/colors.es2015.js","../../../node_modules/react-color/es/components/circle/CircleSwatch.js","../../../node_modules/react-color/es/components/circle/Circle.js","../../../node_modules/lodash-es/isUndefined.js","../../../node_modules/@icons/material/UnfoldMoreHorizontalIcon.js","../../../node_modules/react-color/es/components/chrome/ChromeFields.js","../../../node_modules/react-color/es/components/chrome/ChromePointer.js","../../../node_modules/react-color/es/components/chrome/ChromePointerCircle.js","../../../node_modules/react-color/es/components/chrome/Chrome.js","../../../node_modules/react-color/es/components/compact/CompactColor.js","../../../node_modules/react-color/es/components/compact/CompactFields.js","../../../node_modules/react-color/es/components/compact/Compact.js","../../../node_modules/react-color/es/components/github/GithubSwatch.js","../../../node_modules/react-color/es/components/github/Github.js","../../../node_modules/react-color/es/components/hue/HuePointer.js","../../../node_modules/react-color/es/components/hue/Hue.js","../../../node_modules/react-color/es/components/material/Material.js","../../../node_modules/react-color/es/components/photoshop/PhotoshopFields.js","../../../node_modules/react-color/es/components/photoshop/PhotoshopPointerCircle.js","../../../node_modules/react-color/es/components/photoshop/PhotoshopPointer.js","../../../node_modules/react-color/es/components/photoshop/PhotoshopButton.js","../../../node_modules/react-color/es/components/photoshop/PhotoshopPreviews.js","../../../node_modules/react-color/es/components/photoshop/Photoshop.js","../../../node_modules/react-color/es/components/sketch/SketchFields.js","../../../node_modules/react-color/es/components/sketch/SketchPresetColors.js","../../../node_modules/react-color/es/components/sketch/Sketch.js","../../../node_modules/react-color/es/components/slider/SliderSwatch.js","../../../node_modules/react-color/es/components/slider/SliderSwatches.js","../../../node_modules/react-color/es/components/slider/SliderPointer.js","../../../node_modules/react-color/es/components/slider/Slider.js","../../../node_modules/@icons/material/CheckIcon.js","../../../node_modules/react-color/es/components/swatches/SwatchesColor.js","../../../node_modules/react-color/es/components/swatches/SwatchesGroup.js","../../../node_modules/react-color/es/components/swatches/Swatches.js","../../../node_modules/react-color/es/components/twitter/Twitter.js","../../../node_modules/react-color/es/components/google/GooglePointerCircle.js","../../../node_modules/react-color/es/components/google/GooglePointer.js","../../../node_modules/react-color/es/components/google/GoogleFields.js","../../../node_modules/react-color/es/components/google/Google.js","../../../src/components/ThemePalettePicker.jsx","../../../src/hooks/useThrottler.js","../../../src/components/controls/TextControl.jsx","../../../node_modules/@yatiac/name-that-color/index.js","../../../node_modules/culori/src/rgb/parseNumber.js","../../../node_modules/culori/src/colors/named.js","../../../node_modules/culori/src/rgb/parseNamed.js","../../../node_modules/culori/src/rgb/parseHex.js","../../../node_modules/culori/src/util/regex.js","../../../node_modules/culori/src/rgb/parseRgbLegacy.js","../../../node_modules/culori/src/_prepare.js","../../../node_modules/culori/src/converter.js","../../../node_modules/culori/src/modes.js","../../../node_modules/culori/src/parse.js","../../../node_modules/culori/src/rgb/parseRgb.js","../../../node_modules/culori/src/rgb/parseTransparent.js","../../../node_modules/culori/src/interpolate/lerp.js","../../../node_modules/culori/src/interpolate/piecewise.js","../../../node_modules/culori/src/interpolate/linear.js","../../../node_modules/culori/src/fixup/alpha.js","../../../node_modules/culori/src/rgb/definition.js","../../../node_modules/culori/src/a98/convertA98ToXyz65.js","../../../node_modules/culori/src/a98/convertXyz65ToA98.js","../../../node_modules/culori/src/lrgb/convertRgbToLrgb.js","../../../node_modules/culori/src/xyz65/convertRgbToXyz65.js","../../../node_modules/culori/src/lrgb/convertLrgbToRgb.js","../../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js","../../../node_modules/culori/src/a98/definition.js","../../../node_modules/culori/src/util/normalizeHue.js","../../../node_modules/culori/src/fixup/hue.js","../../../node_modules/culori/src/cubehelix/constants.js","../../../node_modules/culori/src/cubehelix/convertRgbToCubehelix.js","../../../node_modules/culori/src/cubehelix/convertCubehelixToRgb.js","../../../node_modules/culori/src/difference.js","../../../node_modules/culori/src/average.js","../../../node_modules/culori/src/cubehelix/definition.js","../../../node_modules/culori/src/lch/convertLabToLch.js","../../../node_modules/culori/src/lch/convertLchToLab.js","../../../node_modules/culori/src/xyz65/constants.js","../../../node_modules/culori/src/constants.js","../../../node_modules/culori/src/lab65/convertLab65ToXyz65.js","../../../node_modules/culori/src/lab65/convertLab65ToRgb.js","../../../node_modules/culori/src/lab65/convertXyz65ToLab65.js","../../../node_modules/culori/src/lab65/convertRgbToLab65.js","../../../node_modules/culori/src/dlch/constants.js","../../../node_modules/culori/src/dlch/convertDlchToLab65.js","../../../node_modules/culori/src/dlch/convertLab65ToDlch.js","../../../node_modules/culori/src/dlab/definition.js","../../../node_modules/culori/src/dlch/definition.js","../../../node_modules/culori/src/hsi/convertHsiToRgb.js","../../../node_modules/culori/src/hsi/convertRgbToHsi.js","../../../node_modules/culori/src/hsi/definition.js","../../../node_modules/culori/src/hsl/convertHslToRgb.js","../../../node_modules/culori/src/hsl/convertRgbToHsl.js","../../../node_modules/culori/src/util/hue.js","../../../node_modules/culori/src/hsl/parseHslLegacy.js","../../../node_modules/culori/src/hsl/parseHsl.js","../../../node_modules/culori/src/hsl/definition.js","../../../node_modules/culori/src/hsv/convertHsvToRgb.js","../../../node_modules/culori/src/hsv/convertRgbToHsv.js","../../../node_modules/culori/src/hsv/definition.js","../../../node_modules/culori/src/hwb/convertHwbToRgb.js","../../../node_modules/culori/src/hwb/convertRgbToHwb.js","../../../node_modules/culori/src/hwb/parseHwb.js","../../../node_modules/culori/src/hwb/definition.js","../../../node_modules/culori/src/hdr/constants.js","../../../node_modules/culori/src/hdr/transfer.js","../../../node_modules/culori/src/itp/convertItpToXyz65.js","../../../node_modules/culori/src/itp/convertXyz65ToItp.js","../../../node_modules/culori/src/itp/definition.js","../../../node_modules/culori/src/jab/convertXyz65ToJab.js","../../../node_modules/culori/src/jab/convertJabToXyz65.js","../../../node_modules/culori/src/jab/convertRgbToJab.js","../../../node_modules/culori/src/jab/convertJabToRgb.js","../../../node_modules/culori/src/jab/definition.js","../../../node_modules/culori/src/jch/convertJabToJch.js","../../../node_modules/culori/src/jch/convertJchToJab.js","../../../node_modules/culori/src/jch/definition.js","../../../node_modules/culori/src/xyz50/constants.js","../../../node_modules/culori/src/lab/convertLabToXyz50.js","../../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js","../../../node_modules/culori/src/lab/convertLabToRgb.js","../../../node_modules/culori/src/xyz50/convertRgbToXyz50.js","../../../node_modules/culori/src/lab/convertXyz50ToLab.js","../../../node_modules/culori/src/lab/convertRgbToLab.js","../../../node_modules/culori/src/lab/parseLab.js","../../../node_modules/culori/src/lab/definition.js","../../../node_modules/culori/src/lab65/definition.js","../../../node_modules/culori/src/lch/parseLch.js","../../../node_modules/culori/src/lch/definition.js","../../../node_modules/culori/src/lch65/definition.js","../../../node_modules/culori/src/lchuv/convertLuvToLchuv.js","../../../node_modules/culori/src/lchuv/convertLchuvToLuv.js","../../../node_modules/culori/src/luv/convertXyz50ToLuv.js","../../../node_modules/culori/src/luv/convertLuvToXyz50.js","../../../node_modules/culori/src/lchuv/definition.js","../../../node_modules/culori/src/lrgb/definition.js","../../../node_modules/culori/src/luv/definition.js","../../../node_modules/culori/src/oklab/convertLrgbToOklab.js","../../../node_modules/culori/src/oklab/convertRgbToOklab.js","../../../node_modules/culori/src/oklab/convertOklabToLrgb.js","../../../node_modules/culori/src/oklab/convertOklabToRgb.js","../../../node_modules/culori/src/okhsl/helpers.js","../../../node_modules/culori/src/okhsl/convertOklabToOkhsl.js","../../../node_modules/culori/src/okhsl/convertOkhslToOklab.js","../../../node_modules/culori/src/okhsl/modeOkhsl.js","../../../node_modules/culori/src/okhsv/convertOklabToOkhsv.js","../../../node_modules/culori/src/okhsv/convertOkhsvToOklab.js","../../../node_modules/culori/src/okhsv/modeOkhsv.js","../../../node_modules/culori/src/oklab/parseOklab.js","../../../node_modules/culori/src/oklab/definition.js","../../../node_modules/culori/src/oklch/parseOklch.js","../../../node_modules/culori/src/oklch/definition.js","../../../node_modules/culori/src/p3/convertP3ToXyz65.js","../../../node_modules/culori/src/p3/convertXyz65ToP3.js","../../../node_modules/culori/src/p3/definition.js","../../../node_modules/culori/src/prophoto/convertXyz50ToProphoto.js","../../../node_modules/culori/src/prophoto/convertProphotoToXyz50.js","../../../node_modules/culori/src/prophoto/definition.js","../../../node_modules/culori/src/rec2020/convertXyz65ToRec2020.js","../../../node_modules/culori/src/rec2020/convertRec2020ToXyz65.js","../../../node_modules/culori/src/rec2020/definition.js","../../../node_modules/culori/src/xyb/constants.js","../../../node_modules/culori/src/xyb/convertRgbToXyb.js","../../../node_modules/culori/src/xyb/convertXybToRgb.js","../../../node_modules/culori/src/xyb/definition.js","../../../node_modules/culori/src/xyz50/definition.js","../../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js","../../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js","../../../node_modules/culori/src/xyz65/definition.js","../../../node_modules/culori/src/yiq/convertRgbToYiq.js","../../../node_modules/culori/src/yiq/convertYiqToRgb.js","../../../node_modules/culori/src/yiq/definition.js","../../../node_modules/culori/src/round.js","../../../node_modules/culori/src/formatter.js","../../../node_modules/culori/src/clamp.js","../../../node_modules/culori/src/index.js","../../../src/components/inspector/CreateAlias.jsx","../../../src/components/controls/SelectControl.tsx","../../../src/components/properties/OklchColorControl.tsx","../../../src/components/properties/ColorControl.jsx","../../../src/state/index.ts","../../../src/components/RenderInfo.jsx","../../../src/components/Hotkeys.jsx","../../../src/_unstable/historyStore.ts","../../../src/functions/export.ts","../../../src/hooks/useResumableReducer.tsx","../../../src/hooks/useLocalStorage.ts","../../../src/components/movable/MovablePanels.jsx","../../../src/components/movable/AreaSwitcher.jsx","../../../node_modules/classnames/index.js","../../../src/components/movable/MovableElement.jsx","../../../src/components/movable/DragHandle.jsx","../../../src/components/controls/Checkbox.jsx","../../../src/components/inspector/RemoveAnnoyingPrefix.jsx","../../../src/components/movable/MoveControls.jsx","../../../src/components/ui/FrameScaleSlider.jsx","../../../src/components/ui/FrameSizeSettings.jsx","../../../src/functions/nodePath.ts","../../../src/components/ui/ElementLocator.jsx","../../../src/functions/dragValue.ts","../../../node_modules/@samuelmeuli/font-manager/dist/index.es.js","../../../node_modules/font-picker-react/dist/FontPicker.es.js","../../../src/functions/getAllDefinedFonts.js","../../../src/components/properties/FontFamilyControl.jsx","../../../node_modules/specificity/dist/specificity.mjs","../../../src/functions/compare.js","../../../src/functions/getMatchingScopes.js","../../../src/functions/groupVars.js","../../../src/functions/getOnlyMostSpecific.js","../../../src/components/properties/CalcSizeControl.tsx","../../../src/components/properties/SizeControl.jsx","../../../src/components/properties/TimeControl.jsx","../../../src/components/inspector/SelectOnlyControl.jsx","../../../src/components/inspector/TypedControl.jsx","../../../node_modules/css-mediaquery/index.js","../../../src/components/inspector/VariableScreenSwitcher.jsx","../../../src/components/inspector/IdeLink.jsx","../../../src/components/inspector/VariableUsages.jsx","../../../src/components/inspector/VariableReferences.jsx","../../../src/components/ui/FilterableVariableList.jsx","../../../src/components/inspector/MediaQueries.jsx","../../../src/components/controls/ToggleButton.jsx","../../../src/functions/onLongPress.js","../../../src/components/inspector/VariableControl.jsx","../../../src/components/inspector/ScrollInViewButton.jsx","../../../src/previewComponents.jsx","../../../src/components/ui/HistoryControls.tsx","../../../src/components/ui/HistoryStash.jsx","../../../src/components/movable/Area.jsx","../../../src/components/ui/HistoryVisualization.jsx","../../../src/functions/filterSearched.js","../../../src/components/inspector/ElementInlineStyles.jsx","../../../src/components/inspector/ScopeControl.jsx","../../../src/_unstable/colorsFromImage.ts","../../../src/components/inspector/ImageColors.tsx","../../../src/components/inspector/GroupControl.jsx","../../../src/components/ui/Inspector.jsx","../../../src/components/movable/CompactModeButton.jsx","../../../src/components/ui/Palette.tsx","../../../src/components/controls/RadioControl.jsx","../../../src/components/ui/ScreenSwitcher.jsx","../../../src/components/ui/ServerThemesListItem.jsx","../../../src/components/ui/ServerThemesList.jsx","../../../src/_unstable/courses.ts","../../../src/_unstable/Tutorial.tsx","../../../src/components/ResizableFrame.jsx","../../../src/components/ui/CustomVariableInput.jsx","../../../src/components/ui/StylesheetDisabler.jsx","../../../src/components/ui/PropertyCategoryFilter.jsx","../../../src/components/ui/PropertySearch.jsx","../../../src/functions/readFromUploadedFile.js","../../../src/components/ui/ImportExportTools.jsx","../../../src/components/ui/ThemeUploadPanel.jsx","../../../src/components/ui/ThemeEditorExtraOptions.jsx","../../../src/components/movable/Drawer.jsx","../../../src/components/ui/CurrentTheme.jsx","../../../src/components/inspector/NameReplacements.jsx","../../../src/functions/fixupFixedElements.js","../../../src/components/SmallFullHeightFrame.jsx","../../../src/components/ui/ColorSettings.jsx","../../../src/components/ui/InformationVisibilitySettings.jsx","../../../src/components/ui/WebpackHomeInput.jsx","../../../src/components/effects/ApplyStyles.jsx","../../../src/components/effects/AcceptDroppedOptions.jsx","../../../src/components/ui/FullScreenToggle.tsx","../../../src/components/ui/PickedValue.jsx","../../../src/components/PickedValueCursor.jsx","../../../src/components/ThemeEditor.jsx","../../../src/renderSelectedVars.jsx","../../../src/sourcemap.js","../../../src/functions/getAllDefaultValues.js","../../../src/functions/parseCss.js","../../../src/initializeThemeEditor.js","../src/index.js"],"sourcesContent":["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3 localStorageNamespace;\r\n","/*!\n * hotkeys-js v3.8.3\n * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.\n * \n * Copyright (c) 2021 kenny wong \n * http://jaywcjlove.github.io/hotkeys\n * \n * Licensed under the MIT license.\n */\n\nvar isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false; // 绑定事件\n\nfunction addEvent(object, event, method) {\n if (object.addEventListener) {\n object.addEventListener(event, method, false);\n } else if (object.attachEvent) {\n object.attachEvent(\"on\".concat(event), function () {\n method(window.event);\n });\n }\n} // 修饰键转换成对应的键码\n\n\nfunction getMods(modifier, key) {\n var mods = key.slice(0, key.length - 1);\n\n for (var i = 0; i < mods.length; i++) {\n mods[i] = modifier[mods[i].toLowerCase()];\n }\n\n return mods;\n} // 处理传的key字符串转换成数组\n\n\nfunction getKeys(key) {\n if (typeof key !== 'string') key = '';\n key = key.replace(/\\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等\n\n var keys = key.split(','); // 同时设置多个快捷键,以','分割\n\n var index = keys.lastIndexOf(''); // 快捷键可能包含',',需特殊处理\n\n for (; index >= 0;) {\n keys[index - 1] += ',';\n keys.splice(index, 1);\n index = keys.lastIndexOf('');\n }\n\n return keys;\n} // 比较修饰键的数组\n\n\nfunction compareArray(a1, a2) {\n var arr1 = a1.length >= a2.length ? a1 : a2;\n var arr2 = a1.length >= a2.length ? a2 : a1;\n var isIndex = true;\n\n for (var i = 0; i < arr1.length; i++) {\n if (arr2.indexOf(arr1[i]) === -1) isIndex = false;\n }\n\n return isIndex;\n}\n\nvar _keyMap = {\n backspace: 8,\n tab: 9,\n clear: 12,\n enter: 13,\n \"return\": 13,\n esc: 27,\n escape: 27,\n space: 32,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n del: 46,\n \"delete\": 46,\n ins: 45,\n insert: 45,\n home: 36,\n end: 35,\n pageup: 33,\n pagedown: 34,\n capslock: 20,\n num_0: 96,\n num_1: 97,\n num_2: 98,\n num_3: 99,\n num_4: 100,\n num_5: 101,\n num_6: 102,\n num_7: 103,\n num_8: 104,\n num_9: 105,\n num_multiply: 106,\n num_add: 107,\n num_enter: 108,\n num_subtract: 109,\n num_decimal: 110,\n num_divide: 111,\n '⇪': 20,\n ',': 188,\n '.': 190,\n '/': 191,\n '`': 192,\n '-': isff ? 173 : 189,\n '=': isff ? 61 : 187,\n ';': isff ? 59 : 186,\n '\\'': 222,\n '[': 219,\n ']': 221,\n '\\\\': 220\n}; // Modifier Keys\n\nvar _modifier = {\n // shiftKey\n '⇧': 16,\n shift: 16,\n // altKey\n '⌥': 18,\n alt: 18,\n option: 18,\n // ctrlKey\n '⌃': 17,\n ctrl: 17,\n control: 17,\n // metaKey\n '⌘': 91,\n cmd: 91,\n command: 91\n};\nvar modifierMap = {\n 16: 'shiftKey',\n 18: 'altKey',\n 17: 'ctrlKey',\n 91: 'metaKey',\n shiftKey: 16,\n ctrlKey: 17,\n altKey: 18,\n metaKey: 91\n};\nvar _mods = {\n 16: false,\n 18: false,\n 17: false,\n 91: false\n};\nvar _handlers = {}; // F1~F12 special key\n\nfor (var k = 1; k < 20; k++) {\n _keyMap[\"f\".concat(k)] = 111 + k;\n}\n\nvar _downKeys = []; // 记录摁下的绑定键\n\nvar _scope = 'all'; // 默认热键范围\n\nvar elementHasBindEvent = []; // 已绑定事件的节点记录\n// 返回键码\n\nvar code = function code(x) {\n return _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0);\n}; // 设置获取当前范围(默认为'所有')\n\n\nfunction setScope(scope) {\n _scope = scope || 'all';\n} // 获取当前范围\n\n\nfunction getScope() {\n return _scope || 'all';\n} // 获取摁下绑定键的键值\n\n\nfunction getPressedKeyCodes() {\n return _downKeys.slice(0);\n} // 表单控件控件判断 返回 Boolean\n// hotkey is effective only when filter return true\n\n\nfunction filter(event) {\n var target = event.target || event.srcElement;\n var tagName = target.tagName;\n var flag = true; // ignore: isContentEditable === 'true', and