From c1f73ab597b2feeebd1d1fd7fe3f228a31d6ffa6 Mon Sep 17 00:00:00 2001 From: Pieter Vincent Date: Tue, 31 Dec 2024 15:01:43 +0100 Subject: [PATCH] Add preset UI layouts --- docs/demo/dist/bundle.js | 116 +++++++-------- docs/demo/dist/bundle.js.map | 2 +- src/components/movable/MoveControls.jsx | 179 +++++++++++++++--------- src/components/movable/presets.jsx | 74 ++++++++++ src/components/ui/HistoryControls.tsx | 2 + 5 files changed, 251 insertions(+), 122 deletions(-) create mode 100644 src/components/movable/presets.jsx diff --git a/docs/demo/dist/bundle.js b/docs/demo/dist/bundle.js index 963f835..2dd546f 100644 --- a/docs/demo/dist/bundle.js +++ b/docs/demo/dist/bundle.js @@ -1,4 +1,4 @@ -var K5=Object.defineProperty,Y5=Object.defineProperties;var X5=Object.getOwnPropertyDescriptors;var Rl=Object.getOwnPropertySymbols;var Gg=Object.prototype.hasOwnProperty,Wg=Object.prototype.propertyIsEnumerable;var Hg=(e,t,n)=>t in e?K5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))Gg.call(t,n)&&Hg(e,n,t[n]);if(Rl)for(var n of Rl(t))Wg.call(t,n)&&Hg(e,n,t[n]);return e},ae=(e,t)=>Y5(e,X5(t));var af=e=>typeof e=="symbol"?e:e+"",mn=(e,t)=>{var n={};for(var r in e)Gg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rl)for(var r of Rl(e))t.indexOf(r)<0&&Wg.call(e,r)&&(n[r]=e[r]);return n};var q5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var tt=(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 hY=q5((Be,Jt)=>{var Nl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rb={exports:{}},Ru={},Nb={exports:{}},Fe={};/** +var Y5=Object.defineProperty,X5=Object.defineProperties;var q5=Object.getOwnPropertyDescriptors;var Nl=Object.getOwnPropertySymbols;var Gg=Object.prototype.hasOwnProperty,Wg=Object.prototype.propertyIsEnumerable;var Hg=(e,t,n)=>t in e?Y5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V=(e,t)=>{for(var n in t||(t={}))Gg.call(t,n)&&Hg(e,n,t[n]);if(Nl)for(var n of Nl(t))Wg.call(t,n)&&Hg(e,n,t[n]);return e},ae=(e,t)=>X5(e,q5(t));var lf=e=>typeof e=="symbol"?e:e+"",mn=(e,t)=>{var n={};for(var r in e)Gg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Nl)for(var r of Nl(e))t.indexOf(r)<0&&Wg.call(e,r)&&(n[r]=e[r]);return n};var J5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var tt=(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 mY=J5((Be,Jt)=>{var Il=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nb={exports:{}},Nu={},Ib={exports:{}},Fe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var K5=Object.defineProperty,Y5=Object.defineProperties;var X5=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 sl=Symbol.for("react.element"),J5=Symbol.for("react.portal"),Q5=Symbol.for("react.fragment"),Z5=Symbol.for("react.strict_mode"),eE=Symbol.for("react.profiler"),tE=Symbol.for("react.provider"),nE=Symbol.for("react.context"),rE=Symbol.for("react.forward_ref"),oE=Symbol.for("react.suspense"),iE=Symbol.for("react.memo"),aE=Symbol.for("react.lazy"),Ug=Symbol.iterator;function lE(e){return e===null||typeof e!="object"?null:(e=Ug&&e[Ug]||e["@@iterator"],typeof e=="function"?e:null)}var Ib={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lb=Object.assign,zb={};function _i(e,t,n){this.props=e,this.context=t,this.refs=zb,this.updater=n||Ib}_i.prototype.isReactComponent={};_i.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")};_i.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jb(){}jb.prototype=_i.prototype;function dh(e,t,n){this.props=e,this.context=t,this.refs=zb,this.updater=n||Ib}var ph=dh.prototype=new jb;ph.constructor=dh;Lb(ph,_i.prototype);ph.isPureReactComponent=!0;var Vg=Array.isArray,Hb=Object.prototype.hasOwnProperty,hh={current:null},Gb={key:!0,ref:!0,__self:!0,__source:!0};function Wb(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)Hb.call(t,r)&&!Gb.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,R=z[le];if(0>>1;leo(ne,U))Po(Y,ne)?(z[le]=Y,z[P]=U,le=P):(z[le]=ne,z[X]=U,le=X);else if(Po(Y,U))z[le]=Y,z[P]=U,le=P;else break e}}return Z}function o(z,Z){var U=z.sortIndex-Z.sortIndex;return U!==0?U:z.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,f=null,p=3,h=!1,m=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(z){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=z)r(u),Z.sortIndex=Z.expirationTime,t(s,Z);else break;Z=n(u)}}function F(z){if(y=!1,b(z),!m)if(n(s)!==null)m=!0,Se(_);else{var Z=n(u);Z!==null&&ie(F,Z.startTime-z)}}function _(z,Z){m=!1,y&&(y=!1,g(O),O=-1),h=!0;var U=p;try{for(b(Z),f=n(s);f!==null&&(!(f.expirationTime>Z)||z&&!Q());){var le=f.callback;if(typeof le=="function"){f.callback=null,p=f.priorityLevel;var R=le(f.expirationTime<=Z);Z=e.unstable_now(),typeof R=="function"?f.callback=R:f===n(s)&&r(s),b(Z)}else r(s);f=n(s)}if(f!==null)var K=!0;else{var X=n(u);X!==null&&ie(F,X.startTime-Z),K=!1}return K}finally{f=null,p=U,h=!1}}var A=!1,D=null,O=-1,T=5,L=-1;function Q(){return!(e.unstable_now()-Lz||125le?(z.sortIndex=U,t(u,z),n(s)===null&&z===n(u)&&(y?(g(O),O=-1):y=!0,ie(F,U-le))):(z.sortIndex=R,t(s,z),m||h||(m=!0,Se(_))),z},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(z){var Z=p;return function(){var U=p;p=Z;try{return z.apply(this,arguments)}finally{p=U}}}})(Xb);Yb.exports=Xb;var yE=Yb.exports;/** + */(function(e){function t(z,Z){var U=z.length;z.push(Z);e:for(;0>>1,R=z[le];if(0>>1;leo(ne,U))Po(Y,ne)?(z[le]=Y,z[P]=U,le=P):(z[le]=ne,z[X]=U,le=X);else if(Po(Y,U))z[le]=Y,z[P]=U,le=P;else break e}}return Z}function o(z,Z){var U=z.sortIndex-Z.sortIndex;return U!==0?U:z.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,f=null,p=3,h=!1,g=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(z){for(var Z=n(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=z)r(u),Z.sortIndex=Z.expirationTime,t(s,Z);else break;Z=n(u)}}function F(z){if(y=!1,b(z),!g)if(n(s)!==null)g=!0,Se(_);else{var Z=n(u);Z!==null&&ie(F,Z.startTime-z)}}function _(z,Z){g=!1,y&&(y=!1,m(O),O=-1),h=!0;var U=p;try{for(b(Z),f=n(s);f!==null&&(!(f.expirationTime>Z)||z&&!Q());){var le=f.callback;if(typeof le=="function"){f.callback=null,p=f.priorityLevel;var R=le(f.expirationTime<=Z);Z=e.unstable_now(),typeof R=="function"?f.callback=R:f===n(s)&&r(s),b(Z)}else r(s);f=n(s)}if(f!==null)var K=!0;else{var X=n(u);X!==null&&ie(F,X.startTime-Z),K=!1}return K}finally{f=null,p=U,h=!1}}var A=!1,D=null,O=-1,T=5,L=-1;function Q(){return!(e.unstable_now()-Lz||125le?(z.sortIndex=U,t(u,z),n(s)===null&&z===n(u)&&(y?(m(O),O=-1):y=!0,ie(F,U-le))):(z.sortIndex=R,t(s,z),g||h||(g=!0,Se(_))),z},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(z){var Z=p;return function(){var U=p;p=Z;try{return z.apply(this,arguments)}finally{p=U}}}})(qb);Xb.exports=qb;var bE=Xb.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var K5=Object.defineProperty,Y5=Object.defineProperties;var X5=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 qb=w,Zt=yE;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nt}return!1}function It(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 bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new It(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){bt[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var mh=/[\-:]([a-z])/g;function vh(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(mh,vh);bt[t]=new It(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(mh,vh);bt[t]=new It(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(mh,vh);bt[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function yh(e,t,n,r){var o=bt.hasOwnProperty(t)?bt[t]:null;(o!==null?o.type!==0:r||!(2t}return!1}function It(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 wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wt[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wt[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wt[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wt[e]=new It(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){wt[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wt[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wt[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wt[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wt[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var vh=/[\-:]([a-z])/g;function yh(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(vh,yh);wt[t]=new It(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(vh,yh);wt[t]=new It(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(vh,yh);wt[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wt[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});wt.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wt[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function bh(e,t,n,r){var o=wt.hasOwnProperty(t)?wt[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{uf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ca(e):""}function SE(e){switch(e.tag){case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return ca("Suspense");case 19:return ca("SuspenseList");case 0:case 2:case 15:return e=cf(e.type,!1),e;case 11:return e=cf(e.type.render,!1),e;case 1:return e=cf(e.type,!0),e;default:return""}}function zd(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 Vo:return"Fragment";case Uo:return"Portal";case Nd:return"Profiler";case bh:return"StrictMode";case Id:return"Suspense";case Ld:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zb:return(e.displayName||"Context")+".Consumer";case Qb:return(e._context.displayName||"Context")+".Provider";case wh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case xh:return t=e.displayName||null,t!==null?t:zd(e.type)||"Memo";case sr:t=e._payload,e=e._init;try{return zd(e(t))}catch(n){}}return null}function EE(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 zd(t);case 8:return t===bh?"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 Dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FE(e){var t=tw(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 zl(e){e._valueTracker||(e._valueTracker=FE(e))}function nw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ms(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 jd(e,t){var n=t.checked;return Xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Jg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dr(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 rw(e,t){t=t.checked,t!=null&&yh(e,"checked",t,!1)}function Hd(e,t){rw(e,t);var n=Dr(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")?Gd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Gd(e,t.type,Dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qg(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 Gd(e,t,n){(t!=="number"||Ms(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fa=Array.isArray;function ii(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=jl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Na(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wa={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},kE=["Webkit","ms","Moz","O"];Object.keys(wa).forEach(function(e){kE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wa[t]=wa[e]})});function lw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wa.hasOwnProperty(e)&&wa[e]?(""+t).trim():t+"px"}function sw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=lw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var AE=Xe({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 Vd(e,t){if(t){if(AE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Kd(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 Yd=null;function Ch(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xd=null,ai=null,li=null;function tm(e){if(e=fl(e)){if(typeof Xd!="function")throw Error(H(280));var t=e.stateNode;t&&(t=ju(t),Xd(e.stateNode,e.type,t))}}function uw(e){ai?li?li.push(e):li=[e]:ai=e}function cw(){if(ai){var e=ai,t=li;if(li=ai=null,tm(e),t)for(e=0;e>>=0,e===0?32:31-(IE(e)/LE|0)|0}var Hl=64,Gl=4194304;function da(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 Ls(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=da(l):(i&=a,i!==0&&(r=da(i)))}else a=n&~o,a!==0?r=da(a):i!==0&&(r=da(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 ul(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 GE(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=Ca),cm=" ",fm=!1;function Dw(e,t){switch(e){case"keyup":return v3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ko=!1;function b3(e,t){switch(e){case"compositionend":return Pw(t);case"keypress":return t.which!==32?null:(fm=!0,cm);case"textInput":return e=t.data,e===cm&&fm?null:e;default:return null}}function w3(e,t){if(Ko)return e==="compositionend"||!Dh&&Dw(e,t)?(e=$w(),xs=Ah=hr=null,Ko=!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=gm(n)}}function Mw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rw(){for(var e=window,t=Ms();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=Ms(e.document)}return t}function Ph(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 _3(e){var t=Rw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mw(n.ownerDocument.documentElement,n)){if(r!==null&&Ph(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=mm(n,i);var a=mm(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,Yo=null,tp=null,Ea=null,np=!1;function vm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;np||Yo==null||Yo!==Ms(r)||(r=Yo,"selectionStart"in r&&Ph(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}),Ea&&Ga(Ea,r)||(Ea=r,r=Hs(tp,"onSelect"),0Jo||(e.current=sp[Jo],sp[Jo]=null,Jo--)}function Ne(e,t){Jo++,sp[Jo]=e.current,e.current=t}var Pr={},Pt=Lr(Pr),Gt=Lr(!1),to=Pr;function mi(e,t){var n=e.type.contextTypes;if(!n)return Pr;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 Wt(e){return e=e.childContextTypes,e!=null}function Ws(){je(Gt),je(Pt)}function Em(e,t,n){if(Pt.current!==Pr)throw Error(H(168));Ne(Pt,t),Ne(Gt,n)}function Uw(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(H(108,EE(e)||"Unknown",o));return Xe({},n,r)}function Us(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pr,to=Pt.current,Ne(Pt,e),Ne(Gt,Gt.current),!0}function Fm(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Uw(e,t,to),r.__reactInternalMemoizedMergedChildContext=e,je(Gt),je(Pt),Ne(Pt,e)):je(Gt),Ne(Gt,n)}var jn=null,Hu=!1,Ef=!1;function Vw(e){jn===null?jn=[e]:jn.push(e)}function j3(e){Hu=!0,Vw(e)}function zr(){if(!Ef&&jn!==null){Ef=!0;var e=0,t=Te;try{var n=jn;for(Te=1;e>=a,o-=a,Hn=1<<32-Cn(t)+o|n<O?(T=D,D=null):T=D.sibling;var L=p(g,D,b[O],F);if(L===null){D===null&&(D=T);break}e&&D&&L.alternate===null&&t(g,D),v=i(L,v,O),A===null?_=L:A.sibling=L,A=L,D=T}if(O===b.length)return n(g,D),Ge&&Wr(g,O),_;if(D===null){for(;OO?(T=D,D=null):T=D.sibling;var Q=p(g,D,L.value,F);if(Q===null){D===null&&(D=T);break}e&&D&&Q.alternate===null&&t(g,D),v=i(Q,v,O),A===null?_=Q:A.sibling=Q,A=Q,D=T}if(L.done)return n(g,D),Ge&&Wr(g,O),_;if(D===null){for(;!L.done;O++,L=b.next())L=f(g,L.value,F),L!==null&&(v=i(L,v,O),A===null?_=L:A.sibling=L,A=L);return Ge&&Wr(g,O),_}for(D=r(g,D);!L.done;O++,L=b.next())L=h(D,g,O,L.value,F),L!==null&&(e&&L.alternate!==null&&D.delete(L.key===null?O:L.key),v=i(L,v,O),A===null?_=L:A.sibling=L,A=L);return e&&D.forEach(function(B){return t(g,B)}),Ge&&Wr(g,O),_}function C(g,v,b,F){if(typeof b=="object"&&b!==null&&b.type===Vo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ll:e:{for(var _=b.key,A=v;A!==null;){if(A.key===_){if(_=b.type,_===Vo){if(A.tag===7){n(g,A.sibling),v=o(A,b.props.children),v.return=g,g=v;break e}}else if(A.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===sr&&Tm(_)===A.type){n(g,A.sibling),v=o(A,b.props),v.ref=Qi(g,A,b),v.return=g,g=v;break e}n(g,A);break}else t(g,A);A=A.sibling}b.type===Vo?(v=Zr(b.props.children,g.mode,F,b.key),v.return=g,g=v):(F=_s(b.type,b.key,b.props,null,g.mode,F),F.ref=Qi(g,v,b),F.return=g,g=F)}return a(g);case Uo:e:{for(A=b.key;v!==null;){if(v.key===A)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=Tf(b,g.mode,F),v.return=g,g=v}return a(g);case sr:return A=b._init,C(g,v,A(b._payload),F)}if(fa(b))return m(g,v,b,F);if(Ki(b))return y(g,v,b,F);ql(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=Pf(b,g.mode,F),v.return=g,g=v),a(g)):n(g,v)}return C}var yi=ex(!0),tx=ex(!1),dl={},Bn=Lr(dl),Ka=Lr(dl),Ya=Lr(dl);function Jr(e){if(e===dl)throw Error(H(174));return e}function zh(e,t){switch(Ne(Ya,t),Ne(Ka,e),Ne(Bn,dl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ud(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ud(t,e)}je(Bn),Ne(Bn,t)}function bi(){je(Bn),je(Ka),je(Ya)}function nx(e){Jr(Ya.current);var t=Jr(Bn.current),n=Ud(t,e.type);t!==n&&(Ne(Ka,e),Ne(Bn,n))}function jh(e){Ka.current===e&&(je(Bn),je(Ka))}var Ke=Lr(0);function Js(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 Ff=[];function Hh(){for(var e=0;en?n:4,e(!0);var r=kf.transition;kf.transition={};try{e(!1),t()}finally{Te=n,kf.transition=r}}function yx(){return dn().memoizedState}function U3(e,t,n){var r=Sr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bx(e))wx(t,n);else if(n=qw(e,t,n,r),n!==null){var o=Bt();Sn(n,e,r,o),xx(n,t,r)}}function V3(e,t,n){var r=Sr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bx(e))wx(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,En(l,a)){var s=t.interleaved;s===null?(o.next=o,Ih(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch(u){}finally{}n=qw(e,t,o,r),n!==null&&(o=Bt(),Sn(n,e,r,o),xx(n,t,r))}}function bx(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function wx(e,t){Fa=Qs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Eh(e,n)}}var Zs={readContext:fn,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},K3={readContext:fn,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:Bm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fs(4194308,4,px.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fs(4,2,e,t)},useMemo:function(e,t){var n=$n();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$n();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=U3.bind(null,Ye,e),[r.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:Om,useDebugValue:Kh,useDeferredValue:function(e){return $n().memoizedState=e},useTransition:function(){var e=Om(!1),t=e[0];return e=W3.bind(null,e[1]),$n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ye,o=$n();if(Ge){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),dt===null)throw Error(H(349));ro&30||ix(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Bm(lx.bind(null,r,i,e),[e]),r.flags|=2048,Ja(9,ax.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=$n(),t=dt.identifierPrefix;if(Ge){var n=Gn,r=Hn;n=(r&~(1<<32-Cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xa++,0")&&(s=s.replace("",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{cf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ca(e):""}function EE(e){switch(e.tag){case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return ca("Suspense");case 19:return ca("SuspenseList");case 0:case 2:case 15:return e=ff(e.type,!1),e;case 11:return e=ff(e.type.render,!1),e;case 1:return e=ff(e.type,!0),e;default:return""}}function jd(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 Ko:return"Fragment";case Vo:return"Portal";case Id:return"Profiler";case wh:return"StrictMode";case Ld:return"Suspense";case zd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ew:return(e.displayName||"Context")+".Consumer";case Zb:return(e._context.displayName||"Context")+".Provider";case xh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ch:return t=e.displayName||null,t!==null?t:jd(e.type)||"Memo";case sr:t=e._payload,e=e._init;try{return jd(e(t))}catch(n){}}return null}function FE(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 jd(t);case 8:return t===wh?"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 Dr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kE(e){var t=nw(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 jl(e){e._valueTracker||(e._valueTracker=kE(e))}function rw(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rs(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 Hd(e,t){var n=t.checked;return Xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Jg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Dr(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 ow(e,t){t=t.checked,t!=null&&bh(e,"checked",t,!1)}function Gd(e,t){ow(e,t);var n=Dr(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")?Wd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wd(e,t.type,Dr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qg(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 Wd(e,t,n){(t!=="number"||Rs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var fa=Array.isArray;function ai(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Na(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wa={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},AE=["Webkit","ms","Moz","O"];Object.keys(wa).forEach(function(e){AE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wa[t]=wa[e]})});function sw(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wa.hasOwnProperty(e)&&wa[e]?(""+t).trim():t+"px"}function uw(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=sw(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $E=Xe({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 Kd(e,t){if(t){if($E[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Yd(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 Xd=null;function Sh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qd=null,li=null,si=null;function tm(e){if(e=fl(e)){if(typeof qd!="function")throw Error(H(280));var t=e.stateNode;t&&(t=Hu(t),qd(e.stateNode,e.type,t))}}function cw(e){li?si?si.push(e):si=[e]:li=e}function fw(){if(li){var e=li,t=si;if(si=li=null,tm(e),t)for(e=0;e>>=0,e===0?32:31-(LE(e)/zE|0)|0}var Gl=64,Wl=4194304;function da(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 zs(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=da(l):(i&=a,i!==0&&(r=da(i)))}else a=n&~o,a!==0?r=da(a):i!==0&&(r=da(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 ul(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 WE(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=Ca),cm=" ",fm=!1;function Pw(e,t){switch(e){case"keyup":return y3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yo=!1;function w3(e,t){switch(e){case"compositionend":return Tw(t);case"keypress":return t.which!==32?null:(fm=!0,cm);case"textInput":return e=t.data,e===cm&&fm?null:e;default:return null}}function x3(e,t){if(Yo)return e==="compositionend"||!Ph&&Pw(e,t)?(e=_w(),Cs=$h=hr=null,Yo=!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=gm(n)}}function Rw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nw(){for(var e=window,t=Rs();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=Rs(e.document)}return t}function Th(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 D3(e){var t=Nw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rw(n.ownerDocument.documentElement,n)){if(r!==null&&Th(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=mm(n,i);var a=mm(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,Xo=null,np=null,Ea=null,rp=!1;function vm(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rp||Xo==null||Xo!==Rs(r)||(r=Xo,"selectionStart"in r&&Th(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}),Ea&&Ga(Ea,r)||(Ea=r,r=Gs(np,"onSelect"),0Qo||(e.current=up[Qo],up[Qo]=null,Qo--)}function Ne(e,t){Qo++,up[Qo]=e.current,e.current=t}var Pr={},Pt=Lr(Pr),Gt=Lr(!1),to=Pr;function vi(e,t){var n=e.type.contextTypes;if(!n)return Pr;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 Wt(e){return e=e.childContextTypes,e!=null}function Us(){je(Gt),je(Pt)}function Em(e,t,n){if(Pt.current!==Pr)throw Error(H(168));Ne(Pt,t),Ne(Gt,n)}function Vw(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(H(108,FE(e)||"Unknown",o));return Xe({},n,r)}function Vs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Pr,to=Pt.current,Ne(Pt,e),Ne(Gt,Gt.current),!0}function Fm(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Vw(e,t,to),r.__reactInternalMemoizedMergedChildContext=e,je(Gt),je(Pt),Ne(Pt,e)):je(Gt),Ne(Gt,n)}var jn=null,Gu=!1,Ff=!1;function Kw(e){jn===null?jn=[e]:jn.push(e)}function H3(e){Gu=!0,Kw(e)}function zr(){if(!Ff&&jn!==null){Ff=!0;var e=0,t=Te;try{var n=jn;for(Te=1;e>=a,o-=a,Hn=1<<32-Cn(t)+o|n<O?(T=D,D=null):T=D.sibling;var L=p(m,D,b[O],F);if(L===null){D===null&&(D=T);break}e&&D&&L.alternate===null&&t(m,D),v=i(L,v,O),A===null?_=L:A.sibling=L,A=L,D=T}if(O===b.length)return n(m,D),Ge&&Wr(m,O),_;if(D===null){for(;OO?(T=D,D=null):T=D.sibling;var Q=p(m,D,L.value,F);if(Q===null){D===null&&(D=T);break}e&&D&&Q.alternate===null&&t(m,D),v=i(Q,v,O),A===null?_=Q:A.sibling=Q,A=Q,D=T}if(L.done)return n(m,D),Ge&&Wr(m,O),_;if(D===null){for(;!L.done;O++,L=b.next())L=f(m,L.value,F),L!==null&&(v=i(L,v,O),A===null?_=L:A.sibling=L,A=L);return Ge&&Wr(m,O),_}for(D=r(m,D);!L.done;O++,L=b.next())L=h(D,m,O,L.value,F),L!==null&&(e&&L.alternate!==null&&D.delete(L.key===null?O:L.key),v=i(L,v,O),A===null?_=L:A.sibling=L,A=L);return e&&D.forEach(function(B){return t(m,B)}),Ge&&Wr(m,O),_}function C(m,v,b,F){if(typeof b=="object"&&b!==null&&b.type===Ko&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case zl:e:{for(var _=b.key,A=v;A!==null;){if(A.key===_){if(_=b.type,_===Ko){if(A.tag===7){n(m,A.sibling),v=o(A,b.props.children),v.return=m,m=v;break e}}else if(A.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===sr&&Tm(_)===A.type){n(m,A.sibling),v=o(A,b.props),v.ref=Qi(m,A,b),v.return=m,m=v;break e}n(m,A);break}else t(m,A);A=A.sibling}b.type===Ko?(v=Zr(b.props.children,m.mode,F,b.key),v.return=m,m=v):(F=Ds(b.type,b.key,b.props,null,m.mode,F),F.ref=Qi(m,v,b),F.return=m,m=F)}return a(m);case Vo:e:{for(A=b.key;v!==null;){if(v.key===A)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(m,v.sibling),v=o(v,b.children||[]),v.return=m,m=v;break e}else{n(m,v);break}else t(m,v);v=v.sibling}v=Of(b,m.mode,F),v.return=m,m=v}return a(m);case sr:return A=b._init,C(m,v,A(b._payload),F)}if(fa(b))return g(m,v,b,F);if(Ki(b))return y(m,v,b,F);Jl(m,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(m,v.sibling),v=o(v,b),v.return=m,m=v):(n(m,v),v=Tf(b,m.mode,F),v.return=m,m=v),a(m)):n(m,v)}return C}var bi=tx(!0),nx=tx(!1),dl={},Bn=Lr(dl),Ka=Lr(dl),Ya=Lr(dl);function Jr(e){if(e===dl)throw Error(H(174));return e}function jh(e,t){switch(Ne(Ya,t),Ne(Ka,e),Ne(Bn,dl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vd(t,e)}je(Bn),Ne(Bn,t)}function wi(){je(Bn),je(Ka),je(Ya)}function rx(e){Jr(Ya.current);var t=Jr(Bn.current),n=Vd(t,e.type);t!==n&&(Ne(Ka,e),Ne(Bn,n))}function Hh(e){Ka.current===e&&(je(Bn),je(Ka))}var Ke=Lr(0);function Qs(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 kf=[];function Gh(){for(var e=0;en?n:4,e(!0);var r=Af.transition;Af.transition={};try{e(!1),t()}finally{Te=n,Af.transition=r}}function bx(){return dn().memoizedState}function V3(e,t,n){var r=Sr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wx(e))xx(t,n);else if(n=Jw(e,t,n,r),n!==null){var o=Bt();Sn(n,e,r,o),Cx(n,t,r)}}function K3(e,t,n){var r=Sr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wx(e))xx(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,En(l,a)){var s=t.interleaved;s===null?(o.next=o,Lh(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch(u){}finally{}n=Jw(e,t,o,r),n!==null&&(o=Bt(),Sn(n,e,r,o),Cx(n,t,r))}}function wx(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function xx(e,t){Fa=Zs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fh(e,n)}}var eu={readContext:fn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},Y3={readContext:fn,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:Bm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ks(4194308,4,hx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ks(4194308,4,e,t)},useInsertionEffect:function(e,t){return ks(4,2,e,t)},useMemo:function(e,t){var n=$n();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$n();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=V3.bind(null,Ye,e),[r.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:Om,useDebugValue:Yh,useDeferredValue:function(e){return $n().memoizedState=e},useTransition:function(){var e=Om(!1),t=e[0];return e=U3.bind(null,e[1]),$n().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ye,o=$n();if(Ge){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),dt===null)throw Error(H(349));ro&30||ax(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Bm(sx.bind(null,r,i,e),[e]),r.flags|=2048,Ja(9,lx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=$n(),t=dt.identifierPrefix;if(Ge){var n=Gn,r=Hn;n=(r&~(1<<32-Cn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xa++,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[Dn]=t,e[Va]=r,Dx(e,t,!1,!1),t.stateNode=e;e:{switch(a=Kd(n,r),n){case"dialog":Ie("cancel",e),Ie("close",e),o=r;break;case"iframe":case"object":case"embed":Ie("load",e),o=r;break;case"video":case"audio":for(o=0;oxi&&(t.flags|=128,r=!0,Zi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Js(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ge)return Et(t),null}else 2*Qe()-i.renderingStartTime>xi&&n!==1073741824&&(t.flags|=128,r=!0,Zi(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=Qe(),t.sibling=null,n=Ke.current,Ne(Ke,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return Zh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xt&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function tF(e,t){switch(Oh(t),t.tag){case 1:return Wt(t.type)&&Ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bi(),je(Gt),je(Pt),Hh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jh(t),null;case 13:if(je(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Ke),null;case 4:return bi(),null;case 10:return Nh(t.type._context),null;case 22:case 23:return Zh(),null;case 24:return null;default:return null}}var Ql=!1,$t=!1,nF=typeof WeakSet=="function"?WeakSet:Set,oe=null;function ti(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 wp(e,t,n){try{n()}catch(r){Je(e,t,r)}}var Gm=!1;function rF(e,t){if(rp=zs,e=Rw(),Ph(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,f=e,p=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(l=a+o),f!==i||r!==0&&f.nodeType!==3||(s=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++c===r&&(s=a),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(op={focusedElem:e,selectionRange:n},zs=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;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,C=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:yn(t.type,y),C);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(H(163))}}catch(F){Je(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return m=Gm,Gm=!1,m}function ka(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&&wp(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 xp(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 Ox(e){var t=e.alternate;t!==null&&(e.alternate=null,Ox(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dn],delete t[Va],delete t[lp],delete t[L3],delete t[z3])),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 Bx(e){return e.tag===5||e.tag===3||e.tag===4}function Wm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bx(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 Cp(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=Gs));else if(r!==4&&(e=e.child,e!==null))for(Cp(e,t,n),e=e.sibling;e!==null;)Cp(e,t,n),e=e.sibling}function Sp(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(Sp(e,t,n),e=e.sibling;e!==null;)Sp(e,t,n),e=e.sibling}var mt=null,bn=!1;function or(e,t,n){for(n=n.child;n!==null;)Mx(e,t,n),n=n.sibling}function Mx(e,t,n){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Nu,n)}catch(l){}switch(n.tag){case 5:$t||ti(n,t);case 6:var r=mt,o=bn;mt=null,or(e,t,n),mt=r,bn=o,mt!==null&&(bn?(e=mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):mt.removeChild(n.stateNode));break;case 18:mt!==null&&(bn?(e=mt,n=n.stateNode,e.nodeType===8?Sf(e.parentNode,n):e.nodeType===1&&Sf(e,n),ja(e)):Sf(mt,n.stateNode));break;case 4:r=mt,o=bn,mt=n.stateNode.containerInfo,bn=!0,or(e,t,n),mt=r,bn=o;break;case 0:case 11:case 14:case 15:if(!$t&&(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)&&wp(n,t,a),o=o.next}while(o!==r)}or(e,t,n);break;case 1:if(!$t&&(ti(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)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?($t=(r=$t)||n.memoizedState!==null,or(e,t,n),$t=r):or(e,t,n);break;default:or(e,t,n)}}function Um(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nF),t.forEach(function(r){var o=dF.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function vn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*iF(r/1960))-r,10e?16:e,gr===null)var r=!1;else{if(e=gr,gr=null,nu=0,$e&6)throw Error(H(331));var o=$e;for($e|=4,oe=e.current;oe!==null;){var i=oe,a=i.child;if(oe.flags&16){var l=i.deletions;if(l!==null){for(var s=0;sQe()-Jh?Qr(e,0):qh|=n),Ut(e,t)}function Gx(e,t){t===0&&(e.mode&1?(t=Gl,Gl<<=1,!(Gl&130023424)&&(Gl=4194304)):t=1);var n=Bt();e=Yn(e,t),e!==null&&(ul(e,t,n),Ut(e,n))}function fF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gx(e,n)}function dF(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(H(314))}r!==null&&r.delete(t),Gx(e,n)}var Wx;Wx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,Z3(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Ge&&t.flags&1048576&&Kw(t,Ks,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ks(e,t),e=t.pendingProps;var o=mi(t,Pt.current);ui(t,n),o=Wh(null,t,r,e,o,n);var i=Uh();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,Wt(r)?(i=!0,Us(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Lh(t),o.updater=Gu,t.stateNode=o,o._reactInternals=t,pp(t,r,e,n),t=mp(null,t,r,!0,i,n)):(t.tag=0,Ge&&i&&Th(t),Tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ks(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hF(r),e=yn(r,e),o){case 0:t=gp(null,t,r,e,n);break e;case 1:t=zm(null,t,r,e,n);break e;case 11:t=Im(null,t,r,e,n);break e;case 14:t=Lm(null,t,r,yn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),gp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),zm(e,t,r,o,n);case 3:e:{if(Ax(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Jw(e,t),qs(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=wi(Error(H(423)),t),t=jm(e,t,r,n,o);break e}else if(r!==o){o=wi(Error(H(424)),t),t=jm(e,t,r,n,o);break e}else for(qt=wr(t.stateNode.containerInfo.firstChild),Qt=t,Ge=!0,wn=null,n=tx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vi(),r===o){t=Xn(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return nx(t),e===null&&cp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,ip(r,o)?a=null:i!==null&&ip(r,i)&&(t.flags|=32),kx(e,t),Tt(e,t,a,n),t.child;case 6:return e===null&&cp(t),null;case 13:return $x(e,t,n);case 4:return zh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yi(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),Im(e,t,r,o,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(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,Ne(Ys,r._currentValue),r._currentValue=a,i!==null)if(En(i.value,a)){if(i.children===o.children&&!Gt.current){t=Xn(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=Un(-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),fp(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(H(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),fp(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}Tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ui(t,n),o=fn(o),r=r(o),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,o=yn(r,t.pendingProps),o=yn(r.type,o),Lm(e,t,r,o,n);case 15:return Ex(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),ks(e,t),t.tag=1,Wt(r)?(e=!0,Us(t)):e=!1,ui(t,n),Zw(t,r,o),pp(t,r,o,n),mp(null,t,r,!0,e,n);case 19:return _x(e,t,n);case 22:return Fx(e,t,n)}throw Error(H(156,t.tag))};function Ux(e,t){return vw(e,t)}function pF(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 un(e,t,n,r){return new pF(e,t,n,r)}function t0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hF(e){if(typeof e=="function")return t0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wh)return 11;if(e===xh)return 14}return 2}function Er(e,t){var n=e.alternate;return n===null?(n=un(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 _s(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")t0(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Vo:return Zr(n.children,o,i,t);case bh:a=8,o|=8;break;case Nd:return e=un(12,n,t,o|2),e.elementType=Nd,e.lanes=i,e;case Id:return e=un(13,n,t,o),e.elementType=Id,e.lanes=i,e;case Ld:return e=un(19,n,t,o),e.elementType=Ld,e.lanes=i,e;case ew:return Ku(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qb:a=10;break e;case Zb:a=9;break e;case wh:a=11;break e;case xh:a=14;break e;case sr:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=un(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zr(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Ku(e,t,n,r){return e=un(22,e,r,t),e.elementType=ew,e.lanes=n,e.stateNode={isHidden:!1},e}function Pf(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function Tf(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gF(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=df(0),this.expirationTimes=df(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=df(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function n0(e,t,n,r,o,i,a,l,s){return e=new gF(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=un(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lh(i),e}function mF(e,t,n){var r=3Jx;/*! +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Df(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function gp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var J3=typeof WeakMap=="function"?WeakMap:Map;function Sx(e,t,n){n=Un(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nu||(nu=!0,Fp=r),gp(e,t)},n}function Ex(e,t,n){n=Un(-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(){gp(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){gp(e,t),typeof r!="function"&&(Cr===null?Cr=new Set([this]):Cr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Mm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new J3;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=fF.bind(null,e,t,n),t.then(e,e))}function Rm(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 Nm(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=Un(-1,1),t.tag=2,xr(n,t,1))),n.lanes|=1),e)}var Q3=Jn.ReactCurrentOwner,jt=!1;function Tt(e,t,n,r){t.child=e===null?nx(t,null,n,r):bi(t,e.child,n,r)}function Im(e,t,n,r,o){n=n.render;var i=t.ref;return ci(t,o),r=Uh(e,t,n,r,i,o),n=Vh(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xn(e,t,o)):(Ge&&n&&Oh(t),t.flags|=1,Tt(e,t,r,o),t.child)}function Lm(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!n0(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Fx(e,t,i,r,o)):(e=Ds(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:Ga,n(a,r)&&e.ref===t.ref)return Xn(e,t,o)}return t.flags|=1,e=Er(i,r),e.ref=t.ref,e.return=t,t.child=e}function Fx(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Ga(i,r)&&e.ref===t.ref)if(jt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,Xn(e,t,o)}return mp(e,t,n,r,o)}function kx(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},Ne(ri,Xt),Xt|=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,Ne(ri,Xt),Xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ne(ri,Xt),Xt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ne(ri,Xt),Xt|=r;return Tt(e,t,o,n),t.child}function Ax(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function mp(e,t,n,r,o){var i=Wt(n)?to:Pt.current;return i=vi(t,i),ci(t,o),n=Uh(e,t,n,r,i,o),r=Vh(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xn(e,t,o)):(Ge&&r&&Oh(t),t.flags|=1,Tt(e,t,n,o),t.child)}function zm(e,t,n,r,o){if(Wt(n)){var i=!0;Vs(t)}else i=!1;if(ci(t,o),t.stateNode===null)As(e,t),ex(t,n,r),hp(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=fn(u):(u=Wt(n)?to:Pt.current,u=vi(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&Pm(t,a,r,u),ur=!1;var p=t.memoizedState;a.state=p,Js(t,r,a,o),s=t.memoizedState,l!==r||p!==s||Gt.current||ur?(typeof c=="function"&&(pp(t,n,c,r),s=t.memoizedState),(l=ur||Dm(t,n,l,r,p,s,u))?(f||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,Qw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:yn(t.type,l),a.props=u,f=t.pendingProps,p=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=fn(s):(s=Wt(n)?to:Pt.current,s=vi(t,s));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==s)&&Pm(t,a,r,s),ur=!1,p=t.memoizedState,a.state=p,Js(t,r,a,o);var g=t.memoizedState;l!==f||p!==g||Gt.current||ur?(typeof h=="function"&&(pp(t,n,h,r),g=t.memoizedState),(u=ur||Dm(t,n,u,r,p,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,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=g),a.props=r,a.state=g,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 vp(e,t,n,r,i,o)}function vp(e,t,n,r,o,i){Ax(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Fm(t,n,!1),Xn(e,t,i);r=t.stateNode,Q3.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=bi(t,e.child,null,i),t.child=bi(t,null,l,i)):Tt(e,t,l,i),t.memoizedState=r.state,o&&Fm(t,n,!0),t.child}function $x(e){var t=e.stateNode;t.pendingContext?Em(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Em(e,t.context,!1),jh(e,t.containerInfo)}function jm(e,t,n,r,o){return yi(),Mh(o),t.flags|=256,Tt(e,t,n,r),t.child}var yp={dehydrated:null,treeContext:null,retryLane:0};function bp(e){return{baseLanes:e,cachePool:null,transitions:null}}function _x(e,t,n){var r=t.pendingProps,o=Ke.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),Ne(Ke,o&1),e===null)return fp(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=Yu(a,r,0,null),e=Zr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=bp(n),t.memoizedState=yp,e):Xh(t,a));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return Z3(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=Er(o,s),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=Er(l,i):(i=Zr(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?bp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=yp,r}return i=e.child,e=i.sibling,r=Er(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 Xh(e,t){return t=Yu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ql(e,t,n,r){return r!==null&&Mh(r),bi(t,e.child,null,n),e=Xh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Z3(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Df(Error(H(422))),Ql(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Yu({mode:"visible",children:r.children},o,0,null),i=Zr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&bi(t,e.child,null,a),t.child.memoizedState=bp(a),t.memoizedState=yp,i);if(!(t.mode&1))return Ql(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(H(419)),r=Df(i,r,void 0),Ql(e,t,a,r)}if(l=(a&e.childLanes)!==0,jt||l){if(r=dt,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,Yn(e,o),Sn(r,e,o,-1))}return t0(),r=Df(Error(H(421))),Ql(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=dF.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,qt=wr(o.nextSibling),Qt=t,Ge=!0,wn=null,e!==null&&(an[ln++]=Hn,an[ln++]=Gn,an[ln++]=no,Hn=e.id,Gn=e.overflow,no=t),t=Xh(t,r.children),t.flags|=4096,t)}function Hm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dp(e.return,t,n)}function Pf(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 Dx(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Tt(e,t,r.children,n),r=Ke.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&&Hm(e,n,t);else if(e.tag===19)Hm(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(Ne(Ke,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&&Qs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Pf(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&&Qs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Pf(t,!0,n,null,i);break;case"together":Pf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function As(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),oo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Er(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Er(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function eF(e,t,n){switch(t.tag){case 3:$x(t),yi();break;case 5:rx(t);break;case 1:Wt(t.type)&&Vs(t);break;case 4:jh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ne(Xs,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ne(Ke,Ke.current&1),t.flags|=128,null):n&t.child.childLanes?_x(e,t,n):(Ne(Ke,Ke.current&1),e=Xn(e,t,n),e!==null?e.sibling:null);Ne(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dx(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ne(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,kx(e,t,n)}return Xn(e,t,n)}var Px,wp,Tx,Ox;Px=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}};wp=function(){};Tx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Jr(Bn.current);var i=null;switch(n){case"input":o=Hd(e,o),r=Hd(e,r),i=[];break;case"select":o=Xe({},o,{value:void 0}),r=Xe({},r,{value:void 0}),i=[];break;case"textarea":o=Ud(e,o),r=Ud(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ws)}Kd(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"&&(Ra.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"&&(Ra.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Ie("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)}};Ox=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zi(e,t){if(!Ge)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 Ft(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 tF(e,t,n){var r=t.pendingProps;switch(Bh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(t),null;case 1:return Wt(t.type)&&Us(),Ft(t),null;case 3:return r=t.stateNode,wi(),je(Gt),je(Pt),Gh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ql(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wn!==null&&($p(wn),wn=null))),wp(e,t),Ft(t),null;case 5:Hh(t);var o=Jr(Ya.current);if(n=t.type,e!==null&&t.stateNode!=null)Tx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ft(t),null}if(e=Jr(Bn.current),ql(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Dn]=t,r[Va]=i,e=(t.mode&1)!==0,n){case"dialog":Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":case"embed":Ie("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[Dn]=t,e[Va]=r,Px(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yd(n,r),n){case"dialog":Ie("cancel",e),Ie("close",e),o=r;break;case"iframe":case"object":case"embed":Ie("load",e),o=r;break;case"video":case"audio":for(o=0;oCi&&(t.flags|=128,r=!0,Zi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Qs(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ge)return Ft(t),null}else 2*Qe()-i.renderingStartTime>Ci&&n!==1073741824&&(t.flags|=128,r=!0,Zi(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=Qe(),t.sibling=null,n=Ke.current,Ne(Ke,r?n&1|2:n&1),t):(Ft(t),null);case 22:case 23:return e0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xt&1073741824&&(Ft(t),t.subtreeFlags&6&&(t.flags|=8192)):Ft(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function nF(e,t){switch(Bh(t),t.tag){case 1:return Wt(t.type)&&Us(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wi(),je(Gt),je(Pt),Gh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Hh(t),null;case 13:if(je(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Ke),null;case 4:return wi(),null;case 10:return Ih(t.type._context),null;case 22:case 23:return e0(),null;case 24:return null;default:return null}}var Zl=!1,$t=!1,rF=typeof WeakSet=="function"?WeakSet:Set,oe=null;function ni(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 xp(e,t,n){try{n()}catch(r){Je(e,t,r)}}var Gm=!1;function oF(e,t){if(op=js,e=Nw(),Th(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,f=e,p=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(l=a+o),f!==i||r!==0&&f.nodeType!==3||(s=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=a),p===i&&++c===r&&(s=a),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ip={focusedElem:e,selectionRange:n},js=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,C=g.memoizedState,m=t.stateNode,v=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:yn(t.type,y),C);m.__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(H(163))}}catch(F){Je(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return g=Gm,Gm=!1,g}function ka(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&&xp(t,n,i)}o=o.next}while(o!==r)}}function Vu(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 Cp(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 Bx(e){var t=e.alternate;t!==null&&(e.alternate=null,Bx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dn],delete t[Va],delete t[sp],delete t[z3],delete t[j3])),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 Mx(e){return e.tag===5||e.tag===3||e.tag===4}function Wm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mx(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 Sp(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=Ws));else if(r!==4&&(e=e.child,e!==null))for(Sp(e,t,n),e=e.sibling;e!==null;)Sp(e,t,n),e=e.sibling}function Ep(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(Ep(e,t,n),e=e.sibling;e!==null;)Ep(e,t,n),e=e.sibling}var mt=null,bn=!1;function or(e,t,n){for(n=n.child;n!==null;)Rx(e,t,n),n=n.sibling}function Rx(e,t,n){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Iu,n)}catch(l){}switch(n.tag){case 5:$t||ni(n,t);case 6:var r=mt,o=bn;mt=null,or(e,t,n),mt=r,bn=o,mt!==null&&(bn?(e=mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):mt.removeChild(n.stateNode));break;case 18:mt!==null&&(bn?(e=mt,n=n.stateNode,e.nodeType===8?Ef(e.parentNode,n):e.nodeType===1&&Ef(e,n),ja(e)):Ef(mt,n.stateNode));break;case 4:r=mt,o=bn,mt=n.stateNode.containerInfo,bn=!0,or(e,t,n),mt=r,bn=o;break;case 0:case 11:case 14:case 15:if(!$t&&(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)&&xp(n,t,a),o=o.next}while(o!==r)}or(e,t,n);break;case 1:if(!$t&&(ni(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)}or(e,t,n);break;case 21:or(e,t,n);break;case 22:n.mode&1?($t=(r=$t)||n.memoizedState!==null,or(e,t,n),$t=r):or(e,t,n);break;default:or(e,t,n)}}function Um(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rF),t.forEach(function(r){var o=pF.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function vn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*aF(r/1960))-r,10e?16:e,gr===null)var r=!1;else{if(e=gr,gr=null,ru=0,$e&6)throw Error(H(331));var o=$e;for($e|=4,oe=e.current;oe!==null;){var i=oe,a=i.child;if(oe.flags&16){var l=i.deletions;if(l!==null){for(var s=0;sQe()-Qh?Qr(e,0):Jh|=n),Ut(e,t)}function Wx(e,t){t===0&&(e.mode&1?(t=Wl,Wl<<=1,!(Wl&130023424)&&(Wl=4194304)):t=1);var n=Bt();e=Yn(e,t),e!==null&&(ul(e,t,n),Ut(e,n))}function dF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wx(e,n)}function pF(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(H(314))}r!==null&&r.delete(t),Wx(e,n)}var Ux;Ux=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Gt.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,eF(e,t,n);jt=!!(e.flags&131072)}else jt=!1,Ge&&t.flags&1048576&&Yw(t,Ys,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;As(e,t),e=t.pendingProps;var o=vi(t,Pt.current);ci(t,n),o=Uh(null,t,r,e,o,n);var i=Vh();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,Wt(r)?(i=!0,Vs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zh(t),o.updater=Wu,t.stateNode=o,o._reactInternals=t,hp(t,r,e,n),t=vp(null,t,r,!0,i,n)):(t.tag=0,Ge&&i&&Oh(t),Tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(As(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=gF(r),e=yn(r,e),o){case 0:t=mp(null,t,r,e,n);break e;case 1:t=zm(null,t,r,e,n);break e;case 11:t=Im(null,t,r,e,n);break e;case 14:t=Lm(null,t,r,yn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),mp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),zm(e,t,r,o,n);case 3:e:{if($x(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Qw(e,t),Js(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=xi(Error(H(423)),t),t=jm(e,t,r,n,o);break e}else if(r!==o){o=xi(Error(H(424)),t),t=jm(e,t,r,n,o);break e}else for(qt=wr(t.stateNode.containerInfo.firstChild),Qt=t,Ge=!0,wn=null,n=nx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yi(),r===o){t=Xn(e,t,n);break e}Tt(e,t,r,n)}t=t.child}return t;case 5:return rx(t),e===null&&fp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,ap(r,o)?a=null:i!==null&&ap(r,i)&&(t.flags|=32),Ax(e,t),Tt(e,t,a,n),t.child;case 6:return e===null&&fp(t),null;case 13:return _x(e,t,n);case 4:return jh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bi(t,null,r,n):Tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),Im(e,t,r,o,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(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,Ne(Xs,r._currentValue),r._currentValue=a,i!==null)if(En(i.value,a)){if(i.children===o.children&&!Gt.current){t=Xn(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=Un(-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),dp(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(H(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),dp(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}Tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ci(t,n),o=fn(o),r=r(o),t.flags|=1,Tt(e,t,r,n),t.child;case 14:return r=t.type,o=yn(r,t.pendingProps),o=yn(r.type,o),Lm(e,t,r,o,n);case 15:return Fx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:yn(r,o),As(e,t),t.tag=1,Wt(r)?(e=!0,Vs(t)):e=!1,ci(t,n),ex(t,r,o),hp(t,r,o,n),vp(null,t,r,!0,e,n);case 19:return Dx(e,t,n);case 22:return kx(e,t,n)}throw Error(H(156,t.tag))};function Vx(e,t){return yw(e,t)}function hF(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 un(e,t,n,r){return new hF(e,t,n,r)}function n0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gF(e){if(typeof e=="function")return n0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xh)return 11;if(e===Ch)return 14}return 2}function Er(e,t){var n=e.alternate;return n===null?(n=un(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 Ds(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")n0(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ko:return Zr(n.children,o,i,t);case wh:a=8,o|=8;break;case Id:return e=un(12,n,t,o|2),e.elementType=Id,e.lanes=i,e;case Ld:return e=un(13,n,t,o),e.elementType=Ld,e.lanes=i,e;case zd:return e=un(19,n,t,o),e.elementType=zd,e.lanes=i,e;case tw:return Yu(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zb:a=10;break e;case ew:a=9;break e;case xh:a=11;break e;case Ch:a=14;break e;case sr:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=un(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zr(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Yu(e,t,n,r){return e=un(22,e,r,t),e.elementType=tw,e.lanes=n,e.stateNode={isHidden:!1},e}function Tf(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function Of(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mF(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=pf(0),this.expirationTimes=pf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pf(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function r0(e,t,n,r,o,i,a,l,s){return e=new mF(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=un(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zh(i),e}function vF(e,t,n){var r=3Qx;/*! * 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 Of=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Bf(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Qx(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 CF(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i=0&&He.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&He.splice(0,He.length),(t===93||t===224)&&(t=91),t in vt){vt[t]=!1;for(var r in ao)ao[r]===t&&(xn[r]=!1)}}function $F(e){if(!e)Object.keys(ct).forEach(function(a){return delete ct[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&Mf(a)});else if(typeof e=="object")e.key&&Mf(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?Qx(ao,u):[];ct[p]=ct[p].map(function(m){var y=o?m.method===o:!0;return y&&m.scope===r&&CF(m.mods,h)?{}:m})}})};function t1(e,t,n){var r;if(t.scope===n||t.scope==="all"){r=t.mods.length>0;for(var o in vt)Object.prototype.hasOwnProperty.call(vt,o)&&(!vt[o]&&t.mods.indexOf(+o)>-1||vt[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!vt[16]&&!vt[18]&&!vt[17]&&!vt[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 n1(e){var t=ct["*"],n=e.keyCode||e.which||e.charCode;if(xn.filter.call(this,e)){if((n===93||n===224)&&(n=91),He.indexOf(n)===-1&&n!==229&&He.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var m=e1[h];e[h]&&He.indexOf(m)===-1?He.push(m):!e[h]&&He.indexOf(m)>-1?He.splice(He.indexOf(m),1):h==="metaKey"&&e[h]&&He.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(He=He.slice(He.indexOf(m))))}),n in vt){vt[n]=!0;for(var r in ao)ao[r]===n&&(xn[r]=!0);if(!t)return}for(var o in vt)Object.prototype.hasOwnProperty.call(vt,o)&&(vt[o]=e[e1[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(He.indexOf(17)===-1&&He.push(17),He.indexOf(18)===-1&&He.push(18),vt[17]=!0,vt[18]=!0);var i=Za();if(t)for(var a=0;a-1}function xn(e,t,n){He=[];var r=Zx(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=Qx(ao,e)),e=e[e.length-1],e=e==="*"?"*":Qu(e),e in ct||(ct[e]=[]),ct[e].push({keyup:s,keydown:u,scope:i,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:c});typeof a!="undefined"&&!_F(a)&&window&&(n2.push(a),Bf(a,"keydown",function(f){n1(f)}),Bf(window,"focus",function(){He=[]}),Bf(a,"keyup",function(f){n1(f),AF(f)}))}var Rf={setScope:r2,getScope:Za,deleteScope:kF,getPressedKeyCodes:SF,isPressed:FF,filter:EF,unbind:$F};for(var Nf in Rf)Object.prototype.hasOwnProperty.call(Rf,Nf)&&(xn[Nf]=Rf[Nf]);if(typeof window!="undefined"){var DF=window.hotkeys;xn.noConflict=function(e){return e&&window.hotkeys===xn&&(window.hotkeys=DF),xn},window.hotkeys=xn}xn.filter=function(){return!0};var o2=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},PF=function(t){return o2(t,["INPUT","TEXTAREA","SELECT"])};function ri(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,f=o.enabled,p=f===void 0?!0:f,h=o.enableOnContentEditable,m=h===void 0?!1:h,y=w.useRef(null),C=w.useCallback(function(g,v){var b;return a&&!a(g)?!c:PF(g)&&!o2(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 w.useEffect(function(){if(p)return l&&s!==!0&&(n.keydown=!1),xn(e,n||{},C),function(){return xn.unbind(e,C)}},[C,n,e,p]),y}const ns=new Map,Kr={_deps:{}};function TF(e){for(const t in e)Object.defineProperty(Kr,t,{get(){const n=xe[t];return Kr._deps[t]=n,n}})}function OF(e){const t=Kr._deps;Kr._deps={};const n=e(Kr),r=Kr._deps;return Kr._deps=t,[n,r]}function BF(e){const t={};let n=!1;for(const r in e){const o=xe[r];e[r]!==o&&(n=!0),t[r]=o}return[t,n]}function Hr(e){const t=e.toString();if(ns.has(t)){const[o,i]=ns.get(t),[a,l]=BF(i);if(!l)return o;const s=e(a,[o,i]);return ns.set(t,[s,a]),s}const[n,r]=OF(e);return ns.set(t,[n,r]),n}function MF(e){const t={};for(const n in e){const r=e[n];Object.defineProperty(t,n,{get(){return r()[0]}})}return TF(e),t}function RF(e){const t={};for(const n in e){const r=e[n],o=()=>r()[0],i=d(o,{});i.toString=o,t[n]=i}return t}const i2=e=>e.map(({dims:t,label:n})=>({label:`${n} (${t.join(" x ")})`,value:t.join(),dims:t})),NF=i2([{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"}]),IF=i2([{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"}]),Yr=new Map,r1=new Map,If={},ha={};function pr(e,t){const n=If.hasOwnProperty(e),r=n?If[e]:()=>Yr.has(e)?Yr.get(e):(Yr.set(e,t),ha[e]=new Set,r1.set(e,a=>{const l=typeof a=="function"?a(Yr.get(e)):a;Yr.set(e,l);for(const s of ha[e].values())s(l)}),t);n||(If[e]=r);const[o,i]=w.useState(r);return w.useInsertionEffect(()=>(ha[e].add(i),()=>{ha[e].delete(i)}),[]),[o,r1.get(e)]}const o1=new Set;function LF(e){return Yr.get(e)}function zF(e,t){o1.has(e)||(t(Yr.get(e)),ha[e].add(t),o1.add(e))}let a2={};function jF(e){a2=e}const HF=()=>{const{fetchThemes:e,uploadTheme:t,deleteTheme:n}=a2,[r,o]=pr("serverThemes",[]),[i,a]=pr("serverThemesLoading",!0),[l,s]=pr("serverThemesDirty",!1);return zF("serverThemesDirty",()=>{tt(Be,null,function*(){const c=yield e();o(V({default:{scopes:{}}},c)),a(!1)})}),[r,{serverThemes:r,serverThemesLoading:i,uploadTheme:(u,c)=>tt(Be,null,function*(){a(!0),yield t(u,{name:u,scopes:c}),s(!l)}),deleteTheme:u=>tt(Be,null,function*(){a(!0),yield n(u),s(!l)})}]};function GF(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 WF=l2;function l2(e,t,n){e instanceof RegExp&&(e=i1(e,n)),t instanceof RegExp&&(t=i1(t,n));const r=s2(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 i1(e,t){const n=t.match(e);return n?n[0]:null}l2.range=s2;function s2(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 UF=po(WF);function $p(e){let t;try{t=UF("(",")",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=$p(t.body);if(n)return{pre:t.pre+"("+n.pre,body:n.body,post:n.post+")"+t.post};const r=$p(t.post);if(r)return{pre:t.pre+"("+t.body+")"+r.pre,body:r.body,post:r.post}}const s0=/:(active|focus(-(visible|within))?|visited|hover|disabled|:[\w-]+)/g,u2=/:not\([\s,\*]*\)/g;function VF(e){return e===""||e==="*"||e===":root"?"*":`${e}, :where(${e}) *`.replace("\\\\","\\")}let Ds;function KF(e,t){if(typeof t.matches!="function")return!1;const n=e.statelessSelector;if(Ds.has(n))return Ds.get(n);try{const r=t.matches(n);return Ds.set(n,r),r}catch(r){return console.log("Failed testing a selector",e),!1}}const Lf=new WeakMap,c2=({cssVars:e,target:t})=>{if(Lf.has(t))return Lf.get(t);Ds=new Map;let n;try{n=e.filter(r=>KF(r,t))}catch(r){console.log(t,r),n=[]}return Lf.set(t,n),n},u0=({href:e})=>!e||e.indexOf(window.location.origin)===0,_a={},YF=e=>e.map(t=>XF(t)),a1=[],XF=e=>tt(Be,null,function*(){if(!a1.includes(e)){if(!_a[e]){const t=e.split("?")[0]+".map";try{let n=yield(yield fetch(t)).json();_a[e]=yield new window.sourceMap.SourceMapConsumer(n)}catch(n){a1.push(e);return}}return _a[e]}}),qF=(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 f of u){const p=a+1;if(!/^[\w-]/.test(f))return r.push(ae(V({},t.originalPositionFor({line:p,column:c})),{generated:{line:p,column:c,sheet:n}})),r;c+=l.length+f.length}return r},Da={},JF=e=>tt(Be,null,function*(){if(!(e in Da)){const t=yield(yield fetch(e)).text();Da[e]=t.split(` -`).reduce((n,r,o)=>(r.includes("var(")&&n.push({text:r,index:o}),n),[])}return Da[e]}),QF=e=>e.map(t=>JF(t)),ZF=(e,t,n)=>{if(!e)return[];const r=Da[e];return r?r.reduce(qF(t,n,e),[]):(console.warn("no lines",e,Object.keys(Da)),[])},e4=(e,t)=>tt(Be,null,function*(){let n;if(u0(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)=>_p(r,o,t),yield e)}),t4=(e,t)=>e.some(({usages:n})=>n.some(r=>r.sheet===t.href)),n4=(e,t)=>tt(Be,null,function*(){const r=t.filter(i=>i.href&&t4(e,i)&&u0(i)).map(i=>[...YF([i.href]),...QF([i.href])]);if(r.length===0)return yield Promise.allSettled([]);const o=r.reduce((i,a)=>[...i,...a],[]);return yield Promise.allSettled(o)});let l1=[];function iu(e){const t=e.replaceAll(s0,"").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(/:(where|is|not)\([\s,]*\)/g,"").replace(/^(\s*,\s*)+/,"").replace(/(\s*,\s*)+$/,"").replaceAll(/\s*,\s*/g,",").replaceAll(/,\s*\)/g,")");return VF(t)}const r4=()=>tt(Be,null,function*(){const e=performance.now(),t=[...document.styleSheets].filter(l=>{var s;return((s=l.ownerNode)==null?void 0:s.id)!==jg}),n=yield t.reduce(e4,{});l1=Object.keys(pt).filter(l=>document.querySelectorAll(l).length>0),l1.filter(l=>document.querySelector(l)===document.documentElement);const r=Object.entries(n).map(([l,s])=>ae(V({name:l},s),{statelessSelector:[...new Set(s.usages.map(u=>u.statelessSelector))].join()}));yield n4(r,t);const o=r.map(l=>{const{name:s,usages:u}=l,f=[...new Set(u.filter(p=>p.sheet).map(p=>p.sheet))].reduce((p,h)=>{const m=_a[h];if(!m)return p;const y=ZF(h,s,m);return p.push(...y),p},[]);return l.usages=l.usages.map((p,h)=>(p.position=f[h],p)),l.positions=f,l}),i=yield Promise.allSettled(o);Object.values(_a).forEach(l=>l&&l.destroy());const a=performance.now()-e;return console.info(`Extracted data in ${a}ms`),yield i.filter(o4).map(l=>l.value)}),o4=e=>e.status==="fulfilled",Zu="theme-editor-highlight",el=e=>!!e&&e.classList.add(Zu),fi=e=>!!e&&e.classList.remove(Zu);function i4(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=a4(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 a4(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 pt={":root":{},":where(html)":{}},di={},_p=(e,t,n,r=null,o=null)=>{if(t.type===1){const i=[],a=t.selectorText;if(a===`.${Zu}`)return e;for(let l of t.style){const s=l.startsWith("--"),c=t.style.getPropertyValue(l)==="";let f=t.style.getPropertyValue(l).trim();if(s){pt[a]||(pt[a]={}),(!r||!/prefers\-color\-scheme\: ?dark/.test(r))&&(pt[a][l]=f,di[l]||(di[l]={}),di[l][a]=f);continue}let p,h=!0,m=0;if(c){const[v,b]=i4(l,t);if(i.includes(v)||b===""||b===void 0)continue;i.push(v),f=b,l=v}const y=f,C=t.style.getPropertyPriority(l)==="important";for(;p=$p(f);){const v=p.body.split(",").map(L=>L.trim()),b=h&&p.pre.trim()===""&&p.post.replace(/\s*\!important$/,"")==="",_=/^\s*\)\s*/.test(p.post)&&/\w+(-\w+)*\(\s*$/.test(p.pre)?p.pre.match(/(\w+(-\w+)*)\(\s*$/)[1]:null;h=!1;const[A,...D]=v,O=D.join(","),T={selector:a,statelessSelector:iu(a),property:l,defaultValue:O,media:r,supports:o,sheet:n.href,isFullProperty:b,fullValue:y,isImportant:C,index:m,cssFunc:_};m++,e.hasOwnProperty(A)||(e[A]={properties:{},usages:[],statelessSelector:null,cssFunc:_}),e[A].usages.push(T),e[A].cssFunc=e[A].cssFunc||_,e[A].properties[l]={isFullProperty:b,fullValue:y,isImportant:C},f=(p.pre||"")+p.body.replace(A,"")+(p.post||"")}const g=(f==null?void 0:f.trim())||"";g!==""&&!g.startsWith(",")&&(y in e||(e[y]={isRawValue:!0,properties:{},usages:[],statelessSelector:null}),e[y].usages.push({selector:a,statelessSelector:iu(a),property:l,defaultValue:y,media:r,supports:o,sheet:n.href,isFullProperty:!0,fullValue:y,isImportant:C,index:m}),e[y].properties[l]={isFullProperty:!0,fullValue:y,isImportant:C})}}return t.type===4&&[...t.cssRules].forEach(i=>_p(e,i,n,t.conditionText,o)),t.type===12&&[...t.cssRules].forEach(i=>_p(e,i,n,r,t.conditionText)),e},l4={scopes:{}},Lt=":root",Me={set:(e,{name:t,value:n,scope:r=Lt})=>{const{scopes:o}=e;if(t==="")return e;const i=mn(o,[]);return i[r]=ae(V({},o[r]||{}),{[t]:n}),ae(V({},e),{scopes:i})},unset:(e,{name:t,scope:n=Lt})=>{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,[af(t)]);return ae(V({},e),{scopes:ae(V({},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(pt).some(u)||Object.values(e.scopes).some(u)};i=`--${n.replaceAll(" ","-")}`;let f=0;for(;c();)f++,i=`--${n.replaceAll(" ","-")}-${f}`;t.generatedName=i}const a=`var(${i})`,l={};let s=!1;for(const u of Object.keys(pt))for(const[c,f]of Object.entries(pt[u]))f===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 f in c){const p=c[f]===r;l[u][f]=p?a:c[f]}u===Lt&&(l[u][i]=r,s=!0)}return s||(l[Lt]||(l[Lt]={}),l[Lt][i]=r),ae(V({},e),{scopes:l})},loadTheme:(e,{theme:t={}})=>{const n="scopes"in t;return ae(V({},e),{scopes:n?t.scopes:{[Lt]:t}})}},s4=GF(Me);function u4(){return $S(s4,l4,null,"themeEditor")}function gn(){return yg("themeEditor")}var sn={},pl={},c4=typeof Nl=="object"&&Nl&&Nl.Object===Object&&Nl,f2=c4,f4=f2,d4=typeof self=="object"&&self&&self.Object===Object&&self,p4=f4||d4||Function("return this")(),Nn=p4,h4=Nn,g4=h4.Symbol,hl=g4,s1=hl,d2=Object.prototype,m4=d2.hasOwnProperty,v4=d2.toString,ta=s1?s1.toStringTag:void 0;function y4(e){var t=m4.call(e,ta),n=e[ta];try{e[ta]=void 0;var r=!0}catch(i){}var o=v4.call(e);return r&&(t?e[ta]=n:delete e[ta]),o}var b4=y4,w4=Object.prototype,x4=w4.toString;function C4(e){return x4.call(e)}var S4=C4,u1=hl,E4=b4,F4=S4,k4="[object Null]",A4="[object Undefined]",c1=u1?u1.toStringTag:void 0;function $4(e){return e==null?e===void 0?A4:k4:c1&&c1 in Object(e)?E4(e):F4(e)}var mo=$4,_4=Array.isArray,Fn=_4;function D4(e){return e!=null&&typeof e=="object"}var Qn=D4,P4=mo,T4=Fn,O4=Qn,B4="[object String]";function M4(e){return typeof e=="string"||!T4(e)&&O4(e)&&P4(e)==B4}var R4=M4;function N4(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 I4=N4,L4=I4,z4=L4(),j4=z4;function H4(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=o6}var f0=i6,a6=mo,l6=f0,s6=Qn,u6="[object Arguments]",c6="[object Array]",f6="[object Boolean]",d6="[object Date]",p6="[object Error]",h6="[object Function]",g6="[object Map]",m6="[object Number]",v6="[object Object]",y6="[object RegExp]",b6="[object Set]",w6="[object String]",x6="[object WeakMap]",C6="[object ArrayBuffer]",S6="[object DataView]",E6="[object Float32Array]",F6="[object Float64Array]",k6="[object Int8Array]",A6="[object Int16Array]",$6="[object Int32Array]",_6="[object Uint8Array]",D6="[object Uint8ClampedArray]",P6="[object Uint16Array]",T6="[object Uint32Array]",Le={};Le[E6]=Le[F6]=Le[k6]=Le[A6]=Le[$6]=Le[_6]=Le[D6]=Le[P6]=Le[T6]=!0;Le[u6]=Le[c6]=Le[C6]=Le[f6]=Le[S6]=Le[d6]=Le[p6]=Le[h6]=Le[g6]=Le[m6]=Le[v6]=Le[y6]=Le[b6]=Le[w6]=Le[x6]=!1;function O6(e){return s6(e)&&l6(e.length)&&!!Le[a6(e)]}var B6=O6;function M6(e){return function(t){return e(t)}}var d0=M6,lu={exports:{}};lu.exports;(function(e,t){var n=f2,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})(lu,lu.exports);var p0=lu.exports,R6=B6,N6=d0,d1=p0,p1=d1&&d1.isTypedArray,I6=p1?N6(p1):R6,m2=I6,L6=G4,z6=h2,j6=Fn,H6=c0,G6=g2,W6=m2,U6=Object.prototype,V6=U6.hasOwnProperty;function K6(e,t){var n=j6(e),r=!n&&z6(e),o=!n&&!r&&H6(e),i=!n&&!r&&!o&&W6(e),a=n||r||o||i,l=a?L6(e.length,String):[],s=l.length;for(var u in e)(t||V6.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||G6(u,s)))&&l.push(u);return l}var v2=K6,Y6=Object.prototype;function X6(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Y6;return e===n}var h0=X6;function q6(e,t){return function(n){return e(t(n))}}var y2=q6,J6=y2,Q6=J6(Object.keys,Object),Z6=Q6,ek=h0,tk=Z6,nk=Object.prototype,rk=nk.hasOwnProperty;function ok(e){if(!ek(e))return tk(e);var t=[];for(var n in Object(e))rk.call(e,n)&&n!="constructor"&&t.push(n);return t}var ik=ok;function ak(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ti=ak,lk=mo,sk=Ti,uk="[object AsyncFunction]",ck="[object Function]",fk="[object GeneratorFunction]",dk="[object Proxy]";function pk(e){if(!sk(e))return!1;var t=lk(e);return t==ck||t==fk||t==uk||t==dk}var b2=pk,hk=b2,gk=f0;function mk(e){return e!=null&&gk(e.length)&&!hk(e)}var ec=mk,vk=v2,yk=ik,bk=ec;function wk(e){return bk(e)?vk(e):yk(e)}var gl=wk,xk=j4,Ck=gl;function Sk(e,t){return e&&xk(e,t,Ck)}var w2=Sk;function Ek(e){return e}var x2=Ek,Fk=x2;function kk(e){return typeof e=="function"?e:Fk}var Ak=kk,$k=w2,_k=Ak;function Dk(e,t){return e&&$k(e,_k(t))}var g0=Dk,Pk=y2,Tk=Pk(Object.getPrototypeOf,Object),m0=Tk,Ok=mo,Bk=m0,Mk=Qn,Rk="[object Object]",Nk=Function.prototype,Ik=Object.prototype,C2=Nk.toString,Lk=Ik.hasOwnProperty,zk=C2.call(Object);function jk(e){if(!Mk(e)||Ok(e)!=Rk)return!1;var t=Bk(e);if(t===null)return!0;var n=Lk.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&C2.call(n)==zk}var Hk=jk;function Gk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var i8=o8,a8=tc;function l8(e,t){var n=this.__data__,r=a8(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var s8=l8,u8=Uk,c8=Zk,f8=n8,d8=i8,p8=s8;function Oi(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 f=-1,p=!0,h=n&FA?new xA:void 0;for(i.set(e,t),i.set(t,e);++f0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,gD.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,pD.default)(r)?(0,fD.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,uD.default)(r)&&n.push(r)}),n};pl.default=mD;var ml={};function vD(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,NO.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,MO.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=IO({},r[l],i[l])}),o}),r};ml.default=LO;var vl={};Object.defineProperty(vl,"__esModule",{value:!0});vl.autoprefix=void 0;var zO=g0,K1=HO(zO),jO=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){XO(o,r);function o(){var i,a,l,s;YO(this,o);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){tB(o,r);function o(){var i,a,l,s;eB(this,o);for(var u=arguments.length,c=Array(u),f=0;f1&&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};A0.default=rB;Object.defineProperty(sn,"__esModule",{value:!0});sn.ReactCSS=sn.loop=sn.handleActive=$0=sn.handleHover=sn.hover=void 0;var oB=pl,iB=Ii(oB),aB=ml,lB=Ii(aB),sB=vl,uB=Ii(sB),cB=yl,K2=Ii(cB),fB=bl,dB=Ii(fB),pB=A0,hB=Ii(pB);function Ii(e){return e&&e.__esModule?e:{default:e}}sn.hover=K2.default;var $0=sn.handleHover=K2.default;sn.handleActive=dB.default;sn.loop=hB.default;var gB=sn.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;ol?p=1:p=Math.round(f*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},Uf={},vB=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},yB=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Uf[i])return Uf[i];var a=vB(t,n,r,o);return Uf[i]=a,a},q1=Object.assign||function(e){for(var t=1;t0:!1;function Mf(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function Zx(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 SF(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,i=0;i=0&&He.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&He.splice(0,He.length),(t===93||t===224)&&(t=91),t in vt){vt[t]=!1;for(var r in ao)ao[r]===t&&(xn[r]=!1)}}function _F(e){if(!e)Object.keys(ct).forEach(function(a){return delete ct[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&Rf(a)});else if(typeof e=="object")e.key&&Rf(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?Zx(ao,u):[];ct[p]=ct[p].map(function(g){var y=o?g.method===o:!0;return y&&g.scope===r&&SF(g.mods,h)?{}:g})}})};function t1(e,t,n){var r;if(t.scope===n||t.scope==="all"){r=t.mods.length>0;for(var o in vt)Object.prototype.hasOwnProperty.call(vt,o)&&(!vt[o]&&t.mods.indexOf(+o)>-1||vt[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!vt[16]&&!vt[18]&&!vt[17]&&!vt[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 n1(e){var t=ct["*"],n=e.keyCode||e.which||e.charCode;if(xn.filter.call(this,e)){if((n===93||n===224)&&(n=91),He.indexOf(n)===-1&&n!==229&&He.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(h){var g=e1[h];e[h]&&He.indexOf(g)===-1?He.push(g):!e[h]&&He.indexOf(g)>-1?He.splice(He.indexOf(g),1):h==="metaKey"&&e[h]&&He.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(He=He.slice(He.indexOf(g))))}),n in vt){vt[n]=!0;for(var r in ao)ao[r]===n&&(xn[r]=!0);if(!t)return}for(var o in vt)Object.prototype.hasOwnProperty.call(vt,o)&&(vt[o]=e[e1[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(He.indexOf(17)===-1&&He.push(17),He.indexOf(18)===-1&&He.push(18),vt[17]=!0,vt[18]=!0);var i=Za();if(t)for(var a=0;a-1}function xn(e,t,n){He=[];var r=e2(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=Zx(ao,e)),e=e[e.length-1],e=e==="*"?"*":Zu(e),e in ct||(ct[e]=[]),ct[e].push({keyup:s,keydown:u,scope:i,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:c});typeof a!="undefined"&&!DF(a)&&window&&(r2.push(a),Mf(a,"keydown",function(f){n1(f)}),Mf(window,"focus",function(){He=[]}),Mf(a,"keyup",function(f){n1(f),$F(f)}))}var Nf={setScope:o2,getScope:Za,deleteScope:AF,getPressedKeyCodes:EF,isPressed:kF,filter:FF,unbind:_F};for(var If in Nf)Object.prototype.hasOwnProperty.call(Nf,If)&&(xn[If]=Nf[If]);if(typeof window!="undefined"){var PF=window.hotkeys;xn.noConflict=function(e){return e&&window.hotkeys===xn&&(window.hotkeys=PF),xn},window.hotkeys=xn}xn.filter=function(){return!0};var i2=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},TF=function(t){return i2(t,["INPUT","TEXTAREA","SELECT"])};function oi(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,f=o.enabled,p=f===void 0?!0:f,h=o.enableOnContentEditable,g=h===void 0?!1:h,y=w.useRef(null),C=w.useCallback(function(m,v){var b;return a&&!a(m)?!c:TF(m)&&!i2(m,i)||(b=m.target)!=null&&b.isContentEditable&&!g?!0:y.current===null||document.activeElement===y.current?(t(m,v),!0):!1},r?[y,i,a].concat(r):[y,i,a]);return w.useEffect(function(){if(p)return l&&s!==!0&&(n.keydown=!1),xn(e,n||{},C),function(){return xn.unbind(e,C)}},[C,n,e,p]),y}const rs=new Map,Kr={_deps:{}};function OF(e){for(const t in e)Object.defineProperty(Kr,t,{get(){const n=xe[t];return Kr._deps[t]=n,n}})}function BF(e){const t=Kr._deps;Kr._deps={};const n=e(Kr),r=Kr._deps;return Kr._deps=t,[n,r]}function MF(e){const t={};let n=!1;for(const r in e){const o=xe[r];e[r]!==o&&(n=!0),t[r]=o}return[t,n]}function Hr(e){const t=e.toString();if(rs.has(t)){const[o,i]=rs.get(t),[a,l]=MF(i);if(!l)return o;const s=e(a,[o,i]);return rs.set(t,[s,a]),s}const[n,r]=BF(e);return rs.set(t,[n,r]),n}function RF(e){const t={};for(const n in e){const r=e[n];Object.defineProperty(t,n,{get(){return r()[0]}})}return OF(e),t}function NF(e){const t={};for(const n in e){const r=e[n],o=()=>r()[0],i=d(o,{});i.toString=o,t[n]=i}return t}const a2=e=>e.map(({dims:t,label:n})=>({label:`${n} (${t.join(" x ")})`,value:t.join(),dims:t})),IF=a2([{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"}]),LF=a2([{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"}]),Yr=new Map,r1=new Map,Lf={},ha={};function pr(e,t){const n=Lf.hasOwnProperty(e),r=n?Lf[e]:()=>Yr.has(e)?Yr.get(e):(Yr.set(e,t),ha[e]=new Set,r1.set(e,a=>{const l=typeof a=="function"?a(Yr.get(e)):a;Yr.set(e,l);for(const s of ha[e].values())s(l)}),t);n||(Lf[e]=r);const[o,i]=w.useState(r);return w.useInsertionEffect(()=>(ha[e].add(i),()=>{ha[e].delete(i)}),[]),[o,r1.get(e)]}const o1=new Set;function zF(e){return Yr.get(e)}function jF(e,t){o1.has(e)||(t(Yr.get(e)),ha[e].add(t),o1.add(e))}let l2={};function HF(e){l2=e}const GF=()=>{const{fetchThemes:e,uploadTheme:t,deleteTheme:n}=l2,[r,o]=pr("serverThemes",[]),[i,a]=pr("serverThemesLoading",!0),[l,s]=pr("serverThemesDirty",!1);return jF("serverThemesDirty",()=>{tt(Be,null,function*(){const c=yield e();o(V({default:{scopes:{}}},c)),a(!1)})}),[r,{serverThemes:r,serverThemesLoading:i,uploadTheme:(u,c)=>tt(Be,null,function*(){a(!0),yield t(u,{name:u,scopes:c}),s(!l)}),deleteTheme:u=>tt(Be,null,function*(){a(!0),yield n(u),s(!l)})}]};function WF(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 UF=s2;function s2(e,t,n){e instanceof RegExp&&(e=i1(e,n)),t instanceof RegExp&&(t=i1(t,n));const r=u2(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 i1(e,t){const n=t.match(e);return n?n[0]:null}s2.range=u2;function u2(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 VF=ho(UF);function _p(e){let t;try{t=VF("(",")",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=_p(t.body);if(n)return{pre:t.pre+"("+n.pre,body:n.body,post:n.post+")"+t.post};const r=_p(t.post);if(r)return{pre:t.pre+"("+t.body+")"+r.pre,body:r.body,post:r.post}}const u0=/:(active|focus(-(visible|within))?|visited|hover|disabled|:[\w-]+)/g,c2=/:not\([\s,\*]*\)/g;function KF(e){return e===""||e==="*"||e===":root"?"*":`${e}, :where(${e}) *`.replace("\\\\","\\")}let Ps;function YF(e,t){if(typeof t.matches!="function")return!1;const n=e.statelessSelector;if(Ps.has(n))return Ps.get(n);try{const r=t.matches(n);return Ps.set(n,r),r}catch(r){return console.log("Failed testing a selector",e),!1}}const zf=new WeakMap,f2=({cssVars:e,target:t})=>{if(zf.has(t))return zf.get(t);Ps=new Map;let n;try{n=e.filter(r=>YF(r,t))}catch(r){console.log(t,r),n=[]}return zf.set(t,n),n},c0=({href:e})=>!e||e.indexOf(window.location.origin)===0,_a={},XF=e=>e.map(t=>qF(t)),a1=[],qF=e=>tt(Be,null,function*(){if(!a1.includes(e)){if(!_a[e]){const t=e.split("?")[0]+".map";try{let n=yield(yield fetch(t)).json();_a[e]=yield new window.sourceMap.SourceMapConsumer(n)}catch(n){a1.push(e);return}}return _a[e]}}),JF=(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 f of u){const p=a+1;if(!/^[\w-]/.test(f))return r.push(ae(V({},t.originalPositionFor({line:p,column:c})),{generated:{line:p,column:c,sheet:n}})),r;c+=l.length+f.length}return r},Da={},QF=e=>tt(Be,null,function*(){if(!(e in Da)){const t=yield(yield fetch(e)).text();Da[e]=t.split(` +`).reduce((n,r,o)=>(r.includes("var(")&&n.push({text:r,index:o}),n),[])}return Da[e]}),ZF=e=>e.map(t=>QF(t)),e4=(e,t,n)=>{if(!e)return[];const r=Da[e];return r?r.reduce(JF(t,n,e),[]):(console.warn("no lines",e,Object.keys(Da)),[])},t4=(e,t)=>tt(Be,null,function*(){let n;if(c0(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)=>Dp(r,o,t),yield e)}),n4=(e,t)=>e.some(({usages:n})=>n.some(r=>r.sheet===t.href)),r4=(e,t)=>tt(Be,null,function*(){const r=t.filter(i=>i.href&&n4(e,i)&&c0(i)).map(i=>[...XF([i.href]),...ZF([i.href])]);if(r.length===0)return yield Promise.allSettled([]);const o=r.reduce((i,a)=>[...i,...a],[]);return yield Promise.allSettled(o)});let l1=[];function au(e){const t=e.replaceAll(u0,"").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(/:(where|is|not)\([\s,]*\)/g,"").replace(/^(\s*,\s*)+/,"").replace(/(\s*,\s*)+$/,"").replaceAll(/\s*,\s*/g,",").replaceAll(/,\s*\)/g,")");return KF(t)}const o4=()=>tt(Be,null,function*(){const e=performance.now(),t=[...document.styleSheets].filter(l=>{var s;return((s=l.ownerNode)==null?void 0:s.id)!==jg}),n=yield t.reduce(t4,{});l1=Object.keys(pt).filter(l=>document.querySelectorAll(l).length>0),l1.filter(l=>document.querySelector(l)===document.documentElement);const r=Object.entries(n).map(([l,s])=>ae(V({name:l},s),{statelessSelector:[...new Set(s.usages.map(u=>u.statelessSelector))].join()}));yield r4(r,t);const o=r.map(l=>{const{name:s,usages:u}=l,f=[...new Set(u.filter(p=>p.sheet).map(p=>p.sheet))].reduce((p,h)=>{const g=_a[h];if(!g)return p;const y=e4(h,s,g);return p.push(...y),p},[]);return l.usages=l.usages.map((p,h)=>(p.position=f[h],p)),l.positions=f,l}),i=yield Promise.allSettled(o);Object.values(_a).forEach(l=>l&&l.destroy());const a=performance.now()-e;return console.info(`Extracted data in ${a}ms`),yield i.filter(i4).map(l=>l.value)}),i4=e=>e.status==="fulfilled",ec="theme-editor-highlight",el=e=>!!e&&e.classList.add(ec),di=e=>!!e&&e.classList.remove(ec);function a4(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=l4(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 l4(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 pt={":root":{},":where(html)":{}},pi={},Dp=(e,t,n,r=null,o=null)=>{if(t.type===1){const i=[],a=t.selectorText;if(a===`.${ec}`)return e;for(let l of t.style){const s=l.startsWith("--"),c=t.style.getPropertyValue(l)==="";let f=t.style.getPropertyValue(l).trim();if(s){pt[a]||(pt[a]={}),(!r||!/prefers\-color\-scheme\: ?dark/.test(r))&&(pt[a][l]=f,pi[l]||(pi[l]={}),pi[l][a]=f);continue}let p,h=!0,g=0;if(c){const[v,b]=a4(l,t);if(i.includes(v)||b===""||b===void 0)continue;i.push(v),f=b,l=v}const y=f,C=t.style.getPropertyPriority(l)==="important";for(;p=_p(f);){const v=p.body.split(",").map(L=>L.trim()),b=h&&p.pre.trim()===""&&p.post.replace(/\s*\!important$/,"")==="",_=/^\s*\)\s*/.test(p.post)&&/\w+(-\w+)*\(\s*$/.test(p.pre)?p.pre.match(/(\w+(-\w+)*)\(\s*$/)[1]:null;h=!1;const[A,...D]=v,O=D.join(","),T={selector:a,statelessSelector:au(a),property:l,defaultValue:O,media:r,supports:o,sheet:n.href,isFullProperty:b,fullValue:y,isImportant:C,index:g,cssFunc:_};g++,e.hasOwnProperty(A)||(e[A]={properties:{},usages:[],statelessSelector:null,cssFunc:_}),e[A].usages.push(T),e[A].cssFunc=e[A].cssFunc||_,e[A].properties[l]={isFullProperty:b,fullValue:y,isImportant:C},f=(p.pre||"")+p.body.replace(A,"")+(p.post||"")}const m=(f==null?void 0:f.trim())||"";m!==""&&!m.startsWith(",")&&(y in e||(e[y]={isRawValue:!0,properties:{},usages:[],statelessSelector:null}),e[y].usages.push({selector:a,statelessSelector:au(a),property:l,defaultValue:y,media:r,supports:o,sheet:n.href,isFullProperty:!0,fullValue:y,isImportant:C,index:g}),e[y].properties[l]={isFullProperty:!0,fullValue:y,isImportant:C})}}return t.type===4&&[...t.cssRules].forEach(i=>Dp(e,i,n,t.conditionText,o)),t.type===12&&[...t.cssRules].forEach(i=>Dp(e,i,n,r,t.conditionText)),e},s4={scopes:{}},Lt=":root",Me={set:(e,{name:t,value:n,scope:r=Lt})=>{const{scopes:o}=e;if(t==="")return e;const i=mn(o,[]);return i[r]=ae(V({},o[r]||{}),{[t]:n}),ae(V({},e),{scopes:i})},unset:(e,{name:t,scope:n=Lt})=>{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,[lf(t)]);return ae(V({},e),{scopes:ae(V({},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(pt).some(u)||Object.values(e.scopes).some(u)};i=`--${n.replaceAll(" ","-")}`;let f=0;for(;c();)f++,i=`--${n.replaceAll(" ","-")}-${f}`;t.generatedName=i}const a=`var(${i})`,l={};let s=!1;for(const u of Object.keys(pt))for(const[c,f]of Object.entries(pt[u]))f===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 f in c){const p=c[f]===r;l[u][f]=p?a:c[f]}u===Lt&&(l[u][i]=r,s=!0)}return s||(l[Lt]||(l[Lt]={}),l[Lt][i]=r),ae(V({},e),{scopes:l})},loadTheme:(e,{theme:t={}})=>{const n="scopes"in t;return ae(V({},e),{scopes:n?t.scopes:{[Lt]:t}})}},u4=WF(Me);function c4(){return _S(u4,s4,null,"themeEditor")}function gn(){return bg("themeEditor")}var sn={},pl={},f4=typeof Il=="object"&&Il&&Il.Object===Object&&Il,d2=f4,d4=d2,p4=typeof self=="object"&&self&&self.Object===Object&&self,h4=d4||p4||Function("return this")(),Nn=h4,g4=Nn,m4=g4.Symbol,hl=m4,s1=hl,p2=Object.prototype,v4=p2.hasOwnProperty,y4=p2.toString,ta=s1?s1.toStringTag:void 0;function b4(e){var t=v4.call(e,ta),n=e[ta];try{e[ta]=void 0;var r=!0}catch(i){}var o=y4.call(e);return r&&(t?e[ta]=n:delete e[ta]),o}var w4=b4,x4=Object.prototype,C4=x4.toString;function S4(e){return C4.call(e)}var E4=S4,u1=hl,F4=w4,k4=E4,A4="[object Null]",$4="[object Undefined]",c1=u1?u1.toStringTag:void 0;function _4(e){return e==null?e===void 0?$4:A4:c1&&c1 in Object(e)?F4(e):k4(e)}var vo=_4,D4=Array.isArray,Fn=D4;function P4(e){return e!=null&&typeof e=="object"}var Qn=P4,T4=vo,O4=Fn,B4=Qn,M4="[object String]";function R4(e){return typeof e=="string"||!O4(e)&&B4(e)&&T4(e)==M4}var N4=R4;function I4(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 L4=I4,z4=L4,j4=z4(),H4=j4;function G4(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=i6}var d0=a6,l6=vo,s6=d0,u6=Qn,c6="[object Arguments]",f6="[object Array]",d6="[object Boolean]",p6="[object Date]",h6="[object Error]",g6="[object Function]",m6="[object Map]",v6="[object Number]",y6="[object Object]",b6="[object RegExp]",w6="[object Set]",x6="[object String]",C6="[object WeakMap]",S6="[object ArrayBuffer]",E6="[object DataView]",F6="[object Float32Array]",k6="[object Float64Array]",A6="[object Int8Array]",$6="[object Int16Array]",_6="[object Int32Array]",D6="[object Uint8Array]",P6="[object Uint8ClampedArray]",T6="[object Uint16Array]",O6="[object Uint32Array]",Le={};Le[F6]=Le[k6]=Le[A6]=Le[$6]=Le[_6]=Le[D6]=Le[P6]=Le[T6]=Le[O6]=!0;Le[c6]=Le[f6]=Le[S6]=Le[d6]=Le[E6]=Le[p6]=Le[h6]=Le[g6]=Le[m6]=Le[v6]=Le[y6]=Le[b6]=Le[w6]=Le[x6]=Le[C6]=!1;function B6(e){return u6(e)&&s6(e.length)&&!!Le[l6(e)]}var M6=B6;function R6(e){return function(t){return e(t)}}var p0=R6,su={exports:{}};su.exports;(function(e,t){var n=d2,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})(su,su.exports);var h0=su.exports,N6=M6,I6=p0,d1=h0,p1=d1&&d1.isTypedArray,L6=p1?I6(p1):N6,v2=L6,z6=W4,j6=g2,H6=Fn,G6=f0,W6=m2,U6=v2,V6=Object.prototype,K6=V6.hasOwnProperty;function Y6(e,t){var n=H6(e),r=!n&&j6(e),o=!n&&!r&&G6(e),i=!n&&!r&&!o&&U6(e),a=n||r||o||i,l=a?z6(e.length,String):[],s=l.length;for(var u in e)(t||K6.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||W6(u,s)))&&l.push(u);return l}var y2=Y6,X6=Object.prototype;function q6(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||X6;return e===n}var g0=q6;function J6(e,t){return function(n){return e(t(n))}}var b2=J6,Q6=b2,Z6=Q6(Object.keys,Object),ek=Z6,tk=g0,nk=ek,rk=Object.prototype,ok=rk.hasOwnProperty;function ik(e){if(!tk(e))return nk(e);var t=[];for(var n in Object(e))ok.call(e,n)&&n!="constructor"&&t.push(n);return t}var ak=ik;function lk(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ti=lk,sk=vo,uk=Ti,ck="[object AsyncFunction]",fk="[object Function]",dk="[object GeneratorFunction]",pk="[object Proxy]";function hk(e){if(!uk(e))return!1;var t=sk(e);return t==fk||t==dk||t==ck||t==pk}var w2=hk,gk=w2,mk=d0;function vk(e){return e!=null&&mk(e.length)&&!gk(e)}var tc=vk,yk=y2,bk=ak,wk=tc;function xk(e){return wk(e)?yk(e):bk(e)}var gl=xk,Ck=H4,Sk=gl;function Ek(e,t){return e&&Ck(e,t,Sk)}var x2=Ek;function Fk(e){return e}var C2=Fk,kk=C2;function Ak(e){return typeof e=="function"?e:kk}var $k=Ak,_k=x2,Dk=$k;function Pk(e,t){return e&&_k(e,Dk(t))}var m0=Pk,Tk=b2,Ok=Tk(Object.getPrototypeOf,Object),v0=Ok,Bk=vo,Mk=v0,Rk=Qn,Nk="[object Object]",Ik=Function.prototype,Lk=Object.prototype,S2=Ik.toString,zk=Lk.hasOwnProperty,jk=S2.call(Object);function Hk(e){if(!Rk(e)||Bk(e)!=Nk)return!1;var t=Mk(e);if(t===null)return!0;var n=zk.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&S2.call(n)==jk}var Gk=Hk;function Wk(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n-1}var a8=i8,l8=nc;function s8(e,t){var n=this.__data__,r=l8(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var u8=s8,c8=Vk,f8=e8,d8=r8,p8=a8,h8=u8;function Oi(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 f=-1,p=!0,h=n&kA?new CA:void 0;for(i.set(e,t),i.set(t,e);++f0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,mD.default)(t,function(r){Array.isArray(r)?e(r).map(function(o){return n.push(o)}):(0,hD.default)(r)?(0,dD.default)(r,function(o,i){o===!0&&n.push(i),n.push(i+"-"+o)}):(0,cD.default)(r)&&n.push(r)}),n};pl.default=vD;var ml={};function yD(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,IO.default)(t.default)||{};return n.map(function(o){var i=t[o];return i&&(0,RO.default)(i,function(a,l){r[l]||(r[l]={}),r[l]=LO({},r[l],i[l])}),o}),r};ml.default=zO;var vl={};Object.defineProperty(vl,"__esModule",{value:!0});vl.autoprefix=void 0;var jO=m0,K1=GO(jO),HO=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){qO(o,r);function o(){var i,a,l,s;XO(this,o);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){nB(o,r);function o(){var i,a,l,s;tB(this,o);for(var u=arguments.length,c=Array(u),f=0;f1&&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};$0.default=oB;Object.defineProperty(sn,"__esModule",{value:!0});sn.ReactCSS=sn.loop=sn.handleActive=_0=sn.handleHover=sn.hover=void 0;var iB=pl,aB=Ii(iB),lB=ml,sB=Ii(lB),uB=vl,cB=Ii(uB),fB=yl,Y2=Ii(fB),dB=bl,pB=Ii(dB),hB=$0,gB=Ii(hB);function Ii(e){return e&&e.__esModule?e:{default:e}}sn.hover=Y2.default;var _0=sn.handleHover=Y2.default;sn.handleActive=pB.default;sn.loop=gB.default;var mB=sn.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;ol?p=1:p=Math.round(f*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},Vf={},yB=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},bB=function(t,n,r,o){var i=t+"-"+n+"-"+r+(o?"-server":"");if(Vf[i])return Vf[i];var a=yB(t,n,r,o);return Vf[i]=a,a},q1=Object.assign||function(e){for(var t=1;t-1},TB=function(t){return Number(String(t).replace(/%/g,""))},OB=1,ke=function(e){AB(t,e);function t(n){FB(this,t);var r=kB(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=TB(o.target.value);if(!isNaN(i)&&PB(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===Y2?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-"+OB++,r}return SB(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 EB({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||$B}},{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=ye({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 x.createElement("div",{style:o.wrap},x.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?x.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(w.PureComponent||w.Component),BB=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 f=void 0;if(c<0)f=359;else if(c>a)f=0;else{var p=-(c*100/a)+100;f=360*p/100}if(r.h!==f)return{h:f,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},MB=function(){function e(t,n){for(var r=0;r-1},OB=function(t){return Number(String(t).replace(/%/g,""))},BB=1,ke=function(e){$B(t,e);function t(n){kB(this,t);var r=AB(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=OB(o.target.value);if(!isNaN(i)&&TB(o.keyCode)){var a=r.getArrowOffset(),l=o.keyCode===X2?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-"+BB++,r}return EB(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 FB({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||_B}},{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=ye({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 x.createElement("div",{style:o.wrap},x.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?x.createElement("label",{htmlFor:this.inputId,style:o.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(w.PureComponent||w.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 f=void 0;if(c<0)f=359;else if(c>a)f=0;else{var p=-(c*100/a)+100;f=360*p/100}if(r.h!==f)return{h:f,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 g=u*100/i;h=360*g/100}if(r.h!==h)return{h,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},RB=function(){function e(t,n){for(var r=0;r-1}function XB(e,t){var n=this.__data__,r=uc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=nR}function ji(e){return e!=null&&O0(e.length)&&!D0(e)}function rR(e){return Or(e)&&ji(e)}function oR(){return!1}var iC=typeof Be=="object"&&Be&&!Be.nodeType&&Be,iv=iC&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,iR=iv&&iv.exports===iC,av=iR?kn.Buffer:void 0,aR=av?av.isBuffer:void 0,pu=aR||oR,lR="[object Object]",sR=Function.prototype,uR=Object.prototype,aC=sR.toString,cR=uR.hasOwnProperty,fR=aC.call(Object);function dR(e){if(!Or(e)||yo(e)!=lR)return!1;var t=rC(e);if(t===null)return!0;var n=cR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&aC.call(n)==fR}var pR="[object Arguments]",hR="[object Array]",gR="[object Boolean]",mR="[object Date]",vR="[object Error]",yR="[object Function]",bR="[object Map]",wR="[object Number]",xR="[object Object]",CR="[object RegExp]",SR="[object Set]",ER="[object String]",FR="[object WeakMap]",kR="[object ArrayBuffer]",AR="[object DataView]",$R="[object Float32Array]",_R="[object Float64Array]",DR="[object Int8Array]",PR="[object Int16Array]",TR="[object Int32Array]",OR="[object Uint8Array]",BR="[object Uint8ClampedArray]",MR="[object Uint16Array]",RR="[object Uint32Array]",ze={};ze[$R]=ze[_R]=ze[DR]=ze[PR]=ze[TR]=ze[OR]=ze[BR]=ze[MR]=ze[RR]=!0;ze[pR]=ze[hR]=ze[kR]=ze[gR]=ze[AR]=ze[mR]=ze[vR]=ze[yR]=ze[bR]=ze[wR]=ze[xR]=ze[CR]=ze[SR]=ze[ER]=ze[FR]=!1;function NR(e){return Or(e)&&O0(e.length)&&!!ze[yo(e)]}function IR(e){return function(t){return e(t)}}var lC=typeof Be=="object"&&Be&&!Be.nodeType&&Be,Pa=lC&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,LR=Pa&&Pa.exports===lC,Kf=LR&&Q2.process,lv=function(){try{var e=Pa&&Pa.require&&Pa.require("util").types;return e||Kf&&Kf.binding&&Kf.binding("util")}catch(t){}}(),sv=lv&&lv.isTypedArray,B0=sv?IR(sv):NR;function Rp(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var zR=Object.prototype,jR=zR.hasOwnProperty;function HR(e,t,n){var r=e[t];(!(jR.call(e,t)&&wl(r,n))||n===void 0&&!(t in e))&&P0(e,t,n)}function GR(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e0){if(++t>=iN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var uN=sN(oN);function cN(e,t){return uN(nN(e,t,fc),e+"")}function fN(e,t,n){if(!pn(n))return!1;var r=typeof t;return(r=="number"?ji(n)&&M0(t,n.length):r=="string"&&t in n)?wl(n[t],e):!1}function dN(e){return cN(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&&fN(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r=t||D<0||f&&O>=i}function g(){var A=Yf();if(C(A))return v(A);l=setTimeout(g,y(A))}function v(A){return l=void 0,p&&r?h(A):(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(Yf())}function _(){var A=Yf(),D=C(A);if(r=arguments,o=this,s=A,D){if(l===void 0)return m(s);if(f)return clearTimeout(l),l=setTimeout(g,t),h(s)}return l===void 0&&(l=setTimeout(g,t)),a}return _.cancel=b,_.flush=F,_}var FN="Expected a function";function kN(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(FN);return pn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),fC(e,t,{leading:r,maxWait:t,trailing:o})}var AN=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 f=u/i,p=1-c/a;return{h:n.h,s:f,v:p,a:n.a,source:"hsv"}},$N=function(){function e(t,n){for(var r=0;r-1}function qB(e,t){var n=this.__data__,r=cc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=rR}function ji(e){return e!=null&&B0(e.length)&&!P0(e)}function oR(e){return Or(e)&&ji(e)}function iR(){return!1}var aC=typeof Be=="object"&&Be&&!Be.nodeType&&Be,iv=aC&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,aR=iv&&iv.exports===aC,av=aR?kn.Buffer:void 0,lR=av?av.isBuffer:void 0,hu=lR||iR,sR="[object Object]",uR=Function.prototype,cR=Object.prototype,lC=uR.toString,fR=cR.hasOwnProperty,dR=lC.call(Object);function pR(e){if(!Or(e)||bo(e)!=sR)return!1;var t=oC(e);if(t===null)return!0;var n=fR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&lC.call(n)==dR}var hR="[object Arguments]",gR="[object Array]",mR="[object Boolean]",vR="[object Date]",yR="[object Error]",bR="[object Function]",wR="[object Map]",xR="[object Number]",CR="[object Object]",SR="[object RegExp]",ER="[object Set]",FR="[object String]",kR="[object WeakMap]",AR="[object ArrayBuffer]",$R="[object DataView]",_R="[object Float32Array]",DR="[object Float64Array]",PR="[object Int8Array]",TR="[object Int16Array]",OR="[object Int32Array]",BR="[object Uint8Array]",MR="[object Uint8ClampedArray]",RR="[object Uint16Array]",NR="[object Uint32Array]",ze={};ze[_R]=ze[DR]=ze[PR]=ze[TR]=ze[OR]=ze[BR]=ze[MR]=ze[RR]=ze[NR]=!0;ze[hR]=ze[gR]=ze[AR]=ze[mR]=ze[$R]=ze[vR]=ze[yR]=ze[bR]=ze[wR]=ze[xR]=ze[CR]=ze[SR]=ze[ER]=ze[FR]=ze[kR]=!1;function IR(e){return Or(e)&&B0(e.length)&&!!ze[bo(e)]}function LR(e){return function(t){return e(t)}}var sC=typeof Be=="object"&&Be&&!Be.nodeType&&Be,Pa=sC&&typeof Jt=="object"&&Jt&&!Jt.nodeType&&Jt,zR=Pa&&Pa.exports===sC,Yf=zR&&Z2.process,lv=function(){try{var e=Pa&&Pa.require&&Pa.require("util").types;return e||Yf&&Yf.binding&&Yf.binding("util")}catch(t){}}(),sv=lv&&lv.isTypedArray,M0=sv?LR(sv):IR;function Np(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var jR=Object.prototype,HR=jR.hasOwnProperty;function GR(e,t,n){var r=e[t];(!(HR.call(e,t)&&wl(r,n))||n===void 0&&!(t in e))&&T0(e,t,n)}function WR(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i-1&&e%1==0&&e0){if(++t>=aN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cN=uN(iN);function fN(e,t){return cN(rN(e,t,dc),e+"")}function dN(e,t,n){if(!pn(n))return!1;var r=typeof t;return(r=="number"?ji(n)&&R0(t,n.length):r=="string"&&t in n)?wl(n[t],e):!1}function pN(e){return fN(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&&dN(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++r=t||D<0||f&&O>=i}function m(){var A=Xf();if(C(A))return v(A);l=setTimeout(m,y(A))}function v(A){return l=void 0,p&&r?h(A):(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(Xf())}function _(){var A=Xf(),D=C(A);if(r=arguments,o=this,s=A,D){if(l===void 0)return g(s);if(f)return clearTimeout(l),l=setTimeout(m,t),h(s)}return l===void 0&&(l=setTimeout(m,t)),a}return _.cancel=b,_.flush=F,_}var kN="Expected a function";function AN(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(kN);return pn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),dC(e,t,{leading:r,maxWait:t,trailing:o})}var $N=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 f=u/i,p=1-c/a;return{h:n.h,s:f,v:p,a:n.a,source:"hsv"}},_N=function(){function e(t,n){for(var r=0;r=0,I=!$&&N&&(S==="hex"||S==="hex6"||S==="hex3"||S==="hex4"||S==="hex8"||S==="name");return I?S==="name"&&this._a===0?this.toName():this.toRgbString():(S==="rgb"&&(E=this.toRgbString()),S==="prgb"&&(E=this.toPercentageRgbString()),(S==="hex"||S==="hex6")&&(E=this.toHexString()),S==="hex3"&&(E=this.toHexString(!0)),S==="hex4"&&(E=this.toHex8String(!0)),S==="hex8"&&(E=this.toHex8String()),S==="name"&&(E=this.toName()),S==="hsl"&&(E=this.toHslString()),S==="hsv"&&(E=this.toHsvString()),E||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(S,$){var E=S.apply(null,[this].concat([].slice.call($)));return this._r=E._r,this._g=E._g,this._b=E._b,this.setAlpha(E._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(S,$){return S.apply(null,[this].concat([].slice.call($)))},analogous:function(){return this._applyCombination(fe,arguments)},complement:function(){return this._applyCombination(L,arguments)},monochromatic:function(){return this._applyCombination(me,arguments)},splitcomplement:function(){return this._applyCombination(G,arguments)},triad:function(){return this._applyCombination(Q,arguments)},tetrad:function(){return this._applyCombination(B,arguments)}},u.fromRatio=function(S,$){if(typeof S=="object"){var E={};for(var N in S)S.hasOwnProperty(N)&&(N==="a"?E[N]=S[N]:E[N]=P(S[N]));S=E}return u(S,$)};function c(S){var $={r:0,g:0,b:0},E=1,N=null,I=null,j=null,ce=!1,ve=!1;return typeof S=="string"&&(S=pe(S)),typeof S=="object"&&(ue(S.r)&&ue(S.g)&&ue(S.b)?($=f(S.r,S.g,S.b),ce=!0,ve=String(S.r).substr(-1)==="%"?"prgb":"rgb"):ue(S.h)&&ue(S.s)&&ue(S.v)?(N=P(S.s),I=P(S.v),$=y(S.h,N,I),ce=!0,ve="hsv"):ue(S.h)&&ue(S.s)&&ue(S.l)&&(N=P(S.s),j=P(S.l),$=h(S.h,N,j),ce=!0,ve="hsl"),S.hasOwnProperty("a")&&(E=S.a)),E=Z(E),{ok:ce,format:S.format||ve,r:a(255,l($.r,0)),g:a(255,l($.g,0)),b:a(255,l($.b,0)),a:E}}function f(S,$,E){return{r:U(S,255)*255,g:U($,255)*255,b:U(E,255)*255}}function p(S,$,E){S=U(S,255),$=U($,255),E=U(E,255);var N=l(S,$,E),I=a(S,$,E),j,ce,ve=(N+I)/2;if(N==I)j=ce=0;else{var _e=N-I;switch(ce=ve>.5?_e/(2-N-I):_e/(N+I),N){case S:j=($-E)/_e+($1&&(re-=1),re<1/6?he+(Ae-he)*6*re:re<1/2?Ae:re<2/3?he+(Ae-he)*(2/3-re)*6:he}if($===0)N=I=j=E;else{var ve=E<.5?E*(1+$):E+$-E*$,_e=2*E-ve;N=ce(_e,ve,S+1/3),I=ce(_e,ve,S),j=ce(_e,ve,S-1/3)}return{r:N*255,g:I*255,b:j*255}}function m(S,$,E){S=U(S,255),$=U($,255),E=U(E,255);var N=l(S,$,E),I=a(S,$,E),j,ce,ve=N,_e=N-I;if(ce=N===0?0:_e/N,N==I)j=0;else{switch(N){case S:j=($-E)/_e+($>1)+720)%360;--$;)N.h=(N.h+I)%360,j.push(u(N));return j}function me(S,$){$=$||6;for(var E=u(S).toHsv(),N=E.h,I=E.s,j=E.v,ce=[],ve=1/$;$--;)ce.push(u({h:N,s:I,v:j})),j=(j+ve)%1;return ce}u.mix=function(S,$,E){E=E===0?0:E||50;var N=u(S).toRgb(),I=u($).toRgb(),j=E/100,ce={r:(I.r-N.r)*j+N.r,g:(I.g-N.g)*j+N.g,b:(I.b-N.b)*j+N.b,a:(I.a-N.a)*j+N.a};return u(ce)},u.readability=function(S,$){var E=u(S),N=u($);return(t.max(E.getLuminance(),N.getLuminance())+.05)/(t.min(E.getLuminance(),N.getLuminance())+.05)},u.isReadable=function(S,$,E){var N=u.readability(S,$),I,j;switch(j=!1,I=se(E),I.level+I.size){case"AAsmall":case"AAAlarge":j=N>=4.5;break;case"AAlarge":j=N>=3;break;case"AAAsmall":j=N>=7;break}return j},u.mostReadable=function(S,$,E){var N=null,I=0,j,ce,ve,_e;E=E||{},ce=E.includeFallbackColors,ve=E.level,_e=E.size;for(var he=0;he<$.length;he++)j=u.readability(S,$[he]),j>I&&(I=j,N=u($[he]));return u.isReadable(S,N,{level:ve,size:_e})||!ce?N:(E.includeFallbackColors=!1,u.mostReadable(S,["#fff","#000"],E))};var Se=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"},ie=u.hexNames=z(Se);function z(S){var $={};for(var E in S)S.hasOwnProperty(E)&&($[S[E]]=E);return $}function Z(S){return S=parseFloat(S),(isNaN(S)||S<0||S>1)&&(S=1),S}function U(S,$){K(S)&&(S="100%");var E=X(S);return S=a($,l(0,parseFloat(S))),E&&(S=parseInt(S*$,10)/100),t.abs(S-$)<1e-6?1:S%$/parseFloat($)}function le(S){return a(1,l(0,S))}function R(S){return parseInt(S,16)}function K(S){return typeof S=="string"&&S.indexOf(".")!=-1&&parseFloat(S)===1}function X(S){return typeof S=="string"&&S.indexOf("%")!=-1}function ne(S){return S.length==1?"0"+S:""+S}function P(S){return S<=1&&(S=S*100+"%"),S}function Y(S){return t.round(parseFloat(S)*255).toString(16)}function M(S){return R(S)/255}var de=function(){var S="[-\\+]?\\d+%?",$="[-\\+]?\\d*\\.\\d+%?",E="(?:"+$+")|(?:"+S+")",N="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",I="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?";return{CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),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 ue(S){return!!de.CSS_UNIT.exec(S)}function pe(S){S=S.replace(n,"").replace(r,"").toLowerCase();var $=!1;if(Se[S])S=Se[S],$=!0;else if(S=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var E;return(E=de.rgb.exec(S))?{r:E[1],g:E[2],b:E[3]}:(E=de.rgba.exec(S))?{r:E[1],g:E[2],b:E[3],a:E[4]}:(E=de.hsl.exec(S))?{h:E[1],s:E[2],l:E[3]}:(E=de.hsla.exec(S))?{h:E[1],s:E[2],l:E[3],a:E[4]}:(E=de.hsv.exec(S))?{h:E[1],s:E[2],v:E[3]}:(E=de.hsva.exec(S))?{h:E[1],s:E[2],v:E[3],a:E[4]}:(E=de.hex8.exec(S))?{r:R(E[1]),g:R(E[2]),b:R(E[3]),a:M(E[4]),format:$?"name":"hex8"}:(E=de.hex6.exec(S))?{r:R(E[1]),g:R(E[2]),b:R(E[3]),format:$?"name":"hex"}:(E=de.hex4.exec(S))?{r:R(E[1]+""+E[1]),g:R(E[2]+""+E[2]),b:R(E[3]+""+E[3]),a:M(E[4]+""+E[4]),format:$?"name":"hex8"}:(E=de.hex3.exec(S))?{r:R(E[1]+""+E[1]),g:R(E[2]+""+E[2]),b:R(E[3]+""+E[3]),format:$?"name":"hex"}:!1}function se(S){var $,E;return S=S||{level:"AA",size:"small"},$=(S.level||"AA").toUpperCase(),E=(S.size||"small").toLowerCase(),$!=="AA"&&$!=="AAA"&&($="AA"),E!=="small"&&E!=="large"&&(E="small"),{level:$,size:E}}e.exports?e.exports=u:window.tinycolor=u})(Math)})(pC);var jN=pC.exports;const Br=po(jN);var dv=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return zN(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},ga=function(t,n){var r=t.hex?Br(t.hex):Br(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}},jr=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Br(t).isValid()},N0=function(t){if(!t)return"#fff";var n=ga(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"},Xf=function(t,n){var r=t.replace("°","");return Br(n+" ("+r+")")._ok},ra=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){XN(o,r);function o(){var i,a,l,s;YN(this,o);for(var u=arguments.length,c=Array(u),f=0;fl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,p=!0,h=n&lI?new hu:void 0;for(i.set(e,t),i.set(t,e);++f=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var is=24,SL=SC.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?is:r,i=e.height,a=i===void 0?is:i,l=e.style,s=l===void 0?{}:l,u=CL(e,["fill","width","height","style"]);return Dv.default.createElement("svg",_v({viewBox:"0 0 "+is+" "+is,style:_v({fill:n,width:o,height:a},s)},u),Dv.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"}))},EL=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($v(o.s)?r.props.hsl.s:o.s),l:Number($v(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 EL(t,[{key:"render",value:function(){var r=this,o=ye({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=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),x.createElement("div",{style:o.alpha},x.createElement(ke,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:o.alpha},x.createElement(ke,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),x.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,x.createElement("div",{style:o.toggle},x.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},x.createElement(SL,{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}(x.Component);EC.defaultProps={view:"hex"};var Pv=function(){var t=ye({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 x.createElement("div",{style:t.picker})},$L=function(){var t=ye({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return x.createElement("div",{style:t.picker})},G0=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,f=c===void 0?{}:c,p=t.className,h=p===void 0?"":p,m=t.defaultView,y=ye(Kt({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"}}},f),{disableAlpha:o});return x.createElement("div",{style:y.picker,className:"chrome-picker "+h},x.createElement("div",{style:y.saturation},x.createElement(pc,{style:y.Saturation,hsl:a,hsv:l,pointer:$L,onChange:r})),x.createElement("div",{style:y.body},x.createElement("div",{style:y.controls,className:"flexbox-fix"},x.createElement("div",{style:y.color},x.createElement("div",{style:y.swatch},x.createElement("div",{style:y.active}),x.createElement(Li,{renderers:u}))),x.createElement("div",{style:y.toggles},x.createElement("div",{style:y.hue},x.createElement(zi,{style:y.Hue,hsl:a,pointer:Pv,onChange:r})),x.createElement("div",{style:y.alpha},x.createElement(_0,{style:y.Alpha,rgb:i,hsl:a,pointer:Pv,renderers:u,onChange:r})))),x.createElement(EC,{rgb:i,hsl:a,hex:s,view:m,onChange:r,disableAlpha:o})))};G0.propTypes={width:J.oneOfType([J.string,J.number]),disableAlpha:J.bool,styles:J.object,defaultView:J.oneOf(["hex","rgb","hsl"])};G0.defaultProps={width:225,disableAlpha:!1,styles:{}};const _L=Yt(G0);var DL=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=ye({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:N0(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 x.createElement(xo,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:l.dot}))},PL=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=ye({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 x.createElement("div",{style:i.fields,className:"flexbox-fix"},x.createElement("div",{style:i.active}),x.createElement(ke,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},W0=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,f=ye(Kt({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?jr(m.hex)&&n({hex:m.hex,source:"hex"},y):n(m,y)};return x.createElement(xl,{style:f.Compact,styles:s},x.createElement("div",{style:f.compact,className:"compact-picker "+c},x.createElement("div",null,Co(o,function(h){return x.createElement(DL,{key:h,color:h,active:h.toLowerCase()===i,onClick:p,onSwatchHover:r})}),x.createElement("div",{style:f.clear})),x.createElement(PL,{hex:i,rgb:a,onChange:p})))};W0.propTypes={colors:J.arrayOf(J.string),styles:J.object};W0.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:{}};Yt(W0);var TL=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=ye({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return x.createElement("div",{style:l.swatch},x.createElement(xo,{color:r,onClick:o,onHover:i,focusStyle:a}))};const OL=$0(TL);var U0=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,f=ye(Kt({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 x.createElement("div",{style:f.card,className:"github-picker "+c},x.createElement("div",{style:f.triangleShadow}),x.createElement("div",{style:f.triangle}),Co(r,function(h){return x.createElement(OL,{color:h,key:h,onClick:p,onSwatchHover:i})}))};U0.propTypes={width:J.oneOfType([J.string,J.number]),colors:J.arrayOf(J.string),triangle:J.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:J.object};U0.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Yt(U0);var BL=function(t){var n=t.direction,r=ye({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 x.createElement("div",{style:r.picker})},ML=Object.assign||function(e){for(var t=1;t.5});return x.createElement("div",{style:r.picker})},LL=function(){var t=ye({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 x.createElement("div",{style:t.pointer},x.createElement("div",{style:t.left},x.createElement("div",{style:t.leftInside})),x.createElement("div",{style:t.right},x.createElement("div",{style:t.rightInside})))},Tv=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=ye({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 x.createElement("div",{style:a.button,onClick:n},r||o)},zL=function(t){var n=t.rgb,r=t.currentColor,o=ye({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 x.createElement("div",null,x.createElement("div",{style:o.label},"new"),x.createElement("div",{style:o.swatches},x.createElement("div",{style:o.new}),x.createElement("div",{style:o.current})),x.createElement("div",{style:o.label},"current"))},jL=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"},f))};return x.createElement("div",{style:l.fields,className:"flexbox-fix"},x.createElement("div",{style:l.double},x.createElement(ke,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.alpha},x.createElement(ke,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},VL=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var as=24,tz=kC.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?as:r,i=e.height,a=i===void 0?as:i,l=e.style,s=l===void 0?{}:l,u=ez(e,["fill","width","height","style"]);return Bv.default.createElement("svg",Ov({viewBox:"0 0 "+as+" "+as,style:Ov({fill:n,width:o,height:a},s)},u),Bv.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},nz=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=ye({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:N0(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 x.createElement(xo,{color:n,style:u.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:u.check},x.createElement(tz,null)))},rz=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=ye({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return x.createElement("div",{style:a.group},Co(o,function(l,s){return x.createElement(nz,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===o.length-1,onClick:n,onSwatchHover:r})}))},q0=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,f=c===void 0?"":c,p=ye(Kt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(y,C){return o({hex:y,source:"hex"},C)};return x.createElement("div",{style:p.picker,className:"swatches-picker "+f},x.createElement(xl,null,x.createElement("div",{style:p.overflow},x.createElement("div",{style:p.body},Co(a,function(m){return x.createElement(rz,{key:m.toString(),group:m,active:l,onClick:h,onSwatchHover:i})}),x.createElement("div",{style:p.clear})))))};q0.propTypes={width:J.oneOfType([J.string,J.number]),height:J.oneOfType([J.string,J.number]),colors:J.arrayOf(J.arrayOf(J.string)),styles:J.object};q0.defaultProps={width:320,height:240,colors:[[$o[900],$o[700],$o[500],$o[300],$o[100]],[_o[900],_o[700],_o[500],_o[300],_o[100]],[Do[900],Do[700],Do[500],Do[300],Do[100]],[Po[900],Po[700],Po[500],Po[300],Po[100]],[To[900],To[700],To[500],To[300],To[100]],[Oo[900],Oo[700],Oo[500],Oo[300],Oo[100]],[Bo[900],Bo[700],Bo[500],Bo[300],Bo[100]],[Mo[900],Mo[700],Mo[500],Mo[300],Mo[100]],[Ro[900],Ro[700],Ro[500],Ro[300],Ro[100]],["#194D33",ma[700],ma[500],ma[300],ma[100]],[No[900],No[700],No[500],No[300],No[100]],[Io[900],Io[700],Io[500],Io[300],Io[100]],[Lo[900],Lo[700],Lo[500],Lo[300],Lo[100]],[zo[900],zo[700],zo[500],zo[300],zo[100]],[jo[900],jo[700],jo[500],jo[300],jo[100]],[Ho[900],Ho[700],Ho[500],Ho[300],Ho[100]],[Go[900],Go[700],Go[500],Go[300],Go[100]],[Wo[900],Wo[700],Wo[500],Wo[300],Wo[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Yt(q0);var J0=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,f=c===void 0?"":c,p=ye(Kt({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,C){jr(y)&&n({hex:y,source:"hex"},C)};return x.createElement("div",{style:p.card,className:"twitter-picker "+f},x.createElement("div",{style:p.triangleShadow}),x.createElement("div",{style:p.triangle}),x.createElement("div",{style:p.body},Co(i,function(m,y){return x.createElement(xo,{key:y,color:m,hex:m,style:p.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+m}})}),x.createElement("div",{style:p.hash},"#"),x.createElement(ke,{label:null,style:{input:p.input},value:o.replace("#",""),onChange:h}),x.createElement("div",{style:p.clear})))};J0.propTypes={width:J.oneOfType([J.string,J.number]),triangle:J.oneOf(["hide","top-left","top-right"]),colors:J.arrayOf(J.string),styles:J.object};J0.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Yt(J0);var Q0=function(t){var n=ye({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 x.createElement("div",{style:n.picker})};Q0.propTypes={hsl:J.shape({h:J.number,s:J.number,l:J.number,a:J.number})};Q0.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Z0=function(t){var n=ye({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 x.createElement("div",{style:n.picker})};Z0.propTypes={hsl:J.shape({h:J.number,s:J.number,l:J.number,a:J.number})};Z0.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var oz=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)jr(h.hex)&&n({hex:h.hex,source:"hex"},m);else if(h.rgb){var y=h.rgb.split(",");Xf(h.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},m)}else if(h.hsv){var C=h.hsv.split(",");Xf(h.hsv,"hsv")&&(C[2]=C[2].replace("%",""),C[1]=C[1].replace("%",""),C[0]=C[0].replace("°",""),C[1]==1?C[1]=.01:C[2]==1&&(C[2]=.01),n({h:Number(C[0]),s:Number(C[1]),v:Number(C[2]),source:"hsv"},m))}else if(h.hsl){var g=h.hsl.split(",");Xf(h.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},m))}},s=ye({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)+"%",f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return x.createElement("div",{style:s.wrap,className:"flexbox-fix"},x.createElement("div",{style:s.fields},x.createElement("div",{style:s.double},x.createElement(ke,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),x.createElement("div",{style:s.column},x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"hsv",value:f,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:l})))))},eg=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,f=t.className,p=f===void 0?"":f,h=ye(Kt({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 x.createElement("div",{style:h.picker,className:"google-picker "+p},x.createElement("div",{style:h.head},s),x.createElement("div",{style:h.swatch}),x.createElement("div",{style:h.saturation},x.createElement(pc,{hsl:i,hsv:a,pointer:Q0,onChange:r})),x.createElement("div",{style:h.body},x.createElement("div",{style:h.controls,className:"flexbox-fix"},x.createElement("div",{style:h.hue},x.createElement(zi,{style:h.Hue,hsl:i,radius:"4px",pointer:Z0,onChange:r}))),x.createElement(oz,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};eg.propTypes={width:J.oneOfType([J.string,J.number]),styles:J.object,header:J.string};eg.defaultProps={width:652,styles:{},header:"Color picker"};const iz=Yt(eg);function Mv(e){const{onChange:t,value:n,allowGradients:r}=e,{colorUsages:o}=xe;return o.map(({color:i,usages:a,isGradient:l})=>!r&&l?null:k("span",{onClick:()=>{t(i,!0)},title:`${i} + `),x.createElement("div",{style:c.white,className:"saturation-white"},x.createElement("div",{style:c.black,className:"saturation-black"}),x.createElement("div",{style:c.pointer},this.props.pointer?x.createElement(this.props.pointer,this.props):x.createElement("div",{style:c.circle}))))}}]),t}(w.PureComponent||w.Component);function ON(e,t){for(var n=-1,r=e==null?0:e.length;++n=0,I=!$&&N&&(S==="hex"||S==="hex6"||S==="hex3"||S==="hex4"||S==="hex8"||S==="name");return I?S==="name"&&this._a===0?this.toName():this.toRgbString():(S==="rgb"&&(E=this.toRgbString()),S==="prgb"&&(E=this.toPercentageRgbString()),(S==="hex"||S==="hex6")&&(E=this.toHexString()),S==="hex3"&&(E=this.toHexString(!0)),S==="hex4"&&(E=this.toHex8String(!0)),S==="hex8"&&(E=this.toHex8String()),S==="name"&&(E=this.toName()),S==="hsl"&&(E=this.toHslString()),S==="hsv"&&(E=this.toHsvString()),E||this.toHexString())},clone:function(){return u(this.toString())},_applyModification:function(S,$){var E=S.apply(null,[this].concat([].slice.call($)));return this._r=E._r,this._g=E._g,this._b=E._b,this.setAlpha(E._a),this},lighten:function(){return this._applyModification(A,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(O,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(_,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(S,$){return S.apply(null,[this].concat([].slice.call($)))},analogous:function(){return this._applyCombination(fe,arguments)},complement:function(){return this._applyCombination(L,arguments)},monochromatic:function(){return this._applyCombination(me,arguments)},splitcomplement:function(){return this._applyCombination(G,arguments)},triad:function(){return this._applyCombination(Q,arguments)},tetrad:function(){return this._applyCombination(B,arguments)}},u.fromRatio=function(S,$){if(typeof S=="object"){var E={};for(var N in S)S.hasOwnProperty(N)&&(N==="a"?E[N]=S[N]:E[N]=P(S[N]));S=E}return u(S,$)};function c(S){var $={r:0,g:0,b:0},E=1,N=null,I=null,j=null,ce=!1,ve=!1;return typeof S=="string"&&(S=pe(S)),typeof S=="object"&&(ue(S.r)&&ue(S.g)&&ue(S.b)?($=f(S.r,S.g,S.b),ce=!0,ve=String(S.r).substr(-1)==="%"?"prgb":"rgb"):ue(S.h)&&ue(S.s)&&ue(S.v)?(N=P(S.s),I=P(S.v),$=y(S.h,N,I),ce=!0,ve="hsv"):ue(S.h)&&ue(S.s)&&ue(S.l)&&(N=P(S.s),j=P(S.l),$=h(S.h,N,j),ce=!0,ve="hsl"),S.hasOwnProperty("a")&&(E=S.a)),E=Z(E),{ok:ce,format:S.format||ve,r:a(255,l($.r,0)),g:a(255,l($.g,0)),b:a(255,l($.b,0)),a:E}}function f(S,$,E){return{r:U(S,255)*255,g:U($,255)*255,b:U(E,255)*255}}function p(S,$,E){S=U(S,255),$=U($,255),E=U(E,255);var N=l(S,$,E),I=a(S,$,E),j,ce,ve=(N+I)/2;if(N==I)j=ce=0;else{var _e=N-I;switch(ce=ve>.5?_e/(2-N-I):_e/(N+I),N){case S:j=($-E)/_e+($1&&(re-=1),re<1/6?he+(Ae-he)*6*re:re<1/2?Ae:re<2/3?he+(Ae-he)*(2/3-re)*6:he}if($===0)N=I=j=E;else{var ve=E<.5?E*(1+$):E+$-E*$,_e=2*E-ve;N=ce(_e,ve,S+1/3),I=ce(_e,ve,S),j=ce(_e,ve,S-1/3)}return{r:N*255,g:I*255,b:j*255}}function g(S,$,E){S=U(S,255),$=U($,255),E=U(E,255);var N=l(S,$,E),I=a(S,$,E),j,ce,ve=N,_e=N-I;if(ce=N===0?0:_e/N,N==I)j=0;else{switch(N){case S:j=($-E)/_e+($>1)+720)%360;--$;)N.h=(N.h+I)%360,j.push(u(N));return j}function me(S,$){$=$||6;for(var E=u(S).toHsv(),N=E.h,I=E.s,j=E.v,ce=[],ve=1/$;$--;)ce.push(u({h:N,s:I,v:j})),j=(j+ve)%1;return ce}u.mix=function(S,$,E){E=E===0?0:E||50;var N=u(S).toRgb(),I=u($).toRgb(),j=E/100,ce={r:(I.r-N.r)*j+N.r,g:(I.g-N.g)*j+N.g,b:(I.b-N.b)*j+N.b,a:(I.a-N.a)*j+N.a};return u(ce)},u.readability=function(S,$){var E=u(S),N=u($);return(t.max(E.getLuminance(),N.getLuminance())+.05)/(t.min(E.getLuminance(),N.getLuminance())+.05)},u.isReadable=function(S,$,E){var N=u.readability(S,$),I,j;switch(j=!1,I=se(E),I.level+I.size){case"AAsmall":case"AAAlarge":j=N>=4.5;break;case"AAlarge":j=N>=3;break;case"AAAsmall":j=N>=7;break}return j},u.mostReadable=function(S,$,E){var N=null,I=0,j,ce,ve,_e;E=E||{},ce=E.includeFallbackColors,ve=E.level,_e=E.size;for(var he=0;he<$.length;he++)j=u.readability(S,$[he]),j>I&&(I=j,N=u($[he]));return u.isReadable(S,N,{level:ve,size:_e})||!ce?N:(E.includeFallbackColors=!1,u.mostReadable(S,["#fff","#000"],E))};var Se=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"},ie=u.hexNames=z(Se);function z(S){var $={};for(var E in S)S.hasOwnProperty(E)&&($[S[E]]=E);return $}function Z(S){return S=parseFloat(S),(isNaN(S)||S<0||S>1)&&(S=1),S}function U(S,$){K(S)&&(S="100%");var E=X(S);return S=a($,l(0,parseFloat(S))),E&&(S=parseInt(S*$,10)/100),t.abs(S-$)<1e-6?1:S%$/parseFloat($)}function le(S){return a(1,l(0,S))}function R(S){return parseInt(S,16)}function K(S){return typeof S=="string"&&S.indexOf(".")!=-1&&parseFloat(S)===1}function X(S){return typeof S=="string"&&S.indexOf("%")!=-1}function ne(S){return S.length==1?"0"+S:""+S}function P(S){return S<=1&&(S=S*100+"%"),S}function Y(S){return t.round(parseFloat(S)*255).toString(16)}function M(S){return R(S)/255}var de=function(){var S="[-\\+]?\\d+%?",$="[-\\+]?\\d*\\.\\d+%?",E="(?:"+$+")|(?:"+S+")",N="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",I="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?";return{CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),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 ue(S){return!!de.CSS_UNIT.exec(S)}function pe(S){S=S.replace(n,"").replace(r,"").toLowerCase();var $=!1;if(Se[S])S=Se[S],$=!0;else if(S=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var E;return(E=de.rgb.exec(S))?{r:E[1],g:E[2],b:E[3]}:(E=de.rgba.exec(S))?{r:E[1],g:E[2],b:E[3],a:E[4]}:(E=de.hsl.exec(S))?{h:E[1],s:E[2],l:E[3]}:(E=de.hsla.exec(S))?{h:E[1],s:E[2],l:E[3],a:E[4]}:(E=de.hsv.exec(S))?{h:E[1],s:E[2],v:E[3]}:(E=de.hsva.exec(S))?{h:E[1],s:E[2],v:E[3],a:E[4]}:(E=de.hex8.exec(S))?{r:R(E[1]),g:R(E[2]),b:R(E[3]),a:M(E[4]),format:$?"name":"hex8"}:(E=de.hex6.exec(S))?{r:R(E[1]),g:R(E[2]),b:R(E[3]),format:$?"name":"hex"}:(E=de.hex4.exec(S))?{r:R(E[1]+""+E[1]),g:R(E[2]+""+E[2]),b:R(E[3]+""+E[3]),a:M(E[4]+""+E[4]),format:$?"name":"hex8"}:(E=de.hex3.exec(S))?{r:R(E[1]+""+E[1]),g:R(E[2]+""+E[2]),b:R(E[3]+""+E[3]),format:$?"name":"hex"}:!1}function se(S){var $,E;return S=S||{level:"AA",size:"small"},$=(S.level||"AA").toUpperCase(),E=(S.size||"small").toLowerCase(),$!=="AA"&&$!=="AAA"&&($="AA"),E!=="small"&&E!=="large"&&(E="small"),{level:$,size:E}}e.exports?e.exports=u:window.tinycolor=u})(Math)})(hC);var HN=hC.exports;const Br=ho(HN);var dv=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,o=0;return jN(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},ga=function(t,n){var r=t.hex?Br(t.hex):Br(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}},jr=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&Br(t).isValid()},I0=function(t){if(!t)return"#fff";var n=ga(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"},qf=function(t,n){var r=t.replace("°","");return Br(n+" ("+r+")")._ok},ra=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){qN(o,r);function o(){var i,a,l,s;XN(this,o);for(var u=arguments.length,c=Array(u),f=0;fl))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,p=!0,h=n&sI?new gu:void 0;for(i.set(e,t),i.set(t,e);++f=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var as=24,EL=EC.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?as:r,i=e.height,a=i===void 0?as:i,l=e.style,s=l===void 0?{}:l,u=SL(e,["fill","width","height","style"]);return Dv.default.createElement("svg",_v({viewBox:"0 0 "+as+" "+as,style:_v({fill:n,width:o,height:a},s)},u),Dv.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"}))},FL=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($v(o.s)?r.props.hsl.s:o.s),l:Number($v(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 FL(t,[{key:"render",value:function(){var r=this,o=ye({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=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?i=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),x.createElement("div",{style:o.alpha},x.createElement(ke,{style:{input:o.input,label:o.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(i=x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:o.field},x.createElement(ke,{style:{input:o.input,label:o.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:o.alpha},x.createElement(ke,{style:{input:o.input,label:o.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),x.createElement("div",{style:o.wrap,className:"flexbox-fix"},i,x.createElement("div",{style:o.toggle},x.createElement("div",{style:o.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},x.createElement(EL,{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}(x.Component);FC.defaultProps={view:"hex"};var Pv=function(){var t=ye({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 x.createElement("div",{style:t.picker})},_L=function(){var t=ye({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return x.createElement("div",{style:t.picker})},W0=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,f=c===void 0?{}:c,p=t.className,h=p===void 0?"":p,g=t.defaultView,y=ye(Kt({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"}}},f),{disableAlpha:o});return x.createElement("div",{style:y.picker,className:"chrome-picker "+h},x.createElement("div",{style:y.saturation},x.createElement(hc,{style:y.Saturation,hsl:a,hsv:l,pointer:_L,onChange:r})),x.createElement("div",{style:y.body},x.createElement("div",{style:y.controls,className:"flexbox-fix"},x.createElement("div",{style:y.color},x.createElement("div",{style:y.swatch},x.createElement("div",{style:y.active}),x.createElement(Li,{renderers:u}))),x.createElement("div",{style:y.toggles},x.createElement("div",{style:y.hue},x.createElement(zi,{style:y.Hue,hsl:a,pointer:Pv,onChange:r})),x.createElement("div",{style:y.alpha},x.createElement(D0,{style:y.Alpha,rgb:i,hsl:a,pointer:Pv,renderers:u,onChange:r})))),x.createElement(FC,{rgb:i,hsl:a,hex:s,view:g,onChange:r,disableAlpha:o})))};W0.propTypes={width:J.oneOfType([J.string,J.number]),disableAlpha:J.bool,styles:J.object,defaultView:J.oneOf(["hex","rgb","hsl"])};W0.defaultProps={width:225,disableAlpha:!1,styles:{}};const DL=Yt(W0);var PL=function(t){var n=t.color,r=t.onClick,o=r===void 0?function(){}:r,i=t.onSwatchHover,a=t.active,l=ye({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:I0(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 x.createElement(Co,{style:l.color,color:n,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:l.dot}))},TL=function(t){var n=t.hex,r=t.rgb,o=t.onChange,i=ye({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 x.createElement("div",{style:i.fields,className:"flexbox-fix"},x.createElement("div",{style:i.active}),x.createElement(ke,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:n,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:r.r,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:r.g,onChange:a}),x.createElement(ke,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:r.b,onChange:a}))},U0=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,f=ye(Kt({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),p=function(g,y){g.hex?jr(g.hex)&&n({hex:g.hex,source:"hex"},y):n(g,y)};return x.createElement(xl,{style:f.Compact,styles:s},x.createElement("div",{style:f.compact,className:"compact-picker "+c},x.createElement("div",null,So(o,function(h){return x.createElement(PL,{key:h,color:h,active:h.toLowerCase()===i,onClick:p,onSwatchHover:r})}),x.createElement("div",{style:f.clear})),x.createElement(TL,{hex:i,rgb:a,onChange:p})))};U0.propTypes={colors:J.arrayOf(J.string),styles:J.object};U0.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:{}};Yt(U0);var OL=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=ye({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return x.createElement("div",{style:l.swatch},x.createElement(Co,{color:r,onClick:o,onHover:i,focusStyle:a}))};const BL=_0(OL);var V0=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,f=ye(Kt({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(g,y){return o({hex:g,source:"hex"},y)};return x.createElement("div",{style:f.card,className:"github-picker "+c},x.createElement("div",{style:f.triangleShadow}),x.createElement("div",{style:f.triangle}),So(r,function(h){return x.createElement(BL,{color:h,key:h,onClick:p,onSwatchHover:i})}))};V0.propTypes={width:J.oneOfType([J.string,J.number]),colors:J.arrayOf(J.string),triangle:J.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:J.object};V0.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Yt(V0);var ML=function(t){var n=t.direction,r=ye({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 x.createElement("div",{style:r.picker})},RL=Object.assign||function(e){for(var t=1;t.5});return x.createElement("div",{style:r.picker})},zL=function(){var t=ye({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 x.createElement("div",{style:t.pointer},x.createElement("div",{style:t.left},x.createElement("div",{style:t.leftInside})),x.createElement("div",{style:t.right},x.createElement("div",{style:t.rightInside})))},Tv=function(t){var n=t.onClick,r=t.label,o=t.children,i=t.active,a=ye({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 x.createElement("div",{style:a.button,onClick:n},r||o)},jL=function(t){var n=t.rgb,r=t.currentColor,o=ye({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 x.createElement("div",null,x.createElement("div",{style:o.label},"new"),x.createElement("div",{style:o.swatches},x.createElement("div",{style:o.new}),x.createElement("div",{style:o.current})),x.createElement("div",{style:o.label},"current"))},HL=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"},f))};return x.createElement("div",{style:l.fields,className:"flexbox-fix"},x.createElement("div",{style:l.double},x.createElement(ke,{style:{input:l.input,label:l.label},label:"hex",value:i.replace("#",""),onChange:s})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ke,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.alpha},x.createElement(ke,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},KL=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var ls=24,nz=AC.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,o=r===void 0?ls:r,i=e.height,a=i===void 0?ls:i,l=e.style,s=l===void 0?{}:l,u=tz(e,["fill","width","height","style"]);return Bv.default.createElement("svg",Ov({viewBox:"0 0 "+ls+" "+ls,style:Ov({fill:n,width:o,height:a},s)},u),Bv.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},rz=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=ye({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:I0(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 x.createElement(Co,{color:n,style:u.color,onClick:o,onHover:i,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:u.check},x.createElement(nz,null)))},oz=function(t){var n=t.onClick,r=t.onSwatchHover,o=t.group,i=t.active,a=ye({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return x.createElement("div",{style:a.group},So(o,function(l,s){return x.createElement(rz,{key:l,color:l,active:l.toLowerCase()===i,first:s===0,last:s===o.length-1,onClick:n,onSwatchHover:r})}))},J0=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,f=c===void 0?"":c,p=ye(Kt({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),h=function(y,C){return o({hex:y,source:"hex"},C)};return x.createElement("div",{style:p.picker,className:"swatches-picker "+f},x.createElement(xl,null,x.createElement("div",{style:p.overflow},x.createElement("div",{style:p.body},So(a,function(g){return x.createElement(oz,{key:g.toString(),group:g,active:l,onClick:h,onSwatchHover:i})}),x.createElement("div",{style:p.clear})))))};J0.propTypes={width:J.oneOfType([J.string,J.number]),height:J.oneOfType([J.string,J.number]),colors:J.arrayOf(J.arrayOf(J.string)),styles:J.object};J0.defaultProps={width:320,height:240,colors:[[_o[900],_o[700],_o[500],_o[300],_o[100]],[Do[900],Do[700],Do[500],Do[300],Do[100]],[Po[900],Po[700],Po[500],Po[300],Po[100]],[To[900],To[700],To[500],To[300],To[100]],[Oo[900],Oo[700],Oo[500],Oo[300],Oo[100]],[Bo[900],Bo[700],Bo[500],Bo[300],Bo[100]],[Mo[900],Mo[700],Mo[500],Mo[300],Mo[100]],[Ro[900],Ro[700],Ro[500],Ro[300],Ro[100]],[No[900],No[700],No[500],No[300],No[100]],["#194D33",ma[700],ma[500],ma[300],ma[100]],[Io[900],Io[700],Io[500],Io[300],Io[100]],[Lo[900],Lo[700],Lo[500],Lo[300],Lo[100]],[zo[900],zo[700],zo[500],zo[300],zo[100]],[jo[900],jo[700],jo[500],jo[300],jo[100]],[Ho[900],Ho[700],Ho[500],Ho[300],Ho[100]],[Go[900],Go[700],Go[500],Go[300],Go[100]],[Wo[900],Wo[700],Wo[500],Wo[300],Wo[100]],[Uo[900],Uo[700],Uo[500],Uo[300],Uo[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Yt(J0);var Q0=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,f=c===void 0?"":c,p=ye(Kt({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,C){jr(y)&&n({hex:y,source:"hex"},C)};return x.createElement("div",{style:p.card,className:"twitter-picker "+f},x.createElement("div",{style:p.triangleShadow}),x.createElement("div",{style:p.triangle}),x.createElement("div",{style:p.body},So(i,function(g,y){return x.createElement(Co,{key:y,color:g,hex:g,style:p.swatch,onClick:h,onHover:r,focusStyle:{boxShadow:"0 0 4px "+g}})}),x.createElement("div",{style:p.hash},"#"),x.createElement(ke,{label:null,style:{input:p.input},value:o.replace("#",""),onChange:h}),x.createElement("div",{style:p.clear})))};Q0.propTypes={width:J.oneOfType([J.string,J.number]),triangle:J.oneOf(["hide","top-left","top-right"]),colors:J.arrayOf(J.string),styles:J.object};Q0.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Yt(Q0);var Z0=function(t){var n=ye({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 x.createElement("div",{style:n.picker})};Z0.propTypes={hsl:J.shape({h:J.number,s:J.number,l:J.number,a:J.number})};Z0.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var eg=function(t){var n=ye({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 x.createElement("div",{style:n.picker})};eg.propTypes={hsl:J.shape({h:J.number,s:J.number,l:J.number,a:J.number})};eg.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var iz=function(t){var n=t.onChange,r=t.rgb,o=t.hsl,i=t.hex,a=t.hsv,l=function(h,g){if(h.hex)jr(h.hex)&&n({hex:h.hex,source:"hex"},g);else if(h.rgb){var y=h.rgb.split(",");qf(h.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},g)}else if(h.hsv){var C=h.hsv.split(",");qf(h.hsv,"hsv")&&(C[2]=C[2].replace("%",""),C[1]=C[1].replace("%",""),C[0]=C[0].replace("°",""),C[1]==1?C[1]=.01:C[2]==1&&(C[2]=.01),n({h:Number(C[0]),s:Number(C[1]),v:Number(C[2]),source:"hsv"},g))}else if(h.hsl){var m=h.hsl.split(",");qf(h.hsl,"hsl")&&(m[2]=m[2].replace("%",""),m[1]=m[1].replace("%",""),m[0]=m[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(m[0]),s:Number(m[1]),v:Number(m[2]),source:"hsl"},g))}},s=ye({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)+"%",f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return x.createElement("div",{style:s.wrap,className:"flexbox-fix"},x.createElement("div",{style:s.fields},x.createElement("div",{style:s.double},x.createElement(ke,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:l})),x.createElement("div",{style:s.column},x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"hsv",value:f,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ke,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:l})))))},tg=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,f=t.className,p=f===void 0?"":f,h=ye(Kt({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 x.createElement("div",{style:h.picker,className:"google-picker "+p},x.createElement("div",{style:h.head},s),x.createElement("div",{style:h.swatch}),x.createElement("div",{style:h.saturation},x.createElement(hc,{hsl:i,hsv:a,pointer:Z0,onChange:r})),x.createElement("div",{style:h.body},x.createElement("div",{style:h.controls,className:"flexbox-fix"},x.createElement("div",{style:h.hue},x.createElement(zi,{style:h.Hue,hsl:i,radius:"4px",pointer:eg,onChange:r}))),x.createElement(iz,{rgb:o,hsl:i,hex:l,hsv:a,onChange:r})))};tg.propTypes={width:J.oneOfType([J.string,J.number]),styles:J.object,header:J.string};tg.defaultProps={width:652,styles:{},header:"Color picker"};const az=Yt(tg);function Mv(e){const{onChange:t,value:n,allowGradients:r}=e,{colorUsages:o}=xe;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:Ei,height:Ei,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:[d("span",{style:{fontSize:"10px",backgroundColor:"white"},children:a.length},`${i}---usages`),/^var\(/.test(i)&&"var"]},i))}function az(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 lz=e=>{const t=w.useRef({});return w.useMemo(()=>(n,r)=>az(t,n,r,e),[])},sz=90;function uz(e){if(e.keyCode==sz&&e.ctrlKey)return e.preventDefault(),!1}function Ve(a){var l=a,{label:e,value:t,className:n,onChange:r,inputRef:o}=l,i=mn(l,["label","value","className","onChange","inputRef"]);return d("input",V({type:"text",ref:o,value:t,onChange:u=>r(u.target.value),onKeyDown:uz,className:"components-text-control__input",autoCapitalize:"off"},i))}var cz=function(t){if(fz(),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=$C(t),r=n[0],o=n[1],i=n[2],a=AC(t),l=a[0],s=a[1],u=a[2],c=0,f=0,p=0,h=-1,m=-1,y=0;yp)&&(m=p,h=y)}return{exactMatch:!1,colorName:Ft[h][1],closestColor:`#${Ft[h][0]}`}};const fz=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 $C(e){return[parseInt("0x"+e.substring(1,3)),parseInt("0x"+e.substring(3,5)),parseInt("0x"+e.substring(5,7))]}let Ft=[["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 dz=po(cz),_C=(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}}},pz={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},hz=e=>_C(pz[e.toLowerCase()],6),gz=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,mz=e=>{let t;return(t=e.match(gz))?_C(parseInt(t[1],16),t[1].length):void 0},Fr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Ta=`${Fr}%`,tg=`(?:${Fr}%|${Fr})`,vz=`(?:${Fr}(deg|grad|rad|turn)|${Fr})`,Ci="\\s*,\\s*",yz=new RegExp(`^rgba?\\(\\s*${Fr}${Ci}${Fr}${Ci}${Fr}\\s*(?:,\\s*${tg}\\s*)?\\)$`),bz=new RegExp(`^rgba?\\(\\s*${Ta}${Ci}${Ta}${Ci}${Ta}\\s*(?:,\\s*${tg}\\s*)?\\)$`),wz=e=>{let t={mode:"rgb"},n;if(n=e.match(yz))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(bz))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},gu=(e,t)=>e===void 0?void 0:typeof e!="object"?mc(e):e.mode!==void 0?e:t?ae(V({},e),{mode:t}):void 0,hn=(e="rgb")=>t=>(t=gu(t,e))!==void 0?t.mode===e?t:Pn[t.mode][e]?Pn[t.mode][e](t):e==="rgb"?Pn[t.mode].rgb(t):Pn.rgb[e](Pn[t.mode].rgb(t)):void 0,Pn={},DC={},mu=[],PC={},xz=e=>e,Pe=e=>(Pn[e.mode]=V(V({},Pn[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{Pn[t]||(Pn[t]={}),Pn[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=xz)}),DC[e.mode]=e,(e.parse||[]).forEach(t=>{Cz(t,e.mode)}),hn(e.mode)),gc=e=>DC[e],Cz=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");PC[e]=t}else typeof e=="function"&&mu.indexOf(e)<0&&mu.push(e)},jp=/[^\x00-\x7F]|[a-zA-Z_]/,Sz=/[^\x00-\x7F]|[-\w]/,W={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let ge=0;function ls(e){let t=e[ge],n=e[ge+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[ge+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Hp(e){if(ge>=e.length)return!1;let t=e[ge];if(jp.test(t))return!0;if(t==="-"){if(e.length-ge<2)return!1;let n=e[ge+1];return!!(n==="-"||jp.test(n))}return!1}const Ez={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ia(e){let t="";if((e[ge]==="-"||e[ge]==="+")&&(t+=e[ge++]),t+=ss(e),e[ge]==="."&&/\d/.test(e[ge+1])&&(t+=e[ge++]+ss(e)),(e[ge]==="e"||e[ge]==="E")&&((e[ge+1]==="-"||e[ge+1]==="+")&&/\d/.test(e[ge+2])?t+=e[ge++]+e[ge++]+ss(e):/\d/.test(e[ge+1])&&(t+=e[ge++]+ss(e))),Hp(e)){let n=vu(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:W.Hue,value:t*Ez[n]}:void 0}return e[ge]==="%"?(ge++,{type:W.Percentage,value:+t}):{type:W.Number,value:+t}}function ss(e){let t="";for(;/\d/.test(e[ge]);)t+=e[ge++];return t}function vu(e){let t="";for(;ge{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 sz=e=>{const t=w.useRef({});return w.useMemo(()=>(n,r)=>lz(t,n,r,e),[])},uz=90;function cz(e){if(e.keyCode==uz&&e.ctrlKey)return e.preventDefault(),!1}function Ve(a){var l=a,{label:e,value:t,className:n,onChange:r,inputRef:o}=l,i=mn(l,["label","value","className","onChange","inputRef"]);return d("input",V({type:"text",ref:o,value:t,onChange:u=>r(u.target.value),onKeyDown:cz,className:"components-text-control__input",autoCapitalize:"off"},i))}var fz=function(t){if(dz(),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=_C(t),r=n[0],o=n[1],i=n[2],a=$C(t),l=a[0],s=a[1],u=a[2],c=0,f=0,p=0,h=-1,g=-1,y=0;yp)&&(g=p,h=y)}return{exactMatch:!1,colorName:kt[h][1],closestColor:`#${kt[h][0]}`}};const dz=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 _C(e){return[parseInt("0x"+e.substring(1,3)),parseInt("0x"+e.substring(3,5)),parseInt("0x"+e.substring(5,7))]}let kt=[["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 pz=ho(fz),DC=(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}}},hz={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},gz=e=>DC(hz[e.toLowerCase()],6),mz=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,vz=e=>{let t;return(t=e.match(mz))?DC(parseInt(t[1],16),t[1].length):void 0},Fr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Ta=`${Fr}%`,ng=`(?:${Fr}%|${Fr})`,yz=`(?:${Fr}(deg|grad|rad|turn)|${Fr})`,Si="\\s*,\\s*",bz=new RegExp(`^rgba?\\(\\s*${Fr}${Si}${Fr}${Si}${Fr}\\s*(?:,\\s*${ng}\\s*)?\\)$`),wz=new RegExp(`^rgba?\\(\\s*${Ta}${Si}${Ta}${Si}${Ta}\\s*(?:,\\s*${ng}\\s*)?\\)$`),xz=e=>{let t={mode:"rgb"},n;if(n=e.match(bz))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(wz))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},mu=(e,t)=>e===void 0?void 0:typeof e!="object"?vc(e):e.mode!==void 0?e:t?ae(V({},e),{mode:t}):void 0,hn=(e="rgb")=>t=>(t=mu(t,e))!==void 0?t.mode===e?t:Pn[t.mode][e]?Pn[t.mode][e](t):e==="rgb"?Pn[t.mode].rgb(t):Pn.rgb[e](Pn[t.mode].rgb(t)):void 0,Pn={},PC={},vu=[],TC={},Cz=e=>e,Pe=e=>(Pn[e.mode]=V(V({},Pn[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{Pn[t]||(Pn[t]={}),Pn[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=Cz)}),PC[e.mode]=e,(e.parse||[]).forEach(t=>{Sz(t,e.mode)}),hn(e.mode)),mc=e=>PC[e],Sz=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");TC[e]=t}else typeof e=="function"&&vu.indexOf(e)<0&&vu.push(e)},Hp=/[^\x00-\x7F]|[a-zA-Z_]/,Ez=/[^\x00-\x7F]|[-\w]/,W={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let ge=0;function ss(e){let t=e[ge],n=e[ge+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[ge+2]):t==="."?/\d/.test(n):/\d/.test(t)}function Gp(e){if(ge>=e.length)return!1;let t=e[ge];if(Hp.test(t))return!0;if(t==="-"){if(e.length-ge<2)return!1;let n=e[ge+1];return!!(n==="-"||Hp.test(n))}return!1}const Fz={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ia(e){let t="";if((e[ge]==="-"||e[ge]==="+")&&(t+=e[ge++]),t+=us(e),e[ge]==="."&&/\d/.test(e[ge+1])&&(t+=e[ge++]+us(e)),(e[ge]==="e"||e[ge]==="E")&&((e[ge+1]==="-"||e[ge+1]==="+")&&/\d/.test(e[ge+2])?t+=e[ge++]+e[ge++]+us(e):/\d/.test(e[ge+1])&&(t+=e[ge++]+us(e))),Gp(e)){let n=yu(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:W.Hue,value:t*Fz[n]}:void 0}return e[ge]==="%"?(ge++,{type:W.Percentage,value:+t}):{type:W.Number,value:+t}}function us(e){let t="";for(;/\d/.test(e[ge]);)t+=e[ge++];return t}function yu(e){let t="";for(;ge4)){if(n.length===4){if(n[3].type!==W.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:W.None,value:void 0}),n.every(o=>o.type!==W.Alpha)?n:void 0}}function $z(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==W.Function)return;let r=TC(e,t);if(r)return r.unshift(n.value),r}const mc=e=>{if(typeof e!="string")return;const t=kz(e),n=t?$z(t,!0):void 0;let r,o=0,i=mu.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Pz=(e,t,n)=>e+n*(t-e),Tz=e=>{let t=[];for(let n=0;nt=>{let n=Tz(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)}},ee=Oz(Pz),lt=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},Hi={mode:"rgb",channels:["r","g","b","alpha"],parse:[_z,mz,wz,hz,Dz,"srgb"],serialize:"srgb",interpolate:{r:ee,g:ee,b:ee,alpha:{use:ee,fixup:lt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Jf=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Rv=e=>{let t=Jf(e.r),n=Jf(e.g),r=Jf(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},Qf=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Nv=({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:Qf(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:Qf(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:Qf(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},Zf=(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)},Gi=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:Zf(e),g:Zf(t),b:Zf(n)};return r!==void 0&&(o.alpha=r),o},So=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},ed=(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},Wi=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:ed(e),g:ed(t),b:ed(n)};return r!==void 0&&(i.alpha=r),i},Eo=({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=Wi({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},Bz=ae(V({},Hi),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Nv(So(e)),xyz65:Nv},toMode:{rgb:e=>Eo(Rv(e)),xyz65:Rv}}),wt=e=>(e=e%360)<0?e+360:e,Mz=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=wt(n);return r===0||e[r-1]===void 0?i:t(i-wt(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),[]),tr=e=>Mz(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),ft=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Rz=Math.PI/180,Nz=180/Math.PI;let Iv=ft[3]*ft[4],Lv=ft[1]*ft[4],zv=ft[1]*ft[2]-ft[0]*ft[3];const Iz=({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=(zv*n+e*Iv-t*Lv)/(zv+Iv-Lv),i=n-o,a=(ft[4]*(t-o)-ft[2]*i)/ft[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+a*a)/(ft[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(a,i)*Nz-120),r!==void 0&&(l.alpha=r),l},Lz=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Rz,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*(ft[0]*a+ft[1]*l),o.g=n+i*(ft[2]*a+ft[3]*l),o.b=n+i*(ft[4]*a+ft[5]*l),r!==void 0&&(o.alpha=r),o},vc=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=wt(e.h),r=wt(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},zz=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=wt(e.h),r=wt(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},yc=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=wt(e.h),r=wt(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},nr=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},jz={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Iz},toMode:{rgb:Lz},interpolate:{h:{use:ee,fixup:tr},s:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:vc},average:{h:nr}},Mr=({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=wt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},Rr=({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},OC=Math.pow(29,3)/Math.pow(3,3),BC=Math.pow(6,3)/Math.pow(29,3),rt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},pi={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let td=e=>Math.pow(e,3)>BC?Math.pow(e,3):(116*e-16)/OC;const MC=({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:td(i)*pi.X,y:td(o)*pi.Y,z:td(a)*pi.Z};return r!==void 0&&(l.alpha=r),l},bc=e=>Eo(MC(e)),nd=e=>e>BC?Math.cbrt(e):(OC*e+16)/116,RC=({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=nd(e/pi.X),i=nd(t/pi.Y),a=nd(n/pi.Z),l={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},wc=e=>{let t=RC(So(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},yu=1,NC=1,rl=26/180*Math.PI,bu=Math.cos(rl),wu=Math.sin(rl),IC=100/Math.log(139/100),Gp=({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*yu/IC)-1)/.0039},i=(Math.exp(.0435*t*NC*yu)-1)/.075,a=i*Math.cos(n/180*Math.PI-rl),l=i*Math.sin(n/180*Math.PI-rl);return o.a=a*bu-l/.83*wu,o.b=a*wu+l/.83*bu,r!==void 0&&(o.alpha=r),o},Wp=({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*bu+n*wu,i=.83*(n*bu-t*wu),a=Math.sqrt(o*o+i*i),l={mode:"dlch",l:IC/yu*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*NC*yu)};return l.c&&(l.h=wt((Math.atan2(i,o)+rl)/Math.PI*180)),r!==void 0&&(l.alpha=r),l},jv=e=>Gp(Mr(e,"dlch")),Hv=e=>Rr(Wp(e),"dlab"),Hz={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:jv,rgb:e=>bc(jv(e))},fromMode:{lab65:Hv,rgb:e=>Hv(wc(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},Gz={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Gp,dlab:e=>Rr(e,"dlab"),rgb:e=>bc(Gp(e))},fromMode:{lab65:Wp,dlab:e=>Mr(e,"dlch"),rgb:e=>Wp(wc(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ee,c:ee,h:{use:ee,fixup:tr},alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}};function Wz({h:e,s:t,i:n,alpha:r}){e=wt(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 Uz({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}},qz=new RegExp(`^hsla?\\(\\s*${vz}${Ci}${Ta}${Ci}${Ta}\\s*(?:,\\s*${tg}\\s*)?\\)$`),Jz=e=>{let t=e.match(qz);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=Xz(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 Qz(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Percentage)return;n.h=r.value}if(o.type!==W.None){if(o.type===W.Hue)return;n.s=o.value/100}if(i.type!==W.None){if(i.type===W.Hue)return;n.l=i.value/100}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const LC={mode:"hsl",toMode:{rgb:Kz},fromMode:{rgb:Yz},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qz,Jz],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:ee,fixup:tr},s:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:vc},average:{h:nr}};function zC({h:e,s:t,v:n,alpha:r}){e=wt(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 jC({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 zC({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function ej(e){let t=jC(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 tj(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Percentage)return;n.h=r.value}if(o.type!==W.None){if(o.type===W.Hue)return;n.w=o.value/100}if(i.type!==W.None){if(i.type===W.Hue)return;n.b=i.value/100}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const nj={mode:"hwb",toMode:{rgb:Zz},fromMode:{rgb:ej},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tj],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:ee,fixup:tr},w:ee,b:ee,alpha:{use:ee,fixup:lt}},difference:{h:zz},average:{h:nr}},GC=203,xc=.1593017578125,WC=78.84375,Cc=.8359375,Sc=18.8515625,Ec=18.6875;function rd(e){if(e<0)return 0;const t=Math.pow(e,1/WC);return 1e4*Math.pow(Math.max(0,t-Cc)/(Sc-Ec*t),1/xc)}function od(e){if(e<0)return 0;const t=Math.pow(e/1e4,xc);return Math.pow((Cc+Sc*t)/(1+Ec*t),WC)}const id=e=>Math.max(e/GC,0),Gv=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=rd(e+.008609037037932761*t+.11102962500302593*n),i=rd(e-.00860903703793275*t-.11102962500302599*n),a=rd(e+.5600313357106791*t-.32062717498731885*n),l={mode:"xyz65",x:id(2.070152218389422*o-1.3263473389671556*i+.2066510476294051*a),y:id(.3647385209748074*o+.680566024947227*i-.0453045459220346*a),z:id(-.049747207535812*o-.0492609666966138*i+1.1880659249923042*a)};return r!==void 0&&(l.alpha=r),l},ad=(e=0)=>Math.max(e*GC,0),Wv=({x:e,y:t,z:n,alpha:r})=>{const o=ad(e),i=ad(t),a=ad(n),l=od(.3592832590121217*o+.6976051147779502*i-.0358915932320289*a),s=od(-.1920808463704995*o+1.1004767970374323*i+.0753748658519118*a),u=od(.0070797844607477*o+.0748396662186366*i+.8433265453898765*a),c=.5*l+.5*s,f=1.61376953125*l-3.323486328125*s+1.709716796875*u,p=4.378173828125*l-4.24560546875*s-.132568359375*u,h={mode:"itp",i:c,t:f,p};return r!==void 0&&(h.alpha=r),h},rj={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Gv,rgb:e=>Eo(Gv(e))},fromMode:{xyz65:Wv,rgb:e=>Wv(So(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ee,t:ee,p:ee,alpha:{use:ee,fixup:lt}}},oj=134.03437499999998,ij=16295499532821565e-27,ld=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,xc);return Math.pow((Cc+Sc*t)/(1+Ec*t),oj)},sd=(e=0)=>Math.max(e*203,0),UC=({x:e,y:t,z:n,alpha:r})=>{e=sd(e),t=sd(t),n=sd(n);let o=1.15*e-.15*n,i=.66*t+.34*e,a=ld(.41478972*o+.579999*i+.014648*n),l=ld(-.20151*o+1.120649*i+.0531008*n),s=ld(-.0166008*o+.2648*i+.6684799*n),u=(a+l)/2,c={mode:"jab",j:.44*u/(1-.56*u)-ij,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},aj=134.03437499999998,Uv=16295499532821565e-27,ud=e=>{if(e<0)return 0;let t=Math.pow(e,1/aj);return 1e4*Math.pow((Cc-t)/(Ec*t-Sc),1/xc)},cd=e=>e/203,VC=({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+Uv)/(.44+.56*(e+Uv)),i=ud(o+.13860504*t+.058047316*n),a=ud(o-.13860504*t-.058047316*n),l=ud(o-.096019242*t-.8118919*n),s={mode:"xyz65",x:cd(1.661373024652174*i-.914523081304348*a+.23136208173913045*l),y:cd(-.3250758611844533*i+1.571847026732543*a-.21825383453227928*l),z:cd(-.090982811*i-.31272829*a+1.5227666*l)};return r!==void 0&&(s.alpha=r),s},KC=e=>{let t=UC(So(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},YC=e=>Eo(VC(e)),lj={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:KC,xyz65:UC},toMode:{rgb:YC,xyz65:VC},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},Vv=({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=wt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Kv=({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},sj={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Kv,rgb:e=>YC(Kv(e))},fromMode:{rgb:e=>Vv(KC(e)),jab:Vv},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ee,fixup:tr},c:ee,j:ee,alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}},Fc=Math.pow(29,3)/Math.pow(3,3),ng=Math.pow(6,3)/Math.pow(29,3);let fd=e=>Math.pow(e,3)>ng?Math.pow(e,3):(116*e-16)/Fc;const rg=({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:fd(i)*rt.X,y:fd(o)*rt.Y,z:fd(a)*rt.Z};return r!==void 0&&(l.alpha=r),l},Cl=({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=Wi({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},XC=e=>Cl(rg(e)),Sl=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},dd=e=>e>ng?Math.cbrt(e):(Fc*e+16)/116,og=({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=dd(e/rt.X),i=dd(t/rt.Y),a=dd(n/rt.Z),l={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},qC=e=>{let t=og(Sl(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function uj(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,a]=t;if(!(r.type===W.Hue||o.type===W.Hue||i.type===W.Hue))return r.type!==W.None&&(n.l=Math.min(Math.max(0,r.value),100)),o.type!==W.None&&(n.a=o.type===W.Number?o.value:o.value*125/100),i.type!==W.None&&(n.b=i.type===W.Number?i.value:i.value*125/100),a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const ig={mode:"lab",toMode:{xyz50:rg,rgb:XC},fromMode:{xyz50:og,rgb:qC},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[uj],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:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},cj=ae(V({},ig),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:MC,rgb:bc},fromMode:{xyz65:RC,rgb:wc},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}});function fj(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(o.type!==W.None&&(n.c=Math.max(0,o.type===W.Number?o.value:o.value*150/100)),i.type!==W.None){if(i.type===W.Percentage)return;n.h=i.value}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const ag={mode:"lch",toMode:{lab:Rr,rgb:e=>XC(Rr(e))},fromMode:{rgb:e=>Mr(qC(e)),lab:Mr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[fj],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:ee,fixup:tr},c:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}},dj=ae(V({},ag),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Rr(e,"lab65"),rgb:e=>bc(Rr(e,"lab65"))},fromMode:{rgb:e=>Mr(wc(e),"lch65"),lab65:e=>Mr(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),JC=({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=wt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},QC=({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},ZC=(e,t,n)=>4*e/(e+15*t+3*n),eS=(e,t,n)=>9*t/(e+15*t+3*n),pj=ZC(rt.X,rt.Y,rt.Z),hj=eS(rt.X,rt.Y,rt.Z),gj=e=>e<=ng?Fc*e:116*Math.cbrt(e)-16,Up=({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=gj(t/rt.Y),i=ZC(e,t,n),a=eS(e,t,n);!isFinite(i)||!isFinite(a)?o=i=a=0:(i=13*o*(i-pj),a=13*o*(a-hj));let l={mode:"luv",l:o,u:i,v:a};return r!==void 0&&(l.alpha=r),l},mj=(e,t,n)=>4*e/(e+15*t+3*n),vj=(e,t,n)=>9*t/(e+15*t+3*n),yj=mj(rt.X,rt.Y,rt.Z),bj=vj(rt.X,rt.Y,rt.Z),Vp=({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)+yj,i=n/(13*e)+bj,a=rt.Y*(e<=8?e/Fc: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},wj=e=>JC(Up(Sl(e))),xj=e=>Cl(Vp(QC(e))),Cj={mode:"lchuv",toMode:{luv:QC,rgb:xj},fromMode:{rgb:wj,luv:JC},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ee,fixup:tr},c:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}},Sj=ae(V({},Hi),{mode:"lrgb",toMode:{rgb:Wi},fromMode:{rgb:Gi},parse:["srgb-linear"],serialize:"srgb-linear"}),Ej={mode:"luv",toMode:{xyz50:Vp,rgb:e=>Cl(Vp(e))},fromMode:{xyz50:Up,rgb:e=>Up(Sl(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:ee,u:ee,v:ee,alpha:{use:ee,fixup:lt}}},tS=({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},kc=e=>{let t=tS(Gi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},El=({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},Ac=e=>Wi(El(e));function Kp(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function xu(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Fj(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,f=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let m=1+c*f,y=1+c*p,C=1+c*h,g=m*m*m,v=y*y*y,b=C*C*C,F=3*f*m*m,_=3*p*y*y,A=3*h*C*C,D=6*f*f*m,O=6*p*p*y,T=6*h*h*C,L=l*g+s*v+u*b,Q=l*F+s*_+u*A,B=l*D+s*O+u*T;c=c-L*Q/(Q*Q-.5*L*B)}return c}function lg(e,t){let n=Fj(e,t),r=El({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 kj(e,t,n,r,o,i=null){i||(i=lg(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,f=-.0894841775*e-1.291485548*t,p=l+s*u,h=l+s*c,m=l+s*f;{let y=o*(1-a)+a*n,C=a*r,g=y+C*u,v=y+C*c,b=y+C*f,F=g*g*g,_=v*v*v,A=b*b*b,D=3*p*g*g,O=3*h*v*v,T=3*m*b*b,L=6*p*p*g,Q=6*h*h*v,B=6*m*m*b,G=4.0767416621*F-3.3077115913*_+.2309699292*A-1,fe=4.0767416621*D-3.3077115913*O+.2309699292*T,me=4.0767416621*L-3.3077115913*Q+.2309699292*B,Se=fe/(fe*fe-.5*G*me),ie=-G*Se,z=-1.2684380046*F+2.6097574011*_-.3413193965*A-1,Z=-1.2684380046*D+2.6097574011*O-.3413193965*T,U=-1.2684380046*L+2.6097574011*Q-.3413193965*B,le=Z/(Z*Z-.5*z*U),R=-z*le,K=-.0041960863*F-.7034186147*_+1.707614701*A-1,X=-.0041960863*D-.7034186147*O+1.707614701*T,ne=-.0041960863*L-.7034186147*Q+1.707614701*B,P=X/(X*X-.5*K*ne),Y=-K*P;ie=Se>=0?ie:1e6,R=le>=0?R:1e6,Y=P>=0?Y:1e6,a+=Math.min(ie,Math.min(R,Y))}}}return a}function sg(e,t,n=null){n||(n=lg(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function nS(e,t,n){let r=lg(t,n),o=kj(t,n,e,1,e,r),i=sg(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,f=.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))),f,o]}function Yv(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:Kp(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]=nS(t,n/i,r/i),u;if(iYv(kc(e))},toMode:{oklab:Xv,rgb:e=>Ac(Xv(e))}});function qv(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]=sg(i,a),u=.5,c=1-u/l,f=s/(o+t*s),p=f*t,h=f*o,m=xu(p),y=h*m/p,C=El({l:m,a:i*y,b:a*y}),g=Math.cbrt(1/Math.max(C.r,C.g,C.b,0));t=t/g,o=o/g*Kp(t)/t,t=Kp(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=wt(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function Jv(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]=sg(i,a),u=.5,c=1-u/l,f=1-r*u/(u+s-s*c*r),p=r*s*u/(u+s-s*c*r),h=xu(f),m=p*h/f,y=El({l:h,a:i*m,b:a*m}),C=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),g=xu(o*f),v=p*g/f;return t.l=g*C,t.a=v*i*C,t.b=v*a*C,t}const $j=ae(V({},HC),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:qv,rgb:e=>qv(kc(e))},toMode:{oklab:Jv,rgb:e=>Ac(Jv(e))}});function _j(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,a]=t;if(!(r.type===W.Hue||o.type===W.Hue||i.type===W.Hue))return r.type!==W.None&&(n.l=Math.min(Math.max(0,r.type===W.Number?r.value:r.value/100),1)),o.type!==W.None&&(n.a=o.type===W.Number?o.value:o.value*.4/100),i.type!==W.None&&(n.b=i.type===W.Number?i.value:i.value*.4/100),a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const Dj=ae(V({},ig),{mode:"oklab",toMode:{lrgb:El,rgb:Ac},fromMode:{lrgb:tS,rgb:kc},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[_j],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 Pj(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Hue)return;n.l=Math.min(Math.max(0,r.type===W.Number?r.value:r.value/100),1)}if(o.type!==W.None&&(n.c=Math.max(0,o.type===W.Number?o.value:o.value*.4/100)),i.type!==W.None){if(i.type===W.Percentage)return;n.h=i.value}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const Tj=ae(V({},ag),{mode:"oklch",toMode:{oklab:e=>Rr(e,"oklab"),rgb:e=>Ac(Rr(e,"oklab"))},fromMode:{rgb:e=>Mr(kc(e),"oklch"),oklab:e=>Mr(e,"oklch")},parse:[Pj],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]}}),Qv=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},Zv=({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=Wi({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},Oj=ae(V({},Hi),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Zv(So(e)),xyz65:Zv},toMode:{rgb:e=>Eo(Qv(e)),xyz65:Qv}}),pd=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},ey=({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:pd(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:pd(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:pd(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},hd=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},ty=e=>{let t=hd(e.r),n=hd(e.g),r=hd(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},Bj=ae(V({},Hi),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ey,rgb:e=>ey(Sl(e))},toMode:{xyz50:ty,rgb:e=>Cl(ty(e))}}),ny=1.09929682680944,Mj=.018053968510807,gd=e=>{const t=Math.abs(e);return t>Mj?(Math.sign(e)||1)*(ny*Math.pow(t,.45)-(ny-1)):4.5*e},ry=({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:gd(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:gd(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:gd(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},oy=1.09929682680944,Rj=.018053968510807,md=(e=0)=>{let t=Math.abs(e);return t{let t=md(e.r),n=md(e.g),r=md(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},Nj=ae(V({},Hi),{mode:"rec2020",fromMode:{xyz65:ry,rgb:e=>ry(So(e))},toMode:{xyz65:iy,rgb:e=>Eo(iy(e))},parse:["rec2020"],serialize:"rec2020"}),eo=.0037930732552754493,rS=Math.cbrt(eo),vd=e=>Math.cbrt(e)-rS,Ij=e=>{const{r:t,g:n,b:r,alpha:o}=Gi(e),i=vd(.3*t+.622*n+.078*r+eo),a=vd(.23*t+.692*n+.078*r+eo),l=vd(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+eo),s={mode:"xyb",x:(i-a)/2,y:(i+a)/2,b:l-(i+a)/2};return o!==void 0&&(s.alpha=o),s},yd=e=>Math.pow(e+rS,3),Lj=({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=yd(e+t)-eo,i=yd(t-e)-eo,a=yd(n+t)-eo,l=Wi({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},zj={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Lj},fromMode:{rgb:Ij},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ee,y:ee,b:ee,alpha:{use:ee,fixup:lt}}},jj={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Cl,lab:og},fromMode:{rgb:Sl,lab:rg},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ee,y:ee,z:ee,alpha:{use:ee,fixup:lt}}},Hj=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},Gj=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},Wj={mode:"xyz65",toMode:{rgb:Eo,xyz50:Hj},fromMode:{rgb:So,xyz50:Gj},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:ee,y:ee,z:ee,alpha:{use:ee,fixup:lt}}},Uj=({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},Vj=({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},Kj={mode:"yiq",toMode:{rgb:Vj},fromMode:{rgb:Uj},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ee,i:ee,q:ee,alpha:{use:ee,fixup:lt}}},Yj=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Xj=(e=4)=>t=>typeof t=="number"?Yj(t,e):t;let us=Xj(2);const Ts=e=>Math.max(0,Math.min(1,e||0)),bd=e=>Math.round(Ts(e)*255),qj=hn("rgb"),Jj=hn("hsl"),Qj=e=>{if(e===void 0)return;let t=bd(e.r),n=bd(e.g),r=bd(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},Zj=e=>{if(e===void 0)return;const t=us(e.h||0),n=us(Ts(e.s)*100)+"%",r=us(Ts(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${n}, ${r})`:`hsla(${t}, ${n}, ${r}, ${us(Ts(e.alpha))})`},oS=e=>Qj(qj(e)),eH=e=>Zj(Jj(e)),iS=hn("rgb"),aS=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},tH=e=>aS(iS(e)),lS=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 nH(e){return lS(iS(e))}function sS(e="rgb"){const{gamut:t}=gc(e);if(!t)return r=>!0;const n=hn(typeof t=="string"?t:e);return r=>lS(n(r))}function ug(e="rgb"){const{gamut:t}=gc(e);if(!t)return i=>gu(i);const n=typeof t=="string"?t:e,r=hn(n),o=sS(n);return i=>{const a=gu(i);if(!a)return;const l=r(a);if(o(l))return a;const s=aS(l);return a.mode===s.mode?s:hn(a.mode)(s)}}function Si(e,t="lch",n="rgb"){e=gu(e);let r=n==="rgb"?nH:sS(n),o=n==="rgb"?tH:ug(n);if(e===void 0||r(e))return e;let i=hn(e.mode);e=hn(t)(e);let a=ae(V({},e),{c:0});if(!r(a))return i(o(a));let l=0,s=e.c!==void 0?e.c:0,u=gc(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=a.c;for(;s-l>c;)a.c=l+(s-l)*.5,r(a)?(f=a.c,l=a.c):s=a.c;return i(r(a)?a:ae(V({},a),{c:f}))}Pe(Bz);Pe(jz);Pe(Hz);Pe(Gz);Pe(Vz);Pe(LC);Pe(HC);Pe(nj);Pe(rj);Pe(lj);Pe(sj);Pe(ig);Pe(cj);Pe(ag);Pe(dj);Pe(Cj);Pe(Sj);Pe(Ej);Pe(Aj);Pe($j);Pe(Dj);Pe(Tj);Pe(Oj);Pe(Bj);Pe(Nj);Pe(Hi);Pe(zj);Pe(jj);Pe(Wj);Pe(Kj);const rH=/[^\w\-]/,oH=hn("rgb");function ay(e){const{value:t,origValue:n}=e,r=gn(),[o,i]=w.useState(!1),[a,l]=w.useState(!1),s=w.useMemo(()=>{if(!a)return null;const f=mc(t);if(f){const p=oH(ug("rgb")(f)),{alpha:h=1}=p,m=h===1?"":` ${h.toString().replace(".","")}`;return dz(oS(p)).colorName.toLowerCase().replace(rH,"")+m}return""},[a]),[u,c]=w.useState("");return o?k(w.Fragment,{children:[d(Ve,{value:u||s,onChange:c}),d("button",{onClick:()=>{r({type:Me.createAlias,payload:{name:u||s,value:n}})},children:"submit"}),d("button",{onClick:()=>i(!1),children:"cancel"})]}):d("button",{onClick:()=>{l(!0),i(!0)},children:"Add alias"})}function iH(e){return d("option",{value:e.value,children:e.label},e.value)}function kt(e){const{options:t=[],value:n,onChange:r,title:o,style:i}=e,a=w.useCallback(s=>{r(s.target.value)},[r]),l=w.useMemo(()=>t.map(iH),t);return d("select",{value:n,onChange:a,title:o,style:i,children:l})}const aH=hn("oklch");function kr(e){return aH(e)}const uS=0,cS=1,Cu=.01,fS=.001;function lH(e,t){let n=1/0,r=uS,o=mc(`oklch(${r}% ${e} ${t})`);for(;r=n)break}const i=r;for(r-=Cu,n=1/0;r=n)break}return r*100}function sH(e,t){let n=1/0,r=cS,o=mc(`oklch(${r}% ${e} ${t})`);for(;r>uS;){r-=Cu;const a=Math.abs(Si(ae(V({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r*100;if(a>=n)break}const i=r;for(r-=Cu,n=1/0;r>i;){r-=fS;const a=Math.abs(Si(ae(V({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r;if(a>=n)break}return r*100}function uH({l:e,c:t,h:n,a:r=100}){return d("a",{href:`https://oklch.com/#${e},${t},${n},${r}`,target:"_blank",children:"online picker"})}function zn(e,t,n,r){const o=r===1?"":`/ ${r.toFixed(2)}`;return`oklch(${e.toFixed(2)}% ${t.toFixed(3)} ${n.toFixed(2)}${o})`}function cH({value:e,onChange:t}){const{l:n,c:r,h:o=0,alpha:i=1}=kr(e)||{l:0,c:0,h:0,alpha:1},a=100*n,l=Si(`oklch(${a}% 0.4 ${o})`,"oklch","p3"),s=(l==null?void 0:l.c)||0,u=r-s>.001,c=lH(r,o),f=sH(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":`${f}%`,"--max-lightness-scalar":f},children:[d("div",{className:"lightness",onDrop:p=>{const h=p.dataTransfer.getData("value"),{l:m}=kr(h);m>0&&(p.preventDefault(),p.stopPropagation(),t(zn(m*100,r,o,i)))},children:d("input",{onChange:p=>t(zn(Number(p.target.value),r,o,i)),id:"lightness",type:"range",min:0,max:100,value:a,step:.1})}),d("div",{className:"chroma",children:d("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(zn(a,h,o,i))}})}),d("div",{className:"hue",onDrop:p=>{const h=p.dataTransfer.getData("value");if(!h)return;const{h:m}=kr(h);p.preventDefault(),p.stopPropagation(),t(zn(a,r,m,i))},children:d("input",{id:"hue",type:"range",min:0,max:360,value:o,step:.1,onChange:p=>t(zn(a,r,Number(p.target.value),i))})}),d("div",{className:"alpha",children:d("input",{id:"alpha",type:"range",min:0,max:1,value:i,step:.01,onChange:p=>t(zn(a,r,o,Number(p.target.value)))})}),d(uH,{l:a,c:r,h:o}),!e.startsWith("oklch(")&&d("button",{onClick:()=>{t(zn(a,r,o,i))},children:"convert"}),u&&d("span",{style:{color:"red",fontWeight:"bold"},children:"NOT IN GAMUT"})]})}const Su=/(#[\da-fA-F]{3}|rgba?\()|oklch\(/,ol=/(linear|radial|conic)-gradient\(.+\)/,fH=/^(--var-control|--server-theme|--theme-editor)/,Ei="39px",ly=(e,t)=>t===1?e.toHexString():e.setAlpha(t).toRgbString(),dH=(e,[t,n])=>(/px/.test(n)||(Su.test(n)||ol.test(n))&&(n in e||(e[n]={color:n,usages:[],isGradient:ol.test(n)}),e[n].usages.push(t)),e),pH=(e,t)=>{if(e===null)return[];const n=V(V({},t),e);return Object.values(Object.entries(n).filter(([r])=>!fH.test(r)).reduce(dH,{}))},hH=({color:e},{color:t})=>{const n=Br(e).toHex(),r=Br(t).toHex();return n===r?e===t?0:e({label:e,value:e})),mH=hn("rgb"),vH=e=>{const{onChange:t,onUnset:n,value:r,resolvedValue:o,cssVar:i,cssFunc:a}=e,l=mH(ug("hsl")(o))||{},s=o,{nativeColorPicker:u}=xe,{name:c,usages:f}=i,p=gn(),h=lz({ms:20}),m=l.alpha||1,y=!f.some(({property:D})=>D!=="background"),C=eH(l),g=oS(l),[v,b]=be("color-picker-variant","chrome"),F=dS[v],[_,A]=be("ok-picker",!1);return u?k("div",{style:{minHeight:"120px",clear:"both"},children:[d(ay,{value:s,origValue:r},s),d("input",{type:"color",style:{width:sy,height:sy,float:"right",opacity:m},value:g,onChange:D=>{const O=Br(D.target.value),T=ly(O,m);h(t,T)}}),d("input",{type:"number",style:{float:"right"},min:0,max:1,step:.05,value:l.a,onChange:D=>{const O=Number(D.target.value),T=Br(s);t(ly(T,O))}}),d("button",{onClick:()=>{s==="transparent"?p({type:Me.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",float:"right",width:Ei,opacity:s==="transparent"?1:.4},children:"👻"}),d("div",{style:{clear:"both"},children:d(Mv,{value:s,onChange:t,name:c,allowGradients:y})})]}):k(w.Fragment,{children:[_&&d(cH,{value:s,onChange:t}),k("div",{style:{display:"flex",clear:"both"},children:[d(ay,{value:s,origValue:r},s),k("div",{style:{display:"flex"},children:[d("button",{style:{borderTopRightRadius:0,borderBottomRightRadius:0,marginRight:0,borderRight:"none"},onClick:()=>A(!1),disabled:!_,children:"rgb/hsl"}),d("button",{style:{borderTopLeftRadius:0,borderBottomLeftRadius:0},onClick:()=>A(!0),disabled:_,children:"oklch"})]})]}),!_&&k(w.Fragment,{children:[d(F,{header:"",width:"100%",styles:{picker:{width:"100%"}},color:C,onChange:D=>{const O=D.rgb.a!==1,{r:T,g:L,b:Q,a:B}=D.rgb;t(O?`rgba(${T} , ${L}, ${Q}, ${B})`:D.hex)}}),k("div",{children:[d(Ve,{style:{marginTop:"6px"},value:s,onChange:D=>t(D,!0)}),d("button",{onClick:()=>{s==="transparent"?p({type:Me.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",opacity:s==="transparent"?1:.4},children:"👻"}),d(kt,{title:"Change color picker style",style:{float:"right"},options:gH,value:v,onChange:b})]})]}),d(Mv,{value:s,onChange:t,name:c,allowGradients:y})]})},te={isSimpleSizes:()=>be("isSimpleSizes",!0),screenOptions:()=>[xe.isSimpleSizes?NF:IF],width:()=>st("width",1024),height:()=>st("height",768),scales:()=>st("scales",{}),uiLayout:()=>st("uiLayout",{map:{}}),propertyFilter:()=>st("propertyFilter","all"),search:()=>st("search",""),filteredSelectors:()=>[[]],showRawValues:()=>st("showRawValues",!1),excludedRawValues:()=>st("excludedRawValues",["initial","none"]),frameClickBehavior:()=>pr("frameClickBehavior","any"),enableScrollingInView:()=>be("enableScrollingInView",!0),nativeColorPicker:()=>be("nativeColorPicker",!1),includeDefaultPalette:()=>be("includeDefaultPalette",!1),colorUsages:()=>[Hr(e=>pH(e.themeEditor.scopes[Lt],e.includeDefaultPalette?dY():{}).sort(hH))],fileName:()=>st("fileName","theme"),annoyingPrefix:()=>be("annoyingPrefix",""),nameReplacements:()=>be("nameReplacements",[]),showCssProperties:()=>be("showCssProperties",!0),linkCssProperties:()=>be("linkCssProperties",!1),showSourceLinks:()=>be("showSourceLinks",!1),windowArrangments:()=>be("windowArrangments",{}),webpackHome:()=>be("webpackHome",""),visualizeHistory:()=>be("visualizeHistory",!1),visualizeHistoryAlways:()=>be("visualizeHistoryAlways",!0),showScrolls:()=>be("showScrolls",!0),svgDarkBg:()=>be("svgDarkBg",!1),inspectedPath:()=>Tn("inspectedPath",""),openGroups:()=>Tn("openGroups",{}),frameLoaded:()=>pr("frameLoaded",!1),openFirstOnInspect:()=>be("open-first-inspect",!0),serverThemes:()=>HF(),existsOnServer:()=>[xe.fileName in xe.serverThemes],localThemeJson:()=>[Hr(e=>JSON.stringify(e.themeEditor.scopes))],remoteThemeJson:()=>[Hr(e=>{var t;return JSON.stringify((t=e.serverThemes[e.fileName])==null?void 0:t.scopes)})],modifiedServerVersion:()=>[Hr(e=>{const t=e.localThemeJson!==e.remoteThemeJson;return e.existsOnServer&&t})],themeEditor:()=>u4(),fullHeightFrameShowFixed:()=>pr("fullHeightFrameShowFixed",!0),fullHeightFrameScale:()=>st("fullHeightFrameScale",.05),elementSelectionMode:()=>pr("elementSelectionMode",!1),maximizeChroma:()=>be("maximizeChroma",!1),pickedValue:()=>pr("pickedValue",""),pickedHue:()=>[Hr(e=>{var t;return(t=kr(e.pickedValue))==null?void 0:t.h})],palette:()=>be("palette",[]),savedSelectors:()=>be("savedSelectors",[]),note:()=>Tn("note",""),area:()=>[Hr(e=>e.width*e.height)],areaDoubled:()=>[Hr(e=>e.area*2)],areaNomemo:()=>[xe.width*xe.height]};console.time("Getters and signals");const xe=MF(te);RF(te);console.timeEnd("Getters and signals");const uy={};let cy=0;const yH=()=>{++cy;for(const e in uy)uy[e](cy)},va={enableOnTags:["INPUT","SELECT","RADIO"]};function bH(e){const{frameRef:t}=e;return k(w.Fragment,{children:[d(wd,{keys:"alt+r",updater:yH}),d(wd,{keys:"alt+s",hook:()=>[xe.fileName,xe.modifiedServerVersion,xe.themeEditor.scopes,te.serverThemes()],updater:(n,r,o,[,{uploadTheme:i}])=>{n&&n!=="default"&&r&&i(n,o)}}),d(wd,{keys:"alt+a",hook:te.frameClickBehavior,updater:(n,r)=>{const o=n==="alt"?"any":"alt";r(o),t.current.contentDocument.documentElement.classList.toggle("force-cursor",o!=="alt")}})]})}function wd({keys:e,hook:t=()=>[],updater:n=(r,o)=>{}}){const[...r]=t();ri(e,()=>{n(...r)},va,[r])}let $c;const Yp=window.indexedDB.open("history",1),so="actions";Yp.onupgradeneeded=function(e){const t=e.target.result;t.onerror=function(n){console.log("upgrade failed",n)},t.createObjectStore(so,{autoIncrement:!0})};const Eu="history-start-snapshot";let pS=JSON.parse(localStorage.getItem(Eu)),wH=0,Xp;Yp.onsuccess=function(e){window.self===window.top&&($c=Yp.result)};function xH(){if(window.self!==window.top)return;const t=$c.transaction([so],"readonly").objectStore(so);t.getAll().onsuccess=n=>{const r=n.target.result;jH(new Map(pS)),vS(r),Xp=wH===0,AH(),UH()}}let Fu=1/0;function uo(e,t,n){if(Xp){const i=JSON.stringify([...at.entries()].filter(([a])=>te.hasOwnProperty(a)));localStorage.setItem(Eu,i),localStorage.setItem("originalUrl",window.location.href),Xp=!1,pS=i}const o=$c.transaction([so],"readwrite").objectStore(so);if(t){const i=IDBKeyRange.lowerBound(n);o.delete(i)}n<=Fu&&(e[0].push(window.location.href),Fu=n),o.put(e,n)}function cg(e=!1,t=null){const n=performance.now(),r=$c.transaction([so],"readwrite");if(r.oncomplete=i=>{console.log("Deleted store in",performance.now()-n)},r.objectStore(so).clear(),localStorage.removeItem(Eu),t){const i=JSON.stringify([...t.entries()].filter(([a])=>dg.includes(a)));localStorage.setItem(Eu,i)}Fu=1/0,console.log("Start store delete transaction in ",performance.now()-n)}const CH=(e,t)=>{hS({scopes:t},e)};function hS(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 SH=e=>Object.keys(e).map(n=>` ${n}: ${e[n]};`).join(` -`);function EH(e){return Object.entries(e).map(([t,n])=>`${t} { -${SH(n)} +`||t[ge]===" "||t[ge]===" ");)ge++;continue}if(r===",")return;if(r===")"){n.push({type:W.ParenClose});continue}if(r==="+"){if(ge--,ss(t)){n.push(ia(t));continue}return}if(r==="-"){if(ge--,ss(t)){n.push(ia(t));continue}if(Gp(t)){n.push({type:W.Ident,value:yu(t)});continue}return}if(r==="."){if(ge--,ss(t)){n.push(ia(t));continue}return}if(r==="/"){for(;ge4)){if(n.length===4){if(n[3].type!==W.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:W.None,value:void 0}),n.every(o=>o.type!==W.Alpha)?n:void 0}}function _z(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==W.Function)return;let r=OC(e,t);if(r)return r.unshift(n.value),r}const vc=e=>{if(typeof e!="string")return;const t=Az(e),n=t?_z(t,!0):void 0;let r,o=0,i=vu.length;for(;oe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Tz=(e,t,n)=>e+n*(t-e),Oz=e=>{let t=[];for(let n=0;nt=>{let n=Oz(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)}},ee=Bz(Tz),lt=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},Hi={mode:"rgb",channels:["r","g","b","alpha"],parse:[Dz,vz,xz,gz,Pz,"srgb"],serialize:"srgb",interpolate:{r:ee,g:ee,b:ee,alpha:{use:ee,fixup:lt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Qf=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Rv=e=>{let t=Qf(e.r),n=Qf(e.g),r=Qf(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},Zf=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Nv=({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:Zf(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:Zf(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:Zf(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(o.alpha=r),o},ed=(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)},Gi=({r:e,g:t,b:n,alpha:r})=>{let o={mode:"lrgb",r:ed(e),g:ed(t),b:ed(n)};return r!==void 0&&(o.alpha=r),o},Eo=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},td=(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},Wi=({r:e,g:t,b:n,alpha:r},o="rgb")=>{let i={mode:o,r:td(e),g:td(t),b:td(n)};return r!==void 0&&(i.alpha=r),i},Fo=({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=Wi({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},Mz=ae(V({},Hi),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Nv(Eo(e)),xyz65:Nv},toMode:{rgb:e=>Fo(Rv(e)),xyz65:Rv}}),xt=e=>(e=e%360)<0?e+360:e,Rz=(e,t)=>e.map((n,r,o)=>{if(n===void 0)return n;let i=xt(n);return r===0||e[r-1]===void 0?i:t(i-xt(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),[]),tr=e=>Rz(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),ft=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Nz=Math.PI/180,Iz=180/Math.PI;let Iv=ft[3]*ft[4],Lv=ft[1]*ft[4],zv=ft[1]*ft[2]-ft[0]*ft[3];const Lz=({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=(zv*n+e*Iv-t*Lv)/(zv+Iv-Lv),i=n-o,a=(ft[4]*(t-o)-ft[2]*i)/ft[3],l={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(i*i+a*a)/(ft[4]*o*(1-o))};return l.s&&(l.h=Math.atan2(a,i)*Iz-120),r!==void 0&&(l.alpha=r),l},zz=({h:e,s:t,l:n,alpha:r})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Nz,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*(ft[0]*a+ft[1]*l),o.g=n+i*(ft[2]*a+ft[3]*l),o.b=n+i*(ft[4]*a+ft[5]*l),r!==void 0&&(o.alpha=r),o},yc=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=xt(e.h),r=xt(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},jz=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=xt(e.h),r=xt(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},bc=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=xt(e.h),r=xt(t.h),o=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},nr=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},Hz={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Lz},toMode:{rgb:zz},interpolate:{h:{use:ee,fixup:tr},s:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}},Mr=({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=xt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},Rr=({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},BC=Math.pow(29,3)/Math.pow(3,3),MC=Math.pow(6,3)/Math.pow(29,3),rt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},hi={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let nd=e=>Math.pow(e,3)>MC?Math.pow(e,3):(116*e-16)/BC;const RC=({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:nd(i)*hi.X,y:nd(o)*hi.Y,z:nd(a)*hi.Z};return r!==void 0&&(l.alpha=r),l},wc=e=>Fo(RC(e)),rd=e=>e>MC?Math.cbrt(e):(BC*e+16)/116,NC=({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=rd(e/hi.X),i=rd(t/hi.Y),a=rd(n/hi.Z),l={mode:"lab65",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},xc=e=>{let t=NC(Eo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},bu=1,IC=1,rl=26/180*Math.PI,wu=Math.cos(rl),xu=Math.sin(rl),LC=100/Math.log(139/100),Wp=({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*bu/LC)-1)/.0039},i=(Math.exp(.0435*t*IC*bu)-1)/.075,a=i*Math.cos(n/180*Math.PI-rl),l=i*Math.sin(n/180*Math.PI-rl);return o.a=a*wu-l/.83*xu,o.b=a*xu+l/.83*wu,r!==void 0&&(o.alpha=r),o},Up=({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*wu+n*xu,i=.83*(n*wu-t*xu),a=Math.sqrt(o*o+i*i),l={mode:"dlch",l:LC/bu*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*IC*bu)};return l.c&&(l.h=xt((Math.atan2(i,o)+rl)/Math.PI*180)),r!==void 0&&(l.alpha=r),l},jv=e=>Wp(Mr(e,"dlch")),Hv=e=>Rr(Up(e),"dlab"),Gz={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:jv,rgb:e=>wc(jv(e))},fromMode:{lab65:Hv,rgb:e=>Hv(xc(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},Wz={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Wp,dlab:e=>Rr(e,"dlab"),rgb:e=>wc(Wp(e))},fromMode:{lab65:Up,dlab:e=>Mr(e,"dlch"),rgb:e=>Up(xc(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:ee,c:ee,h:{use:ee,fixup:tr},alpha:{use:ee,fixup:lt}},difference:{h:bc},average:{h:nr}};function Uz({h:e,s:t,i:n,alpha:r}){e=xt(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 Vz({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}},Jz=new RegExp(`^hsla?\\(\\s*${yz}${Si}${Ta}${Si}${Ta}\\s*(?:,\\s*${ng}\\s*)?\\)$`),Qz=e=>{let t=e.match(Jz);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=qz(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 Zz(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Percentage)return;n.h=r.value}if(o.type!==W.None){if(o.type===W.Hue)return;n.s=o.value/100}if(i.type!==W.None){if(i.type===W.Hue)return;n.l=i.value/100}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const zC={mode:"hsl",toMode:{rgb:Yz},fromMode:{rgb:Xz},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Zz,Qz],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:ee,fixup:tr},s:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:yc},average:{h:nr}};function jC({h:e,s:t,v:n,alpha:r}){e=xt(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 HC({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 jC({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function tj(e){let t=HC(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 nj(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Percentage)return;n.h=r.value}if(o.type!==W.None){if(o.type===W.Hue)return;n.w=o.value/100}if(i.type!==W.None){if(i.type===W.Hue)return;n.b=i.value/100}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const rj={mode:"hwb",toMode:{rgb:ej},fromMode:{rgb:tj},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[nj],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:ee,fixup:tr},w:ee,b:ee,alpha:{use:ee,fixup:lt}},difference:{h:jz},average:{h:nr}},WC=203,Cc=.1593017578125,UC=78.84375,Sc=.8359375,Ec=18.8515625,Fc=18.6875;function od(e){if(e<0)return 0;const t=Math.pow(e,1/UC);return 1e4*Math.pow(Math.max(0,t-Sc)/(Ec-Fc*t),1/Cc)}function id(e){if(e<0)return 0;const t=Math.pow(e/1e4,Cc);return Math.pow((Sc+Ec*t)/(1+Fc*t),UC)}const ad=e=>Math.max(e/WC,0),Gv=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const o=od(e+.008609037037932761*t+.11102962500302593*n),i=od(e-.00860903703793275*t-.11102962500302599*n),a=od(e+.5600313357106791*t-.32062717498731885*n),l={mode:"xyz65",x:ad(2.070152218389422*o-1.3263473389671556*i+.2066510476294051*a),y:ad(.3647385209748074*o+.680566024947227*i-.0453045459220346*a),z:ad(-.049747207535812*o-.0492609666966138*i+1.1880659249923042*a)};return r!==void 0&&(l.alpha=r),l},ld=(e=0)=>Math.max(e*WC,0),Wv=({x:e,y:t,z:n,alpha:r})=>{const o=ld(e),i=ld(t),a=ld(n),l=id(.3592832590121217*o+.6976051147779502*i-.0358915932320289*a),s=id(-.1920808463704995*o+1.1004767970374323*i+.0753748658519118*a),u=id(.0070797844607477*o+.0748396662186366*i+.8433265453898765*a),c=.5*l+.5*s,f=1.61376953125*l-3.323486328125*s+1.709716796875*u,p=4.378173828125*l-4.24560546875*s-.132568359375*u,h={mode:"itp",i:c,t:f,p};return r!==void 0&&(h.alpha=r),h},oj={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Gv,rgb:e=>Fo(Gv(e))},fromMode:{xyz65:Wv,rgb:e=>Wv(Eo(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:ee,t:ee,p:ee,alpha:{use:ee,fixup:lt}}},ij=134.03437499999998,aj=16295499532821565e-27,sd=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,Cc);return Math.pow((Sc+Ec*t)/(1+Fc*t),ij)},ud=(e=0)=>Math.max(e*203,0),VC=({x:e,y:t,z:n,alpha:r})=>{e=ud(e),t=ud(t),n=ud(n);let o=1.15*e-.15*n,i=.66*t+.34*e,a=sd(.41478972*o+.579999*i+.014648*n),l=sd(-.20151*o+1.120649*i+.0531008*n),s=sd(-.0166008*o+.2648*i+.6684799*n),u=(a+l)/2,c={mode:"jab",j:.44*u/(1-.56*u)-aj,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},lj=134.03437499999998,Uv=16295499532821565e-27,cd=e=>{if(e<0)return 0;let t=Math.pow(e,1/lj);return 1e4*Math.pow((Sc-t)/(Fc*t-Ec),1/Cc)},fd=e=>e/203,KC=({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+Uv)/(.44+.56*(e+Uv)),i=cd(o+.13860504*t+.058047316*n),a=cd(o-.13860504*t-.058047316*n),l=cd(o-.096019242*t-.8118919*n),s={mode:"xyz65",x:fd(1.661373024652174*i-.914523081304348*a+.23136208173913045*l),y:fd(-.3250758611844533*i+1.571847026732543*a-.21825383453227928*l),z:fd(-.090982811*i-.31272829*a+1.5227666*l)};return r!==void 0&&(s.alpha=r),s},YC=e=>{let t=VC(Eo(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},XC=e=>Fo(KC(e)),sj={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:YC,xyz65:VC},toMode:{rgb:XC,xyz65:KC},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},Vv=({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=xt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},Kv=({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},uj={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Kv,rgb:e=>XC(Kv(e))},fromMode:{rgb:e=>Vv(YC(e)),jab:Vv},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:ee,fixup:tr},c:ee,j:ee,alpha:{use:ee,fixup:lt}},difference:{h:bc},average:{h:nr}},kc=Math.pow(29,3)/Math.pow(3,3),rg=Math.pow(6,3)/Math.pow(29,3);let dd=e=>Math.pow(e,3)>rg?Math.pow(e,3):(116*e-16)/kc;const og=({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:dd(i)*rt.X,y:dd(o)*rt.Y,z:dd(a)*rt.Z};return r!==void 0&&(l.alpha=r),l},Cl=({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=Wi({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},qC=e=>Cl(og(e)),Sl=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},pd=e=>e>rg?Math.cbrt(e):(kc*e+16)/116,ig=({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=pd(e/rt.X),i=pd(t/rt.Y),a=pd(n/rt.Z),l={mode:"lab",l:116*i-16,a:500*(o-i),b:200*(i-a)};return r!==void 0&&(l.alpha=r),l},JC=e=>{let t=ig(Sl(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function cj(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,o,i,a]=t;if(!(r.type===W.Hue||o.type===W.Hue||i.type===W.Hue))return r.type!==W.None&&(n.l=Math.min(Math.max(0,r.value),100)),o.type!==W.None&&(n.a=o.type===W.Number?o.value:o.value*125/100),i.type!==W.None&&(n.b=i.type===W.Number?i.value:i.value*125/100),a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const ag={mode:"lab",toMode:{xyz50:og,rgb:qC},fromMode:{xyz50:ig,rgb:JC},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[cj],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:ee,a:ee,b:ee,alpha:{use:ee,fixup:lt}}},fj=ae(V({},ag),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:RC,rgb:wc},fromMode:{xyz65:NC,rgb:xc},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}});function dj(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(o.type!==W.None&&(n.c=Math.max(0,o.type===W.Number?o.value:o.value*150/100)),i.type!==W.None){if(i.type===W.Percentage)return;n.h=i.value}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const lg={mode:"lch",toMode:{lab:Rr,rgb:e=>qC(Rr(e))},fromMode:{rgb:e=>Mr(JC(e)),lab:Mr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[dj],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:ee,fixup:tr},c:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:bc},average:{h:nr}},pj=ae(V({},lg),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Rr(e,"lab65"),rgb:e=>wc(Rr(e,"lab65"))},fromMode:{rgb:e=>Mr(xc(e),"lch65"),lab65:e=>Mr(e,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}}),QC=({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=xt(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(i.alpha=r),i},ZC=({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},eS=(e,t,n)=>4*e/(e+15*t+3*n),tS=(e,t,n)=>9*t/(e+15*t+3*n),hj=eS(rt.X,rt.Y,rt.Z),gj=tS(rt.X,rt.Y,rt.Z),mj=e=>e<=rg?kc*e:116*Math.cbrt(e)-16,Vp=({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=mj(t/rt.Y),i=eS(e,t,n),a=tS(e,t,n);!isFinite(i)||!isFinite(a)?o=i=a=0:(i=13*o*(i-hj),a=13*o*(a-gj));let l={mode:"luv",l:o,u:i,v:a};return r!==void 0&&(l.alpha=r),l},vj=(e,t,n)=>4*e/(e+15*t+3*n),yj=(e,t,n)=>9*t/(e+15*t+3*n),bj=vj(rt.X,rt.Y,rt.Z),wj=yj(rt.X,rt.Y,rt.Z),Kp=({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)+bj,i=n/(13*e)+wj,a=rt.Y*(e<=8?e/kc: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},xj=e=>QC(Vp(Sl(e))),Cj=e=>Cl(Kp(ZC(e))),Sj={mode:"lchuv",toMode:{luv:ZC,rgb:Cj},fromMode:{rgb:xj,luv:QC},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:ee,fixup:tr},c:ee,l:ee,alpha:{use:ee,fixup:lt}},difference:{h:bc},average:{h:nr}},Ej=ae(V({},Hi),{mode:"lrgb",toMode:{rgb:Wi},fromMode:{rgb:Gi},parse:["srgb-linear"],serialize:"srgb-linear"}),Fj={mode:"luv",toMode:{xyz50:Kp,rgb:e=>Cl(Kp(e))},fromMode:{xyz50:Vp,rgb:e=>Vp(Sl(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:ee,u:ee,v:ee,alpha:{use:ee,fixup:lt}}},nS=({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},Ac=e=>{let t=nS(Gi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},El=({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},$c=e=>Wi(El(e));function Yp(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function Cu(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function kj(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,f=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t;{let g=1+c*f,y=1+c*p,C=1+c*h,m=g*g*g,v=y*y*y,b=C*C*C,F=3*f*g*g,_=3*p*y*y,A=3*h*C*C,D=6*f*f*g,O=6*p*p*y,T=6*h*h*C,L=l*m+s*v+u*b,Q=l*F+s*_+u*A,B=l*D+s*O+u*T;c=c-L*Q/(Q*Q-.5*L*B)}return c}function sg(e,t){let n=kj(e,t),r=El({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 Aj(e,t,n,r,o,i=null){i||(i=sg(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,f=-.0894841775*e-1.291485548*t,p=l+s*u,h=l+s*c,g=l+s*f;{let y=o*(1-a)+a*n,C=a*r,m=y+C*u,v=y+C*c,b=y+C*f,F=m*m*m,_=v*v*v,A=b*b*b,D=3*p*m*m,O=3*h*v*v,T=3*g*b*b,L=6*p*p*m,Q=6*h*h*v,B=6*g*g*b,G=4.0767416621*F-3.3077115913*_+.2309699292*A-1,fe=4.0767416621*D-3.3077115913*O+.2309699292*T,me=4.0767416621*L-3.3077115913*Q+.2309699292*B,Se=fe/(fe*fe-.5*G*me),ie=-G*Se,z=-1.2684380046*F+2.6097574011*_-.3413193965*A-1,Z=-1.2684380046*D+2.6097574011*O-.3413193965*T,U=-1.2684380046*L+2.6097574011*Q-.3413193965*B,le=Z/(Z*Z-.5*z*U),R=-z*le,K=-.0041960863*F-.7034186147*_+1.707614701*A-1,X=-.0041960863*D-.7034186147*O+1.707614701*T,ne=-.0041960863*L-.7034186147*Q+1.707614701*B,P=X/(X*X-.5*K*ne),Y=-K*P;ie=Se>=0?ie:1e6,R=le>=0?R:1e6,Y=P>=0?Y:1e6,a+=Math.min(ie,Math.min(R,Y))}}}return a}function ug(e,t,n=null){n||(n=sg(e,t));let r=n[0],o=n[1];return[o/r,o/(1-r)]}function rS(e,t,n){let r=sg(t,n),o=Aj(t,n,e,1,e,r),i=ug(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,f=.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))),f,o]}function Yv(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:Yp(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]=rS(t,n/i,r/i),u;if(iYv(Ac(e))},toMode:{oklab:Xv,rgb:e=>$c(Xv(e))}});function qv(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]=ug(i,a),u=.5,c=1-u/l,f=s/(o+t*s),p=f*t,h=f*o,g=Cu(p),y=h*g/p,C=El({l:g,a:i*y,b:a*y}),m=Math.cbrt(1/Math.max(C.r,C.g,C.b,0));t=t/m,o=o/m*Yp(t)/t,t=Yp(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=xt(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function Jv(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]=ug(i,a),u=.5,c=1-u/l,f=1-r*u/(u+s-s*c*r),p=r*s*u/(u+s-s*c*r),h=Cu(f),g=p*h/f,y=El({l:h,a:i*g,b:a*g}),C=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),m=Cu(o*f),v=p*m/f;return t.l=m*C,t.a=v*i*C,t.b=v*a*C,t}const _j=ae(V({},GC),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:qv,rgb:e=>qv(Ac(e))},toMode:{oklab:Jv,rgb:e=>$c(Jv(e))}});function Dj(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,o,i,a]=t;if(!(r.type===W.Hue||o.type===W.Hue||i.type===W.Hue))return r.type!==W.None&&(n.l=Math.min(Math.max(0,r.type===W.Number?r.value:r.value/100),1)),o.type!==W.None&&(n.a=o.type===W.Number?o.value:o.value*.4/100),i.type!==W.None&&(n.b=i.type===W.Number?i.value:i.value*.4/100),a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const Pj=ae(V({},ag),{mode:"oklab",toMode:{lrgb:El,rgb:$c},fromMode:{lrgb:nS,rgb:Ac},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Dj],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 Tj(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,o,i,a]=t;if(r.type!==W.None){if(r.type===W.Hue)return;n.l=Math.min(Math.max(0,r.type===W.Number?r.value:r.value/100),1)}if(o.type!==W.None&&(n.c=Math.max(0,o.type===W.Number?o.value:o.value*.4/100)),i.type!==W.None){if(i.type===W.Percentage)return;n.h=i.value}return a.type!==W.None&&(n.alpha=Math.min(1,Math.max(0,a.type===W.Number?a.value:a.value/100))),n}const Oj=ae(V({},lg),{mode:"oklch",toMode:{oklab:e=>Rr(e,"oklab"),rgb:e=>$c(Rr(e,"oklab"))},fromMode:{rgb:e=>Mr(Ac(e),"oklch"),oklab:e=>Mr(e,"oklch")},parse:[Tj],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]}}),Qv=e=>{let{r:t,g:n,b:r,alpha:o}=Gi(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},Zv=({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=Wi({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},Bj=ae(V({},Hi),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Zv(Eo(e)),xyz65:Zv},toMode:{rgb:e=>Fo(Qv(e)),xyz65:Qv}}),hd=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},ey=({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:hd(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:hd(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:hd(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(o.alpha=r),o},gd=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},ty=e=>{let t=gd(e.r),n=gd(e.g),r=gd(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},Mj=ae(V({},Hi),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ey,rgb:e=>ey(Sl(e))},toMode:{xyz50:ty,rgb:e=>Cl(ty(e))}}),ny=1.09929682680944,Rj=.018053968510807,md=e=>{const t=Math.abs(e);return t>Rj?(Math.sign(e)||1)*(ny*Math.pow(t,.45)-(ny-1)):4.5*e},ry=({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:md(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:md(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:md(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(o.alpha=r),o},oy=1.09929682680944,Nj=.018053968510807,vd=(e=0)=>{let t=Math.abs(e);return t{let t=vd(e.r),n=vd(e.g),r=vd(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},Ij=ae(V({},Hi),{mode:"rec2020",fromMode:{xyz65:ry,rgb:e=>ry(Eo(e))},toMode:{xyz65:iy,rgb:e=>Fo(iy(e))},parse:["rec2020"],serialize:"rec2020"}),eo=.0037930732552754493,oS=Math.cbrt(eo),yd=e=>Math.cbrt(e)-oS,Lj=e=>{const{r:t,g:n,b:r,alpha:o}=Gi(e),i=yd(.3*t+.622*n+.078*r+eo),a=yd(.23*t+.692*n+.078*r+eo),l=yd(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+eo),s={mode:"xyb",x:(i-a)/2,y:(i+a)/2,b:l-(i+a)/2};return o!==void 0&&(s.alpha=o),s},bd=e=>Math.pow(e+oS,3),zj=({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=bd(e+t)-eo,i=bd(t-e)-eo,a=bd(n+t)-eo,l=Wi({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},jj={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:zj},fromMode:{rgb:Lj},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:ee,y:ee,b:ee,alpha:{use:ee,fixup:lt}}},Hj={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Cl,lab:ig},fromMode:{rgb:Sl,lab:og},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:ee,y:ee,z:ee,alpha:{use:ee,fixup:lt}}},Gj=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},Wj=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},Uj={mode:"xyz65",toMode:{rgb:Fo,xyz50:Gj},fromMode:{rgb:Eo,xyz50:Wj},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:ee,y:ee,z:ee,alpha:{use:ee,fixup:lt}}},Vj=({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},Kj=({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},Yj={mode:"yiq",toMode:{rgb:Kj},fromMode:{rgb:Vj},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:ee,i:ee,q:ee,alpha:{use:ee,fixup:lt}}},Xj=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,qj=(e=4)=>t=>typeof t=="number"?Xj(t,e):t;let cs=qj(2);const Os=e=>Math.max(0,Math.min(1,e||0)),wd=e=>Math.round(Os(e)*255),Jj=hn("rgb"),Qj=hn("hsl"),Zj=e=>{if(e===void 0)return;let t=wd(e.r),n=wd(e.g),r=wd(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},eH=e=>{if(e===void 0)return;const t=cs(e.h||0),n=cs(Os(e.s)*100)+"%",r=cs(Os(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${n}, ${r})`:`hsla(${t}, ${n}, ${r}, ${cs(Os(e.alpha))})`},iS=e=>Zj(Jj(e)),tH=e=>eH(Qj(e)),aS=hn("rgb"),lS=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},nH=e=>lS(aS(e)),sS=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 rH(e){return sS(aS(e))}function uS(e="rgb"){const{gamut:t}=mc(e);if(!t)return r=>!0;const n=hn(typeof t=="string"?t:e);return r=>sS(n(r))}function cg(e="rgb"){const{gamut:t}=mc(e);if(!t)return i=>mu(i);const n=typeof t=="string"?t:e,r=hn(n),o=uS(n);return i=>{const a=mu(i);if(!a)return;const l=r(a);if(o(l))return a;const s=lS(l);return a.mode===s.mode?s:hn(a.mode)(s)}}function Ei(e,t="lch",n="rgb"){e=mu(e);let r=n==="rgb"?rH:uS(n),o=n==="rgb"?nH:cg(n);if(e===void 0||r(e))return e;let i=hn(e.mode);e=hn(t)(e);let a=ae(V({},e),{c:0});if(!r(a))return i(o(a));let l=0,s=e.c!==void 0?e.c:0,u=mc(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=a.c;for(;s-l>c;)a.c=l+(s-l)*.5,r(a)?(f=a.c,l=a.c):s=a.c;return i(r(a)?a:ae(V({},a),{c:f}))}Pe(Mz);Pe(Hz);Pe(Gz);Pe(Wz);Pe(Kz);Pe(zC);Pe(GC);Pe(rj);Pe(oj);Pe(sj);Pe(uj);Pe(ag);Pe(fj);Pe(lg);Pe(pj);Pe(Sj);Pe(Ej);Pe(Fj);Pe($j);Pe(_j);Pe(Pj);Pe(Oj);Pe(Bj);Pe(Mj);Pe(Ij);Pe(Hi);Pe(jj);Pe(Hj);Pe(Uj);Pe(Yj);const oH=/[^\w\-]/,iH=hn("rgb");function ay(e){const{value:t,origValue:n}=e,r=gn(),[o,i]=w.useState(!1),[a,l]=w.useState(!1),s=w.useMemo(()=>{if(!a)return null;const f=vc(t);if(f){const p=iH(cg("rgb")(f)),{alpha:h=1}=p,g=h===1?"":` ${h.toString().replace(".","")}`;return pz(iS(p)).colorName.toLowerCase().replace(oH,"")+g}return""},[a]),[u,c]=w.useState("");return o?k(w.Fragment,{children:[d(Ve,{value:u||s,onChange:c}),d("button",{onClick:()=>{r({type:Me.createAlias,payload:{name:u||s,value:n}})},children:"submit"}),d("button",{onClick:()=>i(!1),children:"cancel"})]}):d("button",{onClick:()=>{l(!0),i(!0)},children:"Add alias"})}function aH(e){return d("option",{value:e.value,children:e.label},e.value)}function yt(e){const{options:t=[],value:n,onChange:r,title:o,style:i}=e,a=w.useCallback(s=>{r(s.target.value)},[r]),l=w.useMemo(()=>t.map(aH),t);return d("select",{value:n,onChange:a,title:o,style:i,children:l})}const lH=hn("oklch");function kr(e){return lH(e)}const cS=0,fS=1,Su=.01,dS=.001;function sH(e,t){let n=1/0,r=cS,o=vc(`oklch(${r}% ${e} ${t})`);for(;r=n)break}const i=r;for(r-=Su,n=1/0;r=n)break}return r*100}function uH(e,t){let n=1/0,r=fS,o=vc(`oklch(${r}% ${e} ${t})`);for(;r>cS;){r-=Su;const a=Math.abs(Ei(ae(V({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r*100;if(a>=n)break}const i=r;for(r-=Su,n=1/0;r>i;){r-=dS;const a=Math.abs(Ei(ae(V({},o),{l:r}),"oklch","p3").c-e);if(a===0)return r;if(a>=n)break}return r*100}function cH({l:e,c:t,h:n,a:r=100}){return d("a",{href:`https://oklch.com/#${e},${t},${n},${r}`,target:"_blank",children:"online picker"})}function zn(e,t,n,r){const o=r===1?"":`/ ${r.toFixed(2)}`;return`oklch(${e.toFixed(2)}% ${t.toFixed(3)} ${n.toFixed(2)}${o})`}function fH({value:e,onChange:t}){const{l:n,c:r,h:o=0,alpha:i=1}=kr(e)||{l:0,c:0,h:0,alpha:1},a=100*n,l=Ei(`oklch(${a}% 0.4 ${o})`,"oklch","p3"),s=(l==null?void 0:l.c)||0,u=r-s>.001,c=sH(r,o),f=uH(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":`${f}%`,"--max-lightness-scalar":f},children:[d("div",{className:"lightness",onDrop:p=>{const h=p.dataTransfer.getData("value"),{l:g}=kr(h);g>0&&(p.preventDefault(),p.stopPropagation(),t(zn(g*100,r,o,i)))},children:d("input",{onChange:p=>t(zn(Number(p.target.value),r,o,i)),id:"lightness",type:"range",min:0,max:100,value:a,step:.1})}),d("div",{className:"chroma",children:d("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(zn(a,h,o,i))}})}),d("div",{className:"hue",onDrop:p=>{const h=p.dataTransfer.getData("value");if(!h)return;const{h:g}=kr(h);p.preventDefault(),p.stopPropagation(),t(zn(a,r,g,i))},children:d("input",{id:"hue",type:"range",min:0,max:360,value:o,step:.1,onChange:p=>t(zn(a,r,Number(p.target.value),i))})}),d("div",{className:"alpha",children:d("input",{id:"alpha",type:"range",min:0,max:1,value:i,step:.01,onChange:p=>t(zn(a,r,o,Number(p.target.value)))})}),d(cH,{l:a,c:r,h:o}),!e.startsWith("oklch(")&&d("button",{onClick:()=>{t(zn(a,r,o,i))},children:"convert"}),u&&d("span",{style:{color:"red",fontWeight:"bold"},children:"NOT IN GAMUT"})]})}const Eu=/(#[\da-fA-F]{3}|rgba?\()|oklch\(/,ol=/(linear|radial|conic)-gradient\(.+\)/,dH=/^(--var-control|--server-theme|--theme-editor)/,Fi="39px",ly=(e,t)=>t===1?e.toHexString():e.setAlpha(t).toRgbString(),pH=(e,[t,n])=>(/px/.test(n)||(Eu.test(n)||ol.test(n))&&(n in e||(e[n]={color:n,usages:[],isGradient:ol.test(n)}),e[n].usages.push(t)),e),hH=(e,t)=>{if(e===null)return[];const n=V(V({},t),e);return Object.values(Object.entries(n).filter(([r])=>!dH.test(r)).reduce(pH,{}))},gH=({color:e},{color:t})=>{const n=Br(e).toHex(),r=Br(t).toHex();return n===r?e===t?0:e({label:e,value:e})),vH=hn("rgb"),yH=e=>{const{onChange:t,onUnset:n,value:r,resolvedValue:o,cssVar:i,cssFunc:a}=e,l=vH(cg("hsl")(o))||{},s=o,{nativeColorPicker:u}=xe,{name:c,usages:f}=i,p=gn(),h=sz({ms:20}),g=l.alpha||1,y=!f.some(({property:D})=>D!=="background"),C=tH(l),m=iS(l),[v,b]=be("color-picker-variant","chrome"),F=pS[v],[_,A]=be("ok-picker",!1);return u?k("div",{style:{minHeight:"120px",clear:"both"},children:[d(ay,{value:s,origValue:r},s),d("input",{type:"color",style:{width:sy,height:sy,float:"right",opacity:g},value:m,onChange:D=>{const O=Br(D.target.value),T=ly(O,g);h(t,T)}}),d("input",{type:"number",style:{float:"right"},min:0,max:1,step:.05,value:l.a,onChange:D=>{const O=Number(D.target.value),T=Br(s);t(ly(T,O))}}),d("button",{onClick:()=>{s==="transparent"?p({type:Me.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",float:"right",width:Fi,opacity:s==="transparent"?1:.4},children:"👻"}),d("div",{style:{clear:"both"},children:d(Mv,{value:s,onChange:t,name:c,allowGradients:y})})]}):k(w.Fragment,{children:[_&&d(fH,{value:s,onChange:t}),k("div",{style:{display:"flex",clear:"both"},children:[d(ay,{value:s,origValue:r},s),k("div",{style:{display:"flex"},children:[d("button",{style:{borderTopRightRadius:0,borderBottomRightRadius:0,marginRight:0,borderRight:"none"},onClick:()=>A(!1),disabled:!_,children:"rgb/hsl"}),d("button",{style:{borderTopLeftRadius:0,borderBottomLeftRadius:0},onClick:()=>A(!0),disabled:_,children:"oklch"})]})]}),!_&&k(w.Fragment,{children:[d(F,{header:"",width:"100%",styles:{picker:{width:"100%"}},color:C,onChange:D=>{const O=D.rgb.a!==1,{r:T,g:L,b:Q,a:B}=D.rgb;t(O?`rgba(${T} , ${L}, ${Q}, ${B})`:D.hex)}}),k("div",{children:[d(Ve,{style:{marginTop:"6px"},value:s,onChange:D=>t(D,!0)}),d("button",{onClick:()=>{s==="transparent"?p({type:Me.unset,payload:{name:c}}):t("transparent")},style:{fontSize:"12px",opacity:s==="transparent"?1:.4},children:"👻"}),d(yt,{title:"Change color picker style",style:{float:"right"},options:mH,value:v,onChange:b})]})]}),d(Mv,{value:s,onChange:t,name:c,allowGradients:y})]})},te={isSimpleSizes:()=>be("isSimpleSizes",!0),screenOptions:()=>[xe.isSimpleSizes?IF:LF],width:()=>st("width",1024),height:()=>st("height",768),scales:()=>st("scales",{}),uiLayout:()=>st("uiLayout",{map:{}}),propertyFilter:()=>st("propertyFilter","all"),search:()=>st("search",""),filteredSelectors:()=>[[]],showRawValues:()=>st("showRawValues",!1),excludedRawValues:()=>st("excludedRawValues",["initial","none"]),frameClickBehavior:()=>pr("frameClickBehavior","any"),enableScrollingInView:()=>be("enableScrollingInView",!0),nativeColorPicker:()=>be("nativeColorPicker",!1),includeDefaultPalette:()=>be("includeDefaultPalette",!1),colorUsages:()=>[Hr(e=>hH(e.themeEditor.scopes[Lt],e.includeDefaultPalette?hY():{}).sort(gH))],fileName:()=>st("fileName","theme"),annoyingPrefix:()=>be("annoyingPrefix",""),nameReplacements:()=>be("nameReplacements",[]),showCssProperties:()=>be("showCssProperties",!0),linkCssProperties:()=>be("linkCssProperties",!1),showSourceLinks:()=>be("showSourceLinks",!1),windowArrangments:()=>be("windowArrangments",{}),webpackHome:()=>be("webpackHome",""),visualizeHistory:()=>be("visualizeHistory",!1),visualizeHistoryAlways:()=>be("visualizeHistoryAlways",!0),showScrolls:()=>be("showScrolls",!0),svgDarkBg:()=>be("svgDarkBg",!1),inspectedPath:()=>Tn("inspectedPath",""),openGroups:()=>Tn("openGroups",{}),frameLoaded:()=>pr("frameLoaded",!1),openFirstOnInspect:()=>be("open-first-inspect",!0),serverThemes:()=>GF(),existsOnServer:()=>[xe.fileName in xe.serverThemes],localThemeJson:()=>[Hr(e=>JSON.stringify(e.themeEditor.scopes))],remoteThemeJson:()=>[Hr(e=>{var t;return JSON.stringify((t=e.serverThemes[e.fileName])==null?void 0:t.scopes)})],modifiedServerVersion:()=>[Hr(e=>{const t=e.localThemeJson!==e.remoteThemeJson;return e.existsOnServer&&t})],themeEditor:()=>c4(),fullHeightFrameShowFixed:()=>pr("fullHeightFrameShowFixed",!0),fullHeightFrameScale:()=>st("fullHeightFrameScale",.05),elementSelectionMode:()=>pr("elementSelectionMode",!1),maximizeChroma:()=>be("maximizeChroma",!1),pickedValue:()=>pr("pickedValue",""),pickedHue:()=>[Hr(e=>{var t;return(t=kr(e.pickedValue))==null?void 0:t.h})],palette:()=>be("palette",[]),savedSelectors:()=>be("savedSelectors",[]),note:()=>Tn("note",""),area:()=>[Hr(e=>e.width*e.height)],areaDoubled:()=>[Hr(e=>e.area*2)],areaNomemo:()=>[xe.width*xe.height]};console.time("Getters and signals");const xe=RF(te);NF(te);console.timeEnd("Getters and signals");const uy={};let cy=0;const bH=()=>{++cy;for(const e in uy)uy[e](cy)},va={enableOnTags:["INPUT","SELECT","RADIO"]};function wH(e){const{frameRef:t}=e;return k(w.Fragment,{children:[d(xd,{keys:"alt+r",updater:bH}),d(xd,{keys:"alt+s",hook:()=>[xe.fileName,xe.modifiedServerVersion,xe.themeEditor.scopes,te.serverThemes()],updater:(n,r,o,[,{uploadTheme:i}])=>{n&&n!=="default"&&r&&i(n,o)}}),d(xd,{keys:"alt+a",hook:te.frameClickBehavior,updater:(n,r)=>{const o=n==="alt"?"any":"alt";r(o),t.current.contentDocument.documentElement.classList.toggle("force-cursor",o!=="alt")}})]})}function xd({keys:e,hook:t=()=>[],updater:n=(r,o)=>{}}){const[...r]=t();oi(e,()=>{n(...r)},va,[r])}let _c;const Xp=window.indexedDB.open("history",1),so="actions";Xp.onupgradeneeded=function(e){const t=e.target.result;t.onerror=function(n){console.log("upgrade failed",n)},t.createObjectStore(so,{autoIncrement:!0})};const Fu="history-start-snapshot";let hS=JSON.parse(localStorage.getItem(Fu)),xH=0,qp;Xp.onsuccess=function(e){window.self===window.top&&(_c=Xp.result)};function CH(){if(window.self!==window.top)return;const t=_c.transaction([so],"readonly").objectStore(so);t.getAll().onsuccess=n=>{const r=n.target.result;HH(new Map(hS)),yS(r),qp=xH===0,$H(),VH()}}let ku=1/0;function uo(e,t,n){if(qp){const i=JSON.stringify([...at.entries()].filter(([a])=>te.hasOwnProperty(a)));localStorage.setItem(Fu,i),localStorage.setItem("originalUrl",window.location.href),qp=!1,hS=i}const o=_c.transaction([so],"readwrite").objectStore(so);if(t){const i=IDBKeyRange.lowerBound(n);o.delete(i)}n<=ku&&(e[0].push(window.location.href),ku=n),o.put(e,n)}function fg(e=!1,t=null){const n=performance.now(),r=_c.transaction([so],"readwrite");if(r.oncomplete=i=>{console.log("Deleted store in",performance.now()-n)},r.objectStore(so).clear(),localStorage.removeItem(Fu),t){const i=JSON.stringify([...t.entries()].filter(([a])=>pg.includes(a)));localStorage.setItem(Fu,i)}ku=1/0,console.log("Start store delete transaction in ",performance.now()-n)}const SH=(e,t)=>{gS({scopes:t},e)};function gS(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 EH=e=>Object.keys(e).map(n=>` ${n}: ${e[n]};`).join(` +`);function FH(e){return Object.entries(e).map(([t,n])=>`${t} { +${EH(n)} }`).join(` -`)}const FH=(e,t)=>{const n=EH(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 at=new Map,Fl=new Map;const xd=new Map,Ar=new Map,kH=JSON.parse(localStorage.getItem("pins")||"[]");let We=new Map;function AH(){We=new Map(kH)}const fy=new Set;function gS(e){let t;if(We.has(e)){const n=We.get(e);t=n>=q.length?Ee:q[n].states}else t=Dt;return t.has(e)?t.get(e):at.get(e)}let dy;function $H(e){const t=gS(e);at.set(e,t);const n=q,r=([i])=>i!==e;cg();let o=0;if(q=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!==dy&&l.lastActions.size>0&&(dy=l,uo([...l.lastActions.entries()],!0,o),o++)}return i},[]),Ue.has(e))if(Ue.size===1){const i=q.at(-1);q=q.slice(0,-1),Ue=i.lastActions,Ee=i.states}else Ee.delete(e),Ue.delete(e);Ee.delete(e),Mt=new Map,we=Math.min(we,q.length),kl(e),rr()}function _H(e,t){if(fy.has(e))return;let n=Ar.get(e);n===void 0&&(n=new Set,Ar.set(e,n)),n.add(()=>{t(e,gS(e))}),fy.add(e)}function fg(){localStorage.setItem("pins",JSON.stringify([...We.entries()]))}function Ui(e,t){We.set(e,t),qn(),vg(e),fg()}function mS(e){if(Ue.has(e))return q.length;let t=0;for(;t=q.length;const l=i[...n.entries()]),[...Ue.entries()]],t=new Date;hS({offset:we,pins:[...We.entries()],initialStates:[...at.entries()],finalStates:[...Ee.entries()],url:window.location.href,timeline:e},`theme-editor-history-${t.toLocaleString()}`)}let ya=[];function vS(e,t=!1){let n=0,r;ya.forEach((o,i)=>{delete ya[i]});for(const o of e)if(o.length!==0){GH();for(const[i,a,l]of o)l&&l!==r&&(ya.push([l,n]),r=l),mg(i,a,{force:!0,debounceTime:1/0});t&&uo(o,!1,n),n++}ya.reverse()}let yS=localStorage.getItem("originalUrl");function BH(e){const{timeline:t,inspections:n}=e;return ae(V({},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 MH(e){const{timeline:t,initialStates:n,finalStates:r,pins:o,offset:i=0,url:a}=BH(e);Mt=Dt,q=[],we=0,We=new Map,cg();for(const[l,s]of n)at.set(l,s);vS(t,!0),yS=a,a&&localStorage.setItem("originalUrl",a);for(const[l,s]of r)typeof s!="object"&&Ee.get(l)!==s&&console.log("Unequal value",s,Ee.get(l));We=new Map(o),we=i,$l(),rr()}function RH(e,t){Fl.set(e,t),TH(e)}function NH(e){const t=this;let n=Ar.get(t);return n===void 0&&(n=new Set,Ar.set(t,n)),n.add(e),()=>{n.delete(e),n.size===0&&Ar.delete(t)}}function IH(e){let t;if(We.has(e)){const r=We.get(e);t=r>=q.length?Ee:q[r].states}else t=Dt;const n=t.get(e);return n===void 0?at.get(e):n}const dg=["themeEditor","uiLayout","inspectedPath","note"];function pg(e){for(const t of dg)if(!We.has(t)&&e.has(t))return!0;return!1}let q=[],Ot=JSON.parse(localStorage.getItem("history-alternate")||"[]").map(e=>new Map(e)),Al=JSON.parse(localStorage.getItem("history-stashes")||"[]").map(([e,t])=>[e,t.map(n=>new Map(n))]),il=parseInt(localStorage.getItem("history-alternate-index")||"0");function _c(){localStorage.setItem("history-alternate",JSON.stringify(Ot.map(e=>[...e.entries()]))),localStorage.setItem("history-alternate-index",il.toString()),localStorage.setItem("history-stashes",JSON.stringify(Al.map(([e,t])=>[e,t.map(n=>[...n.entries()])])))}function LH(e){const[,t]=Al[e],n=Ot;Ot=t,kS(),Ot===t&&(Ot=n),bS(e)}function bS(e){Al.splice(e),_c(),qn()}function zH(){Ot.length>wS&&!confirm(`Clear ${Ot.length} steps?`)||(Ot=[],_c(),qn())}let we=0,wS=8,Ee=new Map,Mt=Ee,Dt=Ee,Ue=new Map,qp=0;function jH(e){Mt=Ee;for(const t of e.entries())at.set(...t);Ee=e,$l()}function hg(e=1,t=!1){if(q.length-we<1)return;Mt=Dt;let r=Math.min(q.length,we+e);if(t)for(;r0&&xS(q[q.length-n]);)n--;we=n,rr()}function xS(e){for(const t of e.lastActions.keys())if(!We.has(t))return!1;return!0}function CS(){hg(1)}function SS(){Oa(1)}function ES(){let e=we;for(;e0;){e--;const t=e===0?Ue:q[q.length-e].lastActions;if(pg(t))break}Mt=Dt,we=e,rr()}}function gg(e){e===we||e>q.length||e<0||(we=e,Mt=Dt,rr())}function HH(){const e=we>0;for(const[t,n]of We.entries())if(We.delete(t),n!==we){const r=n>=q.length?Ee.get(t):q[n].states.get(t);Dt.set(t,r===void 0?at.get(t):r)}fg(),Ue=e?q[q.length-we].lastActions:Ue,q=[],we=0,Ee=Dt,at=new Map([...at.entries(),...Dt.entries()]),cg(!0,Dt),localStorage.removeItem("originalUrl"),$l(),qn()}function kS(){if(!Ot)return;const e=we===0?[]:[...q.slice(q.length-we+1).map(({lastActions:r})=>r),Ue],t=Ot;il=q.length-we;let n=!1;for(const r of t){let o=!0;for(const[i,a]of r.entries()){if(!n){Dc(i,a,{force:!0}),n=!0,o=!1;continue}Dt=Ee,mg(i,a,{force:!0,debounceTime:o?0:1/0}),o&&(o=!1)}uo([...r.entries()],!1,q.length)}if(t.length===0){const r=q.at(-we);Ee=r.states,Ue=r.lastActions,q=q.slice(0,-we),uo([...r.lastActions.entries()],!0,q.length),we=0}else we=Math.min(t.length,q.length-1);Ot=e,_c(),rr()}function GH(){const e={states:Ee,lastActions:Ue};q.push(e),Ee=new Map(Ee),Ue=new Map}function Dc(e,t,n){const r=we>0;r&&(n!=null&&n.appendOnly)||!(r?WH(e,t,n):mg(e,t,n))||(typeof t.type=="function"&&(t.type=t.type.name),uo([...Ue.entries()],r,q.length),vg(e))}function mg(e,t,n={}){const r=Fl.get(e)||Pc;if(!r)return console.log("no reducer for",e),!1;const o=performance.now(),i=We.get(e),a=We.has(e),s=a&&i=("debounceTime"in n?n.debounceTime:500))||(n==null?void 0:n.skipHistory);function h(){const y=q[q.length-1];if(!y||y.states.get(e)!==(c?void 0:u))return!1;const C=[...y.lastActions.keys()];return C.length===1&&C[0]===e}const m=p&&h();return Mt=Ee,p||(Ee=new Map(Ee)),c?Ee.delete(e):Ee.set(e,u),we=0,p?(m&&q.splice(q.length-1),Ue=new Map(Ue)):(q.push({states:Mt,lastActions:Ue}),Ue=new Map),n!=null&&n.skipHistory||(qp=m?0:o),Ue.set(e,t),a&&Ui(e,q.length),!0}function WH(e,t,n={}){var v;const r=Fl.get(e)||Pc;if(!r)return!1;Ot.length>wS&&!n.force&&Al.push([il,Ot]);const o=performance.now(),i=q.length-we,l=q[i].states,s=We.has(e)?We.get(e):i,u=((v=q[s])==null?void 0:v.states)||Ee,c=u.has(e)?u.get(e):at.get(e),f=r(c,typeof t=="function"?t(c):t);if(f===c&&!n.force)return!1;const p=new Map,h=new Map,m=[];let y=!1;const C=We.entries();for(const[b,F]of C)if(F>i){y=!0,F>=q.length?(p.set(b,Ee.get(b)),h.set(b,Ue.get(b))):(p.set(b,q[F].states.get(b)),h.set(b,q[F].lastActions.get(b)));const _=Math.min(F,q.length-1);for(let A=i+1;A<_;A++){const D=q[A].lastActions.get(b);D!==void 0&&D.type&&m.push([b,D,q[A].states.get(b)])}We.set(b,i+1)}for(const b of p.keys())We.set(b,i+m.length+1);const g=we===1?q:q.slice(0,-we+1);if(Ot=[...q.slice(q.length-we+1).filter(({lastActions:b})=>![...p.keys()].some(F=>b.has(F))).map(({lastActions:b})=>b),Ue],il=q.length-we,_c(),y){let b=l,F=0;for(const[A,D,O]of m){const T=new Map(b);T.set(A,O),g.push({states:T,lastActions:new Map([[A,D]])}),uo([[A,D]],1,i+F+1),b=T,F++}const _=new Map([...b,...p]);g.push({states:_,lastActions:h}),uo([...h.entries()],1,i+m.length+1)}return We.has(e)&&Ui(e,g.length),Ee=new Map([...l,...p]),f===at.get(e)?Ee.delete(e):Ee.set(e,f),Mt=l,we=0,q=g,qp=o,Ue=new Map([[e,t]]),!0}let qn=()=>{};function $l(){Dt=we>0?q[q.length-we].states:Ee}function AS(){localStorage.setItem("historyOffset",we.toString())}function UH(){we=Math.max(0,Math.min(q.length,parseInt(localStorage.getItem("historyOffset")||"0"))),Mt=new Map,rr()}function vg(e){$l(),AS();const t=Ar.get(e);if(t)for(const n of t.values())n();qn()}function rr(){$l(),AS();for(const[e,t]of Dt.entries()){const n=Ar.get(e);if(n&&(!Mt.has(e)||Mt.get(e)!==t))for(const r of n.values())r()}for(const e of Mt.keys()){const t=Ar.get(e);if(t&&!Dt.has(e))for(const n of t.values())n()}qn()}const Ze=w.createContext({});function VH(e){const{previewComponents:t,children:n}=e,[,r]=w.useState();return ri("ctrl+z,cmd+z",CS,va),ri("ctrl+shift+z,cmd+shift+z",SS,va),ri("alt+z",ES,va),ri("alt+shift+z",FS,va),w.useLayoutEffect(()=>(qn=()=>r({}),()=>{qn=()=>{}}),[]),d(Ze.Provider,{value:{past:q,historyOffset:we,lastActions:Ue,pointedStates:Dt,initialStates:at,previewComponents:t,pins:We,states:Ee,lastAlternate:Ot,lastAlternateIndex:il,savedStashes:Al,historyUrl:yS},children:n})}function $S(e,t,n=o=>o,r){if(!at.has(r)){const i=typeof n=="function"?n(t):t;at.set(r,i)}return e!==Pc&&!Fl.has(r)&&RH(r,e),[w.useSyncExternalStore(NH.bind(r),IH.bind(null,r)),Dc.bind(null,r)]}function yg(e){return Dc.bind(null,e)}const Pc=(e,t)=>t;function Tn(e,t){return $S(Pc,null,()=>typeof t=="function"?t():t,e)}function _S(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 aa={},py={},Cd={},cs={};function be(e,t){const n=l0()+e,r=typeof t,o=r==="object",i=Cd.hasOwnProperty(e),a=i?Cd[e]:()=>{let u;if(aa.hasOwnProperty(e))u=aa[e];else{const c=localStorage.getItem(n),f=c===null?t:_S(r,c);aa[e]=f,cs[e]=new Set,py[e]=p=>{const h=typeof p=="function"?p(aa[e]):p;localStorage.setItem(n,o?JSON.stringify(h):h),aa[e]=h;for(const m of cs[e].values())m(h)},u=f}return u};i||(Cd[e]=a);const[l,s]=w.useState(a);return w.useInsertionEffect(()=>(cs[e].add(s),()=>{cs[e].delete(s)}),[]),[l,py[e]]}function KH(e,t){localStorage.setItem(e,t)}function YH(e,t){localStorage.setItem(e,JSON.stringify(t))}function st(e,t){const n=l0()+e,r=typeof t,o=r==="object",[i,a]=Tn(e,()=>{const l=localStorage.getItem(n);return l===null?t:_S(r,l)});return _H(e,o?YH:KH),[i,a]}const Fo=w.createContext({}),XH=([,[e,t]],[,[n,r]])=>e===n?t>r?1:-1:e>n?1:-1,qH=(e,t,n,r)=>{if(!r){const i=Object.values(e).filter(([l])=>l===n).map(([,l])=>l),a=Math.max(...i);return ae(V({},e),{[t]:[n,a+1]})}const o={};return Object.entries(e).sort(XH).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},{})},JH={showMovers(){return w.useState(!1)},drawerOpen(){return be("drawer-open",!1)},dragEnabled(){return be("drag-on",!1)}};function QH({stateHook:e,children:t,hooks:n=JH,customElements:r}){const o=w.useRef({}),i=w.useRef({}),[a,l]=w.useState(null),[s,u]=w.useState(null),[c,f]=w.useState(null),[p,h]=e(),{map:m}=p,[y,C]=n.showMovers(),[g,v]=n.drawerOpen(),[b,F]=n.dragEnabled(),_=w.useCallback((B,G,fe)=>{if(l(null),!Object.values(m).some(([Se])=>Se===G&&i.current.hasOwnProperty(Se))){let Se=0;Object.entries(i.current).forEach(([ie,z])=>{z===G&&!(ie in m)&&(m[ie]=[z,Se],Se+=1)})}const me=qH(m,B,G,fe);h(ae(V({},p),{map:me}))},[m]),[A,D]=w.useState(!1),[O,T]=w.useState(!1);w.useLayoutEffect(()=>{if(!A){D(!0);return}T(!0)},[A]),w.useInsertionEffect(()=>{var B;if(O)for(const{current:G}of Object.values(o.current)){if(((B=G.children[0])==null?void 0:B.style.order)==="")continue;const fe=[];for(const me of G.children){const Se=parseInt(me.style.order);let ie,z,Z=0;for(const[U,le]of fe){if(Se{h(ae(V({},p),{map:{}}))},Q=w.useRef({element:null,area:null});return w.useLayoutEffect(()=>{D(!0)},[]),d(Fo.Provider,{value:{areaRefs:o,origLocationsRef:i,uiState:p,setUiState:h,movePanelTo:_,resetPanels:L,showMovers:y,setShowMovers:C,overElement:a,setOverElement:l,overArea:s,setOverArea:u,timeoutRef:Q,draggedElement:c,setDraggedElement:f,dragEnabled:b,setDragEnabled:F,drawerOpen:g,setDrawerOpen:v},children:d("div",{className:"movable-container"+(c?" is-dragging":""),children:t})})}const DS=10;function ZH(e){const{movePanelTo:t,areaRefs:n}=w.useContext(Fo),{homeAreaId:r,elementId:o,hostAreaId:i}=e;return d("div",{className:"area-switcher",style:{display:"flex",position:"absolute"},children:d(kt,{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 PS={exports:{}};/*! +`)}const kH=(e,t)=>{const n=FH(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 at=new Map,Fl=new Map;const Cd=new Map,Ar=new Map,AH=JSON.parse(localStorage.getItem("pins")||"[]");let We=new Map;function $H(){We=new Map(AH)}const fy=new Set;function mS(e){let t;if(We.has(e)){const n=We.get(e);t=n>=q.length?Ee:q[n].states}else t=Dt;return t.has(e)?t.get(e):at.get(e)}let dy;function _H(e){const t=mS(e);at.set(e,t);const n=q,r=([i])=>i!==e;fg();let o=0;if(q=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!==dy&&l.lastActions.size>0&&(dy=l,uo([...l.lastActions.entries()],!0,o),o++)}return i},[]),Ue.has(e))if(Ue.size===1){const i=q.at(-1);q=q.slice(0,-1),Ue=i.lastActions,Ee=i.states}else Ee.delete(e),Ue.delete(e);Ee.delete(e),Mt=new Map,we=Math.min(we,q.length),kl(e),rr()}function DH(e,t){if(fy.has(e))return;let n=Ar.get(e);n===void 0&&(n=new Set,Ar.set(e,n)),n.add(()=>{t(e,mS(e))}),fy.add(e)}function dg(){localStorage.setItem("pins",JSON.stringify([...We.entries()]))}function Ui(e,t){We.set(e,t),qn(),yg(e),dg()}function vS(e){if(Ue.has(e))return q.length;let t=0;for(;t=q.length;const l=i[...n.entries()]),[...Ue.entries()]],t=new Date;gS({offset:we,pins:[...We.entries()],initialStates:[...at.entries()],finalStates:[...Ee.entries()],url:window.location.href,timeline:e},`theme-editor-history-${t.toLocaleString()}`)}let ya=[];function yS(e,t=!1){let n=0,r;ya.forEach((o,i)=>{delete ya[i]});for(const o of e)if(o.length!==0){WH();for(const[i,a,l]of o)l&&l!==r&&(ya.push([l,n]),r=l),vg(i,a,{force:!0,debounceTime:1/0});t&&uo(o,!1,n),n++}ya.reverse()}let bS=localStorage.getItem("originalUrl");function MH(e){const{timeline:t,inspections:n}=e;return ae(V({},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 RH(e){const{timeline:t,initialStates:n,finalStates:r,pins:o,offset:i=0,url:a}=MH(e);Mt=Dt,q=[],we=0,We=new Map,fg();for(const[l,s]of n)at.set(l,s);yS(t,!0),bS=a,a&&localStorage.setItem("originalUrl",a);for(const[l,s]of r)typeof s!="object"&&Ee.get(l)!==s&&console.log("Unequal value",s,Ee.get(l));We=new Map(o),we=i,$l(),rr()}function NH(e,t){Fl.set(e,t),OH(e)}function IH(e){const t=this;let n=Ar.get(t);return n===void 0&&(n=new Set,Ar.set(t,n)),n.add(e),()=>{n.delete(e),n.size===0&&Ar.delete(t)}}function LH(e){let t;if(We.has(e)){const r=We.get(e);t=r>=q.length?Ee:q[r].states}else t=Dt;const n=t.get(e);return n===void 0?at.get(e):n}const pg=["themeEditor","uiLayout","inspectedPath","note"];function hg(e){for(const t of pg)if(!We.has(t)&&e.has(t))return!0;return!1}let q=[],Ot=JSON.parse(localStorage.getItem("history-alternate")||"[]").map(e=>new Map(e)),Al=JSON.parse(localStorage.getItem("history-stashes")||"[]").map(([e,t])=>[e,t.map(n=>new Map(n))]),il=parseInt(localStorage.getItem("history-alternate-index")||"0");function Dc(){localStorage.setItem("history-alternate",JSON.stringify(Ot.map(e=>[...e.entries()]))),localStorage.setItem("history-alternate-index",il.toString()),localStorage.setItem("history-stashes",JSON.stringify(Al.map(([e,t])=>[e,t.map(n=>[...n.entries()])])))}function zH(e){const[,t]=Al[e],n=Ot;Ot=t,AS(),Ot===t&&(Ot=n),wS(e)}function wS(e){Al.splice(e),Dc(),qn()}function jH(){Ot.length>xS&&!confirm(`Clear ${Ot.length} steps?`)||(Ot=[],Dc(),qn())}let we=0,xS=8,Ee=new Map,Mt=Ee,Dt=Ee,Ue=new Map,Jp=0;function HH(e){Mt=Ee;for(const t of e.entries())at.set(...t);Ee=e,$l()}function gg(e=1,t=!1){if(q.length-we<1)return;Mt=Dt;let r=Math.min(q.length,we+e);if(t)for(;r0&&CS(q[q.length-n]);)n--;we=n,rr()}function CS(e){for(const t of e.lastActions.keys())if(!We.has(t))return!1;return!0}function SS(){gg(1)}function ES(){Oa(1)}function FS(){let e=we;for(;e0;){e--;const t=e===0?Ue:q[q.length-e].lastActions;if(hg(t))break}Mt=Dt,we=e,rr()}}function mg(e){e===we||e>q.length||e<0||(we=e,Mt=Dt,rr())}function GH(){const e=we>0;for(const[t,n]of We.entries())if(We.delete(t),n!==we){const r=n>=q.length?Ee.get(t):q[n].states.get(t);Dt.set(t,r===void 0?at.get(t):r)}dg(),Ue=e?q[q.length-we].lastActions:Ue,q=[],we=0,Ee=Dt,at=new Map([...at.entries(),...Dt.entries()]),fg(!0,Dt),localStorage.removeItem("originalUrl"),$l(),qn()}function AS(){if(!Ot)return;const e=we===0?[]:[...q.slice(q.length-we+1).map(({lastActions:r})=>r),Ue],t=Ot;il=q.length-we;let n=!1;for(const r of t){let o=!0;for(const[i,a]of r.entries()){if(!n){Pc(i,a,{force:!0}),n=!0,o=!1;continue}Dt=Ee,vg(i,a,{force:!0,debounceTime:o?0:1/0}),o&&(o=!1)}uo([...r.entries()],!1,q.length)}if(t.length===0){const r=q.at(-we);Ee=r.states,Ue=r.lastActions,q=q.slice(0,-we),uo([...r.lastActions.entries()],!0,q.length),we=0}else we=Math.min(t.length,q.length-1);Ot=e,Dc(),rr()}function WH(){const e={states:Ee,lastActions:Ue};q.push(e),Ee=new Map(Ee),Ue=new Map}function Pc(e,t,n){const r=we>0;r&&(n!=null&&n.appendOnly)||!(r?UH(e,t,n):vg(e,t,n))||(typeof t.type=="function"&&(t.type=t.type.name),uo([...Ue.entries()],r,q.length),yg(e))}function vg(e,t,n={}){const r=Fl.get(e)||Tc;if(!r)return console.log("no reducer for",e),!1;const o=performance.now(),i=We.get(e),a=We.has(e),s=a&&i=("debounceTime"in n?n.debounceTime:500))||(n==null?void 0:n.skipHistory);function h(){const y=q[q.length-1];if(!y||y.states.get(e)!==(c?void 0:u))return!1;const C=[...y.lastActions.keys()];return C.length===1&&C[0]===e}const g=p&&h();return Mt=Ee,p||(Ee=new Map(Ee)),c?Ee.delete(e):Ee.set(e,u),we=0,p?(g&&q.splice(q.length-1),Ue=new Map(Ue)):(q.push({states:Mt,lastActions:Ue}),Ue=new Map),n!=null&&n.skipHistory||(Jp=g?0:o),Ue.set(e,t),a&&Ui(e,q.length),!0}function UH(e,t,n={}){var v;const r=Fl.get(e)||Tc;if(!r)return!1;Ot.length>xS&&!n.force&&Al.push([il,Ot]);const o=performance.now(),i=q.length-we,l=q[i].states,s=We.has(e)?We.get(e):i,u=((v=q[s])==null?void 0:v.states)||Ee,c=u.has(e)?u.get(e):at.get(e),f=r(c,typeof t=="function"?t(c):t);if(f===c&&!n.force)return!1;const p=new Map,h=new Map,g=[];let y=!1;const C=We.entries();for(const[b,F]of C)if(F>i){y=!0,F>=q.length?(p.set(b,Ee.get(b)),h.set(b,Ue.get(b))):(p.set(b,q[F].states.get(b)),h.set(b,q[F].lastActions.get(b)));const _=Math.min(F,q.length-1);for(let A=i+1;A<_;A++){const D=q[A].lastActions.get(b);D!==void 0&&D.type&&g.push([b,D,q[A].states.get(b)])}We.set(b,i+1)}for(const b of p.keys())We.set(b,i+g.length+1);const m=we===1?q:q.slice(0,-we+1);if(Ot=[...q.slice(q.length-we+1).filter(({lastActions:b})=>![...p.keys()].some(F=>b.has(F))).map(({lastActions:b})=>b),Ue],il=q.length-we,Dc(),y){let b=l,F=0;for(const[A,D,O]of g){const T=new Map(b);T.set(A,O),m.push({states:T,lastActions:new Map([[A,D]])}),uo([[A,D]],1,i+F+1),b=T,F++}const _=new Map([...b,...p]);m.push({states:_,lastActions:h}),uo([...h.entries()],1,i+g.length+1)}return We.has(e)&&Ui(e,m.length),Ee=new Map([...l,...p]),f===at.get(e)?Ee.delete(e):Ee.set(e,f),Mt=l,we=0,q=m,Jp=o,Ue=new Map([[e,t]]),!0}let qn=()=>{};function $l(){Dt=we>0?q[q.length-we].states:Ee}function $S(){localStorage.setItem("historyOffset",we.toString())}function VH(){we=Math.max(0,Math.min(q.length,parseInt(localStorage.getItem("historyOffset")||"0"))),Mt=new Map,rr()}function yg(e){$l(),$S();const t=Ar.get(e);if(t)for(const n of t.values())n();qn()}function rr(){$l(),$S();for(const[e,t]of Dt.entries()){const n=Ar.get(e);if(n&&(!Mt.has(e)||Mt.get(e)!==t))for(const r of n.values())r()}for(const e of Mt.keys()){const t=Ar.get(e);if(t&&!Dt.has(e))for(const n of t.values())n()}qn()}const Ze=w.createContext({});function KH(e){const{previewComponents:t,children:n}=e,[,r]=w.useState();return oi("ctrl+z,cmd+z",SS,va),oi("ctrl+shift+z,cmd+shift+z",ES,va),oi("alt+z",FS,va),oi("alt+shift+z",kS,va),w.useLayoutEffect(()=>(qn=()=>r({}),()=>{qn=()=>{}}),[]),d(Ze.Provider,{value:{past:q,historyOffset:we,lastActions:Ue,pointedStates:Dt,initialStates:at,previewComponents:t,pins:We,states:Ee,lastAlternate:Ot,lastAlternateIndex:il,savedStashes:Al,historyUrl:bS},children:n})}function _S(e,t,n=o=>o,r){if(!at.has(r)){const i=typeof n=="function"?n(t):t;at.set(r,i)}return e!==Tc&&!Fl.has(r)&&NH(r,e),[w.useSyncExternalStore(IH.bind(r),LH.bind(null,r)),Pc.bind(null,r)]}function bg(e){return Pc.bind(null,e)}const Tc=(e,t)=>t;function Tn(e,t){return _S(Tc,null,()=>typeof t=="function"?t():t,e)}function DS(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 aa={},py={},Sd={},fs={};function be(e,t){const n=s0()+e,r=typeof t,o=r==="object",i=Sd.hasOwnProperty(e),a=i?Sd[e]:()=>{let u;if(aa.hasOwnProperty(e))u=aa[e];else{const c=localStorage.getItem(n),f=c===null?t:DS(r,c);aa[e]=f,fs[e]=new Set,py[e]=p=>{const h=typeof p=="function"?p(aa[e]):p;localStorage.setItem(n,o?JSON.stringify(h):h),aa[e]=h;for(const g of fs[e].values())g(h)},u=f}return u};i||(Sd[e]=a);const[l,s]=w.useState(a);return w.useInsertionEffect(()=>(fs[e].add(s),()=>{fs[e].delete(s)}),[]),[l,py[e]]}function YH(e,t){localStorage.setItem(e,t)}function XH(e,t){localStorage.setItem(e,JSON.stringify(t))}function st(e,t){const n=s0()+e,r=typeof t,o=r==="object",[i,a]=Tn(e,()=>{const l=localStorage.getItem(n);return l===null?t:DS(r,l)});return DH(e,o?XH:YH),[i,a]}const ko=w.createContext({}),qH=([,[e,t]],[,[n,r]])=>e===n?t>r?1:-1:e>n?1:-1,JH=(e,t,n,r)=>{if(!r){const i=Object.values(e).filter(([l])=>l===n).map(([,l])=>l),a=Math.max(...i);return ae(V({},e),{[t]:[n,a+1]})}const o={};return Object.entries(e).sort(qH).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},{})},QH={showMovers(){return w.useState(!1)},drawerOpen(){return be("drawer-open",!1)},dragEnabled(){return be("drag-on",!1)}};function ZH({stateHook:e,children:t,hooks:n=QH,customElements:r}){const o=w.useRef({}),i=w.useRef({}),[a,l]=w.useState(null),[s,u]=w.useState(null),[c,f]=w.useState(null),[p,h]=e(),{map:g}=p,[y,C]=n.showMovers(),[m,v]=n.drawerOpen(),[b,F]=n.dragEnabled(),_=w.useCallback((B,G,fe)=>{if(l(null),!Object.values(g).some(([Se])=>Se===G&&i.current.hasOwnProperty(Se))){let Se=0;Object.entries(i.current).forEach(([ie,z])=>{z===G&&!(ie in g)&&(g[ie]=[z,Se],Se+=1)})}const me=JH(g,B,G,fe);h(ae(V({},p),{map:me}))},[g]),[A,D]=w.useState(!1),[O,T]=w.useState(!1);w.useLayoutEffect(()=>{if(!A){D(!0);return}T(!0)},[A]),w.useInsertionEffect(()=>{var B;if(O)for(const{current:G}of Object.values(o.current)){if(((B=G.children[0])==null?void 0:B.style.order)==="")continue;const fe=[];for(const me of G.children){const Se=parseInt(me.style.order);let ie,z,Z=0;for(const[U,le]of fe){if(Se{h(ae(V({},p),{map:{}}))},Q=w.useRef({element:null,area:null});return w.useLayoutEffect(()=>{D(!0)},[]),d(ko.Provider,{value:{areaRefs:o,origLocationsRef:i,uiState:p,setUiState:h,movePanelTo:_,resetPanels:L,showMovers:y,setShowMovers:C,overElement:a,setOverElement:l,overArea:s,setOverArea:u,timeoutRef:Q,draggedElement:c,setDraggedElement:f,dragEnabled:b,setDragEnabled:F,drawerOpen:m,setDrawerOpen:v},children:d("div",{className:"movable-container"+(c?" is-dragging":""),children:t})})}const PS=10;function eG(e){const{movePanelTo:t,areaRefs:n}=w.useContext(ko),{homeAreaId:r,elementId:o,hostAreaId:i}=e;return d("div",{className:"area-switcher",style:{display:"flex",position:"absolute"},children:d(yt,{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 TS={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 Se;return((Se=t.type)==null?void 0:Se.fName)||t.props.id||`${e}~~${tG(t,n)}`},[]);r.current[g]||(r.current[g]=e);const[v,b]=o.map[g]||[],F=!v||v===e||!((me=C.current[v])!=null&&me.current),[_,A]=w.useState(!1),[D,O]=w.useState(!1),T=w.useMemo(()=>({homeAreaId:e,elementId:g,hostAreaId:v,forceDrag:D,setForceDrag:O}),[v,D]);if(!y&&(v||e)==="drawer")return null;const[L,Q]=l||[],B=Q===g,fe=k("div",{draggable:m||D,style:{position:"relative",order:b||null,viewTransitionName:g==="HistoryControls"?null:g},className:Jp("movable-element",{"is-dragged":_}),onDragStart:()=>{(m||D)&&(h(g),D&&O(!1),setTimeout(()=>{A(!0)},0))},onDragEnd:()=>{if(h(null),A(!1),l){f.current.element&&(clearTimeout(f.current.element),f.current.element=null),f.current.area&&(clearTimeout(f.current.area),f.current.area=null),a(g,L,Q),s(null);return}u&&a(g,u)},children:[p&&p!==g&&d("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}),d(Fi.Provider,{value:T,children:t}),i&&d(ZH,{elementId:g,homeAreaId:e,hostAreaId:v}),p&&p!==g&&d("div",{style:{zIndex:1e3},className:Jp("dropzone",{"drag-hovered":B}),onDragEnter:()=>{f.current.lastEntered=g,f.current.element&&(clearTimeout(f.current.element),f.current.element=null),c(null),s([v||e,g,b||n])},onDragLeave:()=>{f.current.element&&clearTimeout(f.current.element),f.current.lastEntered===g&&(f.current.element=setTimeout(()=>{s(null)},DS))}})]});return F?fe:a0.createPortal(fe,C.current[v].current)}const hy="rgba(0, 0, 0, 0.5)";function bg(){const{setForceDrag:e}=w.useContext(Fi);return d("button",{title:"Pick up element",onMouseDown:()=>{e(!0)},style:{background:"transparent",color:hy,borderColor:hy},children:d("span",{style:{transform:"rotate(90deg)"},children:"|||"})})}function TS(e,t){return e.disabled===t.disabled&&e.controls[0]===t.controls[0]&&e.controls[1]===t.controls[1]}const Ce=w.memo(function(a){var l=a,{controls:[t,n],disabled:r=!1,children:o}=l,i=mn(l,["controls","disabled","children"]);return k("label",ae(V({},i),{style:ae(V({},i.style),{marginBottom:"2px"}),children:[d("input",{disabled:r,type:"checkbox",readOnly:!0,checked:!!t,onClick:()=>n(!t)}),o]}))},TS);function OS(o){var i=o,{hook:e,children:t,disabled:n=!1}=i,r=mn(i,["hook","children","disabled"]);const[a,l]=e();return k("label",ae(V({},r),{style:ae(V({},r.style),{marginBottom:"2px"}),children:[d("input",{disabled:n,type:"checkbox",readOnly:!0,checked:!!a,onClick:()=>l(!a)}),t]}))}const rG=4;function gy(e){const t=e.replace(/^--/,"").split("-"),n=[];for(let r=0;r<3&&ri.size>rG).sort(([,i],[,a])=>a.size-i.size)}function Oc(){const{allVars:e}=w.useContext(qe),[t,n]=w.useState(null),[r,o]=w.useState(!1),[i,a]=w.useState(5),[l,s]=te.annoyingPrefix(),[u,c]=w.useState(new Set);function f(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:[d(xt,{el:Oc,tasks:[()=>['Ignore either "bs" or "lm"',["lm","bs"].includes(xe.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.`}),d(bg,{}),d(Ve,{placeholder:"Remove annoying prefix",title:"Remove annoying prefix",value:l,onChange:s,style:{textDecoration:"line-through",textDecorationColor:"grey",textDecorationThickness:"1px"}}),!t&&d("button",{onClick:()=>{n(oG(e))},children:"Detect"}),t&&d("button",{onClick:()=>{n(null)},children:"Close"}),t&&k("div",{children:[d("input",{type:"number",min:"1",value:i,onChange:m=>{a(m.target.value)}}),d(Ce,{controls:[r,o],children:"Multi"}),r&&(u==null?void 0:u.size)>0&&d("button",{onClick:p,children:"Confirm multi select"}),d("button",{onClick:()=>{s("")},children:"None"}),t.slice(0,i).map(([m,y])=>d("div",{children:k("button",{style:m===l?{background:"lightblue"}:r&&u.has(m)?{background:"yellow"}:{},onClick:(r?f:h).bind(null,m),title:[...y.values()].join(` -`),children:[r&&u.has(m)&&d("input",{type:"checkbox",checked:!0}),m," (",y.size,")"]})},m))]})]})}Oc.fName="RemoveAnnoyingPrefix";const my=5,Sd={min:.2,step:.02};function Bc(){const[e,t]=te.scales(),{width:n,height:r}=xe,o=parseFloat(e[`${n}x${r}`]||1),i=o<=1?o:1+(o-1)/my,a=`${n}x${r}`,l=u=>{const c=u.target.value,f=c<=1?c:(1+(c-1)*my).toFixed(2).replace(/0+$/,"").replace(/\.$/,"");t(ae(V({},e),{[a]:f}))};function s(u){const c=Math.round(u.deltaY/100),f=Math.max(.2,o+c*Sd.step);t(ae(V({},e),{[a]:f.toFixed(2)}))}return k("div",{onWheelCapture:s,className:"frame-scale-slider",style:{minWidth:"200px"},children:[d("input",ae(V({style:{margin:0,marginTop:"-4px"},type:"range",list:"scale-points",value:i,max:1.4},Sd),{onChange:l})),d("input",ae(V({style:{verticalAlign:"top"},type:"number",max:3,value:o},Sd),{onChange:u=>t(ae(V({},e),{[a]:u.target.value}))})),k("datalist",{id:"scale-points",children:[d("option",{value:"1"}),d("option",{value:"1.2"}),d("option",{value:"1.4"})]}),d(xt,{tasks:[u=>["Increase the zoom level to 2 or more.",o>=2]],el:Bc,children:"Zoom in and out here. You can also scroll above the element."})]})}Bc.fName="FrameScaleSlider";function iG(e,t){return Array.from(t.children).findIndex(n=>n===e)}const Ed=new WeakMap;function aG(e){try{return e.closest("html").querySelectorAll(`#${e.id}`).length===1}catch(t){return!1}}function Mc(e){if(e.nodeName==="HTML"||e.nodeName==="BODY")return[];if(Ed.has(e))return Ed.get(e);const t=[];for(;e.nodeName!=="BODY";){const n=e.parentNode,r=[e.tagName,iG(e,n)];e.id&&aG(e)&&r.push(e.id),t.push(r),e=n}return t.reverse(),Ed.set(e,t),t}function Ht(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 lG(e){return e.replaceAll(s0,"").replaceAll(/:?:(before|after)/g,"").replaceAll(u2,"").trim()}let sG,fs;function ds(e,t={behavior:"smooth",block:"center"}){if(e.scrollIntoView(t),el(e),fs){const[r,o,i]=fs;window.clearTimeout(r),i!==e&&o()}const n=()=>{fi(e),fs=null};fs=[setTimeout(n,1500),n,e]}let vy=0;function co({selector:e,hideIfNotFound:t,hideIfOne:n,children:r,showLabel:o=!0,property:i=null,label:a,allowScroll:l=!1,allowDrag:s=!0}){const{frameLoaded:u,openFirstOnInspect:c}=xe,[f,p]=te.inspectedPath(),[,h]=te.openGroups(),m=w.useMemo(()=>lG(e),[]),y=m===sG,{frameRef:C}=w.useContext(qe),g=w.useMemo(()=>{if(!u||m==="")return[];try{const A=C.current.contentWindow.document.querySelectorAll(m);let D;try{D=Ht(f,C.current.contentWindow.document)}catch(O){}return[...A].map((O,T)=>({index:T,node:O,tagName:`${O.tagName}`,id:`${O.id}`,className:`${O.className}`,isCurrentlyInspected:O.contains(D)}))}catch(A){return console.log(A),[]}},[e,u,f]),[v,b]=w.useState(Math.max(g.findIndex(A=>A.isCurrentlyInspected),0));if(g.length===0)return t||n?null:k("div",{style:{opacity:.6},children:[o&&k("div",{className:"monospace-code",draggable:s,onDragStart:A=>A.dataTransfer.setData("selector",e),children:[(a||e).trim(),d("span",{className:"var-control-property monospace-code",children:i})]}),r]});if(n&&g.length===1)return null;const F=g[v];function _(A){const D=performance.now(),O=D-vy<100;vy=D;const T=Math.round(A.deltaY/100)*-1,L=v-T,Q=L<0?L+g.length:L>=g.length?L-g.length:L;b(Q),ds(g[Q].node,{behavior:O?"instant":"smooth",block:"center"})}return k("div",{style:{outline:y?"4px solid rgb(26, 217, 210)":"none"},onWheelCapture:l?_:null,children:[o&&k("div",{className:"monospace-code",draggable:s,onDragStart:A=>{A.dataTransfer.setData("selector",e),A.stopPropagation()},children:[(a||e).trim(),d("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:[g.length>0&&d("button",{className:"scroll-in-view",onClick:()=>{ds(g[v].node)},children:"👁"}),g.length>1&&k(w.Fragment,{children:[d("button",{onClick:()=>{const A=v===0?g.length-1:v-1;b(A),ds(g[A].node)},children:"↑"}),d("button",{onClick:()=>{const A=v===g.length-1?0:v+1;b(A),ds(g[A].node)},children:"↓"})]})]}),k("div",{style:{flexShrink:1},children:[!!F&&!F.isCurrentlyInspected&&d("button",{onClick:()=>{if(p(Mc(F.node)),Ml(),c){const A=ko(F.node);h({[A[0].label]:!0},{skipHistory:!0,appendOnly:!0})}},style:{fontSize:"10px"},children:"🔍"}),k("span",{children:[v+1,"/",g.length]}),d("span",{style:{maxWidth:"120px",fontWeight:F&&F.isCurrentlyInspected?"bold":"normal"},children:F&&` ${F.tagName.toLowerCase()}.${F.className.trim().replaceAll(" ",".")} ${F.id?`#${F.id}`:""}`})]})]}),r]})}function uG(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 Vt(e,t=()=>{}){return uG.bind(null,e,t)}var BS={exports:{}},Oe={};/** @license React v16.13.1 +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o{var Se;return((Se=t.type)==null?void 0:Se.fName)||t.props.id||`${e}~~${nG(t,n)}`},[]);r.current[m]||(r.current[m]=e);const[v,b]=o.map[m]||[],F=!v||v===e||!((me=C.current[v])!=null&&me.current),[_,A]=w.useState(!1),[D,O]=w.useState(!1),T=w.useMemo(()=>({homeAreaId:e,elementId:m,hostAreaId:v,forceDrag:D,setForceDrag:O}),[v,D]);if(!y&&(v||e)==="drawer")return null;const[L,Q]=l||[],B=Q===m,fe=k("div",{draggable:g||D,style:{position:"relative",order:b||null,viewTransitionName:m==="HistoryControls"?null:m},className:Qp("movable-element",{"is-dragged":_}),onDragStart:()=>{(g||D)&&(h(m),D&&O(!1),setTimeout(()=>{A(!0)},0))},onDragEnd:()=>{if(h(null),A(!1),l){f.current.element&&(clearTimeout(f.current.element),f.current.element=null),f.current.area&&(clearTimeout(f.current.area),f.current.area=null),a(m,L,Q),s(null);return}u&&a(m,u)},children:[p&&p!==m&&d("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:m}),d(ki.Provider,{value:T,children:t}),i&&d(eG,{elementId:m,homeAreaId:e,hostAreaId:v}),p&&p!==m&&d("div",{style:{zIndex:1e3},className:Qp("dropzone",{"drag-hovered":B}),onDragEnter:()=>{f.current.lastEntered=m,f.current.element&&(clearTimeout(f.current.element),f.current.element=null),c(null),s([v||e,m,b||n])},onDragLeave:()=>{f.current.element&&clearTimeout(f.current.element),f.current.lastEntered===m&&(f.current.element=setTimeout(()=>{s(null)},PS))}})]});return F?fe:l0.createPortal(fe,C.current[v].current)}const hy="rgba(0, 0, 0, 0.5)";function wg(){const{setForceDrag:e}=w.useContext(ki);return d("button",{title:"Pick up element",onMouseDown:()=>{e(!0)},style:{background:"transparent",color:hy,borderColor:hy},children:d("span",{style:{transform:"rotate(90deg)"},children:"|||"})})}function OS(e,t){return e.disabled===t.disabled&&e.controls[0]===t.controls[0]&&e.controls[1]===t.controls[1]}const Ce=w.memo(function(a){var l=a,{controls:[t,n],disabled:r=!1,children:o}=l,i=mn(l,["controls","disabled","children"]);return k("label",ae(V({},i),{style:ae(V({},i.style),{marginBottom:"2px"}),children:[d("input",{disabled:r,type:"checkbox",readOnly:!0,checked:!!t,onClick:()=>n(!t)}),o]}))},OS);function BS(o){var i=o,{hook:e,children:t,disabled:n=!1}=i,r=mn(i,["hook","children","disabled"]);const[a,l]=e();return k("label",ae(V({},r),{style:ae(V({},r.style),{marginBottom:"2px"}),children:[d("input",{disabled:n,type:"checkbox",readOnly:!0,checked:!!a,onClick:()=>l(!a)}),t]}))}const oG=4;function gy(e){const t=e.replace(/^--/,"").split("-"),n=[];for(let r=0;r<3&&ri.size>oG).sort(([,i],[,a])=>a.size-i.size)}function Oc(){const{allVars:e}=w.useContext(qe),[t,n]=w.useState(null),[r,o]=w.useState(!1),[i,a]=w.useState(5),[l,s]=te.annoyingPrefix(),[u,c]=w.useState(new Set);function f(g){u.has(g)?u.delete(g):u.add(g),c(new Set(u))}function p(){s(`${[...u.values()].join("|")}`),n(null)}function h(g){s(g),n(null)}return k("div",{children:[d(Ct,{el:Oc,tasks:[()=>['Ignore either "bs" or "lm"',["lm","bs"].includes(xe.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.`}),d(wg,{}),d(Ve,{placeholder:"Remove annoying prefix",title:"Remove annoying prefix",value:l,onChange:s,style:{textDecoration:"line-through",textDecorationColor:"grey",textDecorationThickness:"1px"}}),!t&&d("button",{onClick:()=>{n(iG(e))},children:"Detect"}),t&&d("button",{onClick:()=>{n(null)},children:"Close"}),t&&k("div",{children:[d("input",{type:"number",min:"1",value:i,onChange:g=>{a(g.target.value)}}),d(Ce,{controls:[r,o],children:"Multi"}),r&&(u==null?void 0:u.size)>0&&d("button",{onClick:p,children:"Confirm multi select"}),d("button",{onClick:()=>{s("")},children:"None"}),t.slice(0,i).map(([g,y])=>d("div",{children:k("button",{style:g===l?{background:"lightblue"}:r&&u.has(g)?{background:"yellow"}:{},onClick:(r?f:h).bind(null,g),title:[...y.values()].join(` +`),children:[r&&u.has(g)&&d("input",{type:"checkbox",checked:!0}),g," (",y.size,")"]})},g))]})]})}Oc.fName="RemoveAnnoyingPrefix";const my=5,Ed={min:.2,step:.02};function Bc(){const[e,t]=te.scales(),{width:n,height:r}=xe,o=parseFloat(e[`${n}x${r}`]||1),i=o<=1?o:1+(o-1)/my,a=`${n}x${r}`,l=u=>{const c=u.target.value,f=c<=1?c:(1+(c-1)*my).toFixed(2).replace(/0+$/,"").replace(/\.$/,"");t(ae(V({},e),{[a]:f}))};function s(u){const c=Math.round(u.deltaY/100),f=Math.max(.2,o+c*Ed.step);t(ae(V({},e),{[a]:f.toFixed(2)}))}return k("div",{onWheelCapture:s,className:"frame-scale-slider",style:{minWidth:"200px"},children:[d("input",ae(V({style:{margin:0,marginTop:"-4px"},type:"range",list:"scale-points",value:i,max:1.4},Ed),{onChange:l})),d("input",ae(V({style:{verticalAlign:"top"},type:"number",max:3,value:o},Ed),{onChange:u=>t(ae(V({},e),{[a]:u.target.value}))})),k("datalist",{id:"scale-points",children:[d("option",{value:"1"}),d("option",{value:"1.2"}),d("option",{value:"1.4"})]}),d(Ct,{tasks:[u=>["Increase the zoom level to 2 or more.",o>=2]],el:Bc,children:"Zoom in and out here. You can also scroll above the element."})]})}Bc.fName="FrameScaleSlider";function aG(e,t){return Array.from(t.children).findIndex(n=>n===e)}const Fd=new WeakMap;function lG(e){try{return e.closest("html").querySelectorAll(`#${e.id}`).length===1}catch(t){return!1}}function Mc(e){if(e.nodeName==="HTML"||e.nodeName==="BODY")return[];if(Fd.has(e))return Fd.get(e);const t=[];for(;e.nodeName!=="BODY";){const n=e.parentNode,r=[e.tagName,aG(e,n)];e.id&&lG(e)&&r.push(e.id),t.push(r),e=n}return t.reverse(),Fd.set(e,t),t}function Ht(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 sG(e){return e.replaceAll(u0,"").replaceAll(/:?:(before|after)/g,"").replaceAll(c2,"").trim()}let uG,ds;function ps(e,t={behavior:"smooth",block:"center"}){if(e.scrollIntoView(t),el(e),ds){const[r,o,i]=ds;window.clearTimeout(r),i!==e&&o()}const n=()=>{di(e),ds=null};ds=[setTimeout(n,1500),n,e]}let vy=0;function co({selector:e,hideIfNotFound:t,hideIfOne:n,children:r,showLabel:o=!0,property:i=null,label:a,allowScroll:l=!1,allowDrag:s=!0}){const{frameLoaded:u,openFirstOnInspect:c}=xe,[f,p]=te.inspectedPath(),[,h]=te.openGroups(),g=w.useMemo(()=>sG(e),[]),y=g===uG,{frameRef:C}=w.useContext(qe),m=w.useMemo(()=>{if(!u||g==="")return[];try{const A=C.current.contentWindow.document.querySelectorAll(g);let D;try{D=Ht(f,C.current.contentWindow.document)}catch(O){}return[...A].map((O,T)=>({index:T,node:O,tagName:`${O.tagName}`,id:`${O.id}`,className:`${O.className}`,isCurrentlyInspected:O.contains(D)}))}catch(A){return console.log(A),[]}},[e,u,f]),[v,b]=w.useState(Math.max(m.findIndex(A=>A.isCurrentlyInspected),0));if(m.length===0)return t||n?null:k("div",{style:{opacity:.6},children:[o&&k("div",{className:"monospace-code",draggable:s,onDragStart:A=>A.dataTransfer.setData("selector",e),children:[(a||e).trim(),d("span",{className:"var-control-property monospace-code",children:i})]}),r]});if(n&&m.length===1)return null;const F=m[v];function _(A){const D=performance.now(),O=D-vy<100;vy=D;const T=Math.round(A.deltaY/100)*-1,L=v-T,Q=L<0?L+m.length:L>=m.length?L-m.length:L;b(Q),ps(m[Q].node,{behavior:O?"instant":"smooth",block:"center"})}return k("div",{style:{outline:y?"4px solid rgb(26, 217, 210)":"none"},onWheelCapture:l?_:null,children:[o&&k("div",{className:"monospace-code",draggable:s,onDragStart:A=>{A.dataTransfer.setData("selector",e),A.stopPropagation()},children:[(a||e).trim(),d("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:[m.length>0&&d("button",{className:"scroll-in-view",onClick:()=>{ps(m[v].node)},children:"👁"}),m.length>1&&k(w.Fragment,{children:[d("button",{onClick:()=>{const A=v===0?m.length-1:v-1;b(A),ps(m[A].node)},children:"↑"}),d("button",{onClick:()=>{const A=v===m.length-1?0:v+1;b(A),ps(m[A].node)},children:"↓"})]})]}),k("div",{style:{flexShrink:1},children:[!!F&&!F.isCurrentlyInspected&&d("button",{onClick:()=>{if(p(Mc(F.node)),Rl(),c){const A=Ao(F.node);h({[A[0].label]:!0},{skipHistory:!0,appendOnly:!0})}},style:{fontSize:"10px"},children:"🔍"}),k("span",{children:[v+1,"/",m.length]}),d("span",{style:{maxWidth:"120px",fontWeight:F&&F.isCurrentlyInspected?"bold":"normal"},children:F&&` ${F.tagName.toLowerCase()}.${F.className.trim().replaceAll(" ",".")} ${F.id?`#${F.id}`:""}`})]})]}),r]})}function cG(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 Vt(e,t=()=>{}){return cG.bind(null,e,t)}var MS={exports:{}},Oe={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ht=typeof Symbol=="function"&&Symbol.for,wg=ht?Symbol.for("react.element"):60103,xg=ht?Symbol.for("react.portal"):60106,Rc=ht?Symbol.for("react.fragment"):60107,Nc=ht?Symbol.for("react.strict_mode"):60108,Ic=ht?Symbol.for("react.profiler"):60114,Lc=ht?Symbol.for("react.provider"):60109,zc=ht?Symbol.for("react.context"):60110,Cg=ht?Symbol.for("react.async_mode"):60111,jc=ht?Symbol.for("react.concurrent_mode"):60111,Hc=ht?Symbol.for("react.forward_ref"):60112,Gc=ht?Symbol.for("react.suspense"):60113,cG=ht?Symbol.for("react.suspense_list"):60120,Wc=ht?Symbol.for("react.memo"):60115,Uc=ht?Symbol.for("react.lazy"):60116,fG=ht?Symbol.for("react.block"):60121,dG=ht?Symbol.for("react.fundamental"):60117,pG=ht?Symbol.for("react.responder"):60118,hG=ht?Symbol.for("react.scope"):60119;function rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wg:switch(e=e.type,e){case Cg:case jc:case Rc:case Ic:case Nc:case Gc:return e;default:switch(e=e&&e.$$typeof,e){case zc:case Hc:case Uc:case Wc:case Lc:return e;default:return t}}case xg:return t}}}function MS(e){return rn(e)===jc}Oe.AsyncMode=Cg;Oe.ConcurrentMode=jc;Oe.ContextConsumer=zc;Oe.ContextProvider=Lc;Oe.Element=wg;Oe.ForwardRef=Hc;Oe.Fragment=Rc;Oe.Lazy=Uc;Oe.Memo=Wc;Oe.Portal=xg;Oe.Profiler=Ic;Oe.StrictMode=Nc;Oe.Suspense=Gc;Oe.isAsyncMode=function(e){return MS(e)||rn(e)===Cg};Oe.isConcurrentMode=MS;Oe.isContextConsumer=function(e){return rn(e)===zc};Oe.isContextProvider=function(e){return rn(e)===Lc};Oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wg};Oe.isForwardRef=function(e){return rn(e)===Hc};Oe.isFragment=function(e){return rn(e)===Rc};Oe.isLazy=function(e){return rn(e)===Uc};Oe.isMemo=function(e){return rn(e)===Wc};Oe.isPortal=function(e){return rn(e)===xg};Oe.isProfiler=function(e){return rn(e)===Ic};Oe.isStrictMode=function(e){return rn(e)===Nc};Oe.isSuspense=function(e){return rn(e)===Gc};Oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rc||e===jc||e===Ic||e===Nc||e===Gc||e===cG||typeof e=="object"&&e!==null&&(e.$$typeof===Uc||e.$$typeof===Wc||e.$$typeof===Lc||e.$$typeof===zc||e.$$typeof===Hc||e.$$typeof===dG||e.$$typeof===pG||e.$$typeof===hG||e.$$typeof===fG)};Oe.typeOf=rn;BS.exports=Oe;var Sg=BS.exports;function gG(e){function t(R,K,X,ne,P){for(var Y=0,M=0,de=0,ue=0,pe,se,S=0,$=0,E,N=E=pe=0,I=0,j=0,ce=0,ve=0,_e=X.length,he=_e-1,Ae,re="",De="",gt="",Ct="",on;I<_e;){if(se=X.charCodeAt(I),I===he&&M+ue+de+Y!==0&&(M!==0&&(se=M===47?10:47),ue=de=Y=0,_e++,he++),M+ue+de+Y===0){if(I===he&&(0pe)&&(ve=(re=re.replace(" ",":")).length),0ne&&(ne=(K=K.trim()).charCodeAt(0)),ne){case 38:return K.replace(g,"$1"+R.trim());case 58:return R.trim()+K.replace(g,"$1"+R.trim());default:if(0<1*X&&0M.charCodeAt(8))break;case 115:P=P.replace(M,"-webkit-"+M)+";"+P;break;case 207:case 102:P=P.replace(M,"-webkit-"+(102X.charCodeAt(0)&&(X=X.trim()),le=X,X=[le],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var _G=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;n>=a;)(a<<=1)<0&&_l(16,""+n);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var l=i;l=this.length||this.groupSizes[n]===0)return r;for(var o=this.groupSizes[n],i=this.indexOfGroup(n),a=i+o,l=i;l=Ba&&(Ba=t+1),Os.set(e,t),Au.set(t,e)},TG="style["+ki+'][data-styled-version="5.3.3"]',OG=new RegExp("^"+ki+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),BG=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;u--){var c=s[u];if(c&&c.nodeType===1&&c.hasAttribute(ki))return c}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(ki,"active"),r.setAttribute("data-styled-version","5.3.3");var a=RG();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},NG=function(){function e(n){var r=this.element=IS(n);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,l=i.length;a=0){var o=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(f+=p+",")}),i+=""+u+c+'{content:"'+f+`"}/*!sc*/ -`}}}return i}(this)},e}(),jG=/(a)(d)/gi,Fy=function(e){return String.fromCharCode(e+(e>25?39:97))};function Zp(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Fy(t%52)+n;return(Fy(t%52)+n).replace(jG,"$1-$2")}var oi=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},zS=function(e){return oi(5381,e)};function HG(e){for(var t=0;t>>0);if(!n.hasNameForId(o,l)){var s=r(a,"."+l,void 0,o);n.insertRules(o,l,s)}i.push(l),this.staticRulesId=l}else{for(var u=this.rules.length,c=oi(this.baseHash,r.hash),f="",p=0;p>>0);if(!n.hasNameForId(o,C)){var g=r(f,"."+C,void 0,o);n.insertRules(o,C,g)}i.push(C)}}return i.join(" ")},e}(),UG=/^\s*\/\/.*$/gm,VG=[":","[",".","#"];function KG(e){var t,n,r,o,i=$r,a=i.options,l=a===void 0?$r:a,s=i.plugins,u=s===void 0?ku:s,c=new gG(l),f=[],p=function(y){function C(g){if(g)try{y(g+"}")}catch(v){}}return function(g,v,b,F,_,A,D,O,T,L){switch(g){case 1:if(T===0&&v.charCodeAt(0)===64)return y(v+";"),"";break;case 2:if(O===0)return v+"/*|*/";break;case 3:switch(O){case 102:case 112:return y(b[0]+v),"";default:return v+(L===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(C)}}}(function(y){f.push(y)}),h=function(y,C,g){return C===0&&VG.indexOf(g[n.length])!==-1||g.match(o)?y:"."+t};function m(y,C,g,v){v===void 0&&(v="&");var b=y.replace(UG,""),F=C&&g?g+" "+C+" { "+b+" }":b;return t=v,n=C,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(g||!C?"":C,F)}return c.use([].concat(u,[function(y,C,g){y===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,h))},p,function(y){if(y===-2){var C=f;return f=[],C}}])),m.hash=u.length?u.reduce(function(y,C){return C.name||_l(15),oi(y,C.name)},5381).toString():"",m}var jS=x.createContext();jS.Consumer;var HS=x.createContext(),YG=(HS.Consumer,new LS),eh=KG();function XG(){return w.useContext(jS)||YG}function qG(){return w.useContext(HS)||eh}var JG=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=eh);var a=r.name+i.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,i(r.rules,a,"@keyframes"))},this.toString=function(){return _l(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=eh),this.name+t.hash},e}(),QG=/([A-Z])/,ZG=/([A-Z])/g,eW=/^ms-/,tW=function(e){return"-"+e.toLowerCase()};function ky(e){return QG.test(e)?e.replace(ZG,tW).replace(eW,"-ms-"):e}var Ay=function(e){return e==null||e===!1||e===""};function Ai(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,l=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,iW=/(^-|-$)/g;function Fd(e){return e.replace(oW,"-").replace(iW,"")}var aW=function(e){return Zp(zS(e)>>>0)};function hs(e){return typeof e=="string"&&!0}var th=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},lW=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function sW(e,t,n){var r=e[n];th(t)&&th(r)?GS(r,t):e[n]=t}function GS(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(L[O]=A[O]);return L}(t,["componentId"]),_=b&&b+"-"+(hs(v)?v:Fd(Sy(v)));return US(v,Wn({},F,{attrs:p,componentId:_}),n)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(v){this._foldedDefaultProps=r?GS({},e.defaultProps,v):v}}),m.toString=function(){return"."+m.styledComponentId},o&&AG(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var et=function(e){return function t(n,r,o){if(o===void 0&&(o=$r),!Sg.isValidElementType(r))return _l(1,String(r));var i=function(){return n(r,o,nW.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,Wn({},o,{},a))},i.attrs=function(a){return t(n,r,Wn({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(US,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){et[e]=et(e)});var uW=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ll=et.div(_y||(_y=uW([` + */var ht=typeof Symbol=="function"&&Symbol.for,xg=ht?Symbol.for("react.element"):60103,Cg=ht?Symbol.for("react.portal"):60106,Rc=ht?Symbol.for("react.fragment"):60107,Nc=ht?Symbol.for("react.strict_mode"):60108,Ic=ht?Symbol.for("react.profiler"):60114,Lc=ht?Symbol.for("react.provider"):60109,zc=ht?Symbol.for("react.context"):60110,Sg=ht?Symbol.for("react.async_mode"):60111,jc=ht?Symbol.for("react.concurrent_mode"):60111,Hc=ht?Symbol.for("react.forward_ref"):60112,Gc=ht?Symbol.for("react.suspense"):60113,fG=ht?Symbol.for("react.suspense_list"):60120,Wc=ht?Symbol.for("react.memo"):60115,Uc=ht?Symbol.for("react.lazy"):60116,dG=ht?Symbol.for("react.block"):60121,pG=ht?Symbol.for("react.fundamental"):60117,hG=ht?Symbol.for("react.responder"):60118,gG=ht?Symbol.for("react.scope"):60119;function rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xg:switch(e=e.type,e){case Sg:case jc:case Rc:case Ic:case Nc:case Gc:return e;default:switch(e=e&&e.$$typeof,e){case zc:case Hc:case Uc:case Wc:case Lc:return e;default:return t}}case Cg:return t}}}function RS(e){return rn(e)===jc}Oe.AsyncMode=Sg;Oe.ConcurrentMode=jc;Oe.ContextConsumer=zc;Oe.ContextProvider=Lc;Oe.Element=xg;Oe.ForwardRef=Hc;Oe.Fragment=Rc;Oe.Lazy=Uc;Oe.Memo=Wc;Oe.Portal=Cg;Oe.Profiler=Ic;Oe.StrictMode=Nc;Oe.Suspense=Gc;Oe.isAsyncMode=function(e){return RS(e)||rn(e)===Sg};Oe.isConcurrentMode=RS;Oe.isContextConsumer=function(e){return rn(e)===zc};Oe.isContextProvider=function(e){return rn(e)===Lc};Oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xg};Oe.isForwardRef=function(e){return rn(e)===Hc};Oe.isFragment=function(e){return rn(e)===Rc};Oe.isLazy=function(e){return rn(e)===Uc};Oe.isMemo=function(e){return rn(e)===Wc};Oe.isPortal=function(e){return rn(e)===Cg};Oe.isProfiler=function(e){return rn(e)===Ic};Oe.isStrictMode=function(e){return rn(e)===Nc};Oe.isSuspense=function(e){return rn(e)===Gc};Oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Rc||e===jc||e===Ic||e===Nc||e===Gc||e===fG||typeof e=="object"&&e!==null&&(e.$$typeof===Uc||e.$$typeof===Wc||e.$$typeof===Lc||e.$$typeof===zc||e.$$typeof===Hc||e.$$typeof===pG||e.$$typeof===hG||e.$$typeof===gG||e.$$typeof===dG)};Oe.typeOf=rn;MS.exports=Oe;var Eg=MS.exports;function mG(e){function t(R,K,X,ne,P){for(var Y=0,M=0,de=0,ue=0,pe,se,S=0,$=0,E,N=E=pe=0,I=0,j=0,ce=0,ve=0,_e=X.length,he=_e-1,Ae,re="",De="",gt="",St="",on;I<_e;){if(se=X.charCodeAt(I),I===he&&M+ue+de+Y!==0&&(M!==0&&(se=M===47?10:47),ue=de=Y=0,_e++,he++),M+ue+de+Y===0){if(I===he&&(0pe)&&(ve=(re=re.replace(" ",":")).length),0ne&&(ne=(K=K.trim()).charCodeAt(0)),ne){case 38:return K.replace(m,"$1"+R.trim());case 58:return R.trim()+K.replace(m,"$1"+R.trim());default:if(0<1*X&&0M.charCodeAt(8))break;case 115:P=P.replace(M,"-webkit-"+M)+";"+P;break;case 207:case 102:P=P.replace(M,"-webkit-"+(102X.charCodeAt(0)&&(X=X.trim()),le=X,X=[le],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var DG=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;n>=a;)(a<<=1)<0&&Dl(16,""+n);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var l=i;l=this.length||this.groupSizes[n]===0)return r;for(var o=this.groupSizes[n],i=this.indexOfGroup(n),a=i+o,l=i;l=Ba&&(Ba=t+1),Bs.set(e,t),$u.set(t,e)},OG="style["+Ai+'][data-styled-version="5.3.3"]',BG=new RegExp("^"+Ai+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),MG=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;u--){var c=s[u];if(c&&c.nodeType===1&&c.hasAttribute(Ai))return c}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(Ai,"active"),r.setAttribute("data-styled-version","5.3.3");var a=NG();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},IG=function(){function e(n){var r=this.element=LS(n);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,l=i.length;a=0){var o=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(f+=p+",")}),i+=""+u+c+'{content:"'+f+`"}/*!sc*/ +`}}}return i}(this)},e}(),HG=/(a)(d)/gi,Fy=function(e){return String.fromCharCode(e+(e>25?39:97))};function eh(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Fy(t%52)+n;return(Fy(t%52)+n).replace(HG,"$1-$2")}var ii=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},jS=function(e){return ii(5381,e)};function GG(e){for(var t=0;t>>0);if(!n.hasNameForId(o,l)){var s=r(a,"."+l,void 0,o);n.insertRules(o,l,s)}i.push(l),this.staticRulesId=l}else{for(var u=this.rules.length,c=ii(this.baseHash,r.hash),f="",p=0;p>>0);if(!n.hasNameForId(o,C)){var m=r(f,"."+C,void 0,o);n.insertRules(o,C,m)}i.push(C)}}return i.join(" ")},e}(),VG=/^\s*\/\/.*$/gm,KG=[":","[",".","#"];function YG(e){var t,n,r,o,i=$r,a=i.options,l=a===void 0?$r:a,s=i.plugins,u=s===void 0?Au:s,c=new mG(l),f=[],p=function(y){function C(m){if(m)try{y(m+"}")}catch(v){}}return function(m,v,b,F,_,A,D,O,T,L){switch(m){case 1:if(T===0&&v.charCodeAt(0)===64)return y(v+";"),"";break;case 2:if(O===0)return v+"/*|*/";break;case 3:switch(O){case 102:case 112:return y(b[0]+v),"";default:return v+(L===0?"/*|*/":"")}case-2:v.split("/*|*/}").forEach(C)}}}(function(y){f.push(y)}),h=function(y,C,m){return C===0&&KG.indexOf(m[n.length])!==-1||m.match(o)?y:"."+t};function g(y,C,m,v){v===void 0&&(v="&");var b=y.replace(VG,""),F=C&&m?m+" "+C+" { "+b+" }":b;return t=v,n=C,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(m||!C?"":C,F)}return c.use([].concat(u,[function(y,C,m){y===2&&m.length&&m[0].lastIndexOf(n)>0&&(m[0]=m[0].replace(r,h))},p,function(y){if(y===-2){var C=f;return f=[],C}}])),g.hash=u.length?u.reduce(function(y,C){return C.name||Dl(15),ii(y,C.name)},5381).toString():"",g}var HS=x.createContext();HS.Consumer;var GS=x.createContext(),XG=(GS.Consumer,new zS),th=YG();function qG(){return w.useContext(HS)||XG}function JG(){return w.useContext(GS)||th}var QG=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=th);var a=r.name+i.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,i(r.rules,a,"@keyframes"))},this.toString=function(){return Dl(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=th),this.name+t.hash},e}(),ZG=/([A-Z])/,eW=/([A-Z])/g,tW=/^ms-/,nW=function(e){return"-"+e.toLowerCase()};function ky(e){return ZG.test(e)?e.replace(eW,nW).replace(tW,"-ms-"):e}var Ay=function(e){return e==null||e===!1||e===""};function $i(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,l=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,aW=/(^-|-$)/g;function kd(e){return e.replace(iW,"-").replace(aW,"")}var lW=function(e){return eh(jS(e)>>>0)};function gs(e){return typeof e=="string"&&!0}var nh=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},sW=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function uW(e,t,n){var r=e[n];nh(t)&&nh(r)?WS(r,t):e[n]=t}function WS(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(L[O]=A[O]);return L}(t,["componentId"]),_=b&&b+"-"+(gs(v)?v:kd(Sy(v)));return VS(v,Wn({},F,{attrs:p,componentId:_}),n)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(v){this._foldedDefaultProps=r?WS({},e.defaultProps,v):v}}),g.toString=function(){return"."+g.styledComponentId},o&&$G(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var et=function(e){return function t(n,r,o){if(o===void 0&&(o=$r),!Eg.isValidElementType(r))return Dl(1,String(r));var i=function(){return n(r,o,rW.apply(void 0,arguments))};return i.withConfig=function(a){return t(n,r,Wn({},o,{},a))},i.attrs=function(a){return t(n,r,Wn({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(VS,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){et[e]=et(e)});var cW=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},ll=et.div(_y||(_y=cW([` justify-content: flex-end; width: 60px; display: flex; @@ -110,13 +110,13 @@ ${SH(n)} display: flex; align-items: center; user-select: none; -`]))),_y,Dl=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},cW=et.div(Dy||(Dy=Dl([` +`]))),_y,Pl=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},fW=et.div(Dy||(Dy=Pl([` flex: 1; display: flex; `],[` flex: 1; display: flex; -`]))),fW=et.div(Py||(Py=Dl([` +`]))),dW=et.div(Py||(Py=Pl([` display: flex; width: 170px; margin: 0 0 0 auto; @@ -124,7 +124,7 @@ ${SH(n)} display: flex; width: 170px; margin: 0 0 0 auto; -`]))),VS=et.div(Ty||(Ty=Dl([` +`]))),KS=et.div(Ty||(Ty=Pl([` border: 1px solid #555a; background: `,`; cursor: pointer; @@ -144,15 +144,15 @@ ${SH(n)} justify-content: center; box-sizing: border-box; margin: 0.5em 0; -`])),function(e){return e.active?"#4285F4":"transparent"}),dW=et(VS)(Oy||(Oy=Dl([` +`])),function(e){return e.active?"#4285F4":"transparent"}),pW=et(KS)(Oy||(Oy=Pl([` border-radius: 2px 0 0 2px; `],[` border-radius: 2px 0 0 2px; -`]))),pW=et(VS)(By||(By=Dl([` +`]))),hW=et(KS)(By||(By=Pl([` border-radius: 0 2px 2px 0; `],[` border-radius: 0 2px 2px 0; -`])));const hW=function(e){var t=e.value,n=e.onChange;return x.createElement(cW,null,x.createElement(ll,null,"Type"),x.createElement(fW,null,x.createElement(dW,{className:"shadow-picker__position "+(t==="outside"?"active":""),active:t==="outside",onClick:function(){return n("outside")}},"Outside"),x.createElement(pW,{className:"shadow-picker__position "+(t==="inside"?"active":""),active:t==="inside",onClick:function(){return n("inside")}},"Inside")))};var Dy,Py,Ty,Oy,By,$g=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},gW=et.svg(My||(My=$g([` +`])));const gW=function(e){var t=e.value,n=e.onChange;return x.createElement(fW,null,x.createElement(ll,null,"Type"),x.createElement(dW,null,x.createElement(pW,{className:"shadow-picker__position "+(t==="outside"?"active":""),active:t==="outside",onClick:function(){return n("outside")}},"Outside"),x.createElement(hW,{className:"shadow-picker__position "+(t==="inside"?"active":""),active:t==="inside",onClick:function(){return n("inside")}},"Inside")))};var Dy,Py,Ty,Oy,By,_g=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},mW=et.svg(My||(My=_g([` width: 100px; height: 100px; border: 1px solid #5a5a5a; @@ -162,17 +162,17 @@ ${SH(n)} height: 100px; border: 1px solid #5a5a5a; cursor: `,`; -`])),function(e){return e.dragging?"grabbing":"grab"}),mW=et.circle(Ry||(Ry=$g([` +`])),function(e){return e.dragging?"grabbing":"grab"}),vW=et.circle(Ry||(Ry=_g([` color: #4285f4; pointer-events: none; `],[` color: #4285f4; pointer-events: none; -`]))),Ad=et.line(Ny||(Ny=$g([` +`]))),$d=et.line(Ny||(Ny=_g([` color: #555a; `],[` color: #555a; -`])));const vW=function(e){var t=e.offset,n=t.x,r=t.y,o=e.max,i=o===void 0?20:o,a=e.onChange,l=w.useState(!1),s=l[0],u=l[1],c=w.useRef(),f=function(y){!s||!(c!=null&&c.current)||p(y)},p=function(y){var C=c.current.createSVGPoint();C.x=y.clientX,C.y=y.clientY;var g=C.matrixTransform(c.current.getScreenCTM().inverse()),v={x:Math.trunc((g.x-50)*(i/50)*100)/100,y:Math.trunc((g.y-50)*(i/50)*100)/100};a(v)};w.useEffect(function(){var y=function(C){C.target.getAttribute("data-touch")&&(C.preventDefault(),C.touches&&p(C.touches[0]))};return window.addEventListener("touchmove",y,{passive:!1}),function(){return window.removeEventListener("touchmove",y)}},[p]);var h=50/i*n+50,m=50/i*r+50;return x.createElement(gW,{ref:c,onMouseMove:f,onMouseDown:function(){return u(!0)},onMouseUp:function(){return u(!1)},dragging:s,"data-touch":!0,className:"shadow-picker__grid",viewBox:"0 0 100 100"},x.createElement(Ad,{x1:50,y1:0,x2:50,y2:100,strokeWidth:2,strokeDasharray:"2,1",stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement(Ad,{x1:0,y1:50,x2:100,y2:50,strokeDasharray:"2,1",strokeWidth:2,stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement(Ad,{x1:50,y1:50,x2:h,y2:m,strokeWidth:2,stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement(mW,{className:"shadow-picker__grid-handle",cx:h,cy:m,r:5,fill:"currentColor"}))};var My,Ry,Ny,yW=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},bW=et.input(Iy||(Iy=yW([` +`])));const yW=function(e){var t=e.offset,n=t.x,r=t.y,o=e.max,i=o===void 0?20:o,a=e.onChange,l=w.useState(!1),s=l[0],u=l[1],c=w.useRef(),f=function(y){!s||!(c!=null&&c.current)||p(y)},p=function(y){var C=c.current.createSVGPoint();C.x=y.clientX,C.y=y.clientY;var m=C.matrixTransform(c.current.getScreenCTM().inverse()),v={x:Math.trunc((m.x-50)*(i/50)*100)/100,y:Math.trunc((m.y-50)*(i/50)*100)/100};a(v)};w.useEffect(function(){var y=function(C){C.target.getAttribute("data-touch")&&(C.preventDefault(),C.touches&&p(C.touches[0]))};return window.addEventListener("touchmove",y,{passive:!1}),function(){return window.removeEventListener("touchmove",y)}},[p]);var h=50/i*n+50,g=50/i*r+50;return x.createElement(mW,{ref:c,onMouseMove:f,onMouseDown:function(){return u(!0)},onMouseUp:function(){return u(!1)},dragging:s,"data-touch":!0,className:"shadow-picker__grid",viewBox:"0 0 100 100"},x.createElement($d,{x1:50,y1:0,x2:50,y2:100,strokeWidth:2,strokeDasharray:"2,1",stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement($d,{x1:0,y1:50,x2:100,y2:50,strokeDasharray:"2,1",strokeWidth:2,stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement($d,{x1:50,y1:50,x2:h,y2:g,strokeWidth:2,stroke:"currentColor",className:"shadow-picker__grid-line"}),x.createElement(vW,{className:"shadow-picker__grid-handle",cx:h,cy:g,r:5,fill:"currentColor"}))};var My,Ry,Ny,bW=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},wW=et.input(Iy||(Iy=bW([` background: transparent; color: inherit; border: 1px solid #555a; @@ -194,13 +194,13 @@ ${SH(n)} box-sizing: border-box; //flex: 1; text-align: right; -`])));const $u=function(e){var t=e.value,n=e.onChange,r=w.useState(t),o=r[0],i=r[1],a=w.useState(!1),l=a[0],s=a[1];w.useEffect(function(){l||i(t)},[t]);var u=function(f){i(f.target.value),n(f.target.value)},c=function(){s(!1),/(-?\d+)((r?em)|(px)|\%)$/.test(o)&&n(o)};return x.createElement(bW,{className:"shadow-picker__input",value:o,onFocus:function(){return s(!0)},onBlur:c,onChange:u})};var Iy,wW=/(-?\d+)((r?em)|(px)|\%)$/,xW=function(e){var t=e.split(" "),n="outside";if(t[0]==="inset"&&(t.shift(),n="inside"),t.length===3){var r=t[0],o=t[1],i=t[2];return{offset:{x:r,y:o},color:i,position:n}}if(t.length===4){var r=t[0],o=t[1],a=t[2],i=t[3];return{offset:{x:r,y:o},color:i,blur:a,position:n}}if(t.length===5){var r=t[0],o=t[1],l=t[2],s=t[3],i=t[4];return{offset:{x:r,y:o},color:i,spread:s,blur:l,position:n}}return null},Ly=function(e){var t,n,r=[e.position==="inside"?"inset":void 0,((t=e.offset)===null||t===void 0?void 0:t.x)||"0",((n=e.offset)===null||n===void 0?void 0:n.y)||"0",e.blur,e.spread,e.color||"#000000"].filter(function(o){return!!o});return r.join(" ")},CW=function(e){var t,n=e.match(new RegExp("#(?[0-9A-F]{6,8})","i")),r=(t=n==null?void 0:n.groups)===null||t===void 0?void 0:t.hex;if(r){var o=255;return r.length===8&&(o=parseInt(r.substr(6,2),16)),{alpha:o,color:"#"+r.substr(0,6)}}return null},nh=function(e){var t=w.useState(0),n=t[0],r=t[1],o=w.useState("px"),i=o[0],a=o[1];return w.useEffect(function(){var l=e.match(wW);(l==null?void 0:l.length)===5&&(r(parseInt(l[1])),a(l[2]))},[e]),{unit:i,amount:n,setUnit:a,setAmount:r}},Vc=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},_u=function(){return _u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n[0-9A-F]{6,8})","i")),r=(t=n==null?void 0:n.groups)===null||t===void 0?void 0:t.hex;if(r){var o=255;return r.length===8&&(o=parseInt(r.substr(6,2),16)),{alpha:o,color:"#"+r.substr(0,6)}}return null},rh=function(e){var t=w.useState(0),n=t[0],r=t[1],o=w.useState("px"),i=o[0],a=o[1];return w.useEffect(function(){var l=e.match(xW);(l==null?void 0:l.length)===5&&(r(parseInt(l[1])),a(l[2]))},[e]),{unit:i,amount:n,setUnit:a,setAmount:r}},Vc=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Du=function(){return Du=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&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;ott(Be,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}),nU=(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},rU=(e,t)=>tt(Be,null,function*(){var o;return[...(o=t.href)!=null&&o.startsWith(t5)?yield tU(t.href):t.rules].filter(i=>i instanceof CSSFontFaceRule).reduce(nU,e)}),oU=e=>u0(e)||e.href.startsWith(t5),iU=()=>tt(Be,null,function*(){const e=[...document.styleSheets].filter(oU);return Object.values(yield e.reduce(rU,{}))}),aU=e=>e.replace(/^"/,"").replace(/"$/,""),eb=e=>aU(e.replace(/,.*$/,"")),lU="AIzaSyBt0d8TsNo0wJn8Pj2zICtBY614IsEqrHw",sU=e=>{const[t,n]=w.useState(!1),{value:r,onChange:o}=e,[i,a]=w.useState([]);return w.useEffect(()=>{tt(Be,null,function*(){const l=performance.now(),s=yield iU();console.info(`Loaded ${s.length} fonts in ms`,performance.now()-l),a(s)})},[]),k(w.Fragment,{children:[d(Ce,{controls:[t,n],children:"Use Google picker (might crash)"}),!t||i.length===0?null:d(eU,{apiKey:lU,activeFontFamily:eb(r),families:i.map(l=>eb(l.fontFamily)),onChange:l=>{o(l.family)}}),d(kt,{value:r,onChange:o,options:i.map(({fontFamily:l})=>({label:l,value:l}))}),d(Ve,{value:r,onChange:o})]})};var tb=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,f=/([^\s\+>~\.\[:]+)/g;return n=function(p,h){var m,y,C,g,v,b;if(p.test(t))for(m=t.match(p),y=0,C=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(f,"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}},uU=function(e,t){var n,r,o;if(typeof e=="string"){if(e.indexOf(",")!==-1)throw"Invalid CSS selector";n=tb(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=tb(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 cU(e,t){return Nr(e,t)!==e.length}function Nr(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 nb(e){let t=e,n;for(;n=new RegExp(":where\\(","d").exec(t);){const r=Nr(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 Tu(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=Nr(n,i),l=n.slice(i+1,a),u=Tu(l,t+1).split(",");let c=u[0];for(const p of u)p!==c&&hi(c,p)===-1&&(c=p);const f=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=f.length,n=f+n.slice(a+1)}for(o=0;r=new RegExp(":is\\(","d").exec(n.slice(o));){const i=r.index+3+o,a=Nr(n,i),l=n.slice(i+1,a),u=Tu(l,t+1).split(",");let c=u[0];for(const p of u)hi(c,p)===-1&&(c=p);const f=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=f.length,n=f+n.slice(a+1)}if(n.includes(",")){const i=n.split(",");let a;for(const l of i)(!a||hi(a,l)===-1)&&(a=l);return a}return n}function hi(e,t){return uU(Tu(nb(e)),Tu(nb(t)))}function fU(e,t,n){const i=Object.keys(pt).filter(a=>{const l=iu(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 pt[l]);return a.push({selector:l,scopeVars:s}),a},[]).map(a=>{const{selector:l}=a,s=iu(l);if(!/,/.test(l))a.matchingSelector=l;else{let u=null,c=e;for(;u===null&&(c!=null&&c.parentNode);)u=ih([{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 f=i.some(h=>h.selector===l.selector),p=i.some(h=>h.selector===u.selector);return f&&p||!f&&!p?s-c:f?1:-1}).map(([l])=>l));return i.sort((a,l)=>{try{const s=hi(a.matchingSelector,l.matchingSelector);return s===0?-1:s*-1}catch(s){return console.log(a,l),console.log(s),-1}})}const dU=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!==Zu).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}`},pU=({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=c2({cssVars:l,target:i}),c={};let f=!1;for(const g of s.style)f=!0,c[g]=s.style.getPropertyValue(g);const p=u.length!u.includes(T)):[],v=p?fU(s,n,r):[],b=dU(s),F=o[b]||0;o[b]=F+1;const _=b+(F===0?"":`#${F}`),A=m?hU(s):h?s.outerHTML+'
'+[...s.childNodes].reduce((T,L)=>{if(L.nodeName!=="use")return T;const Q=L.href.baseVal.replace("#",""),B=document.getElementById(Q);return T+(B==null?void 0:B.outerHTML)||""},"")+"
":null,D=s.tagName==="HTML"||s.tagName==="BODY",O={element:s,path:Mc(s),elementInfo:{src:s.getAttribute("src"),srcset:s.getAttribute("srcset"),imgWidth:s.naturalWidth,imgHeight:s.naturalHeight,alt:s.getAttribute("alt"),html:A,width:h?s.getBoundingClientRect().width:null,title:s.getAttribute("title")},computedStyles:{fontFamily:getComputedStyle(s).fontFamily},isRootElement:D,isDeepest:C,textContent:C&&[...s.childNodes].some(T=>T.nodeType===3&&T.textContent.trim()!=="")?s.textContent.trim():"",label:_,vars:g.map(T=>{let L;for(const{scopeVars:Q,selector:B}of v)if(Q.some(G=>G.name===T.name)){L=B;break}return ae(V({},T),{currentScope:L})}),scopes:v,inlineStyles:c,inheritedInlineStyles:gU(s,c)};r.push(O),l=u}a=i}return r},n5=s0;function vU({selector:e,winningSelector:t="",property:n,index:r},o){const i=(t.split(",")[0].match(n5)||[]).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 Dg(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==="("&&!cU(s,l)){a=!0;break}u==="\\"&&(i=!0),l++}a?r+=(r?",":"")+o:(n.push(s),r="")}return r&&n.push(r),n}function ih(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=Dg(o.selector),l=(c,f)=>{const p=f.replace(n5,"").replaceAll(u2,"").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=hi(c,f)!==-1?f:c;if(h===f){if(n[p]&&f.length>n[p].length)return c;n[p]=f}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(hi(r.winningSelector,o.winningSelector)!==1)return o}catch(c){return console.log(c,r.winningSelector,o.winningSelector),o}return r},null)}const yU=(e,t)=>{const n=t.media||"all",r=e[n]||[];return e[n]=[...r,t],e},bU=(e,t)=>{const n={},r=e.reduce((o,i)=>{const a=i.usages.reduce(yU,{all:[]});let l=!1;return Object.entries(a).forEach(([s,u])=>{if(l)return;const c=ih(u,t)||u[0];if(!c||t.style[c.property]!==""&&/:(before|after)/.test(c.winningSelector))return;l=!0;const[f,p,h,m]=vU(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[f])o[f]=ae(V({},i),{maxSpecific:c,states:h,pseudos:m});else if(!o[f].usages.some(y=>y.property===c.property&&y.defaultValue&&(y.defaultValue.includes(`var(${i.name},`)||y.defaultValue.includes(`var(${i.name})`)))){const y=ih([o[f].maxSpecific,c],t);c===y&&(o[f]=ae(V({},i),{maxSpecific:c,states:h,pseudos:m}))}}),o},{});return Object.values(r)},$d=new WeakMap,wU=e=>e.map(o=>{var i=o,{vars:t,element:n}=i,r=mn(i,["vars","element"]);if($d.has(n))return $d.get(n);const a=ae(V({},r),{element:n,vars:bU(t,n).sort(pU)});return $d.set(n,a),a});function Pg(e=""){if(!e.includes("("))return!1;const t=e.indexOf("("),n=e.slice(0,t).toLowerCase();return!(!["calc","min","max","clamp"].includes(n)||Nr(e,t)Xc(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 Xc(e,t){let n="",r=!1,o;const i=[];let a=0,l="",s="",u="";const c={"("(){const h=Nr(e,a);if(n==="var")throw new Error("Expression contains unresolved variable. "+e);const m=e.substring(a+1,h),y=n.toLowerCase();if(y==="clamp"){const[C,g]=Dd(m,t);r=g;const[v,b,F]=C;n=parseFloat(b)parseFloat(F)?F:b,t.steps.push({mathFunc:"clamp",args:C,result:n})}else if(y==="min"){const[C,g]=Dd(m,t);r=g,n=C.reduce((v,b)=>bb>v?b:v,-1/0),t.steps.push({mathFunc:"max",args:C,result:n})}else{const[C,g]=Xc(m,t);n=C,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(;aib[o[0]]?i.push(o):([n,r]=_d(o,n,t),o=null)),c[s]()):(n!==""||s!==" ")&&(n+=s),a++;for(o&&([n,r]=_d(o,`${n}`.trim(),t,r));i.length>0;)[n,r]=_d(i.pop(),n,t,r);const[f,p]=ah(`${n}`.trim(),t);return[f,p||r]}function CU(e,t){const n=[];for(const r of t){r.steps=[];try{n.push([r,...Xc(e,r)])}catch(o){r.steps.push({error:o.message}),n.push([r,o.message])}}return n}const SU={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 EU(e){const{referencedVars:t,elementScopes:n,expression:r}=e,o=gn(),{allVars:i}=w.useContext(qe);return k(w.Fragment,{children:[d("br",{}),d("h5",{children:"Variables"}),d("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 d("li",{children:d(Vi,{cssVar:l,scopes:n,onChange:s=>{o({type:Me.set,payload:{name:l.name,value:s}})},onUnset:()=>{o({type:Me.unset,payload:{name:l.name}})}})},a)})})]})}function r5(e){const{value:t,resolvedValue:n,referencedVars:r,onChange:o,elementScopes:i,disabled:a=!1}=e,{width:l,height:s}=xe,{frameRef:u}=w.useContext(qe),f=(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","")),C=CU(h,[{width:l,height:s,remFactor:y,resultUnit:"px"}]);return k("div",{children:[d("h3",{children:"Calculation"}),d(Ve,{disabled:a,style:{width:"100%"},value:f,onChange:g=>o(Pg(g)?g:`calc(${g})`)}),d("h4",{children:"Evaluates to"}),d("ul",{children:C.map(([{width:g,height:v,resultUnit:b,remFactor:F,steps:_},A,D])=>{const O=`${g}x${v}~${b}~${F}`;return k("li",{children:[k("code",{style:{cursor:"pointer",fontSize:"2rem"},onClick:()=>o(`${A}${b}`),children:[A,D&&b]}),d("pre",{children:k("code",{children:["at ",g,"x",v]})}),(r==null?void 0:r.length)>0&&d(EU,{referencedVars:r,elementScopes:i,expression:f}),d("br",{}),d("code",{children:p}),d("h5",{children:"Steps"}),d("ol",{children:_.map((T,L)=>{let Q;if(T.mathFunc){const{mathFunc:B,args:G,result:fe}=T;Q=d("code",{children:SU[B](G,fe)})}else if(T.operator){const{orig:{arg1:B,arg2:G},a:fe,operator:me,b:Se,result:ie}=T;Q=k("code",{title:`${B} ${me} ${G}`,children:[fe," ",me," ",Se," = ",ie]})}else if(T.error){const{error:B}=T;Q=k("code",{children:["Error: ",B]})}else{const{before:B,result:G}=T;Q=k("code",{children:[B," = ",G]})}return k("li",{children:[Q,d("br",{}),d("br",{})]},L)})})]},O)})}),d("br",{}),k("i",{children:["Root font size: ",y,"px"]})]})}const FU=["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"],o5=16,kU=e=>e*o5,AU=e=>e/o5,ab=e=>e&&e.match(/[\d.]+px$/),lb=e=>e&&e.match(/[\d.]+rem$/),$U=e=>e&&e.match(/\d%$/),_U=e=>e&&e.match(/vh$/),DU=e=>e&&e.match(/vw$/),PU=e=>{const{onChange:t,value:n,resolvedValue:r}=e,[o,i]=w.useState(.1),a=ab(n)?n.replace("px",""):lb(n)?kU(parseFloat(n.replace("rem",""))):"",l=lb(n)?n.replace("rem",""):ab(n)?AU(parseFloat(n.replace("px",""))):"";return Pg(n)?d(r5,V({},e)):k("div",{className:"theme-length-controls",children:[k("div",{className:"theme-length-control control-px",style:{clear:"both"},children:[d("input",{type:"number",value:a,onChange:s=>{t(`${s.currentTarget.value}px`)}}),d("span",{children:"px"})]}),k("div",{className:"theme-length-control control-rem",children:[d("input",{step:.1,type:"number",value:l,onChange:s=>{t(`${s.currentTarget.value}rem`)}}),d("span",{children:"rem"})]}),k("div",{className:"theme-length-control control-pct",children:[d("input",{type:"number",value:$U(n)?n.replace("%",""):"",onChange:s=>{t(`${s.currentTarget.value}%`)}}),d("span",{children:"%"})]}),k("div",{className:"theme-length-control control-vh",children:[d("input",{type:"number",value:_U(n)?n.replace("vh",""):"",onChange:s=>{t(`${s.currentTarget.value}vh`)}}),d("span",{children:"vh"})]}),k("div",{className:"theme-length-control control-vw",children:[d("input",{type:"number",value:DU(n)?n.replace("vw",""):"",onChange:s=>{t(`${s.currentTarget.value}vw`)}}),d("span",{children:"vw"})]}),k("div",{className:"theme-length-control control-no-unit",children:[d("input",{step:o,type:"number",value:/(^\d+(\.\d*)?$|^\.\d+$)/.test(n)?n:"",onChange:s=>{t(s.currentTarget.value)}}),d("span",{children:"[no unit]"}),d("input",{type:"number",value:o,style:{fontSize:"10px"},onChange:s=>{i(s.currentTarget.value)}}),"step"]}),d("button",{disabled:n===0||n==="0",onClick:()=>{t("0")},children:"0"}),d("button",{onClick:()=>{t(`calc(${n})`)},children:"Calculate"}),d(Ve,{value:n,onChange:t})]})},TU=["transition-duration","animation-delay"],OU=["1","10","100"],BU=["0","1","100","1000","2000","3000"],MU=e=>{const[t,n]=w.useState("100"),{value:r,onChange:o}=e,i=r.replace(/\D+/g,"");return k("div",{className:"",children:[d("input",{step:t,type:"number",value:i,onChange:a=>{o(`${a.currentTarget.value}ms`)}}),d("span",{children:"ms"}),d(kt,{style:{display:"inline"},options:OU.map(In),selected:t,onChange:a=>{n(a)}}),"step",BU.map(a=>d("button",{disabled:i===a,onClick:()=>{o(`${a}ms`)},children:a},a))]})},Pd=["normal","stretch","center","start","end","flex-start","flex-end","baseline","first baseline","last baseline","safe center","unsafe center"],sb=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ub=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"],RU={"align-items":Pd,"align-content":Pd,"align-self":["self-start","self-end","stretch",...Pd],"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":sb,"mix-blend-mode":sb,"border-style":ub,"outline-style":ub,"vertical-align":["baseline","sub","super","text-top","text-bottom","middle","top","bottom"],"text-rendering":["auto","optimizeSpeed","optimizeLegibility","geometricPrecision"],cursor:["auto ","default ","none ","context-menu ","help ","pointer ","progress ","wait ","cell ","crosshair ","text ","vertical-text ","alias ","copy ","move ","no-drop ","not-allowed ","grab ","grabbing ","e-resize ","n-resize ","ne-resize ","nw-resize ","s-resize ","se-resize ","sw-resize ","w-resize ","ew-resize ","ns-resize ","nesw-resize ","nwse-resize ","col-resize ","row-resize ","all-scroll ","zoom-in ","zoom-out"]};function NU(e){const{property:t}=e.usages[0];return RU[t]}const In=e=>({value:`${e}`,label:`${e}`}),Ol=e=>e.name.includes("color")?!0:e.usages.some(({property:t})=>t.match(/color$/)||["background","background-image","fill","stroke"].includes(t)||t==="border"&&!e.name.includes("width")&&!e.name.includes("size")),IU=({cssVar:e,value:t,resolvedValue:n,onChange:r,cssFunc:o,referencedVars:i,elementScopes:a})=>{if(!/^--/.test(e.name))return null;if(Ol(e))return d(vH,{onChange:r,value:t,resolvedValue:n,cssVar:e,cssFunc:o});if(e.usages.some(s=>FU.includes(s.property)))return d(PU,{value:t,resolvedValue:n,referencedVars:i,onChange:r,elementScopes:a});if(e.usages.some(s=>TU.includes(s.property)))return d(MU,{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(In),u=["normal","bold","lighter","bolder"].map(In),c=!t||/^-?\d+$/.test(t);return k("div",{className:"font-weight-control",children:[d(kt,{value:t,onChange:r,style:{fontStyle:!t||!c?"italic":"normal"},options:[...t&&c?[]:[{value:"",label:"-- use a number --"}],...s]}),d(kt,{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(In);return d(kt,{value:t,onChange:r,options:s})}const l=NU(e);if(l)return d(kt,{value:t,onChange:r,options:l.map(In)});if(e.usages.some(s=>s.property==="font-family"))return d(sU,{value:t,onChange:r});if(e.usages.some(s=>s.property==="box-shadow"||s.property==="text-shadow"))return k(w.Fragment,{children:[d(RW,{value:t,onChange:r}),d(Ve,{value:t,onChange:r})]});if(e.usages.some(s=>s.property==="display")){const s=["none","inline","inline-block","block","flex"].map(In);return d(kt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="position")){const s=["absolute","relative","fixed","sticky"].map(In);return d(kt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="text-align")){const s=["start","center","end"].map(In);return k(w.Fragment,{children:[d(kt,{value:t,onChange:r,options:s}),d(Ve,{value:t,onChange:r})]})}if(e.usages.some(s=>s.property==="text-decoration")){const s=["none","underline"].map(In);return d(kt,{value:t,onChange:r,options:s})}return k(w.Fragment,{children:[!isNaN(t)&&d("input",{type:"number",onChange:s=>r(s.target.value),value:t}),e.usages.some(s=>s.property==="text-transform")&&d("button",{onClick:()=>r("none"),children:"None"}),d(Ve,{value:t,onChange:r})]})};var qc={},LU=qc.match=UU;qc.parse=i5;var zU=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,jU=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,HU=/^(?:(min|max)-)?(.+)/,GU=/(em|rem|px|cm|mm|in|pt|pc)?$/,WU=/(dpi|dpcm|dppx)?$/;function UU(e,t){return i5(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=db(u),c=db(c);break;case"resolution":u=fb(u),c=fb(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":u=cb(u),c=cb(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 i5(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(zU),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(jU),u=s[1].toLowerCase().match(HU);return{modifier:u[1],feature:u[2],value:s[2]}}),a})}function cb(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function fb(e){var t=parseFloat(e),n=String(e).match(WU)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function db(e){var t=parseFloat(e),n=String(e).match(GU)[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 a5=({media:e,width:t,cssVar:n})=>{const{overridingMedia:r}=n.allVar||n;let o=!e;return!!r&&r.some(({media:i,cssVar:a})=>o?qc.match(i,V({width:t},p5)):(a.name===n.name&&(o=!0),!1))};function VU(e){setTimeout(()=>{e==null||e.scrollIntoView({block:"center"})},0)}const KU=e=>{const{cssVar:t,media:n,element:r}=e,{screenOptions:o}=xe,[i,a]=te.width(),[,l]=te.height(),s=o.filter(({dims:[u]})=>u===i||n&&!qc.match(n,{type:"screen",width:u})?!1:!a5({media:n,width:u,cssVar:t}));return d("ul",{className:"variable-screen-switcher",children:s.map(({label:u,dims:[c,f]})=>d("li",{children:d("button",{title:`Switch to ${u}`,onClick:p=>{a(c),l(f),VU(r),p.preventDefault(),p.stopPropagation()},children:d("span",{className:"variable-screen-switcher-screen",style:{width:`${c/42}px`,height:`${f/42}px`}})})},u))})};function Ou(e){const{source:t,line:n,column:r,generated:{sheet:o}}=e,{webpackHome:i,showSourceLinks:a}=xe;if(!a||!t||!i)return null;const l=t.replace("webpack://","");let s="";if(/\.\.\//.test(l)){let c=0,f,p;for(;typeof p!="string"||p!==f;)c++,p=f,f=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 l5={background:"yellow"};function s5(e,t){return e.includes(":root")||!e||e===t||e===Lt||e==="body"||e==="html"||e===":where(html)"?t:` +***************************************************************************** */var ih=function(e,t){return ih=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])},ih(e,t)};function ZW(e,t){ih(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function eU(e){return e.replace(/\s+/g,"-").toLowerCase()}var tU=function(e){ZW(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(m){r.setState({loadingStatus:"error"}),console.error("Error trying to fetch the list of available fonts"),console.error(m)})},r.componentDidUpdate=function(m){var v=r.props,b=v.activeFontFamily,F=v.onChange;b!==m.activeFontFamily&&r.setActiveFontFamily(b),F!==m.onChange&&r.fontManager.setOnChange(F)},r.onClose=function(m){for(var v=m.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(m){var v=m.target,b=v.textContent;if(!b)throw Error("Missing font family in clicked font button");r.setActiveFontFamily(b),r.toggleExpanded()},r.setActiveFontFamily=function(m){r.fontManager.setActiveFont(m)},r.generateFontList=function(m){var v=r.props.activeFontFamily,b=r.state.loadingStatus;return b!=="finished"?x.createElement("div",null):x.createElement("ul",{className:"font-list"},m.map(function(F){var _=F.family===v,A=eU(F.family);return x.createElement("li",{key:A,className:"font-list-item"},x.createElement("button",{type:"button",id:"font-button-"+A+r.fontManager.selectorSuffix,className:"font-button "+(_?"active-font":""),onClick:r.onSelection,onKeyPress:r.onSelection},F.family))}))},r.toggleExpanded=function(){var m=r.state.expanded;m?(r.setState({expanded:!1}),document.removeEventListener("click",r.onClose)):(r.setState({expanded:!0}),document.addEventListener("click",r.onClose))},r.render=function(){var m=r.props,v=m.activeFontFamily,b=m.sort,F=r.state,_=F.expanded,A=F.loadingStatus,D=Array.from(r.fontManager.getFonts().values());return b==="alphabet"&&D.sort(function(O,T){return O.family.localeCompare(T.family)}),x.createElement("div",{id:"font-picker"+r.fontManager.selectorSuffix,className:_?"expanded":""},x.createElement("button",{type:"button",className:"dropdown-button",onClick:r.toggleExpanded,onKeyPress:r.toggleExpanded},x.createElement("p",{className:"dropdown-font-family"},v),x.createElement("p",{className:"dropdown-icon "+A})),A==="finished"&&r.generateFontList(D))};var o=r.props,i=o.apiKey,a=o.activeFontFamily,l=o.pickerId,s=o.families,u=o.categories,c=o.scripts,f=o.variants,p=o.filter,h=o.limit,g=o.sort,y=o.onChange,C={pickerId:l,families:s,categories:u,scripts:c,variants:f,filter:p,limit:h,sort:g};return r.fontManager=new QW(i,a,C,y),r}return t.defaultProps={activeFontFamily:t5,onChange:function(){},pickerId:At.pickerId,families:At.families,categories:At.categories,scripts:At.scripts,variants:At.variants,filter:At.filter,limit:At.limit,sort:At.sort},t}(w.PureComponent);const n5="https://fonts.googleapis.com",nU=e=>tt(Be,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}),rU=(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},oU=(e,t)=>tt(Be,null,function*(){var o;return[...(o=t.href)!=null&&o.startsWith(n5)?yield nU(t.href):t.rules].filter(i=>i instanceof CSSFontFaceRule).reduce(rU,e)}),iU=e=>c0(e)||e.href.startsWith(n5),aU=()=>tt(Be,null,function*(){const e=[...document.styleSheets].filter(iU);return Object.values(yield e.reduce(oU,{}))}),lU=e=>e.replace(/^"/,"").replace(/"$/,""),eb=e=>lU(e.replace(/,.*$/,"")),sU="AIzaSyBt0d8TsNo0wJn8Pj2zICtBY614IsEqrHw",uU=e=>{const[t,n]=w.useState(!1),{value:r,onChange:o}=e,[i,a]=w.useState([]);return w.useEffect(()=>{tt(Be,null,function*(){const l=performance.now(),s=yield aU();console.info(`Loaded ${s.length} fonts in ms`,performance.now()-l),a(s)})},[]),k(w.Fragment,{children:[d(Ce,{controls:[t,n],children:"Use Google picker (might crash)"}),!t||i.length===0?null:d(tU,{apiKey:sU,activeFontFamily:eb(r),families:i.map(l=>eb(l.fontFamily)),onChange:l=>{o(l.family)}}),d(yt,{value:r,onChange:o,options:i.map(({fontFamily:l})=>({label:l,value:l}))}),d(Ve,{value:r,onChange:o})]})};var tb=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,f=/([^\s\+>~\.\[:]+)/g;return n=function(p,h){var g,y,C,m,v,b;if(p.test(t))for(g=t.match(p),y=0,C=g.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(f,"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}},cU=function(e,t){var n,r,o;if(typeof e=="string"){if(e.indexOf(",")!==-1)throw"Invalid CSS selector";n=tb(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=tb(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 fU(e,t){return Nr(e,t)!==e.length}function Nr(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 nb(e){let t=e,n;for(;n=new RegExp(":where\\(","d").exec(t);){const r=Nr(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 Ou(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=Nr(n,i),l=n.slice(i+1,a),u=Ou(l,t+1).split(",");let c=u[0];for(const p of u)p!==c&&gi(c,p)===-1&&(c=p);const f=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=f.length,n=f+n.slice(a+1)}for(o=0;r=new RegExp(":is\\(","d").exec(n.slice(o));){const i=r.index+3+o,a=Nr(n,i),l=n.slice(i+1,a),u=Ou(l,t+1).split(",");let c=u[0];for(const p of u)gi(c,p)===-1&&(c=p);const f=n.slice(0,r.index+o)+`:not(${c.trim()})`;o=f.length,n=f+n.slice(a+1)}if(n.includes(",")){const i=n.split(",");let a;for(const l of i)(!a||gi(a,l)===-1)&&(a=l);return a}return n}function gi(e,t){return cU(Ou(nb(e)),Ou(nb(t)))}function dU(e,t,n){const i=Object.keys(pt).filter(a=>{const l=au(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 pt[l]);return a.push({selector:l,scopeVars:s}),a},[]).map(a=>{const{selector:l}=a,s=au(l);if(!/,/.test(l))a.matchingSelector=l;else{let u=null,c=e;for(;u===null&&(c!=null&&c.parentNode);)u=ah([{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 f=i.some(h=>h.selector===l.selector),p=i.some(h=>h.selector===u.selector);return f&&p||!f&&!p?s-c:f?1:-1}).map(([l])=>l));return i.sort((a,l)=>{try{const s=gi(a.matchingSelector,l.matchingSelector);return s===0?-1:s*-1}catch(s){return console.log(a,l),console.log(s),-1}})}const pU=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!==ec).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}`},hU=({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=f2({cssVars:l,target:i}),c={};let f=!1;for(const m of s.style)f=!0,c[m]=s.style.getPropertyValue(m);const p=u.length!u.includes(T)):[],v=p?dU(s,n,r):[],b=pU(s),F=o[b]||0;o[b]=F+1;const _=b+(F===0?"":`#${F}`),A=g?gU(s):h?s.outerHTML+'
'+[...s.childNodes].reduce((T,L)=>{if(L.nodeName!=="use")return T;const Q=L.href.baseVal.replace("#",""),B=document.getElementById(Q);return T+(B==null?void 0:B.outerHTML)||""},"")+"
":null,D=s.tagName==="HTML"||s.tagName==="BODY",O={element:s,path:Mc(s),elementInfo:{src:s.getAttribute("src"),srcset:s.getAttribute("srcset"),imgWidth:s.naturalWidth,imgHeight:s.naturalHeight,alt:s.getAttribute("alt"),html:A,width:h?s.getBoundingClientRect().width:null,title:s.getAttribute("title")},computedStyles:{fontFamily:getComputedStyle(s).fontFamily},isRootElement:D,isDeepest:C,textContent:C&&[...s.childNodes].some(T=>T.nodeType===3&&T.textContent.trim()!=="")?s.textContent.trim():"",label:_,vars:m.map(T=>{let L;for(const{scopeVars:Q,selector:B}of v)if(Q.some(G=>G.name===T.name)){L=B;break}return ae(V({},T),{currentScope:L})}),scopes:v,inlineStyles:c,inheritedInlineStyles:mU(s,c)};r.push(O),l=u}a=i}return r},r5=u0;function yU({selector:e,winningSelector:t="",property:n,index:r},o){const i=(t.split(",")[0].match(r5)||[]).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 Pg(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==="("&&!fU(s,l)){a=!0;break}u==="\\"&&(i=!0),l++}a?r+=(r?",":"")+o:(n.push(s),r="")}return r&&n.push(r),n}function ah(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=Pg(o.selector),l=(c,f)=>{const p=f.replace(r5,"").replaceAll(c2,"").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=gi(c,f)!==-1?f:c;if(h===f){if(n[p]&&f.length>n[p].length)return c;n[p]=f}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(gi(r.winningSelector,o.winningSelector)!==1)return o}catch(c){return console.log(c,r.winningSelector,o.winningSelector),o}return r},null)}const bU=(e,t)=>{const n=t.media||"all",r=e[n]||[];return e[n]=[...r,t],e},wU=(e,t)=>{const n={},r=e.reduce((o,i)=>{const a=i.usages.reduce(bU,{all:[]});let l=!1;return Object.entries(a).forEach(([s,u])=>{if(l)return;const c=ah(u,t)||u[0];if(!c||t.style[c.property]!==""&&/:(before|after)/.test(c.winningSelector))return;l=!0;const[f,p,h,g]=yU(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[f])o[f]=ae(V({},i),{maxSpecific:c,states:h,pseudos:g});else if(!o[f].usages.some(y=>y.property===c.property&&y.defaultValue&&(y.defaultValue.includes(`var(${i.name},`)||y.defaultValue.includes(`var(${i.name})`)))){const y=ah([o[f].maxSpecific,c],t);c===y&&(o[f]=ae(V({},i),{maxSpecific:c,states:h,pseudos:g}))}}),o},{});return Object.values(r)},_d=new WeakMap,xU=e=>e.map(o=>{var i=o,{vars:t,element:n}=i,r=mn(i,["vars","element"]);if(_d.has(n))return _d.get(n);const a=ae(V({},r),{element:n,vars:wU(t,n).sort(hU)});return _d.set(n,a),a});function Tg(e=""){if(!e.includes("("))return!1;const t=e.indexOf("("),n=e.slice(0,t).toLowerCase();return!(!["calc","min","max","clamp"].includes(n)||Nr(e,t)Xc(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 Xc(e,t){let n="",r=!1,o;const i=[];let a=0,l="",s="",u="";const c={"("(){const h=Nr(e,a);if(n==="var")throw new Error("Expression contains unresolved variable. "+e);const g=e.substring(a+1,h),y=n.toLowerCase();if(y==="clamp"){const[C,m]=Pd(g,t);r=m;const[v,b,F]=C;n=parseFloat(b)parseFloat(F)?F:b,t.steps.push({mathFunc:"clamp",args:C,result:n})}else if(y==="min"){const[C,m]=Pd(g,t);r=m,n=C.reduce((v,b)=>bb>v?b:v,-1/0),t.steps.push({mathFunc:"max",args:C,result:n})}else{const[C,m]=Xc(g,t);n=C,r=m}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(;aib[o[0]]?i.push(o):([n,r]=Dd(o,n,t),o=null)),c[s]()):(n!==""||s!==" ")&&(n+=s),a++;for(o&&([n,r]=Dd(o,`${n}`.trim(),t,r));i.length>0;)[n,r]=Dd(i.pop(),n,t,r);const[f,p]=lh(`${n}`.trim(),t);return[f,p||r]}function SU(e,t){const n=[];for(const r of t){r.steps=[];try{n.push([r,...Xc(e,r)])}catch(o){r.steps.push({error:o.message}),n.push([r,o.message])}}return n}const EU={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 FU(e){const{referencedVars:t,elementScopes:n,expression:r}=e,o=gn(),{allVars:i}=w.useContext(qe);return k(w.Fragment,{children:[d("br",{}),d("h5",{children:"Variables"}),d("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 d("li",{children:d(Vi,{cssVar:l,scopes:n,onChange:s=>{o({type:Me.set,payload:{name:l.name,value:s}})},onUnset:()=>{o({type:Me.unset,payload:{name:l.name}})}})},a)})})]})}function o5(e){const{value:t,resolvedValue:n,referencedVars:r,onChange:o,elementScopes:i,disabled:a=!1}=e,{width:l,height:s}=xe,{frameRef:u}=w.useContext(qe),f=(t.startsWith("calc(")?t.replace(/calc\(/,"").replace(/\)$/,""):t).replaceAll("calc(","("),p=n.startsWith("calc(")?n.replace(/calc\(/,"").replace(/\)$/,""):n,h=p.replaceAll("calc(","("),g=getComputedStyle(u.current.contentWindow.document.documentElement).getPropertyValue("font-size"),y=parseFloat(g.replace("px","")),C=SU(h,[{width:l,height:s,remFactor:y,resultUnit:"px"}]);return k("div",{children:[d("h3",{children:"Calculation"}),d(Ve,{disabled:a,style:{width:"100%"},value:f,onChange:m=>o(Tg(m)?m:`calc(${m})`)}),d("h4",{children:"Evaluates to"}),d("ul",{children:C.map(([{width:m,height:v,resultUnit:b,remFactor:F,steps:_},A,D])=>{const O=`${m}x${v}~${b}~${F}`;return k("li",{children:[k("code",{style:{cursor:"pointer",fontSize:"2rem"},onClick:()=>o(`${A}${b}`),children:[A,D&&b]}),d("pre",{children:k("code",{children:["at ",m,"x",v]})}),(r==null?void 0:r.length)>0&&d(FU,{referencedVars:r,elementScopes:i,expression:f}),d("br",{}),d("code",{children:p}),d("h5",{children:"Steps"}),d("ol",{children:_.map((T,L)=>{let Q;if(T.mathFunc){const{mathFunc:B,args:G,result:fe}=T;Q=d("code",{children:EU[B](G,fe)})}else if(T.operator){const{orig:{arg1:B,arg2:G},a:fe,operator:me,b:Se,result:ie}=T;Q=k("code",{title:`${B} ${me} ${G}`,children:[fe," ",me," ",Se," = ",ie]})}else if(T.error){const{error:B}=T;Q=k("code",{children:["Error: ",B]})}else{const{before:B,result:G}=T;Q=k("code",{children:[B," = ",G]})}return k("li",{children:[Q,d("br",{}),d("br",{})]},L)})})]},O)})}),d("br",{}),k("i",{children:["Root font size: ",y,"px"]})]})}const kU=["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"],i5=16,AU=e=>e*i5,$U=e=>e/i5,ab=e=>e&&e.match(/[\d.]+px$/),lb=e=>e&&e.match(/[\d.]+rem$/),_U=e=>e&&e.match(/\d%$/),DU=e=>e&&e.match(/vh$/),PU=e=>e&&e.match(/vw$/),TU=e=>{const{onChange:t,value:n,resolvedValue:r}=e,[o,i]=w.useState(.1),a=ab(n)?n.replace("px",""):lb(n)?AU(parseFloat(n.replace("rem",""))):"",l=lb(n)?n.replace("rem",""):ab(n)?$U(parseFloat(n.replace("px",""))):"";return Tg(n)?d(o5,V({},e)):k("div",{className:"theme-length-controls",children:[k("div",{className:"theme-length-control control-px",style:{clear:"both"},children:[d("input",{type:"number",value:a,onChange:s=>{t(`${s.currentTarget.value}px`)}}),d("span",{children:"px"})]}),k("div",{className:"theme-length-control control-rem",children:[d("input",{step:.1,type:"number",value:l,onChange:s=>{t(`${s.currentTarget.value}rem`)}}),d("span",{children:"rem"})]}),k("div",{className:"theme-length-control control-pct",children:[d("input",{type:"number",value:_U(n)?n.replace("%",""):"",onChange:s=>{t(`${s.currentTarget.value}%`)}}),d("span",{children:"%"})]}),k("div",{className:"theme-length-control control-vh",children:[d("input",{type:"number",value:DU(n)?n.replace("vh",""):"",onChange:s=>{t(`${s.currentTarget.value}vh`)}}),d("span",{children:"vh"})]}),k("div",{className:"theme-length-control control-vw",children:[d("input",{type:"number",value:PU(n)?n.replace("vw",""):"",onChange:s=>{t(`${s.currentTarget.value}vw`)}}),d("span",{children:"vw"})]}),k("div",{className:"theme-length-control control-no-unit",children:[d("input",{step:o,type:"number",value:/(^\d+(\.\d*)?$|^\.\d+$)/.test(n)?n:"",onChange:s=>{t(s.currentTarget.value)}}),d("span",{children:"[no unit]"}),d("input",{type:"number",value:o,style:{fontSize:"10px"},onChange:s=>{i(s.currentTarget.value)}}),"step"]}),d("button",{disabled:n===0||n==="0",onClick:()=>{t("0")},children:"0"}),d("button",{onClick:()=>{t(`calc(${n})`)},children:"Calculate"}),d(Ve,{value:n,onChange:t})]})},OU=["transition-duration","animation-delay"],BU=["1","10","100"],MU=["0","1","100","1000","2000","3000"],RU=e=>{const[t,n]=w.useState("100"),{value:r,onChange:o}=e,i=r.replace(/\D+/g,"");return k("div",{className:"",children:[d("input",{step:t,type:"number",value:i,onChange:a=>{o(`${a.currentTarget.value}ms`)}}),d("span",{children:"ms"}),d(yt,{style:{display:"inline"},options:BU.map(In),selected:t,onChange:a=>{n(a)}}),"step",MU.map(a=>d("button",{disabled:i===a,onClick:()=>{o(`${a}ms`)},children:a},a))]})},Td=["normal","stretch","center","start","end","flex-start","flex-end","baseline","first baseline","last baseline","safe center","unsafe center"],sb=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ub=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"],NU={"align-items":Td,"align-content":Td,"align-self":["self-start","self-end","stretch",...Td],"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":sb,"mix-blend-mode":sb,"border-style":ub,"outline-style":ub,"vertical-align":["baseline","sub","super","text-top","text-bottom","middle","top","bottom"],"text-rendering":["auto","optimizeSpeed","optimizeLegibility","geometricPrecision"],cursor:["auto ","default ","none ","context-menu ","help ","pointer ","progress ","wait ","cell ","crosshair ","text ","vertical-text ","alias ","copy ","move ","no-drop ","not-allowed ","grab ","grabbing ","e-resize ","n-resize ","ne-resize ","nw-resize ","s-resize ","se-resize ","sw-resize ","w-resize ","ew-resize ","ns-resize ","nesw-resize ","nwse-resize ","col-resize ","row-resize ","all-scroll ","zoom-in ","zoom-out"]};function IU(e){const{property:t}=e.usages[0];return NU[t]}const In=e=>({value:`${e}`,label:`${e}`}),Bl=e=>e.name.includes("color")?!0:e.usages.some(({property:t})=>t.match(/color$/)||["background","background-image","fill","stroke"].includes(t)||t==="border"&&!e.name.includes("width")&&!e.name.includes("size")),LU=({cssVar:e,value:t,resolvedValue:n,onChange:r,cssFunc:o,referencedVars:i,elementScopes:a})=>{if(!/^--/.test(e.name))return null;if(Bl(e))return d(yH,{onChange:r,value:t,resolvedValue:n,cssVar:e,cssFunc:o});if(e.usages.some(s=>kU.includes(s.property)))return d(TU,{value:t,resolvedValue:n,referencedVars:i,onChange:r,elementScopes:a});if(e.usages.some(s=>OU.includes(s.property)))return d(RU,{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(In),u=["normal","bold","lighter","bolder"].map(In),c=!t||/^-?\d+$/.test(t);return k("div",{className:"font-weight-control",children:[d(yt,{value:t,onChange:r,style:{fontStyle:!t||!c?"italic":"normal"},options:[...t&&c?[]:[{value:"",label:"-- use a number --"}],...s]}),d(yt,{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(In);return d(yt,{value:t,onChange:r,options:s})}const l=IU(e);if(l)return d(yt,{value:t,onChange:r,options:l.map(In)});if(e.usages.some(s=>s.property==="font-family"))return d(uU,{value:t,onChange:r});if(e.usages.some(s=>s.property==="box-shadow"||s.property==="text-shadow"))return k(w.Fragment,{children:[d(NW,{value:t,onChange:r}),d(Ve,{value:t,onChange:r})]});if(e.usages.some(s=>s.property==="display")){const s=["none","inline","inline-block","block","flex"].map(In);return d(yt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="position")){const s=["absolute","relative","fixed","sticky"].map(In);return d(yt,{value:t,onChange:r,options:s})}if(e.usages.some(s=>s.property==="text-align")){const s=["start","center","end"].map(In);return k(w.Fragment,{children:[d(yt,{value:t,onChange:r,options:s}),d(Ve,{value:t,onChange:r})]})}if(e.usages.some(s=>s.property==="text-decoration")){const s=["none","underline"].map(In);return d(yt,{value:t,onChange:r,options:s})}return k(w.Fragment,{children:[!isNaN(t)&&d("input",{type:"number",onChange:s=>r(s.target.value),value:t}),e.usages.some(s=>s.property==="text-transform")&&d("button",{onClick:()=>r("none"),children:"None"}),d(Ve,{value:t,onChange:r})]})};var qc={},zU=qc.match=VU;qc.parse=a5;var jU=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,HU=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,GU=/^(?:(min|max)-)?(.+)/,WU=/(em|rem|px|cm|mm|in|pt|pc)?$/,UU=/(dpi|dpcm|dppx)?$/;function VU(e,t){return a5(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=db(u),c=db(c);break;case"resolution":u=fb(u),c=fb(c);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":u=cb(u),c=cb(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 a5(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(jU),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(HU),u=s[1].toLowerCase().match(GU);return{modifier:u[1],feature:u[2],value:s[2]}}),a})}function cb(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function fb(e){var t=parseFloat(e),n=String(e).match(UU)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function db(e){var t=parseFloat(e),n=String(e).match(WU)[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 l5=({media:e,width:t,cssVar:n})=>{const{overridingMedia:r}=n.allVar||n;let o=!e;return!!r&&r.some(({media:i,cssVar:a})=>o?qc.match(i,V({width:t},h5)):(a.name===n.name&&(o=!0),!1))};function KU(e){setTimeout(()=>{e==null||e.scrollIntoView({block:"center"})},0)}const YU=e=>{const{cssVar:t,media:n,element:r}=e,{screenOptions:o}=xe,[i,a]=te.width(),[,l]=te.height(),s=o.filter(({dims:[u]})=>u===i||n&&!qc.match(n,{type:"screen",width:u})?!1:!l5({media:n,width:u,cssVar:t}));return d("ul",{className:"variable-screen-switcher",children:s.map(({label:u,dims:[c,f]})=>d("li",{children:d("button",{title:`Switch to ${u}`,onClick:p=>{a(c),l(f),KU(r),p.preventDefault(),p.stopPropagation()},children:d("span",{className:"variable-screen-switcher-screen",style:{width:`${c/42}px`,height:`${f/42}px`}})})},u))})};function Bu(e){const{source:t,line:n,column:r,generated:{sheet:o}}=e,{webpackHome:i,showSourceLinks:a}=xe;if(!a||!t||!i)return null;const l=t.replace("webpack://","");let s="";if(/\.\.\//.test(l)){let c=0,f,p;for(;typeof p!="string"||p!==f;)c++,p=f,f=l.replace("../","");const h=/\/[^\/]*$/;let g=o.replace(h,"");for(let y=0;yc.stopPropagation(),children:[t.replace("webpack://use-theme-editor/","").replace("node_modules/","")," ",n]})}const s5={background:"yellow"};function u5(e,t){return e.includes(":root")||!e||e===t||e===Lt||e==="body"||e==="html"||e===":where(html)"?t:` :where( ${e}, :is(${e}) * ):where( ${t} -)`}function pb(e){const{scope:t,selector:n,highLightMatch:r,position:o,property:i,isLocal:a,hideIfNotFound:l}=e,s=a?s5(t,n):n;return s?k("li",{style:r?l5:{},children:[!!o&&d(Ou,V({},o)),d(co,{label:n,selector:s,initialized:!0,showLabel:!0,property:i,hideIfNotFound:l})]},n):k("li",{children:[!!o&&d(Ou,V({},o)),d("code",{children:n}),";a"]},n)}const u5=({usages:e,maxSpecificSelector:t,winningSelector:n,scope:r=":root"})=>{const[o,i]=be("use local scope selectors",!0),[a,l]=be("hide not found usages",!0),[s,u]=w.useState({}),c={},f=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(w.Fragment,{children:[!p&&d(Ce,{controls:[o,i],title:r,children:"In local scope"}),d(Ce,{controls:[a,l],title:r,children:"Only on this page"}),d("ul",{children:f.map(({property:h,selector:m,position:y})=>{const C=Dg(m),g=e.length>1&&m===t;return C.length>1?k("li",{style:{border:"1px solid gray"},children:[!!y&&d(Ou,V({},y)),d("h4",{style:g?l5:{},onClick:()=>u(ae(V({},s),{[m]:!s[m]})),children:d("div",{className:"monospace-code",style:{backgroundColor:"#d0d7de"},children:m.replaceAll(/\s*\,\s*/g,`, -`).trim().substring(0,100)})}),!s[m]&&d("ul",{style:{marginLeft:"16px"},children:C.map(v=>d(pb,{scope:r,selector:v,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${v}`))})]},m):d(pb,{scope:r,selector:m,highLightMatch:g,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${m}`)})})]})};function c5(e){const{references:t,excludedVarName:n}=e,[r,o]=w.useState(!0);return t.length===0?null:k("div",{style:{marginLeft:"24px",marginTop:"8px"},children:[d(Ce,{title:"Show only elements that were found on the page ",controls:[r,o],children:"Filter found"}),d("ul",{style:{marginTop:"0"},children:t.map(([{name:i,usages:a},l])=>i===n?null:k(w.Fragment,{children:[d("h5",{style:{marginTop:"8px"},children:d(_r,{name:i})}),l.map(s=>{const u=a.reduce((f,p)=>f+","+p.selector,"").replace(/^,/,""),c=s5(s,u);return k("li",{style:{borderBottom:"1px solid gray"},children:[s!==":root"&&d("code",{style:{marginTop:"4px"},className:"monospace-code",children:s}),d("div",{draggable:!0,onDragStart:Vt(()=>`var(${i})`)}),d(co,{label:u,hideIfNotFound:r,initialized:!0,selector:c})]},i)})]}))})]})}const YU=[":root",":where(html)","html"],hb=20;function XU(e){const{themeEditor:{scopes:t}}=xe,n=t[Lt]||{},{value:r,onChange:o,elementScopes:i=[]}=e,[a,l]=w.useState(""),[s,u]=w.useState(""),[c,f]=w.useState(!0),p=w.useRef();w.useEffect(()=>{var F;return(F=p.current)==null?void 0:F.scrollIntoView({block:"nearest"})},[r]);const h=w.useMemo(()=>{const F=Object.entries(pt).reduce((A,[D,O])=>{if(i.some(T=>T.selector===D)||c&&YU.includes(D))for(const T in O)A[T]=O[T];return A},{}),_=V(V({},F),n);return Object.entries(_).filter(([A,D])=>typeof D!="undefined"&&D!==""&&(!a||new RegExp(a.replaceAll(" ","(\\-\\-?| )")).test(A))&&(!s||new RegExp(s.replaceAll(" ","(\\-\\-?| )")).test(D)))},[a,s,n,c]),[m,y]=w.useState(!1),C=m?null:h.findIndex(([F])=>`var(${F})`===r),g=m?null:C-hb,v=m?null:C+hb,b=performance.now();return k("div",{onClick:F=>F.stopPropagation(),style:{},children:[d(Ce,{controls:[c,f],children:"Global values"}),k("div",{style:{display:"flex",width:"100%"},children:[d(Ve,{placeholder:`Filter name ${h.length}`,value:a,onChange:l}),d(Ve,{placeholder:`Filter value ${h.length}`,value:s,onChange:u})]}),d("ul",{style:{maxHeight:"50vh",background:"white",overflowY:"scroll"},onScroll:()=>{performance.now()-b>200&&y(!0)},children:h.map(([F,_],A)=>{if(!m&&(Av))return;const D=`var(${F})`,O=D===r,T=k(w.Fragment,{children:[k("span",{style:{display:"flex",justifyContent:"space-between",flexGrow:1},children:[d(_r,{name:F,style:{fontWeight:600}}),!/url\(|gradient\(/.test(_)&&d("span",{style:{maxWidth:"30%"},children:_})]}),d("span",{draggable:!0,onDragStart:Vt(D),title:_,style:{width:Ei,height:Ei,border:"1px solid black",borderRadius:"6px",background:`no-repeat left top/ cover ${_}`,float:"right",textShadow:"white 0px 10px"},children:/var\(/.test(_)&&"var"},F)]});return d("li",{ref:O?p:null,children:d("button",{onClick:()=>{!O&&o(D)},style:{display:"flex",justifyContent:"space-between",width:"100%",border:O?"4px solid black":"1px solid black"},children:T})},F)})})]})}function qU({media:e}){return d("div",{children:d("b",{className:"monospace-code",style:{fontSize:"14px",background:"#ebe9fb"},children:e})})}const Rt=w.memo(function(l){var s=l,{controls:[t,n],style:r,dispatchArgs:o=[],children:i}=s,a=mn(s,["controls","style","dispatchArgs","children"]);return d("button",ae(V({},a),{title:t?"Hide":"Show",onClick:()=>n(!t,...o),style:ae(V({},r),{border:t?"4px solid black":"1px solid black"}),children:i}))},TS);function f5(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 JU=e=>e.charAt(0).toUpperCase()+e.slice(1),QU=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,"-")]},gb=e=>e.preventDefault(),_r=({name:e,style:t})=>{const{annoyingPrefix:n,nameReplacements:r}=xe,[o,i]=QU(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:f})=>{try{return u.replace(new RegExp(c),f)}catch(p){return console.log(`Failed replacing ${c} to ${f}`),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:Vt(`var(${e})`),style:t,children:[d("span",{style:{fontSize:"13px",fontStyle:"italic",color:"black",display:"block"},children:JU(n?s:o)}),d("span",{className:"var-control-property",children:a})]})},Bu=({value:e,resolvedValue:t=e,cssVar:n,isDefault:r,referencedVariable:o,isOpen:i,group:a})=>{var m;const l=Ei,s=`${e}${r?" (default)":""}`,u=/url\(/.test(t),f=Ol(n)||Su.test(t)||ol.test(t)||u;if(t&&f&&t!=="currentcolor")return k(w.Fragment,{children:[k("span",{className:"var-preview",draggable:!0,onDragStart:Vt(t),title:s,style:{width:l,height:l,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&&d(_r,{name:o.name}),!o&&(u?null:e)]})]});if(o&&i)return null;const p=t.startsWith('"')||t.startsWith("'")||t.startsWith("attr("),h=p?t.replaceAll('" "',`" -"`):e;return d("span",{className:"var-preview",draggable:!0,onDragStart:Vt(e),title:s,style:{fontSize:"14px",float:"right",fontFamily:p?(m=a==null?void 0:a.computedStyles)==null?void 0:m.fontFamily:null,whiteSpace:"pre-wrap"},children:o?d(_r,{name:o.name}):h},1)};function d5(e,t){var n;if(!e)return null;for(const{selector:r}of e)if((n=pt[r])!=null&&n.hasOwnProperty(t.name))return pt[r][t.name];return null}function ZU(e,t){return[...e,t].map(n=>n.name).join()}const p5={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"},eV=20;function Tg(e="",t,n,r=0,o={},i={}){if(r>eV)return["<>"];const a=[];let l;for(;l=e.indexOf("var(--"),l!==-1;){const s=l+3,u=Nr(e,s),c=e.slice(s+1,u).trim(),f=c.indexOf(","),p=f===-1,h=p?c:c.slice(0,f).trim(),m=o[h]||i[h];let y;for(const{selector:v}of t||[]){if(h in(n[v]||{})){y=n[v][h];break}if(h in(pt[v]||{})){y=pt[v][h];break}}if(m!==void 0&&(y=m),!y){if(p)return[e,a,`<>`];y=c.slice(f+1).trim()}r===0&&!a.includes(h)&&a.push(h);const[C,,g]=Tg(y,t,n,r+1,o,i);if(g)return console.log(g),[e,a,g];e=e.slice(0,l)+C+e.slice(u+1)}return[e,a]}const Vi=e=>{var _e;const{cssVar:t,onChange:n,onUnset:r,referenceChain:o=[],scopes:i,parentVar:a,currentScope:l=Lt,element:s,group:u}=e,{width:c,showCssProperties:f,linkCssProperties:p}=xe,[{scopes:h},m]=te.themeEditor(),[y,C]=te.pickedValue(),{defaultValues:g,allVars:v}=w.useContext(qe),b=h[Lt]||{},{name:F,usages:_,maxSpecific:A,positions:D,properties:O}=t,T=new Set(_.map(he=>he.selector)).size,L=(u==null?void 0:u.inlineStyles[F])||(u==null?void 0:u.inheritedInlineStyles[F]),Q=!!L,B=Q?()=>{}:n,G=L||pt[l][F]||d5(i,t)||g[F]||((_e=t.maxSpecific)==null?void 0:_e.defaultValue)||t.usages[0].defaultValue,[fe,me]=w.useState(!1),ie=(!h||!h[l]?null:h[l][F])||G,z=ie===G,{media:Z}=A||{};let[U,le]=Tg(ie,i,h,0,u==null?void 0:u.inlineStyles,u==null?void 0:u.inheritedInlineStyles);const[R,K]=w.useMemo(()=>{var De,gt;const he=ie==null?void 0:ie.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/),Ae=!he||he.length===0?null:v.find(Ct=>Ct.name===he[1])||{name:he[1],usages:[{property:((De=t.maxSpecific)==null?void 0:De.defaultValue)||t.usages[0].property,isFake:!0}],properties:{},positions:[]};if(!Ae)return[];const re=(gt=i==null?void 0:i.find(Ct=>Ct.scopeVars.some(on=>on.name===he[1])))==null?void 0:gt.selector;return[Ae,re]},[ie]),X=w.useMemo(()=>{const{overridingMedia:he}=t.allVar||t;return(!Z||LU(Z,V({width:c},p5)))&&(!he||!a5({media:Z,cssVar:t,width:c}))},[c]);let ne=o.length;const P=ZU(o,t),Y=a==null?void 0:a.name,[M,de]=Tn(`open_${P}`,ne>0&&!!R),ue=()=>de(!M),[pe,se]=Tn(`showSelectors_${P}`,!1),[S,$]=Tn(`showRefs_${P}`,!1),[E,N]=Tn(`showPicker_${P}`,!1),I=w.useMemo(()=>{if(!M)return[];if(!F.startsWith("--"))return[];const he=new RegExp(`var\\(\\s*${F.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),Ae=new Map;for(const[re,De]of Object.entries(h))for(const[gt,Ct]of Object.entries(De))he.test(Ct)&&Ae.set(gt,[...Ae.get(gt)||[],re]);for(const[re,De]of Object.entries(pt)){const gt=re in h;for(const[Ct,on]of Object.entries(De))gt&&h[re].hasOwnProperty(Ct)||he.test(on)&&Ae.set(Ct,[...Ae.get(Ct)||[],re])}return[...Ae.entries()].map(([re,De])=>[v.find(gt=>gt.name===re)||{name:re,usages:[]},De])},[h,M]),j=t.cssFunc;if(ne>20)return null;const ce=F in b||F in(h[l]||{}),ve=I.length-(Y?1:0);return k("li",{onDragEnter:t.isRawValue?null:gb,onDragOver:t.isRawValue?null:gb,onDrop:he=>{if(t.isRawValue)return;const Ae=he.dataTransfer.getData("value");new RegExp(`var\\(\\s*${t.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`).test(Ae)||(Ae&&B(Ae),he.stopPropagation())},"data-nesting-level":ne,className:Jp("var-control",{"var-control-in-theme":ce,"var-control-no-match-screen":!X}),onClick:()=>{if(y&&y!==ie){B(y);return}(y===""||y===ie)&&(M||ue())},style:{position:"relative",listStyleType:"none",fontSize:"15px",clear:"both",cursor:M?"auto":"pointer",paddingTop:0},children:[!X&&d(KU,{cssVar:t,media:Z,element:s}),k("div",ae(V({},f5(he=>{C(ie)})),{style:{paddingTop:6},onClick:()=>{M&&ue()},children:[k("h5",{draggable:!0,onDragStart:Vt(()=>`var(${F})`),style:{display:"inline-block",fontSize:"16px",padding:"0 4px 0",fontWeight:"400",userSelect:"none",cursor:"pointer",clear:"left"},children:[d(_r,{style:{fontWeight:o.length===0?"bold":"normal"},name:F}),Q&&d("span",{style:{color:"red"},children:"inline"})]}),d(Bu,{value:ie,resolvedValue:U,cssVar:t,isDefault:z,referencedVariable:R,isOpen:M,group:u})]})),k("div",{children:[Z&&d(qU,{media:Z}),!!f&&k(w.Fragment,{children:[!!j&&d("span",{style:{color:"darkcyan"},children:j}),Object.entries(O).map(([he,{isFullProperty:Ae,fullValue:re,isImportant:De}])=>{const gt=he===(A==null?void 0:A.property),Ct=k("span",{className:"monospace-code",style:V({fontSize:"14px"},gt?{}:{background:"grey"}),title:Ae?"":re,children:[he,gt&&t.states&&!t.pseudos&&d("b",{style:{color:"purple"},children:t.states}),gt&&t.pseudos&&d("a",{target:"_blank",href:p?`https://developer.mozilla.org/en-US/docs/Web/CSS/${t.pseudos}`:null,children:d("b",{style:{color:"indigo"},children:t.pseudos})}),!Ae&&d("b",{style:{color:"red"},children:"*"}),!!De&&d("b",{style:{fontWeight:"bold",color:"darkorange"},children:"!important"})]},he);return p?d("a",{target:"_blank",href:`https://developer.mozilla.org/en-US/docs/Web/CSS/${he.replace(/^-webkit-/,"")}`,style:{cursor:"help"},children:Ct},he):Ct})]})]}),!!D[0]&&d(Ou,V({},D[0]||{})),M&&k(w.Fragment,{children:[ve>0&&k("div",{children:[k(Rt,{controls:[S,$],children:[ve,ne>0&&" more"," links"]}),S&&d(c5,{references:I,excludedVarName:Y})]}),k("div",{style:{display:"flex",clear:"both",justifyContent:"flex-end"},children:[z&&!t.isRawValue&&d("span",{style:{margin:"6px 6px 0",color:"grey"},children:"default"}),ce&&G!==null&&d("button",{title:`Remove from current theme? The value from the default theme will be used, which is currently: "${G}"`,onClick:()=>{r()},children:"Revert"}),R&&d("button",{style:{borderWidth:fe?"4px":"1px"},onClick:()=>{me(!fe)},children:"Raw"}),/^--/.test(t.name)&&d("button",{style:{borderWidth:E?"4px":"1px"},onClick:he=>{N(!E),he.stopPropagation()},children:"Link"}),!_[0].isFake&&k(Rt,{controls:[pe,se],children:["Rules (",T,")"]})]}),E&&d(XU,{value:ie,elementScopes:i,onChange:he=>{B(he)}}),pe&&!_[0].isFake&&k(w.Fragment,{children:[d("div",{children:F}),d(u5,{usages:_,maxSpecificSelector:A==null?void 0:A.selector,winningSelector:A==null?void 0:A.winningSelector,scope:l})]}),(!R||fe)&&!E&&d("div",{children:d(IU,{cssVar:t,value:ie,resolvedValue:U,referencedVars:le,onChange:B,cssFunc:j,elementScopes:i})}),!F.startsWith("--")&&Pg(F)&&d(r5,{disabled:!0,value:ie,resolvedValue:U,referencedVars:le,onChange:()=>{},elementScopes:i}),!!R&&!fe&&k("ul",{style:{margin:0},children:[d("span",{className:"monospace-code",children:K}),w.createElement(Vi,{scopes:i,currentScope:K,cssVar:R,onChange:he=>{m({type:Me.set,payload:{name:R.name,value:he,scope:K}})},onUnset:()=>{m({type:Me.unset,payload:{name:R.name,scope:K}})},key:R.name,referenceChain:[...o,t],parentVar:t})]})]})]},F)};function h5(e){const{path:t}=e,[n,r]=w.useState(!1),{frameRef:o}=w.useContext(qe);return d("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 gs=18;function tV({label:e}){const[t,...n]=e.replace(/\s*\(\d\/\d\)$/,"").split(".").map(i=>i.trim()),[r,o]=w.useState(!1);return k(w.Fragment,{children:[d(Ce,{controls:[r,o],children:d("div",{children:r?d("span",{children:"close"}):e})}),r&&k(w.Fragment,{children:[d(co,{selector:t,initialized:!0,showLabel:!0}),n.map(i=>d(co,{selector:`.${i}`,initialized:!0,showLabel:!0}))]})]})}function ir({children:e}){return d("span",{style:{filter:"grayscale(1)",fontSize:"1.5rem",minWidth:"2rem",display:"inline-block",textAlign:"center"},children:e})}const g5={uiLayout:d(ir,{children:"💻"}),inspectedPath:d(ir,{children:"🔍"}),themeEditor:d(ir,{children:"🖌"}),scales:d(ir,{children:"🔬"}),width:d(ir,{children:"↔"}),height:d(ir,{children:"↕"}),search:d(ir,{children:"🕵️"}),note:d(ir,{children:"🗨"})},nV={openGroups:({action:e})=>{const t=Object.keys(e);return t.length===0?"No open groups":d("div",{className:"history-open-groups",children:t.reverse().map(n=>d(w.Fragment,{children:d("pre",{className:"monospace-code",style:{fontSize:"10px",display:"inline-block"},children:d(tV,{label:n})},n)}))})},inspectedPath:({action:e,historyIndex:t})=>{const{frameRef:n}=w.useContext(qe),{historyOffset:r,past:o}=w.useContext(Ze),i=tf<=t)||[]:[],u=s?d("a",{href:s,children:s.replace(/http:\/\/|https:\/\//,"")}):null;if(!a)return u||"...";const c=l&&s!==window.location.href;return k(w.Fragment,{children:[d(h5,{path:e}),d("pre",{className:"monospace-code",children:a==null?void 0:a.label}),c&&u]})},themeEditor:{set:({payload:{scope:e,name:t,value:n,alternatives:r}})=>k(w.Fragment,{children:[e&&d("pre",{className:"monospace-code",style:{maxHeight:"120px"},children:e}),d("br",{}),d("b",{draggable:!0,onDragStart:Vt(`var(${t})`),children:d(_r,{name:t})})," ",d("br",{}),k("span",{draggable:!0,onDragStart:Vt(n),children:[(Su.test(n)||ol.test(n)||/var\(/.test(n))&&d("span",{style:{width:gs,height:gs,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):"," ",d(kt,{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(w.Fragment,{children:[e&&d("pre",{className:"monospace-code",style:{maxHeight:"120px"},children:e}),d("br",{}),d("b",{children:d(_r,{name:t})})," = default"]}),createAlias:({payload:{name:e,value:t,generatedName:n}})=>k("span",{draggable:!0,onDragStart:Vt(`var(${n})`),children:["Alias",d("br",{}),(Su.test(t)||ol.test(t)||/var\(/.test(t))&&d("span",{style:{width:gs,height:gs,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:[d(_r,{name:n})," = ",t]})]})}},rV=!!document.startViewTransition,$i=rV?e=>document.startViewTransition(e):e=>e();function oV(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length-t,r=n<1;return d("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:()=>$i(()=>CS()),children:"←"})}function iV(){const{historyOffset:e}=w.useContext(Ze),t=e===0;return d("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:()=>$i(()=>SS()),children:"→"})}function aV(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length-t,r=n<1;return d("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:ES,children:"!←"})}function lV(){const{historyOffset:e}=w.useContext(Ze),t=e===0;return d("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:FS,children:"→!"})}function sV({amount:e}){const t=[];for(let n=0;nd("span",{onDragEnter:()=>{gg(e-n-1)},style:{height:"6px",borderLeft:"1px solid #646262"}},n))})}const uV=k(xt,{el:Og,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.",d("h1",{children:"Warning!"}),d("p",{children:"This will restore the UI state across the whole screen, which definitely is a concern for people with epilepsy."}),d("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."}),d("p",{children:"It's recommended to only use it when controlled, small nudges of the wheel are possible."}),d("p",{children:"Keeping some state pinned can help reduce the amount of changes happening in rapid succession."})]});function m5(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);gg(e-i)}function cV(e,t,n){var r;n.pressure>.01&&((r=t.current)!=null&&r.matches(":hover"))&&m5(e,n)}function Og(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length===0?0:100-100*t/e.length,r=w.useRef(null);return k("div",{ref:r,className:"minitimeline",onPointerMove:cV.bind(null,e.length,r),onClick:m5.bind(null,e.length),style:{width:"100%",height:"8px",padding:"2px",background:"darkgrey",boxSizing:"border-box",userSelect:"none",touchAction:"none"},children:[d("div",{style:{width:`${n}%`,height:"6px",background:"rgb(26, 217, 210)",borderRight:"3px solid black",transition:"width .06s ease-out",boxSizing:"border-box"}}),d(sV,{amount:e.length+1}),uV]})}function v5({id:e}){if(e!=="themeEditor")return d("button",{title:"Clear all other values and move this one to start",onClick:$H.bind(null,e),children:"Clear others"})}function Bg(){const{pins:e}=w.useContext(Ze),[t,n]=w.useState(!1),r=e.size;return k(w.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(xt,{el:Bg,children:[d("p",{children:"This button shows how many pins are applied and allows you to toggle each."}),d("p",{children:"Notice how the timeline now jumps over the entries we pinned earlier."})]})]}),t&&d(fV,{close:()=>n(!1)})]})}function fV({close:e}){const{pins:t,past:n,historyOffset:r,states:o}=w.useContext(Ze),[i]=w.useState(new Map(t)),a=[...i.entries()],l=w.useRef();let s=0;return w.useEffect(()=>{const u=c=>{l.current.parentNode.contains(c.target)||e()};return document.addEventListener("click",u),()=>{document.removeEventListener("click",u)}},[]),d("ul",{ref:l,style:{zIndex:100,position:"absolute",background:"white",border:"1px solid black"},children:a.map(([u,c])=>{const f=t.has(u),p=()=>Ui(u,c),h=()=>kl(u),m=c{gg(C),g.stopPropagation()},children:"visit"})]})})})}function y5(e){const t=Math.round(e.deltaY/100);t>0?hg(t,!0):Oa(-t,!0)}function Jc(){const[e,t]=te.visualizeHistory(),[n,r]=te.visualizeHistoryAlways();return k("div",{onWheelCapture:y5,children:[d(Og,{}),d(Bg,{}),d(Ce,{controls:[e,t],children:"Visualize"}),e&&d(Ce,{title:"Always or only when in a previous state",controls:[n,r],children:"Always"}),d("button",{onClick:()=>{confirm("Clear all history, keeping only current state?")&&HH()},children:"Clear"}),k("div",{style:{display:"inline-flex"},children:[d(aV,{}),d(oV,{}),d(iV,{}),d(lV,{})]}),k(xt,{el:Jc,children:[d("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."}),d("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.`})]})]})}Jc.fName="HistoryControls";function Qc(){const{lastAlternate:e,historyOffset:t,past:n,lastAlternateIndex:r,savedStashes:o}=w.useContext(Ze),i=n.length-t-r,a=e.length===0,l=a?d(w.Fragment,{children:"Stash"}):k(w.Fragment,{children:[e.length," steps stashed ",d("br",{}),i," steps since"]}),s=w.useMemo(()=>JSON.stringify(e.map(u=>[...u.entries()].map(([c])=>c)),null,2),[e]);return k(w.Fragment,{children:[k("div",{className:"flex-row",children:[d("button",{title:`Apply/create stash: -`+s,onClick:kS,style:{textAlign:"left",background:`rgba(26, 217, 210, ${Math.min(e.length/50,1)})`},disabled:a&&t===0,children:l}),!a&&d(dV,{}),o.length>0&&d("span",{children:" Saved: "}),o.map(([u,c],f)=>k(w.Fragment,{children:[k("button",{title:`Apply/create stash: -`+JSON.stringify(c.map(p=>p.entries())),onClick:LH.bind(null,f),style:{background:`rgba(26, 217, 210, ${Math.min(c.length/50,1)})`},children:[c.length," steps",d("br",{}),n.length-t-u," steps since"]}),d("button",{onClick:()=>{confirm("Permanently delete stash?")&&bS(f)},style:{textAlign:"left"},children:"clear"})]}))]}),d(xt,{el:Qc,tasks:[()=>{const{pins:u}=w.useContext(Ze);return["Remove all pins",u.size===0]},()=>{const{historyOffset:u}=w.useContext(Ze);return["Navigate back",u!==0||!a]},()=>["Add future actions to the stash",!a]],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 dV(){return d("button",{onClick:zH,children:"Clear"})}Qc.fName="HistoryStash";function pV(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}function hV({containerRef:e,id:t}){const{past:{length:n}}=w.useContext(Ze),[r,o]=Tn(`areaOffset#${t}`,[0,n]),[i,a]=r.length?r:[r,0];w.useEffect(()=>{a===n&&e.current.scrollTo({top:i,left:0})},[]),w.useEffect(()=>{const l=performance.now(),s=u=>{if(performance.now()-l<500)return;const c=u.currentTarget.scrollTop,f=c<10?0:Math.floor(c);o([f,n],{skipHistory:!0,appendOnly:!0})};return pV(e.current,"scroll",s)},[])}function gV({containerRef:e,id:t}){const[n]=Tn(`areaOffset#${t}`,[0]),[r]=n.length?n:[n];w.useEffect(()=>{var i;(i=e.current)==null||i.scrollTo({top:r,left:0});const o=setTimeout(()=>{var a;(a=e.current)==null||a.scrollTo({top:r,left:0})},500);return()=>{clearTimeout(o)}},[r])}let b5;function mV(e){return b5=e}function vV(e){const{historyOffset:t}=w.useContext(Ze);return b5===e.id||e.id==="drawer"?null:t===0?d(hV,V({},e)):d(gV,V({},e))}function lr(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}=w.useContext(Fo),c=i===e,f=w.useRef();return u.current[e]||(u.current[e]=f),k("div",ae(V({style:{position:"relative"}},n),{id:e,ref:f,className:"area",children:[d(vV,{id:e,containerRef:f}),!!t&&w.Children.map(t,(p,h)=>d(nG,{homeAreaId:e,element:p,index:h})),d("div",{className:"area-dropzone"+(c?" drag-hovered":""),style:{order:1e3,background:"rgba(167,238,227,0.22)",outline:"2px dashed grey",outlineOffset:"-8px"},onDragEnter:w.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:w.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area=setTimeout(()=>{s.current.lastEntered===e&&a(null)},DS)},[])})]}))}function yV(){const{hostAreaId:e,homeAreaId:t}=w.useContext(Fi),n=e||t;w.useEffect(()=>{mV(n)},[n])}function mb(e){return e?typeof e.type=="function"?e.type.name:e.type:""}const w5=[()=>{const{pins:e}=w.useContext(Ze);return["Pin the screen width and height.",e.has("width")&&e.has("height")]}];function x5(){return k(w.Fragment,{children:[d("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."}),d("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."}),d("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 bV(e){const{id:t,historyIndex:n}=e,{pins:r,historyOffset:o,past:i}=w.useContext(Ze),a=r.get(t),l=n===a;return a>i.length-o,d(w.Fragment,{children:d("button",{className:l?"pinned-here":"",style:{outline:l?"2px solid black":"none",background:l?"white":"transparent"},onClick:s=>{l?kl(t):Ui(t,n),s.stopPropagation()},children:d("span",{className:"pin",children:"📌"})})})}function wV(e){const{id:t}=e,{pins:n}=w.useContext(Ze),r=mS(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?()=>{kl(t)}:()=>{DH(t)},title:"Pin to latest",children:[d("span",{className:"pin",children:"📌"}),"→"]})}function xV(e){const{id:t,historyIndex:n}=e,{pins:r}=w.useContext(Ze);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?()=>{kl(t)}:()=>{PH(t)},title:"Pin to initial",children:["←",d("span",{className:"pin",children:"📌"})]})}function CV({id:e}){const[t,n]=w.useState(!1);return k("div",{style:{position:"relative"},children:[d(Rt,{controls:[t,n],children:"..."}),t&&d("div",{style:{position:"absolute",top:"100%"},children:d(v5,{id:e})})]})}function lh(e){const{showScrolls:t}=xe,{actions:n,showPayloads:r,historyIndex:o}=e,{previewComponents:i,pins:a}=w.useContext(Ze);return d("ul",{className:"history-actions",children:[...n].map(([l,s],u)=>{if(!t&&l.startsWith("areaOffset"))return;const c=typeof s=="object";if(s===null)return d("span",{style:{color:"red"},children:"IT IS NULL"});const f=c&&"type"in s,p=f?JSON.stringify(s.payload,null,2):c?JSON.stringify(s,null,2):s,h=f?"::"+mb(s):"",m=p==="{}",y=!f&&(typeof p=="boolean"||typeof p=="number"||(p==null?void 0:p.length)<320),C=i[l],g=typeof C=="function"?C:l in i?i[l][mb(s)]:null,v=a.has(l),b=v&&a.get(l)!==o,F=g5[l]||"";return k("li",{title:b?"Overridden by pin":"",style:{clear:"both",opacity:b?.5:1},children:[d(bV,{id:l,historyIndex:o}),d(wV,{id:l,historyIndex:o}),d(xV,{id:l,historyIndex:o}),v&&d("span",{style:{float:"right"},children:d(CV,{id:l})}),F,!g&&k("span",{children:[d("b",{children:l}),h]}),!g&&y&&d("pre",{style:{margin:0,float:"right"},className:"monospace-code",children:p===!1?"false":p===!0?"true":p}),!m&&r&&d("pre",{className:"monospace-code",children:p===!1?"false":p===!0?"true":p}),g&&d(g,{action:s,historyIndex:o,payload:s.payload})]},`${o}:${u}`)})})}const SV=k(xt,{el:Bl,tasks:w5,children:[d(x5,{}),"Since history visualization is disabled, this only shows current history entry."]});function EV(){const{past:e,historyOffset:t,lastActions:n,initialStates:r}=w.useContext(Ze),[o,i]=w.useState(!1),a=e.length-t,s=t===0?n:e[a].lastActions,u=a===0,c=u&&o?[...r.entries()].filter(([f])=>f in te):[...s.entries()];return k("div",{onWheelCapture:y5,style:{minWidth:"280px",maxWidth:"400px",minHeight:"240px",overflow:"hidden visible"},children:[SV,u&&d(Ce,{controls:[o,i],children:"Show all initial values"}),d(lh,{historyIndex:a,actions:c})]})}function Bl(){const[e,t]=te.visualizeHistoryAlways(),[n,r]=w.useState(!1),[o,i]=be("showAllHistory",!0),[a,l]=w.useState(!1),[s,u]=w.useState(!1),{past:c,historyOffset:f,lastActions:p,pointedStates:h,pins:m}=w.useContext(Ze),y=xe.visualizeHistory&&(e||f!==0);let C=w.useRef();if(w.useEffect(()=>{var b;(b=C.current)==null||b.scrollIntoView({block:"nearest"})},[f]),!y)return d(EV,{});const g=c.length-f;let v=!1;return k("div",{className:"history",children:[k(xt,{el:Bl,tasks:w5,children:[d(x5,{}),"See all steps you took here."]}),d(yV,{}),d(Ce,{controls:[o,i],children:"Show all"}),d(OS,{hook:te.showScrolls,children:"Include scroll position"}),d(Ce,{controls:[n,r],children:"Debug"}),n&&k("div",{children:[d(Ce,{controls:[a,l],children:"Inspect current state"}),d(Ce,{controls:[s,u],children:"Show payloads"}),d("button",{onClick:()=>console.log(h),children:"console.log"}),d("button",{onClick:OH,children:"export"}),a&&d("pre",{className:"monospace-code",children:JSON.stringify(Object.fromEntries(h),null,2)})]}),k("ul",{className:"connected-list",children:[c.map(({states:b,lastActions:F},_)=>{const A=_===g;v=v||A;const D=Math.abs(_-g),O=[...F.entries()].some(([T,L])=>typeof L=="object"||b.get(T)!==h.get(T));if(!A&&!o&&_!==0&&!pg(F)){const T=[...F.keys()];if(!T.some(Q=>m.has(Q)&&m.get(Q)===_)&&!T.some(Q=>dg.includes(Q)))return null}return k("li",{id:A?"history-current-state":"",ref:_===g?C:null,style:{position:"relative",outline:_===g?"3px solid black":"none"},children:[d("span",{style:{marginLeft:"-32px"},children:_}),d(lh,{historyIndex:_,actions:[...F.entries()],showPayloads:s}),k("div",{className:"history-state-buttons",style:{display:"flex",justifyContent:"stretch"},children:[d("button",{style:{width:"50%"},onClick:A?()=>{t(!0),Oa(f)}:v?()=>{Oa(D)}:()=>{hg(D)},children:A?"jump to end":"jump here"}),O&&d("button",{style:{width:"50%"},onClick:T=>{for(const[L,Q]of F.entries())Dc(L,Q);T.preventDefault(),T.stopPropagation()},children:"do again"})]})]},_)}),k("li",{onClick:v?()=>{Oa(f)}:null,style:{outline:f===0?"3px solid black":"none"},children:[d("span",{style:{marginLeft:"-32px"},children:"Latest"}),d(lh,{historyIndex:c.length,actions:[...p.entries()],showPayloads:s})]},"latest")]})]})}Bl.fName="HistoryVisualization";function C5(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 FV=(e,t)=>{if(!t)return e;const n=t.replace(/^\!/,""),r=n.length!==t.length;try{return e.map(o=>ae(V({},o),{vars:o.vars.filter(i=>{const a=C5(i,n);return r?!a:a})}))}catch(o){return e}};function kV(e,t){return t.length===0?e:e.map(n=>ae(V({},n),{vars:n.vars.filter(r=>t.some(i=>r.maxSpecific.selector.includes(i)))}))}function AV(e){const t=gn(),{group:n,elementScopes:r}=e,o=Object.entries(n.inlineStyles);return o.length===0?null:k("div",{children:[d("h5",{style:{color:"red"},children:"Inline styles"}),d("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 w.createElement(Vi,{group:n,key:u.name,cssVar:u,scopes:r,onChange:c=>{t({type:Me.set,payload:{name:u.name,value:c}})},onUnset:()=>{t({type:Me.unset,payload:{name:u.name}})}})}return d("li",{children:k("span",{className:"monospace-code",children:[i,": ",a]})},i)})})]})}function $V(e){const{scopes:t,vars:n,element:r,group:o}=e,i=gn(),[a,l]=be("show-scope-locators",!1);if(t.length===0)return null;const s=[];return k("div",{style:{background:"lightyellow",marginBottom:"24px",padding:"4px",border:"1px solid black"},children:[d(Ce,{controls:[a,l],style:{float:"right"},children:"Find on page"}),d("ul",{children:t.map(({selector:u,matchingSelector:c,scopeVars:f})=>{const p=u.split();s.push(...f);const h=n.filter(m=>m.currentScope===u);return h.length===0?null:k("li",{children:[d("span",{style:{border:"1px solid gray"},className:"monospace-code",children:p.map(m=>m===c?d("b",{children:m},"selector"):m)}),a&&!u.includes(":root")&&!u.includes(":where(html)")&&d(co,{selector:u,initialized:!0,showLabel:!1}),d("ul",{style:{marginBottom:"24px"},children:h.map(m=>w.createElement(Vi,{cssVar:m,scopes:t,currentScope:u,element:r,group:o,key:m.name,onChange:y=>{i({type:Me.set,payload:{name:m.name,value:y,scope:u}})},onUnset:()=>{i({type:Me.unset,payload:{name:m.name,scope:u}})}}))})]},u)})})]})}const _V=({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}),DV=e=>typeof e=="string"?e:e.src,PV=(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},Td=(e,t)=>{const n=Math.round(e/t)*t;return Math.min(n,255)},Od=new Map,TV=e=>Od.has(e)?Promise.resolve(Od.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"});Od.set(e,a),t(a)},i.onerror=a=>(console.log(a),n(Error("Image loading failed."))),i.crossOrigin="",i.src=e}),OV=(e,t)=>{const n=4*t.sample,r={},o=t.minHue===0,i=t.maxHue===360,a=o&&i;for(let p=0;p360,u=l?360+t.minHue:t.minHue,c=i?360:t.maxHue%360;function f([,,{h:p}]){return a?!0:l?p>=u||p<=c:s?p<=c||p>=u:p>=u&&p<=c}return PV(Object.entries(r).filter(([,p])=>p>1).map(([p,h])=>{const[m,y,C]=p.split(",");return[p,h,kr(`color(display-p3 ${m/255} ${y/255} ${C/255})`)]}).filter(f).sort(([,,p],[,,h])=>p.c>h.c?-1:1).slice(0,t.amount).map(([p])=>p),t)};function BV(e,t){return tt(this,null,function*(){const n=yield TV(DV(e));return OV(n,_V(t))})}const vb=42;function MV({value:e,h:t,rangeSize:n}){const{palette:r,pickedHue:o}=xe,[i,a]=te.pickedValue(),l=r.some(({value:u})=>u===e),s=Math.abs(Math.abs(t)-Math.abs(o))>n/20;return d("div",{style:{background:s?"white":"transparent",border:"transparent",position:"absolute",top:0,right:0,bottom:0,left:0},onClick:()=>{a(i===e?"":e)},children:l&&"V"})}function RV({color:e,minLightness:t,maxLightness:n,rangeSize:r}){const o=kr(e);if(!o)return;const{l:i,c:a,h:l=0,alpha:s=1}=o,u=i*100;if(un)return;const c=zn(u,a,l,s);return d("div",{title:c,draggable:!0,onDragStart:f=>f.dataTransfer.setData("value",c),style:{position:"relative",display:"inline-block",fontWeight:900,verticalAlign:"top",width:vb,height:vb,backgroundColor:e,color:"green"},children:d(MV,{value:c,h:l,rangeSize:r})})}function NV({minLightness:e,maxLightness:t,rangeSize:n,colors:r}){return r.map(o=>d(RV,{color:o,minLightness:e,maxLightness:t,rangeSize:n}))}function IV(e){const{pickedHue:t}=xe,{path:n}=e,[r,o]=w.useState(),[i,a]=w.useState(),[l,s]=st("image color group",2),[u,c]=st("image color sample",16),[f,p]=st("image color amount",90),[h,m]=st("image color min lightness",0),[y,C]=st("image color max lightness",100),[g,v]=st("image color min hue",0),[b,F]=st("image color max hue",360),[_,A]=be("image color preserve lightness range",!1),[D,O]=be("image color preserve hue range",!1),[T,L]=w.useState(!0);if(w.useEffect(()=>{const B=performance.now(),G=setTimeout(()=>tt(this,null,function*(){L(!0),o(yield BV(n,{sample:u,group:l,amount:Math.max(2,f),minHue:g,maxHue:b})),a(performance.now()-B),L(!1)}),80);return()=>clearTimeout(G)},[n,l,u,f,g,b]),!r)return;const Q=b-g||360;return k("div",{children:[d("br",{}),"group: ",l,k("span",{style:{float:"right"},children:[" ",i,"ms"]}),d("input",{disabled:T,type:"range",value:l,min:1,max:100,style:{width:"95%"},onChange:B=>{s(parseInt(B.target.value))}}),"sample: ",u,d("input",{disabled:T,type:"range",value:u,min:1,max:50,style:{width:"95%"},onChange:B=>{c(parseInt(B.target.value))}}),"amount: ",d("input",{type:"number",value:f,onChange:B=>p(B.target.value)}),d("input",{disabled:T,type:"range",value:f,step:9,min:9,max:90,style:{width:"95%"},onChange:B=>{p(parseInt(B.target.value))}}),k("div",{style:{display:"flex"},children:[d("input",{disabled:T,type:"number",value:g,min:0,max:360,onChange:B=>{v(parseInt(B.target.value))}}),d("input",{disabled:T,type:"number",value:b,min:1,max:360,onChange:B=>{F(parseInt(B.target.value))}}),d(Ce,{disabled:!D&&b-g>=360,controls:[D,O],children:"Fix hue range"})]}),k("div",{style:{position:"relative",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:[t&&d("div",{style:{position:"absolute",width:"100%",height:62,background:"transparent",backdropFilter:"blur(1px)"},children:d("div",{style:{border:"1px dashed black",width:"100%",height:"100%",fontSize:"2rem"},onClick:()=>{const G=(b-g)/20;v(t-G),F(t+G)},children:"click to narrow down"})}),d("input",{disabled:T||g<0,type:"range",value:(360+g)%360,min:0,max:360,style:{width:"100%",height:28,padding:0},onChange:B=>{const G=parseInt(B.target.value);v(G),G>b-5&&F(G+5),D&&F(b+G-g)}}),d("input",{disabled:T||b>360,type:"range",value:b===360?360:b%360,min:1,max:360,style:{width:"100%",height:28,padding:0},onChange:B=>{const G=parseInt(B.target.value);F(G),G{m(parseInt(B.target.value))}}),d("input",{disabled:T,type:"number",value:y,min:1,max:100,onChange:B=>{C(parseInt(B.target.value))}}),d(Ce,{disabled:h<=0&&y>=100,controls:[_,A],children:"Fix lightness range"})]}),k("div",{children:[d("input",{disabled:T,type:"range",value:h,min:0,max:99,style:{width:"95%"},onChange:B=>{const G=parseInt(B.target.value);m(G),G>y-5&&C(G+5),_&&C(y+G-h)}}),d("input",{disabled:T,type:"range",value:y,min:1,max:100,style:{width:"95%"},onChange:B=>{const G=parseInt(B.target.value);C(G),G!l.isRawValue).map(([{name:l}])=>`var(${l})`);let i=!1;const a=gn();return t.forEach(([{name:l,isRawValue:s},u,c,f=":root"])=>{if(s||o.includes(c))return;const p=kr(u);if(!p||p.l<.001||p.l>.999||!n&&p.c{t(""),n.stopPropagation()},children:"X"})]})}const ms=new WeakSet,yb=new Set;function HV({src:e,element:t}){const[n,r]=te.inspectedPath(),{xrayFrameRef:o}=w.useContext(qe);return!(e!=null&&e.endsWith(".svg"))||yb.has(e)?null:d("button",{onClick:()=>{tt(this,null,function*(){const i=URL.parse(e,window.location.href),l=yield(yield fetch((i==null?void 0:i.href)||e)).text(),s=document.createElement("div");if(s.style.minHeight="100px",s.style.minWidth="100px",s.innerHTML=l,t.after(s),o.current){const u=o.current.contentWindow.document,c=u.createElement("div");c.innerHTML=l,c.style.minHeight="100px",c.style.minWidth="100px",Ht(n,u).after(c),r([...n.slice(0,-1),["SVG",n.at(-1)[1]+1]])}yb.add(e)})},children:"inline SVG"})}function GV({path:e}){const[t,n]=te.elementSelectionMode(),[,r]=te.inspectedPath();return t?d("div",{onClick:o=>{r(e),n(!1)},title:"Go up to this element",style:{outline:"3px solid indigo",borderRadius:"7px",position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:99,cursor:"pointer"}}):null}const WV=e=>{const{group:t,index:n}=e,r=n===0,{propertyFilter:o,maximizeChroma:i,inspectedPath:a}=xe,[{scopes:l},s]=te.themeEditor(),[u,c]=te.svgDarkBg(),f=yg("pickedValue"),[p,h]=be("image color show",!1),{element:m,path:y,elementInfo:{src:C,srcset:g,imgWidth:v,imgHeight:b,alt:F,title:_,html:A,width:D},label:O,vars:T,scopes:L,isRootElement:Q,inlineStyles:B={},inheritedInlineStyles:G={}}=t,fe=Object.keys(B).length>0,Se=r&&[...m.childNodes].some(Y=>Y.nodeType===3&&Y.textContent.trim()!=="")?m.textContent.trim():null,{defaultValues:ie}=w.useContext(qe),[z,Z]=te.openGroups(),U=Y=>{const pe=z,{[Y]:M}=pe,de=mn(pe,[af(Y)]),ue=M?de:ae(V({},de),{[Y]:!0});return Z(ue),!M},[le,R]=w.useState(ms.has(m)),K=w.useMemo(()=>T.reduce((Y,M)=>{var de,ue;if(Ol(M)){const{name:pe}=M;if(!pe.startsWith("--"))return pe.toLowerCase()!=="currentcolor"&&Y.push([M,pe]),Y;const se=di[pe];let S=M.currentScope;if(!S&&L.length>0){for(const j in se||{})if(S=((de=L.find(ce=>ce.selector===j))==null?void 0:de.selector)||S,S)break}const $=pt[S||":root"][pe]||d5(L,M)||ie[pe]||((ue=M.maxSpecific)==null?void 0:ue.defaultValue)||M.usages[0].defaultValue,E=!l||!l[S]?null:l[S][pe],N=B[pe]||G[pe]||E||$;let[I]=Tg(N,L,l,0,B,G);if(I.includes("calc(")){const j={steps:[]};let ce=I;for(;ce.includes("calc(");){const ve=ce.indexOf("calc("),_e=Nr(ce,ve+5);try{const[he]=Xc(ce.slice(ve+5,_e-1),j);ce=ce.slice(0,ve)+he+ce.slice(_e+1)}catch(he){break}}I=ce}I&&I!=="inherit"&&I.toLowerCase()!=="currentcolor"&&Y.push([M,M.cssFunc?`${M.cssFunc}(${I})`:I,N,S])}return Y},[]),[T,L,l]),ne=!(T.length===0)||C;if(w.useEffect(()=>{le?m.classList.add("force-nodisplay"):m.classList.remove("force-nodisplay")},[le]),!ne&&!r&&!C&&!A)return null;const P=!!z[O];return k("li",{className:"var-group",style:{viewTransitionName:r&&a.length>1?`inspected${a.length}-${a.at(-1)[1]}`:n,marginBottom:"12px"},children:[k("div",{style:{position:"sticky",top:0,background:"white",zIndex:12},onMouseEnter:()=>{el(m)},onMouseLeave:()=>{fi(m)},children:[!r&&d(GV,{path:y}),k("div",{style:{overflow:P?"hidden":"auto"},children:[Q?d("span",{style:{float:"right"},children:"global"}):d(h5,{path:y}),k("h4",{style:{fontWeight:400,marginBottom:0,paddingRight:"4px",cursor:ne?"pointer":"initial",display:"flex",justifyContent:"space-between",alignItems:"flex-start",maxHeight:P?"128px":"300px",overflowX:"hidden",overflowY:"auto"},onClick:ne?Y=>{const M=LF("pickedValue");if(M&&S5(M,{groupColors:K,maximizeChroma:i}))return;const de=U(O);queueMicrotask(()=>{de||Y.target.scrollIntoView({block:"nearest"})},0)}:null,onDrop:Y=>zV({groupColors:K,maximizeChroma:i},Y),onDragOver:Y=>{Y.preventDefault()},children:[k("div",{style:{flexShrink:1},children:[O," (",T.length,")",o!=="all"&&d("span",{style:{color:"grey",fontSize:"12px"},children:o}),d(jV,{}),K.length>0&&d("div",{style:{overflowX:"hidden"},children:K.map(([{name:Y},M,de,ue])=>{const pe=Y.startsWith("--");return w.createElement("div",ae(V({onDragOver:se=>se.preventDefault(),onDrop:se=>{let S=se.dataTransfer.getData("value");S===""&&(S=se.dataTransfer.getData("text/plain").trim()),S!==""&&(s({type:Me.set,payload:{name:Y,value:S,scope:ue}}),se.stopPropagation())},draggable:!0},f5(()=>f(M))),{onDragStart:Vt(de),key:Y,title:Y===M?Y:`${Y}: ${de}`,style:{display:"inline-block",width:Bd,height:Bd,lineHeight:"1.5",border:"1px solid black",borderRadius:"6px",backgroundImage:`${M}`,backgroundColor:`${M}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",marginTop:"3px",marginLeft:"6px",paddingTop:"3.5px",fontSize:"14px",textAlign:"center",textShadow:pe?"white 0px 3px":"white 2px 2px"}}),/^var\(/.test(de)?"v":M==="transparent"?"👻":pe?d(w.Fragment,{children:" "}):"r")})})]}),fe&&d("span",{style:ae(V({border:"1px solid black"},B),{maxHeight:Bd,width:"auto"}),children:"Inline"}),C&&d("img",{src:C,srcSet:g,alt:F,title:_||F,style:{height:"52px",float:"right",backgroundColor:"grey"}}),(A==null?void 0:A.length)>0&&d("div",{className:"svg-inspect-wrapper",style:{display:"inline",position:"relative",minWidth:`${D}px`,maxWidth:"50%",maxHeight:"160px",outline:"1px solid grey",padding:"2px",background:u?"black":"transparent"},onClick:Y=>{c(!u),Y.stopPropagation()},dangerouslySetInnerHTML:{__html:A}}),Se&&d("div",{style:{fontSize:"12px",border:"1p solid grey",background:"lightgrey",maxWidth:"45%",margin:"4px",padding:"4px",float:"right",maxHeight:"62px",overflow:"auto"},children:Se})]})]})]}),P&&k(w.Fragment,{children:[C&&k(w.Fragment,{children:[d("a",{href:C,target:"_blank",children:C}),d("br",{}),d(Ce,{controls:[p,h],children:"Extract colors"}),k("code",{style:{float:"right"},children:[v," x ",b]}),p&&d(IV,{path:C})]}),d(AV,{group:t,elementScopes:L}),d($V,{scopes:L,vars:T,element:m,group:t}),d("ul",{className:"group-list",children:T.filter(Y=>!Y.currentScope).map(Y=>w.createElement(Vi,{cssVar:Y,scopes:L,element:m,group:t,key:Y.name,onChange:M=>{s({type:Me.set,payload:{name:Y.name,value:M}})},onUnset:()=>{s({type:Me.unset,payload:{name:Y.name}})}}))}),d(Ce,{controls:[ms.has(m),Y=>{Y?ms.add(m):ms.delete(m),R(Y)}],children:"Hide"})]}),d(HV,{element:m,src:C})]},O)},UV=k(xt,{el:Zc,children:[d("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."}),d("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:[d("li",{children:"It's upside down, so that the most useful information is easy to find"}),d("li",{children:"Doesn't include the whole tree, only the section leading to the inspected element."}),d("li",{children:"Everything related to the element is here, so it's always obvious what applies to what"})]})]})]});function Zc(){var c;const{frameRef:e}=w.useContext(qe),{propertyFilter:t,search:n,filteredSelectors:r,showRawValues:o,excludedRawValues:i,inspectedPath:a}=xe;let l;try{const f=Ht(a,(c=e.current)==null?void 0:c.contentWindow.document);l=ko(f)}catch(f){l=[]}const s=w.useMemo(()=>{const f=kV(l,r);return FV(f,n).map(h=>ae(V({},h),{vars:h.vars.filter(m=>m.isRawValue&&!o||i.some(y=>m.name===y)?!1:t==="all"?!0:Ol(m))}))},[l,t,n,r]),u=w.useRef();return k(w.Fragment,{children:[UV,k("ul",{className:"group-list",ref:u,children:[s.length===0&&d("li",{children:d("span",{className:"alert",children:"No element selected"})}),s.map((f,p)=>d(WV,{group:f,index:p},f.label))]})]})}Zc.fName="Inspector";function Mg(){const[e,t]=Tc();return d("button",{className:"movable-element-collapse",onClick:()=>{t(!e)},children:e?"+":"-"})}function VV(e){const{value:t,isHtml:n}=e,r=t.replace(/var\(/,"").replace(/\)$/,"").trim(),o=r!==t&&/^[\w\-]+$/.test(r),i=w.useRef();return w.useEffect(()=>{},[t]),n?d("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{__html:t}}):d("div",{ref:i,style:{listStyleType:"none"},draggable:!0,onDrag:a=>{a.dataTransfer.setData("value",t),a.stopPropagation()},children:o?d(YV,{value:t,varName:r}):d(KV,{value:t})})}function KV(e){const{value:t}=e;return d("div",{children:d(Bu,{value:t,cssVar:{name:t,value:t,usages:[]},resolvedValue:t})})}function YV(e){const{value:t,varName:n}=e,{themeEditor:{scopes:r}}=xe,{allVars:o}=w.useContext(qe),[i,a]=w.useState(!1),l=o.find(f=>f.name===n)||{name:n,usages:[]},s=w.useMemo(()=>{var h;if(!i)return null;if(!((h=l.name)!=null&&h.startsWith("--")))return[];const f=new RegExp(`var\\(\\s*${l.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),p=[];for(const m of o){const{name:y}=m;if(!(y!=null&&y.startsWith("--")))continue;const C=new Set;Object.entries(r).forEach(([g,v])=>{v[y]&&f.test(v[y])&&C.add(g)}),Object.entries(pt).forEach(([g,v])=>{if(C.has(g))return;const b=v[y];b&&b.includes("--")&&f.test(b)&&C.add(g)}),C.size>0&&p.push([[...C.values()],m])}return p},[r,i]),u=Object.entries(di[n]||{});let c;if(u.length===0){const f=[];for(const[p,h]of Object.entries(r))for(const[m,y]of Object.entries(h))m===n&&f.push([p,y]);c=f}else c=u;if(c.length===0)return d("div",{children:k("b",{children:[n," ",d("span",{style:{color:"red"},children:"is undefined"})]})});if(c.length===1){const f=c[0][1];return k("div",{children:[d("b",{draggable:!0,onDragStart:Vt(f),children:n}),d(Bu,{cssVar:l,value:f,resolvedValue:f}),d(Rt,{controls:[i,a],children:"Usages"}),i&&k(w.Fragment,{children:[d(c5,{references:s}),d(u5,V({},l))]})]})}return k("div",{children:[k("b",{draggable:!0,onDragStart:Vt(t),children:[n," (",c.length,")"]}),d("ul",{children:c.map(([f,p])=>k("li",{style:{clear:"both"},children:[d("span",{className:"monospace-code",children:f}),d(Bu,{value:f in r&&n in r[f]?r[f][n]:p,cssVar:l})]},f))})]})}function E5({values:e,setValues:t,width:n=65,mini:r=!1}){const[o,i]=te.pickedValue(),a=e.some(({value:f})=>f===o),[l,s]=be("palette-vertical",!1),[u,c]=w.useState(!1);return w.useEffect(()=>{if(u){const f=()=>{c(!1)};return document.addEventListener("drop",f),document.addEventListener("dragend",f),()=>{document.removeEventListener("drop",f),document.removeEventListener("dragend",f)}}},[u]),w.useEffect(()=>{c(!1)},[e]),k("div",{style:{display:"flex",flexDirection:l?"column":"row"},children:[(u||a)&&d("div",{style:{fontSize:"25px",fontWeight:"bold",textAlign:"center",border:"1px dashed grey",minWidth:"42px"},onClick:()=>t(e.filter(({value:f})=>f!==o)),onDrop:f=>{const p=f.dataTransfer.getData("value");p!==void 0&&t(e.filter(({value:h})=>h!==p))},children:"🗑"}),!r&&d("div",{className:l?"flex-row":"flex-column",children:d(qV,{})}),!u&&!a&&d(Rt,{style:{maxWidth:"28px"},controls:[l,s],children:l?"⇓":"⇒"}),e.map(({value:f,isHtml:p},h)=>p?d("div",{style:{width:n,height:n,overflow:"hidden",background:"white"},draggable:!0,onDragStart:Vt(f,()=>c(!0)),children:d("div",{style:{width:"320px",transform:"scale(.3)",transformOrigin:"left top"},dangerouslySetInnerHTML:{__html:f}})}):d("span",{style:{display:"inline-block"},children:d("span",{draggable:!0,onClick:()=>{i(o===f?"":f)},onDragStart:Vt(f,()=>c(!0)),title:f,onDrop:m=>{let y=!1,C=m.dataTransfer.getData("value");if(C===""&&(C=m.dataTransfer.getData("text/html").trim(),y=!0),C===""&&(C=m.dataTransfer.getData("text/plain").trim()),e.some(({value:g})=>g===m.dataTransfer.getData("value"))){const g=e.filter(({value:b})=>C!==b),v=[...g.slice(0,h),{value:C,isHtml:y},...g.slice(h)];t(v),m.stopPropagation()}else t([...e,{value:C,isHtml:y}]),m.stopPropagation()},style:{display:"inline-block",overflow:"hidden",margin:"2px",backgroundImage:`${f}`,backgroundColor:f,backgroundRepeat:"no-repeat",backgroundSize:"cover",fontSize:"14px",textShadow:"white 0px 10px",lineHeight:"20px",width:n,height:n,outline:f===o?"4px solid yellow":"none"},children:f},f)}))]})}function XV({values:e,setValues:t}){return d("ul",{style:{display:"flex",flexDirection:"column",maxWidth:"320px"},children:e.map(n=>{const{value:r}=n;return k("li",{style:{display:"flex",flexDirection:"row"},children:[d(VV,V({value:r},n)),d("button",{style:{alignSelf:"flex-end"},onClick:()=>{t(e.filter(o=>o!==n))},children:"X"})]},r)})})}function qV(){const[e,t]=te.palette(),[n,r]=w.useState(!1),[o,i]=be("manage palettes open",!1),[a,l]=w.useState(""),s=a.trim(),[u,c]=be("palettes",[]),f=e.length===0;return k("div",{children:[d(Rt,{controls:[n,r],children:"..."}),n&&k(w.Fragment,{children:[d(Ve,{value:a,onChange:l}),d("button",{disabled:s==="",onClick:()=>{c([...u,{name:a,contents:e}])},children:"save"}),d("button",{disabled:f,onClick:()=>{f||c([...u,{name:"tmp",contents:e}]),t([])},children:"clear"}),d(Rt,{controls:[o,i],children:"Stored palettes"}),o&&d("ul",{children:u.map(({name:p,contents:h=[],palette:m})=>k("li",{style:{display:"flex",justifyContent:"flex-end"},children:[p," (",h.length,")",d(E5,{mini:!0,values:h,setValues:()=>{},width:20}),d("button",{onClick:()=>{f||c([...u,{name:"tmp",contents:m}]),t(h)},children:"restore"}),d("button",{onClick:()=>{confirm(`Delete palette "${p}"?`)&&c(u.filter(({name:y})=>y!==p))},children:"X"})]},p))})]})]})}function ef(){const[e,t]=te.pickedValue(),[n,r]=te.palette(),[o]=Tc();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:[d(Mg,{}),n.length===0&&k("span",{children:["Empty",d("br",{})]}),o?d(E5,{values:n,setValues:r}):d(XV,{values:n,setValues:r}),d(xt,{el:ef,tasks:[()=>[`Add 2 items to the palette (${Math.min(2,n.length)}/2)`,n.length>1]],children:"You can drop values from almost anywhere here, and drag them onto the page and UI elements later."})]})}ef.fName="Palette";function JV(e){const l=e,{options:t,onChange:n,selected:r}=l,o=mn(l,["options","onChange","selected"]),i=w.useId(),a=w.useCallback(s=>n(s.target.value),[]);return d("div",{children:t.map((s,u)=>k("div",{children:[d("input",V({id:`${i}-${u}`,type:"radio",name:i,value:s.value,onChange:a,checked:s.value===r},o)),d("label",{htmlFor:`${i}-${u}`,children:s.label})]},s.value))})}function tf(){const[e,t]=te.width(),[n,r]=te.height(),[o,i]=te.isSimpleSizes(),{screenOptions:a}=xe,[l]=Tc(),s=l?d(kt,{style:{marginRight:"-9px"},options:a,value:`${e},${n}`,onChange:u=>{const[c,f]=u.split(",");t(parseInt(c)),r(parseInt(f))}}):k(w.Fragment,{children:[d("button",{onClick:()=>{i(!o)},children:o?"Show all sizes":"Show only simple sizes"}),d(JV,{options:a,selected:[e,n].join(),onChange:u=>{const[c,f]=u.split(",");t(parseInt(c)),r(parseInt(f))}})]});return k("div",{children:[d(Mg,{}),s,d(xt,{el:tf,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."})]})}tf.fName="ScreenSwitcher";const QV=e=>{const{name:t,serverTheme:n,activeThemeRef:r,deleteTheme:o}=e,{modifiedServerVersion:i}=xe,[a,l]=te.fileName(),s=gn(),u=a===t;return k("li",{ref:u?r:null,className:"server-theme "+(u?"server-theme-current":""),children:[t," ",u&&i&&"(*)",t!=="default"&&d("button",{style:{float:"right"},onClick:()=>tt(Be,null,function*(){confirm(`Remove theme "${t}" from server?`)&&o(t)}),children:"Delete"}),d("button",{style:{float:"right"},onClick:()=>{!u&&l(t),s({type:Me.loadTheme,payload:{theme:n}})},children:u?"Reset":"Switch"}),Object.keys(n).length>0&&k("span",{style:{float:"right"},children:["(",Object.keys(n).length,")"]})]},t)},Rg=()=>{const e=w.useRef(),[t,{serverThemesLoading:n,deleteTheme:r}]=te.serverThemes(),[o,i]=be("theme-server-theme-height-list","140px");return n?d("div",{style:{height:o},children:"Loading server themes..."}):k(w.Fragment,{children:[d("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])=>d(QV,{name:a,serverTheme:l,activeThemeRef:e,deleteTheme:r},a))}),d(xt,{el:Rg,children:"Here are all your saved themes."})]})};function nf(){const[e,t]=te.frameClickBehavior(),n=e==="alt";return k("div",{children:[d(xt,{el:nf,children:"Toggle whether a normal click performs an inspection and blocks default click behavior."}),d("button",{title:n?`Clicks are processed by the page and should result in normal responses. +)`}function pb(e){const{scope:t,selector:n,highLightMatch:r,position:o,property:i,isLocal:a,hideIfNotFound:l}=e,s=a?u5(t,n):n;return s?k("li",{style:r?s5:{},children:[!!o&&d(Bu,V({},o)),d(co,{label:n,selector:s,initialized:!0,showLabel:!0,property:i,hideIfNotFound:l})]},n):k("li",{children:[!!o&&d(Bu,V({},o)),d("code",{children:n}),";a"]},n)}const c5=({usages:e,maxSpecificSelector:t,winningSelector:n,scope:r=":root"})=>{const[o,i]=be("use local scope selectors",!0),[a,l]=be("hide not found usages",!0),[s,u]=w.useState({}),c={},f=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(w.Fragment,{children:[!p&&d(Ce,{controls:[o,i],title:r,children:"In local scope"}),d(Ce,{controls:[a,l],title:r,children:"Only on this page"}),d("ul",{children:f.map(({property:h,selector:g,position:y})=>{const C=Pg(g),m=e.length>1&&g===t;return C.length>1?k("li",{style:{border:"1px solid gray"},children:[!!y&&d(Bu,V({},y)),d("h4",{style:m?s5:{},onClick:()=>u(ae(V({},s),{[g]:!s[g]})),children:d("div",{className:"monospace-code",style:{backgroundColor:"#d0d7de"},children:g.replaceAll(/\s*\,\s*/g,`, +`).trim().substring(0,100)})}),!s[g]&&d("ul",{style:{marginLeft:"16px"},children:C.map(v=>d(pb,{scope:r,selector:v,highLightMatch:m,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${v}`))})]},g):d(pb,{scope:r,selector:g,highLightMatch:m,position:y,property:h,isLocal:o,hideIfNotFound:a},`${o?"l":"g"}~${g}`)})})]})};function f5(e){const{references:t,excludedVarName:n}=e,[r,o]=w.useState(!0);return t.length===0?null:k("div",{style:{marginLeft:"24px",marginTop:"8px"},children:[d(Ce,{title:"Show only elements that were found on the page ",controls:[r,o],children:"Filter found"}),d("ul",{style:{marginTop:"0"},children:t.map(([{name:i,usages:a},l])=>i===n?null:k(w.Fragment,{children:[d("h5",{style:{marginTop:"8px"},children:d(_r,{name:i})}),l.map(s=>{const u=a.reduce((f,p)=>f+","+p.selector,"").replace(/^,/,""),c=u5(s,u);return k("li",{style:{borderBottom:"1px solid gray"},children:[s!==":root"&&d("code",{style:{marginTop:"4px"},className:"monospace-code",children:s}),d("div",{draggable:!0,onDragStart:Vt(()=>`var(${i})`)}),d(co,{label:u,hideIfNotFound:r,initialized:!0,selector:c})]},i)})]}))})]})}const XU=[":root",":where(html)","html"],hb=20;function qU(e){const{themeEditor:{scopes:t}}=xe,n=t[Lt]||{},{value:r,onChange:o,elementScopes:i=[]}=e,[a,l]=w.useState(""),[s,u]=w.useState(""),[c,f]=w.useState(!0),p=w.useRef();w.useEffect(()=>{var F;return(F=p.current)==null?void 0:F.scrollIntoView({block:"nearest"})},[r]);const h=w.useMemo(()=>{const F=Object.entries(pt).reduce((A,[D,O])=>{if(i.some(T=>T.selector===D)||c&&XU.includes(D))for(const T in O)A[T]=O[T];return A},{}),_=V(V({},F),n);return Object.entries(_).filter(([A,D])=>typeof D!="undefined"&&D!==""&&(!a||new RegExp(a.replaceAll(" ","(\\-\\-?| )")).test(A))&&(!s||new RegExp(s.replaceAll(" ","(\\-\\-?| )")).test(D)))},[a,s,n,c]),[g,y]=w.useState(!1),C=g?null:h.findIndex(([F])=>`var(${F})`===r),m=g?null:C-hb,v=g?null:C+hb,b=performance.now();return k("div",{onClick:F=>F.stopPropagation(),style:{},children:[d(Ce,{controls:[c,f],children:"Global values"}),k("div",{style:{display:"flex",width:"100%"},children:[d(Ve,{placeholder:`Filter name ${h.length}`,value:a,onChange:l}),d(Ve,{placeholder:`Filter value ${h.length}`,value:s,onChange:u})]}),d("ul",{style:{maxHeight:"50vh",background:"white",overflowY:"scroll"},onScroll:()=>{performance.now()-b>200&&y(!0)},children:h.map(([F,_],A)=>{if(!g&&(Av))return;const D=`var(${F})`,O=D===r,T=k(w.Fragment,{children:[k("span",{style:{display:"flex",justifyContent:"space-between",flexGrow:1},children:[d(_r,{name:F,style:{fontWeight:600}}),!/url\(|gradient\(/.test(_)&&d("span",{style:{maxWidth:"30%"},children:_})]}),d("span",{draggable:!0,onDragStart:Vt(D),title:_,style:{width:Fi,height:Fi,border:"1px solid black",borderRadius:"6px",background:`no-repeat left top/ cover ${_}`,float:"right",textShadow:"white 0px 10px"},children:/var\(/.test(_)&&"var"},F)]});return d("li",{ref:O?p:null,children:d("button",{onClick:()=>{!O&&o(D)},style:{display:"flex",justifyContent:"space-between",width:"100%",border:O?"4px solid black":"1px solid black"},children:T})},F)})})]})}function JU({media:e}){return d("div",{children:d("b",{className:"monospace-code",style:{fontSize:"14px",background:"#ebe9fb"},children:e})})}const Rt=w.memo(function(l){var s=l,{controls:[t,n],style:r,dispatchArgs:o=[],children:i}=s,a=mn(s,["controls","style","dispatchArgs","children"]);return d("button",ae(V({},a),{title:t?"Hide":"Show",onClick:()=>n(!t,...o),style:ae(V({},r),{border:t?"4px solid black":"1px solid black"}),children:i}))},OS);function d5(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 QU=e=>e.charAt(0).toUpperCase()+e.slice(1),ZU=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,"-")]},gb=e=>e.preventDefault(),_r=({name:e,style:t})=>{const{annoyingPrefix:n,nameReplacements:r}=xe,[o,i]=ZU(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:f})=>{try{return u.replace(new RegExp(c),f)}catch(p){return console.log(`Failed replacing ${c} to ${f}`),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:Vt(`var(${e})`),style:t,children:[d("span",{style:{fontSize:"13px",fontStyle:"italic",color:"black",display:"block"},children:QU(n?s:o)}),d("span",{className:"var-control-property",children:a})]})},Mu=({value:e,resolvedValue:t=e,cssVar:n,isDefault:r,referencedVariable:o,isOpen:i,group:a})=>{var g;const l=Fi,s=`${e}${r?" (default)":""}`,u=/url\(/.test(t),f=Bl(n)||Eu.test(t)||ol.test(t)||u;if(t&&f&&t!=="currentcolor")return k(w.Fragment,{children:[k("span",{className:"var-preview",draggable:!0,onDragStart:Vt(t),title:s,style:{width:l,height:l,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&&d(_r,{name:o.name}),!o&&(u?null:e)]})]});if(o&&i)return null;const p=t.startsWith('"')||t.startsWith("'")||t.startsWith("attr("),h=p?t.replaceAll('" "',`" +"`):e;return d("span",{className:"var-preview",draggable:!0,onDragStart:Vt(e),title:s,style:{fontSize:"14px",float:"right",fontFamily:p?(g=a==null?void 0:a.computedStyles)==null?void 0:g.fontFamily:null,whiteSpace:"pre-wrap"},children:o?d(_r,{name:o.name}):h},1)};function p5(e,t){var n;if(!e)return null;for(const{selector:r}of e)if((n=pt[r])!=null&&n.hasOwnProperty(t.name))return pt[r][t.name];return null}function eV(e,t){return[...e,t].map(n=>n.name).join()}const h5={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"},tV=20;function Og(e="",t,n,r=0,o={},i={}){if(r>tV)return["<>"];const a=[];let l;for(;l=e.indexOf("var(--"),l!==-1;){const s=l+3,u=Nr(e,s),c=e.slice(s+1,u).trim(),f=c.indexOf(","),p=f===-1,h=p?c:c.slice(0,f).trim(),g=o[h]||i[h];let y;for(const{selector:v}of t||[]){if(h in(n[v]||{})){y=n[v][h];break}if(h in(pt[v]||{})){y=pt[v][h];break}}if(g!==void 0&&(y=g),!y){if(p)return[e,a,`<>`];y=c.slice(f+1).trim()}r===0&&!a.includes(h)&&a.push(h);const[C,,m]=Og(y,t,n,r+1,o,i);if(m)return console.log(m),[e,a,m];e=e.slice(0,l)+C+e.slice(u+1)}return[e,a]}const Vi=e=>{var _e;const{cssVar:t,onChange:n,onUnset:r,referenceChain:o=[],scopes:i,parentVar:a,currentScope:l=Lt,element:s,group:u}=e,{width:c,showCssProperties:f,linkCssProperties:p}=xe,[{scopes:h},g]=te.themeEditor(),[y,C]=te.pickedValue(),{defaultValues:m,allVars:v}=w.useContext(qe),b=h[Lt]||{},{name:F,usages:_,maxSpecific:A,positions:D,properties:O}=t,T=new Set(_.map(he=>he.selector)).size,L=(u==null?void 0:u.inlineStyles[F])||(u==null?void 0:u.inheritedInlineStyles[F]),Q=!!L,B=Q?()=>{}:n,G=L||pt[l][F]||p5(i,t)||m[F]||((_e=t.maxSpecific)==null?void 0:_e.defaultValue)||t.usages[0].defaultValue,[fe,me]=w.useState(!1),ie=(!h||!h[l]?null:h[l][F])||G,z=ie===G,{media:Z}=A||{};let[U,le]=Og(ie,i,h,0,u==null?void 0:u.inlineStyles,u==null?void 0:u.inheritedInlineStyles);const[R,K]=w.useMemo(()=>{var De,gt;const he=ie==null?void 0:ie.match(/^var\(\s*(\-\-[\w-]+)\s*[\,\)]/),Ae=!he||he.length===0?null:v.find(St=>St.name===he[1])||{name:he[1],usages:[{property:((De=t.maxSpecific)==null?void 0:De.defaultValue)||t.usages[0].property,isFake:!0}],properties:{},positions:[]};if(!Ae)return[];const re=(gt=i==null?void 0:i.find(St=>St.scopeVars.some(on=>on.name===he[1])))==null?void 0:gt.selector;return[Ae,re]},[ie]),X=w.useMemo(()=>{const{overridingMedia:he}=t.allVar||t;return(!Z||zU(Z,V({width:c},h5)))&&(!he||!l5({media:Z,cssVar:t,width:c}))},[c]);let ne=o.length;const P=eV(o,t),Y=a==null?void 0:a.name,[M,de]=Tn(`open_${P}`,ne>0&&!!R),ue=()=>de(!M),[pe,se]=Tn(`showSelectors_${P}`,!1),[S,$]=Tn(`showRefs_${P}`,!1),[E,N]=Tn(`showPicker_${P}`,!1),I=w.useMemo(()=>{if(!M)return[];if(!F.startsWith("--"))return[];const he=new RegExp(`var\\(\\s*${F.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),Ae=new Map;for(const[re,De]of Object.entries(h))for(const[gt,St]of Object.entries(De))he.test(St)&&Ae.set(gt,[...Ae.get(gt)||[],re]);for(const[re,De]of Object.entries(pt)){const gt=re in h;for(const[St,on]of Object.entries(De))gt&&h[re].hasOwnProperty(St)||he.test(on)&&Ae.set(St,[...Ae.get(St)||[],re])}return[...Ae.entries()].map(([re,De])=>[v.find(gt=>gt.name===re)||{name:re,usages:[]},De])},[h,M]),j=t.cssFunc;if(ne>20)return null;const ce=F in b||F in(h[l]||{}),ve=I.length-(Y?1:0);return k("li",{onDragEnter:t.isRawValue?null:gb,onDragOver:t.isRawValue?null:gb,onDrop:he=>{if(t.isRawValue)return;const Ae=he.dataTransfer.getData("value");new RegExp(`var\\(\\s*${t.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`).test(Ae)||(Ae&&B(Ae),he.stopPropagation())},"data-nesting-level":ne,className:Qp("var-control",{"var-control-in-theme":ce,"var-control-no-match-screen":!X}),onClick:()=>{if(y&&y!==ie){B(y);return}(y===""||y===ie)&&(M||ue())},style:{position:"relative",listStyleType:"none",fontSize:"15px",clear:"both",cursor:M?"auto":"pointer",paddingTop:0},children:[!X&&d(YU,{cssVar:t,media:Z,element:s}),k("div",ae(V({},d5(he=>{C(ie)})),{style:{paddingTop:6},onClick:()=>{M&&ue()},children:[k("h5",{draggable:!0,onDragStart:Vt(()=>`var(${F})`),style:{display:"inline-block",fontSize:"16px",padding:"0 4px 0",fontWeight:"400",userSelect:"none",cursor:"pointer",clear:"left"},children:[d(_r,{style:{fontWeight:o.length===0?"bold":"normal"},name:F}),Q&&d("span",{style:{color:"red"},children:"inline"})]}),d(Mu,{value:ie,resolvedValue:U,cssVar:t,isDefault:z,referencedVariable:R,isOpen:M,group:u})]})),k("div",{children:[Z&&d(JU,{media:Z}),!!f&&k(w.Fragment,{children:[!!j&&d("span",{style:{color:"darkcyan"},children:j}),Object.entries(O).map(([he,{isFullProperty:Ae,fullValue:re,isImportant:De}])=>{const gt=he===(A==null?void 0:A.property),St=k("span",{className:"monospace-code",style:V({fontSize:"14px"},gt?{}:{background:"grey"}),title:Ae?"":re,children:[he,gt&&t.states&&!t.pseudos&&d("b",{style:{color:"purple"},children:t.states}),gt&&t.pseudos&&d("a",{target:"_blank",href:p?`https://developer.mozilla.org/en-US/docs/Web/CSS/${t.pseudos}`:null,children:d("b",{style:{color:"indigo"},children:t.pseudos})}),!Ae&&d("b",{style:{color:"red"},children:"*"}),!!De&&d("b",{style:{fontWeight:"bold",color:"darkorange"},children:"!important"})]},he);return p?d("a",{target:"_blank",href:`https://developer.mozilla.org/en-US/docs/Web/CSS/${he.replace(/^-webkit-/,"")}`,style:{cursor:"help"},children:St},he):St})]})]}),!!D[0]&&d(Bu,V({},D[0]||{})),M&&k(w.Fragment,{children:[ve>0&&k("div",{children:[k(Rt,{controls:[S,$],children:[ve,ne>0&&" more"," links"]}),S&&d(f5,{references:I,excludedVarName:Y})]}),k("div",{style:{display:"flex",clear:"both",justifyContent:"flex-end"},children:[z&&!t.isRawValue&&d("span",{style:{margin:"6px 6px 0",color:"grey"},children:"default"}),ce&&G!==null&&d("button",{title:`Remove from current theme? The value from the default theme will be used, which is currently: "${G}"`,onClick:()=>{r()},children:"Revert"}),R&&d("button",{style:{borderWidth:fe?"4px":"1px"},onClick:()=>{me(!fe)},children:"Raw"}),/^--/.test(t.name)&&d("button",{style:{borderWidth:E?"4px":"1px"},onClick:he=>{N(!E),he.stopPropagation()},children:"Link"}),!_[0].isFake&&k(Rt,{controls:[pe,se],children:["Rules (",T,")"]})]}),E&&d(qU,{value:ie,elementScopes:i,onChange:he=>{B(he)}}),pe&&!_[0].isFake&&k(w.Fragment,{children:[d("div",{children:F}),d(c5,{usages:_,maxSpecificSelector:A==null?void 0:A.selector,winningSelector:A==null?void 0:A.winningSelector,scope:l})]}),(!R||fe)&&!E&&d("div",{children:d(LU,{cssVar:t,value:ie,resolvedValue:U,referencedVars:le,onChange:B,cssFunc:j,elementScopes:i})}),!F.startsWith("--")&&Tg(F)&&d(o5,{disabled:!0,value:ie,resolvedValue:U,referencedVars:le,onChange:()=>{},elementScopes:i}),!!R&&!fe&&k("ul",{style:{margin:0},children:[d("span",{className:"monospace-code",children:K}),w.createElement(Vi,{scopes:i,currentScope:K,cssVar:R,onChange:he=>{g({type:Me.set,payload:{name:R.name,value:he,scope:K}})},onUnset:()=>{g({type:Me.unset,payload:{name:R.name,scope:K}})},key:R.name,referenceChain:[...o,t],parentVar:t})]})]})]},F)};function g5(e){const{path:t}=e,[n,r]=w.useState(!1),{frameRef:o}=w.useContext(qe);return d("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 ms=18;function nV({label:e}){const[t,...n]=e.replace(/\s*\(\d\/\d\)$/,"").split(".").map(i=>i.trim()),[r,o]=w.useState(!1);return k(w.Fragment,{children:[d(Ce,{controls:[r,o],children:d("div",{children:r?d("span",{children:"close"}):e})}),r&&k(w.Fragment,{children:[d(co,{selector:t,initialized:!0,showLabel:!0}),n.map(i=>d(co,{selector:`.${i}`,initialized:!0,showLabel:!0}))]})]})}function ir({children:e}){return d("span",{style:{filter:"grayscale(1)",fontSize:"1.5rem",minWidth:"2rem",display:"inline-block",textAlign:"center"},children:e})}const m5={uiLayout:d(ir,{children:"💻"}),inspectedPath:d(ir,{children:"🔍"}),themeEditor:d(ir,{children:"🖌"}),scales:d(ir,{children:"🔬"}),width:d(ir,{children:"↔"}),height:d(ir,{children:"↕"}),search:d(ir,{children:"🕵️"}),note:d(ir,{children:"🗨"})},rV={openGroups:({action:e})=>{const t=Object.keys(e);return t.length===0?"No open groups":d("div",{className:"history-open-groups",children:t.reverse().map(n=>d(w.Fragment,{children:d("pre",{className:"monospace-code",style:{fontSize:"10px",display:"inline-block"},children:d(nV,{label:n})},n)}))})},inspectedPath:({action:e,historyIndex:t})=>{const{frameRef:n}=w.useContext(qe),{historyOffset:r,past:o}=w.useContext(Ze),i=tf<=t)||[]:[],u=s?d("a",{href:s,children:s.replace(/http:\/\/|https:\/\//,"")}):null;if(!a)return u||"...";const c=l&&s!==window.location.href;return k(w.Fragment,{children:[d(g5,{path:e}),d("pre",{className:"monospace-code",children:a==null?void 0:a.label}),c&&u]})},themeEditor:{set:({payload:{scope:e,name:t,value:n,alternatives:r}})=>k(w.Fragment,{children:[e&&d("pre",{className:"monospace-code",style:{maxHeight:"120px"},children:e}),d("br",{}),d("b",{draggable:!0,onDragStart:Vt(`var(${t})`),children:d(_r,{name:t})})," ",d("br",{}),k("span",{draggable:!0,onDragStart:Vt(n),children:[(Eu.test(n)||ol.test(n)||/var\(/.test(n))&&d("span",{style:{width:ms,height:ms,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):"," ",d(yt,{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(w.Fragment,{children:[e&&d("pre",{className:"monospace-code",style:{maxHeight:"120px"},children:e}),d("br",{}),d("b",{children:d(_r,{name:t})})," = default"]}),createAlias:({payload:{name:e,value:t,generatedName:n}})=>k("span",{draggable:!0,onDragStart:Vt(`var(${n})`),children:["Alias",d("br",{}),(Eu.test(t)||ol.test(t)||/var\(/.test(t))&&d("span",{style:{width:ms,height:ms,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:[d(_r,{name:n})," = ",t]})]})}},oV=!!document.startViewTransition,fo=oV?e=>document.startViewTransition(e):e=>e();function iV(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length-t,r=n<1;return d("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:()=>fo(()=>SS()),children:"←"})}function aV(){const{historyOffset:e}=w.useContext(Ze),t=e===0;return d("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:()=>fo(()=>ES()),children:"→"})}function lV(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length-t,r=n<1;return d("button",{className:"history-button",disabled:r,title:r?"No history":n,onClick:FS,children:"!←"})}function sV(){const{historyOffset:e}=w.useContext(Ze),t=e===0;return d("button",{className:"history-button",disabled:t,title:t?"No future":e,onClick:kS,children:"→!"})}function uV({amount:e}){const t=[];for(let n=0;nd("span",{onDragEnter:()=>{mg(e-n-1)},style:{height:"6px",borderLeft:"1px solid #646262"}},n))})}const cV=k(Ct,{el:Bg,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.",d("h1",{children:"Warning!"}),d("p",{children:"This will restore the UI state across the whole screen, which definitely is a concern for people with epilepsy."}),d("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."}),d("p",{children:"It's recommended to only use it when controlled, small nudges of the wheel are possible."}),d("p",{children:"Keeping some state pinned can help reduce the amount of changes happening in rapid succession."})]});function v5(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);mg(e-i)}function fV(e,t,n){var r;n.pressure>.01&&((r=t.current)!=null&&r.matches(":hover"))&&v5(e,n)}function Bg(){const{past:e,historyOffset:t}=w.useContext(Ze),n=e.length===0?0:100-100*t/e.length,r=w.useRef(null);return k("div",{ref:r,className:"minitimeline",onPointerMove:fV.bind(null,e.length,r),onClick:v5.bind(null,e.length),style:{width:"100%",height:"8px",padding:"2px",background:"darkgrey",boxSizing:"border-box",userSelect:"none",touchAction:"none"},children:[d("div",{style:{width:`${n}%`,height:"6px",background:"rgb(26, 217, 210)",borderRight:"3px solid black",transition:"width .06s ease-out",boxSizing:"border-box"}}),d(uV,{amount:e.length+1}),cV]})}function y5({id:e}){if(e!=="themeEditor")return d("button",{title:"Clear all other values and move this one to start",onClick:_H.bind(null,e),children:"Clear others"})}function Mg(){const{pins:e}=w.useContext(Ze),[t,n]=w.useState(!1),r=e.size;return k(w.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(Ct,{el:Mg,children:[d("p",{children:"This button shows how many pins are applied and allows you to toggle each."}),d("p",{children:"Notice how the timeline now jumps over the entries we pinned earlier."})]})]}),t&&d(dV,{close:()=>n(!1)})]})}function dV({close:e}){const{pins:t,past:n,historyOffset:r,states:o}=w.useContext(Ze),[i]=w.useState(new Map(t)),a=[...i.entries()],l=w.useRef();let s=0;return w.useEffect(()=>{const u=c=>{l.current.parentNode.contains(c.target)||e()};return document.addEventListener("click",u),()=>{document.removeEventListener("click",u)}},[]),d("ul",{ref:l,style:{zIndex:100,position:"absolute",background:"white",border:"1px solid black"},children:a.map(([u,c])=>{const f=t.has(u),p=()=>Ui(u,c),h=()=>kl(u),g=c{mg(C),m.stopPropagation()},children:"visit"})]})})})}function b5(e){if(e.target.closest("#drawer"))return;const t=Math.round(e.deltaY/100);t>0?gg(t,!0):Oa(-t,!0)}function Jc(){const[e,t]=te.visualizeHistory(),[n,r]=te.visualizeHistoryAlways();return k("div",{onWheelCapture:b5,children:[d(Bg,{}),d(Mg,{}),d(Ce,{controls:[e,t],children:"Visualize"}),e&&d(Ce,{title:"Always or only when in a previous state",controls:[n,r],children:"Always"}),d("button",{onClick:()=>{confirm("Clear all history, keeping only current state?")&&GH()},children:"Clear"}),k("div",{style:{display:"inline-flex"},children:[d(lV,{}),d(iV,{}),d(aV,{}),d(sV,{})]}),k(Ct,{el:Jc,children:[d("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."}),d("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.`})]})]})}Jc.fName="HistoryControls";function Qc(){const{lastAlternate:e,historyOffset:t,past:n,lastAlternateIndex:r,savedStashes:o}=w.useContext(Ze),i=n.length-t-r,a=e.length===0,l=a?d(w.Fragment,{children:"Stash"}):k(w.Fragment,{children:[e.length," steps stashed ",d("br",{}),i," steps since"]}),s=w.useMemo(()=>JSON.stringify(e.map(u=>[...u.entries()].map(([c])=>c)),null,2),[e]);return k(w.Fragment,{children:[k("div",{className:"flex-row",children:[d("button",{title:`Apply/create stash: +`+s,onClick:AS,style:{textAlign:"left",background:`rgba(26, 217, 210, ${Math.min(e.length/50,1)})`},disabled:a&&t===0,children:l}),!a&&d(pV,{}),o.length>0&&d("span",{children:" Saved: "}),o.map(([u,c],f)=>k(w.Fragment,{children:[k("button",{title:`Apply/create stash: +`+JSON.stringify(c.map(p=>p.entries())),onClick:zH.bind(null,f),style:{background:`rgba(26, 217, 210, ${Math.min(c.length/50,1)})`},children:[c.length," steps",d("br",{}),n.length-t-u," steps since"]}),d("button",{onClick:()=>{confirm("Permanently delete stash?")&&wS(f)},style:{textAlign:"left"},children:"clear"})]}))]}),d(Ct,{el:Qc,tasks:[()=>{const{pins:u}=w.useContext(Ze);return["Remove all pins",u.size===0]},()=>{const{historyOffset:u}=w.useContext(Ze);return["Navigate back",u!==0||!a]},()=>["Add future actions to the stash",!a]],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 pV(){return d("button",{onClick:jH,children:"Clear"})}Qc.fName="HistoryStash";function hV(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}function gV({containerRef:e,id:t}){const{past:{length:n}}=w.useContext(Ze),[r,o]=Tn(`areaOffset#${t}`,[0,n]),[i,a]=r.length?r:[r,0];w.useEffect(()=>{a===n&&e.current.scrollTo({top:i,left:0})},[]),w.useEffect(()=>{const l=performance.now(),s=u=>{if(performance.now()-l<500)return;const c=u.currentTarget.scrollTop,f=c<10?0:Math.floor(c);o([f,n],{skipHistory:!0,appendOnly:!0})};return hV(e.current,"scroll",s)},[])}function mV({containerRef:e,id:t}){const[n]=Tn(`areaOffset#${t}`,[0]),[r]=n.length?n:[n];w.useEffect(()=>{var i;(i=e.current)==null||i.scrollTo({top:r,left:0});const o=setTimeout(()=>{var a;(a=e.current)==null||a.scrollTo({top:r,left:0})},500);return()=>{clearTimeout(o)}},[r])}let w5;function vV(e){return w5=e}function yV(e){const{historyOffset:t}=w.useContext(Ze);return w5===e.id||e.id==="drawer"?null:t===0?d(gV,V({},e)):d(mV,V({},e))}function lr(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}=w.useContext(ko),c=i===e,f=w.useRef();return u.current[e]||(u.current[e]=f),k("div",ae(V({style:{position:"relative"}},n),{id:e,ref:f,className:"area",children:[d(yV,{id:e,containerRef:f}),!!t&&w.Children.map(t,(p,h)=>d(rG,{homeAreaId:e,element:p,index:h})),d("div",{className:"area-dropzone"+(c?" drag-hovered":""),style:{order:1e3,background:"rgba(167,238,227,0.22)",outline:"2px dashed grey",outlineOffset:"-8px"},onDragEnter:w.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:w.useCallback(()=>{s.current.area&&(clearTimeout(s.current.area),s.current.area=null),s.current.area=setTimeout(()=>{s.current.lastEntered===e&&a(null)},PS)},[])})]}))}function bV(){const{hostAreaId:e,homeAreaId:t}=w.useContext(ki),n=e||t;w.useEffect(()=>{vV(n)},[n])}function mb(e){return e?typeof e.type=="function"?e.type.name:e.type:""}const x5=[()=>{const{pins:e}=w.useContext(Ze);return["Pin the screen width and height.",e.has("width")&&e.has("height")]}];function C5(){return k(w.Fragment,{children:[d("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."}),d("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."}),d("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 wV(e){const{id:t,historyIndex:n}=e,{pins:r,historyOffset:o,past:i}=w.useContext(Ze),a=r.get(t),l=n===a;return a>i.length-o,d(w.Fragment,{children:d("button",{className:l?"pinned-here":"",style:{outline:l?"2px solid black":"none",background:l?"white":"transparent"},onClick:s=>{l?kl(t):Ui(t,n),s.stopPropagation()},children:d("span",{className:"pin",children:"📌"})})})}function xV(e){const{id:t}=e,{pins:n}=w.useContext(Ze),r=vS(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?()=>{kl(t)}:()=>{PH(t)},title:"Pin to latest",children:[d("span",{className:"pin",children:"📌"}),"→"]})}function CV(e){const{id:t,historyIndex:n}=e,{pins:r}=w.useContext(Ze);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?()=>{kl(t)}:()=>{TH(t)},title:"Pin to initial",children:["←",d("span",{className:"pin",children:"📌"})]})}function SV({id:e}){const[t,n]=w.useState(!1);return k("div",{style:{position:"relative"},children:[d(Rt,{controls:[t,n],children:"..."}),t&&d("div",{style:{position:"absolute",top:"100%"},children:d(y5,{id:e})})]})}function sh(e){const{showScrolls:t}=xe,{actions:n,showPayloads:r,historyIndex:o}=e,{previewComponents:i,pins:a}=w.useContext(Ze);return d("ul",{className:"history-actions",children:[...n].map(([l,s],u)=>{if(!t&&l.startsWith("areaOffset"))return;const c=typeof s=="object";if(s===null)return d("span",{style:{color:"red"},children:"IT IS NULL"});const f=c&&"type"in s,p=f?JSON.stringify(s.payload,null,2):c?JSON.stringify(s,null,2):s,h=f?"::"+mb(s):"",g=p==="{}",y=!f&&(typeof p=="boolean"||typeof p=="number"||(p==null?void 0:p.length)<320),C=i[l],m=typeof C=="function"?C:l in i?i[l][mb(s)]:null,v=a.has(l),b=v&&a.get(l)!==o,F=m5[l]||"";return k("li",{title:b?"Overridden by pin":"",style:{clear:"both",opacity:b?.5:1},children:[d(wV,{id:l,historyIndex:o}),d(xV,{id:l,historyIndex:o}),d(CV,{id:l,historyIndex:o}),v&&d("span",{style:{float:"right"},children:d(SV,{id:l})}),F,!m&&k("span",{children:[d("b",{children:l}),h]}),!m&&y&&d("pre",{style:{margin:0,float:"right"},className:"monospace-code",children:p===!1?"false":p===!0?"true":p}),!g&&r&&d("pre",{className:"monospace-code",children:p===!1?"false":p===!0?"true":p}),m&&d(m,{action:s,historyIndex:o,payload:s.payload})]},`${o}:${u}`)})})}const EV=k(Ct,{el:Ml,tasks:x5,children:[d(C5,{}),"Since history visualization is disabled, this only shows current history entry."]});function FV(){const{past:e,historyOffset:t,lastActions:n,initialStates:r}=w.useContext(Ze),[o,i]=w.useState(!1),a=e.length-t,s=t===0?n:e[a].lastActions,u=a===0,c=u&&o?[...r.entries()].filter(([f])=>f in te):[...s.entries()];return k("div",{onWheelCapture:b5,style:{minWidth:"280px",maxWidth:"400px",minHeight:"240px",overflow:"hidden visible"},children:[EV,u&&d(Ce,{controls:[o,i],children:"Show all initial values"}),d(sh,{historyIndex:a,actions:c})]})}function Ml(){const[e,t]=te.visualizeHistoryAlways(),[n,r]=w.useState(!1),[o,i]=be("showAllHistory",!0),[a,l]=w.useState(!1),[s,u]=w.useState(!1),{past:c,historyOffset:f,lastActions:p,pointedStates:h,pins:g}=w.useContext(Ze),y=xe.visualizeHistory&&(e||f!==0);let C=w.useRef();if(w.useEffect(()=>{var b;(b=C.current)==null||b.scrollIntoView({block:"nearest"})},[f]),!y)return d(FV,{});const m=c.length-f;let v=!1;return k("div",{className:"history",children:[k(Ct,{el:Ml,tasks:x5,children:[d(C5,{}),"See all steps you took here."]}),d(bV,{}),d(Ce,{controls:[o,i],children:"Show all"}),d(BS,{hook:te.showScrolls,children:"Include scroll position"}),d(Ce,{controls:[n,r],children:"Debug"}),n&&k("div",{children:[d(Ce,{controls:[a,l],children:"Inspect current state"}),d(Ce,{controls:[s,u],children:"Show payloads"}),d("button",{onClick:()=>console.log(h),children:"console.log"}),d("button",{onClick:BH,children:"export"}),a&&d("pre",{className:"monospace-code",children:JSON.stringify(Object.fromEntries(h),null,2)})]}),k("ul",{className:"connected-list",children:[c.map(({states:b,lastActions:F},_)=>{const A=_===m;v=v||A;const D=Math.abs(_-m),O=[...F.entries()].some(([T,L])=>typeof L=="object"||b.get(T)!==h.get(T));if(!A&&!o&&_!==0&&!hg(F)){const T=[...F.keys()];if(!T.some(Q=>g.has(Q)&&g.get(Q)===_)&&!T.some(Q=>pg.includes(Q)))return null}return k("li",{id:A?"history-current-state":"",ref:_===m?C:null,style:{position:"relative",outline:_===m?"3px solid black":"none"},children:[d("span",{style:{marginLeft:"-32px"},children:_}),d(sh,{historyIndex:_,actions:[...F.entries()],showPayloads:s}),k("div",{className:"history-state-buttons",style:{display:"flex",justifyContent:"stretch"},children:[d("button",{style:{width:"50%"},onClick:A?()=>{t(!0),Oa(f)}:v?()=>{Oa(D)}:()=>{gg(D)},children:A?"jump to end":"jump here"}),O&&d("button",{style:{width:"50%"},onClick:T=>{for(const[L,Q]of F.entries())Pc(L,Q);T.preventDefault(),T.stopPropagation()},children:"do again"})]})]},_)}),k("li",{onClick:v?()=>{Oa(f)}:null,style:{outline:f===0?"3px solid black":"none"},children:[d("span",{style:{marginLeft:"-32px"},children:"Latest"}),d(sh,{historyIndex:c.length,actions:[...p.entries()],showPayloads:s})]},"latest")]})]})}Ml.fName="HistoryVisualization";function S5(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 kV=(e,t)=>{if(!t)return e;const n=t.replace(/^\!/,""),r=n.length!==t.length;try{return e.map(o=>ae(V({},o),{vars:o.vars.filter(i=>{const a=S5(i,n);return r?!a:a})}))}catch(o){return e}};function AV(e,t){return t.length===0?e:e.map(n=>ae(V({},n),{vars:n.vars.filter(r=>t.some(i=>r.maxSpecific.selector.includes(i)))}))}function $V(e){const t=gn(),{group:n,elementScopes:r}=e,o=Object.entries(n.inlineStyles);return o.length===0?null:k("div",{children:[d("h5",{style:{color:"red"},children:"Inline styles"}),d("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 w.createElement(Vi,{group:n,key:u.name,cssVar:u,scopes:r,onChange:c=>{t({type:Me.set,payload:{name:u.name,value:c}})},onUnset:()=>{t({type:Me.unset,payload:{name:u.name}})}})}return d("li",{children:k("span",{className:"monospace-code",children:[i,": ",a]})},i)})})]})}function _V(e){const{scopes:t,vars:n,element:r,group:o}=e,i=gn(),[a,l]=be("show-scope-locators",!1);if(t.length===0)return null;const s=[];return k("div",{style:{background:"lightyellow",marginBottom:"24px",padding:"4px",border:"1px solid black"},children:[d(Ce,{controls:[a,l],style:{float:"right"},children:"Find on page"}),d("ul",{children:t.map(({selector:u,matchingSelector:c,scopeVars:f})=>{const p=u.split();s.push(...f);const h=n.filter(g=>g.currentScope===u);return h.length===0?null:k("li",{children:[d("span",{style:{border:"1px solid gray"},className:"monospace-code",children:p.map(g=>g===c?d("b",{children:g},"selector"):g)}),a&&!u.includes(":root")&&!u.includes(":where(html)")&&d(co,{selector:u,initialized:!0,showLabel:!1}),d("ul",{style:{marginBottom:"24px"},children:h.map(g=>w.createElement(Vi,{cssVar:g,scopes:t,currentScope:u,element:r,group:o,key:g.name,onChange:y=>{i({type:Me.set,payload:{name:g.name,value:y,scope:u}})},onUnset:()=>{i({type:Me.unset,payload:{name:g.name,scope:u}})}}))})]},u)})})]})}const DV=({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}),PV=e=>typeof e=="string"?e:e.src,TV=(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},Od=(e,t)=>{const n=Math.round(e/t)*t;return Math.min(n,255)},Bd=new Map,OV=e=>Bd.has(e)?Promise.resolve(Bd.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"});Bd.set(e,a),t(a)},i.onerror=a=>(console.log(a),n(Error("Image loading failed."))),i.crossOrigin="",i.src=e}),BV=(e,t)=>{const n=4*t.sample,r={},o=t.minHue===0,i=t.maxHue===360,a=o&&i;for(let p=0;p360,u=l?360+t.minHue:t.minHue,c=i?360:t.maxHue%360;function f([,,{h:p}]){return a?!0:l?p>=u||p<=c:s?p<=c||p>=u:p>=u&&p<=c}return TV(Object.entries(r).filter(([,p])=>p>1).map(([p,h])=>{const[g,y,C]=p.split(",");return[p,h,kr(`color(display-p3 ${g/255} ${y/255} ${C/255})`)]}).filter(f).sort(([,,p],[,,h])=>p.c>h.c?-1:1).slice(0,t.amount).map(([p])=>p),t)};function MV(e,t){return tt(this,null,function*(){const n=yield OV(PV(e));return BV(n,DV(t))})}const vb=42;function RV({value:e,h:t,rangeSize:n}){const{palette:r,pickedHue:o}=xe,[i,a]=te.pickedValue(),l=r.some(({value:u})=>u===e),s=Math.abs(Math.abs(t)-Math.abs(o))>n/20;return d("div",{style:{background:s?"white":"transparent",border:"transparent",position:"absolute",top:0,right:0,bottom:0,left:0},onClick:()=>{a(i===e?"":e)},children:l&&"V"})}function NV({color:e,minLightness:t,maxLightness:n,rangeSize:r}){const o=kr(e);if(!o)return;const{l:i,c:a,h:l=0,alpha:s=1}=o,u=i*100;if(un)return;const c=zn(u,a,l,s);return d("div",{title:c,draggable:!0,onDragStart:f=>f.dataTransfer.setData("value",c),style:{position:"relative",display:"inline-block",fontWeight:900,verticalAlign:"top",width:vb,height:vb,backgroundColor:e,color:"green"},children:d(RV,{value:c,h:l,rangeSize:r})})}function IV({minLightness:e,maxLightness:t,rangeSize:n,colors:r}){return r.map(o=>d(NV,{color:o,minLightness:e,maxLightness:t,rangeSize:n}))}function LV(e){const{pickedHue:t}=xe,{path:n}=e,[r,o]=w.useState(),[i,a]=w.useState(),[l,s]=st("image color group",2),[u,c]=st("image color sample",16),[f,p]=st("image color amount",90),[h,g]=st("image color min lightness",0),[y,C]=st("image color max lightness",100),[m,v]=st("image color min hue",0),[b,F]=st("image color max hue",360),[_,A]=be("image color preserve lightness range",!1),[D,O]=be("image color preserve hue range",!1),[T,L]=w.useState(!0);if(w.useEffect(()=>{const B=performance.now(),G=setTimeout(()=>tt(this,null,function*(){L(!0),o(yield MV(n,{sample:u,group:l,amount:Math.max(2,f),minHue:m,maxHue:b})),a(performance.now()-B),L(!1)}),80);return()=>clearTimeout(G)},[n,l,u,f,m,b]),!r)return;const Q=b-m||360;return k("div",{children:[d("br",{}),"group: ",l,k("span",{style:{float:"right"},children:[" ",i,"ms"]}),d("input",{disabled:T,type:"range",value:l,min:1,max:100,style:{width:"95%"},onChange:B=>{s(parseInt(B.target.value))}}),"sample: ",u,d("input",{disabled:T,type:"range",value:u,min:1,max:50,style:{width:"95%"},onChange:B=>{c(parseInt(B.target.value))}}),"amount: ",d("input",{type:"number",value:f,onChange:B=>p(B.target.value)}),d("input",{disabled:T,type:"range",value:f,step:9,min:9,max:90,style:{width:"95%"},onChange:B=>{p(parseInt(B.target.value))}}),k("div",{style:{display:"flex"},children:[d("input",{disabled:T,type:"number",value:m,min:0,max:360,onChange:B=>{v(parseInt(B.target.value))}}),d("input",{disabled:T,type:"number",value:b,min:1,max:360,onChange:B=>{F(parseInt(B.target.value))}}),d(Ce,{disabled:!D&&b-m>=360,controls:[D,O],children:"Fix hue range"})]}),k("div",{style:{position:"relative",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:[t&&d("div",{style:{position:"absolute",width:"100%",height:62,background:"transparent",backdropFilter:"blur(1px)"},children:d("div",{style:{border:"1px dashed black",width:"100%",height:"100%",fontSize:"2rem"},onClick:()=>{const G=(b-m)/20;v(t-G),F(t+G)},children:"click to narrow down"})}),d("input",{disabled:T||m<0,type:"range",value:(360+m)%360,min:0,max:360,style:{width:"100%",height:28,padding:0},onChange:B=>{const G=parseInt(B.target.value);v(G),G>b-5&&F(G+5),D&&F(b+G-m)}}),d("input",{disabled:T||b>360,type:"range",value:b===360?360:b%360,min:1,max:360,style:{width:"100%",height:28,padding:0},onChange:B=>{const G=parseInt(B.target.value);F(G),G{g(parseInt(B.target.value))}}),d("input",{disabled:T,type:"number",value:y,min:1,max:100,onChange:B=>{C(parseInt(B.target.value))}}),d(Ce,{disabled:h<=0&&y>=100,controls:[_,A],children:"Fix lightness range"})]}),k("div",{children:[d("input",{disabled:T,type:"range",value:h,min:0,max:99,style:{width:"95%"},onChange:B=>{const G=parseInt(B.target.value);g(G),G>y-5&&C(G+5),_&&C(y+G-h)}}),d("input",{disabled:T,type:"range",value:y,min:1,max:100,style:{width:"95%"},onChange:B=>{const G=parseInt(B.target.value);C(G),G!l.isRawValue).map(([{name:l}])=>`var(${l})`);let i=!1;const a=gn();return t.forEach(([{name:l,isRawValue:s},u,c,f=":root"])=>{if(s||o.includes(c))return;const p=kr(u);if(!p||p.l<.001||p.l>.999||!n&&p.c{t(""),n.stopPropagation()},children:"X"})]})}const vs=new WeakSet,yb=new Set;function GV({src:e,element:t}){const[n,r]=te.inspectedPath(),{xrayFrameRef:o}=w.useContext(qe);return!(e!=null&&e.endsWith(".svg"))||yb.has(e)?null:d("button",{onClick:()=>{tt(this,null,function*(){const i=URL.parse(e,window.location.href),l=yield(yield fetch((i==null?void 0:i.href)||e)).text(),s=document.createElement("div");if(s.style.minHeight="100px",s.style.minWidth="100px",s.innerHTML=l,t.after(s),o.current){const u=o.current.contentWindow.document,c=u.createElement("div");c.innerHTML=l,c.style.minHeight="100px",c.style.minWidth="100px",Ht(n,u).after(c),r([...n.slice(0,-1),["SVG",n.at(-1)[1]+1]])}yb.add(e)})},children:"inline SVG"})}function WV({path:e}){const[t,n]=te.elementSelectionMode(),[,r]=te.inspectedPath();return t?d("div",{onClick:o=>{r(e),n(!1)},title:"Go up to this element",style:{outline:"3px solid indigo",borderRadius:"7px",position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:99,cursor:"pointer"}}):null}const UV=e=>{const{group:t,index:n}=e,r=n===0,{propertyFilter:o,maximizeChroma:i,inspectedPath:a}=xe,[{scopes:l},s]=te.themeEditor(),[u,c]=te.svgDarkBg(),f=bg("pickedValue"),[p,h]=be("image color show",!1),{element:g,path:y,elementInfo:{src:C,srcset:m,imgWidth:v,imgHeight:b,alt:F,title:_,html:A,width:D},label:O,vars:T,scopes:L,isRootElement:Q,inlineStyles:B={},inheritedInlineStyles:G={}}=t,fe=Object.keys(B).length>0,Se=r&&[...g.childNodes].some(Y=>Y.nodeType===3&&Y.textContent.trim()!=="")?g.textContent.trim():null,{defaultValues:ie}=w.useContext(qe),[z,Z]=te.openGroups(),U=Y=>{const pe=z,{[Y]:M}=pe,de=mn(pe,[lf(Y)]),ue=M?de:ae(V({},de),{[Y]:!0});return Z(ue),!M},[le,R]=w.useState(vs.has(g)),K=w.useMemo(()=>T.reduce((Y,M)=>{var de,ue;if(Bl(M)){const{name:pe}=M;if(!pe.startsWith("--"))return pe.toLowerCase()!=="currentcolor"&&Y.push([M,pe]),Y;const se=pi[pe];let S=M.currentScope;if(!S&&L.length>0){for(const j in se||{})if(S=((de=L.find(ce=>ce.selector===j))==null?void 0:de.selector)||S,S)break}const $=pt[S||":root"][pe]||p5(L,M)||ie[pe]||((ue=M.maxSpecific)==null?void 0:ue.defaultValue)||M.usages[0].defaultValue,E=!l||!l[S]?null:l[S][pe],N=B[pe]||G[pe]||E||$;let[I]=Og(N,L,l,0,B,G);if(I.includes("calc(")){const j={steps:[]};let ce=I;for(;ce.includes("calc(");){const ve=ce.indexOf("calc("),_e=Nr(ce,ve+5);try{const[he]=Xc(ce.slice(ve+5,_e-1),j);ce=ce.slice(0,ve)+he+ce.slice(_e+1)}catch(he){break}}I=ce}I&&I!=="inherit"&&I.toLowerCase()!=="currentcolor"&&Y.push([M,M.cssFunc?`${M.cssFunc}(${I})`:I,N,S])}return Y},[]),[T,L,l]),ne=!(T.length===0)||C;if(w.useEffect(()=>{le?g.classList.add("force-nodisplay"):g.classList.remove("force-nodisplay")},[le]),!ne&&!r&&!C&&!A)return null;const P=!!z[O];return k("li",{className:"var-group",style:{viewTransitionName:r&&a.length>1?`inspected${a.length}-${a.at(-1)[1]}`:n,marginBottom:"12px"},children:[k("div",{style:{position:"sticky",top:0,background:"white",zIndex:12},onMouseEnter:()=>{el(g)},onMouseLeave:()=>{di(g)},children:[!r&&d(WV,{path:y}),k("div",{style:{overflow:P?"hidden":"auto"},children:[Q?d("span",{style:{float:"right"},children:"global"}):d(g5,{path:y}),k("h4",{style:{fontWeight:400,marginBottom:0,paddingRight:"4px",cursor:ne?"pointer":"initial",display:"flex",justifyContent:"space-between",alignItems:"flex-start",maxHeight:P?"128px":"300px",overflowX:"hidden",overflowY:"auto"},onClick:ne?Y=>{const M=zF("pickedValue");if(M&&E5(M,{groupColors:K,maximizeChroma:i}))return;const de=U(O);queueMicrotask(()=>{de||Y.target.scrollIntoView({block:"nearest"})},0)}:null,onDrop:Y=>jV({groupColors:K,maximizeChroma:i},Y),onDragOver:Y=>{Y.preventDefault()},children:[k("div",{style:{flexShrink:1},children:[O," (",T.length,")",o!=="all"&&d("span",{style:{color:"grey",fontSize:"12px"},children:o}),d(HV,{}),K.length>0&&d("div",{style:{overflowX:"hidden"},children:K.map(([{name:Y},M,de,ue])=>{const pe=Y.startsWith("--");return w.createElement("div",ae(V({onDragOver:se=>se.preventDefault(),onDrop:se=>{let S=se.dataTransfer.getData("value");S===""&&(S=se.dataTransfer.getData("text/plain").trim()),S!==""&&(s({type:Me.set,payload:{name:Y,value:S,scope:ue}}),se.stopPropagation())},draggable:!0},d5(()=>f(M))),{onDragStart:Vt(de),key:Y,title:Y===M?Y:`${Y}: ${de}`,style:{display:"inline-block",width:Md,height:Md,lineHeight:"1.5",border:"1px solid black",borderRadius:"6px",backgroundImage:`${M}`,backgroundColor:`${M}`,backgroundRepeat:"no-repeat",backgroundSize:"cover",marginTop:"3px",marginLeft:"6px",paddingTop:"3.5px",fontSize:"14px",textAlign:"center",textShadow:pe?"white 0px 3px":"white 2px 2px"}}),/^var\(/.test(de)?"v":M==="transparent"?"👻":pe?d(w.Fragment,{children:" "}):"r")})})]}),fe&&d("span",{style:ae(V({border:"1px solid black"},B),{maxHeight:Md,width:"auto"}),children:"Inline"}),C&&d("img",{src:C,srcSet:m,alt:F,title:_||F,style:{height:"52px",float:"right",backgroundColor:"grey"}}),(A==null?void 0:A.length)>0&&d("div",{className:"svg-inspect-wrapper",style:{display:"inline",position:"relative",minWidth:`${D}px`,maxWidth:"50%",maxHeight:"160px",outline:"1px solid grey",padding:"2px",background:u?"black":"transparent"},onClick:Y=>{c(!u),Y.stopPropagation()},dangerouslySetInnerHTML:{__html:A}}),Se&&d("div",{style:{fontSize:"12px",border:"1p solid grey",background:"lightgrey",maxWidth:"45%",margin:"4px",padding:"4px",float:"right",maxHeight:"62px",overflow:"auto"},children:Se})]})]})]}),P&&k(w.Fragment,{children:[C&&k(w.Fragment,{children:[d("a",{href:C,target:"_blank",children:C}),d("br",{}),d(Ce,{controls:[p,h],children:"Extract colors"}),k("code",{style:{float:"right"},children:[v," x ",b]}),p&&d(LV,{path:C})]}),d($V,{group:t,elementScopes:L}),d(_V,{scopes:L,vars:T,element:g,group:t}),d("ul",{className:"group-list",children:T.filter(Y=>!Y.currentScope).map(Y=>w.createElement(Vi,{cssVar:Y,scopes:L,element:g,group:t,key:Y.name,onChange:M=>{s({type:Me.set,payload:{name:Y.name,value:M}})},onUnset:()=>{s({type:Me.unset,payload:{name:Y.name}})}}))}),d(Ce,{controls:[vs.has(g),Y=>{Y?vs.add(g):vs.delete(g),R(Y)}],children:"Hide"})]}),d(GV,{element:g,src:C})]},O)},VV=k(Ct,{el:Zc,children:[d("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."}),d("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:[d("li",{children:"It's upside down, so that the most useful information is easy to find"}),d("li",{children:"Doesn't include the whole tree, only the section leading to the inspected element."}),d("li",{children:"Everything related to the element is here, so it's always obvious what applies to what"})]})]})]});function Zc(){var c;const{frameRef:e}=w.useContext(qe),{propertyFilter:t,search:n,filteredSelectors:r,showRawValues:o,excludedRawValues:i,inspectedPath:a}=xe;let l;try{const f=Ht(a,(c=e.current)==null?void 0:c.contentWindow.document);l=Ao(f)}catch(f){l=[]}const s=w.useMemo(()=>{const f=AV(l,r);return kV(f,n).map(h=>ae(V({},h),{vars:h.vars.filter(g=>g.isRawValue&&!o||i.some(y=>g.name===y)?!1:t==="all"?!0:Bl(g))}))},[l,t,n,r]),u=w.useRef();return k(w.Fragment,{children:[VV,k("ul",{className:"group-list",ref:u,children:[s.length===0&&d("li",{children:d("span",{className:"alert",children:"No element selected"})}),s.map((f,p)=>d(UV,{group:f,index:p},f.label))]})]})}Zc.fName="Inspector";function ef(){const[e,t]=_l();return d("button",{className:"movable-element-collapse",onClick:()=>{t(!e)},children:e?"+":"-"})}function KV(e){const{value:t,isHtml:n}=e,r=t.replace(/var\(/,"").replace(/\)$/,"").trim(),o=r!==t&&/^[\w\-]+$/.test(r),i=w.useRef();return w.useEffect(()=>{},[t]),n?d("div",{style:{pointerEvents:"none"},dangerouslySetInnerHTML:{__html:t}}):d("div",{ref:i,style:{listStyleType:"none"},draggable:!0,onDrag:a=>{a.dataTransfer.setData("value",t),a.stopPropagation()},children:o?d(XV,{value:t,varName:r}):d(YV,{value:t})})}function YV(e){const{value:t}=e;return d("div",{children:d(Mu,{value:t,cssVar:{name:t,value:t,usages:[]},resolvedValue:t})})}function XV(e){const{value:t,varName:n}=e,{themeEditor:{scopes:r}}=xe,{allVars:o}=w.useContext(qe),[i,a]=w.useState(!1),l=o.find(f=>f.name===n)||{name:n,usages:[]},s=w.useMemo(()=>{var h;if(!i)return null;if(!((h=l.name)!=null&&h.startsWith("--")))return[];const f=new RegExp(`var\\(\\s*${l.name.replaceAll(/-/g,"\\-")}[\\s\\,\\)]`),p=[];for(const g of o){const{name:y}=g;if(!(y!=null&&y.startsWith("--")))continue;const C=new Set;Object.entries(r).forEach(([m,v])=>{v[y]&&f.test(v[y])&&C.add(m)}),Object.entries(pt).forEach(([m,v])=>{if(C.has(m))return;const b=v[y];b&&b.includes("--")&&f.test(b)&&C.add(m)}),C.size>0&&p.push([[...C.values()],g])}return p},[r,i]),u=Object.entries(pi[n]||{});let c;if(u.length===0){const f=[];for(const[p,h]of Object.entries(r))for(const[g,y]of Object.entries(h))g===n&&f.push([p,y]);c=f}else c=u;if(c.length===0)return d("div",{children:k("b",{children:[n," ",d("span",{style:{color:"red"},children:"is undefined"})]})});if(c.length===1){const f=c[0][1];return k("div",{children:[d("b",{draggable:!0,onDragStart:Vt(f),children:n}),d(Mu,{cssVar:l,value:f,resolvedValue:f}),d(Rt,{controls:[i,a],children:"Usages"}),i&&k(w.Fragment,{children:[d(f5,{references:s}),d(c5,V({},l))]})]})}return k("div",{children:[k("b",{draggable:!0,onDragStart:Vt(t),children:[n," (",c.length,")"]}),d("ul",{children:c.map(([f,p])=>k("li",{style:{clear:"both"},children:[d("span",{className:"monospace-code",children:f}),d(Mu,{value:f in r&&n in r[f]?r[f][n]:p,cssVar:l})]},f))})]})}function F5({values:e,setValues:t,width:n=65,mini:r=!1}){const[o,i]=te.pickedValue(),a=e.some(({value:f})=>f===o),[l,s]=be("palette-vertical",!1),[u,c]=w.useState(!1);return w.useEffect(()=>{if(u){const f=()=>{c(!1)};return document.addEventListener("drop",f),document.addEventListener("dragend",f),()=>{document.removeEventListener("drop",f),document.removeEventListener("dragend",f)}}},[u]),w.useEffect(()=>{c(!1)},[e]),k("div",{style:{display:"flex",flexDirection:l?"column":"row"},children:[(u||a)&&d("div",{style:{fontSize:"25px",fontWeight:"bold",textAlign:"center",border:"1px dashed grey",minWidth:"42px"},onClick:()=>t(e.filter(({value:f})=>f!==o)),onDrop:f=>{const p=f.dataTransfer.getData("value");p!==void 0&&t(e.filter(({value:h})=>h!==p))},children:"🗑"}),!r&&d("div",{className:l?"flex-row":"flex-column",children:d(JV,{})}),!u&&!a&&d(Rt,{style:{maxWidth:"28px"},controls:[l,s],children:l?"⇓":"⇒"}),e.map(({value:f,isHtml:p},h)=>p?d("div",{style:{width:n,height:n,overflow:"hidden",background:"white"},draggable:!0,onDragStart:Vt(f,()=>c(!0)),children:d("div",{style:{width:"320px",transform:"scale(.3)",transformOrigin:"left top"},dangerouslySetInnerHTML:{__html:f}})}):d("span",{style:{display:"inline-block"},children:d("span",{draggable:!0,onClick:()=>{i(o===f?"":f)},onDragStart:Vt(f,()=>c(!0)),title:f,onDrop:g=>{let y=!1,C=g.dataTransfer.getData("value");if(C===""&&(C=g.dataTransfer.getData("text/html").trim(),y=!0),C===""&&(C=g.dataTransfer.getData("text/plain").trim()),e.some(({value:m})=>m===g.dataTransfer.getData("value"))){const m=e.filter(({value:b})=>C!==b),v=[...m.slice(0,h),{value:C,isHtml:y},...m.slice(h)];t(v),g.stopPropagation()}else t([...e,{value:C,isHtml:y}]),g.stopPropagation()},style:{display:"inline-block",overflow:"hidden",margin:"2px",backgroundImage:`${f}`,backgroundColor:f,backgroundRepeat:"no-repeat",backgroundSize:"cover",fontSize:"14px",textShadow:"white 0px 10px",lineHeight:"20px",width:n,height:n,outline:f===o?"4px solid yellow":"none"},children:f},f)}))]})}function qV({values:e,setValues:t}){return d("ul",{style:{display:"flex",flexDirection:"column",maxWidth:"320px"},children:e.map(n=>{const{value:r}=n;return k("li",{style:{display:"flex",flexDirection:"row"},children:[d(KV,V({value:r},n)),d("button",{style:{alignSelf:"flex-end"},onClick:()=>{t(e.filter(o=>o!==n))},children:"X"})]},r)})})}function JV(){const[e,t]=te.palette(),[n,r]=w.useState(!1),[o,i]=be("manage palettes open",!1),[a,l]=w.useState(""),s=a.trim(),[u,c]=be("palettes",[]),f=e.length===0;return k("div",{children:[d(Rt,{controls:[n,r],children:"..."}),n&&k(w.Fragment,{children:[d(Ve,{value:a,onChange:l}),d("button",{disabled:s==="",onClick:()=>{c([...u,{name:a,contents:e}])},children:"save"}),d("button",{disabled:f,onClick:()=>{f||c([...u,{name:"tmp",contents:e}]),t([])},children:"clear"}),d(Rt,{controls:[o,i],children:"Stored palettes"}),o&&d("ul",{children:u.map(({name:p,contents:h=[],palette:g})=>k("li",{style:{display:"flex",justifyContent:"flex-end"},children:[p," (",h.length,")",d(F5,{mini:!0,values:h,setValues:()=>{},width:20}),d("button",{onClick:()=>{f||c([...u,{name:"tmp",contents:g}]),t(h)},children:"restore"}),d("button",{onClick:()=>{confirm(`Delete palette "${p}"?`)&&c(u.filter(({name:y})=>y!==p))},children:"X"})]},p))})]})]})}function tf(){const[e,t]=te.pickedValue(),[n,r]=te.palette(),[o]=_l();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:[d(ef,{}),n.length===0&&k("span",{children:["Empty",d("br",{})]}),o?d(F5,{values:n,setValues:r}):d(qV,{values:n,setValues:r}),d(Ct,{el:tf,tasks:[()=>[`Add 2 items to the palette (${Math.min(2,n.length)}/2)`,n.length>1]],children:"You can drop values from almost anywhere here, and drag them onto the page and UI elements later."})]})}tf.fName="Palette";function QV(e){const l=e,{options:t,onChange:n,selected:r}=l,o=mn(l,["options","onChange","selected"]),i=w.useId(),a=w.useCallback(s=>n(s.target.value),[]);return d("div",{children:t.map((s,u)=>k("div",{children:[d("input",V({id:`${i}-${u}`,type:"radio",name:i,value:s.value,onChange:a,checked:s.value===r},o)),d("label",{htmlFor:`${i}-${u}`,children:s.label})]},s.value))})}function nf(){const[e,t]=te.width(),[n,r]=te.height(),[o,i]=te.isSimpleSizes(),{screenOptions:a}=xe,[l]=_l(),s=l?d(yt,{style:{marginRight:"-9px"},options:a,value:`${e},${n}`,onChange:u=>{const[c,f]=u.split(",");t(parseInt(c)),r(parseInt(f))}}):k(w.Fragment,{children:[d("button",{onClick:()=>{i(!o)},children:o?"Show all sizes":"Show only simple sizes"}),d(QV,{options:a,selected:[e,n].join(),onChange:u=>{const[c,f]=u.split(",");t(parseInt(c)),r(parseInt(f))}})]});return k("div",{children:[d(ef,{}),s,d(Ct,{el:nf,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."})]})}nf.fName="ScreenSwitcher";const ZV=e=>{const{name:t,serverTheme:n,activeThemeRef:r,deleteTheme:o}=e,{modifiedServerVersion:i}=xe,[a,l]=te.fileName(),s=gn(),u=a===t;return k("li",{ref:u?r:null,className:"server-theme "+(u?"server-theme-current":""),children:[t," ",u&&i&&"(*)",t!=="default"&&d("button",{style:{float:"right"},onClick:()=>tt(Be,null,function*(){confirm(`Remove theme "${t}" from server?`)&&o(t)}),children:"Delete"}),d("button",{style:{float:"right"},onClick:()=>{!u&&l(t),s({type:Me.loadTheme,payload:{theme:n}})},children:u?"Reset":"Switch"}),Object.keys(n).length>0&&k("span",{style:{float:"right"},children:["(",Object.keys(n).length,")"]})]},t)},Rg=()=>{const e=w.useRef(),[t,{serverThemesLoading:n,deleteTheme:r}]=te.serverThemes(),[o,i]=be("theme-server-theme-height-list","140px");return n?d("div",{style:{height:o},children:"Loading server themes..."}):k(w.Fragment,{children:[d("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])=>d(ZV,{name:a,serverTheme:l,activeThemeRef:e,deleteTheme:r},a))}),d(Ct,{el:Rg,children:"Here are all your saved themes."})]})};function rf(){const[e,t]=te.frameClickBehavior(),n=e==="alt";return k("div",{children:[d(Ct,{el:rf,children:"Toggle whether a normal click performs an inspection and blocks default click behavior."}),d("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 🔍"})]})}nf.fName="CursorBehavior";let fo;function ZV(){fo={prep:{name:"prep",steps:[rf]},basics:{name:"basics",steps:[Ng,Zc,tf,Oc,Bc]},history:{name:"history",steps:[Jc,Og,Bl,Bg,Qc]},inspection:{name:"inspection",steps:[nf]},changes:{name:"changes",steps:[ef]},themes:{name:"themes",steps:[Rg]}}}let _t;function eK(){_t="prep",of()}function tK(){_t=null,Rn=0,of()}const bb=k(xt,{el:rf,children:[d("div",{style:{minWidth:"600px"}}),d("h1",{children:"Preparation"}),d("h2",{children:"Checklist"}),k("ul",{children:[k("li",{children:[d("b",{children:"Use a large screen. "}),"On smaller screens you will likely have to remove some UI elements from the screen."]}),k("li",{children:[d("b",{children:"Mouse is required for some interactions"}),". Other types of input will be added at a later point to simplify development."]}),k("li",{children:["For now, ",d("b",{children:"a P3 capable monitor"})," is required to properly display the `oklch` color pickers, but the UI does not validate this yet. You can use the external ",d("a",{target:"_blank",href:"https://oklch.com/",children:'"online picker" link'}),' below color pickers, and enable the "Show P3" toggle, which will then indicate whether your current environment (monitor + OS/software settings) supports P3.']})]}),d("h2",{children:"Things to be aware of / watch out for"}),k("ul",{children:[k("li",{children:["The quality and mostly the quantity of CSS on a page has a big impact on the quality of the experience. The ",d("a",{href:"https://inwerpsel.github.io/use-theme-editor/demo/halfmoon/docs/forms",children:"halfmoon demo"})," currently has the most complete and glitch free experience."]}),d("li",{children:"You can display data that does not use CSS variables, but can't modify those values yet."}),d("li",{children:"There are some bugs and possible crashes when using pin together with lock system."})]})]});function rf(){return k5()?_t==="prep"?k(w.Fragment,{children:[d("button",{onClick:tK,children:"Exit tutorial"}),bb]}):bb:d("button",{onClick:eK,children:"Start tutorial"})}let Rn=0;function F5(){uh=null,setTimeout(()=>{uh===null&&A5(!0)},100)}function nK(e){if(Rn>=fo[_t].steps.length-1){const t=[...Object.keys(fo)],n=t.indexOf(_t);_t=t[n+1],Rn=0}else Rn++;_t||alert("Congratulations, you finished the tutorial!"),of(),e.stopPropagation(),e.preventDefault(),_t&&F5()}function rK(e){if(Rn===0){const t=[...Object.keys(fo)],n=t.indexOf(_t);_t=t[n-1],Rn=fo[_t].steps.length-1}else Rn--;of(),e.stopPropagation(),e.preventDefault(),F5()}function oK(){return _t==="prep"&&Rn===0?null:d("button",{onClick:rK,children:"Previous"})}const sh=new Set;function of(){for(const e of sh)e()}function iK(e){return sh.add(e),()=>{sh.delete(e)}}function aK(){return _t?fo[_t].steps[Rn]:null}function k5(){return w.useSyncExternalStore(iK,aK)}let uh=null,A5;function lK({label:e,done:t}){return d("li",{"data-done":t,children:e})}function sK(e){const t=[];let n=!0;for(const r of e){const[o,i]=r(xe);t.push([o,i]),n&&(n=i)}return[n,t]}function xt({el:e,children:t,tasks:n=[]}){const[r,o]=sK(n),{setDrawerOpen:i}=w.useContext(Fo);A5=i;const a=w.useRef(),l=w.useRef(),s=e===k5();return w.useEffect(()=>{var u;s&&(uh=e),(u=a.current)==null||u.scrollIntoView({behavior:"smooth"})},[s]),w.useEffect(()=>{var u;(u=l==null?void 0:l.current)==null||u.focus()},[s]),s?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:[_t," ",Rn+1,"/",fo[_t].steps.length]}),t,d("ul",{children:o.map(([u,c])=>d(lK,{label:u,done:c}))}),d(oK,{}),d("button",{ref:l,disabled:!r,onClick:nK,children:"Next"})]}):null}rf.fName="StartTutorial";const la=16;let wb=-1/0;function Ml(){setTimeout(()=>{const e=document.querySelector(".var-group:first-child");e==null||e.scrollIntoView({block:"start"})},0)}let xb;function uK({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r,enableScrollingInView:o}=xe,[i,a]=te.inspectedPath(),[,l]=te.openGroups();w.useEffect(()=>{var c;const s=(c=e.current)==null?void 0:c.contentWindow.document;if(!s)return;function u(f){if(n==="alt"&&!f.altKey)return;const p=f.target;if(f.preventDefault(),f.stopPropagation(),p===xb)return;const h=Mc(p);if(h===i)return;a(h);const m=ko(p);r&&l({[m[0].label]:!0},{skipHistory:!0,appendOnly:!0}),wb=performance.now(),el(p),setTimeout(()=>{fi(p)},700),fh(p),p.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}),Ml(),xb=p}return s.addEventListener("click",u),()=>{s.removeEventListener("click",u)}},[n,t,r]),w.useEffect(()=>{var s;if(o&&!(performance.now()-wb<400))try{const u=Ht(i,(s=e.current)==null?void 0:s.contentWindow.document);if(!u||u.nodeName==="BODY"||u.nodeName==="HTML")return;u.scrollIntoView({block:"center",inline:"nearest"}),el(u);const c=setTimeout(()=>{fi(u)},700);return()=>{clearTimeout(c),fi(u)}}catch(u){}},[i,t,o])}function cK({frameRef:e,loaded:t}){const n=gn();w.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.contentWindow.document;if(!r)return;function o(a){var m,y,C;const l=a.dataTransfer.getData("value")||a.dataTransfer.getData("text/plain");if(!l||l.startsWith("http"))return;const s=a.target,u=ko(s),c=[];let f=0;for(const g of u){f++;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:f,property:b,varName:F.name,scope:(C=g.scopes.find(_=>_.scopeVars.some(A=>A.name===F.name)))==null?void 0:C.selector})}if(c.length===0)return;const[p,...h]=c;n({type:Me.set,payload:{name:p.varName,scope:p.scope,value:l,alternatives:h}}),a.stopPropagation()}return r.addEventListener("drop",o),r.addEventListener("dragenter",vs),r.addEventListener("dragover",vs),()=>{r.removeEventListener("drop",o),r.removeEventListener("dragenter",vs),r.removeEventListener("dragover",vs)}},[t])}function vs(e){e.preventDefault()}const Ng=e=>{const{src:t}=e,{frameRef:n}=w.useContext(qe),[r,o]=te.frameLoaded(),[i,a]=te.width(),[l,s]=te.height(),u=xe.scales[`${i}x${l}`]||1;return d("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 f=parseInt(c.currentTarget.style.height.replace("px",""))-la,p=parseInt(c.currentTarget.style.width.replace("px",""))-la;isNaN(f)||isNaN(p)||(s(f),a(p))},style:{transform:`scale(${u})`,resize:"both",minWidth:"200px",width:`max(calc(${la+parseInt(i)}px * ${u}), ${la+parseInt(i)}px)`,minHeight:"200px",height:`${la+parseInt(l)}px`,overflow:"hidden",padding:"0",boxSizing:"border-box",marginLeft:"1rem"},children:[fK,d("iframe",{onLoad:()=>o(!0),className:"responsive-frame",ref:n,src:t,width:parseInt(i),height:parseInt(l)}),d(uK,{frameRef:n,loaded:r}),d(cK,{frameRef:n,loaded:r})]})})},fK=d(xt,{el:Ng,tasks:[e=>["Click any element on the page",e.inspectedPath!==""]],children:"Select an element here to see all its styles."}),$5=()=>{const{themeEditor:{scopes:e}}=xe,t=gn(),[n,r]=w.useState(!1),o=e[Lt]||{},[i,a]=w.useState(!1),[l,s]=w.useState(""),[u,c]=w.useState(""),f=l in o,p=/^--[a-zA-Z0-9][a-zA-Z0-9_-]+/.test(l);return k("div",{style:{marginBottom:"8px"},children:[d(Rt,{controls:[n,r],children:"Custom variable"}),n&&k("div",{children:[k("form",{onSubmit:h=>(t({type:Me.set,payload:{name:l,value:u}}),h.preventDefault(),!1),children:[d(Ve,{value:l||"--",onChange:h=>{s(h.replace(" ","-").replace(/^-*/,"--"))}}),d("br",{}),d(Ve,{required:!0,value:u,onChange:c}),d("button",{disabled:!p||u===o[l]||!i&&f,title:f?o[l]===u?"Variable already has this value":`Overwrite existing value of ${o[l]}`:"Add new variable",children:"Add"})]}),f&&k("div",{children:[d("button",{onClick:()=>{t({type:Me.unset,payload:{name:l}})},children:"Unset"}),d(Ce,{controls:[i,a],children:"Confirm overwrite existing"}),k("div",{children:["Current value: ",o[l]]})]})]})]})};$5.fName="CustomVariableInput";const dK=(e,t)=>{w.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])},pK=()=>{const{frameRef:e,setSheetDisablerDisplayed:t}=w.useContext(qe),[n,r]=be("set-disabled-sheets",{}),o=[...document.styleSheets].filter(({href:i})=>!!i);return dK(n,e),o===null?d("div",{children:"Loading..."}):k("div",{style:{background:"white",color:"black",border:"1px solid black",borderRadius:"6px",padding:"5px"},children:[d("button",{style:{float:"right"},onClick:()=>t(!1),children:"Close"}),d("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 ",d("b",{children:"while in the editor"}),"."]}),d("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(ae(V({},n),{[a]:!n[a]||null}))},children:[d("input",{readOnly:!0,type:"checkbox",checked:!n[a]}),u.join("/"),"/",d("b",{children:s.at(-1)})]},i)})})]})},hK={all:{label:"All"},colors:{label:"Colors"}},gK=Object.entries(hK).map(([e,{label:t}])=>({value:e,label:t}));function mK(){const[e,t]=te.propertyFilter();return d(kt,{className:"property-category-filter",title:"Filter by category",value:e||"all",onChange:t,options:gK})}function vK(){const[e,t]=te.search(),n=w.useRef();return ri("ctrl+/,cmd+/",()=>{var r;(r=n.current)==null||r.focus()}),k(w.Fragment,{children:[d(Ve,{value:e,inputRef:n,onChange:t,placeholder:"search (cmd+/ or ctrl+/)",style:{marginRight:e?"24px":"4px",flexShrink:1,maxWidth:"52%"},autoComplete:"on"}),!!e&&d("button",{style:{position:"relative",right:"48px",width:"30px"},title:"clear",onClick:()=>t(""),children:"x"}),d(OS,{id:"show-raw-values",hook:te.showRawValues,title:"View only",children:"Raw values"})]})}const yK=(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?V(V({},r),ensured):u;e({type:Me.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])},bK={":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"}},wK={scopes:bK},xK={":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)"}},CK={scopes:xK};function Cb(e,t){const n=gn(),r=yg("fileName");return()=>{n({type:Me.loadTheme,payload:{theme:e}}),r(t)}}function SK(){const[e,t]=w.useState(!1);return k(w.Fragment,{children:[d(Rt,{controls:[e,t],children:"Presets"}),e&&k(w.Fragment,{children:[d("button",{onClick:Cb(CK,"kapow-gray"),children:"Kapow gray"}),d("button",{onClick:Cb(wK,"kapow-colorful"),children:"Kapow colors"})]})]})}function EK(){const[{scopes:e},t]=te.themeEditor();w.useContext(qe);const n=e[Lt]||{},[r,o]=te.fileName(),[i,a]=w.useState(!1);return w.useState(!1),k("div",{style:{background:"white",padding:"16px"},children:[d(SK,{}),d("div",{children:d(Ce,{controls:[i,a],children:"Merge into current theme"})}),k("div",{children:[d("button",{onClick:()=>CH(r,e),children:"Export JSON"}),d("button",{onClick:()=>FH(r,e),children:"Export CSS"})]}),d("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Upload JSON:",d("input",{type:"file",accept:".json",onChange:l=>{yK(t,l,i,n,o)},style:{cursor:"copy"}})]})}),d("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Import history JSON",d("input",{type:"file",accept:".json",onChange:l=>{const s=new FileReader;s.onload=u=>{try{const c=JSON.parse(u.target.result);MH(c)}catch(c){console.log("failed uploading",c)}},s.readAsText(l.target.files[0])},style:{cursor:"copy"}})]})}),d(Ve,{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?V(V({},n),s):s;t({type:Me.loadTheme,payload:{theme:u}})}catch(s){console.log(s)}}})]})}function _5(){const{existsOnServer:e,modifiedServerVersion:t,themeEditor:{scopes:n}}=xe,[r,o]=te.fileName(),[,{uploadTheme:i}]=te.serverThemes();return k("div",{children:[d(Ve,{value:r,onChange:o,style:{width:"130px",clear:"both"},placeholder:"theme"}),d("button",{style:{clear:"both"},disabled:!r||r==="default",onClick:()=>tt(this,null,function*(){e&&!confirm("Overwrite theme on server?")||i(r,n)}),children:e?`Save${t?" (*)":""}`:"Upload"})]})}_5.fName="ThemeUploadPanel";const Sb="responsive-size-controls";function Ig(){const[e,t]=te.width(),[n,r]=te.height();return k("div",{className:Sb,id:Sb,children:[k("span",{children:[d("input",{type:"number",onChange:o=>t(parseInt(o.target.value)),value:e})," x ",d("input",{type:"number",onChange:o=>r(parseInt(o.target.value)),value:n})]}),d(xt,{el:Ig,children:"Enter precise screen dimensions here if necessary."})]})}Ig.fName="FrameSizeSettings";function Lg(){const{uiState:e,setUiState:t,resetPanels:n,dragEnabled:r,setDragEnabled:o,showMovers:i,setShowMovers:a,drawerOpen:l}=w.useContext(Fo),[s,u]=te.windowArrangments(),[c,f]=be("panel-arrangements-name",""),p=w.useMemo(()=>JSON.stringify(e)===s[c],[s,e,c]);return k("div",{children:[d(bg,{}),d(xt,{el:Lg,tasks:[()=>["Enable dragging elements",w.useContext(Fi).hostAreaId==="area-right"||r],()=>["Move the element from the drawer to any other area",(w.useContext(Fi).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.'}),d(Ce,{controls:[r,o],children:"Drag elements"}),d(Ce,{controls:[i,a],children:"Move elements"}),Object.keys(e.map).length>0&&d("button",{onClick:()=>$i(()=>n()),children:"reset"}),k("div",{children:[d(Ve,{value:c,onChange:f}),d("button",{disabled:c.length===0,onClick:()=>{c in s&&!confirm("Update arrangement?")||c.length!==0&&u(ae(V({},s),{[c]:JSON.stringify(e)}))},children:"Save"}),d(kt,{value:p?c:"",options:[{label:"",value:""},...Object.entries(s).map(([h])=>({label:h,value:h}))],onChange:h=>{f(h),h!==""&&$i(()=>{t(JSON.parse(s[h]))})}})]})]})}Lg.fName="MoveControls";function FK({children:e}){const{drawerOpen:t,setDrawerOpen:n}=w.useContext(Fo);return k("div",{id:"drawer-wrapper",children:[d(lr,{id:"drawer","data-open":t,children:e}),d(Rt,{id:"drawer-opener",controls:[t,n],children:"Drawer"})]})}function D5(){const{propertyFilter:e,search:t}=xe,n=gn(),{allVars:r,defaultValues:o}=w.useContext(qe),[i,a]=w.useState(!1),[l,s]=w.useState(!0),[u,c]=w.useState(!0),[f,p]=be("current-theme-open",!1),h="UNFOUND",m=w.useMemo(()=>f?Object.keys(o).reduce((y,C)=>{const g=r.find(_=>_.name===C),v=t.replace(/^\!/,""),b=v.length!==t.length;if(!g)return v&&C.replace(/-+/g," ").match(v)||b||(y[h]||(y[h]=[]),y[h].push({name:C})),y;if(!C5(g,v)||b||e!=="all"&&!Ol(g))return y;const F=g.statelessSelector.replace(/,\s\:where.*\*$/,"");return y[F]||(y[F]=[]),y[F].push(g),y},{}):{},[f,e,t]);return k("div",{children:[k("h4",{children:[Object.keys(o).length,")",d(Rt,{style:{float:"right"},controls:[f,p],children:f?"Close":"Open"})]}),f&&k("div",{children:[d(Ce,{controls:[l,s],children:"Show active"}),d(Ce,{controls:[i,a],children:"Show unknown"}),d(Ce,{controls:[u,c],children:"Hide not found"})]}),f&&d("ul",{style:{background:"white",listStyleType:"none",paddingLeft:0},children:Object.entries(m).map(([y,C])=>d("li",{style:{marginTop:"12px"},children:d(co,{hideIfNotFound:u,selector:y,children:d("ul",{children:C.map(g=>{const v=g.name;return y===h&&i?d("li",{children:k("p",{children:[d("em",{children:v})," was not found.",d("button",{onClick:()=>{n({type:Me.unset,payload:{name:v}})},children:"unset"})]})},v):!l||y===h?null:d(Vi,{onChange:b=>{n({type:Me.set,payload:{name:g.name,value:b}})},onUnset:()=>{n({type:Me.unset,payload:{name:g.name}})},cssVar:g},v)})})})},y))})]})}D5.fName="CurrentTheme";function kK(){return"_"+Math.random().toString(36).substr(2,9)}function AK(e,t){return[...e,ae(V({},t),{order:e.reduce((n,r)=>Math.max(n,r),-1)+1})].sort(P5)}function P5({order:e},{order:t}){return e-t}function sa(e,t){return e.map(n=>n.id!==t.id?n:t).sort(P5)}function T5(){const[e,t]=te.nameReplacements(),[n,r]=w.useState(""),[o,i]=w.useState(""),[a]=Tc();return k("div",{children:[d(bg,{}),d(Mg,{}),d("h4",{children:"Replace strings in names"}),!a&&d("ul",{style:{maxHeight:"30vh",overflowY:"auto"},children:e.map(l=>{const{id:s,from:u,to:c,order:f,active:p}=l;return k("li",{style:{display:"flex"},children:[k("div",{children:[d(Ve,{value:u,onChange:h=>{t(m=>sa(m,ae(V({},l),{from:h})))},placeholder:"From"}),d(Ve,{value:c,onChange:h=>{t(m=>sa(m,ae(V({},l),{to:h})))},placeholder:"From"})]}),d("button",{onClick:()=>{t(h=>sa(h,ae(V({},l),{order:f-1})))},children:"down"}),d("button",{onClick:()=>{t(h=>sa(h,ae(V({},l),{order:f+1})))},children:"up"}),d(Ce,{controls:[p,()=>t(h=>sa(h,ae(V({},l),{active:!p})))]}),d("button",{onClick:()=>{t(h=>h.filter(m=>m.id!==s))},children:"X"})]},s)})}),!a&&k("div",{style:{display:"flex"},children:[k("div",{children:[d(Ve,{value:n,onChange:r,placeholder:"From"}),d(Ve,{value:o,onChange:i,placeholder:"To"})]}),d("button",{disabled:n.length<2||o.length<1,onClick:()=>{t(l=>AK(l,{id:kK(),to:o,from:n,active:!0})),i(""),r("")},children:"Add"})]})]})}T5.fName="NameReplacements";const O5=20;let Eb=0,Fb=0,ar;function kb(e){if((ar==null?void 0:ar.length)===0&&(Eb++,Eb===O5))return[];if(ar&&ar.length>0)return ar;const t=[...e.querySelectorAll("*")].filter(n=>getComputedStyle(n).position==="fixed");return ar=t.filter(n=>!t.some(r=>r!==n&&r.contains(n))),ar}let Gr;function $K(e,t){let n=e.parentNode;for(;n;){if(t.includes(n))return!0;n=n.parentNode}return!1}function Ab(e,t){if((Gr==null?void 0:Gr.length)===0&&(Fb++,Fb===O5))return[];if(Gr&&Gr.length>0)return Gr;const n=[...e.querySelectorAll("*")].filter(r=>getComputedStyle(r).position==="sticky"&&!$K(r,t));return Gr=n,n}const B5="transform .07s ease-out";function _K(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){$b(i);continue}const y=Math.min(m,t-f+c);y>0&&o.add(i),i.style.transform=`translateY(${y}px)`,i.style.transition=B5}}const TK=28;function OK(e){const{src:t}=e,{width:n,height:r,fullHeightFrameScale:o,fullHeightFrameShowFixed:i}=xe,a=1/o,[l,s]=w.useState(0),[u,c]=w.useState(!1),[f,p]=w.useState(0),[h,m]=w.useState(0),[y,C]=w.useState(null),[g,v]=w.useState(!1),[b,F]=w.useState(null),_=w.useRef();w.useEffect(()=>{var B;y!==null&&((B=A.current)==null||B.contentWindow.postMessage({type:"force-scroll",payload:{position:y,shouldSmoothScroll:g}},window.location.origin))},[y]);const{frameRef:A,scrollFrameRef:D}=w.useContext(qe);w.useEffect(()=>{D.current.contentDocument.documentElement.classList.add("hide-scrollbars"),setTimeout(()=>{var G;D.current.contentDocument.documentElement.classList.add("hide-scrollbars");const B=({data:{type:fe,payload:me}})=>{fe==="frame-scrolled"&&(s(me.scrollPosition),C(null))};return window.addEventListener("message",B),(G=A.current)==null||G.contentWindow.postMessage({type:"emit-scroll"},window.location.origin),()=>{window.removeEventListener("message",B)}},2e3)},[]),w.useEffect(()=>{const B=D.current.contentWindow.document,G=kb(B),fe=Ab(B,G);if(i)for(const me of[...G,...fe])me.classList.remove("hide-important");else{for(const me of[...G,...fe])me.classList.add("hide-important");return}},[i]),w.useEffect(()=>{F(A.current.contentWindow.document.body.parentNode.scrollHeight);const B=setTimeout(()=>{F(A.current.contentWindow.document.body.parentNode.scrollHeight)},800);return()=>{clearTimeout(B)}},[n,r]);let O=0;w.useLayoutEffect(()=>{if(!i)return;const B=performance.now();if(B-O>50){const G=D.current.contentWindow.document,fe=kb(G),me=Ab(G,fe);O=B,PK(me,l,r,D.current),_K(fe,l,r,D.current)}return()=>{}},[l,r,i]);const T=Math.max(0,(u&&y||l)*o),L=B=>{u&&(C(h-(f-B.clientY)*a),v(!1))},Q=B=>{const G=B.clientY-T-D.current.parentNode.getBoundingClientRect().top;C(Math.max(0,l+G*a-r/2)),v(!1)};return k("div",{onWheel:B=>{C(Math.max(0,l+B.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:`${TK+n}px`,overflow:"visible"},children:[d("div",{onMouseDown:Q,onMouseUp:()=>c(!1),onMouseMove:L,style:{zIndex:1,position:"absolute",top:0,right:0,bottom:0,left:0}}),d("iframe",{className:"responsive-frame",ref:D,src:t,width:n,height:Math.max(r,b),style:{width:n}})]}),d("span",{ref:_,onClick:Q,onMouseDown:B=>{c(!0),p(B.clientY),m(l)},onMouseMove:L,onMouseUp:()=>c(!1),style:{userSelect:"none",zIndex:2,top:T,position:"absolute",display:"inline-block",outline:"3px solid oklch(40.10% 0.2213 301.68)",width:n*o,height:(r-8)*o,transition:"top .05s ease-out",boxSizing:"content-box",visibility:u?"hidden":""}})]})}function M5(){const[e,t]=te.fullHeightFrameShowFixed(),[n,r]=te.fullHeightFrameScale(),[o,i]=st("fullheightframescalestep","0.01");return k("div",{style:{display:"flex"},children:[d("input",{type:"number",style:{maxWidth:"72px"},value:n,step:o,onChange:a=>{r(a.target.value)}}),k("label",{children:["step",d("input",{type:"number",style:{maxWidth:"72px"},value:o,onChange:a=>{i(a.target.value)}})]}),d(Ce,{controls:[e,t],children:"Show fixed and sticky"})]})}M5.fName="FullHeightFrameScale";function R5(){return k("div",{style:{display:"flex",gap:"4px"},children:[d(Ce,{controls:te.includeDefaultPalette(),children:"Include default palette"}),d(Ce,{title:"Disable this to get the best experience",controls:te.nativeColorPicker(),children:"Native color picker"}),d(Ce,{controls:te.maximizeChroma(),children:"Maximize chroma when dropping"})]})}R5.fName="ColorSettings";function N5(){const[e,t]=te.showCssProperties();return k("div",{style:{display:"flex",gap:"4px"},children:[d(Ce,{id:"show-css-properties",controls:[e,t],children:"Show CSS properties"}),d(Ce,{id:"link-css-properties",controls:te.linkCssProperties(),children:"Link CSS properties"}),d(Ce,{id:"show-source-links",controls:te.showSourceLinks(),children:"Show source links"})]})}N5.fName="InformationVisibilitySettings";function I5(){const[e,t]=te.webpackHome();return d(Ve,{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"})}I5.fName="WebpackHomeInput";function BK(){const{themeEditor:{scopes:e},frameLoaded:t}=xe,{frameRef:n,scrollFrameRef:r,xrayFrameRef:o}=w.useContext(qe);return w.useInsertionEffect(()=>{U5(e,!0)},[e]),w.useEffect(()=>{var i,a;n.current.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(i=r.current)==null||i.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(a=o.current)==null||a.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin)},[e,t]),null}function MK(){const e=gn();return w.useEffect(()=>{window.addEventListener("message",t=>{if(t.data.type==="dropped-options"){const{options:n,value:r}=t.data.payload,[o,...i]=n;e({type:Me.set,payload:{name:o.varName,scope:o.scope,value:r,alternatives:i}})}},!1)},[]),null}function Pb(){document.fullscreenElement!==this?this.requestFullscreen():document.exitFullscreen()}function L5(){var i;const{frameRef:e}=w.useContext(qe),[t,n]=w.useState(!1),r=d("button",{onClick:()=>{var l;const a=(l=e.current)==null?void 0:l.parentNode;n(document.fullscreenElement!==a),Pb.bind(a)()},children:"fullscreen preview"}),o=k(w.Fragment,{children:[d("button",{onClick:Pb.bind(document.body),children:"fullscreen"}),r]});return k(w.Fragment,{children:[o,t&&a0.createPortal(d("div",{style:{position:"fixed",top:0,right:0},children:r}),(i=e.current)==null?void 0:i.parentNode)]})}L5.fName="FullscreenToggle";function z5(){const[e,t]=te.pickedValue();return d("div",{children:!(e==="")&&d("span",{onClick:()=>{t("")},style:{background:e,width:"32px",height:"32px"},children:e})})}z5.fName="PickedValue";function RK(){const[e,t]=te.pickedValue(),n=w.useRef();if(w.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]),w.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 d("div",{ref:n,style:{"--picked-value":e},className:"picked-cursor",children:e})}function Tb({onDrop:e,children:t}){return d("div",{style:{textAlign:"center",fontSize:"2rem",padding:"8px",background:"yellow"},onDrop:e,children:t})}function NK({selector:e,add:t,shown:n}){return n?k("div",{className:"stretch-over-parent flex-row",style:{justifyContent:"flex-end"},children:[d(Tb,{onDrop:r=>{const o=r.dataTransfer.getData("selector");o&&t(`:where(${e}):not(${o})`)},children:"Not"}),d(Tb,{onDrop:r=>{const o=r.dataTransfer.getData("selector");o&&t(`:where(${e}):where(${o})`)},children:"And"})]}):null}function IK({selector:e,add:t,remove:n}){const[r,o]=w.useState(!1);return k("div",{children:[d(NK,{selector:e,add:t,shown:r}),d("button",{style:{float:"right"},onClick:()=>n(e),children:"-"}),d(co,{selector:e,allowScroll:!0,allowDrag:!1})]})}function j5(){const[e,t]=te.savedSelectors(),{frameRef:n}=w.useContext(qe),[r,o]=be("showSelectorsWidget",!0),[i,a]=w.useState(!1),[l,s]=w.useState(""),[u,c]=w.useMemo(()=>{var m;try{return[!0,(m=n.current)==null?void 0:m.contentWindow.document.querySelectorAll(l).length]}catch(y){return[!1]}},[l]);function f(m){e.includes(m)||t([...e,m])}function p(m){e.includes(m)&&t(e.filter(y=>y!==m))}const h=m=>{const y=m.dataTransfer.getData("text/plain").trim();try{document.querySelector(y),f(y)}catch(C){const g=m.dataTransfer.getData("selector");g&&f(g)}};return r?k("div",{onDragOver:m=>m.preventDefault(),onDrop:h,children:[e.length===0&&d("h2",{children:"Drop selectors here"}),d("ul",{children:e.map(m=>d("li",{style:{position:"relative"},children:d(IK,{selector:m,add:f,remove:p})},m))}),d("button",{onClick:()=>{o(!1)},children:"Close"}),d(Rt,{controls:[i,a],children:"New..."}),i&&k("div",{children:[d(Ve,{value:l,onChange:s}),d("button",{disabled:l==="",onClick:()=>{f(l)},children:"Add"}),u&&k("span",{children:["Found ",c]})]})]}):d("button",{onDragOver:m=>m.preventDefault(),onDrop:m=>{h(m),o(!0)},onClick:()=>{o(!0)},children:"Selectors..."})}j5.fName="Selectors";function LK({setReadonly:e}){const[t,n]=te.note();return d("textarea",{style:{fontSize:"1.2rem",minHeight:160},autoFocus:!0,onBlur:()=>{e(!0)},value:t,onInput:r=>n(r.target.value,{debounceTime:1/0,skipHistory:!0})})}function H5(){const{note:e}=xe,[t,n]=w.useState(!0);if(!t)return d(LK,{setReadonly:n});const r=()=>n(!1);return e===""?d("button",{onClick:r,children:"Note"}):d("div",{style:{background:"white",border:"2px solid black",fontSize:"1.2rem",maxWidth:800},onClick:r,children:d("pre",{children:e})})}H5.fName="NoteBox";function zg(e){e.contains(Mu)||(Mu=e)}let Mu;function zK({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r}=xe,[o,i]=te.inspectedPath(),[,a]=te.openGroups();w.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.contentWindow.document;if(!l)return;function s(c){if(n==="alt"&&!c.altKey)return;const f=c.target,p=Ht(o,l);if(c.preventDefault(),c.stopPropagation(),f===p||f.contains(p)){fh(f);return}zg(f);const h=Mc(f);$i(()=>{i(h),Ml();const m=ko(f);r&&a({[m[0].label]:!0},{skipHistory:!0,appendOnly:!0}),c.preventDefault(),c.stopPropagation(),fh(f)})}return l.addEventListener("click",s),()=>{l.removeEventListener("click",s)}},[n,t,r,o])}function jK(e){const t=[...e.children],n=e.querySelectorAll("*").length,r=e.childNodes.length,o=[...e.childNodes].filter(a=>a.nodeType===Node.TEXT_NODE&&a.wholeText.trim()==="").length,i=r-t.length-o;return{directDescendants:t,totalDescendants:n,textNodes:i,emptyTextNodes:o,groupedDescendants:t.reduce((a,l)=>{var u;const s=a.at(-1);return s&&((u=s[0])==null?void 0:u.tagName)===l.tagName?s.push(l):a.push([l]),a},[])}}function HK({el:e,index:t,xrayRef:n}){var f;const[r,o]=te.inspectedPath(),i=[...r,[e.tagName,t]],a=(f=n.current)==null?void 0:f.contentWindow.document;let l;try{l=Ht(i,a)}catch(p){return null}const s=e.tagName.toLowerCase();if(s==="style"||s==="script")return;const u=e.id?`#${e.id}`:"",c=!l.checkVisibility();return k("button",{className:"monospace-code",style:{background:l===Mu||l.contains(Mu)?"lightblue":null,textDecoration:c?"underline red":null,viewTransitionName:`inspected${r.length+1}-${t}`},title:c&&"Element is currently not visible",onMouseEnter:()=>{for(const p of a.querySelectorAll(".highlight-descendant"))p.classList.toggle("highlight-descendant",!1);l.classList.toggle("highlight-descendant",!0),l.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},onMouseLeave:()=>{l.classList.toggle("highlight-descendant",!1)},onClick:()=>{$i(()=>{l.classList.toggle("highlight-descendant",!1),o(i),Ml(),setTimeout(()=>{l.scrollIntoView({block:"center",inline:"center"})},1),zg(l)})},children:[s,u]},e)}function GK({xrayRef:e}){var o;const{inspectedPath:t}=xe,{frameRef:n}=w.useContext(qe),r=(o=n.current)==null?void 0:o.contentWindow.document;if(!r)return null;try{const i=Ht(t,r),a=jK(i,r);return k("div",{children:[k("code",{style:{float:"right"},children:[a.directDescendants.length>0&&k("span",{children:[" direct: ",a.directDescendants.length," "]}),a.totalDescendants>a.directDescendants.length&&k("span",{children:[" all: ",a.totalDescendants," "]}),a.textNodes>0&&k("span",{style:{fontWeight:"bold"},children:[" text: ",a.textNodes]})]}),a.directDescendants.map((l,s)=>d(HK,{el:l,index:s,xrayRef:e}))]})}catch(i){return null}}function WK(){const[e,t]=te.elementSelectionMode(),[,n]=te.openGroups(),{openFirstOnInspect:r}=xe,[o,i]=te.inspectedPath(),{frameRef:a}=w.useContext(qe);return k("button",{style:{float:"right",position:"sticky",top:0,outline:e?"4px solid indigo":null},disabled:o.length===0,onBlur:l=>{setTimeout(()=>{t(!1)},200)},onClick:l=>{if(!a.current)return;t(!0);const s=o.slice(0,-1);i(s),Ml();const u=Ht(s,a.current.contentWindow.document);if(r)try{const c=ko(u);n({[c[0].label]:!0},{skipHistory:!0,appendOnly:!0})}catch(c){console.log("Failed getting node",c)}},children:["go up (",o.length,")"]})}function G5(){const{width:e,height:t,inspectedPath:n,themeEditor:{scopes:r}}=xe,[o,i]=w.useState(!1),{frameRef:a,xrayFrameRef:l}=w.useContext(qe),s=window.location.href,[u,c]=be("savedNodes",[]),[f,p]=be("showSavedNodes",!0),[h,m]=be("xrayzoomout",!0),[y,C]=w.useState(!0),[g,v]=w.useState(parseInt(e)),[b,F]=w.useState(parseInt(t)),[_,A]=w.useState(0),[D,O]=w.useState(0),T=400/g,L=1.6,B=Math.min(14,h?T:Math.max(L,T)),G=w.useRef(null);G.current,G.current=B;const fe=Math.min(500,Math.min(b,t)*B+12);w.useEffect(()=>{var U;if(!o)return;const ie=(U=l.current)==null?void 0:U.contentWindow.document,z=ie==null?void 0:ie.documentElement;if(!z)return;z.classList.toggle("doxray",!0);for(const le of ie.querySelectorAll(".xray"))le.classList.remove("xray");const Z=[];if(f)for(const le of u)try{const R=Ht(le,ie);R.classList.add("xray"),Z.push(R)}catch(R){console.log(R,n)}if(n)try{const le=Ht(n,ie),R=Ht(n,a.current.contentWindow.document);if(!le.matches("html")){const K=R.getBoundingClientRect();le.style.width=`${K.right-K.left}px`,le.style.height=`${K.bottom-K.top}px`,zg(le),le.classList.add("xray");const X=le.getBoundingClientRect(),ne=X.right-X.left+24,P=ne>e;v(ne);const Y=X.bottom-X.top+24,M=Y>t;F(Y),A(X.top*-1),O(X.left*-1);const de=setTimeout(()=>{le==null||le.scrollIntoView({block:M?"start":"nearest",inline:P?"start":"nearest"})},100);return()=>{clearTimeout(de)}}}catch(le){}},[n,o,u,f,r,e,t]),w.useLayoutEffect(()=>{var z;if(!y)return;const ie=(z=l.current)==null?void 0:z.contentWindow.document;if(!ie)return null;try{const Z=Ht(n,ie),U=!h&&T{var ie;if(o){const z=(ie=l.current)==null?void 0:ie.contentWindow.document;for(const Z of z.querySelectorAll("a"))try{Z.href="#"}catch(U){}z.addEventListener("mousedown",Z=>{Z.preventDefault(),Z.stopPropagation()},{capture:!0})}},[o]),k("div",{style:{maxWidth:400},children:[!y&&d("h3",{style:{display:"inline-block"},children:"Xray"}),k("div",{children:[d(Ce,{controls:[y,ie=>{C(ie),ie||i(!1)}],children:"Enable"}),y&&k(w.Fragment,{children:[d(Ce,{title:"min zoom level 1.6",controls:[h,m],children:"Zoom out to fit"}),d(WK,{}),d("br",{}),d(Ce,{controls:[Se,()=>{c(Se?u.filter(ie=>!me(ie)):[...u,n])}],children:"Save"}),d(Ce,{controls:[f,p],children:"Show saved"}),f&&k("button",{disabled:u.length===0,onClick:()=>c([]),children:["Clear saved (",u.length,")"]})]}),y&&d(GK,{xrayRef:l})]}),y&&d("div",{style:{maxHeight:fe,overflowY:"hidden",overflowX:B>L||h?"hidden":"visible",visibility:o?"visible":"hidden",clear:"both"},children:k("div",{style:{scale:`${B}`,transform:`translateX(${12+D}px) translateY(${12+Math.max(-fe+12,_)}px)`,transformOrigin:"top left"},children:[d(zK,{frameRef:l,loaded:o}),d("iframe",{onLoad:()=>{i(!0)},resizable:!0,src:s,ref:l,width:e,height:t,style:{width:e,maxWidth:"none",background:"white"}})]})}),k("span",{children:["scale: ",B.toFixed(2)," "]})]})}G5.fName="Xray";const qe=w.createContext({}),UK=e=>{const{frameLoaded:t}=xe,{allVars:n,defaultValues:r}=e,o=w.useRef(null),i=w.useRef(null),a=w.useRef(null),[l,s]=w.useState(!1),[u,c]=be("server-themes-displayed",!0),[f,p]=w.useState(!1),[h,m]=be("full-page-preview",!1),[y,C]=te.openFirstOnInspect();return k(qe.Provider,{value:{allVars:n,defaultValues:r,frameRef:o,scrollFrameRef:i,xrayFrameRef:a,setSheetDisablerDisplayed:p},children:[d(BK,{}),d(MK,{}),d(RK,{}),d(bH,{frameRef:o}),d("div",{className:"theme-editor",children:k(QH,{stateHook:te.uiLayout,children:[k("div",{style:{display:"flex",columns:2,justifyContent:"space-between"},children:[k(lr,{id:"area-top",style:{justifyContent:"flex-start",flexGrow:1},children:[d(Jc,{}),d(Qc,{})]}),k(lr,{id:"area-top-reverse",style:{flexDirection:"row-reverse",justifyContent:"flex-start",flexGrow:1},children:[d(tf,{}),d(Bc,{}),d(_5,{})]})]}),k("div",{style:{display:"flex",justifyContent:"flex-start",flexGrow:"1"},children:[k(lr,{id:"area-left",children:[d(Bl,{}),d(G5,{})]}),k(lr,{id:"area-left-inner",children:[d(rf,{}),k("div",{id:"Filters",style:{display:"flex",alignItems:"flex-start"},children:[d(mK,{}),d(vK,{})]}),d("div",{id:"Inspector",children:t&&d(Zc,{})})]}),d(Ng,{src:window.location.href}),!!h&&d(OK,{src:window.location.href}),k(lr,{id:"area-right",children:[d(w.Fragment,{id:"ThemesList",children:u&&d(Rg,{})}),d(w.Fragment,{id:"StylesheetDisabler",children:f&&d(pK,{})}),d(w.Fragment,{id:"ImportExportTools",children:l&&d(EK,{})})]})]}),k("div",{style:{display:"flex",columns:2,justifyContent:"space-between",flexGrow:0,alignItems:"flex-end"},children:[k(lr,{id:"area-bottom",children:[d(j5,{}),d(H5,{}),d(ef,{}),d(z5,{}),d(R5,{})]}),d(lr,{id:"area-bottom-reverse",style:{flexDirection:"row-reverse"},children:k("div",{id:"ExtraPanelsMenu",className:"theme-editor-menu",children:[d(Rt,{controls:[l,s],children:"Import/export"}),d(Rt,{controls:[f,p],children:"Stylesheets"}),d(Rt,{controls:[u,c],children:"Themes"})]})}),k(FK,{children:[d(Lg,{}),d(L5,{}),d(nf,{}),k("div",{id:"InspectionSettings",children:[d(Ce,{controls:[h,m],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"}),d(Ce,{controls:[y,C],children:"Auto open first group on inspect"}),d(Ce,{controls:te.enableScrollingInView(),children:"Scroll into view in history"})]}),d(I5,{}),d(Oc,{}),d(T5,{}),d(D5,{}),d(M5,{}),d(N5,{}),d($5,{}),d(Ig,{})]})]})]})})]})};let Md;const VK=(e,t,n)=>{const r=d(VH,{previewComponents:nV,children:d(UK,{allVars:t,defaultValues:n})});Md||(Md=qx(e)),Md.render(r)},KK="https://unpkg.com/source-map@0.7.3/dist/source-map.js",YK=()=>new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",KK),n.addEventListener("load",e),n.addEventListener("error",t),document.head.appendChild(n)}),XK=()=>tt(Be,null,function*(){var e;return(yield YK())&&((e=window.sourceMap)==null?void 0:e.SourceMapConsumer.initialize({"lib/mappings.wasm":"https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"}))}),qK=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 JK(e,{comments:t,rulesWithMap:n,rogueAtRules:r,sheet:o}){let i=[];const a=[];let l=0,s=0,u=0,c="",f,p,h=!1,m="",y=0,C=0,g=!1,v=!1,b=!1,F=!1,_=0,A,D="",O,T;const L={"{"(){if(g)return;T=!1;const Q=c.trim();if(F){F=!1,a.push(Q),c="";return}i.push([[f,p],Q]),A={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(T=!1,h)h=!1,D&&(A.stylemap.set(D,c.trim()),D=""),A.end={line:l,col:s-u-1},n.push(A),A=null;else{const Q=a.pop();let B=c.trim();B!==""&&(i.length>0&&(B=i.map(([,G])=>G).join()+", "+B),r.push({text:Q,body:B})),i=[]}c=""}},"\n"(){T=g&&!v,v&&(t.push({line:y,col:C,text:m,inline:!0}),m="",g=!1,v=!1),_=0,l++,u=s},"/"(){g&&!v&&O==="*"?(T=!1,g=!1,t.push({line:y,col:C,text:m.slice(0,-1),inline:!1}),m=""):!g&&_===0&&O==="/"&&(T=!1,g=!0,v=!0,y=l,C=s-u-1,m="",c=c.slice(0,-1))},"*"(){!g&&O==="/"&&(T=!1,g=!0,y=l,C=s-u-1,c=c.slice(0,-1))},"@"(){!g&&!h&&(F=!0,c="")},":"(){h&&D===""&&(D=c.trim(),c="",T=!1)},";"(){h&&_===0?(A.stylemap.set(D,c.trim()),c="",D="",T=!1):F&&(F=!1,c="",T=!1)},"("(){g||(_+=1)},")"(){g||(_-=1)},"\\"(){b=!0},","(){if(!g&&!h&&!F&&_===0){const Q=c.trim();i.push([[f,p],Q]),T=!1,c=""}}};for(const Q of e){if(T=!0,b)b=!1;else{const B=L[Q];B&&B()}if(T)if(g)m+=Q;else{const B=Q.trim()==="",G=c==="";(!B||!G)&&(c+=Q),G&&!B&&(f=l,p=s-u-1)}s++,O=Q}}const W5=/:(active|focus(-(visible|within))?|visited|hover)/g;function QK(e){return e.replaceAll(W5,":is(:$1, ._force-$1)")}const ZK=/([\w\])-])(:(\-[\w-]+|:\-?[\w-]+|before|after|active|focus(-(visible|within))?|visited|hover))+/g;function eY(e){const t=e.replaceAll(ZK,"$1").replaceAll(W5,"*").replaceAll(/\s+/g," ").replaceAll(/\s*,\s*/g,",").replaceAll(/:not\(\*\)/g,"").trim();return t===""||t.startsWith("::")?"*":t}function tY({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=QK(i),o.testSelectors=new Set;for(const[,l]of o.selectors){const s=eY(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 fh(e){[...e.children].forEach(t=>{getComputedStyle(t).pointerEvents==="none"&&(t.style.pointerEvents="auto")})}const Ob=window.self!==window.top,nY=XK(),Bb=e=>{[...document.styleSheets].forEach(t=>{if(!t.href)return;const n=t.href.replace(/\?.*/,"");t.disabled=!!e[n]})};let mr=document.createElement("style");document.head.appendChild(mr);const jg="__forced-styles__";mr.id=jg;let ba={};document.title=`🖌${document.title}`;function rY(e){let t="";for(const n in e)t+=` ${n}: ${e[n]} !important;`;return t}function oY(e,t){const n=`${e} {${rY(t)} }`;if(!(e in ba)){ba[e]=mr.sheet.insertRule(n,Object.keys(ba).length);return}const r=ba[e];mr.sheet.cssRules[r].cssText!==n&&(mr.sheet.insertRule(n,r),mr.sheet.deleteRule(r+1))}function U5(e,t=!1){t&&([...mr.sheet.cssRules].forEach(()=>mr.sheet.deleteRule(0)),ba={}),Object.entries(e).forEach(([n,r])=>{oY(n,r)})}function iY(){[...document.body.childNodes].forEach(e=>{["STYLE","LINK","SCRIPT"].includes(e.nodeName)||document.body.removeChild(e)})}let Mb=[],aY=[],lY=[],sY=[],uY=[],cY=new Map,Ma;const Bs=new WeakMap;function fY(e){return Bs.has(e)}function ko(e){if(Bs.has(e))return Bs.get(e);const t=c2({cssVars:Ma,target:e}),n=mU(t,e,Ma),r=wU(n);return Bs.set(e,r),r}let V5;function dY(){return V5}const pY=e=>tt(Be,null,function*(){var s;if(xF(e.localStorageNamespace||""),!Ob){yield nY,jF(e.serverThemes),Ma=yield r4();const u=qK(Ma);V5=u;const c=[...document.styleSheets].filter(p=>{var h;return((h=p.ownerNode)==null?void 0:h.id)!==jg});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;JK(h,{comments:lY,rulesWithMap:Mb,rogueAtRules:aY,sheet:p})}tY({rulesWithMap:Mb,keyframesRules:sY,selectorRules:uY,testSelectors:cY}),iY();const f=document.createElement("div");VK(f,Ma,u),xH(),f.id="theme-editor-root",document.body.appendChild(f)}const t={};let n=null,r=!1,o=null;if(!Ob){ZV();return}document.documentElement.classList.add("force-cursor");const i=localStorage.getItem(l0()+"set-disabled-sheets");if(i){const u=JSON.parse(i);Bb(u)}let a;const l=u=>{const{type:c,payload:f}=u.data,{index:p,selector:h,scopes:m,resetAll:y,path:C}=f||{};switch(c){case"scroll-in-view":const g=h?t[h][p]:Ht(f.path);if(g.scrollIntoView(f.options||{behavior:"smooth",block:"center",inline:"end"}),el(g),n){const[F,_,A]=n;window.clearTimeout(F),A!==g&&_()}const v=()=>{fi(g),n=null};n=[setTimeout(v,1500),v,g];break;case"set-sheet-config":Bb(JSON.parse(f));break;case"set-scopes-styles":U5(m,y);break;case"force-scroll":r=!0,window.scrollTo({top:f.position,behavior:f.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)}),ua="all-the-themes";pY({serverThemes:{fetchThemes:()=>JSON.parse(localStorage.getItem(ua)),uploadTheme:(e,t)=>{const n=JSON.parse(localStorage.getItem(ua))||{};n[e]=t,localStorage.setItem(ua,JSON.stringify(n,null,2))},deleteTheme:e=>{const t=JSON.parse(localStorage.getItem(ua))||{};delete t[e],localStorage.setItem(ua,JSON.stringify(t,null,2))}}})});export default hY(); + 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 🔍"})]})}rf.fName="CursorBehavior";let po;function eK(){po={prep:{name:"prep",steps:[of]},basics:{name:"basics",steps:[Ng,Zc,nf,Oc,Bc]},history:{name:"history",steps:[Jc,Bg,Ml,Mg,Qc]},inspection:{name:"inspection",steps:[rf]},changes:{name:"changes",steps:[tf]},themes:{name:"themes",steps:[Rg]}}}let _t;function tK(){_t="prep",af()}function nK(){_t=null,Rn=0,af()}const bb=k(Ct,{el:of,children:[d("div",{style:{minWidth:"600px"}}),d("h1",{children:"Preparation"}),d("h2",{children:"Checklist"}),k("ul",{children:[k("li",{children:[d("b",{children:"Use a large screen. "}),"On smaller screens you will likely have to remove some UI elements from the screen."]}),k("li",{children:[d("b",{children:"Mouse is required for some interactions"}),". Other types of input will be added at a later point to simplify development."]}),k("li",{children:["For now, ",d("b",{children:"a P3 capable monitor"})," is required to properly display the `oklch` color pickers, but the UI does not validate this yet. You can use the external ",d("a",{target:"_blank",href:"https://oklch.com/",children:'"online picker" link'}),' below color pickers, and enable the "Show P3" toggle, which will then indicate whether your current environment (monitor + OS/software settings) supports P3.']})]}),d("h2",{children:"Things to be aware of / watch out for"}),k("ul",{children:[k("li",{children:["The quality and mostly the quantity of CSS on a page has a big impact on the quality of the experience. The ",d("a",{href:"https://inwerpsel.github.io/use-theme-editor/demo/halfmoon/docs/forms",children:"halfmoon demo"})," currently has the most complete and glitch free experience."]}),d("li",{children:"You can display data that does not use CSS variables, but can't modify those values yet."}),d("li",{children:"There are some bugs and possible crashes when using pin together with lock system."})]})]});function of(){return A5()?_t==="prep"?k(w.Fragment,{children:[d("button",{onClick:nK,children:"Exit tutorial"}),bb]}):bb:d("button",{onClick:tK,children:"Start tutorial"})}let Rn=0;function k5(){ch=null,setTimeout(()=>{ch===null&&$5(!0)},100)}function rK(e){if(Rn>=po[_t].steps.length-1){const t=[...Object.keys(po)],n=t.indexOf(_t);_t=t[n+1],Rn=0}else Rn++;_t||alert("Congratulations, you finished the tutorial!"),af(),e.stopPropagation(),e.preventDefault(),_t&&k5()}function oK(e){if(Rn===0){const t=[...Object.keys(po)],n=t.indexOf(_t);_t=t[n-1],Rn=po[_t].steps.length-1}else Rn--;af(),e.stopPropagation(),e.preventDefault(),k5()}function iK(){return _t==="prep"&&Rn===0?null:d("button",{onClick:oK,children:"Previous"})}const uh=new Set;function af(){for(const e of uh)e()}function aK(e){return uh.add(e),()=>{uh.delete(e)}}function lK(){return _t?po[_t].steps[Rn]:null}function A5(){return w.useSyncExternalStore(aK,lK)}let ch=null,$5;function sK({label:e,done:t}){return d("li",{"data-done":t,children:e})}function uK(e){const t=[];let n=!0;for(const r of e){const[o,i]=r(xe);t.push([o,i]),n&&(n=i)}return[n,t]}function Ct({el:e,children:t,tasks:n=[]}){const[r,o]=uK(n),{setDrawerOpen:i}=w.useContext(ko);$5=i;const a=w.useRef(),l=w.useRef(),s=e===A5();return w.useEffect(()=>{var u;s&&(ch=e),(u=a.current)==null||u.scrollIntoView({behavior:"smooth"})},[s]),w.useEffect(()=>{var u;(u=l==null?void 0:l.current)==null||u.focus()},[s]),s?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:[_t," ",Rn+1,"/",po[_t].steps.length]}),t,d("ul",{children:o.map(([u,c])=>d(sK,{label:u,done:c}))}),d(iK,{}),d("button",{ref:l,disabled:!r,onClick:rK,children:"Next"})]}):null}of.fName="StartTutorial";const la=16;let wb=-1/0;function Rl(){setTimeout(()=>{const e=document.querySelector(".var-group:first-child");e==null||e.scrollIntoView({block:"start"})},0)}let xb;function cK({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r,enableScrollingInView:o}=xe,[i,a]=te.inspectedPath(),[,l]=te.openGroups();w.useEffect(()=>{var c;const s=(c=e.current)==null?void 0:c.contentWindow.document;if(!s)return;function u(f){if(n==="alt"&&!f.altKey)return;const p=f.target;if(f.preventDefault(),f.stopPropagation(),p===xb)return;const h=Mc(p);if(h===i)return;a(h);const g=Ao(p);r&&l({[g[0].label]:!0},{skipHistory:!0,appendOnly:!0}),wb=performance.now(),el(p),setTimeout(()=>{di(p)},700),dh(p),p.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"}),Rl(),xb=p}return s.addEventListener("click",u),()=>{s.removeEventListener("click",u)}},[n,t,r]),w.useEffect(()=>{var s;if(o&&!(performance.now()-wb<400))try{const u=Ht(i,(s=e.current)==null?void 0:s.contentWindow.document);if(!u||u.nodeName==="BODY"||u.nodeName==="HTML")return;u.scrollIntoView({block:"center",inline:"nearest"}),el(u);const c=setTimeout(()=>{di(u)},700);return()=>{clearTimeout(c),di(u)}}catch(u){}},[i,t,o])}function fK({frameRef:e,loaded:t}){const n=gn();w.useEffect(()=>{var i;const r=(i=e.current)==null?void 0:i.contentWindow.document;if(!r)return;function o(a){var g,y,C;const l=a.dataTransfer.getData("value")||a.dataTransfer.getData("text/plain");if(!l||l.startsWith("http"))return;const s=a.target,u=Ao(s),c=[];let f=0;for(const m of u){f++;const v=["background-color","background","background-image","color","border-color","outline-color"];for(const b of v)for(const F of m.vars)((g=F.maxSpecific)==null?void 0:g.property)===b&&!F.isRawValue&&((y=F.usages[0])!=null&&y.isFullProperty)&&c.push({element:f,property:b,varName:F.name,scope:(C=m.scopes.find(_=>_.scopeVars.some(A=>A.name===F.name)))==null?void 0:C.selector})}if(c.length===0)return;const[p,...h]=c;n({type:Me.set,payload:{name:p.varName,scope:p.scope,value:l,alternatives:h}}),a.stopPropagation()}return r.addEventListener("drop",o),r.addEventListener("dragenter",ys),r.addEventListener("dragover",ys),()=>{r.removeEventListener("drop",o),r.removeEventListener("dragenter",ys),r.removeEventListener("dragover",ys)}},[t])}function ys(e){e.preventDefault()}const Ng=e=>{const{src:t}=e,{frameRef:n}=w.useContext(qe),[r,o]=te.frameLoaded(),[i,a]=te.width(),[l,s]=te.height(),u=xe.scales[`${i}x${l}`]||1;return d("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 f=parseInt(c.currentTarget.style.height.replace("px",""))-la,p=parseInt(c.currentTarget.style.width.replace("px",""))-la;isNaN(f)||isNaN(p)||(s(f),a(p))},style:{transform:`scale(${u})`,resize:"both",minWidth:"200px",width:`max(calc(${la+parseInt(i)}px * ${u}), ${la+parseInt(i)}px)`,minHeight:"200px",height:`${la+parseInt(l)}px`,overflow:"hidden",padding:"0",boxSizing:"border-box",marginLeft:"1rem"},children:[dK,d("iframe",{onLoad:()=>o(!0),className:"responsive-frame",ref:n,src:t,width:parseInt(i),height:parseInt(l)}),d(cK,{frameRef:n,loaded:r}),d(fK,{frameRef:n,loaded:r})]})})},dK=d(Ct,{el:Ng,tasks:[e=>["Click any element on the page",e.inspectedPath!==""]],children:"Select an element here to see all its styles."}),_5=()=>{const{themeEditor:{scopes:e}}=xe,t=gn(),[n,r]=w.useState(!1),o=e[Lt]||{},[i,a]=w.useState(!1),[l,s]=w.useState(""),[u,c]=w.useState(""),f=l in o,p=/^--[a-zA-Z0-9][a-zA-Z0-9_-]+/.test(l);return k("div",{style:{marginBottom:"8px"},children:[d(Rt,{controls:[n,r],children:"Custom variable"}),n&&k("div",{children:[k("form",{onSubmit:h=>(t({type:Me.set,payload:{name:l,value:u}}),h.preventDefault(),!1),children:[d(Ve,{value:l||"--",onChange:h=>{s(h.replace(" ","-").replace(/^-*/,"--"))}}),d("br",{}),d(Ve,{required:!0,value:u,onChange:c}),d("button",{disabled:!p||u===o[l]||!i&&f,title:f?o[l]===u?"Variable already has this value":`Overwrite existing value of ${o[l]}`:"Add new variable",children:"Add"})]}),f&&k("div",{children:[d("button",{onClick:()=>{t({type:Me.unset,payload:{name:l}})},children:"Unset"}),d(Ce,{controls:[i,a],children:"Confirm overwrite existing"}),k("div",{children:["Current value: ",o[l]]})]})]})]})};_5.fName="CustomVariableInput";const pK=(e,t)=>{w.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])},hK=()=>{const{frameRef:e,setSheetDisablerDisplayed:t}=w.useContext(qe),[n,r]=be("set-disabled-sheets",{}),o=[...document.styleSheets].filter(({href:i})=>!!i);return pK(n,e),o===null?d("div",{children:"Loading..."}):k("div",{style:{background:"white",color:"black",border:"1px solid black",borderRadius:"6px",padding:"5px"},children:[d("button",{style:{float:"right"},onClick:()=>t(!1),children:"Close"}),d("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 ",d("b",{children:"while in the editor"}),"."]}),d("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(ae(V({},n),{[a]:!n[a]||null}))},children:[d("input",{readOnly:!0,type:"checkbox",checked:!n[a]}),u.join("/"),"/",d("b",{children:s.at(-1)})]},i)})})]})},gK={all:{label:"All"},colors:{label:"Colors"}},mK=Object.entries(gK).map(([e,{label:t}])=>({value:e,label:t}));function vK(){const[e,t]=te.propertyFilter();return d(yt,{className:"property-category-filter",title:"Filter by category",value:e||"all",onChange:t,options:mK})}function yK(){const[e,t]=te.search(),n=w.useRef();return oi("ctrl+/,cmd+/",()=>{var r;(r=n.current)==null||r.focus()}),k(w.Fragment,{children:[d(Ve,{value:e,inputRef:n,onChange:t,placeholder:"search (cmd+/ or ctrl+/)",style:{marginRight:e?"24px":"4px",flexShrink:1,maxWidth:"52%"},autoComplete:"on"}),!!e&&d("button",{style:{position:"relative",right:"48px",width:"30px"},title:"clear",onClick:()=>t(""),children:"x"}),d(BS,{id:"show-raw-values",hook:te.showRawValues,title:"View only",children:"Raw values"})]})}const bK=(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?V(V({},r),ensured):u;e({type:Me.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])},wK={":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"}},xK={scopes:wK},CK={":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)"}},SK={scopes:CK};function Cb(e,t){const n=gn(),r=bg("fileName");return()=>{n({type:Me.loadTheme,payload:{theme:e}}),r(t)}}function EK(){const[e,t]=w.useState(!1);return k(w.Fragment,{children:[d(Rt,{controls:[e,t],children:"Presets"}),e&&k(w.Fragment,{children:[d("button",{onClick:Cb(SK,"kapow-gray"),children:"Kapow gray"}),d("button",{onClick:Cb(xK,"kapow-colorful"),children:"Kapow colors"})]})]})}function FK(){const[{scopes:e},t]=te.themeEditor();w.useContext(qe);const n=e[Lt]||{},[r,o]=te.fileName(),[i,a]=w.useState(!1);return w.useState(!1),k("div",{style:{background:"white",padding:"16px"},children:[d(EK,{}),d("div",{children:d(Ce,{controls:[i,a],children:"Merge into current theme"})}),k("div",{children:[d("button",{onClick:()=>SH(r,e),children:"Export JSON"}),d("button",{onClick:()=>kH(r,e),children:"Export CSS"})]}),d("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Upload JSON:",d("input",{type:"file",accept:".json",onChange:l=>{bK(t,l,i,n,o)},style:{cursor:"copy"}})]})}),d("div",{children:k("label",{style:{background:"rgba(255,255,255,.3)",cursor:"copy"},children:[" Import history JSON",d("input",{type:"file",accept:".json",onChange:l=>{const s=new FileReader;s.onload=u=>{try{const c=JSON.parse(u.target.result);RH(c)}catch(c){console.log("failed uploading",c)}},s.readAsText(l.target.files[0])},style:{cursor:"copy"}})]})}),d(Ve,{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?V(V({},n),s):s;t({type:Me.loadTheme,payload:{theme:u}})}catch(s){console.log(s)}}})]})}function D5(){const{existsOnServer:e,modifiedServerVersion:t,themeEditor:{scopes:n}}=xe,[r,o]=te.fileName(),[,{uploadTheme:i}]=te.serverThemes();return k("div",{children:[d(Ve,{value:r,onChange:o,style:{width:"130px",clear:"both"},placeholder:"theme"}),d("button",{style:{clear:"both"},disabled:!r||r==="default",onClick:()=>tt(this,null,function*(){e&&!confirm("Overwrite theme on server?")||i(r,n)}),children:e?`Save${t?" (*)":""}`:"Upload"})]})}D5.fName="ThemeUploadPanel";const Sb="responsive-size-controls";function Ig(){const[e,t]=te.width(),[n,r]=te.height();return k("div",{className:Sb,id:Sb,children:[k("span",{children:[d("input",{type:"number",onChange:o=>t(parseInt(o.target.value)),value:e})," x ",d("input",{type:"number",onChange:o=>r(parseInt(o.target.value)),value:n})]}),d(Ct,{el:Ig,children:"Enter precise screen dimensions here if necessary."})]})}Ig.fName="FrameSizeSettings";const Eb={empty:{map:{CommentBox:["area-left",2],MoveControls:["drawer",1],HistoryVisualization:["drawer",2],HistoryStash:["drawer",3],HistoryControls:["drawer",4],StartTutorial:["drawer",5],ScreenSwitcher:["drawer",6],FrameScaleSlider:["drawer",7],Inspector:["drawer",8],ThemeUploadPanel:["drawer",9],Selectors:["drawer",11],InformationVisibilitySettings:["drawer",12],InspectionSettings:["drawer",13],ColorSettings:["drawer",14],Palette:["drawer",15],PickedValue:["drawer",16],FullscreenToggle:["drawer",17],NoteBox:["drawer",18],CursorBehavior:["drawer",19],RemoveAnnoyingPrefix:["drawer",20],FullHeightFrameScale:["drawer",21],ExtraPanelsMenu:["drawer",22],StylesheetDisabler:["drawer",23],ImportExportTools:["drawer",24],ThemesList:["drawer",25],Filters:["drawer",26],Xray:["drawer",27],FrameSizeSettings:["drawer",28],WebpackHomeInput:["drawer",29],CustomVariableInput:["drawer",30],CurrentTheme:["drawer",31],NameReplacements:["drawer",32]}},xrayTopLeft:{map:{HistoryVisualization:["area-bottom",1],Palette:["area-bottom-reverse",6],PickedValue:["area-bottom",3],NoteBox:["area-bottom-reverse",1],ExtraPanelsMenu:["area-bottom-reverse",2],CursorBehavior:["area-bottom-reverse",3],CommentBox:["area-left",2],Xray:["area-left",3],MoveControls:["area-left",4],Inspector:["area-left-inner",1],Selectors:["drawer",11],ColorSettings:["drawer",13],InformationVisibilitySettings:["drawer",12],InspectionSettings:["area-right",4],FullHeightFrameScale:["area-right",5],ThemesList:["area-right",6],ImportExportTools:["area-right",7],HistoryControls:["area-top",1],HistoryStash:["area-top",2],Filters:["area-top",3],FullscreenToggle:["area-bottom-reverse",4],FrameScaleSlider:["area-top-reverse",2],ScreenSwitcher:["area-top-reverse",3],StartTutorial:["drawer",10],RemoveAnnoyingPrefix:["area-bottom-reverse",5],NameReplacements:["drawer",2],FrameSizeSettings:["drawer",3],CustomVariableInput:["drawer",4],CurrentTheme:["drawer",5],ThemeUploadPanel:["drawer",6],StylesheetDisabler:["drawer",8],WebpackHomeInput:["drawer",9]}}};function kK({setUiState:e,inputName:t,setInputName:n}){return k(w.Fragment,{children:[d("label",{htmlFor:"",children:"Presets: "}),d(yt,{value:t,options:[{label:"",value:""},...Object.entries(Eb).map(([r])=>({label:r,value:r}))],onChange:r=>{n(r),r!==""&&fo(()=>{e(Eb[r])})}})]})}function Lg(){const{uiState:e,setUiState:t,resetPanels:n,dragEnabled:r,setDragEnabled:o,showMovers:i,setShowMovers:a,drawerOpen:l}=w.useContext(ko),[s]=_l(),[u,c]=te.windowArrangments(),[f,p]=be("panel-arrangements-name",""),h=w.useMemo(()=>JSON.stringify(e)===u[f],[u,e,f]);return k("div",{children:[d(wg,{}),d(Ct,{el:Lg,tasks:[()=>["Enable dragging elements",w.useContext(ki).hostAreaId==="area-right"||r],()=>["Move the element from the drawer to any other area",(w.useContext(ki).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.'}),d(Ce,{controls:[r,o],children:"Drag elements"}),d(ef,{}),!s&&k(w.Fragment,{children:[d(Ce,{controls:[i,a],children:"Move elements"}),Object.keys(e.map).length>0&&d("button",{onClick:()=>fo(()=>n()),children:"reset"}),k("div",{children:[d(Ve,{value:f,onChange:p}),d("button",{disabled:f.length===0,onClick:()=>{f in u&&!confirm("Update arrangement?")||f.length!==0&&c(ae(V({},u),{[f]:JSON.stringify(e)}))},children:"Save"}),d(yt,{value:h?f:"",options:[{label:"",value:""},...Object.entries(u).map(([g])=>({label:g,value:g}))],onChange:g=>{p(g),g!==""&&fo(()=>{t(JSON.parse(u[g]))})}}),d(kK,{setUiState:t,inputName:f,setInputName:p})]})]})]})}Lg.fName="MoveControls";function AK({children:e}){const{drawerOpen:t,setDrawerOpen:n}=w.useContext(ko);return k("div",{id:"drawer-wrapper",children:[d(lr,{id:"drawer","data-open":t,children:e}),d(Rt,{id:"drawer-opener",controls:[t,n],children:"Drawer"})]})}function P5(){const{propertyFilter:e,search:t}=xe,n=gn(),{allVars:r,defaultValues:o}=w.useContext(qe),[i,a]=w.useState(!1),[l,s]=w.useState(!0),[u,c]=w.useState(!0),[f,p]=be("current-theme-open",!1),h="UNFOUND",g=w.useMemo(()=>f?Object.keys(o).reduce((y,C)=>{const m=r.find(_=>_.name===C),v=t.replace(/^\!/,""),b=v.length!==t.length;if(!m)return v&&C.replace(/-+/g," ").match(v)||b||(y[h]||(y[h]=[]),y[h].push({name:C})),y;if(!S5(m,v)||b||e!=="all"&&!Bl(m))return y;const F=m.statelessSelector.replace(/,\s\:where.*\*$/,"");return y[F]||(y[F]=[]),y[F].push(m),y},{}):{},[f,e,t]);return k("div",{children:[k("h4",{children:[Object.keys(o).length,")",d(Rt,{style:{float:"right"},controls:[f,p],children:f?"Close":"Open"})]}),f&&k("div",{children:[d(Ce,{controls:[l,s],children:"Show active"}),d(Ce,{controls:[i,a],children:"Show unknown"}),d(Ce,{controls:[u,c],children:"Hide not found"})]}),f&&d("ul",{style:{background:"white",listStyleType:"none",paddingLeft:0},children:Object.entries(g).map(([y,C])=>d("li",{style:{marginTop:"12px"},children:d(co,{hideIfNotFound:u,selector:y,children:d("ul",{children:C.map(m=>{const v=m.name;return y===h&&i?d("li",{children:k("p",{children:[d("em",{children:v})," was not found.",d("button",{onClick:()=>{n({type:Me.unset,payload:{name:v}})},children:"unset"})]})},v):!l||y===h?null:d(Vi,{onChange:b=>{n({type:Me.set,payload:{name:m.name,value:b}})},onUnset:()=>{n({type:Me.unset,payload:{name:m.name}})},cssVar:m},v)})})})},y))})]})}P5.fName="CurrentTheme";function $K(){return"_"+Math.random().toString(36).substr(2,9)}function _K(e,t){return[...e,ae(V({},t),{order:e.reduce((n,r)=>Math.max(n,r),-1)+1})].sort(T5)}function T5({order:e},{order:t}){return e-t}function sa(e,t){return e.map(n=>n.id!==t.id?n:t).sort(T5)}function O5(){const[e,t]=te.nameReplacements(),[n,r]=w.useState(""),[o,i]=w.useState(""),[a]=_l();return k("div",{children:[d(wg,{}),d(ef,{}),d("h4",{children:"Replace strings in names"}),!a&&d("ul",{style:{maxHeight:"30vh",overflowY:"auto"},children:e.map(l=>{const{id:s,from:u,to:c,order:f,active:p}=l;return k("li",{style:{display:"flex"},children:[k("div",{children:[d(Ve,{value:u,onChange:h=>{t(g=>sa(g,ae(V({},l),{from:h})))},placeholder:"From"}),d(Ve,{value:c,onChange:h=>{t(g=>sa(g,ae(V({},l),{to:h})))},placeholder:"From"})]}),d("button",{onClick:()=>{t(h=>sa(h,ae(V({},l),{order:f-1})))},children:"down"}),d("button",{onClick:()=>{t(h=>sa(h,ae(V({},l),{order:f+1})))},children:"up"}),d(Ce,{controls:[p,()=>t(h=>sa(h,ae(V({},l),{active:!p})))]}),d("button",{onClick:()=>{t(h=>h.filter(g=>g.id!==s))},children:"X"})]},s)})}),!a&&k("div",{style:{display:"flex"},children:[k("div",{children:[d(Ve,{value:n,onChange:r,placeholder:"From"}),d(Ve,{value:o,onChange:i,placeholder:"To"})]}),d("button",{disabled:n.length<2||o.length<1,onClick:()=>{t(l=>_K(l,{id:$K(),to:o,from:n,active:!0})),i(""),r("")},children:"Add"})]})]})}O5.fName="NameReplacements";const B5=20;let Fb=0,kb=0,ar;function Ab(e){if((ar==null?void 0:ar.length)===0&&(Fb++,Fb===B5))return[];if(ar&&ar.length>0)return ar;const t=[...e.querySelectorAll("*")].filter(n=>getComputedStyle(n).position==="fixed");return ar=t.filter(n=>!t.some(r=>r!==n&&r.contains(n))),ar}let Gr;function DK(e,t){let n=e.parentNode;for(;n;){if(t.includes(n))return!0;n=n.parentNode}return!1}function $b(e,t){if((Gr==null?void 0:Gr.length)===0&&(kb++,kb===B5))return[];if(Gr&&Gr.length>0)return Gr;const n=[...e.querySelectorAll("*")].filter(r=>getComputedStyle(r).position==="sticky"&&!DK(r,t));return Gr=n,n}const M5="transform .07s ease-out";function PK(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){_b(i);continue}const y=Math.min(g,t-f+c);y>0&&o.add(i),i.style.transform=`translateY(${y}px)`,i.style.transition=M5}}const BK=28;function MK(e){const{src:t}=e,{width:n,height:r,fullHeightFrameScale:o,fullHeightFrameShowFixed:i}=xe,a=1/o,[l,s]=w.useState(0),[u,c]=w.useState(!1),[f,p]=w.useState(0),[h,g]=w.useState(0),[y,C]=w.useState(null),[m,v]=w.useState(!1),[b,F]=w.useState(null),_=w.useRef();w.useEffect(()=>{var B;y!==null&&((B=A.current)==null||B.contentWindow.postMessage({type:"force-scroll",payload:{position:y,shouldSmoothScroll:m}},window.location.origin))},[y]);const{frameRef:A,scrollFrameRef:D}=w.useContext(qe);w.useEffect(()=>{D.current.contentDocument.documentElement.classList.add("hide-scrollbars"),setTimeout(()=>{var G;D.current.contentDocument.documentElement.classList.add("hide-scrollbars");const B=({data:{type:fe,payload:me}})=>{fe==="frame-scrolled"&&(s(me.scrollPosition),C(null))};return window.addEventListener("message",B),(G=A.current)==null||G.contentWindow.postMessage({type:"emit-scroll"},window.location.origin),()=>{window.removeEventListener("message",B)}},2e3)},[]),w.useEffect(()=>{const B=D.current.contentWindow.document,G=Ab(B),fe=$b(B,G);if(i)for(const me of[...G,...fe])me.classList.remove("hide-important");else{for(const me of[...G,...fe])me.classList.add("hide-important");return}},[i]),w.useEffect(()=>{F(A.current.contentWindow.document.body.parentNode.scrollHeight);const B=setTimeout(()=>{F(A.current.contentWindow.document.body.parentNode.scrollHeight)},800);return()=>{clearTimeout(B)}},[n,r]);let O=0;w.useLayoutEffect(()=>{if(!i)return;const B=performance.now();if(B-O>50){const G=D.current.contentWindow.document,fe=Ab(G),me=$b(G,fe);O=B,OK(me,l,r,D.current),PK(fe,l,r,D.current)}return()=>{}},[l,r,i]);const T=Math.max(0,(u&&y||l)*o),L=B=>{u&&(C(h-(f-B.clientY)*a),v(!1))},Q=B=>{const G=B.clientY-T-D.current.parentNode.getBoundingClientRect().top;C(Math.max(0,l+G*a-r/2)),v(!1)};return k("div",{onWheel:B=>{C(Math.max(0,l+B.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:`${BK+n}px`,overflow:"visible"},children:[d("div",{onMouseDown:Q,onMouseUp:()=>c(!1),onMouseMove:L,style:{zIndex:1,position:"absolute",top:0,right:0,bottom:0,left:0}}),d("iframe",{className:"responsive-frame",ref:D,src:t,width:n,height:Math.max(r,b),style:{width:n}})]}),d("span",{ref:_,onClick:Q,onMouseDown:B=>{c(!0),p(B.clientY),g(l)},onMouseMove:L,onMouseUp:()=>c(!1),style:{userSelect:"none",zIndex:2,top:T,position:"absolute",display:"inline-block",outline:"3px solid oklch(40.10% 0.2213 301.68)",width:n*o,height:(r-8)*o,transition:"top .05s ease-out",boxSizing:"content-box",visibility:u?"hidden":""}})]})}function R5(){const[e,t]=te.fullHeightFrameShowFixed(),[n,r]=te.fullHeightFrameScale(),[o,i]=st("fullheightframescalestep","0.01");return k("div",{style:{display:"flex"},children:[d("input",{type:"number",style:{maxWidth:"72px"},value:n,step:o,onChange:a=>{r(a.target.value)}}),k("label",{children:["step",d("input",{type:"number",style:{maxWidth:"72px"},value:o,onChange:a=>{i(a.target.value)}})]}),d(Ce,{controls:[e,t],children:"Show fixed and sticky"})]})}R5.fName="FullHeightFrameScale";function N5(){return k("div",{style:{display:"flex",gap:"4px"},children:[d(Ce,{controls:te.includeDefaultPalette(),children:"Include default palette"}),d(Ce,{title:"Disable this to get the best experience",controls:te.nativeColorPicker(),children:"Native color picker"}),d(Ce,{controls:te.maximizeChroma(),children:"Maximize chroma when dropping"})]})}N5.fName="ColorSettings";function I5(){const[e,t]=te.showCssProperties();return k("div",{style:{display:"flex",gap:"4px"},children:[d(Ce,{id:"show-css-properties",controls:[e,t],children:"Show CSS properties"}),d(Ce,{id:"link-css-properties",controls:te.linkCssProperties(),children:"Link CSS properties"}),d(Ce,{id:"show-source-links",controls:te.showSourceLinks(),children:"Show source links"})]})}I5.fName="InformationVisibilitySettings";function L5(){const[e,t]=te.webpackHome();return d(Ve,{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"})}L5.fName="WebpackHomeInput";function RK(){const{themeEditor:{scopes:e},frameLoaded:t}=xe,{frameRef:n,scrollFrameRef:r,xrayFrameRef:o}=w.useContext(qe);return w.useInsertionEffect(()=>{V5(e,!0)},[e]),w.useEffect(()=>{var i,a;n.current.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(i=r.current)==null||i.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin),(a=o.current)==null||a.contentWindow.postMessage({type:"set-scopes-styles",payload:{scopes:e,resetAll:!0}},window.location.origin)},[e,t]),null}function NK(){const e=gn();return w.useEffect(()=>{window.addEventListener("message",t=>{if(t.data.type==="dropped-options"){const{options:n,value:r}=t.data.payload,[o,...i]=n;e({type:Me.set,payload:{name:o.varName,scope:o.scope,value:r,alternatives:i}})}},!1)},[]),null}function Tb(){document.fullscreenElement!==this?this.requestFullscreen():document.exitFullscreen()}function z5(){var i;const{frameRef:e}=w.useContext(qe),[t,n]=w.useState(!1),r=d("button",{onClick:()=>{var l;const a=(l=e.current)==null?void 0:l.parentNode;n(document.fullscreenElement!==a),Tb.bind(a)()},children:"fullscreen preview"}),o=k(w.Fragment,{children:[d("button",{onClick:Tb.bind(document.body),children:"fullscreen"}),r]});return k(w.Fragment,{children:[o,t&&l0.createPortal(d("div",{style:{position:"fixed",top:0,right:0},children:r}),(i=e.current)==null?void 0:i.parentNode)]})}z5.fName="FullscreenToggle";function j5(){const[e,t]=te.pickedValue();return d("div",{children:!(e==="")&&d("span",{onClick:()=>{t("")},style:{background:e,width:"32px",height:"32px"},children:e})})}j5.fName="PickedValue";function IK(){const[e,t]=te.pickedValue(),n=w.useRef();if(w.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]),w.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 d("div",{ref:n,style:{"--picked-value":e},className:"picked-cursor",children:e})}function Ob({onDrop:e,children:t}){return d("div",{style:{textAlign:"center",fontSize:"2rem",padding:"8px",background:"yellow"},onDrop:e,children:t})}function LK({selector:e,add:t,shown:n}){return n?k("div",{className:"stretch-over-parent flex-row",style:{justifyContent:"flex-end"},children:[d(Ob,{onDrop:r=>{const o=r.dataTransfer.getData("selector");o&&t(`:where(${e}):not(${o})`)},children:"Not"}),d(Ob,{onDrop:r=>{const o=r.dataTransfer.getData("selector");o&&t(`:where(${e}):where(${o})`)},children:"And"})]}):null}function zK({selector:e,add:t,remove:n}){const[r,o]=w.useState(!1);return k("div",{children:[d(LK,{selector:e,add:t,shown:r}),d("button",{style:{float:"right"},onClick:()=>n(e),children:"-"}),d(co,{selector:e,allowScroll:!0,allowDrag:!1})]})}function H5(){const[e,t]=te.savedSelectors(),{frameRef:n}=w.useContext(qe),[r,o]=be("showSelectorsWidget",!0),[i,a]=w.useState(!1),[l,s]=w.useState(""),[u,c]=w.useMemo(()=>{var g;try{return[!0,(g=n.current)==null?void 0:g.contentWindow.document.querySelectorAll(l).length]}catch(y){return[!1]}},[l]);function f(g){e.includes(g)||t([...e,g])}function p(g){e.includes(g)&&t(e.filter(y=>y!==g))}const h=g=>{const y=g.dataTransfer.getData("text/plain").trim();try{document.querySelector(y),f(y)}catch(C){const m=g.dataTransfer.getData("selector");m&&f(m)}};return r?k("div",{onDragOver:g=>g.preventDefault(),onDrop:h,children:[e.length===0&&d("h2",{children:"Drop selectors here"}),d("ul",{children:e.map(g=>d("li",{style:{position:"relative"},children:d(zK,{selector:g,add:f,remove:p})},g))}),d("button",{onClick:()=>{o(!1)},children:"Close"}),d(Rt,{controls:[i,a],children:"New..."}),i&&k("div",{children:[d(Ve,{value:l,onChange:s}),d("button",{disabled:l==="",onClick:()=>{f(l)},children:"Add"}),u&&k("span",{children:["Found ",c]})]})]}):d("button",{onDragOver:g=>g.preventDefault(),onDrop:g=>{h(g),o(!0)},onClick:()=>{o(!0)},children:"Selectors..."})}H5.fName="Selectors";function jK({setReadonly:e}){const[t,n]=te.note();return d("textarea",{style:{fontSize:"1.2rem",minHeight:160},autoFocus:!0,onBlur:()=>{e(!0)},value:t,onInput:r=>n(r.target.value,{debounceTime:1/0,skipHistory:!0})})}function G5(){const{note:e}=xe,[t,n]=w.useState(!0);if(!t)return d(jK,{setReadonly:n});const r=()=>n(!1);return e===""?d("button",{onClick:r,children:"Note"}):d("div",{style:{background:"white",border:"2px solid black",fontSize:"1.2rem",maxWidth:800},onClick:r,children:d("pre",{children:e})})}G5.fName="NoteBox";function zg(e){e.contains(Ru)||(Ru=e)}let Ru;function HK({frameRef:e,loaded:t}){const{frameClickBehavior:n,openFirstOnInspect:r}=xe,[o,i]=te.inspectedPath(),[,a]=te.openGroups();w.useEffect(()=>{var u;const l=(u=e.current)==null?void 0:u.contentWindow.document;if(!l)return;function s(c){if(n==="alt"&&!c.altKey)return;const f=c.target,p=Ht(o,l);if(c.preventDefault(),c.stopPropagation(),f===p||f.contains(p)){dh(f);return}zg(f);const h=Mc(f);fo(()=>{i(h),Rl();const g=Ao(f);r&&a({[g[0].label]:!0},{skipHistory:!0,appendOnly:!0}),c.preventDefault(),c.stopPropagation(),dh(f)})}return l.addEventListener("click",s),()=>{l.removeEventListener("click",s)}},[n,t,r,o])}function GK(e){const t=[...e.children],n=e.querySelectorAll("*").length,r=e.childNodes.length,o=[...e.childNodes].filter(a=>a.nodeType===Node.TEXT_NODE&&a.wholeText.trim()==="").length,i=r-t.length-o;return{directDescendants:t,totalDescendants:n,textNodes:i,emptyTextNodes:o,groupedDescendants:t.reduce((a,l)=>{var u;const s=a.at(-1);return s&&((u=s[0])==null?void 0:u.tagName)===l.tagName?s.push(l):a.push([l]),a},[])}}function WK({el:e,index:t,xrayRef:n}){var f;const[r,o]=te.inspectedPath(),i=[...r,[e.tagName,t]],a=(f=n.current)==null?void 0:f.contentWindow.document;let l;try{l=Ht(i,a)}catch(p){return null}const s=e.tagName.toLowerCase();if(s==="style"||s==="script")return;const u=e.id?`#${e.id}`:"",c=!l.checkVisibility();return k("button",{className:"monospace-code",style:{background:l===Ru||l.contains(Ru)?"lightblue":null,textDecoration:c?"underline red":null,viewTransitionName:`inspected${r.length+1}-${t}`},title:c&&"Element is currently not visible",onMouseEnter:()=>{for(const p of a.querySelectorAll(".highlight-descendant"))p.classList.toggle("highlight-descendant",!1);l.classList.toggle("highlight-descendant",!0),l.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},onMouseLeave:()=>{l.classList.toggle("highlight-descendant",!1)},onClick:()=>{fo(()=>{l.classList.toggle("highlight-descendant",!1),o(i),Rl(),setTimeout(()=>{l.scrollIntoView({block:"center",inline:"center"})},1),zg(l)})},children:[s,u]},e)}function UK({xrayRef:e}){var o;const{inspectedPath:t}=xe,{frameRef:n}=w.useContext(qe),r=(o=n.current)==null?void 0:o.contentWindow.document;if(!r)return null;try{const i=Ht(t,r),a=GK(i,r);return k("div",{children:[k("code",{style:{float:"right"},children:[a.directDescendants.length>0&&k("span",{children:[" direct: ",a.directDescendants.length," "]}),a.totalDescendants>a.directDescendants.length&&k("span",{children:[" all: ",a.totalDescendants," "]}),a.textNodes>0&&k("span",{style:{fontWeight:"bold"},children:[" text: ",a.textNodes]})]}),a.directDescendants.map((l,s)=>d(WK,{el:l,index:s,xrayRef:e}))]})}catch(i){return null}}function VK(){const[e,t]=te.elementSelectionMode(),[,n]=te.openGroups(),{openFirstOnInspect:r}=xe,[o,i]=te.inspectedPath(),{frameRef:a}=w.useContext(qe);return k("button",{style:{float:"right",position:"sticky",top:0,outline:e?"4px solid indigo":null},disabled:o.length===0,onBlur:l=>{setTimeout(()=>{t(!1)},200)},onClick:l=>{if(!a.current)return;t(!0);const s=o.slice(0,-1);i(s),Rl();const u=Ht(s,a.current.contentWindow.document);if(r)try{const c=Ao(u);n({[c[0].label]:!0},{skipHistory:!0,appendOnly:!0})}catch(c){console.log("Failed getting node",c)}},children:["go up (",o.length,")"]})}function W5(){const{width:e,height:t,inspectedPath:n,themeEditor:{scopes:r}}=xe,[o,i]=w.useState(!1),{frameRef:a,xrayFrameRef:l}=w.useContext(qe),s=window.location.href,[u,c]=be("savedNodes",[]),[f,p]=be("showSavedNodes",!0),[h,g]=be("xrayzoomout",!0),[y,C]=be("xrayon",!0),[m,v]=w.useState(parseInt(e)),[b,F]=w.useState(parseInt(t)),[_,A]=w.useState(0),[D,O]=w.useState(0),T=400/m,L=1.6,B=Math.min(14,h?T:Math.max(L,T)),G=w.useRef(null);G.current,G.current=B;const fe=Math.min(500,Math.min(b,t)*B+12);w.useEffect(()=>{var U;if(!o)return;const ie=(U=l.current)==null?void 0:U.contentWindow.document,z=ie==null?void 0:ie.documentElement;if(!z)return;z.classList.toggle("doxray",!0);for(const le of ie.querySelectorAll(".xray"))le.classList.remove("xray");const Z=[];if(f)for(const le of u)try{const R=Ht(le,ie);R.classList.add("xray"),Z.push(R)}catch(R){console.log(R,n)}if(n)try{const le=Ht(n,ie),R=Ht(n,a.current.contentWindow.document);if(!le.matches("html")){const K=R.getBoundingClientRect();le.style.width=`${K.right-K.left}px`,le.style.height=`${K.bottom-K.top}px`,zg(le),le.classList.add("xray");const X=le.getBoundingClientRect(),ne=X.right-X.left+24,P=ne>e;v(ne);const Y=X.bottom-X.top+24,M=Y>t;F(Y),A(X.top*-1),O(X.left*-1);const de=setTimeout(()=>{le==null||le.scrollIntoView({block:M?"start":"nearest",inline:P?"start":"nearest"})},100);return()=>{clearTimeout(de)}}}catch(le){}},[n,o,u,f,r,e,t]),w.useLayoutEffect(()=>{var z;if(!y)return;const ie=(z=l.current)==null?void 0:z.contentWindow.document;if(!ie)return null;try{const Z=Ht(n,ie),U=!h&&T{var ie;if(o){const z=(ie=l.current)==null?void 0:ie.contentWindow.document;for(const Z of z.querySelectorAll("a"))try{Z.href="#"}catch(U){}z.addEventListener("mousedown",Z=>{Z.preventDefault(),Z.stopPropagation()},{capture:!0})}},[o]),k("div",{style:{maxWidth:400},children:[!y&&d("h3",{style:{display:"inline-block"},children:"Xray"}),k("div",{children:[d(Ce,{controls:[y,ie=>{C(ie),ie||i(!1)}],children:"Enable"}),y&&k(w.Fragment,{children:[d(Ce,{title:"min zoom level 1.6",controls:[h,g],children:"Zoom out to fit"}),d(VK,{}),d("br",{}),d(Ce,{controls:[Se,()=>{c(Se?u.filter(ie=>!me(ie)):[...u,n])}],children:"Save"}),d(Ce,{controls:[f,p],children:"Show saved"}),f&&k("button",{disabled:u.length===0,onClick:()=>c([]),children:["Clear saved (",u.length,")"]})]}),y&&d(UK,{xrayRef:l})]}),y&&d("div",{style:{maxHeight:fe,overflowY:"hidden",overflowX:B>L||h?"hidden":"visible",visibility:o?"visible":"hidden",clear:"both"},children:k("div",{style:{scale:`${B}`,transform:`translateX(${12+D}px) translateY(${12+Math.max(-fe+12,_)}px)`,transformOrigin:"top left"},children:[d(HK,{frameRef:l,loaded:o}),d("iframe",{onLoad:()=>{i(!0)},resizable:!0,src:s,ref:l,width:e,height:t,style:{width:e,maxWidth:"none",background:"white"}})]})}),k("span",{children:["scale: ",B.toFixed(2)," "]})]})}W5.fName="Xray";const qe=w.createContext({}),KK=e=>{const{frameLoaded:t}=xe,{allVars:n,defaultValues:r}=e,o=w.useRef(null),i=w.useRef(null),a=w.useRef(null),[l,s]=w.useState(!1),[u,c]=be("server-themes-displayed",!0),[f,p]=w.useState(!1),[h,g]=be("full-page-preview",!1),[y,C]=te.openFirstOnInspect();return k(qe.Provider,{value:{allVars:n,defaultValues:r,frameRef:o,scrollFrameRef:i,xrayFrameRef:a,setSheetDisablerDisplayed:p},children:[d(RK,{}),d(NK,{}),d(IK,{}),d(wH,{frameRef:o}),d("div",{className:"theme-editor",children:k(ZH,{stateHook:te.uiLayout,children:[k("div",{style:{display:"flex",columns:2,justifyContent:"space-between"},children:[k(lr,{id:"area-top",style:{justifyContent:"flex-start",flexGrow:1},children:[d(Jc,{}),d(Qc,{})]}),k(lr,{id:"area-top-reverse",style:{flexDirection:"row-reverse",justifyContent:"flex-start",flexGrow:1},children:[d(nf,{}),d(Bc,{}),d(D5,{})]})]}),k("div",{style:{display:"flex",justifyContent:"flex-start",flexGrow:"1"},children:[k(lr,{id:"area-left",children:[d(Ml,{}),d(W5,{})]}),k(lr,{id:"area-left-inner",children:[d(of,{}),k("div",{id:"Filters",style:{display:"flex",alignItems:"flex-start"},children:[d(vK,{}),d(yK,{})]}),d("div",{id:"Inspector",children:t&&d(Zc,{})})]}),d(Ng,{src:window.location.href}),!!h&&d(MK,{src:window.location.href}),k(lr,{id:"area-right",children:[d(w.Fragment,{id:"ThemesList",children:u&&d(Rg,{})}),d(w.Fragment,{id:"StylesheetDisabler",children:f&&d(hK,{})}),d(w.Fragment,{id:"ImportExportTools",children:l&&d(FK,{})})]})]}),k("div",{style:{display:"flex",columns:2,justifyContent:"space-between",flexGrow:0,alignItems:"flex-end"},children:[k(lr,{id:"area-bottom",children:[d(H5,{}),d(G5,{}),d(tf,{}),d(j5,{}),d(N5,{})]}),d(lr,{id:"area-bottom-reverse",style:{flexDirection:"row-reverse"},children:k("div",{id:"ExtraPanelsMenu",className:"theme-editor-menu",children:[d(Rt,{controls:[l,s],children:"Import/export"}),d(Rt,{controls:[f,p],children:"Stylesheets"}),d(Rt,{controls:[u,c],children:"Themes"})]})}),k(AK,{children:[d(Lg,{}),d(z5,{}),d(rf,{}),k("div",{id:"InspectionSettings",children:[d(Ce,{controls:[h,g],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"}),d(Ce,{controls:[y,C],children:"Auto open first group on inspect"}),d(Ce,{controls:te.enableScrollingInView(),children:"Scroll into view in history"})]}),d(L5,{}),d(Oc,{}),d(O5,{}),d(P5,{}),d(R5,{}),d(I5,{}),d(_5,{}),d(Ig,{})]})]})]})})]})};let Rd;const YK=(e,t,n)=>{const r=d(KH,{previewComponents:rV,children:d(KK,{allVars:t,defaultValues:n})});Rd||(Rd=Jx(e)),Rd.render(r)},XK="https://unpkg.com/source-map@0.7.3/dist/source-map.js",qK=()=>new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",XK),n.addEventListener("load",e),n.addEventListener("error",t),document.head.appendChild(n)}),JK=()=>tt(Be,null,function*(){var e;return(yield qK())&&((e=window.sourceMap)==null?void 0:e.SourceMapConsumer.initialize({"lib/mappings.wasm":"https://unpkg.com/source-map@0.7.3/lib/mappings.wasm"}))}),QK=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 ZK(e,{comments:t,rulesWithMap:n,rogueAtRules:r,sheet:o}){let i=[];const a=[];let l=0,s=0,u=0,c="",f,p,h=!1,g="",y=0,C=0,m=!1,v=!1,b=!1,F=!1,_=0,A,D="",O,T;const L={"{"(){if(m)return;T=!1;const Q=c.trim();if(F){F=!1,a.push(Q),c="";return}i.push([[f,p],Q]),A={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(!m){if(T=!1,h)h=!1,D&&(A.stylemap.set(D,c.trim()),D=""),A.end={line:l,col:s-u-1},n.push(A),A=null;else{const Q=a.pop();let B=c.trim();B!==""&&(i.length>0&&(B=i.map(([,G])=>G).join()+", "+B),r.push({text:Q,body:B})),i=[]}c=""}},"\n"(){T=m&&!v,v&&(t.push({line:y,col:C,text:g,inline:!0}),g="",m=!1,v=!1),_=0,l++,u=s},"/"(){m&&!v&&O==="*"?(T=!1,m=!1,t.push({line:y,col:C,text:g.slice(0,-1),inline:!1}),g=""):!m&&_===0&&O==="/"&&(T=!1,m=!0,v=!0,y=l,C=s-u-1,g="",c=c.slice(0,-1))},"*"(){!m&&O==="/"&&(T=!1,m=!0,y=l,C=s-u-1,c=c.slice(0,-1))},"@"(){!m&&!h&&(F=!0,c="")},":"(){h&&D===""&&(D=c.trim(),c="",T=!1)},";"(){h&&_===0?(A.stylemap.set(D,c.trim()),c="",D="",T=!1):F&&(F=!1,c="",T=!1)},"("(){m||(_+=1)},")"(){m||(_-=1)},"\\"(){b=!0},","(){if(!m&&!h&&!F&&_===0){const Q=c.trim();i.push([[f,p],Q]),T=!1,c=""}}};for(const Q of e){if(T=!0,b)b=!1;else{const B=L[Q];B&&B()}if(T)if(m)g+=Q;else{const B=Q.trim()==="",G=c==="";(!B||!G)&&(c+=Q),G&&!B&&(f=l,p=s-u-1)}s++,O=Q}}const U5=/:(active|focus(-(visible|within))?|visited|hover)/g;function eY(e){return e.replaceAll(U5,":is(:$1, ._force-$1)")}const tY=/([\w\])-])(:(\-[\w-]+|:\-?[\w-]+|before|after|active|focus(-(visible|within))?|visited|hover))+/g;function nY(e){const t=e.replaceAll(tY,"$1").replaceAll(U5,"*").replaceAll(/\s+/g," ").replaceAll(/\s*,\s*/g,",").replaceAll(/:not\(\*\)/g,"").trim();return t===""||t.startsWith("::")?"*":t}function rY({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=eY(i),o.testSelectors=new Set;for(const[,l]of o.selectors){const s=nY(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 dh(e){[...e.children].forEach(t=>{getComputedStyle(t).pointerEvents==="none"&&(t.style.pointerEvents="auto")})}const Bb=window.self!==window.top,oY=JK(),Mb=e=>{[...document.styleSheets].forEach(t=>{if(!t.href)return;const n=t.href.replace(/\?.*/,"");t.disabled=!!e[n]})};let mr=document.createElement("style");document.head.appendChild(mr);const jg="__forced-styles__";mr.id=jg;let ba={};document.title=`🖌${document.title}`;function iY(e){let t="";for(const n in e)t+=` ${n}: ${e[n]} !important;`;return t}function aY(e,t){const n=`${e} {${iY(t)} }`;if(!(e in ba)){ba[e]=mr.sheet.insertRule(n,Object.keys(ba).length);return}const r=ba[e];mr.sheet.cssRules[r].cssText!==n&&(mr.sheet.insertRule(n,r),mr.sheet.deleteRule(r+1))}function V5(e,t=!1){t&&([...mr.sheet.cssRules].forEach(()=>mr.sheet.deleteRule(0)),ba={}),Object.entries(e).forEach(([n,r])=>{aY(n,r)})}function lY(){[...document.body.childNodes].forEach(e=>{["STYLE","LINK","SCRIPT"].includes(e.nodeName)||document.body.removeChild(e)})}let Rb=[],sY=[],uY=[],cY=[],fY=[],dY=new Map,Ma;const Ms=new WeakMap;function pY(e){return Ms.has(e)}function Ao(e){if(Ms.has(e))return Ms.get(e);const t=f2({cssVars:Ma,target:e}),n=vU(t,e,Ma),r=xU(n);return Ms.set(e,r),r}let K5;function hY(){return K5}const gY=e=>tt(Be,null,function*(){var s;if(CF(e.localStorageNamespace||""),!Bb){yield oY,HF(e.serverThemes),Ma=yield o4();const u=QK(Ma);K5=u;const c=[...document.styleSheets].filter(p=>{var h;return((h=p.ownerNode)==null?void 0:h.id)!==jg});for(const p of c){let h;if(p.href)try{h=yield(yield fetch(p.href)).text()}catch(g){continue}else if(h=(s=p.ownerNode)==null?void 0:s.innerHTML,!h)continue;ZK(h,{comments:uY,rulesWithMap:Rb,rogueAtRules:sY,sheet:p})}rY({rulesWithMap:Rb,keyframesRules:cY,selectorRules:fY,testSelectors:dY}),lY();const f=document.createElement("div");YK(f,Ma,u),CH(),f.id="theme-editor-root",document.body.appendChild(f)}const t={};let n=null,r=!1,o=null;if(!Bb){eK();return}document.documentElement.classList.add("force-cursor");const i=localStorage.getItem(s0()+"set-disabled-sheets");if(i){const u=JSON.parse(i);Mb(u)}let a;const l=u=>{const{type:c,payload:f}=u.data,{index:p,selector:h,scopes:g,resetAll:y,path:C}=f||{};switch(c){case"scroll-in-view":const m=h?t[h][p]:Ht(f.path);if(m.scrollIntoView(f.options||{behavior:"smooth",block:"center",inline:"end"}),el(m),n){const[F,_,A]=n;window.clearTimeout(F),A!==m&&_()}const v=()=>{di(m),n=null};n=[setTimeout(v,1500),v,m];break;case"set-sheet-config":Mb(JSON.parse(f));break;case"set-scopes-styles":V5(g,y);break;case"force-scroll":r=!0,window.scrollTo({top:f.position,behavior:f.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)}),ua="all-the-themes";gY({serverThemes:{fetchThemes:()=>JSON.parse(localStorage.getItem(ua)),uploadTheme:(e,t)=>{const n=JSON.parse(localStorage.getItem(ua))||{};n[e]=t,localStorage.setItem(ua,JSON.stringify(n,null,2))},deleteTheme:e=>{const t=JSON.parse(localStorage.getItem(ua))||{};delete t[e],localStorage.setItem(ua,JSON.stringify(t,null,2))}}})});export default mY(); //# sourceMappingURL=bundle.js.map diff --git a/docs/demo/dist/bundle.js.map b/docs/demo/dist/bundle.js.map index 60aa8fe..6ce0ca2 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/ui/FrameScaleSlider.jsx","../../../src/functions/nodePath.ts","../../../src/components/ui/ElementLocator.jsx","../../../src/functions/dragValue.ts","../../../node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-is/index.js","../../../node_modules/@emotion/stylis/dist/stylis.browser.esm.js","../../../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../../../node_modules/@emotion/memoize/dist/memoize.browser.esm.js","../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","../../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../node_modules/styled-components/dist/styled-components.browser.esm.js","../../../node_modules/react-shadow-picker/dist/inputs/Label.js","../../../node_modules/react-shadow-picker/dist/fields/TypeField.js","../../../node_modules/react-shadow-picker/dist/inputs/OffsetGrid.js","../../../node_modules/react-shadow-picker/dist/inputs/Input.js","../../../node_modules/react-shadow-picker/dist/common.js","../../../node_modules/react-shadow-picker/dist/fields/OffsetField.js","../../../node_modules/react-shadow-picker/dist/fields/SliderField.js","../../../node_modules/react-shadow-picker/dist/fields/ColorField.js","../../../node_modules/react-shadow-picker/dist/ShadowPicker.js","../../../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/functions/viewTransition.ts","../../../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/components/ui/ThemeEditorExtraOptions.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/FrameSizeSettings.jsx","../../../src/components/movable/MoveControls.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/ui/Selectors.jsx","../../../src/components/ui/NoteBox.tsx","../../../src/components/ui/Xray.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