@easy-editor/setters 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react"),require("@radix-ui/react-slot"),require("react/jsx-runtime"),require("@radix-ui/react-popover"),require("@uiw/react-color-sketch"),require("@radix-ui/react-switch"),require("lucide-react"),require("@radix-ui/react-collapsible"),require("@radix-ui/react-tabs"),require("@radix-ui/react-label")):"function"==typeof define&&define.amd?define(["exports","react","@radix-ui/react-slot","react/jsx-runtime","@radix-ui/react-popover","@uiw/react-color-sketch","@radix-ui/react-switch","lucide-react","@radix-ui/react-collapsible","@radix-ui/react-tabs","@radix-ui/react-label"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorSetters={},e.React,e.reactSlot,e.jsxRuntime,e.PopoverPrimitive,e.Sketch,e.SwitchPrimitive,e.lucideReact,e.CollapsiblePrimitive,e.TabsPrimitive,e.LabelPrimitive)}(this,function(e,r,t,o,a,n,s,i,l,d,c){"use strict";function u(e){var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var p=u(r),m=u(a),f=u(s),b=u(l),g=u(d),h=u(c);function x(e){var r,t,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=x(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function v(){for(var e,r,t=0,o="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=x(e))&&(o&&(o+=" "),o+=r);return o}!function(e,r){void 0===r&&(r={});var t=r.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}('@import "tailwindcss";@import "tw-animate-css";@custom-variant dark (&:is(.dark *));:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:0.6rem;--sidebar:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}@theme inline{--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--color-sidebar:var(--sidebar);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-border:var(--sidebar-border);--color-sidebar-ring:var(--sidebar-ring)}@layer base{*,body{@apply bg-background text-foreground}}[data-color-mode*=dark] .w-color-sketch{--sketch-background:var(--popover)!important}[data-color-mode*=dark] .w-color-swatch{--sketch-swatch-border-top:1px solid var(--border)!important}[data-color-mode*=dark] .w-color-editable-input{--editable-input-label-color:var(--primary)!important;--editable-input-box-shadow:var(--border) 0px 0px 0px 1px inset!important;--editable-input-color:var(--primary)!important}[data-color-mode*=dark] .w-color-alpha{--alpha-pointer-background-color:var(--popover)!important;--alpha-pointer-box-shadow:transparent 0px 1px 4px 0px!important}',{insertAt:"top"});const y=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,w=v,k=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),j="-",N=[],z=e=>{const r=P(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return S(e);const t=e.split(j),o=""===t[0]&&t.length>1?1:0;return C(t,o,r)},getConflictingClassGroupIds:(e,r)=>{if(r){const r=o[e],a=t[e];return r?a?((e,r)=>{const t=new Array(e.length+r.length);for(let r=0;r<e.length;r++)t[r]=e[r];for(let o=0;o<r.length;o++)t[e.length+o]=r[o];return t})(a,r):r:a||N}return t[e]||N}}},C=(e,r,t)=>{if(0===e.length-r)return t.classGroupId;const o=e[r],a=t.nextPart.get(o);if(a){const t=C(e,r+1,a);if(t)return t}const n=t.validators;if(null===n)return;const s=0===r?e.join(j):e.slice(r).join(j),i=n.length;for(let e=0;e<i;e++){const r=n[e];if(r.validator(s))return r.classGroupId}},S=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),o=r.slice(0,t);return o?"arbitrary.."+o:void 0})(),P=e=>{const{theme:r,classGroups:t}=e;return O(t,r)},O=(e,r)=>{const t=k();for(const o in e){const a=e[o];G(a,t,o,r)}return t},G=(e,r,t,o)=>{const a=e.length;for(let n=0;n<a;n++){const a=e[n];_(a,r,t,o)}},_=(e,r,t,o)=>{"string"!=typeof e?"function"!=typeof e?M(e,r,t,o):A(e,r,t,o):T(e,r,t)},T=(e,r,t)=>{(""===e?r:I(r,e)).classGroupId=t},A=(e,r,t,o)=>{R(e)?G(e(o),r,t,o):(null===r.validators&&(r.validators=[]),r.validators.push(((e,r)=>({classGroupId:e,validator:r}))(t,e)))},M=(e,r,t,o)=>{const a=Object.entries(e),n=a.length;for(let e=0;e<n;e++){const[n,s]=a[e];G(s,I(r,n),t,o)}},I=(e,r)=>{let t=e;const o=r.split(j),a=o.length;for(let e=0;e<a;e++){const r=o[e];let a=t.nextPart.get(r);a||(a=k(),t.nextPart.set(r,a)),t=a}return t},R=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),o=Object.create(null);const a=(a,n)=>{t[a]=n,r++,r>e&&(r=0,o=t,t=Object.create(null))};return{get(e){let r=t[e];return void 0!==r?r:void 0!==(r=o[e])?(a(e,r),r):void 0},set(e,r){e in t?t[e]=r:a(e,r)}}},U=[],q=(e,r,t,o,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:o,isExternal:a}),V=e=>{const{prefix:r,experimentalParseClassName:t}=e;let o=e=>{const r=[];let t,o=0,a=0,n=0;const s=e.length;for(let i=0;i<s;i++){const s=e[i];if(0===o&&0===a){if(":"===s){r.push(e.slice(n,i)),n=i+1;continue}if("/"===s){t=i;continue}}"["===s?o++:"]"===s?o--:"("===s?a++:")"===s&&a--}const i=0===r.length?e:e.slice(n);let l=i,d=!1;i.endsWith("!")?(l=i.slice(0,-1),d=!0):i.startsWith("!")&&(l=i.slice(1),d=!0);return q(r,d,l,t&&t>n?t-n:void 0)};if(r){const e=r+":",t=o;o=r=>r.startsWith(e)?t(r.slice(e.length)):q(U,!1,r,void 0,!0)}if(t){const e=o;o=r=>t({className:r,parseClassName:e})}return o},E=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((e,t)=>{r.set(e,1e6+t)}),e=>{const t=[];let o=[];for(let a=0;a<e.length;a++){const n=e[a],s="["===n[0],i=r.has(n);s||i?(o.length>0&&(o.sort(),t.push(...o),o=[]),t.push(n)):o.push(n)}return o.length>0&&(o.sort(),t.push(...o)),t}},W=/\s+/,L=e=>{if("string"==typeof e)return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=L(e[o]))&&(t&&(t+=" "),t+=r);return t},B=(e,...r)=>{let t,o,a,n;const s=e=>{const r=o(e);if(r)return r;const n=((e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=r,s=[],i=e.trim().split(W);let l="";for(let e=i.length-1;e>=0;e-=1){const r=i[e],{isExternal:d,modifiers:c,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:m}=t(r);if(d){l=r+(l.length>0?" "+l:l);continue}let f=!!m,b=o(f?p.substring(0,m):p);if(!b){if(!f){l=r+(l.length>0?" "+l:l);continue}if(b=o(p),!b){l=r+(l.length>0?" "+l:l);continue}f=!1}const g=0===c.length?"":1===c.length?c[0]:n(c).join(":"),h=u?g+"!":g,x=h+b;if(s.indexOf(x)>-1)continue;s.push(x);const v=a(b,f);for(let e=0;e<v.length;++e){const r=v[e];s.push(h+r)}l=r+(l.length>0?" "+l:l)}return l})(e,t);return a(e,n),n};return n=i=>{const l=r.reduce((e,r)=>r(e),e());return t=(e=>({cache:$(e.cacheSize),parseClassName:V(e),sortModifiers:E(e),...z(e)}))(l),o=t.cache.get,a=t.cache.set,n=s,s(i)},(...e)=>n(((...e)=>{let r,t,o=0,a="";for(;o<e.length;)(r=e[o++])&&(t=L(r))&&(a&&(a+=" "),a+=t);return a})(...e))},D=[],F=e=>{const r=r=>r[e]||D;return r.isThemeGetter=!0,r},H=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,X=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y=/^\d+\/\d+$/,K=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Q=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Z=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>Y.test(e),te=e=>!!e&&!Number.isNaN(Number(e)),oe=e=>!!e&&Number.isInteger(Number(e)),ae=e=>e.endsWith("%")&&te(e.slice(0,-1)),ne=e=>K.test(e),se=()=>!0,ie=e=>J.test(e)&&!Q.test(e),le=()=>!1,de=e=>Z.test(e),ce=e=>ee.test(e),ue=e=>!me(e)&&!ve(e),pe=e=>Ce(e,Ge,le),me=e=>H.test(e),fe=e=>Ce(e,_e,ie),be=e=>Ce(e,Te,te),ge=e=>Ce(e,Pe,le),he=e=>Ce(e,Oe,ce),xe=e=>Ce(e,Me,de),ve=e=>X.test(e),ye=e=>Se(e,_e),we=e=>Se(e,Ae),ke=e=>Se(e,Pe),je=e=>Se(e,Ge),Ne=e=>Se(e,Oe),ze=e=>Se(e,Me,!0),Ce=(e,r,t)=>{const o=H.exec(e);return!!o&&(o[1]?r(o[1]):t(o[2]))},Se=(e,r,t=!1)=>{const o=X.exec(e);return!!o&&(o[1]?r(o[1]):t)},Pe=e=>"position"===e||"percentage"===e,Oe=e=>"image"===e||"url"===e,Ge=e=>"length"===e||"size"===e||"bg-size"===e,_e=e=>"length"===e,Te=e=>"number"===e,Ae=e=>"family-name"===e,Me=e=>"shadow"===e,Ie=B(()=>{const e=F("color"),r=F("font"),t=F("text"),o=F("font-weight"),a=F("tracking"),n=F("leading"),s=F("breakpoint"),i=F("container"),l=F("spacing"),d=F("radius"),c=F("shadow"),u=F("inset-shadow"),p=F("text-shadow"),m=F("drop-shadow"),f=F("blur"),b=F("perspective"),g=F("aspect"),h=F("ease"),x=F("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ve,me],y=()=>[ve,me,l],w=()=>[re,"full","auto",...y()],k=()=>[oe,"none","subgrid",ve,me],j=()=>["auto",{span:["full",oe,ve,me]},oe,ve,me],N=()=>[oe,"auto",ve,me],z=()=>["auto","min","max","fr",ve,me],C=()=>["auto",...y()],S=()=>[re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],P=()=>[e,ve,me],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ke,ge,{position:[ve,me]}],G=()=>["auto","cover","contain",je,pe,{size:[ve,me]}],_=()=>[ae,ye,fe],T=()=>["","none","full",d,ve,me],A=()=>["",te,ye,fe],M=()=>[te,ae,ke,ge],I=()=>["","none",f,ve,me],R=()=>["none",te,ve,me],$=()=>["none",te,ve,me],U=()=>[te,ve,me],q=()=>[re,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ne],breakpoint:[ne],color:[se],container:[ne],"drop-shadow":[ne],ease:["in","out","in-out"],font:[ue],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ne],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ne],shadow:[ne],spacing:["px",te],text:[ne],"text-shadow":[ne],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",re,me,ve,g]}],container:["container"],columns:[{columns:[te,me,ve,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[oe,"auto",ve,me]}],basis:[{basis:[re,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[te,re,"auto","initial","none",me]}],grow:[{grow:["",te,ve,me]}],shrink:[{shrink:["",te,ve,me]}],order:[{order:[oe,"first","last","none",ve,me]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[i,"screen",...S()]}],"min-w":[{"min-w":[i,"screen","none",...S()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",t,ye,fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ve,be]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ae,me]}],"font-family":[{font:[we,me,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ve,me]}],"line-clamp":[{"line-clamp":[te,"none",ve,be]}],leading:[{leading:[n,...y()]}],"list-image":[{"list-image":["none",ve,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[te,"from-font","auto",ve,fe]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[te,"auto",ve,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oe,ve,me],radial:["",ve,me],conic:[oe,ve,me]},Ne,he]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[te,ve,me]}],"outline-w":[{outline:["",te,ye,fe]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",c,ze,xe]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,ze,xe]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[te,fe]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,ze,xe]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[te,ve,me]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[te]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":M()}],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[ve,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[te]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,me]}],filter:[{filter:["","none",ve,me]}],blur:[{blur:I()}],brightness:[{brightness:[te,ve,me]}],contrast:[{contrast:[te,ve,me]}],"drop-shadow":[{"drop-shadow":["","none",m,ze,xe]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",te,ve,me]}],"hue-rotate":[{"hue-rotate":[te,ve,me]}],invert:[{invert:["",te,ve,me]}],saturate:[{saturate:[te,ve,me]}],sepia:[{sepia:["",te,ve,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,me]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[te,ve,me]}],"backdrop-contrast":[{"backdrop-contrast":[te,ve,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",te,ve,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[te,ve,me]}],"backdrop-invert":[{"backdrop-invert":["",te,ve,me]}],"backdrop-opacity":[{"backdrop-opacity":[te,ve,me]}],"backdrop-saturate":[{"backdrop-saturate":[te,ve,me]}],"backdrop-sepia":[{"backdrop-sepia":["",te,ve,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[te,"initial",ve,me]}],ease:[{ease:["linear","initial",h,ve,me]}],delay:[{delay:[te,ve,me]}],animate:[{animate:["none",x,ve,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ve,me]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:R()}],"rotate-x":[{"rotate-x":R()}],"rotate-y":[{"rotate-y":R()}],"rotate-z":[{"rotate-z":R()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[ve,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve,me]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[te,ye,fe,be]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Re(...e){return Ie(v(e))}const $e=(Ue="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",qe={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var r;if(null==(null==qe?void 0:qe.variants))return w(Ue,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:t,defaultVariants:o}=qe,a=Object.keys(t).map(r=>{const a=null==e?void 0:e[r],n=null==o?void 0:o[r];if(null===a)return null;const s=y(a)||y(n);return t[r][s]}),n=e&&Object.entries(e).reduce((e,r)=>{let[t,o]=r;return void 0===o||(e[t]=o),e},{}),s=null==qe||null===(r=qe.compoundVariants)||void 0===r?void 0:r.reduce((e,r)=>{let{class:t,className:a,...s}=r;return Object.entries(s).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...o,...n}[r]):{...o,...n}[r]===t})?[...e,t,a]:e},[]);return w(Ue,a,s,null==e?void 0:e.class,null==e?void 0:e.className)});var Ue,qe;const Ve=p.forwardRef(({className:e,variant:r="default",size:a="default",asChild:n=!1,...s},i)=>{const l=n?t.Slot:"button";return o.jsx(l,{ref:i,"data-slot":"button","data-variant":r,"data-size":a,className:Re($e({variant:r,size:a,className:e})),...s})});function Ee({...e}){return o.jsx(m.Root,{"data-slot":"popover",...e})}function We({...e}){return o.jsx(m.Trigger,{"data-slot":"popover-trigger",...e})}function Le({className:e,align:r="center",sideOffset:t=4,...a}){return o.jsx(m.Portal,{children:o.jsx(m.Content,{"data-slot":"popover-content",align:r,sideOffset:t,className:Re("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...a})})}Ve.displayName="Button";const Be=e=>{const{value:r,initialValue:t,onChange:a,disableAlpha:s=!1}=e;return o.jsxs(Ee,{children:[o.jsx(We,{asChild:!0,children:o.jsxs(Ve,{"aria-label":"Select color",className:"h-8 w-full justify-start gap-2 bg-transparent px-2 py-[5px] text-left font-normal text-xs",variant:"outline",children:[o.jsx("div",{"aria-label":"Current color",className:"h-3.5 w-3.5 rounded-full border border-muted-foreground",style:{backgroundColor:r??t}}),o.jsx("span",{className:"truncate font-mono",children:r??t})]})}),o.jsx(Le,{align:"start",className:"w-auto p-0",children:o.jsx(n,{color:r,disableAlpha:s,onChange:e=>a(e.hexa),presetColors:[]})})]})},De=e=>{const{selected:r}=e;return o.jsxs("div",{className:"flex flex-col",children:[o.jsx("p",{className:"leading-7",children:r.id}),o.jsx("p",{className:"text-muted-foreground text-xs",children:r.componentMeta.title})]})};function Fe({className:e,type:r,...t}){return o.jsx("input",{type:r,"data-slot":"input",className:Re("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...t})}const He=e=>{const{value:r,initialValue:t,placeholder:a,onChange:n,suffix:s}=e;return o.jsxs("div",{className:"relative w-full",children:[o.jsx(Fe,{className:Re("!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",!!s&&"pr-8"),onChange:e=>n(+e.target.value),placeholder:a||"",type:"number",value:r??t}),!!s&&o.jsx("span",{"aria-label":`Unit: ${s}`,className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:s})]})},Xe=e=>{const{value:r,onChange:t}=e,a=(e,o)=>{t({...r,[e]:o})};return o.jsxs("div",{className:"flex w-full flex-wrap gap-2",children:[o.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[o.jsx(Fe,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>a("x",Number(e.target.value)),type:"number",value:Ke(r.x)}),o.jsx("span",{"aria-label":"Unit: X",className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:"X"})]}),o.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[o.jsx(Fe,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>a("y",Number(e.target.value)),type:"number",value:Ke(r.y)}),o.jsx("span",{"aria-label":"Unit: Y",className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:"Y"})]}),o.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[o.jsx(Fe,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>a("width",Number(e.target.value)),type:"number",value:Ke(r.width)}),o.jsx("span",{"aria-label":"Unit: W",className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:"W"})]}),o.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[o.jsx(Fe,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>a("height",Number(e.target.value)),type:"number",value:Ke(r.height)}),o.jsx("span",{"aria-label":"Unit: H",className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:"H"})]})]})},Ye=/(\.\d{2})\d+$/,Ke=e=>e.toString().replace(Ye,"$1"),Je=e=>{const{value:r,initialValue:t,placeholder:a,onChange:n,suffix:s}=e;return o.jsxs("div",{className:"relative w-full",children:[o.jsx(Fe,{className:Re("!text-xs h-8 px-2 py-[5px]",!!s&&"pr-8"),onChange:e=>n(e.target.value),placeholder:a||"",value:r||t}),!!s&&o.jsx("span",{"aria-label":`Unit: ${s}`,className:"-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",children:s})]})};function Qe({className:e,...r}){return o.jsx(f.Root,{"data-slot":"switch",className:Re("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:o.jsx(f.Thumb,{"data-slot":"switch-thumb",className:Re("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Ze=e=>{const{value:r,initialValue:t,onChange:a}=e;return o.jsx("div",{className:"py-0.5",children:o.jsx(Qe,{checked:r||t,onCheckedChange:a})})},er=e=>{const{value:t,onChange:a,accept:n=".jpg,.jpeg,.png,.gif",maxSize:s=10485760}=e,[l,d]=r.useState(""),c=r.useRef(null);return o.jsxs("div",{className:"group relative w-full overflow-hidden",children:[o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("label",{className:"flex-1 cursor-pointer",children:[o.jsx("input",{accept:n,className:Re("h-8 cursor-pointer px-2 py-[5px] text-xs","border-dashed transition-colors hover:border-primary","absolute h-0 w-0 opacity-0"),onChange:async e=>{const r=e.target.files?.[0];if(d(""),!r)return void a(null);const t=`.${r.name.split(".").pop()?.toLowerCase()}`;if(!n.includes(t))return d(`仅支持 ${n} 格式文件`),void a(null);if(r.size>s)return d(`文件大小不能超过 ${s/1024/1024}MB`),void a(null);try{const[e,t]=await Promise.all([new Promise((e,t)=>{const o=new FileReader;o.onload=()=>e(o.result),o.onerror=e=>t(e),o.readAsDataURL(r)}),new Promise((e,t)=>{const o=new Image;o.onload=()=>e({width:o.naturalWidth,height:o.naturalHeight}),o.onerror=t,o.src=URL.createObjectURL(r)})]);a({raw:{name:r.name,size:r.size,type:r.type,width:t.width,height:t.height},base64:e})}catch(e){d("文件读取失败,请重试"),a(null)}},ref:c,type:"file"}),o.jsxs("div",{className:"flex h-8 w-full items-center justify-center rounded-md border border-dashed text-muted-foreground text-xs transition-colors hover:border-primary",children:[o.jsx(i.Upload,{className:"mr-2 h-4 w-4"}),o.jsx("span",{children:t?"更换文件":"点击上传"})]})]}),!!t&&o.jsx(Ve,{"aria-label":"清除文件",className:"h-8 px-2 text-muted-foreground hover:text-destructive",onClick:()=>{a(null),c.current&&(c.current.value="")},size:"sm",type:"button",variant:"ghost",children:o.jsx(i.X,{className:"h-4 w-4"})})]}),!!t&&o.jsxs("div",{className:"mt-2 flex w-full items-center gap-2 text-foreground/80 text-xs",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.raw?.name}),o.jsxs("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground/50",children:[(t.raw?.size/1024).toFixed(1),"KB"]})]}),!!l&&o.jsx("p",{className:"mt-1 text-destructive text-xs",role:"alert",children:l})]})};function rr({...e}){return o.jsx(b.Root,{"data-slot":"collapsible",...e})}function tr({...e}){return o.jsx(b.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function or({...e}){return o.jsx(b.CollapsibleContent,{"data-slot":"collapsible-content",...e})}const ar=e=>{const{field:t,children:a,initialValue:n,icon:s=!0}=e,[l,d]=r.useState(n??!0);return o.jsxs(rr,{className:"-translate-x-4 w-[calc(100%_+_32px)] space-y-2",onOpenChange:d,open:l,children:[o.jsxs("div",{className:"flex h-8 items-center justify-between space-x-4 bg-muted px-4",children:[o.jsx("h4",{children:t.title}),!!s&&o.jsx(tr,{asChild:!0,children:o.jsxs(Ve,{size:"sm",variant:"ghost",children:[o.jsx(i.ChevronsUpDown,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Toggle"})]})})]}),o.jsx(or,{className:"space-y-3 px-4 py-2",children:a})]})};function nr({className:e,...r}){return o.jsx(g.Root,{"data-slot":"tabs",className:Re("flex flex-col gap-2",e),...r})}function sr({className:e,...r}){return o.jsx(g.List,{"data-slot":"tabs-list",className:Re("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...r})}function ir({className:e,...r}){return o.jsx(g.Trigger,{"data-slot":"tabs-trigger",className:Re("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function lr({className:e,...r}){return o.jsx(g.Content,{"data-slot":"tabs-content",className:Re("flex-1 outline-none",e),...r})}const dr=e=>{const{tabs:t,initialValue:a,children:n}=e,s=r.useMemo(()=>{if(t)return t;if(Array.isArray(n)&&n.length>0)return n.map(e=>({label:e.props.field.config.title,value:e.props.field.config.key}));throw new Error("TabSetter: children or tabs must be an array")},[t,n]),i=r.useMemo(()=>s[0]?.value,[s]);return o.jsxs(nr,{className:"w-full",defaultValue:a??i,children:[o.jsx(sr,{className:"grid w-full",style:{gridTemplateColumns:`repeat(${s.length}, minmax(0, 1fr))`},children:s.map(e=>o.jsx(ir,{value:e.value,children:e.label},e.value))}),Array.isArray(n)&&n.map(e=>o.jsx(lr,{className:"mt-0 box-border space-y-3 p-2",value:e.props.field.config.key,children:e},e.props.field.config.key))]})};function cr({className:e,...r}){return o.jsx(h.Root,{"data-slot":"label",className:Re("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}const ur={ColorSetter:Be,NodeIdSetter:De,NumberSetter:He,RectSetter:Xe,StringSetter:Je,SwitchSetter:Ze,UploadSetter:er,CollapseSetter:ar,TabSetter:dr};e.CollapseSetter=ar,e.ColorSetter=Be,e.NodeIdSetter=De,e.NumberSetter=He,e.RectSetter=Xe,e.SetterGroup={BASIC:"basic",ADVANCED:"advanced",LAYOUT:"layout",GROUP:"group"},e.StringSetter=Je,e.SwitchSetter=Ze,e.TabSetter=dr,e.UploadSetter=er,e.customFieldItem=(e,r)=>{const{label:t=!0,wrap:a=!1}=e.config.extraProps||{};return"boolean"!=typeof t||t?o.jsxs("div",{className:Re("flex w-full text-xs",a?"flex-col":"items-center"),children:[o.jsx(cr,{className:Re("shrink-0 grow-0 text-xs",a?"basis-[26px]":"basis-[100px]"),htmlFor:e.id,children:e.title}),o.jsx("div",{className:"flex flex-1 items-center justify-between",children:o.jsx("div",{className:"flex-1",children:r})})]}):o.jsx("div",{className:"flex w-full items-center",children:r})},e.default=ur,e.setterMap=ur,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("./styles/global.css"),require("react"),require("@radix-ui/react-slot"),require("react/jsx-runtime"),require("@radix-ui/react-popover"),require("@uiw/react-color-sketch"),require("@radix-ui/react-switch"),require("lucide-react"),require("@radix-ui/react-collapsible"),require("@radix-ui/react-tabs"),require("@radix-ui/react-label")):"function"==typeof define&&define.amd?define(["exports","./styles/global.css","react","@radix-ui/react-slot","react/jsx-runtime","@radix-ui/react-popover","@uiw/react-color-sketch","@radix-ui/react-switch","lucide-react","@radix-ui/react-collapsible","@radix-ui/react-tabs","@radix-ui/react-label"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EasyEditorSetters={},null,e.React,e.reactSlot,e.jsxRuntime,e.PopoverPrimitive,e.Sketch,e.SwitchPrimitive,e.lucideReact,e.CollapsiblePrimitive,e.TabsPrimitive,e.LabelPrimitive)}(this,function(e,t,r,o,a,n,s,l,i,c,d,u){"use strict";function p(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var m=p(r),f=p(n),b=p(l),g=p(c),h=p(d),x=p(u);function v(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=v(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function w(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=v(e))&&(o&&(o+=" "),o+=t);return o}const y=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,k=w,j=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),N="-",z=[],C=e=>{const t=O(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return P(e);const r=e.split(N),o=""===r[0]&&r.length>1?1:0;return S(r,o,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=o[e],a=r[e];return t?a?((e,t)=>{const r=new Array(e.length+t.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r})(a,t):t:a||z}return r[e]||z}}},S=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const o=e[t],a=r.nextPart.get(o);if(a){const r=S(e,t+1,a);if(r)return r}const n=r.validators;if(null===n)return;const s=0===t?e.join(N):e.slice(t).join(N),l=n.length;for(let e=0;e<l;e++){const t=n[e];if(t.validator(s))return t.classGroupId}},P=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?"arbitrary.."+o:void 0})(),O=e=>{const{theme:t,classGroups:r}=e;return G(r,t)},G=(e,t)=>{const r=j();for(const o in e){const a=e[o];_(a,r,o,t)}return r},_=(e,t,r,o)=>{const a=e.length;for(let n=0;n<a;n++){const a=e[n];M(a,t,r,o)}},M=(e,t,r,o)=>{"string"!=typeof e?"function"!=typeof e?A(e,t,r,o):R(e,t,r,o):I(e,t,r)},I=(e,t,r)=>{(""===e?t:T(t,e)).classGroupId=r},R=(e,t,r,o)=>{$(e)?_(e(o),t,r,o):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},A=(e,t,r,o)=>{const a=Object.entries(e),n=a.length;for(let e=0;e<n;e++){const[n,s]=a[e];_(s,T(t,n),r,o)}},T=(e,t)=>{let r=e;const o=t.split(N),a=o.length;for(let e=0;e<a;e++){const t=o[e];let a=r.nextPart.get(t);a||(a=j(),r.nextPart.set(t,a)),r=a}return r},$=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,U=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const a=(a,n)=>{r[a]=n,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=o[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}},q=[],V=(e,t,r,o,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:a}),W=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=e=>{const t=[];let r,o=0,a=0,n=0;const s=e.length;for(let l=0;l<s;l++){const s=e[l];if(0===o&&0===a){if(":"===s){t.push(e.slice(n,l)),n=l+1;continue}if("/"===s){r=l;continue}}"["===s?o++:"]"===s?o--:"("===s?a++:")"===s&&a--}const l=0===t.length?e:e.slice(n);let i=l,c=!1;l.endsWith("!")?(i=l.slice(0,-1),c=!0):l.startsWith("!")&&(i=l.slice(1),c=!0);return V(t,c,i,r&&r>n?r-n:void 0)};if(t){const e=t+":",r=o;o=t=>t.startsWith(e)?r(t.slice(e.length)):V(q,!1,t,void 0,!0)}if(r){const e=o;o=t=>r({className:t,parseClassName:e})}return o},E=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let o=[];for(let a=0;a<e.length;a++){const n=e[a],s="["===n[0],l=t.has(n);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(n)):o.push(n)}return o.length>0&&(o.sort(),r.push(...o)),r}},L=/\s+/,D=e=>{if("string"==typeof e)return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=D(e[o]))&&(r&&(r+=" "),r+=t);return r},B=(e,...t)=>{let r,o,a,n;const s=e=>{const t=o(e);if(t)return t;const n=((e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],l=e.trim().split(L);let i="";for(let e=l.length-1;e>=0;e-=1){const t=l[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:m}=r(t);if(c){i=t+(i.length>0?" "+i:i);continue}let f=!!m,b=o(f?p.substring(0,m):p);if(!b){if(!f){i=t+(i.length>0?" "+i:i);continue}if(b=o(p),!b){i=t+(i.length>0?" "+i:i);continue}f=!1}const g=0===d.length?"":1===d.length?d[0]:n(d).join(":"),h=u?g+"!":g,x=h+b;if(s.indexOf(x)>-1)continue;s.push(x);const v=a(b,f);for(let e=0;e<v.length;++e){const t=v[e];s.push(h+t)}i=t+(i.length>0?" "+i:i)}return i})(e,r);return a(e,n),n};return n=l=>{const i=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:U(e.cacheSize),parseClassName:W(e),sortModifiers:E(e),...C(e)}))(i),o=r.cache.get,a=r.cache.set,n=s,s(l)},(...e)=>n(((...e)=>{let t,r,o=0,a="";for(;o<e.length;)(t=e[o++])&&(r=D(t))&&(a&&(a+=" "),a+=r);return a})(...e))},F=[],H=e=>{const t=t=>t[e]||F;return t.isThemeGetter=!0,t},X=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Y=/^\((?:(\w[\w-]*):)?(.+)\)$/i,K=/^\d+\/\d+$/,J=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Q=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Z=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,te=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>K.test(e),oe=e=>!!e&&!Number.isNaN(Number(e)),ae=e=>!!e&&Number.isInteger(Number(e)),ne=e=>e.endsWith("%")&&oe(e.slice(0,-1)),se=e=>J.test(e),le=()=>!0,ie=e=>Q.test(e)&&!Z.test(e),ce=()=>!1,de=e=>ee.test(e),ue=e=>te.test(e),pe=e=>!fe(e)&&!we(e),me=e=>Se(e,_e,ce),fe=e=>X.test(e),be=e=>Se(e,Me,ie),ge=e=>Se(e,Ie,oe),he=e=>Se(e,Oe,ce),xe=e=>Se(e,Ge,ue),ve=e=>Se(e,Ae,de),we=e=>Y.test(e),ye=e=>Pe(e,Me),ke=e=>Pe(e,Re),je=e=>Pe(e,Oe),Ne=e=>Pe(e,_e),ze=e=>Pe(e,Ge),Ce=e=>Pe(e,Ae,!0),Se=(e,t,r)=>{const o=X.exec(e);return!!o&&(o[1]?t(o[1]):r(o[2]))},Pe=(e,t,r=!1)=>{const o=Y.exec(e);return!!o&&(o[1]?t(o[1]):r)},Oe=e=>"position"===e||"percentage"===e,Ge=e=>"image"===e||"url"===e,_e=e=>"length"===e||"size"===e||"bg-size"===e,Me=e=>"length"===e,Ie=e=>"number"===e,Re=e=>"family-name"===e,Ae=e=>"shadow"===e,Te=B(()=>{const e=H("color"),t=H("font"),r=H("text"),o=H("font-weight"),a=H("tracking"),n=H("leading"),s=H("breakpoint"),l=H("container"),i=H("spacing"),c=H("radius"),d=H("shadow"),u=H("inset-shadow"),p=H("text-shadow"),m=H("drop-shadow"),f=H("blur"),b=H("perspective"),g=H("aspect"),h=H("ease"),x=H("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",we,fe],w=()=>[we,fe,i],y=()=>[re,"full","auto",...w()],k=()=>[ae,"none","subgrid",we,fe],j=()=>["auto",{span:["full",ae,we,fe]},ae,we,fe],N=()=>[ae,"auto",we,fe],z=()=>["auto","min","max","fr",we,fe],C=()=>["auto",...w()],S=()=>[re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],P=()=>[e,we,fe],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",je,he,{position:[we,fe]}],G=()=>["auto","cover","contain",Ne,me,{size:[we,fe]}],_=()=>[ne,ye,be],M=()=>["","none","full",c,we,fe],I=()=>["",oe,ye,be],R=()=>[oe,ne,je,he],A=()=>["","none",f,we,fe],T=()=>["none",oe,we,fe],$=()=>["none",oe,we,fe],U=()=>[oe,we,fe],q=()=>[re,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[se],breakpoint:[se],color:[le],container:[se],"drop-shadow":[se],ease:["in","out","in-out"],font:[pe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[se],shadow:[se],spacing:["px",oe],text:[se],"text-shadow":[se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",re,fe,we,g]}],container:["container"],columns:[{columns:[oe,fe,we,l]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:y()}],"inset-x":[{"inset-x":y()}],"inset-y":[{"inset-y":y()}],start:[{start:y()}],end:[{end:y()}],top:[{top:y()}],right:[{right:y()}],bottom:[{bottom:y()}],left:[{left:y()}],visibility:["visible","invisible","collapse"],z:[{z:[ae,"auto",we,fe]}],basis:[{basis:[re,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[oe,re,"auto","initial","none",fe]}],grow:[{grow:["",oe,we,fe]}],shrink:[{shrink:["",oe,we,fe]}],order:[{order:[ae,"first","last","none",we,fe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[l,"screen",...S()]}],"min-w":[{"min-w":[l,"screen","none",...S()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",r,ye,be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,we,ge]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ne,fe]}],"font-family":[{font:[ke,fe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,we,fe]}],"line-clamp":[{"line-clamp":[oe,"none",we,ge]}],leading:[{leading:[n,...w()]}],"list-image":[{"list-image":["none",we,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[oe,"from-font","auto",we,be]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[oe,"auto",we,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ae,we,fe],radial:["",we,fe],conic:[ae,we,fe]},ze,xe]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[oe,we,fe]}],"outline-w":[{outline:["",oe,ye,be]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Ce,ve]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,Ce,ve]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[oe,be]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,Ce,ve]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[oe,we,fe]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[we,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,fe]}],filter:[{filter:["","none",we,fe]}],blur:[{blur:A()}],brightness:[{brightness:[oe,we,fe]}],contrast:[{contrast:[oe,we,fe]}],"drop-shadow":[{"drop-shadow":["","none",m,Ce,ve]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",oe,we,fe]}],"hue-rotate":[{"hue-rotate":[oe,we,fe]}],invert:[{invert:["",oe,we,fe]}],saturate:[{saturate:[oe,we,fe]}],sepia:[{sepia:["",oe,we,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",we,fe]}],"backdrop-blur":[{"backdrop-blur":A()}],"backdrop-brightness":[{"backdrop-brightness":[oe,we,fe]}],"backdrop-contrast":[{"backdrop-contrast":[oe,we,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",oe,we,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[oe,we,fe]}],"backdrop-invert":[{"backdrop-invert":["",oe,we,fe]}],"backdrop-opacity":[{"backdrop-opacity":[oe,we,fe]}],"backdrop-saturate":[{"backdrop-saturate":[oe,we,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",oe,we,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[oe,"initial",we,fe]}],ease:[{ease:["linear","initial",h,we,fe]}],delay:[{delay:[oe,we,fe]}],animate:[{animate:["none",x,we,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,we,fe]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:T()}],"rotate-x":[{"rotate-x":T()}],"rotate-y":[{"rotate-y":T()}],"rotate-z":[{"rotate-z":T()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:U()}],"skew-x":[{"skew-x":U()}],"skew-y":[{"skew-y":U()}],transform:[{transform:[we,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:q()}],"translate-x":[{"translate-x":q()}],"translate-y":[{"translate-y":q()}],"translate-z":[{"translate-z":q()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,fe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[oe,ye,be,ge]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function $e(...e){return Te(w(e))}const Ue=(qe="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",Ve={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if(null==(null==Ve?void 0:Ve.variants))return k(qe,null==e?void 0:e.class,null==e?void 0:e.className);const{variants:r,defaultVariants:o}=Ve,a=Object.keys(r).map(t=>{const a=null==e?void 0:e[t],n=null==o?void 0:o[t];if(null===a)return null;const s=y(a)||y(n);return r[t][s]}),n=e&&Object.entries(e).reduce((e,t)=>{let[r,o]=t;return void 0===o||(e[r]=o),e},{}),s=null==Ve||null===(t=Ve.compoundVariants)||void 0===t?void 0:t.reduce((e,t)=>{let{class:r,className:a,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...n}[t]):{...o,...n}[t]===r})?[...e,r,a]:e},[]);return k(qe,a,s,null==e?void 0:e.class,null==e?void 0:e.className)});var qe,Ve;const We=m.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...s},l)=>{const i=n?o.Slot:"button";return a.jsx(i,{ref:l,"data-slot":"button","data-variant":t,"data-size":r,className:$e(Ue({variant:t,size:r,className:e})),...s})});function Ee({...e}){return a.jsx(f.Root,{"data-slot":"popover",...e})}function Le({...e}){return a.jsx(f.Trigger,{"data-slot":"popover-trigger",...e})}function De({className:e,align:t="center",sideOffset:r=4,...o}){return a.jsx(f.Portal,{children:a.jsx(f.Content,{"data-slot":"popover-content",align:t,sideOffset:r,className:$e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}We.displayName="Button";const Be=e=>{const{value:t,initialValue:r,onChange:o,disableAlpha:n=!1}=e;return a.jsxs(Ee,{children:[a.jsx(Le,{asChild:!0,children:a.jsxs(We,{"aria-label":"Select color",className:"h-8 w-full justify-start gap-2 bg-transparent px-2 py-[5px] text-left font-normal text-xs",variant:"outline",children:[a.jsx("div",{"aria-label":"Current color",className:"h-3.5 w-3.5 rounded-full border border-muted-foreground",style:{backgroundColor:t??r}}),a.jsx("span",{className:"truncate font-mono",children:t??r})]})}),a.jsx(De,{align:"start",className:"w-auto p-0",children:a.jsx(s,{color:t,disableAlpha:n,onChange:e=>o(e.hexa),presetColors:[]})})]})},Fe=e=>{const{selected:t}=e;return a.jsxs("div",{className:"flex flex-col",children:[a.jsx("p",{className:"leading-7",children:t.id}),a.jsx("p",{className:"text-muted-foreground text-xs",children:t.componentMeta.title})]})};function He({className:e,type:t,...r}){return a.jsx("input",{type:t,"data-slot":"input",className:$e("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}const Xe=e=>{const{value:t,initialValue:r,placeholder:o,onChange:n,suffix:s}=e;return a.jsxs("div",{className:"relative w-full",children:[a.jsx(He,{className:$e("!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",!!s&&"pr-8"),onChange:e=>n(+e.target.value),placeholder:o||"",type:"number",value:t??r}),!!s&&a.jsx("span",{"aria-label":`Unit: ${s}`,className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:s})]})},Ye=e=>{const{value:t,onChange:r}=e,o=(e,o)=>{r({...t,[e]:o})};return a.jsxs("div",{className:"flex w-full flex-wrap gap-2",children:[a.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[a.jsx(He,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>o("x",Number(e.target.value)),type:"number",value:Je(t.x)}),a.jsx("span",{"aria-label":"Unit: X",className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:"X"})]}),a.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[a.jsx(He,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>o("y",Number(e.target.value)),type:"number",value:Je(t.y)}),a.jsx("span",{"aria-label":"Unit: Y",className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:"Y"})]}),a.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[a.jsx(He,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>o("width",Number(e.target.value)),type:"number",value:Je(t.width)}),a.jsx("span",{"aria-label":"Unit: W",className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:"W"})]}),a.jsxs("div",{className:"relative w-[calc(50%_-_4px)]",children:[a.jsx(He,{className:"!text-xs h-8 px-2 py-[5px] pr-8 [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:e=>o("height",Number(e.target.value)),type:"number",value:Je(t.height)}),a.jsx("span",{"aria-label":"Unit: H",className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:"H"})]})]})},Ke=/(\.\d{2})\d+$/,Je=e=>e.toString().replace(Ke,"$1"),Qe=e=>{const{value:t,initialValue:r,placeholder:o,onChange:n,suffix:s}=e;return a.jsxs("div",{className:"relative w-full",children:[a.jsx(He,{className:$e("!text-xs h-8 px-2 py-[5px]",!!s&&"pr-8"),onChange:e=>n(e.target.value),placeholder:o||"",value:t||r}),!!s&&a.jsx("span",{"aria-label":`Unit: ${s}`,className:"pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",children:s})]})};function Ze({className:e,...t}){return a.jsx(b.Root,{"data-slot":"switch",className:$e("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(b.Thumb,{"data-slot":"switch-thumb",className:$e("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const et=e=>{const{value:t,initialValue:r,onChange:o}=e;return a.jsx("div",{className:"py-0.5",children:a.jsx(Ze,{checked:t||r,onCheckedChange:o})})},tt=e=>{const{value:t,onChange:o,accept:n=".jpg,.jpeg,.png,.gif",maxSize:s=10485760}=e,[l,c]=r.useState(""),d=r.useRef(null);return a.jsxs("div",{className:"group relative w-full overflow-hidden",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("label",{className:"flex-1 cursor-pointer",children:[a.jsx("input",{accept:n,className:$e("h-8 cursor-pointer px-2 py-[5px] text-xs","border-dashed transition-colors hover:border-primary","absolute h-0 w-0 opacity-0"),onChange:async e=>{const t=e.target.files?.[0];if(c(""),!t)return void o(null);const r=`.${t.name.split(".").pop()?.toLowerCase()}`;if(!n.includes(r))return c(`仅支持 ${n} 格式文件`),void o(null);if(t.size>s)return c(`文件大小不能超过 ${s/1024/1024}MB`),void o(null);try{const[e,r]=await Promise.all([new Promise((e,r)=>{const o=new FileReader;o.onload=()=>e(o.result),o.onerror=e=>r(e),o.readAsDataURL(t)}),new Promise((e,r)=>{const o=new Image;o.onload=()=>e({width:o.naturalWidth,height:o.naturalHeight}),o.onerror=r,o.src=URL.createObjectURL(t)})]);o({raw:{name:t.name,size:t.size,type:t.type,width:r.width,height:r.height},base64:e})}catch(e){c("文件读取失败,请重试"),o(null)}},ref:d,type:"file"}),a.jsxs("div",{className:"flex h-8 w-full items-center justify-center rounded-md border border-dashed text-muted-foreground text-xs transition-colors hover:border-primary",children:[a.jsx(i.Upload,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:t?"更换文件":"点击上传"})]})]}),!!t&&a.jsx(We,{"aria-label":"清除文件",className:"h-8 px-2 text-muted-foreground hover:text-destructive",onClick:()=>{o(null),d.current&&(d.current.value="")},size:"sm",type:"button",variant:"ghost",children:a.jsx(i.X,{className:"h-4 w-4"})})]}),!!t&&a.jsxs("div",{className:"mt-2 flex w-full items-center gap-2 text-foreground/80 text-xs",children:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.raw?.name}),a.jsxs("span",{className:"shrink-0 whitespace-nowrap text-muted-foreground/50",children:[(t.raw?.size/1024).toFixed(1),"KB"]})]}),!!l&&a.jsx("p",{className:"mt-1 text-destructive text-xs",role:"alert",children:l})]})};function rt({...e}){return a.jsx(g.Root,{"data-slot":"collapsible",...e})}function ot({...e}){return a.jsx(g.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function at({...e}){return a.jsx(g.CollapsibleContent,{"data-slot":"collapsible-content",...e})}const nt=e=>{const{field:t,children:o,initialValue:n,icon:s=!0}=e,[l,c]=r.useState(n??!0);return a.jsxs(rt,{className:"w-[calc(100%_+_32px)] -translate-x-4 space-y-2",onOpenChange:c,open:l,children:[a.jsxs("div",{className:"flex h-8 items-center justify-between space-x-4 bg-muted px-4",children:[a.jsx("h4",{children:t.title}),!!s&&a.jsx(ot,{asChild:!0,children:a.jsxs(We,{size:"sm",variant:"ghost",children:[a.jsx(i.ChevronsUpDown,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Toggle"})]})})]}),a.jsx(at,{className:"space-y-3 px-4 py-2",children:o})]})};function st({className:e,...t}){return a.jsx(h.Root,{"data-slot":"tabs",className:$e("flex flex-col gap-2",e),...t})}function lt({className:e,...t}){return a.jsx(h.List,{"data-slot":"tabs-list",className:$e("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function it({className:e,...t}){return a.jsx(h.Trigger,{"data-slot":"tabs-trigger",className:$e("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ct({className:e,...t}){return a.jsx(h.Content,{"data-slot":"tabs-content",className:$e("flex-1 outline-none",e),...t})}const dt=e=>{const{tabs:t,initialValue:o,children:n}=e,s=r.useMemo(()=>{if(t)return t;if(Array.isArray(n)&&n.length>0)return n.map(e=>({label:e.props.field.config.title,value:e.props.field.config.key}));throw new Error("TabSetter: children or tabs must be an array")},[t,n]),l=r.useMemo(()=>s[0]?.value,[s]);return a.jsxs(st,{className:"w-full",defaultValue:o??l,children:[a.jsx(lt,{className:"grid w-full",style:{gridTemplateColumns:`repeat(${s.length}, minmax(0, 1fr))`},children:s.map(e=>a.jsx(it,{value:e.value,children:e.label},e.value))}),Array.isArray(n)&&n.map(e=>a.jsx(ct,{className:"mt-0 box-border space-y-3 p-2",value:e.props.field.config.key,children:e},e.props.field.config.key))]})};function ut({className:e,...t}){return a.jsx(x.Root,{"data-slot":"label",className:$e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const pt={ColorSetter:Be,NodeIdSetter:Fe,NumberSetter:Xe,RectSetter:Ye,StringSetter:Qe,SwitchSetter:et,UploadSetter:tt,CollapseSetter:nt,TabSetter:dt};e.CollapseSetter=nt,e.ColorSetter=Be,e.NodeIdSetter=Fe,e.NumberSetter=Xe,e.RectSetter=Ye,e.SetterGroup={BASIC:"basic",ADVANCED:"advanced",LAYOUT:"layout",GROUP:"group"},e.StringSetter=Qe,e.SwitchSetter=et,e.TabSetter=dt,e.UploadSetter=tt,e.customFieldItem=(e,t)=>{const{label:r=!0,wrap:o=!1}=e.config.extraProps||{};return"boolean"!=typeof r||r?a.jsxs("div",{className:$e("flex w-full text-xs",o?"flex-col":"items-center"),children:[a.jsx(ut,{className:$e("shrink-0 grow-0 text-xs",o?"basis-[26px]":"basis-[100px]"),htmlFor:e.id,children:e.title}),a.jsx("div",{className:"flex flex-1 items-center justify-between",children:a.jsx("div",{className:"flex-1",children:t})})]}):a.jsx("div",{className:"flex w-full items-center",children:t})},e.default=pt,e.setterMap=pt,Object.defineProperty(e,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=index.min.js.map