@1urso/generic-editor 0.1.78 → 0.1.79

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.
@@ -1,9 +1,9 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react-dom`),require(`react/jsx-runtime`),require(`react-dom/server`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react-dom`,`react/jsx-runtime`,`react-dom/server`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.GenericEditor={},e.React,e.ReactDOM,e.jsxRuntime,e.ReactDOMServer))})(this,function(e,t,n,r,i){var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(e&&(t=e(e=0)),t),f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),p=e=>{let t={};for(var n in e)o(t,n,{get:e[n],enumerable:!0});return t},m=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},h=(e,t,n)=>(n=e==null?{}:a(l(e)),m(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e)),g=e=>m(o({},`__esModule`,{value:!0}),e);t=h(t),n=h(n);function _(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var v=[`color`],y=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,v);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),b=[`color`],x=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,b);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.99988 6C1.44759 6 0.999877 6.44772 0.999877 7L0.999877 8C0.999877 8.55228 1.44759 9 1.99988 9L6.99988 9L6.99988 13.5C6.99988 13.7761 7.22374 14 7.49988 14C7.77602 14 7.99988 13.7761 7.99988 13.5L7.99988 9L12.9999 9C13.5522 9 13.9999 8.55228 13.9999 8L13.9999 7C13.9999 6.44772 13.5522 6 12.9999 6L7.99988 6L7.99988 1.5C7.99988 1.22386 7.77602 1 7.49988 1C7.22373 1 6.99988 1.22386 6.99988 1.5L6.99988 6L1.99988 6Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),S=[`color`],C=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,S);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.99988 1C6.44759 1 5.99988 1.44772 5.99988 2V7H1.49988C1.22374 7 0.999878 7.22386 0.999878 7.5C0.999878 7.77614 1.22374 8 1.49988 8H5.99988V13C5.99988 13.5523 6.44759 14 6.99988 14H7.99988C8.55216 14 8.99988 13.5523 8.99988 13V8H13.4999C13.776 8 13.9999 7.77614 13.9999 7.5C13.9999 7.22386 13.776 7 13.4999 7H8.99988V2C8.99988 1.44772 8.55216 1 7.99988 1L6.99988 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),w=[`color`],T=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,w);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),E=[`color`],D=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,E);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),O=[`color`],k=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,O);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),A=[`color`],j=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,A);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),M=[`color`],N=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,M);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 2H12.5C12.7761 2 13 2.22386 13 2.5V12.5C13 12.7761 12.7761 13 12.5 13H2.5C2.22386 13 2 12.7761 2 12.5V2.5C2 2.22386 2.22386 2 2.5 2ZM1 2.5C1 1.67157 1.67157 1 2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5ZM7.5 4C7.77614 4 8 3.77614 8 3.5C8 3.22386 7.77614 3 7.5 3C7.22386 3 7 3.22386 7 3.5C7 3.77614 7.22386 4 7.5 4ZM8 5.5C8 5.77614 7.77614 6 7.5 6C7.22386 6 7 5.77614 7 5.5C7 5.22386 7.22386 5 7.5 5C7.77614 5 8 5.22386 8 5.5ZM7.5 8C7.77614 8 8 7.77614 8 7.5C8 7.22386 7.77614 7 7.5 7C7.22386 7 7 7.22386 7 7.5C7 7.77614 7.22386 8 7.5 8ZM10 7.5C10 7.77614 9.77614 8 9.5 8C9.22386 8 9 7.77614 9 7.5C9 7.22386 9.22386 7 9.5 7C9.77614 7 10 7.22386 10 7.5ZM11.5 8C11.7761 8 12 7.77614 12 7.5C12 7.22386 11.7761 7 11.5 7C11.2239 7 11 7.22386 11 7.5C11 7.77614 11.2239 8 11.5 8Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),P=[`color`],ee=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,P);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3 2.5C3 2.22386 3.22386 2 3.5 2H11.5C11.7761 2 12 2.22386 12 2.5V13.5C12 13.6818 11.9014 13.8492 11.7424 13.9373C11.5834 14.0254 11.3891 14.0203 11.235 13.924L7.5 11.5896L3.765 13.924C3.61087 14.0203 3.41659 14.0254 3.25762 13.9373C3.09864 13.8492 3 13.6818 3 13.5V2.5ZM4 3V12.5979L6.97 10.7416C7.29427 10.539 7.70573 10.539 8.03 10.7416L11 12.5979V3H4Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),F=[`color`],te=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,F);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`7`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}))}),I=[`color`],ne=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,I);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 13.25L14 13.25V14.75L1 14.75V13.25Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`7`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}))}),re=[`color`],ie=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,re);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.75 1L1.75 14L0.249999 14L0.25 1L1.75 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`10`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`5`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 5)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`5`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 5)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`3`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 3)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`3`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 3)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`9`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 9)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`9`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 9)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`11`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 11)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`11`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 11)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 1)`,fill:i}))}),ae=[`color`],oe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ae);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.25 1L13.25 14L14.75 14L14.75 1L13.25 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 5)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 5)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 3)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 3)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 9)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 9)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 11)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 11)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 1)`,fill:i}))}),se=[`color`],ce=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,se);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14 1.75L1 1.75L1 0.249999L14 0.25L14 1.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`8`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 10 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 10 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 12 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 12 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 6 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 6 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 4 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 4 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 4)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 4)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 4)`,fill:i}))}),le=[`color`],ue=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,le);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),de=[`color`],fe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,de);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),pe=[`color`],me=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,pe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.18194 4.18185C6.35767 4.00611 6.6426 4.00611 6.81833 4.18185L9.81833 7.18185C9.90272 7.26624 9.95013 7.3807 9.95013 7.50005C9.95013 7.6194 9.90272 7.73386 9.81833 7.81825L6.81833 10.8182C6.6426 10.994 6.35767 10.994 6.18194 10.8182C6.0062 10.6425 6.0062 10.3576 6.18194 10.1819L8.86374 7.50005L6.18194 4.81825C6.0062 4.64251 6.0062 4.35759 6.18194 4.18185Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),he=[`color`],ge=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,he);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),_e=[`color`],ve=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,_e);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ye=[`color`],be=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ye);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),xe=[`color`],Se=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,xe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM11 2V2.25C11 2.66421 10.6642 3 10.25 3H4.75C4.33579 3 4 2.66421 4 2.25V2H3.5C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V2.5C12 2.22386 11.7761 2 11.5 2H11Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ce=[`color`],we=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ce);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Te=[`color`],Ee=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Te);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),De=[`color`],Oe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,De);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ke=[`color`],Ae=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ke);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),je=[`color`],Me=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,je);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ne=[`color`],Pe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ne);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Fe=[`color`],Ie=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Fe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Le=[`color`],Re=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Le);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ze=[`color`],Be=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ze);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ve=[`color`],He=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ve);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ue=[`color`],We=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ue);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3 2.5C3 2.22386 3.22386 2 3.5 2H9.08579C9.21839 2 9.34557 2.05268 9.43934 2.14645L11.8536 4.56066C11.9473 4.65443 12 4.78161 12 4.91421V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.91421C13 4.51639 12.842 4.13486 12.5607 3.85355L10.1464 1.43934C9.86514 1.15804 9.48361 1 9.08579 1H3.5ZM4.5 4C4.22386 4 4 4.22386 4 4.5C4 4.77614 4.22386 5 4.5 5H7.5C7.77614 5 8 4.77614 8 4.5C8 4.22386 7.77614 4 7.5 4H4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H10.5C10.7761 11 11 10.7761 11 10.5C11 10.2239 10.7761 10 10.5 10H4.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ge=[`color`],Ke=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ge);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),qe=[`color`],Je=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,qe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ye=[`color`],Xe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ye);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ze=[`color`],Qe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ze);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.5 5.25C1.91421 5.25 2.25 4.91421 2.25 4.5C2.25 4.08579 1.91421 3.75 1.5 3.75C1.08579 3.75 0.75 4.08579 0.75 4.5C0.75 4.91421 1.08579 5.25 1.5 5.25ZM4 4.5C4 4.22386 4.22386 4 4.5 4H13.5C13.7761 4 14 4.22386 14 4.5C14 4.77614 13.7761 5 13.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H13.5C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H13.5C13.7761 11 14 10.7761 14 10.5C14 10.2239 13.7761 10 13.5 10H4.5ZM2.25 7.5C2.25 7.91421 1.91421 8.25 1.5 8.25C1.08579 8.25 0.75 7.91421 0.75 7.5C0.75 7.08579 1.08579 6.75 1.5 6.75C1.91421 6.75 2.25 7.08579 2.25 7.5ZM1.5 11.25C1.91421 11.25 2.25 10.9142 2.25 10.5C2.25 10.0858 1.91421 9.75 1.5 9.75C1.08579 9.75 0.75 10.0858 0.75 10.5C0.75 10.9142 1.08579 11.25 1.5 11.25Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),$e=[`color`],et=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,$e);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),tt=[`color`],nt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,tt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.4986 0C6.3257 0 5.36107 0.38943 4.73753 1.19361C4.23745 1.83856 4 2.68242 4 3.63325H5C5 2.84313 5.19691 2.23312 5.5278 1.80636C5.91615 1.30552 6.55152 1 7.4986 1C8.35683 1 8.96336 1.26502 9.35846 1.68623C9.75793 2.11211 10 2.76044 10 3.63601V6H3C2.44772 6 2 6.44772 2 7V13C2 13.5523 2.44772 14 3 14H12C12.5523 14 13 13.5523 13 13V7C13 6.44771 12.5523 6 12 6H11V3.63601C11 2.58135 10.7065 1.66167 10.0878 1.0021C9.46477 0.337871 8.57061 0 7.4986 0ZM3 7H12V13H3V7Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),rt=[`color`],it=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,rt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.9 0.499976C13.9 0.279062 13.7209 0.0999756 13.5 0.0999756C13.2791 0.0999756 13.1 0.279062 13.1 0.499976V1.09998H12.5C12.2791 1.09998 12.1 1.27906 12.1 1.49998C12.1 1.72089 12.2791 1.89998 12.5 1.89998H13.1V2.49998C13.1 2.72089 13.2791 2.89998 13.5 2.89998C13.7209 2.89998 13.9 2.72089 13.9 2.49998V1.89998H14.5C14.7209 1.89998 14.9 1.72089 14.9 1.49998C14.9 1.27906 14.7209 1.09998 14.5 1.09998H13.9V0.499976ZM11.8536 3.14642C12.0488 3.34168 12.0488 3.65826 11.8536 3.85353L10.8536 4.85353C10.6583 5.04879 10.3417 5.04879 10.1465 4.85353C9.9512 4.65827 9.9512 4.34169 10.1465 4.14642L11.1464 3.14643C11.3417 2.95116 11.6583 2.95116 11.8536 3.14642ZM9.85357 5.14642C10.0488 5.34168 10.0488 5.65827 9.85357 5.85353L2.85355 12.8535C2.65829 13.0488 2.34171 13.0488 2.14645 12.8535C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L9.14646 5.14642C9.34172 4.95116 9.65831 4.95116 9.85357 5.14642ZM13.5 5.09998C13.7209 5.09998 13.9 5.27906 13.9 5.49998V6.09998H14.5C14.7209 6.09998 14.9 6.27906 14.9 6.49998C14.9 6.72089 14.7209 6.89998 14.5 6.89998H13.9V7.49998C13.9 7.72089 13.7209 7.89998 13.5 7.89998C13.2791 7.89998 13.1 7.72089 13.1 7.49998V6.89998H12.5C12.2791 6.89998 12.1 6.72089 12.1 6.49998C12.1 6.27906 12.2791 6.09998 12.5 6.09998H13.1V5.49998C13.1 5.27906 13.2791 5.09998 13.5 5.09998ZM8.90002 0.499976C8.90002 0.279062 8.72093 0.0999756 8.50002 0.0999756C8.2791 0.0999756 8.10002 0.279062 8.10002 0.499976V1.09998H7.50002C7.2791 1.09998 7.10002 1.27906 7.10002 1.49998C7.10002 1.72089 7.2791 1.89998 7.50002 1.89998H8.10002V2.49998C8.10002 2.72089 8.2791 2.89998 8.50002 2.89998C8.72093 2.89998 8.90002 2.72089 8.90002 2.49998V1.89998H9.50002C9.72093 1.89998 9.90002 1.72089 9.90002 1.49998C9.90002 1.27906 9.72093 1.09998 9.50002 1.09998H8.90002V0.499976Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),at=[`color`],ot=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,at);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),st=[`color`],ct=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,st);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),lt=[`color`],ut=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,lt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.81819 0.93179C7.64245 0.756054 7.35753 0.756054 7.18179 0.93179L5.43179 2.68179C5.25605 2.85753 5.25605 3.14245 5.43179 3.31819C5.60753 3.49392 5.89245 3.49392 6.06819 3.31819L6.99999 2.38638V5.49999C6.99999 5.77613 7.22385 5.99999 7.49999 5.99999C7.77613 5.99999 7.99999 5.77613 7.99999 5.49999V2.38638L8.93179 3.31819C9.10753 3.49392 9.39245 3.49392 9.56819 3.31819C9.74392 3.14245 9.74392 2.85753 9.56819 2.68179L7.81819 0.93179ZM7.99999 9.49999C7.99999 9.22385 7.77613 8.99999 7.49999 8.99999C7.22385 8.99999 6.99999 9.22385 6.99999 9.49999V12.6136L6.06819 11.6818C5.89245 11.5061 5.60753 11.5061 5.43179 11.6818C5.25605 11.8575 5.25605 12.1424 5.43179 12.3182L7.18179 14.0682C7.35753 14.2439 7.64245 14.2439 7.81819 14.0682L9.56819 12.3182C9.74392 12.1424 9.74392 11.8575 9.56819 11.6818C9.39245 11.5061 9.10753 11.5061 8.93179 11.6818L7.99999 12.6136V9.49999ZM8.99999 7.49999C8.99999 7.22385 9.22385 6.99999 9.49999 6.99999H12.6136L11.6818 6.06819C11.5061 5.89245 11.5061 5.60753 11.6818 5.43179C11.8575 5.25605 12.1424 5.25605 12.3182 5.43179L14.0682 7.18179C14.2439 7.35753 14.2439 7.64245 14.0682 7.81819L12.3182 9.56819C12.1424 9.74392 11.8575 9.74392 11.6818 9.56819C11.5061 9.39245 11.5061 9.10753 11.6818 8.93179L12.6136 7.99999H9.49999C9.22385 7.99999 8.99999 7.77613 8.99999 7.49999ZM3.31819 6.06819L2.38638 6.99999H5.49999C5.77613 6.99999 5.99999 7.22385 5.99999 7.49999C5.99999 7.77613 5.77613 7.99999 5.49999 7.99999H2.38638L3.31819 8.93179C3.49392 9.10753 3.49392 9.39245 3.31819 9.56819C3.14245 9.74392 2.85753 9.74392 2.68179 9.56819L0.93179 7.81819C0.756054 7.64245 0.756054 7.35753 0.93179 7.18179L2.68179 5.43179C2.85753 5.25605 3.14245 5.25605 3.31819 5.43179C3.49392 5.60753 3.49392 5.89245 3.31819 6.06819Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),dt=[`color`],ft=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,dt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),pt=[`color`],mt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,pt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ht=[`color`],gt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ht);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.07505 4.10001C5.07505 2.91103 6.25727 1.92502 7.50005 1.92502C8.74283 1.92502 9.92505 2.91103 9.92505 4.10001C9.92505 5.19861 9.36782 5.71436 8.61854 6.37884L8.58757 6.4063C7.84481 7.06467 6.92505 7.87995 6.92505 9.5C6.92505 9.81757 7.18248 10.075 7.50005 10.075C7.81761 10.075 8.07505 9.81757 8.07505 9.5C8.07505 8.41517 8.62945 7.90623 9.38156 7.23925L9.40238 7.22079C10.1496 6.55829 11.075 5.73775 11.075 4.10001C11.075 2.12757 9.21869 0.775024 7.50005 0.775024C5.7814 0.775024 3.92505 2.12757 3.92505 4.10001C3.92505 4.41758 4.18249 4.67501 4.50005 4.67501C4.81761 4.67501 5.07505 4.41758 5.07505 4.10001ZM7.50005 13.3575C7.9833 13.3575 8.37505 12.9657 8.37505 12.4825C8.37505 11.9992 7.9833 11.6075 7.50005 11.6075C7.0168 11.6075 6.62505 11.9992 6.62505 12.4825C6.62505 12.9657 7.0168 13.3575 7.50005 13.3575Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),_t=[`color`],vt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,_t);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),yt=[`color`],bt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,yt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 7.50003C5 8.32845 4.32843 9.00003 3.5 9.00003C2.67157 9.00003 2 8.32845 2 7.50003C2 6.6716 2.67157 6.00003 3.5 6.00003C4.32843 6.00003 5 6.6716 5 7.50003ZM5.71313 8.66388C5.29445 9.45838 4.46048 10 3.5 10C2.11929 10 1 8.88074 1 7.50003C1 6.11931 2.11929 5.00003 3.5 5.00003C4.46048 5.00003 5.29445 5.54167 5.71313 6.33616L9.10424 4.21671C9.03643 3.98968 9 3.74911 9 3.50003C9 2.11932 10.1193 1.00003 11.5 1.00003C12.8807 1.00003 14 2.11932 14 3.50003C14 4.88074 12.8807 6.00003 11.5 6.00003C10.6915 6.00003 9.97264 5.61624 9.51566 5.0209L5.9853 7.22738C5.99502 7.31692 6 7.40789 6 7.50003C6 7.59216 5.99502 7.68312 5.9853 7.77267L9.51567 9.97915C9.97265 9.38382 10.6915 9.00003 11.5 9.00003C12.8807 9.00003 14 10.1193 14 11.5C14 12.8807 12.8807 14 11.5 14C10.1193 14 9 12.8807 9 11.5C9 11.2509 9.03643 11.0104 9.10425 10.7833L5.71313 8.66388ZM11.5 5.00003C12.3284 5.00003 13 4.32846 13 3.50003C13 2.6716 12.3284 2.00003 11.5 2.00003C10.6716 2.00003 10 2.6716 10 3.50003C10 4.32846 10.6716 5.00003 11.5 5.00003ZM13 11.5C13 12.3285 12.3284 13 11.5 13C10.6716 13 10 12.3285 10 11.5C10 10.6716 10.6716 10 11.5 10C12.3284 10 13 10.6716 13 11.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),xt=[`color`],St=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,xt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ct=[`color`],wt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ct);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992ZM0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992ZM1.99998 6.99994C1.99998 6.44766 2.44769 5.99995 2.99998 5.99995L5.99995 5.99995C6.55223 5.99995 6.99994 6.44766 6.99994 6.99994L6.99994 7.99993C6.99994 8.55221 6.55223 8.99992 5.99995 8.99992L2.99998 8.99992C2.4477 8.99992 1.99998 8.55221 1.99998 7.99993L1.99998 6.99994ZM8.99993 5.99995C8.44765 5.99995 7.99993 6.44766 7.99993 6.99994L7.99993 7.99993C7.99993 8.55221 8.44765 8.99992 8.99993 8.99992L11.9999 8.99992C12.5522 8.99992 12.9999 8.55221 12.9999 7.99993L12.9999 6.99994C12.9999 6.44766 12.5522 5.99995 11.9999 5.99995L8.99993 5.99995Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Tt=[`color`],Et=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Tt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM7 2C6.44772 2 6 2.44772 6 3V6C6 6.55228 6.44772 7 7 7H8C8.55228 7 9 6.55228 9 6V3C9 2.44772 8.55228 2 8 2H7ZM7 8C6.44772 8 6 8.44771 6 9V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V9C9 8.44772 8.55228 8 8 8H7ZM1.49988 14C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H1.49988Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Dt=[`color`],Ot=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Dt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 1H1.5H13.5H14V1.5V13.5V14H13.5H1.5H1V13.5V1.5V1ZM2 2V13H13V2H2Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),kt=[`color`],At=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,kt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.97942 1.25171L6.9585 1.30199L5.58662 4.60039C5.54342 4.70426 5.44573 4.77523 5.3336 4.78422L1.7727 5.0697L1.71841 5.07405L1.38687 5.10063L1.08608 5.12475C0.820085 5.14607 0.712228 5.47802 0.914889 5.65162L1.14406 5.84793L1.39666 6.06431L1.43802 6.09974L4.15105 8.42374C4.23648 8.49692 4.2738 8.61176 4.24769 8.72118L3.41882 12.196L3.40618 12.249L3.32901 12.5725L3.25899 12.866C3.19708 13.1256 3.47945 13.3308 3.70718 13.1917L3.9647 13.0344L4.24854 12.861L4.29502 12.8326L7.34365 10.9705C7.43965 10.9119 7.5604 10.9119 7.6564 10.9705L10.705 12.8326L10.7515 12.861L11.0354 13.0344L11.2929 13.1917C11.5206 13.3308 11.803 13.1256 11.7411 12.866L11.671 12.5725L11.5939 12.249L11.5812 12.196L10.7524 8.72118C10.7263 8.61176 10.7636 8.49692 10.849 8.42374L13.562 6.09974L13.6034 6.06431L13.856 5.84793L14.0852 5.65162C14.2878 5.47802 14.18 5.14607 13.914 5.12475L13.6132 5.10063L13.2816 5.07405L13.2274 5.0697L9.66645 4.78422C9.55432 4.77523 9.45663 4.70426 9.41343 4.60039L8.04155 1.30199L8.02064 1.25171L7.89291 0.944609L7.77702 0.665992C7.67454 0.419604 7.32551 0.419604 7.22303 0.665992L7.10715 0.944609L6.97942 1.25171ZM7.50003 2.60397L6.50994 4.98442C6.32273 5.43453 5.89944 5.74207 5.41351 5.78103L2.84361 5.98705L4.8016 7.66428C5.17183 7.98142 5.33351 8.47903 5.2204 8.95321L4.62221 11.461L6.8224 10.1171C7.23842 9.86302 7.76164 9.86302 8.17766 10.1171L10.3778 11.461L9.77965 8.95321C9.66654 8.47903 9.82822 7.98142 10.1984 7.66428L12.1564 5.98705L9.58654 5.78103C9.10061 5.74207 8.67732 5.43453 8.49011 4.98442L7.50003 2.60397Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),jt=[`color`],Mt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,jt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 3C2 2.44772 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3ZM12 3H3V12H12V3Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Nt=[`color`],Pt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Nt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ft=[`color`],It=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ft);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.90321 7.29677C1.90321 10.341 4.11041 12.4147 6.58893 12.8439C6.87255 12.893 7.06266 13.1627 7.01355 13.4464C6.96444 13.73 6.69471 13.9201 6.41109 13.871C3.49942 13.3668 0.86084 10.9127 0.86084 7.29677C0.860839 5.76009 1.55996 4.55245 2.37639 3.63377C2.96124 2.97568 3.63034 2.44135 4.16846 2.03202L2.53205 2.03202C2.25591 2.03202 2.03205 1.80816 2.03205 1.53202C2.03205 1.25588 2.25591 1.03202 2.53205 1.03202L5.53205 1.03202C5.80819 1.03202 6.03205 1.25588 6.03205 1.53202L6.03205 4.53202C6.03205 4.80816 5.80819 5.03202 5.53205 5.03202C5.25591 5.03202 5.03205 4.80816 5.03205 4.53202L5.03205 2.68645L5.03054 2.68759L5.03045 2.68766L5.03044 2.68767L5.03043 2.68767C4.45896 3.11868 3.76059 3.64538 3.15554 4.3262C2.44102 5.13021 1.90321 6.10154 1.90321 7.29677ZM13.0109 7.70321C13.0109 4.69115 10.8505 2.6296 8.40384 2.17029C8.12093 2.11718 7.93465 1.84479 7.98776 1.56188C8.04087 1.27898 8.31326 1.0927 8.59616 1.14581C11.4704 1.68541 14.0532 4.12605 14.0532 7.70321C14.0532 9.23988 13.3541 10.4475 12.5377 11.3662C11.9528 12.0243 11.2837 12.5586 10.7456 12.968L12.3821 12.968C12.6582 12.968 12.8821 13.1918 12.8821 13.468C12.8821 13.7441 12.6582 13.968 12.3821 13.968L9.38205 13.968C9.10591 13.968 8.88205 13.7441 8.88205 13.468L8.88205 10.468C8.88205 10.1918 9.10591 9.96796 9.38205 9.96796C9.65819 9.96796 9.88205 10.1918 9.88205 10.468L9.88205 12.3135L9.88362 12.3123C10.4551 11.8813 11.1535 11.3546 11.7585 10.6738C12.4731 9.86976 13.0109 8.89844 13.0109 7.70321Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Lt=[`color`],Rt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Lt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.94993 2.95002L3.94993 4.49998C3.94993 4.74851 3.74845 4.94998 3.49993 4.94998C3.2514 4.94998 3.04993 4.74851 3.04993 4.49998V2.50004C3.04993 2.45246 3.05731 2.40661 3.07099 2.36357C3.12878 2.18175 3.29897 2.05002 3.49993 2.05002H11.4999C11.6553 2.05002 11.7922 2.12872 11.8731 2.24842C11.9216 2.32024 11.9499 2.40682 11.9499 2.50002L11.9499 2.50004V4.49998C11.9499 4.74851 11.7485 4.94998 11.4999 4.94998C11.2514 4.94998 11.0499 4.74851 11.0499 4.49998V2.95002H8.04993V12.05H9.25428C9.50281 12.05 9.70428 12.2515 9.70428 12.5C9.70428 12.7486 9.50281 12.95 9.25428 12.95H5.75428C5.50575 12.95 5.30428 12.7486 5.30428 12.5C5.30428 12.2515 5.50575 12.05 5.75428 12.05H6.94993V2.95002H3.94993Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),zt=[`color`],Bt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,zt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Vt=[`color`],Ht=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Vt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ut=[`color`],Wt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ut);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Gt=[`color`],Kt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Gt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),qt=[`color`],Jt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,qt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.49998 0.849976C7.22383 0.849976 6.99998 1.07383 6.99998 1.34998V3.52234C6.99998 3.79848 7.22383 4.02234 7.49998 4.02234C7.77612 4.02234 7.99998 3.79848 7.99998 3.52234V1.8718C10.8862 2.12488 13.15 4.54806 13.15 7.49998C13.15 10.6204 10.6204 13.15 7.49998 13.15C4.37957 13.15 1.84998 10.6204 1.84998 7.49998C1.84998 6.10612 2.35407 4.83128 3.19049 3.8459C3.36919 3.63538 3.34339 3.31985 3.13286 3.14115C2.92234 2.96245 2.60681 2.98825 2.42811 3.19877C1.44405 4.35808 0.849976 5.86029 0.849976 7.49998C0.849976 11.1727 3.82728 14.15 7.49998 14.15C11.1727 14.15 14.15 11.1727 14.15 7.49998C14.15 3.82728 11.1727 0.849976 7.49998 0.849976ZM6.74049 8.08072L4.22363 4.57237C4.15231 4.47295 4.16346 4.33652 4.24998 4.25C4.33649 4.16348 4.47293 4.15233 4.57234 4.22365L8.08069 6.74051C8.56227 7.08599 8.61906 7.78091 8.19998 8.2C7.78089 8.61909 7.08597 8.56229 6.74049 8.08072Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Yt=[`color`],Xt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Yt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Zt=[`color`],Qt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Zt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),$t=[`color`],en=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,$t);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.81825 1.18188C7.64251 1.00615 7.35759 1.00615 7.18185 1.18188L4.18185 4.18188C4.00611 4.35762 4.00611 4.64254 4.18185 4.81828C4.35759 4.99401 4.64251 4.99401 4.81825 4.81828L7.05005 2.58648V9.49996C7.05005 9.74849 7.25152 9.94996 7.50005 9.94996C7.74858 9.94996 7.95005 9.74849 7.95005 9.49996V2.58648L10.1819 4.81828C10.3576 4.99401 10.6425 4.99401 10.8182 4.81828C10.994 4.64254 10.994 4.35762 10.8182 4.18188L7.81825 1.18188ZM2.5 9.99997C2.77614 9.99997 3 10.2238 3 10.5V12C3 12.5538 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2238 12.2239 9.99997 12.5 9.99997C12.7761 9.99997 13 10.2238 13 10.5V12C13 13.104 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2238 2.22386 9.99997 2.5 9.99997Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),tn=[`color`],nn=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,tn);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8 2H13.5C13.7761 2 14 2.22386 14 2.5V12.5C14 12.7761 13.7761 13 13.5 13H8V2ZM7 2H1.5C1.22386 2 1 2.22386 1 2.5V12.5C1 12.7761 1.22386 13 1.5 13H7V2ZM0 2.5C0 1.67157 0.671573 1 1.5 1H13.5C14.3284 1 15 1.67157 15 2.5V12.5C15 13.3284 14.3284 14 13.5 14H1.5C0.671573 14 0 13.3284 0 12.5V2.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))});function rn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function an(...e){return t=>{let n=!1,r=e.map(e=>{let r=rn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():rn(e[t],null)}}}}function L(...e){return t.useCallback(an(...e),e)}function on(e){let n=cn(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e,s=t.Children.toArray(a),c=s.find(fn);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,r.jsx)(n,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,r.jsx)(n,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}var sn=on(`Slot`);function cn(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(t.isValidElement(r)){let e=mn(r),a=pn(i,r.props);return r.type!==t.Fragment&&(a.ref=n?an(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var ln=Symbol(`radix.slottable`);function un(e){let t=({children:e})=>(0,r.jsx)(r.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=ln,t}var dn=un(`Slottable`);function fn(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ln}function pn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function mn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var R=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,n)=>{let i=on(`Primitive.${n}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,r.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function hn(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}var gn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),_n=`VisuallyHidden`,vn=t.forwardRef((e,t)=>(0,r.jsx)(R.span,{...e,ref:t,style:{...gn,...e.style}}));vn.displayName=_n;var yn=vn;function bn(e,n){let i=t.createContext(n),a=e=>{let{children:n,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,r.jsx)(i.Provider,{value:o,children:n})};a.displayName=e+`Provider`;function o(r){let a=t.useContext(i);if(a)return a;if(n!==void 0)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}return[a,o]}function xn(e,n=[]){let i=[];function a(n,a){let o=t.createContext(a),s=i.length;i=[...i,a];let c=n=>{let{scope:i,children:a,...c}=n,l=i?.[e]?.[s]||o,u=t.useMemo(()=>c,Object.values(c));return(0,r.jsx)(l.Provider,{value:u,children:a})};c.displayName=n+`Provider`;function l(r,i){let c=i?.[e]?.[s]||o,l=t.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${r}\` must be used within \`${n}\``)}return[c,l]}let o=()=>{let n=i.map(e=>t.createContext(e));return function(r){let i=r?.[e]||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return o.scopeName=e,[a,Sn(o,...n)]}function Sn(...e){let n=e[0];if(e.length===1)return n;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}function Cn(e){let n=e+`CollectionProvider`,[i,a]=xn(n),[o,s]=i(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:n,children:i}=e,a=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,r.jsx)(o,{scope:n,itemMap:s,collectionRef:a,children:i})};c.displayName=n;let l=e+`CollectionSlot`,u=on(l),d=t.default.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,r.jsx)(u,{ref:L(t,s(l,n).collectionRef),children:i})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=on(f),h=t.default.forwardRef((e,n)=>{let{scope:i,children:a,...o}=e,c=t.default.useRef(null),l=L(n,c),u=s(f,i);return t.default.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,r.jsx)(m,{[p]:``,ref:l,children:a})});h.displayName=f;function g(n){let r=s(e+`CollectionConsumer`,n);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:c,Slot:d,ItemSlot:h},g,a]}typeof window<`u`&&window.document&&window.document.createElement;function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var wn=globalThis?.document?t.useLayoutEffect:()=>{},Tn=t.useInsertionEffect||wn;function En({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){let[a,o,s]=Dn({defaultProp:n,onChange:r}),c=e!==void 0,l=c?e:a;{let n=t.useRef(e!==void 0);t.useEffect(()=>{let e=n.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${i} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=c},[c,i])}return[l,t.useCallback(t=>{if(c){let n=On(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function Dn({defaultProp:e,onChange:n}){let[r,i]=t.useState(e),a=t.useRef(r),o=t.useRef(n);return Tn(()=>{o.current=n},[n]),t.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,i,o]}function On(e){return typeof e==`function`}function kn(e,n){return t.useReducer((e,t)=>n[e][t]??e,e)}var An=e=>{let{present:n,children:r}=e,i=jn(n),a=typeof r==`function`?r({present:i.isPresent}):t.Children.only(r),o=L(i.ref,Nn(a));return typeof r==`function`||i.isPresent?t.cloneElement(a,{ref:o}):null};An.displayName=`Presence`;function jn(e){let[n,r]=t.useState(),i=t.useRef(null),a=t.useRef(e),o=t.useRef(`none`),[s,c]=kn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return t.useEffect(()=>{let e=Mn(i.current);o.current=s===`mounted`?e:`none`},[s]),wn(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=Mn(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),wn(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let o=Mn(i.current).includes(CSS.escape(r.animationName));if(r.target===n&&o&&(c(`ANIMATION_END`),!a.current)){let r=n.style.animationFillMode;n.style.animationFillMode=`forwards`,e=t.setTimeout(()=>{n.style.animationFillMode===`forwards`&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(o.current=Mn(i.current))};return n.addEventListener(`animationstart`,s),n.addEventListener(`animationcancel`,r),n.addEventListener(`animationend`,r),()=>{t.clearTimeout(e),n.removeEventListener(`animationstart`,s),n.removeEventListener(`animationcancel`,r),n.removeEventListener(`animationend`,r)}}else c(`ANIMATION_END`)},[n,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:t.useCallback(e=>{i.current=e?getComputedStyle(e):null,r(e)},[])}}function Mn(e){return e?.animationName||`none`}function Nn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Pn=t.useId||(()=>void 0),Fn=0;function In(e){let[n,r]=t.useState(Pn());return wn(()=>{e||r(e=>e??String(Fn++))},[e]),e||(n?`radix-${n}`:``)}var Ln=t.createContext(void 0),Rn=e=>{let{dir:t,children:n}=e;return(0,r.jsx)(Ln.Provider,{value:t,children:n})};function zn(e){let n=t.useContext(Ln);return e||n||`ltr`}var Bn=Rn;function Vn(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}function Hn(e,n=globalThis?.document){let r=Vn(e);t.useEffect(()=>{let e=e=>{e.key===`Escape`&&r(e)};return n.addEventListener(`keydown`,e,{capture:!0}),()=>n.removeEventListener(`keydown`,e,{capture:!0})},[r,n])}var Un=`DismissableLayer`,Wn=`dismissableLayer.update`,Gn=`dismissableLayer.pointerDownOutside`,Kn=`dismissableLayer.focusOutside`,qn,Jn=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yn=t.forwardRef((e,n)=>{let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=t.useContext(Jn),[f,p]=t.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=t.useState({}),g=L(n,e=>p(e)),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=Qn(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(o?.(e),c?.(e),e.defaultPrevented||l?.())},m),w=$n(e=>{let t=e.target;[...d.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||l?.())},m);return Hn(e=>{b===d.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},m),t.useEffect(()=>{if(f)return i&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(qn=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),er(),()=>{i&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qn)}},[f,m,i,d]),t.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),er())},[f,d]),t.useEffect(()=>{let e=()=>h({});return document.addEventListener(Wn,e),()=>document.removeEventListener(Wn,e)},[]),(0,r.jsx)(R.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:z(e.onFocusCapture,w.onFocusCapture),onBlurCapture:z(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,C.onPointerDownCapture)})});Yn.displayName=Un;var Xn=`DismissableLayerBranch`,Zn=t.forwardRef((e,n)=>{let i=t.useContext(Jn),a=t.useRef(null),o=L(n,a);return t.useEffect(()=>{let e=a.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}},[i.branches]),(0,r.jsx)(R.div,{...e,ref:o})});Zn.displayName=Xn;function Qn(e,n=globalThis?.document){let r=Vn(e),i=t.useRef(!1),a=t.useRef(()=>{});return t.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){tr(Gn,r,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(n.removeEventListener(`click`,a.current),a.current=t,n.addEventListener(`click`,a.current,{once:!0})):t()}else n.removeEventListener(`click`,a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(t),n.removeEventListener(`pointerdown`,e),n.removeEventListener(`click`,a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function $n(e,n=globalThis?.document){let r=Vn(e),i=t.useRef(!1);return t.useEffect(()=>{let e=e=>{e.target&&!i.current&&tr(Kn,r,{originalEvent:e},{discrete:!1})};return n.addEventListener(`focusin`,e),()=>n.removeEventListener(`focusin`,e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function er(){let e=new CustomEvent(Wn);document.dispatchEvent(e)}function tr(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hn(i,a):i.dispatchEvent(a)}var nr=`focusScope.autoFocusOnMount`,rr=`focusScope.autoFocusOnUnmount`,ir={bubbles:!1,cancelable:!0},ar=`FocusScope`,or=t.forwardRef((e,n)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=t.useState(null),d=Vn(o),f=Vn(s),p=t.useRef(null),m=L(n,e=>u(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:pr(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||pr(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&pr(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,l,h.paused]),t.useEffect(()=>{if(l){mr.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(nr,ir);l.addEventListener(nr,d),l.dispatchEvent(t),t.defaultPrevented||(sr(_r(lr(l)),{select:!0}),document.activeElement===e&&pr(l))}return()=>{l.removeEventListener(nr,d),setTimeout(()=>{let t=new CustomEvent(rr,ir);l.addEventListener(rr,f),l.dispatchEvent(t),t.defaultPrevented||pr(e??document.body,{select:!0}),l.removeEventListener(rr,f),mr.remove(h)},0)}}},[l,d,f,h]);let g=t.useCallback(e=>{if(!i&&!a||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=cr(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&pr(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&pr(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,h.paused]);return(0,r.jsx)(R.div,{tabIndex:-1,...c,ref:m,onKeyDown:g})});or.displayName=ar;function sr(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(pr(r,{select:t}),document.activeElement!==n)return}function cr(e){let t=lr(e);return[ur(t,e),ur(t.reverse(),e)]}function lr(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ur(e,t){for(let n of e)if(!dr(n,{upTo:t}))return n}function dr(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function fr(e){return e instanceof HTMLInputElement&&`select`in e}function pr(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fr(e)&&t&&e.select()}}var mr=hr();function hr(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=gr(e,t),e.unshift(t)},remove(t){e=gr(e,t),e[0]?.resume()}}}function gr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _r(e){return e.filter(e=>e.tagName!==`A`)}var vr=`Portal`,yr=t.forwardRef((e,i)=>{let{container:a,...o}=e,[s,c]=t.useState(!1);wn(()=>c(!0),[]);let l=a||s&&globalThis?.document?.body;return l?n.default.createPortal((0,r.jsx)(R.div,{...o,ref:i}),l):null});yr.displayName=vr;var br=0;function xr(){t.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Sr()),document.body.insertAdjacentElement(`beforeend`,e[1]??Sr()),br++,()=>{br===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),br--}},[])}function Sr(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Cr=function(){return Cr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Cr.apply(this,arguments)};function wr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Tr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Er=`right-scroll-bar-position`,Dr=`width-before-scroll-bar`,Or=`with-scroll-bars-hidden`,kr=`--removed-body-scroll-bar-size`;function Ar(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function jr(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var Mr=typeof window<`u`?t.useLayoutEffect:t.useEffect,Nr=new WeakMap;function Pr(e,t){var n=jr(t||null,function(t){return e.forEach(function(e){return Ar(e,t)})});return Mr(function(){var t=Nr.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ar(e,null)}),i.forEach(function(e){r.has(e)||Ar(e,a)})}Nr.set(n,e)},[e]),n}function Fr(e){return e}function Ir(e,t){t===void 0&&(t=Fr);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Lr(e){e===void 0&&(e={});var t=Ir(null);return t.options=Cr({async:!0,ssr:!1},e),t}var Rr=function(e){var n=e.sideCar,r=wr(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,Cr({},r))};Rr.isSideCarExport=!0;function zr(e,t){return e.useMedium(t),Rr}var Br=Lr(),Vr=function(){},Hr=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:Vr,onWheelCapture:Vr,onTouchMoveCapture:Vr}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=wr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Pr([r,n]),w=Cr(Cr({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:Br,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),Cr(Cr({},w),{ref:C})):t.createElement(y,Cr({},w,{className:l,ref:C}),c))});Hr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Hr.classNames={fullWidth:Dr,zeroRight:Er};var Ur,Wr=function(){if(Ur)return Ur;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Gr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Wr();return t&&e.setAttribute(`nonce`,t),e}function Kr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Jr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Gr())&&(Kr(t,n),qr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yr=function(){var e=Jr();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},Xr=function(){var e=Yr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Zr={left:0,top:0,right:0,gap:0},Qr=function(e){return parseInt(e||``,10)||0},$r=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Qr(n),Qr(r),Qr(i)]},ei=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Zr;var t=$r(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ti=Xr(),ni=`data-scroll-locked`,ri=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
- .${Or} {
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`),require(`react-dom`),require(`react/jsx-runtime`),require(`react-dom/server`)):typeof define==`function`&&define.amd?define([`exports`,`react`,`react-dom`,`react/jsx-runtime`,`react-dom/server`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.GenericEditor={},e.React,e.ReactDOM,e.jsxRuntime,e.ReactDOMServer))})(this,function(e,t,n,r,i){var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>()=>(e&&(t=e(e=0)),t),f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),p=e=>{let t={};for(var n in e)o(t,n,{get:e[n],enumerable:!0});return t},m=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},h=(e,t,n)=>(n=e==null?{}:a(l(e)),m(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e)),g=e=>m(o({},`__esModule`,{value:!0}),e);t=h(t),n=h(n);function _(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var v=[`color`],y=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,v);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),b=[`color`],x=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,b);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.99988 6C1.44759 6 0.999877 6.44772 0.999877 7L0.999877 8C0.999877 8.55228 1.44759 9 1.99988 9L6.99988 9L6.99988 13.5C6.99988 13.7761 7.22374 14 7.49988 14C7.77602 14 7.99988 13.7761 7.99988 13.5L7.99988 9L12.9999 9C13.5522 9 13.9999 8.55228 13.9999 8L13.9999 7C13.9999 6.44772 13.5522 6 12.9999 6L7.99988 6L7.99988 1.5C7.99988 1.22386 7.77602 1 7.49988 1C7.22373 1 6.99988 1.22386 6.99988 1.5L6.99988 6L1.99988 6Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),S=[`color`],C=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,S);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.99988 1C6.44759 1 5.99988 1.44772 5.99988 2V7H1.49988C1.22374 7 0.999878 7.22386 0.999878 7.5C0.999878 7.77614 1.22374 8 1.49988 8H5.99988V13C5.99988 13.5523 6.44759 14 6.99988 14H7.99988C8.55216 14 8.99988 13.5523 8.99988 13V8H13.4999C13.776 8 13.9999 7.77614 13.9999 7.5C13.9999 7.22386 13.776 7 13.4999 7H8.99988V2C8.99988 1.44772 8.55216 1 7.99988 1L6.99988 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),w=[`color`],T=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,w);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),E=[`color`],D=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,E);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),O=[`color`],k=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,O);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),A=[`color`],j=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,A);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),M=[`color`],N=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,M);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 2H12.5C12.7761 2 13 2.22386 13 2.5V12.5C13 12.7761 12.7761 13 12.5 13H2.5C2.22386 13 2 12.7761 2 12.5V2.5C2 2.22386 2.22386 2 2.5 2ZM1 2.5C1 1.67157 1.67157 1 2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5ZM7.5 4C7.77614 4 8 3.77614 8 3.5C8 3.22386 7.77614 3 7.5 3C7.22386 3 7 3.22386 7 3.5C7 3.77614 7.22386 4 7.5 4ZM8 5.5C8 5.77614 7.77614 6 7.5 6C7.22386 6 7 5.77614 7 5.5C7 5.22386 7.22386 5 7.5 5C7.77614 5 8 5.22386 8 5.5ZM7.5 8C7.77614 8 8 7.77614 8 7.5C8 7.22386 7.77614 7 7.5 7C7.22386 7 7 7.22386 7 7.5C7 7.77614 7.22386 8 7.5 8ZM10 7.5C10 7.77614 9.77614 8 9.5 8C9.22386 8 9 7.77614 9 7.5C9 7.22386 9.22386 7 9.5 7C9.77614 7 10 7.22386 10 7.5ZM11.5 8C11.7761 8 12 7.77614 12 7.5C12 7.22386 11.7761 7 11.5 7C11.2239 7 11 7.22386 11 7.5C11 7.77614 11.2239 8 11.5 8Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),P=[`color`],F=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,P);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3 2.5C3 2.22386 3.22386 2 3.5 2H11.5C11.7761 2 12 2.22386 12 2.5V13.5C12 13.6818 11.9014 13.8492 11.7424 13.9373C11.5834 14.0254 11.3891 14.0203 11.235 13.924L7.5 11.5896L3.765 13.924C3.61087 14.0203 3.41659 14.0254 3.25762 13.9373C3.09864 13.8492 3 13.6818 3 13.5V2.5ZM4 3V12.5979L6.97 10.7416C7.29427 10.539 7.70573 10.539 8.03 10.7416L11 12.5979V3H4Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),I=[`color`],ee=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,I);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`7`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}))}),L=[`color`],te=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,L);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 13.25L14 13.25V14.75L1 14.75V13.25Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`7`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`5`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`3`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`9`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`11`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`7`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`13`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`5`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`3`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`7`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`1`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`9`,width:`1`,height:`1`,rx:`.5`,fill:i}),(0,t.createElement)(`rect`,{x:`1`,y:`11`,width:`1`,height:`1`,rx:`.5`,fill:i}))}),ne=[`color`],re=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ne);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.75 1L1.75 14L0.249999 14L0.25 1L1.75 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`10`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`5`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 5)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`5`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 5)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`3`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 3)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`3`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 3)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`9`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 9)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`9`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 9)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`11`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 11)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`11`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 11)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`7`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 7)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`13`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 13)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 10 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 12 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 8 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 14 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 6 1)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`1`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(90 4 1)`,fill:i}))}),ie=[`color`],ae=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ie);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.25 1L13.25 14L14.75 14L14.75 1L13.25 1Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 5)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 5)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 3)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 3)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 9)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 9)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 11)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 11)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 7)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 13)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 5 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 3 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 7 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 1 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 9 1)`,fill:i}),(0,t.createElement)(`rect`,{width:`1`,height:`1`,rx:`.5`,transform:`matrix(0 1 1 0 11 1)`,fill:i}))}),oe=[`color`],se=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,oe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14 1.75L1 1.75L1 0.249999L14 0.25L14 1.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}),(0,t.createElement)(`rect`,{x:`8`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 10 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`10`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 10 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 12 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`12`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 12 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 6 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`6`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 6 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 4 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`4`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 4 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`8`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 8 4)`,fill:i}),(0,t.createElement)(`rect`,{x:`2`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 2 4)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`10`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 10)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`12`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 12)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`8`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 8)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`14`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 14)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`6`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 6)`,fill:i}),(0,t.createElement)(`rect`,{x:`14`,y:`4`,width:`1`,height:`1`,rx:`.5`,transform:`rotate(-180 14 4)`,fill:i}))}),ce=[`color`],le=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ce);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ue=[`color`],de=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ue);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),fe=[`color`],pe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,fe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.18194 4.18185C6.35767 4.00611 6.6426 4.00611 6.81833 4.18185L9.81833 7.18185C9.90272 7.26624 9.95013 7.3807 9.95013 7.50005C9.95013 7.6194 9.90272 7.73386 9.81833 7.81825L6.81833 10.8182C6.6426 10.994 6.35767 10.994 6.18194 10.8182C6.0062 10.6425 6.0062 10.3576 6.18194 10.1819L8.86374 7.50005L6.18194 4.81825C6.0062 4.64251 6.0062 4.35759 6.18194 4.18185Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),me=[`color`],he=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,me);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ge=[`color`],_e=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ge);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ve=[`color`],ye=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ve);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),be=[`color`],xe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,be);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 2V1H10V2H5ZM4.75 0C4.33579 0 4 0.335786 4 0.75V1H3.5C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V2.5C13 1.67157 12.3284 1 11.5 1H11V0.75C11 0.335786 10.6642 0 10.25 0H4.75ZM11 2V2.25C11 2.66421 10.6642 3 10.25 3H4.75C4.33579 3 4 2.66421 4 2.25V2H3.5C3.22386 2 3 2.22386 3 2.5V12.5C3 12.7761 3.22386 13 3.5 13H11.5C11.7761 13 12 12.7761 12 12.5V2.5C12 2.22386 11.7761 2 11.5 2H11Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Se=[`color`],Ce=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Se);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),we=[`color`],Te=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,we);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ee=[`color`],De=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ee);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Oe=[`color`],ke=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Oe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ae=[`color`],je=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ae);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Me=[`color`],Ne=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Me);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Pe=[`color`],Fe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Pe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ie=[`color`],Le=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ie);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Re=[`color`],ze=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Re);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Be=[`color`],Ve=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Be);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),He=[`color`],Ue=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,He);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3 2.5C3 2.22386 3.22386 2 3.5 2H9.08579C9.21839 2 9.34557 2.05268 9.43934 2.14645L11.8536 4.56066C11.9473 4.65443 12 4.78161 12 4.91421V12.5C12 12.7761 11.7761 13 11.5 13H3.5C3.22386 13 3 12.7761 3 12.5V2.5ZM3.5 1C2.67157 1 2 1.67157 2 2.5V12.5C2 13.3284 2.67157 14 3.5 14H11.5C12.3284 14 13 13.3284 13 12.5V4.91421C13 4.51639 12.842 4.13486 12.5607 3.85355L10.1464 1.43934C9.86514 1.15804 9.48361 1 9.08579 1H3.5ZM4.5 4C4.22386 4 4 4.22386 4 4.5C4 4.77614 4.22386 5 4.5 5H7.5C7.77614 5 8 4.77614 8 4.5C8 4.22386 7.77614 4 7.5 4H4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H10.5C10.7761 8 11 7.77614 11 7.5C11 7.22386 10.7761 7 10.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H10.5C10.7761 11 11 10.7761 11 10.5C11 10.2239 10.7761 10 10.5 10H4.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),We=[`color`],Ge=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,We);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ke=[`color`],qe=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ke);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Je=[`color`],Ye=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Je);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Xe=[`color`],Ze=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Xe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.5 5.25C1.91421 5.25 2.25 4.91421 2.25 4.5C2.25 4.08579 1.91421 3.75 1.5 3.75C1.08579 3.75 0.75 4.08579 0.75 4.5C0.75 4.91421 1.08579 5.25 1.5 5.25ZM4 4.5C4 4.22386 4.22386 4 4.5 4H13.5C13.7761 4 14 4.22386 14 4.5C14 4.77614 13.7761 5 13.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM4.5 7C4.22386 7 4 7.22386 4 7.5C4 7.77614 4.22386 8 4.5 8H13.5C13.7761 8 14 7.77614 14 7.5C14 7.22386 13.7761 7 13.5 7H4.5ZM4.5 10C4.22386 10 4 10.2239 4 10.5C4 10.7761 4.22386 11 4.5 11H13.5C13.7761 11 14 10.7761 14 10.5C14 10.2239 13.7761 10 13.5 10H4.5ZM2.25 7.5C2.25 7.91421 1.91421 8.25 1.5 8.25C1.08579 8.25 0.75 7.91421 0.75 7.5C0.75 7.08579 1.08579 6.75 1.5 6.75C1.91421 6.75 2.25 7.08579 2.25 7.5ZM1.5 11.25C1.91421 11.25 2.25 10.9142 2.25 10.5C2.25 10.0858 1.91421 9.75 1.5 9.75C1.08579 9.75 0.75 10.0858 0.75 10.5C0.75 10.9142 1.08579 11.25 1.5 11.25Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Qe=[`color`],$e=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Qe);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),et=[`color`],tt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,et);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.4986 0C6.3257 0 5.36107 0.38943 4.73753 1.19361C4.23745 1.83856 4 2.68242 4 3.63325H5C5 2.84313 5.19691 2.23312 5.5278 1.80636C5.91615 1.30552 6.55152 1 7.4986 1C8.35683 1 8.96336 1.26502 9.35846 1.68623C9.75793 2.11211 10 2.76044 10 3.63601V6H3C2.44772 6 2 6.44772 2 7V13C2 13.5523 2.44772 14 3 14H12C12.5523 14 13 13.5523 13 13V7C13 6.44771 12.5523 6 12 6H11V3.63601C11 2.58135 10.7065 1.66167 10.0878 1.0021C9.46477 0.337871 8.57061 0 7.4986 0ZM3 7H12V13H3V7Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),nt=[`color`],rt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,nt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M13.9 0.499976C13.9 0.279062 13.7209 0.0999756 13.5 0.0999756C13.2791 0.0999756 13.1 0.279062 13.1 0.499976V1.09998H12.5C12.2791 1.09998 12.1 1.27906 12.1 1.49998C12.1 1.72089 12.2791 1.89998 12.5 1.89998H13.1V2.49998C13.1 2.72089 13.2791 2.89998 13.5 2.89998C13.7209 2.89998 13.9 2.72089 13.9 2.49998V1.89998H14.5C14.7209 1.89998 14.9 1.72089 14.9 1.49998C14.9 1.27906 14.7209 1.09998 14.5 1.09998H13.9V0.499976ZM11.8536 3.14642C12.0488 3.34168 12.0488 3.65826 11.8536 3.85353L10.8536 4.85353C10.6583 5.04879 10.3417 5.04879 10.1465 4.85353C9.9512 4.65827 9.9512 4.34169 10.1465 4.14642L11.1464 3.14643C11.3417 2.95116 11.6583 2.95116 11.8536 3.14642ZM9.85357 5.14642C10.0488 5.34168 10.0488 5.65827 9.85357 5.85353L2.85355 12.8535C2.65829 13.0488 2.34171 13.0488 2.14645 12.8535C1.95118 12.6583 1.95118 12.3417 2.14645 12.1464L9.14646 5.14642C9.34172 4.95116 9.65831 4.95116 9.85357 5.14642ZM13.5 5.09998C13.7209 5.09998 13.9 5.27906 13.9 5.49998V6.09998H14.5C14.7209 6.09998 14.9 6.27906 14.9 6.49998C14.9 6.72089 14.7209 6.89998 14.5 6.89998H13.9V7.49998C13.9 7.72089 13.7209 7.89998 13.5 7.89998C13.2791 7.89998 13.1 7.72089 13.1 7.49998V6.89998H12.5C12.2791 6.89998 12.1 6.72089 12.1 6.49998C12.1 6.27906 12.2791 6.09998 12.5 6.09998H13.1V5.49998C13.1 5.27906 13.2791 5.09998 13.5 5.09998ZM8.90002 0.499976C8.90002 0.279062 8.72093 0.0999756 8.50002 0.0999756C8.2791 0.0999756 8.10002 0.279062 8.10002 0.499976V1.09998H7.50002C7.2791 1.09998 7.10002 1.27906 7.10002 1.49998C7.10002 1.72089 7.2791 1.89998 7.50002 1.89998H8.10002V2.49998C8.10002 2.72089 8.2791 2.89998 8.50002 2.89998C8.72093 2.89998 8.90002 2.72089 8.90002 2.49998V1.89998H9.50002C9.72093 1.89998 9.90002 1.72089 9.90002 1.49998C9.90002 1.27906 9.72093 1.09998 9.50002 1.09998H8.90002V0.499976Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),it=[`color`],at=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,it);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ot=[`color`],st=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ot);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ct=[`color`],lt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ct);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.81819 0.93179C7.64245 0.756054 7.35753 0.756054 7.18179 0.93179L5.43179 2.68179C5.25605 2.85753 5.25605 3.14245 5.43179 3.31819C5.60753 3.49392 5.89245 3.49392 6.06819 3.31819L6.99999 2.38638V5.49999C6.99999 5.77613 7.22385 5.99999 7.49999 5.99999C7.77613 5.99999 7.99999 5.77613 7.99999 5.49999V2.38638L8.93179 3.31819C9.10753 3.49392 9.39245 3.49392 9.56819 3.31819C9.74392 3.14245 9.74392 2.85753 9.56819 2.68179L7.81819 0.93179ZM7.99999 9.49999C7.99999 9.22385 7.77613 8.99999 7.49999 8.99999C7.22385 8.99999 6.99999 9.22385 6.99999 9.49999V12.6136L6.06819 11.6818C5.89245 11.5061 5.60753 11.5061 5.43179 11.6818C5.25605 11.8575 5.25605 12.1424 5.43179 12.3182L7.18179 14.0682C7.35753 14.2439 7.64245 14.2439 7.81819 14.0682L9.56819 12.3182C9.74392 12.1424 9.74392 11.8575 9.56819 11.6818C9.39245 11.5061 9.10753 11.5061 8.93179 11.6818L7.99999 12.6136V9.49999ZM8.99999 7.49999C8.99999 7.22385 9.22385 6.99999 9.49999 6.99999H12.6136L11.6818 6.06819C11.5061 5.89245 11.5061 5.60753 11.6818 5.43179C11.8575 5.25605 12.1424 5.25605 12.3182 5.43179L14.0682 7.18179C14.2439 7.35753 14.2439 7.64245 14.0682 7.81819L12.3182 9.56819C12.1424 9.74392 11.8575 9.74392 11.6818 9.56819C11.5061 9.39245 11.5061 9.10753 11.6818 8.93179L12.6136 7.99999H9.49999C9.22385 7.99999 8.99999 7.77613 8.99999 7.49999ZM3.31819 6.06819L2.38638 6.99999H5.49999C5.77613 6.99999 5.99999 7.22385 5.99999 7.49999C5.99999 7.77613 5.77613 7.99999 5.49999 7.99999H2.38638L3.31819 8.93179C3.49392 9.10753 3.49392 9.39245 3.31819 9.56819C3.14245 9.74392 2.85753 9.74392 2.68179 9.56819L0.93179 7.81819C0.756054 7.64245 0.756054 7.35753 0.93179 7.18179L2.68179 5.43179C2.85753 5.25605 3.14245 5.25605 3.31819 5.43179C3.49392 5.60753 3.49392 5.89245 3.31819 6.06819Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ut=[`color`],dt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ut);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),ft=[`color`],pt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,ft);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),mt=[`color`],ht=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,mt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.07505 4.10001C5.07505 2.91103 6.25727 1.92502 7.50005 1.92502C8.74283 1.92502 9.92505 2.91103 9.92505 4.10001C9.92505 5.19861 9.36782 5.71436 8.61854 6.37884L8.58757 6.4063C7.84481 7.06467 6.92505 7.87995 6.92505 9.5C6.92505 9.81757 7.18248 10.075 7.50005 10.075C7.81761 10.075 8.07505 9.81757 8.07505 9.5C8.07505 8.41517 8.62945 7.90623 9.38156 7.23925L9.40238 7.22079C10.1496 6.55829 11.075 5.73775 11.075 4.10001C11.075 2.12757 9.21869 0.775024 7.50005 0.775024C5.7814 0.775024 3.92505 2.12757 3.92505 4.10001C3.92505 4.41758 4.18249 4.67501 4.50005 4.67501C4.81761 4.67501 5.07505 4.41758 5.07505 4.10001ZM7.50005 13.3575C7.9833 13.3575 8.37505 12.9657 8.37505 12.4825C8.37505 11.9992 7.9833 11.6075 7.50005 11.6075C7.0168 11.6075 6.62505 11.9992 6.62505 12.4825C6.62505 12.9657 7.0168 13.3575 7.50005 13.3575Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),gt=[`color`],_t=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,gt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),vt=[`color`],yt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,vt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5 7.50003C5 8.32845 4.32843 9.00003 3.5 9.00003C2.67157 9.00003 2 8.32845 2 7.50003C2 6.6716 2.67157 6.00003 3.5 6.00003C4.32843 6.00003 5 6.6716 5 7.50003ZM5.71313 8.66388C5.29445 9.45838 4.46048 10 3.5 10C2.11929 10 1 8.88074 1 7.50003C1 6.11931 2.11929 5.00003 3.5 5.00003C4.46048 5.00003 5.29445 5.54167 5.71313 6.33616L9.10424 4.21671C9.03643 3.98968 9 3.74911 9 3.50003C9 2.11932 10.1193 1.00003 11.5 1.00003C12.8807 1.00003 14 2.11932 14 3.50003C14 4.88074 12.8807 6.00003 11.5 6.00003C10.6915 6.00003 9.97264 5.61624 9.51566 5.0209L5.9853 7.22738C5.99502 7.31692 6 7.40789 6 7.50003C6 7.59216 5.99502 7.68312 5.9853 7.77267L9.51567 9.97915C9.97265 9.38382 10.6915 9.00003 11.5 9.00003C12.8807 9.00003 14 10.1193 14 11.5C14 12.8807 12.8807 14 11.5 14C10.1193 14 9 12.8807 9 11.5C9 11.2509 9.03643 11.0104 9.10425 10.7833L5.71313 8.66388ZM11.5 5.00003C12.3284 5.00003 13 4.32846 13 3.50003C13 2.6716 12.3284 2.00003 11.5 2.00003C10.6716 2.00003 10 2.6716 10 3.50003C10 4.32846 10.6716 5.00003 11.5 5.00003ZM13 11.5C13 12.3285 12.3284 13 11.5 13C10.6716 13 10 12.3285 10 11.5C10 10.6716 10.6716 10 11.5 10C12.3284 10 13 10.6716 13 11.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),bt=[`color`],xt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,bt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),St=[`color`],Ct=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,St);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992ZM0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992ZM1.99998 6.99994C1.99998 6.44766 2.44769 5.99995 2.99998 5.99995L5.99995 5.99995C6.55223 5.99995 6.99994 6.44766 6.99994 6.99994L6.99994 7.99993C6.99994 8.55221 6.55223 8.99992 5.99995 8.99992L2.99998 8.99992C2.4477 8.99992 1.99998 8.55221 1.99998 7.99993L1.99998 6.99994ZM8.99993 5.99995C8.44765 5.99995 7.99993 6.44766 7.99993 6.99994L7.99993 7.99993C7.99993 8.55221 8.44765 8.99992 8.99993 8.99992L11.9999 8.99992C12.5522 8.99992 12.9999 8.55221 12.9999 7.99993L12.9999 6.99994C12.9999 6.44766 12.5522 5.99995 11.9999 5.99995L8.99993 5.99995Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),wt=[`color`],Tt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,wt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM7 2C6.44772 2 6 2.44772 6 3V6C6 6.55228 6.44772 7 7 7H8C8.55228 7 9 6.55228 9 6V3C9 2.44772 8.55228 2 8 2H7ZM7 8C6.44772 8 6 8.44771 6 9V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V9C9 8.44772 8.55228 8 8 8H7ZM1.49988 14C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H1.49988Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Et=[`color`],Dt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Et);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1 1H1.5H13.5H14V1.5V13.5V14H13.5H1.5H1V13.5V1.5V1ZM2 2V13H13V2H2Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ot=[`color`],kt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ot);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M6.97942 1.25171L6.9585 1.30199L5.58662 4.60039C5.54342 4.70426 5.44573 4.77523 5.3336 4.78422L1.7727 5.0697L1.71841 5.07405L1.38687 5.10063L1.08608 5.12475C0.820085 5.14607 0.712228 5.47802 0.914889 5.65162L1.14406 5.84793L1.39666 6.06431L1.43802 6.09974L4.15105 8.42374C4.23648 8.49692 4.2738 8.61176 4.24769 8.72118L3.41882 12.196L3.40618 12.249L3.32901 12.5725L3.25899 12.866C3.19708 13.1256 3.47945 13.3308 3.70718 13.1917L3.9647 13.0344L4.24854 12.861L4.29502 12.8326L7.34365 10.9705C7.43965 10.9119 7.5604 10.9119 7.6564 10.9705L10.705 12.8326L10.7515 12.861L11.0354 13.0344L11.2929 13.1917C11.5206 13.3308 11.803 13.1256 11.7411 12.866L11.671 12.5725L11.5939 12.249L11.5812 12.196L10.7524 8.72118C10.7263 8.61176 10.7636 8.49692 10.849 8.42374L13.562 6.09974L13.6034 6.06431L13.856 5.84793L14.0852 5.65162C14.2878 5.47802 14.18 5.14607 13.914 5.12475L13.6132 5.10063L13.2816 5.07405L13.2274 5.0697L9.66645 4.78422C9.55432 4.77523 9.45663 4.70426 9.41343 4.60039L8.04155 1.30199L8.02064 1.25171L7.89291 0.944609L7.77702 0.665992C7.67454 0.419604 7.32551 0.419604 7.22303 0.665992L7.10715 0.944609L6.97942 1.25171ZM7.50003 2.60397L6.50994 4.98442C6.32273 5.43453 5.89944 5.74207 5.41351 5.78103L2.84361 5.98705L4.8016 7.66428C5.17183 7.98142 5.33351 8.47903 5.2204 8.95321L4.62221 11.461L6.8224 10.1171C7.23842 9.86302 7.76164 9.86302 8.17766 10.1171L10.3778 11.461L9.77965 8.95321C9.66654 8.47903 9.82822 7.98142 10.1984 7.66428L12.1564 5.98705L9.58654 5.78103C9.10061 5.74207 8.67732 5.43453 8.49011 4.98442L7.50003 2.60397Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),At=[`color`],jt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,At);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 3C2 2.44772 2.44772 2 3 2H12C12.5523 2 13 2.44772 13 3V12C13 12.5523 12.5523 13 12 13H3C2.44772 13 2 12.5523 2 12V3ZM12 3H3V12H12V3Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Mt=[`color`],Nt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Mt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Pt=[`color`],Ft=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Pt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M1.90321 7.29677C1.90321 10.341 4.11041 12.4147 6.58893 12.8439C6.87255 12.893 7.06266 13.1627 7.01355 13.4464C6.96444 13.73 6.69471 13.9201 6.41109 13.871C3.49942 13.3668 0.86084 10.9127 0.86084 7.29677C0.860839 5.76009 1.55996 4.55245 2.37639 3.63377C2.96124 2.97568 3.63034 2.44135 4.16846 2.03202L2.53205 2.03202C2.25591 2.03202 2.03205 1.80816 2.03205 1.53202C2.03205 1.25588 2.25591 1.03202 2.53205 1.03202L5.53205 1.03202C5.80819 1.03202 6.03205 1.25588 6.03205 1.53202L6.03205 4.53202C6.03205 4.80816 5.80819 5.03202 5.53205 5.03202C5.25591 5.03202 5.03205 4.80816 5.03205 4.53202L5.03205 2.68645L5.03054 2.68759L5.03045 2.68766L5.03044 2.68767L5.03043 2.68767C4.45896 3.11868 3.76059 3.64538 3.15554 4.3262C2.44102 5.13021 1.90321 6.10154 1.90321 7.29677ZM13.0109 7.70321C13.0109 4.69115 10.8505 2.6296 8.40384 2.17029C8.12093 2.11718 7.93465 1.84479 7.98776 1.56188C8.04087 1.27898 8.31326 1.0927 8.59616 1.14581C11.4704 1.68541 14.0532 4.12605 14.0532 7.70321C14.0532 9.23988 13.3541 10.4475 12.5377 11.3662C11.9528 12.0243 11.2837 12.5586 10.7456 12.968L12.3821 12.968C12.6582 12.968 12.8821 13.1918 12.8821 13.468C12.8821 13.7441 12.6582 13.968 12.3821 13.968L9.38205 13.968C9.10591 13.968 8.88205 13.7441 8.88205 13.468L8.88205 10.468C8.88205 10.1918 9.10591 9.96796 9.38205 9.96796C9.65819 9.96796 9.88205 10.1918 9.88205 10.468L9.88205 12.3135L9.88362 12.3123C10.4551 11.8813 11.1535 11.3546 11.7585 10.6738C12.4731 9.86976 13.0109 8.89844 13.0109 7.70321Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),It=[`color`],Lt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,It);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M3.94993 2.95002L3.94993 4.49998C3.94993 4.74851 3.74845 4.94998 3.49993 4.94998C3.2514 4.94998 3.04993 4.74851 3.04993 4.49998V2.50004C3.04993 2.45246 3.05731 2.40661 3.07099 2.36357C3.12878 2.18175 3.29897 2.05002 3.49993 2.05002H11.4999C11.6553 2.05002 11.7922 2.12872 11.8731 2.24842C11.9216 2.32024 11.9499 2.40682 11.9499 2.50002L11.9499 2.50004V4.49998C11.9499 4.74851 11.7485 4.94998 11.4999 4.94998C11.2514 4.94998 11.0499 4.74851 11.0499 4.49998V2.95002H8.04993V12.05H9.25428C9.50281 12.05 9.70428 12.2515 9.70428 12.5C9.70428 12.7486 9.50281 12.95 9.25428 12.95H5.75428C5.50575 12.95 5.30428 12.7486 5.30428 12.5C5.30428 12.2515 5.50575 12.05 5.75428 12.05H6.94993V2.95002H3.94993Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Rt=[`color`],zt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Rt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Bt=[`color`],Vt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Bt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Ht=[`color`],Ut=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Ht);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Wt=[`color`],Gt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Wt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Kt=[`color`],qt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Kt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.49998 0.849976C7.22383 0.849976 6.99998 1.07383 6.99998 1.34998V3.52234C6.99998 3.79848 7.22383 4.02234 7.49998 4.02234C7.77612 4.02234 7.99998 3.79848 7.99998 3.52234V1.8718C10.8862 2.12488 13.15 4.54806 13.15 7.49998C13.15 10.6204 10.6204 13.15 7.49998 13.15C4.37957 13.15 1.84998 10.6204 1.84998 7.49998C1.84998 6.10612 2.35407 4.83128 3.19049 3.8459C3.36919 3.63538 3.34339 3.31985 3.13286 3.14115C2.92234 2.96245 2.60681 2.98825 2.42811 3.19877C1.44405 4.35808 0.849976 5.86029 0.849976 7.49998C0.849976 11.1727 3.82728 14.15 7.49998 14.15C11.1727 14.15 14.15 11.1727 14.15 7.49998C14.15 3.82728 11.1727 0.849976 7.49998 0.849976ZM6.74049 8.08072L4.22363 4.57237C4.15231 4.47295 4.16346 4.33652 4.24998 4.25C4.33649 4.16348 4.47293 4.15233 4.57234 4.22365L8.08069 6.74051C8.56227 7.08599 8.61906 7.78091 8.19998 8.2C7.78089 8.61909 7.08597 8.56229 6.74049 8.08072Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Jt=[`color`],Yt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Jt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Xt=[`color`],Zt=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Xt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),Qt=[`color`],$t=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,Qt);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M7.81825 1.18188C7.64251 1.00615 7.35759 1.00615 7.18185 1.18188L4.18185 4.18188C4.00611 4.35762 4.00611 4.64254 4.18185 4.81828C4.35759 4.99401 4.64251 4.99401 4.81825 4.81828L7.05005 2.58648V9.49996C7.05005 9.74849 7.25152 9.94996 7.50005 9.94996C7.74858 9.94996 7.95005 9.74849 7.95005 9.49996V2.58648L10.1819 4.81828C10.3576 4.99401 10.6425 4.99401 10.8182 4.81828C10.994 4.64254 10.994 4.35762 10.8182 4.18188L7.81825 1.18188ZM2.5 9.99997C2.77614 9.99997 3 10.2238 3 10.5V12C3 12.5538 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2238 12.2239 9.99997 12.5 9.99997C12.7761 9.99997 13 10.2238 13 10.5V12C13 13.104 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2238 2.22386 9.99997 2.5 9.99997Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))}),en=[`color`],tn=(0,t.forwardRef)(function(e,n){var r=e.color,i=r===void 0?`currentColor`:r,a=_(e,en);return(0,t.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},a,{ref:n}),(0,t.createElement)(`path`,{d:`M8 2H13.5C13.7761 2 14 2.22386 14 2.5V12.5C14 12.7761 13.7761 13 13.5 13H8V2ZM7 2H1.5C1.22386 2 1 2.22386 1 2.5V12.5C1 12.7761 1.22386 13 1.5 13H7V2ZM0 2.5C0 1.67157 0.671573 1 1.5 1H13.5C14.3284 1 15 1.67157 15 2.5V12.5C15 13.3284 14.3284 14 13.5 14H1.5C0.671573 14 0 13.3284 0 12.5V2.5Z`,fill:i,fillRule:`evenodd`,clipRule:`evenodd`}))});function nn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function rn(...e){return t=>{let n=!1,r=e.map(e=>{let r=nn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():nn(e[t],null)}}}}function R(...e){return t.useCallback(rn(...e),e)}function an(e){let n=sn(e),i=t.forwardRef((e,i)=>{let{children:a,...o}=e,s=t.Children.toArray(a),c=s.find(dn);if(c){let e=c.props.children,a=s.map(n=>n===c?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return(0,r.jsx)(n,{...o,ref:i,children:t.isValidElement(e)?t.cloneElement(e,void 0,a):null})}return(0,r.jsx)(n,{...o,ref:i,children:a})});return i.displayName=`${e}.Slot`,i}var on=an(`Slot`);function sn(e){let n=t.forwardRef((e,n)=>{let{children:r,...i}=e;if(t.isValidElement(r)){let e=pn(r),a=fn(i,r.props);return r.type!==t.Fragment&&(a.ref=n?rn(n,e):e),t.cloneElement(r,a)}return t.Children.count(r)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var cn=Symbol(`radix.slottable`);function ln(e){let t=({children:e})=>(0,r.jsx)(r.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=cn,t}var un=ln(`Slottable`);function dn(e){return t.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===cn}function fn(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function pn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var z=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,n)=>{let i=an(`Primitive.${n}`),a=t.forwardRef((e,t)=>{let{asChild:a,...o}=e,s=a?i:n;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,r.jsx)(s,{...o,ref:t})});return a.displayName=`Primitive.${n}`,{...e,[n]:a}},{});function mn(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}var hn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),gn=`VisuallyHidden`,_n=t.forwardRef((e,t)=>(0,r.jsx)(z.span,{...e,ref:t,style:{...hn,...e.style}}));_n.displayName=gn;var vn=_n;function yn(e,n){let i=t.createContext(n),a=e=>{let{children:n,...a}=e,o=t.useMemo(()=>a,Object.values(a));return(0,r.jsx)(i.Provider,{value:o,children:n})};a.displayName=e+`Provider`;function o(r){let a=t.useContext(i);if(a)return a;if(n!==void 0)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}return[a,o]}function bn(e,n=[]){let i=[];function a(n,a){let o=t.createContext(a),s=i.length;i=[...i,a];let c=n=>{let{scope:i,children:a,...c}=n,l=i?.[e]?.[s]||o,u=t.useMemo(()=>c,Object.values(c));return(0,r.jsx)(l.Provider,{value:u,children:a})};c.displayName=n+`Provider`;function l(r,i){let c=i?.[e]?.[s]||o,l=t.useContext(c);if(l)return l;if(a!==void 0)return a;throw Error(`\`${r}\` must be used within \`${n}\``)}return[c,l]}let o=()=>{let n=i.map(e=>t.createContext(e));return function(r){let i=r?.[e]||n;return t.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return o.scopeName=e,[a,xn(o,...n)]}function xn(...e){let n=e[0];if(e.length===1)return n;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])}};return r.scopeName=n.scopeName,r}function Sn(e){let n=e+`CollectionProvider`,[i,a]=bn(n),[o,s]=i(n,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:n,children:i}=e,a=t.default.useRef(null),s=t.default.useRef(new Map).current;return(0,r.jsx)(o,{scope:n,itemMap:s,collectionRef:a,children:i})};c.displayName=n;let l=e+`CollectionSlot`,u=an(l),d=t.default.forwardRef((e,t)=>{let{scope:n,children:i}=e;return(0,r.jsx)(u,{ref:R(t,s(l,n).collectionRef),children:i})});d.displayName=l;let f=e+`CollectionItemSlot`,p=`data-radix-collection-item`,m=an(f),h=t.default.forwardRef((e,n)=>{let{scope:i,children:a,...o}=e,c=t.default.useRef(null),l=R(n,c),u=s(f,i);return t.default.useEffect(()=>(u.itemMap.set(c,{ref:c,...o}),()=>void u.itemMap.delete(c))),(0,r.jsx)(m,{[p]:``,ref:l,children:a})});h.displayName=f;function g(n){let r=s(e+`CollectionConsumer`,n);return t.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return[{Provider:c,Slot:d,ItemSlot:h},g,a]}typeof window<`u`&&window.document&&window.document.createElement;function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Cn=globalThis?.document?t.useLayoutEffect:()=>{},wn=t.useInsertionEffect||Cn;function Tn({prop:e,defaultProp:n,onChange:r=()=>{},caller:i}){let[a,o,s]=En({defaultProp:n,onChange:r}),c=e!==void 0,l=c?e:a;{let n=t.useRef(e!==void 0);t.useEffect(()=>{let e=n.current;if(e!==c){let t=e?`controlled`:`uncontrolled`,n=c?`controlled`:`uncontrolled`;console.warn(`${i} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=c},[c,i])}return[l,t.useCallback(t=>{if(c){let n=Dn(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}function En({defaultProp:e,onChange:n}){let[r,i]=t.useState(e),a=t.useRef(r),o=t.useRef(n);return wn(()=>{o.current=n},[n]),t.useEffect(()=>{a.current!==r&&(o.current?.(r),a.current=r)},[r,a]),[r,i,o]}function Dn(e){return typeof e==`function`}function On(e,n){return t.useReducer((e,t)=>n[e][t]??e,e)}var kn=e=>{let{present:n,children:r}=e,i=An(n),a=typeof r==`function`?r({present:i.isPresent}):t.Children.only(r),o=R(i.ref,Mn(a));return typeof r==`function`||i.isPresent?t.cloneElement(a,{ref:o}):null};kn.displayName=`Presence`;function An(e){let[n,r]=t.useState(),i=t.useRef(null),a=t.useRef(e),o=t.useRef(`none`),[s,c]=On(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return t.useEffect(()=>{let e=jn(i.current);o.current=s===`mounted`?e:`none`},[s]),Cn(()=>{let t=i.current,n=a.current;if(n!==e){let r=o.current,i=jn(t);e?c(`MOUNT`):i===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,c]),Cn(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=r=>{let o=jn(i.current).includes(CSS.escape(r.animationName));if(r.target===n&&o&&(c(`ANIMATION_END`),!a.current)){let r=n.style.animationFillMode;n.style.animationFillMode=`forwards`,e=t.setTimeout(()=>{n.style.animationFillMode===`forwards`&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(o.current=jn(i.current))};return n.addEventListener(`animationstart`,s),n.addEventListener(`animationcancel`,r),n.addEventListener(`animationend`,r),()=>{t.clearTimeout(e),n.removeEventListener(`animationstart`,s),n.removeEventListener(`animationcancel`,r),n.removeEventListener(`animationend`,r)}}else c(`ANIMATION_END`)},[n,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:t.useCallback(e=>{i.current=e?getComputedStyle(e):null,r(e)},[])}}function jn(e){return e?.animationName||`none`}function Mn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nn=t.useId||(()=>void 0),Pn=0;function Fn(e){let[n,r]=t.useState(Nn());return Cn(()=>{e||r(e=>e??String(Pn++))},[e]),e||(n?`radix-${n}`:``)}var In=t.createContext(void 0),Ln=e=>{let{dir:t,children:n}=e;return(0,r.jsx)(In.Provider,{value:t,children:n})};function Rn(e){let n=t.useContext(In);return e||n||`ltr`}var zn=Ln;function Bn(e){let n=t.useRef(e);return t.useEffect(()=>{n.current=e}),t.useMemo(()=>(...e)=>n.current?.(...e),[])}function Vn(e,n=globalThis?.document){let r=Bn(e);t.useEffect(()=>{let e=e=>{e.key===`Escape`&&r(e)};return n.addEventListener(`keydown`,e,{capture:!0}),()=>n.removeEventListener(`keydown`,e,{capture:!0})},[r,n])}var Hn=`DismissableLayer`,Un=`dismissableLayer.update`,Wn=`dismissableLayer.pointerDownOutside`,Gn=`dismissableLayer.focusOutside`,Kn,qn=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jn=t.forwardRef((e,n)=>{let{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:l,...u}=e,d=t.useContext(qn),[f,p]=t.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=t.useState({}),g=R(n,e=>p(e)),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=Zn(e=>{let t=e.target,n=[...d.branches].some(e=>e.contains(t));!S||n||(o?.(e),c?.(e),e.defaultPrevented||l?.())},m),w=Qn(e=>{let t=e.target;[...d.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||l?.())},m);return Vn(e=>{b===d.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},m),t.useEffect(()=>{if(f)return i&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Kn=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),$n(),()=>{i&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Kn)}},[f,m,i,d]),t.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),$n())},[f,d]),t.useEffect(()=>{let e=()=>h({});return document.addEventListener(Un,e),()=>document.removeEventListener(Un,e)},[]),(0,r.jsx)(z.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:B(e.onFocusCapture,w.onFocusCapture),onBlurCapture:B(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,C.onPointerDownCapture)})});Jn.displayName=Hn;var Yn=`DismissableLayerBranch`,Xn=t.forwardRef((e,n)=>{let i=t.useContext(qn),a=t.useRef(null),o=R(n,a);return t.useEffect(()=>{let e=a.current;if(e)return i.branches.add(e),()=>{i.branches.delete(e)}},[i.branches]),(0,r.jsx)(z.div,{...e,ref:o})});Xn.displayName=Yn;function Zn(e,n=globalThis?.document){let r=Bn(e),i=t.useRef(!1),a=t.useRef(()=>{});return t.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){er(Wn,r,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(n.removeEventListener(`click`,a.current),a.current=t,n.addEventListener(`click`,a.current,{once:!0})):t()}else n.removeEventListener(`click`,a.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(t),n.removeEventListener(`pointerdown`,e),n.removeEventListener(`click`,a.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}function Qn(e,n=globalThis?.document){let r=Bn(e),i=t.useRef(!1);return t.useEffect(()=>{let e=e=>{e.target&&!i.current&&er(Gn,r,{originalEvent:e},{discrete:!1})};return n.addEventListener(`focusin`,e),()=>n.removeEventListener(`focusin`,e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function $n(){let e=new CustomEvent(Un);document.dispatchEvent(e)}function er(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?mn(i,a):i.dispatchEvent(a)}var tr=`focusScope.autoFocusOnMount`,nr=`focusScope.autoFocusOnUnmount`,rr={bubbles:!1,cancelable:!0},ir=`FocusScope`,ar=t.forwardRef((e,n)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[l,u]=t.useState(null),d=Bn(o),f=Bn(s),p=t.useRef(null),m=R(n,e=>u(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(a){let e=function(e){if(h.paused||!l)return;let t=e.target;l.contains(t)?p.current=t:fr(p.current,{select:!0})},t=function(e){if(h.paused||!l)return;let t=e.relatedTarget;t!==null&&(l.contains(t)||fr(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&fr(l)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,l,h.paused]),t.useEffect(()=>{if(l){pr.add(h);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(tr,rr);l.addEventListener(tr,d),l.dispatchEvent(t),t.defaultPrevented||(or(gr(cr(l)),{select:!0}),document.activeElement===e&&fr(l))}return()=>{l.removeEventListener(tr,d),setTimeout(()=>{let t=new CustomEvent(nr,rr);l.addEventListener(nr,f),l.dispatchEvent(t),t.defaultPrevented||fr(e??document.body,{select:!0}),l.removeEventListener(nr,f),pr.remove(h)},0)}}},[l,d,f,h]);let g=t.useCallback(e=>{if(!i&&!a||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=sr(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&fr(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&fr(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,h.paused]);return(0,r.jsx)(z.div,{tabIndex:-1,...c,ref:m,onKeyDown:g})});ar.displayName=ir;function or(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(fr(r,{select:t}),document.activeElement!==n)return}function sr(e){let t=cr(e);return[lr(t,e),lr(t.reverse(),e)]}function cr(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lr(e,t){for(let n of e)if(!ur(n,{upTo:t}))return n}function ur(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function dr(e){return e instanceof HTMLInputElement&&`select`in e}function fr(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dr(e)&&t&&e.select()}}var pr=mr();function mr(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=hr(e,t),e.unshift(t)},remove(t){e=hr(e,t),e[0]?.resume()}}}function hr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gr(e){return e.filter(e=>e.tagName!==`A`)}var _r=`Portal`,vr=t.forwardRef((e,i)=>{let{container:a,...o}=e,[s,c]=t.useState(!1);Cn(()=>c(!0),[]);let l=a||s&&globalThis?.document?.body;return l?n.default.createPortal((0,r.jsx)(z.div,{...o,ref:i}),l):null});vr.displayName=_r;var yr=0;function br(){t.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??xr()),document.body.insertAdjacentElement(`beforeend`,e[1]??xr()),yr++,()=>{yr===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),yr--}},[])}function xr(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Sr=function(){return Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Sr.apply(this,arguments)};function Cr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function wr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Tr=`right-scroll-bar-position`,Er=`width-before-scroll-bar`,Dr=`with-scroll-bars-hidden`,Or=`--removed-body-scroll-bar-size`;function kr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ar(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var jr=typeof window<`u`?t.useLayoutEffect:t.useEffect,Mr=new WeakMap;function Nr(e,t){var n=Ar(t||null,function(t){return e.forEach(function(e){return kr(e,t)})});return jr(function(){var t=Mr.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||kr(e,null)}),i.forEach(function(e){r.has(e)||kr(e,a)})}Mr.set(n,e)},[e]),n}function Pr(e){return e}function Fr(e,t){t===void 0&&(t=Pr);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ir(e){e===void 0&&(e={});var t=Fr(null);return t.options=Sr({async:!0,ssr:!1},e),t}var Lr=function(e){var n=e.sideCar,r=Cr(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,Sr({},r))};Lr.isSideCarExport=!0;function Rr(e,t){return e.useMedium(t),Lr}var zr=Ir(),Br=function(){},Vr=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:Br,onWheelCapture:Br,onTouchMoveCapture:Br}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Cr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Nr([r,n]),w=Sr(Sr({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:zr,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),Sr(Sr({},w),{ref:C})):t.createElement(y,Sr({},w,{className:l,ref:C}),c))});Vr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Vr.classNames={fullWidth:Er,zeroRight:Tr};var Hr,Ur=function(){if(Hr)return Hr;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Wr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ur();return t&&e.setAttribute(`nonce`,t),e}function Gr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Kr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var qr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wr())&&(Gr(t,n),Kr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Jr=function(){var e=qr();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},Yr=function(){var e=Jr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Xr={left:0,top:0,right:0,gap:0},Zr=function(e){return parseInt(e||``,10)||0},Qr=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Zr(n),Zr(r),Zr(i)]},$r=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Xr;var t=Qr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ei=Yr(),ti=`data-scroll-locked`,ni=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
+ .${Dr} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
5
5
  }
6
- body[${ni}] {
6
+ body[${ti}] {
7
7
  overflow: hidden ${r};
8
8
  overscroll-behavior: contain;
9
9
  ${[t&&`position: relative ${r};`,n===`margin`&&`
@@ -16,36 +16,36 @@
16
16
  `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
17
  }
18
18
 
19
- .${Er} {
19
+ .${Tr} {
20
20
  right: ${s}px ${r};
21
21
  }
22
22
 
23
- .${Dr} {
23
+ .${Er} {
24
24
  margin-right: ${s}px ${r};
25
25
  }
26
26
 
27
- .${Er} .${Er} {
27
+ .${Tr} .${Tr} {
28
28
  right: 0 ${r};
29
29
  }
30
30
 
31
- .${Dr} .${Dr} {
31
+ .${Er} .${Er} {
32
32
  margin-right: 0 ${r};
33
33
  }
34
34
 
35
- body[${ni}] {
36
- ${kr}: ${s}px;
35
+ body[${ti}] {
36
+ ${Or}: ${s}px;
37
37
  }
38
- `},ii=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ai=function(){t.useEffect(function(){return document.body.setAttribute(ni,(ii()+1).toString()),function(){var e=ii()-1;e<=0?document.body.removeAttribute(ni):document.body.setAttribute(ni,e.toString())}},[])},oi=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,a=i===void 0?`margin`:i;ai();var o=t.useMemo(function(){return ei(a)},[a]);return t.createElement(ti,{styles:ri(o,!n,a,r?``:`!important`)})},si=!1;if(typeof window<`u`)try{var ci=Object.defineProperty({},`passive`,{get:function(){return si=!0,!0}});window.addEventListener(`test`,ci,ci),window.removeEventListener(`test`,ci,ci)}catch{si=!1}var li=si?{passive:!1}:!1,ui=function(e){return e.tagName===`TEXTAREA`},di=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ui(e)&&n[t]===`visible`)},fi=function(e){return di(e,`overflowY`)},pi=function(e){return di(e,`overflowX`)},mi=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),_i(e,r)){var i=vi(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},hi=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},gi=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},_i=function(e,t){return e===`v`?fi(t):pi(t)},vi=function(e,t){return e===`v`?hi(t):gi(t)},yi=function(e,t){return e===`h`&&t===`rtl`?-1:1},bi=function(e,t,n,r,i){var a=yi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=vi(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&_i(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},xi=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Si=function(e){return[e.deltaX,e.deltaY]},Ci=function(e){return e&&`current`in e?e.current:e},wi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ti=function(e){return`
38
+ `},ri=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ii=function(){t.useEffect(function(){return document.body.setAttribute(ti,(ri()+1).toString()),function(){var e=ri()-1;e<=0?document.body.removeAttribute(ti):document.body.setAttribute(ti,e.toString())}},[])},ai=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,a=i===void 0?`margin`:i;ii();var o=t.useMemo(function(){return $r(a)},[a]);return t.createElement(ei,{styles:ni(o,!n,a,r?``:`!important`)})},oi=!1;if(typeof window<`u`)try{var si=Object.defineProperty({},`passive`,{get:function(){return oi=!0,!0}});window.addEventListener(`test`,si,si),window.removeEventListener(`test`,si,si)}catch{oi=!1}var ci=oi?{passive:!1}:!1,li=function(e){return e.tagName===`TEXTAREA`},ui=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!li(e)&&n[t]===`visible`)},di=function(e){return ui(e,`overflowY`)},fi=function(e){return ui(e,`overflowX`)},pi=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),gi(e,r)){var i=_i(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mi=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},hi=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},gi=function(e,t){return e===`v`?di(t):fi(t)},_i=function(e,t){return e===`v`?mi(t):hi(t)},vi=function(e,t){return e===`h`&&t===`rtl`?-1:1},yi=function(e,t,n,r,i){var a=vi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=_i(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&gi(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},bi=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xi=function(e){return[e.deltaX,e.deltaY]},Si=function(e){return e&&`current`in e?e.current:e},Ci=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wi=function(e){return`
39
39
  .block-interactivity-${e} {pointer-events: none;}
40
40
  .allow-interactivity-${e} {pointer-events: all;}
41
- `},Ei=0,Di=[];function Oi(e){var n=t.useRef([]),r=t.useRef([0,0]),i=t.useRef(),a=t.useState(Ei++)[0],o=t.useState(Xr)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=Tr([e.lockRef.current],(e.shards||[]).map(Ci),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=t.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var n=xi(e),a=r.current,o=`deltaX`in e?e.deltaX:a[0]-n[0],c=`deltaY`in e?e.deltaY:a[1]-n[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=mi(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=mi(d,u)),!m)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var h=i.current||l;return bi(h,t,e,h===`h`?o:c,!0)},[]),l=t.useCallback(function(e){var t=e;if(!(!Di.length||Di[Di.length-1]!==o)){var r=`deltaY`in t?Si(t):xi(t),i=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&wi(e.delta,r)})[0];if(i&&i.should){t.cancelable&&t.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(Ci).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?c(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=t.useCallback(function(e,t,r,i){var a={name:e,delta:t,target:r,should:i,shadowParent:ki(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=t.useCallback(function(e){r.current=xi(e),i.current=void 0},[]),f=t.useCallback(function(t){u(t.type,Si(t),t.target,c(t,e.lockRef.current))},[]),p=t.useCallback(function(t){u(t.type,xi(t),t.target,c(t,e.lockRef.current))},[]);t.useEffect(function(){return Di.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,li),document.addEventListener(`touchmove`,l,li),document.addEventListener(`touchstart`,d,li),function(){Di=Di.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,li),document.removeEventListener(`touchmove`,l,li),document.removeEventListener(`touchstart`,d,li)}},[]);var m=e.removeScrollBar,h=e.inert;return t.createElement(t.Fragment,null,h?t.createElement(o,{styles:Ti(a)}):null,m?t.createElement(oi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ki(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ai=zr(Br,Oi),ji=t.forwardRef(function(e,n){return t.createElement(Hr,Cr({},e,{ref:n,sideCar:Ai}))});ji.classNames=Hr.classNames;var Mi=ji,Ni=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Pi=new WeakMap,Fi=new WeakMap,Ii={},Li=0,Ri=function(e){return e&&(e.host||Ri(e.parentNode))},zi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ri(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Bi=function(e,t,n,r){var i=zi(t,Array.isArray(e)?e:[e]);Ii[n]||(Ii[n]=new WeakMap);var a=Ii[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Pi.get(e)||0)+1,l=(a.get(e)||0)+1;Pi.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Fi.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Li++,function(){o.forEach(function(e){var t=Pi.get(e)-1,i=a.get(e)-1;Pi.set(e,t),a.set(e,i),t||(Fi.has(e)||e.removeAttribute(r),Fi.delete(e)),i||e.removeAttribute(n)}),Li--,Li||(Pi=new WeakMap,Pi=new WeakMap,Fi=new WeakMap,Ii={})}},Vi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ni(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Bi(r,i,n,`aria-hidden`)):function(){return null}},Hi=`Dialog`,[Ui,Wi]=xn(Hi),[Gi,Ki]=Ui(Hi),qi=e=>{let{__scopeDialog:n,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=t.useRef(null),u=t.useRef(null),[d,f]=En({prop:a,defaultProp:o??!1,onChange:s,caller:Hi});return(0,r.jsx)(Gi,{scope:n,triggerRef:l,contentRef:u,contentId:In(),titleId:In(),descriptionId:In(),open:d,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(e=>!e),[f]),modal:c,children:i})};qi.displayName=Hi;var Ji=`DialogTrigger`,Yi=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Ki(Ji,n),o=L(t,a.triggerRef);return(0,r.jsx)(R.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ha(a.open),...i,ref:o,onClick:z(e.onClick,a.onOpenToggle)})});Yi.displayName=Ji;var Xi=`DialogPortal`,[Zi,Qi]=Ui(Xi,{forceMount:void 0}),$i=e=>{let{__scopeDialog:n,forceMount:i,children:a,container:o}=e,s=Ki(Xi,n);return(0,r.jsx)(Zi,{scope:n,forceMount:i,children:t.Children.map(a,e=>(0,r.jsx)(An,{present:i||s.open,children:(0,r.jsx)(yr,{asChild:!0,container:o,children:e})}))})};$i.displayName=Xi;var ea=`DialogOverlay`,ta=t.forwardRef((e,t)=>{let n=Qi(ea,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Ki(ea,e.__scopeDialog);return o.modal?(0,r.jsx)(An,{present:i||o.open,children:(0,r.jsx)(ra,{...a,ref:t})}):null});ta.displayName=ea;var na=on(`DialogOverlay.RemoveScroll`),ra=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Ki(ea,n);return(0,r.jsx)(Mi,{as:na,allowPinchZoom:!0,shards:[a.contentRef],children:(0,r.jsx)(R.div,{"data-state":ha(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.style}})})}),ia=`DialogContent`,aa=t.forwardRef((e,t)=>{let n=Qi(ia,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Ki(ia,e.__scopeDialog);return(0,r.jsx)(An,{present:i||o.open,children:o.modal?(0,r.jsx)(oa,{...a,ref:t}):(0,r.jsx)(sa,{...a,ref:t})})});aa.displayName=ia;var oa=t.forwardRef((e,n)=>{let i=Ki(ia,e.__scopeDialog),a=t.useRef(null),o=L(n,i.contentRef,a);return t.useEffect(()=>{let e=a.current;if(e)return Vi(e)},[]),(0,r.jsx)(ca,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault())})}),sa=t.forwardRef((e,n)=>{let i=Ki(ia,e.__scopeDialog),a=t.useRef(!1),o=t.useRef(!1);return(0,r.jsx)(ca,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||i.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;i.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),ca=t.forwardRef((e,n)=>{let{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=Ki(ia,i),u=t.useRef(null),d=L(n,u);return xr(),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(or,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,r.jsx)(Yn,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ha(l.open),...c,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ya,{titleId:l.titleId}),(0,r.jsx)(xa,{contentRef:u,descriptionId:l.descriptionId})]})]})}),la=`DialogTitle`,ua=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Ki(la,n);return(0,r.jsx)(R.h2,{id:a.titleId,...i,ref:t})});ua.displayName=la;var da=`DialogDescription`,fa=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Ki(da,n);return(0,r.jsx)(R.p,{id:a.descriptionId,...i,ref:t})});fa.displayName=da;var pa=`DialogClose`,ma=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Ki(pa,n);return(0,r.jsx)(R.button,{type:`button`,...i,ref:t,onClick:z(e.onClick,()=>a.onOpenChange(!1))})});ma.displayName=pa;function ha(e){return e?`open`:`closed`}var ga=`DialogTitleWarning`,[_a,va]=bn(ga,{contentName:ia,titleName:la,docsSlug:`dialog`}),ya=({titleId:e})=>{let n=va(ga),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
41
+ `},Ti=0,Ei=[];function Di(e){var n=t.useRef([]),r=t.useRef([0,0]),i=t.useRef(),a=t.useState(Ti++)[0],o=t.useState(Yr)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=wr([e.lockRef.current],(e.shards||[]).map(Si),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=t.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var n=bi(e),a=r.current,o=`deltaX`in e?e.deltaX:a[0]-n[0],c=`deltaY`in e?e.deltaY:a[1]-n[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=pi(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=pi(d,u)),!m)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var h=i.current||l;return yi(h,t,e,h===`h`?o:c,!0)},[]),l=t.useCallback(function(e){var t=e;if(!(!Ei.length||Ei[Ei.length-1]!==o)){var r=`deltaY`in t?xi(t):bi(t),i=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&Ci(e.delta,r)})[0];if(i&&i.should){t.cancelable&&t.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(Si).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?c(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=t.useCallback(function(e,t,r,i){var a={name:e,delta:t,target:r,should:i,shadowParent:Oi(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=t.useCallback(function(e){r.current=bi(e),i.current=void 0},[]),f=t.useCallback(function(t){u(t.type,xi(t),t.target,c(t,e.lockRef.current))},[]),p=t.useCallback(function(t){u(t.type,bi(t),t.target,c(t,e.lockRef.current))},[]);t.useEffect(function(){return Ei.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,ci),document.addEventListener(`touchmove`,l,ci),document.addEventListener(`touchstart`,d,ci),function(){Ei=Ei.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,ci),document.removeEventListener(`touchmove`,l,ci),document.removeEventListener(`touchstart`,d,ci)}},[]);var m=e.removeScrollBar,h=e.inert;return t.createElement(t.Fragment,null,h?t.createElement(o,{styles:wi(a)}):null,m?t.createElement(ai,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Oi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ki=Rr(zr,Di),Ai=t.forwardRef(function(e,n){return t.createElement(Vr,Sr({},e,{ref:n,sideCar:ki}))});Ai.classNames=Vr.classNames;var ji=Ai,Mi=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ni=new WeakMap,Pi=new WeakMap,Fi={},Ii=0,Li=function(e){return e&&(e.host||Li(e.parentNode))},Ri=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Li(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},zi=function(e,t,n,r){var i=Ri(t,Array.isArray(e)?e:[e]);Fi[n]||(Fi[n]=new WeakMap);var a=Fi[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ni.get(e)||0)+1,l=(a.get(e)||0)+1;Ni.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Pi.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ii++,function(){o.forEach(function(e){var t=Ni.get(e)-1,i=a.get(e)-1;Ni.set(e,t),a.set(e,i),t||(Pi.has(e)||e.removeAttribute(r),Pi.delete(e)),i||e.removeAttribute(n)}),Ii--,Ii||(Ni=new WeakMap,Ni=new WeakMap,Pi=new WeakMap,Fi={})}},Bi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Mi(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),zi(r,i,n,`aria-hidden`)):function(){return null}},Vi=`Dialog`,[Hi,Ui]=bn(Vi),[Wi,Gi]=Hi(Vi),Ki=e=>{let{__scopeDialog:n,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=t.useRef(null),u=t.useRef(null),[d,f]=Tn({prop:a,defaultProp:o??!1,onChange:s,caller:Vi});return(0,r.jsx)(Wi,{scope:n,triggerRef:l,contentRef:u,contentId:Fn(),titleId:Fn(),descriptionId:Fn(),open:d,onOpenChange:f,onOpenToggle:t.useCallback(()=>f(e=>!e),[f]),modal:c,children:i})};Ki.displayName=Vi;var qi=`DialogTrigger`,Ji=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Gi(qi,n),o=R(t,a.triggerRef);return(0,r.jsx)(z.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ma(a.open),...i,ref:o,onClick:B(e.onClick,a.onOpenToggle)})});Ji.displayName=qi;var Yi=`DialogPortal`,[Xi,Zi]=Hi(Yi,{forceMount:void 0}),Qi=e=>{let{__scopeDialog:n,forceMount:i,children:a,container:o}=e,s=Gi(Yi,n);return(0,r.jsx)(Xi,{scope:n,forceMount:i,children:t.Children.map(a,e=>(0,r.jsx)(kn,{present:i||s.open,children:(0,r.jsx)(vr,{asChild:!0,container:o,children:e})}))})};Qi.displayName=Yi;var $i=`DialogOverlay`,ea=t.forwardRef((e,t)=>{let n=Zi($i,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Gi($i,e.__scopeDialog);return o.modal?(0,r.jsx)(kn,{present:i||o.open,children:(0,r.jsx)(na,{...a,ref:t})}):null});ea.displayName=$i;var ta=an(`DialogOverlay.RemoveScroll`),na=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Gi($i,n);return(0,r.jsx)(ji,{as:ta,allowPinchZoom:!0,shards:[a.contentRef],children:(0,r.jsx)(z.div,{"data-state":ma(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.style}})})}),ra=`DialogContent`,ia=t.forwardRef((e,t)=>{let n=Zi(ra,e.__scopeDialog),{forceMount:i=n.forceMount,...a}=e,o=Gi(ra,e.__scopeDialog);return(0,r.jsx)(kn,{present:i||o.open,children:o.modal?(0,r.jsx)(aa,{...a,ref:t}):(0,r.jsx)(oa,{...a,ref:t})})});ia.displayName=ra;var aa=t.forwardRef((e,n)=>{let i=Gi(ra,e.__scopeDialog),a=t.useRef(null),o=R(n,i.contentRef,a);return t.useEffect(()=>{let e=a.current;if(e)return Bi(e)},[]),(0,r.jsx)(sa,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault())})}),oa=t.forwardRef((e,n)=>{let i=Gi(ra,e.__scopeDialog),a=t.useRef(!1),o=t.useRef(!1);return(0,r.jsx)(sa,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||i.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;i.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),sa=t.forwardRef((e,n)=>{let{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,l=Gi(ra,i),u=t.useRef(null),d=R(n,u);return br(),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ar,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,r.jsx)(Jn,{role:`dialog`,id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ma(l.open),...c,ref:d,onDismiss:()=>l.onOpenChange(!1)})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(va,{titleId:l.titleId}),(0,r.jsx)(ba,{contentRef:u,descriptionId:l.descriptionId})]})]})}),ca=`DialogTitle`,la=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Gi(ca,n);return(0,r.jsx)(z.h2,{id:a.titleId,...i,ref:t})});la.displayName=ca;var ua=`DialogDescription`,da=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Gi(ua,n);return(0,r.jsx)(z.p,{id:a.descriptionId,...i,ref:t})});da.displayName=ua;var fa=`DialogClose`,pa=t.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,a=Gi(fa,n);return(0,r.jsx)(z.button,{type:`button`,...i,ref:t,onClick:B(e.onClick,()=>a.onOpenChange(!1))})});pa.displayName=fa;function ma(e){return e?`open`:`closed`}var ha=`DialogTitleWarning`,[ga,_a]=yn(ha,{contentName:ra,titleName:ca,docsSlug:`dialog`}),va=({titleId:e})=>{let n=_a(ha),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
42
42
 
43
43
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
44
44
 
45
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ba=`DialogDescriptionWarning`,xa=({contentRef:e,descriptionId:n})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${va(ba).contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute(`aria-describedby`);n&&t&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},Sa=qi,Ca=Yi,wa=$i,Ta=ta,Ea=aa,Da=ua,Oa=fa,ka=ma;function Aa(e){let n=t.useRef({value:e,previous:e});return t.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function ja(e){let[n,r]=t.useState(void 0);return wn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],i,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else r(void 0)},[e]),n}var Ma=[`top`,`right`,`bottom`,`left`],Na=Math.min,Pa=Math.max,Fa=Math.round,Ia=Math.floor,La=e=>({x:e,y:e}),Ra={left:`right`,right:`left`,bottom:`top`,top:`bottom`},za={start:`end`,end:`start`};function Ba(e,t,n){return Pa(e,Na(t,n))}function Va(e,t){return typeof e==`function`?e(t):e}function Ha(e){return e.split(`-`)[0]}function Ua(e){return e.split(`-`)[1]}function Wa(e){return e===`x`?`y`:`x`}function Ga(e){return e===`y`?`height`:`width`}var Ka=new Set([`top`,`bottom`]);function qa(e){return Ka.has(Ha(e))?`y`:`x`}function Ja(e){return Wa(qa(e))}function Ya(e,t,n){n===void 0&&(n=!1);let r=Ua(e),i=Ja(e),a=Ga(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=io(o)),[o,io(o)]}function Xa(e){let t=io(e);return[Za(e),t,Za(t)]}function Za(e){return e.replace(/start|end/g,e=>za[e])}var Qa=[`left`,`right`],$a=[`right`,`left`],eo=[`top`,`bottom`],to=[`bottom`,`top`];function no(e,t,n){switch(e){case`top`:case`bottom`:return n?t?$a:Qa:t?Qa:$a;case`left`:case`right`:return t?eo:to;default:return[]}}function ro(e,t,n,r){let i=Ua(e),a=no(Ha(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Za)))),a}function io(e){return e.replace(/left|right|bottom|top/g,e=>Ra[e])}function ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function oo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ao(e)}function so(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function co(e,t,n){let{reference:r,floating:i}=e,a=qa(t),o=Ja(t),s=Ga(o),c=Ha(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ua(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function lo(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Va(t,e),p=oo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=so(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=so(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var uo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=co(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??lo},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=co(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},fo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Va(e,t)||{};if(l==null)return{};let d=oo(u),f={x:n,y:r},p=Ja(i),m=Ga(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Na(d[_],T),D=Na(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Ba(O,A,k),M=!c.arrow&&Ua(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),po=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Va(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ha(r),_=qa(o),v=Ha(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[io(o)]:Xa(o)),x=p!==`none`;!d&&x&&b.push(...ro(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ya(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==qa(t))||T.every(e=>qa(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=qa(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function mo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ho(e){return Ma.some(t=>e[t]>=0)}var go=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Va(e,t);switch(i){case`referenceHidden`:{let e=mo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ho(e)}}}case`escaped`:{let e=mo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ho(e)}}}default:return{}}}}},_o=new Set([`left`,`top`]);async function vo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ha(n),s=Ua(n),c=qa(n)===`y`,l=_o.has(o)?-1:1,u=a&&c?-1:1,d=Va(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var yo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await vo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},bo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Va(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=qa(Ha(i)),p=Wa(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Ba(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Ba(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},xo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Va(e,t),u={x:n,y:r},d=qa(i),f=Wa(d),p=u[f],m=u[d],h=Va(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=_o.has(Ha(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},So=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Va(e,t),u=await o.detectOverflow(t,l),d=Ha(i),f=Ua(i),p=qa(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Na(h-u[g],v),x=Na(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Pa(u.left,0),t=Pa(u.right,0),n=Pa(u.top,0),r=Pa(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Pa(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Pa(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Co(){return typeof window<`u`}function wo(e){return Do(e)?(e.nodeName||``).toLowerCase():`#document`}function To(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Eo(e){return((Do(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Do(e){return Co()?e instanceof Node||e instanceof To(e).Node:!1}function Oo(e){return Co()?e instanceof Element||e instanceof To(e).Element:!1}function ko(e){return Co()?e instanceof HTMLElement||e instanceof To(e).HTMLElement:!1}function Ao(e){return!Co()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof To(e).ShadowRoot}var jo=new Set([`inline`,`contents`]);function Mo(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!jo.has(i)}var No=new Set([`table`,`td`,`th`]);function Po(e){return No.has(wo(e))}var Fo=[`:popover-open`,`:modal`];function Io(e){return Fo.some(t=>{try{return e.matches(t)}catch{return!1}})}var Lo=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Ro=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],zo=[`paint`,`layout`,`strict`,`content`];function Bo(e){let t=Ho(),n=Oo(e)?Go(e):e;return Lo.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Ro.some(e=>(n.willChange||``).includes(e))||zo.some(e=>(n.contain||``).includes(e))}function Vo(e){let t=qo(e);for(;ko(t)&&!Wo(t);){if(Bo(t))return t;if(Io(t))return null;t=qo(t)}return null}function Ho(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Uo=new Set([`html`,`body`,`#document`]);function Wo(e){return Uo.has(wo(e))}function Go(e){return To(e).getComputedStyle(e)}function Ko(e){return Oo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qo(e){if(wo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ao(e)&&e.host||Eo(e);return Ao(t)?t.host:t}function Jo(e){let t=qo(e);return Wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ko(t)&&Mo(t)?t:Jo(t)}function Yo(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Jo(e),i=r===e.ownerDocument?.body,a=To(r);if(i){let e=Xo(a);return t.concat(a,a.visualViewport||[],Mo(r)?r:[],e&&n?Yo(e):[])}return t.concat(r,Yo(r,[],n))}function Xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zo(e){let t=Go(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ko(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Fa(n)!==a||Fa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Qo(e){return Oo(e)?e:e.contextElement}function $o(e){let t=Qo(e);if(!ko(t))return La(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Zo(t),o=(a?Fa(n.width):n.width)/r,s=(a?Fa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var es=La(0);function ts(e){let t=To(e);return!Ho()||!t.visualViewport?es:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ns(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==To(e)?!1:t}function rs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Qo(e),o=La(1);t&&(r?Oo(r)&&(o=$o(r)):o=$o(e));let s=ns(a,n,r)?ts(a):La(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=To(a),t=r&&Oo(r)?To(r):r,n=e,i=Xo(n);for(;i&&r&&t!==n;){let e=$o(i),t=i.getBoundingClientRect(),r=Go(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=To(i),i=Xo(n)}}return so({width:u,height:d,x:c,y:l})}function is(e,t){let n=Ko(e).scrollLeft;return t?t.left+n:rs(Eo(e)).left+n}function as(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-is(e,n),y:n.top+t.scrollTop}}function os(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Eo(r),s=t?Io(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=La(1),u=La(0),d=ko(r);if((d||!d&&!a)&&((wo(r)!==`body`||Mo(o))&&(c=Ko(r)),ko(r))){let e=rs(r);l=$o(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?as(o,c):La(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ss(e){return Array.from(e.getClientRects())}function cs(e){let t=Eo(e),n=Ko(e),r=e.ownerDocument.body,i=Pa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+is(e),s=-n.scrollTop;return Go(r).direction===`rtl`&&(o+=Pa(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ls=25;function us(e,t){let n=To(e),r=Eo(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ho();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=is(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ls&&(a-=o)}else l<=ls&&(a+=l);return{width:a,height:o,x:s,y:c}}var ds=new Set([`absolute`,`fixed`]);function fs(e,t){let n=rs(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ko(e)?$o(e):La(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ps(e,t,n){let r;if(t===`viewport`)r=us(e,n);else if(t===`document`)r=cs(Eo(e));else if(Oo(t))r=fs(t,n);else{let n=ts(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return so(r)}function ms(e,t){let n=qo(e);return n===t||!Oo(n)||Wo(n)?!1:Go(n).position===`fixed`||ms(n,t)}function hs(e,t){let n=t.get(e);if(n)return n;let r=Yo(e,[],!1).filter(e=>Oo(e)&&wo(e)!==`body`),i=null,a=Go(e).position===`fixed`,o=a?qo(e):e;for(;Oo(o)&&!Wo(o);){let t=Go(o),n=Bo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&ds.has(i.position)||Mo(o)&&!n&&ms(e,o))?r=r.filter(e=>e!==o):i=t,o=qo(o)}return t.set(e,r),r}function gs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Io(t)?[]:hs(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=ps(t,n,i);return e.top=Pa(r.top,e.top),e.right=Na(r.right,e.right),e.bottom=Na(r.bottom,e.bottom),e.left=Pa(r.left,e.left),e},ps(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function _s(e){let{width:t,height:n}=Zo(e);return{width:t,height:n}}function vs(e,t,n){let r=ko(t),i=Eo(t),a=n===`fixed`,o=rs(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=La(0);function l(){c.x=is(i)}if(r||!r&&!a)if((wo(t)!==`body`||Mo(i))&&(s=Ko(t)),r){let e=rs(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?as(i,s):La(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function ys(e){return Go(e).position===`static`}function bs(e,t){if(!ko(e)||Go(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Eo(e)===n&&(n=n.ownerDocument.body),n}function xs(e,t){let n=To(e);if(Io(e))return n;if(!ko(e)){let t=qo(e);for(;t&&!Wo(t);){if(Oo(t)&&!ys(t))return t;t=qo(t)}return n}let r=bs(e,t);for(;r&&Po(r)&&ys(r);)r=bs(r,t);return r&&Wo(r)&&ys(r)&&!Bo(r)?n:r||Vo(e)||n}var Ss=async function(e){let t=this.getOffsetParent||xs,n=this.getDimensions,r=await n(e.floating);return{reference:vs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cs(e){return Go(e).direction===`rtl`}var ws={convertOffsetParentRelativeRectToViewportRelativeRect:os,getDocumentElement:Eo,getClippingRect:gs,getOffsetParent:xs,getElementRects:Ss,getClientRects:ss,getDimensions:_s,getScale:$o,isElement:Oo,isRTL:Cs};function Ts(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Es(e,t){let n=null,r,i=Eo(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ia(d),h=Ia(i.clientWidth-(u+f)),g=Ia(i.clientHeight-(d+p)),_=Ia(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Pa(0,Na(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ts(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Ds(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Qo(e),u=i||a?[...l?Yo(l):[],...Yo(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Es(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?rs(e):null;c&&g();function g(){let t=rs(e);h&&!Ts(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Os=yo,ks=bo,As=po,js=So,Ms=go,Ns=fo,Ps=xo,Fs=(e,t,n)=>{let r=new Map,i={platform:ws,...n},a={...i.platform,_c:r};return uo(e,t,{...i,platform:a})},Is=typeof document<`u`?t.useLayoutEffect:function(){};function Ls(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ls(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ls(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Rs(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zs(e,t){let n=Rs(e);return Math.round(t*n)/n}function Bs(e){let n=t.useRef(e);return Is(()=>{n.current=e}),n}function Vs(e){e===void 0&&(e={});let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=t.useState({x:0,y:0,strategy:i,placement:r,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(a);Ls(m,a)||h(a);let[g,_]=t.useState(null),[v,y]=t.useState(null),b=t.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=t.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=s||g,C=c||v,w=t.useRef(null),T=t.useRef(null),E=t.useRef(f),D=u!=null,O=Bs(u),k=Bs(o),A=Bs(d),j=t.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:r,strategy:i,middleware:m};k.current&&(e.platform=k.current),Fs(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ls(E.current,t)&&(E.current=t,n.flushSync(()=>{p(t)}))})},[m,r,i,k,A]);Is(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=t.useRef(!1);Is(()=>(M.current=!0,()=>{M.current=!1}),[]),Is(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=t.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=t.useMemo(()=>({reference:S,floating:C}),[S,C]),ee=t.useMemo(()=>{let e={position:i,left:0,top:0};if(!P.floating)return e;let t=zs(P.floating,f.x),n=zs(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Rs(P.floating)>=1.5&&{willChange:`transform`}}:{position:i,left:t,top:n}},[i,l,P.floating,f.x,f.y]);return t.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:ee}),[f,j,N,P,ee])}var Hs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ns({element:r.current,padding:i}).fn(n):r?Ns({element:r,padding:i}).fn(n):{}}}},Us=(e,t)=>({...Os(e),options:[e,t]}),Ws=(e,t)=>({...ks(e),options:[e,t]}),Gs=(e,t)=>({...Ps(e),options:[e,t]}),Ks=(e,t)=>({...As(e),options:[e,t]}),qs=(e,t)=>({...js(e),options:[e,t]}),Js=(e,t)=>({...Ms(e),options:[e,t]}),Ys=(e,t)=>({...Hs(e),options:[e,t]}),Xs=`Arrow`,Zs=t.forwardRef((e,t)=>{let{children:n,width:i=10,height:a=5,...o}=e;return(0,r.jsx)(R.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,r.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Zs.displayName=Xs;var Qs=Zs,$s=`Popper`,[ec,tc]=xn($s),[nc,rc]=ec($s),ic=e=>{let{__scopePopper:n,children:i}=e,[a,o]=t.useState(null);return(0,r.jsx)(nc,{scope:n,anchor:a,onAnchorChange:o,children:i})};ic.displayName=$s;var ac=`PopperAnchor`,oc=t.forwardRef((e,n)=>{let{__scopePopper:i,virtualRef:a,...o}=e,s=rc(ac,i),c=t.useRef(null),l=L(n,c),u=t.useRef(null);return t.useEffect(()=>{let e=u.current;u.current=a?.current||c.current,e!==u.current&&s.onAnchorChange(u.current)}),a?null:(0,r.jsx)(R.div,{...o,ref:l})});oc.displayName=ac;var sc=`PopperContent`,[cc,lc]=ec(sc),uc=t.forwardRef((e,n)=>{let{__scopePopper:i,side:a=`bottom`,sideOffset:o=0,align:s=`center`,alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=rc(sc,i),[y,b]=t.useState(null),x=L(n,e=>b(e)),[S,C]=t.useState(null),w=ja(S),T=w?.width??0,E=w?.height??0,D=a+(s===`center`?``:`-`+s),O=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(d)?d:[d],A=k.length>0,j={padding:O,boundary:k.filter(mc),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=Vs({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Ds(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[Us({mainAxis:o+E,alignmentAxis:c}),u&&Ws({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Gs():void 0,...j}),u&&Ks({...j}),qs({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),S&&Ys({element:S,padding:l}),hc({arrowWidth:T,arrowHeight:E}),m&&Js({strategy:`referenceHidden`,...j})]}),[te,I]=gc(P),ne=Vn(g);wn(()=>{ee&&ne?.()},[ee,ne]);let re=F.arrow?.x,ie=F.arrow?.y,ae=F.arrow?.centerOffset!==0,[oe,se]=t.useState();return wn(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),(0,r.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,r.jsx)(cc,{scope:i,placedSide:te,onArrowChange:C,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,r.jsx)(R.div,{"data-side":te,"data-align":I,..._,ref:x,style:{..._.style,animation:ee?void 0:`none`}})})})});uc.displayName=sc;var dc=`PopperArrow`,fc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},pc=t.forwardRef(function(e,t){let{__scopePopper:n,...i}=e,a=lc(dc,n),o=fc[a.placedSide];return(0,r.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,r.jsx)(Qs,{...i,ref:t,style:{...i.style,display:`block`}})})});pc.displayName=dc;function mc(e){return e!==null}var hc=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=gc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function gc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var _c=ic,vc=oc,yc=uc,bc=pc,xc=`rovingFocusGroup.onEntryFocus`,Sc={bubbles:!1,cancelable:!0},Cc=`RovingFocusGroup`,[wc,Tc,Ec]=Cn(Cc),[Dc,Oc]=xn(Cc,[Ec]),[kc,Ac]=Dc(Cc),jc=t.forwardRef((e,t)=>(0,r.jsx)(wc.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,r.jsx)(wc.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,r.jsx)(Mc,{...e,ref:t})})}));jc.displayName=Cc;var Mc=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=t.useRef(null),h=L(n,m),g=zn(s),[_,v]=En({prop:c,defaultProp:l??null,onChange:u,caller:Cc}),[y,b]=t.useState(!1),x=Vn(d),S=Tc(i),C=t.useRef(!1),[w,T]=t.useState(0);return t.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(xc,x),()=>e.removeEventListener(xc,x)},[x]),(0,r.jsx)(kc,{scope:i,orientation:a,dir:g,loop:o,currentTabStopId:_,onItemFocus:t.useCallback(e=>v(e),[v]),onItemShiftTab:t.useCallback(()=>b(!0),[]),onFocusableItemAdd:t.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>T(e=>e-1),[]),children:(0,r.jsx)(R.div,{tabIndex:y||w===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:z(e.onMouseDown,()=>{C.current=!0}),onFocus:z(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(xc,Sc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Rc([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:z(e.onBlur,()=>b(!1))})})}),Nc=`RovingFocusGroupItem`,Pc=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=In(),d=s||u,f=Ac(Nc,i),p=f.currentTabStopId===d,m=Tc(i),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return t.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),(0,r.jsx)(wc.ItemSlot,{scope:i,id:d,focusable:a,active:o,children:(0,r.jsx)(R.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:z(e.onMouseDown,e=>{a?f.onItemFocus(d):e.preventDefault()}),onFocus:z(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:z(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Lc(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?zc(n,r+1):n.slice(r+1)}setTimeout(()=>Rc(n))}}),children:typeof c==`function`?c({isCurrentTabStop:p,hasTabStop:_!=null}):c})})});Pc.displayName=Nc;var Fc={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ic(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Lc(e,t,n){let r=Ic(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Fc[r]}function Rc(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Bc=jc,Vc=Pc,Hc=[`Enter`,` `],Uc=[`ArrowDown`,`PageUp`,`Home`],Wc=[`ArrowUp`,`PageDown`,`End`],Gc=[...Uc,...Wc],Kc={ltr:[...Hc,`ArrowRight`],rtl:[...Hc,`ArrowLeft`]},qc={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Jc=`Menu`,[Yc,Xc,Zc]=Cn(Jc),[Qc,$c]=xn(Jc,[Zc,tc,Oc]),el=tc(),tl=Oc(),[nl,rl]=Qc(Jc),[il,al]=Qc(Jc),ol=e=>{let{__scopeMenu:n,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0}=e,l=el(n),[u,d]=t.useState(null),f=t.useRef(!1),p=Vn(s),m=zn(o);return t.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,r.jsx)(_c,{...l,children:(0,r.jsx)(nl,{scope:n,open:i,onOpenChange:p,content:u,onContentChange:d,children:(0,r.jsx)(il,{scope:n,onClose:t.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:c,children:a})})})};ol.displayName=Jc;var sl=`MenuAnchor`,cl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e,a=el(n);return(0,r.jsx)(vc,{...a,...i,ref:t})});cl.displayName=sl;var ll=`MenuPortal`,[ul,dl]=Qc(ll,{forceMount:void 0}),fl=e=>{let{__scopeMenu:t,forceMount:n,children:i,container:a}=e,o=rl(ll,t);return(0,r.jsx)(ul,{scope:t,forceMount:n,children:(0,r.jsx)(An,{present:n||o.open,children:(0,r.jsx)(yr,{asChild:!0,container:a,children:i})})})};fl.displayName=ll;var pl=`MenuContent`,[ml,hl]=Qc(pl),gl=t.forwardRef((e,t)=>{let n=dl(pl,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=rl(pl,e.__scopeMenu),s=al(pl,e.__scopeMenu);return(0,r.jsx)(Yc.Provider,{scope:e.__scopeMenu,children:(0,r.jsx)(An,{present:i||o.open,children:(0,r.jsx)(Yc.Slot,{scope:e.__scopeMenu,children:s.modal?(0,r.jsx)(_l,{...a,ref:t}):(0,r.jsx)(vl,{...a,ref:t})})})})}),_l=t.forwardRef((e,n)=>{let i=rl(pl,e.__scopeMenu),a=t.useRef(null),o=L(n,a);return t.useEffect(()=>{let e=a.current;if(e)return Vi(e)},[]),(0,r.jsx)(bl,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),vl=t.forwardRef((e,t)=>{let n=rl(pl,e.__scopeMenu);return(0,r.jsx)(bl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),yl=on(`MenuContent.ScrollLock`),bl=t.forwardRef((e,n)=>{let{__scopeMenu:i,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=rl(pl,i),y=al(pl,i),b=el(i),x=tl(i),S=Xc(i),[C,w]=t.useState(null),T=t.useRef(null),E=L(n,T,v.onContentChange),D=t.useRef(0),O=t.useRef(``),k=t.useRef(0),A=t.useRef(null),j=t.useRef(`right`),M=t.useRef(0),N=g?Mi:t.Fragment,P=g?{as:yl,allowPinchZoom:!0}:void 0,ee=e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=iu(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};t.useEffect(()=>()=>window.clearTimeout(D.current),[]),xr();let F=t.useCallback(e=>j.current===A.current?.side&&ou(e,A.current?.area),[]);return(0,r.jsx)(ml,{scope:i,searchRef:O,onItemEnter:t.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:t.useCallback(e=>{F(e)||(T.current?.focus(),w(null))},[F]),onTriggerLeave:t.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:k,onPointerGraceIntentChange:t.useCallback(e=>{A.current=e},[]),children:(0,r.jsx)(N,{...P,children:(0,r.jsx)(or,{asChild:!0,trapped:o,onMountAutoFocus:z(s,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,r.jsx)(Yn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,r.jsx)(Bc,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:a,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:z(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,r.jsx)(yc,{role:`menu`,"aria-orientation":`vertical`,"data-state":$l(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:z(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ee(e.key));let i=T.current;if(e.target!==i||!Gc.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Wc.includes(e.key)&&a.reverse(),nu(a)}),onBlur:z(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:z(e.onPointerMove,su(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});gl.displayName=pl;var xl=`MenuGroup`,Sl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(R.div,{role:`group`,...i,ref:t})});Sl.displayName=xl;var Cl=`MenuLabel`,wl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(R.div,{...i,ref:t})});wl.displayName=Cl;var Tl=`MenuItem`,El=`menu.itemSelect`,Dl=t.forwardRef((e,n)=>{let{disabled:i=!1,onSelect:a,...o}=e,s=t.useRef(null),c=al(Tl,e.__scopeMenu),l=hl(Tl,e.__scopeMenu),u=L(n,s),d=t.useRef(!1),f=()=>{let e=s.current;if(!i&&e){let t=new CustomEvent(El,{bubbles:!0,cancelable:!0});e.addEventListener(El,e=>a?.(e),{once:!0}),hn(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,r.jsx)(Ol,{...o,ref:u,disabled:i,onClick:z(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:z(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,e=>{let t=l.searchRef.current!==``;i||t&&e.key===` `||Hc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Dl.displayName=Tl;var Ol=t.forwardRef((e,n)=>{let{__scopeMenu:i,disabled:a=!1,textValue:o,...s}=e,c=hl(Tl,i),l=tl(i),u=t.useRef(null),d=L(n,u),[f,p]=t.useState(!1),[m,h]=t.useState(``);return t.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[s.children]),(0,r.jsx)(Yc.ItemSlot,{scope:i,disabled:a,textValue:o??m,children:(0,r.jsx)(Vc,{asChild:!0,...l,focusable:!a,children:(0,r.jsx)(R.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:z(e.onPointerMove,su(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,su(e=>c.onItemLeave(e))),onFocus:z(e.onFocus,()=>p(!0)),onBlur:z(e.onBlur,()=>p(!1))})})})}),kl=`MenuCheckboxItem`,Al=t.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:i,...a}=e;return(0,r.jsx)(Rl,{scope:e.__scopeMenu,checked:n,children:(0,r.jsx)(Dl,{role:`menuitemcheckbox`,"aria-checked":eu(n)?`mixed`:n,...a,ref:t,"data-state":tu(n),onSelect:z(a.onSelect,()=>i?.(eu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Al.displayName=kl;var jl=`MenuRadioGroup`,[Ml,Nl]=Qc(jl,{value:void 0,onValueChange:()=>{}}),Pl=t.forwardRef((e,t)=>{let{value:n,onValueChange:i,...a}=e,o=Vn(i);return(0,r.jsx)(Ml,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,r.jsx)(Sl,{...a,ref:t})})});Pl.displayName=jl;var Fl=`MenuRadioItem`,Il=t.forwardRef((e,t)=>{let{value:n,...i}=e,a=Nl(Fl,e.__scopeMenu),o=n===a.value;return(0,r.jsx)(Rl,{scope:e.__scopeMenu,checked:o,children:(0,r.jsx)(Dl,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":tu(o),onSelect:z(i.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Il.displayName=Fl;var Ll=`MenuItemIndicator`,[Rl,zl]=Qc(Ll,{checked:!1}),Bl=t.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:i,...a}=e,o=zl(Ll,n);return(0,r.jsx)(An,{present:i||eu(o.checked)||o.checked===!0,children:(0,r.jsx)(R.span,{...a,ref:t,"data-state":tu(o.checked)})})});Bl.displayName=Ll;var Vl=`MenuSeparator`,Hl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(R.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});Hl.displayName=Vl;var Ul=`MenuArrow`,Wl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e,a=el(n);return(0,r.jsx)(bc,{...a,...i,ref:t})});Wl.displayName=Ul;var Gl=`MenuSub`,[Kl,ql]=Qc(Gl),Jl=e=>{let{__scopeMenu:n,children:i,open:a=!1,onOpenChange:o}=e,s=rl(Gl,n),c=el(n),[l,u]=t.useState(null),[d,f]=t.useState(null),p=Vn(o);return t.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),(0,r.jsx)(_c,{...c,children:(0,r.jsx)(nl,{scope:n,open:a,onOpenChange:p,content:d,onContentChange:f,children:(0,r.jsx)(Kl,{scope:n,contentId:In(),triggerId:In(),trigger:l,onTriggerChange:u,children:i})})})};Jl.displayName=Gl;var Yl=`MenuSubTrigger`,Xl=t.forwardRef((e,n)=>{let i=rl(Yl,e.__scopeMenu),a=al(Yl,e.__scopeMenu),o=ql(Yl,e.__scopeMenu),s=hl(Yl,e.__scopeMenu),c=t.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,r.jsx)(cl,{asChild:!0,...d,children:(0,r.jsx)(Ol,{id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":i.open,"aria-controls":o.contentId,"data-state":$l(i.open),...e,ref:an(n,o.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,su(t=>{s.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!i.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:z(e.onPointerLeave,su(e=>{f();let t=i.content?.getBoundingClientRect();if(t){let n=i.content?.dataset.side,r=n===`right`,a=r?-5:5,o=t[r?`left`:`right`],c=t[r?`right`:`left`];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:o,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,t=>{let n=s.searchRef.current!==``;e.disabled||n&&t.key===` `||Kc[a.dir].includes(t.key)&&(i.onOpenChange(!0),i.content?.focus(),t.preventDefault())})})})});Xl.displayName=Yl;var Zl=`MenuSubContent`,Ql=t.forwardRef((e,n)=>{let i=dl(pl,e.__scopeMenu),{forceMount:a=i.forceMount,...o}=e,s=rl(pl,e.__scopeMenu),c=al(pl,e.__scopeMenu),l=ql(Zl,e.__scopeMenu),u=t.useRef(null),d=L(n,u);return(0,r.jsx)(Yc.Provider,{scope:e.__scopeMenu,children:(0,r.jsx)(An,{present:a||s.open,children:(0,r.jsx)(Yc.Slot,{scope:e.__scopeMenu,children:(0,r.jsx)(bl,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:z(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:z(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=qc[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});Ql.displayName=Zl;function $l(e){return e?`open`:`closed`}function eu(e){return e===`indeterminate`}function tu(e){return eu(e)?`indeterminate`:e?`checked`:`unchecked`}function nu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ru(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function iu(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ru(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function au(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ou(e,t){return t?au({x:e.clientX,y:e.clientY},t):!1}function su(e){return t=>t.pointerType===`mouse`?e(t):void 0}var cu=ol,lu=cl,uu=fl,du=gl,fu=Sl,pu=wl,mu=Dl,hu=Al,gu=Pl,_u=Il,vu=Bl,yu=Hl,bu=Wl,xu=Jl,Su=Xl,Cu=Ql,wu=`DropdownMenu`,[Tu,Eu]=xn(wu,[$c]),Du=$c(),[Ou,ku]=Tu(wu),Au=e=>{let{__scopeDropdownMenu:n,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Du(n),d=t.useRef(null),[f,p]=En({prop:o,defaultProp:s??!1,onChange:c,caller:wu});return(0,r.jsx)(Ou,{scope:n,triggerId:In(),triggerRef:d,contentId:In(),open:f,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:l,children:(0,r.jsx)(cu,{...u,open:f,onOpenChange:p,dir:a,modal:l,children:i})})};Au.displayName=wu;var ju=`DropdownMenuTrigger`,Mu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:i=!1,...a}=e,o=ku(ju,n),s=Du(n);return(0,r.jsx)(lu,{asChild:!0,...s,children:(0,r.jsx)(R.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:an(t,o.triggerRef),onPointerDown:z(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:z(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Mu.displayName=ju;var Nu=`DropdownMenuPortal`,Pu=e=>{let{__scopeDropdownMenu:t,...n}=e,i=Du(t);return(0,r.jsx)(uu,{...i,...n})};Pu.displayName=Nu;var Fu=`DropdownMenuContent`,Iu=t.forwardRef((e,n)=>{let{__scopeDropdownMenu:i,...a}=e,o=ku(Fu,i),s=Du(i),c=t.useRef(!1);return(0,r.jsx)(du,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:n,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{c.current||o.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:z(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Iu.displayName=Fu;var Lu=`DropdownMenuGroup`,Ru=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(fu,{...a,...i,ref:t})});Ru.displayName=Lu;var zu=`DropdownMenuLabel`,Bu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(pu,{...a,...i,ref:t})});Bu.displayName=zu;var Vu=`DropdownMenuItem`,Hu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(mu,{...a,...i,ref:t})});Hu.displayName=Vu;var Uu=`DropdownMenuCheckboxItem`,Wu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(hu,{...a,...i,ref:t})});Wu.displayName=Uu;var Gu=`DropdownMenuRadioGroup`,Ku=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(gu,{...a,...i,ref:t})});Ku.displayName=Gu;var qu=`DropdownMenuRadioItem`,Ju=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(_u,{...a,...i,ref:t})});Ju.displayName=qu;var Yu=`DropdownMenuItemIndicator`,Xu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(vu,{...a,...i,ref:t})});Xu.displayName=Yu;var Zu=`DropdownMenuSeparator`,Qu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(yu,{...a,...i,ref:t})});Qu.displayName=Zu;var $u=`DropdownMenuArrow`,ed=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(bu,{...a,...i,ref:t})});ed.displayName=$u;var td=e=>{let{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:a,defaultOpen:o}=e,s=Du(t),[c,l]=En({prop:i,defaultProp:o??!1,onChange:a,caller:`DropdownMenuSub`});return(0,r.jsx)(xu,{...s,open:c,onOpenChange:l,children:n})},nd=`DropdownMenuSubTrigger`,rd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(Su,{...a,...i,ref:t})});rd.displayName=nd;var id=`DropdownMenuSubContent`,ad=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Du(n);return(0,r.jsx)(Cu,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ad.displayName=id;var od=Au,sd=Mu,cd=Pu,ld=Iu,ud=Ru,dd=Bu,fd=Hu,pd=Wu,md=Ku,hd=Ju,gd=Xu,_d=Qu,vd=td,yd=rd,bd=ad;function xd(e,[t,n]){return Math.min(n,Math.max(t,e))}var Sd=`Popover`,[Cd,wd]=xn(Sd,[tc]),Td=tc(),[Ed,Dd]=Cd(Sd),Od=e=>{let{__scopePopover:n,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=Td(n),u=t.useRef(null),[d,f]=t.useState(!1),[p,m]=En({prop:a,defaultProp:o??!1,onChange:s,caller:Sd});return(0,r.jsx)(_c,{...l,children:(0,r.jsx)(Ed,{scope:n,contentId:In(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:c,children:i})})};Od.displayName=Sd;var kd=`PopoverAnchor`,Ad=t.forwardRef((e,n)=>{let{__scopePopover:i,...a}=e,o=Dd(kd,i),s=Td(i),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return t.useEffect(()=>(c(),()=>l()),[c,l]),(0,r.jsx)(vc,{...s,...a,ref:n})});Ad.displayName=kd;var jd=`PopoverTrigger`,Md=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=Dd(jd,n),o=Td(n),s=L(t,a.triggerRef),c=(0,r.jsx)(R.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":qd(a.open),...i,ref:s,onClick:z(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,r.jsx)(vc,{asChild:!0,...o,children:c})});Md.displayName=jd;var Nd=`PopoverPortal`,[Pd,Fd]=Cd(Nd,{forceMount:void 0}),Id=e=>{let{__scopePopover:t,forceMount:n,children:i,container:a}=e,o=Dd(Nd,t);return(0,r.jsx)(Pd,{scope:t,forceMount:n,children:(0,r.jsx)(An,{present:n||o.open,children:(0,r.jsx)(yr,{asChild:!0,container:a,children:i})})})};Id.displayName=Nd;var Ld=`PopoverContent`,Rd=t.forwardRef((e,t)=>{let n=Fd(Ld,e.__scopePopover),{forceMount:i=n.forceMount,...a}=e,o=Dd(Ld,e.__scopePopover);return(0,r.jsx)(An,{present:i||o.open,children:o.modal?(0,r.jsx)(Bd,{...a,ref:t}):(0,r.jsx)(Vd,{...a,ref:t})})});Rd.displayName=Ld;var zd=on(`PopoverContent.RemoveScroll`),Bd=t.forwardRef((e,n)=>{let i=Dd(Ld,e.__scopePopover),a=t.useRef(null),o=L(n,a),s=t.useRef(!1);return t.useEffect(()=>{let e=a.current;if(e)return Vi(e)},[]),(0,r.jsx)(Mi,{as:zd,allowPinchZoom:!0,children:(0,r.jsx)(Hd,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||i.triggerRef.current?.focus()}),onPointerDownOutside:z(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:z(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Vd=t.forwardRef((e,n)=>{let i=Dd(Ld,e.__scopePopover),a=t.useRef(!1),o=t.useRef(!1);return(0,r.jsx)(Hd,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||i.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;i.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),Hd=t.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Dd(Ld,n),m=Td(n);return xr(),(0,r.jsx)(or,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,r.jsx)(Yn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,r.jsx)(yc,{"data-state":qd(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Ud=`PopoverClose`,Wd=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=Dd(Ud,n);return(0,r.jsx)(R.button,{type:`button`,...i,ref:t,onClick:z(e.onClick,()=>a.onOpenChange(!1))})});Wd.displayName=Ud;var Gd=`PopoverArrow`,Kd=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=Td(n);return(0,r.jsx)(bc,{...a,...i,ref:t})});Kd.displayName=Gd;function qd(e){return e?`open`:`closed`}var Jd=Od,Yd=Ad,Xd=Md,Zd=Id,Qd=Rd,$d=Wd;function ef(e,n){return t.useReducer((e,t)=>n[e][t]??e,e)}var tf=`ScrollArea`,[nf,rf]=xn(tf),[af,of]=nf(tf),sf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,type:a=`hover`,dir:o,scrollHideDelay:s=600,...c}=e,[l,u]=t.useState(null),[d,f]=t.useState(null),[p,m]=t.useState(null),[h,g]=t.useState(null),[_,v]=t.useState(null),[y,b]=t.useState(0),[x,S]=t.useState(0),[C,w]=t.useState(!1),[T,E]=t.useState(!1),D=L(n,e=>u(e)),O=zn(o);return(0,r.jsx)(af,{scope:i,type:a,dir:O,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:f,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:w,scrollbarY:_,onScrollbarYChange:v,scrollbarYEnabled:T,onScrollbarYEnabledChange:E,onCornerWidthChange:b,onCornerHeightChange:S,children:(0,r.jsx)(R.div,{dir:O,...c,ref:D,style:{position:`relative`,"--radix-scroll-area-corner-width":y+`px`,"--radix-scroll-area-corner-height":x+`px`,...e.style}})})});sf.displayName=tf;var cf=`ScrollAreaViewport`,lf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,children:a,nonce:o,...s}=e,c=of(cf,i),l=L(n,t.useRef(null),c.onViewportChange);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:o}),(0,r.jsx)(R.div,{"data-radix-scroll-area-viewport":``,...s,ref:l,style:{overflowX:c.scrollbarXEnabled?`scroll`:`hidden`,overflowY:c.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,r.jsx)(`div`,{ref:c.onContentChange,style:{minWidth:`100%`,display:`table`},children:a})})]})});lf.displayName=cf;var uf=`ScrollAreaScrollbar`,df=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=of(uf,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=o,l=e.orientation===`horizontal`;return t.useEffect(()=>(l?s(!0):c(!0),()=>{l?s(!1):c(!1)}),[l,s,c]),o.type===`hover`?(0,r.jsx)(ff,{...a,ref:n,forceMount:i}):o.type===`scroll`?(0,r.jsx)(pf,{...a,ref:n,forceMount:i}):o.type===`auto`?(0,r.jsx)(mf,{...a,ref:n,forceMount:i}):o.type===`always`?(0,r.jsx)(hf,{...a,ref:n}):null});df.displayName=uf;var ff=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=of(uf,e.__scopeScrollArea),[s,c]=t.useState(!1);return t.useEffect(()=>{let e=o.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),c(!0)},r=()=>{t=window.setTimeout(()=>c(!1),o.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[o.scrollArea,o.scrollHideDelay]),(0,r.jsx)(An,{present:i||s,children:(0,r.jsx)(mf,{"data-state":s?`visible`:`hidden`,...a,ref:n})})}),pf=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=of(uf,e.__scopeScrollArea),s=e.orientation===`horizontal`,c=Ff(()=>u(`SCROLL_END`),100),[l,u]=ef(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return t.useEffect(()=>{if(l===`idle`){let e=window.setTimeout(()=>u(`HIDE`),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,o.scrollHideDelay,u]),t.useEffect(()=>{let e=o.viewport,t=s?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(u(`SCROLL`),c()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[o.viewport,s,u,c]),(0,r.jsx)(An,{present:i||l!==`hidden`,children:(0,r.jsx)(hf,{"data-state":l===`hidden`?`hidden`:`visible`,...a,ref:n,onPointerEnter:z(e.onPointerEnter,()=>u(`POINTER_ENTER`)),onPointerLeave:z(e.onPointerLeave,()=>u(`POINTER_LEAVE`))})})}),mf=t.forwardRef((e,n)=>{let i=of(uf,e.__scopeScrollArea),{forceMount:a,...o}=e,[s,c]=t.useState(!1),l=e.orientation===`horizontal`,u=Ff(()=>{if(i.viewport){let e=i.viewport.offsetWidth<i.viewport.scrollWidth,t=i.viewport.offsetHeight<i.viewport.scrollHeight;c(l?e:t)}},10);return If(i.viewport,u),If(i.content,u),(0,r.jsx)(An,{present:a||s,children:(0,r.jsx)(hf,{"data-state":s?`visible`:`hidden`,...o,ref:n})})}),hf=t.forwardRef((e,n)=>{let{orientation:i=`vertical`,...a}=e,o=of(uf,e.__scopeScrollArea),s=t.useRef(null),c=t.useRef(0),[l,u]=t.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Of(l.viewport,l.content),f={...a,sizes:l,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:e=>s.current=e,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:e=>c.current=e};function p(e,t){return Af(e,c.current,l,t)}return i===`horizontal`?(0,r.jsx)(gf,{...f,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){let e=o.viewport.scrollLeft,t=jf(e,l,o.dir);s.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=p(e,o.dir))}}):i===`vertical`?(0,r.jsx)(_f,{...f,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){let e=o.viewport.scrollTop,t=jf(e,l);s.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=p(e))}}):null}),gf=t.forwardRef((e,n)=>{let{sizes:i,onSizesChange:a,...o}=e,s=of(uf,e.__scopeScrollArea),[c,l]=t.useState(),u=t.useRef(null),d=L(n,u,s.onScrollbarXChange);return t.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,r.jsx)(bf,{"data-orientation":`horizontal`,...o,ref:d,sizes:i,style:{bottom:0,left:s.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:s.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":kf(i)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(s.viewport){let r=s.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Nf(r,n)&&t.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&a({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Df(c.paddingLeft),paddingEnd:Df(c.paddingRight)}})}})}),_f=t.forwardRef((e,n)=>{let{sizes:i,onSizesChange:a,...o}=e,s=of(uf,e.__scopeScrollArea),[c,l]=t.useState(),u=t.useRef(null),d=L(n,u,s.onScrollbarYChange);return t.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,r.jsx)(bf,{"data-orientation":`vertical`,...o,ref:d,sizes:i,style:{top:0,right:s.dir===`ltr`?0:void 0,left:s.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":kf(i)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(s.viewport){let r=s.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Nf(r,n)&&t.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&a({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Df(c.paddingTop),paddingEnd:Df(c.paddingBottom)}})}})}),[vf,yf]=nf(uf),bf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,sizes:a,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:f,onResize:p,...m}=e,h=of(uf,i),[g,_]=t.useState(null),v=L(n,e=>_(e)),y=t.useRef(null),b=t.useRef(``),x=h.viewport,S=a.content-a.viewport,C=Vn(f),w=Vn(u),T=Ff(p,10);function E(e){y.current&&d({x:e.clientX-y.current.left,y:e.clientY-y.current.top})}return t.useEffect(()=>{let e=e=>{let t=e.target;g?.contains(t)&&C(e,S)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[x,g,S,C]),t.useEffect(w,[a,w]),If(g,T),If(h.content,T),(0,r.jsx)(vf,{scope:i,scrollbar:g,hasThumb:o,onThumbChange:Vn(s),onThumbPointerUp:Vn(c),onThumbPositionChange:w,onThumbPointerDown:Vn(l),children:(0,r.jsx)(R.div,{...m,ref:v,style:{position:`absolute`,...m.style},onPointerDown:z(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),y.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,h.viewport&&(h.viewport.style.scrollBehavior=`auto`),E(e))}),onPointerMove:z(e.onPointerMove,E),onPointerUp:z(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=``),y.current=null})})})}),xf=`ScrollAreaThumb`,Sf=t.forwardRef((e,t)=>{let{forceMount:n,...i}=e,a=yf(xf,e.__scopeScrollArea);return(0,r.jsx)(An,{present:n||a.hasThumb,children:(0,r.jsx)(Cf,{ref:t,...i})})}),Cf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,style:a,...o}=e,s=of(xf,i),c=yf(xf,i),{onThumbPositionChange:l}=c,u=L(n,e=>c.onThumbChange(e)),d=t.useRef(void 0),f=Ff(()=>{d.current&&=(d.current(),void 0)},100);return t.useEffect(()=>{let e=s.viewport;if(e){let t=()=>{f(),d.current||(d.current=Pf(e,l),l())};return l(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[s.viewport,f,l]),(0,r.jsx)(R.div,{"data-state":c.hasThumb?`visible`:`hidden`,...o,ref:u,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...a},onPointerDownCapture:z(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;c.onThumbPointerDown({x:n,y:r})}),onPointerUp:z(e.onPointerUp,c.onThumbPointerUp)})});Sf.displayName=xf;var wf=`ScrollAreaCorner`,Tf=t.forwardRef((e,t)=>{let n=of(wf,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&i?(0,r.jsx)(Ef,{...e,ref:t}):null});Tf.displayName=wf;var Ef=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,...a}=e,o=of(wf,i),[s,c]=t.useState(0),[l,u]=t.useState(0),d=!!(s&&l);return If(o.scrollbarX,()=>{let e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),u(e)}),If(o.scrollbarY,()=>{let e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),c(e)}),d?(0,r.jsx)(R.div,{...a,ref:n,style:{width:s,height:l,position:`absolute`,right:o.dir===`ltr`?0:void 0,left:o.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function Df(e){return e?parseInt(e,10):0}function Of(e,t){let n=e/t;return isNaN(n)?0:n}function kf(e){let t=Of(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Af(e,t,n,r=`ltr`){let i=kf(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Mf([c,l],d)(e)}function jf(e,t,n=`ltr`){let r=kf(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=xd(e,n===`ltr`?[0,o]:[o*-1,0]);return Mf([0,o],[0,s])(c)}function Mf(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Nf(e,t){return e>0&&e<t}var Pf=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function Ff(e,n){let r=Vn(e),i=t.useRef(0);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),t.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function If(e,t){let n=Vn(t);wn(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var Lf=sf,Rf=lf,zf=df,Bf=Sf,Vf=Tf,Hf=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Uf=[` `,`Enter`],Wf=`Select`,[Gf,Kf,qf]=Cn(Wf),[Jf,Yf]=xn(Wf,[qf,tc]),Xf=tc(),[Zf,Qf]=Jf(Wf),[$f,ep]=Jf(Wf),tp=e=>{let{__scopeSelect:n,children:i,open:a,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Xf(n),[v,y]=t.useState(null),[b,x]=t.useState(null),[S,C]=t.useState(!1),w=zn(d),[T,E]=En({prop:a,defaultProp:o??!1,onChange:s,caller:Wf}),[D,O]=En({prop:c,defaultProp:l,onChange:u,caller:Wf}),k=t.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=t.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,r.jsx)(_c,{..._,children:(0,r.jsxs)(Zf,{required:h,scope:n,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:In(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,r.jsx)(Gf.Provider,{scope:n,children:(0,r.jsx)($f,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:i})}),A?(0,r.jsxs)(Xp,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,r.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};tp.displayName=Wf;var np=`SelectTrigger`,rp=t.forwardRef((e,n)=>{let{__scopeSelect:i,disabled:a=!1,...o}=e,s=Xf(i),c=Qf(np,i),l=c.disabled||a,u=L(n,c.onTriggerChange),d=Kf(i),f=t.useRef(`touch`),[p,m,h]=Qp(e=>{let t=d().filter(e=>!e.disabled),n=$p(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,r.jsx)(vc,{asChild:!0,...s,children:(0,r.jsx)(R.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Zp(c.value)?``:void 0,...o,ref:u,onClick:z(o.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:z(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:z(o.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&Hf.includes(e.key)&&(g(),e.preventDefault())})})})});rp.displayName=np;var ip=`SelectValue`,ap=t.forwardRef((e,t)=>{let{__scopeSelect:n,className:i,style:a,children:o,placeholder:s=``,...c}=e,l=Qf(ip,n),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=L(t,l.onValueNodeChange);return wn(()=>{u(d)},[u,d]),(0,r.jsx)(R.span,{...c,ref:f,style:{pointerEvents:`none`},children:Zp(l.value)?(0,r.jsx)(r.Fragment,{children:s}):o})});ap.displayName=ip;var op=`SelectIcon`,sp=t.forwardRef((e,t)=>{let{__scopeSelect:n,children:i,...a}=e;return(0,r.jsx)(R.span,{"aria-hidden":!0,...a,ref:t,children:i||`▼`})});sp.displayName=op;var cp=`SelectPortal`,lp=e=>(0,r.jsx)(yr,{asChild:!0,...e});lp.displayName=cp;var up=`SelectContent`,dp=t.forwardRef((e,i)=>{let a=Qf(up,e.__scopeSelect),[o,s]=t.useState();if(wn(()=>{s(new DocumentFragment)},[]),!a.open){let t=o;return t?n.createPortal((0,r.jsx)(pp,{scope:e.__scopeSelect,children:(0,r.jsx)(Gf.Slot,{scope:e.__scopeSelect,children:(0,r.jsx)(`div`,{children:e.children})})}),t):null}return(0,r.jsx)(_p,{...e,ref:i})});dp.displayName=up;var fp=10,[pp,mp]=Jf(up),hp=`SelectContentImpl`,gp=on(`SelectContent.RemoveScroll`),_p=t.forwardRef((e,n)=>{let{__scopeSelect:i,position:a=`item-aligned`,onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Qf(up,i),[x,S]=t.useState(null),[C,w]=t.useState(null),T=L(n,e=>S(e)),[E,D]=t.useState(null),[O,k]=t.useState(null),A=Kf(i),[j,M]=t.useState(!1),N=t.useRef(!1);t.useEffect(()=>{if(x)return Vi(x)},[x]),xr();let P=t.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),ee=t.useCallback(()=>P([E,x]),[P,E,x]);t.useEffect(()=>{j&&ee()},[j,ee]);let{onOpenChange:F,triggerPointerDownPosRef:te}=b;t.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(te.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||F(!1),document.removeEventListener(`pointermove`,t),te.current=null};return te.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,F,te]),t.useEffect(()=>{let e=()=>F(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[I,ne]=Qp(e=>{let t=A().filter(e=>!e.disabled),n=$p(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),re=t.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(N.current=!0))},[b.value]),ie=t.useCallback(()=>x?.focus(),[x]),ae=t.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),oe=a===`popper`?xp:yp,se=oe===xp?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,r.jsx)(pp,{scope:i,content:x,viewport:C,onViewportChange:w,itemRefCallback:re,selectedItem:E,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:O,position:a,isPositioned:j,searchRef:I,children:(0,r.jsx)(Mi,{as:gp,allowPinchZoom:!0,children:(0,r.jsx)(or,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:z(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,r.jsx)(Yn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,r.jsx)(oe,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...se,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:z(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});_p.displayName=hp;var vp=`SelectItemAlignedPosition`,yp=t.forwardRef((e,n)=>{let{__scopeSelect:i,onPlaced:a,...o}=e,s=Qf(up,i),c=mp(up,i),[l,u]=t.useState(null),[d,f]=t.useState(null),p=L(n,e=>f(e)),m=Kf(i),h=t.useRef(!1),g=t.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=c,x=t.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&_&&v&&y){let e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if(s.dir!==`rtl`){let i=r.left-t.left,a=n.left-i,o=e.left-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-fp,d=xd(a,[fp,Math.max(fp,u-c)]);l.style.minWidth=s+`px`,l.style.left=d+`px`}else{let i=t.right-r.right,a=window.innerWidth-n.right-i,o=window.innerWidth-e.right-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-fp,d=xd(a,[fp,Math.max(fp,u-c)]);l.style.minWidth=s+`px`,l.style.right=d+`px`}let i=m(),o=window.innerHeight-fp*2,c=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),b=parseInt(u.paddingBottom,10),x=f+p+c+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-fp,D=o-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=i.length>0&&v===i[i.length-1].ref.current;l.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);l.style.height=n+`px`}else{let e=i.length>0&&v===i[0].ref.current;l.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;l.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}l.style.margin=`${fp}px 0`,l.style.minHeight=S+`px`,l.style.maxHeight=o+`px`,a?.(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,l,d,_,v,y,s.dir,a]);wn(()=>x(),[x]);let[S,C]=t.useState();return wn(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]),(0,r.jsx)(Sp,{scope:i,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:t.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]),children:(0,r.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,r.jsx)(R.div,{...o,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...o.style}})})})});yp.displayName=vp;var bp=`SelectPopperPosition`,xp=t.forwardRef((e,t)=>{let{__scopeSelect:n,align:i=`start`,collisionPadding:a=fp,...o}=e,s=Xf(n);return(0,r.jsx)(yc,{...s,...o,ref:t,align:i,collisionPadding:a,style:{boxSizing:`border-box`,...o.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});xp.displayName=bp;var[Sp,Cp]=Jf(up,{}),wp=`SelectViewport`,Tp=t.forwardRef((e,n)=>{let{__scopeSelect:i,nonce:a,...o}=e,s=mp(wp,i),c=Cp(wp,i),l=L(n,s.onViewportChange),u=t.useRef(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:a}),(0,r.jsx)(Gf.Slot,{scope:i,children:(0,r.jsx)(R.div,{"data-radix-select-viewport":``,role:`presentation`,...o,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...o.style},onScroll:z(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-fp*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});Tp.displayName=wp;var Ep=`SelectGroup`,[Dp,Op]=Jf(Ep),kp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=In();return(0,r.jsx)(Dp,{scope:n,id:a,children:(0,r.jsx)(R.div,{role:`group`,"aria-labelledby":a,...i,ref:t})})});kp.displayName=Ep;var Ap=`SelectLabel`,jp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=Op(Ap,n);return(0,r.jsx)(R.div,{id:a.id,...i,ref:t})});jp.displayName=Ap;var Mp=`SelectItem`,[Np,Pp]=Jf(Mp),Fp=t.forwardRef((e,n)=>{let{__scopeSelect:i,value:a,disabled:o=!1,textValue:s,...c}=e,l=Qf(Mp,i),u=mp(Mp,i),d=l.value===a,[f,p]=t.useState(s??``),[m,h]=t.useState(!1),g=L(n,e=>u.itemRefCallback?.(e,a,o)),_=In(),v=t.useRef(`touch`),y=()=>{o||(l.onValueChange(a),l.onOpenChange(!1))};if(a===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,r.jsx)(Np,{scope:i,value:a,disabled:o,textId:_,isSelected:d,onItemTextChange:t.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,r.jsx)(Gf.ItemSlot,{scope:i,value:a,disabled:o,textValue:f,children:(0,r.jsx)(R.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":o||void 0,"data-disabled":o?``:void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:z(c.onFocus,()=>h(!0)),onBlur:z(c.onBlur,()=>h(!1)),onClick:z(c.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:z(c.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:z(c.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:z(c.onPointerMove,e=>{v.current=e.pointerType,o?u.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:z(c.onKeyDown,e=>{u.searchRef?.current!==``&&e.key===` `||(Uf.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});Fp.displayName=Mp;var Ip=`SelectItemText`,Lp=t.forwardRef((e,i)=>{let{__scopeSelect:a,className:o,style:s,...c}=e,l=Qf(Ip,a),u=mp(Ip,a),d=Pp(Ip,a),f=ep(Ip,a),[p,m]=t.useState(null),h=L(i,e=>m(e),d.onItemTextChange,e=>u.itemTextRefCallback?.(e,d.value,d.disabled)),g=p?.textContent,_=t.useMemo(()=>(0,r.jsx)(`option`,{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return wn(()=>(v(_),()=>y(_)),[v,y,_]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R.span,{id:d.textId,...c,ref:h}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?n.createPortal(c.children,l.valueNode):null]})});Lp.displayName=Ip;var Rp=`SelectItemIndicator`,zp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e;return Pp(Rp,n).isSelected?(0,r.jsx)(R.span,{"aria-hidden":!0,...i,ref:t}):null});zp.displayName=Rp;var Bp=`SelectScrollUpButton`,Vp=t.forwardRef((e,n)=>{let i=mp(Bp,e.__scopeSelect),a=Cp(Bp,e.__scopeSelect),[o,s]=t.useState(!1),c=L(n,a.onScrollButtonChange);return wn(()=>{if(i.viewport&&i.isPositioned){let e=function(){s(t.scrollTop>0)},t=i.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[i.viewport,i.isPositioned]),o?(0,r.jsx)(Wp,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=i;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Vp.displayName=Bp;var Hp=`SelectScrollDownButton`,Up=t.forwardRef((e,n)=>{let i=mp(Hp,e.__scopeSelect),a=Cp(Hp,e.__scopeSelect),[o,s]=t.useState(!1),c=L(n,a.onScrollButtonChange);return wn(()=>{if(i.viewport&&i.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=i.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[i.viewport,i.isPositioned]),o?(0,r.jsx)(Wp,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=i;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Up.displayName=Hp;var Wp=t.forwardRef((e,n)=>{let{__scopeSelect:i,onAutoScroll:a,...o}=e,s=mp(`SelectScrollButton`,i),c=t.useRef(null),l=Kf(i),u=t.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return t.useEffect(()=>()=>u(),[u]),wn(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,r.jsx)(R.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:z(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(a,50))}),onPointerMove:z(o.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(a,50))}),onPointerLeave:z(o.onPointerLeave,()=>{u()})})}),Gp=`SelectSeparator`,Kp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e;return(0,r.jsx)(R.div,{"aria-hidden":!0,...i,ref:t})});Kp.displayName=Gp;var qp=`SelectArrow`,Jp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=Xf(n),o=Qf(qp,n),s=mp(qp,n);return o.open&&s.position===`popper`?(0,r.jsx)(bc,{...a,...i,ref:t}):null});Jp.displayName=qp;var Yp=`SelectBubbleInput`,Xp=t.forwardRef(({__scopeSelect:e,value:n,...i},a)=>{let o=t.useRef(null),s=L(a,o),c=Aa(n);return t.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==n&&r){let t=new Event(`change`,{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[c,n]),(0,r.jsx)(R.select,{...i,style:{...gn,...i.style},ref:s,defaultValue:n})});Xp.displayName=Yp;function Zp(e){return e===``||e===void 0}function Qp(e){let n=Vn(e),r=t.useRef(``),i=t.useRef(0),a=t.useCallback(e=>{let t=r.current+e;n(t),(function e(t){r.current=t,window.clearTimeout(i.current),t!==``&&(i.current=window.setTimeout(()=>e(``),1e3))})(t)},[n]),o=t.useCallback(()=>{r.current=``,window.clearTimeout(i.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,a,o]}function $p(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=em(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function em(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var tm=tp,nm=rp,rm=ap,im=sp,am=lp,om=dp,sm=Tp,cm=kp,lm=jp,um=Fp,dm=Lp,fm=zp,pm=Kp,mm=[`PageUp`,`PageDown`],hm=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],gm={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},_m=`Slider`,[vm,ym,bm]=Cn(_m),[xm,Sm]=xn(_m,[bm]),[Cm,wm]=xm(_m),Tm=t.forwardRef((e,n)=>{let{name:i,min:a=0,max:o=100,step:s=1,orientation:c=`horizontal`,disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[a],value:f,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,..._}=e,v=t.useRef(new Set),y=t.useRef(0),b=c===`horizontal`?Om:km,[x=[],S]=En({prop:f,defaultProp:d,onChange:e=>{[...v.current][y.current]?.focus(),p(e)}}),C=t.useRef(x);function w(e){D(e,Um(x,e))}function T(e){D(e,y.current)}function E(){let e=C.current[y.current];x[y.current]!==e&&m(x)}function D(e,t,{commit:n}={commit:!1}){let r=Jm(s),i=xd(Ym(Math.round((e-a)/s)*s+a,r),[a,o]);S((e=[])=>{let r=Bm(e,i,t);if(Km(r,u*s)){y.current=r.indexOf(i);let t=String(r)!==String(e);return t&&n&&m(r),t?r:e}else return e})}return(0,r.jsx)(Cm,{scope:e.__scopeSlider,name:i,disabled:l,min:a,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:x,orientation:c,form:g,children:(0,r.jsx)(vm.Provider,{scope:e.__scopeSlider,children:(0,r.jsx)(vm.Slot,{scope:e.__scopeSlider,children:(0,r.jsx)(b,{"aria-disabled":l,"data-disabled":l?``:void 0,..._,ref:n,onPointerDown:z(_.onPointerDown,()=>{l||(C.current=x)}),min:a,max:o,inverted:h,onSlideStart:l?void 0:w,onSlideMove:l?void 0:T,onSlideEnd:l?void 0:E,onHomeKeyDown:()=>!l&&D(a,0,{commit:!0}),onEndKeyDown:()=>!l&&D(o,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){let n=mm.includes(e.key)||e.shiftKey&&hm.includes(e.key)?10:1,r=y.current,i=x[r];D(i+s*n*t,r,{commit:!0})}}})})})})});Tm.displayName=_m;var[Em,Dm]=xm(_m,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Om=t.forwardRef((e,n)=>{let{min:i,max:a,dir:o,inverted:s,onSlideStart:c,onSlideMove:l,onSlideEnd:u,onStepKeyDown:d,...f}=e,[p,m]=t.useState(null),h=L(n,e=>m(e)),g=t.useRef(void 0),_=zn(o),v=_===`ltr`,y=v&&!s||!v&&s;function b(e){let t=g.current||p.getBoundingClientRect(),n=qm([0,t.width],y?[i,a]:[a,i]);return g.current=t,n(e-t.left)}return(0,r.jsx)(Em,{scope:e.__scopeSlider,startEdge:y?`left`:`right`,endEdge:y?`right`:`left`,direction:y?1:-1,size:`width`,children:(0,r.jsx)(Am,{dir:_,"data-orientation":`horizontal`,...f,ref:h,style:{...f.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);c?.(t)},onSlideMove:e=>{let t=b(e.clientX);l?.(t)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:e=>{let t=gm[y?`from-left`:`from-right`].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),km=t.forwardRef((e,n)=>{let{min:i,max:a,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=e,f=t.useRef(null),p=L(n,f),m=t.useRef(void 0),h=!o;function g(e){let t=m.current||f.current.getBoundingClientRect(),n=qm([0,t.height],h?[a,i]:[i,a]);return m.current=t,n(e-t.top)}return(0,r.jsx)(Em,{scope:e.__scopeSlider,startEdge:h?`bottom`:`top`,endEdge:h?`top`:`bottom`,size:`height`,direction:h?1:-1,children:(0,r.jsx)(Am,{"data-orientation":`vertical`,...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=g(e.clientY);s?.(t)},onSlideMove:e=>{let t=g(e.clientY);c?.(t)},onSlideEnd:()=>{m.current=void 0,l?.()},onStepKeyDown:e=>{let t=gm[h?`from-bottom`:`from-top`].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),Am=t.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:i,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:c,onStepKeyDown:l,...u}=e,d=wm(_m,n);return(0,r.jsx)(R.span,{...u,ref:t,onKeyDown:z(e.onKeyDown,e=>{e.key===`Home`?(s(e),e.preventDefault()):e.key===`End`?(c(e),e.preventDefault()):mm.concat(hm).includes(e.key)&&(l(e),e.preventDefault())}),onPointerDown:z(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():i(e)}),onPointerMove:z(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:z(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),jm=`SliderTrack`,Mm=t.forwardRef((e,t)=>{let{__scopeSlider:n,...i}=e,a=wm(jm,n);return(0,r.jsx)(R.span,{"data-disabled":a.disabled?``:void 0,"data-orientation":a.orientation,...i,ref:t})});Mm.displayName=jm;var Nm=`SliderRange`,Pm=t.forwardRef((e,n)=>{let{__scopeSlider:i,...a}=e,o=wm(Nm,i),s=Dm(Nm,i),c=L(n,t.useRef(null)),l=o.values.length,u=o.values.map(e=>Vm(e,o.min,o.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return(0,r.jsx)(R.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,...a,ref:c,style:{...e.style,[s.startEdge]:d+`%`,[s.endEdge]:f+`%`}})});Pm.displayName=Nm;var Fm=`SliderThumb`,Im=t.forwardRef((e,n)=>{let i=ym(e.__scopeSlider),[a,o]=t.useState(null),s=L(n,e=>o(e)),c=t.useMemo(()=>a?i().findIndex(e=>e.ref.current===a):-1,[i,a]);return(0,r.jsx)(Lm,{...e,ref:s,index:c})}),Lm=t.forwardRef((e,n)=>{let{__scopeSlider:i,index:a,name:o,...s}=e,c=wm(Fm,i),l=Dm(Fm,i),[u,d]=t.useState(null),f=L(n,e=>d(e)),p=u?c.form||!!u.closest(`form`):!0,m=ja(u),h=c.values[a],g=h===void 0?0:Vm(h,c.min,c.max),_=Hm(a,c.values.length),v=m?.[l.size],y=v?Wm(v,g,l.direction):0;return t.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),(0,r.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[l.startEdge]:`calc(${g}% + ${y}px)`},children:[(0,r.jsx)(vm.ItemSlot,{scope:e.__scopeSlider,children:(0,r.jsx)(R.span,{role:`slider`,"aria-label":e[`aria-label`]||_,"aria-valuemin":c.min,"aria-valuenow":h,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?``:void 0,tabIndex:c.disabled?void 0:0,...s,ref:f,style:h===void 0?{display:`none`}:e.style,onFocus:z(e.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),p&&(0,r.jsx)(zm,{name:o??(c.name?c.name+(c.values.length>1?`[]`:``):void 0),form:c.form,value:h},a)]})});Im.displayName=Fm;var Rm=`RadioBubbleInput`,zm=t.forwardRef(({__scopeSlider:e,value:n,...i},a)=>{let o=t.useRef(null),s=L(o,a),c=Aa(n);return t.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==n&&r){let t=new Event(`input`,{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[c,n]),(0,r.jsx)(R.input,{style:{display:`none`},...i,ref:s,defaultValue:n})});zm.displayName=Rm;function Bm(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Vm(e,t,n){return xd(100/(n-t)*(e-t),[0,100])}function Hm(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Um(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Wm(e,t,n){let r=e/2;return(r-qm([0,50],[0,r])(t)*n)*n}function Gm(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Km(e,t){if(t>0){let n=Gm(e);return Math.min(...n)>=t}return!0}function qm(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Jm(e){return(String(e).split(`.`)[1]||``).length}function Ym(e,t){let n=10**t;return Math.round(e*n)/n}var Xm=Tm,Zm=Mm,Qm=Pm,$m=Im,eh=`Switch`,[th,nh]=xn(eh),[rh,ih]=th(eh),ah=t.forwardRef((e,n)=>{let{__scopeSwitch:i,name:a,checked:o,defaultChecked:s,required:c,disabled:l,value:u=`on`,onCheckedChange:d,form:f,...p}=e,[m,h]=t.useState(null),g=L(n,e=>h(e)),_=t.useRef(!1),v=m?f||!!m.closest(`form`):!0,[y,b]=En({prop:o,defaultProp:s??!1,onChange:d,caller:eh});return(0,r.jsxs)(rh,{scope:i,checked:y,disabled:l,children:[(0,r.jsx)(R.button,{type:`button`,role:`switch`,"aria-checked":y,"aria-required":c,"data-state":uh(y),"data-disabled":l?``:void 0,disabled:l,value:u,...p,ref:g,onClick:z(e.onClick,e=>{b(e=>!e),v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})}),v&&(0,r.jsx)(lh,{control:m,bubbles:!_.current,name:a,value:u,checked:y,required:c,disabled:l,form:f,style:{transform:`translateX(-100%)`}})]})});ah.displayName=eh;var oh=`SwitchThumb`,sh=t.forwardRef((e,t)=>{let{__scopeSwitch:n,...i}=e,a=ih(oh,n);return(0,r.jsx)(R.span,{"data-state":uh(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})});sh.displayName=oh;var ch=`SwitchBubbleInput`,lh=t.forwardRef(({__scopeSwitch:e,control:n,checked:i,bubbles:a=!0,...o},s)=>{let c=t.useRef(null),l=L(c,s),u=Aa(i),d=ja(n);return t.useEffect(()=>{let e=c.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(u!==i&&n){let t=new Event(`click`,{bubbles:a});n.call(e,i),e.dispatchEvent(t)}},[u,i,a]),(0,r.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:i,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});lh.displayName=ch;function uh(e){return e?`checked`:`unchecked`}var dh=ah,fh=sh,ph=`Tabs`,[mh,hh]=xn(ph,[Oc]),gh=Oc(),[_h,vh]=mh(ph),yh=t.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:c,activationMode:l=`automatic`,...u}=e,d=zn(c),[f,p]=En({prop:i,onChange:a,defaultProp:o??``,caller:ph});return(0,r.jsx)(_h,{scope:n,baseId:In(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:l,children:(0,r.jsx)(R.div,{dir:d,"data-orientation":s,...u,ref:t})})});yh.displayName=ph;var bh=`TabsList`,xh=t.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=vh(bh,n),s=gh(n);return(0,r.jsx)(Bc,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,r.jsx)(R.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});xh.displayName=bh;var Sh=`TabsTrigger`,Ch=t.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=vh(Sh,n),c=gh(n),l=Eh(s.baseId,i),u=Dh(s.baseId,i),d=i===s.value;return(0,r.jsx)(Vc,{asChild:!0,...c,focusable:!a,active:d,children:(0,r.jsx)(R.button,{type:`button`,role:`tab`,"aria-selected":d,"aria-controls":u,"data-state":d?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:z(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:z(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:z(e.onFocus,()=>{let e=s.activationMode!==`manual`;!d&&!a&&e&&s.onValueChange(i)})})})});Ch.displayName=Sh;var wh=`TabsContent`,Th=t.forwardRef((e,n)=>{let{__scopeTabs:i,value:a,forceMount:o,children:s,...c}=e,l=vh(wh,i),u=Eh(l.baseId,a),d=Dh(l.baseId,a),f=a===l.value,p=t.useRef(f);return t.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,r.jsx)(An,{present:o||f,children:({present:t})=>(0,r.jsx)(R.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!t,id:d,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:t&&s})})});Th.displayName=wh;function Eh(e,t){return`${e}-trigger-${t}`}function Dh(e,t){return`${e}-content-${t}`}var Oh=yh,kh=xh,Ah=Ch,jh=Th,Mh=`Toggle`,Nh=t.forwardRef((e,t)=>{let{pressed:n,defaultPressed:i,onPressedChange:a,...o}=e,[s,c]=En({prop:n,onChange:a,defaultProp:i??!1,caller:Mh});return(0,r.jsx)(R.button,{type:`button`,"aria-pressed":s,"data-state":s?`on`:`off`,"data-disabled":e.disabled?``:void 0,...o,ref:t,onClick:z(e.onClick,()=>{e.disabled||c(!s)})})});Nh.displayName=Mh;var Ph=`ToggleGroup`,[Fh,Ih]=xn(Ph,[Oc]),Lh=Oc(),Rh=t.default.forwardRef((e,t)=>{let{type:n,...i}=e;if(n===`single`)return(0,r.jsx)(Vh,{...i,ref:t});if(n===`multiple`)return(0,r.jsx)(Hh,{...i,ref:t});throw Error(`Missing prop \`type\` expected on \`${Ph}\``)});Rh.displayName=Ph;var[zh,Bh]=Fh(Ph),Vh=t.default.forwardRef((e,n)=>{let{value:i,defaultValue:a,onValueChange:o=()=>{},...s}=e,[c,l]=En({prop:i,defaultProp:a??``,onChange:o,caller:Ph});return(0,r.jsx)(zh,{scope:e.__scopeToggleGroup,type:`single`,value:t.default.useMemo(()=>c?[c]:[],[c]),onItemActivate:l,onItemDeactivate:t.default.useCallback(()=>l(``),[l]),children:(0,r.jsx)(Gh,{...s,ref:n})})}),Hh=t.default.forwardRef((e,n)=>{let{value:i,defaultValue:a,onValueChange:o=()=>{},...s}=e,[c,l]=En({prop:i,defaultProp:a??[],onChange:o,caller:Ph}),u=t.default.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=t.default.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return(0,r.jsx)(zh,{scope:e.__scopeToggleGroup,type:`multiple`,value:c,onItemActivate:u,onItemDeactivate:d,children:(0,r.jsx)(Gh,{...s,ref:n})})});Rh.displayName=Ph;var[Uh,Wh]=Fh(Ph),Gh=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:i=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...l}=e,u=Lh(n),d=zn(s),f={role:`group`,dir:d,...l};return(0,r.jsx)(Uh,{scope:n,rovingFocus:a,disabled:i,children:a?(0,r.jsx)(Bc,{asChild:!0,...u,orientation:o,dir:d,loop:c,children:(0,r.jsx)(R.div,{...f,ref:t})}):(0,r.jsx)(R.div,{...f,ref:t})})}),Kh=`ToggleGroupItem`,qh=t.default.forwardRef((e,n)=>{let i=Bh(Kh,e.__scopeToggleGroup),a=Wh(Kh,e.__scopeToggleGroup),o=Lh(e.__scopeToggleGroup),s=i.value.includes(e.value),c=a.disabled||e.disabled,l={...e,pressed:s,disabled:c},u=t.default.useRef(null);return a.rovingFocus?(0,r.jsx)(Vc,{asChild:!0,...o,focusable:!c,active:s,ref:u,children:(0,r.jsx)(Jh,{...l,ref:n})}):(0,r.jsx)(Jh,{...l,ref:n})});qh.displayName=Kh;var Jh=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:i,...a}=e,o=Bh(Kh,n),s={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,r.jsx)(Nh,{...o.type===`single`?s:void 0,...a,ref:t,onPressedChange:e=>{e?o.onItemActivate(i):o.onItemDeactivate(i)}})}),Yh=Rh,Xh=qh,[Zh,Qh]=xn(`Tooltip`,[tc]),$h=tc(),eg=`TooltipProvider`,tg=700,ng=`tooltip.open`,[rg,ig]=Zh(eg),ag=e=>{let{__scopeTooltip:n,delayDuration:i=tg,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,c=t.useRef(!0),l=t.useRef(!1),u=t.useRef(0);return t.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,r.jsx)(rg,{scope:n,isOpenDelayedRef:c,delayDuration:i,onOpen:t.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:t.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:s})};ag.displayName=eg;var og=`Tooltip`,[sg,cg]=Zh(og),lg=e=>{let{__scopeTooltip:n,children:i,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=ig(og,e.__scopeTooltip),d=$h(n),[f,p]=t.useState(null),m=In(),h=t.useRef(0),g=c??u.disableHoverableContent,_=l??u.delayDuration,v=t.useRef(!1),[y,b]=En({prop:a,defaultProp:o??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(ng))):u.onClose(),s?.(e)},caller:og}),x=t.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=t.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return t.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,r.jsx)(_c,{...d,children:(0,r.jsx)(sg,{scope:n,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:t.useCallback(()=>{u.isOpenDelayedRef.current?w():S()},[u.isOpenDelayedRef,w,S]),onTriggerLeave:t.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:i})})};lg.displayName=og;var ug=`TooltipTrigger`,dg=t.forwardRef((e,n)=>{let{__scopeTooltip:i,...a}=e,o=cg(ug,i),s=ig(ug,i),c=$h(i),l=L(n,t.useRef(null),o.onTriggerChange),u=t.useRef(!1),d=t.useRef(!1),f=t.useCallback(()=>u.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,r.jsx)(vc,{asChild:!0,...c,children:(0,r.jsx)(R.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:z(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:z(e.onBlur,o.onClose),onClick:z(e.onClick,o.onClose)})})});dg.displayName=ug;var fg=`TooltipPortal`,[pg,mg]=Zh(fg,{forceMount:void 0}),hg=e=>{let{__scopeTooltip:t,forceMount:n,children:i,container:a}=e,o=cg(fg,t);return(0,r.jsx)(pg,{scope:t,forceMount:n,children:(0,r.jsx)(An,{present:n||o.open,children:(0,r.jsx)(yr,{asChild:!0,container:a,children:i})})})};hg.displayName=fg;var gg=`TooltipContent`,_g=t.forwardRef((e,t)=>{let n=mg(gg,e.__scopeTooltip),{forceMount:i=n.forceMount,side:a=`top`,...o}=e,s=cg(gg,e.__scopeTooltip);return(0,r.jsx)(An,{present:i||s.open,children:s.disableHoverableContent?(0,r.jsx)(Sg,{side:a,...o,ref:t}):(0,r.jsx)(vg,{side:a,...o,ref:t})})}),vg=t.forwardRef((e,n)=>{let i=cg(gg,e.__scopeTooltip),a=ig(gg,e.__scopeTooltip),o=t.useRef(null),s=L(n,o),[c,l]=t.useState(null),{trigger:u,onClose:d}=i,f=o.current,{onPointerInTransitChange:p}=a,m=t.useCallback(()=>{l(null),p(!1)},[p]),h=t.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Eg(r,Tg(r,n.getBoundingClientRect())),a=Dg(t.getBoundingClientRect());l(kg([...i,...a])),p(!0)},[p]);return t.useEffect(()=>()=>m(),[m]),t.useEffect(()=>{if(u&&f){let e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener(`pointerleave`,e),f.addEventListener(`pointerleave`,t),()=>{u.removeEventListener(`pointerleave`,e),f.removeEventListener(`pointerleave`,t)}}},[u,f,h,m]),t.useEffect(()=>{if(c){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),i=!Og(n,c);r?m():i&&(m(),d())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[u,f,c,d,m]),(0,r.jsx)(Sg,{...e,ref:s})}),[yg,bg]=Zh(og,{isInside:!1}),xg=un(`TooltipContent`),Sg=t.forwardRef((e,n)=>{let{__scopeTooltip:i,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=cg(gg,i),d=$h(i),{onClose:f}=u;return t.useEffect(()=>(document.addEventListener(ng,f),()=>document.removeEventListener(ng,f)),[f]),t.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,r.jsx)(Yn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,r.jsxs)(yc,{"data-state":u.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,r.jsx)(xg,{children:a}),(0,r.jsx)(yg,{scope:i,isInside:!0,children:(0,r.jsx)(yn,{id:u.contentId,role:`tooltip`,children:o||a})})]})})});_g.displayName=gg;var Cg=`TooltipArrow`,wg=t.forwardRef((e,t)=>{let{__scopeTooltip:n,...i}=e,a=$h(n);return bg(Cg,n).isInside?null:(0,r.jsx)(bc,{...a,...i,ref:t})});wg.displayName=Cg;function Tg(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Eg(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Dg(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Og(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function kg(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),Ag(t)}function Ag(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var jg=ag,Mg=lg,Ng=dg,Pg=hg,Fg=_g,Ig=wg,B=f(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),Lg={asChild:{type:`boolean`}},Rg={width:{type:`string`,className:`rt-r-w`,customProperties:[`--width`],responsive:!0},minWidth:{type:`string`,className:`rt-r-min-w`,customProperties:[`--min-width`],responsive:!0},maxWidth:{type:`string`,className:`rt-r-max-w`,customProperties:[`--max-width`],responsive:!0}},zg={height:{type:`string`,className:`rt-r-h`,customProperties:[`--height`],responsive:!0},minHeight:{type:`string`,className:`rt-r-min-h`,customProperties:[`--min-height`],responsive:!0},maxHeight:{type:`string`,className:`rt-r-max-h`,customProperties:[`--max-height`],responsive:!0}},Bg=[`1`,`2`,`3`,`4`],Vg={...Lg,align:{type:`enum`,className:`rt-r-align`,values:[`start`,`center`],default:`center`},size:{type:`enum`,className:`rt-r-size`,values:Bg,default:`3`,responsive:!0},width:Rg.width,minWidth:Rg.minWidth,maxWidth:{...Rg.maxWidth,default:`600px`},...zg},Hg=`gray.gold.bronze.brown.yellow.amber.orange.tomato.red.ruby.crimson.pink.plum.purple.violet.iris.indigo.blue.cyan.teal.jade.green.grass.lime.mint.sky`.split(`.`),Ug=[`auto`,`gray`,`mauve`,`slate`,`sage`,`olive`,`sand`],Wg={color:{type:`enum`,values:Hg,default:void 0}},Gg={color:{type:`enum`,values:Hg,default:``}},Kg={highContrast:{type:`boolean`,className:`rt-high-contrast`,default:void 0}},qg={trim:{type:`enum`,className:`rt-r-lt`,values:[`normal`,`start`,`end`,`both`],responsive:!0}},Jg={align:{type:`enum`,className:`rt-r-ta`,values:[`left`,`center`,`right`],responsive:!0}},Yg={wrap:{type:`enum`,className:`rt-r-tw`,values:[`wrap`,`nowrap`,`pretty`,`balance`],responsive:!0}},Xg={truncate:{type:`boolean`,className:`rt-truncate`}},Zg={weight:{type:`enum`,className:`rt-r-weight`,values:[`light`,`regular`,`medium`,`bold`],responsive:!0}},Qg=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],$g=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],e_={as:{type:`enum`,values:Qg,default:`h1`},...Lg,size:{type:`enum`,className:`rt-r-size`,values:$g,default:`6`,responsive:!0},...Zg,...Jg,...qg,...Xg,...Yg,...Wg,...Kg},t_=[`initial`,`xs`,`sm`,`md`,`lg`,`xl`];function n_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r_(e){return typeof e==`object`&&Object.keys(e).some(e=>t_.includes(e))}function i_({className:e,customProperties:t,...n}){return[a_({allowArbitraryValues:!0,className:e,...n}),s_({customProperties:t,...n})]}function a_({allowArbitraryValues:e,value:t,className:n,propValues:r,parseValue:i=e=>e}){let a=[];if(t){if(typeof t==`string`&&r.includes(t))return o_(n,t,i);if(r_(t)){let o=t;for(let t in o){if(!n_(o,t)||!t_.includes(t))continue;let s=o[t];if(s!==void 0){if(r.includes(s)){let e=o_(n,s,i),r=t===`initial`?e:`${t}:${e}`;a.push(r)}else if(e){let e=t===`initial`?n:`${t}:${n}`;a.push(e)}}}return a.join(` `)}if(e)return n}}function o_(e,t,n){let r=e?`-`:``,i=n(t),a=i?.startsWith(`-`);return`${a?`-`:``}${e}${r}${a?i?.substring(1):i}`}function s_({customProperties:e,value:t,propValues:n,parseValue:r=e=>e}){let i={};if(!(!t||typeof t==`string`&&n.includes(t))){if(typeof t==`string`&&(i=Object.fromEntries(e.map(e=>[e,t]))),r_(t)){let r=t;for(let t in r){if(!n_(r,t)||!t_.includes(t))continue;let a=r[t];if(!n.includes(a))for(let n of e)i={[t===`initial`?n:`${n}-${t}`]:a,...i}}}for(let e in i){let t=i[e];t!==void 0&&(i[e]=r(t))}return i}}function c_(...e){let t={};for(let n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}var l_=h(B());function u_(...e){return Object.assign({},...e)}function V(e,...t){let n,r,i={...e},a=u_(...t);for(let e in a){let t=i[e],o=a[e];if(o.default!==void 0&&t===void 0&&(t=o.default),o.type===`enum`&&![o.default,...o.values].includes(t)&&!r_(t)&&(t=o.default),i[e]=t,`className`in o&&o.className){delete i[e];let a=`responsive`in o;if(!t||r_(t)&&!a)continue;if(r_(t)&&(o.default!==void 0&&t.initial===void 0&&(t.initial=o.default),o.type===`enum`&&([o.default,...o.values].includes(t.initial)||(t.initial=o.default))),o.type===`enum`){let e=a_({allowArbitraryValues:!1,value:t,className:o.className,propValues:o.values,parseValue:o.parseValue});n=(0,l_.default)(n,e);continue}if(o.type===`string`||o.type===`enum | string`){let e=o.type===`string`?[]:o.values,[i,a]=i_({className:o.className,customProperties:o.customProperties,propValues:e,parseValue:o.parseValue,value:t});r=c_(r,a),n=(0,l_.default)(n,i);continue}if(o.type===`boolean`&&t){n=(0,l_.default)(n,o.className);continue}}}return i.className=(0,l_.default)(n,e.className),i.style=c_(r,e.style),i}var d_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`-1`,`-2`,`-3`,`-4`,`-5`,`-6`,`-7`,`-8`,`-9`],f_={m:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-m`,customProperties:[`--m`]},mx:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-mx`,customProperties:[`--ml`,`--mr`]},my:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-my`,customProperties:[`--mt`,`--mb`]},mt:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-mt`,customProperties:[`--mt`]},mr:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-mr`,customProperties:[`--mr`]},mb:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-mb`,customProperties:[`--mb`]},ml:{type:`enum | string`,values:d_,responsive:!0,className:`rt-r-ml`,customProperties:[`--ml`]}},p_=h(B()),m_=t.forwardRef((e,n)=>{let{children:r,className:i,asChild:a,as:o=`h1`,color:s,...c}=V(e,e_,f_);return t.createElement(sn,{"data-accent-color":s,...c,ref:n,className:(0,p_.default)(`rt-Heading`,i)},a?r:t.createElement(o,null,r))});m_.displayName=`Heading`;var h_=[`span`,`div`,`label`,`p`],g_=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],__={as:{type:`enum`,values:h_,default:`span`},...Lg,size:{type:`enum`,className:`rt-r-size`,values:g_,responsive:!0},...Zg,...Jg,...qg,...Xg,...Yg,...Wg,...Kg},v_=h(B()),H=t.forwardRef((e,n)=>{let{children:r,className:i,asChild:a,as:o=`span`,color:s,...c}=V(e,__,f_);return t.createElement(sn,{"data-accent-color":s,...c,ref:n,className:(0,v_.default)(`rt-Text`,i)},a?r:t.createElement(o,null,r))});H.displayName=`Text`;function y_(e){switch(e){case`tomato`:case`red`:case`ruby`:case`crimson`:case`pink`:case`plum`:case`purple`:case`violet`:return`mauve`;case`iris`:case`indigo`:case`blue`:case`sky`:case`cyan`:return`slate`;case`teal`:case`jade`:case`mint`:case`green`:return`sage`;case`grass`:case`lime`:return`olive`;case`yellow`:case`amber`:case`orange`:case`brown`:case`gold`:case`bronze`:return`sand`;case`gray`:return`gray`}}var b_=[`none`,`small`,`medium`,`large`,`full`],x_={radius:{type:`enum`,values:b_,default:void 0}},S_=[`inherit`,`light`,`dark`],C_=[`solid`,`translucent`],w_=[`90%`,`95%`,`100%`,`105%`,`110%`],T_={...Lg,hasBackground:{type:`boolean`,default:!0},appearance:{type:`enum`,values:S_,default:`inherit`},accentColor:{type:`enum`,values:Hg,default:`indigo`},grayColor:{type:`enum`,values:Ug,default:`auto`},panelBackground:{type:`enum`,values:C_,default:`translucent`},radius:{type:`enum`,values:b_,default:`medium`},scaling:{type:`enum`,values:w_,default:`100%`}},E_=h(B()),D_=()=>{},O_=t.createContext(void 0);function k_(){let e=t.useContext(O_);if(e===void 0)throw Error("`useThemeContext` must be used within a `Theme`");return e}var A_=t.forwardRef((e,n)=>t.useContext(O_)===void 0?t.createElement(jg,{delayDuration:200},t.createElement(Bn,{dir:`ltr`},t.createElement(j_,{...e,ref:n}))):t.createElement(M_,{...e,ref:n}));A_.displayName=`Theme`;var j_=t.forwardRef((e,n)=>{let{appearance:r=T_.appearance.default,accentColor:i=T_.accentColor.default,grayColor:a=T_.grayColor.default,panelBackground:o=T_.panelBackground.default,radius:s=T_.radius.default,scaling:c=T_.scaling.default,hasBackground:l=T_.hasBackground.default,...u}=e,[d,f]=t.useState(r);t.useEffect(()=>f(r),[r]);let[p,m]=t.useState(i);t.useEffect(()=>m(i),[i]);let[h,g]=t.useState(a);t.useEffect(()=>g(a),[a]);let[_,v]=t.useState(o);t.useEffect(()=>v(o),[o]);let[y,b]=t.useState(s);t.useEffect(()=>b(s),[s]);let[x,S]=t.useState(c);return t.useEffect(()=>S(c),[c]),t.createElement(M_,{...u,ref:n,isRoot:!0,hasBackground:l,appearance:d,accentColor:p,grayColor:h,panelBackground:_,radius:y,scaling:x,onAppearanceChange:f,onAccentColorChange:m,onGrayColorChange:g,onPanelBackgroundChange:v,onRadiusChange:b,onScalingChange:S})});j_.displayName=`ThemeRoot`;var M_=t.forwardRef((e,n)=>{let r=t.useContext(O_),{asChild:i,isRoot:a,hasBackground:o,appearance:s=r?.appearance??T_.appearance.default,accentColor:c=r?.accentColor??T_.accentColor.default,grayColor:l=r?.resolvedGrayColor??T_.grayColor.default,panelBackground:u=r?.panelBackground??T_.panelBackground.default,radius:d=r?.radius??T_.radius.default,scaling:f=r?.scaling??T_.scaling.default,onAppearanceChange:p=D_,onAccentColorChange:m=D_,onGrayColorChange:h=D_,onPanelBackgroundChange:g=D_,onRadiusChange:_=D_,onScalingChange:v=D_,...y}=e,b=i?sn:`div`,x=l===`auto`?y_(c):l,S=e.appearance===`light`||e.appearance===`dark`,C=o===void 0?a||S:o;return t.createElement(O_.Provider,{value:t.useMemo(()=>({appearance:s,accentColor:c,grayColor:l,resolvedGrayColor:x,panelBackground:u,radius:d,scaling:f,onAppearanceChange:p,onAccentColorChange:m,onGrayColorChange:h,onPanelBackgroundChange:g,onRadiusChange:_,onScalingChange:v}),[s,c,l,x,u,d,f,p,m,h,g,_,v])},t.createElement(b,{"data-is-root-theme":a?`true`:`false`,"data-accent-color":c,"data-gray-color":x,"data-has-background":C?`true`:`false`,"data-panel-background":u,"data-radius":d,"data-scaling":f,ref:n,...y,className:(0,E_.default)(`radix-themes`,{light:s===`light`,dark:s===`dark`},y.className)}))});M_.displayName=`ThemeImpl`;var N_=e=>{if(!t.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${t.Children.toArray(e).map(e=>typeof e==`object`&&`type`in e&&typeof e.type==`string`?e.type:typeof e).join(`, `)}`);return e};function P_(e,n){let{asChild:r,children:i}=e;if(!r)return typeof n==`function`?n(i):n;let a=t.Children.only(i);return t.cloneElement(a,{children:typeof n==`function`?n(a.props.children):n})}var F_=[`1`,`2`,`3`],I_=[`solid`,`soft`,`surface`,`outline`],L_={...Lg,size:{type:`enum`,className:`rt-r-size`,values:F_,default:`1`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:I_,default:`soft`},...Gg,...Kg,...x_},R_=h(B()),z_=t.forwardRef((e,n)=>{let{asChild:r,className:i,color:a,radius:o,...s}=V(e,L_,f_),c=r?sn:`span`;return t.createElement(c,{"data-accent-color":a,"data-radius":o,...s,ref:n,className:(0,R_.default)(`rt-reset`,`rt-Badge`,i)})});z_.displayName=`Badge`;var B_=sn,V_=[`div`,`span`],H_=[`none`,`inline`,`inline-block`,`block`,`contents`],U_={as:{type:`enum`,values:V_,default:`div`},...Lg,display:{type:`enum`,className:`rt-r-display`,values:H_,responsive:!0}},W_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],G_={p:{type:`enum | string`,className:`rt-r-p`,customProperties:[`--p`],values:W_,responsive:!0},px:{type:`enum | string`,className:`rt-r-px`,customProperties:[`--pl`,`--pr`],values:W_,responsive:!0},py:{type:`enum | string`,className:`rt-r-py`,customProperties:[`--pt`,`--pb`],values:W_,responsive:!0},pt:{type:`enum | string`,className:`rt-r-pt`,customProperties:[`--pt`],values:W_,responsive:!0},pr:{type:`enum | string`,className:`rt-r-pr`,customProperties:[`--pr`],values:W_,responsive:!0},pb:{type:`enum | string`,className:`rt-r-pb`,customProperties:[`--pb`],values:W_,responsive:!0},pl:{type:`enum | string`,className:`rt-r-pl`,customProperties:[`--pl`],values:W_,responsive:!0}},K_=[`visible`,`hidden`,`clip`,`scroll`,`auto`],q_=[`static`,`relative`,`absolute`,`fixed`,`sticky`],J_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`-1`,`-2`,`-3`,`-4`,`-5`,`-6`,`-7`,`-8`,`-9`],Y_=[`0`,`1`],X_=[`0`,`1`],Z_={...G_,...Rg,...zg,position:{type:`enum`,className:`rt-r-position`,values:q_,responsive:!0},inset:{type:`enum | string`,className:`rt-r-inset`,customProperties:[`--inset`],values:J_,responsive:!0},top:{type:`enum | string`,className:`rt-r-top`,customProperties:[`--top`],values:J_,responsive:!0},right:{type:`enum | string`,className:`rt-r-right`,customProperties:[`--right`],values:J_,responsive:!0},bottom:{type:`enum | string`,className:`rt-r-bottom`,customProperties:[`--bottom`],values:J_,responsive:!0},left:{type:`enum | string`,className:`rt-r-left`,customProperties:[`--left`],values:J_,responsive:!0},overflow:{type:`enum`,className:`rt-r-overflow`,values:K_,responsive:!0},overflowX:{type:`enum`,className:`rt-r-ox`,values:K_,responsive:!0},overflowY:{type:`enum`,className:`rt-r-oy`,values:K_,responsive:!0},flexBasis:{type:`string`,className:`rt-r-fb`,customProperties:[`--flex-basis`],responsive:!0},flexShrink:{type:`enum | string`,className:`rt-r-fs`,customProperties:[`--flex-shrink`],values:Y_,responsive:!0},flexGrow:{type:`enum | string`,className:`rt-r-fg`,customProperties:[`--flex-grow`],values:X_,responsive:!0},gridArea:{type:`string`,className:`rt-r-ga`,customProperties:[`--grid-area`],responsive:!0},gridColumn:{type:`string`,className:`rt-r-gc`,customProperties:[`--grid-column`],responsive:!0},gridColumnStart:{type:`string`,className:`rt-r-gcs`,customProperties:[`--grid-column-start`],responsive:!0},gridColumnEnd:{type:`string`,className:`rt-r-gce`,customProperties:[`--grid-column-end`],responsive:!0},gridRow:{type:`string`,className:`rt-r-gr`,customProperties:[`--grid-row`],responsive:!0},gridRowStart:{type:`string`,className:`rt-r-grs`,customProperties:[`--grid-row-start`],responsive:!0},gridRowEnd:{type:`string`,className:`rt-r-gre`,customProperties:[`--grid-row-end`],responsive:!0}},Q_=h(B()),U=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=V(e,U_,Z_,f_);return t.createElement(i?B_:a,{...o,ref:n,className:(0,Q_.default)(`rt-Box`,r)})});U.displayName=`Box`;var $_=[`1`,`2`,`3`,`4`],ev=[`classic`,`solid`,`soft`,`surface`,`outline`,`ghost`],tv={...Lg,size:{type:`enum`,className:`rt-r-size`,values:$_,default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:ev,default:`solid`},...Gg,...Kg,...x_,loading:{type:`boolean`,className:`rt-loading`,default:!1}},nv=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],rv={gap:{type:`enum | string`,className:`rt-r-gap`,customProperties:[`--gap`],values:nv,responsive:!0},gapX:{type:`enum | string`,className:`rt-r-cg`,customProperties:[`--column-gap`],values:nv,responsive:!0},gapY:{type:`enum | string`,className:`rt-r-rg`,customProperties:[`--row-gap`],values:nv,responsive:!0}},iv=[`div`,`span`],av=[`none`,`inline-flex`,`flex`],ov=[`row`,`column`,`row-reverse`,`column-reverse`],sv=[`start`,`center`,`end`,`baseline`,`stretch`],cv=[`start`,`center`,`end`,`between`],lv=[`nowrap`,`wrap`,`wrap-reverse`],uv={as:{type:`enum`,values:iv,default:`div`},...Lg,display:{type:`enum`,className:`rt-r-display`,values:av,responsive:!0},direction:{type:`enum`,className:`rt-r-fd`,values:ov,responsive:!0},align:{type:`enum`,className:`rt-r-ai`,values:sv,responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:cv,parseValue:dv,responsive:!0},wrap:{type:`enum`,className:`rt-r-fw`,values:lv,responsive:!0},...rv};function dv(e){return e===`between`?`space-between`:e}var fv=h(B()),W=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=V(e,uv,Z_,f_);return t.createElement(i?B_:a,{...o,ref:n,className:(0,fv.default)(`rt-Flex`,r)})});W.displayName=`Flex`;var pv={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},loading:{type:`boolean`,default:!0}},mv=h(B()),hv=t.forwardRef((e,n)=>{let{className:r,children:i,loading:a,...o}=V(e,pv,f_);if(!a)return i;let s=t.createElement(`span`,{...o,ref:n,className:(0,mv.default)(`rt-Spinner`,r)},t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}));return i===void 0?s:t.createElement(W,{asChild:!0,position:`relative`,align:`center`,justify:`center`},t.createElement(`span`,null,t.createElement(`span`,{"aria-hidden":!0,style:{display:`contents`,visibility:`hidden`},inert:void 0},i),t.createElement(W,{asChild:!0,align:`center`,justify:`center`,position:`absolute`,inset:`0`},t.createElement(`span`,null,s))))});hv.displayName=`Spinner`;var gv=yn;function _v(e,t){if(e!==void 0)return typeof e==`string`?t(e):Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]))}function vv(e){switch(e){case`1`:return`1`;case`2`:case`3`:return`2`;case`4`:return`3`}}var yv=h(B()),bv=t.forwardRef((e,n)=>{let{size:r=tv.size.default}=e,{className:i,children:a,asChild:o,color:s,radius:c,disabled:l=e.loading,...u}=V(e,tv,f_),d=o?sn:`button`;return t.createElement(d,{"data-disabled":l||void 0,"data-accent-color":s,"data-radius":c,...u,ref:n,className:(0,yv.default)(`rt-reset`,`rt-BaseButton`,i),disabled:l},e.loading?t.createElement(t.Fragment,null,t.createElement(`span`,{style:{display:`contents`,visibility:`hidden`},"aria-hidden":!0},a),t.createElement(gv,null,a),t.createElement(W,{asChild:!0,align:`center`,justify:`center`,position:`absolute`,inset:`0`},t.createElement(`span`,null,t.createElement(hv,{size:_v(r,vv)})))):a)});bv.displayName=`BaseButton`;var xv=h(B()),G=t.forwardRef(({className:e,...n},r)=>t.createElement(bv,{...n,ref:r,className:(0,xv.default)(`rt-Button`,e)}));G.displayName=`Button`;var Sv=[`1`,`2`,`3`,`4`,`5`],Cv=[`surface`,`classic`,`ghost`],wv={...Lg,size:{type:`enum`,className:`rt-r-size`,values:Sv,default:`1`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:Cv,default:`surface`}},Tv=h(B()),Ev=t.forwardRef((e,n)=>{let{asChild:r,className:i,...a}=V(e,wv,f_),o=r?sn:`div`;return t.createElement(o,{ref:n,...a,className:(0,Tv.default)(`rt-reset`,`rt-BaseCard`,`rt-Card`,i)})});Ev.displayName=`Card`;var Dv=[`div`,`span`],Ov=[`none`,`inline-grid`,`grid`],kv=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],Av=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],jv=[`row`,`column`,`dense`,`row-dense`,`column-dense`],Mv=[`start`,`center`,`end`,`baseline`,`stretch`],Nv=[`start`,`center`,`end`,`between`],Pv={as:{type:`enum`,values:Dv,default:`div`},...Lg,display:{type:`enum`,className:`rt-r-display`,values:Ov,responsive:!0},areas:{type:`string`,className:`rt-r-gta`,customProperties:[`--grid-template-areas`],responsive:!0},columns:{type:`enum | string`,className:`rt-r-gtc`,customProperties:[`--grid-template-columns`],values:kv,parseValue:Fv,responsive:!0},rows:{type:`enum | string`,className:`rt-r-gtr`,customProperties:[`--grid-template-rows`],values:Av,parseValue:Fv,responsive:!0},flow:{type:`enum`,className:`rt-r-gaf`,values:jv,responsive:!0},align:{type:`enum`,className:`rt-r-ai`,values:Mv,responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:Nv,parseValue:Iv,responsive:!0},...rv};function Fv(e){return Pv.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function Iv(e){return e===`between`?`space-between`:e}var Lv=h(B()),K=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=V(e,Pv,Z_,f_);return t.createElement(i?B_:a,{...o,ref:n,className:(0,Lv.default)(`rt-Grid`,r)})});K.displayName=`Grid`;var Rv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z`})));Rv.displayName=`ThickDividerHorizontalIcon`;var zv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z`})));zv.displayName=`ThickCheckIcon`;var Bv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{d:`M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z`})));Bv.displayName=`ChevronDownIcon`;var Vv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z`})));Vv.displayName=`ThickChevronRightIcon`;var Hv=[`1`,`2`,`3`],Uv=[`vertical`,`horizontal`,`both`],Wv={...Lg,size:{type:`enum`,className:`rt-r-size`,values:Hv,default:`1`,responsive:!0},...x_,scrollbars:{type:`enum`,values:Uv,default:`both`}};function Gv(e){let{m:t,mx:n,my:r,mt:i,mr:a,mb:o,ml:s,...c}=e;return{m:t,mx:n,my:r,mt:i,mr:a,mb:o,ml:s,rest:c}}var Kv=h(B()),qv=f_.m.values;function Jv(e){let[t,n]=i_({className:`rt-r-m`,customProperties:[`--margin`],propValues:qv,value:e.m}),[r,i]=i_({className:`rt-r-mx`,customProperties:[`--margin-left`,`--margin-right`],propValues:qv,value:e.mx}),[a,o]=i_({className:`rt-r-my`,customProperties:[`--margin-top`,`--margin-bottom`],propValues:qv,value:e.my}),[s,c]=i_({className:`rt-r-mt`,customProperties:[`--margin-top`],propValues:qv,value:e.mt}),[l,u]=i_({className:`rt-r-mr`,customProperties:[`--margin-right`],propValues:qv,value:e.mr}),[d,f]=i_({className:`rt-r-mb`,customProperties:[`--margin-bottom`],propValues:qv,value:e.mb}),[p,m]=i_({className:`rt-r-ml`,customProperties:[`--margin-left`],propValues:qv,value:e.ml});return[(0,Kv.default)(t,r,a,s,l,d,p),c_(n,i,o,c,u,f,m)]}var Yv=h(B()),Xv=t.forwardRef((e,n)=>{let{rest:r,...i}=Gv(e),[a,o]=Jv(i),{asChild:s,children:c,className:l,style:u,type:d,scrollHideDelay:f=d===`scroll`?void 0:0,dir:p,size:m=Wv.size.default,radius:h=Wv.radius.default,scrollbars:g=Wv.scrollbars.default,..._}=r;return t.createElement(Lf,{type:d,scrollHideDelay:f,className:(0,Yv.default)(`rt-ScrollAreaRoot`,a,l),style:c_(o,u),asChild:s},P_({asChild:s,children:c},e=>t.createElement(t.Fragment,null,t.createElement(Rf,{..._,ref:n,className:`rt-ScrollAreaViewport`},e),t.createElement(`div`,{className:`rt-ScrollAreaViewportFocusRing`}),g===`vertical`?null:t.createElement(zf,{"data-radius":h,orientation:`horizontal`,className:(0,Yv.default)(`rt-ScrollAreaScrollbar`,a_({className:`rt-r-size`,value:m,propValues:Wv.size.values}))},t.createElement(Bf,{className:`rt-ScrollAreaThumb`})),g===`horizontal`?null:t.createElement(zf,{"data-radius":h,orientation:`vertical`,className:(0,Yv.default)(`rt-ScrollAreaScrollbar`,a_({className:`rt-r-size`,value:m,propValues:Wv.size.values}))},t.createElement(Bf,{className:`rt-ScrollAreaThumb`})),g===`both`?t.createElement(Vf,{className:`rt-ScrollAreaCorner`}):null)))});Xv.displayName=`ScrollArea`;var Zv={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`solid`,`soft`],default:`solid`},...Wg,...Kg},Qv={...Lg,...Wg,shortcut:{type:`string`}},$v={...Wg,shortcut:{type:`string`}},ey={...Wg},ty=h(B()),ny=e=>t.createElement(Sa,{...e,modal:!0});ny.displayName=`Dialog.Root`;var ry=t.forwardRef(({children:e,...n},r)=>t.createElement(Ca,{...n,ref:r,asChild:!0},N_(e)));ry.displayName=`Dialog.Trigger`;var iy=t.forwardRef(({align:e,...n},r)=>{let{align:i,...a}=Vg,{className:o}=V({align:e},{align:i}),{className:s,forceMount:c,container:l,...u}=V(n,a);return t.createElement(wa,{container:l,forceMount:c},t.createElement(A_,{asChild:!0},t.createElement(Ta,{className:`rt-BaseDialogOverlay rt-DialogOverlay`},t.createElement(`div`,{className:`rt-BaseDialogScroll rt-DialogScroll`},t.createElement(`div`,{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${o}`},t.createElement(Ea,{...u,ref:r,className:(0,ty.default)(`rt-BaseDialogContent`,`rt-DialogContent`,s)}))))))});iy.displayName=`Dialog.Content`;var ay=t.forwardRef((e,n)=>t.createElement(Da,{asChild:!0},t.createElement(m_,{size:`5`,mb:`3`,trim:`start`,...e,asChild:!1,ref:n})));ay.displayName=`Dialog.Title`;var oy=t.forwardRef((e,n)=>t.createElement(Oa,{asChild:!0},t.createElement(H,{as:`p`,size:`3`,...e,asChild:!1,ref:n})));oy.displayName=`Dialog.Description`;var sy=t.forwardRef(({children:e,...n},r)=>t.createElement(ka,{...n,ref:r,asChild:!0},N_(e)));sy.displayName=`Dialog.Close`;var cy=h(B()),ly=e=>t.createElement(od,{...e});ly.displayName=`DropdownMenu.Root`;var uy=t.forwardRef(({children:e,...n},r)=>t.createElement(sd,{...n,ref:r,asChild:!0},N_(e)));uy.displayName=`DropdownMenu.Trigger`;var dy=t.createContext({}),fy=t.forwardRef((e,n)=>{let r=k_(),{size:i=Zv.size.default,variant:a=Zv.variant.default,highContrast:o=Zv.highContrast.default}=e,{className:s,children:c,color:l,container:u,forceMount:d,...f}=V(e,Zv),p=l||r.accentColor;return t.createElement(cd,{container:u,forceMount:d},t.createElement(A_,{asChild:!0},t.createElement(ld,{"data-accent-color":p,align:`start`,sideOffset:4,collisionPadding:10,...f,asChild:!1,ref:n,className:(0,cy.default)(`rt-PopperContent`,`rt-BaseMenuContent`,`rt-DropdownMenuContent`,s)},t.createElement(Xv,{type:`auto`},t.createElement(`div`,{className:(0,cy.default)(`rt-BaseMenuViewport`,`rt-DropdownMenuViewport`)},t.createElement(dy.Provider,{value:t.useMemo(()=>({size:i,variant:a,color:p,highContrast:o}),[i,a,p,o])},c))))))});fy.displayName=`DropdownMenu.Content`;var py=t.forwardRef(({className:e,...n},r)=>t.createElement(dd,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuLabel`,`rt-DropdownMenuLabel`,e)}));py.displayName=`DropdownMenu.Label`;var q=t.forwardRef((e,n)=>{let{className:r,children:i,color:a=Qv.color.default,shortcut:o,...s}=e;return t.createElement(fd,{"data-accent-color":a,...s,ref:n,className:(0,cy.default)(`rt-reset`,`rt-BaseMenuItem`,`rt-DropdownMenuItem`,r)},t.createElement(dn,null,i),o&&t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},o))});q.displayName=`DropdownMenu.Item`;var my=t.forwardRef(({className:e,...n},r)=>t.createElement(ud,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuGroup`,`rt-DropdownMenuGroup`,e)}));my.displayName=`DropdownMenu.Group`;var hy=t.forwardRef(({className:e,...n},r)=>t.createElement(md,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuRadioGroup`,`rt-DropdownMenuRadioGroup`,e)}));hy.displayName=`DropdownMenu.RadioGroup`;var gy=t.forwardRef((e,n)=>{let{children:r,className:i,color:a=ey.color.default,...o}=e;return t.createElement(hd,{...o,asChild:!1,ref:n,"data-accent-color":a,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuRadioItem`,`rt-DropdownMenuItem`,`rt-DropdownMenuRadioItem`,i)},r,t.createElement(gd,{className:`rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator`},t.createElement(zv,{className:`rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon`})))});gy.displayName=`DropdownMenu.RadioItem`;var _y=t.forwardRef((e,n)=>{let{children:r,className:i,shortcut:a,color:o=$v.color.default,...s}=e;return t.createElement(pd,{...s,asChild:!1,ref:n,"data-accent-color":o,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuCheckboxItem`,`rt-DropdownMenuItem`,`rt-DropdownMenuCheckboxItem`,i)},r,t.createElement(gd,{className:`rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator`},t.createElement(zv,{className:`rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon`})),a&&t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},a))});_y.displayName=`DropdownMenu.CheckboxItem`;var vy=e=>t.createElement(vd,{...e});vy.displayName=`DropdownMenu.Sub`;var yy=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(yd,{...a,asChild:!1,ref:n,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuSubTrigger`,`rt-DropdownMenuItem`,`rt-DropdownMenuSubTrigger`,r)},i,t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},t.createElement(Vv,{className:`rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon`})))});yy.displayName=`DropdownMenu.SubTrigger`;var by=t.forwardRef((e,n)=>{let{size:r,variant:i,color:a,highContrast:o}=t.useContext(dy),{className:s,children:c,container:l,forceMount:u,...d}=V({size:r,variant:i,color:a,highContrast:o,...e},Zv);return t.createElement(cd,{container:l,forceMount:u},t.createElement(A_,{asChild:!0},t.createElement(bd,{"data-accent-color":a,alignOffset:-Number(r)*4,sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:(0,cy.default)(`rt-PopperContent`,`rt-BaseMenuContent`,`rt-BaseMenuSubContent`,`rt-DropdownMenuContent`,`rt-DropdownMenuSubContent`,s)},t.createElement(Xv,{type:`auto`},t.createElement(`div`,{className:(0,cy.default)(`rt-BaseMenuViewport`,`rt-DropdownMenuViewport`)},c)))))});by.displayName=`DropdownMenu.SubContent`;var xy=t.forwardRef(({className:e,...n},r)=>t.createElement(_d,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuSeparator`,`rt-DropdownMenuSeparator`,e)}));xy.displayName=`DropdownMenu.Separator`;var Sy=h(B()),J=t.forwardRef(({className:e,...n},r)=>t.createElement(bv,{...n,ref:r,className:(0,Sy.default)(`rt-IconButton`,e)}));J.displayName=`IconButton`;var Cy=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],wy={...Lg,size:{type:`enum`,className:`rt-r-size`,values:Cy,responsive:!0}},Ty=h(B()),Ey=t.forwardRef((e,n)=>{let{asChild:r,className:i,...a}=V(e,wy,f_),o=r?sn:`kbd`;return t.createElement(o,{...a,ref:n,className:(0,Ty.default)(`rt-reset`,`rt-Kbd`,i)})});Ey.displayName=`Kbd`;var Dy=[`1`,`2`,`3`,`4`],Oy={...Lg,size:{type:`enum`,className:`rt-r-size`,values:Dy,default:`2`,responsive:!0},width:Rg.width,minWidth:Rg.minWidth,maxWidth:{...Rg.maxWidth,default:`480px`},...zg},ky=h(B()),Ay=e=>t.createElement(Jd,{...e});Ay.displayName=`Popover.Root`;var jy=t.forwardRef(({children:e,...n},r)=>t.createElement(Xd,{...n,ref:r,asChild:!0},N_(e)));jy.displayName=`Popover.Trigger`;var My=t.forwardRef((e,n)=>{let{className:r,forceMount:i,container:a,...o}=V(e,Oy);return t.createElement(Zd,{container:a,forceMount:i},t.createElement(A_,{asChild:!0},t.createElement(Qd,{align:`start`,sideOffset:8,collisionPadding:10,...o,ref:n,className:(0,ky.default)(`rt-PopperContent`,`rt-PopoverContent`,r)})))});My.displayName=`Popover.Content`;var Ny=t.forwardRef(({children:e,...n},r)=>t.createElement($d,{...n,ref:r,asChild:!0},N_(e)));Ny.displayName=`Popover.Close`;var Py=t.forwardRef(({children:e,...n},r)=>t.createElement(Yd,{...n,ref:r}));Py.displayName=`Popover.Anchor`;var Fy={disabled:{type:`boolean`,className:`disabled`,default:!1},size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`surface`,`classic`],default:`surface`},...x_},Iy=h(B()),Ly=t.forwardRef((e,n)=>{let{className:r,children:i,radius:a,value:o,defaultValue:s,onValueChange:c,...l}=V(e,Fy,f_),[u,d]=En({prop:o,onChange:c,defaultProp:s});return t.createElement(Yh,{"data-disabled":e.disabled||void 0,"data-radius":a,ref:n,className:(0,Iy.default)(`rt-SegmentedControlRoot`,r),onValueChange:e=>{e&&d(e)},...l,type:`single`,value:u,asChild:!1,disabled:!!e.disabled},i,t.createElement(`div`,{className:`rt-SegmentedControlIndicator`}))});Ly.displayName=`SegmentedControl.Root`;var Ry=t.forwardRef(({children:e,className:n,...r},i)=>t.createElement(Xh,{ref:i,className:(0,Iy.default)(`rt-reset`,`rt-SegmentedControlItem`,n),...r,disabled:!1,asChild:!1},t.createElement(`span`,{className:`rt-SegmentedControlItemSeparator`}),t.createElement(`span`,{className:`rt-SegmentedControlItemLabel`},t.createElement(`span`,{className:`rt-SegmentedControlItemLabelActive`},e),t.createElement(`span`,{className:`rt-SegmentedControlItemLabelInactive`,"aria-hidden":!0},e))));Ry.displayName=`SegmentedControl.Item`;var zy={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0}},By={variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`,`ghost`],default:`surface`},...Wg,...x_,placeholder:{type:`string`}},Vy={variant:{type:`enum`,className:`rt-variant`,values:[`solid`,`soft`],default:`solid`},...Wg,...Kg},Hy=h(B()),Uy=t.createContext({}),Wy=e=>{let{children:n,size:r=zy.size.default,...i}=e;return t.createElement(tm,{...i},t.createElement(Uy.Provider,{value:t.useMemo(()=>({size:r}),[r])},n))};Wy.displayName=`Select.Root`;var Gy=t.forwardRef((e,n)=>{let{children:r,className:i,color:a,radius:o,placeholder:s,...c}=V({size:t.useContext(Uy)?.size,...e},{size:zy.size},By,f_);return t.createElement(nm,{asChild:!0},t.createElement(`button`,{"data-accent-color":a,"data-radius":o,...c,ref:n,className:(0,Hy.default)(`rt-reset`,`rt-SelectTrigger`,i)},t.createElement(`span`,{className:`rt-SelectTriggerInner`},t.createElement(rm,{placeholder:s},r)),t.createElement(im,{asChild:!0},t.createElement(Bv,{className:`rt-SelectIcon`}))))});Gy.displayName=`Select.Trigger`;var Ky=t.forwardRef((e,n)=>{let{className:r,children:i,color:a,container:o,...s}=V({size:t.useContext(Uy)?.size,...e},{size:zy.size},Vy),c=k_(),l=a||c.accentColor;return t.createElement(am,{container:o},t.createElement(A_,{asChild:!0},t.createElement(om,{"data-accent-color":l,sideOffset:4,...s,asChild:!1,ref:n,className:(0,Hy.default)({"rt-PopperContent":s.position===`popper`},`rt-SelectContent`,r)},t.createElement(Lf,{type:`auto`,className:`rt-ScrollAreaRoot`},t.createElement(sm,{asChild:!0,className:`rt-SelectViewport`},t.createElement(Rf,{className:`rt-ScrollAreaViewport`,style:{overflowY:void 0}},i)),t.createElement(zf,{className:`rt-ScrollAreaScrollbar rt-r-size-1`,orientation:`vertical`},t.createElement(Bf,{className:`rt-ScrollAreaThumb`}))))))});Ky.displayName=`Select.Content`;var Y=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(um,{...a,asChild:!1,ref:n,className:(0,Hy.default)(`rt-SelectItem`,r)},t.createElement(fm,{className:`rt-SelectItemIndicator`},t.createElement(zv,{className:`rt-SelectItemIndicatorIcon`})),t.createElement(dm,null,i))});Y.displayName=`Select.Item`;var qy=t.forwardRef(({className:e,...n},r)=>t.createElement(cm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectGroup`,e)}));qy.displayName=`Select.Group`;var Jy=t.forwardRef(({className:e,...n},r)=>t.createElement(lm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectLabel`,e)}));Jy.displayName=`Select.Label`;var Yy=t.forwardRef(({className:e,...n},r)=>t.createElement(pm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectSeparator`,e)}));Yy.displayName=`Select.Separator`;var Xy={orientation:{type:`enum`,className:`rt-r-orientation`,values:[`horizontal`,`vertical`],default:`horizontal`,responsive:!0},size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`,`4`],default:`1`,responsive:!0},color:{...Wg.color,default:`gray`},decorative:{type:`boolean`,default:!0}},Zy=h(B()),Qy=t.forwardRef((e,n)=>{let{className:r,color:i,decorative:a,...o}=V(e,Xy,f_);return t.createElement(`span`,{"data-accent-color":i,role:a?void 0:`separator`,...o,ref:n,className:(0,Zy.default)(`rt-Separator`,r)})});Qy.displayName=`Separator`;var $y={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Wg,...Kg,...x_},eb=h(B()),tb=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,tabIndex:o,...s}=V(e,$y,f_);return t.createElement(Xm,{"data-accent-color":i,"data-radius":a,ref:n,...s,asChild:!1,className:(0,eb.default)(`rt-SliderRoot`,r)},t.createElement(Zm,{className:`rt-SliderTrack`},t.createElement(Qm,{className:(0,eb.default)(`rt-SliderRange`,{"rt-high-contrast":e.highContrast}),"data-inverted":s.inverted?``:void 0})),(s.value??s.defaultValue??[]).map((e,n)=>t.createElement($m,{key:n,className:`rt-SliderThumb`,...o===void 0?void 0:{tabIndex:o}})))});tb.displayName=`Slider`;var nb={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Wg,...Kg,...x_},rb=h(B()),ib=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,...o}=V(e,nb,f_);return t.createElement(dh,{"data-accent-color":i,"data-radius":a,...o,asChild:!1,ref:n,className:(0,rb.default)(`rt-reset`,`rt-SwitchRoot`,r)},t.createElement(fh,{className:(0,rb.default)(`rt-SwitchThumb`,{"rt-high-contrast":e.highContrast})}))});ib.displayName=`Switch`;var ab={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`],default:`2`,responsive:!0},wrap:{type:`enum`,className:`rt-r-fw`,values:[`nowrap`,`wrap`,`wrap-reverse`],responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:[`start`,`center`,`end`],responsive:!0},...Wg,...Kg},ob=h(B()),sb=t.forwardRef((e,n)=>{let{className:r,...i}=V(e,f_);return t.createElement(Oh,{...i,ref:n,className:(0,ob.default)(`rt-TabsRoot`,r)})});sb.displayName=`Tabs.Root`;var cb=t.forwardRef((e,n)=>{let{className:r,color:i,...a}=V(e,ab,f_);return t.createElement(kh,{"data-accent-color":i,...a,asChild:!1,ref:n,className:(0,ob.default)(`rt-BaseTabList`,`rt-TabsList`,r)})});cb.displayName=`Tabs.List`;var lb=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(Ah,{...a,asChild:!1,ref:n,className:(0,ob.default)(`rt-reset`,`rt-BaseTabListTrigger`,`rt-TabsTrigger`,r)},t.createElement(`span`,{className:`rt-BaseTabListTriggerInner rt-TabsTriggerInner`},i),t.createElement(`span`,{className:`rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden`},i))});lb.displayName=`Tabs.Trigger`;var ub=t.forwardRef((e,n)=>{let{className:r,...i}=V(e,f_);return t.createElement(jh,{...i,ref:n,className:(0,ob.default)(`rt-TabsContent`,r)})});ub.displayName=`Tabs.Content`;var db={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},resize:{type:`enum`,className:`rt-r-resize`,values:[`none`,`vertical`,`horizontal`,`both`],responsive:!0},...Wg,...x_},fb=h(B()),pb=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,style:o,...s}=V(e,db,f_);return t.createElement(`div`,{"data-accent-color":i,"data-radius":a,className:(0,fb.default)(`rt-TextAreaRoot`,r),style:o},t.createElement(`textarea`,{className:`rt-reset rt-TextAreaInput`,ref:n,...s}))});pb.displayName=`TextArea`;var mb={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Wg,...x_},hb={side:{type:`enum`,values:[`left`,`right`]},...Wg,gap:uv.gap,px:G_.px,pl:G_.pl,pr:G_.pr},gb=h(B()),X=t.forwardRef((e,n)=>{let r=t.useRef(null),{children:i,className:a,color:o,radius:s,style:c,...l}=V(e,mb,f_);return t.createElement(`div`,{"data-accent-color":o,"data-radius":s,style:c,className:(0,gb.default)(`rt-TextFieldRoot`,a),onPointerDown:e=>{let t=e.target;if(t.closest(`input, button, a`))return;let n=r.current;if(!n)return;let i=t.closest(`
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return t.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},ya=`DialogDescriptionWarning`,ba=({contentRef:e,descriptionId:n})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_a(ya).contentName}}.`;return t.useEffect(()=>{let t=e.current?.getAttribute(`aria-describedby`);n&&t&&(document.getElementById(n)||console.warn(r))},[r,e,n]),null},xa=Ki,Sa=Ji,Ca=Qi,wa=ea,Ta=ia,Ea=la,Da=da,Oa=pa;function ka(e){let n=t.useRef({value:e,previous:e});return t.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function Aa(e){let[n,r]=t.useState(void 0);return Cn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],i,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else r(void 0)},[e]),n}var ja=[`top`,`right`,`bottom`,`left`],Ma=Math.min,Na=Math.max,Pa=Math.round,Fa=Math.floor,Ia=e=>({x:e,y:e}),La={left:`right`,right:`left`,bottom:`top`,top:`bottom`},Ra={start:`end`,end:`start`};function za(e,t,n){return Na(e,Ma(t,n))}function Ba(e,t){return typeof e==`function`?e(t):e}function Va(e){return e.split(`-`)[0]}function Ha(e){return e.split(`-`)[1]}function Ua(e){return e===`x`?`y`:`x`}function Wa(e){return e===`y`?`height`:`width`}var Ga=new Set([`top`,`bottom`]);function Ka(e){return Ga.has(Va(e))?`y`:`x`}function qa(e){return Ua(Ka(e))}function Ja(e,t,n){n===void 0&&(n=!1);let r=Ha(e),i=qa(e),a=Wa(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ro(o)),[o,ro(o)]}function Ya(e){let t=ro(e);return[Xa(e),t,Xa(t)]}function Xa(e){return e.replace(/start|end/g,e=>Ra[e])}var Za=[`left`,`right`],Qa=[`right`,`left`],$a=[`top`,`bottom`],eo=[`bottom`,`top`];function to(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Qa:Za:t?Za:Qa;case`left`:case`right`:return t?$a:eo;default:return[]}}function no(e,t,n,r){let i=Ha(e),a=to(Va(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Xa)))),a}function ro(e){return e.replace(/left|right|bottom|top/g,e=>La[e])}function io(e){return{top:0,right:0,bottom:0,left:0,...e}}function ao(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:io(e)}function oo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function so(e,t,n){let{reference:r,floating:i}=e,a=Ka(t),o=qa(t),s=Wa(o),c=Va(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ha(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function co(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ba(t,e),p=ao(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=oo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=oo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var lo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=so(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??co},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=so(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},uo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ba(e,t)||{};if(l==null)return{};let d=ao(u),f={x:n,y:r},p=qa(i),m=Wa(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ma(d[_],T),D=Ma(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=za(O,A,k),M=!c.arrow&&Ha(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),fo=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ba(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Va(r),_=Ka(o),v=Va(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ro(o)]:Ya(o)),x=p!==`none`;!d&&x&&b.push(...no(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ja(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Ka(t))||T.every(e=>Ka(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ka(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function po(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function mo(e){return ja.some(t=>e[t]>=0)}var ho=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ba(e,t);switch(i){case`referenceHidden`:{let e=po(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:mo(e)}}}case`escaped`:{let e=po(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:mo(e)}}}default:return{}}}}},go=new Set([`left`,`top`]);async function _o(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Va(n),s=Ha(n),c=Ka(n)===`y`,l=go.has(o)?-1:1,u=a&&c?-1:1,d=Ba(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var vo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await _o(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},yo=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ba(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ka(Va(i)),p=Ua(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=za(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=za(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},bo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ba(e,t),u={x:n,y:r},d=Ka(i),f=Ua(d),p=u[f],m=u[d],h=Ba(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=go.has(Va(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},xo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ba(e,t),u=await o.detectOverflow(t,l),d=Va(i),f=Ha(i),p=Ka(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ma(h-u[g],v),x=Ma(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Na(u.left,0),t=Na(u.right,0),n=Na(u.top,0),r=Na(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Na(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Na(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function So(){return typeof window<`u`}function Co(e){return Eo(e)?(e.nodeName||``).toLowerCase():`#document`}function wo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function To(e){return((Eo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Eo(e){return So()?e instanceof Node||e instanceof wo(e).Node:!1}function Do(e){return So()?e instanceof Element||e instanceof wo(e).Element:!1}function Oo(e){return So()?e instanceof HTMLElement||e instanceof wo(e).HTMLElement:!1}function ko(e){return!So()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof wo(e).ShadowRoot}var Ao=new Set([`inline`,`contents`]);function jo(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Wo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ao.has(i)}var Mo=new Set([`table`,`td`,`th`]);function No(e){return Mo.has(Co(e))}var Po=[`:popover-open`,`:modal`];function Fo(e){return Po.some(t=>{try{return e.matches(t)}catch{return!1}})}var Io=[`transform`,`translate`,`scale`,`rotate`,`perspective`],Lo=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Ro=[`paint`,`layout`,`strict`,`content`];function zo(e){let t=Vo(),n=Do(e)?Wo(e):e;return Io.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||Lo.some(e=>(n.willChange||``).includes(e))||Ro.some(e=>(n.contain||``).includes(e))}function Bo(e){let t=Ko(e);for(;Oo(t)&&!Uo(t);){if(zo(t))return t;if(Fo(t))return null;t=Ko(t)}return null}function Vo(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Ho=new Set([`html`,`body`,`#document`]);function Uo(e){return Ho.has(Co(e))}function Wo(e){return wo(e).getComputedStyle(e)}function Go(e){return Do(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ko(e){if(Co(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ko(e)&&e.host||To(e);return ko(t)?t.host:t}function qo(e){let t=Ko(e);return Uo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oo(t)&&jo(t)?t:qo(t)}function Jo(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qo(e),i=r===e.ownerDocument?.body,a=wo(r);if(i){let e=Yo(a);return t.concat(a,a.visualViewport||[],jo(r)?r:[],e&&n?Jo(e):[])}return t.concat(r,Jo(r,[],n))}function Yo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xo(e){let t=Wo(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Oo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Pa(n)!==a||Pa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Zo(e){return Do(e)?e:e.contextElement}function Qo(e){let t=Zo(e);if(!Oo(t))return Ia(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xo(t),o=(a?Pa(n.width):n.width)/r,s=(a?Pa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $o=Ia(0);function es(e){let t=wo(e);return!Vo()||!t.visualViewport?$o:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ts(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wo(e)?!1:t}function ns(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Zo(e),o=Ia(1);t&&(r?Do(r)&&(o=Qo(r)):o=Qo(e));let s=ts(a,n,r)?es(a):Ia(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=wo(a),t=r&&Do(r)?wo(r):r,n=e,i=Yo(n);for(;i&&r&&t!==n;){let e=Qo(i),t=i.getBoundingClientRect(),r=Wo(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=wo(i),i=Yo(n)}}return oo({width:u,height:d,x:c,y:l})}function rs(e,t){let n=Go(e).scrollLeft;return t?t.left+n:ns(To(e)).left+n}function is(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-rs(e,n),y:n.top+t.scrollTop}}function as(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=To(r),s=t?Fo(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ia(1),u=Ia(0),d=Oo(r);if((d||!d&&!a)&&((Co(r)!==`body`||jo(o))&&(c=Go(r)),Oo(r))){let e=ns(r);l=Qo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?is(o,c):Ia(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function os(e){return Array.from(e.getClientRects())}function ss(e){let t=To(e),n=Go(e),r=e.ownerDocument.body,i=Na(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Na(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+rs(e),s=-n.scrollTop;return Wo(r).direction===`rtl`&&(o+=Na(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var cs=25;function ls(e,t){let n=wo(e),r=To(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Vo();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=rs(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=cs&&(a-=o)}else l<=cs&&(a+=l);return{width:a,height:o,x:s,y:c}}var us=new Set([`absolute`,`fixed`]);function ds(e,t){let n=ns(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Oo(e)?Qo(e):Ia(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function fs(e,t,n){let r;if(t===`viewport`)r=ls(e,n);else if(t===`document`)r=ss(To(e));else if(Do(t))r=ds(t,n);else{let n=es(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return oo(r)}function ps(e,t){let n=Ko(e);return n===t||!Do(n)||Uo(n)?!1:Wo(n).position===`fixed`||ps(n,t)}function ms(e,t){let n=t.get(e);if(n)return n;let r=Jo(e,[],!1).filter(e=>Do(e)&&Co(e)!==`body`),i=null,a=Wo(e).position===`fixed`,o=a?Ko(e):e;for(;Do(o)&&!Uo(o);){let t=Wo(o),n=zo(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&us.has(i.position)||jo(o)&&!n&&ps(e,o))?r=r.filter(e=>e!==o):i=t,o=Ko(o)}return t.set(e,r),r}function hs(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Fo(t)?[]:ms(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=fs(t,n,i);return e.top=Na(r.top,e.top),e.right=Ma(r.right,e.right),e.bottom=Ma(r.bottom,e.bottom),e.left=Na(r.left,e.left),e},fs(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function gs(e){let{width:t,height:n}=Xo(e);return{width:t,height:n}}function _s(e,t,n){let r=Oo(t),i=To(t),a=n===`fixed`,o=ns(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ia(0);function l(){c.x=rs(i)}if(r||!r&&!a)if((Co(t)!==`body`||jo(i))&&(s=Go(t)),r){let e=ns(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?is(i,s):Ia(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function vs(e){return Wo(e).position===`static`}function ys(e,t){if(!Oo(e)||Wo(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return To(e)===n&&(n=n.ownerDocument.body),n}function bs(e,t){let n=wo(e);if(Fo(e))return n;if(!Oo(e)){let t=Ko(e);for(;t&&!Uo(t);){if(Do(t)&&!vs(t))return t;t=Ko(t)}return n}let r=ys(e,t);for(;r&&No(r)&&vs(r);)r=ys(r,t);return r&&Uo(r)&&vs(r)&&!zo(r)?n:r||Bo(e)||n}var xs=async function(e){let t=this.getOffsetParent||bs,n=this.getDimensions,r=await n(e.floating);return{reference:_s(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ss(e){return Wo(e).direction===`rtl`}var Cs={convertOffsetParentRelativeRectToViewportRelativeRect:as,getDocumentElement:To,getClippingRect:hs,getOffsetParent:bs,getElementRects:xs,getClientRects:os,getDimensions:gs,getScale:Qo,isElement:Do,isRTL:Ss};function ws(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ts(e,t){let n=null,r,i=To(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Fa(d),h=Fa(i.clientWidth-(u+f)),g=Fa(i.clientHeight-(d+p)),_=Fa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Na(0,Ma(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ws(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Es(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Zo(e),u=i||a?[...l?Jo(l):[],...Jo(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ts(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?ns(e):null;c&&g();function g(){let t=ns(e);h&&!ws(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ds=vo,Os=yo,ks=fo,As=xo,js=ho,Ms=uo,Ns=bo,Ps=(e,t,n)=>{let r=new Map,i={platform:Cs,...n},a={...i.platform,_c:r};return lo(e,t,{...i,platform:a})},Fs=typeof document<`u`?t.useLayoutEffect:function(){};function Is(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Is(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Is(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ls(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rs(e,t){let n=Ls(e);return Math.round(t*n)/n}function zs(e){let n=t.useRef(e);return Fs(()=>{n.current=e}),n}function Bs(e){e===void 0&&(e={});let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=t.useState({x:0,y:0,strategy:i,placement:r,middlewareData:{},isPositioned:!1}),[m,h]=t.useState(a);Is(m,a)||h(a);let[g,_]=t.useState(null),[v,y]=t.useState(null),b=t.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=t.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=s||g,C=c||v,w=t.useRef(null),T=t.useRef(null),E=t.useRef(f),D=u!=null,O=zs(u),k=zs(o),A=zs(d),j=t.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:r,strategy:i,middleware:m};k.current&&(e.platform=k.current),Ps(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Is(E.current,t)&&(E.current=t,n.flushSync(()=>{p(t)}))})},[m,r,i,k,A]);Fs(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let M=t.useRef(!1);Fs(()=>(M.current=!0,()=>{M.current=!1}),[]),Fs(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=t.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=t.useMemo(()=>({reference:S,floating:C}),[S,C]),F=t.useMemo(()=>{let e={position:i,left:0,top:0};if(!P.floating)return e;let t=Rs(P.floating,f.x),n=Rs(P.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Ls(P.floating)>=1.5&&{willChange:`transform`}}:{position:i,left:t,top:n}},[i,l,P.floating,f.x,f.y]);return t.useMemo(()=>({...f,update:j,refs:N,elements:P,floatingStyles:F}),[f,j,N,P,F])}var Vs=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ms({element:r.current,padding:i}).fn(n):r?Ms({element:r,padding:i}).fn(n):{}}}},Hs=(e,t)=>({...Ds(e),options:[e,t]}),Us=(e,t)=>({...Os(e),options:[e,t]}),Ws=(e,t)=>({...Ns(e),options:[e,t]}),Gs=(e,t)=>({...ks(e),options:[e,t]}),Ks=(e,t)=>({...As(e),options:[e,t]}),qs=(e,t)=>({...js(e),options:[e,t]}),Js=(e,t)=>({...Vs(e),options:[e,t]}),Ys=`Arrow`,Xs=t.forwardRef((e,t)=>{let{children:n,width:i=10,height:a=5,...o}=e;return(0,r.jsx)(z.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,r.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Xs.displayName=Ys;var Zs=Xs,Qs=`Popper`,[$s,ec]=bn(Qs),[tc,nc]=$s(Qs),rc=e=>{let{__scopePopper:n,children:i}=e,[a,o]=t.useState(null);return(0,r.jsx)(tc,{scope:n,anchor:a,onAnchorChange:o,children:i})};rc.displayName=Qs;var ic=`PopperAnchor`,ac=t.forwardRef((e,n)=>{let{__scopePopper:i,virtualRef:a,...o}=e,s=nc(ic,i),c=t.useRef(null),l=R(n,c),u=t.useRef(null);return t.useEffect(()=>{let e=u.current;u.current=a?.current||c.current,e!==u.current&&s.onAnchorChange(u.current)}),a?null:(0,r.jsx)(z.div,{...o,ref:l})});ac.displayName=ic;var oc=`PopperContent`,[sc,cc]=$s(oc),lc=t.forwardRef((e,n)=>{let{__scopePopper:i,side:a=`bottom`,sideOffset:o=0,align:s=`center`,alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:g,..._}=e,v=nc(oc,i),[y,b]=t.useState(null),x=R(n,e=>b(e)),[S,C]=t.useState(null),w=Aa(S),T=w?.width??0,E=w?.height??0,D=a+(s===`center`?``:`-`+s),O=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},k=Array.isArray(d)?d:[d],A=k.length>0,j={padding:O,boundary:k.filter(pc),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:F,middlewareData:I}=Bs({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Es(...e,{animationFrame:h===`always`}),elements:{reference:v.anchor},middleware:[Hs({mainAxis:o+E,alignmentAxis:c}),u&&Us({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Ws():void 0,...j}),u&&Gs({...j}),Ks({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),S&&Js({element:S,padding:l}),mc({arrowWidth:T,arrowHeight:E}),m&&qs({strategy:`referenceHidden`,...j})]}),[ee,L]=hc(P),te=Bn(g);Cn(()=>{F&&te?.()},[F,te]);let ne=I.arrow?.x,re=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[ae,oe]=t.useState();return Cn(()=>{y&&oe(window.getComputedStyle(y).zIndex)},[y]),(0,r.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:F?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,r.jsx)(sc,{scope:i,placedSide:ee,onArrowChange:C,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,r.jsx)(z.div,{"data-side":ee,"data-align":L,..._,ref:x,style:{..._.style,animation:F?void 0:`none`}})})})});lc.displayName=oc;var uc=`PopperArrow`,dc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},fc=t.forwardRef(function(e,t){let{__scopePopper:n,...i}=e,a=cc(uc,n),o=dc[a.placedSide];return(0,r.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,r.jsx)(Zs,{...i,ref:t,style:{...i.style,display:`block`}})})});fc.displayName=uc;function pc(e){return e!==null}var mc=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=hc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function hc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var gc=rc,_c=ac,vc=lc,yc=fc,bc=`rovingFocusGroup.onEntryFocus`,xc={bubbles:!1,cancelable:!0},Sc=`RovingFocusGroup`,[Cc,wc,Tc]=Sn(Sc),[Ec,Dc]=bn(Sc,[Tc]),[Oc,kc]=Ec(Sc),Ac=t.forwardRef((e,t)=>(0,r.jsx)(Cc.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,r.jsx)(Cc.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,r.jsx)(jc,{...e,ref:t})})}));Ac.displayName=Sc;var jc=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,orientation:a,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...p}=e,m=t.useRef(null),h=R(n,m),g=Rn(s),[_,v]=Tn({prop:c,defaultProp:l??null,onChange:u,caller:Sc}),[y,b]=t.useState(!1),x=Bn(d),S=wc(i),C=t.useRef(!1),[w,T]=t.useState(0);return t.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(bc,x),()=>e.removeEventListener(bc,x)},[x]),(0,r.jsx)(Oc,{scope:i,orientation:a,dir:g,loop:o,currentTabStopId:_,onItemFocus:t.useCallback(e=>v(e),[v]),onItemShiftTab:t.useCallback(()=>b(!0),[]),onFocusableItemAdd:t.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>T(e=>e-1),[]),children:(0,r.jsx)(z.div,{tabIndex:y||w===0?-1:0,"data-orientation":a,...p,ref:h,style:{outline:`none`,...e.style},onMouseDown:B(e.onMouseDown,()=>{C.current=!0}),onFocus:B(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(bc,xc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Lc([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),f)}}C.current=!1}),onBlur:B(e.onBlur,()=>b(!1))})})}),Mc=`RovingFocusGroupItem`,Nc=t.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:i,focusable:a=!0,active:o=!1,tabStopId:s,children:c,...l}=e,u=Fn(),d=s||u,f=kc(Mc,i),p=f.currentTabStopId===d,m=wc(i),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=f;return t.useEffect(()=>{if(a)return h(),()=>g()},[a,h,g]),(0,r.jsx)(Cc.ItemSlot,{scope:i,id:d,focusable:a,active:o,children:(0,r.jsx)(z.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:B(e.onMouseDown,e=>{a?f.onItemFocus(d):e.preventDefault()}),onFocus:B(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:B(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){f.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ic(e,f.orientation,f.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=f.loop?Rc(n,r+1):n.slice(r+1)}setTimeout(()=>Lc(n))}}),children:typeof c==`function`?c({isCurrentTabStop:p,hasTabStop:_!=null}):c})})});Nc.displayName=Mc;var Pc={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Fc(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ic(e,t,n){let r=Fc(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Pc[r]}function Lc(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Rc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zc=Ac,Bc=Nc,Vc=[`Enter`,` `],Hc=[`ArrowDown`,`PageUp`,`Home`],Uc=[`ArrowUp`,`PageDown`,`End`],Wc=[...Hc,...Uc],Gc={ltr:[...Vc,`ArrowRight`],rtl:[...Vc,`ArrowLeft`]},Kc={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},qc=`Menu`,[Jc,Yc,Xc]=Sn(qc),[Zc,Qc]=bn(qc,[Xc,ec,Dc]),$c=ec(),el=Dc(),[tl,nl]=Zc(qc),[rl,il]=Zc(qc),al=e=>{let{__scopeMenu:n,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0}=e,l=$c(n),[u,d]=t.useState(null),f=t.useRef(!1),p=Bn(s),m=Rn(o);return t.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,r.jsx)(gc,{...l,children:(0,r.jsx)(tl,{scope:n,open:i,onOpenChange:p,content:u,onContentChange:d,children:(0,r.jsx)(rl,{scope:n,onClose:t.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:c,children:a})})})};al.displayName=qc;var ol=`MenuAnchor`,sl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e,a=$c(n);return(0,r.jsx)(_c,{...a,...i,ref:t})});sl.displayName=ol;var cl=`MenuPortal`,[ll,ul]=Zc(cl,{forceMount:void 0}),dl=e=>{let{__scopeMenu:t,forceMount:n,children:i,container:a}=e,o=nl(cl,t);return(0,r.jsx)(ll,{scope:t,forceMount:n,children:(0,r.jsx)(kn,{present:n||o.open,children:(0,r.jsx)(vr,{asChild:!0,container:a,children:i})})})};dl.displayName=cl;var fl=`MenuContent`,[pl,ml]=Zc(fl),hl=t.forwardRef((e,t)=>{let n=ul(fl,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=nl(fl,e.__scopeMenu),s=il(fl,e.__scopeMenu);return(0,r.jsx)(Jc.Provider,{scope:e.__scopeMenu,children:(0,r.jsx)(kn,{present:i||o.open,children:(0,r.jsx)(Jc.Slot,{scope:e.__scopeMenu,children:s.modal?(0,r.jsx)(gl,{...a,ref:t}):(0,r.jsx)(_l,{...a,ref:t})})})})}),gl=t.forwardRef((e,n)=>{let i=nl(fl,e.__scopeMenu),a=t.useRef(null),o=R(n,a);return t.useEffect(()=>{let e=a.current;if(e)return Bi(e)},[]),(0,r.jsx)(yl,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),_l=t.forwardRef((e,t)=>{let n=nl(fl,e.__scopeMenu);return(0,r.jsx)(yl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vl=an(`MenuContent.ScrollLock`),yl=t.forwardRef((e,n)=>{let{__scopeMenu:i,loop:a=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=nl(fl,i),y=il(fl,i),b=$c(i),x=el(i),S=Yc(i),[C,w]=t.useState(null),T=t.useRef(null),E=R(n,T,v.onContentChange),D=t.useRef(0),O=t.useRef(``),k=t.useRef(0),A=t.useRef(null),j=t.useRef(`right`),M=t.useRef(0),N=g?ji:t.Fragment,P=g?{as:vl,allowPinchZoom:!0}:void 0,F=e=>{let t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=ru(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};t.useEffect(()=>()=>window.clearTimeout(D.current),[]),br();let I=t.useCallback(e=>j.current===A.current?.side&&au(e,A.current?.area),[]);return(0,r.jsx)(pl,{scope:i,searchRef:O,onItemEnter:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:t.useCallback(e=>{I(e)||(T.current?.focus(),w(null))},[I]),onTriggerLeave:t.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:t.useCallback(e=>{A.current=e},[]),children:(0,r.jsx)(N,{...P,children:(0,r.jsx)(ar,{asChild:!0,trapped:o,onMountAutoFocus:B(s,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,r.jsx)(Jn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:p,onInteractOutside:m,onDismiss:h,children:(0,r.jsx)(zc,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:a,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:B(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,r.jsx)(vc,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ql(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:B(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!Wc.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);Uc.includes(e.key)&&a.reverse(),tu(a)}),onBlur:B(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:B(e.onPointerMove,ou(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});hl.displayName=fl;var bl=`MenuGroup`,xl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(z.div,{role:`group`,...i,ref:t})});xl.displayName=bl;var Sl=`MenuLabel`,Cl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(z.div,{...i,ref:t})});Cl.displayName=Sl;var wl=`MenuItem`,Tl=`menu.itemSelect`,El=t.forwardRef((e,n)=>{let{disabled:i=!1,onSelect:a,...o}=e,s=t.useRef(null),c=il(wl,e.__scopeMenu),l=ml(wl,e.__scopeMenu),u=R(n,s),d=t.useRef(!1),f=()=>{let e=s.current;if(!i&&e){let t=new CustomEvent(Tl,{bubbles:!0,cancelable:!0});e.addEventListener(Tl,e=>a?.(e),{once:!0}),mn(e,t),t.defaultPrevented?d.current=!1:c.onClose()}};return(0,r.jsx)(Dl,{...o,ref:u,disabled:i,onClick:B(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:B(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:B(e.onKeyDown,e=>{let t=l.searchRef.current!==``;i||t&&e.key===` `||Vc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});El.displayName=wl;var Dl=t.forwardRef((e,n)=>{let{__scopeMenu:i,disabled:a=!1,textValue:o,...s}=e,c=ml(wl,i),l=el(i),u=t.useRef(null),d=R(n,u),[f,p]=t.useState(!1),[m,h]=t.useState(``);return t.useEffect(()=>{let e=u.current;e&&h((e.textContent??``).trim())},[s.children]),(0,r.jsx)(Jc.ItemSlot,{scope:i,disabled:a,textValue:o??m,children:(0,r.jsx)(Bc,{asChild:!0,...l,focusable:!a,children:(0,r.jsx)(z.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,...s,ref:d,onPointerMove:B(e.onPointerMove,ou(e=>{a?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,ou(e=>c.onItemLeave(e))),onFocus:B(e.onFocus,()=>p(!0)),onBlur:B(e.onBlur,()=>p(!1))})})})}),Ol=`MenuCheckboxItem`,kl=t.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:i,...a}=e;return(0,r.jsx)(Ll,{scope:e.__scopeMenu,checked:n,children:(0,r.jsx)(El,{role:`menuitemcheckbox`,"aria-checked":$l(n)?`mixed`:n,...a,ref:t,"data-state":eu(n),onSelect:B(a.onSelect,()=>i?.($l(n)?!0:!n),{checkForDefaultPrevented:!1})})})});kl.displayName=Ol;var Al=`MenuRadioGroup`,[jl,Ml]=Zc(Al,{value:void 0,onValueChange:()=>{}}),Nl=t.forwardRef((e,t)=>{let{value:n,onValueChange:i,...a}=e,o=Bn(i);return(0,r.jsx)(jl,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,r.jsx)(xl,{...a,ref:t})})});Nl.displayName=Al;var Pl=`MenuRadioItem`,Fl=t.forwardRef((e,t)=>{let{value:n,...i}=e,a=Ml(Pl,e.__scopeMenu),o=n===a.value;return(0,r.jsx)(Ll,{scope:e.__scopeMenu,checked:o,children:(0,r.jsx)(El,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":eu(o),onSelect:B(i.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Fl.displayName=Pl;var Il=`MenuItemIndicator`,[Ll,Rl]=Zc(Il,{checked:!1}),zl=t.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:i,...a}=e,o=Rl(Il,n);return(0,r.jsx)(kn,{present:i||$l(o.checked)||o.checked===!0,children:(0,r.jsx)(z.span,{...a,ref:t,"data-state":eu(o.checked)})})});zl.displayName=Il;var Bl=`MenuSeparator`,Vl=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e;return(0,r.jsx)(z.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});Vl.displayName=Bl;var Hl=`MenuArrow`,Ul=t.forwardRef((e,t)=>{let{__scopeMenu:n,...i}=e,a=$c(n);return(0,r.jsx)(yc,{...a,...i,ref:t})});Ul.displayName=Hl;var Wl=`MenuSub`,[Gl,Kl]=Zc(Wl),ql=e=>{let{__scopeMenu:n,children:i,open:a=!1,onOpenChange:o}=e,s=nl(Wl,n),c=$c(n),[l,u]=t.useState(null),[d,f]=t.useState(null),p=Bn(o);return t.useEffect(()=>(s.open===!1&&p(!1),()=>p(!1)),[s.open,p]),(0,r.jsx)(gc,{...c,children:(0,r.jsx)(tl,{scope:n,open:a,onOpenChange:p,content:d,onContentChange:f,children:(0,r.jsx)(Gl,{scope:n,contentId:Fn(),triggerId:Fn(),trigger:l,onTriggerChange:u,children:i})})})};ql.displayName=Wl;var Jl=`MenuSubTrigger`,Yl=t.forwardRef((e,n)=>{let i=nl(Jl,e.__scopeMenu),a=il(Jl,e.__scopeMenu),o=Kl(Jl,e.__scopeMenu),s=ml(Jl,e.__scopeMenu),c=t.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=s,d={__scopeMenu:e.__scopeMenu},f=t.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return t.useEffect(()=>f,[f]),t.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,r.jsx)(sl,{asChild:!0,...d,children:(0,r.jsx)(Dl,{id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":i.open,"aria-controls":o.contentId,"data-state":Ql(i.open),...e,ref:rn(n,o.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,ou(t=>{s.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!i.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{i.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,ou(e=>{f();let t=i.content?.getBoundingClientRect();if(t){let n=i.content?.dataset.side,r=n===`right`,a=r?-5:5,o=t[r?`left`:`right`],c=t[r?`right`:`left`];s.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:o,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:o,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,t=>{let n=s.searchRef.current!==``;e.disabled||n&&t.key===` `||Gc[a.dir].includes(t.key)&&(i.onOpenChange(!0),i.content?.focus(),t.preventDefault())})})})});Yl.displayName=Jl;var Xl=`MenuSubContent`,Zl=t.forwardRef((e,n)=>{let i=ul(fl,e.__scopeMenu),{forceMount:a=i.forceMount,...o}=e,s=nl(fl,e.__scopeMenu),c=il(fl,e.__scopeMenu),l=Kl(Xl,e.__scopeMenu),u=t.useRef(null),d=R(n,u);return(0,r.jsx)(Jc.Provider,{scope:e.__scopeMenu,children:(0,r.jsx)(kn,{present:a||s.open,children:(0,r.jsx)(Jc.Slot,{scope:e.__scopeMenu,children:(0,r.jsx)(yl,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:B(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:B(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Kc[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});Zl.displayName=Xl;function Ql(e){return e?`open`:`closed`}function $l(e){return e===`indeterminate`}function eu(e){return $l(e)?`indeterminate`:e?`checked`:`unchecked`}function tu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ru(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=nu(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function iu(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function au(e,t){return t?iu({x:e.clientX,y:e.clientY},t):!1}function ou(e){return t=>t.pointerType===`mouse`?e(t):void 0}var su=al,cu=sl,lu=dl,uu=hl,du=xl,fu=Cl,pu=El,mu=kl,hu=Nl,gu=Fl,_u=zl,vu=Vl,yu=Ul,bu=ql,xu=Yl,Su=Zl,Cu=`DropdownMenu`,[wu,Tu]=bn(Cu,[Qc]),Eu=Qc(),[Du,Ou]=wu(Cu),ku=e=>{let{__scopeDropdownMenu:n,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0}=e,u=Eu(n),d=t.useRef(null),[f,p]=Tn({prop:o,defaultProp:s??!1,onChange:c,caller:Cu});return(0,r.jsx)(Du,{scope:n,triggerId:Fn(),triggerRef:d,contentId:Fn(),open:f,onOpenChange:p,onOpenToggle:t.useCallback(()=>p(e=>!e),[p]),modal:l,children:(0,r.jsx)(su,{...u,open:f,onOpenChange:p,dir:a,modal:l,children:i})})};ku.displayName=Cu;var Au=`DropdownMenuTrigger`,ju=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:i=!1,...a}=e,o=Ou(Au,n),s=Eu(n);return(0,r.jsx)(cu,{asChild:!0,...s,children:(0,r.jsx)(z.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:rn(t,o.triggerRef),onPointerDown:B(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:B(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});ju.displayName=Au;var Mu=`DropdownMenuPortal`,Nu=e=>{let{__scopeDropdownMenu:t,...n}=e,i=Eu(t);return(0,r.jsx)(lu,{...i,...n})};Nu.displayName=Mu;var Pu=`DropdownMenuContent`,Fu=t.forwardRef((e,n)=>{let{__scopeDropdownMenu:i,...a}=e,o=Ou(Pu,i),s=Eu(i),c=t.useRef(!1);return(0,r.jsx)(uu,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:n,onCloseAutoFocus:B(e.onCloseAutoFocus,e=>{c.current||o.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:B(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Fu.displayName=Pu;var Iu=`DropdownMenuGroup`,Lu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(du,{...a,...i,ref:t})});Lu.displayName=Iu;var Ru=`DropdownMenuLabel`,zu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(fu,{...a,...i,ref:t})});zu.displayName=Ru;var Bu=`DropdownMenuItem`,Vu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(pu,{...a,...i,ref:t})});Vu.displayName=Bu;var Hu=`DropdownMenuCheckboxItem`,Uu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(mu,{...a,...i,ref:t})});Uu.displayName=Hu;var Wu=`DropdownMenuRadioGroup`,Gu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(hu,{...a,...i,ref:t})});Gu.displayName=Wu;var Ku=`DropdownMenuRadioItem`,qu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(gu,{...a,...i,ref:t})});qu.displayName=Ku;var Ju=`DropdownMenuItemIndicator`,Yu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(_u,{...a,...i,ref:t})});Yu.displayName=Ju;var Xu=`DropdownMenuSeparator`,Zu=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(vu,{...a,...i,ref:t})});Zu.displayName=Xu;var Qu=`DropdownMenuArrow`,$u=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(yu,{...a,...i,ref:t})});$u.displayName=Qu;var ed=e=>{let{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:a,defaultOpen:o}=e,s=Eu(t),[c,l]=Tn({prop:i,defaultProp:o??!1,onChange:a,caller:`DropdownMenuSub`});return(0,r.jsx)(bu,{...s,open:c,onOpenChange:l,children:n})},td=`DropdownMenuSubTrigger`,nd=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(xu,{...a,...i,ref:t})});nd.displayName=td;var rd=`DropdownMenuSubContent`,id=t.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...i}=e,a=Eu(n);return(0,r.jsx)(Su,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});id.displayName=rd;var ad=ku,od=ju,sd=Nu,cd=Fu,ld=Lu,ud=zu,dd=Vu,fd=Uu,pd=Gu,md=qu,hd=Yu,gd=Zu,_d=ed,vd=nd,yd=id;function bd(e,[t,n]){return Math.min(n,Math.max(t,e))}var xd=`Popover`,[Sd,Cd]=bn(xd,[ec]),wd=ec(),[Td,Ed]=Sd(xd),Dd=e=>{let{__scopePopover:n,children:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,l=wd(n),u=t.useRef(null),[d,f]=t.useState(!1),[p,m]=Tn({prop:a,defaultProp:o??!1,onChange:s,caller:xd});return(0,r.jsx)(gc,{...l,children:(0,r.jsx)(Td,{scope:n,contentId:Fn(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:t.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:d,onCustomAnchorAdd:t.useCallback(()=>f(!0),[]),onCustomAnchorRemove:t.useCallback(()=>f(!1),[]),modal:c,children:i})})};Dd.displayName=xd;var Od=`PopoverAnchor`,kd=t.forwardRef((e,n)=>{let{__scopePopover:i,...a}=e,o=Ed(Od,i),s=wd(i),{onCustomAnchorAdd:c,onCustomAnchorRemove:l}=o;return t.useEffect(()=>(c(),()=>l()),[c,l]),(0,r.jsx)(_c,{...s,...a,ref:n})});kd.displayName=Od;var Ad=`PopoverTrigger`,jd=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=Ed(Ad,n),o=wd(n),s=R(t,a.triggerRef),c=(0,r.jsx)(z.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Kd(a.open),...i,ref:s,onClick:B(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,r.jsx)(_c,{asChild:!0,...o,children:c})});jd.displayName=Ad;var Md=`PopoverPortal`,[Nd,Pd]=Sd(Md,{forceMount:void 0}),Fd=e=>{let{__scopePopover:t,forceMount:n,children:i,container:a}=e,o=Ed(Md,t);return(0,r.jsx)(Nd,{scope:t,forceMount:n,children:(0,r.jsx)(kn,{present:n||o.open,children:(0,r.jsx)(vr,{asChild:!0,container:a,children:i})})})};Fd.displayName=Md;var Id=`PopoverContent`,Ld=t.forwardRef((e,t)=>{let n=Pd(Id,e.__scopePopover),{forceMount:i=n.forceMount,...a}=e,o=Ed(Id,e.__scopePopover);return(0,r.jsx)(kn,{present:i||o.open,children:o.modal?(0,r.jsx)(zd,{...a,ref:t}):(0,r.jsx)(Bd,{...a,ref:t})})});Ld.displayName=Id;var Rd=an(`PopoverContent.RemoveScroll`),zd=t.forwardRef((e,n)=>{let i=Ed(Id,e.__scopePopover),a=t.useRef(null),o=R(n,a),s=t.useRef(!1);return t.useEffect(()=>{let e=a.current;if(e)return Bi(e)},[]),(0,r.jsx)(ji,{as:Rd,allowPinchZoom:!0,children:(0,r.jsx)(Vd,{...e,ref:o,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:B(e.onCloseAutoFocus,e=>{e.preventDefault(),s.current||i.triggerRef.current?.focus()}),onPointerDownOutside:B(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;s.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:B(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Bd=t.forwardRef((e,n)=>{let i=Ed(Id,e.__scopePopover),a=t.useRef(!1),o=t.useRef(!1);return(0,r.jsx)(Vd,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||i.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,t.detail.originalEvent.type===`pointerdown`&&(o.current=!0));let n=t.target;i.triggerRef.current?.contains(n)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&o.current&&t.preventDefault()}})}),Vd=t.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=Ed(Id,n),m=wd(n);return br(),(0,r.jsx)(ar,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,r.jsx)(Jn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,r.jsx)(vc,{"data-state":Kd(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Hd=`PopoverClose`,Ud=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=Ed(Hd,n);return(0,r.jsx)(z.button,{type:`button`,...i,ref:t,onClick:B(e.onClick,()=>a.onOpenChange(!1))})});Ud.displayName=Hd;var Wd=`PopoverArrow`,Gd=t.forwardRef((e,t)=>{let{__scopePopover:n,...i}=e,a=wd(n);return(0,r.jsx)(yc,{...a,...i,ref:t})});Gd.displayName=Wd;function Kd(e){return e?`open`:`closed`}var qd=Dd,Jd=kd,Yd=jd,Xd=Fd,Zd=Ld,Qd=Ud;function $d(e,n){return t.useReducer((e,t)=>n[e][t]??e,e)}var ef=`ScrollArea`,[tf,nf]=bn(ef),[rf,af]=tf(ef),of=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,type:a=`hover`,dir:o,scrollHideDelay:s=600,...c}=e,[l,u]=t.useState(null),[d,f]=t.useState(null),[p,m]=t.useState(null),[h,g]=t.useState(null),[_,v]=t.useState(null),[y,b]=t.useState(0),[x,S]=t.useState(0),[C,w]=t.useState(!1),[T,E]=t.useState(!1),D=R(n,e=>u(e)),O=Rn(o);return(0,r.jsx)(rf,{scope:i,type:a,dir:O,scrollHideDelay:s,scrollArea:l,viewport:d,onViewportChange:f,content:p,onContentChange:m,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:w,scrollbarY:_,onScrollbarYChange:v,scrollbarYEnabled:T,onScrollbarYEnabledChange:E,onCornerWidthChange:b,onCornerHeightChange:S,children:(0,r.jsx)(z.div,{dir:O,...c,ref:D,style:{position:`relative`,"--radix-scroll-area-corner-width":y+`px`,"--radix-scroll-area-corner-height":x+`px`,...e.style}})})});of.displayName=ef;var sf=`ScrollAreaViewport`,cf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,children:a,nonce:o,...s}=e,c=af(sf,i),l=R(n,t.useRef(null),c.onViewportChange);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:o}),(0,r.jsx)(z.div,{"data-radix-scroll-area-viewport":``,...s,ref:l,style:{overflowX:c.scrollbarXEnabled?`scroll`:`hidden`,overflowY:c.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,r.jsx)(`div`,{ref:c.onContentChange,style:{minWidth:`100%`,display:`table`},children:a})})]})});cf.displayName=sf;var lf=`ScrollAreaScrollbar`,uf=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=af(lf,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:c}=o,l=e.orientation===`horizontal`;return t.useEffect(()=>(l?s(!0):c(!0),()=>{l?s(!1):c(!1)}),[l,s,c]),o.type===`hover`?(0,r.jsx)(df,{...a,ref:n,forceMount:i}):o.type===`scroll`?(0,r.jsx)(ff,{...a,ref:n,forceMount:i}):o.type===`auto`?(0,r.jsx)(pf,{...a,ref:n,forceMount:i}):o.type===`always`?(0,r.jsx)(mf,{...a,ref:n}):null});uf.displayName=lf;var df=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=af(lf,e.__scopeScrollArea),[s,c]=t.useState(!1);return t.useEffect(()=>{let e=o.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),c(!0)},r=()=>{t=window.setTimeout(()=>c(!1),o.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[o.scrollArea,o.scrollHideDelay]),(0,r.jsx)(kn,{present:i||s,children:(0,r.jsx)(pf,{"data-state":s?`visible`:`hidden`,...a,ref:n})})}),ff=t.forwardRef((e,n)=>{let{forceMount:i,...a}=e,o=af(lf,e.__scopeScrollArea),s=e.orientation===`horizontal`,c=Pf(()=>u(`SCROLL_END`),100),[l,u]=$d(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return t.useEffect(()=>{if(l===`idle`){let e=window.setTimeout(()=>u(`HIDE`),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[l,o.scrollHideDelay,u]),t.useEffect(()=>{let e=o.viewport,t=s?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(u(`SCROLL`),c()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[o.viewport,s,u,c]),(0,r.jsx)(kn,{present:i||l!==`hidden`,children:(0,r.jsx)(mf,{"data-state":l===`hidden`?`hidden`:`visible`,...a,ref:n,onPointerEnter:B(e.onPointerEnter,()=>u(`POINTER_ENTER`)),onPointerLeave:B(e.onPointerLeave,()=>u(`POINTER_LEAVE`))})})}),pf=t.forwardRef((e,n)=>{let i=af(lf,e.__scopeScrollArea),{forceMount:a,...o}=e,[s,c]=t.useState(!1),l=e.orientation===`horizontal`,u=Pf(()=>{if(i.viewport){let e=i.viewport.offsetWidth<i.viewport.scrollWidth,t=i.viewport.offsetHeight<i.viewport.scrollHeight;c(l?e:t)}},10);return Ff(i.viewport,u),Ff(i.content,u),(0,r.jsx)(kn,{present:a||s,children:(0,r.jsx)(mf,{"data-state":s?`visible`:`hidden`,...o,ref:n})})}),mf=t.forwardRef((e,n)=>{let{orientation:i=`vertical`,...a}=e,o=af(lf,e.__scopeScrollArea),s=t.useRef(null),c=t.useRef(0),[l,u]=t.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Df(l.viewport,l.content),f={...a,sizes:l,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:e=>s.current=e,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:e=>c.current=e};function p(e,t){return kf(e,c.current,l,t)}return i===`horizontal`?(0,r.jsx)(hf,{...f,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){let e=o.viewport.scrollLeft,t=Af(e,l,o.dir);s.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=p(e,o.dir))}}):i===`vertical`?(0,r.jsx)(gf,{...f,ref:n,onThumbPositionChange:()=>{if(o.viewport&&s.current){let e=o.viewport.scrollTop,t=Af(e,l);s.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=p(e))}}):null}),hf=t.forwardRef((e,n)=>{let{sizes:i,onSizesChange:a,...o}=e,s=af(lf,e.__scopeScrollArea),[c,l]=t.useState(),u=t.useRef(null),d=R(n,u,s.onScrollbarXChange);return t.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,r.jsx)(yf,{"data-orientation":`horizontal`,...o,ref:d,sizes:i,style:{bottom:0,left:s.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:s.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":Of(i)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(s.viewport){let r=s.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Mf(r,n)&&t.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&a({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Ef(c.paddingLeft),paddingEnd:Ef(c.paddingRight)}})}})}),gf=t.forwardRef((e,n)=>{let{sizes:i,onSizesChange:a,...o}=e,s=af(lf,e.__scopeScrollArea),[c,l]=t.useState(),u=t.useRef(null),d=R(n,u,s.onScrollbarYChange);return t.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),(0,r.jsx)(yf,{"data-orientation":`vertical`,...o,ref:d,sizes:i,style:{top:0,right:s.dir===`ltr`?0:void 0,left:s.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":Of(i)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(s.viewport){let r=s.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Mf(r,n)&&t.preventDefault()}},onResize:()=>{u.current&&s.viewport&&c&&a({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Ef(c.paddingTop),paddingEnd:Ef(c.paddingBottom)}})}})}),[_f,vf]=tf(lf),yf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,sizes:a,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:f,onResize:p,...m}=e,h=af(lf,i),[g,_]=t.useState(null),v=R(n,e=>_(e)),y=t.useRef(null),b=t.useRef(``),x=h.viewport,S=a.content-a.viewport,C=Bn(f),w=Bn(u),T=Pf(p,10);function E(e){y.current&&d({x:e.clientX-y.current.left,y:e.clientY-y.current.top})}return t.useEffect(()=>{let e=e=>{let t=e.target;g?.contains(t)&&C(e,S)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[x,g,S,C]),t.useEffect(w,[a,w]),Ff(g,T),Ff(h.content,T),(0,r.jsx)(_f,{scope:i,scrollbar:g,hasThumb:o,onThumbChange:Bn(s),onThumbPointerUp:Bn(c),onThumbPositionChange:w,onThumbPointerDown:Bn(l),children:(0,r.jsx)(z.div,{...m,ref:v,style:{position:`absolute`,...m.style},onPointerDown:B(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),y.current=g.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,h.viewport&&(h.viewport.style.scrollBehavior=`auto`),E(e))}),onPointerMove:B(e.onPointerMove,E),onPointerUp:B(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,h.viewport&&(h.viewport.style.scrollBehavior=``),y.current=null})})})}),bf=`ScrollAreaThumb`,xf=t.forwardRef((e,t)=>{let{forceMount:n,...i}=e,a=vf(bf,e.__scopeScrollArea);return(0,r.jsx)(kn,{present:n||a.hasThumb,children:(0,r.jsx)(Sf,{ref:t,...i})})}),Sf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,style:a,...o}=e,s=af(bf,i),c=vf(bf,i),{onThumbPositionChange:l}=c,u=R(n,e=>c.onThumbChange(e)),d=t.useRef(void 0),f=Pf(()=>{d.current&&=(d.current(),void 0)},100);return t.useEffect(()=>{let e=s.viewport;if(e){let t=()=>{f(),d.current||(d.current=Nf(e,l),l())};return l(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[s.viewport,f,l]),(0,r.jsx)(z.div,{"data-state":c.hasThumb?`visible`:`hidden`,...o,ref:u,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...a},onPointerDownCapture:B(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;c.onThumbPointerDown({x:n,y:r})}),onPointerUp:B(e.onPointerUp,c.onThumbPointerUp)})});xf.displayName=bf;var Cf=`ScrollAreaCorner`,wf=t.forwardRef((e,t)=>{let n=af(Cf,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&i?(0,r.jsx)(Tf,{...e,ref:t}):null});wf.displayName=Cf;var Tf=t.forwardRef((e,n)=>{let{__scopeScrollArea:i,...a}=e,o=af(Cf,i),[s,c]=t.useState(0),[l,u]=t.useState(0),d=!!(s&&l);return Ff(o.scrollbarX,()=>{let e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),u(e)}),Ff(o.scrollbarY,()=>{let e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),c(e)}),d?(0,r.jsx)(z.div,{...a,ref:n,style:{width:s,height:l,position:`absolute`,right:o.dir===`ltr`?0:void 0,left:o.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function Ef(e){return e?parseInt(e,10):0}function Df(e,t){let n=e/t;return isNaN(n)?0:n}function Of(e){let t=Df(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function kf(e,t,n,r=`ltr`){let i=Of(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return jf([c,l],d)(e)}function Af(e,t,n=`ltr`){let r=Of(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=bd(e,n===`ltr`?[0,o]:[o*-1,0]);return jf([0,o],[0,s])(c)}function jf(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Mf(e,t){return e>0&&e<t}var Nf=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function Pf(e,n){let r=Bn(e),i=t.useRef(0);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),t.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,n)},[r,n])}function Ff(e,t){let n=Bn(t);Cn(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var If=of,Lf=cf,Rf=uf,zf=xf,Bf=wf,Vf=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Hf=[` `,`Enter`],Uf=`Select`,[Wf,Gf,Kf]=Sn(Uf),[qf,Jf]=bn(Uf,[Kf,ec]),Yf=ec(),[Xf,Zf]=qf(Uf),[Qf,$f]=qf(Uf),ep=e=>{let{__scopeSelect:n,children:i,open:a,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Yf(n),[v,y]=t.useState(null),[b,x]=t.useState(null),[S,C]=t.useState(!1),w=Rn(d),[T,E]=Tn({prop:a,defaultProp:o??!1,onChange:s,caller:Uf}),[D,O]=Tn({prop:c,defaultProp:l,onChange:u,caller:Uf}),k=t.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=t.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,r.jsx)(gc,{..._,children:(0,r.jsxs)(Xf,{required:h,scope:n,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Fn(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,r.jsx)(Wf.Provider,{scope:n,children:(0,r.jsx)(Qf,{scope:e.__scopeSelect,onNativeOptionAdd:t.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:t.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:i})}),A?(0,r.jsxs)(Yp,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,r.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};ep.displayName=Uf;var tp=`SelectTrigger`,np=t.forwardRef((e,n)=>{let{__scopeSelect:i,disabled:a=!1,...o}=e,s=Yf(i),c=Zf(tp,i),l=c.disabled||a,u=R(n,c.onTriggerChange),d=Gf(i),f=t.useRef(`touch`),[p,m,h]=Zp(e=>{let t=d().filter(e=>!e.disabled),n=Qp(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),g=e=>{l||(c.onOpenChange(!0),h()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,r.jsx)(_c,{asChild:!0,...s,children:(0,r.jsx)(z.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Xp(c.value)?``:void 0,...o,ref:u,onClick:B(o.onClick,e=>{e.currentTarget.focus(),f.current!==`mouse`&&g(e)}),onPointerDown:B(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(g(e),e.preventDefault())}),onKeyDown:B(o.onKeyDown,e=>{let t=p.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&m(e.key),!(t&&e.key===` `)&&Vf.includes(e.key)&&(g(),e.preventDefault())})})})});np.displayName=tp;var rp=`SelectValue`,ip=t.forwardRef((e,t)=>{let{__scopeSelect:n,className:i,style:a,children:o,placeholder:s=``,...c}=e,l=Zf(rp,n),{onValueNodeHasChildrenChange:u}=l,d=o!==void 0,f=R(t,l.onValueNodeChange);return Cn(()=>{u(d)},[u,d]),(0,r.jsx)(z.span,{...c,ref:f,style:{pointerEvents:`none`},children:Xp(l.value)?(0,r.jsx)(r.Fragment,{children:s}):o})});ip.displayName=rp;var ap=`SelectIcon`,op=t.forwardRef((e,t)=>{let{__scopeSelect:n,children:i,...a}=e;return(0,r.jsx)(z.span,{"aria-hidden":!0,...a,ref:t,children:i||`▼`})});op.displayName=ap;var sp=`SelectPortal`,cp=e=>(0,r.jsx)(vr,{asChild:!0,...e});cp.displayName=sp;var lp=`SelectContent`,up=t.forwardRef((e,i)=>{let a=Zf(lp,e.__scopeSelect),[o,s]=t.useState();if(Cn(()=>{s(new DocumentFragment)},[]),!a.open){let t=o;return t?n.createPortal((0,r.jsx)(fp,{scope:e.__scopeSelect,children:(0,r.jsx)(Wf.Slot,{scope:e.__scopeSelect,children:(0,r.jsx)(`div`,{children:e.children})})}),t):null}return(0,r.jsx)(gp,{...e,ref:i})});up.displayName=lp;var dp=10,[fp,pp]=qf(lp),mp=`SelectContentImpl`,hp=an(`SelectContent.RemoveScroll`),gp=t.forwardRef((e,n)=>{let{__scopeSelect:i,position:a=`item-aligned`,onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v,...y}=e,b=Zf(lp,i),[x,S]=t.useState(null),[C,w]=t.useState(null),T=R(n,e=>S(e)),[E,D]=t.useState(null),[O,k]=t.useState(null),A=Gf(i),[j,M]=t.useState(!1),N=t.useRef(!1);t.useEffect(()=>{if(x)return Bi(x)},[x]),br();let P=t.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,C]),F=t.useCallback(()=>P([E,x]),[P,E,x]);t.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:ee}=b;t.useEffect(()=>{if(x){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ee.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():x.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),ee.current=null};return ee.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[x,I,ee]),t.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[L,te]=Zp(e=>{let t=A().filter(e=>!e.disabled),n=Qp(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=t.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&(D(e),r&&(N.current=!0))},[b.value]),re=t.useCallback(()=>x?.focus(),[x]),ie=t.useCallback((e,t,n)=>{let r=!N.current&&!n;(b.value!==void 0&&b.value===t||r)&&k(e)},[b.value]),ae=a===`popper`?bp:vp,oe=ae===bp?{side:l,sideOffset:u,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:m,collisionPadding:h,sticky:g,hideWhenDetached:_,avoidCollisions:v}:{};return(0,r.jsx)(fp,{scope:i,content:x,viewport:C,onViewportChange:w,itemRefCallback:ne,selectedItem:E,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:F,selectedItemText:O,position:a,isPositioned:j,searchRef:L,children:(0,r.jsx)(ji,{as:hp,allowPinchZoom:!0,children:(0,r.jsx)(ar,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:B(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,r.jsx)(Jn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,r.jsx)(ae,{role:`listbox`,id:b.contentId,"data-state":b.open?`open`:`closed`,dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...oe,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,...y.style},onKeyDown:B(y.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});gp.displayName=mp;var _p=`SelectItemAlignedPosition`,vp=t.forwardRef((e,n)=>{let{__scopeSelect:i,onPlaced:a,...o}=e,s=Zf(lp,i),c=pp(lp,i),[l,u]=t.useState(null),[d,f]=t.useState(null),p=R(n,e=>f(e)),m=Gf(i),h=t.useRef(!1),g=t.useRef(!0),{viewport:_,selectedItem:v,selectedItemText:y,focusSelectedItem:b}=c,x=t.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&d&&_&&v&&y){let e=s.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if(s.dir!==`rtl`){let i=r.left-t.left,a=n.left-i,o=e.left-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-dp,d=bd(a,[dp,Math.max(dp,u-c)]);l.style.minWidth=s+`px`,l.style.left=d+`px`}else{let i=t.right-r.right,a=window.innerWidth-n.right-i,o=window.innerWidth-e.right-a,s=e.width+o,c=Math.max(s,t.width),u=window.innerWidth-dp,d=bd(a,[dp,Math.max(dp,u-c)]);l.style.minWidth=s+`px`,l.style.right=d+`px`}let i=m(),o=window.innerHeight-dp*2,c=_.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),b=parseInt(u.paddingBottom,10),x=f+p+c+b+g,S=Math.min(v.offsetHeight*5,x),C=window.getComputedStyle(_),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-dp,D=o-E,O=v.offsetHeight/2,k=v.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=i.length>0&&v===i[i.length-1].ref.current;l.style.bottom=`0px`;let t=d.clientHeight-_.offsetTop-_.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);l.style.height=n+`px`}else{let e=i.length>0&&v===i[0].ref.current;l.style.top=`0px`;let t=Math.max(E,f+_.offsetTop+(e?w:0)+O)+j;l.style.height=t+`px`,_.scrollTop=A-E+_.offsetTop}l.style.margin=`${dp}px 0`,l.style.minHeight=S+`px`,l.style.maxHeight=o+`px`,a?.(),requestAnimationFrame(()=>h.current=!0)}},[m,s.trigger,s.valueNode,l,d,_,v,y,s.dir,a]);Cn(()=>x(),[x]);let[S,C]=t.useState();return Cn(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]),(0,r.jsx)(xp,{scope:i,contentWrapper:l,shouldExpandOnScrollRef:h,onScrollButtonChange:t.useCallback(e=>{e&&g.current===!0&&(x(),b?.(),g.current=!1)},[x,b]),children:(0,r.jsx)(`div`,{ref:u,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:S},children:(0,r.jsx)(z.div,{...o,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...o.style}})})})});vp.displayName=_p;var yp=`SelectPopperPosition`,bp=t.forwardRef((e,t)=>{let{__scopeSelect:n,align:i=`start`,collisionPadding:a=dp,...o}=e,s=Yf(n);return(0,r.jsx)(vc,{...s,...o,ref:t,align:i,collisionPadding:a,style:{boxSizing:`border-box`,...o.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});bp.displayName=yp;var[xp,Sp]=qf(lp,{}),Cp=`SelectViewport`,wp=t.forwardRef((e,n)=>{let{__scopeSelect:i,nonce:a,...o}=e,s=pp(Cp,i),c=Sp(Cp,i),l=R(n,s.onViewportChange),u=t.useRef(0);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:a}),(0,r.jsx)(Wf.Slot,{scope:i,children:(0,r.jsx)(z.div,{"data-radix-select-viewport":``,role:`presentation`,...o,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...o.style},onScroll:B(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(u.current-t.scrollTop);if(e>0){let r=window.innerHeight-dp*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}u.current=t.scrollTop})})})]})});wp.displayName=Cp;var Tp=`SelectGroup`,[Ep,Dp]=qf(Tp),Op=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=Fn();return(0,r.jsx)(Ep,{scope:n,id:a,children:(0,r.jsx)(z.div,{role:`group`,"aria-labelledby":a,...i,ref:t})})});Op.displayName=Tp;var kp=`SelectLabel`,Ap=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=Dp(kp,n);return(0,r.jsx)(z.div,{id:a.id,...i,ref:t})});Ap.displayName=kp;var jp=`SelectItem`,[Mp,Np]=qf(jp),Pp=t.forwardRef((e,n)=>{let{__scopeSelect:i,value:a,disabled:o=!1,textValue:s,...c}=e,l=Zf(jp,i),u=pp(jp,i),d=l.value===a,[f,p]=t.useState(s??``),[m,h]=t.useState(!1),g=R(n,e=>u.itemRefCallback?.(e,a,o)),_=Fn(),v=t.useRef(`touch`),y=()=>{o||(l.onValueChange(a),l.onOpenChange(!1))};if(a===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,r.jsx)(Mp,{scope:i,value:a,disabled:o,textId:_,isSelected:d,onItemTextChange:t.useCallback(e=>{p(t=>t||(e?.textContent??``).trim())},[]),children:(0,r.jsx)(Wf.ItemSlot,{scope:i,value:a,disabled:o,textValue:f,children:(0,r.jsx)(z.div,{role:`option`,"aria-labelledby":_,"data-highlighted":m?``:void 0,"aria-selected":d&&m,"data-state":d?`checked`:`unchecked`,"aria-disabled":o||void 0,"data-disabled":o?``:void 0,tabIndex:o?void 0:-1,...c,ref:g,onFocus:B(c.onFocus,()=>h(!0)),onBlur:B(c.onBlur,()=>h(!1)),onClick:B(c.onClick,()=>{v.current!==`mouse`&&y()}),onPointerUp:B(c.onPointerUp,()=>{v.current===`mouse`&&y()}),onPointerDown:B(c.onPointerDown,e=>{v.current=e.pointerType}),onPointerMove:B(c.onPointerMove,e=>{v.current=e.pointerType,o?u.onItemLeave?.():v.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:B(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:B(c.onKeyDown,e=>{u.searchRef?.current!==``&&e.key===` `||(Hf.includes(e.key)&&y(),e.key===` `&&e.preventDefault())})})})})});Pp.displayName=jp;var Fp=`SelectItemText`,Ip=t.forwardRef((e,i)=>{let{__scopeSelect:a,className:o,style:s,...c}=e,l=Zf(Fp,a),u=pp(Fp,a),d=Np(Fp,a),f=$f(Fp,a),[p,m]=t.useState(null),h=R(i,e=>m(e),d.onItemTextChange,e=>u.itemTextRefCallback?.(e,d.value,d.disabled)),g=p?.textContent,_=t.useMemo(()=>(0,r.jsx)(`option`,{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return Cn(()=>(v(_),()=>y(_)),[v,y,_]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z.span,{id:d.textId,...c,ref:h}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?n.createPortal(c.children,l.valueNode):null]})});Ip.displayName=Fp;var Lp=`SelectItemIndicator`,Rp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e;return Np(Lp,n).isSelected?(0,r.jsx)(z.span,{"aria-hidden":!0,...i,ref:t}):null});Rp.displayName=Lp;var zp=`SelectScrollUpButton`,Bp=t.forwardRef((e,n)=>{let i=pp(zp,e.__scopeSelect),a=Sp(zp,e.__scopeSelect),[o,s]=t.useState(!1),c=R(n,a.onScrollButtonChange);return Cn(()=>{if(i.viewport&&i.isPositioned){let e=function(){s(t.scrollTop>0)},t=i.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[i.viewport,i.isPositioned]),o?(0,r.jsx)(Up,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=i;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Bp.displayName=zp;var Vp=`SelectScrollDownButton`,Hp=t.forwardRef((e,n)=>{let i=pp(Vp,e.__scopeSelect),a=Sp(Vp,e.__scopeSelect),[o,s]=t.useState(!1),c=R(n,a.onScrollButtonChange);return Cn(()=>{if(i.viewport&&i.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=i.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[i.viewport,i.isPositioned]),o?(0,r.jsx)(Up,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=i;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Hp.displayName=Vp;var Up=t.forwardRef((e,n)=>{let{__scopeSelect:i,onAutoScroll:a,...o}=e,s=pp(`SelectScrollButton`,i),c=t.useRef(null),l=Gf(i),u=t.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return t.useEffect(()=>()=>u(),[u]),Cn(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,r.jsx)(z.div,{"aria-hidden":!0,...o,ref:n,style:{flexShrink:0,...o.style},onPointerDown:B(o.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(a,50))}),onPointerMove:B(o.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(a,50))}),onPointerLeave:B(o.onPointerLeave,()=>{u()})})}),Wp=`SelectSeparator`,Gp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e;return(0,r.jsx)(z.div,{"aria-hidden":!0,...i,ref:t})});Gp.displayName=Wp;var Kp=`SelectArrow`,qp=t.forwardRef((e,t)=>{let{__scopeSelect:n,...i}=e,a=Yf(n),o=Zf(Kp,n),s=pp(Kp,n);return o.open&&s.position===`popper`?(0,r.jsx)(yc,{...a,...i,ref:t}):null});qp.displayName=Kp;var Jp=`SelectBubbleInput`,Yp=t.forwardRef(({__scopeSelect:e,value:n,...i},a)=>{let o=t.useRef(null),s=R(a,o),c=ka(n);return t.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==n&&r){let t=new Event(`change`,{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[c,n]),(0,r.jsx)(z.select,{...i,style:{...hn,...i.style},ref:s,defaultValue:n})});Yp.displayName=Jp;function Xp(e){return e===``||e===void 0}function Zp(e){let n=Bn(e),r=t.useRef(``),i=t.useRef(0),a=t.useCallback(e=>{let t=r.current+e;n(t),(function e(t){r.current=t,window.clearTimeout(i.current),t!==``&&(i.current=window.setTimeout(()=>e(``),1e3))})(t)},[n]),o=t.useCallback(()=>{r.current=``,window.clearTimeout(i.current)},[]);return t.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,a,o]}function Qp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$p(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function $p(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var em=ep,tm=np,nm=ip,rm=op,im=cp,am=up,om=wp,sm=Op,cm=Ap,lm=Pp,um=Ip,dm=Rp,fm=Gp,pm=[`PageUp`,`PageDown`],mm=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],hm={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},gm=`Slider`,[_m,vm,ym]=Sn(gm),[bm,xm]=bn(gm,[ym]),[Sm,Cm]=bm(gm),wm=t.forwardRef((e,n)=>{let{name:i,min:a=0,max:o=100,step:s=1,orientation:c=`horizontal`,disabled:l=!1,minStepsBetweenThumbs:u=0,defaultValue:d=[a],value:f,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:g,..._}=e,v=t.useRef(new Set),y=t.useRef(0),b=c===`horizontal`?Dm:Om,[x=[],S]=Tn({prop:f,defaultProp:d,onChange:e=>{[...v.current][y.current]?.focus(),p(e)}}),C=t.useRef(x);function w(e){D(e,Hm(x,e))}function T(e){D(e,y.current)}function E(){let e=C.current[y.current];x[y.current]!==e&&m(x)}function D(e,t,{commit:n}={commit:!1}){let r=qm(s),i=bd(Jm(Math.round((e-a)/s)*s+a,r),[a,o]);S((e=[])=>{let r=zm(e,i,t);if(Gm(r,u*s)){y.current=r.indexOf(i);let t=String(r)!==String(e);return t&&n&&m(r),t?r:e}else return e})}return(0,r.jsx)(Sm,{scope:e.__scopeSlider,name:i,disabled:l,min:a,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:x,orientation:c,form:g,children:(0,r.jsx)(_m.Provider,{scope:e.__scopeSlider,children:(0,r.jsx)(_m.Slot,{scope:e.__scopeSlider,children:(0,r.jsx)(b,{"aria-disabled":l,"data-disabled":l?``:void 0,..._,ref:n,onPointerDown:B(_.onPointerDown,()=>{l||(C.current=x)}),min:a,max:o,inverted:h,onSlideStart:l?void 0:w,onSlideMove:l?void 0:T,onSlideEnd:l?void 0:E,onHomeKeyDown:()=>!l&&D(a,0,{commit:!0}),onEndKeyDown:()=>!l&&D(o,x.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){let n=pm.includes(e.key)||e.shiftKey&&mm.includes(e.key)?10:1,r=y.current,i=x[r];D(i+s*n*t,r,{commit:!0})}}})})})})});wm.displayName=gm;var[Tm,Em]=bm(gm,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Dm=t.forwardRef((e,n)=>{let{min:i,max:a,dir:o,inverted:s,onSlideStart:c,onSlideMove:l,onSlideEnd:u,onStepKeyDown:d,...f}=e,[p,m]=t.useState(null),h=R(n,e=>m(e)),g=t.useRef(void 0),_=Rn(o),v=_===`ltr`,y=v&&!s||!v&&s;function b(e){let t=g.current||p.getBoundingClientRect(),n=Km([0,t.width],y?[i,a]:[a,i]);return g.current=t,n(e-t.left)}return(0,r.jsx)(Tm,{scope:e.__scopeSlider,startEdge:y?`left`:`right`,endEdge:y?`right`:`left`,direction:y?1:-1,size:`width`,children:(0,r.jsx)(km,{dir:_,"data-orientation":`horizontal`,...f,ref:h,style:{...f.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=b(e.clientX);c?.(t)},onSlideMove:e=>{let t=b(e.clientX);l?.(t)},onSlideEnd:()=>{g.current=void 0,u?.()},onStepKeyDown:e=>{let t=hm[y?`from-left`:`from-right`].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),Om=t.forwardRef((e,n)=>{let{min:i,max:a,inverted:o,onSlideStart:s,onSlideMove:c,onSlideEnd:l,onStepKeyDown:u,...d}=e,f=t.useRef(null),p=R(n,f),m=t.useRef(void 0),h=!o;function g(e){let t=m.current||f.current.getBoundingClientRect(),n=Km([0,t.height],h?[a,i]:[i,a]);return m.current=t,n(e-t.top)}return(0,r.jsx)(Tm,{scope:e.__scopeSlider,startEdge:h?`bottom`:`top`,endEdge:h?`top`:`bottom`,size:`height`,direction:h?1:-1,children:(0,r.jsx)(km,{"data-orientation":`vertical`,...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=g(e.clientY);s?.(t)},onSlideMove:e=>{let t=g(e.clientY);c?.(t)},onSlideEnd:()=>{m.current=void 0,l?.()},onStepKeyDown:e=>{let t=hm[h?`from-bottom`:`from-top`].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),km=t.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:i,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:c,onStepKeyDown:l,...u}=e,d=Cm(gm,n);return(0,r.jsx)(z.span,{...u,ref:t,onKeyDown:B(e.onKeyDown,e=>{e.key===`Home`?(s(e),e.preventDefault()):e.key===`End`?(c(e),e.preventDefault()):pm.concat(mm).includes(e.key)&&(l(e),e.preventDefault())}),onPointerDown:B(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus():i(e)}),onPointerMove:B(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:B(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),Am=`SliderTrack`,jm=t.forwardRef((e,t)=>{let{__scopeSlider:n,...i}=e,a=Cm(Am,n);return(0,r.jsx)(z.span,{"data-disabled":a.disabled?``:void 0,"data-orientation":a.orientation,...i,ref:t})});jm.displayName=Am;var Mm=`SliderRange`,Nm=t.forwardRef((e,n)=>{let{__scopeSlider:i,...a}=e,o=Cm(Mm,i),s=Em(Mm,i),c=R(n,t.useRef(null)),l=o.values.length,u=o.values.map(e=>Bm(e,o.min,o.max)),d=l>1?Math.min(...u):0,f=100-Math.max(...u);return(0,r.jsx)(z.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,...a,ref:c,style:{...e.style,[s.startEdge]:d+`%`,[s.endEdge]:f+`%`}})});Nm.displayName=Mm;var Pm=`SliderThumb`,Fm=t.forwardRef((e,n)=>{let i=vm(e.__scopeSlider),[a,o]=t.useState(null),s=R(n,e=>o(e)),c=t.useMemo(()=>a?i().findIndex(e=>e.ref.current===a):-1,[i,a]);return(0,r.jsx)(Im,{...e,ref:s,index:c})}),Im=t.forwardRef((e,n)=>{let{__scopeSlider:i,index:a,name:o,...s}=e,c=Cm(Pm,i),l=Em(Pm,i),[u,d]=t.useState(null),f=R(n,e=>d(e)),p=u?c.form||!!u.closest(`form`):!0,m=Aa(u),h=c.values[a],g=h===void 0?0:Bm(h,c.min,c.max),_=Vm(a,c.values.length),v=m?.[l.size],y=v?Um(v,g,l.direction):0;return t.useEffect(()=>{if(u)return c.thumbs.add(u),()=>{c.thumbs.delete(u)}},[u,c.thumbs]),(0,r.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[l.startEdge]:`calc(${g}% + ${y}px)`},children:[(0,r.jsx)(_m.ItemSlot,{scope:e.__scopeSlider,children:(0,r.jsx)(z.span,{role:`slider`,"aria-label":e[`aria-label`]||_,"aria-valuemin":c.min,"aria-valuenow":h,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?``:void 0,tabIndex:c.disabled?void 0:0,...s,ref:f,style:h===void 0?{display:`none`}:e.style,onFocus:B(e.onFocus,()=>{c.valueIndexToChangeRef.current=a})})}),p&&(0,r.jsx)(Rm,{name:o??(c.name?c.name+(c.values.length>1?`[]`:``):void 0),form:c.form,value:h},a)]})});Fm.displayName=Pm;var Lm=`RadioBubbleInput`,Rm=t.forwardRef(({__scopeSlider:e,value:n,...i},a)=>{let o=t.useRef(null),s=R(o,a),c=ka(n);return t.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==n&&r){let t=new Event(`input`,{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[c,n]),(0,r.jsx)(z.input,{style:{display:`none`},...i,ref:s,defaultValue:n})});Rm.displayName=Lm;function zm(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Bm(e,t,n){return bd(100/(n-t)*(e-t),[0,100])}function Vm(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Hm(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Um(e,t,n){let r=e/2;return(r-Km([0,50],[0,r])(t)*n)*n}function Wm(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Gm(e,t){if(t>0){let n=Wm(e);return Math.min(...n)>=t}return!0}function Km(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function qm(e){return(String(e).split(`.`)[1]||``).length}function Jm(e,t){let n=10**t;return Math.round(e*n)/n}var Ym=wm,Xm=jm,Zm=Nm,Qm=Fm,$m=`Switch`,[eh,th]=bn($m),[nh,rh]=eh($m),ih=t.forwardRef((e,n)=>{let{__scopeSwitch:i,name:a,checked:o,defaultChecked:s,required:c,disabled:l,value:u=`on`,onCheckedChange:d,form:f,...p}=e,[m,h]=t.useState(null),g=R(n,e=>h(e)),_=t.useRef(!1),v=m?f||!!m.closest(`form`):!0,[y,b]=Tn({prop:o,defaultProp:s??!1,onChange:d,caller:$m});return(0,r.jsxs)(nh,{scope:i,checked:y,disabled:l,children:[(0,r.jsx)(z.button,{type:`button`,role:`switch`,"aria-checked":y,"aria-required":c,"data-state":lh(y),"data-disabled":l?``:void 0,disabled:l,value:u,...p,ref:g,onClick:B(e.onClick,e=>{b(e=>!e),v&&(_.current=e.isPropagationStopped(),_.current||e.stopPropagation())})}),v&&(0,r.jsx)(ch,{control:m,bubbles:!_.current,name:a,value:u,checked:y,required:c,disabled:l,form:f,style:{transform:`translateX(-100%)`}})]})});ih.displayName=$m;var ah=`SwitchThumb`,oh=t.forwardRef((e,t)=>{let{__scopeSwitch:n,...i}=e,a=rh(ah,n);return(0,r.jsx)(z.span,{"data-state":lh(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})});oh.displayName=ah;var sh=`SwitchBubbleInput`,ch=t.forwardRef(({__scopeSwitch:e,control:n,checked:i,bubbles:a=!0,...o},s)=>{let c=t.useRef(null),l=R(c,s),u=ka(i),d=Aa(n);return t.useEffect(()=>{let e=c.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(u!==i&&n){let t=new Event(`click`,{bubbles:a});n.call(e,i),e.dispatchEvent(t)}},[u,i,a]),(0,r.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:i,...o,tabIndex:-1,ref:l,style:{...o.style,...d,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});ch.displayName=sh;function lh(e){return e?`checked`:`unchecked`}var uh=ih,dh=oh,fh=`Tabs`,[ph,mh]=bn(fh,[Dc]),hh=Dc(),[gh,_h]=ph(fh),vh=t.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:c,activationMode:l=`automatic`,...u}=e,d=Rn(c),[f,p]=Tn({prop:i,onChange:a,defaultProp:o??``,caller:fh});return(0,r.jsx)(gh,{scope:n,baseId:Fn(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:l,children:(0,r.jsx)(z.div,{dir:d,"data-orientation":s,...u,ref:t})})});vh.displayName=fh;var yh=`TabsList`,bh=t.forwardRef((e,t)=>{let{__scopeTabs:n,loop:i=!0,...a}=e,o=_h(yh,n),s=hh(n);return(0,r.jsx)(zc,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,r.jsx)(z.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});bh.displayName=yh;var xh=`TabsTrigger`,Sh=t.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,disabled:a=!1,...o}=e,s=_h(xh,n),c=hh(n),l=Th(s.baseId,i),u=Eh(s.baseId,i),d=i===s.value;return(0,r.jsx)(Bc,{asChild:!0,...c,focusable:!a,active:d,children:(0,r.jsx)(z.button,{type:`button`,role:`tab`,"aria-selected":d,"aria-controls":u,"data-state":d?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:l,...o,ref:t,onMouseDown:B(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?s.onValueChange(i):e.preventDefault()}),onKeyDown:B(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(i)}),onFocus:B(e.onFocus,()=>{let e=s.activationMode!==`manual`;!d&&!a&&e&&s.onValueChange(i)})})})});Sh.displayName=xh;var Ch=`TabsContent`,wh=t.forwardRef((e,n)=>{let{__scopeTabs:i,value:a,forceMount:o,children:s,...c}=e,l=_h(Ch,i),u=Th(l.baseId,a),d=Eh(l.baseId,a),f=a===l.value,p=t.useRef(f);return t.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,r.jsx)(kn,{present:o||f,children:({present:t})=>(0,r.jsx)(z.div,{"data-state":f?`active`:`inactive`,"data-orientation":l.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!t,id:d,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:t&&s})})});wh.displayName=Ch;function Th(e,t){return`${e}-trigger-${t}`}function Eh(e,t){return`${e}-content-${t}`}var Dh=vh,Oh=bh,kh=Sh,Ah=wh,jh=`Toggle`,Mh=t.forwardRef((e,t)=>{let{pressed:n,defaultPressed:i,onPressedChange:a,...o}=e,[s,c]=Tn({prop:n,onChange:a,defaultProp:i??!1,caller:jh});return(0,r.jsx)(z.button,{type:`button`,"aria-pressed":s,"data-state":s?`on`:`off`,"data-disabled":e.disabled?``:void 0,...o,ref:t,onClick:B(e.onClick,()=>{e.disabled||c(!s)})})});Mh.displayName=jh;var Nh=`ToggleGroup`,[Ph,Fh]=bn(Nh,[Dc]),Ih=Dc(),Lh=t.default.forwardRef((e,t)=>{let{type:n,...i}=e;if(n===`single`)return(0,r.jsx)(Bh,{...i,ref:t});if(n===`multiple`)return(0,r.jsx)(Vh,{...i,ref:t});throw Error(`Missing prop \`type\` expected on \`${Nh}\``)});Lh.displayName=Nh;var[Rh,zh]=Ph(Nh),Bh=t.default.forwardRef((e,n)=>{let{value:i,defaultValue:a,onValueChange:o=()=>{},...s}=e,[c,l]=Tn({prop:i,defaultProp:a??``,onChange:o,caller:Nh});return(0,r.jsx)(Rh,{scope:e.__scopeToggleGroup,type:`single`,value:t.default.useMemo(()=>c?[c]:[],[c]),onItemActivate:l,onItemDeactivate:t.default.useCallback(()=>l(``),[l]),children:(0,r.jsx)(Wh,{...s,ref:n})})}),Vh=t.default.forwardRef((e,n)=>{let{value:i,defaultValue:a,onValueChange:o=()=>{},...s}=e,[c,l]=Tn({prop:i,defaultProp:a??[],onChange:o,caller:Nh}),u=t.default.useCallback(e=>l((t=[])=>[...t,e]),[l]),d=t.default.useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return(0,r.jsx)(Rh,{scope:e.__scopeToggleGroup,type:`multiple`,value:c,onItemActivate:u,onItemDeactivate:d,children:(0,r.jsx)(Wh,{...s,ref:n})})});Lh.displayName=Nh;var[Hh,Uh]=Ph(Nh),Wh=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,disabled:i=!1,rovingFocus:a=!0,orientation:o,dir:s,loop:c=!0,...l}=e,u=Ih(n),d=Rn(s),f={role:`group`,dir:d,...l};return(0,r.jsx)(Hh,{scope:n,rovingFocus:a,disabled:i,children:a?(0,r.jsx)(zc,{asChild:!0,...u,orientation:o,dir:d,loop:c,children:(0,r.jsx)(z.div,{...f,ref:t})}):(0,r.jsx)(z.div,{...f,ref:t})})}),Gh=`ToggleGroupItem`,Kh=t.default.forwardRef((e,n)=>{let i=zh(Gh,e.__scopeToggleGroup),a=Uh(Gh,e.__scopeToggleGroup),o=Ih(e.__scopeToggleGroup),s=i.value.includes(e.value),c=a.disabled||e.disabled,l={...e,pressed:s,disabled:c},u=t.default.useRef(null);return a.rovingFocus?(0,r.jsx)(Bc,{asChild:!0,...o,focusable:!c,active:s,ref:u,children:(0,r.jsx)(qh,{...l,ref:n})}):(0,r.jsx)(qh,{...l,ref:n})});Kh.displayName=Gh;var qh=t.default.forwardRef((e,t)=>{let{__scopeToggleGroup:n,value:i,...a}=e,o=zh(Gh,n),s={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,r.jsx)(Mh,{...o.type===`single`?s:void 0,...a,ref:t,onPressedChange:e=>{e?o.onItemActivate(i):o.onItemDeactivate(i)}})}),Jh=Lh,Yh=Kh,[Xh,Zh]=bn(`Tooltip`,[ec]),Qh=ec(),$h=`TooltipProvider`,eg=700,tg=`tooltip.open`,[ng,rg]=Xh($h),ig=e=>{let{__scopeTooltip:n,delayDuration:i=eg,skipDelayDuration:a=300,disableHoverableContent:o=!1,children:s}=e,c=t.useRef(!0),l=t.useRef(!1),u=t.useRef(0);return t.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,r.jsx)(ng,{scope:n,isOpenDelayedRef:c,delayDuration:i,onOpen:t.useCallback(()=>{window.clearTimeout(u.current),c.current=!1},[]),onClose:t.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.current=!0,a)},[a]),isPointerInTransitRef:l,onPointerInTransitChange:t.useCallback(e=>{l.current=e},[]),disableHoverableContent:o,children:s})};ig.displayName=$h;var ag=`Tooltip`,[og,sg]=Xh(ag),cg=e=>{let{__scopeTooltip:n,children:i,open:a,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:l}=e,u=rg(ag,e.__scopeTooltip),d=Qh(n),[f,p]=t.useState(null),m=Fn(),h=t.useRef(0),g=c??u.disableHoverableContent,_=l??u.delayDuration,v=t.useRef(!1),[y,b]=Tn({prop:a,defaultProp:o??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(tg))):u.onClose(),s?.(e)},caller:ag}),x=t.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=t.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=t.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);return t.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]),(0,r.jsx)(gc,{...d,children:(0,r.jsx)(og,{scope:n,contentId:m,open:y,stateAttribute:x,trigger:f,onTriggerChange:p,onTriggerEnter:t.useCallback(()=>{u.isOpenDelayedRef.current?w():S()},[u.isOpenDelayedRef,w,S]),onTriggerLeave:t.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:i})})};cg.displayName=ag;var lg=`TooltipTrigger`,ug=t.forwardRef((e,n)=>{let{__scopeTooltip:i,...a}=e,o=sg(lg,i),s=rg(lg,i),c=Qh(i),l=R(n,t.useRef(null),o.onTriggerChange),u=t.useRef(!1),d=t.useRef(!1),f=t.useCallback(()=>u.current=!1,[]);return t.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,r.jsx)(_c,{asChild:!0,...c,children:(0,r.jsx)(z.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:l,onPointerMove:B(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:B(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:B(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:B(e.onBlur,o.onClose),onClick:B(e.onClick,o.onClose)})})});ug.displayName=lg;var dg=`TooltipPortal`,[fg,pg]=Xh(dg,{forceMount:void 0}),mg=e=>{let{__scopeTooltip:t,forceMount:n,children:i,container:a}=e,o=sg(dg,t);return(0,r.jsx)(fg,{scope:t,forceMount:n,children:(0,r.jsx)(kn,{present:n||o.open,children:(0,r.jsx)(vr,{asChild:!0,container:a,children:i})})})};mg.displayName=dg;var hg=`TooltipContent`,gg=t.forwardRef((e,t)=>{let n=pg(hg,e.__scopeTooltip),{forceMount:i=n.forceMount,side:a=`top`,...o}=e,s=sg(hg,e.__scopeTooltip);return(0,r.jsx)(kn,{present:i||s.open,children:s.disableHoverableContent?(0,r.jsx)(xg,{side:a,...o,ref:t}):(0,r.jsx)(_g,{side:a,...o,ref:t})})}),_g=t.forwardRef((e,n)=>{let i=sg(hg,e.__scopeTooltip),a=rg(hg,e.__scopeTooltip),o=t.useRef(null),s=R(n,o),[c,l]=t.useState(null),{trigger:u,onClose:d}=i,f=o.current,{onPointerInTransitChange:p}=a,m=t.useCallback(()=>{l(null),p(!1)},[p]),h=t.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Tg(r,wg(r,n.getBoundingClientRect())),a=Eg(t.getBoundingClientRect());l(Og([...i,...a])),p(!0)},[p]);return t.useEffect(()=>()=>m(),[m]),t.useEffect(()=>{if(u&&f){let e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener(`pointerleave`,e),f.addEventListener(`pointerleave`,t),()=>{u.removeEventListener(`pointerleave`,e),f.removeEventListener(`pointerleave`,t)}}},[u,f,h,m]),t.useEffect(()=>{if(c){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),i=!Dg(n,c);r?m():i&&(m(),d())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[u,f,c,d,m]),(0,r.jsx)(xg,{...e,ref:s})}),[vg,yg]=Xh(ag,{isInside:!1}),bg=ln(`TooltipContent`),xg=t.forwardRef((e,n)=>{let{__scopeTooltip:i,children:a,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...l}=e,u=sg(hg,i),d=Qh(i),{onClose:f}=u;return t.useEffect(()=>(document.addEventListener(tg,f),()=>document.removeEventListener(tg,f)),[f]),t.useEffect(()=>{if(u.trigger){let e=e=>{e.target?.contains(u.trigger)&&f()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]),(0,r.jsx)(Jn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,r.jsxs)(vc,{"data-state":u.stateAttribute,...d,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,r.jsx)(bg,{children:a}),(0,r.jsx)(vg,{scope:i,isInside:!0,children:(0,r.jsx)(vn,{id:u.contentId,role:`tooltip`,children:o||a})})]})})});gg.displayName=hg;var Sg=`TooltipArrow`,Cg=t.forwardRef((e,t)=>{let{__scopeTooltip:n,...i}=e,a=Qh(n);return yg(Sg,n).isInside?null:(0,r.jsx)(yc,{...a,...i,ref:t})});Cg.displayName=Sg;function wg(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Tg(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Eg(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Dg(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Og(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),kg(t)}function kg(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Ag=ig,jg=cg,Mg=ug,Ng=mg,Pg=gg,Fg=Cg,V=f(((e,t)=>{(function(){var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()})),Ig={asChild:{type:`boolean`}},Lg={width:{type:`string`,className:`rt-r-w`,customProperties:[`--width`],responsive:!0},minWidth:{type:`string`,className:`rt-r-min-w`,customProperties:[`--min-width`],responsive:!0},maxWidth:{type:`string`,className:`rt-r-max-w`,customProperties:[`--max-width`],responsive:!0}},Rg={height:{type:`string`,className:`rt-r-h`,customProperties:[`--height`],responsive:!0},minHeight:{type:`string`,className:`rt-r-min-h`,customProperties:[`--min-height`],responsive:!0},maxHeight:{type:`string`,className:`rt-r-max-h`,customProperties:[`--max-height`],responsive:!0}},zg=[`1`,`2`,`3`,`4`],Bg={...Ig,align:{type:`enum`,className:`rt-r-align`,values:[`start`,`center`],default:`center`},size:{type:`enum`,className:`rt-r-size`,values:zg,default:`3`,responsive:!0},width:Lg.width,minWidth:Lg.minWidth,maxWidth:{...Lg.maxWidth,default:`600px`},...Rg},Vg=`gray.gold.bronze.brown.yellow.amber.orange.tomato.red.ruby.crimson.pink.plum.purple.violet.iris.indigo.blue.cyan.teal.jade.green.grass.lime.mint.sky`.split(`.`),Hg=[`auto`,`gray`,`mauve`,`slate`,`sage`,`olive`,`sand`],Ug={color:{type:`enum`,values:Vg,default:void 0}},Wg={color:{type:`enum`,values:Vg,default:``}},Gg={highContrast:{type:`boolean`,className:`rt-high-contrast`,default:void 0}},Kg={trim:{type:`enum`,className:`rt-r-lt`,values:[`normal`,`start`,`end`,`both`],responsive:!0}},qg={align:{type:`enum`,className:`rt-r-ta`,values:[`left`,`center`,`right`],responsive:!0}},Jg={wrap:{type:`enum`,className:`rt-r-tw`,values:[`wrap`,`nowrap`,`pretty`,`balance`],responsive:!0}},Yg={truncate:{type:`boolean`,className:`rt-truncate`}},Xg={weight:{type:`enum`,className:`rt-r-weight`,values:[`light`,`regular`,`medium`,`bold`],responsive:!0}},Zg=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Qg=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],$g={as:{type:`enum`,values:Zg,default:`h1`},...Ig,size:{type:`enum`,className:`rt-r-size`,values:Qg,default:`6`,responsive:!0},...Xg,...qg,...Kg,...Yg,...Jg,...Ug,...Gg},e_=[`initial`,`xs`,`sm`,`md`,`lg`,`xl`];function t_(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n_(e){return typeof e==`object`&&Object.keys(e).some(e=>e_.includes(e))}function r_({className:e,customProperties:t,...n}){return[i_({allowArbitraryValues:!0,className:e,...n}),o_({customProperties:t,...n})]}function i_({allowArbitraryValues:e,value:t,className:n,propValues:r,parseValue:i=e=>e}){let a=[];if(t){if(typeof t==`string`&&r.includes(t))return a_(n,t,i);if(n_(t)){let o=t;for(let t in o){if(!t_(o,t)||!e_.includes(t))continue;let s=o[t];if(s!==void 0){if(r.includes(s)){let e=a_(n,s,i),r=t===`initial`?e:`${t}:${e}`;a.push(r)}else if(e){let e=t===`initial`?n:`${t}:${n}`;a.push(e)}}}return a.join(` `)}if(e)return n}}function a_(e,t,n){let r=e?`-`:``,i=n(t),a=i?.startsWith(`-`);return`${a?`-`:``}${e}${r}${a?i?.substring(1):i}`}function o_({customProperties:e,value:t,propValues:n,parseValue:r=e=>e}){let i={};if(!(!t||typeof t==`string`&&n.includes(t))){if(typeof t==`string`&&(i=Object.fromEntries(e.map(e=>[e,t]))),n_(t)){let r=t;for(let t in r){if(!t_(r,t)||!e_.includes(t))continue;let a=r[t];if(!n.includes(a))for(let n of e)i={[t===`initial`?n:`${n}-${t}`]:a,...i}}}for(let e in i){let t=i[e];t!==void 0&&(i[e]=r(t))}return i}}function s_(...e){let t={};for(let n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}var c_=h(V());function l_(...e){return Object.assign({},...e)}function H(e,...t){let n,r,i={...e},a=l_(...t);for(let e in a){let t=i[e],o=a[e];if(o.default!==void 0&&t===void 0&&(t=o.default),o.type===`enum`&&![o.default,...o.values].includes(t)&&!n_(t)&&(t=o.default),i[e]=t,`className`in o&&o.className){delete i[e];let a=`responsive`in o;if(!t||n_(t)&&!a)continue;if(n_(t)&&(o.default!==void 0&&t.initial===void 0&&(t.initial=o.default),o.type===`enum`&&([o.default,...o.values].includes(t.initial)||(t.initial=o.default))),o.type===`enum`){let e=i_({allowArbitraryValues:!1,value:t,className:o.className,propValues:o.values,parseValue:o.parseValue});n=(0,c_.default)(n,e);continue}if(o.type===`string`||o.type===`enum | string`){let e=o.type===`string`?[]:o.values,[i,a]=r_({className:o.className,customProperties:o.customProperties,propValues:e,parseValue:o.parseValue,value:t});r=s_(r,a),n=(0,c_.default)(n,i);continue}if(o.type===`boolean`&&t){n=(0,c_.default)(n,o.className);continue}}}return i.className=(0,c_.default)(n,e.className),i.style=s_(r,e.style),i}var u_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`-1`,`-2`,`-3`,`-4`,`-5`,`-6`,`-7`,`-8`,`-9`],d_={m:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-m`,customProperties:[`--m`]},mx:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-mx`,customProperties:[`--ml`,`--mr`]},my:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-my`,customProperties:[`--mt`,`--mb`]},mt:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-mt`,customProperties:[`--mt`]},mr:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-mr`,customProperties:[`--mr`]},mb:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-mb`,customProperties:[`--mb`]},ml:{type:`enum | string`,values:u_,responsive:!0,className:`rt-r-ml`,customProperties:[`--ml`]}},f_=h(V()),p_=t.forwardRef((e,n)=>{let{children:r,className:i,asChild:a,as:o=`h1`,color:s,...c}=H(e,$g,d_);return t.createElement(on,{"data-accent-color":s,...c,ref:n,className:(0,f_.default)(`rt-Heading`,i)},a?r:t.createElement(o,null,r))});p_.displayName=`Heading`;var m_=[`span`,`div`,`label`,`p`],h_=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],g_={as:{type:`enum`,values:m_,default:`span`},...Ig,size:{type:`enum`,className:`rt-r-size`,values:h_,responsive:!0},...Xg,...qg,...Kg,...Yg,...Jg,...Ug,...Gg},__=h(V()),U=t.forwardRef((e,n)=>{let{children:r,className:i,asChild:a,as:o=`span`,color:s,...c}=H(e,g_,d_);return t.createElement(on,{"data-accent-color":s,...c,ref:n,className:(0,__.default)(`rt-Text`,i)},a?r:t.createElement(o,null,r))});U.displayName=`Text`;function v_(e){switch(e){case`tomato`:case`red`:case`ruby`:case`crimson`:case`pink`:case`plum`:case`purple`:case`violet`:return`mauve`;case`iris`:case`indigo`:case`blue`:case`sky`:case`cyan`:return`slate`;case`teal`:case`jade`:case`mint`:case`green`:return`sage`;case`grass`:case`lime`:return`olive`;case`yellow`:case`amber`:case`orange`:case`brown`:case`gold`:case`bronze`:return`sand`;case`gray`:return`gray`}}var y_=[`none`,`small`,`medium`,`large`,`full`],b_={radius:{type:`enum`,values:y_,default:void 0}},x_=[`inherit`,`light`,`dark`],S_=[`solid`,`translucent`],C_=[`90%`,`95%`,`100%`,`105%`,`110%`],w_={...Ig,hasBackground:{type:`boolean`,default:!0},appearance:{type:`enum`,values:x_,default:`inherit`},accentColor:{type:`enum`,values:Vg,default:`indigo`},grayColor:{type:`enum`,values:Hg,default:`auto`},panelBackground:{type:`enum`,values:S_,default:`translucent`},radius:{type:`enum`,values:y_,default:`medium`},scaling:{type:`enum`,values:C_,default:`100%`}},T_=h(V()),E_=()=>{},D_=t.createContext(void 0);function O_(){let e=t.useContext(D_);if(e===void 0)throw Error("`useThemeContext` must be used within a `Theme`");return e}var k_=t.forwardRef((e,n)=>t.useContext(D_)===void 0?t.createElement(Ag,{delayDuration:200},t.createElement(zn,{dir:`ltr`},t.createElement(A_,{...e,ref:n}))):t.createElement(j_,{...e,ref:n}));k_.displayName=`Theme`;var A_=t.forwardRef((e,n)=>{let{appearance:r=w_.appearance.default,accentColor:i=w_.accentColor.default,grayColor:a=w_.grayColor.default,panelBackground:o=w_.panelBackground.default,radius:s=w_.radius.default,scaling:c=w_.scaling.default,hasBackground:l=w_.hasBackground.default,...u}=e,[d,f]=t.useState(r);t.useEffect(()=>f(r),[r]);let[p,m]=t.useState(i);t.useEffect(()=>m(i),[i]);let[h,g]=t.useState(a);t.useEffect(()=>g(a),[a]);let[_,v]=t.useState(o);t.useEffect(()=>v(o),[o]);let[y,b]=t.useState(s);t.useEffect(()=>b(s),[s]);let[x,S]=t.useState(c);return t.useEffect(()=>S(c),[c]),t.createElement(j_,{...u,ref:n,isRoot:!0,hasBackground:l,appearance:d,accentColor:p,grayColor:h,panelBackground:_,radius:y,scaling:x,onAppearanceChange:f,onAccentColorChange:m,onGrayColorChange:g,onPanelBackgroundChange:v,onRadiusChange:b,onScalingChange:S})});A_.displayName=`ThemeRoot`;var j_=t.forwardRef((e,n)=>{let r=t.useContext(D_),{asChild:i,isRoot:a,hasBackground:o,appearance:s=r?.appearance??w_.appearance.default,accentColor:c=r?.accentColor??w_.accentColor.default,grayColor:l=r?.resolvedGrayColor??w_.grayColor.default,panelBackground:u=r?.panelBackground??w_.panelBackground.default,radius:d=r?.radius??w_.radius.default,scaling:f=r?.scaling??w_.scaling.default,onAppearanceChange:p=E_,onAccentColorChange:m=E_,onGrayColorChange:h=E_,onPanelBackgroundChange:g=E_,onRadiusChange:_=E_,onScalingChange:v=E_,...y}=e,b=i?on:`div`,x=l===`auto`?v_(c):l,S=e.appearance===`light`||e.appearance===`dark`,C=o===void 0?a||S:o;return t.createElement(D_.Provider,{value:t.useMemo(()=>({appearance:s,accentColor:c,grayColor:l,resolvedGrayColor:x,panelBackground:u,radius:d,scaling:f,onAppearanceChange:p,onAccentColorChange:m,onGrayColorChange:h,onPanelBackgroundChange:g,onRadiusChange:_,onScalingChange:v}),[s,c,l,x,u,d,f,p,m,h,g,_,v])},t.createElement(b,{"data-is-root-theme":a?`true`:`false`,"data-accent-color":c,"data-gray-color":x,"data-has-background":C?`true`:`false`,"data-panel-background":u,"data-radius":d,"data-scaling":f,ref:n,...y,className:(0,T_.default)(`radix-themes`,{light:s===`light`,dark:s===`dark`},y.className)}))});j_.displayName=`ThemeImpl`;var M_=e=>{if(!t.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${t.Children.toArray(e).map(e=>typeof e==`object`&&`type`in e&&typeof e.type==`string`?e.type:typeof e).join(`, `)}`);return e};function N_(e,n){let{asChild:r,children:i}=e;if(!r)return typeof n==`function`?n(i):n;let a=t.Children.only(i);return t.cloneElement(a,{children:typeof n==`function`?n(a.props.children):n})}var P_=[`1`,`2`,`3`],F_=[`solid`,`soft`,`surface`,`outline`],I_={...Ig,size:{type:`enum`,className:`rt-r-size`,values:P_,default:`1`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:F_,default:`soft`},...Wg,...Gg,...b_},L_=h(V()),R_=t.forwardRef((e,n)=>{let{asChild:r,className:i,color:a,radius:o,...s}=H(e,I_,d_),c=r?on:`span`;return t.createElement(c,{"data-accent-color":a,"data-radius":o,...s,ref:n,className:(0,L_.default)(`rt-reset`,`rt-Badge`,i)})});R_.displayName=`Badge`;var z_=on,B_=[`div`,`span`],V_=[`none`,`inline`,`inline-block`,`block`,`contents`],H_={as:{type:`enum`,values:B_,default:`div`},...Ig,display:{type:`enum`,className:`rt-r-display`,values:V_,responsive:!0}},U_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],W_={p:{type:`enum | string`,className:`rt-r-p`,customProperties:[`--p`],values:U_,responsive:!0},px:{type:`enum | string`,className:`rt-r-px`,customProperties:[`--pl`,`--pr`],values:U_,responsive:!0},py:{type:`enum | string`,className:`rt-r-py`,customProperties:[`--pt`,`--pb`],values:U_,responsive:!0},pt:{type:`enum | string`,className:`rt-r-pt`,customProperties:[`--pt`],values:U_,responsive:!0},pr:{type:`enum | string`,className:`rt-r-pr`,customProperties:[`--pr`],values:U_,responsive:!0},pb:{type:`enum | string`,className:`rt-r-pb`,customProperties:[`--pb`],values:U_,responsive:!0},pl:{type:`enum | string`,className:`rt-r-pl`,customProperties:[`--pl`],values:U_,responsive:!0}},G_=[`visible`,`hidden`,`clip`,`scroll`,`auto`],K_=[`static`,`relative`,`absolute`,`fixed`,`sticky`],q_=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`-1`,`-2`,`-3`,`-4`,`-5`,`-6`,`-7`,`-8`,`-9`],J_=[`0`,`1`],Y_=[`0`,`1`],X_={...W_,...Lg,...Rg,position:{type:`enum`,className:`rt-r-position`,values:K_,responsive:!0},inset:{type:`enum | string`,className:`rt-r-inset`,customProperties:[`--inset`],values:q_,responsive:!0},top:{type:`enum | string`,className:`rt-r-top`,customProperties:[`--top`],values:q_,responsive:!0},right:{type:`enum | string`,className:`rt-r-right`,customProperties:[`--right`],values:q_,responsive:!0},bottom:{type:`enum | string`,className:`rt-r-bottom`,customProperties:[`--bottom`],values:q_,responsive:!0},left:{type:`enum | string`,className:`rt-r-left`,customProperties:[`--left`],values:q_,responsive:!0},overflow:{type:`enum`,className:`rt-r-overflow`,values:G_,responsive:!0},overflowX:{type:`enum`,className:`rt-r-ox`,values:G_,responsive:!0},overflowY:{type:`enum`,className:`rt-r-oy`,values:G_,responsive:!0},flexBasis:{type:`string`,className:`rt-r-fb`,customProperties:[`--flex-basis`],responsive:!0},flexShrink:{type:`enum | string`,className:`rt-r-fs`,customProperties:[`--flex-shrink`],values:J_,responsive:!0},flexGrow:{type:`enum | string`,className:`rt-r-fg`,customProperties:[`--flex-grow`],values:Y_,responsive:!0},gridArea:{type:`string`,className:`rt-r-ga`,customProperties:[`--grid-area`],responsive:!0},gridColumn:{type:`string`,className:`rt-r-gc`,customProperties:[`--grid-column`],responsive:!0},gridColumnStart:{type:`string`,className:`rt-r-gcs`,customProperties:[`--grid-column-start`],responsive:!0},gridColumnEnd:{type:`string`,className:`rt-r-gce`,customProperties:[`--grid-column-end`],responsive:!0},gridRow:{type:`string`,className:`rt-r-gr`,customProperties:[`--grid-row`],responsive:!0},gridRowStart:{type:`string`,className:`rt-r-grs`,customProperties:[`--grid-row-start`],responsive:!0},gridRowEnd:{type:`string`,className:`rt-r-gre`,customProperties:[`--grid-row-end`],responsive:!0}},Z_=h(V()),W=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=H(e,H_,X_,d_);return t.createElement(i?z_:a,{...o,ref:n,className:(0,Z_.default)(`rt-Box`,r)})});W.displayName=`Box`;var Q_=[`1`,`2`,`3`,`4`],$_=[`classic`,`solid`,`soft`,`surface`,`outline`,`ghost`],ev={...Ig,size:{type:`enum`,className:`rt-r-size`,values:Q_,default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:$_,default:`solid`},...Wg,...Gg,...b_,loading:{type:`boolean`,className:`rt-loading`,default:!1}},tv=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],nv={gap:{type:`enum | string`,className:`rt-r-gap`,customProperties:[`--gap`],values:tv,responsive:!0},gapX:{type:`enum | string`,className:`rt-r-cg`,customProperties:[`--column-gap`],values:tv,responsive:!0},gapY:{type:`enum | string`,className:`rt-r-rg`,customProperties:[`--row-gap`],values:tv,responsive:!0}},rv=[`div`,`span`],iv=[`none`,`inline-flex`,`flex`],av=[`row`,`column`,`row-reverse`,`column-reverse`],ov=[`start`,`center`,`end`,`baseline`,`stretch`],sv=[`start`,`center`,`end`,`between`],cv=[`nowrap`,`wrap`,`wrap-reverse`],lv={as:{type:`enum`,values:rv,default:`div`},...Ig,display:{type:`enum`,className:`rt-r-display`,values:iv,responsive:!0},direction:{type:`enum`,className:`rt-r-fd`,values:av,responsive:!0},align:{type:`enum`,className:`rt-r-ai`,values:ov,responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:sv,parseValue:uv,responsive:!0},wrap:{type:`enum`,className:`rt-r-fw`,values:cv,responsive:!0},...nv};function uv(e){return e===`between`?`space-between`:e}var dv=h(V()),G=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=H(e,lv,X_,d_);return t.createElement(i?z_:a,{...o,ref:n,className:(0,dv.default)(`rt-Flex`,r)})});G.displayName=`Flex`;var fv={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},loading:{type:`boolean`,default:!0}},pv=h(V()),mv=t.forwardRef((e,n)=>{let{className:r,children:i,loading:a,...o}=H(e,fv,d_);if(!a)return i;let s=t.createElement(`span`,{...o,ref:n,className:(0,pv.default)(`rt-Spinner`,r)},t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}),t.createElement(`span`,{className:`rt-SpinnerLeaf`}));return i===void 0?s:t.createElement(G,{asChild:!0,position:`relative`,align:`center`,justify:`center`},t.createElement(`span`,null,t.createElement(`span`,{"aria-hidden":!0,style:{display:`contents`,visibility:`hidden`},inert:void 0},i),t.createElement(G,{asChild:!0,align:`center`,justify:`center`,position:`absolute`,inset:`0`},t.createElement(`span`,null,s))))});mv.displayName=`Spinner`;var hv=vn;function gv(e,t){if(e!==void 0)return typeof e==`string`?t(e):Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)]))}function _v(e){switch(e){case`1`:return`1`;case`2`:case`3`:return`2`;case`4`:return`3`}}var vv=h(V()),yv=t.forwardRef((e,n)=>{let{size:r=ev.size.default}=e,{className:i,children:a,asChild:o,color:s,radius:c,disabled:l=e.loading,...u}=H(e,ev,d_),d=o?on:`button`;return t.createElement(d,{"data-disabled":l||void 0,"data-accent-color":s,"data-radius":c,...u,ref:n,className:(0,vv.default)(`rt-reset`,`rt-BaseButton`,i),disabled:l},e.loading?t.createElement(t.Fragment,null,t.createElement(`span`,{style:{display:`contents`,visibility:`hidden`},"aria-hidden":!0},a),t.createElement(hv,null,a),t.createElement(G,{asChild:!0,align:`center`,justify:`center`,position:`absolute`,inset:`0`},t.createElement(`span`,null,t.createElement(mv,{size:gv(r,_v)})))):a)});yv.displayName=`BaseButton`;var bv=h(V()),K=t.forwardRef(({className:e,...n},r)=>t.createElement(yv,{...n,ref:r,className:(0,bv.default)(`rt-Button`,e)}));K.displayName=`Button`;var xv=[`1`,`2`,`3`,`4`,`5`],Sv=[`surface`,`classic`,`ghost`],Cv={...Ig,size:{type:`enum`,className:`rt-r-size`,values:xv,default:`1`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:Sv,default:`surface`}},wv=h(V()),Tv=t.forwardRef((e,n)=>{let{asChild:r,className:i,...a}=H(e,Cv,d_),o=r?on:`div`;return t.createElement(o,{ref:n,...a,className:(0,wv.default)(`rt-reset`,`rt-BaseCard`,`rt-Card`,i)})});Tv.displayName=`Card`;var Ev=[`div`,`span`],Dv=[`none`,`inline-grid`,`grid`],Ov=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],kv=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],Av=[`row`,`column`,`dense`,`row-dense`,`column-dense`],jv=[`start`,`center`,`end`,`baseline`,`stretch`],Mv=[`start`,`center`,`end`,`between`],Nv={as:{type:`enum`,values:Ev,default:`div`},...Ig,display:{type:`enum`,className:`rt-r-display`,values:Dv,responsive:!0},areas:{type:`string`,className:`rt-r-gta`,customProperties:[`--grid-template-areas`],responsive:!0},columns:{type:`enum | string`,className:`rt-r-gtc`,customProperties:[`--grid-template-columns`],values:Ov,parseValue:Pv,responsive:!0},rows:{type:`enum | string`,className:`rt-r-gtr`,customProperties:[`--grid-template-rows`],values:kv,parseValue:Pv,responsive:!0},flow:{type:`enum`,className:`rt-r-gaf`,values:Av,responsive:!0},align:{type:`enum`,className:`rt-r-ai`,values:jv,responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:Mv,parseValue:Fv,responsive:!0},...nv};function Pv(e){return Nv.columns.values.includes(e)?e:e?.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function Fv(e){return e===`between`?`space-between`:e}var Iv=h(V()),Lv=t.forwardRef((e,n)=>{let{className:r,asChild:i,as:a=`div`,...o}=H(e,Nv,X_,d_);return t.createElement(i?z_:a,{...o,ref:n,className:(0,Iv.default)(`rt-Grid`,r)})});Lv.displayName=`Grid`;var Rv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.75 4.5C0.75 4.08579 1.08579 3.75 1.5 3.75H7.5C7.91421 3.75 8.25 4.08579 8.25 4.5C8.25 4.91421 7.91421 5.25 7.5 5.25H1.5C1.08579 5.25 0.75 4.91421 0.75 4.5Z`})));Rv.displayName=`ThickDividerHorizontalIcon`;var zv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z`})));zv.displayName=`ThickCheckIcon`;var Bv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{d:`M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z`})));Bv.displayName=`ChevronDownIcon`;var Vv=t.default.forwardRef((e,n)=>t.default.createElement(`svg`,{width:`9`,height:`9`,viewBox:`0 0 9 9`,fill:`currentcolor`,xmlns:`http://www.w3.org/2000/svg`,...e,ref:n},t.default.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z`})));Vv.displayName=`ThickChevronRightIcon`;var Hv=[`1`,`2`,`3`],Uv=[`vertical`,`horizontal`,`both`],Wv={...Ig,size:{type:`enum`,className:`rt-r-size`,values:Hv,default:`1`,responsive:!0},...b_,scrollbars:{type:`enum`,values:Uv,default:`both`}};function Gv(e){let{m:t,mx:n,my:r,mt:i,mr:a,mb:o,ml:s,...c}=e;return{m:t,mx:n,my:r,mt:i,mr:a,mb:o,ml:s,rest:c}}var Kv=h(V()),qv=d_.m.values;function Jv(e){let[t,n]=r_({className:`rt-r-m`,customProperties:[`--margin`],propValues:qv,value:e.m}),[r,i]=r_({className:`rt-r-mx`,customProperties:[`--margin-left`,`--margin-right`],propValues:qv,value:e.mx}),[a,o]=r_({className:`rt-r-my`,customProperties:[`--margin-top`,`--margin-bottom`],propValues:qv,value:e.my}),[s,c]=r_({className:`rt-r-mt`,customProperties:[`--margin-top`],propValues:qv,value:e.mt}),[l,u]=r_({className:`rt-r-mr`,customProperties:[`--margin-right`],propValues:qv,value:e.mr}),[d,f]=r_({className:`rt-r-mb`,customProperties:[`--margin-bottom`],propValues:qv,value:e.mb}),[p,m]=r_({className:`rt-r-ml`,customProperties:[`--margin-left`],propValues:qv,value:e.ml});return[(0,Kv.default)(t,r,a,s,l,d,p),s_(n,i,o,c,u,f,m)]}var Yv=h(V()),Xv=t.forwardRef((e,n)=>{let{rest:r,...i}=Gv(e),[a,o]=Jv(i),{asChild:s,children:c,className:l,style:u,type:d,scrollHideDelay:f=d===`scroll`?void 0:0,dir:p,size:m=Wv.size.default,radius:h=Wv.radius.default,scrollbars:g=Wv.scrollbars.default,..._}=r;return t.createElement(If,{type:d,scrollHideDelay:f,className:(0,Yv.default)(`rt-ScrollAreaRoot`,a,l),style:s_(o,u),asChild:s},N_({asChild:s,children:c},e=>t.createElement(t.Fragment,null,t.createElement(Lf,{..._,ref:n,className:`rt-ScrollAreaViewport`},e),t.createElement(`div`,{className:`rt-ScrollAreaViewportFocusRing`}),g===`vertical`?null:t.createElement(Rf,{"data-radius":h,orientation:`horizontal`,className:(0,Yv.default)(`rt-ScrollAreaScrollbar`,i_({className:`rt-r-size`,value:m,propValues:Wv.size.values}))},t.createElement(zf,{className:`rt-ScrollAreaThumb`})),g===`horizontal`?null:t.createElement(Rf,{"data-radius":h,orientation:`vertical`,className:(0,Yv.default)(`rt-ScrollAreaScrollbar`,i_({className:`rt-r-size`,value:m,propValues:Wv.size.values}))},t.createElement(zf,{className:`rt-ScrollAreaThumb`})),g===`both`?t.createElement(Bf,{className:`rt-ScrollAreaCorner`}):null)))});Xv.displayName=`ScrollArea`;var Zv={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`solid`,`soft`],default:`solid`},...Ug,...Gg},Qv={...Ig,...Ug,shortcut:{type:`string`}},$v={...Ug,shortcut:{type:`string`}},ey={...Ug},ty=h(V()),ny=e=>t.createElement(xa,{...e,modal:!0});ny.displayName=`Dialog.Root`;var ry=t.forwardRef(({children:e,...n},r)=>t.createElement(Sa,{...n,ref:r,asChild:!0},M_(e)));ry.displayName=`Dialog.Trigger`;var iy=t.forwardRef(({align:e,...n},r)=>{let{align:i,...a}=Bg,{className:o}=H({align:e},{align:i}),{className:s,forceMount:c,container:l,...u}=H(n,a);return t.createElement(Ca,{container:l,forceMount:c},t.createElement(k_,{asChild:!0},t.createElement(wa,{className:`rt-BaseDialogOverlay rt-DialogOverlay`},t.createElement(`div`,{className:`rt-BaseDialogScroll rt-DialogScroll`},t.createElement(`div`,{className:`rt-BaseDialogScrollPadding rt-DialogScrollPadding ${o}`},t.createElement(Ta,{...u,ref:r,className:(0,ty.default)(`rt-BaseDialogContent`,`rt-DialogContent`,s)}))))))});iy.displayName=`Dialog.Content`;var ay=t.forwardRef((e,n)=>t.createElement(Ea,{asChild:!0},t.createElement(p_,{size:`5`,mb:`3`,trim:`start`,...e,asChild:!1,ref:n})));ay.displayName=`Dialog.Title`;var oy=t.forwardRef((e,n)=>t.createElement(Da,{asChild:!0},t.createElement(U,{as:`p`,size:`3`,...e,asChild:!1,ref:n})));oy.displayName=`Dialog.Description`;var sy=t.forwardRef(({children:e,...n},r)=>t.createElement(Oa,{...n,ref:r,asChild:!0},M_(e)));sy.displayName=`Dialog.Close`;var cy=h(V()),ly=e=>t.createElement(ad,{...e});ly.displayName=`DropdownMenu.Root`;var uy=t.forwardRef(({children:e,...n},r)=>t.createElement(od,{...n,ref:r,asChild:!0},M_(e)));uy.displayName=`DropdownMenu.Trigger`;var dy=t.createContext({}),fy=t.forwardRef((e,n)=>{let r=O_(),{size:i=Zv.size.default,variant:a=Zv.variant.default,highContrast:o=Zv.highContrast.default}=e,{className:s,children:c,color:l,container:u,forceMount:d,...f}=H(e,Zv),p=l||r.accentColor;return t.createElement(sd,{container:u,forceMount:d},t.createElement(k_,{asChild:!0},t.createElement(cd,{"data-accent-color":p,align:`start`,sideOffset:4,collisionPadding:10,...f,asChild:!1,ref:n,className:(0,cy.default)(`rt-PopperContent`,`rt-BaseMenuContent`,`rt-DropdownMenuContent`,s)},t.createElement(Xv,{type:`auto`},t.createElement(`div`,{className:(0,cy.default)(`rt-BaseMenuViewport`,`rt-DropdownMenuViewport`)},t.createElement(dy.Provider,{value:t.useMemo(()=>({size:i,variant:a,color:p,highContrast:o}),[i,a,p,o])},c))))))});fy.displayName=`DropdownMenu.Content`;var py=t.forwardRef(({className:e,...n},r)=>t.createElement(ud,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuLabel`,`rt-DropdownMenuLabel`,e)}));py.displayName=`DropdownMenu.Label`;var q=t.forwardRef((e,n)=>{let{className:r,children:i,color:a=Qv.color.default,shortcut:o,...s}=e;return t.createElement(dd,{"data-accent-color":a,...s,ref:n,className:(0,cy.default)(`rt-reset`,`rt-BaseMenuItem`,`rt-DropdownMenuItem`,r)},t.createElement(un,null,i),o&&t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},o))});q.displayName=`DropdownMenu.Item`;var my=t.forwardRef(({className:e,...n},r)=>t.createElement(ld,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuGroup`,`rt-DropdownMenuGroup`,e)}));my.displayName=`DropdownMenu.Group`;var hy=t.forwardRef(({className:e,...n},r)=>t.createElement(pd,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuRadioGroup`,`rt-DropdownMenuRadioGroup`,e)}));hy.displayName=`DropdownMenu.RadioGroup`;var gy=t.forwardRef((e,n)=>{let{children:r,className:i,color:a=ey.color.default,...o}=e;return t.createElement(md,{...o,asChild:!1,ref:n,"data-accent-color":a,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuRadioItem`,`rt-DropdownMenuItem`,`rt-DropdownMenuRadioItem`,i)},r,t.createElement(hd,{className:`rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator`},t.createElement(zv,{className:`rt-BaseMenuItemIndicatorIcon rt-DropdownMenuItemIndicatorIcon`})))});gy.displayName=`DropdownMenu.RadioItem`;var _y=t.forwardRef((e,n)=>{let{children:r,className:i,shortcut:a,color:o=$v.color.default,...s}=e;return t.createElement(fd,{...s,asChild:!1,ref:n,"data-accent-color":o,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuCheckboxItem`,`rt-DropdownMenuItem`,`rt-DropdownMenuCheckboxItem`,i)},r,t.createElement(hd,{className:`rt-BaseMenuItemIndicator rt-DropdownMenuItemIndicator`},t.createElement(zv,{className:`rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon`})),a&&t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},a))});_y.displayName=`DropdownMenu.CheckboxItem`;var vy=e=>t.createElement(_d,{...e});vy.displayName=`DropdownMenu.Sub`;var yy=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(vd,{...a,asChild:!1,ref:n,className:(0,cy.default)(`rt-BaseMenuItem`,`rt-BaseMenuSubTrigger`,`rt-DropdownMenuItem`,`rt-DropdownMenuSubTrigger`,r)},i,t.createElement(`div`,{className:`rt-BaseMenuShortcut rt-DropdownMenuShortcut`},t.createElement(Vv,{className:`rt-BaseMenuSubTriggerIcon rt-DropdownMenuSubtriggerIcon`})))});yy.displayName=`DropdownMenu.SubTrigger`;var by=t.forwardRef((e,n)=>{let{size:r,variant:i,color:a,highContrast:o}=t.useContext(dy),{className:s,children:c,container:l,forceMount:u,...d}=H({size:r,variant:i,color:a,highContrast:o,...e},Zv);return t.createElement(sd,{container:l,forceMount:u},t.createElement(k_,{asChild:!0},t.createElement(yd,{"data-accent-color":a,alignOffset:-Number(r)*4,sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:(0,cy.default)(`rt-PopperContent`,`rt-BaseMenuContent`,`rt-BaseMenuSubContent`,`rt-DropdownMenuContent`,`rt-DropdownMenuSubContent`,s)},t.createElement(Xv,{type:`auto`},t.createElement(`div`,{className:(0,cy.default)(`rt-BaseMenuViewport`,`rt-DropdownMenuViewport`)},c)))))});by.displayName=`DropdownMenu.SubContent`;var xy=t.forwardRef(({className:e,...n},r)=>t.createElement(gd,{...n,asChild:!1,ref:r,className:(0,cy.default)(`rt-BaseMenuSeparator`,`rt-DropdownMenuSeparator`,e)}));xy.displayName=`DropdownMenu.Separator`;var Sy=h(V()),J=t.forwardRef(({className:e,...n},r)=>t.createElement(yv,{...n,ref:r,className:(0,Sy.default)(`rt-IconButton`,e)}));J.displayName=`IconButton`;var Cy=[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],wy={...Ig,size:{type:`enum`,className:`rt-r-size`,values:Cy,responsive:!0}},Ty=h(V()),Ey=t.forwardRef((e,n)=>{let{asChild:r,className:i,...a}=H(e,wy,d_),o=r?on:`kbd`;return t.createElement(o,{...a,ref:n,className:(0,Ty.default)(`rt-reset`,`rt-Kbd`,i)})});Ey.displayName=`Kbd`;var Dy=[`1`,`2`,`3`,`4`],Oy={...Ig,size:{type:`enum`,className:`rt-r-size`,values:Dy,default:`2`,responsive:!0},width:Lg.width,minWidth:Lg.minWidth,maxWidth:{...Lg.maxWidth,default:`480px`},...Rg},ky=h(V()),Ay=e=>t.createElement(qd,{...e});Ay.displayName=`Popover.Root`;var jy=t.forwardRef(({children:e,...n},r)=>t.createElement(Yd,{...n,ref:r,asChild:!0},M_(e)));jy.displayName=`Popover.Trigger`;var My=t.forwardRef((e,n)=>{let{className:r,forceMount:i,container:a,...o}=H(e,Oy);return t.createElement(Xd,{container:a,forceMount:i},t.createElement(k_,{asChild:!0},t.createElement(Zd,{align:`start`,sideOffset:8,collisionPadding:10,...o,ref:n,className:(0,ky.default)(`rt-PopperContent`,`rt-PopoverContent`,r)})))});My.displayName=`Popover.Content`;var Ny=t.forwardRef(({children:e,...n},r)=>t.createElement(Qd,{...n,ref:r,asChild:!0},M_(e)));Ny.displayName=`Popover.Close`;var Py=t.forwardRef(({children:e,...n},r)=>t.createElement(Jd,{...n,ref:r}));Py.displayName=`Popover.Anchor`;var Fy={disabled:{type:`boolean`,className:`disabled`,default:!1},size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`surface`,`classic`],default:`surface`},...b_},Iy=h(V()),Ly=t.forwardRef((e,n)=>{let{className:r,children:i,radius:a,value:o,defaultValue:s,onValueChange:c,...l}=H(e,Fy,d_),[u,d]=Tn({prop:o,onChange:c,defaultProp:s});return t.createElement(Jh,{"data-disabled":e.disabled||void 0,"data-radius":a,ref:n,className:(0,Iy.default)(`rt-SegmentedControlRoot`,r),onValueChange:e=>{e&&d(e)},...l,type:`single`,value:u,asChild:!1,disabled:!!e.disabled},i,t.createElement(`div`,{className:`rt-SegmentedControlIndicator`}))});Ly.displayName=`SegmentedControl.Root`;var Ry=t.forwardRef(({children:e,className:n,...r},i)=>t.createElement(Yh,{ref:i,className:(0,Iy.default)(`rt-reset`,`rt-SegmentedControlItem`,n),...r,disabled:!1,asChild:!1},t.createElement(`span`,{className:`rt-SegmentedControlItemSeparator`}),t.createElement(`span`,{className:`rt-SegmentedControlItemLabel`},t.createElement(`span`,{className:`rt-SegmentedControlItemLabelActive`},e),t.createElement(`span`,{className:`rt-SegmentedControlItemLabelInactive`,"aria-hidden":!0},e))));Ry.displayName=`SegmentedControl.Item`;var zy={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0}},By={variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`,`ghost`],default:`surface`},...Ug,...b_,placeholder:{type:`string`}},Vy={variant:{type:`enum`,className:`rt-variant`,values:[`solid`,`soft`],default:`solid`},...Ug,...Gg},Hy=h(V()),Uy=t.createContext({}),Wy=e=>{let{children:n,size:r=zy.size.default,...i}=e;return t.createElement(em,{...i},t.createElement(Uy.Provider,{value:t.useMemo(()=>({size:r}),[r])},n))};Wy.displayName=`Select.Root`;var Gy=t.forwardRef((e,n)=>{let{children:r,className:i,color:a,radius:o,placeholder:s,...c}=H({size:t.useContext(Uy)?.size,...e},{size:zy.size},By,d_);return t.createElement(tm,{asChild:!0},t.createElement(`button`,{"data-accent-color":a,"data-radius":o,...c,ref:n,className:(0,Hy.default)(`rt-reset`,`rt-SelectTrigger`,i)},t.createElement(`span`,{className:`rt-SelectTriggerInner`},t.createElement(nm,{placeholder:s},r)),t.createElement(rm,{asChild:!0},t.createElement(Bv,{className:`rt-SelectIcon`}))))});Gy.displayName=`Select.Trigger`;var Ky=t.forwardRef((e,n)=>{let{className:r,children:i,color:a,container:o,...s}=H({size:t.useContext(Uy)?.size,...e},{size:zy.size},Vy),c=O_(),l=a||c.accentColor;return t.createElement(im,{container:o},t.createElement(k_,{asChild:!0},t.createElement(am,{"data-accent-color":l,sideOffset:4,...s,asChild:!1,ref:n,className:(0,Hy.default)({"rt-PopperContent":s.position===`popper`},`rt-SelectContent`,r)},t.createElement(If,{type:`auto`,className:`rt-ScrollAreaRoot`},t.createElement(om,{asChild:!0,className:`rt-SelectViewport`},t.createElement(Lf,{className:`rt-ScrollAreaViewport`,style:{overflowY:void 0}},i)),t.createElement(Rf,{className:`rt-ScrollAreaScrollbar rt-r-size-1`,orientation:`vertical`},t.createElement(zf,{className:`rt-ScrollAreaThumb`}))))))});Ky.displayName=`Select.Content`;var Y=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(lm,{...a,asChild:!1,ref:n,className:(0,Hy.default)(`rt-SelectItem`,r)},t.createElement(dm,{className:`rt-SelectItemIndicator`},t.createElement(zv,{className:`rt-SelectItemIndicatorIcon`})),t.createElement(um,null,i))});Y.displayName=`Select.Item`;var qy=t.forwardRef(({className:e,...n},r)=>t.createElement(sm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectGroup`,e)}));qy.displayName=`Select.Group`;var Jy=t.forwardRef(({className:e,...n},r)=>t.createElement(cm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectLabel`,e)}));Jy.displayName=`Select.Label`;var Yy=t.forwardRef(({className:e,...n},r)=>t.createElement(fm,{...n,asChild:!1,ref:r,className:(0,Hy.default)(`rt-SelectSeparator`,e)}));Yy.displayName=`Select.Separator`;var Xy={orientation:{type:`enum`,className:`rt-r-orientation`,values:[`horizontal`,`vertical`],default:`horizontal`,responsive:!0},size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`,`4`],default:`1`,responsive:!0},color:{...Ug.color,default:`gray`},decorative:{type:`boolean`,default:!0}},Zy=h(V()),Qy=t.forwardRef((e,n)=>{let{className:r,color:i,decorative:a,...o}=H(e,Xy,d_);return t.createElement(`span`,{"data-accent-color":i,role:a?void 0:`separator`,...o,ref:n,className:(0,Zy.default)(`rt-Separator`,r)})});Qy.displayName=`Separator`;var $y={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Ug,...Gg,...b_},eb=h(V()),tb=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,tabIndex:o,...s}=H(e,$y,d_);return t.createElement(Ym,{"data-accent-color":i,"data-radius":a,ref:n,...s,asChild:!1,className:(0,eb.default)(`rt-SliderRoot`,r)},t.createElement(Xm,{className:`rt-SliderTrack`},t.createElement(Zm,{className:(0,eb.default)(`rt-SliderRange`,{"rt-high-contrast":e.highContrast}),"data-inverted":s.inverted?``:void 0})),(s.value??s.defaultValue??[]).map((e,n)=>t.createElement(Qm,{key:n,className:`rt-SliderThumb`,...o===void 0?void 0:{tabIndex:o}})))});tb.displayName=`Slider`;var nb={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Ug,...Gg,...b_},rb=h(V()),ib=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,...o}=H(e,nb,d_);return t.createElement(uh,{"data-accent-color":i,"data-radius":a,...o,asChild:!1,ref:n,className:(0,rb.default)(`rt-reset`,`rt-SwitchRoot`,r)},t.createElement(dh,{className:(0,rb.default)(`rt-SwitchThumb`,{"rt-high-contrast":e.highContrast})}))});ib.displayName=`Switch`;var ab={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`],default:`2`,responsive:!0},wrap:{type:`enum`,className:`rt-r-fw`,values:[`nowrap`,`wrap`,`wrap-reverse`],responsive:!0},justify:{type:`enum`,className:`rt-r-jc`,values:[`start`,`center`,`end`],responsive:!0},...Ug,...Gg},ob=h(V()),sb=t.forwardRef((e,n)=>{let{className:r,...i}=H(e,d_);return t.createElement(Dh,{...i,ref:n,className:(0,ob.default)(`rt-TabsRoot`,r)})});sb.displayName=`Tabs.Root`;var cb=t.forwardRef((e,n)=>{let{className:r,color:i,...a}=H(e,ab,d_);return t.createElement(Oh,{"data-accent-color":i,...a,asChild:!1,ref:n,className:(0,ob.default)(`rt-BaseTabList`,`rt-TabsList`,r)})});cb.displayName=`Tabs.List`;var lb=t.forwardRef((e,n)=>{let{className:r,children:i,...a}=e;return t.createElement(kh,{...a,asChild:!1,ref:n,className:(0,ob.default)(`rt-reset`,`rt-BaseTabListTrigger`,`rt-TabsTrigger`,r)},t.createElement(`span`,{className:`rt-BaseTabListTriggerInner rt-TabsTriggerInner`},i),t.createElement(`span`,{className:`rt-BaseTabListTriggerInnerHidden rt-TabsTriggerInnerHidden`},i))});lb.displayName=`Tabs.Trigger`;var ub=t.forwardRef((e,n)=>{let{className:r,...i}=H(e,d_);return t.createElement(Ah,{...i,ref:n,className:(0,ob.default)(`rt-TabsContent`,r)})});ub.displayName=`Tabs.Content`;var db={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},resize:{type:`enum`,className:`rt-r-resize`,values:[`none`,`vertical`,`horizontal`,`both`],responsive:!0},...Ug,...b_},fb=h(V()),pb=t.forwardRef((e,n)=>{let{className:r,color:i,radius:a,style:o,...s}=H(e,db,d_);return t.createElement(`div`,{"data-accent-color":i,"data-radius":a,className:(0,fb.default)(`rt-TextAreaRoot`,r),style:o},t.createElement(`textarea`,{className:`rt-reset rt-TextAreaInput`,ref:n,...s}))});pb.displayName=`TextArea`;var mb={size:{type:`enum`,className:`rt-r-size`,values:[`1`,`2`,`3`],default:`2`,responsive:!0},variant:{type:`enum`,className:`rt-variant`,values:[`classic`,`surface`,`soft`],default:`surface`},...Ug,...b_},hb={side:{type:`enum`,values:[`left`,`right`]},...Ug,gap:lv.gap,px:W_.px,pl:W_.pl,pr:W_.pr},gb=h(V()),X=t.forwardRef((e,n)=>{let r=t.useRef(null),{children:i,className:a,color:o,radius:s,style:c,...l}=H(e,mb,d_);return t.createElement(`div`,{"data-accent-color":o,"data-radius":s,style:c,className:(0,gb.default)(`rt-TextFieldRoot`,a),onPointerDown:e=>{let t=e.target;if(t.closest(`input, button, a`))return;let n=r.current;if(!n)return;let i=t.closest(`
46
46
  .rt-TextFieldSlot[data-side='right'],
47
47
  .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
48
- `)?n.value.length:0;requestAnimationFrame(()=>{try{n.setSelectionRange(i,i)}catch{}n.focus()})}},t.createElement(`input`,{spellCheck:`false`,...l,ref:an(r,n),className:`rt-reset rt-TextFieldInput`}),i)});X.displayName=`TextField.Root`;var _b=t.forwardRef((e,n)=>{let{className:r,color:i,side:a,...o}=V(e,hb);return t.createElement(`div`,{"data-accent-color":i,"data-side":a,...o,ref:n,className:(0,gb.default)(`rt-TextFieldSlot`,r)})});_b.displayName=`TextField.Slot`;var vb={content:{type:`ReactNode`,required:!0},width:Rg.width,minWidth:Rg.minWidth,maxWidth:{...Rg.maxWidth,default:`360px`}},yb=h(B()),bb=t.forwardRef((e,n)=>{let{children:r,className:i,open:a,defaultOpen:o,onOpenChange:s,delayDuration:c,disableHoverableContent:l,content:u,container:d,forceMount:f,...p}=V(e,vb),m={open:a,defaultOpen:o,onOpenChange:s,delayDuration:c,disableHoverableContent:l};return t.createElement(Mg,{...m},t.createElement(Ng,{asChild:!0},r),t.createElement(Pg,{container:d,forceMount:f},t.createElement(A_,{asChild:!0},t.createElement(Fg,{sideOffset:4,collisionPadding:10,...p,asChild:!1,ref:n,className:(0,yb.default)(`rt-TooltipContent`,i)},t.createElement(H,{as:`p`,className:`rt-TooltipText`,size:`1`},u),t.createElement(Ig,{className:`rt-TooltipArrow`})))))});bb.displayName=`Tooltip`;function Z(e,t=`Assertion error`){if(!e)throw Error(t)}function xb({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function Sb(e,t){return t.sort(e===`horizontal`?Cb:wb)}function Cb(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function wb(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function Tb(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function Eb(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Db({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=Eb(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return Z(i,`No rect found`),i}function Ob(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=Sb(n,Array.from(t.children).filter(Tb).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c,l=[];for(let t of a)if(t.hasAttribute(`data-panel`)){let i=r.find(e=>e.element===t);if(i){if(c){let r=c.element.getBoundingClientRect(),a=t.getBoundingClientRect(),u;if(s){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(l.length){case 0:u=[e,t];break;case 1:{let i=l[0];u=[i,Db({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:u=l;break}}else u=l.length?l:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let t of u)o.push({group:e,groupSize:xb({group:e}),panels:[c,i],separator:`width`in t?void 0:t,rect:`width`in t?t:t.element.getBoundingClientRect()})}s=!1,c=i,l=[]}}else if(t.hasAttribute(`data-separator`)){let e=i.find(e=>e.element===t);e?l.push(e):(c=void 0,l=[])}else s=!0;return o}function kb(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function Ab(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function jb(e){return e/100*window.innerHeight}function Mb(e){return e/100*window.innerWidth}function Nb(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function Pb({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=Nb(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=Ab(t,i);break;case`em`:r=kb(t,i);break;case`vh`:r=jb(i);break;case`vw`:r=Mb(i);break}return r}function Fb(e){return parseFloat(e.toFixed(3))}function Ib(e){let{panels:t}=e,n=xb({group:e});return n===0?t.map(e=>({collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize&&(i=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize&&(a=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize&&(o=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize&&(s=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,minSize:o,maxSize:s,panelId:e.id}})}var Lb=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}};function Rb(e,t,n=0){return Math.abs(Fb(e)-Fb(t))<=n}var zb={cursorFlags:0,interactionState:{state:`inactive`},mountedGroups:new Map},Bb=new Lb;function Vb(){return zb}function Hb(e){let t=typeof e==`function`?e(zb):e;if(zb===t)return zb;let n=zb;return zb={...zb,...t},t.cursorFlags!==void 0&&Bb.emit(`cursorFlagsChange`,zb.cursorFlags),t.interactionState!==void 0&&Bb.emit(`interactionStateChange`,zb.interactionState),t.mountedGroups!==void 0&&(zb.mountedGroups.forEach((e,t)=>{e.derivedPanelConstraints.forEach(r=>{if(r.collapsible){let{layout:i}=n.mountedGroups.get(t)??{};if(i){let n=Rb(r.collapsedSize,e.layout[r.panelId]),a=Rb(r.collapsedSize,i[r.panelId]);n&&!a&&(t.inMemoryLastExpandedPanelSizes[r.panelId]=i[r.panelId])}}})}),Bb.emit(`mountedGroupsChange`,zb.mountedGroups)),zb}function Ub(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Wb(e,t){return Rb(e,t)?0:e>t?1:-1}function Gb({panelConstraints:e,size:t}){let{collapsedSize:n=0,collapsible:r,maxSize:i=100,minSize:a=0}=e;if(Wb(t,a)<0)if(r){let e=(n+a)/2;t=Wb(t,e)<0?n:a}else t=a;return t=Math.min(i,t),t=Fb(t),t}function Kb({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(Rb(e,0))return t;let o=Object.values(t),s=Object.values(i),c=[...o],[l,u]=r;Z(l!=null,`Invalid first pivot index`),Z(u!=null,`Invalid second pivot index`);let d=0;if(a===`keyboard`){{let t=e<0?u:l,r=n[t];Z(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:s=0}=r;if(a){let n=o[t];if(Z(n!=null,`Previous layout not found for panel index ${t}`),Rb(n,i)){let t=s-n;Wb(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?l:u,r=n[t];Z(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:s=0}=r;if(a){let n=o[t];if(Z(n!=null,`Previous layout not found for panel index ${t}`),Rb(n,s)){let t=n-i;Wb(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let t=e<0?1:-1,r=e<0?u:l,i=0;for(;;){let e=o[r];Z(e!=null,`Previous layout not found for panel index ${r}`);let a=Gb({panelConstraints:n[r],size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?l:u;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(d),i=o[t];Z(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,s=Gb({panelConstraints:n[t],size:a});if(!Rb(i,s)&&(d+=i-s,c[t]=s,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(Ub(s,c))return i;{let t=e<0?u:l,r=o[t];Z(r!=null,`Previous layout not found for panel index ${t}`);let i=r+d,a=Gb({panelConstraints:n[t],size:i});if(c[t]=a,!Rb(a,i)){let t=i-a,r=e<0?u:l;for(;r>=0&&r<n.length;){let i=c[r];Z(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,o=Gb({panelConstraints:n[r],size:a});if(Rb(i,o)||(t-=o-i,c[r]=o),Rb(t,0))break;e>0?r--:r++}}}if(!Rb(Object.values(c).reduce((e,t)=>t+e,0),100,.1))return i;let f=Object.keys(i);return c.reduce((e,t,n)=>(e[f[n]]=t,e),{})}function qb(e){let{mountedGroups:t}=Vb();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function Jb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||Wb(e[n],t[n])!==0)return!1;return!0}function Yb({layout:e,panelConstraints:t}){let n=[...Object.values(e)],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!Rb(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];Z(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];Z(r!=null,`No layout data found for index ${e}`);let a=Gb({panelConstraints:t[e],size:r});r!=a&&(i+=r-a,n[e]=a)}if(!Rb(i,0))for(let e=0;e<t.length;e++){let r=n[e];Z(r!=null,`No layout data found for index ${e}`);let a=r+i,o=Gb({panelConstraints:t[e],size:a});if(r!==o&&(i-=o-r,n[e]=o,Rb(i,0)))break}let a=Object.keys(e);return n.reduce((e,t,n)=>(e[a[n]]=t,e),{})}function Xb({groupId:e}){let t=()=>{let{mountedGroups:t}=Vb();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,layout:a,separatorToPanels:o}=t(),s=Yb({layout:e,panelConstraints:r});return n?a:(Jb(a,s)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,layout:s,separatorToPanels:o})})),s)}}}function Zb(e){let{mountedGroups:t}=Vb(),n=t.get(e);return Z(n,`Mounted Group ${e.id} not found`),n}function Qb(e,t){let n=qb(e),r=Zb(n),i=n.separators.find(t=>t.element===e);Z(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);Z(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=Xb({groupId:n.id}).getLayout(),c=Yb({layout:Kb({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});Jb(s,c)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:c,separatorToPanels:r.separatorToPanels})}))}function $b(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=qb(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&Qb(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&Qb(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&Qb(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&Qb(t,-5);break;case`End`:e.preventDefault(),Qb(t,100);break;case`Enter`:{e.preventDefault();let n=qb(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Zb(n),o=n.separators.find(e=>e.element===t);Z(o,`Matching separator not found`);let s=a.get(o);Z(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(Z(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];Qb(t,(l.collapsedSize===e?n.inMemoryLastExpandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=qb(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);Z(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus();break}case`Home`:e.preventDefault(),Qb(t,-100);break}}var ex=e=>e,tx=()=>{},nx=1,rx=2,ix=4,ax=8,ox={coarse:10,precise:5};function sx(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=Eb(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}var cx;function lx(){return cx===void 0&&(cx=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),cx}function ux(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function dx(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:_x(e),b:_x(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Z(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:gx(hx(n.a)),b:gx(hx(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var fx=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function px(e){let t=getComputedStyle(vx(e)??e).display;return t===`flex`||t===`inline-flex`}function mx(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||px(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||fx.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function hx(e){let t=e.length;for(;t--;){let n=e[t];if(Z(n,`Missing node`),mx(n))return n}return null}function gx(e){return e&&Number(getComputedStyle(e).zIndex)||0}function _x(e){let t=[];for(;e;)t.push(e),e=vx(e);return t}function vx(e){let{parentNode:t}=e;return ux(t)?t.host:t}function yx(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function bx({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Tb(n)||n.contains(e)||e.contains(n))return!0;if(dx(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(yx(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function xx(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=lx()?ox.coarse:ox.precise,a=Ob(r),o=sx(r.orientation,a,{x:e.clientX,y:e.clientY});o&&o.distance.x<=i&&o.distance.y<=i&&bx({groupElement:r.element,hitRegion:o.hitRegion.rect,pointerEventTarget:e.target})&&n.push(o.hitRegion)}),n}function Sx(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let{mountedGroups:t}=Vb(),n=xx(e,t),r=new Set,i=new Set,a=new Set,o=new Map,s=!1;n.forEach(e=>{r.add(e.group),e.panels.forEach(e=>{i.add(e)}),e.separator&&(a.add(e.separator),s||(s=!0,e.separator.element.focus()));let n=t.get(e.group);n&&o.set(e.group,n.layout)}),Hb({interactionState:{hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}}),n.length&&e.preventDefault()}function Cx({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(r===0&&i===0)return null;switch(n){case`active`:{let t=(e&nx)!==0,n=(e&rx)!==0,r=(e&ix)!==0,i=(e&ax)!==0;if(e){if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}}return r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`}var wx=new WeakMap;function Tx(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=wx.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);let{cursorFlags:r,interactionState:i}=Vb();switch(i.state){case`active`:case`hover`:{let e=Cx({cursorFlags:r,groups:i.hitRegions.map(e=>e.group),state:i.state}),a=`*{cursor: ${e} !important; ${i.state===`active`?`touch-action: none;`:``} }`;if(t===a)return;t=a,e?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}wx.set(e,{prevStyle:t,styleSheet:n})}function Ex({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a}){let o=0,s=new Map(i);n.forEach(e=>{let{group:n,groupSize:c}=e,{disableCursor:l,orientation:u,panels:d}=n,f=0;f=a?u===`horizontal`?(t.clientX-a.x)/c*100:(t.clientY-a.y)/c*100:u===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let p=r.get(n),{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:g,separatorToPanels:_}=i.get(n)??{defaultLayoutDeferred:!1};if(h&&p&&g&&_){let t=Kb({delta:f,initialLayout:p,panelConstraints:h,pivotIndices:e.panels.map(e=>d.indexOf(e)),prevLayout:g,trigger:`mouse-or-touch`});if(Jb(t,g)){if(f!==0&&!l)switch(u){case`horizontal`:o|=f<0?nx:rx;break;case`vertical`:o|=f<0?ix:ax;break}}else{s.set(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:t,separatorToPanels:_});let n=e.group.panels.map(({id:e})=>e).join(`,`);e.group.inMemoryLayouts[n]=t}}}),Hb({cursorFlags:o,mountedGroups:s}),Tx(e)}function Dx(e){let{interactionState:t,mountedGroups:n}=Vb();switch(t.state){case`active`:Ex({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}}function Ox(e){if(e.defaultPrevented)return;let{interactionState:t,mountedGroups:n}=Vb();switch(t.state){case`active`:if(e.buttons===0){Hb(e=>e.interactionState.state===`inactive`?e:{cursorFlags:0,interactionState:{state:`inactive`}});return}Ex({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break;default:{let r=xx(e,n);r.length===0?t.state!==`inactive`&&Hb({interactionState:{state:`inactive`}}):Hb({interactionState:{hitRegions:r,state:`hover`}}),Tx(e.currentTarget);break}}}function kx(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;e.preventDefault();let{interactionState:t}=Vb();switch(t.state){case`active`:Hb({cursorFlags:0,interactionState:{state:`inactive`}}),Tx(e.currentTarget)}}function Ax(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Fb(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Fb((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function jx(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=xb({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Fb(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Mx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Nx(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var Px=new Map;function Fx(e){let t=!0;Z(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){if(xb({group:e})===0)return;Hb(t=>{let n=t.mountedGroups.get(e);if(n){let r=Ib(e),i=n.defaultLayoutDeferred?Ax(r):n.layout,a=Yb({layout:i,panelConstraints:r});return!n.defaultLayoutDeferred&&Jb(i,a)&&Mx(n.derivedPanelConstraints,r)?t:{mountedGroups:new Map(t.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,layout:a,separatorToPanels:n.separatorToPanels})}}return t})}}else jx(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{Z(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=xb({group:e}),s=Ib(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.defaultLayout;l&&(Nx(e.panels,l)||(l=void 0));let u=Yb({layout:e.inMemoryLayouts[c]??l??Ax(s),panelConstraints:s}),d=Ob(e),f=e.element.ownerDocument;return Hb(t=>{let n=new Map;return Px.set(f,(Px.get(f)??0)+1),d.forEach(e=>{e.separator&&n.set(e.separator,e.panels)}),{mountedGroups:new Map(t.mountedGroups).set(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,layout:u,separatorToPanels:n})}}),e.separators.forEach(e=>{Z(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,$b)}),Px.get(f)===1&&(f.addEventListener(`pointerdown`,Sx,!0),f.addEventListener(`pointerleave`,Dx),f.addEventListener(`pointermove`,Ox),f.addEventListener(`pointerup`,kx,!0)),function(){t=!1,Px.set(f,Math.max(0,(Px.get(f)??0)-1)),Hb(t=>{let n=new Map(t.mountedGroups);return n.delete(e),{mountedGroups:n}}),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,$b)}),Px.get(f)||(f.removeEventListener(`pointerdown`,Sx,!0),f.removeEventListener(`pointerleave`,Dx),f.removeEventListener(`pointermove`,Ox),f.removeEventListener(`pointerup`,kx,!0)),a.disconnect()}}function Ix(){let[e,n]=(0,t.useState)({});return[e,(0,t.useCallback)(()=>n({}),[])]}function Lx(e){let n=(0,t.useId)();return`${e??n}`}var Rx=typeof window<`u`?t.useLayoutEffect:t.useEffect;function zx(e){let n=(0,t.useRef)(e);return Rx(()=>{n.current=e},[e]),(0,t.useCallback)((...e)=>n.current?.(...e),[n])}function Bx(...e){return zx(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Vx(e){let n=(0,t.useRef)({...e});return Rx(()=>{for(let t in e)n.current[t]=e[t]},[e]),n.current}var Hx=`--react-resizable-panels--panel--pointer-events`;function Ux(e,t){return`--react-resizable-panels--${e.replace(/[^a-zA-Z0-9\-_]/g,``)}--${t.replace(/[^a-zA-Z0-9\-_]/g,``)}`}var Wx=(0,t.createContext)(null);function Gx(e,n){let r=(0,t.useRef)({getLayout:()=>({}),setLayout:ex});(0,t.useImperativeHandle)(n,()=>r.current,[]),Rx(()=>{Object.assign(r.current,Xb({groupId:e}))})}function Kx({children:e,className:n,defaultLayout:i,disableCursor:a,disabled:o,elementRef:s,groupRef:c,id:l,onLayoutChange:u,orientation:d=`horizontal`,style:f,...p}){let m=(0,t.useRef)({}),h=zx(e=>{Jb(m.current,e)||(m.current=e,u?.(e))}),g=Lx(l),_=(0,t.useRef)(null),[v,y]=(0,t.useState)(!1),[b,x]=(0,t.useState)(i??{}),[S,C]=Ix(),w=(0,t.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),T=Bx(_,s);Gx(g,c);let E=(0,t.useMemo)(()=>({id:g,orientation:d,registerPanel:e=>{let t=w.current;return t.panels=Sb(d,[...t.panels,e]),C(),()=>{t.panels=t.panels.filter(t=>t!==e),C()}},registerSeparator:e=>{let t=w.current;return t.separators=Sb(d,[...t.separators,e]),C(),()=>{t.separators=t.separators.filter(t=>t!==e),C()}}}),[g,C,d]),D=Vx({defaultLayout:i,disableCursor:a}),O=(0,t.useRef)(null);Rx(()=>{let e=_.current;if(e===null)return;let t=w.current,n={defaultLayout:D.defaultLayout,disableCursor:!!D.disableCursor,disabled:!!o,element:e,id:g,inMemoryLastExpandedPanelSizes:w.current.lastExpandedPanelSizes,inMemoryLayouts:w.current.layouts,orientation:d,panels:t.panels,separators:t.separators};O.current=n;let r=Fx(n),i=Vb().mountedGroups.get(n);if(i){let{defaultLayoutDeferred:e,derivedPanelConstraints:t,layout:n}=i;!e&&t.length>0&&(x(n),h?.(n))}let a=Bb.addListener(`interactionStateChange`,e=>{switch(e.state){case`active`:y(e.hitRegions.some(e=>e.group===n));break;default:y(!1);break}}),s=Bb.addListener(`mountedGroupsChange`,e=>{let t=e.get(n);if(t){let{defaultLayoutDeferred:e,derivedPanelConstraints:n,layout:r}=t;if(e||n.length===0)return;x(r),h?.(r)}});return()=>{O.current=null,r(),a(),s()}},[o,g,h,d,S,D]),(0,t.useEffect)(()=>{let e=O.current;e&&(e.defaultLayout=i,e.disableCursor=!!a)});let k={[Hx]:v?`none`:void 0};for(let e in b){let t=Ux(g,e);k[t]=b[e]}return(0,r.jsx)(Wx.Provider,{value:E,children:(0,r.jsx)(`div`,{...p,"aria-orientation":d,className:n,"data-group":!0,"data-testid":g,id:g,ref:T,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,...k,display:`flex`,flexDirection:d===`horizontal`?`row`:`column`,flexWrap:`nowrap`},children:e})})}Kx.displayName=`Group`;function qx(){let e=(0,t.useContext)(Wx);return Z(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Jx({groupId:e,panelId:t}){let n=()=>{let{mountedGroups:t}=Vb();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,separatorToPanels:o}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,layout:a,separatorToPanels:o};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,layout:c,separatorToPanels:l}=n(),u=s.panels.findIndex(e=>e.id===t),d=u===s.panels.length-1,f=Yb({layout:Kb({delta:d?r-e:e-r,initialLayout:c,panelConstraints:o,pivotIndices:d?[u-1,u]:[u,u+1],prevLayout:c,trigger:`imperative-api`}),panelConstraints:o});Jb(c,f)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,layout:f,separatorToPanels:l})}))};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&Rb(t,n)},resize:e=>{if(a()!==e){let t;switch(typeof e){case`number`:{let{group:r}=n();t=Fb(e/xb({group:r})*100);break}case`string`:t=parseFloat(e);break}o(t)}}}}function Yx(e,n){let{id:r}=qx(),i=(0,t.useRef)({collapse:tx,expand:tx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:tx});(0,t.useImperativeHandle)(n,()=>i.current,[]),Rx(()=>{Object.assign(i.current,Jx({groupId:r,panelId:e}))})}function Xx({children:e,className:n,collapsedSize:i=`0%`,collapsible:a=!1,defaultSize:o,elementRef:s,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Lx(c),_=(0,t.useRef)(null),v=Bx(_,s),{id:y,registerPanel:b}=qx(),x=d!==null,S=zx((e,t,n)=>{d?.(e,c,n)});Rx(()=>{let e=_.current;if(e!==null)return b({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:x?S:void 0,panelConstraints:{collapsedSize:i,collapsible:a,defaultSize:o,maxSize:l,minSize:u}})},[i,a,o,x,g,h,l,u,S,b]),Yx(g,f);let C=Ux(y,g);return(0,r.jsx)(`div`,{...m,"data-panel":!0,"data-testid":g,id:g,ref:v,style:{...Zx,flexBasis:0,flexGrow:`var(${C}, 1)`,flexShrink:1,overflow:`hidden`,pointerEvents:`var(${Hx})`},children:(0,r.jsx)(`div`,{className:n,style:{width:`100%`,height:`100%`,...p},children:e})})}Xx.displayName=`Panel`;var Zx={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Qx({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=a=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=Yb({layout:Kb({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:`keyboard`}),panelConstraints:t})[n],i=Yb({layout:Kb({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:`keyboard`}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function $x({children:e,className:n,elementRef:i,id:a,style:o,...s}){let c=Lx(a),[l,u]=(0,t.useState)({}),[d,f]=(0,t.useState)(`inactive`),p=(0,t.useRef)(null),m=Bx(p,i),{id:h,orientation:g,registerSeparator:_}=qx(),v=g===`horizontal`?`vertical`:`horizontal`;return Rx(()=>{let e=p.current;if(e!==null){let t={element:e,id:c},n=_(t),r=Bb.addListener(`interactionStateChange`,e=>{f(e.state!==`inactive`&&e.hitRegions.some(e=>e.separator===t)?e.state:`inactive`)}),i=Bb.addListener(`mountedGroupsChange`,e=>{e.forEach(({derivedPanelConstraints:e,layout:n,separatorToPanels:r},i)=>{if(i.id===h){let a=r.get(t);if(a){let t=a[0],r=i.panels.indexOf(t);u(Qx({layout:n,panelConstraints:e,panelId:t.id,panelIndex:r}))}}})});return()=>{r(),i(),n()}}},[h,c,_]),(0,r.jsx)(`div`,{...s,"aria-controls":l.valueControls,"aria-orientation":v,"aria-valuemax":l.valueMax,"aria-valuemin":l.valueMin,"aria-valuenow":l.valueNow,children:e,className:n,"data-separator":d,"data-testid":c,id:c,ref:m,role:`separator`,style:{flexBasis:`auto`,...o,flexGrow:0,flexShrink:0},tabIndex:0})}$x.displayName=`Separator`;let eS=(0,t.createContext)(void 0);var tS=[`Arial`,`Helvetica`,`Times New Roman`,`Courier New`,`Verdana`,`Georgia`,`Palatino`,`Garamond`,`Bookman`,`Comic Sans MS`,`Trebuchet MS`,`Arial Black`,`Impact`];let nS=({children:e,isList:n=!1,availableProps:i=[],theme:a=`light`})=>{let[o,s]=(0,t.useState)({elements:[],selectedElementIds:[],isList:n,mockData:[],singleMockData:{},listSettings:{sortOrder:`asc`,newestPosition:`bottom`,scrollDirection:`down`},availableProps:i,availableFonts:[...tS,`Roboto`,`Open Sans`,`Lato`,`Montserrat`],theme:a,history:[[]],historyDescriptions:[],historyIndex:0,clipboard:[],gridSize:0,zoom:1,pan:{x:0,y:0},snapLines:[],assets:[],isPropertiesPanelOpen:!1});t.default.useEffect(()=>{o.availableFonts.forEach(e=>{if(tS.includes(e))return;let t=`font-${e.replace(/\s+/g,`-`).toLowerCase()}`;if(!document.getElementById(t)){let n=document.createElement(`link`);n.id=t,n.href=`https://fonts.googleapis.com/css2?family=${e.replace(/ /g,`+`)}&display=swap`,n.rel=`stylesheet`,document.head.appendChild(n)}})},[o.availableFonts]),t.default.useEffect(()=>{s(e=>({...e,isList:n,availableProps:i,theme:a}))},[n,i,a]);let c=t.default.useCallback(e=>{s(t=>({...t,isPropertiesPanelOpen:e}))},[]),l=t.default.useCallback(e=>{s(t=>({...t,canvasHeight:e}))},[]),u=t.default.useCallback(e=>{s(t=>({...t,gridSize:e}))},[]),d=t.default.useCallback(e=>{s(t=>({...t,zoom:e}))},[]),f=t.default.useCallback(e=>{s(t=>({...t,pan:e}))},[]),p=t.default.useCallback(e=>{s(t=>({...t,snapLines:e}))},[]),m=t.default.useCallback(e=>{s(t=>{let n=e.elements||t.elements,r=[],i=new Set;return n.forEach(e=>{let t=e.id;(!t||i.has(t))&&(t=crypto.randomUUID()),i.add(t),r.push({...e,id:t,x:Number.isFinite(e.x)?e.x:0,y:Number.isFinite(e.y)?e.y:0,width:Number.isFinite(e.width)?e.width:100,height:Number.isFinite(e.height)?e.height:100,locked:!!e.locked,hidden:!!e.hidden})}),{...t,...e,elements:r,isList:e.isList??t.isList,availableProps:e.availableProps??t.availableProps,availableFonts:e.availableFonts??t.availableFonts,selectedElementIds:[],history:[r],historyIndex:0,clipboard:[]}})},[]),h=t.default.useCallback(()=>{s(e=>{if(e.historyIndex>0){let t=e.historyIndex-1;return{...e,elements:e.history[t],historyIndex:t,selectedElementIds:[]}}return e})},[]),g=t.default.useCallback(()=>{s(e=>{if(e.historyIndex<e.history.length-1){let t=e.historyIndex+1;return{...e,elements:e.history[t],historyIndex:t,selectedElementIds:[]}}return e})},[]),_=t.default.useCallback(e=>{s(t=>e>=0&&e<t.history.length?{...t,elements:t.history[e],historyIndex:e,selectedElementIds:[]}:t)},[]),v=t.default.useCallback(()=>{s(e=>{if(e.selectedElementIds.length>0){let t=e.elements.filter(t=>e.selectedElementIds.includes(t.id));return{...e,clipboard:t}}return e})},[]),y=t.default.useCallback(()=>{s(e=>{if(e.clipboard.length>0){let t=e.clipboard.map(e=>({...e,id:crypto.randomUUID(),x:e.x+20,y:e.y+20})),n=[...e.elements,...t],r=e.history.slice(0,e.historyIndex+1);r.push(n);let i=e.historyDescriptions.slice(0,e.historyIndex+1);return i.push(`Colar Elementos`),{...e,elements:n,history:r,historyDescriptions:i,historyIndex:r.length-1,selectedElementIds:t.map(e=>e.id)}}return e})},[]),b=t.default.useCallback(e=>{let t={};e.type===`box`&&(t.backgroundColor=`var(--gray-4)`),e.type===`text-container`&&(t.backgroundColor=`var(--gray-4)`,t.border=`1px solid var(--gray-8)`,t.padding=`8px`,t.display=`flex`,t.alignItems=`flex-start`,t.justifyContent=`flex-start`);let n={id:crypto.randomUUID(),x:50,y:50,width:200,height:e.type===`text`?50:150,...e,style:{...t,...e.style||{}}};s(e=>{let t=[...e.elements,n],r=e.history.slice(0,e.historyIndex+1);r.push(t);let i=e.historyDescriptions.slice(0,e.historyIndex+1),a={text:`Texto`,image:`Imagem`,box:`Caixa`,group:`Grupo`,"text-container":`Texto em Caixa`,checkbox:`Caixa de Seleção`}[n.type]||n.type;return i.push(`Adicionou ${a}`),{...e,elements:t,history:r,historyDescriptions:i,historyIndex:r.length-1,selectedElementIds:[n.id]}})},[]),x=t.default.useCallback(e=>{s(t=>{let n=t.elements.filter(t=>t.id!==e),r=t.history.slice(0,t.historyIndex+1);r.push(n);let i=t.historyDescriptions.slice(0,t.historyIndex+1);return i.push(`Remover Elemento`),{...t,elements:n,selectedElementIds:t.selectedElementIds.filter(t=>t!==e),history:r,historyDescriptions:i,historyIndex:r.length-1}})},[]),S=t.default.useCallback(()=>{s(e=>{if(e.selectedElementIds.length===0)return e;let t=e.elements.filter(t=>!e.selectedElementIds.includes(t.id)),n=e.history.slice(0,e.historyIndex+1);n.push(t);let r=e.historyDescriptions.slice(0,e.historyIndex+1);return r.push(`Remover Itens Selecionados`),{...e,elements:t,selectedElementIds:[],history:n,historyDescriptions:r,historyIndex:n.length-1}})},[]),C=t.default.useCallback((e,t=!1)=>{s(n=>{if(e===null)return{...n,selectedElementIds:[]};if(t){let t=n.selectedElementIds.includes(e),r;return r=t?n.selectedElementIds.filter(t=>t!==e):[...n.selectedElementIds,e],{...n,selectedElementIds:r}}else return{...n,selectedElementIds:[e]}})},[]),w=t.default.useCallback(e=>{s(t=>({...t,selectedElementIds:e}))},[]),T=t.default.useCallback((e,t)=>{s(n=>{let r=[...n.elements],i=r[e];r.splice(e,1),r.splice(t,0,i);let a=n.history.slice(0,n.historyIndex+1);a.push(r);let o=n.historyDescriptions.slice(0,n.historyIndex+1);return o.push(`Mover Elemento`),{...n,elements:r,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[]),E=t.default.useCallback((e,t,n=!0)=>{s(r=>{let i=r.elements.map(n=>n.id===e?{...n,...t}:n),a=r.history,o=r.historyIndex,s=r.historyDescriptions;return n&&(a=r.history.slice(0,r.historyIndex+1),a.push(i),o=a.length-1,s=r.historyDescriptions.slice(0,r.historyIndex+1),s.push(`Atualizar Elemento`)),{...r,elements:i,history:a,historyDescriptions:s,historyIndex:o}})},[]),D=t.default.useCallback((e,t=!0)=>{s(n=>{let r=[...n.elements],i=[],a=new Set;e.forEach(({id:e,changes:t})=>{let r=n.elements.find(t=>t.id===e);if(r)if(r.groupId&&(t.x!==void 0||t.y!==void 0)){let e=n.elements.find(e=>e.id===r.groupId);if(e&&!a.has(e.id)){let n=(t.x??r.x)-r.x,o=(t.y??r.y)-r.y;i.push({id:e.id,changes:{x:e.x+n,y:e.y+o}}),a.add(e.id)}}else i.push({id:e,changes:t})});let o=[...i];i.forEach(({id:e,changes:t})=>{if(t.x!==void 0||t.y!==void 0){let r=n.elements.find(t=>t.id===e);if(r&&r.type===`group`){let i=(t.x??r.x)-r.x,a=(t.y??r.y)-r.y;n.elements.forEach(t=>{t.groupId===e&&(o.some(e=>e.id===t.id)||o.push({id:t.id,changes:{x:t.x+i,y:t.y+a}}))})}}}),o.forEach(({id:e,changes:t})=>{let n=r.findIndex(t=>t.id===e);n!==-1&&(r[n]={...r[n],...t})});let s=n.history,c=n.historyIndex,l=n.historyDescriptions;return t&&(s=n.history.slice(0,n.historyIndex+1),s.push(r),c=s.length-1,l=n.historyDescriptions.slice(0,n.historyIndex+1),l.push(`Atualizar Múltiplos Elementos`)),{...n,elements:r,history:s,historyDescriptions:l,historyIndex:c}})},[]),O=t.default.useCallback(e=>{s(t=>{let n=t.elements.filter(t=>e.includes(t.id));if(n.length===0)return t;let r=Math.min(...n.map(e=>e.x)),i=Math.min(...n.map(e=>e.y)),a=Math.max(...n.map(e=>e.x+e.width)),o=Math.max(...n.map(e=>e.y+e.height)),s={id:crypto.randomUUID(),type:`group`,name:`Novo Grupo`,content:``,x:r,y:i,width:a-r,height:o-i,style:{zIndex:0}},c=t.elements.map(t=>e.includes(t.id)?{...t,groupId:s.id}:t);c.push(s);let l=t.history.slice(0,t.historyIndex+1);l.push(c);let u=t.historyDescriptions.slice(0,t.historyIndex+1);return u.push(`Agrupar Elementos`),{...t,elements:c,selectedElementIds:[s.id],history:l,historyDescriptions:u,historyIndex:l.length-1}})},[]),k=t.default.useCallback(e=>{s(t=>{let n=t.elements.find(t=>t.id===e);if(!n||n.type!==`group`)return t;let r=[],i=t.elements.filter(t=>t.id!==e).map(t=>t.groupId===e?(r.push(t.id),{...t,groupId:void 0}):t),a=t.history.slice(0,t.historyIndex+1);a.push(i);let o=t.historyDescriptions.slice(0,t.historyIndex+1);return o.push(`Desagrupar Elementos`),{...t,elements:i,selectedElementIds:r,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[]),A=t.default.useCallback((e,t)=>{s(n=>{let r=n.elements.map(n=>n.id===e?{...n,name:t}:n);return{...n,elements:r}})},[]),j=t.default.useCallback((e,t)=>{if(!e.find(e=>e.id===t&&e.type===`group`))return e;let n=e.filter(e=>e.groupId===t);if(n.length===0)return e;let r=Math.min(...n.map(e=>e.x)),i=Math.min(...n.map(e=>e.y)),a=Math.max(...n.map(e=>e.x+e.width)),o=Math.max(...n.map(e=>e.y+e.height));return e.map(e=>e.id===t?{...e,x:r,y:i,width:a-r,height:o-i}:e)},[]),M=t.default.useCallback((e,t)=>{s(n=>{let r=n.elements.find(t=>t.id===e),i=n.elements.find(e=>e.id===t&&e.type===`group`);if(!r||!i)return n;let a=n.elements.map(n=>n.id===e?{...n,groupId:t}:n);a=j(a,t);let o=n.history.slice(0,n.historyIndex+1);o.push(a);let s=n.historyDescriptions.slice(0,n.historyIndex+1);return s.push(`Adicionar ao Grupo`),{...n,elements:a,history:o,historyDescriptions:s,historyIndex:o.length-1}})},[j]),N=t.default.useCallback(e=>{s(t=>{let n=t.elements.find(t=>t.id===e);if(!n||!n.groupId)return t;let r=n.groupId,i=t.elements.map(t=>t.id===e?{...t,groupId:void 0}:t);i=j(i,r);let a=t.history.slice(0,t.historyIndex+1);a.push(i);let o=t.historyDescriptions.slice(0,t.historyIndex+1);return o.push(`Remover do Grupo`),{...t,elements:i,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[j]),P=t.default.useCallback((e,t,n)=>{s(r=>{let i=r.elements.find(t=>t.id===e&&t.type===`group`);if(!i)return r;let a=t/i.width,o=n/i.height,s=i.x,c=i.y,l=r.elements.map(r=>{if(r.id===e)return{...r,width:t,height:n};if(r.groupId===e){let e=r.x-s,t=r.y-c,n=s+e*a,i=c+t*o;return{...r,x:n,y:i,width:Math.max(1,r.width*a),height:Math.max(1,r.height*o)}}return r}),u=r.history.slice(0,r.historyIndex+1);u.push(l);let d=r.historyDescriptions.slice(0,r.historyIndex+1);return d.push(`Redimensionar Grupo`),{...r,elements:l,history:u,historyDescriptions:d,historyIndex:u.length-1}})},[]),ee=t.default.useCallback((e,t)=>{s(n=>({...n,mockData:e,singleMockData:t}))},[]),F=t.default.useCallback(e=>{s(t=>({...t,listSettings:{...t.listSettings,...e}}))},[]),te=t.default.useCallback(e=>{s(t=>({...t,assets:[...t.assets,e]}))},[]),I=t.default.useCallback(e=>{s(t=>({...t,assets:t.assets.filter(t=>t.id!==e)}))},[]);return(0,r.jsx)(eS.Provider,{value:t.default.useMemo(()=>({state:o,setGridSize:u,setZoom:d,setPan:f,setSnapLines:p,addElement:b,removeElement:x,removeSelected:S,selectElement:C,setSelectedElements:w,moveElement:T,updateElement:E,updateElements:D,groupElements:O,ungroupElements:k,renameElement:A,addToGroup:M,removeFromGroup:N,resizeGroup:P,setMockData:ee,updateListSettings:F,setCanvasHeight:l,loadState:m,undo:h,redo:g,jumpToHistory:_,copy:v,paste:y,setPropertiesPanelOpen:c,addAsset:te,removeAsset:I}),[o,b,x,S,C,w,T,E,D,O,k,A,M,N,P,ee,F,l,m,h,g,_,v,y,u,d,f,p,te,I,c]),children:e})},rS=()=>{let e=(0,t.useContext)(eS);if(!e)throw Error(`useEditor must be used within an EditorProvider`);return e},iS=()=>{let{state:e,updateElements:t}=rS(),{selectedElementIds:n,elements:i}=e;if(n.length<2)return null;let a=()=>i.filter(e=>n.includes(e.id));return(0,r.jsxs)(W,{gap:`2`,align:`center`,wrap:`wrap`,style:{backgroundColor:`var(--color-panel-solid)`,padding:`8px`,borderRadius:`8px`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`,border:`1px solid var(--gray-5)`,maxWidth:`90vw`,justifyContent:`center`},children:[(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.min(...e.map(e=>e.x));t(e.map(e=>({id:e.id,changes:{x:n}})))},title:`Alinhar à Esquerda`,children:(0,r.jsx)(T,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=(Math.min(...e.map(e=>e.x))+Math.max(...e.map(e=>e.x+e.width)))/2;t(e.map(e=>({id:e.id,changes:{x:n-e.width/2}})))},title:`Alinhar ao Centro (Horizontal)`,children:(0,r.jsx)(x,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.max(...e.map(e=>e.x+e.width));t(e.map(e=>({id:e.id,changes:{x:n-e.width}})))},title:`Alinhar à Direita`,children:(0,r.jsx)(D,{})}),(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.min(...e.map(e=>e.y));t(e.map(e=>({id:e.id,changes:{y:n}})))},title:`Alinhar ao Topo`,children:(0,r.jsx)(k,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=(Math.min(...e.map(e=>e.y))+Math.max(...e.map(e=>e.y+e.height)))/2;t(e.map(e=>({id:e.id,changes:{y:n-e.height/2}})))},title:`Alinhar ao Centro (Vertical)`,children:(0,r.jsx)(C,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.max(...e.map(e=>e.y+e.height));t(e.map(e=>({id:e.id,changes:{y:n-e.height}})))},title:`Alinhar à Base`,children:(0,r.jsx)(y,{})}),n.length>=3&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<3)return;let n=[...e].sort((e,t)=>e.x-t.x),r=n[0],i=n[n.length-1],o=(i.x+i.width/2-(r.x+r.width/2))/(n.length-1);t(n.map((e,t)=>{if(t===0||t===n.length-1)return null;let i=r.x+r.width/2+o*t;return{id:e.id,changes:{x:i-e.width/2}}}).filter(e=>e!==null))},title:`Distribuir Horizontalmente`,children:(0,r.jsx)(wt,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<3)return;let n=[...e].sort((e,t)=>e.y-t.y),r=n[0],i=n[n.length-1],o=(i.y+i.height/2-(r.y+r.height/2))/(n.length-1);t(n.map((e,t)=>{if(t===0||t===n.length-1)return null;let i=r.y+r.height/2+o*t;return{id:e.id,changes:{y:i-e.height/2}}}).filter(e=>e!==null))},title:`Distribuir Verticalmente`,children:(0,r.jsx)(Et,{})})]})]})};var aS=function(){return aS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aS.apply(this,arguments)},oS={width:`100%`,height:`10px`,top:`0px`,left:`0px`,cursor:`row-resize`},sS={width:`10px`,height:`100%`,top:`0px`,left:`0px`,cursor:`col-resize`},cS={width:`20px`,height:`20px`,position:`absolute`,zIndex:1},lS={top:aS(aS({},oS),{top:`-5px`}),right:aS(aS({},sS),{left:void 0,right:`-5px`}),bottom:aS(aS({},oS),{top:void 0,bottom:`-5px`}),left:aS(aS({},sS),{left:`-5px`}),topRight:aS(aS({},cS),{right:`-10px`,top:`-10px`,cursor:`ne-resize`}),bottomRight:aS(aS({},cS),{right:`-10px`,bottom:`-10px`,cursor:`se-resize`}),bottomLeft:aS(aS({},cS),{left:`-10px`,bottom:`-10px`,cursor:`sw-resize`}),topLeft:aS(aS({},cS),{left:`-10px`,top:`-10px`,cursor:`nw-resize`})},uS=(0,t.memo)(function(e){var n=e.onResizeStart,i=e.direction,a=e.children,o=e.replaceStyles,s=e.className,c=(0,t.useCallback)(function(e){n(e,i)},[n,i]),l=(0,t.useCallback)(function(e){n(e,i)},[n,i]),u=(0,t.useMemo)(function(){return aS(aS({position:`absolute`,userSelect:`none`},lS[i]),o??{})},[o,i]);return(0,r.jsx)(`div`,{className:s||void 0,style:u,onMouseDown:c,onTouchStart:l,children:a})}),dS=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),fS=function(){return fS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fS.apply(this,arguments)},pS={width:`auto`,height:`auto`},mS=function(e,t,n){return Math.max(Math.min(e,n),t)},hS=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},gS=function(e,t){return new RegExp(e,`i`).test(t)},_S=function(e){return!!(e.touches&&e.touches.length)},vS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},yS=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},bS=function(e){return e=e.toString(),e===`auto`||e.endsWith(`px`)||e.endsWith(`%`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`vmax`)||e.endsWith(`vmin`)?e:`${e}px`},xS=function(e,t,n,r){if(e&&typeof e==`string`){if(e.endsWith(`px`))return Number(e.replace(`px`,``));if(e.endsWith(`%`)){var i=Number(e.replace(`%`,``))/100;return t*i}if(e.endsWith(`vw`)){var i=Number(e.replace(`vw`,``))/100;return n*i}if(e.endsWith(`vh`)){var i=Number(e.replace(`vh`,``))/100;return r*i}}return e},SS=function(e,t,n,r,i,a,o){return r=xS(r,e.width,t,n),i=xS(i,e.height,t,n),a=xS(a,e.width,t,n),o=xS(o,e.height,t,n),{maxWidth:r===void 0?void 0:Number(r),maxHeight:i===void 0?void 0:Number(i),minWidth:a===void 0?void 0:Number(a),minHeight:o===void 0?void 0:Number(o)}},CS=function(e){return Array.isArray(e)?e:[e,e]},wS=`as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap`.split(`.`),TS=`__resizable_base__`,ES=function(e){dS(t,e);function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement(`div`);return t.style.width=`100%`,t.style.height=`100%`,t.style.position=`absolute`,t.style.transform=`scale(0, 0)`,t.style.left=`0`,t.style.flex=`0 0 100%`,t.classList?t.classList.add(TS):t.className+=TS,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.state={isResizing:!1,width:n.propsSize?.width??`auto`,height:n.propsSize?.height??`auto`,direction:`right`,original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:`100%`,width:`100%`,backgroundColor:`rgba(0,0,0,0)`,cursor:`auto`,opacity:0,position:`fixed`,zIndex:9999,top:`0`,left:`0`,bottom:`0`,right:`0`},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(t.prototype,`parentNode`,{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`window`,{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`propsSize`,{get:function(){return this.props.size||this.props.defaultSize||pS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`size`,{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;i!==`relative`&&(this.resizable.style.position=`relative`),e=this.resizable.style.width===`auto`?n:this.resizable.offsetWidth,t=this.resizable.style.height===`auto`?r:this.resizable.offsetHeight,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sizeStyle`,{get:function(){var e=this,t=this.props.size,n=function(t){if(e.state[t]===void 0||e.state[t]===`auto`)return`auto`;if(e.propsSize&&e.propsSize[t]&&e.propsSize[t]?.toString().endsWith(`%`)){if(e.state[t].toString().endsWith(`%`))return e.state[t].toString();var n=e.getParentSize();return`${Number(e.state[t].toString().replace(`px`,``))/n[t]*100}%`}return bS(e.state[t])};return{width:t&&t.width!==void 0&&!this.state.isResizing?bS(t.width):n(`width`),height:t&&t.height!==void 0&&!this.state.isResizing?bS(t.height):n(`height`)}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;n!==`wrap`&&(t=!0,this.parentNode.style.flexWrap=`wrap`),e.style.position=`relative`,e.style.minWidth=`100%`,e.style.minHeight=`100%`;var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener(`mouseup`,this.onMouseUp),this.window.addEventListener(`mousemove`,this.onMouseMove),this.window.addEventListener(`mouseleave`,this.onMouseUp),this.window.addEventListener(`touchmove`,this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener(`touchend`,this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener(`mouseup`,this.onMouseUp),this.window.removeEventListener(`mousemove`,this.onMouseMove),this.window.removeEventListener(`mouseleave`,this.onMouseUp),this.window.removeEventListener(`touchmove`,this.onMouseMove,!0),this.window.removeEventListener(`touchend`,this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis===`auto`?void 0:e.flexBasis})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return this.state[t]===`auto`&&this.state.original[t]===e&&(n===void 0||n===`auto`)?`auto`:e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n=this.props.boundsByDirection,r=this.state.direction,i=n&&gS(`left`,r),a=n&&gS(`top`,r),o,s;if(this.props.bounds===`parent`){var c=this.parentNode;c&&(o=i?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),s=a?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds===`window`?this.window&&(o=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,s=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),s=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),s&&Number.isFinite(s)&&(t=t&&t<s?t:s),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=CS(this.props.resizeRatio||1),i=r[0],a=r[1],o=this.state,s=o.direction,c=o.original,l=this.props,u=l.lockAspectRatio,d=l.lockAspectRatioExtraHeight,f=l.lockAspectRatioExtraWidth,p=c.width,m=c.height,h=d||0,g=f||0;return gS(`right`,s)&&(p=c.width+(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),gS(`left`,s)&&(p=c.width-(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),gS(`bottom`,s)&&(m=c.height+(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),gS(`top`,s)&&(m=c.height-(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),{newWidth:p,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,a=i.lockAspectRatio,o=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=r.width===void 0?10:r.width,l=n.width===void 0||n.width<0?e:n.width,u=r.height===void 0?10:r.height,d=n.height===void 0||n.height<0?t:n.height,f=o||0,p=s||0;if(a){var m=(u-f)*this.ratio+p,h=(d-f)*this.ratio+p,g=(c-p)/this.ratio+f,_=(l-p)/this.ratio+f,v=Math.max(c,m),y=Math.min(l,h),b=Math.max(u,g),x=Math.min(d,_);e=mS(e,v,y),t=mS(t,b,x)}else e=mS(e,c,l),t=mS(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds===`parent`){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&typeof this.props.bounds!=`string`){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,o=i.top,s=i.right,c=i.bottom;this.resizableLeft=a*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(!(!this.resizable||!this.window)){var n=0,r=0;if(e.nativeEvent&&vS(e.nativeEvent)?(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&_S(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),!(this.props.onResizeStart&&this.resizable&&this.props.onResizeStart(e,t,this.resizable)===!1)){this.props.size&&(this.props.size.height!==void 0&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),this.props.size.width!==void 0&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio==`number`?this.props.lockAspectRatio:this.size.width/this.size.height;var i,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!==`auto`){var o=this.parentNode;o&&(this.flexDir=this.window.getComputedStyle(o).flexDirection.startsWith(`row`)?`row`:`column`,i=a.flexBasis)}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:fS(fS({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||`auto`}),direction:t,flexBasis:i};this.setState(s)}}},t.prototype.onMouseMove=function(e){var t=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_S(e))try{e.preventDefault(),e.stopPropagation()}catch{}var r=this.props,i=r.maxWidth,a=r.maxHeight,o=r.minWidth,s=r.minHeight,c=_S(e)?e.touches[0].clientX:e.clientX,l=_S(e)?e.touches[0].clientY:e.clientY,u=this.state,d=u.direction,f=u.original,p=u.width,m=u.height,h=this.getParentSize(),g=SS(h,this.window.innerWidth,this.window.innerHeight,i,a,o,s);i=g.maxWidth,a=g.maxHeight,o=g.minWidth,s=g.minHeight;var _=this.calculateNewSizeFromDirection(c,l),v=_.newHeight,y=_.newWidth,b=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(y=yS(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=yS(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(y,v,{width:b.maxWidth,height:b.maxHeight},{width:o,height:s});if(y=x.newWidth,v=x.newHeight,this.props.grid){var S=hS(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),C=hS(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),w=this.props.snapGap||0,T=w===0||Math.abs(S-y)<=w?S:y,E=w===0||Math.abs(C-v)<=w?C:v;y=T,v=E}var D={width:y-f.width,height:v-f.height};if(this.delta=D,p&&typeof p==`string`){if(p.endsWith(`%`)){var O=y/h.width*100;y=`${O}%`}else if(p.endsWith(`vw`)){var k=y/this.window.innerWidth*100;y=`${k}vw`}else if(p.endsWith(`vh`)){var A=y/this.window.innerHeight*100;y=`${A}vh`}}if(m&&typeof m==`string`){if(m.endsWith(`%`)){var O=v/h.height*100;v=`${O}%`}else if(m.endsWith(`vw`)){var k=v/this.window.innerWidth*100;v=`${k}vw`}else if(m.endsWith(`vh`)){var A=v/this.window.innerHeight*100;v=`${A}vh`}}var j={width:this.createSizeForCssProperty(y,`width`),height:this.createSizeForCssProperty(v,`height`)};this.flexDir===`row`?j.flexBasis=j.width:this.flexDir===`column`&&(j.flexBasis=j.height);var M=this.state.width!==j.width,N=this.state.height!==j.height,P=this.state.flexBasis!==j.flexBasis,ee=M||N||P;ee&&(0,n.flushSync)(function(){t.setState(j)}),this.props.onResize&&ee&&this.props.onResize(e,d,this.resizable,D)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction;t.original,!(!n||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,this.delta),this.props.size&&this.setState({width:this.props.size.width??`auto`,height:this.props.size.height??`auto`}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:fS(fS({},this.state.backgroundStyle),{cursor:`auto`})}))},t.prototype.updateSize=function(e){this.setState({width:e.width??`auto`,height:e.height??`auto`})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,a=t.handleClasses,o=t.handleWrapperStyle,s=t.handleWrapperClass,c=t.handleComponent;return n?(0,r.jsx)(`div`,{className:s,style:o,children:Object.keys(n).map(function(t){return n[t]===!1?null:(0,r.jsx)(uS,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:a&&a[t],children:c&&c[t]?c[t]:null},t)})}):null},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return wS.indexOf(n)===-1&&(t[n]=e.props[n]),t},{}),n=fS(fS(fS({position:`relative`,userSelect:this.state.isResizing?`none`:`auto`},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:`border-box`,flexShrink:0});return this.state.flexBasis&&(n.flexBasis=this.state.flexBasis),(0,r.jsxs)(this.props.as||`div`,fS({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,r.jsx)(`div`,{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:`div`,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(t.PureComponent);let DS=[`normal`,`bold`,`100`,`300`,`900`],OS=[`100`,`300`,`400`,`500`,`600`,`700`,`900`,`normal`,`bold`],kS=(e,t=DS)=>{let n=e==null?`normal`:String(e);return n===`400`||n===`normal`?t.includes(`400`)?`400`:`normal`:n===`700`||n===`bold`?t.includes(`700`)?`700`:`bold`:t.includes(n)?n:t.includes(`400`)?`400`:t[0]??`normal`},AS=(e,t)=>t.includes(e)?t:[e,...t],jS=(e,t)=>{if(e==null)return``;if(t.type===`boolean`)return String(e)===`true`||e===!0||typeof e==`number`&&e>0?t.trueLabel||`Sim`:t.falseLabel||`Não`;if(t.type===`date`)try{let n=new Date(e);if(isNaN(n.getTime()))return String(e);if(t.dateFormat){let e=n.getDate().toString().padStart(2,`0`),r=(n.getMonth()+1).toString().padStart(2,`0`),i=n.getFullYear(),a=n.getHours().toString().padStart(2,`0`),o=n.getMinutes().toString().padStart(2,`0`),s=n.getSeconds().toString().padStart(2,`0`);return t.dateFormat.replace(`DD`,e).replace(`MM`,r).replace(`YYYY`,String(i)).replace(`HH`,a).replace(`mm`,o).replace(`ss`,s)}return n.toLocaleDateString()}catch{return String(e)}if(t.type===`number`){let n=parseFloat(String(e));return isNaN(n)?String(e):t.numberFormat===`currency`?(t.currencySymbol||`R$`)+` `+n.toFixed(t.decimalPlaces||2):t.numberFormat===`percent`?n.toFixed(t.decimalPlaces||0)+`%`:n.toFixed(t.decimalPlaces||0)}return String(e)},MS=e=>{if(e==null)return!1;let t=String(e).trim();return t?t.startsWith(`http://`)||t.startsWith(`https://`)||t.startsWith(`data:`)||t.startsWith(`/`)||/^[a-zA-Z0-9][a-zA-Z0-9-+.]*:/.test(t):!1},NS=(e,t,n)=>{let r=String(e).toLowerCase(),i=String(n).toLowerCase();switch(t){case`equals`:return r===i;case`notEquals`:return r!==i;case`contains`:return r.includes(i);case`greaterThan`:return parseFloat(r)>parseFloat(i);case`lessThan`:return parseFloat(r)<parseFloat(i);case`truthy`:return!!e;case`falsy`:return!e;default:return!1}},PS=t.default.memo(({element:e,isSelected:n})=>{let{selectElement:i,updateElement:a,updateElements:o,state:s,resizeGroup:c,setSnapLines:l,setPropertiesPanelOpen:u}=rS(),[d,f]=(0,t.useState)(!1),[,p]=(0,t.useState)(!1),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(null),_=(0,t.useRef)({x:0,y:0}),v=(0,t.useRef)({}),y=(0,t.useRef)(!1),b=(0,t.useRef)(!1),x=(0,t.useRef)(0),S=(0,t.useRef)(0),C=(0,t.useRef)({x:0,y:0}),w=(0,t.useRef)(!1),T=s.canvasHeight||150,E=s.isList?s.mockData.length>0?s.mockData[0]:null:s.singleMockData,D=e.content,O={},k=(e,t)=>{let n=/(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;return!e||e===`none`?`0 4px 12px 0 ${t}`:n.test(e)?e.replace(n,t):`${e} ${t}`};if(E){if(e.type===`text`||e.type===`text-container`)D=D.replace(/\{\{(.*?)\}\}/g,(t,n)=>{let r=E[n.trim()];return r==null?t:e.formatting?jS(r,e.formatting):String(r)});else if(e.type===`image`)if(e.dataBinding){let t=E[e.dataBinding];t!=null&&(D=String(t))}else D=D.replace(/\{\{(.*?)\}\}/g,(e,t)=>{let n=E[t.trim()];return n==null?e:String(n)});e.styleBindings&&Object.entries(e.styleBindings).forEach(([t,n])=>{let r=E[n];if(r!=null)if(t===`boxShadowColor`){let t=O.boxShadow||e.style?.boxShadow;O={...O,boxShadow:k(t,String(r))}}else O={...O,[t]:String(r)}}),e.conditions&&e.conditions.forEach(e=>{let t=E[e.property];NS(t,e.operator,e.value)&&(O={...O,...e.style})})}let A=O.display===`none`;if(A&&n){let{display:e,...t}=O;O=t}let j=t=>{t.stopPropagation(),!y.current&&!b.current&&!d&&(t.shiftKey?i(e.id,!0):i(e.id,!1))},M=t=>{t.stopPropagation(),e.locked||u(!0)},N=t=>{if(e.locked||t.button!==0)return;t.stopPropagation();let r=t.shiftKey;if(y.current=!1,b.current=!1,e.groupId&&!n){i(e.groupId,r);return}n||(i(e.id,r),b.current=!0),f(!0),_.current={x:t.clientX,y:t.clientY},t.currentTarget.setPointerCapture(t.pointerId);let a=new Set(s.selectedElementIds);n||(r||a.clear(),a.add(e.id));let o={};s.elements.forEach(e=>{a.has(e.id)&&(o[e.id]={x:e.x,y:e.y})}),v.current=o},P=t=>{if(d){let n=s.zoom||1,r=(t.clientX-_.current.x)/n,i=(t.clientY-_.current.y)/n;(Math.abs(r)>2||Math.abs(i)>2)&&(y.current=!0);let a=5/n,c=[],u=Object.entries(v.current).map(([t,n])=>{let o=n.x+r,l=n.y+i;if(s.gridSize>0)o=Math.round(o/s.gridSize)*s.gridSize,l=Math.round(l/s.gridSize)*s.gridSize;else{let n=!1,r=!1,i=e.width??100,u=e.height??100;Object.keys(v.current).length===1&&s.elements.forEach(e=>{if(e.id===t)return;let s=e.width??100,d=e.height??100;n||(Math.abs(o-e.x)<a?(o=e.x,n=!0,c.push({orientation:`vertical`,position:e.x})):Math.abs(o-(e.x+s))<a?(o=e.x+s,n=!0,c.push({orientation:`vertical`,position:e.x+s})):Math.abs(o+i-e.x)<a?(o=e.x-i,n=!0,c.push({orientation:`vertical`,position:e.x})):Math.abs(o+i-(e.x+s))<a&&(o=e.x+s-i,n=!0,c.push({orientation:`vertical`,position:e.x+s}))),r||(Math.abs(l-e.y)<a?(l=e.y,r=!0,c.push({orientation:`horizontal`,position:e.y})):Math.abs(l-(e.y+d))<a?(l=e.y+d,r=!0,c.push({orientation:`horizontal`,position:e.y+d})):Math.abs(l+u-e.y)<a?(l=e.y-u,r=!0,c.push({orientation:`horizontal`,position:e.y})):Math.abs(l+u-(e.y+d))<a&&(l=e.y+d-u,r=!0,c.push({orientation:`horizontal`,position:e.y+d})))})}if(o=Math.max(0,o),s.isList){l=Math.max(0,l);let t=e.height??100;T>0&&(l=Math.min(l,T-t)),l=Math.max(0,l)}return{id:t,changes:{x:o,y:l}}});l&&l(c),o(u,!1)}},ee=e=>{d&&(f(!1),e.currentTarget.releasePointerCapture(e.pointerId),o([],!0),l&&l([]))},F=t=>{t.stopPropagation(),t.preventDefault(),h(!0);let n=t.target.closest(`.resizable-element`);if(n){let r=n.getBoundingClientRect();C.current={x:r.left+r.width/2,y:r.top+r.height/2};let i=t.clientX-C.current.x,a=t.clientY-C.current.y;x.current=Math.atan2(a,i)*(180/Math.PI),S.current=e.rotation||0}};(0,t.useEffect)(()=>{let t=t=>{if(m){let n=t.clientX-C.current.x,r=t.clientY-C.current.y,i=Math.atan2(r,n)*(180/Math.PI)-x.current,o=(S.current+i)%360;a(e.id,{rotation:o},!1)}},n=()=>{m&&(h(!1),a(e.id,{rotation:e.rotation},!0))};return m&&(window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,n)),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,n)}},[m,e.id,a,e.rotation]),(0,t.useEffect)(()=>{e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`&&requestAnimationFrame(()=>{if(g.current){let t=g.current.scrollWidth;Math.abs(t-(e.width??0))>2&&a(e.id,{width:t},!1)}})},[D,e.autoGrow,e.containerExpansion,e.style,e.width,e.formatting,a,e.id,e.type]);let te={position:`relative`,left:0,top:0,width:`100%`,height:e.autoGrow?`auto`:`100%`,minHeight:e.autoGrow?`100%`:void 0,padding:e.type===`image`||e.type===`text`?0:`8px`,outline:`none`,cursor:d?`grabbing`:`grab`,borderRadius:`var(--radius-2)`,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,userSelect:`none`,boxSizing:`border-box`,...e.style,...O},[I,ne]=(0,t.useState)(!1);return(0,r.jsx)(ES,{className:`resizable-element`,size:{width:e.width??100,height:e.autoGrow?`auto`:e.height??100},maxHeight:s.isList?Math.max(10,T-e.y):void 0,onResizeStart:e=>{p(!0),w.current=!!e.shiftKey},onResizeStop:(t,n,r,i)=>{p(!1);let o=(e.width??100)+i.width,s=(e.height??100)+i.height,l=e.x??0,u=e.y??0;n.includes(`left`)&&(l-=i.width),n.includes(`top`)&&(u-=i.height),e.type===`group`?(c(e.id,o,s),a(e.id,{x:l,y:u},!0)):a(e.id,{width:o,height:s,x:l,y:u})},handleComponent:{topLeft:(0,r.jsx)(`div`,{className:`resize-handle top-left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),topRight:(0,r.jsx)(`div`,{className:`resize-handle top-right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottomLeft:(0,r.jsx)(`div`,{className:`resize-handle bottom-left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottomRight:(0,r.jsx)(`div`,{className:`resize-handle bottom-right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),top:(0,r.jsx)(`div`,{className:`resize-handle top`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottom:(0,r.jsx)(`div`,{className:`resize-handle bottom`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),left:(0,r.jsx)(`div`,{className:`resize-handle left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),right:(0,r.jsx)(`div`,{className:`resize-handle right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}})},handleStyles:{topLeft:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,left:-5,top:-5,zIndex:n?1001:10,opacity:n?1:0},topRight:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,right:-5,top:-5,zIndex:n?1001:10,opacity:n?1:0},bottomLeft:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,left:-5,bottom:-5,zIndex:n?1001:10,opacity:n?1:0},bottomRight:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,right:-5,bottom:-5,zIndex:n?1001:10,opacity:n?1:0},top:{height:6,top:-3,zIndex:n?1e3:9,opacity:n?1:0},bottom:{height:6,bottom:-3,zIndex:n?1e3:9,opacity:n?1:0},left:{width:6,left:-3,zIndex:n?1e3:9,opacity:n?1:0},right:{width:6,right:-3,zIndex:n?1e3:9,opacity:n?1:0}},style:{position:`absolute`,transform:`translate(${e.x??0}px, ${e.y??0}px) rotate(${e.rotation||0}deg)`,height:e.autoGrow?`auto`:void 0,display:A&&!n?`none`:void 0,opacity:A&&n?.4:1,zIndex:n?1e3:e.style?.zIndex===void 0?void 0:Number(e.style.zIndex),outline:`none`,overflow:e.style?.overflow||(e.autoGrow?`visible`:`hidden`)},enable:e.autoGrow?{top:!1,right:!0,bottom:!1,left:!0,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1}:void 0,lockAspectRatio:w.current,grid:s.gridSize>0?[s.gridSize,s.gridSize]:void 0,children:(0,r.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},onMouseEnter:()=>ne(!0),onMouseLeave:()=>ne(!1),children:[(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,pointerEvents:`none`,border:n?`2px solid var(--accent-9)`:I?`1px dashed var(--gray-8)`:`none`,borderRadius:e.style?.borderRadius||`var(--radius-2)`,borderTopLeftRadius:e.style?.borderTopLeftRadius,borderTopRightRadius:e.style?.borderTopRightRadius,borderBottomRightRadius:e.style?.borderBottomRightRadius,borderBottomLeftRadius:e.style?.borderBottomLeftRadius,zIndex:10}}),(0,r.jsxs)(U,{ref:g,style:{...te,...e.type===`text-container`&&{display:`flex`,alignItems:e.style?.alignItems||`flex-start`,justifyContent:e.style?.justifyContent||`flex-start`},zIndex:2,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:te.whiteSpace,width:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`max-content`:`100%`,height:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`vertical`?`auto`:`100%`},onPointerDown:N,onPointerMove:P,onPointerUp:ee,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onClick:j,onDoubleClick:M,title:e.name,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`},onDrop:t=>{t.preventDefault(),t.stopPropagation();let n=t.dataTransfer.getData(`application/x-editor-prop`);if(n)if(e.type===`text`||e.type===`text-container`){let t=e.content?`${e.content} {{${n}}}`:`{{${n}}}`;a(e.id,{content:t,dataBinding:n})}else e.type===`image`?a(e.id,{dataBinding:n,content:`{{${n}}}`}):e.type===`checkbox`&&a(e.id,{dataBinding:n})},children:[e.type===`text`&&(0,r.jsx)(H,{style:{width:`100%`,height:`100%`},children:D}),e.type===`text-container`&&(0,r.jsx)(H,{style:{width:`100%`,height:`100%`,display:`block`},children:D}),e.type===`image`&&(D&&MS(D)?(0,r.jsx)(`img`,{src:D,alt:`Element`,style:{width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`,pointerEvents:`none`}}):(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,backgroundColor:`#eee`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(H,{size:`1`,children:D?`URL inválida`:`Imagem Placeholder`})})),e.type===`box`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`}}),e.type===`group`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,border:n?`1px dashed var(--accent-9)`:`1px dashed var(--gray-6)`,opacity:.5,pointerEvents:`none`},children:(0,r.jsx)(H,{size:`1`,style:{position:`absolute`,top:0,left:0,backgroundColor:`var(--accent-3)`,color:`var(--accent-11)`,padding:`2px 6px`,fontSize:`10px`,borderBottomRightRadius:`4px`},children:e.name||`Grupo`})})]}),n&&(0,r.jsx)(U,{className:`rotate-handle`,style:{position:`absolute`,top:-30,left:`50%`,transform:`translateX(-50%)`,width:12,height:12,backgroundColor:`var(--accent-9)`,borderRadius:`50%`,cursor:`crosshair`,zIndex:50,boxShadow:`0 0 0 2px white`},onMouseDown:F,onPointerDown:e=>e.stopPropagation(),children:(0,r.jsx)(U,{style:{position:`absolute`,top:12,left:`50%`,width:2,height:18,backgroundColor:`var(--accent-9)`,transform:`translateX(-50%)`}})})]})})}),FS=()=>{let{state:e}=rS(),{snapLines:t}=e;return t.length===0?null:(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>(0,r.jsx)(`div`,{style:{position:`absolute`,left:e.orientation===`vertical`?e.position:0,top:e.orientation===`horizontal`?e.position:0,width:e.orientation===`vertical`?`1px`:`100%`,height:e.orientation===`horizontal`?`1px`:`100%`,backgroundColor:`#ff0000`,zIndex:9999,pointerEvents:`none`,borderLeft:e.orientation===`vertical`?`1px dashed #ff0000`:`none`,borderTop:e.orientation===`horizontal`?`1px dashed #ff0000`:`none`}},t))})},IS=()=>{let{state:e,selectElement:n,setSelectedElements:i,addElement:a,setZoom:o,setPan:s,undo:c,redo:l,copy:u,paste:d,removeSelected:f,updateElements:p}=rS(),m=(0,t.useRef)(null),[h,g]=(0,t.useState)(null),_=(0,t.useRef)(!1),v=(0,t.useRef)(!1),y=(0,t.useRef)(!1),b=(0,t.useRef)({x:0,y:0}),x=(0,t.useRef)({x:0,y:0}),S=(0,t.useRef)([]),C=(0,t.useRef)([]),w=(0,t.useRef)(e),T=(0,t.useRef)(0);(0,t.useEffect)(()=>{w.current=e},[e]);let E=(0,t.useCallback)(e=>{if(!m.current)return;let t=w.current;if(v.current){let n=e.clientX-x.current.x,r=e.clientY-x.current.y;s({x:t.pan.x+n,y:t.pan.y+r}),x.current={x:e.clientX,y:e.clientY};return}if(!_.current)return;let n=m.current.getBoundingClientRect(),r=(e.clientX-n.left-t.pan.x)/t.zoom,a=(e.clientY-n.top-t.pan.y)/t.zoom,o=Math.min(b.current.x,r),c=Math.min(b.current.y,a),l=Math.abs(r-b.current.x),u=Math.abs(a-b.current.y);g({x:o,y:c,width:l,height:u});let d=Date.now();if(!(d-T.current<50)&&(l>0||u>0)){let e=[];t.elements.forEach(t=>{let n=t.x??0,r=t.y??0,i=t.width??100,a=t.height??100,s=n+i,d=r+a,f=o+l,p=c+u;n<f&&s>o&&r<p&&d>c&&e.push(t.id)});let n=Array.from(new Set([...S.current,...e])),r=C.current;r.length===n.length&&r.every(e=>n.includes(e))||(i(n),C.current=n,T.current=d)}},[i,s]),D=(0,t.useCallback)(e=>{(_.current||v.current)&&e.target.releasePointerCapture(e.pointerId),_.current=!1,v.current=!1,g(null)},[]),O=t=>{if(t.button===2)return;let r=t.target;if(r.closest(`.resize-handle`)||r.closest(`.rotate-handle`))return;if(t.currentTarget.setPointerCapture(t.pointerId),t.button===1||t.button===0&&y.current||t.pointerType===`touch`){t.preventDefault(),v.current=!0,x.current={x:t.clientX,y:t.clientY};return}_.current=t.shiftKey;let i=m.current?.getBoundingClientRect();if(!i)return;let a=i.left,o=i.top;b.current={x:(t.clientX-a-e.pan.x)/e.zoom,y:(t.clientY-o-e.pan.y)/e.zoom},S.current=e.selectedElementIds,C.current=e.selectedElementIds,t.shiftKey||(n(null),S.current=[],C.current=[])};(0,t.useEffect)(()=>{let e=e=>{e.preventDefault();let t=w.current;if(e.ctrlKey||e.metaKey)o(Math.min(Math.max(.1,t.zoom-e.deltaY*.001),5));else{let n=e.shiftKey?e.deltaY:e.deltaX,r=e.shiftKey?e.deltaX:e.deltaY;s({x:t.pan.x-n*1,y:t.pan.y-r*1})}},t=m.current;return t&&t.addEventListener(`wheel`,e,{passive:!1}),()=>{t&&t.removeEventListener(`wheel`,e)}},[o,s]),(0,t.useEffect)(()=>{let t=t=>{if(t.code===`Space`&&!t.repeat&&!(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)&&(y.current=!0,m.current&&(m.current.style.cursor=`grab`)),!(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)&&((t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?l():c()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`y`&&(t.preventDefault(),l()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&(t.preventDefault(),u()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`v`&&(t.preventDefault(),d()),(t.key===`Delete`||t.key===`Backspace`)&&(t.preventDefault(),f()),[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(t.key))){t.preventDefault();let n=t.shiftKey?10:1,r=[];e.selectedElementIds.forEach(i=>{let a=e.elements.find(e=>e.id===i);if(a){let{x:o=0,y:s=0}=a;if(t.key===`ArrowUp`&&(s-=n),t.key===`ArrowDown`&&(s+=n),t.key===`ArrowLeft`&&(o-=n),t.key===`ArrowRight`&&(o+=n),o=Math.max(0,o),e.isList){s=Math.max(0,s);let t=a.height??100,n=e.canvasHeight||150;n>0&&(s=Math.min(s,n-t)),s=Math.max(0,s)}r.push({id:i,changes:{x:o,y:s}})}}),r.length>0&&p(r)}},n=e=>{e.code===`Space`&&(y.current=!1,m.current&&!v.current&&(m.current.style.cursor=`default`))};return window.addEventListener(`keydown`,t),window.addEventListener(`keyup`,n),()=>{window.removeEventListener(`keydown`,t),window.removeEventListener(`keyup`,n)}},[c,l,u,d,f,p,e.selectedElementIds,e.elements]);let k=(0,t.useRef)(!1),{setCanvasHeight:A}=rS(),j=e=>{e.stopPropagation(),e.preventDefault(),k.current=!0,window.addEventListener(`mousemove`,M),window.addEventListener(`mouseup`,N)},M=(0,t.useCallback)(e=>{if(!k.current||!m.current)return;let t=m.current.getBoundingClientRect(),n=e.clientY-t.top,r=Math.max(50,Math.min(n,2e3));A(Math.round(r))},[A]),N=(0,t.useCallback)(()=>{k.current=!1,window.removeEventListener(`mousemove`,M),window.removeEventListener(`mouseup`,N)},[M]);(0,t.useEffect)(()=>()=>{window.removeEventListener(`mousemove`,M),window.removeEventListener(`mouseup`,N)},[M,N]);let P=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`},ee=t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=(t.clientX-n.left-e.pan.x)/e.zoom,i=(t.clientY-n.top-e.pan.y)/e.zoom,o=t.dataTransfer.getData(`application/x-editor-prop`);if(o){a({type:`text`,content:`{{${o}}}`,x:r,y:i,width:150,height:30,dataBinding:o});return}let s=t.dataTransfer.getData(`application/x-editor-asset`);if(s)try{let e=JSON.parse(s);a({type:`image`,name:e.name,content:e.url,x:r,y:i,width:e.width||200,height:e.height||200})}catch(e){console.error(`Failed to parse asset`,e)}},F=e.canvasHeight||150;return(0,r.jsxs)(U,{ref:m,onPointerDown:O,onPointerMove:e=>{(_.current||v.current)&&E(e.nativeEvent)},onPointerUp:e=>{(_.current||v.current)&&D(e.nativeEvent)},onDragOver:P,onDrop:ee,style:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`,backgroundColor:`var(--gray-1)`,cursor:v.current?`grabbing`:`default`,backgroundImage:`radial-gradient(var(--gray-5) 1px, transparent 1px)`,backgroundSize:`${20*e.zoom}px ${20*e.zoom}px`,backgroundPosition:`${e.pan.x}px ${e.pan.y}px`},children:[(0,r.jsxs)(`div`,{style:{transform:`translate(${e.pan.x}px, ${e.pan.y}px) scale(${e.zoom})`,transformOrigin:`0 0`,width:`100%`,height:`100%`,position:`absolute`,top:0,left:0,pointerEvents:`none`},children:[(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`1px`,borderTop:`1px dashed var(--accent-9)`,opacity:.6,zIndex:5,pointerEvents:`none`},children:(0,r.jsx)(`span`,{style:{position:`absolute`,top:-16,left:4,fontSize:`10px`,color:`var(--accent-9)`,fontWeight:500},children:`Início (0px)`})}),e.elements.filter(e=>!e.hidden).map(t=>(0,r.jsx)(`div`,{style:{pointerEvents:`auto`},children:(0,r.jsx)(PS,{element:t,isSelected:e.selectedElementIds.includes(t.id)})},t.id)),(0,r.jsx)(FS,{}),h&&(0,r.jsx)(`div`,{style:{position:`absolute`,left:h.x,top:h.y,width:h.width,height:h.height,backgroundColor:`rgba(0, 120, 255, 0.2)`,border:`1px solid rgba(0, 120, 255, 0.8)`,pointerEvents:`none`,zIndex:999999}}),e.isList&&(0,r.jsxs)(`div`,{style:{position:`absolute`,top:F,left:0,right:0,height:`10px`,marginTop:`-5px`,cursor:`ns-resize`,zIndex:100,display:`flex`,alignItems:`center`,justifyContent:`center`},onMouseDown:j,children:[(0,r.jsx)(`div`,{style:{width:`100%`,height:`2px`,backgroundColor:`var(--accent-9)`,borderBottom:`none`,opacity:.8,boxShadow:`0 1px 4px rgba(0,0,0,0.2)`}}),(0,r.jsxs)(`div`,{style:{position:`absolute`,right:10,top:-20,backgroundColor:`var(--accent-9)`,color:`white`,fontSize:`11px`,padding:`2px 6px`,borderRadius:`4px`,fontWeight:500,pointerEvents:`none`,boxShadow:`0 2px 5px rgba(0,0,0,0.1)`},children:[`Altura do Item: `,F,`px`]})]})]}),e.elements.length===0&&(0,r.jsx)(W,{align:`center`,justify:`center`,style:{position:`absolute`,inset:0,pointerEvents:`none`},children:(0,r.jsxs)(U,{style:{backgroundColor:`var(--gray-2)`,border:`1px solid var(--gray-4)`,borderRadius:12,padding:16,maxWidth:320,textAlign:`center`,boxShadow:`0 6px 20px rgba(0,0,0,0.08)`},children:[(0,r.jsx)(H,{size:`3`,weight:`bold`,children:`Comece adicionando um elemento`}),(0,r.jsx)(H,{size:`2`,color:`gray`,as:`div`,mt:`2`,children:`Depois, arraste para mover e use os cantos para redimensionar.`}),(0,r.jsx)(H,{size:`1`,color:`gray`,as:`div`,mt:`2`,children:`Dica: clique com o botão direito para mais opções.`})]})}),h&&(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,zIndex:999995,pointerEvents:`auto`}})]})},LS=({onSave:e,templates:n,setIsTemplatesOpen:i,onFinish:a,onToggleSidebar:o})=>{let{state:s,loadState:c,addElement:l}=rS(),u=(0,t.useRef)(null),d=()=>{let e={elements:s.elements,isList:s.isList,mockData:s.mockData,singleMockData:s.singleMockData,listSettings:s.listSettings,canvasHeight:s.canvasHeight,gridSize:s.gridSize},t=JSON.stringify(e,null,2),n=new Blob([t],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`layout-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},f=()=>{u.current?.click()},p=e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{try{let t=e.target?.result;c(JSON.parse(t))}catch(e){console.error(`Failed to import layout`,e),alert(`Erro ao importar layout. Arquivo inválido.`)}},n.readAsText(t),e.target.value=``},m=()=>{if(e){let t={elements:s.elements,isList:s.isList,mockData:s.mockData,singleMockData:s.singleMockData,listSettings:s.listSettings,canvasHeight:s.canvasHeight};e(JSON.stringify(t,null,2))}},h=e=>{l({type:e,content:`New ${e}`})};return(0,r.jsxs)(W,{justify:`between`,align:`center`,px:`4`,py:`3`,style:{borderBottom:`1px solid var(--gray-5)`,backgroundColor:`var(--gray-1)`,flexShrink:0,zIndex:100},children:[(0,r.jsxs)(W,{gap:`4`,align:`center`,children:[o&&(0,r.jsx)(U,{display:{initial:`block`,md:`none`},children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:o,children:(0,r.jsx)(Qe,{width:`24`,height:`24`})})}),(0,r.jsx)(H,{size:`3`,weight:`bold`,children:`Editor de Layout`})]}),(0,r.jsxs)(W,{gap:`3`,align:`center`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`solid`,color:`green`,style:{cursor:`pointer`},children:[(0,r.jsx)(mt,{}),` Adicionar`]})}),(0,r.jsxs)(fy,{children:[(0,r.jsx)(q,{onSelect:()=>h(`text`),children:`Texto`}),(0,r.jsx)(q,{onSelect:()=>h(`image`),children:`Imagem`}),(0,r.jsx)(q,{onSelect:()=>h(`box`),children:`Container / Grupo`}),(0,r.jsx)(q,{onSelect:()=>h(`text-container`),children:`Container com Texto`})]})]}),(0,r.jsxs)(G,{variant:`soft`,color:`gray`,onClick:f,style:{cursor:`pointer`},children:[(0,r.jsx)(en,{}),` Importar`]}),(0,r.jsx)(`input`,{type:`file`,ref:u,style:{display:`none`},accept:`.json`,onChange:p}),(0,r.jsxs)(G,{variant:`soft`,color:`gray`,onClick:d,style:{cursor:`pointer`},children:[(0,r.jsx)(Ie,{}),` Exportar`]}),n&&n.length>0&&(0,r.jsxs)(G,{variant:`soft`,color:`gray`,onClick:()=>i(!0),style:{cursor:`pointer`},children:[(0,r.jsx)(We,{}),` Templates`]}),a&&(0,r.jsxs)(G,{id:`finish-button`,variant:`solid`,color:`green`,onClick:a,style:{cursor:`pointer`,marginLeft:8},children:[(0,r.jsx)(ge,{}),` Finalizar e Testar`]}),(0,r.jsxs)(G,{variant:`solid`,color:`blue`,onClick:m,style:{cursor:`pointer`},children:[(0,r.jsx)(bt,{}),` Salvar`]})]})]})},RS=()=>{let{state:e}=rS(),{elements:t,zoom:n,pan:i}=e,a=(()=>{if(t.length===0)return{minX:0,minY:0,maxX:1e3,maxY:1e3};let e=1/0,n=1/0,r=-1/0,i=-1/0;return t.forEach(t=>{e=Math.min(e,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x+t.width),i=Math.max(i,t.y+t.height)}),{minX:e-100,minY:n-100,maxX:r+100,maxY:i+100,width:r-e+200,height:i-n+200}})(),o=window.innerWidth/n,s=window.innerHeight/n,c=-i.x/n,l=-i.y/n;return(0,r.jsx)(U,{style:{position:`absolute`,bottom:20,right:20,width:150,height:150,backgroundColor:`rgba(255, 255, 255, 0.9)`,border:`1px solid var(--gray-6)`,borderRadius:8,overflow:`hidden`,boxShadow:`0 4px 12px rgba(0,0,0,0.1)`,zIndex:100},children:(0,r.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`,transform:`scale(0.1) translate(${-a.minX}px, ${-a.minY}px)`,transformOrigin:`top left`},children:[t.filter(e=>!e.hidden).map(e=>(0,r.jsx)(`div`,{style:{position:`absolute`,left:e.x,top:e.y,width:e.width,height:e.height,backgroundColor:`var(--accent-9)`,opacity:.5,border:`1px solid var(--accent-11)`}},e.id)),(0,r.jsx)(`div`,{style:{position:`absolute`,left:c,top:l,width:o,height:s,border:`20px solid rgba(0, 0, 0, 0.2)`,pointerEvents:`none`}})]})})};var zS=[{targetId:`sidebar-area`,title:`Biblioteca de Blocos`,content:`Arraste ou clique nos blocos para adicionar ao layout. Aqui você também gerencia o conteúdo.`,position:`right`},{targetId:`canvas-area`,title:`Área de Criação`,content:`Seu espaço de trabalho. Mova, redimensione e organize os elementos livremente.`,position:`center`},{targetId:`preview-area`,title:`Visualização Real`,content:`Confira o resultado final com dados reais enquanto edita. O que você vê é o que será exportado.`,position:`left`},{targetId:`finish-button`,title:`Finalizar e Testar`,content:`Pronto? Clique aqui para testar com mais dados e exportar seu layout.`,position:`bottom`}];let BS=({isOpen:e,onClose:n})=>{let[i,a]=(0,t.useState)(0),[o,s]=(0,t.useState)(null);if((0,t.useEffect)(()=>{if(!e)return;let t=zS[i],n=document.getElementById(t.targetId);if(n){let e=n.getBoundingClientRect(),r=0,i=0;switch(t.position){case`right`:r=e.top+e.height/2-100,i=e.right+20;break;case`left`:r=e.top+e.height/2-100,i=e.left-320-20;break;case`bottom`:r=e.bottom+20,i=e.left+e.width/2-160;break;case`top`:r=e.top-200-20,i=e.left+e.width/2-160;break;case`center`:r=window.innerHeight/2-100,i=window.innerWidth/2-160;break}i<20&&(i=20),r<20&&(r=20),i+320>window.innerWidth&&(i=window.innerWidth-340),r+200>window.innerHeight&&(r=window.innerHeight-220),s({top:r,left:i})}else s({top:window.innerHeight/2-100,left:window.innerWidth/2-160})},[e,i]),!e||!o)return null;let c=zS[i],l=i===zS.length-1;return(0,r.jsx)(U,{style:{position:`fixed`,top:0,left:0,width:`100vw`,height:`100vh`,zIndex:9999,pointerEvents:`none`},children:(0,r.jsx)(Ev,{style:{position:`absolute`,top:o.top,left:o.left,width:320,pointerEvents:`auto`,boxShadow:`0 10px 30px rgba(0,0,0,0.2), 0 0 0 2px var(--accent-9)`,backgroundColor:`var(--color-panel-solid)`,transition:`all 0.3s ease-out`},children:(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,children:[(0,r.jsx)(m_,{size:`3`,color:`blue`,children:c.title}),(0,r.jsx)(G,{variant:`ghost`,color:`gray`,onClick:n,size:`1`,style:{cursor:`pointer`},children:(0,r.jsx)(Ee,{})})]}),(0,r.jsx)(H,{size:`2`,color:`gray`,children:c.content}),(0,r.jsxs)(W,{justify:`between`,align:`center`,mt:`2`,children:[(0,r.jsxs)(H,{size:`1`,color:`gray`,children:[i+1,` de `,zS.length]}),(0,r.jsxs)(W,{gap:`2`,children:[i>0&&(0,r.jsx)(G,{variant:`soft`,color:`gray`,onClick:()=>a(e=>e-1),style:{cursor:`pointer`},children:`Voltar`}),(0,r.jsx)(G,{onClick:()=>{l?n():a(e=>e+1)},style:{cursor:`pointer`},children:l?`Entendi!`:`Próximo`})]})]})]})})})};var VS=(0,t.createContext)({});function HS(e){let n=(0,t.useRef)(null);return n.current===null&&(n.current=e()),n.current}var US=typeof window<`u`,WS=US?t.useLayoutEffect:t.useEffect,GS=(0,t.createContext)(null);function KS(e,t){e.indexOf(t)===-1&&e.push(t)}function qS(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var JS=(e,t,n)=>n>t?t:n<e?e:n;function YS(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var XS=()=>{},ZS=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(XS=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(YS(t,n))},ZS=(e,t,n)=>{if(!e)throw Error(YS(t,n))});var QS={},$S=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function eC(e){return typeof e==`object`&&!!e}var tC=e=>/^0[^.\s]+$/u.test(e);function nC(e){let t;return()=>(t===void 0&&(t=e()),t)}var rC=e=>e,iC=(e,t)=>n=>t(e(n)),aC=(...e)=>e.reduce(iC),oC=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},sC=class{constructor(){this.subscriptions=[]}add(e){return KS(this.subscriptions,e),()=>qS(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},cC=e=>e*1e3,lC=e=>e/1e3;function uC(e,t){return t?e*(1e3/t):0}var dC=new Set;function fC(e,t,n){e||dC.has(t)||(console.warn(YS(t,n)),dC.add(t))}var pC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mC=1e-7,hC=12;function gC(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=pC(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>mC&&++s<hC);return o}function _C(e,t,n,r){if(e===t&&n===r)return rC;let i=t=>gC(t,0,1,e,n);return e=>e===0||e===1?e:pC(i(e),t,r)}var vC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yC=e=>t=>1-e(1-t),bC=_C(.33,1.53,.69,.99),xC=yC(bC),SC=vC(xC),CC=e=>(e*=2)<1?.5*xC(e):.5*(2-2**(-10*(e-1))),wC=e=>1-Math.sin(Math.acos(e)),TC=yC(wC),EC=vC(wC),DC=_C(.42,0,1,1),OC=_C(0,0,.58,1),kC=_C(.42,0,.58,1),AC=e=>Array.isArray(e)&&typeof e[0]!=`number`,jC=e=>Array.isArray(e)&&typeof e[0]==`number`,MC={linear:rC,easeIn:DC,easeInOut:kC,easeOut:OC,circIn:wC,circInOut:EC,circOut:TC,backIn:xC,backInOut:SC,backOut:bC,anticipate:CC},NC=e=>typeof e==`string`,PC=e=>{if(jC(e)){ZS(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return _C(t,n,r,i)}else if(NC(e))return ZS(MC[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),MC[e];return e},FC=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],IC={value:null,addProjectionMetrics:null};function LC(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&IC.value&&IC.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var RC=40;function zC(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=FC.reduce((e,n)=>(e[n]=LC(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=QS.useManualTiming?i.timestamp:performance.now();n=!1,QS.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,RC),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:FC.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<FC.length;t++)o[FC[t]].cancel(e)},state:i,steps:o}}var{schedule:BC,cancel:VC,state:HC,steps:UC}=zC(typeof requestAnimationFrame<`u`?requestAnimationFrame:rC,!0),WC;function GC(){WC=void 0}var KC={now:()=>(WC===void 0&&KC.set(HC.isProcessing||QS.useManualTiming?HC.timestamp:performance.now()),WC),set:e=>{WC=e,queueMicrotask(GC)}},qC={layout:0,mainThread:0,waapi:0},JC=e=>t=>typeof t==`string`&&t.startsWith(e),YC=JC(`--`),XC=JC(`var(--`),ZC=e=>XC(e)?QC.test(e.split(`/*`)[0].trim()):!1,QC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $C(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var ew={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},tw={...ew,transform:e=>JS(0,1,e)},nw={...ew,default:1},rw=e=>Math.round(e*1e5)/1e5,iw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aw(e){return e==null}var ow=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sw=(e,t)=>n=>!!(typeof n==`string`&&ow.test(n)&&n.startsWith(e)||t&&!aw(n)&&Object.prototype.hasOwnProperty.call(n,t)),cw=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(iw);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},lw=e=>JS(0,255,e),uw={...ew,transform:e=>Math.round(lw(e))},dw={test:sw(`rgb`,`red`),parse:cw(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+uw.transform(e)+`, `+uw.transform(t)+`, `+uw.transform(n)+`, `+rw(tw.transform(r))+`)`};function fw(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var pw={test:sw(`#`),parse:fw,transform:dw.transform},mw=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hw=mw(`deg`),gw=mw(`%`),Q=mw(`px`),_w=mw(`vh`),vw=mw(`vw`),yw=(()=>({...gw,parse:e=>gw.parse(e)/100,transform:e=>gw.transform(e*100)}))(),bw={test:sw(`hsl`,`hue`),parse:cw(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+gw.transform(rw(t))+`, `+gw.transform(rw(n))+`, `+rw(tw.transform(r))+`)`},xw={test:e=>dw.test(e)||pw.test(e)||bw.test(e),parse:e=>dw.test(e)?dw.parse(e):bw.test(e)?bw.parse(e):pw.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?dw.transform(e):bw.transform(e),getAnimatableNone:e=>{let t=xw.parse(e);return t.alpha=0,xw.transform(t)}},Sw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Cw(e){return isNaN(e)&&typeof e==`string`&&(e.match(iw)?.length||0)+(e.match(Sw)?.length||0)>0}var ww=`number`,Tw=`color`,Ew=`var`,Dw=`var(`,Ow="${}",kw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Aw(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(kw,e=>(xw.test(e)?(r.color.push(a),i.push(Tw),n.push(xw.parse(e))):e.startsWith(Dw)?(r.var.push(a),i.push(Ew),n.push(e)):(r.number.push(a),i.push(ww),n.push(parseFloat(e))),++a,Ow)).split(Ow),indexes:r,types:i}}function jw(e){return Aw(e).values}function Mw(e){let{split:t,types:n}=Aw(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===ww?i+=rw(e[a]):t===Tw?i+=xw.transform(e[a]):i+=e[a]}return i}}var Nw=e=>typeof e==`number`?0:xw.test(e)?xw.getAnimatableNone(e):e;function Pw(e){let t=jw(e);return Mw(e)(t.map(Nw))}var Fw={test:Cw,parse:jw,createTransformer:Mw,getAnimatableNone:Pw};function Iw(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Iw(s,r,e+1/3),a=Iw(s,r,e),o=Iw(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Rw(e,t){return n=>n>0?t:e}var zw=(e,t,n)=>e+(t-e)*n,Bw=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Vw=[pw,dw,bw],Hw=e=>Vw.find(t=>t.test(e));function Uw(e){let t=Hw(e);if(XS(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===bw&&(n=Lw(n)),n}var Ww=(e,t)=>{let n=Uw(e),r=Uw(t);if(!n||!r)return Rw(e,t);let i={...n};return e=>(i.red=Bw(n.red,r.red,e),i.green=Bw(n.green,r.green,e),i.blue=Bw(n.blue,r.blue,e),i.alpha=zw(n.alpha,r.alpha,e),dw.transform(i))},Gw=new Set([`none`,`hidden`]);function Kw(e,t){return Gw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qw(e,t){return n=>zw(e,t,n)}function Jw(e){return typeof e==`number`?qw:typeof e==`string`?ZC(e)?Rw:xw.test(e)?Ww:Qw:Array.isArray(e)?Yw:typeof e==`object`?xw.test(e)?Ww:Xw:Rw}function Yw(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Jw(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Xw(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Jw(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Zw(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Qw=(e,t)=>{let n=Fw.createTransformer(t),r=Aw(e),i=Aw(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gw.has(e)&&!i.values.length||Gw.has(t)&&!r.values.length?Kw(e,t):aC(Yw(Zw(r,i),i.values),n):(XS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Rw(e,t))};function $w(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?zw(e,t,n):Jw(e)(e,t)}var eT=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>BC.update(t,e),stop:()=>VC(t),now:()=>HC.isProcessing?HC.timestamp:KC.now()}},tT=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},nT=2e4;function rT(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function iT(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(rT(r),nT);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:lC(i)}}var aT=5;function oT(e,t,n){let r=Math.max(t-aT,0);return uC(n-e(r),t-r)}var sT={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},cT=.001;function lT({duration:e=sT.duration,bounce:t=sT.bounce,velocity:n=sT.velocity,mass:r=sT.mass}){let i,a;XS(e<=cC(sT.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=JS(sT.minDamping,sT.maxDamping,o),e=JS(sT.minDuration,sT.maxDuration,lC(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fT(t,o),c=Math.exp(-i);return cT-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=fT(t**2,o);return(-i(t)+cT>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-cT+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=dT(i,a,s);if(e=cC(e),isNaN(c))return{stiffness:sT.stiffness,damping:sT.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var uT=12;function dT(e,t,n){let r=n;for(let n=1;n<uT;n++)r-=e(r)/t(r);return r}function fT(e,t){return e*Math.sqrt(1-t*t)}var pT=[`duration`,`bounce`],mT=[`stiffness`,`damping`,`mass`];function hT(e,t){return t.some(t=>e[t]!==void 0)}function gT(e){let t={velocity:sT.velocity,stiffness:sT.stiffness,damping:sT.damping,mass:sT.mass,isResolvedFromDuration:!1,...e};if(!hT(e,mT)&&hT(e,pT))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*JS(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:sT.mass,stiffness:i,damping:a}}else{let n=lT(e);t={...t,...n,mass:sT.mass},t.isResolvedFromDuration=!0}return t}function _T(e=sT.visualDuration,t=sT.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=gT({...n,velocity:-lC(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=lC(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?sT.restSpeed.granular:sT.restSpeed.default,i||=v?sT.restDelta.granular:sT.restDelta.default;let y;if(h<1){let e=fT(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?cC(m):oT(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(rT(b),nT),t=tT(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}_T.applyToOptions=e=>{let t=iT(e,100,_T);return e.ease=t.ease,e.duration=cC(t.duration),e.type=`keyframes`,e};function vT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=_T({keyframes:[f.value,m(f.value)],velocity:oT(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function yT(e,t,n){let r=[],i=n||QS.mix||$w,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=aC(Array.isArray(t)?t[n]||rC:t,a)),r.push(a)}return r}function bT(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(ZS(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=yT(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=oC(e[r],e[r+1],n);return s[r](i)};return n?t=>l(JS(e[0],e[a-1],t)):l}function xT(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=oC(0,t,r);e.push(zw(n,1,i))}}function ST(e){let t=[0];return xT(t,e.length-1),t}function CT(e,t){return e.map(e=>e*t)}function wT(e,t){return e.map(()=>t||kC).splice(0,e.length-1)}function TT({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=AC(r)?r.map(PC):PC(r),a={done:!1,value:t[0]},o=bT(CT(n&&n.length===t.length?n:ST(t),e),t,{ease:Array.isArray(i)?i:wT(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var ET=e=>e!==null;function DT(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(ET),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var OT={decay:vT,inertia:vT,tween:TT,keyframes:TT,spring:_T};function kT(e){typeof e.type==`string`&&(e.type=OT[e.type])}var AT=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},jT=e=>e/100,MT=class extends AT{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==KC.now()&&this.tick(KC.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},qC.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;kT(e);let{type:t=TT,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||TT;process.env.NODE_ENV!==`production`&&s!==TT&&ZS(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==TT&&typeof o[0]!=`number`&&(this.mixKeyframes=aC(jT,$w(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=rT(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=JS(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==vT&&(b.value=DT(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return lC(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+lC(e)}get time(){return lC(this.currentTime)}set time(e){e=cC(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(KC.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=lC(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=eT,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(KC.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,qC.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function NT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var PT=e=>e*180/Math.PI,FT=e=>LT(PT(Math.atan2(e[1],e[0]))),IT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:FT,rotateZ:FT,skewX:e=>PT(Math.atan(e[1])),skewY:e=>PT(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},LT=e=>(e%=360,e<0&&(e+=360),e),RT=FT,zT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),BT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zT,scaleY:BT,scale:e=>(zT(e)+BT(e))/2,rotateX:e=>LT(PT(Math.atan2(e[6],e[5]))),rotateY:e=>LT(PT(Math.atan2(-e[2],e[0]))),rotateZ:RT,rotate:RT,skewX:e=>PT(Math.atan(e[4])),skewY:e=>PT(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function HT(e){return e.includes(`scale`)?1:0}function UT(e,t){if(!e||e===`none`)return HT(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=VT,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=IT,i=t}if(!i)return HT(t);let a=r[t],o=i[1].split(`,`).map(GT);return typeof a==`function`?a(o):o[a]}var WT=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return UT(n,t)};function GT(e){return parseFloat(e.trim())}var KT=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],qT=(()=>new Set(KT))(),JT=e=>e===ew||e===Q,YT=new Set([`x`,`y`,`z`]),XT=KT.filter(e=>!YT.has(e));function ZT(e){let t=[];return XT.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var QT={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UT(t,`x`),y:(e,{transform:t})=>UT(t,`y`)};QT.translateX=QT.x,QT.translateY=QT.y;var $T=new Set,eE=!1,tE=!1,nE=!1;function rE(){if(tE){let e=Array.from($T).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=ZT(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}tE=!1,eE=!1,$T.forEach(e=>e.complete(nE)),$T.clear()}function iE(){$T.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tE=!0)})}function aE(){nE=!0,iE(),rE(),nE=!1}var oE=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?($T.add(this),eE||(eE=!0,BC.read(iE),BC.resolveKeyframes(rE))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}NT(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),$T.delete(this)}cancel(){this.state===`scheduled`&&($T.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},sE=e=>e.startsWith(`--`);function cE(e,t,n){sE(t)?e.style.setProperty(t,n):e.style[t]=n}var lE=nC(()=>window.ScrollTimeline!==void 0),uE={};function dE(e,t){let n=nC(e);return()=>uE[t]??n()}var fE=dE(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),pE=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,mE={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:pE([0,.65,.55,1]),circOut:pE([.55,0,1,.45]),backIn:pE([.31,.01,.66,-.59]),backOut:pE([.33,1.53,.69,.99])};function hE(e,t){if(e)return typeof e==`function`?fE()?tT(e,t):`ease-out`:jC(e)?pE(e):Array.isArray(e)?e.map(e=>hE(e,t)||mE.easeOut):mE[e]}function gE(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=hE(s,i);Array.isArray(d)&&(u.easing=d),IC.value&&qC.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return IC.value&&p.finished.finally(()=>{qC.waapi--}),p}function _E(e){return typeof e==`function`&&`applyToOptions`in e}function vE({type:e,...t}){return _E(e)&&fE()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var yE=class extends AT{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,ZS(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=vE(e);this.animation=gE(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=DT(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):cE(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return lC(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+lC(e)}get time(){return lC(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=cC(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&lE()?(this.animation.timeline=e,rC):t(this)}},bE={anticipate:CC,backInOut:SC,circInOut:EC};function xE(e){return e in bE}function SE(e){typeof e.ease==`string`&&xE(e.ease)&&(e.ease=bE[e.ease])}var CE=10,wE=class extends yE{constructor(e){SE(e),kT(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new MT({...a,autoplay:!1}),s=Math.max(CE,KC.now()-this.startTime),c=JS(0,CE,s-CE);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},TE=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Fw.test(e)||e===`0`)&&!e.startsWith(`url(`));function EE(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DE(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=TE(i,t),s=TE(a,t);return XS(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:EE(e)||(n===`spring`||_E(n))&&r}function OE(e){e.duration=0,e.type=`keyframes`}var kE=new Set([`opacity`,`clipPath`,`filter`,`transform`]),AE=nC(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function jE(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return AE()&&n&&kE.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ME=40,NE=class extends AT{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=KC.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||oE)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=KC.now(),DE(e,i,a,o)||((QS.instantAnimations||!s)&&l?.(DT(e,n,t)),e[0]=e[e.length-1],OE(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ME?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&jE(u)?new wE({...u,element:u.motionValue.owner.current}):new MT(u);d.finished.then(()=>this.notifyFinished()).catch(rC),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),aE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},PE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FE(e){let t=PE.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var IE=4;function LE(e,t,n=1){ZS(n<=IE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=FE(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return $S(e)?parseFloat(e):e}return ZC(i)?LE(i,t,n+1):i}function RE(e,t){return e?.[t]??e?.default??e}var zE=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...KT]),BE={test:e=>e===`auto`,parse:e=>e},VE=e=>t=>t.test(e),HE=[ew,Q,gw,hw,vw,_w,BE],UE=e=>HE.find(VE(e));function WE(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||tC(e)}var GE=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function KE(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(iw)||[];if(!r)return e;let i=n.replace(r,``),a=GE.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var qE=/\b([a-z-]*)\(.*?\)/gu,JE={...Fw,getAnimatableNone:e=>{let t=e.match(qE);return t?t.map(KE).join(` `):e}},YE={...ew,transform:Math.round},XE={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,backgroundPositionX:Q,backgroundPositionY:Q,rotate:hw,rotateX:hw,rotateY:hw,rotateZ:hw,scale:nw,scaleX:nw,scaleY:nw,scaleZ:nw,skew:hw,skewX:hw,skewY:hw,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:tw,originX:yw,originY:yw,originZ:Q,zIndex:YE,fillOpacity:tw,strokeOpacity:tw,numOctaves:YE},ZE={...XE,color:xw,backgroundColor:xw,outlineColor:xw,fill:xw,stroke:xw,borderColor:xw,borderTopColor:xw,borderRightColor:xw,borderBottomColor:xw,borderLeftColor:xw,filter:JE,WebkitFilter:JE},QE=e=>ZE[e];function $E(e,t){let n=QE(e);return n!==JE&&(n=Fw),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var eD=new Set([`auto`,`none`,`0`]);function tD(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!eD.has(t)&&Aw(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=$E(n,i)}var nD=class extends oE{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),ZC(r))){let i=LE(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!zE.has(n)||e.length!==2)return;let[r,i]=e,a=UE(r),o=UE(i);if($C(r)!==$C(i)&&QT[n]){this.needsMeasurement=!0;return}if(a!==o)if(JT(a)&&JT(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else QT[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||WE(e[t]))&&n.push(t);n.length&&tD(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=QT[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=QT[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function rD(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}var iD=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function aD(e){return eC(e)&&`offsetHeight`in e}var oD=30,sD=e=>!isNaN(parseFloat(e)),cD={current:void 0},lD=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=KC.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=KC.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sD(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&fC(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new sC);let n=this.events[e].add(t);return e===`change`?()=>{n(),BC.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return cD.current&&cD.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=KC.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>oD)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,oD);return uC(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function uD(e,t){return new lD(e,t)}var{schedule:dD,cancel:fD}=zC(queueMicrotask,!1),pD={x:!1,y:!1};function mD(){return pD.x||pD.y}function hD(e){return e===`x`||e===`y`?pD[e]?null:(pD[e]=!0,()=>{pD[e]=!1}):pD.x||pD.y?null:(pD.x=pD.y=!0,()=>{pD.x=pD.y=!1})}function gD(e,t){let n=rD(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _D(e){return!(e.pointerType===`touch`||mD())}function vD(e,t,n={}){let[r,i,a]=gD(e,n),o=e=>{if(!_D(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{_D(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1,bD=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,xD=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function SD(e){return xD.has(e.tagName)||e.isContentEditable===!0}var CD=new WeakSet;function wD(e){return t=>{t.key===`Enter`&&e(t)}}function TD(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var ED=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=wD(()=>{if(CD.has(n))return;TD(n,`down`);let e=wD(()=>{TD(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>TD(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function DD(e){return bD(e)&&!mD()}function OD(e,t,n={}){let[r,i,a]=gD(e,n),o=e=>{let r=e.currentTarget;if(!DD(e))return;CD.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),CD.has(r)&&CD.delete(r),DD(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||yD(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),aD(e)&&(e.addEventListener(`focus`,e=>ED(e,i)),!SD(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function kD(e){return eC(e)&&`ownerSVGElement`in e}function AD(e){return kD(e)&&e.tagName===`svg`}var jD=e=>!!(e&&e.getVelocity),MD=[...HE,xw,Fw],ND=e=>MD.find(VE(e)),PD=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function FD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ID(...e){return t=>{let n=!1,r=e.map(e=>{let r=FD(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():FD(e[t],null)}}}}function LD(...e){return t.useCallback(ID(...e),e)}var RD=class extends t.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=aD(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}};function zD({children:e,isPresent:n,anchorX:i,root:a}){let o=(0,t.useId)(),s=(0,t.useRef)(null),c=(0,t.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=(0,t.useContext)(PD),u=LD(s,e.props?.ref??e?.ref);return(0,t.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:u,right:d}=c.current;if(n||!s.current||!e||!t)return;let f=i===`left`?`left: ${u}`:`right: ${d}`;s.current.dataset.motionPopId=o;let p=document.createElement(`style`);l&&(p.nonce=l);let m=a??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
48
+ `)?n.value.length:0;requestAnimationFrame(()=>{try{n.setSelectionRange(i,i)}catch{}n.focus()})}},t.createElement(`input`,{spellCheck:`false`,...l,ref:rn(r,n),className:`rt-reset rt-TextFieldInput`}),i)});X.displayName=`TextField.Root`;var _b=t.forwardRef((e,n)=>{let{className:r,color:i,side:a,...o}=H(e,hb);return t.createElement(`div`,{"data-accent-color":i,"data-side":a,...o,ref:n,className:(0,gb.default)(`rt-TextFieldSlot`,r)})});_b.displayName=`TextField.Slot`;var vb={content:{type:`ReactNode`,required:!0},width:Lg.width,minWidth:Lg.minWidth,maxWidth:{...Lg.maxWidth,default:`360px`}},yb=h(V()),bb=t.forwardRef((e,n)=>{let{children:r,className:i,open:a,defaultOpen:o,onOpenChange:s,delayDuration:c,disableHoverableContent:l,content:u,container:d,forceMount:f,...p}=H(e,vb),m={open:a,defaultOpen:o,onOpenChange:s,delayDuration:c,disableHoverableContent:l};return t.createElement(jg,{...m},t.createElement(Mg,{asChild:!0},r),t.createElement(Ng,{container:d,forceMount:f},t.createElement(k_,{asChild:!0},t.createElement(Pg,{sideOffset:4,collisionPadding:10,...p,asChild:!1,ref:n,className:(0,yb.default)(`rt-TooltipContent`,i)},t.createElement(U,{as:`p`,className:`rt-TooltipText`,size:`1`},u),t.createElement(Fg,{className:`rt-TooltipArrow`})))))});bb.displayName=`Tooltip`;function Z(e,t=`Assertion error`){if(!e)throw Error(t)}function xb({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function Sb(e,t){return t.sort(e===`horizontal`?Cb:wb)}function Cb(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function wb(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function Tb(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function Eb(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Db({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=Eb(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return Z(i,`No rect found`),i}function Ob(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=Sb(n,Array.from(t.children).filter(Tb).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c,l=[];for(let t of a)if(t.hasAttribute(`data-panel`)){let i=r.find(e=>e.element===t);if(i){if(c){let r=c.element.getBoundingClientRect(),a=t.getBoundingClientRect(),u;if(s){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(l.length){case 0:u=[e,t];break;case 1:{let i=l[0];u=[i,Db({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:u=l;break}}else u=l.length?l:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let t of u)o.push({group:e,groupSize:xb({group:e}),panels:[c,i],separator:`width`in t?void 0:t,rect:`width`in t?t:t.element.getBoundingClientRect()})}s=!1,c=i,l=[]}}else if(t.hasAttribute(`data-separator`)){let e=i.find(e=>e.element===t);e?l.push(e):(c=void 0,l=[])}else s=!0;return o}function kb(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function Ab(e,t){let n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}function jb(e){return e/100*window.innerHeight}function Mb(e){return e/100*window.innerWidth}function Nb(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function Pb({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=Nb(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=Ab(t,i);break;case`em`:r=kb(t,i);break;case`vh`:r=jb(i);break;case`vw`:r=Mb(i);break}return r}function Fb(e){return parseFloat(e.toFixed(3))}function Ib(e){let{panels:t}=e,n=xb({group:e});return n===0?t.map(e=>({collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize&&(i=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize&&(a=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize&&(o=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize&&(s=Fb(Pb({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,minSize:o,maxSize:s,panelId:e.id}})}var Lb=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}};function Rb(e,t,n=0){return Math.abs(Fb(e)-Fb(t))<=n}var zb={cursorFlags:0,interactionState:{state:`inactive`},mountedGroups:new Map},Bb=new Lb;function Vb(){return zb}function Hb(e){let t=typeof e==`function`?e(zb):e;if(zb===t)return zb;let n=zb;return zb={...zb,...t},t.cursorFlags!==void 0&&Bb.emit(`cursorFlagsChange`,zb.cursorFlags),t.interactionState!==void 0&&Bb.emit(`interactionStateChange`,zb.interactionState),t.mountedGroups!==void 0&&(zb.mountedGroups.forEach((e,t)=>{e.derivedPanelConstraints.forEach(r=>{if(r.collapsible){let{layout:i}=n.mountedGroups.get(t)??{};if(i){let n=Rb(r.collapsedSize,e.layout[r.panelId]),a=Rb(r.collapsedSize,i[r.panelId]);n&&!a&&(t.inMemoryLastExpandedPanelSizes[r.panelId]=i[r.panelId])}}})}),Bb.emit(`mountedGroupsChange`,zb.mountedGroups)),zb}function Ub(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Wb(e,t){return Rb(e,t)?0:e>t?1:-1}function Gb({panelConstraints:e,size:t}){let{collapsedSize:n=0,collapsible:r,maxSize:i=100,minSize:a=0}=e;if(Wb(t,a)<0)if(r){let e=(n+a)/2;t=Wb(t,e)<0?n:a}else t=a;return t=Math.min(i,t),t=Fb(t),t}function Kb({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(Rb(e,0))return t;let o=Object.values(t),s=Object.values(i),c=[...o],[l,u]=r;Z(l!=null,`Invalid first pivot index`),Z(u!=null,`Invalid second pivot index`);let d=0;if(a===`keyboard`){{let t=e<0?u:l,r=n[t];Z(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:s=0}=r;if(a){let n=o[t];if(Z(n!=null,`Previous layout not found for panel index ${t}`),Rb(n,i)){let t=s-n;Wb(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?l:u,r=n[t];Z(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:s=0}=r;if(a){let n=o[t];if(Z(n!=null,`Previous layout not found for panel index ${t}`),Rb(n,s)){let t=n-i;Wb(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let t=e<0?1:-1,r=e<0?u:l,i=0;for(;;){let e=o[r];Z(e!=null,`Previous layout not found for panel index ${r}`);let a=Gb({panelConstraints:n[r],size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?l:u;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(d),i=o[t];Z(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,s=Gb({panelConstraints:n[t],size:a});if(!Rb(i,s)&&(d+=i-s,c[t]=s,d.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(Ub(s,c))return i;{let t=e<0?u:l,r=o[t];Z(r!=null,`Previous layout not found for panel index ${t}`);let i=r+d,a=Gb({panelConstraints:n[t],size:i});if(c[t]=a,!Rb(a,i)){let t=i-a,r=e<0?u:l;for(;r>=0&&r<n.length;){let i=c[r];Z(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,o=Gb({panelConstraints:n[r],size:a});if(Rb(i,o)||(t-=o-i,c[r]=o),Rb(t,0))break;e>0?r--:r++}}}if(!Rb(Object.values(c).reduce((e,t)=>t+e,0),100,.1))return i;let f=Object.keys(i);return c.reduce((e,t,n)=>(e[f[n]]=t,e),{})}function qb(e){let{mountedGroups:t}=Vb();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function Jb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||Wb(e[n],t[n])!==0)return!1;return!0}function Yb({layout:e,panelConstraints:t}){let n=[...Object.values(e)],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!Rb(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];Z(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];Z(r!=null,`No layout data found for index ${e}`);let a=Gb({panelConstraints:t[e],size:r});r!=a&&(i+=r-a,n[e]=a)}if(!Rb(i,0))for(let e=0;e<t.length;e++){let r=n[e];Z(r!=null,`No layout data found for index ${e}`);let a=r+i,o=Gb({panelConstraints:t[e],size:a});if(r!==o&&(i-=o-r,n[e]=o,Rb(i,0)))break}let a=Object.keys(e);return n.reduce((e,t,n)=>(e[a[n]]=t,e),{})}function Xb({groupId:e}){let t=()=>{let{mountedGroups:t}=Vb();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,layout:a,separatorToPanels:o}=t(),s=Yb({layout:e,panelConstraints:r});return n?a:(Jb(a,s)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,layout:s,separatorToPanels:o})})),s)}}}function Zb(e){let{mountedGroups:t}=Vb(),n=t.get(e);return Z(n,`Mounted Group ${e.id} not found`),n}function Qb(e,t){let n=qb(e),r=Zb(n),i=n.separators.find(t=>t.element===e);Z(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);Z(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=Xb({groupId:n.id}).getLayout(),c=Yb({layout:Kb({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});Jb(s,c)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:c,separatorToPanels:r.separatorToPanels})}))}function $b(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=qb(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&Qb(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&Qb(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&Qb(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&Qb(t,-5);break;case`End`:e.preventDefault(),Qb(t,100);break;case`Enter`:{e.preventDefault();let n=qb(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Zb(n),o=n.separators.find(e=>e.element===t);Z(o,`Matching separator not found`);let s=a.get(o);Z(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(Z(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];Qb(t,(l.collapsedSize===e?n.inMemoryLastExpandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=qb(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);Z(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus();break}case`Home`:e.preventDefault(),Qb(t,-100);break}}var ex=e=>e,tx=()=>{},nx=1,rx=2,ix=4,ax=8,ox={coarse:10,precise:5};function sx(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=Eb(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}var cx;function lx(){return cx===void 0&&(cx=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),cx}function ux(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function dx(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:_x(e),b:_x(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Z(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:gx(hx(n.a)),b:gx(hx(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var fx=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function px(e){let t=getComputedStyle(vx(e)??e).display;return t===`flex`||t===`inline-flex`}function mx(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||px(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||fx.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function hx(e){let t=e.length;for(;t--;){let n=e[t];if(Z(n,`Missing node`),mx(n))return n}return null}function gx(e){return e&&Number(getComputedStyle(e).zIndex)||0}function _x(e){let t=[];for(;e;)t.push(e),e=vx(e);return t}function vx(e){let{parentNode:t}=e;return ux(t)?t.host:t}function yx(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function bx({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Tb(n)||n.contains(e)||e.contains(n))return!0;if(dx(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(yx(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function xx(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=lx()?ox.coarse:ox.precise,a=Ob(r),o=sx(r.orientation,a,{x:e.clientX,y:e.clientY});o&&o.distance.x<=i&&o.distance.y<=i&&bx({groupElement:r.element,hitRegion:o.hitRegion.rect,pointerEventTarget:e.target})&&n.push(o.hitRegion)}),n}function Sx(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let{mountedGroups:t}=Vb(),n=xx(e,t),r=new Set,i=new Set,a=new Set,o=new Map,s=!1;n.forEach(e=>{r.add(e.group),e.panels.forEach(e=>{i.add(e)}),e.separator&&(a.add(e.separator),s||(s=!0,e.separator.element.focus()));let n=t.get(e.group);n&&o.set(e.group,n.layout)}),Hb({interactionState:{hitRegions:n,initialLayoutMap:o,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}}),n.length&&e.preventDefault()}function Cx({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(r===0&&i===0)return null;switch(n){case`active`:{let t=(e&nx)!==0,n=(e&rx)!==0,r=(e&ix)!==0,i=(e&ax)!==0;if(e){if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}}return r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`}var wx=new WeakMap;function Tx(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=wx.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets=[n]);let{cursorFlags:r,interactionState:i}=Vb();switch(i.state){case`active`:case`hover`:{let e=Cx({cursorFlags:r,groups:i.hitRegions.map(e=>e.group),state:i.state}),a=`*{cursor: ${e} !important; ${i.state===`active`?`touch-action: none;`:``} }`;if(t===a)return;t=a,e?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}wx.set(e,{prevStyle:t,styleSheet:n})}function Ex({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a}){let o=0,s=new Map(i);n.forEach(e=>{let{group:n,groupSize:c}=e,{disableCursor:l,orientation:u,panels:d}=n,f=0;f=a?u===`horizontal`?(t.clientX-a.x)/c*100:(t.clientY-a.y)/c*100:u===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let p=r.get(n),{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:g,separatorToPanels:_}=i.get(n)??{defaultLayoutDeferred:!1};if(h&&p&&g&&_){let t=Kb({delta:f,initialLayout:p,panelConstraints:h,pivotIndices:e.panels.map(e=>d.indexOf(e)),prevLayout:g,trigger:`mouse-or-touch`});if(Jb(t,g)){if(f!==0&&!l)switch(u){case`horizontal`:o|=f<0?nx:rx;break;case`vertical`:o|=f<0?ix:ax;break}}else{s.set(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,layout:t,separatorToPanels:_});let n=e.group.panels.map(({id:e})=>e).join(`,`);e.group.inMemoryLayouts[n]=t}}}),Hb({cursorFlags:o,mountedGroups:s}),Tx(e)}function Dx(e){let{interactionState:t,mountedGroups:n}=Vb();switch(t.state){case`active`:Ex({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n})}}function Ox(e){if(e.defaultPrevented)return;let{interactionState:t,mountedGroups:n}=Vb();switch(t.state){case`active`:if(e.buttons===0){Hb(e=>e.interactionState.state===`inactive`?e:{cursorFlags:0,interactionState:{state:`inactive`}});return}Ex({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint});break;default:{let r=xx(e,n);r.length===0?t.state!==`inactive`&&Hb({interactionState:{state:`inactive`}}):Hb({interactionState:{hitRegions:r,state:`hover`}}),Tx(e.currentTarget);break}}}function kx(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;e.preventDefault();let{interactionState:t}=Vb();switch(t.state){case`active`:Hb({cursorFlags:0,interactionState:{state:`inactive`}}),Tx(e.currentTarget)}}function Ax(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=Fb(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=Fb((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function jx(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=xb({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:Fb(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Mx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Nx(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var Px=new Map;function Fx(e){let t=!0;Z(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){if(xb({group:e})===0)return;Hb(t=>{let n=t.mountedGroups.get(e);if(n){let r=Ib(e),i=n.defaultLayoutDeferred?Ax(r):n.layout,a=Yb({layout:i,panelConstraints:r});return!n.defaultLayoutDeferred&&Jb(i,a)&&Mx(n.derivedPanelConstraints,r)?t:{mountedGroups:new Map(t.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,layout:a,separatorToPanels:n.separatorToPanels})}}return t})}}else jx(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{Z(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=xb({group:e}),s=Ib(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.defaultLayout;l&&(Nx(e.panels,l)||(l=void 0));let u=Yb({layout:e.inMemoryLayouts[c]??l??Ax(s),panelConstraints:s}),d=Ob(e),f=e.element.ownerDocument;return Hb(t=>{let n=new Map;return Px.set(f,(Px.get(f)??0)+1),d.forEach(e=>{e.separator&&n.set(e.separator,e.panels)}),{mountedGroups:new Map(t.mountedGroups).set(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,layout:u,separatorToPanels:n})}}),e.separators.forEach(e=>{Z(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,$b)}),Px.get(f)===1&&(f.addEventListener(`pointerdown`,Sx,!0),f.addEventListener(`pointerleave`,Dx),f.addEventListener(`pointermove`,Ox),f.addEventListener(`pointerup`,kx,!0)),function(){t=!1,Px.set(f,Math.max(0,(Px.get(f)??0)-1)),Hb(t=>{let n=new Map(t.mountedGroups);return n.delete(e),{mountedGroups:n}}),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,$b)}),Px.get(f)||(f.removeEventListener(`pointerdown`,Sx,!0),f.removeEventListener(`pointerleave`,Dx),f.removeEventListener(`pointermove`,Ox),f.removeEventListener(`pointerup`,kx,!0)),a.disconnect()}}function Ix(){let[e,n]=(0,t.useState)({});return[e,(0,t.useCallback)(()=>n({}),[])]}function Lx(e){let n=(0,t.useId)();return`${e??n}`}var Rx=typeof window<`u`?t.useLayoutEffect:t.useEffect;function zx(e){let n=(0,t.useRef)(e);return Rx(()=>{n.current=e},[e]),(0,t.useCallback)((...e)=>n.current?.(...e),[n])}function Bx(...e){return zx(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Vx(e){let n=(0,t.useRef)({...e});return Rx(()=>{for(let t in e)n.current[t]=e[t]},[e]),n.current}var Hx=`--react-resizable-panels--panel--pointer-events`;function Ux(e,t){return`--react-resizable-panels--${e.replace(/[^a-zA-Z0-9\-_]/g,``)}--${t.replace(/[^a-zA-Z0-9\-_]/g,``)}`}var Wx=(0,t.createContext)(null);function Gx(e,n){let r=(0,t.useRef)({getLayout:()=>({}),setLayout:ex});(0,t.useImperativeHandle)(n,()=>r.current,[]),Rx(()=>{Object.assign(r.current,Xb({groupId:e}))})}function Kx({children:e,className:n,defaultLayout:i,disableCursor:a,disabled:o,elementRef:s,groupRef:c,id:l,onLayoutChange:u,orientation:d=`horizontal`,style:f,...p}){let m=(0,t.useRef)({}),h=zx(e=>{Jb(m.current,e)||(m.current=e,u?.(e))}),g=Lx(l),_=(0,t.useRef)(null),[v,y]=(0,t.useState)(!1),[b,x]=(0,t.useState)(i??{}),[S,C]=Ix(),w=(0,t.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],separators:[]}),T=Bx(_,s);Gx(g,c);let E=(0,t.useMemo)(()=>({id:g,orientation:d,registerPanel:e=>{let t=w.current;return t.panels=Sb(d,[...t.panels,e]),C(),()=>{t.panels=t.panels.filter(t=>t!==e),C()}},registerSeparator:e=>{let t=w.current;return t.separators=Sb(d,[...t.separators,e]),C(),()=>{t.separators=t.separators.filter(t=>t!==e),C()}}}),[g,C,d]),D=Vx({defaultLayout:i,disableCursor:a}),O=(0,t.useRef)(null);Rx(()=>{let e=_.current;if(e===null)return;let t=w.current,n={defaultLayout:D.defaultLayout,disableCursor:!!D.disableCursor,disabled:!!o,element:e,id:g,inMemoryLastExpandedPanelSizes:w.current.lastExpandedPanelSizes,inMemoryLayouts:w.current.layouts,orientation:d,panels:t.panels,separators:t.separators};O.current=n;let r=Fx(n),i=Vb().mountedGroups.get(n);if(i){let{defaultLayoutDeferred:e,derivedPanelConstraints:t,layout:n}=i;!e&&t.length>0&&(x(n),h?.(n))}let a=Bb.addListener(`interactionStateChange`,e=>{switch(e.state){case`active`:y(e.hitRegions.some(e=>e.group===n));break;default:y(!1);break}}),s=Bb.addListener(`mountedGroupsChange`,e=>{let t=e.get(n);if(t){let{defaultLayoutDeferred:e,derivedPanelConstraints:n,layout:r}=t;if(e||n.length===0)return;x(r),h?.(r)}});return()=>{O.current=null,r(),a(),s()}},[o,g,h,d,S,D]),(0,t.useEffect)(()=>{let e=O.current;e&&(e.defaultLayout=i,e.disableCursor=!!a)});let k={[Hx]:v?`none`:void 0};for(let e in b){let t=Ux(g,e);k[t]=b[e]}return(0,r.jsx)(Wx.Provider,{value:E,children:(0,r.jsx)(`div`,{...p,"aria-orientation":d,className:n,"data-group":!0,"data-testid":g,id:g,ref:T,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,...k,display:`flex`,flexDirection:d===`horizontal`?`row`:`column`,flexWrap:`nowrap`},children:e})})}Kx.displayName=`Group`;function qx(){let e=(0,t.useContext)(Wx);return Z(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Jx({groupId:e,panelId:t}){let n=()=>{let{mountedGroups:t}=Vb();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,separatorToPanels:o}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,layout:a,separatorToPanels:o};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=e=>{let r=a();if(e===r)return;let{defaultLayoutDeferred:i,derivedPanelConstraints:o,group:s,layout:c,separatorToPanels:l}=n(),u=s.panels.findIndex(e=>e.id===t),d=u===s.panels.length-1,f=Yb({layout:Kb({delta:d?r-e:e-r,initialLayout:c,panelConstraints:o,pivotIndices:d?[u-1,u]:[u,u+1],prevLayout:c,trigger:`imperative-api`}),panelConstraints:o});Jb(c,f)||Hb(e=>({mountedGroups:new Map(e.mountedGroups).set(s,{defaultLayoutDeferred:i,derivedPanelConstraints:o,layout:f,separatorToPanels:l})}))};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),s=a();e&&s!==t&&(n.expandToSize=s,o(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:s}=i(),c=a();if(e&&c===t){let e=s.expandToSize??n;e===0&&(e=1),o(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&Rb(t,n)},resize:e=>{if(a()!==e){let t;switch(typeof e){case`number`:{let{group:r}=n();t=Fb(e/xb({group:r})*100);break}case`string`:t=parseFloat(e);break}o(t)}}}}function Yx(e,n){let{id:r}=qx(),i=(0,t.useRef)({collapse:tx,expand:tx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:tx});(0,t.useImperativeHandle)(n,()=>i.current,[]),Rx(()=>{Object.assign(i.current,Jx({groupId:r,panelId:e}))})}function Xx({children:e,className:n,collapsedSize:i=`0%`,collapsible:a=!1,defaultSize:o,elementRef:s,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Lx(c),_=(0,t.useRef)(null),v=Bx(_,s),{id:y,registerPanel:b}=qx(),x=d!==null,S=zx((e,t,n)=>{d?.(e,c,n)});Rx(()=>{let e=_.current;if(e!==null)return b({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:x?S:void 0,panelConstraints:{collapsedSize:i,collapsible:a,defaultSize:o,maxSize:l,minSize:u}})},[i,a,o,x,g,h,l,u,S,b]),Yx(g,f);let C=Ux(y,g);return(0,r.jsx)(`div`,{...m,"data-panel":!0,"data-testid":g,id:g,ref:v,style:{...Zx,flexBasis:0,flexGrow:`var(${C}, 1)`,flexShrink:1,overflow:`hidden`,pointerEvents:`var(${Hx})`},children:(0,r.jsx)(`div`,{className:n,style:{width:`100%`,height:`100%`,...p},children:e})})}Xx.displayName=`Panel`;var Zx={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Qx({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=a=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=Yb({layout:Kb({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:`keyboard`}),panelConstraints:t})[n],i=Yb({layout:Kb({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e,trigger:`keyboard`}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function $x({children:e,className:n,elementRef:i,id:a,style:o,...s}){let c=Lx(a),[l,u]=(0,t.useState)({}),[d,f]=(0,t.useState)(`inactive`),p=(0,t.useRef)(null),m=Bx(p,i),{id:h,orientation:g,registerSeparator:_}=qx(),v=g===`horizontal`?`vertical`:`horizontal`;return Rx(()=>{let e=p.current;if(e!==null){let t={element:e,id:c},n=_(t),r=Bb.addListener(`interactionStateChange`,e=>{f(e.state!==`inactive`&&e.hitRegions.some(e=>e.separator===t)?e.state:`inactive`)}),i=Bb.addListener(`mountedGroupsChange`,e=>{e.forEach(({derivedPanelConstraints:e,layout:n,separatorToPanels:r},i)=>{if(i.id===h){let a=r.get(t);if(a){let t=a[0],r=i.panels.indexOf(t);u(Qx({layout:n,panelConstraints:e,panelId:t.id,panelIndex:r}))}}})});return()=>{r(),i(),n()}}},[h,c,_]),(0,r.jsx)(`div`,{...s,"aria-controls":l.valueControls,"aria-orientation":v,"aria-valuemax":l.valueMax,"aria-valuemin":l.valueMin,"aria-valuenow":l.valueNow,children:e,className:n,"data-separator":d,"data-testid":c,id:c,ref:m,role:`separator`,style:{flexBasis:`auto`,...o,flexGrow:0,flexShrink:0},tabIndex:0})}$x.displayName=`Separator`;let eS=(0,t.createContext)(void 0);var tS=[`Arial`,`Helvetica`,`Times New Roman`,`Courier New`,`Verdana`,`Georgia`,`Palatino`,`Garamond`,`Bookman`,`Comic Sans MS`,`Trebuchet MS`,`Arial Black`,`Impact`];let nS=({children:e,isList:n=!1,availableProps:i=[],theme:a=`light`,portalContainer:o=null})=>{let[s,c]=(0,t.useState)({elements:[],selectedElementIds:[],isList:n,mockData:[],singleMockData:{},listSettings:{sortOrder:`asc`,newestPosition:`bottom`,scrollDirection:`down`},availableProps:i,availableFonts:[...tS,`Roboto`,`Open Sans`,`Lato`,`Montserrat`],theme:a,history:[[]],historyDescriptions:[],historyIndex:0,clipboard:[],gridSize:0,zoom:1,pan:{x:0,y:0},snapLines:[],assets:[],isPropertiesPanelOpen:!1});t.default.useEffect(()=>{s.availableFonts.forEach(e=>{if(tS.includes(e))return;let t=`font-${e.replace(/\s+/g,`-`).toLowerCase()}`;if(!document.getElementById(t)){let n=document.createElement(`link`);n.id=t,n.href=`https://fonts.googleapis.com/css2?family=${e.replace(/ /g,`+`)}&display=swap`,n.rel=`stylesheet`,document.head.appendChild(n)}})},[s.availableFonts]),t.default.useEffect(()=>{c(e=>({...e,isList:n,availableProps:i,theme:a}))},[n,i,a]);let l=t.default.useCallback(e=>{c(t=>({...t,isPropertiesPanelOpen:e}))},[]),u=t.default.useCallback(e=>{c(t=>({...t,canvasHeight:e}))},[]),d=t.default.useCallback(e=>{c(t=>({...t,gridSize:e}))},[]),f=t.default.useCallback(e=>{c(t=>({...t,zoom:e}))},[]),p=t.default.useCallback(e=>{c(t=>({...t,pan:e}))},[]),m=t.default.useCallback(e=>{c(t=>({...t,snapLines:e}))},[]),h=t.default.useCallback(e=>{c(t=>{let n=e.elements||t.elements,r=[],i=new Set;return n.forEach(e=>{let t=e.id;(!t||i.has(t))&&(t=crypto.randomUUID()),i.add(t),r.push({...e,id:t,x:Number.isFinite(e.x)?e.x:0,y:Number.isFinite(e.y)?e.y:0,width:Number.isFinite(e.width)?e.width:100,height:Number.isFinite(e.height)?e.height:100,locked:!!e.locked,hidden:!!e.hidden})}),{...t,...e,elements:r,isList:e.isList??t.isList,availableProps:e.availableProps??t.availableProps,availableFonts:e.availableFonts??t.availableFonts,selectedElementIds:[],history:[r],historyIndex:0,clipboard:[]}})},[]),g=t.default.useCallback(()=>{c(e=>{if(e.historyIndex>0){let t=e.historyIndex-1;return{...e,elements:e.history[t],historyIndex:t,selectedElementIds:[]}}return e})},[]),_=t.default.useCallback(()=>{c(e=>{if(e.historyIndex<e.history.length-1){let t=e.historyIndex+1;return{...e,elements:e.history[t],historyIndex:t,selectedElementIds:[]}}return e})},[]),v=t.default.useCallback(e=>{c(t=>e>=0&&e<t.history.length?{...t,elements:t.history[e],historyIndex:e,selectedElementIds:[]}:t)},[]),y=t.default.useCallback(()=>{c(e=>{if(e.selectedElementIds.length>0){let t=e.elements.filter(t=>e.selectedElementIds.includes(t.id));return{...e,clipboard:t}}return e})},[]),b=t.default.useCallback(()=>{c(e=>{if(e.clipboard.length>0){let t=e.clipboard.map(e=>({...e,id:crypto.randomUUID(),x:e.x+20,y:e.y+20})),n=[...e.elements,...t],r=e.history.slice(0,e.historyIndex+1);r.push(n);let i=e.historyDescriptions.slice(0,e.historyIndex+1);return i.push(`Colar Elementos`),{...e,elements:n,history:r,historyDescriptions:i,historyIndex:r.length-1,selectedElementIds:t.map(e=>e.id)}}return e})},[]),x=t.default.useCallback(e=>{let t={};e.type===`box`&&(t.backgroundColor=`var(--gray-4)`),e.type===`text-container`&&(t.backgroundColor=`var(--gray-4)`,t.border=`1px solid var(--gray-8)`,t.padding=`8px`,t.display=`flex`,t.alignItems=`flex-start`,t.justifyContent=`flex-start`);let n={id:crypto.randomUUID(),x:50,y:50,width:200,height:e.type===`text`?50:150,...e,style:{...t,...e.style||{}}};c(e=>{let t=[...e.elements,n],r=e.history.slice(0,e.historyIndex+1);r.push(t);let i=e.historyDescriptions.slice(0,e.historyIndex+1),a={text:`Texto`,image:`Imagem`,box:`Caixa`,group:`Grupo`,"text-container":`Texto em Caixa`,checkbox:`Caixa de Seleção`}[n.type]||n.type;return i.push(`Adicionou ${a}`),{...e,elements:t,history:r,historyDescriptions:i,historyIndex:r.length-1,selectedElementIds:[n.id]}})},[]),S=t.default.useCallback(e=>{c(t=>{let n=t.elements.filter(t=>t.id!==e),r=t.history.slice(0,t.historyIndex+1);r.push(n);let i=t.historyDescriptions.slice(0,t.historyIndex+1);return i.push(`Remover Elemento`),{...t,elements:n,selectedElementIds:t.selectedElementIds.filter(t=>t!==e),history:r,historyDescriptions:i,historyIndex:r.length-1}})},[]),C=t.default.useCallback(()=>{c(e=>{if(e.selectedElementIds.length===0)return e;let t=e.elements.filter(t=>!e.selectedElementIds.includes(t.id)),n=e.history.slice(0,e.historyIndex+1);n.push(t);let r=e.historyDescriptions.slice(0,e.historyIndex+1);return r.push(`Remover Itens Selecionados`),{...e,elements:t,selectedElementIds:[],history:n,historyDescriptions:r,historyIndex:n.length-1}})},[]),w=t.default.useCallback((e,t=!1)=>{c(n=>{if(e===null)return{...n,selectedElementIds:[]};if(t){let t=n.selectedElementIds.includes(e),r;return r=t?n.selectedElementIds.filter(t=>t!==e):[...n.selectedElementIds,e],{...n,selectedElementIds:r}}else return{...n,selectedElementIds:[e]}})},[]),T=t.default.useCallback(e=>{c(t=>({...t,selectedElementIds:e}))},[]),E=t.default.useCallback((e,t)=>{c(n=>{let r=[...n.elements],i=r[e];r.splice(e,1),r.splice(t,0,i);let a=n.history.slice(0,n.historyIndex+1);a.push(r);let o=n.historyDescriptions.slice(0,n.historyIndex+1);return o.push(`Mover Elemento`),{...n,elements:r,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[]),D=t.default.useCallback((e,t,n=!0)=>{c(r=>{let i=r.elements.map(n=>n.id===e?{...n,...t}:n),a=r.history,o=r.historyIndex,s=r.historyDescriptions;return n&&(a=r.history.slice(0,r.historyIndex+1),a.push(i),o=a.length-1,s=r.historyDescriptions.slice(0,r.historyIndex+1),s.push(`Atualizar Elemento`)),{...r,elements:i,history:a,historyDescriptions:s,historyIndex:o}})},[]),O=t.default.useCallback((e,t=!0)=>{c(n=>{let r=[...n.elements],i=[],a=new Set;e.forEach(({id:e,changes:t})=>{let r=n.elements.find(t=>t.id===e);if(r)if(r.groupId&&(t.x!==void 0||t.y!==void 0)){let e=n.elements.find(e=>e.id===r.groupId);if(e&&!a.has(e.id)){let n=(t.x??r.x)-r.x,o=(t.y??r.y)-r.y;i.push({id:e.id,changes:{x:e.x+n,y:e.y+o}}),a.add(e.id)}}else i.push({id:e,changes:t})});let o=[...i];i.forEach(({id:e,changes:t})=>{if(t.x!==void 0||t.y!==void 0){let r=n.elements.find(t=>t.id===e);if(r&&r.type===`group`){let i=(t.x??r.x)-r.x,a=(t.y??r.y)-r.y;n.elements.forEach(t=>{t.groupId===e&&(o.some(e=>e.id===t.id)||o.push({id:t.id,changes:{x:t.x+i,y:t.y+a}}))})}}}),o.forEach(({id:e,changes:t})=>{let n=r.findIndex(t=>t.id===e);n!==-1&&(r[n]={...r[n],...t})});let s=n.history,c=n.historyIndex,l=n.historyDescriptions;return t&&(s=n.history.slice(0,n.historyIndex+1),s.push(r),c=s.length-1,l=n.historyDescriptions.slice(0,n.historyIndex+1),l.push(`Atualizar Múltiplos Elementos`)),{...n,elements:r,history:s,historyDescriptions:l,historyIndex:c}})},[]),k=t.default.useCallback(e=>{c(t=>{let n=t.elements.filter(t=>e.includes(t.id));if(n.length===0)return t;let r=Math.min(...n.map(e=>e.x)),i=Math.min(...n.map(e=>e.y)),a=Math.max(...n.map(e=>e.x+e.width)),o=Math.max(...n.map(e=>e.y+e.height)),s={id:crypto.randomUUID(),type:`group`,name:`Novo Grupo`,content:``,x:r,y:i,width:a-r,height:o-i,style:{zIndex:0}},c=t.elements.map(t=>e.includes(t.id)?{...t,groupId:s.id}:t);c.push(s);let l=t.history.slice(0,t.historyIndex+1);l.push(c);let u=t.historyDescriptions.slice(0,t.historyIndex+1);return u.push(`Agrupar Elementos`),{...t,elements:c,selectedElementIds:[s.id],history:l,historyDescriptions:u,historyIndex:l.length-1}})},[]),A=t.default.useCallback(e=>{c(t=>{let n=t.elements.find(t=>t.id===e);if(!n||n.type!==`group`)return t;let r=[],i=t.elements.filter(t=>t.id!==e).map(t=>t.groupId===e?(r.push(t.id),{...t,groupId:void 0}):t),a=t.history.slice(0,t.historyIndex+1);a.push(i);let o=t.historyDescriptions.slice(0,t.historyIndex+1);return o.push(`Desagrupar Elementos`),{...t,elements:i,selectedElementIds:r,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[]),j=t.default.useCallback((e,t)=>{c(n=>{let r=n.elements.map(n=>n.id===e?{...n,name:t}:n);return{...n,elements:r}})},[]),M=t.default.useCallback((e,t)=>{if(!e.find(e=>e.id===t&&e.type===`group`))return e;let n=e.filter(e=>e.groupId===t);if(n.length===0)return e;let r=Math.min(...n.map(e=>e.x)),i=Math.min(...n.map(e=>e.y)),a=Math.max(...n.map(e=>e.x+e.width)),o=Math.max(...n.map(e=>e.y+e.height));return e.map(e=>e.id===t?{...e,x:r,y:i,width:a-r,height:o-i}:e)},[]),N=t.default.useCallback((e,t)=>{c(n=>{let r=n.elements.find(t=>t.id===e),i=n.elements.find(e=>e.id===t&&e.type===`group`);if(!r||!i)return n;let a=n.elements.map(n=>n.id===e?{...n,groupId:t}:n);a=M(a,t);let o=n.history.slice(0,n.historyIndex+1);o.push(a);let s=n.historyDescriptions.slice(0,n.historyIndex+1);return s.push(`Adicionar ao Grupo`),{...n,elements:a,history:o,historyDescriptions:s,historyIndex:o.length-1}})},[M]),P=t.default.useCallback(e=>{c(t=>{let n=t.elements.find(t=>t.id===e);if(!n||!n.groupId)return t;let r=n.groupId,i=t.elements.map(t=>t.id===e?{...t,groupId:void 0}:t);i=M(i,r);let a=t.history.slice(0,t.historyIndex+1);a.push(i);let o=t.historyDescriptions.slice(0,t.historyIndex+1);return o.push(`Remover do Grupo`),{...t,elements:i,history:a,historyDescriptions:o,historyIndex:a.length-1}})},[M]),F=t.default.useCallback((e,t,n)=>{c(r=>{let i=r.elements.find(t=>t.id===e&&t.type===`group`);if(!i)return r;let a=t/i.width,o=n/i.height,s=i.x,c=i.y,l=r.elements.map(r=>{if(r.id===e)return{...r,width:t,height:n};if(r.groupId===e){let e=r.x-s,t=r.y-c,n=s+e*a,i=c+t*o;return{...r,x:n,y:i,width:Math.max(1,r.width*a),height:Math.max(1,r.height*o)}}return r}),u=r.history.slice(0,r.historyIndex+1);u.push(l);let d=r.historyDescriptions.slice(0,r.historyIndex+1);return d.push(`Redimensionar Grupo`),{...r,elements:l,history:u,historyDescriptions:d,historyIndex:u.length-1}})},[]),I=t.default.useCallback((e,t)=>{c(n=>({...n,mockData:e,singleMockData:t}))},[]),ee=t.default.useCallback(e=>{c(t=>({...t,listSettings:{...t.listSettings,...e}}))},[]),L=t.default.useCallback(e=>{c(t=>({...t,assets:[...t.assets,e]}))},[]),te=t.default.useCallback(e=>{c(t=>({...t,assets:t.assets.filter(t=>t.id!==e)}))},[]);return(0,r.jsx)(eS.Provider,{value:t.default.useMemo(()=>({state:s,portalContainer:o,setGridSize:d,setZoom:f,setPan:p,setSnapLines:m,addElement:x,removeElement:S,removeSelected:C,selectElement:w,setSelectedElements:T,moveElement:E,updateElement:D,updateElements:O,groupElements:k,ungroupElements:A,renameElement:j,addToGroup:N,removeFromGroup:P,resizeGroup:F,setMockData:I,updateListSettings:ee,setCanvasHeight:u,loadState:h,undo:g,redo:_,jumpToHistory:v,copy:y,paste:b,setPropertiesPanelOpen:l,addAsset:L,removeAsset:te}),[s,o,x,S,C,w,T,E,D,O,k,A,j,N,P,F,I,ee,u,h,g,_,v,y,b,d,f,p,m,L,te,l]),children:e})},rS=()=>{let e=(0,t.useContext)(eS);if(!e)throw Error(`useEditor must be used within an EditorProvider`);return e},iS=()=>{let{state:e,updateElements:t}=rS(),{selectedElementIds:n,elements:i}=e;if(n.length<2)return null;let a=()=>i.filter(e=>n.includes(e.id));return(0,r.jsxs)(G,{gap:`2`,align:`center`,wrap:`wrap`,style:{backgroundColor:`var(--color-panel-solid)`,padding:`8px`,borderRadius:`8px`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`,border:`1px solid var(--gray-5)`,maxWidth:`90vw`,justifyContent:`center`},children:[(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.min(...e.map(e=>e.x));t(e.map(e=>({id:e.id,changes:{x:n}})))},title:`Alinhar à Esquerda`,children:(0,r.jsx)(T,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=(Math.min(...e.map(e=>e.x))+Math.max(...e.map(e=>e.x+e.width)))/2;t(e.map(e=>({id:e.id,changes:{x:n-e.width/2}})))},title:`Alinhar ao Centro (Horizontal)`,children:(0,r.jsx)(x,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.max(...e.map(e=>e.x+e.width));t(e.map(e=>({id:e.id,changes:{x:n-e.width}})))},title:`Alinhar à Direita`,children:(0,r.jsx)(D,{})}),(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.min(...e.map(e=>e.y));t(e.map(e=>({id:e.id,changes:{y:n}})))},title:`Alinhar ao Topo`,children:(0,r.jsx)(k,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=(Math.min(...e.map(e=>e.y))+Math.max(...e.map(e=>e.y+e.height)))/2;t(e.map(e=>({id:e.id,changes:{y:n-e.height/2}})))},title:`Alinhar ao Centro (Vertical)`,children:(0,r.jsx)(C,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<2)return;let n=Math.max(...e.map(e=>e.y+e.height));t(e.map(e=>({id:e.id,changes:{y:n-e.height}})))},title:`Alinhar à Base`,children:(0,r.jsx)(y,{})}),n.length>=3&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<3)return;let n=[...e].sort((e,t)=>e.x-t.x),r=n[0],i=n[n.length-1],o=(i.x+i.width/2-(r.x+r.width/2))/(n.length-1);t(n.map((e,t)=>{if(t===0||t===n.length-1)return null;let i=r.x+r.width/2+o*t;return{id:e.id,changes:{x:i-e.width/2}}}).filter(e=>e!==null))},title:`Distribuir Horizontalmente`,children:(0,r.jsx)(Ct,{})}),(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>{let e=a();if(e.length<3)return;let n=[...e].sort((e,t)=>e.y-t.y),r=n[0],i=n[n.length-1],o=(i.y+i.height/2-(r.y+r.height/2))/(n.length-1);t(n.map((e,t)=>{if(t===0||t===n.length-1)return null;let i=r.y+r.height/2+o*t;return{id:e.id,changes:{y:i-e.height/2}}}).filter(e=>e!==null))},title:`Distribuir Verticalmente`,children:(0,r.jsx)(Tt,{})})]})]})};var aS=function(){return aS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aS.apply(this,arguments)},oS={width:`100%`,height:`10px`,top:`0px`,left:`0px`,cursor:`row-resize`},sS={width:`10px`,height:`100%`,top:`0px`,left:`0px`,cursor:`col-resize`},cS={width:`20px`,height:`20px`,position:`absolute`,zIndex:1},lS={top:aS(aS({},oS),{top:`-5px`}),right:aS(aS({},sS),{left:void 0,right:`-5px`}),bottom:aS(aS({},oS),{top:void 0,bottom:`-5px`}),left:aS(aS({},sS),{left:`-5px`}),topRight:aS(aS({},cS),{right:`-10px`,top:`-10px`,cursor:`ne-resize`}),bottomRight:aS(aS({},cS),{right:`-10px`,bottom:`-10px`,cursor:`se-resize`}),bottomLeft:aS(aS({},cS),{left:`-10px`,bottom:`-10px`,cursor:`sw-resize`}),topLeft:aS(aS({},cS),{left:`-10px`,top:`-10px`,cursor:`nw-resize`})},uS=(0,t.memo)(function(e){var n=e.onResizeStart,i=e.direction,a=e.children,o=e.replaceStyles,s=e.className,c=(0,t.useCallback)(function(e){n(e,i)},[n,i]),l=(0,t.useCallback)(function(e){n(e,i)},[n,i]),u=(0,t.useMemo)(function(){return aS(aS({position:`absolute`,userSelect:`none`},lS[i]),o??{})},[o,i]);return(0,r.jsx)(`div`,{className:s||void 0,style:u,onMouseDown:c,onTouchStart:l,children:a})}),dS=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),fS=function(){return fS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fS.apply(this,arguments)},pS={width:`auto`,height:`auto`},mS=function(e,t,n){return Math.max(Math.min(e,n),t)},hS=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},gS=function(e,t){return new RegExp(e,`i`).test(t)},_S=function(e){return!!(e.touches&&e.touches.length)},vS=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},yS=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},bS=function(e){return e=e.toString(),e===`auto`||e.endsWith(`px`)||e.endsWith(`%`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`vmax`)||e.endsWith(`vmin`)?e:`${e}px`},xS=function(e,t,n,r){if(e&&typeof e==`string`){if(e.endsWith(`px`))return Number(e.replace(`px`,``));if(e.endsWith(`%`)){var i=Number(e.replace(`%`,``))/100;return t*i}if(e.endsWith(`vw`)){var i=Number(e.replace(`vw`,``))/100;return n*i}if(e.endsWith(`vh`)){var i=Number(e.replace(`vh`,``))/100;return r*i}}return e},SS=function(e,t,n,r,i,a,o){return r=xS(r,e.width,t,n),i=xS(i,e.height,t,n),a=xS(a,e.width,t,n),o=xS(o,e.height,t,n),{maxWidth:r===void 0?void 0:Number(r),maxHeight:i===void 0?void 0:Number(i),minWidth:a===void 0?void 0:Number(a),minHeight:o===void 0?void 0:Number(o)}},CS=function(e){return Array.isArray(e)?e:[e,e]},wS=`as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap`.split(`.`),TS=`__resizable_base__`,ES=function(e){dS(t,e);function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement(`div`);return t.style.width=`100%`,t.style.height=`100%`,t.style.position=`absolute`,t.style.transform=`scale(0, 0)`,t.style.left=`0`,t.style.flex=`0 0 100%`,t.classList?t.classList.add(TS):t.className+=TS,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.state={isResizing:!1,width:n.propsSize?.width??`auto`,height:n.propsSize?.height??`auto`,direction:`right`,original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:`100%`,width:`100%`,backgroundColor:`rgba(0,0,0,0)`,cursor:`auto`,opacity:0,position:`fixed`,zIndex:9999,top:`0`,left:`0`,bottom:`0`,right:`0`},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(t.prototype,`parentNode`,{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`window`,{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`propsSize`,{get:function(){return this.props.size||this.props.defaultSize||pS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`size`,{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;i!==`relative`&&(this.resizable.style.position=`relative`),e=this.resizable.style.width===`auto`?n:this.resizable.offsetWidth,t=this.resizable.style.height===`auto`?r:this.resizable.offsetHeight,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sizeStyle`,{get:function(){var e=this,t=this.props.size,n=function(t){if(e.state[t]===void 0||e.state[t]===`auto`)return`auto`;if(e.propsSize&&e.propsSize[t]&&e.propsSize[t]?.toString().endsWith(`%`)){if(e.state[t].toString().endsWith(`%`))return e.state[t].toString();var n=e.getParentSize();return`${Number(e.state[t].toString().replace(`px`,``))/n[t]*100}%`}return bS(e.state[t])};return{width:t&&t.width!==void 0&&!this.state.isResizing?bS(t.width):n(`width`),height:t&&t.height!==void 0&&!this.state.isResizing?bS(t.height):n(`height`)}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;n!==`wrap`&&(t=!0,this.parentNode.style.flexWrap=`wrap`),e.style.position=`relative`,e.style.minWidth=`100%`,e.style.minHeight=`100%`;var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener(`mouseup`,this.onMouseUp),this.window.addEventListener(`mousemove`,this.onMouseMove),this.window.addEventListener(`mouseleave`,this.onMouseUp),this.window.addEventListener(`touchmove`,this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener(`touchend`,this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener(`mouseup`,this.onMouseUp),this.window.removeEventListener(`mousemove`,this.onMouseMove),this.window.removeEventListener(`mouseleave`,this.onMouseUp),this.window.removeEventListener(`touchmove`,this.onMouseMove,!0),this.window.removeEventListener(`touchend`,this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis===`auto`?void 0:e.flexBasis})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return this.state[t]===`auto`&&this.state.original[t]===e&&(n===void 0||n===`auto`)?`auto`:e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n=this.props.boundsByDirection,r=this.state.direction,i=n&&gS(`left`,r),a=n&&gS(`top`,r),o,s;if(this.props.bounds===`parent`){var c=this.parentNode;c&&(o=i?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),s=a?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds===`window`?this.window&&(o=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,s=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),s=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),s&&Number.isFinite(s)&&(t=t&&t<s?t:s),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=CS(this.props.resizeRatio||1),i=r[0],a=r[1],o=this.state,s=o.direction,c=o.original,l=this.props,u=l.lockAspectRatio,d=l.lockAspectRatioExtraHeight,f=l.lockAspectRatioExtraWidth,p=c.width,m=c.height,h=d||0,g=f||0;return gS(`right`,s)&&(p=c.width+(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),gS(`left`,s)&&(p=c.width-(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),gS(`bottom`,s)&&(m=c.height+(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),gS(`top`,s)&&(m=c.height-(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),{newWidth:p,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,a=i.lockAspectRatio,o=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=r.width===void 0?10:r.width,l=n.width===void 0||n.width<0?e:n.width,u=r.height===void 0?10:r.height,d=n.height===void 0||n.height<0?t:n.height,f=o||0,p=s||0;if(a){var m=(u-f)*this.ratio+p,h=(d-f)*this.ratio+p,g=(c-p)/this.ratio+f,_=(l-p)/this.ratio+f,v=Math.max(c,m),y=Math.min(l,h),b=Math.max(u,g),x=Math.min(d,_);e=mS(e,v,y),t=mS(t,b,x)}else e=mS(e,c,l),t=mS(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds===`parent`){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&typeof this.props.bounds!=`string`){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,o=i.top,s=i.right,c=i.bottom;this.resizableLeft=a*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(!(!this.resizable||!this.window)){var n=0,r=0;if(e.nativeEvent&&vS(e.nativeEvent)?(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&_S(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),!(this.props.onResizeStart&&this.resizable&&this.props.onResizeStart(e,t,this.resizable)===!1)){this.props.size&&(this.props.size.height!==void 0&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),this.props.size.width!==void 0&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio==`number`?this.props.lockAspectRatio:this.size.width/this.size.height;var i,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!==`auto`){var o=this.parentNode;o&&(this.flexDir=this.window.getComputedStyle(o).flexDirection.startsWith(`row`)?`row`:`column`,i=a.flexBasis)}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:fS(fS({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||`auto`}),direction:t,flexBasis:i};this.setState(s)}}},t.prototype.onMouseMove=function(e){var t=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_S(e))try{e.preventDefault(),e.stopPropagation()}catch{}var r=this.props,i=r.maxWidth,a=r.maxHeight,o=r.minWidth,s=r.minHeight,c=_S(e)?e.touches[0].clientX:e.clientX,l=_S(e)?e.touches[0].clientY:e.clientY,u=this.state,d=u.direction,f=u.original,p=u.width,m=u.height,h=this.getParentSize(),g=SS(h,this.window.innerWidth,this.window.innerHeight,i,a,o,s);i=g.maxWidth,a=g.maxHeight,o=g.minWidth,s=g.minHeight;var _=this.calculateNewSizeFromDirection(c,l),v=_.newHeight,y=_.newWidth,b=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(y=yS(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=yS(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(y,v,{width:b.maxWidth,height:b.maxHeight},{width:o,height:s});if(y=x.newWidth,v=x.newHeight,this.props.grid){var S=hS(y,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),C=hS(v,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),w=this.props.snapGap||0,T=w===0||Math.abs(S-y)<=w?S:y,E=w===0||Math.abs(C-v)<=w?C:v;y=T,v=E}var D={width:y-f.width,height:v-f.height};if(this.delta=D,p&&typeof p==`string`){if(p.endsWith(`%`)){var O=y/h.width*100;y=`${O}%`}else if(p.endsWith(`vw`)){var k=y/this.window.innerWidth*100;y=`${k}vw`}else if(p.endsWith(`vh`)){var A=y/this.window.innerHeight*100;y=`${A}vh`}}if(m&&typeof m==`string`){if(m.endsWith(`%`)){var O=v/h.height*100;v=`${O}%`}else if(m.endsWith(`vw`)){var k=v/this.window.innerWidth*100;v=`${k}vw`}else if(m.endsWith(`vh`)){var A=v/this.window.innerHeight*100;v=`${A}vh`}}var j={width:this.createSizeForCssProperty(y,`width`),height:this.createSizeForCssProperty(v,`height`)};this.flexDir===`row`?j.flexBasis=j.width:this.flexDir===`column`&&(j.flexBasis=j.height);var M=this.state.width!==j.width,N=this.state.height!==j.height,P=this.state.flexBasis!==j.flexBasis,F=M||N||P;F&&(0,n.flushSync)(function(){t.setState(j)}),this.props.onResize&&F&&this.props.onResize(e,d,this.resizable,D)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction;t.original,!(!n||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,this.delta),this.props.size&&this.setState({width:this.props.size.width??`auto`,height:this.props.size.height??`auto`}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:fS(fS({},this.state.backgroundStyle),{cursor:`auto`})}))},t.prototype.updateSize=function(e){this.setState({width:e.width??`auto`,height:e.height??`auto`})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,a=t.handleClasses,o=t.handleWrapperStyle,s=t.handleWrapperClass,c=t.handleComponent;return n?(0,r.jsx)(`div`,{className:s,style:o,children:Object.keys(n).map(function(t){return n[t]===!1?null:(0,r.jsx)(uS,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:a&&a[t],children:c&&c[t]?c[t]:null},t)})}):null},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return wS.indexOf(n)===-1&&(t[n]=e.props[n]),t},{}),n=fS(fS(fS({position:`relative`,userSelect:this.state.isResizing?`none`:`auto`},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:`border-box`,flexShrink:0});return this.state.flexBasis&&(n.flexBasis=this.state.flexBasis),(0,r.jsxs)(this.props.as||`div`,fS({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,r.jsx)(`div`,{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:`div`,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(t.PureComponent);let DS=[`normal`,`bold`,`100`,`300`,`900`],OS=[`100`,`300`,`400`,`500`,`600`,`700`,`900`,`normal`,`bold`],kS=(e,t=DS)=>{let n=e==null?`normal`:String(e);return n===`400`||n===`normal`?t.includes(`400`)?`400`:`normal`:n===`700`||n===`bold`?t.includes(`700`)?`700`:`bold`:t.includes(n)?n:t.includes(`400`)?`400`:t[0]??`normal`},AS=(e,t)=>t.includes(e)?t:[e,...t],jS=(e,t)=>{if(e==null)return``;if(t.type===`boolean`)return String(e)===`true`||e===!0||typeof e==`number`&&e>0?t.trueLabel||`Sim`:t.falseLabel||`Não`;if(t.type===`date`)try{let n=new Date(e);if(isNaN(n.getTime()))return String(e);if(t.dateFormat){let e=n.getDate().toString().padStart(2,`0`),r=(n.getMonth()+1).toString().padStart(2,`0`),i=n.getFullYear(),a=n.getHours().toString().padStart(2,`0`),o=n.getMinutes().toString().padStart(2,`0`),s=n.getSeconds().toString().padStart(2,`0`);return t.dateFormat.replace(`DD`,e).replace(`MM`,r).replace(`YYYY`,String(i)).replace(`HH`,a).replace(`mm`,o).replace(`ss`,s)}return n.toLocaleDateString()}catch{return String(e)}if(t.type===`number`){let n=parseFloat(String(e));return isNaN(n)?String(e):t.numberFormat===`currency`?(t.currencySymbol||`R$`)+` `+n.toFixed(t.decimalPlaces||2):t.numberFormat===`percent`?n.toFixed(t.decimalPlaces||0)+`%`:n.toFixed(t.decimalPlaces||0)}return String(e)},MS=e=>{if(e==null)return!1;let t=String(e).trim();return t?t.startsWith(`http://`)||t.startsWith(`https://`)||t.startsWith(`data:`)||t.startsWith(`/`)||/^[a-zA-Z0-9][a-zA-Z0-9-+.]*:/.test(t):!1},NS=(e,t,n)=>{let r=String(e).toLowerCase(),i=String(n).toLowerCase();switch(t){case`equals`:return r===i;case`notEquals`:return r!==i;case`contains`:return r.includes(i);case`greaterThan`:return parseFloat(r)>parseFloat(i);case`lessThan`:return parseFloat(r)<parseFloat(i);case`truthy`:return!!e;case`falsy`:return!e;default:return!1}},PS=t.default.memo(({element:e,isSelected:n})=>{let{selectElement:i,updateElement:a,updateElements:o,state:s,resizeGroup:c,setSnapLines:l,setPropertiesPanelOpen:u}=rS(),[d,f]=(0,t.useState)(!1),[,p]=(0,t.useState)(!1),[m,h]=(0,t.useState)(!1),g=(0,t.useRef)(null),_=(0,t.useRef)({x:0,y:0}),v=(0,t.useRef)({}),y=(0,t.useRef)(!1),b=(0,t.useRef)(!1),x=(0,t.useRef)(0),S=(0,t.useRef)(0),C=(0,t.useRef)({x:0,y:0}),w=(0,t.useRef)(!1),T=s.canvasHeight||150,E=s.isList?s.mockData.length>0?s.mockData[0]:null:s.singleMockData,D=e.content,O={},k=(e,t)=>{let n=/(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;return!e||e===`none`?`0 4px 12px 0 ${t}`:n.test(e)?e.replace(n,t):`${e} ${t}`};if(E){if(e.type===`text`||e.type===`text-container`)D=D.replace(/\{\{(.*?)\}\}/g,(t,n)=>{let r=E[n.trim()];return r==null?t:e.formatting?jS(r,e.formatting):String(r)});else if(e.type===`image`)if(e.dataBinding){let t=E[e.dataBinding];t!=null&&(D=String(t))}else D=D.replace(/\{\{(.*?)\}\}/g,(e,t)=>{let n=E[t.trim()];return n==null?e:String(n)});e.styleBindings&&Object.entries(e.styleBindings).forEach(([t,n])=>{let r=E[n];if(r!=null)if(t===`boxShadowColor`){let t=O.boxShadow||e.style?.boxShadow;O={...O,boxShadow:k(t,String(r))}}else O={...O,[t]:String(r)}}),e.conditions&&e.conditions.forEach(e=>{let t=E[e.property];NS(t,e.operator,e.value)&&(O={...O,...e.style})})}let A=O.display===`none`;if(A&&n){let{display:e,...t}=O;O=t}let j=t=>{t.stopPropagation(),!y.current&&!b.current&&!d&&(t.shiftKey?i(e.id,!0):i(e.id,!1))},M=t=>{t.stopPropagation(),e.locked||u(!0)},N=t=>{if(e.locked||t.button!==0)return;t.stopPropagation();let r=t.shiftKey;if(y.current=!1,b.current=!1,e.groupId&&!n){i(e.groupId,r);return}n||(i(e.id,r),b.current=!0),f(!0),_.current={x:t.clientX,y:t.clientY},t.currentTarget.setPointerCapture(t.pointerId);let a=new Set(s.selectedElementIds);n||(r||a.clear(),a.add(e.id));let o={};s.elements.forEach(e=>{a.has(e.id)&&(o[e.id]={x:e.x,y:e.y})}),v.current=o},P=t=>{if(d){let n=s.zoom||1,r=(t.clientX-_.current.x)/n,i=(t.clientY-_.current.y)/n;(Math.abs(r)>2||Math.abs(i)>2)&&(y.current=!0);let a=5/n,c=[],u=Object.entries(v.current).map(([t,n])=>{let o=n.x+r,l=n.y+i;if(s.gridSize>0)o=Math.round(o/s.gridSize)*s.gridSize,l=Math.round(l/s.gridSize)*s.gridSize;else{let n=!1,r=!1,i=e.width??100,u=e.height??100;Object.keys(v.current).length===1&&s.elements.forEach(e=>{if(e.id===t)return;let s=e.width??100,d=e.height??100;n||(Math.abs(o-e.x)<a?(o=e.x,n=!0,c.push({orientation:`vertical`,position:e.x})):Math.abs(o-(e.x+s))<a?(o=e.x+s,n=!0,c.push({orientation:`vertical`,position:e.x+s})):Math.abs(o+i-e.x)<a?(o=e.x-i,n=!0,c.push({orientation:`vertical`,position:e.x})):Math.abs(o+i-(e.x+s))<a&&(o=e.x+s-i,n=!0,c.push({orientation:`vertical`,position:e.x+s}))),r||(Math.abs(l-e.y)<a?(l=e.y,r=!0,c.push({orientation:`horizontal`,position:e.y})):Math.abs(l-(e.y+d))<a?(l=e.y+d,r=!0,c.push({orientation:`horizontal`,position:e.y+d})):Math.abs(l+u-e.y)<a?(l=e.y-u,r=!0,c.push({orientation:`horizontal`,position:e.y})):Math.abs(l+u-(e.y+d))<a&&(l=e.y+d-u,r=!0,c.push({orientation:`horizontal`,position:e.y+d})))})}if(o=Math.max(0,o),s.isList){l=Math.max(0,l);let t=e.height??100;T>0&&(l=Math.min(l,T-t)),l=Math.max(0,l)}return{id:t,changes:{x:o,y:l}}});l&&l(c),o(u,!1)}},F=e=>{d&&(f(!1),e.currentTarget.releasePointerCapture(e.pointerId),o([],!0),l&&l([]))},I=t=>{t.stopPropagation(),t.preventDefault(),h(!0);let n=t.target.closest(`.resizable-element`);if(n){let r=n.getBoundingClientRect();C.current={x:r.left+r.width/2,y:r.top+r.height/2};let i=t.clientX-C.current.x,a=t.clientY-C.current.y;x.current=Math.atan2(a,i)*(180/Math.PI),S.current=e.rotation||0}};(0,t.useEffect)(()=>{let t=t=>{if(m){let n=t.clientX-C.current.x,r=t.clientY-C.current.y,i=Math.atan2(r,n)*(180/Math.PI)-x.current,o=(S.current+i)%360;a(e.id,{rotation:o},!1)}},n=()=>{m&&(h(!1),a(e.id,{rotation:e.rotation},!0))};return m&&(window.addEventListener(`mousemove`,t),window.addEventListener(`mouseup`,n)),()=>{window.removeEventListener(`mousemove`,t),window.removeEventListener(`mouseup`,n)}},[m,e.id,a,e.rotation]),(0,t.useEffect)(()=>{e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`&&requestAnimationFrame(()=>{if(g.current){let t=g.current.scrollWidth;Math.abs(t-(e.width??0))>2&&a(e.id,{width:t},!1)}})},[D,e.autoGrow,e.containerExpansion,e.style,e.width,e.formatting,a,e.id,e.type]);let ee={position:`relative`,left:0,top:0,width:`100%`,height:e.autoGrow?`auto`:`100%`,minHeight:e.autoGrow?`100%`:void 0,padding:e.type===`image`||e.type===`text`?0:`8px`,outline:`none`,cursor:d?`grabbing`:`grab`,borderRadius:`var(--radius-2)`,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,userSelect:`none`,boxSizing:`border-box`,...e.style,...O},[L,te]=(0,t.useState)(!1);return(0,r.jsx)(ES,{className:`resizable-element`,size:{width:e.width??100,height:e.autoGrow?`auto`:e.height??100},maxHeight:s.isList?Math.max(10,T-e.y):void 0,onResizeStart:e=>{p(!0),w.current=!!e.shiftKey},onResizeStop:(t,n,r,i)=>{p(!1);let o=(e.width??100)+i.width,s=(e.height??100)+i.height,l=e.x??0,u=e.y??0;n.includes(`left`)&&(l-=i.width),n.includes(`top`)&&(u-=i.height),e.type===`group`?(c(e.id,o,s),a(e.id,{x:l,y:u},!0)):a(e.id,{width:o,height:s,x:l,y:u})},handleComponent:{topLeft:(0,r.jsx)(`div`,{className:`resize-handle top-left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),topRight:(0,r.jsx)(`div`,{className:`resize-handle top-right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottomLeft:(0,r.jsx)(`div`,{className:`resize-handle bottom-left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottomRight:(0,r.jsx)(`div`,{className:`resize-handle bottom-right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),top:(0,r.jsx)(`div`,{className:`resize-handle top`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),bottom:(0,r.jsx)(`div`,{className:`resize-handle bottom`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),left:(0,r.jsx)(`div`,{className:`resize-handle left`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}}),right:(0,r.jsx)(`div`,{className:`resize-handle right`,onPointerDown:t=>{t.button===0&&(t.stopPropagation(),i(e.id,t.shiftKey))}})},handleStyles:{topLeft:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,left:-5,top:-5,zIndex:n?1001:10,opacity:n?1:0},topRight:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,right:-5,top:-5,zIndex:n?1001:10,opacity:n?1:0},bottomLeft:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,left:-5,bottom:-5,zIndex:n?1001:10,opacity:n?1:0},bottomRight:{width:10,height:10,background:`var(--accent-9)`,borderRadius:`50%`,right:-5,bottom:-5,zIndex:n?1001:10,opacity:n?1:0},top:{height:6,top:-3,zIndex:n?1e3:9,opacity:n?1:0},bottom:{height:6,bottom:-3,zIndex:n?1e3:9,opacity:n?1:0},left:{width:6,left:-3,zIndex:n?1e3:9,opacity:n?1:0},right:{width:6,right:-3,zIndex:n?1e3:9,opacity:n?1:0}},style:{position:`absolute`,transform:`translate(${e.x??0}px, ${e.y??0}px) rotate(${e.rotation||0}deg)`,height:e.autoGrow?`auto`:void 0,display:A&&!n?`none`:void 0,opacity:A&&n?.4:1,zIndex:n?1e3:e.style?.zIndex===void 0?void 0:Number(e.style.zIndex),outline:`none`,overflow:e.style?.overflow||(e.autoGrow?`visible`:`hidden`)},enable:e.autoGrow?{top:!1,right:!0,bottom:!1,left:!0,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1}:void 0,lockAspectRatio:w.current,grid:s.gridSize>0?[s.gridSize,s.gridSize]:void 0,children:(0,r.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`},onMouseEnter:()=>te(!0),onMouseLeave:()=>te(!1),children:[(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,pointerEvents:`none`,border:n?`2px solid var(--accent-9)`:L?`1px dashed var(--gray-8)`:`none`,borderRadius:e.style?.borderRadius||`var(--radius-2)`,borderTopLeftRadius:e.style?.borderTopLeftRadius,borderTopRightRadius:e.style?.borderTopRightRadius,borderBottomRightRadius:e.style?.borderBottomRightRadius,borderBottomLeftRadius:e.style?.borderBottomLeftRadius,zIndex:10}}),(0,r.jsxs)(W,{ref:g,style:{...ee,...e.type===`text-container`&&{display:`flex`,alignItems:e.style?.alignItems||`flex-start`,justifyContent:e.style?.justifyContent||`flex-start`},zIndex:2,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:ee.whiteSpace,width:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`max-content`:`100%`,height:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`vertical`?`auto`:`100%`},onPointerDown:N,onPointerMove:P,onPointerUp:F,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onClick:j,onDoubleClick:M,title:e.name,onDragOver:e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`},onDrop:t=>{t.preventDefault(),t.stopPropagation();let n=t.dataTransfer.getData(`application/x-editor-prop`);if(n)if(e.type===`text`||e.type===`text-container`){let t=e.content?`${e.content} {{${n}}}`:`{{${n}}}`;a(e.id,{content:t,dataBinding:n})}else e.type===`image`?a(e.id,{dataBinding:n,content:`{{${n}}}`}):e.type===`checkbox`&&a(e.id,{dataBinding:n})},children:[e.type===`text`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`},children:D}),e.type===`text-container`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,display:`block`},children:D}),e.type===`image`&&(D&&MS(D)?(0,r.jsx)(`img`,{src:D,alt:`Element`,style:{width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`,pointerEvents:`none`}}):(0,r.jsx)(W,{style:{width:`100%`,height:`100%`,backgroundColor:`#eee`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(U,{size:`1`,children:D?`URL inválida`:`Imagem Placeholder`})})),e.type===`box`&&(0,r.jsx)(W,{style:{width:`100%`,height:`100%`}}),e.type===`group`&&(0,r.jsx)(W,{style:{width:`100%`,height:`100%`,border:n?`1px dashed var(--accent-9)`:`1px dashed var(--gray-6)`,opacity:.5,pointerEvents:`none`},children:(0,r.jsx)(U,{size:`1`,style:{position:`absolute`,top:0,left:0,backgroundColor:`var(--accent-3)`,color:`var(--accent-11)`,padding:`2px 6px`,fontSize:`10px`,borderBottomRightRadius:`4px`},children:e.name||`Grupo`})})]}),n&&(0,r.jsx)(W,{className:`rotate-handle`,style:{position:`absolute`,top:-30,left:`50%`,transform:`translateX(-50%)`,width:12,height:12,backgroundColor:`var(--accent-9)`,borderRadius:`50%`,cursor:`crosshair`,zIndex:50,boxShadow:`0 0 0 2px white`},onMouseDown:I,onPointerDown:e=>e.stopPropagation(),children:(0,r.jsx)(W,{style:{position:`absolute`,top:12,left:`50%`,width:2,height:18,backgroundColor:`var(--accent-9)`,transform:`translateX(-50%)`}})})]})})}),FS=()=>{let{state:e}=rS(),{snapLines:t}=e;return t.length===0?null:(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>(0,r.jsx)(`div`,{style:{position:`absolute`,left:e.orientation===`vertical`?e.position:0,top:e.orientation===`horizontal`?e.position:0,width:e.orientation===`vertical`?`1px`:`100%`,height:e.orientation===`horizontal`?`1px`:`100%`,backgroundColor:`#ff0000`,zIndex:9999,pointerEvents:`none`,borderLeft:e.orientation===`vertical`?`1px dashed #ff0000`:`none`,borderTop:e.orientation===`horizontal`?`1px dashed #ff0000`:`none`}},t))})},IS=()=>{let{state:e,selectElement:n,setSelectedElements:i,addElement:a,setZoom:o,setPan:s,undo:c,redo:l,copy:u,paste:d,removeSelected:f,updateElements:p}=rS(),m=(0,t.useRef)(null),[h,g]=(0,t.useState)(null),_=(0,t.useRef)(!1),v=(0,t.useRef)(!1),y=(0,t.useRef)(!1),b=(0,t.useRef)({x:0,y:0}),x=(0,t.useRef)({x:0,y:0}),S=(0,t.useRef)([]),C=(0,t.useRef)([]),w=(0,t.useRef)(e),T=(0,t.useRef)(0);(0,t.useEffect)(()=>{w.current=e},[e]);let E=(0,t.useCallback)(e=>{if(!m.current)return;let t=w.current;if(v.current){let n=e.clientX-x.current.x,r=e.clientY-x.current.y;s({x:t.pan.x+n,y:t.pan.y+r}),x.current={x:e.clientX,y:e.clientY};return}if(!_.current)return;let n=m.current.getBoundingClientRect(),r=(e.clientX-n.left-t.pan.x)/t.zoom,a=(e.clientY-n.top-t.pan.y)/t.zoom,o=Math.min(b.current.x,r),c=Math.min(b.current.y,a),l=Math.abs(r-b.current.x),u=Math.abs(a-b.current.y);g({x:o,y:c,width:l,height:u});let d=Date.now();if(!(d-T.current<50)&&(l>0||u>0)){let e=[];t.elements.forEach(t=>{let n=t.x??0,r=t.y??0,i=t.width??100,a=t.height??100,s=n+i,d=r+a,f=o+l,p=c+u;n<f&&s>o&&r<p&&d>c&&e.push(t.id)});let n=Array.from(new Set([...S.current,...e])),r=C.current;r.length===n.length&&r.every(e=>n.includes(e))||(i(n),C.current=n,T.current=d)}},[i,s]),D=(0,t.useCallback)(e=>{(_.current||v.current)&&e.target.releasePointerCapture(e.pointerId),_.current=!1,v.current=!1,g(null)},[]),O=t=>{if(t.button===2)return;let r=t.target;if(r.closest(`.resize-handle`)||r.closest(`.rotate-handle`))return;if(t.currentTarget.setPointerCapture(t.pointerId),t.button===1||t.button===0&&y.current||t.pointerType===`touch`){t.preventDefault(),v.current=!0,x.current={x:t.clientX,y:t.clientY};return}_.current=t.shiftKey;let i=m.current?.getBoundingClientRect();if(!i)return;let a=i.left,o=i.top;b.current={x:(t.clientX-a-e.pan.x)/e.zoom,y:(t.clientY-o-e.pan.y)/e.zoom},S.current=e.selectedElementIds,C.current=e.selectedElementIds,t.shiftKey||(n(null),S.current=[],C.current=[])};(0,t.useEffect)(()=>{let e=e=>{e.preventDefault();let t=w.current;if(e.ctrlKey||e.metaKey)o(Math.min(Math.max(.1,t.zoom-e.deltaY*.001),5));else{let n=e.shiftKey?e.deltaY:e.deltaX,r=e.shiftKey?e.deltaX:e.deltaY;s({x:t.pan.x-n*1,y:t.pan.y-r*1})}},t=m.current;return t&&t.addEventListener(`wheel`,e,{passive:!1}),()=>{t&&t.removeEventListener(`wheel`,e)}},[o,s]),(0,t.useEffect)(()=>{let t=t=>{if(t.code===`Space`&&!t.repeat&&!(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)&&(y.current=!0,m.current&&(m.current.style.cursor=`grab`)),!(t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement)&&((t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`z`&&(t.preventDefault(),t.shiftKey?l():c()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`y`&&(t.preventDefault(),l()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&(t.preventDefault(),u()),(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`v`&&(t.preventDefault(),d()),(t.key===`Delete`||t.key===`Backspace`)&&(t.preventDefault(),f()),[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(t.key))){t.preventDefault();let n=t.shiftKey?10:1,r=[];e.selectedElementIds.forEach(i=>{let a=e.elements.find(e=>e.id===i);if(a){let{x:o=0,y:s=0}=a;if(t.key===`ArrowUp`&&(s-=n),t.key===`ArrowDown`&&(s+=n),t.key===`ArrowLeft`&&(o-=n),t.key===`ArrowRight`&&(o+=n),o=Math.max(0,o),e.isList){s=Math.max(0,s);let t=a.height??100,n=e.canvasHeight||150;n>0&&(s=Math.min(s,n-t)),s=Math.max(0,s)}r.push({id:i,changes:{x:o,y:s}})}}),r.length>0&&p(r)}},n=e=>{e.code===`Space`&&(y.current=!1,m.current&&!v.current&&(m.current.style.cursor=`default`))};return window.addEventListener(`keydown`,t),window.addEventListener(`keyup`,n),()=>{window.removeEventListener(`keydown`,t),window.removeEventListener(`keyup`,n)}},[c,l,u,d,f,p,e.selectedElementIds,e.elements]);let k=(0,t.useRef)(!1),{setCanvasHeight:A}=rS(),j=e=>{e.stopPropagation(),e.preventDefault(),k.current=!0,window.addEventListener(`mousemove`,M),window.addEventListener(`mouseup`,N)},M=(0,t.useCallback)(e=>{if(!k.current||!m.current)return;let t=m.current.getBoundingClientRect(),n=e.clientY-t.top,r=Math.max(50,Math.min(n,2e3));A(Math.round(r))},[A]),N=(0,t.useCallback)(()=>{k.current=!1,window.removeEventListener(`mousemove`,M),window.removeEventListener(`mouseup`,N)},[M]);(0,t.useEffect)(()=>()=>{window.removeEventListener(`mousemove`,M),window.removeEventListener(`mouseup`,N)},[M,N]);let P=e=>{e.preventDefault(),e.dataTransfer.dropEffect=`copy`},F=t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=(t.clientX-n.left-e.pan.x)/e.zoom,i=(t.clientY-n.top-e.pan.y)/e.zoom,o=t.dataTransfer.getData(`application/x-editor-prop`);if(o){a({type:`text`,content:`{{${o}}}`,x:r,y:i,width:150,height:30,dataBinding:o});return}let s=t.dataTransfer.getData(`application/x-editor-asset`);if(s)try{let e=JSON.parse(s);a({type:`image`,name:e.name,content:e.url,x:r,y:i,width:e.width||200,height:e.height||200})}catch(e){console.error(`Failed to parse asset`,e)}},I=e.canvasHeight||150;return(0,r.jsxs)(W,{ref:m,onPointerDown:O,onPointerMove:e=>{(_.current||v.current)&&E(e.nativeEvent)},onPointerUp:e=>{(_.current||v.current)&&D(e.nativeEvent)},onDragOver:P,onDrop:F,style:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`,backgroundColor:`var(--gray-1)`,cursor:v.current?`grabbing`:`default`,backgroundImage:`radial-gradient(var(--gray-5) 1px, transparent 1px)`,backgroundSize:`${20*e.zoom}px ${20*e.zoom}px`,backgroundPosition:`${e.pan.x}px ${e.pan.y}px`},children:[(0,r.jsxs)(`div`,{style:{transform:`translate(${e.pan.x}px, ${e.pan.y}px) scale(${e.zoom})`,transformOrigin:`0 0`,width:`100%`,height:`100%`,position:`absolute`,top:0,left:0,pointerEvents:`none`},children:[(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`1px`,borderTop:`1px dashed var(--accent-9)`,opacity:.6,zIndex:5,pointerEvents:`none`},children:(0,r.jsx)(`span`,{style:{position:`absolute`,top:-16,left:4,fontSize:`10px`,color:`var(--accent-9)`,fontWeight:500},children:`Início (0px)`})}),e.elements.filter(e=>!e.hidden).map(t=>(0,r.jsx)(`div`,{style:{pointerEvents:`auto`},children:(0,r.jsx)(PS,{element:t,isSelected:e.selectedElementIds.includes(t.id)})},t.id)),(0,r.jsx)(FS,{}),h&&(0,r.jsx)(`div`,{style:{position:`absolute`,left:h.x,top:h.y,width:h.width,height:h.height,backgroundColor:`rgba(0, 120, 255, 0.2)`,border:`1px solid rgba(0, 120, 255, 0.8)`,pointerEvents:`none`,zIndex:999999}}),e.isList&&(0,r.jsxs)(`div`,{style:{position:`absolute`,top:I,left:0,right:0,height:`10px`,marginTop:`-5px`,cursor:`ns-resize`,zIndex:100,display:`flex`,alignItems:`center`,justifyContent:`center`},onMouseDown:j,children:[(0,r.jsx)(`div`,{style:{width:`100%`,height:`2px`,backgroundColor:`var(--accent-9)`,borderBottom:`none`,opacity:.8,boxShadow:`0 1px 4px rgba(0,0,0,0.2)`}}),(0,r.jsxs)(`div`,{style:{position:`absolute`,right:10,top:-20,backgroundColor:`var(--accent-9)`,color:`white`,fontSize:`11px`,padding:`2px 6px`,borderRadius:`4px`,fontWeight:500,pointerEvents:`none`,boxShadow:`0 2px 5px rgba(0,0,0,0.1)`},children:[`Altura do Item: `,I,`px`]})]})]}),e.elements.length===0&&(0,r.jsx)(G,{align:`center`,justify:`center`,style:{position:`absolute`,inset:0,pointerEvents:`none`},children:(0,r.jsxs)(W,{style:{backgroundColor:`var(--gray-2)`,border:`1px solid var(--gray-4)`,borderRadius:12,padding:16,maxWidth:320,textAlign:`center`,boxShadow:`0 6px 20px rgba(0,0,0,0.08)`},children:[(0,r.jsx)(U,{size:`3`,weight:`bold`,children:`Comece adicionando um elemento`}),(0,r.jsx)(U,{size:`2`,color:`gray`,as:`div`,mt:`2`,children:`Depois, arraste para mover e use os cantos para redimensionar.`}),(0,r.jsx)(U,{size:`1`,color:`gray`,as:`div`,mt:`2`,children:`Dica: clique com o botão direito para mais opções.`})]})}),h&&(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,zIndex:999995,pointerEvents:`auto`}})]})},LS=({onSave:e,templates:n,setIsTemplatesOpen:i,onFinish:a,onToggleSidebar:o})=>{let{state:s,portalContainer:c,loadState:l,addElement:u}=rS(),d=(0,t.useRef)(null),f=()=>{let e={elements:s.elements,isList:s.isList,mockData:s.mockData,singleMockData:s.singleMockData,listSettings:s.listSettings,canvasHeight:s.canvasHeight,gridSize:s.gridSize},t=JSON.stringify(e,null,2),n=new Blob([t],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`layout-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},p=()=>{d.current?.click()},m=e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{try{let t=e.target?.result;l(JSON.parse(t))}catch(e){console.error(`Failed to import layout`,e),alert(`Erro ao importar layout. Arquivo inválido.`)}},n.readAsText(t),e.target.value=``},h=()=>{if(e){let t={elements:s.elements,isList:s.isList,mockData:s.mockData,singleMockData:s.singleMockData,listSettings:s.listSettings,canvasHeight:s.canvasHeight};e(JSON.stringify(t,null,2))}},g=e=>{u({type:e,content:`New ${e}`})};return(0,r.jsxs)(G,{justify:`between`,align:`center`,px:`4`,py:`3`,style:{borderBottom:`1px solid var(--gray-5)`,backgroundColor:`var(--gray-1)`,flexShrink:0,zIndex:100},children:[(0,r.jsxs)(G,{gap:`4`,align:`center`,children:[o&&(0,r.jsx)(W,{display:{initial:`block`,md:`none`},children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:o,children:(0,r.jsx)(Ze,{width:`24`,height:`24`})})}),(0,r.jsx)(U,{size:`3`,weight:`bold`,children:`Editor de Layout`})]}),(0,r.jsxs)(G,{gap:`3`,align:`center`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`solid`,color:`green`,style:{cursor:`pointer`},children:[(0,r.jsx)(pt,{}),` Adicionar`]})}),(0,r.jsxs)(fy,{...c&&{container:c},children:[(0,r.jsx)(q,{onSelect:()=>g(`text`),children:`Texto`}),(0,r.jsx)(q,{onSelect:()=>g(`image`),children:`Imagem`}),(0,r.jsx)(q,{onSelect:()=>g(`box`),children:`Container / Grupo`}),(0,r.jsx)(q,{onSelect:()=>g(`text-container`),children:`Container com Texto`})]})]}),(0,r.jsxs)(K,{variant:`soft`,color:`gray`,onClick:p,style:{cursor:`pointer`},children:[(0,r.jsx)($t,{}),` Importar`]}),(0,r.jsx)(`input`,{type:`file`,ref:d,style:{display:`none`},accept:`.json`,onChange:m}),(0,r.jsxs)(K,{variant:`soft`,color:`gray`,onClick:f,style:{cursor:`pointer`},children:[(0,r.jsx)(Fe,{}),` Exportar`]}),n&&n.length>0&&(0,r.jsxs)(K,{variant:`soft`,color:`gray`,onClick:()=>i(!0),style:{cursor:`pointer`},children:[(0,r.jsx)(Ue,{}),` Templates`]}),a&&(0,r.jsxs)(K,{id:`finish-button`,variant:`solid`,color:`green`,onClick:a,style:{cursor:`pointer`,marginLeft:8},children:[(0,r.jsx)(he,{}),` Finalizar e Testar`]}),(0,r.jsxs)(K,{variant:`solid`,color:`blue`,onClick:h,style:{cursor:`pointer`},children:[(0,r.jsx)(yt,{}),` Salvar`]})]})]})},RS=()=>{let{state:e}=rS(),{elements:t,zoom:n,pan:i}=e,a=(()=>{if(t.length===0)return{minX:0,minY:0,maxX:1e3,maxY:1e3};let e=1/0,n=1/0,r=-1/0,i=-1/0;return t.forEach(t=>{e=Math.min(e,t.x),n=Math.min(n,t.y),r=Math.max(r,t.x+t.width),i=Math.max(i,t.y+t.height)}),{minX:e-100,minY:n-100,maxX:r+100,maxY:i+100,width:r-e+200,height:i-n+200}})(),o=window.innerWidth/n,s=window.innerHeight/n,c=-i.x/n,l=-i.y/n;return(0,r.jsx)(W,{style:{position:`absolute`,bottom:20,right:20,width:150,height:150,backgroundColor:`rgba(255, 255, 255, 0.9)`,border:`1px solid var(--gray-6)`,borderRadius:8,overflow:`hidden`,boxShadow:`0 4px 12px rgba(0,0,0,0.1)`,zIndex:100},children:(0,r.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`,transform:`scale(0.1) translate(${-a.minX}px, ${-a.minY}px)`,transformOrigin:`top left`},children:[t.filter(e=>!e.hidden).map(e=>(0,r.jsx)(`div`,{style:{position:`absolute`,left:e.x,top:e.y,width:e.width,height:e.height,backgroundColor:`var(--accent-9)`,opacity:.5,border:`1px solid var(--accent-11)`}},e.id)),(0,r.jsx)(`div`,{style:{position:`absolute`,left:c,top:l,width:o,height:s,border:`20px solid rgba(0, 0, 0, 0.2)`,pointerEvents:`none`}})]})})};var zS=[{targetId:`sidebar-area`,title:`Biblioteca de Blocos`,content:`Arraste ou clique nos blocos para adicionar ao layout. Aqui você também gerencia o conteúdo.`,position:`right`},{targetId:`canvas-area`,title:`Área de Criação`,content:`Seu espaço de trabalho. Mova, redimensione e organize os elementos livremente.`,position:`center`},{targetId:`preview-area`,title:`Visualização Real`,content:`Confira o resultado final com dados reais enquanto edita. O que você vê é o que será exportado.`,position:`left`},{targetId:`finish-button`,title:`Finalizar e Testar`,content:`Pronto? Clique aqui para testar com mais dados e exportar seu layout.`,position:`bottom`}];let BS=({isOpen:e,onClose:n})=>{let[i,a]=(0,t.useState)(0),[o,s]=(0,t.useState)(null);if((0,t.useEffect)(()=>{if(!e)return;let t=zS[i],n=document.getElementById(t.targetId);if(n){let e=n.getBoundingClientRect(),r=0,i=0;switch(t.position){case`right`:r=e.top+e.height/2-100,i=e.right+20;break;case`left`:r=e.top+e.height/2-100,i=e.left-320-20;break;case`bottom`:r=e.bottom+20,i=e.left+e.width/2-160;break;case`top`:r=e.top-200-20,i=e.left+e.width/2-160;break;case`center`:r=window.innerHeight/2-100,i=window.innerWidth/2-160;break}i<20&&(i=20),r<20&&(r=20),i+320>window.innerWidth&&(i=window.innerWidth-340),r+200>window.innerHeight&&(r=window.innerHeight-220),s({top:r,left:i})}else s({top:window.innerHeight/2-100,left:window.innerWidth/2-160})},[e,i]),!e||!o)return null;let c=zS[i],l=i===zS.length-1;return(0,r.jsx)(W,{style:{position:`fixed`,top:0,left:0,width:`100vw`,height:`100vh`,zIndex:9999,pointerEvents:`none`},children:(0,r.jsx)(Tv,{style:{position:`absolute`,top:o.top,left:o.left,width:320,pointerEvents:`auto`,boxShadow:`0 10px 30px rgba(0,0,0,0.2), 0 0 0 2px var(--accent-9)`,backgroundColor:`var(--color-panel-solid)`,transition:`all 0.3s ease-out`},children:(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,children:[(0,r.jsx)(p_,{size:`3`,color:`blue`,children:c.title}),(0,r.jsx)(K,{variant:`ghost`,color:`gray`,onClick:n,size:`1`,style:{cursor:`pointer`},children:(0,r.jsx)(Te,{})})]}),(0,r.jsx)(U,{size:`2`,color:`gray`,children:c.content}),(0,r.jsxs)(G,{justify:`between`,align:`center`,mt:`2`,children:[(0,r.jsxs)(U,{size:`1`,color:`gray`,children:[i+1,` de `,zS.length]}),(0,r.jsxs)(G,{gap:`2`,children:[i>0&&(0,r.jsx)(K,{variant:`soft`,color:`gray`,onClick:()=>a(e=>e-1),style:{cursor:`pointer`},children:`Voltar`}),(0,r.jsx)(K,{onClick:()=>{l?n():a(e=>e+1)},style:{cursor:`pointer`},children:l?`Entendi!`:`Próximo`})]})]})]})})})};var VS=(0,t.createContext)({});function HS(e){let n=(0,t.useRef)(null);return n.current===null&&(n.current=e()),n.current}var US=typeof window<`u`,WS=US?t.useLayoutEffect:t.useEffect,GS=(0,t.createContext)(null);function KS(e,t){e.indexOf(t)===-1&&e.push(t)}function qS(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var JS=(e,t,n)=>n>t?t:n<e?e:n;function YS(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var XS=()=>{},ZS=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(XS=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(YS(t,n))},ZS=(e,t,n)=>{if(!e)throw Error(YS(t,n))});var QS={},$S=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function eC(e){return typeof e==`object`&&!!e}var tC=e=>/^0[^.\s]+$/u.test(e);function nC(e){let t;return()=>(t===void 0&&(t=e()),t)}var rC=e=>e,iC=(e,t)=>n=>t(e(n)),aC=(...e)=>e.reduce(iC),oC=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},sC=class{constructor(){this.subscriptions=[]}add(e){return KS(this.subscriptions,e),()=>qS(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},cC=e=>e*1e3,lC=e=>e/1e3;function uC(e,t){return t?e*(1e3/t):0}var dC=new Set;function fC(e,t,n){e||dC.has(t)||(console.warn(YS(t,n)),dC.add(t))}var pC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mC=1e-7,hC=12;function gC(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=pC(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>mC&&++s<hC);return o}function _C(e,t,n,r){if(e===t&&n===r)return rC;let i=t=>gC(t,0,1,e,n);return e=>e===0||e===1?e:pC(i(e),t,r)}var vC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,yC=e=>t=>1-e(1-t),bC=_C(.33,1.53,.69,.99),xC=yC(bC),SC=vC(xC),CC=e=>(e*=2)<1?.5*xC(e):.5*(2-2**(-10*(e-1))),wC=e=>1-Math.sin(Math.acos(e)),TC=yC(wC),EC=vC(wC),DC=_C(.42,0,1,1),OC=_C(0,0,.58,1),kC=_C(.42,0,.58,1),AC=e=>Array.isArray(e)&&typeof e[0]!=`number`,jC=e=>Array.isArray(e)&&typeof e[0]==`number`,MC={linear:rC,easeIn:DC,easeInOut:kC,easeOut:OC,circIn:wC,circInOut:EC,circOut:TC,backIn:xC,backInOut:SC,backOut:bC,anticipate:CC},NC=e=>typeof e==`string`,PC=e=>{if(jC(e)){ZS(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return _C(t,n,r,i)}else if(NC(e))return ZS(MC[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),MC[e];return e},FC=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],IC={value:null,addProjectionMetrics:null};function LC(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&IC.value&&IC.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var RC=40;function zC(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=FC.reduce((e,n)=>(e[n]=LC(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=QS.useManualTiming?i.timestamp:performance.now();n=!1,QS.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,RC),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:FC.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<FC.length;t++)o[FC[t]].cancel(e)},state:i,steps:o}}var{schedule:BC,cancel:VC,state:HC,steps:UC}=zC(typeof requestAnimationFrame<`u`?requestAnimationFrame:rC,!0),WC;function GC(){WC=void 0}var KC={now:()=>(WC===void 0&&KC.set(HC.isProcessing||QS.useManualTiming?HC.timestamp:performance.now()),WC),set:e=>{WC=e,queueMicrotask(GC)}},qC={layout:0,mainThread:0,waapi:0},JC=e=>t=>typeof t==`string`&&t.startsWith(e),YC=JC(`--`),XC=JC(`var(--`),ZC=e=>XC(e)?QC.test(e.split(`/*`)[0].trim()):!1,QC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $C(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var ew={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},tw={...ew,transform:e=>JS(0,1,e)},nw={...ew,default:1},rw=e=>Math.round(e*1e5)/1e5,iw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function aw(e){return e==null}var ow=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,sw=(e,t)=>n=>!!(typeof n==`string`&&ow.test(n)&&n.startsWith(e)||t&&!aw(n)&&Object.prototype.hasOwnProperty.call(n,t)),cw=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(iw);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},lw=e=>JS(0,255,e),uw={...ew,transform:e=>Math.round(lw(e))},dw={test:sw(`rgb`,`red`),parse:cw(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+uw.transform(e)+`, `+uw.transform(t)+`, `+uw.transform(n)+`, `+rw(tw.transform(r))+`)`};function fw(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var pw={test:sw(`#`),parse:fw,transform:dw.transform},mw=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hw=mw(`deg`),gw=mw(`%`),Q=mw(`px`),_w=mw(`vh`),vw=mw(`vw`),yw=(()=>({...gw,parse:e=>gw.parse(e)/100,transform:e=>gw.transform(e*100)}))(),bw={test:sw(`hsl`,`hue`),parse:cw(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+gw.transform(rw(t))+`, `+gw.transform(rw(n))+`, `+rw(tw.transform(r))+`)`},xw={test:e=>dw.test(e)||pw.test(e)||bw.test(e),parse:e=>dw.test(e)?dw.parse(e):bw.test(e)?bw.parse(e):pw.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?dw.transform(e):bw.transform(e),getAnimatableNone:e=>{let t=xw.parse(e);return t.alpha=0,xw.transform(t)}},Sw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Cw(e){return isNaN(e)&&typeof e==`string`&&(e.match(iw)?.length||0)+(e.match(Sw)?.length||0)>0}var ww=`number`,Tw=`color`,Ew=`var`,Dw=`var(`,Ow="${}",kw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Aw(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(kw,e=>(xw.test(e)?(r.color.push(a),i.push(Tw),n.push(xw.parse(e))):e.startsWith(Dw)?(r.var.push(a),i.push(Ew),n.push(e)):(r.number.push(a),i.push(ww),n.push(parseFloat(e))),++a,Ow)).split(Ow),indexes:r,types:i}}function jw(e){return Aw(e).values}function Mw(e){let{split:t,types:n}=Aw(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===ww?i+=rw(e[a]):t===Tw?i+=xw.transform(e[a]):i+=e[a]}return i}}var Nw=e=>typeof e==`number`?0:xw.test(e)?xw.getAnimatableNone(e):e;function Pw(e){let t=jw(e);return Mw(e)(t.map(Nw))}var Fw={test:Cw,parse:jw,createTransformer:Mw,getAnimatableNone:Pw};function Iw(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Lw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Iw(s,r,e+1/3),a=Iw(s,r,e),o=Iw(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Rw(e,t){return n=>n>0?t:e}var zw=(e,t,n)=>e+(t-e)*n,Bw=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Vw=[pw,dw,bw],Hw=e=>Vw.find(t=>t.test(e));function Uw(e){let t=Hw(e);if(XS(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===bw&&(n=Lw(n)),n}var Ww=(e,t)=>{let n=Uw(e),r=Uw(t);if(!n||!r)return Rw(e,t);let i={...n};return e=>(i.red=Bw(n.red,r.red,e),i.green=Bw(n.green,r.green,e),i.blue=Bw(n.blue,r.blue,e),i.alpha=zw(n.alpha,r.alpha,e),dw.transform(i))},Gw=new Set([`none`,`hidden`]);function Kw(e,t){return Gw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qw(e,t){return n=>zw(e,t,n)}function Jw(e){return typeof e==`number`?qw:typeof e==`string`?ZC(e)?Rw:xw.test(e)?Ww:Qw:Array.isArray(e)?Yw:typeof e==`object`?xw.test(e)?Ww:Xw:Rw}function Yw(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Jw(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Xw(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Jw(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Zw(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Qw=(e,t)=>{let n=Fw.createTransformer(t),r=Aw(e),i=Aw(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Gw.has(e)&&!i.values.length||Gw.has(t)&&!r.values.length?Kw(e,t):aC(Yw(Zw(r,i),i.values),n):(XS(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Rw(e,t))};function $w(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?zw(e,t,n):Jw(e)(e,t)}var eT=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>BC.update(t,e),stop:()=>VC(t),now:()=>HC.isProcessing?HC.timestamp:KC.now()}},tT=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},nT=2e4;function rT(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function iT(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(rT(r),nT);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:lC(i)}}var aT=5;function oT(e,t,n){let r=Math.max(t-aT,0);return uC(n-e(r),t-r)}var sT={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},cT=.001;function lT({duration:e=sT.duration,bounce:t=sT.bounce,velocity:n=sT.velocity,mass:r=sT.mass}){let i,a;XS(e<=cC(sT.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=JS(sT.minDamping,sT.maxDamping,o),e=JS(sT.minDuration,sT.maxDuration,lC(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=fT(t,o),c=Math.exp(-i);return cT-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=fT(t**2,o);return(-i(t)+cT>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-cT+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=dT(i,a,s);if(e=cC(e),isNaN(c))return{stiffness:sT.stiffness,damping:sT.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var uT=12;function dT(e,t,n){let r=n;for(let n=1;n<uT;n++)r-=e(r)/t(r);return r}function fT(e,t){return e*Math.sqrt(1-t*t)}var pT=[`duration`,`bounce`],mT=[`stiffness`,`damping`,`mass`];function hT(e,t){return t.some(t=>e[t]!==void 0)}function gT(e){let t={velocity:sT.velocity,stiffness:sT.stiffness,damping:sT.damping,mass:sT.mass,isResolvedFromDuration:!1,...e};if(!hT(e,mT)&&hT(e,pT))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*JS(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:sT.mass,stiffness:i,damping:a}}else{let n=lT(e);t={...t,...n,mass:sT.mass},t.isResolvedFromDuration=!0}return t}function _T(e=sT.visualDuration,t=sT.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=gT({...n,velocity:-lC(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=lC(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?sT.restSpeed.granular:sT.restSpeed.default,i||=v?sT.restDelta.granular:sT.restDelta.default;let y;if(h<1){let e=fT(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?cC(m):oT(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(rT(b),nT),t=tT(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}_T.applyToOptions=e=>{let t=iT(e,100,_T);return e.ease=t.ease,e.duration=cC(t.duration),e.type=`keyframes`,e};function vT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=_T({keyframes:[f.value,m(f.value)],velocity:oT(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function yT(e,t,n){let r=[],i=n||QS.mix||$w,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=aC(Array.isArray(t)?t[n]||rC:t,a)),r.push(a)}return r}function bT(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(ZS(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=yT(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=oC(e[r],e[r+1],n);return s[r](i)};return n?t=>l(JS(e[0],e[a-1],t)):l}function xT(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=oC(0,t,r);e.push(zw(n,1,i))}}function ST(e){let t=[0];return xT(t,e.length-1),t}function CT(e,t){return e.map(e=>e*t)}function wT(e,t){return e.map(()=>t||kC).splice(0,e.length-1)}function TT({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=AC(r)?r.map(PC):PC(r),a={done:!1,value:t[0]},o=bT(CT(n&&n.length===t.length?n:ST(t),e),t,{ease:Array.isArray(i)?i:wT(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var ET=e=>e!==null;function DT(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(ET),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var OT={decay:vT,inertia:vT,tween:TT,keyframes:TT,spring:_T};function kT(e){typeof e.type==`string`&&(e.type=OT[e.type])}var AT=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},jT=e=>e/100,MT=class extends AT{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==KC.now()&&this.tick(KC.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},qC.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;kT(e);let{type:t=TT,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||TT;process.env.NODE_ENV!==`production`&&s!==TT&&ZS(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==TT&&typeof o[0]!=`number`&&(this.mixKeyframes=aC(jT,$w(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=rT(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=JS(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==vT&&(b.value=DT(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return lC(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+lC(e)}get time(){return lC(this.currentTime)}set time(e){e=cC(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(KC.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=lC(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=eT,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(KC.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,qC.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function NT(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var PT=e=>e*180/Math.PI,FT=e=>LT(PT(Math.atan2(e[1],e[0]))),IT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:FT,rotateZ:FT,skewX:e=>PT(Math.atan(e[1])),skewY:e=>PT(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},LT=e=>(e%=360,e<0&&(e+=360),e),RT=FT,zT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),BT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zT,scaleY:BT,scale:e=>(zT(e)+BT(e))/2,rotateX:e=>LT(PT(Math.atan2(e[6],e[5]))),rotateY:e=>LT(PT(Math.atan2(-e[2],e[0]))),rotateZ:RT,rotate:RT,skewX:e=>PT(Math.atan(e[4])),skewY:e=>PT(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function HT(e){return e.includes(`scale`)?1:0}function UT(e,t){if(!e||e===`none`)return HT(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=VT,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=IT,i=t}if(!i)return HT(t);let a=r[t],o=i[1].split(`,`).map(GT);return typeof a==`function`?a(o):o[a]}var WT=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return UT(n,t)};function GT(e){return parseFloat(e.trim())}var KT=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],qT=(()=>new Set(KT))(),JT=e=>e===ew||e===Q,YT=new Set([`x`,`y`,`z`]),XT=KT.filter(e=>!YT.has(e));function ZT(e){let t=[];return XT.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var QT={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UT(t,`x`),y:(e,{transform:t})=>UT(t,`y`)};QT.translateX=QT.x,QT.translateY=QT.y;var $T=new Set,eE=!1,tE=!1,nE=!1;function rE(){if(tE){let e=Array.from($T).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=ZT(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}tE=!1,eE=!1,$T.forEach(e=>e.complete(nE)),$T.clear()}function iE(){$T.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tE=!0)})}function aE(){nE=!0,iE(),rE(),nE=!1}var oE=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?($T.add(this),eE||(eE=!0,BC.read(iE),BC.resolveKeyframes(rE))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}NT(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),$T.delete(this)}cancel(){this.state===`scheduled`&&($T.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},sE=e=>e.startsWith(`--`);function cE(e,t,n){sE(t)?e.style.setProperty(t,n):e.style[t]=n}var lE=nC(()=>window.ScrollTimeline!==void 0),uE={};function dE(e,t){let n=nC(e);return()=>uE[t]??n()}var fE=dE(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),pE=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,mE={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:pE([0,.65,.55,1]),circOut:pE([.55,0,1,.45]),backIn:pE([.31,.01,.66,-.59]),backOut:pE([.33,1.53,.69,.99])};function hE(e,t){if(e)return typeof e==`function`?fE()?tT(e,t):`ease-out`:jC(e)?pE(e):Array.isArray(e)?e.map(e=>hE(e,t)||mE.easeOut):mE[e]}function gE(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=hE(s,i);Array.isArray(d)&&(u.easing=d),IC.value&&qC.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return IC.value&&p.finished.finally(()=>{qC.waapi--}),p}function _E(e){return typeof e==`function`&&`applyToOptions`in e}function vE({type:e,...t}){return _E(e)&&fE()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var yE=class extends AT{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,ZS(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=vE(e);this.animation=gE(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=DT(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):cE(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return lC(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+lC(e)}get time(){return lC(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=cC(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&lE()?(this.animation.timeline=e,rC):t(this)}},bE={anticipate:CC,backInOut:SC,circInOut:EC};function xE(e){return e in bE}function SE(e){typeof e.ease==`string`&&xE(e.ease)&&(e.ease=bE[e.ease])}var CE=10,wE=class extends yE{constructor(e){SE(e),kT(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new MT({...a,autoplay:!1}),s=Math.max(CE,KC.now()-this.startTime),c=JS(0,CE,s-CE);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},TE=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Fw.test(e)||e===`0`)&&!e.startsWith(`url(`));function EE(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DE(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=TE(i,t),s=TE(a,t);return XS(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:EE(e)||(n===`spring`||_E(n))&&r}function OE(e){e.duration=0,e.type=`keyframes`}var kE=new Set([`opacity`,`clipPath`,`filter`,`transform`]),AE=nC(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function jE(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return AE()&&n&&kE.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ME=40,NE=class extends AT{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=KC.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||oE)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=KC.now(),DE(e,i,a,o)||((QS.instantAnimations||!s)&&l?.(DT(e,n,t)),e[0]=e[e.length-1],OE(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ME?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&jE(u)?new wE({...u,element:u.motionValue.owner.current}):new MT(u);d.finished.then(()=>this.notifyFinished()).catch(rC),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),aE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},PE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FE(e){let t=PE.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var IE=4;function LE(e,t,n=1){ZS(n<=IE,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=FE(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return $S(e)?parseFloat(e):e}return ZC(i)?LE(i,t,n+1):i}function RE(e,t){return e?.[t]??e?.default??e}var zE=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...KT]),BE={test:e=>e===`auto`,parse:e=>e},VE=e=>t=>t.test(e),HE=[ew,Q,gw,hw,vw,_w,BE],UE=e=>HE.find(VE(e));function WE(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||tC(e)}var GE=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function KE(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(iw)||[];if(!r)return e;let i=n.replace(r,``),a=GE.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var qE=/\b([a-z-]*)\(.*?\)/gu,JE={...Fw,getAnimatableNone:e=>{let t=e.match(qE);return t?t.map(KE).join(` `):e}},YE={...ew,transform:Math.round},XE={borderWidth:Q,borderTopWidth:Q,borderRightWidth:Q,borderBottomWidth:Q,borderLeftWidth:Q,borderRadius:Q,radius:Q,borderTopLeftRadius:Q,borderTopRightRadius:Q,borderBottomRightRadius:Q,borderBottomLeftRadius:Q,width:Q,maxWidth:Q,height:Q,maxHeight:Q,top:Q,right:Q,bottom:Q,left:Q,inset:Q,insetBlock:Q,insetBlockStart:Q,insetBlockEnd:Q,insetInline:Q,insetInlineStart:Q,insetInlineEnd:Q,padding:Q,paddingTop:Q,paddingRight:Q,paddingBottom:Q,paddingLeft:Q,paddingBlock:Q,paddingBlockStart:Q,paddingBlockEnd:Q,paddingInline:Q,paddingInlineStart:Q,paddingInlineEnd:Q,margin:Q,marginTop:Q,marginRight:Q,marginBottom:Q,marginLeft:Q,marginBlock:Q,marginBlockStart:Q,marginBlockEnd:Q,marginInline:Q,marginInlineStart:Q,marginInlineEnd:Q,backgroundPositionX:Q,backgroundPositionY:Q,rotate:hw,rotateX:hw,rotateY:hw,rotateZ:hw,scale:nw,scaleX:nw,scaleY:nw,scaleZ:nw,skew:hw,skewX:hw,skewY:hw,distance:Q,translateX:Q,translateY:Q,translateZ:Q,x:Q,y:Q,z:Q,perspective:Q,transformPerspective:Q,opacity:tw,originX:yw,originY:yw,originZ:Q,zIndex:YE,fillOpacity:tw,strokeOpacity:tw,numOctaves:YE},ZE={...XE,color:xw,backgroundColor:xw,outlineColor:xw,fill:xw,stroke:xw,borderColor:xw,borderTopColor:xw,borderRightColor:xw,borderBottomColor:xw,borderLeftColor:xw,filter:JE,WebkitFilter:JE},QE=e=>ZE[e];function $E(e,t){let n=QE(e);return n!==JE&&(n=Fw),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var eD=new Set([`auto`,`none`,`0`]);function tD(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!eD.has(t)&&Aw(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=$E(n,i)}var nD=class extends oE{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),ZC(r))){let i=LE(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!zE.has(n)||e.length!==2)return;let[r,i]=e,a=UE(r),o=UE(i);if($C(r)!==$C(i)&&QT[n]){this.needsMeasurement=!0;return}if(a!==o)if(JT(a)&&JT(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else QT[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||WE(e[t]))&&n.push(t);n.length&&tD(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=QT[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=QT[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function rD(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}var iD=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function aD(e){return eC(e)&&`offsetHeight`in e}var oD=30,sD=e=>!isNaN(parseFloat(e)),cD={current:void 0},lD=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=KC.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=KC.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sD(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&fC(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new sC);let n=this.events[e].add(t);return e===`change`?()=>{n(),BC.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return cD.current&&cD.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=KC.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>oD)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,oD);return uC(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function uD(e,t){return new lD(e,t)}var{schedule:dD,cancel:fD}=zC(queueMicrotask,!1),pD={x:!1,y:!1};function mD(){return pD.x||pD.y}function hD(e){return e===`x`||e===`y`?pD[e]?null:(pD[e]=!0,()=>{pD[e]=!1}):pD.x||pD.y?null:(pD.x=pD.y=!0,()=>{pD.x=pD.y=!1})}function gD(e,t){let n=rD(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _D(e){return!(e.pointerType===`touch`||mD())}function vD(e,t,n={}){let[r,i,a]=gD(e,n),o=e=>{if(!_D(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{_D(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1,bD=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,xD=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function SD(e){return xD.has(e.tagName)||e.isContentEditable===!0}var CD=new WeakSet;function wD(e){return t=>{t.key===`Enter`&&e(t)}}function TD(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var ED=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=wD(()=>{if(CD.has(n))return;TD(n,`down`);let e=wD(()=>{TD(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>TD(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function DD(e){return bD(e)&&!mD()}function OD(e,t,n={}){let[r,i,a]=gD(e,n),o=e=>{let r=e.currentTarget;if(!DD(e))return;CD.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),CD.has(r)&&CD.delete(r),DD(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||yD(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),aD(e)&&(e.addEventListener(`focus`,e=>ED(e,i)),!SD(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function kD(e){return eC(e)&&`ownerSVGElement`in e}function AD(e){return kD(e)&&e.tagName===`svg`}var jD=e=>!!(e&&e.getVelocity),MD=[...HE,xw,Fw],ND=e=>MD.find(VE(e)),PD=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function FD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ID(...e){return t=>{let n=!1,r=e.map(e=>{let r=FD(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():FD(e[t],null)}}}}function LD(...e){return t.useCallback(ID(...e),e)}var RD=class extends t.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=aD(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}};function zD({children:e,isPresent:n,anchorX:i,root:a}){let o=(0,t.useId)(),s=(0,t.useRef)(null),c=(0,t.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=(0,t.useContext)(PD),u=LD(s,e.props?.ref??e?.ref);return(0,t.useInsertionEffect)(()=>{let{width:e,height:t,top:r,left:u,right:d}=c.current;if(n||!s.current||!e||!t)return;let f=i===`left`?`left: ${u}`:`right: ${d}`;s.current.dataset.motionPopId=o;let p=document.createElement(`style`);l&&(p.nonce=l);let m=a??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(`
49
49
  [data-motion-pop-id="${o}"] {
50
50
  position: absolute !important;
51
51
  width: ${e}px !important;
@@ -54,11 +54,11 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
54
54
  top: ${r}px !important;
55
55
  }
56
56
  `),()=>{m.contains(p)&&m.removeChild(p)}},[n]),(0,r.jsx)(RD,{isPresent:n,childRef:s,sizeRef:c,children:t.cloneElement(e,{ref:u})})}var BD=({children:e,initial:n,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:s,mode:c,anchorX:l,root:u})=>{let d=HS(VD),f=(0,t.useId)(),p=!0,m=(0,t.useMemo)(()=>(p=!1,{id:f,initial:n,isPresent:i,custom:o,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;a&&a()},register:e=>(d.set(e,!1),()=>d.delete(e))}),[i,d,a]);return s&&p&&(m={...m}),(0,t.useMemo)(()=>{d.forEach((e,t)=>d.set(t,!1))},[i]),t.useEffect(()=>{!i&&!d.size&&a&&a()},[i]),c===`popLayout`&&(e=(0,r.jsx)(zD,{isPresent:i,anchorX:l,root:u,children:e})),(0,r.jsx)(GS.Provider,{value:m,children:e})};function VD(){return new Map}function HD(e=!0){let n=(0,t.useContext)(GS);if(n===null)return[!0,null];let{isPresent:r,onExitComplete:i,register:a}=n,o=(0,t.useId)();(0,t.useEffect)(()=>{if(e)return a(o)},[e]);let s=(0,t.useCallback)(()=>e&&i&&i(o),[o,i,e]);return!r&&i?[!1,s]:[!0]}var UD=e=>e.key||``;function WD(e){let n=[];return t.Children.forEach(e,e=>{(0,t.isValidElement)(e)&&n.push(e)}),n}var GD=({children:e,custom:n,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s=`sync`,propagate:c=!1,anchorX:l=`left`,root:u})=>{let[d,f]=HD(c),p=(0,t.useMemo)(()=>WD(e),[e]),m=c&&!d?[]:p.map(UD),h=(0,t.useRef)(!0),g=(0,t.useRef)(p),_=HS(()=>new Map),v=(0,t.useRef)(new Set),[y,b]=(0,t.useState)(p),[x,S]=(0,t.useState)(p);WS(()=>{h.current=!1,g.current=p;for(let e=0;e<x.length;e++){let t=UD(x[e]);m.includes(t)?(_.delete(t),v.current.delete(t)):_.get(t)!==!0&&_.set(t,!1)}},[x,m.length,m.join(`-`)]);let C=[];if(p!==y){let e=[...p];for(let t=0;t<x.length;t++){let n=x[t],r=UD(n);m.includes(r)||(e.splice(t,0,n),C.push(n))}return s===`wait`&&C.length&&(e=C),S(WD(e)),b(p),null}process.env.NODE_ENV!==`production`&&s===`wait`&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:w}=(0,t.useContext)(VS);return(0,r.jsx)(r.Fragment,{children:x.map(e=>{let t=UD(e),y=c&&!d?!1:p===x||m.includes(t);return(0,r.jsx)(BD,{isPresent:y,initial:!h.current||i?void 0:!1,custom:n,presenceAffectsLayout:o,mode:s,root:u,onExitComplete:y?void 0:()=>{if(v.current.has(t))return;if(v.current.add(t),_.has(t))_.set(t,!0);else return;let e=!0;_.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(g.current),c&&f?.(),a&&a())},anchorX:l,children:e},t)})})},KD=(0,t.createContext)({strict:!1}),qD={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},JD={};for(let e in qD)JD[e]={isEnabled:t=>qD[e].some(e=>!!t[e])};function YD(e){for(let t in e)JD[t]={...JD[t],...e[t]}}var XD=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function ZD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||XD.has(e)}function QD(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $D=d((()=>{})),eO=p({default:()=>nO}),tO,nO,rO=d((()=>{$D(),tO=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,nO=QD(function(e){return tO.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),iO=e=>!ZD(e);function aO(e){typeof e==`function`&&(iO=t=>t.startsWith(`on`)?!ZD(t):e(t))}try{aO((rO(),g(eO)).default)}catch{}function oO(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(iO(i)||n===!0&&ZD(i)||!t&&!ZD(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var sO=(0,t.createContext)({});function cO(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function lO(e){return typeof e==`string`||Array.isArray(e)}var uO=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],dO=[`initial`,...uO];function fO(e){return cO(e.animate)||dO.some(t=>lO(e[t]))}function pO(e){return!!(fO(e)||e.variants)}function mO(e,t){if(fO(e)){let{initial:t,animate:n}=e;return{initial:t===!1||lO(t)?t:void 0,animate:lO(n)?n:void 0}}return e.inherit===!1?{}:t}function hO(e){let{initial:n,animate:r}=mO(e,(0,t.useContext)(sO));return(0,t.useMemo)(()=>({initial:n,animate:r}),[gO(n),gO(r)])}function gO(e){return Array.isArray(e)?e.join(` `):e}function _O(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var vO={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Q.test(e))e=parseFloat(e);else return e;return`${_O(e,t.target.x)}% ${_O(e,t.target.y)}%`}},yO={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Fw.parse(e);if(i.length>5)return r;let a=Fw.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=zw(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},bO={borderRadius:{...vO,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:vO,borderTopRightRadius:vO,borderBottomLeftRadius:vO,borderBottomRightRadius:vO,boxShadow:yO};function xO(e,{layout:t,layoutId:n}){return qT.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!bO[e]||e===`opacity`)}var SO={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},CO=KT.length;function wO(e,t,n){let r=``,i=!0;for(let a=0;a<CO;a++){let o=KT[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=iD(s,XE[o]);if(!c){i=!1;let t=SO[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function TO(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(qT.has(e)){o=!0;continue}else if(YC(e)){i[e]=n;continue}else{let t=iD(n,XE[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=wO(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var EO=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DO(e,t,n){for(let r in t)!jD(t[r])&&!xO(r,n)&&(e[r]=t[r])}function OO({transformTemplate:e},n){return(0,t.useMemo)(()=>{let t=EO();return TO(t,n,e),Object.assign({},t.vars,t.style)},[n])}function kO(e,t){let n=e.style||{},r={};return DO(r,n,e),Object.assign(r,OO(e,t)),r}function AO(e,t){let n={},r=kO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var jO={offset:`stroke-dashoffset`,array:`stroke-dasharray`},MO={offset:`strokeDashoffset`,array:`strokeDasharray`};function NO(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?jO:MO;e[a.offset]=Q.transform(-r);let o=Q.transform(t),s=Q.transform(n);e[a.array]=`${o} ${s}`}var PO=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function FO(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(TO(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of PO)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&NO(d,i,a,o,!1)}var IO=()=>({...EO(),attrs:{}}),LO=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function RO(e,n,r,i){let a=(0,t.useMemo)(()=>{let t=IO();return FO(t,n,LO(i),e.transformTemplate,e.style),{...t.attrs,style:{...t.style}}},[n]);if(e.style){let t={};DO(t,e.style,e),a.style={...t,...a.style}}return a}var zO=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function BO(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(zO.indexOf(e)>-1||/[A-Z]/u.test(e))}function VO(e,n,r,{latestValues:i},a,o=!1,s){let c=(s??BO(e)?RO:AO)(n,i,a,e),l=oO(n,typeof e==`string`,o),u=e===t.Fragment?{}:{...l,...c,ref:r},{children:d}=n,f=(0,t.useMemo)(()=>jD(d)?d.get():d,[d]);return(0,t.createElement)(e,{...u,children:f})}function HO(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function UO(e,t,n,r){if(typeof t==`function`){let[i,a]=HO(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=HO(r);t=t(n===void 0?e.custom:n,i,a)}return t}function WO(e){return jD(e)?e.get():e}function GO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:KO(n,r,i,e),renderState:t()}}function KO(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=WO(a[e]);let{initial:o,animate:s}=e,c=fO(e),l=pO(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!cO(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=UO(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var qO=e=>(n,r)=>{let i=(0,t.useContext)(sO),a=(0,t.useContext)(GS),o=()=>GO(e,n,i,a);return r?o():HS(o)};function JO(e,t,n){let{style:r}=e,i={};for(let a in r)(jD(r[a])||t.style&&jD(t.style[a])||xO(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}var YO=qO({scrapeMotionValuesFromProps:JO,createRenderState:EO});function XO(e,t,n){let r=JO(e,t,n);for(let n in e)if(jD(e[n])||jD(t[n])){let t=KT.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var ZO=qO({scrapeMotionValuesFromProps:XO,createRenderState:IO}),QO=Symbol.for(`motionComponentSymbol`);function $O(e,n,r){let i=(0,t.useRef)(r);(0,t.useInsertionEffect)(()=>{i.current=r});let a=(0,t.useRef)(null);return(0,t.useCallback)(t=>{t&&e.onMount?.(t),n&&(t?n.mount(t):n.unmount());let r=i.current;if(typeof r==`function`)if(t){let e=r(t);typeof e==`function`&&(a.current=e)}else a.current?(a.current(),a.current=null):r(t);else r&&(r.current=t)},[n])}var ek=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),tk=`data-`+ek(`framerAppearId`),nk=(0,t.createContext)({});function rk(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function ik(e,n,r,i,a,o){let{visualElement:s}=(0,t.useContext)(sO),c=(0,t.useContext)(KD),l=(0,t.useContext)(GS),u=(0,t.useContext)(PD).reducedMotion,d=(0,t.useRef)(null);i||=c.renderer,!d.current&&i&&(d.current=i(e,{visualState:n,parent:s,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,isSVG:o}));let f=d.current,p=(0,t.useContext)(nk);f&&!f.projection&&a&&(f.type===`html`||f.type===`svg`)&&ak(d.current,r,a,p);let m=(0,t.useRef)(!1);(0,t.useInsertionEffect)(()=>{f&&m.current&&f.update(r,l)});let h=r[tk],g=(0,t.useRef)(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return WS(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),g.current&&f.animationState&&f.animationState.animateChanges())}),(0,t.useEffect)(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),!1),f.enteringChildren=void 0)}),f}function ak(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:ok(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rk(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function ok(e){if(e)return e.options.allowProjection===!1?ok(e.parent):e.projection}function sk(e,{forwardMotionProps:n=!1,type:i}={},a,o){a&&YD(a);let s=i?i===`svg`:BO(e),c=s?ZO:YO;function l(i,l){let u,d={...(0,t.useContext)(PD),...i,layoutId:ck(i)},{isStatic:f}=d,p=hO(i),m=c(i,f);if(!f&&US){lk(d,a);let t=uk(d);u=t.MeasureLayout,p.visualElement=ik(e,m,d,o,t.ProjectionNode,s)}return(0,r.jsxs)(sO.Provider,{value:p,children:[u&&p.visualElement?(0,r.jsx)(u,{visualElement:p.visualElement,...d}):null,VO(e,i,$O(m,p.visualElement,l),m,f,n,s)]})}l.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let u=(0,t.forwardRef)(l);return u[QO]=e,u}function ck({layoutId:e}){let n=(0,t.useContext)(VS).id;return n&&e!==void 0?n+`-`+e:e}function lk(e,n){let r=(0,t.useContext)(KD).strict;if(process.env.NODE_ENV!==`production`&&n&&r){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?XS(!1,t,`lazy-strict-mode`):ZS(!1,t,`lazy-strict-mode`)}}function uk(e){let{drag:t,layout:n}=JD;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function dk(e,t){if(typeof Proxy>`u`)return sk;let n=new Map,r=(n,r)=>sk(n,r,e,t);return new Proxy((e,t)=>(process.env.NODE_ENV!==`production`&&fC(!1,`motion() is deprecated. Use motion.create() instead.`),r(e,t)),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,sk(a,void 0,e,t)),n.get(a))})}function fk({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pk({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mk(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function hk(e){return e===void 0||e===1}function gk({scale:e,scaleX:t,scaleY:n}){return!hk(e)||!hk(t)||!hk(n)}function _k(e){return gk(e)||vk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vk(e){return yk(e.x)||yk(e.y)}function yk(e){return e&&e!==`0%`}function bk(e,t,n){return n+t*(e-n)}function xk(e,t,n,r,i){return i!==void 0&&(e=bk(e,i,r)),bk(e,n,r)+t}function Sk(e,t=0,n=1,r,i){e.min=xk(e.min,t,n,r,i),e.max=xk(e.max,t,n,r,i)}function Ck(e,{x:t,y:n}){Sk(e.x,t.translate,t.scale,t.originPoint),Sk(e.y,n.translate,n.scale,n.originPoint)}var wk=.999999999999,Tk=1.0000000000001;function Ek(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&kk(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ck(e,o)),r&&_k(a.latestValues)&&kk(e,a.latestValues))}t.x<Tk&&t.x>wk&&(t.x=1),t.y<Tk&&t.y>wk&&(t.y=1)}function Dk(e,t){e.min+=t,e.max+=t}function Ok(e,t,n,r,i=.5){Sk(e,t,n,zw(e.min,e.max,i),r)}function kk(e,t){Ok(e.x,t.x,t.scaleX,t.scale,t.originX),Ok(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ak(e,t){return fk(mk(e.getBoundingClientRect(),t))}function jk(e,t,n){let r=Ak(e,n),{scroll:i}=t;return i&&(Dk(r.x,i.offset.x),Dk(r.y,i.offset.y)),r}var Mk=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nk=()=>({x:Mk(),y:Mk()}),Pk=()=>({min:0,max:0}),Fk=()=>({x:Pk(),y:Pk()}),Ik={current:null},Lk={current:!1};function Rk(){if(Lk.current=!0,US)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Ik.current=e.matches;e.addEventListener(`change`,t),t()}else Ik.current=!1}var zk=new WeakMap;function Bk(e,t,n){for(let r in t){let i=t[r],a=n[r];if(jD(i))e.addValue(r,i);else if(jD(a))e.addValue(r,uD(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,uD(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Vk=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Hk=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=oE,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=KC.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,BC.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=fO(t),this.isVariantNode=pO(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&jD(t)&&t.set(s[e])}}mount(e){this.current=e,zk.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Lk.current||Rk(),this.shouldReduceMotion=Ik.current),process.env.NODE_ENV!==`production`&&fC(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),VC(this.notifyUpdate),VC(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=qT.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&BC.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in JD){let t=JD[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fk()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Vk.length;t++){let n=Vk[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Bk(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=uD(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&($S(n)||tC(n))?n=parseFloat(n):!ND(n)&&Fw.test(t)&&(n=$E(e,t)),this.setBaseTarget(e,jD(n)?n.get():n)),jD(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=UO(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!jD(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new sC),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){dD.render(this.render)}},Uk=class extends Hk{constructor(){super(...arguments),this.KeyframeResolver=nD}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;jD(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Wk(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Gk(e){return window.getComputedStyle(e)}var Kk=class extends Uk{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Wk}readValueFromInstance(e,t){if(qT.has(t))return this.projection?.isProjecting?HT(t):WT(e,t);{let n=Gk(e),r=(YC(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ak(e,t)}build(e,t,n){TO(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return JO(e,t,n)}},qk=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function Jk(e,t,n,r){for(let n in Wk(e,t,void 0,r),t.attrs)e.setAttribute(qk.has(n)?n:ek(n),t.attrs[n])}var Yk=class extends Uk{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Fk}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(qT.has(t)){let e=QE(t);return e&&e.default||0}return t=qk.has(t)?t:ek(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return XO(e,t,n)}build(e,t,n){FO(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Jk(e,t,n,r)}mount(e){this.isSVGTag=LO(e.tagName),super.mount(e)}},Xk=(e,n)=>n.isSVG??BO(e)?new Yk(n):new Kk(n,{allowProjection:e!==t.Fragment});function Zk(e,t,n){let r=e.getProps();return UO(r,t,n===void 0?r.custom:n,e)}var Qk=e=>Array.isArray(e);function $k(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uD(n))}function eA(e){return Qk(e)?e[e.length-1]||0:e}function tA(e,t){let{transitionEnd:n={},transition:r={},...i}=Zk(e,t)||{};for(let t in i={...i,...n},i)$k(e,t,eA(i[t]))}function nA(e){return!!(jD(e)&&e.add)}function rA(e,t){let n=e.getValue(`willChange`);if(nA(n))return n.add(t);if(!n&&QS.WillChange){let n=new QS.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function iA(e){return e.props[tk]}var aA=e=>e!==null;function oA(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(aA),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var sA={type:`spring`,stiffness:500,damping:25,restSpeed:10},cA=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lA={type:`keyframes`,duration:.8},uA={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},dA=(e,{keyframes:t})=>t.length>2?lA:qT.has(e)?e.startsWith(`scale`)?cA(t[1]):sA:uA;function fA({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var pA=(e,t,n,r={},i,a)=>o=>{let s=RE(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=cC(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};fA(s)||Object.assign(u,dA(e,u)),u.duration&&=cC(u.duration),u.repeatDelay&&=cC(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(OE(u),u.delay===0&&(d=!0)),(QS.instantAnimations||QS.skipAnimations)&&(d=!0,OE(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=oA(u.keyframes,s);if(e!==void 0){BC.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new MT(u):new NE(u)};function mA({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hA(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&mA(l,t))continue;let o={delay:n,...RE(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=iA(e);if(n){let e=window.MotionHandoffAnimation(n,t,BC);e!==null&&(o.startTime=e,d=!0)}}rA(e,t),r.start(pA(t,r,i,e.shouldReduceMotion&&zE.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{BC.update(()=>{o&&tA(e,o)})}),c}function gA(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function _A(e,t,n={}){let r=Zk(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(hA(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return vA(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function vA(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(_A(c,t,{...o,delay:n+(typeof r==`function`?0:r)+gA(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function yA(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>_A(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=_A(e,t,n);else{let i=typeof t==`function`?Zk(e,t,n.custom):t;r=Promise.all(hA(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function bA(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var xA=dO.length;function SA(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&SA(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<xA;n++){let r=dO[n],i=e.props[r];(lO(i)||i===!1)&&(t[r]=i)}return t}var CA=[...uO].reverse(),wA=uO.length;function TA(e){return t=>Promise.all(t.map(({animation:t,options:n})=>yA(e,t,n)))}function EA(e){let t=TA(e),n=kA(),r=!0,i=t=>(n,r)=>{let i=Zk(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=SA(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<wA;t++){let f=CA[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=lO(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||cO(m)||typeof m==`boolean`)continue;let v=DA(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Qk(t)&&Qk(n)?!bA(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let E=_&&v;y&&(!E||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Zk(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=gA(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Zk(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=kA()}}}function DA(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!bA(t,e):!1}function OA(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kA(){return{animate:OA(!0),whileInView:OA(),whileHover:OA(),whileTap:OA(),whileDrag:OA(),whileFocus:OA(),exit:OA()}}var AA=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},jA=class extends AA{constructor(e){super(e),e.animationState||=EA(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();cO(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},MA=0,NA={animation:{Feature:jA},exit:{Feature:class extends AA{constructor(){super(...arguments),this.id=MA++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function PA(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function FA(e){return{point:{x:e.pageX,y:e.pageY}}}var IA=e=>t=>bD(t)&&e(t,FA(t));function LA(e,t,n,r){return PA(e,t,IA(n),r)}var RA=1e-4,zA=1-RA,BA=1+RA,VA=.01,HA=0-VA,UA=0+VA;function WA(e){return e.max-e.min}function GA(e,t,n){return Math.abs(e-t)<=n}function KA(e,t,n,r=.5){e.origin=r,e.originPoint=zw(t.min,t.max,e.origin),e.scale=WA(n)/WA(t),e.translate=zw(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zA&&e.scale<=BA||isNaN(e.scale))&&(e.scale=1),(e.translate>=HA&&e.translate<=UA||isNaN(e.translate))&&(e.translate=0)}function qA(e,t,n,r){KA(e.x,t.x,n.x,r?r.originX:void 0),KA(e.y,t.y,n.y,r?r.originY:void 0)}function JA(e,t,n){e.min=n.min+t.min,e.max=e.min+WA(t)}function YA(e,t,n){JA(e.x,t.x,n.x),JA(e.y,t.y,n.y)}function XA(e,t,n){e.min=t.min-n.min,e.max=e.min+WA(t)}function ZA(e,t,n){XA(e.x,t.x,n.x),XA(e.y,t.y,n.y)}function QA(e){return[e(`x`),e(`y`)]}var $A=({current:e})=>e?e.ownerDocument.defaultView:null,ej=(e,t)=>Math.abs(e-t);function tj(e,t){let n=ej(e.x,t.x),r=ej(e.y,t.y);return Math.sqrt(n**2+r**2)}var nj=new Set([`auto`,`scroll`]),rj=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=oj(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=tj(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=HC;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=ij(t,this.transformPagePoint),BC.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=oj(e.type===`pointercancel`?this.lastMoveEventInfo:ij(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!bD(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=ij(FA(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=HC;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,oj(s,this.history)),this.removeListeners=aC(LA(this.contextWindow,`pointermove`,this.handlePointerMove),LA(this.contextWindow,`pointerup`,this.handlePointerUp),LA(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(nj.has(e.overflowX)||nj.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener(`scroll`,this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),BC.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),VC(this.updatePoint)}};function ij(e,t){return t?{point:t(e.point)}:e}function aj(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oj({point:e},t){return{point:e,delta:aj(e,cj(t)),offset:aj(e,sj(t)),velocity:lj(t,.1)}}function sj(e){return e[0]}function cj(e){return e[e.length-1]}function lj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=cj(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>cC(t)));)n--;if(!r)return{x:0,y:0};let a=lC(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function uj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?zw(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?zw(n,e,r.max):Math.min(e,n)),e}function dj(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function fj(e,{top:t,left:n,bottom:r,right:i}){return{x:dj(e.x,n,i),y:dj(e.y,t,r)}}function pj(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function mj(e,t){return{x:pj(e.x,t.x),y:pj(e.y,t.y)}}function hj(e,t){let n=.5,r=WA(e),i=WA(t);return i>r?n=oC(t.min,t.max-r,e.min):r>i&&(n=oC(e.min,e.max-i,t.min)),JS(0,1,n)}function gj(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _j=.35;function vj(e=_j){return e===!1?e=0:e===!0&&(e=_j),{x:yj(e,`left`,`right`),y:yj(e,`top`,`bottom`)}}function yj(e,t,n){return{min:bj(e,t),max:bj(e,n)}}function bj(e,t){return typeof e==`number`?e:e[t]||0}var xj=new WeakMap,Sj=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fk(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t?(this.stopAnimation(),this.snapToCursor(FA(e).point)):this.pauseAnimation()},a=(e,t)=>{this.stopAnimation();let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=hD(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),QA(e=>{let t=this.getAxisMotionValue(e).get()||0;if(gw.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=WA(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&BC.postRender(()=>i(e,t)),rA(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=wj(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>QA(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new rj(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$A(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&BC.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Cj(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=uj(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&rk(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=fj(n.layoutBox,e):this.constraints=!1,this.elastic=vj(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&QA(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=gj(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!rk(e))return!1;let n=e.current;ZS(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=jk(n,r.root,this.visualElement.getTransformPagePoint()),a=mj(r.layout.layoutBox,i);if(t){let e=t(pk(a));this.hasMutatedConstraints=!!e,e&&(a=fk(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=QA(o=>{if(!Cj(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return rA(this.visualElement,e),n.start(pA(e,n,0,t,this.visualElement,!1))}stopAnimation(){QA(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){QA(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){QA(t=>{let{drag:n}=this.getProps();if(!Cj(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-zw(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!rk(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};QA(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=hj({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),QA(t=>{if(!Cj(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(zw(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;xj.set(this.visualElement,this);let e=this.visualElement.current,t=LA(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&!SD(e.target)&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();rk(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),BC.read(n);let a=PA(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(QA(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_j,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Cj(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wj(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Tj=class extends AA{constructor(e){super(e),this.removeGroupControls=rC,this.removeListeners=rC,this.controls=new Sj(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rC}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}},Ej=e=>(t,n)=>{e&&BC.postRender(()=>e(t,n))},Dj=class extends AA{constructor(){super(...arguments),this.removePointerDownListener=rC}onPointerDown(e){this.session=new rj(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$A(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ej(e),onStart:Ej(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&BC.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=LA(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Oj={hasAnimatedSinceResize:!0,hasEverUpdated:!1},kj=!1,Aj=class extends t.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),kj&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Oj.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,kj=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||BC.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),dD.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;kj=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function jj(e){let[n,i]=HD(),a=(0,t.useContext)(VS);return(0,r.jsx)(Aj,{...e,layoutGroup:a,switchLayoutGroup:(0,t.useContext)(nk),isPresent:n,safeToRemove:i})}function Mj(e,t,n){let r=jD(e)?e:uD(e);return r.start(pA(``,r,t,n)),r.animation}var Nj=(e,t)=>e.depth-t.depth,Pj=class{constructor(){this.children=[],this.isDirty=!1}add(e){KS(this.children,e),this.isDirty=!0}remove(e){qS(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Nj),this.isDirty=!1,this.children.forEach(e)}};function Fj(e,t){let n=KC.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(VC(r),e(a-t))};return BC.setup(r,!0),()=>VC(r)}var Ij=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Lj=Ij.length,Rj=e=>typeof e==`string`?parseFloat(e):e,zj=e=>typeof e==`number`||Q.test(e);function Bj(e,t,n,r,i,a){i?(e.opacity=zw(0,n.opacity??1,Hj(r)),e.opacityExit=zw(t.opacity??1,0,Uj(r))):a&&(e.opacity=zw(t.opacity??1,n.opacity??1,r));for(let i=0;i<Lj;i++){let a=`border${Ij[i]}Radius`,o=Vj(t,a),s=Vj(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||zj(o)===zj(s)?(e[a]=Math.max(zw(Rj(o),Rj(s),r),0),(gw.test(s)||gw.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=zw(t.rotate||0,n.rotate||0,r))}function Vj(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Hj=Wj(0,.5,TC),Uj=Wj(.5,.95,rC);function Wj(e,t,n){return r=>r<e?0:r>t?1:n(oC(e,t,r))}function Gj(e,t){e.min=t.min,e.max=t.max}function Kj(e,t){Gj(e.x,t.x),Gj(e.y,t.y)}function qj(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Jj(e,t,n,r,i){return e-=t,e=bk(e,1/n,r),i!==void 0&&(e=bk(e,1/i,r)),e}function Yj(e,t=0,n=1,r=.5,i,a=e,o=e){if(gw.test(t)&&(t=parseFloat(t),t=zw(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=zw(a.min,a.max,r);e===a&&(s-=t),e.min=Jj(e.min,t,n,s,i),e.max=Jj(e.max,t,n,s,i)}function Xj(e,t,[n,r,i],a,o){Yj(e,t[n],t[r],t[i],t.scale,a,o)}var Zj=[`x`,`scaleX`,`originX`],Qj=[`y`,`scaleY`,`originY`];function $j(e,t,n,r){Xj(e.x,t,Zj,n?n.x:void 0,r?r.x:void 0),Xj(e.y,t,Qj,n?n.y:void 0,r?r.y:void 0)}function eM(e){return e.translate===0&&e.scale===1}function tM(e){return eM(e.x)&&eM(e.y)}function nM(e,t){return e.min===t.min&&e.max===t.max}function rM(e,t){return nM(e.x,t.x)&&nM(e.y,t.y)}function iM(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function aM(e,t){return iM(e.x,t.x)&&iM(e.y,t.y)}function oM(e){return WA(e.x)/WA(e.y)}function sM(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var cM=class{constructor(){this.members=[]}add(e){KS(this.members,e),e.scheduleRender()}remove(e){if(qS(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function lM(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var uM={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},dM=[``,`X`,`Y`,`Z`],fM=1e3,pM=0;function mM(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hM(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=iA(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,BC,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hM(r)}function gM({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=pM++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,IC.value&&(uM.nodes=uM.calculatedTargetDeltas=uM.calculatedProjections=0),this.nodes.forEach(yM),this.nodes.forEach(EM),this.nodes.forEach(DM),this.nodes.forEach(bM),IC.addProjectionMetrics&&IC.addProjectionMetrics(uM)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Pj)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new sC),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=kD(t)&&!AD(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;BC.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Fj(i,250),Oj.hasAnimatedSinceResize&&(Oj.hasAnimatedSinceResize=!1,this.nodes.forEach(TM)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||PM,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!aM(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...RE(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||TM(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),VC(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(OM),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hM(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(SM);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(CM);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wM),this.nodes.forEach(_M),this.nodes.forEach(vM)):this.nodes.forEach(CM),this.clearAllSnapshots();let e=KC.now();HC.delta=JS(0,1e3/60,e-HC.timestamp),HC.timestamp=e,HC.isProcessing=!0,UC.update.process(HC),UC.preRender.process(HC),UC.render.process(HC),HC.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dD.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xM),this.sharedNodes.forEach(kM)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,BC.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){BC.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!WA(this.snapshot.measuredBox.x)&&!WA(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Fk(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!tM(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||_k(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),RM(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Fk();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(BM))){let{scroll:e}=this.root;e&&(Dk(t.x,e.offset.x),Dk(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Fk();if(Kj(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Kj(t,e),Dk(t.x,i.offset.x),Dk(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Fk();Kj(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&kk(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),_k(r.latestValues)&&kk(n,r.latestValues)}return _k(this.latestValues)&&kk(n,this.latestValues),n}removeTransform(e){let t=Fk();Kj(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!_k(n.latestValues))continue;gk(n.latestValues)&&n.updateSnapshot();let r=Fk();Kj(r,n.measurePageBox()),$j(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return _k(this.latestValues)&&$j(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==HC.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=HC.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Fk(),this.targetWithTransforms=Fk()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YA(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Kj(this.target,this.layout.layoutBox),Ck(this.target,this.targetDelta)):Kj(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),IC.value&&uM.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||gk(this.parent.latestValues)||vk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fk(),this.relativeTargetOrigin=Fk(),ZA(this.relativeTargetOrigin,t,n),Kj(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===HC.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Kj(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ek(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Fk());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qj(this.prevProjectionDelta.x,this.projectionDelta.x),qj(this.prevProjectionDelta.y,this.projectionDelta.y)),qA(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!sM(this.projectionDelta.x,this.prevProjectionDelta.x)||!sM(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),IC.value&&uM.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Nk(),this.projectionDelta=Nk(),this.projectionDeltaWithTransform=Nk()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Nk();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Fk(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(NM));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;AM(a.x,e.x,n),AM(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ZA(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MM(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&rM(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Fk(),Kj(d,this.relativeTarget)),s&&(this.animationValues=i,Bj(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(VC(this.pendingAnimation),void 0),this.pendingAnimation=BC.update(()=>{Oj.hasAnimatedSinceResize=!0,qC.layout++,this.motionValue||=uD(0),this.currentAnimation=Mj(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{qC.layout--},onComplete:()=>{qC.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fM),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&zM(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Fk();let t=WA(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=WA(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Kj(t,n),kk(t,i),qA(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new cM),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&mM(`z`,e,r,this.animationValues);for(let t=0;t<dM.length;t++)mM(`rotate${dM[t]}`,e,r,this.animationValues),mM(`skew${dM[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=WO(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=WO(t?.pointerEvents)||``),this.hasProjected&&!_k(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=lM(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;for(let t in e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit,bO){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=bO[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?WO(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(SM),this.root.sharedNodes.clear()}}}function _M(e){e.updateLayout()}function vM(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?QA(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=WA(r);r.min=n[e].min,r.max=r.min+i}):zM(i,t.layoutBox,n)&&QA(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=WA(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Nk();qA(o,n,t.layoutBox);let s=Nk();a?qA(s,e.applyTransform(r,!0),t.measuredBox):qA(s,n,t.layoutBox);let c=!tM(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Fk();ZA(o,t.layoutBox,i.layoutBox);let s=Fk();ZA(s,n,a.layoutBox),aM(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function yM(e){IC.value&&uM.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function bM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xM(e){e.clearSnapshot()}function SM(e){e.clearMeasurements()}function CM(e){e.isLayoutDirty=!1}function wM(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function TM(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function EM(e){e.resolveTargetDelta()}function DM(e){e.calcProjection()}function OM(e){e.resetSkewAndRotation()}function kM(e){e.removeLeadSnapshot()}function AM(e,t,n){e.translate=zw(t.translate,0,n),e.scale=zw(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function jM(e,t,n,r){e.min=zw(t.min,n.min,r),e.max=zw(t.max,n.max,r)}function MM(e,t,n,r){jM(e.x,t.x,n.x,r),jM(e.y,t.y,n.y,r)}function NM(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var PM={duration:.45,ease:[.4,0,.1,1]},FM=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),IM=FM(`applewebkit/`)&&!FM(`chrome/`)?Math.round:rC;function LM(e){e.min=IM(e.min),e.max=IM(e.max)}function RM(e){LM(e.x),LM(e.y)}function zM(e,t,n){return e===`position`||e===`preserve-aspect`&&!GA(oM(t),oM(n),.2)}function BM(e){return e!==e.root&&e.scroll?.wasRoot}var VM=gM({attachResizeListener:(e,t)=>PA(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),HM={current:void 0},UM=gM({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!HM.current){let e=new VM({});e.mount(window),e.setOptions({layoutScroll:!0}),HM.current=e}return HM.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),WM={pan:{Feature:Dj},drag:{Feature:Tj,ProjectionNode:UM,MeasureLayout:jj}};function GM(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&BC.postRender(()=>i(t,FA(t)))}var KM=class extends AA{mount(){let{current:e}=this.node;e&&(this.unmount=vD(e,(e,t)=>(GM(this.node,t,`Start`),e=>GM(this.node,e,`End`))))}unmount(){}},qM=class extends AA{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=aC(PA(this.node.current,`focus`,()=>this.onFocus()),PA(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function JM(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&BC.postRender(()=>i(t,FA(t)))}var YM=class extends AA{mount(){let{current:e}=this.node;e&&(this.unmount=OD(e,(e,t)=>(JM(this.node,t,`Start`),(e,{success:t})=>JM(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},XM=new WeakMap,ZM=new WeakMap,QM=e=>{let t=XM.get(e.target);t&&t(e)},$M=e=>{e.forEach(QM)};function eN({root:e,...t}){let n=e||document;ZM.has(n)||ZM.set(n,{});let r=ZM.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver($M,{root:e,...t})),r[i]}function tN(e,t,n){let r=eN(t);return XM.set(e,n),r.observe(e),()=>{XM.delete(e),r.unobserve(e)}}var nN={some:0,all:1},rN=class extends AA{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:nN[r]};return tN(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(iN(e,t))&&this.startObserver()}unmount(){}};function iN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var aN={inView:{Feature:rN},tap:{Feature:YM},focus:{Feature:qM},hover:{Feature:KM}},oN={layout:{ProjectionNode:UM,MeasureLayout:jj}},sN=dk({...NA,...aN,...WM,...oN},Xk),cN=(e,t)=>{if(e.id===t.id)return!1;let n=.1;return e.x>=t.x-n&&e.x+e.width<=t.x+t.width+n&&e.y>=t.y-n&&e.y+e.height<=t.y+t.height+n},lN=(e,t,n,r,i=1.2)=>{if(!e)return 0;let a=document.createElement(`canvas`).getContext(`2d`);if(!a)return 0;a.font=`${r}px ${n}`;let o=e.split(` `),s=``,c=1;for(let e=0;e<o.length;e++){let n=s+o[e]+` `;a.measureText(n).width>t&&e>0?(s=o[e]+` `,c++):s=n}let l=e.split(`
57
- `).length-1;return c+=l,Math.ceil(c*r*i)};let uN=(e,t)=>{let n=e.map(e=>({...e})),r=new Map(e.map(e=>[e.id,e])),i=[];n.forEach(e=>{let a=e.type===`text`,o=e.type===`text-container`;if((a||o)&&e.autoGrow){let a=e.content;t&&(a=a.replace(/\{\{(.*?)\}\}/g,(n,r)=>{let i=t[r.trim()];return i==null?n:e.formatting?jS(i,e.formatting):String(i)}));let s=parseInt(String(e.style?.fontSize||16)),c=String(e.style?.fontFamily||`Arial`);if(o&&e.containerExpansion===`horizontal`){let t=document.createElement(`canvas`).getContext(`2d`);if(t){t.font=`${s}px ${c}`;let n=t.measureText(a),r=Math.ceil(n.width+parseInt(String(e.style?.padding||0))*2);Math.abs(r-e.width)>1&&(e.width=r,e.content=a)}}else{let t=lN(a,e.width,c,s),o=e.height,l=t-o;if(Math.abs(l)>1){e.height=t,e.content=a;let s=[],c=r.get(e.id);c&&n.forEach(t=>{if(t.id===e.id)return;let n=r.get(t.id);n&&cN(c,n)&&s.push(t)});let u=new Set([e.id]);s.forEach(e=>{e.height+=l,u.add(e.id)}),i.push({triggerY:e.y+o,delta:l,ignoreIds:u})}}}}),n.forEach(e=>{let t=r.get(e.id);if(!t)return;let n=0;i.forEach(r=>{r.ignoreIds.has(e.id)||t.y>=r.triggerY-.1&&(n+=r.delta)}),e.y+=n});let a=0;return n.forEach(e=>{let t=e.y+e.height;t>a&&(a=t)}),{elements:n,totalHeight:a}};var dN=e=>{switch(e){case`linear`:return`linear`;case`ease-in`:return`easeIn`;case`ease-out`:return`easeOut`;case`ease-in-out`:return`easeInOut`;case`bounce`:return`easeOut`;case`ease`:return`easeInOut`;default:return`easeOut`}},fN=e=>{if(!e||e.type===`none`)return{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1}};let t={initial:{},animate:{}};switch(e.type){case`fadeIn`:t.initial={opacity:0},t.animate={opacity:1};break;case`slideInLeft`:t.initial={opacity:0,x:-100},t.animate={opacity:1,x:0};break;case`slideInRight`:t.initial={opacity:0,x:100},t.animate={opacity:1,x:0};break;case`slideInUp`:t.initial={opacity:0,y:100},t.animate={opacity:1,y:0};break;case`slideInDown`:t.initial={opacity:0,y:-100},t.animate={opacity:1,y:0};break;case`zoomIn`:t.initial={opacity:0,scale:.5},t.animate={opacity:1,scale:1};break;case`bounceIn`:t.initial={opacity:0,scale:.3},t.animate={opacity:1,scale:1,transition:{type:`spring`,bounce:.6}};break;case`smoothSlideUp`:t.initial={opacity:0,y:30},t.animate={opacity:1,y:0};break;case`popIn`:t.initial={opacity:0,scale:.8,y:10},t.animate={opacity:1,scale:1,y:0};break;case`blurIn`:t.initial={opacity:0,filter:`blur(10px)`},t.animate={opacity:1,filter:`blur(0px)`};break;case`pulse`:t.animate={scale:[1,1.05,1]};break;case`shake`:t.animate={x:[0,-5,5,-5,5,0]};break;case`spin`:t.animate={rotate:360};break;default:t.initial={opacity:0,y:20},t.animate={opacity:1,y:0}}return t},pN=(e,t)=>{let n={duration:e?.duration||.4,ease:dN(e?.timingFunction),delay:e?.delay||0},r;e?.iterationCount===`infinite`?r=1/0:typeof e?.iterationCount==`number`&&e.iterationCount>1&&(r=e.iterationCount-1);let i=t?.animate?.transition;return i?{...n,...i,delay:n.delay,repeat:r??i.repeat}:r===void 0?n:{...n,repeat:r}},mN=({element:e,offsetY:n=0,dataContext:i,onSelect:a,isSelected:o})=>{let s=e.content;if(i){if(e.type===`text`||e.type===`text-container`)s=s.replace(/\{\{(.*?)\}\}/g,(t,n)=>{let r=i[n.trim()];return r==null?t:e.formatting?jS(r,e.formatting):String(r)});else if(e.type===`image`)if(e.dataBinding){let t=i[e.dataBinding];t!=null&&(s=String(t))}else s=s.replace(/\{\{(.*?)\}\}/g,(e,t)=>{let n=i[t.trim()];return n==null?e:String(n)})}let c={position:`absolute`,left:e.x,top:e.y+n,width:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`max-content`:`${e.width}px`,height:e.autoGrow?`auto`:`${e.height}px`,transform:e.rotation?`rotate(${e.rotation}deg)`:void 0,padding:e.type===`image`||e.type===`text`||e.type===`text-container`?0:`8px`,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,outline:o?`2px solid var(--blue-9)`:void 0,zIndex:o?10:void 0,cursor:a?`pointer`:void 0,...e.style},l=e.animation&&e.animation.type!==`none`,u=t.default.useMemo(()=>l?fN(e.animation):null,[e.animation,l]),d=t.default.useMemo(()=>pN(e.animation,u),[e.animation,u]),f=(0,r.jsxs)(r.Fragment,{children:[(e.type===`text`||e.type===`text-container`)&&(0,r.jsx)(H,{style:{width:`100%`,height:`100%`,display:`block`},children:s}),e.type===`image`&&(s&&MS(s)?(0,r.jsx)(`img`,{src:s,alt:`Element`,style:{width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`}}):(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,backgroundColor:`#eee`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(H,{size:`1`,children:s?`URL inválida`:`Imagem`})})),e.type===`box`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`}}),e.type===`checkbox`&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(`input`,{type:`checkbox`,checked:i&&e.dataBinding?i[e.dataBinding]===!0||String(i[e.dataBinding])===`true`:!1,readOnly:!0,style:{width:`100%`,height:`100%`,margin:0}})})]});return l&&u?(0,r.jsx)(sN.div,{variants:u,initial:`initial`,animate:`animate`,transition:d,style:c,onClick:t=>{t.stopPropagation(),a?.(e.id)},children:f}):(0,r.jsx)(U,{style:c,onClick:t=>{t.stopPropagation(),a?.(e.id)},children:f})},hN=({item:e,elements:n,animation:i,onSelect:a,selectedElementIds:o})=>{let{elements:s,totalHeight:c}=t.default.useMemo(()=>uN(n,e),[n,e]),l=t.default.useMemo(()=>fN(i),[i]),u=t.default.useMemo(()=>l.animate?.transition||{duration:i?.duration||.4,ease:dN(i?.timingFunction)},[i,l]);return(0,r.jsx)(sN.div,{layout:!0,variants:l,initial:`initial`,animate:`animate`,exit:{opacity:0,scale:.9},transition:u,whileHover:{scale:1.02,transition:{duration:.2}},style:{position:`relative`,height:c,width:`100%`,marginBottom:`20px`,transformOrigin:`center center`},children:s.map(t=>(0,r.jsx)(mN,{element:t,offsetY:0,dataContext:e,onSelect:a,isSelected:o?.includes(t.id)},t.id))})};let gN=()=>{let{state:e,setSelectedElements:n}=rS(),[i,a]=t.default.useState(!1),[o,s]=t.default.useState([]);return t.default.useEffect(()=>{let t;return i&&e.isList?(o.length===0&&s([{id:Date.now(),...e.mockData[0]||{}}]),t=setInterval(()=>{s(t=>{let n=t.length%(e.mockData.length||1),r={...e.mockData.length>0?e.mockData[n]:{id:t.length},id:`${Date.now()}-${t.length}`};return e.listSettings.newestPosition===`top`?[r,...t].slice(0,20):[...t,r].slice(-20)})},1500)):s([]),()=>clearInterval(t)},[i,e.isList,e.listSettings.newestPosition,e.mockData]),(0,r.jsxs)(U,{style:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`,backgroundColor:`var(--color-panel-solid)`},children:[e.isList&&(0,r.jsx)(U,{style:{position:`absolute`,bottom:10,right:10,zIndex:100,backgroundColor:`var(--color-surface)`,padding:`4px`,borderRadius:`var(--radius-3)`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`},children:(0,r.jsxs)(G,{size:`1`,variant:i?`soft`:`solid`,color:i?`red`:`green`,onClick:()=>a(!i),children:[i?(0,r.jsx)(Mt,{}):(0,r.jsx)(ft,{}),i?`Parar Simulação`:`Simular Entrada`]})}),(0,r.jsx)(Xv,{type:`auto`,scrollbars:`vertical`,style:{height:`100%`,width:`100%`},children:(0,r.jsx)(U,{style:{position:`relative`,minHeight:`100%`,width:`100%`},children:(()=>{if(e.elements.length===0)return(0,r.jsx)(W,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,r.jsx)(H,{color:`gray`,children:`Preview vazio`})});if(e.isList){let t=[];if(i)t=o;else{if(t=e.mockData.length>0?e.mockData:Array.from({length:10}).map((e,t)=>({id:t})),e.listSettings.sortProp){let n=e.listSettings.sortProp,r=e.listSettings.sortOrder===`asc`?1:-1;t=[...t].sort((e,t)=>{let i=e[n],a=t[n];return i<a?-1*r:i>a?1*r:0})}e.listSettings.newestPosition===`top`&&(t=[...t].reverse())}let a=e.listSettings.containerHeight;return(0,r.jsx)(U,{style:{width:`100%`,minHeight:a?`${a}px`:`100%`,height:a?`${a}px`:void 0,overflowY:a?`auto`:void 0,display:`flex`,flexDirection:`column`,justifyContent:e.listSettings.newestPosition===`top`?`flex-start`:`flex-end`,padding:16},children:(0,r.jsx)(GD,{mode:`popLayout`,children:t.map((t,i)=>(0,r.jsx)(hN,{item:t,elements:e.elements,animation:e.listSettings.entryAnimation,onSelect:e=>n([e]),selectedElementIds:e.selectedElementIds},t.id||i))})})}return(0,r.jsx)(r.Fragment,{children:e.elements.map(t=>(0,r.jsx)(mN,{element:t,dataContext:e.singleMockData,onSelect:e=>n([e]),isSelected:e.selectedElementIds.includes(t.id)},t.id))})})()})})]})};function _N(){return(_N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function vN(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function yN(e){var n=(0,t.useRef)(e),r=(0,t.useRef)(function(e){n.current&&n.current(e)});return n.current=e,r.current}var bN=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},xN=function(e){return`touches`in e},SN=function(e){return e&&e.ownerDocument.defaultView||self},CN=function(e,t,n){var r=e.getBoundingClientRect(),i=xN(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:bN((i.pageX-(r.left+SN(e).pageXOffset))/r.width),top:bN((i.pageY-(r.top+SN(e).pageYOffset))/r.height)}},wN=function(e){!xN(e)&&e.preventDefault()},TN=t.default.memo(function(e){var n=e.onMove,r=e.onKey,i=vN(e,[`onMove`,`onKey`]),a=(0,t.useRef)(null),o=yN(n),s=yN(r),c=(0,t.useRef)(null),l=(0,t.useRef)(!1),u=(0,t.useMemo)(function(){var e=function(e){wN(e),(xN(e)?e.touches.length>0:e.buttons>0)&&a.current?o(CN(a.current,e,c.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=SN(a.current),o=n?i.addEventListener:i.removeEventListener;o(r?`touchmove`:`mousemove`,e),o(r?`touchend`:`mouseup`,t)}return[function(e){var t=e.nativeEvent,r=a.current;if(r&&(wN(t),!function(e,t){return t&&!xN(e)}(t,l.current)&&r)){if(xN(t)){l.current=!0;var i=t.changedTouches||[];i.length&&(c.current=i[0].identifier)}r.focus(),o(CN(r,t,c.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:t===39?.05:t===37?-.05:0,top:t===40?.05:t===38?-.05:0}))},n]},[s,o]),d=u[0],f=u[1],p=u[2];return(0,t.useEffect)(function(){return p},[p]),t.default.createElement(`div`,_N({},i,{onTouchStart:d,onMouseDown:d,className:`react-colorful__interactive`,ref:a,onKeyDown:f,tabIndex:0,role:`slider`}))}),EN=function(e){return e.filter(Boolean).join(` `)},DN=function(e){var n=e.color,r=e.left,i=e.top,a=i===void 0?.5:i,o=EN([`react-colorful__pointer`,e.className]);return t.default.createElement(`div`,{className:o,style:{top:100*a+`%`,left:100*r+`%`}},t.default.createElement(`div`,{className:`react-colorful__pointer-fill`,style:{backgroundColor:n}}))},ON=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=10**t),Math.round(n*e)/n};360/(2*Math.PI);var kN=function(e){return RN(AN(e))},AN=function(e){return e[0]===`#`&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ON(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ON(parseInt(e.substring(6,8),16)/255,2):1}},jN=function(e){return LN(FN(e))},MN=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ON(e.h),s:ON(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ON(i/2),a:ON(r,2)}},NN=function(e){var t=MN(e);return`hsl(`+t.h+`, `+t.s+`%, `+t.l+`%)`},PN=function(e){var t=MN(e);return`hsla(`+t.h+`, `+t.s+`%, `+t.l+`%, `+t.a+`)`},FN=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:ON(255*[r,s,o,o,c,r][l]),g:ON(255*[c,r,r,s,o,o][l]),b:ON(255*[o,o,c,r,r,s][l]),a:ON(i,2)}},IN=function(e){var t=e.toString(16);return t.length<2?`0`+t:t},LN=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?IN(ON(255*i)):``;return`#`+IN(t)+IN(n)+IN(r)+a},RN=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:ON(60*(s<0?s+6:s)),s:ON(a?o/a*100:0),v:ON(a/255*100),a:i}},zN=t.default.memo(function(e){var n=e.hue,r=e.onChange,i=EN([`react-colorful__hue`,e.className]);return t.default.createElement(`div`,{className:i},t.default.createElement(TN,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:bN(n+360*e.left,0,360)})},"aria-label":`Hue`,"aria-valuenow":ON(n),"aria-valuemax":`360`,"aria-valuemin":`0`},t.default.createElement(DN,{className:`react-colorful__hue-pointer`,left:n/360,color:NN({h:n,s:100,v:100,a:1})})))}),BN=t.default.memo(function(e){var n=e.hsva,r=e.onChange,i={backgroundColor:NN({h:n.h,s:100,v:100,a:1})};return t.default.createElement(`div`,{className:`react-colorful__saturation`,style:i},t.default.createElement(TN,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:bN(n.s+100*e.left,0,100),v:bN(n.v-100*e.top,0,100)})},"aria-label":`Color`,"aria-valuetext":`Saturation `+ON(n.s)+`%, Brightness `+ON(n.v)+`%`},t.default.createElement(DN,{className:`react-colorful__saturation-pointer`,top:1-n.v/100,left:n.s/100,color:NN(n)})))}),VN=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},HN=function(e,t){return e.toLowerCase()===t.toLowerCase()||VN(AN(e),AN(t))};function UN(e,n,r){var i=yN(r),a=(0,t.useState)(function(){return e.toHsva(n)}),o=a[0],s=a[1],c=(0,t.useRef)({color:n,hsva:o});return(0,t.useEffect)(function(){if(!e.equal(n,c.current.color)){var t=e.toHsva(n);c.current={hsva:t,color:n},s(t)}},[n,e]),(0,t.useEffect)(function(){var t;VN(o,c.current.hsva)||e.equal(t=e.fromHsva(o),c.current.color)||(c.current={hsva:o,color:t},i(t))},[o,e,i]),[o,(0,t.useCallback)(function(e){s(function(t){return Object.assign({},t,e)})},[])]}var WN,GN=typeof window<`u`?t.useLayoutEffect:t.useEffect,KN=function(){return WN||(typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0)},qN=new Map,JN=function(e){GN(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!qN.has(t)){var n=t.createElement(`style`);n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,qN.set(t,n);var r=KN();r&&n.setAttribute(`nonce`,r),t.head.appendChild(n)}},[])},YN=function(e){var n=e.className,r=e.hsva,i=e.onChange,a={backgroundImage:`linear-gradient(90deg, `+PN(Object.assign({},r,{a:0}))+`, `+PN(Object.assign({},r,{a:1}))+`)`},o=EN([`react-colorful__alpha`,n]),s=ON(100*r.a);return t.default.createElement(`div`,{className:o},t.default.createElement(`div`,{className:`react-colorful__alpha-gradient`,style:a}),t.default.createElement(TN,{onMove:function(e){i({a:e.left})},onKey:function(e){i({a:bN(r.a+e.left)})},"aria-label":`Alpha`,"aria-valuetext":s+`%`,"aria-valuenow":s,"aria-valuemin":`0`,"aria-valuemax":`100`},t.default.createElement(DN,{className:`react-colorful__alpha-pointer`,left:r.a,color:PN(r)})))},XN=function(e){var n=e.className,r=e.colorModel,i=e.color,a=i===void 0?r.defaultColor:i,o=e.onChange,s=vN(e,[`className`,`colorModel`,`color`,`onChange`]),c=(0,t.useRef)(null);JN(c);var l=UN(r,a,o),u=l[0],d=l[1],f=EN([`react-colorful`,n]);return t.default.createElement(`div`,_N({},s,{ref:c,className:f}),t.default.createElement(BN,{hsva:u,onChange:d}),t.default.createElement(zN,{hue:u.h,onChange:d}),t.default.createElement(YN,{hsva:u,onChange:d,className:`react-colorful__last-control`}))},ZN={defaultColor:`0001`,toHsva:kN,fromHsva:jN,equal:HN},QN=function(e){return t.default.createElement(XN,_N({},e,{colorModel:ZN}))},$N={black:`#000000`,white:`#ffffff`,red:`#ff0000`,green:`#008000`,blue:`#0000ff`,yellow:`#ffff00`,cyan:`#00ffff`,magenta:`#ff00ff`,gray:`#808080`,grey:`#808080`,silver:`#c0c0c0`,maroon:`#800000`,olive:`#808000`,purple:`#800080`,teal:`#008080`,navy:`#000080`,orange:`#ffa500`,transparent:`#00000000`};let eP=e=>{if(!e)return`#000000`;let t=e.trim().toLowerCase();if(t.startsWith(`#`))return t.length===4?`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t.length===5?`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4]:t;if($N[t])return $N[t];let n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/);if(n){let e=parseInt(n[1]),t=parseInt(n[2]),r=parseInt(n[3]),i=n[4]?parseFloat(n[4]):1,a=e=>{let t=Math.round(e).toString(16);return t.length===1?`0`+t:t},o=Math.round(i*255);return`#${a(e)}${a(t)}${a(r)}${a(o)}`}return`#000000`},tP=({color:e,onChange:t})=>{let n=(e=>eP(e))(e);return(0,r.jsxs)(W,{direction:`column`,gap:`3`,style:{width:`100%`},children:[(0,r.jsx)(QN,{color:n,onChange:t,style:{width:`100%`}}),(0,r.jsxs)(W,{gap:`2`,align:`center`,children:[(0,r.jsx)(U,{style:{width:32,height:32,backgroundColor:n,borderRadius:4,border:`1px solid var(--gray-5)`,flexShrink:0}}),(0,r.jsx)(X,{value:e,onChange:e=>t(e.target.value),onBlur:()=>{e&&/^[0-9A-Fa-f]{3,8}$/.test(e)&&t(`#`+e)},placeholder:`#RRGGBBAA`,style:{flexGrow:1}})]})]})},nP=({color:e,onChange:t,label:n})=>(0,r.jsxs)(Ay,{children:[(0,r.jsx)(jy,{children:(0,r.jsxs)(G,{variant:`surface`,color:`gray`,style:{width:`100%`,justifyContent:`flex-start`,padding:`0 8px`,height:32},children:[(0,r.jsx)(U,{style:{width:18,height:18,backgroundColor:e||`transparent`,borderRadius:2,border:`1px solid var(--gray-8)`,marginRight:8,backgroundImage:e===`transparent`?`linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)`:`none`,backgroundSize:`8px 8px`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0px`}}),(0,r.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n||e||`Transparente`})]})}),(0,r.jsx)(My,{style:{width:240},children:(0,r.jsx)(tP,{color:e,onChange:t})})]}),rP=({elementId:e})=>{let{state:t,updateElement:n}=rS(),i=t.elements.find(t=>t.id===e);return i?(0,r.jsx)(U,{pt:`2`,children:(0,r.jsxs)(sb,{defaultValue:`formatting`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`formatting`,style:{flex:1},children:`Formatação`}),(0,r.jsx)(lb,{value:`style`,style:{flex:1},children:`Estilo`}),(0,r.jsx)(lb,{value:`bindings`,style:{flex:1},children:`Vínculos`}),(0,r.jsx)(lb,{value:`conditional`,style:{flex:1},children:`Regras`}),(0,r.jsx)(lb,{value:`animation`,style:{flex:1},children:`Anim`})]}),(0,r.jsxs)(U,{pt:`3`,children:[(0,r.jsx)(ub,{value:`formatting`,children:(0,r.jsx)(aP,{element:i,updateElement:n})}),(0,r.jsx)(ub,{value:`style`,children:(0,r.jsx)(oP,{element:i,updateElement:n})}),(0,r.jsx)(ub,{value:`bindings`,children:(0,r.jsx)(mP,{element:i,updateElement:n,availableProps:t.availableProps||[]})}),(0,r.jsx)(ub,{value:`conditional`,children:(0,r.jsx)(hP,{element:i,updateElement:n,availableProps:t.availableProps||[]})}),(0,r.jsx)(ub,{value:`animation`,children:(0,r.jsx)(iP,{element:i,updateElement:n})})]})]})}):null},iP=({element:e,updateElement:t})=>{let n=e.animation||{type:`none`,duration:1,delay:0},i=r=>{t(e.id,{animation:{...n,...r}})};return(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tipo de Animação`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[n.type===`none`?`Nenhuma`:n.type===`slideIn`?`Slide In (Padrão)`:n.type===`fadeIn`?`Fade In`:n.type===`smoothSlideUp`?`Slide Suave (Up)`:n.type===`popIn`?`Pop In`:n.type===`blurIn`?`Blur In`:n.type===`slideInLeft`?`Slide In (Esquerda)`:n.type===`slideInRight`?`Slide In (Direita)`:n.type===`slideInUp`?`Slide In (Cima)`:n.type===`slideInDown`?`Slide In (Baixo)`:n.type===`zoomIn`?`Zoom In`:n.type===`bounceIn`?`Bounce In`:n.type===`pulse`?`Pulse (Atenção)`:n.type===`shake`?`Shake (Atenção)`:`Spin (Loop)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>i({type:`none`}),children:`Nenhuma`}),(0,r.jsx)(q,{onSelect:()=>i({type:`slideIn`}),children:`Slide In (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`fadeIn`}),children:`Fade In`}),(0,r.jsx)(q,{onSelect:()=>i({type:`smoothSlideUp`}),children:`Slide Suave (Up)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`popIn`}),children:`Pop In`}),(0,r.jsx)(q,{onSelect:()=>i({type:`blurIn`}),children:`Blur In`}),(0,r.jsx)(q,{onSelect:()=>i({type:`slideInLeft`}),children:`Slide In (Esquerda)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`slideInRight`}),children:`Slide In (Direita)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`slideInUp`}),children:`Slide In (Cima)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`slideInDown`}),children:`Slide In (Baixo)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`zoomIn`}),children:`Zoom In`}),(0,r.jsx)(q,{onSelect:()=>i({type:`bounceIn`}),children:`Bounce In`}),(0,r.jsx)(q,{onSelect:()=>i({type:`pulse`}),children:`Pulse (Atenção)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`shake`}),children:`Shake (Atenção)`}),(0,r.jsx)(q,{onSelect:()=>i({type:`spin`}),children:`Spin (Loop)`})]})]})]}),n.type!==`none`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Duração (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0.1`,value:n.duration,onChange:e=>i({duration:parseFloat(e.target.value)||.5})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Atraso (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0`,value:n.delay,onChange:e=>i({delay:parseFloat(e.target.value)||0})})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Curva de Tempo`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(n.timingFunction||`ease`)===`linear`?`Linear`:(n.timingFunction||`ease`)===`ease-in`?`Ease In`:(n.timingFunction||`ease`)===`ease-out`?`Ease Out`:(n.timingFunction||`ease`)===`ease-in-out`?`Ease In Out`:(n.timingFunction||`ease`)===`bounce`?`Bounce`:`Ease`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`linear`}),children:`Linear`}),(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`ease`}),children:`Ease`}),(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`ease-in`}),children:`Ease In`}),(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`ease-out`}),children:`Ease Out`}),(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`ease-in-out`}),children:`Ease In Out`}),(0,r.jsx)(q,{onSelect:()=>i({timingFunction:`bounce`}),children:`Bounce`})]})]})]}),[`pulse`,`shake`,`spin`].includes(n.type)&&(0,r.jsx)(U,{children:(0,r.jsxs)(W,{align:`center`,gap:`2`,mt:`2`,children:[(0,r.jsx)(ib,{checked:n.iterationCount===`infinite`,onCheckedChange:e=>i({iterationCount:e?`infinite`:1})}),(0,r.jsx)(H,{size:`2`,children:`Repetir Infinitamente`})]})})]})]})},aP=({element:e,updateElement:t})=>{let n=e.formatting||{type:`text`},i=r=>{t(e.id,{formatting:{...n,...r}})};return(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(e.type===`text`||e.type===`text-container`)&&(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{align:`center`,gap:`2`,mb:`3`,children:[(0,r.jsx)(ib,{checked:e.autoGrow||!1,onCheckedChange:n=>t(e.id,{autoGrow:n})}),(0,r.jsx)(H,{size:`2`,children:e.type===`text-container`?`Expandir container automaticamente`:`Expandir altura automaticamente`})]}),e.type===`text-container`&&e.autoGrow&&(0,r.jsxs)(U,{mb:`3`,ml:`4`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Direção de Expansão`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(e.containerExpansion||`vertical`)===`vertical`?`Vertical (Altura Cresce)`:`Horizontal (Largura Cresce)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>t(e.id,{containerExpansion:`vertical`}),children:`Vertical (Altura Cresce)`}),(0,r.jsx)(q,{onSelect:()=>t(e.id,{containerExpansion:`horizontal`}),children:`Horizontal (Largura Cresce)`})]})]})]}),(0,r.jsx)(Qy,{size:`4`,mb:`2`})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tipo de Formatação`}),(0,r.jsxs)(Wy,{value:n.type,onValueChange:e=>i({type:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`text`,children:`Texto (Padrão)`}),(0,r.jsx)(Y,{value:`boolean`,children:`Booleano (Sim/Não)`}),(0,r.jsx)(Y,{value:`date`,children:`Data`}),(0,r.jsx)(Y,{value:`number`,children:`Número / Moeda`})]})]})]}),n.type===`boolean`&&(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Texto para Verdadeiro`}),(0,r.jsx)(X,{placeholder:`Ex: Sim`,value:n.trueLabel||``,onChange:e=>i({trueLabel:e.target.value})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Texto para Falso`}),(0,r.jsx)(X,{placeholder:`Ex: Não`,value:n.falseLabel||``,onChange:e=>i({falseLabel:e.target.value})})]})]}),n.type===`date`&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Formato da Data`}),(0,r.jsx)(X,{placeholder:`Ex: DD/MM/YYYY`,value:n.dateFormat||``,onChange:e=>i({dateFormat:e.target.value})}),(0,r.jsx)(H,{size:`1`,color:`gray`,mt:`1`,style:{fontSize:10},children:`Use DD, MM, YYYY, HH, mm, ss.`})]}),n.type===`number`&&(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Estilo`}),(0,r.jsxs)(Wy,{value:n.numberFormat||`decimal`,onValueChange:e=>i({numberFormat:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`decimal`,children:`Decimal`}),(0,r.jsx)(Y,{value:`currency`,children:`Moeda`}),(0,r.jsx)(Y,{value:`percent`,children:`Porcentagem`})]})]})]}),n.numberFormat===`currency`&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Símbolo da Moeda`}),(0,r.jsx)(X,{placeholder:`Ex: R$`,value:n.currencySymbol||``,onChange:e=>i({currencySymbol:e.target.value})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Casas Decimais`}),(0,r.jsx)(X,{type:`number`,placeholder:`2`,value:n.decimalPlaces===void 0?``:n.decimalPlaces,onChange:e=>i({decimalPlaces:parseInt(e.target.value)||0})})]})]})]})},oP=({element:e,updateElement:n})=>{let i=e.style||{},[a,o]=(0,t.useState)(i.borderTopLeftRadius!==void 0||i.borderTopRightRadius!==void 0||i.borderBottomRightRadius!==void 0||i.borderBottomLeftRadius!==void 0),s=t=>{n(e.id,{style:{...i,...t}})},c=(e,t)=>{let n=typeof e==`number`?e:parseInt(e)||0;s({[t]:`${n}px`})};return(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{align:`center`,justify:`between`,mb:`2`,children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,children:`Arredondamento`}),(0,r.jsxs)(W,{align:`center`,gap:`2`,children:[(0,r.jsx)(H,{size:`1`,children:`Individual`}),(0,r.jsx)(ib,{checked:a,onCheckedChange:e=>{if(o(e),!e)s({borderRadius:i.borderTopLeftRadius||i.borderRadius||0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomRightRadius:void 0,borderBottomLeftRadius:void 0});else{let e=i.borderRadius||0;s({borderRadius:void 0,borderTopLeftRadius:e,borderTopRightRadius:e,borderBottomRightRadius:e,borderBottomLeftRadius:e})}}})]})]}),a?(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Sup. Esq.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderTopLeftRadius)||0,onChange:e=>c(e.target.value,`borderTopLeftRadius`)})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Sup. Dir.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderTopRightRadius)||0,onChange:e=>c(e.target.value,`borderTopRightRadius`)})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Inf. Esq.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderBottomLeftRadius)||0,onChange:e=>c(e.target.value,`borderBottomLeftRadius`)})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Inf. Dir.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderBottomRightRadius)||0,onChange:e=>c(e.target.value,`borderBottomRightRadius`)})]})]}):(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Raio (Todos os cantos)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderRadius)||0,onChange:e=>s({borderRadius:`${parseInt(e.target.value)||0}px`})})]})]}),(0,r.jsx)(Qy,{size:`4`,my:`2`}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,children:`Espaçamento Interno`}),(0,r.jsx)(K,{columns:`2`,gap:`3`,children:(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tamanho (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.padding)||0,onChange:e=>s({padding:`${parseInt(e.target.value)||0}px`})})]})})]}),(0,r.jsx)(Qy,{size:`4`,my:`2`}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,children:`Sombra (Box Shadow)`}),(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Cor`}),(0,r.jsx)(nP,{color:sP(i.boxShadow),onChange:e=>s({boxShadow:uP(i.boxShadow,e)})})]}),(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Blur (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:cP(i.boxShadow),onChange:e=>s({boxShadow:dP(i.boxShadow,parseInt(e.target.value)||0)})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Spread (px)`}),(0,r.jsx)(X,{type:`number`,value:lP(i.boxShadow),onChange:e=>s({boxShadow:fP(i.boxShadow,parseInt(e.target.value)||0)})})]})]}),(0,r.jsx)(G,{variant:`soft`,color:`gray`,size:`1`,onClick:()=>s({boxShadow:i.boxShadow?void 0:`0 4px 12px 0 rgba(0,0,0,0.15)`}),children:i.boxShadow?`Remover Sombra`:`Adicionar Sombra`})]})]})]})};var sP=e=>{if(!e||e===`none`)return`#0000001a`;let t=e.match(/(?:rgba?\([^)]+\)|#[0-9a-fA-F]{3,8}|[a-zA-Z]+)\s*$/);return t?t[0].trim():`#0000001a`},cP=e=>{if(!e||e===`none`)return 12;let t=e.match(/(-?\d+(?:\.\d+)?)(?:px)?/g);return t&&t.length>=3?parseFloat(t[2]):12},lP=e=>{if(!e||e===`none`)return 0;let t=e.match(/(-?\d+(?:\.\d+)?)(?:px)?/g);return t&&t.length>=4?parseFloat(t[3]):0},uP=(e,t)=>{let n=cP(e),r=lP(e);return`${e?.includes(`inset`)?`inset `:``}0px 4px ${n}px ${r}px ${t}`},dP=(e,t)=>{let n=(e||`0 4px 12px 0 #0000001a`).match(/(-?\d+(?:\.\d+)?)(?:px)?/g)||[`0`,`4`,`12`,`0`],r=sP(e);return`${e?.includes(`inset`)?`inset `:``}${n[0]||0}px ${n[1]||4}px ${t}px ${n[3]||0}px ${r}`},fP=(e,t)=>{let n=(e||`0 4px 12px 0 #0000001a`).match(/(-?\d+(?:\.\d+)?)(?:px)?/g)||[`0`,`4`,`12`,`0`],r=sP(e);return`${e?.includes(`inset`)?`inset `:``}${n[0]||0}px ${n[1]||4}px ${n[2]||12}px ${t}px ${r}`},pP=[{key:`color`,label:`Cor do texto`},{key:`backgroundColor`,label:`Cor de fundo`},{key:`borderColor`,label:`Cor da borda`},{key:`boxShadowColor`,label:`Cor da sombra`}];let mP=({element:e,updateElement:t,availableProps:n})=>{let i=e.styleBindings||{},a=(n,r)=>{let a={...i};r?a[n]=r:delete a[n],t(e.id,{styleBindings:Object.keys(a).length>0?a:void 0})};return(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,children:`Vínculos de Estilo (Data Binding)`}),(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`2`,children:`Vincule propriedades de estilo a variáveis de dados. O valor da variável será aplicado em tempo real (ex.: cores em formato #RRGGBB, rgba(), etc.).`}),pP.map(({key:e,label:t})=>(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:t}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[i[e]?n.find(t=>t.dataName===i[e])?.name||i[e]:`Nenhum`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>a(e,null),children:`Nenhum`}),n.map(t=>(0,r.jsx)(q,{onSelect:()=>a(e,t.dataName),children:t.name},t.dataName)),n.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]})]},e))]})},hP=({element:e,updateElement:t,availableProps:n})=>{let i=e.conditions||[],a=()=>{let r={id:crypto.randomUUID(),property:n.length>0?n[0].dataName:``,operator:`equals`,value:``,style:{color:`#ff0000`}};t(e.id,{conditions:[...i,r]})},o=n=>{t(e.id,{conditions:i.filter(e=>e.id!==n)})},s=(n,r)=>{t(e.id,{conditions:i.map(e=>e.id===n?{...e,...r}:e)})};return(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,children:[(0,r.jsx)(H,{size:`2`,color:`gray`,children:`Regras de Exibição`}),(0,r.jsxs)(G,{size:`1`,variant:`soft`,onClick:a,children:[(0,r.jsx)(mt,{}),` Nova Regra`]})]}),i.length===0?(0,r.jsx)(H,{size:`1`,color:`gray`,style:{fontStyle:`italic`},children:`Nenhuma regra condicional definida.`}):(0,r.jsx)(W,{direction:`column`,gap:`2`,children:i.map(e=>(0,r.jsxs)(U,{style:{border:`1px solid var(--gray-6)`,borderRadius:4,padding:8},children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,mb:`2`,children:[(0,r.jsxs)(H,{size:`1`,weight:`bold`,children:[`Se `,e.property,`...`]}),(0,r.jsx)(J,{size:`1`,color:`red`,variant:`ghost`,onClick:()=>o(e.id),children:(0,r.jsx)(Xt,{})})]}),(0,r.jsxs)(K,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[n.find(t=>t.dataName===e.property)?.name||e.property||`Propriedade`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[n.map(t=>(0,r.jsx)(q,{onSelect:()=>s(e.id,{property:t.dataName}),children:t.name},t.dataName)),n.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[e.operator===`equals`?`Igual a`:e.operator===`notEquals`?`Diferente de`:e.operator===`contains`?`Contém`:e.operator===`greaterThan`?`Maior que`:`Menor que`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>s(e.id,{operator:`equals`}),children:`Igual a`}),(0,r.jsx)(q,{onSelect:()=>s(e.id,{operator:`notEquals`}),children:`Diferente de`}),(0,r.jsx)(q,{onSelect:()=>s(e.id,{operator:`contains`}),children:`Contém`}),(0,r.jsx)(q,{onSelect:()=>s(e.id,{operator:`greaterThan`}),children:`Maior que`}),(0,r.jsx)(q,{onSelect:()=>s(e.id,{operator:`lessThan`}),children:`Menor que`})]})]})]}),(0,r.jsx)(X,{size:`1`,placeholder:`Valor`,value:e.value,onChange:t=>s(e.id,{value:t.target.value})}),(0,r.jsxs)(U,{mt:`2`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor quando verdadeiro`}),(0,r.jsx)(nP,{color:e.style?.color||`#ff0000`,onChange:t=>s(e.id,{style:{...e.style,color:t}})})]})]},e.id))})]})};var gP=({title:e,isOpen:t,onToggle:n,children:i,onReset:a})=>(0,r.jsxs)(U,{style:{borderBottom:`1px solid var(--gray-4)`},children:[(0,r.jsxs)(W,{align:`center`,style:{width:`100%`},children:[(0,r.jsxs)(G,{variant:`ghost`,onClick:n,style:{flex:1,justifyContent:`space-between`,padding:`12px 8px`,borderRadius:0,height:`auto`,cursor:`pointer`,color:`var(--gray-12)`},children:[(0,r.jsx)(H,{weight:`bold`,size:`2`,children:e}),t?(0,r.jsx)(fe,{}):(0,r.jsx)(me,{})]}),a&&t&&(0,r.jsx)(bb,{content:`Resetar para padrão`,children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:e=>{e.stopPropagation(),a()},style:{marginRight:8},children:(0,r.jsx)(vt,{})})})]}),t&&(0,r.jsx)(U,{p:`3`,style:{backgroundColor:`var(--gray-2)`},children:i})]}),_P=`__`,vP=({value:e,onChange:n,units:i=[`px`,`%`,`em`,`rem`,`vw`,`vh`],min:a,max:o,placeholder:s,label:c})=>{let l=e=>e===``?_P:e,u=e=>e===_P?``:e,d=e=>{if(e==null||e===``)return{num:``,unit:i[0]};let t=String(e).match(/^(-?[\d.]+)([a-z%]+)?$/i);return t?{num:t[1],unit:t[2]||i[0]}:{num:``,unit:i[0]}},[f,p]=(0,t.useState)(d(e));(0,t.useEffect)(()=>{p(d(e))},[e]);let m=(e,t)=>{if(e===``){n(``);return}n(`${e}${t}`)};return(0,r.jsxs)(U,{children:[c&&(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:c}),(0,r.jsxs)(W,{children:[(0,r.jsx)(X,{type:`number`,value:f.num,onChange:e=>{let t=e.target.value;p({...f,num:t}),m(t,f.unit)},placeholder:s,style:{borderTopRightRadius:0,borderBottomRightRadius:0,flex:1},min:a,max:o}),(0,r.jsxs)(Wy,{value:l(f.unit),onValueChange:e=>{let t=u(e);p({...f,unit:t}),m(f.num,t)},children:[(0,r.jsx)(Gy,{style:{width:60,borderTopLeftRadius:0,borderBottomLeftRadius:0,marginLeft:-1}}),(0,r.jsx)(Ky,{children:i.map(e=>(0,r.jsx)(Y,{value:l(e),children:e||s||`—`},e||_P))})]})]})]})},yP=({values:e,onChange:n,label:i})=>{let[a,o]=(0,t.useState)(!0),s=e=>{n({top:e,right:e,bottom:e,left:e})},c=(t,r)=>{n({...e,[t]:r})};return(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,mb:`1`,children:[i&&(0,r.jsx)(H,{size:`1`,color:`gray`,children:i}),(0,r.jsx)(bb,{content:a?`Desvincular lados`:`Vincular lados`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:a?`blue`:`gray`,onClick:()=>o(!a),children:a?(0,r.jsx)(bP,{}):(0,r.jsx)(xP,{})})})]}),a?(0,r.jsx)(vP,{value:e.top||``,onChange:s,placeholder:`Todos`}):(0,r.jsxs)(K,{columns:`2`,gap:`2`,children:[(0,r.jsx)(vP,{value:e.top,onChange:e=>c(`top`,e),label:`Top`}),(0,r.jsx)(vP,{value:e.right,onChange:e=>c(`right`,e),label:`Right`}),(0,r.jsx)(vP,{value:e.bottom,onChange:e=>c(`bottom`,e),label:`Bottom`}),(0,r.jsx)(vP,{value:e.left,onChange:e=>c(`left`,e),label:`Left`})]})]})},bP=()=>(0,r.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,r.jsx)(`path`,{d:`M4.5 6.5L1.35355 9.64645C0.908293 10.0917 0.908293 10.8134 1.35355 11.2587L3.74132 13.6464C4.18658 14.0917 4.90829 14.0917 5.35355 13.6464L8.5 10.5M10.5 8.5L13.6464 5.35355C14.0917 4.90829 14.0917 4.18658 13.6464 3.74132L11.2587 1.35355C10.8134 0.908293 10.0917 0.908293 9.64645 1.35355L6.5 4.5M6.5 8.5H8.5`,stroke:`currentColor`})}),xP=()=>(0,r.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,r.jsx)(`path`,{d:`M4.5 6.5L1.35355 9.64645C0.908293 10.0917 0.908293 10.8134 1.35355 11.2587L3.74132 13.6464C4.18658 14.0917 4.90829 14.0917 5.35355 13.6464L8.5 10.5M10.5 8.5L13.6464 5.35355C14.0917 4.90829 14.0917 4.18658 13.6464 3.74132L11.2587 1.35355C10.8134 0.908293 10.0917 0.908293 9.64645 1.35355L6.5 4.5`,stroke:`currentColor`})});let SP=()=>{let{state:e,setPropertiesPanelOpen:n,updateElement:i,updateElements:a,removeSelected:o,copy:s,paste:c,addElement:l}=rS(),{isPropertiesPanelOpen:u,selectedElementIds:d,elements:f}=e,p=(0,t.useMemo)(()=>f.filter(e=>d.includes(e.id)),[f,d]),m=p[0],h=p.length>1,[g,_]=(0,t.useState)({content:!0,layout:!0,typography:!0,appearance:!1,borders:!1,effects:!1,transform:!1,animation:!1,conditions:!1,formatting:!1,spacing:!1}),[v,y]=(0,t.useState)(``),[b,x]=(0,t.useState)({});(0,t.useEffect)(()=>{let e=localStorage.getItem(`editor-presets`);if(e)try{x(JSON.parse(e))}catch(e){console.error(`Failed to load presets`,e)}},[]);let S=e=>{if(!m)return;let t={...b,[e]:{style:m.style}};x(t),localStorage.setItem(`editor-presets`,JSON.stringify(t))},C=e=>{let t=b[e];t&&t.style&&D(t.style)};if(!u||!m)return null;let w=e=>{_(t=>({...t,[e]:!t[e]}))},T=e=>{h?a(d.map(t=>({id:t,changes:e}))):i(m.id,e)},E=()=>{if(h)s(),c();else{let{id:e,...t}=m;l({...t,x:m.x+20,y:m.y+20})}},D=e=>{h?a(p.map(t=>({id:t.id,changes:{style:{...t.style,...e}}}))):i(m.id,{style:{...m.style,...e}})},O=e=>{let t={};e.forEach(e=>t[e]=void 0),D(t)},k=(e,t)=>{if(!v)return!0;let n=v.toLowerCase();return e.toLowerCase().includes(n)||t.some(e=>e.toLowerCase().includes(n))},A=e=>{if(!h)return e(m);let t=e(m);return p.every(n=>e(n)===t)?t:`Mixed`},j=(e,t=``)=>{let n=A(t=>t.style?.[e]);return n===`Mixed`?`Mixed`:n===void 0?t:n},M=String(j(`fontFamily`,`Arial`)),N=AS(M,e.availableFonts||[`Arial`]),P=()=>{let e=j(`fontWeight`,`normal`);return e===`Mixed`?`400`:kS(e,OS)},F=e=>{let t={x:0,y:4,blur:12,spread:0,color:`#0000001a`,inset:!1};if(!e||e===`none`)return t;let n=e.trim(),r=n.includes(`inset`),i=n.replace(`inset`,``).trim(),a=i.match(/(-?\d+(?:\.\d+)?)(?:px)?\s+(-?\d+(?:\.\d+)?)(?:px)?(?:\s+(\d+(?:\.\d+)?)(?:px)?)?(?:\s+(\d+(?:\.\d+)?)(?:px)?)?/);return a?{x:parseFloat(a[1]),y:parseFloat(a[2]),blur:a[3]?parseFloat(a[3]):0,spread:a[4]?parseFloat(a[4]):0,color:i.replace(a[0],``).trim()||t.color,inset:r}:t},I=F(m.style?.boxShadow),re=e=>{let t={...I,...e};D({boxShadow:`${t.inset?`inset `:``}${t.x}px ${t.y}px ${t.blur}px ${t.spread}px ${t.color}`})};return(0,r.jsx)(ny,{open:u,onOpenChange:n,children:(0,r.jsxs)(iy,{style:{maxWidth:500,width:`100%`,maxHeight:`85vh`,height:`100%`,padding:0,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,r.jsxs)(U,{style:{borderBottom:`1px solid var(--gray-4)`},children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,p:`4`,pb:`2`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(ay,{style:{margin:0},children:`Propriedades`}),(0,r.jsx)(oy,{size:`1`,color:`gray`,children:h?`${p.length} selecionados`:m.name||`Elemento`})]}),(0,r.jsxs)(W,{gap:`2`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,children:(0,r.jsx)(ee,{})})}),(0,r.jsxs)(fy,{children:[(0,r.jsx)(py,{children:`Presets`}),Object.keys(b).length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhum preset salvo`}),Object.keys(b).map(e=>(0,r.jsx)(q,{onSelect:t=>{t.preventDefault(),C(e)},onClick:()=>C(e),style:{cursor:`pointer`},children:e},e)),(0,r.jsx)(xy,{}),(0,r.jsxs)(q,{onSelect:e=>{e.preventDefault();let t=prompt(`Nome do novo preset:`);t&&S(t)},children:[(0,r.jsx)(mt,{style:{marginRight:8}}),` Salvar Atual`]})]})]}),(0,r.jsx)(sy,{children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,children:(0,r.jsx)(Ee,{})})})]})]}),(0,r.jsxs)(W,{gap:`2`,px:`4`,pb:`3`,children:[(0,r.jsx)(bb,{content:`Bloquear`,children:(0,r.jsx)(J,{variant:`soft`,color:m.locked?`orange`:`gray`,onClick:()=>T({locked:!m.locked}),children:m.locked?(0,r.jsx)(et,{}):(0,r.jsx)(nt,{})})}),(0,r.jsx)(bb,{content:`Ocultar`,children:(0,r.jsx)(J,{variant:`soft`,color:m.hidden?`blue`:`gray`,onClick:()=>T({hidden:!m.hidden}),children:m.hidden?(0,r.jsx)(Be,{}):(0,r.jsx)(He,{})})}),(0,r.jsx)(bb,{content:`Duplicar`,children:(0,r.jsx)(J,{variant:`soft`,color:`gray`,onClick:E,children:(0,r.jsx)(we,{})})}),(0,r.jsx)(U,{style:{flex:1}}),(0,r.jsx)(bb,{content:`Excluir`,children:(0,r.jsx)(J,{variant:`soft`,color:`red`,onClick:()=>{o(),n(!1)},children:(0,r.jsx)(Xt,{})})})]})]}),(0,r.jsx)(U,{p:`3`,style:{borderBottom:`1px solid var(--gray-4)`,backgroundColor:`var(--gray-1)`},children:(0,r.jsx)(X,{placeholder:`Buscar...`,value:v,onChange:e=>y(e.target.value),children:(0,r.jsx)(_b,{children:(0,r.jsx)(ot,{height:`16`,width:`16`})})})}),(0,r.jsxs)(U,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`},children:[k(`Conteúdo`,[`text`,`image`,`url`,`value`,`content`])&&(m.type===`text`||m.type===`text-container`||m.type===`image`)&&(0,r.jsx)(gP,{title:`Conteúdo`,isOpen:g.content,onToggle:()=>w(`content`),children:(0,r.jsxs)(U,{children:[(m.type===`text`||m.type===`text-container`)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Texto`}),(0,r.jsx)(pb,{value:m.content||``,onChange:e=>T({content:e.target.value}),rows:4,placeholder:`Texto ou {{variavel}}...`})]}),m.type===`image`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Vínculo de Propriedade`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`,marginBottom:8},children:[m.dataBinding?e.availableProps.find(e=>e.dataName===m.dataBinding)?.name||m.dataBinding:`Nenhum (URL fixa)`,(0,r.jsx)(fe,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>T({dataBinding:void 0}),children:`Nenhum (URL fixa)`}),(e.availableProps||[]).map(e=>(0,r.jsx)(q,{onSelect:()=>T({dataBinding:e.dataName,content:`{{${e.dataName}}}`}),children:e.name},e.dataName))]})]}),(0,r.jsxs)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:[`URL ou `,`{{variável}}`]}),(0,r.jsx)(X,{value:m.content||``,onChange:e=>T({content:e.target.value}),placeholder:`https://... ou {{profilePicture}}`})]})]})}),k(`Tipografia`,[`font`,`text`,`color`,`align`,`size`,`weight`,`transform`,`decoration`])&&(0,r.jsx)(gP,{title:`Tipografia`,isOpen:g.typography,onToggle:()=>w(`typography`),onReset:()=>O([`fontFamily`,`fontSize`,`fontWeight`,`color`,`textAlign`,`fontStyle`,`textDecoration`,`textTransform`,`lineHeight`,`letterSpacing`]),children:(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Família da Fonte`}),(0,r.jsxs)(Wy,{value:M,onValueChange:e=>D({fontFamily:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`},placeholder:`Selecione...`}),(0,r.jsx)(Ky,{style:{zIndex:1e5},children:N.map(e=>(0,r.jsx)(Y,{value:e,children:e},e))})]})]}),(0,r.jsx)(vP,{label:`Tamanho`,value:j(`fontSize`,`16px`),onChange:e=>D({fontSize:e})}),(0,r.jsx)(vP,{label:`Altura da Linha`,value:j(`lineHeight`,`normal`),onChange:e=>D({lineHeight:e}),units:[``,`px`,`em`,`%`],placeholder:`Normal`}),(0,r.jsx)(vP,{label:`Espaçamento`,value:j(`letterSpacing`,`normal`),onChange:e=>D({letterSpacing:e}),units:[`px`,`em`],placeholder:`Normal`}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Peso`}),(0,r.jsxs)(Wy,{value:P(),onValueChange:e=>D({fontWeight:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`},placeholder:`Normal`}),(0,r.jsxs)(Ky,{style:{zIndex:1e5},children:[(0,r.jsx)(Y,{value:`100`,children:`100 - Thin`}),(0,r.jsx)(Y,{value:`300`,children:`300 - Light`}),(0,r.jsx)(Y,{value:`400`,children:`400 - Normal`}),(0,r.jsx)(Y,{value:`500`,children:`500 - Medium`}),(0,r.jsx)(Y,{value:`600`,children:`600 - Semi Bold`}),(0,r.jsx)(Y,{value:`700`,children:`700 - Bold`}),(0,r.jsx)(Y,{value:`900`,children:`900 - Black`}),(0,r.jsx)(Y,{value:`normal`,children:`Normal`}),(0,r.jsx)(Y,{value:`bold`,children:`Bold`})]})]})]}),(0,r.jsx)(U,{style:{gridColumn:`span 2`},children:(0,r.jsxs)(W,{justify:`between`,align:`center`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(W,{gap:`1`,children:[(0,r.jsx)(J,{variant:j(`fontStyle`)===`italic`?`solid`:`soft`,onClick:()=>D({fontStyle:j(`fontStyle`)===`italic`?`normal`:`italic`}),children:(0,r.jsx)(Ke,{})}),(0,r.jsx)(J,{variant:j(`textDecoration`)===`underline`?`solid`:`soft`,onClick:()=>D({textDecoration:j(`textDecoration`)===`underline`?`none`:`underline`}),children:(0,r.jsx)(Qt,{})}),(0,r.jsx)(J,{variant:j(`textDecoration`)===`line-through`?`solid`:`soft`,onClick:()=>D({textDecoration:j(`textDecoration`)===`line-through`?`none`:`line-through`}),children:(0,r.jsx)(Pt,{})})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transformação`}),(0,r.jsxs)(Wy,{value:j(`textTransform`,`none`),onValueChange:e=>D({textTransform:e}),children:[(0,r.jsx)(Gy,{style:{width:100}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`none`,children:`Nenhum`}),(0,r.jsx)(Y,{value:`uppercase`,children:`MAIÚSCULA`}),(0,r.jsx)(Y,{value:`lowercase`,children:`minúscula`}),(0,r.jsx)(Y,{value:`capitalize`,children:`Capitalizada`})]})]})]})]})}),(0,r.jsxs)(U,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento`}),(0,r.jsxs)(Ly,{value:j(`textAlign`,`left`),onValueChange:e=>D({textAlign:e}),children:[(0,r.jsx)(Ry,{value:`left`,children:(0,r.jsx)(Wt,{})}),(0,r.jsx)(Ry,{value:`center`,children:(0,r.jsx)(Bt,{})}),(0,r.jsx)(Ry,{value:`right`,children:(0,r.jsx)(Kt,{})}),(0,r.jsx)(Ry,{value:`justify`,children:(0,r.jsx)(Ht,{})})]})]}),(0,r.jsxs)(U,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor do Texto`}),(0,r.jsx)(nP,{color:j(`color`,`#000000`),onChange:e=>D({color:e})})]})]})}),k(`Aparência`,[`background`,`opacity`,`blend`,`cursor`])&&(0,r.jsxs)(gP,{title:`Aparência`,isOpen:g.appearance,onToggle:()=>w(`appearance`),onReset:()=>O([`backgroundColor`,`backgroundImage`,`backgroundSize`,`opacity`,`mixBlendMode`,`cursor`]),children:[(0,r.jsxs)(sb,{defaultValue:`solid`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`solid`,children:`Sólido`}),(0,r.jsx)(lb,{value:`gradient`,children:`Gradiente`}),(0,r.jsx)(lb,{value:`image`,children:`Imagem`})]}),(0,r.jsxs)(U,{pt:`3`,children:[(0,r.jsxs)(ub,{value:`solid`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor de Fundo`}),(0,r.jsx)(nP,{color:j(`backgroundColor`,`transparent`),onChange:e=>D({backgroundColor:e,backgroundImage:`none`})})]}),(0,r.jsxs)(ub,{value:`gradient`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`CSS Gradient`}),(0,r.jsx)(pb,{value:j(`backgroundImage`,``),onChange:e=>D({backgroundImage:e.target.value}),placeholder:`linear-gradient(to right, red, blue)`,rows:3})]}),(0,r.jsxs)(ub,{value:`image`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`URL da Imagem`}),(0,r.jsx)(X,{value:j(`backgroundImage`,``).replace(/url\(['"]?(.*?)['"]?\)/,`$1`),onChange:e=>D({backgroundImage:`url('${e.target.value}')`}),placeholder:`https://...`,mb:`2`}),(0,r.jsxs)(K,{columns:`2`,gap:`2`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Tamanho`}),(0,r.jsxs)(Wy,{value:j(`backgroundSize`,`auto`),onValueChange:e=>D({backgroundSize:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`auto`,children:`Auto`}),(0,r.jsx)(Y,{value:`cover`,children:`Cobrir (Cover)`}),(0,r.jsx)(Y,{value:`contain`,children:`Conter (Contain)`}),(0,r.jsx)(Y,{value:`100% 100%`,children:`Esticar`})]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Repetição`}),(0,r.jsxs)(Wy,{value:j(`backgroundRepeat`,`repeat`),onValueChange:e=>D({backgroundRepeat:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`repeat`,children:`Repetir`}),(0,r.jsx)(Y,{value:`no-repeat`,children:`Não Repetir`}),(0,r.jsx)(Y,{value:`repeat-x`,children:`Horizontal`}),(0,r.jsx)(Y,{value:`repeat-y`,children:`Vertical`})]})]})]})]})]})]})]}),(0,r.jsxs)(U,{mt:`3`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Opacidade`}),(0,r.jsxs)(W,{align:`center`,gap:`2`,children:[(0,r.jsx)(tb,{min:0,max:1,step:.05,value:[parseFloat(j(`opacity`,`1`))],onValueChange:([e])=>D({opacity:e}),style:{flex:1}}),(0,r.jsxs)(H,{size:`1`,children:[Math.round(parseFloat(j(`opacity`,`1`))*100),`%`]})]})]}),(0,r.jsxs)(K,{columns:`2`,gap:`3`,mt:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Blend Mode`}),(0,r.jsxs)(Wy,{value:j(`mixBlendMode`,`normal`),onValueChange:e=>D({mixBlendMode:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`normal`,children:`Normal`}),(0,r.jsx)(Y,{value:`multiply`,children:`Multiply`}),(0,r.jsx)(Y,{value:`screen`,children:`Screen`}),(0,r.jsx)(Y,{value:`overlay`,children:`Overlay`}),(0,r.jsx)(Y,{value:`darken`,children:`Darken`}),(0,r.jsx)(Y,{value:`lighten`,children:`Lighten`})]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cursor`}),(0,r.jsxs)(Wy,{value:j(`cursor`,`auto`),onValueChange:e=>D({cursor:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`auto`,children:`Auto`}),(0,r.jsx)(Y,{value:`default`,children:`Padrão`}),(0,r.jsx)(Y,{value:`pointer`,children:`Mãozinha`}),(0,r.jsx)(Y,{value:`text`,children:`Texto`}),(0,r.jsx)(Y,{value:`move`,children:`Mover`}),(0,r.jsx)(Y,{value:`not-allowed`,children:`Bloqueado`})]})]})]})]})]}),k(`Layout`,[`width`,`height`,`x`,`y`,`z-index`,`overflow`])&&(0,r.jsx)(gP,{title:`Layout & Dimensões`,isOpen:g.layout,onToggle:()=>w(`layout`),onReset:()=>T({width:100,height:100,x:0,y:0,style:{...m.style,zIndex:void 0,overflow:void 0}}),children:(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsx)(vP,{label:`Largura`,value:m.width,onChange:e=>T({width:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Altura`,value:m.height,onChange:e=>T({height:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Posição X`,value:m.x,onChange:e=>T({x:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Posição Y`,value:m.y,onChange:e=>T({y:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Z-Index`,value:j(`zIndex`,`auto`),onChange:e=>D({zIndex:e===``?void 0:parseInt(e)}),units:[``],placeholder:`Auto`}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Overflow`}),(0,r.jsxs)(Wy,{value:j(`overflow`,`visible`),onValueChange:e=>D({overflow:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`visible`,children:`Visível`}),(0,r.jsx)(Y,{value:`hidden`,children:`Oculto`}),(0,r.jsx)(Y,{value:`scroll`,children:`Scroll`}),(0,r.jsx)(Y,{value:`auto`,children:`Auto`})]})]})]})]})}),k(`Espaçamento`,[`padding`,`margin`])&&(0,r.jsxs)(gP,{title:`Espaçamento (Margin/Padding)`,isOpen:g.spacing,onToggle:()=>w(`spacing`),onReset:()=>O([`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`]),children:[(0,r.jsx)(U,{mb:`3`,children:(0,r.jsx)(yP,{label:`Padding (Interno)`,values:{top:j(`paddingTop`,j(`padding`)),right:j(`paddingRight`,j(`padding`)),bottom:j(`paddingBottom`,j(`padding`)),left:j(`paddingLeft`,j(`padding`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?D({padding:e.top,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0}):D({padding:void 0,paddingTop:e.top,paddingRight:e.right,paddingBottom:e.bottom,paddingLeft:e.left})}})}),(0,r.jsx)(U,{children:(0,r.jsx)(yP,{label:`Margin (Externo)`,values:{top:j(`marginTop`,j(`margin`)),right:j(`marginRight`,j(`margin`)),bottom:j(`marginBottom`,j(`margin`)),left:j(`marginLeft`,j(`margin`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?D({margin:e.top,marginTop:void 0,marginRight:void 0,marginBottom:void 0,marginLeft:void 0}):D({margin:void 0,marginTop:e.top,marginRight:e.right,marginBottom:e.bottom,marginLeft:e.left})}})})]}),k(`Bordas`,[`border`,`radius`,`stroke`])&&(0,r.jsxs)(gP,{title:`Bordas & Cantos`,isOpen:g.borders,onToggle:()=>w(`borders`),onReset:()=>O([`border`,`borderWidth`,`borderStyle`,`borderColor`,`borderRadius`,`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`]),children:[(0,r.jsxs)(sb,{defaultValue:`all`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`all`,children:(0,r.jsx)(te,{})}),(0,r.jsx)(lb,{value:`top`,children:(0,r.jsx)(ce,{})}),(0,r.jsx)(lb,{value:`right`,children:(0,r.jsx)(oe,{})}),(0,r.jsx)(lb,{value:`bottom`,children:(0,r.jsx)(ne,{})}),(0,r.jsx)(lb,{value:`left`,children:(0,r.jsx)(ie,{})})]}),(0,r.jsx)(U,{pt:`3`,children:(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(Wy,{value:j(`borderStyle`,`none`),onValueChange:e=>D({borderStyle:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{children:[(0,r.jsx)(Y,{value:`none`,children:`Nenhuma`}),(0,r.jsx)(Y,{value:`solid`,children:`Sólida`}),(0,r.jsx)(Y,{value:`dashed`,children:`Tracejada`}),(0,r.jsx)(Y,{value:`dotted`,children:`Pontilhada`}),(0,r.jsx)(Y,{value:`double`,children:`Dupla`})]})]})]}),(0,r.jsx)(vP,{label:`Espessura`,value:j(`borderWidth`,`0px`),onChange:e=>D({borderWidth:e})}),(0,r.jsxs)(U,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor`}),(0,r.jsx)(nP,{color:j(`borderColor`,`#000000`),onChange:e=>D({borderColor:e})})]})]})})]}),(0,r.jsx)(U,{mt:`3`,children:(0,r.jsx)(yP,{label:`Arredondamento (Radius)`,values:{top:j(`borderTopLeftRadius`,j(`borderRadius`)),right:j(`borderTopRightRadius`,j(`borderRadius`)),bottom:j(`borderBottomRightRadius`,j(`borderRadius`)),left:j(`borderBottomLeftRadius`,j(`borderRadius`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?D({borderRadius:e.top,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomRightRadius:void 0,borderBottomLeftRadius:void 0}):D({borderRadius:void 0,borderTopLeftRadius:e.top,borderTopRightRadius:e.right,borderBottomRightRadius:e.bottom,borderBottomLeftRadius:e.left})}})})]}),k(`Efeitos`,[`shadow`,`sombra`])&&(0,r.jsx)(gP,{title:`Efeitos (Sombra)`,isOpen:g.effects,onToggle:()=>w(`effects`),onReset:()=>O([`boxShadow`,`textShadow`]),children:(0,r.jsxs)(sb,{defaultValue:`box`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`box`,children:`Box Shadow`}),(0,r.jsx)(lb,{value:`text`,children:`Text Shadow`})]}),(0,r.jsxs)(U,{pt:`3`,children:[(0,r.jsx)(ub,{value:`box`,children:(0,r.jsxs)(U,{p:`2`,style:{backgroundColor:`var(--gray-3)`,borderRadius:`var(--radius-2)`},children:[(0,r.jsxs)(W,{justify:`between`,mb:`2`,children:[(0,r.jsx)(H,{size:`1`,weight:`bold`,children:`Box Shadow`}),(0,r.jsxs)(W,{gap:`2`,align:`center`,children:[(0,r.jsx)(H,{size:`1`,children:`Inset`}),(0,r.jsx)(`input`,{type:`checkbox`,checked:I.inset,onChange:e=>re({inset:e.target.checked})})]})]}),(0,r.jsxs)(K,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsx)(vP,{label:`X`,value:I.x,onChange:e=>re({x:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Y`,value:I.y,onChange:e=>re({y:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Blur`,value:I.blur,onChange:e=>re({blur:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{label:`Spread`,value:I.spread,onChange:e=>re({spread:parseFloat(e)}),units:[`px`]})]}),(0,r.jsx)(nP,{color:I.color,onChange:e=>re({color:e})})]})}),(0,r.jsx)(ub,{value:`text`,children:(0,r.jsxs)(U,{p:`2`,style:{backgroundColor:`var(--gray-3)`,borderRadius:`var(--radius-2)`},children:[(0,r.jsx)(H,{size:`1`,weight:`bold`,mb:`2`,as:`div`,children:`Text Shadow`}),(0,r.jsxs)(K,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsx)(vP,{label:`X`,value:F(j(`textShadow`,`none`)).x,onChange:e=>{let t=F(j(`textShadow`,`none`));D({textShadow:`${e}px ${t.y}px ${t.blur}px ${t.color}`})},units:[`px`]}),(0,r.jsx)(vP,{label:`Y`,value:F(j(`textShadow`,`none`)).y,onChange:e=>{let t=F(j(`textShadow`,`none`));D({textShadow:`${t.x}px ${e}px ${t.blur}px ${t.color}`})},units:[`px`]}),(0,r.jsx)(vP,{label:`Blur`,value:F(j(`textShadow`,`none`)).blur,onChange:e=>{let t=F(j(`textShadow`,`none`));D({textShadow:`${t.x}px ${t.y}px ${e}px ${t.color}`})},units:[`px`]})]}),(0,r.jsx)(nP,{color:F(j(`textShadow`,`none`)).color,onChange:e=>{let t=F(j(`textShadow`,`none`));D({textShadow:`${t.x}px ${t.y}px ${t.blur}px ${e}`})}})]})})]})]})}),k(`Transform`,[`scale`,`rotate`,`skew`,`translate`])&&(0,r.jsx)(gP,{title:`Transformação`,isOpen:g.transform,onToggle:()=>w(`transform`),onReset:()=>T({rotation:0,style:{...m.style,transform:void 0}}),children:(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsx)(vP,{label:`Rotação (deg)`,value:m.rotation,onChange:e=>T({rotation:parseFloat(e)}),units:[`deg`]}),(0,r.jsxs)(U,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transform CSS (Scale, Skew, Translate)`}),(0,r.jsx)(X,{value:j(`transform`,``),onChange:e=>D({transform:e.target.value}),placeholder:`ex: scale(1.5) skewX(10deg)`}),(0,r.jsxs)(H,{size:`1`,color:`gray`,mt:`1`,children:[`Use sintaxe CSS padrão. Ex: `,(0,r.jsx)(`code`,{children:`scale(1.2)`}),`, `,(0,r.jsx)(`code`,{children:`skewY(10deg)`})]})]})]})}),!h&&(0,r.jsxs)(r.Fragment,{children:[k(`Animação`,[`animation`])&&(0,r.jsx)(gP,{title:`Animação`,isOpen:g.animation,onToggle:()=>w(`animation`),onReset:()=>T({animation:void 0}),children:(0,r.jsx)(iP,{element:m,updateElement:i})}),k(`Regras`,[`condition`])&&(0,r.jsx)(gP,{title:`Regras Condicionais`,isOpen:g.conditions,onToggle:()=>w(`conditions`),onReset:()=>T({conditions:[]}),children:(0,r.jsx)(hP,{element:m,updateElement:i,availableProps:e.availableProps||[]})}),k(`Formatação`,[`format`])&&(0,r.jsx)(gP,{title:`Formatação`,isOpen:g.formatting,onToggle:()=>w(`formatting`),onReset:()=>T({formatting:void 0}),children:(0,r.jsx)(aP,{element:m,updateElement:i})})]})]},m?.id??d.join(`,`))]})})};var CP=20,wP=`#f5f5f5`,TP=`#999`;let EP=({orientation:e})=>{let{state:n}=rS(),{zoom:i,pan:a}=n,o=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=o.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=t.width,s=t.height;n.fillStyle=wP,n.fillRect(0,0,r,s),n.fillStyle=TP,n.font=`10px sans-serif`,n.strokeStyle=TP,n.lineWidth=1;let c=e===`horizontal`?-a.x/i:-a.y/i,l=e===`horizontal`?(r-a.x)/i:(s-a.y)/i,u=100;u=i>2?10:i>.8?50:i>.4?100:200;let d=Math.floor(c/u)*u;n.beginPath();for(let t=d;t<l;t+=u){let r=t*i+(e===`horizontal`?a.x:a.y);e===`horizontal`?(n.moveTo(r,0),n.lineTo(r,CP),n.fillText(t.toString(),r+2,10)):(n.moveTo(0,r),n.lineTo(CP,r),n.save(),n.translate(10,r+2),n.rotate(-Math.PI/2),n.fillText(t.toString(),0,0),n.restore())}n.stroke()},[i,a,e,n.canvasHeight]),(0,t.useEffect)(()=>{let e=o.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.parentElement?.getBoundingClientRect();t&&(e.width=t.width,e.height=t.height)});return e.parentElement&&t.observe(e.parentElement),()=>t.disconnect()},[]),(0,r.jsx)(`canvas`,{ref:o,style:{width:`100%`,height:`100%`,display:`block`,pointerEvents:`none`}})};var DP=({icon:e,label:n,keys:i})=>(0,r.jsxs)(W,{align:`center`,justify:`between`,py:`2`,children:[(0,r.jsxs)(W,{align:`center`,gap:`2`,children:[(0,r.jsx)(U,{style:{color:`var(--gray-10)`},children:(0,r.jsx)(e,{})}),(0,r.jsx)(H,{size:`2`,children:n})]}),(0,r.jsx)(W,{gap:`1`,children:i.map((e,n)=>(0,r.jsxs)(t.default.Fragment,{children:[(0,r.jsx)(Ey,{children:e}),n<i.length-1&&(0,r.jsx)(H,{size:`1`,color:`gray`,children:`+`})]},n))})]});let OP=()=>(0,r.jsxs)(ny,{children:[(0,r.jsx)(ry,{children:(0,r.jsxs)(G,{variant:`solid`,color:`amber`,radius:`full`,style:{height:36,padding:`0 14px`,boxShadow:`0 4px 6px rgba(0,0,0,0.1)`},title:`Atalhos de Teclado`,children:[(0,r.jsx)(gt,{width:`18`,height:`18`}),`Ajuda`]})}),(0,r.jsxs)(iy,{style:{maxWidth:700},onPointerDown:e=>e.stopPropagation(),children:[(0,r.jsx)(ay,{children:`Atalhos de Teclado`}),(0,r.jsx)(H,{size:`2`,color:`gray`,mb:`4`,as:`p`,children:`Agilize seu fluxo de trabalho com estes atalhos.`}),(0,r.jsxs)(K,{columns:{initial:`1`,sm:`2`},gap:`6`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,color:`blue`,children:`Edição Básica`}),(0,r.jsx)(Qy,{size:`4`,mb:`2`}),(0,r.jsx)(DP,{icon:It,label:`Desfazer`,keys:[`Ctrl`,`Z`]}),(0,r.jsx)(DP,{icon:It,label:`Refazer`,keys:[`Ctrl`,`Y`]}),(0,r.jsx)(DP,{icon:Se,label:`Copiar`,keys:[`Ctrl`,`C`]}),(0,r.jsx)(DP,{icon:Se,label:`Colar`,keys:[`Ctrl`,`V`]}),(0,r.jsx)(DP,{icon:Xt,label:`Excluir`,keys:[`Delete`]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,color:`blue`,children:`Navegação e Seleção`}),(0,r.jsx)(Qy,{size:`4`,mb:`2`}),(0,r.jsx)(DP,{icon:ut,label:`Mover Elemento`,keys:[`Setas`]}),(0,r.jsx)(DP,{icon:ut,label:`Mover Rápido`,keys:[`Shift`,`Setas`]}),(0,r.jsx)(DP,{icon:Oe,label:`Multiseleção`,keys:[`Shift`,`Click`]}),(0,r.jsx)(DP,{icon:wt,label:`Mover Canvas (Pan)`,keys:[`Espaço`,`Arrastar`]}),(0,r.jsx)(DP,{icon:ot,label:`Zoom`,keys:[`Ctrl`,`Scroll`]})]})]}),(0,r.jsx)(W,{justify:`end`,mt:`5`,children:(0,r.jsx)(sy,{children:(0,r.jsx)(G,{variant:`soft`,color:`gray`,children:`Fechar`})})})]})]}),kP=()=>{let{state:e,updateListSettings:n,setCanvasHeight:i,setGridSize:a}=rS(),[o,s]=(0,t.useState)(!1),[c,l]=(0,t.useState)(``),[u,d]=(0,t.useState)(`asc`),[f,p]=(0,t.useState)(`bottom`),[m,h]=(0,t.useState)(`down`),[g,_]=(0,t.useState)(`150`),[v,y]=(0,t.useState)(``),[b,x]=(0,t.useState)(`0`),[S,C]=(0,t.useState)(`slideIn`),[w,T]=(0,t.useState)(.3),[E,D]=(0,t.useState)(`ease-out`),O=t.default.useRef(!1);return(0,t.useEffect)(()=>{if(o&&!O.current){O.current=!0,l(e.listSettings.sortProp||`__none__`),d(e.listSettings.sortOrder||`asc`),p(e.listSettings.newestPosition||`bottom`),h(e.listSettings.scrollDirection||`down`),y(e.listSettings.containerHeight?String(e.listSettings.containerHeight):``),_(String(e.canvasHeight||150)),x(String(e.gridSize||0));let t=e.listSettings.entryAnimation;C(t?.type||`slideIn`),T(t?.duration||.3),D(t?.timingFunction||`ease-out`)}o||(O.current=!1)},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=parseInt(g,10);!isNaN(e)&&e>0&&i(e);let t=parseInt(b,10);!isNaN(t)&&t>=0&&a(t)},[g,b,o,i,a]),(0,r.jsxs)(ny,{open:o,onOpenChange:s,children:[(0,r.jsx)(ry,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`center`,cursor:`pointer`},children:[(0,r.jsx)(Je,{}),` Configurações`]})}),(0,r.jsxs)(iy,{style:{maxWidth:600},children:[(0,r.jsx)(ay,{children:`Configurações do Editor`}),(0,r.jsx)(oy,{size:`2`,mb:`4`,children:`Configure o comportamento da lista.`}),(0,r.jsx)(U,{pt:`3`,children:(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,children:`Ordenação`}),(0,r.jsxs)(W,{gap:`3`,align:`center`,children:[(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Propriedade para Ordenar`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[c===`__none__`?`(Nenhum)`:e.availableProps.find(e=>e.dataName===c)?.name||c,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>l(`__none__`),children:`(Nenhum)`}),e.availableProps.map(e=>(0,r.jsx)(q,{onSelect:()=>l(e.dataName),children:e.name},e.dataName))]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Direção`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:150,justifyContent:`space-between`},children:[u===`asc`?`Crescente (A-Z)`:`Decrescente (Z-A)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d(`asc`),children:`Crescente (A-Z)`}),(0,r.jsx)(q,{onSelect:()=>d(`desc`),children:`Decrescente (Z-A)`})]})]})]})]}),(0,r.jsxs)(W,{gap:`3`,align:`center`,children:[(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Posição do Recente`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[f===`top`?`Topo (Início)`:`Base (Final)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>p(`top`),children:`Topo (Início)`}),(0,r.jsx)(q,{onSelect:()=>p(`bottom`),children:`Base (Final)`})]})]})]}),(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Comportamento de Rolagem`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[m===`down`?`Descer (Padrão)`:`Subir (Chat)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>h(`down`),children:`Descer (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>h(`up`),children:`Subir (Chat)`})]})]})]})]}),(0,r.jsx)(H,{size:`2`,weight:`bold`,mt:`2`,children:`Dimensões`}),(0,r.jsxs)(W,{gap:`3`,align:`center`,children:[(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Altura do Item (Template) (px)`}),(0,r.jsx)(X,{type:`number`,min:`10`,value:g,onChange:e=>_(e.target.value)}),(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Altura de cada item individual na lista.`})]}),(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Altura da Lista (Container) (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,placeholder:`Auto (100%)`,value:v,onChange:e=>y(e.target.value)}),(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Altura total da lista. Se exceder, rola. Vazio = 100%.`})]})]}),(0,r.jsx)(H,{size:`2`,weight:`bold`,mt:`2`,children:`Animação de Entrada na Lista`}),(0,r.jsxs)(K,{columns:`3`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Efeito`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[S===`slideIn`?`Slide (Padrão)`:S===`smoothSlideUp`?`Slide Suave (Up)`:S===`fadeIn`?`Fade In`:S===`popIn`?`Pop In`:S===`blurIn`?`Blur In`:S===`slideInLeft`?`Slide (Esq)`:S===`slideInRight`?`Slide (Dir)`:S===`zoomIn`?`Zoom In`:S===`bounceIn`?`Bounce`:`Nenhum`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>C(`none`),children:`Nenhum`}),(0,r.jsx)(q,{onSelect:()=>C(`slideIn`),children:`Slide (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>C(`smoothSlideUp`),children:`Slide Suave (Up)`}),(0,r.jsx)(q,{onSelect:()=>C(`fadeIn`),children:`Fade In`}),(0,r.jsx)(q,{onSelect:()=>C(`popIn`),children:`Pop In`}),(0,r.jsx)(q,{onSelect:()=>C(`blurIn`),children:`Blur In`}),(0,r.jsx)(q,{onSelect:()=>C(`slideInLeft`),children:`Slide (Esq)`}),(0,r.jsx)(q,{onSelect:()=>C(`slideInRight`),children:`Slide (Dir)`}),(0,r.jsx)(q,{onSelect:()=>C(`zoomIn`),children:`Zoom In`}),(0,r.jsx)(q,{onSelect:()=>C(`bounceIn`),children:`Bounce`})]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Duração (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0.1`,value:w,onChange:e=>T(parseFloat(e.target.value)||.3)})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Curva (Easing)`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[E===`ease-out`?`Ease Out`:E===`linear`?`Linear`:E===`bounce`?`Bounce`:`Ease`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>D(`ease`),children:`Ease`}),(0,r.jsx)(q,{onSelect:()=>D(`ease-out`),children:`Ease Out`}),(0,r.jsx)(q,{onSelect:()=>D(`linear`),children:`Linear`}),(0,r.jsx)(q,{onSelect:()=>D(`bounce`),children:`Bounce`})]})]})]})]}),(0,r.jsxs)(U,{mt:`2`,children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,children:`Grid Snapping (Travar)`}),(0,r.jsx)(W,{gap:`3`,align:`center`,mt:`2`,children:(0,r.jsxs)(U,{flexGrow:`1`,children:[(0,r.jsx)(H,{size:`1`,mb:`1`,as:`div`,children:`Tamanho do Grid (px) - 0 para desativar`}),(0,r.jsx)(X,{type:`number`,value:b,onChange:e=>x(e.target.value),placeholder:`0`})]})})]})]})}),(0,r.jsxs)(W,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(sy,{children:(0,r.jsx)(G,{variant:`soft`,color:`gray`,children:`Cancelar`})}),(0,r.jsx)(sy,{children:(0,r.jsx)(G,{onClick:()=>{let e=parseInt(v,10),t=parseInt(g,10),r=parseInt(b,10),o={type:S,duration:Number(w),delay:0,timingFunction:E};n({sortProp:c===`__none__`?``:c,sortOrder:u,newestPosition:f,scrollDirection:m,containerHeight:!isNaN(e)&&e>0?e:void 0,entryAnimation:o}),!isNaN(t)&&t>0&&i(t),!isNaN(r)&&r>=0&&a(r),s(!1)},children:`Salvar Alterações`})})]})]})]})},AP=({onClose:e})=>{let{state:t,jumpToHistory:n,undo:i,redo:a}=rS(),o=t=>{n(t),e&&e()};return(0,r.jsxs)(W,{direction:`column`,style:{width:`100%`},children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,p:`2`,style:{borderBottom:`1px solid var(--gray-5)`},children:[(0,r.jsxs)(W,{align:`center`,gap:`2`,children:[(0,r.jsx)(vt,{}),(0,r.jsx)(H,{size:`2`,weight:`bold`,children:`Histórico`})]}),(0,r.jsxs)(W,{gap:`2`,children:[(0,r.jsx)(G,{size:`1`,variant:`soft`,onClick:i,disabled:t.historyIndex<=0,children:`Desfazer`}),(0,r.jsx)(G,{size:`1`,variant:`soft`,onClick:a,disabled:t.historyIndex>=t.history.length-1,children:`Refazer`})]})]}),(0,r.jsx)(U,{p:`0`,children:t.history.map((e,n)=>{let i=n===t.historyIndex,a=n>t.historyIndex,s=t.historyDescriptions?.[n]||(n===0?`Estado Inicial`:`Alteração ${n}`);return(0,r.jsx)(U,{p:`2`,style:{backgroundColor:i?`var(--accent-3)`:`transparent`,opacity:a?.5:1,cursor:`pointer`,borderBottom:`1px solid var(--gray-3)`},onClick:()=>o(n),className:`history-item`,children:(0,r.jsxs)(W,{align:`center`,justify:`between`,children:[(0,r.jsx)(H,{size:`2`,weight:i?`bold`:`regular`,children:s}),i&&(0,r.jsx)(H,{size:`1`,color:`blue`,children:`Atual`})]})},n)})})]})};function jP(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,t.useMemo)(()=>e=>{n.forEach(t=>t(e))},n)}var MP=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function NP(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function PP(e){return`nodeType`in e}function FP(e){return e?NP(e)?e:PP(e)?e.ownerDocument?.defaultView??window:window:window}function IP(e){let{Document:t}=FP(e);return e instanceof t}function LP(e){return NP(e)?!1:e instanceof FP(e).HTMLElement}function RP(e){return e instanceof FP(e).SVGElement}function zP(e){return e?NP(e)?e.document:PP(e)?IP(e)?e:LP(e)||RP(e)?e.ownerDocument:document:document:document}var BP=MP?t.useLayoutEffect:t.useEffect;function VP(e){let n=(0,t.useRef)(e);return BP(()=>{n.current=e}),(0,t.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current==null?void 0:n.current(...t)},[])}function HP(){let e=(0,t.useRef)(null);return[(0,t.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,t.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function UP(e,n){n===void 0&&(n=[e]);let r=(0,t.useRef)(e);return BP(()=>{r.current!==e&&(r.current=e)},n),r}function WP(e,n){let r=(0,t.useRef)();return(0,t.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...n])}function GP(e){let n=VP(e),r=(0,t.useRef)(null);return[r,(0,t.useCallback)(e=>{e!==r.current&&n?.(e,r.current),r.current=e},[])]}function KP(e){let n=(0,t.useRef)();return(0,t.useEffect)(()=>{n.current=e},[e]),n.current}var qP={};function JP(e,n){return(0,t.useMemo)(()=>{if(n)return n;let t=qP[e]==null?0:qP[e]+1;return qP[e]=t,e+`-`+t},[e,n])}function YP(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var XP=YP(1),ZP=YP(-1);function QP(e){return`clientX`in e&&`clientY`in e}function $P(e){if(!e)return!1;let{KeyboardEvent:t}=FP(e.target);return t&&e instanceof t}function eF(e){if(!e)return!1;let{TouchEvent:t}=FP(e.target);return t&&e instanceof t}function tF(e){if(eF(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return QP(e)?{x:e.clientX,y:e.clientY}:null}var nF=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[nF.Translate.toString(e),nF.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),rF=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function iF(e){return e.matches(rF)?e:e.querySelector(rF)}var aF={display:`none`};function oF(e){let{id:n,value:r}=e;return t.default.createElement(`div`,{id:n,style:aF},r)}function sF(e){let{id:n,announcement:r,ariaLiveType:i=`assertive`}=e;return t.default.createElement(`div`,{id:n,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":i,"aria-atomic":!0},r)}function cF(){let[e,n]=(0,t.useState)(``);return{announce:(0,t.useCallback)(e=>{e!=null&&n(e)},[]),announcement:e}}var lF=(0,t.createContext)(null);function uF(e){let n=(0,t.useContext)(lF);(0,t.useEffect)(()=>{if(!n)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return n(e)},[e,n])}function dF(){let[e]=(0,t.useState)(()=>new Set),n=(0,t.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,t.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),n]}var fF={draggable:`
57
+ `).length-1;return c+=l,Math.ceil(c*r*i)};let uN=(e,t)=>{let n=e.map(e=>({...e})),r=new Map(e.map(e=>[e.id,e])),i=[];n.forEach(e=>{let a=e.type===`text`,o=e.type===`text-container`;if((a||o)&&e.autoGrow){let a=e.content;t&&(a=a.replace(/\{\{(.*?)\}\}/g,(n,r)=>{let i=t[r.trim()];return i==null?n:e.formatting?jS(i,e.formatting):String(i)}));let s=parseInt(String(e.style?.fontSize||16)),c=String(e.style?.fontFamily||`Arial`);if(o&&e.containerExpansion===`horizontal`){let t=document.createElement(`canvas`).getContext(`2d`);if(t){t.font=`${s}px ${c}`;let n=t.measureText(a),r=Math.ceil(n.width+parseInt(String(e.style?.padding||0))*2);Math.abs(r-e.width)>1&&(e.width=r,e.content=a)}}else{let t=lN(a,e.width,c,s),o=e.height,l=t-o;if(Math.abs(l)>1){e.height=t,e.content=a;let s=[],c=r.get(e.id);c&&n.forEach(t=>{if(t.id===e.id)return;let n=r.get(t.id);n&&cN(c,n)&&s.push(t)});let u=new Set([e.id]);s.forEach(e=>{e.height+=l,u.add(e.id)}),i.push({triggerY:e.y+o,delta:l,ignoreIds:u})}}}}),n.forEach(e=>{let t=r.get(e.id);if(!t)return;let n=0;i.forEach(r=>{r.ignoreIds.has(e.id)||t.y>=r.triggerY-.1&&(n+=r.delta)}),e.y+=n});let a=0;return n.forEach(e=>{let t=e.y+e.height;t>a&&(a=t)}),{elements:n,totalHeight:a}};var dN=e=>{switch(e){case`linear`:return`linear`;case`ease-in`:return`easeIn`;case`ease-out`:return`easeOut`;case`ease-in-out`:return`easeInOut`;case`bounce`:return`easeOut`;case`ease`:return`easeInOut`;default:return`easeOut`}},fN=e=>{if(!e||e.type===`none`)return{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1}};let t={initial:{},animate:{}};switch(e.type){case`fadeIn`:t.initial={opacity:0},t.animate={opacity:1};break;case`slideInLeft`:t.initial={opacity:0,x:-100},t.animate={opacity:1,x:0};break;case`slideInRight`:t.initial={opacity:0,x:100},t.animate={opacity:1,x:0};break;case`slideInUp`:t.initial={opacity:0,y:100},t.animate={opacity:1,y:0};break;case`slideInDown`:t.initial={opacity:0,y:-100},t.animate={opacity:1,y:0};break;case`zoomIn`:t.initial={opacity:0,scale:.5},t.animate={opacity:1,scale:1};break;case`bounceIn`:t.initial={opacity:0,scale:.3},t.animate={opacity:1,scale:1,transition:{type:`spring`,bounce:.6}};break;case`smoothSlideUp`:t.initial={opacity:0,y:30},t.animate={opacity:1,y:0};break;case`popIn`:t.initial={opacity:0,scale:.8,y:10},t.animate={opacity:1,scale:1,y:0};break;case`blurIn`:t.initial={opacity:0,filter:`blur(10px)`},t.animate={opacity:1,filter:`blur(0px)`};break;case`pulse`:t.animate={scale:[1,1.05,1]};break;case`shake`:t.animate={x:[0,-5,5,-5,5,0]};break;case`spin`:t.animate={rotate:360};break;default:t.initial={opacity:0,y:20},t.animate={opacity:1,y:0}}return t},pN=(e,t)=>{let n={duration:e?.duration||.4,ease:dN(e?.timingFunction),delay:e?.delay||0},r;e?.iterationCount===`infinite`?r=1/0:typeof e?.iterationCount==`number`&&e.iterationCount>1&&(r=e.iterationCount-1);let i=t?.animate?.transition;return i?{...n,...i,delay:n.delay,repeat:r??i.repeat}:r===void 0?n:{...n,repeat:r}},mN=({element:e,offsetY:n=0,dataContext:i,onSelect:a,isSelected:o})=>{let s=e.content;if(i){if(e.type===`text`||e.type===`text-container`)s=s.replace(/\{\{(.*?)\}\}/g,(t,n)=>{let r=i[n.trim()];return r==null?t:e.formatting?jS(r,e.formatting):String(r)});else if(e.type===`image`)if(e.dataBinding){let t=i[e.dataBinding];t!=null&&(s=String(t))}else s=s.replace(/\{\{(.*?)\}\}/g,(e,t)=>{let n=i[t.trim()];return n==null?e:String(n)})}let c={position:`absolute`,left:e.x,top:e.y+n,width:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`max-content`:`${e.width}px`,height:e.autoGrow?`auto`:`${e.height}px`,transform:e.rotation?`rotate(${e.rotation}deg)`:void 0,padding:e.type===`image`||e.type===`text`||e.type===`text-container`?0:`8px`,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,outline:o?`2px solid var(--blue-9)`:void 0,zIndex:o?10:void 0,cursor:a?`pointer`:void 0,...e.style},l=e.animation&&e.animation.type!==`none`,u=t.default.useMemo(()=>l?fN(e.animation):null,[e.animation,l]),d=t.default.useMemo(()=>pN(e.animation,u),[e.animation,u]),f=(0,r.jsxs)(r.Fragment,{children:[(e.type===`text`||e.type===`text-container`)&&(0,r.jsx)(U,{style:{width:`100%`,height:`100%`,display:`block`},children:s}),e.type===`image`&&(s&&MS(s)?(0,r.jsx)(`img`,{src:s,alt:`Element`,style:{width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`}}):(0,r.jsx)(W,{style:{width:`100%`,height:`100%`,backgroundColor:`#eee`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(U,{size:`1`,children:s?`URL inválida`:`Imagem`})})),e.type===`box`&&(0,r.jsx)(W,{style:{width:`100%`,height:`100%`}}),e.type===`checkbox`&&(0,r.jsx)(W,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(`input`,{type:`checkbox`,checked:i&&e.dataBinding?i[e.dataBinding]===!0||String(i[e.dataBinding])===`true`:!1,readOnly:!0,style:{width:`100%`,height:`100%`,margin:0}})})]});return l&&u?(0,r.jsx)(sN.div,{variants:u,initial:`initial`,animate:`animate`,transition:d,style:c,onClick:t=>{t.stopPropagation(),a?.(e.id)},children:f}):(0,r.jsx)(W,{style:c,onClick:t=>{t.stopPropagation(),a?.(e.id)},children:f})},hN=({item:e,elements:n,animation:i,onSelect:a,selectedElementIds:o})=>{let{elements:s,totalHeight:c}=t.default.useMemo(()=>uN(n,e),[n,e]),l=t.default.useMemo(()=>fN(i),[i]),u=t.default.useMemo(()=>l.animate?.transition||{duration:i?.duration||.4,ease:dN(i?.timingFunction)},[i,l]);return(0,r.jsx)(sN.div,{layout:!0,variants:l,initial:`initial`,animate:`animate`,exit:{opacity:0,scale:.9},transition:u,whileHover:{scale:1.02,transition:{duration:.2}},style:{position:`relative`,height:c,width:`100%`,marginBottom:`20px`,transformOrigin:`center center`},children:s.map(t=>(0,r.jsx)(mN,{element:t,offsetY:0,dataContext:e,onSelect:a,isSelected:o?.includes(t.id)},t.id))})};let gN=()=>{let{state:e,setSelectedElements:n}=rS(),[i,a]=t.default.useState(!1),[o,s]=t.default.useState([]);return t.default.useEffect(()=>{let t;return i&&e.isList?(o.length===0&&s([{id:Date.now(),...e.mockData[0]||{}}]),t=setInterval(()=>{s(t=>{let n=t.length%(e.mockData.length||1),r={...e.mockData.length>0?e.mockData[n]:{id:t.length},id:`${Date.now()}-${t.length}`};return e.listSettings.newestPosition===`top`?[r,...t].slice(0,20):[...t,r].slice(-20)})},1500)):s([]),()=>clearInterval(t)},[i,e.isList,e.listSettings.newestPosition,e.mockData]),(0,r.jsxs)(W,{style:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`,backgroundColor:`var(--color-panel-solid)`},children:[e.isList&&(0,r.jsx)(W,{style:{position:`absolute`,bottom:10,right:10,zIndex:100,backgroundColor:`var(--color-surface)`,padding:`4px`,borderRadius:`var(--radius-3)`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`},children:(0,r.jsxs)(K,{size:`1`,variant:i?`soft`:`solid`,color:i?`red`:`green`,onClick:()=>a(!i),children:[i?(0,r.jsx)(jt,{}):(0,r.jsx)(dt,{}),i?`Parar Simulação`:`Simular Entrada`]})}),(0,r.jsx)(Xv,{type:`auto`,scrollbars:`vertical`,style:{height:`100%`,width:`100%`},children:(0,r.jsx)(W,{style:{position:`relative`,minHeight:`100%`,width:`100%`},children:(()=>{if(e.elements.length===0)return(0,r.jsx)(G,{align:`center`,justify:`center`,style:{height:`100%`},children:(0,r.jsx)(U,{color:`gray`,children:`Preview vazio`})});if(e.isList){let t=[];if(i)t=o;else{if(t=e.mockData.length>0?e.mockData:Array.from({length:10}).map((e,t)=>({id:t})),e.listSettings.sortProp){let n=e.listSettings.sortProp,r=e.listSettings.sortOrder===`asc`?1:-1;t=[...t].sort((e,t)=>{let i=e[n],a=t[n];return i<a?-1*r:i>a?1*r:0})}e.listSettings.newestPosition===`top`&&(t=[...t].reverse())}let a=e.listSettings.containerHeight;return(0,r.jsx)(W,{style:{width:`100%`,minHeight:a?`${a}px`:`100%`,height:a?`${a}px`:void 0,overflowY:a?`auto`:void 0,display:`flex`,flexDirection:`column`,justifyContent:e.listSettings.newestPosition===`top`?`flex-start`:`flex-end`,padding:16},children:(0,r.jsx)(GD,{mode:`popLayout`,children:t.map((t,i)=>(0,r.jsx)(hN,{item:t,elements:e.elements,animation:e.listSettings.entryAnimation,onSelect:e=>n([e]),selectedElementIds:e.selectedElementIds},t.id||i))})})}return(0,r.jsx)(r.Fragment,{children:e.elements.map(t=>(0,r.jsx)(mN,{element:t,dataContext:e.singleMockData,onSelect:e=>n([e]),isSelected:e.selectedElementIds.includes(t.id)},t.id))})})()})})]})};function _N(){return(_N=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function vN(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function yN(e){var n=(0,t.useRef)(e),r=(0,t.useRef)(function(e){n.current&&n.current(e)});return n.current=e,r.current}var bN=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},xN=function(e){return`touches`in e},SN=function(e){return e&&e.ownerDocument.defaultView||self},CN=function(e,t,n){var r=e.getBoundingClientRect(),i=xN(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:bN((i.pageX-(r.left+SN(e).pageXOffset))/r.width),top:bN((i.pageY-(r.top+SN(e).pageYOffset))/r.height)}},wN=function(e){!xN(e)&&e.preventDefault()},TN=t.default.memo(function(e){var n=e.onMove,r=e.onKey,i=vN(e,[`onMove`,`onKey`]),a=(0,t.useRef)(null),o=yN(n),s=yN(r),c=(0,t.useRef)(null),l=(0,t.useRef)(!1),u=(0,t.useMemo)(function(){var e=function(e){wN(e),(xN(e)?e.touches.length>0:e.buttons>0)&&a.current?o(CN(a.current,e,c.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=SN(a.current),o=n?i.addEventListener:i.removeEventListener;o(r?`touchmove`:`mousemove`,e),o(r?`touchend`:`mouseup`,t)}return[function(e){var t=e.nativeEvent,r=a.current;if(r&&(wN(t),!function(e,t){return t&&!xN(e)}(t,l.current)&&r)){if(xN(t)){l.current=!0;var i=t.changedTouches||[];i.length&&(c.current=i[0].identifier)}r.focus(),o(CN(r,t,c.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:t===39?.05:t===37?-.05:0,top:t===40?.05:t===38?-.05:0}))},n]},[s,o]),d=u[0],f=u[1],p=u[2];return(0,t.useEffect)(function(){return p},[p]),t.default.createElement(`div`,_N({},i,{onTouchStart:d,onMouseDown:d,className:`react-colorful__interactive`,ref:a,onKeyDown:f,tabIndex:0,role:`slider`}))}),EN=function(e){return e.filter(Boolean).join(` `)},DN=function(e){var n=e.color,r=e.left,i=e.top,a=i===void 0?.5:i,o=EN([`react-colorful__pointer`,e.className]);return t.default.createElement(`div`,{className:o,style:{top:100*a+`%`,left:100*r+`%`}},t.default.createElement(`div`,{className:`react-colorful__pointer-fill`,style:{backgroundColor:n}}))},ON=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=10**t),Math.round(n*e)/n};360/(2*Math.PI);var kN=function(e){return RN(AN(e))},AN=function(e){return e[0]===`#`&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ON(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?ON(parseInt(e.substring(6,8),16)/255,2):1}},jN=function(e){return LN(FN(e))},MN=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ON(e.h),s:ON(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ON(i/2),a:ON(r,2)}},NN=function(e){var t=MN(e);return`hsl(`+t.h+`, `+t.s+`%, `+t.l+`%)`},PN=function(e){var t=MN(e);return`hsla(`+t.h+`, `+t.s+`%, `+t.l+`%, `+t.a+`)`},FN=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),l=a%6;return{r:ON(255*[r,s,o,o,c,r][l]),g:ON(255*[c,r,r,s,o,o][l]),b:ON(255*[o,o,c,r,r,s][l]),a:ON(i,2)}},IN=function(e){var t=e.toString(16);return t.length<2?`0`+t:t},LN=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=i<1?IN(ON(255*i)):``;return`#`+IN(t)+IN(n)+IN(r)+a},RN=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:ON(60*(s<0?s+6:s)),s:ON(a?o/a*100:0),v:ON(a/255*100),a:i}},zN=t.default.memo(function(e){var n=e.hue,r=e.onChange,i=EN([`react-colorful__hue`,e.className]);return t.default.createElement(`div`,{className:i},t.default.createElement(TN,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:bN(n+360*e.left,0,360)})},"aria-label":`Hue`,"aria-valuenow":ON(n),"aria-valuemax":`360`,"aria-valuemin":`0`},t.default.createElement(DN,{className:`react-colorful__hue-pointer`,left:n/360,color:NN({h:n,s:100,v:100,a:1})})))}),BN=t.default.memo(function(e){var n=e.hsva,r=e.onChange,i={backgroundColor:NN({h:n.h,s:100,v:100,a:1})};return t.default.createElement(`div`,{className:`react-colorful__saturation`,style:i},t.default.createElement(TN,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:bN(n.s+100*e.left,0,100),v:bN(n.v-100*e.top,0,100)})},"aria-label":`Color`,"aria-valuetext":`Saturation `+ON(n.s)+`%, Brightness `+ON(n.v)+`%`},t.default.createElement(DN,{className:`react-colorful__saturation-pointer`,top:1-n.v/100,left:n.s/100,color:NN(n)})))}),VN=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},HN=function(e,t){return e.toLowerCase()===t.toLowerCase()||VN(AN(e),AN(t))};function UN(e,n,r){var i=yN(r),a=(0,t.useState)(function(){return e.toHsva(n)}),o=a[0],s=a[1],c=(0,t.useRef)({color:n,hsva:o});return(0,t.useEffect)(function(){if(!e.equal(n,c.current.color)){var t=e.toHsva(n);c.current={hsva:t,color:n},s(t)}},[n,e]),(0,t.useEffect)(function(){var t;VN(o,c.current.hsva)||e.equal(t=e.fromHsva(o),c.current.color)||(c.current={hsva:o,color:t},i(t))},[o,e,i]),[o,(0,t.useCallback)(function(e){s(function(t){return Object.assign({},t,e)})},[])]}var WN,GN=typeof window<`u`?t.useLayoutEffect:t.useEffect,KN=function(){return WN||(typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0)},qN=new Map,JN=function(e){GN(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!qN.has(t)){var n=t.createElement(`style`);n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,qN.set(t,n);var r=KN();r&&n.setAttribute(`nonce`,r),t.head.appendChild(n)}},[])},YN=function(e){var n=e.className,r=e.hsva,i=e.onChange,a={backgroundImage:`linear-gradient(90deg, `+PN(Object.assign({},r,{a:0}))+`, `+PN(Object.assign({},r,{a:1}))+`)`},o=EN([`react-colorful__alpha`,n]),s=ON(100*r.a);return t.default.createElement(`div`,{className:o},t.default.createElement(`div`,{className:`react-colorful__alpha-gradient`,style:a}),t.default.createElement(TN,{onMove:function(e){i({a:e.left})},onKey:function(e){i({a:bN(r.a+e.left)})},"aria-label":`Alpha`,"aria-valuetext":s+`%`,"aria-valuenow":s,"aria-valuemin":`0`,"aria-valuemax":`100`},t.default.createElement(DN,{className:`react-colorful__alpha-pointer`,left:r.a,color:PN(r)})))},XN=function(e){var n=e.className,r=e.colorModel,i=e.color,a=i===void 0?r.defaultColor:i,o=e.onChange,s=vN(e,[`className`,`colorModel`,`color`,`onChange`]),c=(0,t.useRef)(null);JN(c);var l=UN(r,a,o),u=l[0],d=l[1],f=EN([`react-colorful`,n]);return t.default.createElement(`div`,_N({},s,{ref:c,className:f}),t.default.createElement(BN,{hsva:u,onChange:d}),t.default.createElement(zN,{hue:u.h,onChange:d}),t.default.createElement(YN,{hsva:u,onChange:d,className:`react-colorful__last-control`}))},ZN={defaultColor:`0001`,toHsva:kN,fromHsva:jN,equal:HN},QN=function(e){return t.default.createElement(XN,_N({},e,{colorModel:ZN}))},$N={black:`#000000`,white:`#ffffff`,red:`#ff0000`,green:`#008000`,blue:`#0000ff`,yellow:`#ffff00`,cyan:`#00ffff`,magenta:`#ff00ff`,gray:`#808080`,grey:`#808080`,silver:`#c0c0c0`,maroon:`#800000`,olive:`#808000`,purple:`#800080`,teal:`#008080`,navy:`#000080`,orange:`#ffa500`,transparent:`#00000000`};let eP=e=>{if(!e)return`#000000`;let t=e.trim().toLowerCase();if(t.startsWith(`#`))return t.length===4?`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]:t.length===5?`#`+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4]:t;if($N[t])return $N[t];let n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)$/);if(n){let e=parseInt(n[1]),t=parseInt(n[2]),r=parseInt(n[3]),i=n[4]?parseFloat(n[4]):1,a=e=>{let t=Math.round(e).toString(16);return t.length===1?`0`+t:t},o=Math.round(i*255);return`#${a(e)}${a(t)}${a(r)}${a(o)}`}return`#000000`},tP=({color:e,onChange:t})=>{let n=(e=>eP(e))(e);return(0,r.jsxs)(G,{direction:`column`,gap:`3`,style:{width:`100%`},children:[(0,r.jsx)(QN,{color:n,onChange:t,style:{width:`100%`}}),(0,r.jsxs)(G,{gap:`2`,align:`center`,children:[(0,r.jsx)(W,{style:{width:32,height:32,backgroundColor:n,borderRadius:4,border:`1px solid var(--gray-5)`,flexShrink:0}}),(0,r.jsx)(X,{value:e,onChange:e=>t(e.target.value),onBlur:()=>{e&&/^[0-9A-Fa-f]{3,8}$/.test(e)&&t(`#`+e)},placeholder:`#RRGGBBAA`,style:{flexGrow:1}})]})]})},nP=({color:e,onChange:t,label:n})=>(0,r.jsxs)(Ay,{children:[(0,r.jsx)(jy,{children:(0,r.jsxs)(K,{variant:`surface`,color:`gray`,style:{width:`100%`,justifyContent:`flex-start`,padding:`0 8px`,height:32},children:[(0,r.jsx)(W,{style:{width:18,height:18,backgroundColor:e||`transparent`,borderRadius:2,border:`1px solid var(--gray-8)`,marginRight:8,backgroundImage:e===`transparent`?`linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)`:`none`,backgroundSize:`8px 8px`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0px`}}),(0,r.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n||e||`Transparente`})]})}),(0,r.jsx)(My,{style:{width:240},children:(0,r.jsx)(tP,{color:e,onChange:t})})]}),rP=({elementId:e})=>{let{state:t,updateElement:n}=rS(),i=t.elements.find(t=>t.id===e);return i?(0,r.jsx)(W,{pt:`2`,children:(0,r.jsxs)(sb,{defaultValue:`formatting`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`formatting`,style:{flex:1},children:`Formatação`}),(0,r.jsx)(lb,{value:`style`,style:{flex:1},children:`Estilo`}),(0,r.jsx)(lb,{value:`bindings`,style:{flex:1},children:`Vínculos`}),(0,r.jsx)(lb,{value:`conditional`,style:{flex:1},children:`Regras`}),(0,r.jsx)(lb,{value:`animation`,style:{flex:1},children:`Anim`})]}),(0,r.jsxs)(W,{pt:`3`,children:[(0,r.jsx)(ub,{value:`formatting`,children:(0,r.jsx)(aP,{element:i,updateElement:n})}),(0,r.jsx)(ub,{value:`style`,children:(0,r.jsx)(oP,{element:i,updateElement:n})}),(0,r.jsx)(ub,{value:`bindings`,children:(0,r.jsx)(mP,{element:i,updateElement:n,availableProps:t.availableProps||[]})}),(0,r.jsx)(ub,{value:`conditional`,children:(0,r.jsx)(hP,{element:i,updateElement:n,availableProps:t.availableProps||[]})}),(0,r.jsx)(ub,{value:`animation`,children:(0,r.jsx)(iP,{element:i,updateElement:n})})]})]})}):null},iP=({element:e,updateElement:t})=>{let{portalContainer:n}=rS(),i=e.animation||{type:`none`,duration:1,delay:0},a=n=>{t(e.id,{animation:{...i,...n}})};return(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tipo de Animação`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[i.type===`none`?`Nenhuma`:i.type===`slideIn`?`Slide In (Padrão)`:i.type===`fadeIn`?`Fade In`:i.type===`smoothSlideUp`?`Slide Suave (Up)`:i.type===`popIn`?`Pop In`:i.type===`blurIn`?`Blur In`:i.type===`slideInLeft`?`Slide In (Esquerda)`:i.type===`slideInRight`?`Slide In (Direita)`:i.type===`slideInUp`?`Slide In (Cima)`:i.type===`slideInDown`?`Slide In (Baixo)`:i.type===`zoomIn`?`Zoom In`:i.type===`bounceIn`?`Bounce In`:i.type===`pulse`?`Pulse (Atenção)`:i.type===`shake`?`Shake (Atenção)`:`Spin (Loop)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>a({type:`none`}),children:`Nenhuma`}),(0,r.jsx)(q,{onSelect:()=>a({type:`slideIn`}),children:`Slide In (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`fadeIn`}),children:`Fade In`}),(0,r.jsx)(q,{onSelect:()=>a({type:`smoothSlideUp`}),children:`Slide Suave (Up)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`popIn`}),children:`Pop In`}),(0,r.jsx)(q,{onSelect:()=>a({type:`blurIn`}),children:`Blur In`}),(0,r.jsx)(q,{onSelect:()=>a({type:`slideInLeft`}),children:`Slide In (Esquerda)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`slideInRight`}),children:`Slide In (Direita)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`slideInUp`}),children:`Slide In (Cima)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`slideInDown`}),children:`Slide In (Baixo)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`zoomIn`}),children:`Zoom In`}),(0,r.jsx)(q,{onSelect:()=>a({type:`bounceIn`}),children:`Bounce In`}),(0,r.jsx)(q,{onSelect:()=>a({type:`pulse`}),children:`Pulse (Atenção)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`shake`}),children:`Shake (Atenção)`}),(0,r.jsx)(q,{onSelect:()=>a({type:`spin`}),children:`Spin (Loop)`})]})]})]}),i.type!==`none`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Duração (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0.1`,value:i.duration,onChange:e=>a({duration:parseFloat(e.target.value)||.5})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Atraso (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0`,value:i.delay,onChange:e=>a({delay:parseFloat(e.target.value)||0})})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Curva de Tempo`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(i.timingFunction||`ease`)===`linear`?`Linear`:(i.timingFunction||`ease`)===`ease-in`?`Ease In`:(i.timingFunction||`ease`)===`ease-out`?`Ease Out`:(i.timingFunction||`ease`)===`ease-in-out`?`Ease In Out`:(i.timingFunction||`ease`)===`bounce`?`Bounce`:`Ease`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`linear`}),children:`Linear`}),(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`ease`}),children:`Ease`}),(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`ease-in`}),children:`Ease In`}),(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`ease-out`}),children:`Ease Out`}),(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`ease-in-out`}),children:`Ease In Out`}),(0,r.jsx)(q,{onSelect:()=>a({timingFunction:`bounce`}),children:`Bounce`})]})]})]}),[`pulse`,`shake`,`spin`].includes(i.type)&&(0,r.jsx)(W,{children:(0,r.jsxs)(G,{align:`center`,gap:`2`,mt:`2`,children:[(0,r.jsx)(ib,{checked:i.iterationCount===`infinite`,onCheckedChange:e=>a({iterationCount:e?`infinite`:1})}),(0,r.jsx)(U,{size:`2`,children:`Repetir Infinitamente`})]})})]})]})},aP=({element:e,updateElement:t})=>{let{portalContainer:n}=rS(),i=e.formatting||{type:`text`},a=n=>{t(e.id,{formatting:{...i,...n}})};return(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(e.type===`text`||e.type===`text-container`)&&(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{align:`center`,gap:`2`,mb:`3`,children:[(0,r.jsx)(ib,{checked:e.autoGrow||!1,onCheckedChange:n=>t(e.id,{autoGrow:n})}),(0,r.jsx)(U,{size:`2`,children:e.type===`text-container`?`Expandir container automaticamente`:`Expandir altura automaticamente`})]}),e.type===`text-container`&&e.autoGrow&&(0,r.jsxs)(W,{mb:`3`,ml:`4`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Direção de Expansão`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(e.containerExpansion||`vertical`)===`vertical`?`Vertical (Altura Cresce)`:`Horizontal (Largura Cresce)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>t(e.id,{containerExpansion:`vertical`}),children:`Vertical (Altura Cresce)`}),(0,r.jsx)(q,{onSelect:()=>t(e.id,{containerExpansion:`horizontal`}),children:`Horizontal (Largura Cresce)`})]})]})]}),(0,r.jsx)(Qy,{size:`4`,mb:`2`})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tipo de Formatação`}),(0,r.jsxs)(Wy,{value:i.type,onValueChange:e=>a({type:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`text`,children:`Texto (Padrão)`}),(0,r.jsx)(Y,{value:`boolean`,children:`Booleano (Sim/Não)`}),(0,r.jsx)(Y,{value:`date`,children:`Data`}),(0,r.jsx)(Y,{value:`number`,children:`Número / Moeda`})]})]})]}),i.type===`boolean`&&(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Texto para Verdadeiro`}),(0,r.jsx)(X,{placeholder:`Ex: Sim`,value:i.trueLabel||``,onChange:e=>a({trueLabel:e.target.value})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Texto para Falso`}),(0,r.jsx)(X,{placeholder:`Ex: Não`,value:i.falseLabel||``,onChange:e=>a({falseLabel:e.target.value})})]})]}),i.type===`date`&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Formato da Data`}),(0,r.jsx)(X,{placeholder:`Ex: DD/MM/YYYY`,value:i.dateFormat||``,onChange:e=>a({dateFormat:e.target.value})}),(0,r.jsx)(U,{size:`1`,color:`gray`,mt:`1`,style:{fontSize:10},children:`Use DD, MM, YYYY, HH, mm, ss.`})]}),i.type===`number`&&(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Estilo`}),(0,r.jsxs)(Wy,{value:i.numberFormat||`decimal`,onValueChange:e=>a({numberFormat:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`decimal`,children:`Decimal`}),(0,r.jsx)(Y,{value:`currency`,children:`Moeda`}),(0,r.jsx)(Y,{value:`percent`,children:`Porcentagem`})]})]})]}),i.numberFormat===`currency`&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Símbolo da Moeda`}),(0,r.jsx)(X,{placeholder:`Ex: R$`,value:i.currencySymbol||``,onChange:e=>a({currencySymbol:e.target.value})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Casas Decimais`}),(0,r.jsx)(X,{type:`number`,placeholder:`2`,value:i.decimalPlaces===void 0?``:i.decimalPlaces,onChange:e=>a({decimalPlaces:parseInt(e.target.value)||0})})]})]})]})},oP=({element:e,updateElement:n})=>{let i=e.style||{},[a,o]=(0,t.useState)(i.borderTopLeftRadius!==void 0||i.borderTopRightRadius!==void 0||i.borderBottomRightRadius!==void 0||i.borderBottomLeftRadius!==void 0),s=t=>{n(e.id,{style:{...i,...t}})},c=(e,t)=>{let n=typeof e==`number`?e:parseInt(e)||0;s({[t]:`${n}px`})};return(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{align:`center`,justify:`between`,mb:`2`,children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,children:`Arredondamento`}),(0,r.jsxs)(G,{align:`center`,gap:`2`,children:[(0,r.jsx)(U,{size:`1`,children:`Individual`}),(0,r.jsx)(ib,{checked:a,onCheckedChange:e=>{if(o(e),!e)s({borderRadius:i.borderTopLeftRadius||i.borderRadius||0,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomRightRadius:void 0,borderBottomLeftRadius:void 0});else{let e=i.borderRadius||0;s({borderRadius:void 0,borderTopLeftRadius:e,borderTopRightRadius:e,borderBottomRightRadius:e,borderBottomLeftRadius:e})}}})]})]}),a?(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Sup. Esq.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderTopLeftRadius)||0,onChange:e=>c(e.target.value,`borderTopLeftRadius`)})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Sup. Dir.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderTopRightRadius)||0,onChange:e=>c(e.target.value,`borderTopRightRadius`)})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Inf. Esq.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderBottomLeftRadius)||0,onChange:e=>c(e.target.value,`borderBottomLeftRadius`)})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Inf. Dir.`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderBottomRightRadius)||0,onChange:e=>c(e.target.value,`borderBottomRightRadius`)})]})]}):(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Raio (Todos os cantos)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.borderRadius)||0,onChange:e=>s({borderRadius:`${parseInt(e.target.value)||0}px`})})]})]}),(0,r.jsx)(Qy,{size:`4`,my:`2`}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,children:`Espaçamento Interno`}),(0,r.jsx)(Lv,{columns:`2`,gap:`3`,children:(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Tamanho (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:parseInt(i.padding)||0,onChange:e=>s({padding:`${parseInt(e.target.value)||0}px`})})]})})]}),(0,r.jsx)(Qy,{size:`4`,my:`2`}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,children:`Sombra (Box Shadow)`}),(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Cor`}),(0,r.jsx)(nP,{color:sP(i.boxShadow),onChange:e=>s({boxShadow:uP(i.boxShadow,e)})})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Blur (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,value:cP(i.boxShadow),onChange:e=>s({boxShadow:dP(i.boxShadow,parseInt(e.target.value)||0)})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,color:`gray`,children:`Spread (px)`}),(0,r.jsx)(X,{type:`number`,value:lP(i.boxShadow),onChange:e=>s({boxShadow:fP(i.boxShadow,parseInt(e.target.value)||0)})})]})]}),(0,r.jsx)(K,{variant:`soft`,color:`gray`,size:`1`,onClick:()=>s({boxShadow:i.boxShadow?void 0:`0 4px 12px 0 rgba(0,0,0,0.15)`}),children:i.boxShadow?`Remover Sombra`:`Adicionar Sombra`})]})]})]})};var sP=e=>{if(!e||e===`none`)return`#0000001a`;let t=e.match(/(?:rgba?\([^)]+\)|#[0-9a-fA-F]{3,8}|[a-zA-Z]+)\s*$/);return t?t[0].trim():`#0000001a`},cP=e=>{if(!e||e===`none`)return 12;let t=e.match(/(-?\d+(?:\.\d+)?)(?:px)?/g);return t&&t.length>=3?parseFloat(t[2]):12},lP=e=>{if(!e||e===`none`)return 0;let t=e.match(/(-?\d+(?:\.\d+)?)(?:px)?/g);return t&&t.length>=4?parseFloat(t[3]):0},uP=(e,t)=>{let n=cP(e),r=lP(e);return`${e?.includes(`inset`)?`inset `:``}0px 4px ${n}px ${r}px ${t}`},dP=(e,t)=>{let n=(e||`0 4px 12px 0 #0000001a`).match(/(-?\d+(?:\.\d+)?)(?:px)?/g)||[`0`,`4`,`12`,`0`],r=sP(e);return`${e?.includes(`inset`)?`inset `:``}${n[0]||0}px ${n[1]||4}px ${t}px ${n[3]||0}px ${r}`},fP=(e,t)=>{let n=(e||`0 4px 12px 0 #0000001a`).match(/(-?\d+(?:\.\d+)?)(?:px)?/g)||[`0`,`4`,`12`,`0`],r=sP(e);return`${e?.includes(`inset`)?`inset `:``}${n[0]||0}px ${n[1]||4}px ${n[2]||12}px ${t}px ${r}`},pP=[{key:`color`,label:`Cor do texto`},{key:`backgroundColor`,label:`Cor de fundo`},{key:`borderColor`,label:`Cor da borda`},{key:`boxShadowColor`,label:`Cor da sombra`}];let mP=({element:e,updateElement:t,availableProps:n})=>{let{portalContainer:i}=rS(),a=e.styleBindings||{},o=(n,r)=>{let i={...a};r?i[n]=r:delete i[n],t(e.id,{styleBindings:Object.keys(i).length>0?i:void 0})};return(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,children:`Vínculos de Estilo (Data Binding)`}),(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`2`,children:`Vincule propriedades de estilo a variáveis de dados. O valor da variável será aplicado em tempo real (ex.: cores em formato #RRGGBB, rgba(), etc.).`}),pP.map(({key:e,label:t})=>(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:t}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[a[e]?n.find(t=>t.dataName===a[e])?.name||a[e]:`Nenhum`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...i&&{container:i},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>o(e,null),children:`Nenhum`}),n.map(t=>(0,r.jsx)(q,{onSelect:()=>o(e,t.dataName),children:t.name},t.dataName)),n.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]})]},e))]})},hP=({element:e,updateElement:t,availableProps:n})=>{let{portalContainer:i}=rS(),a=e.conditions||[],o=()=>{let r={id:crypto.randomUUID(),property:n.length>0?n[0].dataName:``,operator:`equals`,value:``,style:{color:`#ff0000`}};t(e.id,{conditions:[...a,r]})},s=n=>{t(e.id,{conditions:a.filter(e=>e.id!==n)})},c=(n,r)=>{t(e.id,{conditions:a.map(e=>e.id===n?{...e,...r}:e)})};return(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,children:[(0,r.jsx)(U,{size:`2`,color:`gray`,children:`Regras de Exibição`}),(0,r.jsxs)(K,{size:`1`,variant:`soft`,onClick:o,children:[(0,r.jsx)(pt,{}),` Nova Regra`]})]}),a.length===0?(0,r.jsx)(U,{size:`1`,color:`gray`,style:{fontStyle:`italic`},children:`Nenhuma regra condicional definida.`}):(0,r.jsx)(G,{direction:`column`,gap:`2`,children:a.map(e=>(0,r.jsxs)(W,{style:{border:`1px solid var(--gray-6)`,borderRadius:4,padding:8},children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,mb:`2`,children:[(0,r.jsxs)(U,{size:`1`,weight:`bold`,children:[`Se `,e.property,`...`]}),(0,r.jsx)(J,{size:`1`,color:`red`,variant:`ghost`,onClick:()=>s(e.id),children:(0,r.jsx)(Yt,{})})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[n.find(t=>t.dataName===e.property)?.name||e.property||`Propriedade`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...i&&{container:i},style:{zIndex:1e5},children:[n.map(t=>(0,r.jsx)(q,{onSelect:()=>c(e.id,{property:t.dataName}),children:t.name},t.dataName)),n.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`},children:[e.operator===`equals`?`Igual a`:e.operator===`notEquals`?`Diferente de`:e.operator===`contains`?`Contém`:e.operator===`greaterThan`?`Maior que`:`Menor que`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...i&&{container:i},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>c(e.id,{operator:`equals`}),children:`Igual a`}),(0,r.jsx)(q,{onSelect:()=>c(e.id,{operator:`notEquals`}),children:`Diferente de`}),(0,r.jsx)(q,{onSelect:()=>c(e.id,{operator:`contains`}),children:`Contém`}),(0,r.jsx)(q,{onSelect:()=>c(e.id,{operator:`greaterThan`}),children:`Maior que`}),(0,r.jsx)(q,{onSelect:()=>c(e.id,{operator:`lessThan`}),children:`Menor que`})]})]})]}),(0,r.jsx)(X,{size:`1`,placeholder:`Valor`,value:e.value,onChange:t=>c(e.id,{value:t.target.value})}),(0,r.jsxs)(W,{mt:`2`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor quando verdadeiro`}),(0,r.jsx)(nP,{color:e.style?.color||`#ff0000`,onChange:t=>c(e.id,{style:{...e.style,color:t}})})]})]},e.id))})]})};var gP=({title:e,isOpen:t,onToggle:n,children:i,onReset:a})=>(0,r.jsxs)(W,{style:{borderBottom:`1px solid var(--gray-4)`},children:[(0,r.jsxs)(G,{align:`center`,style:{width:`100%`},children:[(0,r.jsxs)(K,{variant:`ghost`,onClick:n,style:{flex:1,justifyContent:`space-between`,padding:`12px 8px`,borderRadius:0,height:`auto`,cursor:`pointer`,color:`var(--gray-12)`},children:[(0,r.jsx)(U,{weight:`bold`,size:`2`,children:e}),t?(0,r.jsx)(de,{}):(0,r.jsx)(pe,{})]}),a&&t&&(0,r.jsx)(bb,{content:`Resetar para padrão`,children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:e=>{e.stopPropagation(),a()},style:{marginRight:8},children:(0,r.jsx)(_t,{})})})]}),t&&(0,r.jsx)(W,{p:`3`,style:{backgroundColor:`var(--gray-2)`},children:i})]}),_P=`__`,vP=({value:e,onChange:n,units:i=[`px`,`%`,`em`,`rem`,`vw`,`vh`],min:a,max:o,placeholder:s,label:c,portalContainer:l})=>{let u=e=>e===``?_P:e,d=e=>e===_P?``:e,f=e=>{if(e==null||e===``)return{num:``,unit:i[0]};let t=String(e).match(/^(-?[\d.]+)([a-z%]+)?$/i);return t?{num:t[1],unit:t[2]||i[0]}:{num:``,unit:i[0]}},[p,m]=(0,t.useState)(f(e));(0,t.useEffect)(()=>{m(f(e))},[e]);let h=(e,t)=>{if(e===``){n(``);return}n(`${e}${t}`)};return(0,r.jsxs)(W,{children:[c&&(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:c}),(0,r.jsxs)(G,{children:[(0,r.jsx)(X,{type:`number`,value:p.num,onChange:e=>{let t=e.target.value;m({...p,num:t}),h(t,p.unit)},placeholder:s,style:{borderTopRightRadius:0,borderBottomRightRadius:0,flex:1},min:a,max:o}),(0,r.jsxs)(Wy,{value:u(p.unit),onValueChange:e=>{let t=d(e);m({...p,unit:t}),h(p.num,t)},children:[(0,r.jsx)(Gy,{style:{width:60,borderTopLeftRadius:0,borderBottomLeftRadius:0,marginLeft:-1}}),(0,r.jsx)(Ky,{...l&&{container:l},children:i.map(e=>(0,r.jsx)(Y,{value:u(e),children:e||s||`—`},e||_P))})]})]})]})},yP=({values:e,onChange:n,label:i,portalContainer:a})=>{let[o,s]=(0,t.useState)(!0),c=e=>{n({top:e,right:e,bottom:e,left:e})},l=(t,r)=>{n({...e,[t]:r})};return(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,mb:`1`,children:[i&&(0,r.jsx)(U,{size:`1`,color:`gray`,children:i}),(0,r.jsx)(bb,{content:o?`Desvincular lados`:`Vincular lados`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:o?`blue`:`gray`,onClick:()=>s(!o),children:o?(0,r.jsx)(bP,{}):(0,r.jsx)(xP,{})})})]}),o?(0,r.jsx)(vP,{portalContainer:a,value:e.top||``,onChange:c,placeholder:`Todos`}):(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,children:[(0,r.jsx)(vP,{portalContainer:a,value:e.top,onChange:e=>l(`top`,e),label:`Top`}),(0,r.jsx)(vP,{portalContainer:a,value:e.right,onChange:e=>l(`right`,e),label:`Right`}),(0,r.jsx)(vP,{portalContainer:a,value:e.bottom,onChange:e=>l(`bottom`,e),label:`Bottom`}),(0,r.jsx)(vP,{portalContainer:a,value:e.left,onChange:e=>l(`left`,e),label:`Left`})]})]})},bP=()=>(0,r.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,r.jsx)(`path`,{d:`M4.5 6.5L1.35355 9.64645C0.908293 10.0917 0.908293 10.8134 1.35355 11.2587L3.74132 13.6464C4.18658 14.0917 4.90829 14.0917 5.35355 13.6464L8.5 10.5M10.5 8.5L13.6464 5.35355C14.0917 4.90829 14.0917 4.18658 13.6464 3.74132L11.2587 1.35355C10.8134 0.908293 10.0917 0.908293 9.64645 1.35355L6.5 4.5M6.5 8.5H8.5`,stroke:`currentColor`})}),xP=()=>(0,r.jsx)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,r.jsx)(`path`,{d:`M4.5 6.5L1.35355 9.64645C0.908293 10.0917 0.908293 10.8134 1.35355 11.2587L3.74132 13.6464C4.18658 14.0917 4.90829 14.0917 5.35355 13.6464L8.5 10.5M10.5 8.5L13.6464 5.35355C14.0917 4.90829 14.0917 4.18658 13.6464 3.74132L11.2587 1.35355C10.8134 0.908293 10.0917 0.908293 9.64645 1.35355L6.5 4.5`,stroke:`currentColor`})});let SP=()=>{let{state:e,portalContainer:n,setPropertiesPanelOpen:i,updateElement:a,updateElements:o,removeSelected:s,copy:c,paste:l,addElement:u}=rS(),{isPropertiesPanelOpen:d,selectedElementIds:f,elements:p}=e,m=(0,t.useMemo)(()=>p.filter(e=>f.includes(e.id)),[p,f]),h=m[0],g=m.length>1,[_,v]=(0,t.useState)({content:!0,layout:!0,typography:!0,appearance:!1,borders:!1,effects:!1,transform:!1,animation:!1,conditions:!1,formatting:!1,spacing:!1}),[y,b]=(0,t.useState)(``),[x,S]=(0,t.useState)({});(0,t.useEffect)(()=>{let e=localStorage.getItem(`editor-presets`);if(e)try{S(JSON.parse(e))}catch(e){console.error(`Failed to load presets`,e)}},[]);let C=e=>{if(!h)return;let t={...x,[e]:{style:h.style}};S(t),localStorage.setItem(`editor-presets`,JSON.stringify(t))},w=e=>{let t=x[e];t&&t.style&&O(t.style)};if(!d||!h)return null;let T=e=>{v(t=>({...t,[e]:!t[e]}))},E=e=>{g?o(f.map(t=>({id:t,changes:e}))):a(h.id,e)},D=()=>{if(g)c(),l();else{let{id:e,...t}=h;u({...t,x:h.x+20,y:h.y+20})}},O=e=>{g?o(m.map(t=>({id:t.id,changes:{style:{...t.style,...e}}}))):a(h.id,{style:{...h.style,...e}})},k=e=>{let t={};e.forEach(e=>t[e]=void 0),O(t)},A=(e,t)=>{if(!y)return!0;let n=y.toLowerCase();return e.toLowerCase().includes(n)||t.some(e=>e.toLowerCase().includes(n))},j=e=>{if(!g)return e(h);let t=e(h);return m.every(n=>e(n)===t)?t:`Mixed`},M=(e,t=``)=>{let n=j(t=>t.style?.[e]);return n===`Mixed`?`Mixed`:n===void 0?t:n},N=String(M(`fontFamily`,`Arial`)),P=AS(N,e.availableFonts||[`Arial`]),I=()=>{let e=M(`fontWeight`,`normal`);return e===`Mixed`?`400`:kS(e,OS)},L=e=>{let t={x:0,y:4,blur:12,spread:0,color:`#0000001a`,inset:!1};if(!e||e===`none`)return t;let n=e.trim(),r=n.includes(`inset`),i=n.replace(`inset`,``).trim(),a=i.match(/(-?\d+(?:\.\d+)?)(?:px)?\s+(-?\d+(?:\.\d+)?)(?:px)?(?:\s+(\d+(?:\.\d+)?)(?:px)?)?(?:\s+(\d+(?:\.\d+)?)(?:px)?)?/);return a?{x:parseFloat(a[1]),y:parseFloat(a[2]),blur:a[3]?parseFloat(a[3]):0,spread:a[4]?parseFloat(a[4]):0,color:i.replace(a[0],``).trim()||t.color,inset:r}:t},ne=L(h.style?.boxShadow),ie=e=>{let t={...ne,...e};O({boxShadow:`${t.inset?`inset `:``}${t.x}px ${t.y}px ${t.blur}px ${t.spread}px ${t.color}`})};return(0,r.jsx)(ny,{open:d,onOpenChange:i,children:(0,r.jsxs)(iy,{...n&&{container:n},style:{maxWidth:500,width:`100%`,maxHeight:`85vh`,height:`100%`,padding:0,display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,r.jsxs)(W,{style:{borderBottom:`1px solid var(--gray-4)`},children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,p:`4`,pb:`2`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(ay,{style:{margin:0},children:`Propriedades`}),(0,r.jsx)(oy,{size:`1`,color:`gray`,children:g?`${m.length} selecionados`:h.name||`Elemento`})]}),(0,r.jsxs)(G,{gap:`2`,children:[(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,children:(0,r.jsx)(F,{})})}),(0,r.jsxs)(fy,{...n&&{container:n},children:[(0,r.jsx)(py,{children:`Presets`}),Object.keys(x).length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhum preset salvo`}),Object.keys(x).map(e=>(0,r.jsx)(q,{onSelect:t=>{t.preventDefault(),w(e)},onClick:()=>w(e),style:{cursor:`pointer`},children:e},e)),(0,r.jsx)(xy,{}),(0,r.jsxs)(q,{onSelect:e=>{e.preventDefault();let t=prompt(`Nome do novo preset:`);t&&C(t)},children:[(0,r.jsx)(pt,{style:{marginRight:8}}),` Salvar Atual`]})]})]}),(0,r.jsx)(sy,{children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,children:(0,r.jsx)(Te,{})})})]})]}),(0,r.jsxs)(G,{gap:`2`,px:`4`,pb:`3`,children:[(0,r.jsx)(bb,{content:`Bloquear`,children:(0,r.jsx)(J,{variant:`soft`,color:h.locked?`orange`:`gray`,onClick:()=>E({locked:!h.locked}),children:h.locked?(0,r.jsx)($e,{}):(0,r.jsx)(tt,{})})}),(0,r.jsx)(bb,{content:`Ocultar`,children:(0,r.jsx)(J,{variant:`soft`,color:h.hidden?`blue`:`gray`,onClick:()=>E({hidden:!h.hidden}),children:h.hidden?(0,r.jsx)(ze,{}):(0,r.jsx)(Ve,{})})}),(0,r.jsx)(bb,{content:`Duplicar`,children:(0,r.jsx)(J,{variant:`soft`,color:`gray`,onClick:D,children:(0,r.jsx)(Ce,{})})}),(0,r.jsx)(W,{style:{flex:1}}),(0,r.jsx)(bb,{content:`Excluir`,children:(0,r.jsx)(J,{variant:`soft`,color:`red`,onClick:()=>{s(),i(!1)},children:(0,r.jsx)(Yt,{})})})]})]}),(0,r.jsx)(W,{p:`3`,style:{borderBottom:`1px solid var(--gray-4)`,backgroundColor:`var(--gray-1)`},children:(0,r.jsx)(X,{placeholder:`Buscar...`,value:y,onChange:e=>b(e.target.value),children:(0,r.jsx)(_b,{children:(0,r.jsx)(at,{height:`16`,width:`16`})})})}),(0,r.jsxs)(W,{style:{flex:1,overflowY:`auto`,overflowX:`hidden`},children:[A(`Conteúdo`,[`text`,`image`,`url`,`value`,`content`])&&(h.type===`text`||h.type===`text-container`||h.type===`image`)&&(0,r.jsx)(gP,{title:`Conteúdo`,isOpen:_.content,onToggle:()=>T(`content`),children:(0,r.jsxs)(W,{children:[(h.type===`text`||h.type===`text-container`)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Texto`}),(0,r.jsx)(pb,{value:h.content||``,onChange:e=>E({content:e.target.value}),rows:4,placeholder:`Texto ou {{variavel}}...`})]}),h.type===`image`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Vínculo de Propriedade`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,size:`1`,style:{width:`100%`,justifyContent:`space-between`,marginBottom:8},children:[h.dataBinding?e.availableProps.find(e=>e.dataName===h.dataBinding)?.name||h.dataBinding:`Nenhum (URL fixa)`,(0,r.jsx)(de,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>E({dataBinding:void 0}),children:`Nenhum (URL fixa)`}),(e.availableProps||[]).map(e=>(0,r.jsx)(q,{onSelect:()=>E({dataBinding:e.dataName,content:`{{${e.dataName}}}`}),children:e.name},e.dataName))]})]}),(0,r.jsxs)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:[`URL ou `,`{{variável}}`]}),(0,r.jsx)(X,{value:h.content||``,onChange:e=>E({content:e.target.value}),placeholder:`https://... ou {{profilePicture}}`})]})]})}),A(`Tipografia`,[`font`,`text`,`color`,`align`,`size`,`weight`,`transform`,`decoration`])&&(0,r.jsx)(gP,{title:`Tipografia`,isOpen:_.typography,onToggle:()=>T(`typography`),onReset:()=>k([`fontFamily`,`fontSize`,`fontWeight`,`color`,`textAlign`,`fontStyle`,`textDecoration`,`textTransform`,`lineHeight`,`letterSpacing`]),children:(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Família da Fonte`}),(0,r.jsxs)(Wy,{value:N,onValueChange:e=>O({fontFamily:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`},placeholder:`Selecione...`}),(0,r.jsx)(Ky,{...n&&{container:n},style:{zIndex:1e5},children:P.map(e=>(0,r.jsx)(Y,{value:e,children:e},e))})]})]}),(0,r.jsx)(vP,{portalContainer:n,label:`Tamanho`,value:M(`fontSize`,`16px`),onChange:e=>O({fontSize:e})}),(0,r.jsx)(vP,{portalContainer:n,label:`Altura da Linha`,value:M(`lineHeight`,`normal`),onChange:e=>O({lineHeight:e}),units:[``,`px`,`em`,`%`],placeholder:`Normal`}),(0,r.jsx)(vP,{portalContainer:n,label:`Espaçamento`,value:M(`letterSpacing`,`normal`),onChange:e=>O({letterSpacing:e}),units:[`px`,`em`],placeholder:`Normal`}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Peso`}),(0,r.jsxs)(Wy,{value:I(),onValueChange:e=>O({fontWeight:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`},placeholder:`Normal`}),(0,r.jsxs)(Ky,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(Y,{value:`100`,children:`100 - Thin`}),(0,r.jsx)(Y,{value:`300`,children:`300 - Light`}),(0,r.jsx)(Y,{value:`400`,children:`400 - Normal`}),(0,r.jsx)(Y,{value:`500`,children:`500 - Medium`}),(0,r.jsx)(Y,{value:`600`,children:`600 - Semi Bold`}),(0,r.jsx)(Y,{value:`700`,children:`700 - Bold`}),(0,r.jsx)(Y,{value:`900`,children:`900 - Black`}),(0,r.jsx)(Y,{value:`normal`,children:`Normal`}),(0,r.jsx)(Y,{value:`bold`,children:`Bold`})]})]})]}),(0,r.jsx)(W,{style:{gridColumn:`span 2`},children:(0,r.jsxs)(G,{justify:`between`,align:`center`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(G,{gap:`1`,children:[(0,r.jsx)(J,{variant:M(`fontStyle`)===`italic`?`solid`:`soft`,onClick:()=>O({fontStyle:M(`fontStyle`)===`italic`?`normal`:`italic`}),children:(0,r.jsx)(Ge,{})}),(0,r.jsx)(J,{variant:M(`textDecoration`)===`underline`?`solid`:`soft`,onClick:()=>O({textDecoration:M(`textDecoration`)===`underline`?`none`:`underline`}),children:(0,r.jsx)(Zt,{})}),(0,r.jsx)(J,{variant:M(`textDecoration`)===`line-through`?`solid`:`soft`,onClick:()=>O({textDecoration:M(`textDecoration`)===`line-through`?`none`:`line-through`}),children:(0,r.jsx)(Nt,{})})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transformação`}),(0,r.jsxs)(Wy,{value:M(`textTransform`,`none`),onValueChange:e=>O({textTransform:e}),children:[(0,r.jsx)(Gy,{style:{width:100}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`none`,children:`Nenhum`}),(0,r.jsx)(Y,{value:`uppercase`,children:`MAIÚSCULA`}),(0,r.jsx)(Y,{value:`lowercase`,children:`minúscula`}),(0,r.jsx)(Y,{value:`capitalize`,children:`Capitalizada`})]})]})]})]})}),(0,r.jsxs)(W,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento`}),(0,r.jsxs)(Ly,{value:M(`textAlign`,`left`),onValueChange:e=>O({textAlign:e}),children:[(0,r.jsx)(Ry,{value:`left`,children:(0,r.jsx)(Ut,{})}),(0,r.jsx)(Ry,{value:`center`,children:(0,r.jsx)(zt,{})}),(0,r.jsx)(Ry,{value:`right`,children:(0,r.jsx)(Gt,{})}),(0,r.jsx)(Ry,{value:`justify`,children:(0,r.jsx)(Vt,{})})]})]}),(0,r.jsxs)(W,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor do Texto`}),(0,r.jsx)(nP,{color:M(`color`,`#000000`),onChange:e=>O({color:e})})]})]})}),A(`Aparência`,[`background`,`opacity`,`blend`,`cursor`])&&(0,r.jsxs)(gP,{title:`Aparência`,isOpen:_.appearance,onToggle:()=>T(`appearance`),onReset:()=>k([`backgroundColor`,`backgroundImage`,`backgroundSize`,`opacity`,`mixBlendMode`,`cursor`]),children:[(0,r.jsxs)(sb,{defaultValue:`solid`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`solid`,children:`Sólido`}),(0,r.jsx)(lb,{value:`gradient`,children:`Gradiente`}),(0,r.jsx)(lb,{value:`image`,children:`Imagem`})]}),(0,r.jsxs)(W,{pt:`3`,children:[(0,r.jsxs)(ub,{value:`solid`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor de Fundo`}),(0,r.jsx)(nP,{color:M(`backgroundColor`,`transparent`),onChange:e=>O({backgroundColor:e,backgroundImage:`none`})})]}),(0,r.jsxs)(ub,{value:`gradient`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`CSS Gradient`}),(0,r.jsx)(pb,{value:M(`backgroundImage`,``),onChange:e=>O({backgroundImage:e.target.value}),placeholder:`linear-gradient(to right, red, blue)`,rows:3})]}),(0,r.jsxs)(ub,{value:`image`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`URL da Imagem`}),(0,r.jsx)(X,{value:M(`backgroundImage`,``).replace(/url\(['"]?(.*?)['"]?\)/,`$1`),onChange:e=>O({backgroundImage:`url('${e.target.value}')`}),placeholder:`https://...`,mb:`2`}),(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Tamanho`}),(0,r.jsxs)(Wy,{value:M(`backgroundSize`,`auto`),onValueChange:e=>O({backgroundSize:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`auto`,children:`Auto`}),(0,r.jsx)(Y,{value:`cover`,children:`Cobrir (Cover)`}),(0,r.jsx)(Y,{value:`contain`,children:`Conter (Contain)`}),(0,r.jsx)(Y,{value:`100% 100%`,children:`Esticar`})]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Repetição`}),(0,r.jsxs)(Wy,{value:M(`backgroundRepeat`,`repeat`),onValueChange:e=>O({backgroundRepeat:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`repeat`,children:`Repetir`}),(0,r.jsx)(Y,{value:`no-repeat`,children:`Não Repetir`}),(0,r.jsx)(Y,{value:`repeat-x`,children:`Horizontal`}),(0,r.jsx)(Y,{value:`repeat-y`,children:`Vertical`})]})]})]})]})]})]})]}),(0,r.jsxs)(W,{mt:`3`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Opacidade`}),(0,r.jsxs)(G,{align:`center`,gap:`2`,children:[(0,r.jsx)(tb,{min:0,max:1,step:.05,value:[parseFloat(M(`opacity`,`1`))],onValueChange:([e])=>O({opacity:e}),style:{flex:1}}),(0,r.jsxs)(U,{size:`1`,children:[Math.round(parseFloat(M(`opacity`,`1`))*100),`%`]})]})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,mt:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Blend Mode`}),(0,r.jsxs)(Wy,{value:M(`mixBlendMode`,`normal`),onValueChange:e=>O({mixBlendMode:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`normal`,children:`Normal`}),(0,r.jsx)(Y,{value:`multiply`,children:`Multiply`}),(0,r.jsx)(Y,{value:`screen`,children:`Screen`}),(0,r.jsx)(Y,{value:`overlay`,children:`Overlay`}),(0,r.jsx)(Y,{value:`darken`,children:`Darken`}),(0,r.jsx)(Y,{value:`lighten`,children:`Lighten`})]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cursor`}),(0,r.jsxs)(Wy,{value:M(`cursor`,`auto`),onValueChange:e=>O({cursor:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`auto`,children:`Auto`}),(0,r.jsx)(Y,{value:`default`,children:`Padrão`}),(0,r.jsx)(Y,{value:`pointer`,children:`Mãozinha`}),(0,r.jsx)(Y,{value:`text`,children:`Texto`}),(0,r.jsx)(Y,{value:`move`,children:`Mover`}),(0,r.jsx)(Y,{value:`not-allowed`,children:`Bloqueado`})]})]})]})]})]}),A(`Layout`,[`width`,`height`,`x`,`y`,`z-index`,`overflow`])&&(0,r.jsx)(gP,{title:`Layout & Dimensões`,isOpen:_.layout,onToggle:()=>T(`layout`),onReset:()=>E({width:100,height:100,x:0,y:0,style:{...h.style,zIndex:void 0,overflow:void 0}}),children:(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsx)(vP,{portalContainer:n,label:`Largura`,value:h.width,onChange:e=>E({width:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Altura`,value:h.height,onChange:e=>E({height:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Posição X`,value:h.x,onChange:e=>E({x:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Posição Y`,value:h.y,onChange:e=>E({y:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Z-Index`,value:M(`zIndex`,`auto`),onChange:e=>O({zIndex:e===``?void 0:parseInt(e)}),units:[``],placeholder:`Auto`}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Overflow`}),(0,r.jsxs)(Wy,{value:M(`overflow`,`visible`),onValueChange:e=>O({overflow:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`visible`,children:`Visível`}),(0,r.jsx)(Y,{value:`hidden`,children:`Oculto`}),(0,r.jsx)(Y,{value:`scroll`,children:`Scroll`}),(0,r.jsx)(Y,{value:`auto`,children:`Auto`})]})]})]})]})}),A(`Espaçamento`,[`padding`,`margin`])&&(0,r.jsxs)(gP,{title:`Espaçamento (Margin/Padding)`,isOpen:_.spacing,onToggle:()=>T(`spacing`),onReset:()=>k([`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`]),children:[(0,r.jsx)(W,{mb:`3`,children:(0,r.jsx)(yP,{portalContainer:n,label:`Padding (Interno)`,values:{top:M(`paddingTop`,M(`padding`)),right:M(`paddingRight`,M(`padding`)),bottom:M(`paddingBottom`,M(`padding`)),left:M(`paddingLeft`,M(`padding`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?O({padding:e.top,paddingTop:void 0,paddingRight:void 0,paddingBottom:void 0,paddingLeft:void 0}):O({padding:void 0,paddingTop:e.top,paddingRight:e.right,paddingBottom:e.bottom,paddingLeft:e.left})}})}),(0,r.jsx)(W,{children:(0,r.jsx)(yP,{portalContainer:n,label:`Margin (Externo)`,values:{top:M(`marginTop`,M(`margin`)),right:M(`marginRight`,M(`margin`)),bottom:M(`marginBottom`,M(`margin`)),left:M(`marginLeft`,M(`margin`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?O({margin:e.top,marginTop:void 0,marginRight:void 0,marginBottom:void 0,marginLeft:void 0}):O({margin:void 0,marginTop:e.top,marginRight:e.right,marginBottom:e.bottom,marginLeft:e.left})}})})]}),A(`Bordas`,[`border`,`radius`,`stroke`])&&(0,r.jsxs)(gP,{title:`Bordas & Cantos`,isOpen:_.borders,onToggle:()=>T(`borders`),onReset:()=>k([`border`,`borderWidth`,`borderStyle`,`borderColor`,`borderRadius`,`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`]),children:[(0,r.jsxs)(sb,{defaultValue:`all`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`all`,children:(0,r.jsx)(ee,{})}),(0,r.jsx)(lb,{value:`top`,children:(0,r.jsx)(se,{})}),(0,r.jsx)(lb,{value:`right`,children:(0,r.jsx)(ae,{})}),(0,r.jsx)(lb,{value:`bottom`,children:(0,r.jsx)(te,{})}),(0,r.jsx)(lb,{value:`left`,children:(0,r.jsx)(re,{})})]}),(0,r.jsx)(W,{pt:`3`,children:(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(Wy,{value:M(`borderStyle`,`none`),onValueChange:e=>O({borderStyle:e}),children:[(0,r.jsx)(Gy,{style:{width:`100%`}}),(0,r.jsxs)(Ky,{...n&&{container:n},children:[(0,r.jsx)(Y,{value:`none`,children:`Nenhuma`}),(0,r.jsx)(Y,{value:`solid`,children:`Sólida`}),(0,r.jsx)(Y,{value:`dashed`,children:`Tracejada`}),(0,r.jsx)(Y,{value:`dotted`,children:`Pontilhada`}),(0,r.jsx)(Y,{value:`double`,children:`Dupla`})]})]})]}),(0,r.jsx)(vP,{portalContainer:n,label:`Espessura`,value:M(`borderWidth`,`0px`),onChange:e=>O({borderWidth:e})}),(0,r.jsxs)(W,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor`}),(0,r.jsx)(nP,{color:M(`borderColor`,`#000000`),onChange:e=>O({borderColor:e})})]})]})})]}),(0,r.jsx)(W,{mt:`3`,children:(0,r.jsx)(yP,{portalContainer:n,label:`Arredondamento (Radius)`,values:{top:M(`borderTopLeftRadius`,M(`borderRadius`)),right:M(`borderTopRightRadius`,M(`borderRadius`)),bottom:M(`borderBottomRightRadius`,M(`borderRadius`)),left:M(`borderBottomLeftRadius`,M(`borderRadius`))},onChange:e=>{e.top===e.right&&e.right===e.bottom&&e.bottom===e.left?O({borderRadius:e.top,borderTopLeftRadius:void 0,borderTopRightRadius:void 0,borderBottomRightRadius:void 0,borderBottomLeftRadius:void 0}):O({borderRadius:void 0,borderTopLeftRadius:e.top,borderTopRightRadius:e.right,borderBottomRightRadius:e.bottom,borderBottomLeftRadius:e.left})}})})]}),A(`Efeitos`,[`shadow`,`sombra`])&&(0,r.jsx)(gP,{title:`Efeitos (Sombra)`,isOpen:_.effects,onToggle:()=>T(`effects`),onReset:()=>k([`boxShadow`,`textShadow`]),children:(0,r.jsxs)(sb,{defaultValue:`box`,children:[(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`box`,children:`Box Shadow`}),(0,r.jsx)(lb,{value:`text`,children:`Text Shadow`})]}),(0,r.jsxs)(W,{pt:`3`,children:[(0,r.jsx)(ub,{value:`box`,children:(0,r.jsxs)(W,{p:`2`,style:{backgroundColor:`var(--gray-3)`,borderRadius:`var(--radius-2)`},children:[(0,r.jsxs)(G,{justify:`between`,mb:`2`,children:[(0,r.jsx)(U,{size:`1`,weight:`bold`,children:`Box Shadow`}),(0,r.jsxs)(G,{gap:`2`,align:`center`,children:[(0,r.jsx)(U,{size:`1`,children:`Inset`}),(0,r.jsx)(`input`,{type:`checkbox`,checked:ne.inset,onChange:e=>ie({inset:e.target.checked})})]})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsx)(vP,{portalContainer:n,label:`X`,value:ne.x,onChange:e=>ie({x:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Y`,value:ne.y,onChange:e=>ie({y:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Blur`,value:ne.blur,onChange:e=>ie({blur:parseFloat(e)}),units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Spread`,value:ne.spread,onChange:e=>ie({spread:parseFloat(e)}),units:[`px`]})]}),(0,r.jsx)(nP,{color:ne.color,onChange:e=>ie({color:e})})]})}),(0,r.jsx)(ub,{value:`text`,children:(0,r.jsxs)(W,{p:`2`,style:{backgroundColor:`var(--gray-3)`,borderRadius:`var(--radius-2)`},children:[(0,r.jsx)(U,{size:`1`,weight:`bold`,mb:`2`,as:`div`,children:`Text Shadow`}),(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,mb:`2`,children:[(0,r.jsx)(vP,{portalContainer:n,label:`X`,value:L(M(`textShadow`,`none`)).x,onChange:e=>{let t=L(M(`textShadow`,`none`));O({textShadow:`${e}px ${t.y}px ${t.blur}px ${t.color}`})},units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Y`,value:L(M(`textShadow`,`none`)).y,onChange:e=>{let t=L(M(`textShadow`,`none`));O({textShadow:`${t.x}px ${e}px ${t.blur}px ${t.color}`})},units:[`px`]}),(0,r.jsx)(vP,{portalContainer:n,label:`Blur`,value:L(M(`textShadow`,`none`)).blur,onChange:e=>{let t=L(M(`textShadow`,`none`));O({textShadow:`${t.x}px ${t.y}px ${e}px ${t.color}`})},units:[`px`]})]}),(0,r.jsx)(nP,{color:L(M(`textShadow`,`none`)).color,onChange:e=>{let t=L(M(`textShadow`,`none`));O({textShadow:`${t.x}px ${t.y}px ${t.blur}px ${e}`})}})]})})]})]})}),A(`Transform`,[`scale`,`rotate`,`skew`,`translate`])&&(0,r.jsx)(gP,{title:`Transformação`,isOpen:_.transform,onToggle:()=>T(`transform`),onReset:()=>E({rotation:0,style:{...h.style,transform:void 0}}),children:(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsx)(vP,{portalContainer:n,label:`Rotação (deg)`,value:h.rotation,onChange:e=>E({rotation:parseFloat(e)}),units:[`deg`]}),(0,r.jsxs)(W,{style:{gridColumn:`span 2`},children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transform CSS (Scale, Skew, Translate)`}),(0,r.jsx)(X,{value:M(`transform`,``),onChange:e=>O({transform:e.target.value}),placeholder:`ex: scale(1.5) skewX(10deg)`}),(0,r.jsxs)(U,{size:`1`,color:`gray`,mt:`1`,children:[`Use sintaxe CSS padrão. Ex: `,(0,r.jsx)(`code`,{children:`scale(1.2)`}),`, `,(0,r.jsx)(`code`,{children:`skewY(10deg)`})]})]})]})}),!g&&(0,r.jsxs)(r.Fragment,{children:[A(`Animação`,[`animation`])&&(0,r.jsx)(gP,{title:`Animação`,isOpen:_.animation,onToggle:()=>T(`animation`),onReset:()=>E({animation:void 0}),children:(0,r.jsx)(iP,{element:h,updateElement:a})}),A(`Regras`,[`condition`])&&(0,r.jsx)(gP,{title:`Regras Condicionais`,isOpen:_.conditions,onToggle:()=>T(`conditions`),onReset:()=>E({conditions:[]}),children:(0,r.jsx)(hP,{element:h,updateElement:a,availableProps:e.availableProps||[]})}),A(`Formatação`,[`format`])&&(0,r.jsx)(gP,{title:`Formatação`,isOpen:_.formatting,onToggle:()=>T(`formatting`),onReset:()=>E({formatting:void 0}),children:(0,r.jsx)(aP,{element:h,updateElement:a})})]})]},h?.id??f.join(`,`))]})})};var CP=20,wP=`#f5f5f5`,TP=`#999`;let EP=({orientation:e})=>{let{state:n}=rS(),{zoom:i,pan:a}=n,o=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let t=o.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=t.width,s=t.height;n.fillStyle=wP,n.fillRect(0,0,r,s),n.fillStyle=TP,n.font=`10px sans-serif`,n.strokeStyle=TP,n.lineWidth=1;let c=e===`horizontal`?-a.x/i:-a.y/i,l=e===`horizontal`?(r-a.x)/i:(s-a.y)/i,u=100;u=i>2?10:i>.8?50:i>.4?100:200;let d=Math.floor(c/u)*u;n.beginPath();for(let t=d;t<l;t+=u){let r=t*i+(e===`horizontal`?a.x:a.y);e===`horizontal`?(n.moveTo(r,0),n.lineTo(r,CP),n.fillText(t.toString(),r+2,10)):(n.moveTo(0,r),n.lineTo(CP,r),n.save(),n.translate(10,r+2),n.rotate(-Math.PI/2),n.fillText(t.toString(),0,0),n.restore())}n.stroke()},[i,a,e,n.canvasHeight]),(0,t.useEffect)(()=>{let e=o.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.parentElement?.getBoundingClientRect();t&&(e.width=t.width,e.height=t.height)});return e.parentElement&&t.observe(e.parentElement),()=>t.disconnect()},[]),(0,r.jsx)(`canvas`,{ref:o,style:{width:`100%`,height:`100%`,display:`block`,pointerEvents:`none`}})};var DP=({icon:e,label:n,keys:i})=>(0,r.jsxs)(G,{align:`center`,justify:`between`,py:`2`,children:[(0,r.jsxs)(G,{align:`center`,gap:`2`,children:[(0,r.jsx)(W,{style:{color:`var(--gray-10)`},children:(0,r.jsx)(e,{})}),(0,r.jsx)(U,{size:`2`,children:n})]}),(0,r.jsx)(G,{gap:`1`,children:i.map((e,n)=>(0,r.jsxs)(t.default.Fragment,{children:[(0,r.jsx)(Ey,{children:e}),n<i.length-1&&(0,r.jsx)(U,{size:`1`,color:`gray`,children:`+`})]},n))})]});let OP=()=>{let{portalContainer:e}=rS();return(0,r.jsxs)(ny,{children:[(0,r.jsx)(ry,{children:(0,r.jsxs)(K,{variant:`solid`,color:`amber`,radius:`full`,style:{height:36,padding:`0 14px`,boxShadow:`0 4px 6px rgba(0,0,0,0.1)`},title:`Atalhos de Teclado`,children:[(0,r.jsx)(ht,{width:`18`,height:`18`}),`Ajuda`]})}),(0,r.jsxs)(iy,{...e&&{container:e},style:{maxWidth:700},onPointerDown:e=>e.stopPropagation(),children:[(0,r.jsx)(ay,{children:`Atalhos de Teclado`}),(0,r.jsx)(U,{size:`2`,color:`gray`,mb:`4`,as:`p`,children:`Agilize seu fluxo de trabalho com estes atalhos.`}),(0,r.jsxs)(Lv,{columns:{initial:`1`,sm:`2`},gap:`6`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,color:`blue`,children:`Edição Básica`}),(0,r.jsx)(Qy,{size:`4`,mb:`2`}),(0,r.jsx)(DP,{icon:Ft,label:`Desfazer`,keys:[`Ctrl`,`Z`]}),(0,r.jsx)(DP,{icon:Ft,label:`Refazer`,keys:[`Ctrl`,`Y`]}),(0,r.jsx)(DP,{icon:xe,label:`Copiar`,keys:[`Ctrl`,`C`]}),(0,r.jsx)(DP,{icon:xe,label:`Colar`,keys:[`Ctrl`,`V`]}),(0,r.jsx)(DP,{icon:Yt,label:`Excluir`,keys:[`Delete`]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,color:`blue`,children:`Navegação e Seleção`}),(0,r.jsx)(Qy,{size:`4`,mb:`2`}),(0,r.jsx)(DP,{icon:lt,label:`Mover Elemento`,keys:[`Setas`]}),(0,r.jsx)(DP,{icon:lt,label:`Mover Rápido`,keys:[`Shift`,`Setas`]}),(0,r.jsx)(DP,{icon:De,label:`Multiseleção`,keys:[`Shift`,`Click`]}),(0,r.jsx)(DP,{icon:Ct,label:`Mover Canvas (Pan)`,keys:[`Espaço`,`Arrastar`]}),(0,r.jsx)(DP,{icon:at,label:`Zoom`,keys:[`Ctrl`,`Scroll`]})]})]}),(0,r.jsx)(G,{justify:`end`,mt:`5`,children:(0,r.jsx)(sy,{children:(0,r.jsx)(K,{variant:`soft`,color:`gray`,children:`Fechar`})})})]})]})},kP=()=>{let{state:e,portalContainer:n,updateListSettings:i,setCanvasHeight:a,setGridSize:o}=rS(),[s,c]=(0,t.useState)(!1),[l,u]=(0,t.useState)(``),[d,f]=(0,t.useState)(`asc`),[p,m]=(0,t.useState)(`bottom`),[h,g]=(0,t.useState)(`down`),[_,v]=(0,t.useState)(`150`),[y,b]=(0,t.useState)(``),[x,S]=(0,t.useState)(`0`),[C,w]=(0,t.useState)(`slideIn`),[T,E]=(0,t.useState)(.3),[D,O]=(0,t.useState)(`ease-out`),k=t.default.useRef(!1);(0,t.useEffect)(()=>{if(s&&!k.current){k.current=!0,u(e.listSettings.sortProp||`__none__`),f(e.listSettings.sortOrder||`asc`),m(e.listSettings.newestPosition||`bottom`),g(e.listSettings.scrollDirection||`down`),b(e.listSettings.containerHeight?String(e.listSettings.containerHeight):``),v(String(e.canvasHeight||150)),S(String(e.gridSize||0));let t=e.listSettings.entryAnimation;w(t?.type||`slideIn`),E(t?.duration||.3),O(t?.timingFunction||`ease-out`)}s||(k.current=!1)},[s]),(0,t.useEffect)(()=>{if(!s)return;let e=parseInt(_,10);!isNaN(e)&&e>0&&a(e);let t=parseInt(x,10);!isNaN(t)&&t>=0&&o(t)},[_,x,s,a,o]);let A=()=>{let e=parseInt(y,10),t=parseInt(_,10),n=parseInt(x,10),r={type:C,duration:Number(T),delay:0,timingFunction:D};i({sortProp:l===`__none__`?``:l,sortOrder:d,newestPosition:p,scrollDirection:h,containerHeight:!isNaN(e)&&e>0?e:void 0,entryAnimation:r}),!isNaN(t)&&t>0&&a(t),!isNaN(n)&&n>=0&&o(n),c(!1)};return(0,r.jsxs)(ny,{open:s,onOpenChange:c,children:[(0,r.jsx)(ry,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`center`,cursor:`pointer`},children:[(0,r.jsx)(qe,{}),` Configurações`]})}),(0,r.jsxs)(iy,{...n&&{container:n},style:{maxWidth:600},children:[(0,r.jsx)(ay,{children:`Configurações do Editor`}),(0,r.jsx)(oy,{size:`2`,mb:`4`,children:`Configure o comportamento da lista.`}),(0,r.jsx)(W,{pt:`3`,children:(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,children:`Ordenação`}),(0,r.jsxs)(G,{gap:`3`,align:`center`,children:[(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Propriedade para Ordenar`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[l===`__none__`?`(Nenhum)`:e.availableProps.find(e=>e.dataName===l)?.name||l,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>u(`__none__`),children:`(Nenhum)`}),e.availableProps.map(e=>(0,r.jsx)(q,{onSelect:()=>u(e.dataName),children:e.name},e.dataName))]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Direção`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:150,justifyContent:`space-between`},children:[d===`asc`?`Crescente (A-Z)`:`Decrescente (Z-A)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>f(`asc`),children:`Crescente (A-Z)`}),(0,r.jsx)(q,{onSelect:()=>f(`desc`),children:`Decrescente (Z-A)`})]})]})]})]}),(0,r.jsxs)(G,{gap:`3`,align:`center`,children:[(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Posição do Recente`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[p===`top`?`Topo (Início)`:`Base (Final)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>m(`top`),children:`Topo (Início)`}),(0,r.jsx)(q,{onSelect:()=>m(`bottom`),children:`Base (Final)`})]})]})]}),(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Comportamento de Rolagem`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[h===`down`?`Descer (Padrão)`:`Subir (Chat)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>g(`down`),children:`Descer (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>g(`up`),children:`Subir (Chat)`})]})]})]})]}),(0,r.jsx)(U,{size:`2`,weight:`bold`,mt:`2`,children:`Dimensões`}),(0,r.jsxs)(G,{gap:`3`,align:`center`,children:[(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Altura do Item (Template) (px)`}),(0,r.jsx)(X,{type:`number`,min:`10`,value:_,onChange:e=>v(e.target.value)}),(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Altura de cada item individual na lista.`})]}),(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Altura da Lista (Container) (px)`}),(0,r.jsx)(X,{type:`number`,min:`0`,placeholder:`Auto (100%)`,value:y,onChange:e=>b(e.target.value)}),(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Altura total da lista. Se exceder, rola. Vazio = 100%.`})]})]}),(0,r.jsx)(U,{size:`2`,weight:`bold`,mt:`2`,children:`Animação de Entrada na Lista`}),(0,r.jsxs)(Lv,{columns:`3`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Efeito`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[C===`slideIn`?`Slide (Padrão)`:C===`smoothSlideUp`?`Slide Suave (Up)`:C===`fadeIn`?`Fade In`:C===`popIn`?`Pop In`:C===`blurIn`?`Blur In`:C===`slideInLeft`?`Slide (Esq)`:C===`slideInRight`?`Slide (Dir)`:C===`zoomIn`?`Zoom In`:C===`bounceIn`?`Bounce`:`Nenhum`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>w(`none`),children:`Nenhum`}),(0,r.jsx)(q,{onSelect:()=>w(`slideIn`),children:`Slide (Padrão)`}),(0,r.jsx)(q,{onSelect:()=>w(`smoothSlideUp`),children:`Slide Suave (Up)`}),(0,r.jsx)(q,{onSelect:()=>w(`fadeIn`),children:`Fade In`}),(0,r.jsx)(q,{onSelect:()=>w(`popIn`),children:`Pop In`}),(0,r.jsx)(q,{onSelect:()=>w(`blurIn`),children:`Blur In`}),(0,r.jsx)(q,{onSelect:()=>w(`slideInLeft`),children:`Slide (Esq)`}),(0,r.jsx)(q,{onSelect:()=>w(`slideInRight`),children:`Slide (Dir)`}),(0,r.jsx)(q,{onSelect:()=>w(`zoomIn`),children:`Zoom In`}),(0,r.jsx)(q,{onSelect:()=>w(`bounceIn`),children:`Bounce`})]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Duração (s)`}),(0,r.jsx)(X,{type:`number`,step:`0.1`,min:`0.1`,value:T,onChange:e=>E(parseFloat(e.target.value)||.3)})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Curva (Easing)`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[D===`ease-out`?`Ease Out`:D===`linear`?`Linear`:D===`bounce`?`Bounce`:`Ease`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>O(`ease`),children:`Ease`}),(0,r.jsx)(q,{onSelect:()=>O(`ease-out`),children:`Ease Out`}),(0,r.jsx)(q,{onSelect:()=>O(`linear`),children:`Linear`}),(0,r.jsx)(q,{onSelect:()=>O(`bounce`),children:`Bounce`})]})]})]})]}),(0,r.jsxs)(W,{mt:`2`,children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,children:`Grid Snapping (Travar)`}),(0,r.jsx)(G,{gap:`3`,align:`center`,mt:`2`,children:(0,r.jsxs)(W,{flexGrow:`1`,children:[(0,r.jsx)(U,{size:`1`,mb:`1`,as:`div`,children:`Tamanho do Grid (px) - 0 para desativar`}),(0,r.jsx)(X,{type:`number`,value:x,onChange:e=>S(e.target.value),placeholder:`0`})]})})]})]})}),(0,r.jsxs)(G,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(sy,{children:(0,r.jsx)(K,{variant:`soft`,color:`gray`,children:`Cancelar`})}),(0,r.jsx)(sy,{children:(0,r.jsx)(K,{onClick:A,children:`Salvar Alterações`})})]})]})]})},AP=({onClose:e})=>{let{state:t,jumpToHistory:n,undo:i,redo:a}=rS(),o=t=>{n(t),e&&e()};return(0,r.jsxs)(G,{direction:`column`,style:{width:`100%`},children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,p:`2`,style:{borderBottom:`1px solid var(--gray-5)`},children:[(0,r.jsxs)(G,{align:`center`,gap:`2`,children:[(0,r.jsx)(_t,{}),(0,r.jsx)(U,{size:`2`,weight:`bold`,children:`Histórico`})]}),(0,r.jsxs)(G,{gap:`2`,children:[(0,r.jsx)(K,{size:`1`,variant:`soft`,onClick:i,disabled:t.historyIndex<=0,children:`Desfazer`}),(0,r.jsx)(K,{size:`1`,variant:`soft`,onClick:a,disabled:t.historyIndex>=t.history.length-1,children:`Refazer`})]})]}),(0,r.jsx)(W,{p:`0`,children:t.history.map((e,n)=>{let i=n===t.historyIndex,a=n>t.historyIndex,s=t.historyDescriptions?.[n]||(n===0?`Estado Inicial`:`Alteração ${n}`);return(0,r.jsx)(W,{p:`2`,style:{backgroundColor:i?`var(--accent-3)`:`transparent`,opacity:a?.5:1,cursor:`pointer`,borderBottom:`1px solid var(--gray-3)`},onClick:()=>o(n),className:`history-item`,children:(0,r.jsxs)(G,{align:`center`,justify:`between`,children:[(0,r.jsx)(U,{size:`2`,weight:i?`bold`:`regular`,children:s}),i&&(0,r.jsx)(U,{size:`1`,color:`blue`,children:`Atual`})]})},n)})})]})};function jP(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,t.useMemo)(()=>e=>{n.forEach(t=>t(e))},n)}var MP=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function NP(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function PP(e){return`nodeType`in e}function FP(e){return e?NP(e)?e:PP(e)?e.ownerDocument?.defaultView??window:window:window}function IP(e){let{Document:t}=FP(e);return e instanceof t}function LP(e){return NP(e)?!1:e instanceof FP(e).HTMLElement}function RP(e){return e instanceof FP(e).SVGElement}function zP(e){return e?NP(e)?e.document:PP(e)?IP(e)?e:LP(e)||RP(e)?e.ownerDocument:document:document:document}var BP=MP?t.useLayoutEffect:t.useEffect;function VP(e){let n=(0,t.useRef)(e);return BP(()=>{n.current=e}),(0,t.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current==null?void 0:n.current(...t)},[])}function HP(){let e=(0,t.useRef)(null);return[(0,t.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,t.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function UP(e,n){n===void 0&&(n=[e]);let r=(0,t.useRef)(e);return BP(()=>{r.current!==e&&(r.current=e)},n),r}function WP(e,n){let r=(0,t.useRef)();return(0,t.useMemo)(()=>{let t=e(r.current);return r.current=t,t},[...n])}function GP(e){let n=VP(e),r=(0,t.useRef)(null);return[r,(0,t.useCallback)(e=>{e!==r.current&&n?.(e,r.current),r.current=e},[])]}function KP(e){let n=(0,t.useRef)();return(0,t.useEffect)(()=>{n.current=e},[e]),n.current}var qP={};function JP(e,n){return(0,t.useMemo)(()=>{if(n)return n;let t=qP[e]==null?0:qP[e]+1;return qP[e]=t,e+`-`+t},[e,n])}function YP(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var XP=YP(1),ZP=YP(-1);function QP(e){return`clientX`in e&&`clientY`in e}function $P(e){if(!e)return!1;let{KeyboardEvent:t}=FP(e.target);return t&&e instanceof t}function eF(e){if(!e)return!1;let{TouchEvent:t}=FP(e.target);return t&&e instanceof t}function tF(e){if(eF(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return QP(e)?{x:e.clientX,y:e.clientY}:null}var nF=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[nF.Translate.toString(e),nF.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),rF=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function iF(e){return e.matches(rF)?e:e.querySelector(rF)}var aF={display:`none`};function oF(e){let{id:n,value:r}=e;return t.default.createElement(`div`,{id:n,style:aF},r)}function sF(e){let{id:n,announcement:r,ariaLiveType:i=`assertive`}=e;return t.default.createElement(`div`,{id:n,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":i,"aria-atomic":!0},r)}function cF(){let[e,n]=(0,t.useState)(``);return{announce:(0,t.useCallback)(e=>{e!=null&&n(e)},[]),announcement:e}}var lF=(0,t.createContext)(null);function uF(e){let n=(0,t.useContext)(lF);(0,t.useEffect)(()=>{if(!n)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return n(e)},[e,n])}function dF(){let[e]=(0,t.useState)(()=>new Set),n=(0,t.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,t.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),n]}var fF={draggable:`
58
58
  To pick up a draggable item, press the space bar.
59
59
  While dragging, use the arrow keys to move the item.
60
60
  Press space again to drop the item in its new position, or press escape to cancel.
61
- `},pF={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function mF(e){let{announcements:r=pF,container:i,hiddenTextDescribedById:a,screenReaderInstructions:o=fF}=e,{announce:s,announcement:c}=cF(),l=JP(`DndLiveRegion`),[u,d]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{d(!0)},[]),uF((0,t.useMemo)(()=>({onDragStart(e){let{active:t}=e;s(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&s(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;s(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;s(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;s(r.onDragCancel({active:t,over:n}))}}),[s,r])),!u)return null;let f=t.default.createElement(t.default.Fragment,null,t.default.createElement(oF,{id:a,value:o.draggable}),t.default.createElement(sF,{id:l,announcement:c}));return i?(0,n.createPortal)(f,i):f}var hF;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(hF||={});function gF(){}function _F(e,n){return(0,t.useMemo)(()=>({sensor:e,options:n??{}}),[e,n])}function vF(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,t.useMemo)(()=>[...n].filter(e=>e!=null),[...n])}var yF=Object.freeze({x:0,y:0});function bF(e,t){let n=tF(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function xF(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function SF(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function CF(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var wF=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=CF(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(xF)};function TF(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function EF(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:yF}function DF(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var OF=DF(1);function kF(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function AF(e,t,n){let r=kF(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var jF={ignoreTransform:!1};function MF(e,t){t===void 0&&(t=jF);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=FP(e).getComputedStyle(e);t&&(n=AF(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function NF(e){return MF(e,{ignoreTransform:!0})}function PF(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function FF(e,t){return t===void 0&&(t=FP(e).getComputedStyle(e)),t.position===`fixed`}function IF(e,t){t===void 0&&(t=FP(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function LF(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(IP(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!LP(i)||RP(i)||n.includes(i))return n;let a=FP(e).getComputedStyle(i);return i!==e&&IF(i,a)&&n.push(i),FF(i,a)?n:r(i.parentNode)}return e?r(e):n}function RF(e){let[t]=LF(e,1);return t??null}function zF(e){return!MP||!e?null:NP(e)?e:PP(e)?IP(e)||e===zP(e).scrollingElement?window:LP(e)?e:null:null}function BF(e){return NP(e)?e.scrollX:e.scrollLeft}function VF(e){return NP(e)?e.scrollY:e.scrollTop}function HF(e){return{x:BF(e),y:VF(e)}}var UF;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(UF||={});function WF(e){return!MP||!e?!1:e===document.scrollingElement}function GF(e){let t={x:0,y:0},n=WF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var KF={x:.2,y:.2};function qF(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=KF);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=GF(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=UF.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=UF.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=UF.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=UF.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function JF(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function YF(e){return e.reduce((e,t)=>XP(e,HF(t)),yF)}function XF(e){return e.reduce((e,t)=>e+BF(t),0)}function ZF(e){return e.reduce((e,t)=>e+VF(t),0)}function QF(e,t){if(t===void 0&&(t=MF),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);RF(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var $F=[[`x`,[`left`,`right`],XF],[`y`,[`top`,`bottom`],ZF]],eI=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=LF(t),r=YF(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of $F)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},tI=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function nI(e){let{EventTarget:t}=FP(e);return e instanceof t?e:zP(e)}function rI(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var iI;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(iI||={});function aI(e){e.preventDefault()}function oI(e){e.stopPropagation()}var $;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})($||={});var sI={start:[$.Space,$.Enter],cancel:[$.Esc],end:[$.Space,$.Enter,$.Tab]},cI=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $.Right:return{...n,x:n.x+25};case $.Left:return{...n,x:n.x-25};case $.Down:return{...n,y:n.y+25};case $.Up:return{...n,y:n.y-25}}},lI=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new tI(zP(t)),this.windowListeners=new tI(FP(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(iI.Resize,this.handleCancel),this.windowListeners.add(iI.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(iI.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&QF(n),t(yF)}handleKeyDown(e){if($P(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=sI,coordinateGetter:a=cI,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:yF;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=ZP(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=GF(n),p=JF(n),m={x:Math.min(i===$.Right?p.right-p.width/2:p.right,Math.max(i===$.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===$.Down?p.bottom-p.height/2:p.bottom,Math.max(i===$.Down?p.top:p.top+p.height/2,u.y))},h=i===$.Right&&!s||i===$.Left&&!c,g=i===$.Down&&!l||i===$.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===$.Right&&e<=d.x||i===$.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===$.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===$.Down&&e<=d.y||i===$.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===$.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,XP(ZP(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};lI.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=sI,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function uI(e){return!!(e&&`distance`in e)}function dI(e){return!!(e&&`delay`in e)}var fI=class{constructor(e,t,n){n===void 0&&(n=nI(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=zP(i),this.documentListeners=new tI(this.document),this.listeners=new tI(n),this.windowListeners=new tI(FP(i)),this.initialCoordinates=tF(r)??yF,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(iI.Resize,this.handleCancel),this.windowListeners.add(iI.DragStart,aI),this.windowListeners.add(iI.VisibilityChange,this.handleCancel),this.windowListeners.add(iI.ContextMenu,aI),this.documentListeners.add(iI.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(dI(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(uI(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(iI.Click,oI,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(iI.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=tF(e)??yF,s=ZP(n,o);if(!t&&a){if(uI(a)){if(a.tolerance!=null&&rI(s,a.tolerance))return this.handleCancel();if(rI(s,a.distance))return this.handleStart()}if(dI(a)&&rI(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===$.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},pI={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},mI=class extends fI{constructor(e){let{event:t}=e,n=zP(t.target);super(e,pI,n)}};mI.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var hI={move:{name:`mousemove`},end:{name:`mouseup`}},gI;(function(e){e[e.RightClick=2]=`RightClick`})(gI||={});var _I=class extends fI{constructor(e){super(e,hI,zP(e.event.target))}};_I.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===gI.RightClick?!1:(r?.({event:n}),!0)}}];var vI={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},yI=class extends fI{constructor(e){super(e,vI)}static setup(){return window.addEventListener(vI.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(vI.move.name,e)};function e(){}}};yI.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var bI;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(bI||={});var xI;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(xI||={});function SI(e){let{acceleration:n,activator:r=bI.Pointer,canScroll:i,draggingRect:a,enabled:o,interval:s=5,order:c=xI.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e,m=wI({delta:f,disabled:!o}),[h,g]=HP(),_=(0,t.useRef)({x:0,y:0}),v=(0,t.useRef)({x:0,y:0}),y=(0,t.useMemo)(()=>{switch(r){case bI.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case bI.DraggableRect:return a}},[r,a,l]),b=(0,t.useRef)(null),x=(0,t.useCallback)(()=>{let e=b.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,t.useMemo)(()=>c===xI.TreeOrder?[...u].reverse():u,[c,u]);(0,t.useEffect)(()=>{if(!o||!u.length||!y){g();return}for(let e of S){if(i?.(e)===!1)continue;let t=d[u.indexOf(e)];if(!t)continue;let{direction:r,speed:a}=qF(e,t,y,n,p);for(let e of[`x`,`y`])m[e][r[e]]||(a[e]=0,r[e]=0);if(a.x>0||a.y>0){g(),b.current=e,h(x,s),_.current=a,v.current=r;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[n,x,i,g,o,s,JSON.stringify(y),JSON.stringify(m),h,u,S,d,JSON.stringify(p)])}var CI={x:{[UF.Backward]:!1,[UF.Forward]:!1},y:{[UF.Backward]:!1,[UF.Forward]:!1}};function wI(e){let{delta:t,disabled:n}=e,r=KP(t);return WP(e=>{if(n||!r||!e)return CI;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[UF.Backward]:e.x[UF.Backward]||i.x===-1,[UF.Forward]:e.x[UF.Forward]||i.x===1},y:{[UF.Backward]:e.y[UF.Backward]||i.y===-1,[UF.Forward]:e.y[UF.Forward]||i.y===1}}},[n,t,r])}function TI(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return WP(e=>t==null?null:r??e??null,[r,t])}function EI(e,n){return(0,t.useMemo)(()=>e.reduce((e,t)=>{let{sensor:r}=t,i=r.activators.map(e=>({eventName:e.eventName,handler:n(e.handler,t)}));return[...e,...i]},[]),[e,n])}var DI;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(DI||={});var OI;(function(e){e.Optimized=`optimized`})(OI||={});var kI=new Map;function AI(e,n){let{dragging:r,dependencies:i,config:a}=n,[o,s]=(0,t.useState)(null),{frequency:c,measure:l,strategy:u}=a,d=(0,t.useRef)(e),f=_(),p=UP(f),m=(0,t.useCallback)(function(e){e===void 0&&(e=[]),!p.current&&s(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),h=(0,t.useRef)(null),g=WP(t=>{if(f&&!r)return kI;if(!t||t===kI||d.current!==e||o!=null){let t=new Map;for(let n of e){if(!n)continue;if(o&&o.length>0&&!o.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new eI(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,o,r,f,l]);return(0,t.useEffect)(()=>{d.current=e},[e]),(0,t.useEffect)(()=>{f||m()},[r,f]),(0,t.useEffect)(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),(0,t.useEffect)(()=>{f||typeof c!=`number`||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},c))},[c,f,m,...i]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:o!=null};function _(){switch(u){case DI.Always:return!1;case DI.BeforeDragging:return r;default:return!r}}}function jI(e,t){return WP(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function MI(e,t){return jI(e,t)}function NI(e){let{callback:n,disabled:r}=e,i=VP(n),a=(0,t.useMemo)(()=>{if(r||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(i)},[i,r]);return(0,t.useEffect)(()=>()=>a?.disconnect(),[a]),a}function PI(e){let{callback:n,disabled:r}=e,i=VP(n),a=(0,t.useMemo)(()=>{if(r||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(i)},[r]);return(0,t.useEffect)(()=>()=>a?.disconnect(),[a]),a}function FI(e){return new eI(MF(e),e)}function II(e,n,r){n===void 0&&(n=FI);let[i,a]=(0,t.useState)(null);function o(){a(t=>{if(!e)return null;if(e.isConnected===!1)return t??r??null;let i=n(e);return JSON.stringify(t)===JSON.stringify(i)?t:i})}let s=NI({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=PI({callback:o});return BP(()=>{o(),e?(c?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),s?.disconnect())},[e]),i}function LI(e){return EF(e,jI(e))}var RI=[];function zI(e){let n=(0,t.useRef)(e),r=WP(t=>e?t&&t!==RI&&e&&n.current&&e.parentNode===n.current.parentNode?t:LF(e):RI,[e]);return(0,t.useEffect)(()=>{n.current=e},[e]),r}function BI(e){let[n,r]=(0,t.useState)(null),i=(0,t.useRef)(e),a=(0,t.useCallback)(e=>{let t=zF(e.target);t&&r(e=>e?(e.set(t,HF(t)),new Map(e)):null)},[]);return(0,t.useEffect)(()=>{let t=i.current;if(e!==t){n(t);let o=e.map(e=>{let t=zF(e);return t?(t.addEventListener(`scroll`,a,{passive:!0}),[t,HF(t)]):null}).filter(e=>e!=null);r(o.length?new Map(o):null),i.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{zF(e)?.removeEventListener(`scroll`,a)})}},[a,e]),(0,t.useMemo)(()=>e.length?n?Array.from(n.values()).reduce((e,t)=>XP(e,t),yF):YF(e):yF,[e,n])}function VI(e,n){n===void 0&&(n=[]);let r=(0,t.useRef)(null);return(0,t.useEffect)(()=>{r.current=null},n),(0,t.useEffect)(()=>{let t=e!==yF;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?ZP(e,r.current):yF}function HI(e){(0,t.useEffect)(()=>{if(!MP)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function UI(e,n){return(0,t.useMemo)(()=>e.reduce((e,t)=>{let{eventName:r,handler:i}=t;return e[r]=e=>{i(e,n)},e},{}),[e,n])}function WI(e){return(0,t.useMemo)(()=>e?PF(e):null,[e])}var GI=[];function KI(e,n){n===void 0&&(n=MF);let[r]=e,i=WI(r?FP(r):null),[a,o]=(0,t.useState)(GI);function s(){o(()=>e.length?e.map(e=>WF(e)?i:new eI(n(e),e)):GI)}let c=PI({callback:s});return BP(()=>{c?.disconnect(),s(),e.forEach(e=>c?.observe(e))},[e]),a}function qI(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return LP(t)?t:e}function JI(e){let{measure:n}=e,[r,i]=(0,t.useState)(null),a=PI({callback:(0,t.useCallback)(e=>{for(let{target:t}of e)if(LP(t)){i(e=>{let r=n(t);return e?{...e,width:r.width,height:r.height}:r});break}},[n])}),[o,s]=GP((0,t.useCallback)(e=>{let t=qI(e);a?.disconnect(),t&&a?.observe(t),i(t?n(t):null)},[n,a]));return(0,t.useMemo)(()=>({nodeRef:o,rect:r,setRef:s}),[r,o,s])}var YI=[{sensor:mI,options:{}},{sensor:lI,options:{}}],XI={current:{}},ZI={draggable:{measure:NF},droppable:{measure:NF,strategy:DI.WhileDragging,frequency:OI.Optimized},dragOverlay:{measure:MF}},QI=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},$I={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new QI,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gF},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ZI,measureDroppableContainers:gF,windowRect:null,measuringScheduled:!1},eL={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:gF,draggableNodes:new Map,over:null,measureDroppableContainers:gF},tL=(0,t.createContext)(eL),nL=(0,t.createContext)($I);function rL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new QI}}}function iL(e,t){switch(t.type){case hF.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case hF.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case hF.DragEnd:case hF.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case hF.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new QI(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case hF.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new QI(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case hF.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new QI(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function aL(e){let{disabled:n}=e,{active:r,activatorEvent:i,draggableNodes:a}=(0,t.useContext)(tL),o=KP(i),s=KP(r?.id);return(0,t.useEffect)(()=>{if(!n&&!i&&o&&s!=null){if(!$P(o)||document.activeElement===o.target)return;let e=a.get(s);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=iF(e);if(t){t.focus();break}}})}},[i,n,a,s,o]),null}function oL(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function sL(e){return(0,t.useMemo)(()=>({draggable:{...ZI.draggable,...e?.draggable},droppable:{...ZI.droppable,...e?.droppable},dragOverlay:{...ZI.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function cL(e){let{activeNode:n,measure:r,initialRect:i,config:a=!0}=e,o=(0,t.useRef)(!1),{x:s,y:c}=typeof a==`boolean`?{x:a,y:a}:a;BP(()=>{if(!s&&!c||!n){o.current=!1;return}if(o.current||!i)return;let e=n?.node.current;if(!e||e.isConnected===!1)return;let t=EF(r(e),i);if(s||(t.x=0),c||(t.y=0),o.current=!0,Math.abs(t.x)>0||Math.abs(t.y)>0){let n=RF(e);n&&n.scrollBy({top:t.y,left:t.x})}},[n,s,c,i,r])}var lL=(0,t.createContext)({...yF,scaleX:1,scaleY:1}),uL;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(uL||={});var dL=(0,t.memo)(function(e){let{id:r,accessibility:i,autoScroll:a=!0,children:o,sensors:s=YI,collisionDetection:c=wF,measuring:l,modifiers:u,...d}=e,[f,p]=(0,t.useReducer)(iL,void 0,rL),[m,h]=dF(),[g,_]=(0,t.useState)(uL.Uninitialized),v=g===uL.Initialized,{draggable:{active:y,nodes:b,translate:x},droppable:{containers:S}}=f,C=y==null?null:b.get(y),w=(0,t.useRef)({initial:null,translated:null}),T=(0,t.useMemo)(()=>y==null?null:{id:y,data:C?.data??XI,rect:w},[y,C]),E=(0,t.useRef)(null),[D,O]=(0,t.useState)(null),[k,A]=(0,t.useState)(null),j=UP(d,Object.values(d)),M=JP(`DndDescribedBy`,r),N=(0,t.useMemo)(()=>S.getEnabled(),[S]),P=sL(l),{droppableRects:ee,measureDroppableContainers:F,measuringScheduled:te}=AI(N,{dragging:v,dependencies:[x.x,x.y],config:P.droppable}),I=TI(b,y),ne=(0,t.useMemo)(()=>k?tF(k):null,[k]),re=Pe(),ie=MI(I,P.draggable.measure);cL({activeNode:y==null?null:b.get(y),config:re.layoutShiftCompensation,initialRect:ie,measure:P.draggable.measure});let ae=II(I,P.draggable.measure,ie),oe=II(I?I.parentElement:null),se=(0,t.useRef)({activatorEvent:null,active:null,activeNode:I,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:b,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=S.getNodeFor(se.current.over?.id),le=JI({measure:P.dragOverlay.measure}),ue=le.nodeRef.current??I,de=v?le.rect??ae:null,fe=!!(le.nodeRef.current&&le.rect),pe=LI(fe?null:ae),me=WI(ue?FP(ue):null),he=zI(v?ce??I:null),ge=KI(he),_e=oL(u,{transform:{x:x.x-pe.x,y:x.y-pe.y,scaleX:1,scaleY:1},activatorEvent:k,active:T,activeNodeRect:ae,containerNodeRect:oe,draggingNodeRect:de,over:se.current.over,overlayNodeRect:le.rect,scrollableAncestors:he,scrollableAncestorRects:ge,windowRect:me}),ve=ne?XP(ne,x):null,ye=BI(he),be=VI(ye),xe=VI(ye,[ae]),Se=XP(_e,be),Ce=de?OF(de,_e):null,we=T&&Ce?c({active:T,collisionRect:Ce,droppableRects:ee,droppableContainers:N,pointerCoordinates:ve}):null,Te=SF(we,`id`),[Ee,De]=(0,t.useState)(null),Oe=TF(fe?_e:XP(_e,xe),Ee?.rect??null,ae),ke=(0,t.useRef)(null),Ae=(0,t.useCallback)((e,t)=>{let{sensor:r,options:i}=t;if(E.current==null)return;let a=b.get(E.current);if(!a)return;let o=e.nativeEvent;ke.current=new r({active:E.current,activeNode:a,event:o,options:i,context:se,onAbort(e){if(!b.get(e))return;let{onDragAbort:t}=j.current,n={id:e};t?.(n),m({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!b.get(e))return;let{onDragPending:i}=j.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),m({type:`onDragPending`,event:a})},onStart(e){let t=E.current;if(t==null)return;let r=b.get(t);if(!r)return;let{onDragStart:i}=j.current,a={activatorEvent:o,active:{id:t,data:r.data,rect:w}};(0,n.unstable_batchedUpdates)(()=>{i?.(a),_(uL.Initializing),p({type:hF.DragStart,initialCoordinates:e,active:t}),m({type:`onDragStart`,event:a}),O(ke.current),A(o)})},onMove(e){p({type:hF.DragMove,coordinates:e})},onEnd:s(hF.DragEnd),onCancel:s(hF.DragCancel)});function s(e){return async function(){let{active:t,collisions:r,over:i,scrollAdjustedTranslate:a}=se.current,s=null;if(t&&a){let{cancelDrop:n}=j.current;s={activatorEvent:o,active:t,collisions:r,delta:a,over:i},e===hF.DragEnd&&typeof n==`function`&&await Promise.resolve(n(s))&&(e=hF.DragCancel)}E.current=null,(0,n.unstable_batchedUpdates)(()=>{p({type:e}),_(uL.Uninitialized),De(null),O(null),A(null),ke.current=null;let t=e===hF.DragEnd?`onDragEnd`:`onDragCancel`;if(s){let e=j.current[t];e?.(s),m({type:t,event:s})}})}}},[b]),je=EI(s,(0,t.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=b.get(r);if(E.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},E.current=r,Ae(n,t))},[b,Ae]));HI(s),BP(()=>{ae&&g===uL.Initializing&&_(uL.Initialized)},[ae,g]),(0,t.useEffect)(()=>{let{onDragMove:e}=j.current,{active:t,activatorEvent:r,collisions:i,over:a}=se.current;if(!t||!r)return;let o={active:t,activatorEvent:r,collisions:i,delta:{x:Se.x,y:Se.y},over:a};(0,n.unstable_batchedUpdates)(()=>{e?.(o),m({type:`onDragMove`,event:o})})},[Se.x,Se.y]),(0,t.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:r,droppableContainers:i,scrollAdjustedTranslate:a}=se.current;if(!e||E.current==null||!t||!a)return;let{onDragOver:o}=j.current,s=i.get(Te),c=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:r,delta:{x:a.x,y:a.y},over:c};(0,n.unstable_batchedUpdates)(()=>{De(c),o?.(l),m({type:`onDragOver`,event:l})})},[Te]),BP(()=>{se.current={activatorEvent:k,active:T,activeNode:I,collisionRect:Ce,collisions:we,droppableRects:ee,draggableNodes:b,draggingNode:ue,draggingNodeRect:de,droppableContainers:S,over:Ee,scrollableAncestors:he,scrollAdjustedTranslate:Se},w.current={initial:de,translated:Ce}},[T,I,we,Ce,b,ue,de,ee,S,Ee,he,Se]),SI({...re,delta:x,draggingRect:Ce,pointerCoordinates:ve,scrollableAncestors:he,scrollableAncestorRects:ge});let Me=(0,t.useMemo)(()=>({active:T,activeNode:I,activeNodeRect:ae,activatorEvent:k,collisions:we,containerNodeRect:oe,dragOverlay:le,draggableNodes:b,droppableContainers:S,droppableRects:ee,over:Ee,measureDroppableContainers:F,scrollableAncestors:he,scrollableAncestorRects:ge,measuringConfiguration:P,measuringScheduled:te,windowRect:me}),[T,I,ae,k,we,oe,le,b,S,ee,Ee,F,he,ge,P,te,me]),Ne=(0,t.useMemo)(()=>({activatorEvent:k,activators:je,active:T,activeNodeRect:ae,ariaDescribedById:{draggable:M},dispatch:p,draggableNodes:b,over:Ee,measureDroppableContainers:F}),[k,je,T,ae,p,M,b,Ee,F]);return t.default.createElement(lF.Provider,{value:h},t.default.createElement(tL.Provider,{value:Ne},t.default.createElement(nL.Provider,{value:Me},t.default.createElement(lL.Provider,{value:Oe},o)),t.default.createElement(aL,{disabled:i?.restoreFocus===!1})),t.default.createElement(mF,{...i,hiddenTextDescribedById:M}));function Pe(){let e=D?.autoScrollEnabled===!1,t=typeof a==`object`?a.enabled===!1:a===!1,n=v&&!e&&!t;return typeof a==`object`?{...a,enabled:n}:{enabled:n}}}),fL=(0,t.createContext)(null),pL=`button`,mL=`Draggable`;function hL(e){let{id:n,data:r,disabled:i=!1,attributes:a}=e,o=JP(mL),{activators:s,activatorEvent:c,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=(0,t.useContext)(tL),{role:m=pL,roleDescription:h=`draggable`,tabIndex:g=0}=a??{},_=l?.id===n,v=(0,t.useContext)(_?lL:fL),[y,b]=GP(),[x,S]=GP(),C=UI(s,n),w=UP(r);return BP(()=>(f.set(n,{id:n,key:o,node:y,activatorNode:x,data:w}),()=>{let e=f.get(n);e&&e.key===o&&f.delete(n)}),[f,n]),{active:l,activatorEvent:c,activeNodeRect:u,attributes:(0,t.useMemo)(()=>({role:m,tabIndex:g,"aria-disabled":i,"aria-pressed":_&&m===pL?!0:void 0,"aria-roledescription":h,"aria-describedby":d.draggable}),[i,m,g,_,h,d.draggable]),isDragging:_,listeners:i?void 0:C,node:y,over:p,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function gL(){return(0,t.useContext)(nL)}var _L=`Droppable`,vL={timeout:25};function yL(e){let{data:n,disabled:r=!1,id:i,resizeObserverConfig:a}=e,o=JP(_L),{active:s,dispatch:c,over:l,measureDroppableContainers:u}=(0,t.useContext)(tL),d=(0,t.useRef)({disabled:r}),f=(0,t.useRef)(!1),p=(0,t.useRef)(null),m=(0,t.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...vL,...a},v=UP(g??i),y=PI({callback:(0,t.useCallback)(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),m.current=null},_)},[_]),disabled:h||!s}),[b,x]=GP((0,t.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),f.current=!1),e&&y.observe(e))},[y])),S=UP(n);return(0,t.useEffect)(()=>{!y||!b.current||(y.disconnect(),f.current=!1,y.observe(b.current))},[b,y]),(0,t.useEffect)(()=>(c({type:hF.RegisterDroppable,element:{id:i,key:o,disabled:r,node:b,rect:p,data:S}}),()=>c({type:hF.UnregisterDroppable,key:o,id:i})),[i]),(0,t.useEffect)(()=>{r!==d.current.disabled&&(c({type:hF.SetDroppableDisabled,id:i,key:o,disabled:r}),d.current.disabled=r)},[i,o,r,c]),{active:s,rect:p,isOver:l?.id===i,node:b,over:l,setNodeRef:x}}function bL(e){let{animation:n,children:r}=e,[i,a]=(0,t.useState)(null),[o,s]=(0,t.useState)(null),c=KP(r);return!r&&!i&&c&&a(c),BP(()=>{if(!o)return;let e=i?.key,t=i?.props.id;if(e==null||t==null){a(null);return}Promise.resolve(n(t,o)).then(()=>{a(null)})},[n,i,o]),t.default.createElement(t.default.Fragment,null,r,i?(0,t.cloneElement)(i,{ref:s}):null)}var xL={x:0,y:0,scaleX:1,scaleY:1};function SL(e){let{children:n}=e;return t.default.createElement(tL.Provider,{value:eL},t.default.createElement(lL.Provider,{value:xL},n))}var CL={position:`fixed`,touchAction:`none`},wL=e=>$P(e)?`transform 250ms ease`:void 0,TL=(0,t.forwardRef)((e,n)=>{let{as:r,activatorEvent:i,adjustScale:a,children:o,className:s,rect:c,style:l,transform:u,transition:d=wL}=e;if(!c)return null;let f=a?u:{...u,scaleX:1,scaleY:1},p={...CL,width:c.width,height:c.height,top:c.top,left:c.left,transform:nF.Transform.toString(f),transformOrigin:a&&i?bF(i,c):void 0,transition:typeof d==`function`?d(i):d,...l};return t.default.createElement(r,{className:s,style:p,ref:n},o)}),EL={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:nF.Transform.toString(t)},{transform:nF.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function DL(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return VP((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=qI(a);if(!c)return;let{transform:l}=FP(a).getComputedStyle(a),u=kF(l);if(!u)return;let d=typeof t==`function`?t:OL(t);return QF(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function OL(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...EL,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var kL=0;function AL(e){return(0,t.useMemo)(()=>{if(e!=null)return kL++,kL},[e])}var jL=t.default.memo(e=>{let{adjustScale:n=!1,children:r,dropAnimation:i,style:a,transition:o,modifiers:s,wrapperElement:c=`div`,className:l,zIndex:u=999}=e,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:m,draggableNodes:h,droppableContainers:g,dragOverlay:_,over:v,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=gL(),C=(0,t.useContext)(lL),w=AL(f?.id),T=oL(s,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:_.rect,over:v,overlayNodeRect:_.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=jI(p),D=DL({config:i,draggableNodes:h,droppableContainers:g,measuringConfiguration:y}),O=E?_.setRef:void 0;return t.default.createElement(SL,null,t.default.createElement(bL,{animation:D},f&&w?t.default.createElement(TL,{key:w,id:f.id,ref:O,as:c,activatorEvent:d,adjustScale:n,className:l,transition:o,rect:E,style:{zIndex:u,...a},transform:T},r):null))});function ML(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function NL(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function PL(e){return e!==null&&e>=0}function FL(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function IL(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var LL=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=ML(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},RL={scaleX:1,scaleY:1},zL=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...RL}:null}let s=BL(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...RL}:r<t&&r>=a?{x:0,y:o.height+s,...RL}:{x:0,y:0,...RL}};function BL(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var VL=`Sortable`,HL=t.default.createContext({activeIndex:-1,containerId:VL,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:LL,disabled:{draggable:!1,droppable:!1}});function UL(e){let{children:n,id:r,items:i,strategy:a=LL,disabled:o=!1}=e,{active:s,dragOverlay:c,droppableRects:l,over:u,measureDroppableContainers:d}=gL(),f=JP(VL,r),p=c.rect!==null,m=(0,t.useMemo)(()=>i.map(e=>typeof e==`object`&&`id`in e?e.id:e),[i]),h=s!=null,g=s?m.indexOf(s.id):-1,_=u?m.indexOf(u.id):-1,v=(0,t.useRef)(m),y=!FL(m,v.current),b=_!==-1&&g===-1||y,x=IL(o);BP(()=>{y&&h&&d(m)},[y,m,h,d]),(0,t.useEffect)(()=>{v.current=m},[m]);let S=(0,t.useMemo)(()=>({activeIndex:g,containerId:f,disabled:x,disableTransforms:b,items:m,overIndex:_,useDragOverlay:p,sortedRects:NL(m,l),strategy:a}),[g,f,x.draggable,x.droppable,b,m,_,l,p,a]);return t.default.createElement(HL.Provider,{value:S},n)}var WL=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return ML(n,r,i).indexOf(t)},GL=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},KL={duration:200,easing:`ease`},qL=`transform`,JL=nF.Transition.toString({property:qL,duration:0,easing:`linear`}),YL={roleDescription:`sortable`};function XL(e){let{disabled:n,index:r,node:i,rect:a}=e,[o,s]=(0,t.useState)(null),c=(0,t.useRef)(r);return BP(()=>{if(!n&&r!==c.current&&i.current){let e=a.current;if(e){let t=MF(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}r!==c.current&&(c.current=r)},[n,r,i,a]),(0,t.useEffect)(()=>{o&&s(null)},[o]),o}function ZL(e){let{animateLayoutChanges:n=GL,attributes:r,disabled:i,data:a,getNewIndex:o=WL,id:s,strategy:c,resizeObserverConfig:l,transition:u=KL}=e,{items:d,containerId:f,activeIndex:p,disabled:m,disableTransforms:h,sortedRects:g,overIndex:_,useDragOverlay:v,strategy:y}=(0,t.useContext)(HL),b=QL(i,m),x=d.indexOf(s),S=(0,t.useMemo)(()=>({sortable:{containerId:f,index:x,items:d},...a}),[f,a,x,d]),C=(0,t.useMemo)(()=>d.slice(d.indexOf(s)),[d,s]),{rect:w,node:T,isOver:E,setNodeRef:D}=yL({id:s,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:ee,setActivatorNodeRef:F,transform:te}=hL({id:s,data:S,attributes:{...YL,...r},disabled:b.draggable}),I=jP(D,M),ne=!!O,re=ne&&!h&&PL(p)&&PL(_),ie=!v&&P,ae=re?(ie&&re?te:null)??(c??y)({rects:g,activeNodeRect:A,activeIndex:p,overIndex:_,index:x}):null,oe=PL(p)&&PL(_)?o({id:s,items:d,activeIndex:p,overIndex:_}):x,se=O?.id,ce=(0,t.useRef)({activeId:se,items:d,newIndex:oe,containerId:f}),le=d!==ce.current.items,ue=n({active:O,containerId:f,isDragging:P,isSorting:ne,id:s,index:x,items:d,newIndex:ce.current.newIndex,previousItems:ce.current.items,previousContainerId:ce.current.containerId,transition:u,wasDragging:ce.current.activeId!=null}),de=XL({disabled:!ue,index:x,node:T,rect:w});return(0,t.useEffect)(()=>{ne&&ce.current.newIndex!==oe&&(ce.current.newIndex=oe),f!==ce.current.containerId&&(ce.current.containerId=f),d!==ce.current.items&&(ce.current.items=d)},[ne,oe,f,d]),(0,t.useEffect)(()=>{if(se===ce.current.activeId)return;if(se!=null&&ce.current.activeId==null){ce.current.activeId=se;return}let e=setTimeout(()=>{ce.current.activeId=se},50);return()=>clearTimeout(e)},[se]),{active:O,activeIndex:p,attributes:j,data:S,rect:w,index:x,newIndex:oe,items:d,isOver:E,isSorting:ne,isDragging:P,listeners:N,node:T,overIndex:_,over:ee,setNodeRef:I,setActivatorNodeRef:F,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:de??ae,transition:fe()};function fe(){if(de||le&&ce.current.newIndex===x)return JL;if(!(ie&&!$P(k)||!u)&&(ne||ue))return nF.Transition.toString({...u,property:qL})}}function QL(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}$.Down,$.Right,$.Up,$.Left;var $L={text:`Texto`,image:`Imagem`,box:`Grupo / Cartão`,"text-container":`Texto em Caixa`,group:`Grupo`,checkbox:`Caixa de Seleção`},eR=({element:e,isSelected:t,onSelect:n,onToggleLock:i,onToggleHide:a})=>{let{attributes:o,listeners:s,setNodeRef:c,transform:l,transition:u,isDragging:d}=ZL({id:e.id});return(0,r.jsx)(U,{ref:c,style:{transform:nF.Transform.toString(l),transition:u,opacity:d?.5:1,touchAction:`none`},children:(0,r.jsxs)(W,{align:`center`,style:{padding:`8px 12px`,backgroundColor:t?`var(--accent-a3)`:`var(--gray-2)`,borderRadius:6,cursor:`pointer`,marginBottom:4,border:t?`1px solid var(--accent-9)`:`1px solid transparent`},onClick:e=>n(e.shiftKey),children:[(0,r.jsx)(U,{...o,...s,style:{cursor:`grab`,color:`var(--gray-8)`,marginRight:8},children:(0,r.jsx)(Re,{})}),(0,r.jsxs)(U,{style:{color:`var(--gray-10)`,marginRight:8},children:[e.type===`text`&&(0,r.jsx)(Rt,{}),e.type===`image`&&(0,r.jsx)(Xe,{}),(e.type===`box`||e.type===`group`)&&(0,r.jsx)(ue,{})]}),(0,r.jsx)(H,{size:`2`,weight:t?`bold`:`regular`,style:{flex:1},truncate:!0,children:e.name||$L[e.type]||e.type}),(0,r.jsxs)(W,{gap:`1`,onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:e.locked?`orange`:`gray`,onClick:i,title:e.locked?`Desbloquear`:`Bloquear`,children:e.locked?(0,r.jsx)(et,{}):(0,r.jsx)(nt,{})}),(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:e.hidden?`red`:`gray`,onClick:a,title:e.hidden?`Mostrar`:`Ocultar`,children:e.hidden?(0,r.jsx)(Be,{}):(0,r.jsx)(He,{})})]})]})})};let tR=()=>{let{state:e,selectElement:n,moveElement:i,updateElement:a}=rS(),{elements:o,selectedElementIds:s}=e,c=(0,t.useMemo)(()=>[...o].reverse(),[o]),[l,u]=(0,t.useState)(null),d=vF(_F(mI,{activationConstraint:{distance:5}}));return(0,r.jsx)(U,{children:(0,r.jsxs)(dL,{sensors:d,onDragStart:e=>{u(e.active.id)},onDragEnd:e=>{let{active:t,over:n}=e;if(u(null),n&&t.id!==n.id){let e=c.findIndex(e=>e.id===t.id),r=c.findIndex(e=>e.id===n.id);i(o.length-1-e,o.length-1-r)}},children:[(0,r.jsx)(UL,{items:c.map(e=>e.id),strategy:zL,children:(0,r.jsxs)(W,{direction:`column`,children:[c.map(e=>(0,r.jsx)(eR,{element:e,isSelected:s.includes(e.id),onSelect:t=>n(e.id,t),onToggleLock:()=>a(e.id,{locked:!e.locked}),onToggleHide:()=>a(e.id,{hidden:!e.hidden})},e.id)),c.length===0&&(0,r.jsx)(H,{size:`2`,color:`gray`,align:`center`,style:{padding:20},children:`Adicione itens para ver a lista aqui.`})]})}),(0,r.jsx)(jL,{children:l?(0,r.jsx)(U,{style:{padding:`8px 12px`,backgroundColor:`var(--gray-4)`,borderRadius:6,boxShadow:`0 4px 12px rgba(0,0,0,0.1)`},children:(0,r.jsx)(H,{children:`Movendo...`})}):null})]})})},nR=()=>{let{state:e,updateElement:n,removeSelected:i,copy:a}=rS(),[o,s]=(0,t.useState)(!1),c=e.selectedElementIds[0],l=e.elements.find(e=>e.id===c);if(!l)return null;let u=e=>{n(l.id,e)},d=e=>{u({style:{...l.style,...e}})},f=l.style?.textAlign||`left`,p=parseInt(l.style?.fontSize||`14`,10),m=parseInt(l.style?.borderWidth||`0`,10),h=parseInt(l.style?.padding||`0`,10),g=parseInt(l.style?.borderRadius||`0`,10),_=Math.round((parseFloat(String(l.style?.opacity??`1`))||1)*100),v=l.style?.fontFamily||`Arial`,y=kS(l.style?.fontWeight,DS),b=AS(v,e.availableFonts||[`Arial`,`Helvetica`,`Times New Roman`,`Courier New`,`Verdana`,`Georgia`,`Tahoma`,`Trebuchet MS`]);return(0,r.jsxs)(W,{direction:`column`,gap:`4`,children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,children:[(0,r.jsx)(H,{size:`3`,weight:`bold`,children:rR(l.type)}),(0,r.jsxs)(W,{gap:`2`,children:[(0,r.jsx)(J,{variant:`soft`,color:l.locked?`orange`:`gray`,onClick:()=>u({locked:!l.locked}),title:l.locked?`Desbloquear`:`Bloquear`,children:l.locked?(0,r.jsx)(et,{}):(0,r.jsx)(nt,{})}),(0,r.jsx)(J,{variant:`soft`,color:l.hidden?`blue`:`gray`,onClick:()=>u({hidden:!l.hidden}),title:l.hidden?`Mostrar`:`Ocultar`,children:l.hidden?(0,r.jsx)(Be,{}):(0,r.jsx)(He,{})}),(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`soft`,color:`gray`,onClick:a,title:`Copiar`,children:(0,r.jsx)(we,{})}),(0,r.jsx)(J,{variant:`soft`,color:`red`,onClick:i,title:`Excluir`,children:(0,r.jsx)(Xt,{})})]})]}),(0,r.jsx)(Qy,{size:`4`}),(l.type===`text`||l.type===`text-container`)&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Conteúdo`}),(0,r.jsx)(pb,{value:l.content,onChange:e=>u({content:e.target.value}),rows:3,placeholder:`Digite o texto aqui...`})]}),l.type===`image`&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Imagem`}),(0,r.jsxs)(U,{mb:`2`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Vínculo de Propriedade`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[l.dataBinding?e.availableProps.find(e=>e.dataName===l.dataBinding)?.name||l.dataBinding:`Nenhum (URL fixa)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>u({dataBinding:void 0}),children:`Nenhum (URL fixa)`}),e.availableProps.map(e=>(0,r.jsx)(q,{onSelect:()=>u({dataBinding:e.dataName,content:`{{${e.dataName}}}`}),children:e.name},e.dataName)),e.availableProps.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`URL ou {{variável}}`}),(0,r.jsx)(X,{value:l.content,onChange:e=>u({content:e.target.value}),placeholder:`https://... ou {{profilePicture}}`}),(0,r.jsx)(H,{size:`1`,color:`gray`,mt:`1`,as:`div`,children:`Se o valor vinculado for um link/URL válido, a imagem será exibida.`})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Aparência`}),(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(l.type===`text`||l.type===`text-container`)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Fonte`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(0,r.jsx)(`span`,{style:{fontFamily:v},children:v}),(0,r.jsx)(ve,{})]})}),(0,r.jsx)(fy,{style:{zIndex:1e5},children:b.map(e=>(0,r.jsx)(q,{onSelect:()=>d({fontFamily:e}),style:{fontFamily:e},children:e},e))})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Peso`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[y===`normal`?`Normal`:y===`bold`?`Negrito`:y===`100`?`Fina`:y===`300`?`Leve`:`Pesada`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d({fontWeight:`normal`}),children:`Normal`}),(0,r.jsx)(q,{onSelect:()=>{d({fontWeight:`bold`})},children:`Negrito`}),(0,r.jsx)(q,{onSelect:()=>{d({fontWeight:`100`})},children:`Fina`}),(0,r.jsx)(q,{onSelect:()=>{d({fontWeight:`300`})},children:`Leve`}),(0,r.jsx)(q,{onSelect:()=>{d({fontWeight:`900`})},children:`Pesada`})]})]})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,mb:`1`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Tamanho do Texto`}),(0,r.jsxs)(H,{size:`1`,children:[p,`px`]})]}),(0,r.jsx)(tb,{min:8,max:72,value:[p],onValueChange:e=>d({fontSize:`${e[0]}px`})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento`}),(0,r.jsxs)(W,{gap:`2`,children:[(0,r.jsx)(J,{variant:f===`left`?`solid`:`soft`,color:`gray`,onClick:()=>d({textAlign:`left`}),children:(0,r.jsx)(Wt,{})}),(0,r.jsx)(J,{variant:f===`center`?`solid`:`soft`,color:`gray`,onClick:()=>d({textAlign:`center`}),children:(0,r.jsx)(Bt,{})}),(0,r.jsx)(J,{variant:f===`right`?`solid`:`soft`,color:`gray`,onClick:()=>d({textAlign:`right`}),children:(0,r.jsx)(Kt,{})})]})]}),(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(W,{gap:`1`,children:[(0,r.jsx)(J,{variant:l.style?.fontStyle===`italic`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),d({fontStyle:l.style?.fontStyle===`italic`?`normal`:`italic`})},title:`Itálico`,children:(0,r.jsx)(Ke,{})}),(0,r.jsx)(J,{variant:l.style?.textDecoration===`underline`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),d({textDecoration:l.style?.textDecoration===`underline`?`none`:`underline`})},title:`Sublinhado`,children:(0,r.jsx)(Qt,{})}),(0,r.jsx)(J,{variant:l.style?.textDecoration===`line-through`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),d({textDecoration:l.style?.textDecoration===`line-through`?`none`:`line-through`})},title:`Tachado`,children:(0,r.jsx)(Pt,{})})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transformação`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(l.style?.textTransform||`none`)===`none`?`Nenhum`:l.style?.textTransform===`uppercase`?`MAIÚSCULA`:l.style?.textTransform===`lowercase`?`minúscula`:`Capitalizada`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d({textTransform:`none`}),children:`Nenhum`}),(0,r.jsx)(q,{onSelect:()=>d({textTransform:`uppercase`}),children:`MAIÚSCULA`}),(0,r.jsx)(q,{onSelect:()=>d({textTransform:`lowercase`}),children:`minúscula`}),(0,r.jsx)(q,{onSelect:()=>d({textTransform:`capitalize`}),children:`Capitalizada`})]})]})]})]}),(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Altura da Linha`}),(0,r.jsx)(X,{placeholder:`Normal`,value:l.style?.lineHeight||``,onChange:e=>d({lineHeight:e.target.value||`normal`})})]}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Espaçamento`}),(0,r.jsx)(X,{placeholder:`Normal`,value:l.style?.letterSpacing||``,onChange:e=>d({letterSpacing:e.target.value||`normal`})})]})]}),l.type===`text-container`&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento Vertical`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(l.style?.alignItems||`flex-start`)===`flex-start`?`Topo`:l.style?.alignItems===`center`?`Centro`:`Base`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d({alignItems:`flex-start`}),children:`Topo`}),(0,r.jsx)(q,{onSelect:()=>d({alignItems:`center`}),children:`Centro`}),(0,r.jsx)(q,{onSelect:()=>d({alignItems:`flex-end`}),children:`Base`})]})]})]})]}),l.type===`image`&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Ajuste da Imagem`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(G,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(l.style?.objectFit||`cover`)===`cover`?`Cobrir (Cover)`:l.style?.objectFit===`contain`?`Conter (Contain)`:`Esticar (Fill)`,(0,r.jsx)(ve,{})]})}),(0,r.jsxs)(fy,{style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d({objectFit:`cover`}),children:`Cobrir (Cover)`}),(0,r.jsx)(q,{onSelect:()=>d({objectFit:`contain`}),children:`Conter (Contain)`}),(0,r.jsx)(q,{onSelect:()=>d({objectFit:`fill`}),children:`Esticar (Fill)`})]})]})]}),(0,r.jsxs)(K,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor de Fundo`}),(0,r.jsx)(nP,{color:l.style?.backgroundColor||`transparent`,onChange:e=>d({backgroundColor:e})})]}),(l.type===`text`||l.type===`text-container`)&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor do Texto`}),(0,r.jsx)(nP,{color:l.style?.color||`#000000`,onChange:e=>d({color:e})})]})]}),(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,mb:`1`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Borda (Espessura)`}),(0,r.jsxs)(H,{size:`1`,children:[m,`px`]})]}),(0,r.jsx)(tb,{min:0,max:10,value:[m],onValueChange:e=>d({borderWidth:`${e[0]}px`,borderStyle:e[0]>0?`solid`:`none`,borderColor:l.style?.borderColor||`#000000`})})]}),m>0&&(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor da Borda`}),(0,r.jsx)(nP,{color:l.style?.borderColor||`#000000`,onChange:e=>d({borderColor:e})})]}),(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,mb:`1`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Cantos Arredondados`}),(0,r.jsxs)(H,{size:`1`,children:[g,`px`]})]}),(0,r.jsx)(tb,{min:0,max:50,value:[g],onValueChange:e=>d({borderRadius:`${e[0]}px`})})]}),(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,mb:`1`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Opacidade`}),(0,r.jsxs)(H,{size:`1`,children:[_,`%`]})]}),(0,r.jsx)(tb,{min:0,max:100,value:[_],onValueChange:e=>d({opacity:e[0]/100})})]}),(0,r.jsxs)(U,{children:[(0,r.jsxs)(W,{justify:`between`,mb:`1`,children:[(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Espaçamento Interno (Padding)`}),(0,r.jsxs)(H,{size:`1`,children:[h,`px`]})]}),(0,r.jsx)(tb,{min:0,max:40,value:[h],onValueChange:e=>d({padding:`${e[0]}px`})})]})]})]}),(0,r.jsxs)(U,{mt:`2`,pt:`2`,style:{borderTop:`1px solid var(--gray-5)`},children:[(0,r.jsxs)(G,{variant:`ghost`,onClick:()=>s(!o),style:{width:`100%`,justifyContent:`space-between`,color:`var(--gray-11)`,cursor:`pointer`},children:[(0,r.jsx)(W,{align:`center`,gap:`2`,children:(0,r.jsx)(H,{size:`2`,children:`Mais opções`})}),o?(0,r.jsx)(ve,{}):(0,r.jsx)(be,{})]}),o&&(0,r.jsx)(U,{mt:`3`,className:`advanced-properties-content`,children:(0,r.jsx)(rP,{elementId:l.id})})]})]},c)};var rR=e=>{switch(e){case`text`:return`Texto`;case`image`:return`Imagem`;case`box`:return`Caixa / Grupo`;case`text-container`:return`Texto em Caixa`;default:return`Elemento`}};let iR=({onClose:e})=>{let{state:t,addElement:n,groupElements:i}=rS(),a=t.selectedElementIds.length>0,o=t=>{let r={id:`el-${new Date().toISOString()}`,x:20,y:20,width:150,height:40,style:{}};switch(t){case`text`:n({...r,type:`text`,content:`Novo Texto`,width:120,height:30});break;case`image`:n({...r,type:`image`,content:`https://via.placeholder.com/150`,width:150,height:150});break;case`box`:n({...r,type:`box`,content:``,width:200,height:100,style:{border:`1px solid #ccc`}});break;case`text-container`:n({...r,type:`text-container`,content:`Texto em Caixa`,width:150,height:50,style:{backgroundColor:`#f0f0f0`,padding:`10px`}});break;case`separator`:n({...r,type:`box`,content:``,width:300,height:2,style:{backgroundColor:`#000000`}});break;case`timestamp`:n({...r,type:`text`,content:`{{timestamp}}`,width:150,height:30,formatting:{type:`date`,dateFormat:`dd/MM/yyyy HH:mm`}});break;case`badge`:n({...r,type:`text-container`,content:`Badge`,width:80,height:30,style:{backgroundColor:`#007bff`,color:`white`,borderRadius:`15px`,textAlign:`center`,lineHeight:`30px`}});break;case`list-item`:let e=crypto.randomUUID(),t=crypto.randomUUID(),a=crypto.randomUUID(),o=crypto.randomUUID();n({id:e,type:`box`,x:20,y:20,width:300,height:120,style:{backgroundColor:`#ffffff`,border:`1px solid #e0e0e0`,borderRadius:`8px`,boxShadow:`0 2px 4px rgba(0,0,0,0.05)`}}),n({id:t,type:`image`,content:`https://via.placeholder.com/80`,x:35,y:35,width:80,height:80,style:{borderRadius:`4px`}}),n({id:a,type:`text`,content:`Título do Item`,x:130,y:35,width:170,height:24,style:{fontSize:`18px`,fontWeight:`bold`,color:`#333`}}),n({id:o,type:`text`,content:`Descrição curta do item. Adicione detalhes aqui.`,x:130,y:65,width:170,height:40,style:{fontSize:`14px`,color:`#666`}}),setTimeout(()=>{i([e,t,a,o])},100);break}e&&e()};return(0,r.jsxs)(W,{direction:`column`,style:{height:`100%`},children:[(0,r.jsx)(U,{p:`4`,style:{borderBottom:`1px solid var(--gray-5)`,minHeight:`180px`,flexShrink:0,maxHeight:`calc(100vh - 150px)`,overflowY:`auto`},children:a?(0,r.jsx)(nR,{}):(0,r.jsxs)(W,{direction:`column`,align:`center`,justify:`center`,style:{height:`100%`,minHeight:`100px`},gap:`3`,children:[(0,r.jsxs)(H,{size:`2`,color:`gray`,align:`center`,children:[`Selecione um item no desenho`,(0,r.jsx)(`br`,{}),`para editar suas propriedades`]}),(0,r.jsx)(z_,{color:`blue`,variant:`soft`,children:`Dica: Clique no desenho`})]})}),(0,r.jsxs)(sb,{defaultValue:`blocks`,style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`},children:[(0,r.jsx)(U,{px:`4`,pt:`4`,style:{flexShrink:0},children:(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`blocks`,children:`Blocos`}),(0,r.jsx)(lb,{value:`layers`,children:`Conteúdo`}),(0,r.jsx)(lb,{value:`history`,children:`Histórico`})]})}),(0,r.jsx)(Xv,{type:`auto`,scrollbars:`vertical`,style:{flex:1},children:(0,r.jsxs)(U,{p:`4`,children:[(0,r.jsxs)(ub,{value:`blocks`,children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Adicionar Elemento`}),(0,r.jsx)(H,{size:`1`,color:`gray`,mb:`3`,as:`div`,children:`Clique para adicionar ao desenho`}),(0,r.jsxs)(K,{columns:`2`,gap:`2`,children:[(0,r.jsx)(aR,{icon:(0,r.jsx)(We,{width:`20`,height:`20`}),label:`Texto`,onClick:()=>o(`text`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Xe,{width:`20`,height:`20`}),label:`Imagem`,onClick:()=>o(`image`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Ot,{width:`20`,height:`20`}),label:`Caixa / Grupo`,onClick:()=>o(`box`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(nn,{width:`20`,height:`20`}),label:`Texto em Caixa`,onClick:()=>o(`text-container`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Ae,{width:`20`,height:`20`}),label:`Separador`,onClick:()=>o(`separator`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Jt,{width:`20`,height:`20`}),label:`Data/Hora`,onClick:()=>o(`timestamp`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(At,{width:`20`,height:`20`}),label:`Badge / Etiqueta`,onClick:()=>o(`badge`)})]}),(0,r.jsx)(U,{mt:`4`,children:(0,r.jsx)(kP,{})})]}),(0,r.jsx)(ub,{value:`layers`,children:(0,r.jsx)(tR,{})}),(0,r.jsx)(ub,{value:`history`,children:(0,r.jsx)(AP,{onClose:e})})]})})]})]})};var aR=({icon:e,label:t,onClick:n})=>(0,r.jsx)(Ev,{style:{cursor:`pointer`,transition:`all 0.2s`},onClick:n,children:(0,r.jsxs)(W,{direction:`column`,align:`center`,gap:`2`,p:`2`,children:[(0,r.jsx)(U,{style:{color:`var(--accent-9)`},children:e}),(0,r.jsx)(H,{size:`1`,weight:`medium`,align:`center`,children:t})]})});let oR=()=>{let{state:e,setZoom:t,setPan:n}=rS(),{zoom:i,elements:a}=e;return(0,r.jsxs)(W,{align:`center`,gap:`2`,style:{backgroundColor:`var(--color-panel-solid)`,padding:`4px 8px`,borderRadius:`8px`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`,border:`1px solid var(--gray-6)`},children:[(0,r.jsx)(bb,{content:`Diminuir Zoom (-)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(Math.max(.1,i-.1)),children:(0,r.jsx)(ct,{})})}),(0,r.jsxs)(H,{size:`1`,style:{width:40,textAlign:`center`,fontVariantNumeric:`tabular-nums`},children:[Math.round(i*100),`%`]}),(0,r.jsx)(bb,{content:`Aumentar Zoom (+)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(Math.min(5,i+.1)),children:(0,r.jsx)(mt,{})})}),(0,r.jsx)(Qy,{orientation:`vertical`,style:{height:16}}),(0,r.jsx)(bb,{content:`Resetar (100%)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(1),children:(0,r.jsx)(St,{})})}),(0,r.jsx)(bb,{content:`Ajustar à Tela`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>{if(a.length===0)return;let e=1/0,r=1/0,i=-1/0,o=-1/0;a.forEach(t=>{e=Math.min(e,t.x),r=Math.min(r,t.y),i=Math.max(i,t.x+t.width),o=Math.max(o,t.y+t.height)});let s=i-e+100,c=o-r+100,l=window.innerWidth<768?0:300,u=window.innerWidth-l,d=window.innerHeight-100,f=u/s,p=d/c,m=Math.min(f,p);m=Math.min(Math.max(m,.1),5),t(m);let h=(e+i)/2,g=(r+o)/2,_=u/2,v=d/2;n({x:_-h*m,y:v-g*m})},children:(0,r.jsx)(N,{})})})]})},sR=({isOpen:e,onClose:n,templates:i,onSelectTemplate:a,initialStep:o=1,onFinishWizard:s,onStartTour:c})=>{let[l,u]=(0,t.useState)(o),[d,f]=(0,t.useState)(null);t.default.useEffect(()=>{e&&o&&u(o)},[e,o]);let p=()=>{l===1&&d?(a(i.find(e=>e.id===d)||null),u(2)):l===2?(n(),c&&c()):l===3&&(s&&s(),n())};return(0,r.jsx)(ny,{open:e,onOpenChange:n,children:(0,r.jsx)(iy,{style:{maxWidth:800},children:(0,r.jsxs)(W,{direction:`column`,gap:`4`,children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,children:[(0,r.jsx)(ay,{children:(0,r.jsxs)(W,{align:`center`,gap:`2`,children:[(0,r.jsx)(it,{}),` Assistente de Criação`]})}),(0,r.jsx)(W,{gap:`2`,children:(0,r.jsx)(cR,{current:l,total:3})})]}),(0,r.jsxs)(U,{children:[l===1&&(0,r.jsxs)(W,{direction:`column`,gap:`4`,children:[(0,r.jsx)(m_,{size:`4`,children:`Passo 1: Escolha um Modelo (Template)`}),(0,r.jsx)(H,{color:`gray`,size:`2`,children:`Comece com um layout pronto e personalize conforme sua necessidade.`}),(0,r.jsxs)(K,{columns:`3`,gap:`3`,children:[i.map(e=>(0,r.jsx)(Ev,{variant:d===e.id?`surface`:`classic`,style:{cursor:`pointer`,border:d===e.id?`2px solid var(--accent-9)`:void 0,backgroundColor:d===e.id?`var(--accent-2)`:void 0},onClick:()=>f(e.id),children:(0,r.jsxs)(W,{direction:`column`,gap:`2`,align:`center`,p:`2`,children:[(0,r.jsx)(U,{style:{width:`100%`,height:100,backgroundColor:`var(--gray-3)`,borderRadius:4,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(We,{width:32,height:32,color:`var(--gray-8)`})}),(0,r.jsx)(H,{weight:`bold`,size:`2`,children:e.name}),(0,r.jsx)(H,{size:`1`,color:`gray`,align:`center`,children:e.description})]})},e.id)),(0,r.jsx)(Ev,{variant:d===`blank`?`surface`:`classic`,style:{cursor:`pointer`,border:d===`blank`?`2px solid var(--accent-9)`:void 0,backgroundColor:d===`blank`?`var(--accent-2)`:void 0},onClick:()=>f(`blank`),children:(0,r.jsxs)(W,{direction:`column`,gap:`2`,align:`center`,p:`2`,children:[(0,r.jsx)(U,{style:{width:`100%`,height:100,backgroundColor:`var(--gray-3)`,borderRadius:4,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(U,{style:{width:40,height:40,border:`2px dashed var(--gray-8)`,borderRadius:4}})}),(0,r.jsx)(H,{weight:`bold`,size:`2`,children:`Começar do Zero`}),(0,r.jsx)(H,{size:`1`,color:`gray`,align:`center`,children:`Tela em branco`})]})})]}),(0,r.jsxs)(W,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(G,{variant:`soft`,color:`gray`,onClick:n,children:`Pular Assistente`}),(0,r.jsxs)(G,{onClick:p,disabled:!d,children:[`Continuar `,(0,r.jsx)(j,{})]})]})]}),l===2&&(0,r.jsxs)(W,{direction:`column`,gap:`4`,children:[(0,r.jsx)(m_,{size:`4`,children:`Passo 2: Personalizar Visual`}),(0,r.jsx)(H,{color:`gray`,size:`2`,children:`Agora é sua vez de ajustar o layout. Use as ferramentas disponíveis.`}),(0,r.jsxs)(K,{columns:`2`,gap:`4`,children:[(0,r.jsx)(Ev,{variant:`surface`,children:(0,r.jsxs)(W,{gap:`3`,align:`start`,children:[(0,r.jsx)(U,{style:{padding:8,backgroundColor:`var(--accent-3)`,borderRadius:4},children:(0,r.jsx)(We,{width:20,height:20,color:`var(--accent-9)`})}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{weight:`bold`,size:`2`,as:`div`,children:`Edite Conteúdo`}),(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Clique duas vezes em qualquer texto ou imagem para editar suas propriedades.`})]})]})}),(0,r.jsx)(Ev,{variant:`surface`,children:(0,r.jsxs)(W,{gap:`3`,align:`start`,children:[(0,r.jsx)(U,{style:{padding:8,backgroundColor:`var(--green-3)`,borderRadius:4},children:(0,r.jsx)(it,{width:20,height:20,color:`var(--green-9)`})}),(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{weight:`bold`,size:`2`,as:`div`,children:`Adicione Blocos`}),(0,r.jsx)(H,{size:`1`,color:`gray`,children:`Use a barra lateral esquerda para arrastar novos elementos.`})]})]})})]}),(0,r.jsxs)(W,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsxs)(G,{variant:`soft`,color:`gray`,onClick:()=>u(1),children:[(0,r.jsx)(j,{style:{transform:`rotate(180deg)`}}),` Voltar`]}),(0,r.jsxs)(G,{onClick:p,children:[`Começar a Editar `,(0,r.jsx)(j,{})]})]})]}),l===3&&(0,r.jsxs)(W,{direction:`column`,gap:`4`,children:[(0,r.jsx)(m_,{size:`4`,children:`Passo 3: Testar e Exportar`}),(0,r.jsx)(H,{color:`gray`,size:`2`,children:`Seu layout está pronto? Teste com dados diferentes e exporte o resultado.`}),(0,r.jsx)(Ev,{variant:`surface`,style:{padding:20},children:(0,r.jsxs)(W,{direction:`column`,gap:`3`,align:`center`,children:[(0,r.jsx)(ge,{width:48,height:48,color:`var(--green-9)`}),(0,r.jsx)(m_,{size:`3`,children:`Tudo pronto!`}),(0,r.jsx)(H,{align:`center`,children:`Você completou a criação do layout. Agora você pode salvar, exportar ou continuar editando.`})]})}),(0,r.jsxs)(W,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(G,{variant:`soft`,color:`gray`,onClick:n,children:`Voltar a Editar`}),(0,r.jsxs)(G,{onClick:p,color:`green`,children:[(0,r.jsx)(ge,{}),` Concluir e Exportar`]})]})]})]})]})})})};var cR=({current:e,total:t})=>(0,r.jsx)(W,{gap:`2`,children:[1,2,3].map(n=>(0,r.jsxs)(W,{align:`center`,gap:`1`,children:[(0,r.jsx)(U,{style:{width:24,height:24,borderRadius:`50%`,backgroundColor:n<=e?`var(--accent-9)`:`var(--gray-4)`,color:`white`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:`bold`},children:n<e?(0,r.jsx)(ge,{}):n}),n<t&&(0,r.jsx)(U,{style:{width:20,height:2,backgroundColor:`var(--gray-4)`}})]},n))}),lR=({initialState:e,onSave:n,theme:i=`light`,templates:a,activeTemplateId:o,onTemplateChange:s})=>{let[c,l]=(0,t.useState)(!0),[u,d]=(0,t.useState)(!0),[f,p]=(0,t.useState)(!1),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(a&&a.length>0?a[0].id:null),v=t.default.useRef(null),[y,b]=(0,t.useState)(!1),[x,S]=(0,t.useState)(1),[C,w]=(0,t.useState)(!1),{addElement:T,loadState:E,state:D,undo:O,redo:k,copy:A,paste:j,removeSelected:M,updateElements:N}=rS(),P=t.default.useRef(!1);t.default.useEffect(()=>{let e=()=>{let e=window.innerWidth<768;h(e),e&&(d(!1),l(!1))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let ee=()=>{let e={elements:D.elements,isList:D.isList,mockData:D.mockData,singleMockData:D.singleMockData,listSettings:D.listSettings,canvasHeight:D.canvasHeight,gridSize:D.gridSize},t=JSON.stringify(e,null,2),n=new Blob([t],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`layout-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)};t.default.useEffect(()=>{let e=e=>{if(document.activeElement?.tagName===`INPUT`||document.activeElement?.tagName===`TEXTAREA`||document.activeElement?.isContentEditable)return;let t=e.clipboardData?.items;if(t){for(let n=0;n<t.length;n++)if(t[n].type.indexOf(`image`)!==-1){e.preventDefault();let r=t[n].getAsFile();if(r){let e=new FileReader;e.onload=e=>{let t=e.target?.result;T({type:`image`,content:t,width:200,height:200})},e.readAsDataURL(r)}}}};return window.addEventListener(`paste`,e),()=>window.removeEventListener(`paste`,e)},[T]),t.default.useEffect(()=>{let e=e=>{if(!(document.activeElement?.tagName===`INPUT`||document.activeElement?.tagName===`TEXTAREA`||document.activeElement?.isContentEditable)){if((e.ctrlKey||e.metaKey)&&e.key===`z`)e.shiftKey?(e.preventDefault(),k()):(e.preventDefault(),O());else if((e.ctrlKey||e.metaKey)&&e.key===`y`)e.preventDefault(),k();else if((e.ctrlKey||e.metaKey)&&e.key===`c`)e.preventDefault(),A();else if((e.ctrlKey||e.metaKey)&&e.key===`v`)e.preventDefault(),j();else if(e.key===`Delete`||e.key===`Backspace`)D.selectedElementIds.length>0&&(e.preventDefault(),M());else if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key)&&D.selectedElementIds.length>0){e.preventDefault();let t=e.shiftKey?10:1,n=[];D.selectedElementIds.forEach(r=>{let i=D.elements.find(e=>e.id===r);if(i){let a={};e.key===`ArrowUp`&&(a.y=i.y-t),e.key===`ArrowDown`&&(a.y=i.y+t),e.key===`ArrowLeft`&&(a.x=i.x-t),e.key===`ArrowRight`&&(a.x=i.x+t),n.push({id:r,changes:a})}}),n.length>0&&N(n)}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[O,k,A,j,M,D.selectedElementIds,D.elements,N]);let[F,te]=(0,t.useState)(!1);t.default.useEffect(()=>{if(e)try{let t=typeof e==`string`?JSON.parse(e):e;Array.isArray(t)?E({elements:t}):t.elements&&E(t)}catch(e){console.error(`Failed to load initial state`,e)}te(!0)},[e,E]),t.default.useEffect(()=>{F&&(P.current||D.elements.length===0&&(P.current=!0,S(1),b(!0)))},[F,D.elements]),t.default.useEffect(()=>{!a||a.length===0||f&&_(o||a[0].id)},[o,f,a]);let I=t.default.useCallback(e=>{if(e)try{let t=typeof e==`string`?JSON.parse(e):e;if(Array.isArray(t)){E({elements:t});return}if(t&&typeof t==`object`&&`elements`in t){E(t);return}}catch(e){console.error(`Failed to apply template`,e)}},[E]);return t.default.useEffect(()=>{if(!a||a.length===0||!o||v.current===o)return;let e=a.find(e=>e.id===o);e&&(I(e.state),v.current=o)},[o,I,a]),(0,r.jsx)(A_,{appearance:i,accentColor:`blue`,grayColor:`slate`,radius:`large`,scaling:`105%`,children:(0,r.jsxs)(W,{direction:`column`,style:{height:`100vh`,width:`100%`,overflow:`hidden`,backgroundColor:`var(--gray-1)`},children:[(0,r.jsx)(LS,{onSave:n,templates:a,setIsTemplatesOpen:p,onFinish:()=>{S(3),b(!0)},onToggleSidebar:()=>d(!u)}),(0,r.jsxs)(W,{direction:`row`,style:{flexGrow:1,overflow:`hidden`},children:[m&&u&&(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(0,0,0,0.5)`,zIndex:90},onClick:()=>d(!1)}),u&&(0,r.jsxs)(W,{id:`sidebar-area`,direction:`column`,width:m?`100%`:`300px`,style:{borderRight:`1px solid var(--gray-5)`,backgroundColor:`var(--gray-1)`,flexShrink:0,height:`100%`,boxShadow:`1px 0 0 var(--gray-4)`,overflow:`hidden`,position:m?`absolute`:`relative`,zIndex:m?100:`auto`,top:0,left:0},children:[m&&(0,r.jsx)(W,{justify:`end`,p:`2`,children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>d(!1),children:(0,r.jsx)(Ee,{})})}),(0,r.jsx)(iR,{onClose:()=>{m&&d(!1)}})]}),(0,r.jsxs)(W,{direction:`column`,style:{flex:1,height:`100%`,overflow:`hidden`},children:[(0,r.jsxs)(W,{justify:`between`,align:`center`,px:`3`,py:`2`,style:{borderBottom:`1px solid var(--gray-6)`,backgroundColor:`var(--gray-1)`,flexShrink:0,zIndex:10},children:[(0,r.jsx)(W,{gap:`3`,align:`center`,children:(0,r.jsx)(J,{size:`2`,variant:`ghost`,color:`gray`,onClick:()=>d(!u),title:u?`Ocultar Barra Lateral`:`Mostrar Barra Lateral`,style:{cursor:`pointer`},children:m?(0,r.jsx)(Qe,{}):u?(0,r.jsx)(Me,{}):(0,r.jsx)(Pe,{})})}),(0,r.jsxs)(W,{gap:`3`,align:`center`,children:[(0,r.jsx)(OP,{}),(0,r.jsx)(J,{size:`2`,variant:`ghost`,color:c?`blue`:`gray`,onClick:()=>l(!c),title:c?`Ocultar Preview`:`Mostrar Preview`,style:{cursor:`pointer`},children:c?(0,r.jsx)(He,{}):(0,r.jsx)(Be,{})})]})]}),(0,r.jsx)(U,{style:{flex:1,position:`relative`,overflow:`hidden`},children:(0,r.jsxs)(Kx,{orientation:`horizontal`,style:{height:`100%`,width:`100%`},children:[(!m||!c)&&(0,r.jsx)(Xx,{defaultSize:50,minSize:20,children:(0,r.jsxs)(K,{columns:`20px 1fr`,rows:`20px 1fr`,style:{height:`100%`,width:`100%`,backgroundColor:`var(--color-background)`},children:[(0,r.jsx)(U,{style:{backgroundColor:`var(--gray-2)`,borderRight:`1px solid var(--gray-6)`,borderBottom:`1px solid var(--gray-6)`,zIndex:30}}),(0,r.jsx)(U,{style:{backgroundColor:`var(--gray-2)`,borderBottom:`1px solid var(--gray-6)`,overflow:`hidden`,zIndex:30},children:(0,r.jsx)(EP,{orientation:`horizontal`})}),(0,r.jsx)(U,{style:{backgroundColor:`var(--gray-2)`,borderRight:`1px solid var(--gray-6)`,overflow:`hidden`,zIndex:30},children:(0,r.jsx)(EP,{orientation:`vertical`})}),(0,r.jsxs)(U,{style:{position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`},id:`canvas-area`,children:[(0,r.jsx)(U,{style:{position:`absolute`,top:16,left:`50%`,transform:`translateX(-50%)`,zIndex:20},children:(0,r.jsx)(iS,{})}),(0,r.jsx)(U,{style:{position:`absolute`,bottom:16,right:16,zIndex:20},children:(0,r.jsx)(oR,{})}),(0,r.jsx)(IS,{}),(0,r.jsx)(RS,{})]})]})}),!m&&c&&(0,r.jsx)(Qy,{style:{width:`4px`,backgroundColor:`var(--gray-6)`,cursor:`col-resize`,transition:`background-color 0.2s`}}),c&&(0,r.jsx)(Xx,{defaultSize:50,minSize:20,children:(0,r.jsx)(U,{id:`preview-area`,style:{height:`100%`,width:`100%`,backgroundColor:`var(--gray-3)`,borderLeft:`1px solid var(--gray-5)`},children:(0,r.jsx)(gN,{})})})]})})]})]}),(0,r.jsx)(ny,{open:f,onOpenChange:p,children:(0,r.jsxs)(iy,{style:{maxWidth:450},children:[(0,r.jsx)(ay,{children:`Galeria de Templates`}),(0,r.jsx)(oy,{size:`2`,mb:`4`,children:`Escolha um layout pré-definido para começar.`}),a&&a.length>0?(0,r.jsxs)(W,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(U,{children:[(0,r.jsx)(H,{size:`2`,weight:`bold`,as:`div`,mb:`2`,children:`Selecione o Template`}),(0,r.jsx)(W,{direction:`column`,gap:`2`,children:a.map(e=>(0,r.jsx)(G,{variant:g===e.id?`solid`:`soft`,color:g===e.id?`blue`:`gray`,size:`2`,style:{width:`100%`,justifyContent:`flex-start`,border:g===e.id?`2px solid var(--accent-9)`:void 0},onClick:()=>_(e.id),children:e.name},e.id))})]}),g&&a.find(e=>e.id===g)?.description&&(0,r.jsx)(U,{p:`3`,style:{backgroundColor:`var(--gray-2)`,borderRadius:8},children:(0,r.jsx)(H,{size:`2`,color:`gray`,children:a.find(e=>e.id===g)?.description})}),(0,r.jsxs)(W,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(sy,{children:(0,r.jsx)(G,{variant:`soft`,color:`gray`,children:`Cancelar`})}),(0,r.jsx)(sy,{children:(0,r.jsx)(G,{onClick:()=>{if(!g)return;if(s){s(g);return}let e=a.find(e=>e.id===g);e&&(I(e.state),v.current=g)},children:`Aplicar`})})]})]}):(0,r.jsx)(H,{children:`Nenhum template disponível.`})]})}),(0,r.jsx)(sR,{isOpen:y,onClose:()=>b(!1),templates:a||[],onSelectTemplate:e=>{e&&I(e.state)},onStartTour:()=>w(!0),initialStep:x,onFinishWizard:()=>{ee(),alert(`Layout finalizado e exportado com sucesso!`)}}),(0,r.jsx)(BS,{isOpen:C,onClose:()=>w(!1)}),(0,r.jsx)(SP,{})]})})};let uR=e=>(0,r.jsx)(nS,{isList:e.layout.isList,availableProps:e.layout.props,theme:e.theme,children:(0,r.jsx)(lR,{...e})});var dR=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,`$1-$2`).toLowerCase(),fR=e=>{let t=/^#([0-9a-fA-F]{8})$/.exec(e);if(!t)return e;let n=t[1];return`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${parseInt(n.slice(6,8),16)/255})`},pR=e=>{if(!e)return``;let t=[`width`,`height`,`top`,`left`,`right`,`bottom`,`fontSize`,`borderRadius`,`padding`,`margin`,`borderWidth`,`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`,`minHeight`,`maxHeight`,`minWidth`,`maxWidth`];return Object.entries(e).map(([e,n])=>{if(n==null)return``;let r=dR(e),i=typeof n==`number`&&t.includes(e)?n+`px`:n;return typeof i==`string`&&/^#([0-9a-fA-F]{8})$/.test(i)&&(i=fR(i)),`${r}: ${i}`}).filter(Boolean).join(`; `)},mR=(e,t)=>{let n=/(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;return!e||e===`none`?`0 4px 12px 0 ${t}`:n.test(e)?e.replace(n,t):`${e} ${t}`},hR=(e,t,n,r,i=1.2)=>{if(!e)return 0;try{let a=document.createElement(`canvas`).getContext(`2d`);if(!a)return 0;a.font=`${r}px ${n}`;let o=String(e).split(`
61
+ `},pF={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function mF(e){let{announcements:r=pF,container:i,hiddenTextDescribedById:a,screenReaderInstructions:o=fF}=e,{announce:s,announcement:c}=cF(),l=JP(`DndLiveRegion`),[u,d]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{d(!0)},[]),uF((0,t.useMemo)(()=>({onDragStart(e){let{active:t}=e;s(r.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;r.onDragMove&&s(r.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;s(r.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;s(r.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;s(r.onDragCancel({active:t,over:n}))}}),[s,r])),!u)return null;let f=t.default.createElement(t.default.Fragment,null,t.default.createElement(oF,{id:a,value:o.draggable}),t.default.createElement(sF,{id:l,announcement:c}));return i?(0,n.createPortal)(f,i):f}var hF;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(hF||={});function gF(){}function _F(e,n){return(0,t.useMemo)(()=>({sensor:e,options:n??{}}),[e,n])}function vF(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,t.useMemo)(()=>[...n].filter(e=>e!=null),[...n])}var yF=Object.freeze({x:0,y:0});function bF(e,t){let n=tF(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function xF(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function SF(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function CF(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var wF=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=CF(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(xF)};function TF(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function EF(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:yF}function DF(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var OF=DF(1);function kF(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function AF(e,t,n){let r=kF(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var jF={ignoreTransform:!1};function MF(e,t){t===void 0&&(t=jF);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=FP(e).getComputedStyle(e);t&&(n=AF(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function NF(e){return MF(e,{ignoreTransform:!0})}function PF(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function FF(e,t){return t===void 0&&(t=FP(e).getComputedStyle(e)),t.position===`fixed`}function IF(e,t){t===void 0&&(t=FP(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function LF(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(IP(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!LP(i)||RP(i)||n.includes(i))return n;let a=FP(e).getComputedStyle(i);return i!==e&&IF(i,a)&&n.push(i),FF(i,a)?n:r(i.parentNode)}return e?r(e):n}function RF(e){let[t]=LF(e,1);return t??null}function zF(e){return!MP||!e?null:NP(e)?e:PP(e)?IP(e)||e===zP(e).scrollingElement?window:LP(e)?e:null:null}function BF(e){return NP(e)?e.scrollX:e.scrollLeft}function VF(e){return NP(e)?e.scrollY:e.scrollTop}function HF(e){return{x:BF(e),y:VF(e)}}var UF;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(UF||={});function WF(e){return!MP||!e?!1:e===document.scrollingElement}function GF(e){let t={x:0,y:0},n=WF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var KF={x:.2,y:.2};function qF(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=KF);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=GF(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=UF.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=UF.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=UF.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=UF.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function JF(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function YF(e){return e.reduce((e,t)=>XP(e,HF(t)),yF)}function XF(e){return e.reduce((e,t)=>e+BF(t),0)}function ZF(e){return e.reduce((e,t)=>e+VF(t),0)}function QF(e,t){if(t===void 0&&(t=MF),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);RF(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var $F=[[`x`,[`left`,`right`],XF],[`y`,[`top`,`bottom`],ZF]],eI=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=LF(t),r=YF(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of $F)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},tI=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function nI(e){let{EventTarget:t}=FP(e);return e instanceof t?e:zP(e)}function rI(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var iI;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(iI||={});function aI(e){e.preventDefault()}function oI(e){e.stopPropagation()}var $;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})($||={});var sI={start:[$.Space,$.Enter],cancel:[$.Esc],end:[$.Space,$.Enter,$.Tab]},cI=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $.Right:return{...n,x:n.x+25};case $.Left:return{...n,x:n.x-25};case $.Down:return{...n,y:n.y+25};case $.Up:return{...n,y:n.y-25}}},lI=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new tI(zP(t)),this.windowListeners=new tI(FP(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(iI.Resize,this.handleCancel),this.windowListeners.add(iI.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(iI.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&QF(n),t(yF)}handleKeyDown(e){if($P(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=sI,coordinateGetter:a=cI,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:yF;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=ZP(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=GF(n),p=JF(n),m={x:Math.min(i===$.Right?p.right-p.width/2:p.right,Math.max(i===$.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===$.Down?p.bottom-p.height/2:p.bottom,Math.max(i===$.Down?p.top:p.top+p.height/2,u.y))},h=i===$.Right&&!s||i===$.Left&&!c,g=i===$.Down&&!l||i===$.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===$.Right&&e<=d.x||i===$.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===$.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===$.Down&&e<=d.y||i===$.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===$.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,XP(ZP(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};lI.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=sI,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function uI(e){return!!(e&&`distance`in e)}function dI(e){return!!(e&&`delay`in e)}var fI=class{constructor(e,t,n){n===void 0&&(n=nI(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=zP(i),this.documentListeners=new tI(this.document),this.listeners=new tI(n),this.windowListeners=new tI(FP(i)),this.initialCoordinates=tF(r)??yF,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(iI.Resize,this.handleCancel),this.windowListeners.add(iI.DragStart,aI),this.windowListeners.add(iI.VisibilityChange,this.handleCancel),this.windowListeners.add(iI.ContextMenu,aI),this.documentListeners.add(iI.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(dI(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(uI(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(iI.Click,oI,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(iI.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=tF(e)??yF,s=ZP(n,o);if(!t&&a){if(uI(a)){if(a.tolerance!=null&&rI(s,a.tolerance))return this.handleCancel();if(rI(s,a.distance))return this.handleStart()}if(dI(a)&&rI(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===$.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},pI={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},mI=class extends fI{constructor(e){let{event:t}=e,n=zP(t.target);super(e,pI,n)}};mI.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var hI={move:{name:`mousemove`},end:{name:`mouseup`}},gI;(function(e){e[e.RightClick=2]=`RightClick`})(gI||={});var _I=class extends fI{constructor(e){super(e,hI,zP(e.event.target))}};_I.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===gI.RightClick?!1:(r?.({event:n}),!0)}}];var vI={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},yI=class extends fI{constructor(e){super(e,vI)}static setup(){return window.addEventListener(vI.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(vI.move.name,e)};function e(){}}};yI.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var bI;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(bI||={});var xI;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(xI||={});function SI(e){let{acceleration:n,activator:r=bI.Pointer,canScroll:i,draggingRect:a,enabled:o,interval:s=5,order:c=xI.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e,m=wI({delta:f,disabled:!o}),[h,g]=HP(),_=(0,t.useRef)({x:0,y:0}),v=(0,t.useRef)({x:0,y:0}),y=(0,t.useMemo)(()=>{switch(r){case bI.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case bI.DraggableRect:return a}},[r,a,l]),b=(0,t.useRef)(null),x=(0,t.useCallback)(()=>{let e=b.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),S=(0,t.useMemo)(()=>c===xI.TreeOrder?[...u].reverse():u,[c,u]);(0,t.useEffect)(()=>{if(!o||!u.length||!y){g();return}for(let e of S){if(i?.(e)===!1)continue;let t=d[u.indexOf(e)];if(!t)continue;let{direction:r,speed:a}=qF(e,t,y,n,p);for(let e of[`x`,`y`])m[e][r[e]]||(a[e]=0,r[e]=0);if(a.x>0||a.y>0){g(),b.current=e,h(x,s),_.current=a,v.current=r;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[n,x,i,g,o,s,JSON.stringify(y),JSON.stringify(m),h,u,S,d,JSON.stringify(p)])}var CI={x:{[UF.Backward]:!1,[UF.Forward]:!1},y:{[UF.Backward]:!1,[UF.Forward]:!1}};function wI(e){let{delta:t,disabled:n}=e,r=KP(t);return WP(e=>{if(n||!r||!e)return CI;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[UF.Backward]:e.x[UF.Backward]||i.x===-1,[UF.Forward]:e.x[UF.Forward]||i.x===1},y:{[UF.Backward]:e.y[UF.Backward]||i.y===-1,[UF.Forward]:e.y[UF.Forward]||i.y===1}}},[n,t,r])}function TI(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return WP(e=>t==null?null:r??e??null,[r,t])}function EI(e,n){return(0,t.useMemo)(()=>e.reduce((e,t)=>{let{sensor:r}=t,i=r.activators.map(e=>({eventName:e.eventName,handler:n(e.handler,t)}));return[...e,...i]},[]),[e,n])}var DI;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(DI||={});var OI;(function(e){e.Optimized=`optimized`})(OI||={});var kI=new Map;function AI(e,n){let{dragging:r,dependencies:i,config:a}=n,[o,s]=(0,t.useState)(null),{frequency:c,measure:l,strategy:u}=a,d=(0,t.useRef)(e),f=_(),p=UP(f),m=(0,t.useCallback)(function(e){e===void 0&&(e=[]),!p.current&&s(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),h=(0,t.useRef)(null),g=WP(t=>{if(f&&!r)return kI;if(!t||t===kI||d.current!==e||o!=null){let t=new Map;for(let n of e){if(!n)continue;if(o&&o.length>0&&!o.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new eI(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,o,r,f,l]);return(0,t.useEffect)(()=>{d.current=e},[e]),(0,t.useEffect)(()=>{f||m()},[r,f]),(0,t.useEffect)(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),(0,t.useEffect)(()=>{f||typeof c!=`number`||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},c))},[c,f,m,...i]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:o!=null};function _(){switch(u){case DI.Always:return!1;case DI.BeforeDragging:return r;default:return!r}}}function jI(e,t){return WP(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function MI(e,t){return jI(e,t)}function NI(e){let{callback:n,disabled:r}=e,i=VP(n),a=(0,t.useMemo)(()=>{if(r||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(i)},[i,r]);return(0,t.useEffect)(()=>()=>a?.disconnect(),[a]),a}function PI(e){let{callback:n,disabled:r}=e,i=VP(n),a=(0,t.useMemo)(()=>{if(r||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(i)},[r]);return(0,t.useEffect)(()=>()=>a?.disconnect(),[a]),a}function FI(e){return new eI(MF(e),e)}function II(e,n,r){n===void 0&&(n=FI);let[i,a]=(0,t.useState)(null);function o(){a(t=>{if(!e)return null;if(e.isConnected===!1)return t??r??null;let i=n(e);return JSON.stringify(t)===JSON.stringify(i)?t:i})}let s=NI({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),c=PI({callback:o});return BP(()=>{o(),e?(c?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),s?.disconnect())},[e]),i}function LI(e){return EF(e,jI(e))}var RI=[];function zI(e){let n=(0,t.useRef)(e),r=WP(t=>e?t&&t!==RI&&e&&n.current&&e.parentNode===n.current.parentNode?t:LF(e):RI,[e]);return(0,t.useEffect)(()=>{n.current=e},[e]),r}function BI(e){let[n,r]=(0,t.useState)(null),i=(0,t.useRef)(e),a=(0,t.useCallback)(e=>{let t=zF(e.target);t&&r(e=>e?(e.set(t,HF(t)),new Map(e)):null)},[]);return(0,t.useEffect)(()=>{let t=i.current;if(e!==t){n(t);let o=e.map(e=>{let t=zF(e);return t?(t.addEventListener(`scroll`,a,{passive:!0}),[t,HF(t)]):null}).filter(e=>e!=null);r(o.length?new Map(o):null),i.current=e}return()=>{n(e),n(t)};function n(e){e.forEach(e=>{zF(e)?.removeEventListener(`scroll`,a)})}},[a,e]),(0,t.useMemo)(()=>e.length?n?Array.from(n.values()).reduce((e,t)=>XP(e,t),yF):YF(e):yF,[e,n])}function VI(e,n){n===void 0&&(n=[]);let r=(0,t.useRef)(null);return(0,t.useEffect)(()=>{r.current=null},n),(0,t.useEffect)(()=>{let t=e!==yF;t&&!r.current&&(r.current=e),!t&&r.current&&(r.current=null)},[e]),r.current?ZP(e,r.current):yF}function HI(e){(0,t.useEffect)(()=>{if(!MP)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function UI(e,n){return(0,t.useMemo)(()=>e.reduce((e,t)=>{let{eventName:r,handler:i}=t;return e[r]=e=>{i(e,n)},e},{}),[e,n])}function WI(e){return(0,t.useMemo)(()=>e?PF(e):null,[e])}var GI=[];function KI(e,n){n===void 0&&(n=MF);let[r]=e,i=WI(r?FP(r):null),[a,o]=(0,t.useState)(GI);function s(){o(()=>e.length?e.map(e=>WF(e)?i:new eI(n(e),e)):GI)}let c=PI({callback:s});return BP(()=>{c?.disconnect(),s(),e.forEach(e=>c?.observe(e))},[e]),a}function qI(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return LP(t)?t:e}function JI(e){let{measure:n}=e,[r,i]=(0,t.useState)(null),a=PI({callback:(0,t.useCallback)(e=>{for(let{target:t}of e)if(LP(t)){i(e=>{let r=n(t);return e?{...e,width:r.width,height:r.height}:r});break}},[n])}),[o,s]=GP((0,t.useCallback)(e=>{let t=qI(e);a?.disconnect(),t&&a?.observe(t),i(t?n(t):null)},[n,a]));return(0,t.useMemo)(()=>({nodeRef:o,rect:r,setRef:s}),[r,o,s])}var YI=[{sensor:mI,options:{}},{sensor:lI,options:{}}],XI={current:{}},ZI={draggable:{measure:NF},droppable:{measure:NF,strategy:DI.WhileDragging,frequency:OI.Optimized},dragOverlay:{measure:MF}},QI=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},$I={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new QI,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gF},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ZI,measureDroppableContainers:gF,windowRect:null,measuringScheduled:!1},eL={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:gF,draggableNodes:new Map,over:null,measureDroppableContainers:gF},tL=(0,t.createContext)(eL),nL=(0,t.createContext)($I);function rL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new QI}}}function iL(e,t){switch(t.type){case hF.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case hF.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case hF.DragEnd:case hF.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case hF.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new QI(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case hF.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new QI(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case hF.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new QI(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function aL(e){let{disabled:n}=e,{active:r,activatorEvent:i,draggableNodes:a}=(0,t.useContext)(tL),o=KP(i),s=KP(r?.id);return(0,t.useEffect)(()=>{if(!n&&!i&&o&&s!=null){if(!$P(o)||document.activeElement===o.target)return;let e=a.get(s);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=iF(e);if(t){t.focus();break}}})}},[i,n,a,s,o]),null}function oL(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function sL(e){return(0,t.useMemo)(()=>({draggable:{...ZI.draggable,...e?.draggable},droppable:{...ZI.droppable,...e?.droppable},dragOverlay:{...ZI.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function cL(e){let{activeNode:n,measure:r,initialRect:i,config:a=!0}=e,o=(0,t.useRef)(!1),{x:s,y:c}=typeof a==`boolean`?{x:a,y:a}:a;BP(()=>{if(!s&&!c||!n){o.current=!1;return}if(o.current||!i)return;let e=n?.node.current;if(!e||e.isConnected===!1)return;let t=EF(r(e),i);if(s||(t.x=0),c||(t.y=0),o.current=!0,Math.abs(t.x)>0||Math.abs(t.y)>0){let n=RF(e);n&&n.scrollBy({top:t.y,left:t.x})}},[n,s,c,i,r])}var lL=(0,t.createContext)({...yF,scaleX:1,scaleY:1}),uL;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(uL||={});var dL=(0,t.memo)(function(e){let{id:r,accessibility:i,autoScroll:a=!0,children:o,sensors:s=YI,collisionDetection:c=wF,measuring:l,modifiers:u,...d}=e,[f,p]=(0,t.useReducer)(iL,void 0,rL),[m,h]=dF(),[g,_]=(0,t.useState)(uL.Uninitialized),v=g===uL.Initialized,{draggable:{active:y,nodes:b,translate:x},droppable:{containers:S}}=f,C=y==null?null:b.get(y),w=(0,t.useRef)({initial:null,translated:null}),T=(0,t.useMemo)(()=>y==null?null:{id:y,data:C?.data??XI,rect:w},[y,C]),E=(0,t.useRef)(null),[D,O]=(0,t.useState)(null),[k,A]=(0,t.useState)(null),j=UP(d,Object.values(d)),M=JP(`DndDescribedBy`,r),N=(0,t.useMemo)(()=>S.getEnabled(),[S]),P=sL(l),{droppableRects:F,measureDroppableContainers:I,measuringScheduled:ee}=AI(N,{dragging:v,dependencies:[x.x,x.y],config:P.droppable}),L=TI(b,y),te=(0,t.useMemo)(()=>k?tF(k):null,[k]),ne=Ne(),re=MI(L,P.draggable.measure);cL({activeNode:y==null?null:b.get(y),config:ne.layoutShiftCompensation,initialRect:re,measure:P.draggable.measure});let ie=II(L,P.draggable.measure,re),ae=II(L?L.parentElement:null),oe=(0,t.useRef)({activatorEvent:null,active:null,activeNode:L,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:b,draggingNode:null,draggingNodeRect:null,droppableContainers:S,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=S.getNodeFor(oe.current.over?.id),ce=JI({measure:P.dragOverlay.measure}),le=ce.nodeRef.current??L,ue=v?ce.rect??ie:null,de=!!(ce.nodeRef.current&&ce.rect),fe=LI(de?null:ie),pe=WI(le?FP(le):null),me=zI(v?se??L:null),he=KI(me),ge=oL(u,{transform:{x:x.x-fe.x,y:x.y-fe.y,scaleX:1,scaleY:1},activatorEvent:k,active:T,activeNodeRect:ie,containerNodeRect:ae,draggingNodeRect:ue,over:oe.current.over,overlayNodeRect:ce.rect,scrollableAncestors:me,scrollableAncestorRects:he,windowRect:pe}),_e=te?XP(te,x):null,ve=BI(me),ye=VI(ve),be=VI(ve,[ie]),xe=XP(ge,ye),Se=ue?OF(ue,ge):null,Ce=T&&Se?c({active:T,collisionRect:Se,droppableRects:F,droppableContainers:N,pointerCoordinates:_e}):null,we=SF(Ce,`id`),[Te,Ee]=(0,t.useState)(null),De=TF(de?ge:XP(ge,be),Te?.rect??null,ie),Oe=(0,t.useRef)(null),ke=(0,t.useCallback)((e,t)=>{let{sensor:r,options:i}=t;if(E.current==null)return;let a=b.get(E.current);if(!a)return;let o=e.nativeEvent;Oe.current=new r({active:E.current,activeNode:a,event:o,options:i,context:oe,onAbort(e){if(!b.get(e))return;let{onDragAbort:t}=j.current,n={id:e};t?.(n),m({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!b.get(e))return;let{onDragPending:i}=j.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),m({type:`onDragPending`,event:a})},onStart(e){let t=E.current;if(t==null)return;let r=b.get(t);if(!r)return;let{onDragStart:i}=j.current,a={activatorEvent:o,active:{id:t,data:r.data,rect:w}};(0,n.unstable_batchedUpdates)(()=>{i?.(a),_(uL.Initializing),p({type:hF.DragStart,initialCoordinates:e,active:t}),m({type:`onDragStart`,event:a}),O(Oe.current),A(o)})},onMove(e){p({type:hF.DragMove,coordinates:e})},onEnd:s(hF.DragEnd),onCancel:s(hF.DragCancel)});function s(e){return async function(){let{active:t,collisions:r,over:i,scrollAdjustedTranslate:a}=oe.current,s=null;if(t&&a){let{cancelDrop:n}=j.current;s={activatorEvent:o,active:t,collisions:r,delta:a,over:i},e===hF.DragEnd&&typeof n==`function`&&await Promise.resolve(n(s))&&(e=hF.DragCancel)}E.current=null,(0,n.unstable_batchedUpdates)(()=>{p({type:e}),_(uL.Uninitialized),Ee(null),O(null),A(null),Oe.current=null;let t=e===hF.DragEnd?`onDragEnd`:`onDragCancel`;if(s){let e=j.current[t];e?.(s),m({type:t,event:s})}})}}},[b]),Ae=EI(s,(0,t.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=b.get(r);if(E.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},E.current=r,ke(n,t))},[b,ke]));HI(s),BP(()=>{ie&&g===uL.Initializing&&_(uL.Initialized)},[ie,g]),(0,t.useEffect)(()=>{let{onDragMove:e}=j.current,{active:t,activatorEvent:r,collisions:i,over:a}=oe.current;if(!t||!r)return;let o={active:t,activatorEvent:r,collisions:i,delta:{x:xe.x,y:xe.y},over:a};(0,n.unstable_batchedUpdates)(()=>{e?.(o),m({type:`onDragMove`,event:o})})},[xe.x,xe.y]),(0,t.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:r,droppableContainers:i,scrollAdjustedTranslate:a}=oe.current;if(!e||E.current==null||!t||!a)return;let{onDragOver:o}=j.current,s=i.get(we),c=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:r,delta:{x:a.x,y:a.y},over:c};(0,n.unstable_batchedUpdates)(()=>{Ee(c),o?.(l),m({type:`onDragOver`,event:l})})},[we]),BP(()=>{oe.current={activatorEvent:k,active:T,activeNode:L,collisionRect:Se,collisions:Ce,droppableRects:F,draggableNodes:b,draggingNode:le,draggingNodeRect:ue,droppableContainers:S,over:Te,scrollableAncestors:me,scrollAdjustedTranslate:xe},w.current={initial:ue,translated:Se}},[T,L,Ce,Se,b,le,ue,F,S,Te,me,xe]),SI({...ne,delta:x,draggingRect:Se,pointerCoordinates:_e,scrollableAncestors:me,scrollableAncestorRects:he});let je=(0,t.useMemo)(()=>({active:T,activeNode:L,activeNodeRect:ie,activatorEvent:k,collisions:Ce,containerNodeRect:ae,dragOverlay:ce,draggableNodes:b,droppableContainers:S,droppableRects:F,over:Te,measureDroppableContainers:I,scrollableAncestors:me,scrollableAncestorRects:he,measuringConfiguration:P,measuringScheduled:ee,windowRect:pe}),[T,L,ie,k,Ce,ae,ce,b,S,F,Te,I,me,he,P,ee,pe]),Me=(0,t.useMemo)(()=>({activatorEvent:k,activators:Ae,active:T,activeNodeRect:ie,ariaDescribedById:{draggable:M},dispatch:p,draggableNodes:b,over:Te,measureDroppableContainers:I}),[k,Ae,T,ie,p,M,b,Te,I]);return t.default.createElement(lF.Provider,{value:h},t.default.createElement(tL.Provider,{value:Me},t.default.createElement(nL.Provider,{value:je},t.default.createElement(lL.Provider,{value:De},o)),t.default.createElement(aL,{disabled:i?.restoreFocus===!1})),t.default.createElement(mF,{...i,hiddenTextDescribedById:M}));function Ne(){let e=D?.autoScrollEnabled===!1,t=typeof a==`object`?a.enabled===!1:a===!1,n=v&&!e&&!t;return typeof a==`object`?{...a,enabled:n}:{enabled:n}}}),fL=(0,t.createContext)(null),pL=`button`,mL=`Draggable`;function hL(e){let{id:n,data:r,disabled:i=!1,attributes:a}=e,o=JP(mL),{activators:s,activatorEvent:c,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=(0,t.useContext)(tL),{role:m=pL,roleDescription:h=`draggable`,tabIndex:g=0}=a??{},_=l?.id===n,v=(0,t.useContext)(_?lL:fL),[y,b]=GP(),[x,S]=GP(),C=UI(s,n),w=UP(r);return BP(()=>(f.set(n,{id:n,key:o,node:y,activatorNode:x,data:w}),()=>{let e=f.get(n);e&&e.key===o&&f.delete(n)}),[f,n]),{active:l,activatorEvent:c,activeNodeRect:u,attributes:(0,t.useMemo)(()=>({role:m,tabIndex:g,"aria-disabled":i,"aria-pressed":_&&m===pL?!0:void 0,"aria-roledescription":h,"aria-describedby":d.draggable}),[i,m,g,_,h,d.draggable]),isDragging:_,listeners:i?void 0:C,node:y,over:p,setNodeRef:b,setActivatorNodeRef:S,transform:v}}function gL(){return(0,t.useContext)(nL)}var _L=`Droppable`,vL={timeout:25};function yL(e){let{data:n,disabled:r=!1,id:i,resizeObserverConfig:a}=e,o=JP(_L),{active:s,dispatch:c,over:l,measureDroppableContainers:u}=(0,t.useContext)(tL),d=(0,t.useRef)({disabled:r}),f=(0,t.useRef)(!1),p=(0,t.useRef)(null),m=(0,t.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...vL,...a},v=UP(g??i),y=PI({callback:(0,t.useCallback)(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),m.current=null},_)},[_]),disabled:h||!s}),[b,x]=GP((0,t.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),f.current=!1),e&&y.observe(e))},[y])),S=UP(n);return(0,t.useEffect)(()=>{!y||!b.current||(y.disconnect(),f.current=!1,y.observe(b.current))},[b,y]),(0,t.useEffect)(()=>(c({type:hF.RegisterDroppable,element:{id:i,key:o,disabled:r,node:b,rect:p,data:S}}),()=>c({type:hF.UnregisterDroppable,key:o,id:i})),[i]),(0,t.useEffect)(()=>{r!==d.current.disabled&&(c({type:hF.SetDroppableDisabled,id:i,key:o,disabled:r}),d.current.disabled=r)},[i,o,r,c]),{active:s,rect:p,isOver:l?.id===i,node:b,over:l,setNodeRef:x}}function bL(e){let{animation:n,children:r}=e,[i,a]=(0,t.useState)(null),[o,s]=(0,t.useState)(null),c=KP(r);return!r&&!i&&c&&a(c),BP(()=>{if(!o)return;let e=i?.key,t=i?.props.id;if(e==null||t==null){a(null);return}Promise.resolve(n(t,o)).then(()=>{a(null)})},[n,i,o]),t.default.createElement(t.default.Fragment,null,r,i?(0,t.cloneElement)(i,{ref:s}):null)}var xL={x:0,y:0,scaleX:1,scaleY:1};function SL(e){let{children:n}=e;return t.default.createElement(tL.Provider,{value:eL},t.default.createElement(lL.Provider,{value:xL},n))}var CL={position:`fixed`,touchAction:`none`},wL=e=>$P(e)?`transform 250ms ease`:void 0,TL=(0,t.forwardRef)((e,n)=>{let{as:r,activatorEvent:i,adjustScale:a,children:o,className:s,rect:c,style:l,transform:u,transition:d=wL}=e;if(!c)return null;let f=a?u:{...u,scaleX:1,scaleY:1},p={...CL,width:c.width,height:c.height,top:c.top,left:c.left,transform:nF.Transform.toString(f),transformOrigin:a&&i?bF(i,c):void 0,transition:typeof d==`function`?d(i):d,...l};return t.default.createElement(r,{className:s,style:p,ref:n},o)}),EL={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:nF.Transform.toString(t)},{transform:nF.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function DL(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return VP((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=qI(a);if(!c)return;let{transform:l}=FP(a).getComputedStyle(a),u=kF(l);if(!u)return;let d=typeof t==`function`?t:OL(t);return QF(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function OL(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...EL,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var kL=0;function AL(e){return(0,t.useMemo)(()=>{if(e!=null)return kL++,kL},[e])}var jL=t.default.memo(e=>{let{adjustScale:n=!1,children:r,dropAnimation:i,style:a,transition:o,modifiers:s,wrapperElement:c=`div`,className:l,zIndex:u=999}=e,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:m,draggableNodes:h,droppableContainers:g,dragOverlay:_,over:v,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=gL(),C=(0,t.useContext)(lL),w=AL(f?.id),T=oL(s,{activatorEvent:d,active:f,activeNodeRect:p,containerNodeRect:m,draggingNodeRect:_.rect,over:v,overlayNodeRect:_.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=jI(p),D=DL({config:i,draggableNodes:h,droppableContainers:g,measuringConfiguration:y}),O=E?_.setRef:void 0;return t.default.createElement(SL,null,t.default.createElement(bL,{animation:D},f&&w?t.default.createElement(TL,{key:w,id:f.id,ref:O,as:c,activatorEvent:d,adjustScale:n,className:l,transition:o,rect:E,style:{zIndex:u,...a},transform:T},r):null))});function ML(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function NL(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function PL(e){return e!==null&&e>=0}function FL(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function IL(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var LL=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=ML(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},RL={scaleX:1,scaleY:1},zL=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...RL}:null}let s=BL(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...RL}:r<t&&r>=a?{x:0,y:o.height+s,...RL}:{x:0,y:0,...RL}};function BL(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var VL=`Sortable`,HL=t.default.createContext({activeIndex:-1,containerId:VL,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:LL,disabled:{draggable:!1,droppable:!1}});function UL(e){let{children:n,id:r,items:i,strategy:a=LL,disabled:o=!1}=e,{active:s,dragOverlay:c,droppableRects:l,over:u,measureDroppableContainers:d}=gL(),f=JP(VL,r),p=c.rect!==null,m=(0,t.useMemo)(()=>i.map(e=>typeof e==`object`&&`id`in e?e.id:e),[i]),h=s!=null,g=s?m.indexOf(s.id):-1,_=u?m.indexOf(u.id):-1,v=(0,t.useRef)(m),y=!FL(m,v.current),b=_!==-1&&g===-1||y,x=IL(o);BP(()=>{y&&h&&d(m)},[y,m,h,d]),(0,t.useEffect)(()=>{v.current=m},[m]);let S=(0,t.useMemo)(()=>({activeIndex:g,containerId:f,disabled:x,disableTransforms:b,items:m,overIndex:_,useDragOverlay:p,sortedRects:NL(m,l),strategy:a}),[g,f,x.draggable,x.droppable,b,m,_,l,p,a]);return t.default.createElement(HL.Provider,{value:S},n)}var WL=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return ML(n,r,i).indexOf(t)},GL=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},KL={duration:200,easing:`ease`},qL=`transform`,JL=nF.Transition.toString({property:qL,duration:0,easing:`linear`}),YL={roleDescription:`sortable`};function XL(e){let{disabled:n,index:r,node:i,rect:a}=e,[o,s]=(0,t.useState)(null),c=(0,t.useRef)(r);return BP(()=>{if(!n&&r!==c.current&&i.current){let e=a.current;if(e){let t=MF(i.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&s(n)}}r!==c.current&&(c.current=r)},[n,r,i,a]),(0,t.useEffect)(()=>{o&&s(null)},[o]),o}function ZL(e){let{animateLayoutChanges:n=GL,attributes:r,disabled:i,data:a,getNewIndex:o=WL,id:s,strategy:c,resizeObserverConfig:l,transition:u=KL}=e,{items:d,containerId:f,activeIndex:p,disabled:m,disableTransforms:h,sortedRects:g,overIndex:_,useDragOverlay:v,strategy:y}=(0,t.useContext)(HL),b=QL(i,m),x=d.indexOf(s),S=(0,t.useMemo)(()=>({sortable:{containerId:f,index:x,items:d},...a}),[f,a,x,d]),C=(0,t.useMemo)(()=>d.slice(d.indexOf(s)),[d,s]),{rect:w,node:T,isOver:E,setNodeRef:D}=yL({id:s,data:S,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:F,setActivatorNodeRef:I,transform:ee}=hL({id:s,data:S,attributes:{...YL,...r},disabled:b.draggable}),L=jP(D,M),te=!!O,ne=te&&!h&&PL(p)&&PL(_),re=!v&&P,ie=ne?(re&&ne?ee:null)??(c??y)({rects:g,activeNodeRect:A,activeIndex:p,overIndex:_,index:x}):null,ae=PL(p)&&PL(_)?o({id:s,items:d,activeIndex:p,overIndex:_}):x,oe=O?.id,se=(0,t.useRef)({activeId:oe,items:d,newIndex:ae,containerId:f}),ce=d!==se.current.items,le=n({active:O,containerId:f,isDragging:P,isSorting:te,id:s,index:x,items:d,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:u,wasDragging:se.current.activeId!=null}),ue=XL({disabled:!le,index:x,node:T,rect:w});return(0,t.useEffect)(()=>{te&&se.current.newIndex!==ae&&(se.current.newIndex=ae),f!==se.current.containerId&&(se.current.containerId=f),d!==se.current.items&&(se.current.items=d)},[te,ae,f,d]),(0,t.useEffect)(()=>{if(oe===se.current.activeId)return;if(oe!=null&&se.current.activeId==null){se.current.activeId=oe;return}let e=setTimeout(()=>{se.current.activeId=oe},50);return()=>clearTimeout(e)},[oe]),{active:O,activeIndex:p,attributes:j,data:S,rect:w,index:x,newIndex:ae,items:d,isOver:E,isSorting:te,isDragging:P,listeners:N,node:T,overIndex:_,over:F,setNodeRef:L,setActivatorNodeRef:I,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:ue??ie,transition:de()};function de(){if(ue||ce&&se.current.newIndex===x)return JL;if(!(re&&!$P(k)||!u)&&(te||le))return nF.Transition.toString({...u,property:qL})}}function QL(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}$.Down,$.Right,$.Up,$.Left;var $L={text:`Texto`,image:`Imagem`,box:`Grupo / Cartão`,"text-container":`Texto em Caixa`,group:`Grupo`,checkbox:`Caixa de Seleção`},eR=({element:e,isSelected:t,onSelect:n,onToggleLock:i,onToggleHide:a})=>{let{attributes:o,listeners:s,setNodeRef:c,transform:l,transition:u,isDragging:d}=ZL({id:e.id});return(0,r.jsx)(W,{ref:c,style:{transform:nF.Transform.toString(l),transition:u,opacity:d?.5:1,touchAction:`none`},children:(0,r.jsxs)(G,{align:`center`,style:{padding:`8px 12px`,backgroundColor:t?`var(--accent-a3)`:`var(--gray-2)`,borderRadius:6,cursor:`pointer`,marginBottom:4,border:t?`1px solid var(--accent-9)`:`1px solid transparent`},onClick:e=>n(e.shiftKey),children:[(0,r.jsx)(W,{...o,...s,style:{cursor:`grab`,color:`var(--gray-8)`,marginRight:8},children:(0,r.jsx)(Le,{})}),(0,r.jsxs)(W,{style:{color:`var(--gray-10)`,marginRight:8},children:[e.type===`text`&&(0,r.jsx)(Lt,{}),e.type===`image`&&(0,r.jsx)(Ye,{}),(e.type===`box`||e.type===`group`)&&(0,r.jsx)(le,{})]}),(0,r.jsx)(U,{size:`2`,weight:t?`bold`:`regular`,style:{flex:1},truncate:!0,children:e.name||$L[e.type]||e.type}),(0,r.jsxs)(G,{gap:`1`,onClick:e=>e.stopPropagation(),children:[(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:e.locked?`orange`:`gray`,onClick:i,title:e.locked?`Desbloquear`:`Bloquear`,children:e.locked?(0,r.jsx)($e,{}):(0,r.jsx)(tt,{})}),(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:e.hidden?`red`:`gray`,onClick:a,title:e.hidden?`Mostrar`:`Ocultar`,children:e.hidden?(0,r.jsx)(ze,{}):(0,r.jsx)(Ve,{})})]})]})})};let tR=()=>{let{state:e,selectElement:n,moveElement:i,updateElement:a}=rS(),{elements:o,selectedElementIds:s}=e,c=(0,t.useMemo)(()=>[...o].reverse(),[o]),[l,u]=(0,t.useState)(null),d=vF(_F(mI,{activationConstraint:{distance:5}}));return(0,r.jsx)(W,{children:(0,r.jsxs)(dL,{sensors:d,onDragStart:e=>{u(e.active.id)},onDragEnd:e=>{let{active:t,over:n}=e;if(u(null),n&&t.id!==n.id){let e=c.findIndex(e=>e.id===t.id),r=c.findIndex(e=>e.id===n.id);i(o.length-1-e,o.length-1-r)}},children:[(0,r.jsx)(UL,{items:c.map(e=>e.id),strategy:zL,children:(0,r.jsxs)(G,{direction:`column`,children:[c.map(e=>(0,r.jsx)(eR,{element:e,isSelected:s.includes(e.id),onSelect:t=>n(e.id,t),onToggleLock:()=>a(e.id,{locked:!e.locked}),onToggleHide:()=>a(e.id,{hidden:!e.hidden})},e.id)),c.length===0&&(0,r.jsx)(U,{size:`2`,color:`gray`,align:`center`,style:{padding:20},children:`Adicione itens para ver a lista aqui.`})]})}),(0,r.jsx)(jL,{children:l?(0,r.jsx)(W,{style:{padding:`8px 12px`,backgroundColor:`var(--gray-4)`,borderRadius:6,boxShadow:`0 4px 12px rgba(0,0,0,0.1)`},children:(0,r.jsx)(U,{children:`Movendo...`})}):null})]})})},nR=()=>{let{state:e,portalContainer:n,updateElement:i,removeSelected:a,copy:o}=rS(),[s,c]=(0,t.useState)(!1),l=e.selectedElementIds[0],u=e.elements.find(e=>e.id===l);if(!u)return null;let d=e=>{i(u.id,e)},f=e=>{d({style:{...u.style,...e}})},p=u.style?.textAlign||`left`,m=parseInt(u.style?.fontSize||`14`,10),h=parseInt(u.style?.borderWidth||`0`,10),g=parseInt(u.style?.padding||`0`,10),_=parseInt(u.style?.borderRadius||`0`,10),v=Math.round((parseFloat(String(u.style?.opacity??`1`))||1)*100),y=u.style?.fontFamily||`Arial`,b=kS(u.style?.fontWeight,DS),x=AS(y,e.availableFonts||[`Arial`,`Helvetica`,`Times New Roman`,`Courier New`,`Verdana`,`Georgia`,`Tahoma`,`Trebuchet MS`]);return(0,r.jsxs)(G,{direction:`column`,gap:`4`,children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,children:[(0,r.jsx)(U,{size:`3`,weight:`bold`,children:rR(u.type)}),(0,r.jsxs)(G,{gap:`2`,children:[(0,r.jsx)(J,{variant:`soft`,color:u.locked?`orange`:`gray`,onClick:()=>d({locked:!u.locked}),title:u.locked?`Desbloquear`:`Bloquear`,children:u.locked?(0,r.jsx)($e,{}):(0,r.jsx)(tt,{})}),(0,r.jsx)(J,{variant:`soft`,color:u.hidden?`blue`:`gray`,onClick:()=>d({hidden:!u.hidden}),title:u.hidden?`Mostrar`:`Ocultar`,children:u.hidden?(0,r.jsx)(ze,{}):(0,r.jsx)(Ve,{})}),(0,r.jsx)(Qy,{orientation:`vertical`}),(0,r.jsx)(J,{variant:`soft`,color:`gray`,onClick:o,title:`Copiar`,children:(0,r.jsx)(Ce,{})}),(0,r.jsx)(J,{variant:`soft`,color:`red`,onClick:a,title:`Excluir`,children:(0,r.jsx)(Yt,{})})]})]}),(0,r.jsx)(Qy,{size:`4`}),(u.type===`text`||u.type===`text-container`)&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Conteúdo`}),(0,r.jsx)(pb,{value:u.content,onChange:e=>d({content:e.target.value}),rows:3,placeholder:`Digite o texto aqui...`})]}),u.type===`image`&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Imagem`}),(0,r.jsxs)(W,{mb:`2`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Vínculo de Propriedade`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[u.dataBinding?e.availableProps.find(e=>e.dataName===u.dataBinding)?.name||u.dataBinding:`Nenhum (URL fixa)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>d({dataBinding:void 0}),children:`Nenhum (URL fixa)`}),e.availableProps.map(e=>(0,r.jsx)(q,{onSelect:()=>d({dataBinding:e.dataName,content:`{{${e.dataName}}}`}),children:e.name},e.dataName)),e.availableProps.length===0&&(0,r.jsx)(q,{disabled:!0,children:`Nenhuma variável disponível`})]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`URL ou {{variável}}`}),(0,r.jsx)(X,{value:u.content,onChange:e=>d({content:e.target.value}),placeholder:`https://... ou {{profilePicture}}`}),(0,r.jsx)(U,{size:`1`,color:`gray`,mt:`1`,as:`div`,children:`Se o valor vinculado for um link/URL válido, a imagem será exibida.`})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Aparência`}),(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(u.type===`text`||u.type===`text-container`)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Fonte`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(0,r.jsx)(`span`,{style:{fontFamily:y},children:y}),(0,r.jsx)(_e,{})]})}),(0,r.jsx)(fy,{...n&&{container:n},style:{zIndex:1e5},children:x.map(e=>(0,r.jsx)(q,{onSelect:()=>f({fontFamily:e}),style:{fontFamily:e},children:e},e))})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Peso`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[b===`normal`?`Normal`:b===`bold`?`Negrito`:b===`100`?`Fina`:b===`300`?`Leve`:`Pesada`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>f({fontWeight:`normal`}),children:`Normal`}),(0,r.jsx)(q,{onSelect:()=>{f({fontWeight:`bold`})},children:`Negrito`}),(0,r.jsx)(q,{onSelect:()=>{f({fontWeight:`100`})},children:`Fina`}),(0,r.jsx)(q,{onSelect:()=>{f({fontWeight:`300`})},children:`Leve`}),(0,r.jsx)(q,{onSelect:()=>{f({fontWeight:`900`})},children:`Pesada`})]})]})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,mb:`1`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Tamanho do Texto`}),(0,r.jsxs)(U,{size:`1`,children:[m,`px`]})]}),(0,r.jsx)(tb,{min:8,max:72,value:[m],onValueChange:e=>f({fontSize:`${e[0]}px`})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento`}),(0,r.jsxs)(G,{gap:`2`,children:[(0,r.jsx)(J,{variant:p===`left`?`solid`:`soft`,color:`gray`,onClick:()=>f({textAlign:`left`}),children:(0,r.jsx)(Ut,{})}),(0,r.jsx)(J,{variant:p===`center`?`solid`:`soft`,color:`gray`,onClick:()=>f({textAlign:`center`}),children:(0,r.jsx)(zt,{})}),(0,r.jsx)(J,{variant:p===`right`?`solid`:`soft`,color:`gray`,onClick:()=>f({textAlign:`right`}),children:(0,r.jsx)(Gt,{})})]})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Estilo`}),(0,r.jsxs)(G,{gap:`1`,children:[(0,r.jsx)(J,{variant:u.style?.fontStyle===`italic`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),f({fontStyle:u.style?.fontStyle===`italic`?`normal`:`italic`})},title:`Itálico`,children:(0,r.jsx)(Ge,{})}),(0,r.jsx)(J,{variant:u.style?.textDecoration===`underline`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),f({textDecoration:u.style?.textDecoration===`underline`?`none`:`underline`})},title:`Sublinhado`,children:(0,r.jsx)(Zt,{})}),(0,r.jsx)(J,{variant:u.style?.textDecoration===`line-through`?`solid`:`soft`,color:`gray`,onClick:e=>{e.stopPropagation(),f({textDecoration:u.style?.textDecoration===`line-through`?`none`:`line-through`})},title:`Tachado`,children:(0,r.jsx)(Nt,{})})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Transformação`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(u.style?.textTransform||`none`)===`none`?`Nenhum`:u.style?.textTransform===`uppercase`?`MAIÚSCULA`:u.style?.textTransform===`lowercase`?`minúscula`:`Capitalizada`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>f({textTransform:`none`}),children:`Nenhum`}),(0,r.jsx)(q,{onSelect:()=>f({textTransform:`uppercase`}),children:`MAIÚSCULA`}),(0,r.jsx)(q,{onSelect:()=>f({textTransform:`lowercase`}),children:`minúscula`}),(0,r.jsx)(q,{onSelect:()=>f({textTransform:`capitalize`}),children:`Capitalizada`})]})]})]})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Altura da Linha`}),(0,r.jsx)(X,{placeholder:`Normal`,value:u.style?.lineHeight||``,onChange:e=>f({lineHeight:e.target.value||`normal`})})]}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Espaçamento`}),(0,r.jsx)(X,{placeholder:`Normal`,value:u.style?.letterSpacing||``,onChange:e=>f({letterSpacing:e.target.value||`normal`})})]})]}),u.type===`text-container`&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Alinhamento Vertical`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(u.style?.alignItems||`flex-start`)===`flex-start`?`Topo`:u.style?.alignItems===`center`?`Centro`:`Base`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>f({alignItems:`flex-start`}),children:`Topo`}),(0,r.jsx)(q,{onSelect:()=>f({alignItems:`center`}),children:`Centro`}),(0,r.jsx)(q,{onSelect:()=>f({alignItems:`flex-end`}),children:`Base`})]})]})]})]}),u.type===`image`&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Ajuste da Imagem`}),(0,r.jsxs)(ly,{children:[(0,r.jsx)(uy,{children:(0,r.jsxs)(K,{variant:`soft`,color:`gray`,style:{width:`100%`,justifyContent:`space-between`},children:[(u.style?.objectFit||`cover`)===`cover`?`Cobrir (Cover)`:u.style?.objectFit===`contain`?`Conter (Contain)`:`Esticar (Fill)`,(0,r.jsx)(_e,{})]})}),(0,r.jsxs)(fy,{...n&&{container:n},style:{zIndex:1e5},children:[(0,r.jsx)(q,{onSelect:()=>f({objectFit:`cover`}),children:`Cobrir (Cover)`}),(0,r.jsx)(q,{onSelect:()=>f({objectFit:`contain`}),children:`Conter (Contain)`}),(0,r.jsx)(q,{onSelect:()=>f({objectFit:`fill`}),children:`Esticar (Fill)`})]})]})]}),(0,r.jsxs)(Lv,{columns:`2`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor de Fundo`}),(0,r.jsx)(nP,{color:u.style?.backgroundColor||`transparent`,onChange:e=>f({backgroundColor:e})})]}),(u.type===`text`||u.type===`text-container`)&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor do Texto`}),(0,r.jsx)(nP,{color:u.style?.color||`#000000`,onChange:e=>f({color:e})})]})]}),(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,mb:`1`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Borda (Espessura)`}),(0,r.jsxs)(U,{size:`1`,children:[h,`px`]})]}),(0,r.jsx)(tb,{min:0,max:10,value:[h],onValueChange:e=>f({borderWidth:`${e[0]}px`,borderStyle:e[0]>0?`solid`:`none`,borderColor:u.style?.borderColor||`#000000`})})]}),h>0&&(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`1`,as:`div`,children:`Cor da Borda`}),(0,r.jsx)(nP,{color:u.style?.borderColor||`#000000`,onChange:e=>f({borderColor:e})})]}),(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,mb:`1`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Cantos Arredondados`}),(0,r.jsxs)(U,{size:`1`,children:[_,`px`]})]}),(0,r.jsx)(tb,{min:0,max:50,value:[_],onValueChange:e=>f({borderRadius:`${e[0]}px`})})]}),(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,mb:`1`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Opacidade`}),(0,r.jsxs)(U,{size:`1`,children:[v,`%`]})]}),(0,r.jsx)(tb,{min:0,max:100,value:[v],onValueChange:e=>f({opacity:e[0]/100})})]}),(0,r.jsxs)(W,{children:[(0,r.jsxs)(G,{justify:`between`,mb:`1`,children:[(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Espaçamento Interno (Padding)`}),(0,r.jsxs)(U,{size:`1`,children:[g,`px`]})]}),(0,r.jsx)(tb,{min:0,max:40,value:[g],onValueChange:e=>f({padding:`${e[0]}px`})})]})]})]}),(0,r.jsxs)(W,{mt:`2`,pt:`2`,style:{borderTop:`1px solid var(--gray-5)`},children:[(0,r.jsxs)(K,{variant:`ghost`,onClick:()=>c(!s),style:{width:`100%`,justifyContent:`space-between`,color:`var(--gray-11)`,cursor:`pointer`},children:[(0,r.jsx)(G,{align:`center`,gap:`2`,children:(0,r.jsx)(U,{size:`2`,children:`Mais opções`})}),s?(0,r.jsx)(_e,{}):(0,r.jsx)(ye,{})]}),s&&(0,r.jsx)(W,{mt:`3`,className:`advanced-properties-content`,children:(0,r.jsx)(rP,{elementId:u.id})})]})]},l)};var rR=e=>{switch(e){case`text`:return`Texto`;case`image`:return`Imagem`;case`box`:return`Caixa / Grupo`;case`text-container`:return`Texto em Caixa`;default:return`Elemento`}};let iR=({onClose:e})=>{let{state:t,addElement:n,groupElements:i}=rS(),a=t.selectedElementIds.length>0,o=t=>{let r={id:`el-${new Date().toISOString()}`,x:20,y:20,width:150,height:40,style:{}};switch(t){case`text`:n({...r,type:`text`,content:`Novo Texto`,width:120,height:30});break;case`image`:n({...r,type:`image`,content:`https://via.placeholder.com/150`,width:150,height:150});break;case`box`:n({...r,type:`box`,content:``,width:200,height:100,style:{border:`1px solid #ccc`}});break;case`text-container`:n({...r,type:`text-container`,content:`Texto em Caixa`,width:150,height:50,style:{backgroundColor:`#f0f0f0`,padding:`10px`}});break;case`separator`:n({...r,type:`box`,content:``,width:300,height:2,style:{backgroundColor:`#000000`}});break;case`timestamp`:n({...r,type:`text`,content:`{{timestamp}}`,width:150,height:30,formatting:{type:`date`,dateFormat:`dd/MM/yyyy HH:mm`}});break;case`badge`:n({...r,type:`text-container`,content:`Badge`,width:80,height:30,style:{backgroundColor:`#007bff`,color:`white`,borderRadius:`15px`,textAlign:`center`,lineHeight:`30px`}});break;case`list-item`:let e=crypto.randomUUID(),t=crypto.randomUUID(),a=crypto.randomUUID(),o=crypto.randomUUID();n({id:e,type:`box`,x:20,y:20,width:300,height:120,style:{backgroundColor:`#ffffff`,border:`1px solid #e0e0e0`,borderRadius:`8px`,boxShadow:`0 2px 4px rgba(0,0,0,0.05)`}}),n({id:t,type:`image`,content:`https://via.placeholder.com/80`,x:35,y:35,width:80,height:80,style:{borderRadius:`4px`}}),n({id:a,type:`text`,content:`Título do Item`,x:130,y:35,width:170,height:24,style:{fontSize:`18px`,fontWeight:`bold`,color:`#333`}}),n({id:o,type:`text`,content:`Descrição curta do item. Adicione detalhes aqui.`,x:130,y:65,width:170,height:40,style:{fontSize:`14px`,color:`#666`}}),setTimeout(()=>{i([e,t,a,o])},100);break}e&&e()};return(0,r.jsxs)(G,{direction:`column`,style:{height:`100%`},children:[(0,r.jsx)(W,{p:`4`,style:{borderBottom:`1px solid var(--gray-5)`,minHeight:`180px`,flexShrink:0,maxHeight:`calc(100vh - 150px)`,overflowY:`auto`},children:a?(0,r.jsx)(nR,{}):(0,r.jsxs)(G,{direction:`column`,align:`center`,justify:`center`,style:{height:`100%`,minHeight:`100px`},gap:`3`,children:[(0,r.jsxs)(U,{size:`2`,color:`gray`,align:`center`,children:[`Selecione um item no desenho`,(0,r.jsx)(`br`,{}),`para editar suas propriedades`]}),(0,r.jsx)(R_,{color:`blue`,variant:`soft`,children:`Dica: Clique no desenho`})]})}),(0,r.jsxs)(sb,{defaultValue:`blocks`,style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`},children:[(0,r.jsx)(W,{px:`4`,pt:`4`,style:{flexShrink:0},children:(0,r.jsxs)(cb,{children:[(0,r.jsx)(lb,{value:`blocks`,children:`Blocos`}),(0,r.jsx)(lb,{value:`layers`,children:`Conteúdo`}),(0,r.jsx)(lb,{value:`history`,children:`Histórico`})]})}),(0,r.jsx)(Xv,{type:`auto`,scrollbars:`vertical`,style:{flex:1},children:(0,r.jsxs)(W,{p:`4`,children:[(0,r.jsxs)(ub,{value:`blocks`,children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,mb:`2`,as:`div`,children:`Adicionar Elemento`}),(0,r.jsx)(U,{size:`1`,color:`gray`,mb:`3`,as:`div`,children:`Clique para adicionar ao desenho`}),(0,r.jsxs)(Lv,{columns:`2`,gap:`2`,children:[(0,r.jsx)(aR,{icon:(0,r.jsx)(Ue,{width:`20`,height:`20`}),label:`Texto`,onClick:()=>o(`text`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Ye,{width:`20`,height:`20`}),label:`Imagem`,onClick:()=>o(`image`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(Dt,{width:`20`,height:`20`}),label:`Caixa / Grupo`,onClick:()=>o(`box`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(tn,{width:`20`,height:`20`}),label:`Texto em Caixa`,onClick:()=>o(`text-container`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(ke,{width:`20`,height:`20`}),label:`Separador`,onClick:()=>o(`separator`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(qt,{width:`20`,height:`20`}),label:`Data/Hora`,onClick:()=>o(`timestamp`)}),(0,r.jsx)(aR,{icon:(0,r.jsx)(kt,{width:`20`,height:`20`}),label:`Badge / Etiqueta`,onClick:()=>o(`badge`)})]}),(0,r.jsx)(W,{mt:`4`,children:(0,r.jsx)(kP,{})})]}),(0,r.jsx)(ub,{value:`layers`,children:(0,r.jsx)(tR,{})}),(0,r.jsx)(ub,{value:`history`,children:(0,r.jsx)(AP,{onClose:e})})]})})]})]})};var aR=({icon:e,label:t,onClick:n})=>(0,r.jsx)(Tv,{style:{cursor:`pointer`,transition:`all 0.2s`},onClick:n,children:(0,r.jsxs)(G,{direction:`column`,align:`center`,gap:`2`,p:`2`,children:[(0,r.jsx)(W,{style:{color:`var(--accent-9)`},children:e}),(0,r.jsx)(U,{size:`1`,weight:`medium`,align:`center`,children:t})]})});let oR=()=>{let{state:e,setZoom:t,setPan:n}=rS(),{zoom:i,elements:a}=e;return(0,r.jsxs)(G,{align:`center`,gap:`2`,style:{backgroundColor:`var(--color-panel-solid)`,padding:`4px 8px`,borderRadius:`8px`,boxShadow:`0 2px 10px rgba(0,0,0,0.1)`,border:`1px solid var(--gray-6)`},children:[(0,r.jsx)(bb,{content:`Diminuir Zoom (-)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(Math.max(.1,i-.1)),children:(0,r.jsx)(st,{})})}),(0,r.jsxs)(U,{size:`1`,style:{width:40,textAlign:`center`,fontVariantNumeric:`tabular-nums`},children:[Math.round(i*100),`%`]}),(0,r.jsx)(bb,{content:`Aumentar Zoom (+)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(Math.min(5,i+.1)),children:(0,r.jsx)(pt,{})})}),(0,r.jsx)(Qy,{orientation:`vertical`,style:{height:16}}),(0,r.jsx)(bb,{content:`Resetar (100%)`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>t(1),children:(0,r.jsx)(xt,{})})}),(0,r.jsx)(bb,{content:`Ajustar à Tela`,children:(0,r.jsx)(J,{size:`1`,variant:`ghost`,color:`gray`,onClick:()=>{if(a.length===0)return;let e=1/0,r=1/0,i=-1/0,o=-1/0;a.forEach(t=>{e=Math.min(e,t.x),r=Math.min(r,t.y),i=Math.max(i,t.x+t.width),o=Math.max(o,t.y+t.height)});let s=i-e+100,c=o-r+100,l=window.innerWidth<768?0:300,u=window.innerWidth-l,d=window.innerHeight-100,f=u/s,p=d/c,m=Math.min(f,p);m=Math.min(Math.max(m,.1),5),t(m);let h=(e+i)/2,g=(r+o)/2,_=u/2,v=d/2;n({x:_-h*m,y:v-g*m})},children:(0,r.jsx)(N,{})})})]})},sR=({isOpen:e,onClose:n,templates:i,onSelectTemplate:a,initialStep:o=1,onFinishWizard:s,onStartTour:c})=>{let{portalContainer:l}=rS(),[u,d]=(0,t.useState)(o),[f,p]=(0,t.useState)(null);t.default.useEffect(()=>{e&&o&&d(o)},[e,o]);let m=()=>{u===1&&f?(a(i.find(e=>e.id===f)||null),d(2)):u===2?(n(),c&&c()):u===3&&(s&&s(),n())};return(0,r.jsx)(ny,{open:e,onOpenChange:n,children:(0,r.jsx)(iy,{...l&&{container:l},style:{maxWidth:800},children:(0,r.jsxs)(G,{direction:`column`,gap:`4`,children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,children:[(0,r.jsx)(ay,{children:(0,r.jsxs)(G,{align:`center`,gap:`2`,children:[(0,r.jsx)(rt,{}),` Assistente de Criação`]})}),(0,r.jsx)(G,{gap:`2`,children:(0,r.jsx)(cR,{current:u,total:3})})]}),(0,r.jsxs)(W,{children:[u===1&&(0,r.jsxs)(G,{direction:`column`,gap:`4`,children:[(0,r.jsx)(p_,{size:`4`,children:`Passo 1: Escolha um Modelo (Template)`}),(0,r.jsx)(U,{color:`gray`,size:`2`,children:`Comece com um layout pronto e personalize conforme sua necessidade.`}),(0,r.jsxs)(Lv,{columns:`3`,gap:`3`,children:[i.map(e=>(0,r.jsx)(Tv,{variant:f===e.id?`surface`:`classic`,style:{cursor:`pointer`,border:f===e.id?`2px solid var(--accent-9)`:void 0,backgroundColor:f===e.id?`var(--accent-2)`:void 0},onClick:()=>p(e.id),children:(0,r.jsxs)(G,{direction:`column`,gap:`2`,align:`center`,p:`2`,children:[(0,r.jsx)(W,{style:{width:`100%`,height:100,backgroundColor:`var(--gray-3)`,borderRadius:4,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(Ue,{width:32,height:32,color:`var(--gray-8)`})}),(0,r.jsx)(U,{weight:`bold`,size:`2`,children:e.name}),(0,r.jsx)(U,{size:`1`,color:`gray`,align:`center`,children:e.description})]})},e.id)),(0,r.jsx)(Tv,{variant:f===`blank`?`surface`:`classic`,style:{cursor:`pointer`,border:f===`blank`?`2px solid var(--accent-9)`:void 0,backgroundColor:f===`blank`?`var(--accent-2)`:void 0},onClick:()=>p(`blank`),children:(0,r.jsxs)(G,{direction:`column`,gap:`2`,align:`center`,p:`2`,children:[(0,r.jsx)(W,{style:{width:`100%`,height:100,backgroundColor:`var(--gray-3)`,borderRadius:4,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(W,{style:{width:40,height:40,border:`2px dashed var(--gray-8)`,borderRadius:4}})}),(0,r.jsx)(U,{weight:`bold`,size:`2`,children:`Começar do Zero`}),(0,r.jsx)(U,{size:`1`,color:`gray`,align:`center`,children:`Tela em branco`})]})})]}),(0,r.jsxs)(G,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(K,{variant:`soft`,color:`gray`,onClick:n,children:`Pular Assistente`}),(0,r.jsxs)(K,{onClick:m,disabled:!f,children:[`Continuar `,(0,r.jsx)(j,{})]})]})]}),u===2&&(0,r.jsxs)(G,{direction:`column`,gap:`4`,children:[(0,r.jsx)(p_,{size:`4`,children:`Passo 2: Personalizar Visual`}),(0,r.jsx)(U,{color:`gray`,size:`2`,children:`Agora é sua vez de ajustar o layout. Use as ferramentas disponíveis.`}),(0,r.jsxs)(Lv,{columns:`2`,gap:`4`,children:[(0,r.jsx)(Tv,{variant:`surface`,children:(0,r.jsxs)(G,{gap:`3`,align:`start`,children:[(0,r.jsx)(W,{style:{padding:8,backgroundColor:`var(--accent-3)`,borderRadius:4},children:(0,r.jsx)(Ue,{width:20,height:20,color:`var(--accent-9)`})}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{weight:`bold`,size:`2`,as:`div`,children:`Edite Conteúdo`}),(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Clique duas vezes em qualquer texto ou imagem para editar suas propriedades.`})]})]})}),(0,r.jsx)(Tv,{variant:`surface`,children:(0,r.jsxs)(G,{gap:`3`,align:`start`,children:[(0,r.jsx)(W,{style:{padding:8,backgroundColor:`var(--green-3)`,borderRadius:4},children:(0,r.jsx)(rt,{width:20,height:20,color:`var(--green-9)`})}),(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{weight:`bold`,size:`2`,as:`div`,children:`Adicione Blocos`}),(0,r.jsx)(U,{size:`1`,color:`gray`,children:`Use a barra lateral esquerda para arrastar novos elementos.`})]})]})})]}),(0,r.jsxs)(G,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsxs)(K,{variant:`soft`,color:`gray`,onClick:()=>d(1),children:[(0,r.jsx)(j,{style:{transform:`rotate(180deg)`}}),` Voltar`]}),(0,r.jsxs)(K,{onClick:m,children:[`Começar a Editar `,(0,r.jsx)(j,{})]})]})]}),u===3&&(0,r.jsxs)(G,{direction:`column`,gap:`4`,children:[(0,r.jsx)(p_,{size:`4`,children:`Passo 3: Testar e Exportar`}),(0,r.jsx)(U,{color:`gray`,size:`2`,children:`Seu layout está pronto? Teste com dados diferentes e exporte o resultado.`}),(0,r.jsx)(Tv,{variant:`surface`,style:{padding:20},children:(0,r.jsxs)(G,{direction:`column`,gap:`3`,align:`center`,children:[(0,r.jsx)(he,{width:48,height:48,color:`var(--green-9)`}),(0,r.jsx)(p_,{size:`3`,children:`Tudo pronto!`}),(0,r.jsx)(U,{align:`center`,children:`Você completou a criação do layout. Agora você pode salvar, exportar ou continuar editando.`})]})}),(0,r.jsxs)(G,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(K,{variant:`soft`,color:`gray`,onClick:n,children:`Voltar a Editar`}),(0,r.jsxs)(K,{onClick:m,color:`green`,children:[(0,r.jsx)(he,{}),` Concluir e Exportar`]})]})]})]})]})})})};var cR=({current:e,total:t})=>(0,r.jsx)(G,{gap:`2`,children:[1,2,3].map(n=>(0,r.jsxs)(G,{align:`center`,gap:`1`,children:[(0,r.jsx)(W,{style:{width:24,height:24,borderRadius:`50%`,backgroundColor:n<=e?`var(--accent-9)`:`var(--gray-4)`,color:`white`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:12,fontWeight:`bold`},children:n<e?(0,r.jsx)(he,{}):n}),n<t&&(0,r.jsx)(W,{style:{width:20,height:2,backgroundColor:`var(--gray-4)`}})]},n))}),lR=({initialState:e,onSave:n,theme:i=`light`,templates:a,activeTemplateId:o,onTemplateChange:s})=>{let[c,l]=(0,t.useState)(!0),[u,d]=(0,t.useState)(!0),[f,p]=(0,t.useState)(!1),[m,h]=(0,t.useState)(!1),[g,_]=(0,t.useState)(a&&a.length>0?a[0].id:null),v=t.default.useRef(null),[y,b]=(0,t.useState)(!1),[x,S]=(0,t.useState)(1),[C,w]=(0,t.useState)(!1),{addElement:T,loadState:E,state:D,portalContainer:O,undo:k,redo:A,copy:j,paste:M,removeSelected:N,updateElements:P}=rS(),F=t.default.useRef(!1);t.default.useEffect(()=>{let e=()=>{let e=window.innerWidth<768;h(e),e&&(d(!1),l(!1))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let I=()=>{let e={elements:D.elements,isList:D.isList,mockData:D.mockData,singleMockData:D.singleMockData,listSettings:D.listSettings,canvasHeight:D.canvasHeight,gridSize:D.gridSize},t=JSON.stringify(e,null,2),n=new Blob([t],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`layout-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)};t.default.useEffect(()=>{let e=e=>{if(document.activeElement?.tagName===`INPUT`||document.activeElement?.tagName===`TEXTAREA`||document.activeElement?.isContentEditable)return;let t=e.clipboardData?.items;if(t){for(let n=0;n<t.length;n++)if(t[n].type.indexOf(`image`)!==-1){e.preventDefault();let r=t[n].getAsFile();if(r){let e=new FileReader;e.onload=e=>{let t=e.target?.result;T({type:`image`,content:t,width:200,height:200})},e.readAsDataURL(r)}}}};return window.addEventListener(`paste`,e),()=>window.removeEventListener(`paste`,e)},[T]),t.default.useEffect(()=>{let e=e=>{if(!(document.activeElement?.tagName===`INPUT`||document.activeElement?.tagName===`TEXTAREA`||document.activeElement?.isContentEditable)){if((e.ctrlKey||e.metaKey)&&e.key===`z`)e.shiftKey?(e.preventDefault(),A()):(e.preventDefault(),k());else if((e.ctrlKey||e.metaKey)&&e.key===`y`)e.preventDefault(),A();else if((e.ctrlKey||e.metaKey)&&e.key===`c`)e.preventDefault(),j();else if((e.ctrlKey||e.metaKey)&&e.key===`v`)e.preventDefault(),M();else if(e.key===`Delete`||e.key===`Backspace`)D.selectedElementIds.length>0&&(e.preventDefault(),N());else if([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`].includes(e.key)&&D.selectedElementIds.length>0){e.preventDefault();let t=e.shiftKey?10:1,n=[];D.selectedElementIds.forEach(r=>{let i=D.elements.find(e=>e.id===r);if(i){let a={};e.key===`ArrowUp`&&(a.y=i.y-t),e.key===`ArrowDown`&&(a.y=i.y+t),e.key===`ArrowLeft`&&(a.x=i.x-t),e.key===`ArrowRight`&&(a.x=i.x+t),n.push({id:r,changes:a})}}),n.length>0&&P(n)}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[k,A,j,M,N,D.selectedElementIds,D.elements,P]);let[ee,L]=(0,t.useState)(!1);t.default.useEffect(()=>{if(e)try{let t=typeof e==`string`?JSON.parse(e):e;Array.isArray(t)?E({elements:t}):t.elements&&E(t)}catch(e){console.error(`Failed to load initial state`,e)}L(!0)},[e,E]),t.default.useEffect(()=>{ee&&(F.current||D.elements.length===0&&(F.current=!0,S(1),b(!0)))},[ee,D.elements]),t.default.useEffect(()=>{!a||a.length===0||f&&_(o||a[0].id)},[o,f,a]);let te=t.default.useCallback(e=>{if(e)try{let t=typeof e==`string`?JSON.parse(e):e;if(Array.isArray(t)){E({elements:t});return}if(t&&typeof t==`object`&&`elements`in t){E(t);return}}catch(e){console.error(`Failed to apply template`,e)}},[E]);return t.default.useEffect(()=>{if(!a||a.length===0||!o||v.current===o)return;let e=a.find(e=>e.id===o);e&&(te(e.state),v.current=o)},[o,te,a]),(0,r.jsx)(k_,{appearance:i,accentColor:`blue`,grayColor:`slate`,radius:`large`,scaling:`105%`,children:(0,r.jsxs)(G,{direction:`column`,style:{height:`100vh`,width:`100%`,overflow:`hidden`,backgroundColor:`var(--gray-1)`},children:[(0,r.jsx)(LS,{onSave:n,templates:a,setIsTemplatesOpen:p,onFinish:()=>{S(3),b(!0)},onToggleSidebar:()=>d(!u)}),(0,r.jsxs)(G,{direction:`row`,style:{flexGrow:1,overflow:`hidden`},children:[m&&u&&(0,r.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(0,0,0,0.5)`,zIndex:90},onClick:()=>d(!1)}),u&&(0,r.jsxs)(G,{id:`sidebar-area`,direction:`column`,width:m?`100%`:`300px`,style:{borderRight:`1px solid var(--gray-5)`,backgroundColor:`var(--gray-1)`,flexShrink:0,height:`100%`,boxShadow:`1px 0 0 var(--gray-4)`,overflow:`hidden`,position:m?`absolute`:`relative`,zIndex:m?100:`auto`,top:0,left:0},children:[m&&(0,r.jsx)(G,{justify:`end`,p:`2`,children:(0,r.jsx)(J,{variant:`ghost`,color:`gray`,onClick:()=>d(!1),children:(0,r.jsx)(Te,{})})}),(0,r.jsx)(iR,{onClose:()=>{m&&d(!1)}})]}),(0,r.jsxs)(G,{direction:`column`,style:{flex:1,height:`100%`,overflow:`hidden`},children:[(0,r.jsxs)(G,{justify:`between`,align:`center`,px:`3`,py:`2`,style:{borderBottom:`1px solid var(--gray-6)`,backgroundColor:`var(--gray-1)`,flexShrink:0,zIndex:10},children:[(0,r.jsx)(G,{gap:`3`,align:`center`,children:(0,r.jsx)(J,{size:`2`,variant:`ghost`,color:`gray`,onClick:()=>d(!u),title:u?`Ocultar Barra Lateral`:`Mostrar Barra Lateral`,style:{cursor:`pointer`},children:m?(0,r.jsx)(Ze,{}):u?(0,r.jsx)(je,{}):(0,r.jsx)(Ne,{})})}),(0,r.jsxs)(G,{gap:`3`,align:`center`,children:[(0,r.jsx)(OP,{}),(0,r.jsx)(J,{size:`2`,variant:`ghost`,color:c?`blue`:`gray`,onClick:()=>l(!c),title:c?`Ocultar Preview`:`Mostrar Preview`,style:{cursor:`pointer`},children:c?(0,r.jsx)(Ve,{}):(0,r.jsx)(ze,{})})]})]}),(0,r.jsx)(W,{style:{flex:1,position:`relative`,overflow:`hidden`},children:(0,r.jsxs)(Kx,{orientation:`horizontal`,style:{height:`100%`,width:`100%`},children:[(!m||!c)&&(0,r.jsx)(Xx,{defaultSize:50,minSize:20,children:(0,r.jsxs)(Lv,{columns:`20px 1fr`,rows:`20px 1fr`,style:{height:`100%`,width:`100%`,backgroundColor:`var(--color-background)`},children:[(0,r.jsx)(W,{style:{backgroundColor:`var(--gray-2)`,borderRight:`1px solid var(--gray-6)`,borderBottom:`1px solid var(--gray-6)`,zIndex:30}}),(0,r.jsx)(W,{style:{backgroundColor:`var(--gray-2)`,borderBottom:`1px solid var(--gray-6)`,overflow:`hidden`,zIndex:30},children:(0,r.jsx)(EP,{orientation:`horizontal`})}),(0,r.jsx)(W,{style:{backgroundColor:`var(--gray-2)`,borderRight:`1px solid var(--gray-6)`,overflow:`hidden`,zIndex:30},children:(0,r.jsx)(EP,{orientation:`vertical`})}),(0,r.jsxs)(W,{style:{position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`},id:`canvas-area`,children:[(0,r.jsx)(W,{style:{position:`absolute`,top:16,left:`50%`,transform:`translateX(-50%)`,zIndex:20},children:(0,r.jsx)(iS,{})}),(0,r.jsx)(W,{style:{position:`absolute`,bottom:16,right:16,zIndex:20},children:(0,r.jsx)(oR,{})}),(0,r.jsx)(IS,{}),(0,r.jsx)(RS,{})]})]})}),!m&&c&&(0,r.jsx)(Qy,{style:{width:`4px`,backgroundColor:`var(--gray-6)`,cursor:`col-resize`,transition:`background-color 0.2s`}}),c&&(0,r.jsx)(Xx,{defaultSize:50,minSize:20,children:(0,r.jsx)(W,{id:`preview-area`,style:{height:`100%`,width:`100%`,backgroundColor:`var(--gray-3)`,borderLeft:`1px solid var(--gray-5)`},children:(0,r.jsx)(gN,{})})})]})})]})]}),(0,r.jsx)(ny,{open:f,onOpenChange:p,children:(0,r.jsxs)(iy,{...O&&{container:O},style:{maxWidth:450},children:[(0,r.jsx)(ay,{children:`Galeria de Templates`}),(0,r.jsx)(oy,{size:`2`,mb:`4`,children:`Escolha um layout pré-definido para começar.`}),a&&a.length>0?(0,r.jsxs)(G,{direction:`column`,gap:`3`,children:[(0,r.jsxs)(W,{children:[(0,r.jsx)(U,{size:`2`,weight:`bold`,as:`div`,mb:`2`,children:`Selecione o Template`}),(0,r.jsx)(G,{direction:`column`,gap:`2`,children:a.map(e=>(0,r.jsx)(K,{variant:g===e.id?`solid`:`soft`,color:g===e.id?`blue`:`gray`,size:`2`,style:{width:`100%`,justifyContent:`flex-start`,border:g===e.id?`2px solid var(--accent-9)`:void 0},onClick:()=>_(e.id),children:e.name},e.id))})]}),g&&a.find(e=>e.id===g)?.description&&(0,r.jsx)(W,{p:`3`,style:{backgroundColor:`var(--gray-2)`,borderRadius:8},children:(0,r.jsx)(U,{size:`2`,color:`gray`,children:a.find(e=>e.id===g)?.description})}),(0,r.jsxs)(G,{gap:`3`,mt:`4`,justify:`end`,children:[(0,r.jsx)(sy,{children:(0,r.jsx)(K,{variant:`soft`,color:`gray`,children:`Cancelar`})}),(0,r.jsx)(sy,{children:(0,r.jsx)(K,{onClick:()=>{if(!g)return;if(s){s(g);return}let e=a.find(e=>e.id===g);e&&(te(e.state),v.current=g)},children:`Aplicar`})})]})]}):(0,r.jsx)(U,{children:`Nenhum template disponível.`})]})}),(0,r.jsx)(sR,{isOpen:y,onClose:()=>b(!1),templates:a||[],onSelectTemplate:e=>{e&&te(e.state)},onStartTour:()=>w(!0),initialStep:x,onFinishWizard:()=>{I(),alert(`Layout finalizado e exportado com sucesso!`)}}),(0,r.jsx)(BS,{isOpen:C,onClose:()=>w(!1)}),(0,r.jsx)(SP,{})]})})};let uR=e=>(0,r.jsx)(nS,{isList:e.layout.isList,availableProps:e.layout.props,theme:e.theme,portalContainer:e.portalContainer,children:(0,r.jsx)(lR,{...e})});var dR=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,`$1-$2`).toLowerCase(),fR=e=>{let t=/^#([0-9a-fA-F]{8})$/.exec(e);if(!t)return e;let n=t[1];return`rgba(${parseInt(n.slice(0,2),16)}, ${parseInt(n.slice(2,4),16)}, ${parseInt(n.slice(4,6),16)}, ${parseInt(n.slice(6,8),16)/255})`},pR=e=>{if(!e)return``;let t=[`width`,`height`,`top`,`left`,`right`,`bottom`,`fontSize`,`borderRadius`,`padding`,`margin`,`borderWidth`,`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`,`minHeight`,`maxHeight`,`minWidth`,`maxWidth`];return Object.entries(e).map(([e,n])=>{if(n==null)return``;let r=dR(e),i=typeof n==`number`&&t.includes(e)?n+`px`:n;return typeof i==`string`&&/^#([0-9a-fA-F]{8})$/.test(i)&&(i=fR(i)),`${r}: ${i}`}).filter(Boolean).join(`; `)},mR=(e,t)=>{let n=/(rgba?\([^)]+\)|#(?:[0-9a-fA-F]{3,8})|[a-zA-Z]+)\s*$/;return!e||e===`none`?`0 4px 12px 0 ${t}`:n.test(e)?e.replace(n,t):`${e} ${t}`},hR=(e,t,n,r,i=1.2)=>{if(!e)return 0;try{let a=document.createElement(`canvas`).getContext(`2d`);if(!a)return 0;a.font=`${r}px ${n}`;let o=String(e).split(`
62
62
  `),s=0;for(let e of o){let n=e.split(` `),r=``;if(n.length===1&&n[0]===``){s++;continue}for(let e=0;e<n.length;e++){let i=n[e],o=a.measureText(i).width;if(o>t){r.trim().length>0&&(s++,r=``),s+=Math.ceil(o/t);continue}let c=r+i+` `;a.measureText(c).width>t&&r.trim().length>0?(s++,r=i+` `):r=c}r.length>0&&s++}return Math.ceil(s*r*i)}catch{return 0}},gR=(e,t,n)=>{let r=String(e).toLowerCase(),i=String(n).toLowerCase();switch(t){case`equals`:return r===i;case`notEquals`:return r!==i;case`contains`:return r.includes(i);case`greaterThan`:return parseFloat(r)>parseFloat(i);case`lessThan`:return parseFloat(r)<parseFloat(i);case`truthy`:return!!e;case`falsy`:return!e;default:return!1}},_R=(e,t)=>{if(!t||t.type===`text`)return e==null?``:String(e);if(e==null)return``;if(t.type===`boolean`)return String(e)===`true`||e===!0||typeof e==`number`&&e>0?t.trueLabel||`Sim`:t.falseLabel||`Não`;if(t.type===`date`)try{let n=new Date(e);if(isNaN(n.getTime()))return String(e);if(t.dateFormat){let e=n.getDate().toString().padStart(2,`0`),r=(n.getMonth()+1).toString().padStart(2,`0`),i=n.getFullYear(),a=n.getHours().toString().padStart(2,`0`),o=n.getMinutes().toString().padStart(2,`0`),s=n.getSeconds().toString().padStart(2,`0`);return t.dateFormat.replace(`DD`,e).replace(`MM`,r).replace(`YYYY`,String(i)).replace(`HH`,a).replace(`mm`,o).replace(`ss`,s)}return n.toLocaleDateString()}catch{return String(e)}if(t.type===`number`){let n=parseFloat(e);return isNaN(n)?String(e):t.numberFormat===`currency`?(t.currencySymbol||`R$`)+` `+n.toFixed(t.decimalPlaces||2):t.numberFormat===`percent`?n.toFixed(t.decimalPlaces||0)+`%`:n.toFixed(t.decimalPlaces||0)}return String(e)},vR=e=>{switch(e){case`linear`:return`linear`;case`ease-in`:return`ease-in`;case`ease-out`:return`ease-out`;case`ease-in-out`:return`ease-in-out`;case`bounce`:return`cubic-bezier(0.175, 0.885, 0.32, 1.275)`;default:return`ease-out`}},yR=e=>{if(!e||e.type===`none`)return{};let t=(e.duration||.4)+`s`,n=(e.delay||0)+`s`,r=vR(e.timingFunction),i=e.iterationCount===`infinite`?`infinite`:typeof e.iterationCount==`number`?Math.max(1,e.iterationCount):1;return{animation:`${e.type} ${t} ${r} ${n}`,animationIterationCount:i,animationFillMode:`both`}},bR=(e,t)=>{let n=JSON.parse(JSON.stringify(e)),r=new Map(n.map(e=>[e.id,{...e}])),i=[],a=(e,t)=>{if(e.id===t.id)return!1;let n=.1;return e.x>=t.x-n&&e.x+e.width<=t.x+t.width+n&&e.y>=t.y-n&&e.y+e.height<=t.y+t.height+n};n.forEach(e=>{let o=e.type===`text`,s=e.type===`text-container`;if((o||s)&&e.autoGrow){let o=e.content;o=o.replace(/\{\{(.*?)\}\}/g,(n,r)=>{let i=t[r.trim()];return i==null?n:e.formatting?_R(i,e.formatting):String(i)});let c=parseInt(String(e.style&&e.style.fontSize||16)),l=String(e.style&&e.style.fontFamily||`Arial`);if(s&&e.containerExpansion===`horizontal`)try{let t=document.createElement(`canvas`).getContext(`2d`);if(t){t.font=`${c}px ${l}`;let n=t.measureText(o),r=parseInt(String(e.style&&e.style.padding||0))*2,i=Math.ceil(n.width+r);Math.abs(i-e.width)>1&&(e.width=i,e.content=o)}}catch{}else{let t=0,s=parseInt(String(e.style&&e.style.padding||0)),u=Math.max(1,e.width-s*2),d=/<([a-z]+)([^>]*?)>/i.exec(o);if(d){let e=d[2],n=/height=["']?(\d+)["']?/i.exec(e),r=/height:\s*(\d+)px/i.exec(e);t=n?parseInt(n[1]):r?parseInt(r[1]):hR(o,u,l,c)}else t=hR(o,u,l,c);let f=t+s*2;(!d||d&&!t)&&(f+=4);let p=parseInt(String(e.style&&e.style.minHeight||0)),m=Math.max(f,p),h=e.height,g=m-h;if(Math.abs(g)>1){e.height=m,e.content=o;let t=[],s=r.get(e.id);s&&n.forEach(n=>{if(n.id===e.id)return;let i=r.get(n.id);i&&a(s,i)&&t.push(n)});let c=new Set([e.id]);t.forEach(e=>{e.height+=g,c.add(e.id)}),i.push({triggerY:e.y+h,delta:g,ignoreIds:c})}}}}),n.forEach(e=>{let t=r.get(e.id);if(!t)return;let n=0;i.forEach(r=>{r.ignoreIds.has(e.id)||t.y>=r.triggerY-.1&&(n+=r.delta)}),e.y+=n});let o=0;return n.forEach(e=>{let t=e.y+e.height;t>o&&(o=t)}),{layoutElements:n,maxY:o}},xR=(e,t,n)=>{let{maxY:r}=bR(e,t);return n?Math.max(r,n):r},SR=(e,t,n=0,r=0)=>{let{layoutElements:i}=bR(e,t),a=i,o=e=>{let n=e.content,r=``;if(e.type===`text`||e.type===`text-container`)n=n.replace(/\{\{(.*?)\}\}/g,(n,r)=>{let i=t[r.trim()];return i==null?n:e.formatting?_R(i,e.formatting):String(i)});else if(e.type===`image`)if(e.dataBinding){let i=t[e.dataBinding];r=i==null?n:String(i)}else r=n.replace(/\{\{(.*?)\}\}/g,(e,n)=>{let r=t[n.trim()];return r==null?e:String(r)});let i={};e.conditions&&e.conditions.forEach(e=>{let n=t[e.property];gR(n,e.operator,e.value)&&(i={...i,...e.style})});let a={};e.styleBindings&&Object.entries(e.styleBindings).forEach(([n,r])=>{let o=t[r];o!=null&&(n===`boxShadowColor`?a.boxShadow=mR(i.boxShadow||e.style?.boxShadow,String(o)):a[n]=String(o))});let o={width:e.width,height:e.autoGrow?`auto`:e.height,transform:e.rotation?`rotate(${e.rotation}deg)`:void 0,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,...e.type===`text-container`?{display:`flex`,alignItems:e.style?.alignItems||`flex-start`,justifyContent:e.style?.justifyContent||`flex-start`}:{},...e.style,...i,...a,...yR(e.animation),...e.hidden?{display:`none`}:{}};return{content:n,imgSrc:r,baseStyle:o}},s=(e,n,r,i)=>{if(e.type===`text`||e.type===`text-container`)return`<div style="${n}">${r}</div>`;if(e.type===`image`){let t=pR({width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`});return`<div style="${n}"><img src="${(MS(i)?i:`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`).replace(/"/g,`&quot;`)}" alt="Element" style="${t}" /></div>`}else if(e.type===`box`)return`<div style="${n}"></div>`;else if(e.type===`checkbox`){let r=!1;if(e.dataBinding){let n=t[e.dataBinding];r=n===!0||String(n)===`true`}return`<div style="${n}; display: flex; align-items: center; justify-content: center;"><input type="checkbox" ${r?`checked`:``} disabled style="width:100%;height:100%;margin:0;" /></div>`}return``};return a.map(e=>{let{content:t,imgSrc:n,baseStyle:i}=o(e);return s(e,pR({...i,position:`absolute`,left:e.x,top:e.y+r}),t,n)}).join(`
63
63
  `)},CR=({element:e,itemData:t})=>{let n=e.content,i=``;if(e.type===`text`||e.type===`text-container`)n=n.replace(/\{\{(.*?)\}\}/g,(n,r)=>{let i=t[r.trim()];return i==null?n:e.formatting?_R(i,e.formatting):String(i)});else if(e.type===`image`)if(e.dataBinding){let r=t[e.dataBinding];i=r==null?n:String(r)}else i=n.replace(/\{\{(.*?)\}\}/g,(e,n)=>{let r=t[n.trim()];return r==null?e:String(r)});let a={};e.conditions&&e.conditions.forEach(e=>{let n=t[e.property];gR(n,e.operator,e.value)&&(a={...a,...e.style})});let o={};e.styleBindings&&Object.entries(e.styleBindings).forEach(([n,r])=>{let i=t[r];i!=null&&(n===`boxShadowColor`?o.boxShadow=mR(a.boxShadow||e.style?.boxShadow,String(i)):o[n]=String(i))});let s={position:`absolute`,left:e.x,top:e.y,width:e.width,height:e.autoGrow?`auto`:e.height,transform:e.rotation?`rotate(${e.rotation}deg)`:void 0,overflow:e.autoGrow?`visible`:`hidden`,whiteSpace:e.type===`text-container`&&e.autoGrow&&e.containerExpansion===`horizontal`?`nowrap`:e.autoGrow?`pre-wrap`:void 0,wordBreak:e.autoGrow?`break-word`:void 0,...e.type===`text-container`?{display:`flex`,alignItems:e.style?.alignItems||`flex-start`,justifyContent:e.style?.justifyContent||`flex-start`}:{},...e.style,...a,...o,...yR(e.animation),...e.hidden?{display:`none`}:{}};if(e.type===`text`||e.type===`text-container`)return/<[a-z][\s\S]*>/i.test(n)?(0,r.jsx)(`div`,{style:s,dangerouslySetInnerHTML:{__html:n}}):(0,r.jsx)(`div`,{style:s,children:n});if(e.type===`image`){let t={width:`100%`,height:`100%`,objectFit:e.style?.objectFit||`cover`,display:`block`};return(0,r.jsx)(`div`,{style:s,children:(0,r.jsx)(`img`,{src:MS(i)?i:`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,alt:`Element`,style:t})})}else if(e.type===`box`)return(0,r.jsx)(`div`,{style:s});else if(e.type===`checkbox`){let n=!1;if(e.dataBinding){let r=t[e.dataBinding];n=r===!0||String(r)===`true`}return(0,r.jsx)(`div`,{style:{...s,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,r.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!0,style:{width:`100%`,height:`100%`,margin:0}})})}return null},wR=({elements:e,data:t,options:n})=>{let{isList:i,listSettings:a}=n,o=`
64
64
  @keyframes slideIn {