datakeen-session-react 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,28 +1,37 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(t),i=r(n),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function l(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function c(...e){return t=>{let n=!1;const r=e.map((e=>{const r=l(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():l(e[t],null)}}}}function u(...e){return o.useCallback(c(...e),e)}function d(e){const t=o.forwardRef(((e,t)=>{const{children:n,...r}=e,i=u(o.isValidElement(n)?function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n):void 0,t);if(o.isValidElement(n)){const e=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==o.Fragment&&(e.ref=i),o.cloneElement(n,e)}return o.Children.count(n)>1?o.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var f=Symbol("radix.slottable");function p(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}var h=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=function(t){const n=d(t),r=o.forwardRef(((t,r)=>{const{children:i,...a}=t,s=o.Children.toArray(i),l=s.find(p);if(l){const t=l.props.children,i=s.map((e=>e===l?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e));return e.jsx(n,{...a,ref:r,children:o.isValidElement(t)?o.cloneElement(t,void 0,i):null})}return e.jsx(n,{...a,ref:r,children:i})}));return r.displayName=`${t}.Slot`,r}(`Primitive.${n}`),i=o.forwardRef(((t,o)=>{const{asChild:i,...a}=t,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(s,{...a,ref:o})}));return i.displayName=`Primitive.${n}`,{...t,[n]:i}}),{}),m=o.forwardRef(((t,n)=>e.jsx(h.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}})));m.displayName="Label";var C=m,v=function(t){var n=t.children,r=t.className,o=t.onClick,i=t.disabled,a=void 0!==i&&i;return e.jsx("button",{className:"flex flex-col justify-center items-center gap-2 w-[322px] h-[48px] shrink-0 rounded-[12px] cursor-pointer bg-[#11E5C5] hover:bg-[#7dffeb] text-[#3C3C40] text-center font-poppins text-sm font-medium leading-[110%] ".concat(r),onClick:o,disabled:a,children:n})},g=function(t){var n=t.className;return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"90",height:"16",viewBox:"0 0 90 16",fill:"none",className:n,children:[e.jsxs("g",{clipPath:"url(#clip0_17364_64593)",children:[e.jsx("mask",{id:"mask0_17364_64593",maskUnits:"userSpaceOnUse",x:"10",y:"3",width:"7",height:"7",children:e.jsx("path",{d:"M10.4512 3.52246H16.0069V9.22579H10.4512V3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask0_17364_64593)",children:e.jsx("path",{d:"M15.9716 3.52246V5.25302C15.9716 7.42691 14.2543 9.18913 12.136 9.18913H10.4512V7.45857C10.4512 5.28524 12.1675 3.52246 14.2852 3.52246H15.9716Z",fill:"#11E5C5"})}),e.jsx("mask",{id:"mask1_17364_64593",maskUnits:"userSpaceOnUse",x:"10",y:"9",width:"7",height:"7",children:e.jsx("path",{d:"M10.4512 9.80566H16.0069V15.4712H10.4512V9.80566Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask1_17364_64593)",children:e.jsx("path",{d:"M15.9716 15.4712V13.7407C15.9716 11.5668 14.2543 9.80566 12.136 9.80566H10.4512V11.5351C10.4512 13.7096 12.1675 15.4712 14.2852 15.4712H15.9716Z",fill:"#11E5C5"})}),e.jsx("mask",{id:"mask2_17364_64593",maskUnits:"userSpaceOnUse",x:"0",y:"3",width:"7",height:"13",children:e.jsx("path",{d:"M0.330563 3.50293H6.09267V15.4707H0.330563V3.50293Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask2_17364_64593)",children:e.jsx("path",{d:"M0.330563 3.52832C3.54516 3.52832 6.15119 6.20165 6.15119 9.5011C6.15119 12.8005 3.54516 15.4639 0.330563 15.4639V3.52832Z",fill:"#192441"})}),e.jsx("path",{d:"M20.3102 13.0132C19.5694 12.1821 19.1987 11.1643 19.1987 9.95875C19.1987 8.75431 19.5694 7.7332 20.3102 6.89542C21.0526 6.05931 21.996 5.64042 23.1395 5.64042C24.1902 5.64042 25.0562 5.97931 25.7363 6.65709V0.375977H28.4756V14.021H25.7666V13.1015H25.7363C25.0562 13.8738 24.1902 14.2593 23.1395 14.2593C21.996 14.2593 21.0526 13.8438 20.3102 13.0132ZM22.6355 8.57987C22.2789 8.93987 22.1017 9.39931 22.1017 9.95875C22.1017 10.5188 22.2708 10.9776 22.6095 11.3332C22.9509 11.6871 23.4001 11.8638 23.9577 11.8638C24.4937 11.8638 24.9353 11.6849 25.28 11.3243C25.6246 10.9654 25.7964 10.5099 25.7964 9.95875C25.7964 9.39931 25.6181 8.93987 25.2626 8.57987C24.9093 8.22042 24.4747 8.04042 23.9577 8.04042C23.4321 8.04042 22.991 8.22042 22.6355 8.57987Z",fill:"#192441"}),e.jsx("path",{d:"M30.0959 13.0134C29.3551 12.1823 28.9845 11.1645 28.9845 9.95896C28.9845 8.75451 29.3551 7.7334 30.0959 6.89562C30.8389 6.05951 31.7818 5.64062 32.9252 5.64062C33.976 5.64062 34.8419 5.97951 35.522 6.65729V5.87896H38.2614V14.0212H35.5524V13.1017H35.522C34.8419 13.874 33.976 14.2595 32.9252 14.2595C31.7818 14.2595 30.8389 13.844 30.0959 13.0134ZM32.4212 8.58007C32.0652 8.94007 31.8875 9.39951 31.8875 9.95896C31.8875 10.519 32.0565 10.9778 32.3958 11.3334C32.7366 11.6873 33.1859 11.864 33.7435 11.864C34.28 11.864 34.7211 11.6851 35.0658 11.3245C35.4104 10.9656 35.5827 10.5101 35.5827 9.95896C35.5827 9.39951 35.4039 8.94007 35.0484 8.58007C34.6956 8.22062 34.2605 8.04063 33.7435 8.04063C33.2184 8.04063 32.7767 8.22062 32.4212 8.58007Z",fill:"#192441"}),e.jsx("path",{d:"M39.8042 5.87878V2.85156H42.543V5.87878H44.2099V8.02267H42.543V10.6082C42.543 11.3599 42.7478 11.7355 43.1591 11.7355C43.2626 11.7355 43.3699 11.7155 43.4821 11.6738C43.5965 11.6293 43.6853 11.5877 43.7493 11.5455L43.8398 11.4838L44.5199 13.751C43.9308 14.0893 43.2605 14.2593 42.5089 14.2593C41.994 14.2593 41.5508 14.1666 41.1779 13.981C40.8078 13.7955 40.5276 13.5466 40.338 13.2338C40.1488 12.9227 40.0117 12.5955 39.9288 12.2527C39.8448 11.9082 39.8042 11.5399 39.8042 11.1477V8.02267H38.6586V5.87878H39.8042Z",fill:"#192441"}),e.jsx("path",{d:"M45.2151 13.0134C44.4743 12.1823 44.1042 11.1645 44.1042 9.95896C44.1042 8.75451 44.4743 7.7334 45.2151 6.89562C45.9581 6.05951 46.901 5.64062 48.0444 5.64062C49.0957 5.64062 49.9612 5.97951 50.6418 6.65729V5.87896H53.3806V14.0212H50.6716V13.1017H50.6418C49.9612 13.874 49.0957 14.2595 48.0444 14.2595C46.901 14.2595 45.9581 13.844 45.2151 13.0134ZM47.541 8.58007C47.1844 8.94007 47.0067 9.39951 47.0067 9.95896C47.0067 10.519 47.1758 10.9778 47.515 11.3334C47.8564 11.6873 48.3051 11.864 48.8627 11.864C49.3992 11.864 49.8403 11.6851 50.185 11.3245C50.5296 10.9656 50.7019 10.5101 50.7019 9.95896C50.7019 9.39951 50.5231 8.94007 50.1676 8.58007C49.8148 8.22062 49.3797 8.04063 48.8627 8.04063C48.3376 8.04063 47.896 8.22062 47.541 8.58007Z",fill:"#192441"}),e.jsx("path",{d:"M63.5197 5.87875L59.7469 9.76875L63.8904 14.021H60.3674L57.1973 10.7676V14.021H54.4585V0.375977H57.1973V8.72098L59.9626 5.87875H63.5197Z",fill:"#192441"}),e.jsx("path",{d:"M71.6998 10.339H65.9463C65.9463 10.9112 66.1246 11.3356 66.4845 11.6123C66.8465 11.8862 67.2393 12.0228 67.6647 12.0228C68.1058 12.0228 68.4548 11.9634 68.7112 11.8417C68.9696 11.7178 69.2634 11.4773 69.5939 11.1167L71.5751 12.1334C70.7504 13.5512 69.3799 14.2595 67.4621 14.2595C66.2672 14.2595 65.2419 13.8395 64.3873 13.0001C63.5311 12.1578 63.1035 11.1434 63.1035 9.95896C63.1035 8.77451 63.5311 7.76007 64.3873 6.9134C65.2419 6.06507 66.2672 5.64062 67.4621 5.64062C68.7198 5.64062 69.7413 6.01507 70.5287 6.7634C71.3177 7.50896 71.7128 8.57451 71.7128 9.95896C71.7128 10.1512 71.7084 10.2773 71.6998 10.339ZM66.0238 8.7834H69.0385C68.9783 8.36229 68.8157 8.0384 68.5518 7.81063C68.2868 7.58118 67.9498 7.46618 67.5396 7.46618C67.0854 7.46618 66.7234 7.5884 66.4541 7.83285C66.1875 8.07507 66.0428 8.39229 66.0238 8.7834Z",fill:"#192441"}),e.jsx("path",{d:"M80.2489 10.339H74.4955C74.4955 10.9112 74.6738 11.3356 75.0336 11.6123C75.3956 11.8862 75.7885 12.0228 76.2139 12.0228C76.655 12.0228 77.004 11.9634 77.2603 11.8417C77.5188 11.7178 77.8125 11.4773 78.1431 11.1167L80.1243 12.1334C79.2995 13.5512 77.929 14.2595 76.0112 14.2595C74.8163 14.2595 73.791 13.8395 72.9364 13.0001C72.0802 12.1578 71.6526 11.1434 71.6526 9.95896C71.6526 8.77451 72.0802 7.76007 72.9364 6.9134C73.791 6.06507 74.8163 5.64062 76.0112 5.64062C77.269 5.64062 78.2905 6.01507 79.0779 6.7634C79.8669 7.50896 80.2619 8.57451 80.2619 9.95896C80.2619 10.1512 80.2576 10.2773 80.2489 10.339ZM74.573 8.7834H77.5876C77.5275 8.36229 77.3649 8.0384 77.101 7.81063C76.836 7.58118 76.4989 7.46618 76.0887 7.46618C75.6346 7.46618 75.2726 7.5884 75.0033 7.83285C74.7366 8.07507 74.592 8.39229 74.573 8.7834Z",fill:"#192441"}),e.jsx("path",{d:"M80.7702 14.0212V5.87896H83.5096V6.73674H83.5394C84.2514 6.00618 85.009 5.64062 85.8138 5.64062C86.2034 5.64062 86.5909 5.6934 86.9762 5.79951C87.3642 5.90563 87.7354 6.07174 88.0919 6.29451C88.4469 6.51562 88.7357 6.82951 88.9574 7.23618C89.1785 7.64285 89.289 8.11785 89.289 8.65951V14.0212H86.5546V9.41951C86.5546 8.99562 86.4218 8.62618 86.1579 8.31007C85.8967 7.99174 85.5553 7.83285 85.1331 7.83285C84.7197 7.83285 84.3452 7.99618 84.0092 8.3234C83.6754 8.65062 83.5096 9.01618 83.5096 9.41951V14.0212H80.7702Z",fill:"#192441"}),e.jsx("mask",{id:"mask3_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"3",height:"13",children:e.jsx("path",{d:"M7.03613 3.52246H9.56629V15.4802H7.03613V3.52246Z",fill:"white"})}),e.jsxs("g",{mask:"url(#mask3_17364_64593)",children:[e.jsx("mask",{id:"mask4_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"3",height:"13",children:e.jsx("path",{d:"M8.30094 3.52246C9 3.52246 9.56629 4.10413 9.56629 4.82079V14.1747C9.56629 14.8919 9 15.4736 8.30094 15.4736C7.60242 15.4736 7.03613 14.8919 7.03613 14.1747V4.82079C7.03613 4.10413 7.60242 3.52246 8.30094 3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask4_17364_64593)",children:e.jsx("path",{d:"M7.03613 3.52246H9.56629V15.4702H7.03613V3.52246Z",fill:"#192441"})})]}),e.jsx("mask",{id:"mask5_17364_64593",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"2",height:"8",children:e.jsx("path",{d:"M8.30961 8.45801H9.57496V15.473H8.30961V8.45801Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask5_17364_64593)",children:e.jsx("path",{d:"M8.30961 8.45801H9.57496V15.4719H8.30961V8.45801Z",fill:"#192441"})}),e.jsx("mask",{id:"mask6_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"2",height:"8",children:e.jsx("path",{d:"M7.0448 3.52246H8.30961V10.5363H7.0448V3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask6_17364_64593)",children:e.jsx("path",{d:"M7.0448 3.52246H8.30961V10.5363H7.0448V3.52246Z",fill:"#192441"})})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_17364_64593",children:e.jsx("rect",{width:"90",height:"16",fill:"white"})})})]})},x=function(t){var n=t.className;return e.jsxs("div",{className:"flex items-center justify-center flex-row ".concat(n),children:[e.jsx("span",{className:"text-xs font-semibold text-[#3C3C40] text-center mt-0.5",children:"Propulsé par "}),e.jsx(g,{className:"inline-block w-[90px] h-[18px] mb-[2px] ml-1"})]})},y=function(t){var n=t.children,r=t.className;return e.jsx("h1",{className:"text-[#3C3C40] text-center font-poppins text-2xl font-bold leading-[110%] ".concat(r),children:n})},w=function(t){var n=t.children,r=t.className;return e.jsx("h2",{className:"text-[#3C3C40] text-center text-xs font-semibold leading-[120%] ".concat(r),children:n})},b=Array.from({length:31},(function(e,t){return t+1})),j=Array.from({length:100},(function(e,t){return(new Date).getFullYear()-t})),E=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],S=function(n){var r=n.stepObject,o=n.setUserInput,i=r.setStep,s=r.step,l=t.useState({lastName:"",firstName:"",birthDate:"",day:"",month:"",year:""}),c=l[0],u=l[1],d=function(e,t){u((function(n){var r,o=a(a({},n),((r={})[e]=t,r)),i=o.day,s=o.month,l=o.year;if(i&&s&&l){var c=s.padStart(2,"0"),u=i.padStart(2,"0");o.birthDate="".concat(l,"-").concat(c,"-").concat(u)}else o.birthDate="";return o}))};return e.jsxs("form",{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-5 mt-4",children:[e.jsx(y,{children:"Informations d’identité"}),e.jsx(w,{children:"Afin de commencer le processus de vérification, veuillez entrer vos informations d’identité"})]}),e.jsxs("div",{className:"flex flex-col gap-5 mt-8",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(C,{htmlFor:"firstName",className:"text-xl font-semibold",children:"Prénom"}),e.jsx("input",{id:"firstName",type:"text",value:c.firstName,onChange:function(e){return d("firstName",e.target.value)},className:"border border-gray-300 rounded-md p-2 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(C,{htmlFor:"lastName",className:"text-xl font-semibold",children:"Nom"}),e.jsx("input",{id:"lastName",type:"text",value:c.lastName,onChange:function(e){return d("lastName",e.target.value)},className:"border border-gray-300 rounded-md p-2 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]"})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(C,{className:"text-xl font-semibold",children:"Date de naissance"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{value:c.day,onChange:function(e){return d("day",e.target.value)},className:"border border-gray-300 rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]",children:[e.jsx("option",{value:"",children:"Jour"}),b.map((function(t){return e.jsx("option",{value:String(t),children:t},t)}))]}),e.jsxs("select",{value:c.month,onChange:function(e){return d("month",e.target.value)},className:"border border-gray-300 rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]",children:[e.jsx("option",{value:"",children:"Mois"}),E.map((function(t,n){return e.jsx("option",{value:String(n+1).padStart(2,"0"),children:t},t)}))]}),e.jsxs("select",{value:c.year,onChange:function(e){return d("year",e.target.value)},className:"border border-gray-300 rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]",children:[e.jsx("option",{value:"",children:"Année"}),j.map((function(t){return e.jsx("option",{value:String(t),children:t},t)}))]})]})]})]}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(v,{onClick:function(){c.firstName&&c.lastName&&c.birthDate&&(i(s+1),o({lastName:c.lastName,firstName:c.firstName,birthDate:c.birthDate}))},className:"w-full",children:"Continuer"})}),e.jsx(x,{})]})]})},N=function(t){var n=t.children,r=t.className,o=void 0===r?"":r;return e.jsx("div",{className:"bg-white shadow-md rounded-lg p-4 ".concat(o),children:n})},L=function(t){var n=t.className;return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"230",height:"230",viewBox:"0 0 230 230",fill:"none",className:n,children:[e.jsx("path",{d:"M39.6888 205.896C-1.8998 181.884 -1.8998 142.95 39.6888 118.956C81.2774 94.9626 148.709 94.9442 190.311 118.956C231.914 142.968 231.9 181.903 190.311 205.896C148.723 229.89 81.282 229.913 39.6888 205.896Z",fill:"#F5F5F5"}),e.jsx("path",{d:"M175.177 67.2377L175.104 67.2009L157.568 57.1085L157.463 57.0579C149.27 52.9179 138.34 54.1645 126.583 61.7637C102.966 77.0357 84.9712 112.189 86.388 140.281C87.0918 154.279 92.4922 163.879 100.648 168.102L100.717 168.139L118.257 178.236L118.34 178.282C126.532 182.422 137.471 181.193 149.238 173.585C172.854 158.313 190.849 123.16 189.433 95.0677C188.738 81.0607 183.338 71.4605 175.177 67.2377Z",fill:"#37474F"}),e.jsx("path",{d:"M117.654 177.909L100.74 168.129L100.657 168.079C92.5014 163.847 87.1056 154.246 86.3972 140.267C85.767 127.737 89.0008 113.812 94.8612 100.882L94.9762 100.597L112.401 110.974C106.531 123.905 103.307 137.829 103.937 150.359C104.604 164.063 109.788 173.548 117.654 177.909Z",fill:"#263238"}),e.jsx("path",{d:"M149.247 173.576C172.863 158.304 190.859 123.151 189.442 95.0586C188.025 66.9664 167.73 56.5796 144.113 71.8516C120.497 87.1236 102.497 122.277 103.914 150.364C105.331 178.452 125.631 188.848 149.247 173.576Z",fill:"#455A64"}),e.jsx("path",{d:"M169.248 65.0576L139.647 126.04L133.276 119.14C131.376 117.162 128.777 116.008 126.035 115.926C123.294 115.844 120.63 116.84 118.616 118.7C116.601 120.561 115.396 123.137 115.26 125.876C115.124 128.615 116.068 131.298 117.889 133.349L134.674 151.533C136.52 153.538 139.078 154.74 141.8 154.882C141.993 154.882 142.186 154.882 142.379 154.882C142.887 154.881 143.394 154.844 143.897 154.771C145.587 154.525 147.191 153.869 148.568 152.861C149.946 151.852 151.055 150.521 151.8 148.985L185.748 79.0646C182.266 71.2998 176.47 66.4882 169.248 65.0576Z",fill:"#37474F"}),e.jsx("path",{d:"M193.287 44.9738C193.103 44.868 192.91 44.7668 192.717 44.6748C190.547 43.6235 188.049 43.4757 185.771 44.2639C183.493 45.0522 181.62 46.712 180.564 48.8792L142.899 126.463L140.755 124.163C140.137 123.487 139.417 122.911 138.621 122.456C137.499 121.812 132.724 119.048 131.951 118.601C130.067 117.512 127.855 117.133 125.717 117.536C123.578 117.938 121.654 119.093 120.295 120.793C118.936 122.492 118.231 124.623 118.308 126.797C118.386 128.972 119.241 131.047 120.718 132.645L137.503 150.824C138.133 151.507 138.863 152.089 139.67 152.549C140.765 153.17 145.521 155.93 146.303 156.381C147.385 157.008 148.584 157.404 149.826 157.546C151.067 157.689 152.325 157.573 153.52 157.208C154.716 156.842 155.823 156.234 156.772 155.421C157.722 154.609 158.494 153.609 159.04 152.485L203.601 60.7012C204.602 58.6326 204.785 56.2617 204.112 54.064C203.439 51.8663 201.96 50.0044 199.971 48.8516L193.287 44.9738Z",fill:"#11E5C5"}),e.jsx("path",{opacity:"0.15",d:"M193.287 44.9738C193.103 44.868 192.91 44.7668 192.717 44.6748C190.547 43.6235 188.049 43.4757 185.771 44.2639C183.493 45.0522 181.62 46.712 180.564 48.8792L142.899 126.463L140.755 124.163C140.137 123.487 139.417 122.911 138.621 122.456C137.499 121.812 132.724 119.048 131.951 118.601C130.067 117.512 127.855 117.133 125.717 117.536C123.578 117.938 121.654 119.093 120.295 120.793C118.936 122.492 118.231 124.623 118.308 126.797C118.386 128.972 119.241 131.047 120.718 132.645L137.503 150.824C138.133 151.507 138.863 152.089 139.67 152.549C140.765 153.17 145.521 155.93 146.303 156.381C147.385 157.008 148.584 157.404 149.826 157.546C151.067 157.689 152.325 157.573 153.52 157.208C154.716 156.842 155.823 156.234 156.772 155.421C157.722 154.609 158.494 153.609 159.04 152.485L203.601 60.7012C204.602 58.6326 204.785 56.2617 204.112 54.064C203.439 51.8663 201.96 50.0044 199.971 48.8516L193.287 44.9738Z",fill:"black"}),e.jsx("path",{opacity:"0.15",d:"M146.28 156.363C145.507 155.903 140.76 153.143 139.651 152.531C138.845 152.071 138.114 151.489 137.485 150.806L120.699 132.627C119.959 131.82 119.372 130.884 118.965 129.867L125.64 133.717C126.044 134.738 126.636 135.674 127.383 136.477L144.164 154.657C144.781 155.327 145.494 155.902 146.28 156.363Z",fill:"black"}),e.jsx("path",{opacity:"0.15",d:"M189.35 49.9368C188.473 50.7237 187.757 51.6736 187.243 52.7336L148.502 132.534L142.899 126.462L180.564 48.8788C181.077 47.8169 181.795 46.8666 182.675 46.082L189.35 49.9368Z",fill:"black"}),e.jsx("path",{d:"M199.396 48.5292C197.226 47.4804 194.729 47.3339 192.451 48.1219C190.174 48.9098 188.301 50.568 187.243 52.7336L148.502 132.534L140.76 124.144C139.103 122.461 136.856 121.489 134.495 121.434C132.134 121.378 129.845 122.244 128.111 123.847C126.377 125.451 125.335 127.666 125.206 130.024C125.077 132.382 125.871 134.698 127.42 136.481L144.201 154.665C145.205 155.752 146.46 156.577 147.856 157.069C149.252 157.561 150.746 157.705 152.21 157.488C153.674 157.271 155.063 156.701 156.257 155.826C157.45 154.951 158.412 153.797 159.059 152.466L203.619 60.6824C204.669 58.5105 204.814 56.0107 204.022 53.732C203.231 51.4533 201.567 49.582 199.396 48.5292Z",fill:"#11E5C5"}),e.jsx("path",{d:"M72.3258 57.4997C68.816 57.4997 66.4148 58.4197 63.9216 61.9617C61.6216 65.2185 55.3472 76.0745 55.3472 76.0745C55.3472 76.0745 50.7472 66.6353 50.2872 64.7539C49.8272 62.8725 49.8548 62.0353 50.2872 61.2165C50.9203 60.2487 51.3174 59.1458 51.4464 57.9965C51.6258 55.7333 52.1778 53.7967 51.6718 53.7323C50.2688 53.6541 50.2136 55.4573 49.4776 56.5199C49.3841 56.6225 49.2678 56.7016 49.138 56.7508C49.0082 56.8 48.8687 56.818 48.7307 56.8032C48.5927 56.7884 48.4602 56.7413 48.3438 56.6657C48.2274 56.5901 48.1304 56.4882 48.0608 56.3681C47.7526 55.7379 47.9182 54.7029 47.771 53.9577C47.8109 53.543 47.8769 53.1313 47.9688 52.7249C48.5002 52.8205 49.0428 52.836 49.5788 52.7709C50.186 53.7231 50.6 54.1233 51.4464 53.7369C51.5568 53.5621 51.083 52.3569 50.5264 51.4369C50.4428 51.2962 50.3074 51.1938 50.1492 51.1517C49.1287 50.8933 48.0638 50.8635 47.0304 51.0643C46.9523 51.0723 46.8766 51.096 46.8078 51.134C46.739 51.1719 46.6786 51.2233 46.6302 51.2851C46.2418 51.8541 45.9324 52.473 45.7102 53.1251C45.6504 53.3229 45.4664 53.3183 45.4204 53.1481C44.9604 50.9263 44.9604 47.7707 44.9604 46.2941C44.9604 45.1303 43.263 44.9463 43.2032 46.6115C43.1023 48.8458 43.1407 51.0842 43.3182 53.3137C43.3182 53.5161 43.1158 53.6127 43.033 53.3919C42.7386 52.6053 42.0164 50.2271 41.7128 46.1239C41.63 45.0199 39.8452 44.8405 39.8728 46.3907C39.9427 49.1391 40.3004 51.8726 40.94 54.5465C40.9952 54.7397 40.8158 54.9099 40.6824 54.6891C39.845 53.0754 39.176 51.3798 38.686 49.6291C38.3042 48.2951 36.524 48.6355 36.846 50.2961C37.4026 53.2723 38.2858 57.0351 39.606 59.7261C41.0136 62.6011 42.228 64.0409 42.9272 66.2995C43.6264 68.5581 46.5198 81.3507 49.6156 86.3371C52.0398 90.2471 54.8136 89.8837 57.799 87.8229C60.7844 85.7621 71.4518 70.8995 71.4518 70.8995L72.3258 57.4997Z",fill:"#9E6767"}),e.jsx("path",{d:"M55.3472 76.0699C55.3472 76.0699 56.8422 78.6045 57.0722 80.6331C57.4522 78.6634 57.0743 76.6229 56.0142 74.9199L55.3472 76.0699Z",fill:"#874C4C"}),e.jsx("path",{d:"M73.071 57.4998C71.2862 57.3158 69.0644 57.256 66.5896 58.8154C64.1148 60.3748 63.25 62.546 62.0494 64.4458C60.8488 66.3456 56.6996 73.0754 56.6996 73.0754C56.6996 73.0754 58.2222 79.4648 64.2758 80.7804L73.3424 68.48L73.071 57.4998Z",fill:"#455A64"}),e.jsx("path",{d:"M81.1992 169.845C81.6592 169.786 82.271 171.354 82.2802 171.865C82.2894 172.375 81.7742 173.475 81.098 174.505C80.1942 175.732 79.4449 177.065 78.867 178.475C78.3472 179.892 77.8688 180.821 76.4198 182.675C74.8098 184.74 71.0286 188.195 65.2878 186.695C63.8848 186.327 63.1856 185.886 62.675 185.375C62.451 185.149 62.2948 184.864 62.224 184.554C62.1533 184.243 62.1709 183.919 62.2748 183.618L81.1992 169.845Z",fill:"#263238"}),e.jsx("path",{d:"M69.92 168.051V168.102C69.8542 168.531 69.8667 168.969 69.9568 169.395C70.1146 170.661 70.0023 171.947 69.6273 173.167C69.2522 174.388 68.623 175.514 67.781 176.474C66.9813 177.309 66.0786 178.038 65.0946 178.645C62.1874 180.485 61.8746 181.741 62.284 183.618C63.2592 185.803 69.851 187.132 73.6414 183.88C75.2769 182.61 76.5271 180.911 77.2524 178.972C77.8025 177.583 78.4417 176.23 79.166 174.924C79.8974 173.544 81.2866 171.989 81.328 170.568C81.351 169.786 80.5782 168.332 79.8284 167.136C79.1384 166.037 78.4254 164.992 77.8044 165.112L77.9792 165.733C77.4594 166.271 76.7096 166.474 76.2588 167.113C75.6976 167.89 75.716 168.953 75.371 169.827C75.3597 169.872 75.3386 169.914 75.3092 169.95C75.2798 169.985 75.2427 170.014 75.2008 170.034C75.1522 170.042 75.1023 170.034 75.0584 170.012C75.0145 169.99 74.979 169.954 74.957 169.91C74.9194 169.819 74.9022 169.722 74.9064 169.625L74.865 168.286C74.8857 168.029 74.8175 167.772 74.6718 167.559C74.313 167.154 73.4298 167.2 72.9376 167.182C72.2751 167.187 71.6133 167.227 70.955 167.302C70.7268 167.279 70.4982 167.339 70.311 167.472C70.123 167.619 69.9862 167.822 69.92 168.051Z",fill:"#37474F"}),e.jsx("path",{d:"M60.1772 141.307C61.709 146.344 68.8712 163.782 69.299 164.831L70.725 168.29C71.6641 168.599 72.6702 168.642 73.6322 168.415C73.784 170.084 74.037 172.702 74.1336 174.022C74.1704 175.554 74.3038 177.449 73.9726 178.962C73.692 180.25 73.3654 181.603 73.1216 182.895C73.0158 183.466 72.91 184.041 72.8226 184.616C72.6742 185.218 72.7242 185.852 72.9652 186.424C73.1119 186.673 73.3056 186.892 73.5356 187.068C74.5573 187.87 75.8486 188.249 77.142 188.126C77.8259 188.093 78.4877 187.873 79.0556 187.491C80.1688 186.695 80.5598 185.31 81.1256 184.133C81.742 182.859 81.5442 182.716 81.5856 181.35C81.6224 180.393 81.8892 177.964 82.271 175.425C82.6528 172.886 84.2996 163.962 85.0908 155.07C85.4133 151.121 85.4133 147.151 85.0908 143.202C91.3744 126.131 94.1712 115.979 94.9946 110.312C95.8272 104.553 95.427 102.492 95.3212 99.1846L64.7634 99.9206C62.3162 115.717 58.121 134.554 60.1772 141.307Z",fill:"#9E6767"}),e.jsx("path",{d:"M59.6988 128.703C60.329 122.898 64.6714 100.583 64.6714 100.583H95.4546C95.4546 100.583 95.6524 104.866 95.5972 106.834C95.542 108.803 94.9072 112.396 93.8078 116.954C92.7084 121.513 88.6328 134.379 87.8278 136.274C87.0228 138.17 85.5278 143.667 85.5278 143.667C86.2822 153.989 84.318 163.253 82.846 175.568C82.846 175.568 82.4182 177.228 78.0574 176.902C73.8162 176.58 72.9606 175.016 72.9606 175.016L72.68 164.394C72.68 164.394 70.38 165.103 69 164.781C69 164.781 59.8874 142.282 59.4458 140.93C59.0042 139.577 59.0686 134.508 59.6988 128.703Z",fill:"#11E5C5"}),e.jsx("path",{opacity:"0.45",d:"M59.6988 128.703C60.329 122.898 64.6714 100.583 64.6714 100.583H95.4546C95.4546 100.583 95.6524 104.866 95.5972 106.834C95.542 108.803 94.9072 112.396 93.8078 116.954C92.7084 121.513 88.6328 134.379 87.8278 136.274C87.0228 138.17 85.5278 143.667 85.5278 143.667C86.2822 153.989 84.318 163.253 82.846 175.568C82.846 175.568 82.4182 177.228 78.0574 176.902C73.8162 176.58 72.9606 175.016 72.9606 175.016L72.68 164.394C72.68 164.394 70.38 165.103 69 164.781C69 164.781 59.8874 142.282 59.4458 140.93C59.0042 139.577 59.0686 134.508 59.6988 128.703Z",fill:"black"}),e.jsx("path",{opacity:"0.2",d:"M72.7582 115.129C68.3974 111.2 67.4268 108.072 67.4268 108.072C69.6192 110.542 72.2153 112.622 75.1042 114.222C75.1042 114.222 70.9642 136.082 71.2678 140.576C71.5714 145.07 72.68 164.395 72.68 164.395C72.68 164.579 69.7452 143.957 69.6578 142.315C69.46 137.968 72.7582 115.129 72.7582 115.129Z",fill:"black"}),e.jsx("path",{d:"M82.34 186.512C82.7678 186.636 82.7126 187.915 82.5194 188.393C82.0407 189.228 81.3627 189.931 80.546 190.44C79.3492 191.255 78.3509 192.329 77.625 193.582C76.4439 195.388 74.8817 196.915 73.048 198.053C70.6056 199.439 67.727 199.842 64.998 199.18C62.1092 198.361 61.8424 197.653 61.8654 196.563L82.34 186.512Z",fill:"#263238"}),e.jsx("path",{d:"M73.416 179.823C72.657 183.503 71.3368 186.208 68.2778 188.48C65.8398 190.293 64.0734 191.213 62.1276 192.827C61.3042 193.517 61.2352 194.985 61.8654 196.567C63.181 197.62 65.0486 198.228 67.5556 198.223C70.3616 198.223 71.438 197.722 73.048 196.622C73.8389 196.082 74.5753 195.465 75.2468 194.782C76.5946 193.43 77.5468 191.76 78.5036 190.688C79.4604 189.616 81.581 188.522 82.1836 187.229C82.5148 186.521 82.3768 184.878 82.156 183.48C81.9536 182.197 82.3446 179.943 81.7282 179.8L81.6408 180.72C81.5902 180.927 81.4614 181.033 81.029 181.18C80.6404 181.264 80.2394 181.275 79.8468 181.212C79.7073 181.162 79.5554 181.156 79.4126 181.197C79.2698 181.237 79.1433 181.321 79.051 181.438C78.637 181.925 78.5266 182.615 77.993 183.02C77.9585 183.05 77.9176 183.072 77.8734 183.084C77.8529 183.096 77.8296 183.102 77.8061 183.101C77.7825 183.1 77.7597 183.093 77.74 183.08C77.7257 183.058 77.7163 183.033 77.7124 183.006C77.7084 182.98 77.71 182.954 77.717 182.928L77.8688 181.548C77.8871 181.411 77.8871 181.271 77.8688 181.134C77.8399 181.006 77.7839 180.885 77.7046 180.781C77.6252 180.676 77.5244 180.589 77.4088 180.527C77.0214 180.301 76.6051 180.13 76.1714 180.016C75.7201 179.894 75.2579 179.815 74.7914 179.782C74.3336 179.723 73.8694 179.737 73.416 179.823Z",fill:"#455A64"}),e.jsx("path",{d:"M92.6762 58.8205C92.6762 58.8205 93.9412 60.5593 94.9762 64.1427C96.236 70.0278 96.8835 76.0275 96.9082 82.0459C96.9082 90.1741 95.8134 103.344 95.8134 103.344C86.3788 108.073 71.162 105.276 64.4644 100.662C64.7358 99.1993 64.9658 91.5081 65.4948 86.4343C65.849 77.7311 66.1434 73.1725 66.2032 69.2993C66.3274 61.5621 70.1776 57.5647 73.1032 57.5049L80.4908 57.6199L92.6762 58.8205Z",fill:"#11E5C5"}),e.jsx("path",{d:"M95.0038 100.956C93.6008 102.111 90.8638 104.328 90.344 105.446C89.7644 106.724 89.424 108.666 89.033 109.392C88.642 110.119 89.2308 110.487 90.0404 110.225C90.85 109.963 91.333 109.277 91.9586 107.603C92.5842 105.929 94.323 104.618 94.323 104.618L95.0038 100.956Z",fill:"#874C4C"}),e.jsx("path",{d:"M89.8794 116.012C90.2152 116.661 90.9972 116.665 91.7194 116.721C92.5999 116.821 93.4918 116.721 94.3276 116.426C95.332 116.136 96.213 115.523 96.8346 114.683C97.543 113.662 97.727 112.383 98.1318 111.21C98.9782 108.749 101.499 106.973 101.913 104.365C102.083 103.289 102.083 102.019 102.373 101.352C102.552 100.956 106.697 93.8217 108.178 90.7305C109.595 87.7589 110.658 86.3605 109.37 82.7909C108.082 79.2213 103.698 66.6587 100.593 62.2933C98.8356 59.8185 96.0434 59.1101 92.6578 58.8203C90.0818 65.5271 93.0764 72.4593 93.0764 72.4593L99.912 85.6061C99.912 85.6061 97.2624 94.6589 95.6064 99.6913C95.1464 101.071 94.2264 101.955 93.173 103.505C92.713 104.176 91.6734 105.345 91.3054 106.076C90.8454 106.996 90.8454 107.603 90.6154 108.905C90.2566 110.98 89.7 115.704 89.8794 116.012Z",fill:"#9E6767"}),e.jsx("path",{d:"M92.3128 58.7832C94.093 58.8522 96.6506 59.1558 98.1778 59.9286C99.705 60.7014 100.768 61.6536 102.525 65.1772C104.282 68.7008 106.853 75.5456 106.853 75.5456C106.853 75.5456 106.002 80.7114 97.8328 82.05L92.3128 71.8702C92.3128 71.8702 89.8518 65.5268 92.3128 58.7832Z",fill:"#455A64"}),e.jsx("path",{d:"M71.0884 42.3428C71.3298 42.7793 71.5388 43.2328 71.714 43.6998C71.9861 44.3098 72.3339 44.8832 72.749 45.4064C73.807 46.6254 75.2928 47.5178 76.6498 48.3826C77.4686 48.907 78.407 49.3992 79.4098 49.2566C80.4126 49.114 81.5304 49.3302 82.5654 49.4222L86.1856 49.7488L85.9832 53.553C85.9832 53.553 86.4432 52.5456 87.0458 51.3404C87.5702 50.3054 89.769 45.0568 89.7782 45.0338C90.8684 42.4348 92.161 38.9664 90.8592 36.234C90.5632 35.5612 90.0689 34.9947 89.4424 34.6102C89.5685 34.1901 89.6091 33.7491 89.562 33.313C89.4896 32.694 89.2793 32.099 88.9465 31.572C88.6138 31.045 88.167 30.5993 87.6392 30.2678C86.6089 29.5716 85.4476 29.0926 84.226 28.8602C82.6059 28.4875 80.948 28.3038 79.2856 28.3128C77.6567 28.3625 76.0349 28.5487 74.4372 28.8694C73.5459 29.034 72.6431 29.1279 71.737 29.15C71.3467 29.1756 70.9548 29.1571 70.5686 29.0948C70.0886 28.9514 69.6171 28.7809 69.1564 28.5842C69.1163 28.5674 69.0733 28.5587 69.0299 28.5587C68.9865 28.5587 68.9434 28.5674 68.9034 28.5842C68.8669 28.6085 68.836 28.6404 68.813 28.6777C68.79 28.715 68.7753 28.7569 68.77 28.8004C68.6504 29.3747 68.6554 29.968 68.7847 30.5401C68.9141 31.1123 69.1648 31.65 69.5198 32.117C69.3129 32.0888 69.1113 32.0299 68.9218 31.9422C68.7066 31.8426 68.4991 31.7273 68.3008 31.5972C67.9632 31.3709 67.6675 31.0876 67.4268 30.76C67.3936 30.7087 67.343 30.6711 67.2842 30.6542C67.1922 30.6542 67.1186 30.7186 67.0634 30.7922C66.8151 31.1614 66.6461 31.5781 66.5669 32.0159C66.4877 32.4538 66.5002 32.9032 66.6034 33.336C66.8063 34.2047 67.2167 35.0112 67.7994 35.6866C67.5151 36.1459 67.351 36.6694 67.322 37.2087C67.2931 37.7481 67.4003 38.2861 67.6338 38.7732C67.8384 39.2052 68.1136 39.6001 68.448 39.9416C68.862 40.3648 69.368 40.7098 69.7866 41.1054C70.2666 41.4665 70.7034 41.8817 71.0884 42.3428Z",fill:"#37474F"}),e.jsx("path",{d:"M82.1146 36.0043C82.1012 36.6912 82.1896 37.3764 82.3768 38.0375C82.5951 38.6182 82.9464 39.1396 83.4026 39.5601C83.9187 39.9979 84.3958 40.4796 84.8286 40.9999C85.2958 41.8097 85.5697 42.7164 85.629 43.6495C85.6316 43.9243 85.6958 44.195 85.8168 44.4418C85.9378 44.6885 86.1126 44.9051 86.3282 45.0755C87.3126 45.6873 87.9014 44.5051 88.4258 43.9255C89.102 43.2999 91.1122 42.5455 92.0414 44.6707C93.0028 46.8787 91.2272 49.8043 89.6126 50.2551C86.8296 51.0325 86.2224 49.1373 86.2224 49.1373L85.6888 59.0733C84.1202 62.0495 80.431 62.9971 78.0068 62.5233C75.9138 62.1139 74.7638 60.6465 76.7326 58.5213L76.8384 55.4945C76.8384 55.4945 74.3268 55.7935 73.117 55.5635C71.0976 55.1863 70.0994 53.4705 69.552 51.2579C68.6826 47.7021 68.2824 43.9623 69.3634 35.9537C69.8556 35.6823 71.8474 37.2325 74.8834 37.4395C77.3787 37.6153 79.8756 37.1198 82.1146 36.0043Z",fill:"#9E6767"}),e.jsx("path",{d:"M76.82 55.4847C76.82 55.4847 81.374 54.7211 82.984 53.9299C83.9288 53.4749 84.7143 52.7455 85.238 51.8369C84.9692 52.7544 84.5186 53.6085 83.9132 54.3485C82.708 55.7883 76.7786 56.6899 76.7786 56.6899L76.82 55.4847Z",fill:"#874C4C"}),e.jsx("path",{d:"M79.189 39.5598L81.3096 40.2084C81.3907 39.9187 81.3565 39.6089 81.2141 39.3439C81.0717 39.0789 80.8323 38.8793 80.546 38.787C80.4062 38.746 80.2595 38.7336 80.1147 38.7505C79.97 38.7674 79.8301 38.8133 79.7035 38.8854C79.5769 38.9575 79.4661 39.0544 79.3777 39.1703C79.2893 39.2861 79.2251 39.4186 79.189 39.5598Z",fill:"#263238"}),e.jsx("path",{d:"M78.453 49.6064L75.3296 50.6644C75.3904 50.8732 75.4925 51.0676 75.6299 51.2362C75.7673 51.4047 75.9371 51.544 76.1293 51.6457C76.3215 51.7473 76.5322 51.8094 76.7488 51.8281C76.9654 51.8468 77.1836 51.8218 77.3904 51.7546C77.8107 51.6031 78.156 51.2949 78.3541 50.8944C78.5522 50.494 78.5876 50.0324 78.453 49.6064Z",fill:"#874C4C"}),e.jsx("path",{d:"M78.2 50.3701C77.7923 50.3704 77.3963 50.5061 77.0741 50.7559C76.7518 51.0057 76.5217 51.3554 76.4198 51.7501C76.735 51.8537 77.0752 51.8537 77.3904 51.7501C77.6814 51.6472 77.9388 51.4669 78.1349 51.2286C78.3311 50.9903 78.4585 50.703 78.5036 50.3977C78.4034 50.3795 78.3018 50.3702 78.2 50.3701Z",fill:"#F28F8F"}),e.jsx("path",{d:"M69.7222 39.8959L71.8796 39.6153C71.8632 39.4756 71.819 39.3406 71.7497 39.2183C71.6803 39.096 71.5871 38.9888 71.4756 38.903C71.3642 38.8173 71.2367 38.7547 71.1006 38.719C70.9646 38.6834 70.8228 38.6753 70.6836 38.6953C70.3992 38.7322 70.1401 38.8778 69.9608 39.1017C69.7815 39.3256 69.696 39.6103 69.7222 39.8959Z",fill:"#263238"}),e.jsx("path",{d:"M82.984 40.8154L90.1002 43.2396C89.7015 43.2442 89.3091 43.3404 88.9534 43.5206C88.5977 43.7009 88.2881 43.9604 88.0486 44.2792L83.0116 42.3656L82.984 40.8154Z",fill:"#263238"}),e.jsx("path",{d:"M70.7848 43.5936C70.7767 43.7081 70.7916 43.8231 70.8286 43.9317C70.8656 44.0404 70.924 44.1405 71.0003 44.2262C71.0766 44.312 71.1693 44.3816 71.2729 44.4309C71.3765 44.4803 71.4889 44.5084 71.6036 44.5136C71.7178 44.5149 71.8311 44.4936 71.937 44.451C72.043 44.4084 72.1395 44.3454 72.2211 44.2655C72.3026 44.1856 72.3677 44.0905 72.4125 43.9855C72.4573 43.8804 72.481 43.7676 72.4822 43.6534C72.4903 43.539 72.4754 43.424 72.4384 43.3154C72.4014 43.2067 72.343 43.1066 72.2667 43.0209C72.1904 42.9351 72.0977 42.8655 71.9941 42.8162C71.8905 42.7668 71.778 42.7387 71.6634 42.7334C71.5492 42.7322 71.4359 42.7535 71.33 42.7961C71.224 42.8387 71.1275 42.9017 71.0459 42.9816C70.9643 43.0614 70.8993 43.1566 70.8545 43.2616C70.8097 43.3667 70.786 43.4795 70.7848 43.5936Z",fill:"#263238"}),e.jsx("path",{d:"M78.913 43.5939C78.914 43.7608 78.964 43.9238 79.0569 44.0625C79.1498 44.2012 79.2815 44.3095 79.4354 44.3739C79.5894 44.4383 79.7589 44.4561 79.9229 44.4249C80.0869 44.3937 80.2381 44.315 80.3577 44.1986C80.4773 44.0821 80.56 43.933 80.5955 43.7699C80.631 43.6068 80.6178 43.4369 80.5574 43.2813C80.4971 43.1256 80.3923 42.9912 80.2562 42.8946C80.12 42.7981 79.9584 42.7437 79.7916 42.7383C79.5618 42.7359 79.3404 42.8245 79.1757 42.9848C79.0111 43.1452 78.9166 43.3641 78.913 43.5939Z",fill:"#263238"}),e.jsx("path",{d:"M66.585 41.331C66.6371 41.703 66.797 42.0517 67.045 42.3338C67.1305 42.4388 67.1917 42.5613 67.2244 42.6926C67.39 43.378 67.5326 44.6752 67.8592 45.402C68.081 45.9878 68.4817 46.4889 69.0043 46.834C69.527 47.1792 70.1452 47.3509 70.771 47.3248C71.1043 47.3373 71.4379 47.3095 71.7646 47.242H71.8382C72.1218 47.1753 72.3944 47.0684 72.6478 46.9246L72.6938 46.8924L72.7628 46.851L72.8502 46.7912L72.9284 46.7268L73.0158 46.6578C73.0465 46.637 73.0743 46.6122 73.0986 46.5842C73.1542 46.534 73.2064 46.4802 73.255 46.4232C73.5265 46.1195 73.7457 45.7729 73.9036 45.3974C74.3268 44.4498 74.2164 43.125 74.9064 42.9686H74.9892H75.0812C76.0012 42.9686 75.9184 44.4268 76.4612 45.4572C77.004 46.4876 77.8412 47.495 79.8974 47.5226H80.1596C80.2301 47.5273 80.3007 47.5273 80.3712 47.5226C80.5368 47.5125 80.7014 47.4895 80.8634 47.4536L81.0152 47.4168C81.065 47.4058 81.1141 47.3919 81.1624 47.3754L81.259 47.3478C81.4517 47.28 81.6367 47.1921 81.811 47.0856C81.8751 47.0485 81.9366 47.007 81.995 46.9614C82.1092 46.8778 82.2155 46.7839 82.3124 46.6808C82.5747 46.4014 82.785 46.0774 82.9334 45.724C83.2508 45.011 83.3336 43.7138 83.49 43.0376C83.5174 42.8987 83.5705 42.7661 83.6464 42.6466C83.892 42.3773 84.0521 42.0411 84.1064 41.6806C84.1174 41.4959 84.0676 41.3127 83.9646 41.159C83.8616 41.0053 83.711 40.8896 83.536 40.8296L83.0346 40.7652C81.4246 40.5674 79.327 40.4846 78.0712 40.825C76.498 41.2528 75.9506 41.745 75.072 41.745C74.1934 41.745 73.7196 41.2022 72.2246 40.7146C71.0378 40.3282 69.0736 40.342 67.574 40.48L67.114 40.526C66.9504 40.5846 66.8103 40.6948 66.7148 40.84C66.6194 40.9853 66.5738 41.1576 66.585 41.331ZM76.9442 42.32C77.0684 42.1659 77.2256 42.0417 77.4042 41.9566C77.4287 41.9387 77.4549 41.9233 77.4824 41.9106H77.5284C77.5974 41.8738 77.671 41.837 77.7492 41.8048L77.9562 41.722C78.1758 41.6386 78.4 41.5679 78.6278 41.5104L78.8946 41.446C79.1246 41.4 79.3546 41.3632 79.5846 41.3402C79.6397 41.3359 79.6951 41.3359 79.7502 41.3402C81.2636 41.216 82.2112 41.5748 82.5562 41.883C82.9012 42.1912 82.7494 43.608 82.6068 44.321V44.3716C82.6068 44.3716 82.6068 44.4084 82.6068 44.4268C82.6068 44.5142 82.57 44.6108 82.5424 44.7166C82.5148 44.8224 82.5102 44.8316 82.4918 44.8914C82.4596 44.988 82.4274 45.0846 82.3906 45.1858C82.3772 45.2204 82.3618 45.2542 82.3446 45.287C82.3382 45.3074 82.3305 45.3274 82.3216 45.3468L82.2894 45.4158L82.248 45.4986L82.1974 45.5952C82.1974 45.6274 82.156 45.6596 82.133 45.6918C82.1143 45.7272 82.0927 45.7611 82.0686 45.793C81.8313 46.1285 81.5115 46.3971 81.14 46.5728C80.7684 46.7485 80.3579 46.8253 79.948 46.7958C79.5362 46.8183 79.1242 46.7537 78.739 46.6063C78.3538 46.4589 78.004 46.2319 77.7124 45.9402C77.3492 45.5327 77.0973 45.0384 76.981 44.505C76.7556 43.7 76.6498 42.7524 76.9442 42.32ZM68.0294 41.5794C68.1388 41.4822 68.2631 41.403 68.3974 41.3448H68.425L68.5906 41.2804L68.6918 41.2482H68.7746H68.8298H68.8528H68.9356C69.0414 41.2482 69.1564 41.2068 69.2852 41.1884H69.4738H70.0856C70.3064 41.1884 70.5456 41.2206 70.7848 41.2528C71.8658 41.4092 72.9974 41.9106 73.2918 42.3568C73.5862 42.803 73.5218 43.7368 73.3792 44.5142C73.3483 44.6956 73.3021 44.8741 73.2412 45.0478C73.2398 45.0616 73.2398 45.0755 73.2412 45.0892C73.2412 45.0892 73.2412 45.1214 73.2412 45.1398V45.1766L73.2136 45.241L73.1584 45.3698C73.1584 45.4066 73.1216 45.448 73.0986 45.4848C73.0994 45.4971 73.0994 45.5094 73.0986 45.5216L73.0526 45.5998L73.0112 45.6642C72.7658 46.0258 72.4258 46.3131 72.0284 46.4948C71.6309 46.6765 71.1912 46.7456 70.7572 46.6946C70.3644 46.6862 69.9782 46.592 69.6256 46.4186C68.5492 45.8758 68.2732 44.666 68.149 44.1186C67.919 43.2952 67.7074 41.883 68.0294 41.5748V41.5794Z",fill:"#263238"}),e.jsx("path",{d:"M75.3296 42.991L75.1686 48.9066L71.8704 47.9498L74.9478 42.9404C75.0773 42.928 75.2078 42.9453 75.3296 42.991Z",fill:"#874C4C"})]})},k=function(t){var n=t.setStep;return e.jsxs("div",{className:"relative flex sm:items-center justify-content w-full px-6 sm:px-12 pt-8 pb-[80px] overflow-hidden sm:flex-col",children:[e.jsxs("div",{className:"w-[345px] flex flex-col sm:flex-col-reverse items-center mx-auto overflow-hidden",children:[e.jsx(L,{className:"w-[230px] h-[230px] mb-[78px]"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(y,{className:"mb-5 sm:mb-2",children:"Vérifions votre identité"}),e.jsx(w,{children:"Pour réduire le risque de fraude, nous devons vérifier votre identité"})]})]}),e.jsx("div",{className:"hidden sm:flex w-[450px]",children:e.jsx("p",{className:"text-[#3C3C40B3] text-center text-[12px] font-semibold leading-[120%] mb-[18px]",children:"En cliquant sur commencer, j’accepte les conditions d’utilisation de Datakeen et je déclare avoir lu la déclaration de protection des données."})}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(v,{onClick:function(){n(1)},className:"w-full",children:"Commencer ma vérification"})}),e.jsx(x,{})]})]})},R=function(t){var n=t.children,r=t.className;return e.jsx("div",{className:" text-[#3C3C40] text-center text-sm font-medium leading-[120%] ".concat(r),children:n})};function M(e,[t,n]){return Math.min(n,Math.max(t,e))}function P(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function _(t,n=[]){let r=[];const i=()=>{const e=r.map((e=>o.createContext(e)));return function(n){const r=n?.[t]||e;return o.useMemo((()=>({[`__scope${t}`]:{...n,[t]:r}})),[n,r])}};return i.scopeName=t,[function(n,i){const a=o.createContext(i),s=r.length;r=[...r,i];const l=n=>{const{scope:r,children:i,...l}=n,c=r?.[t]?.[s]||a,u=o.useMemo((()=>l),Object.values(l));return e.jsx(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(e,r){const l=r?.[t]?.[s]||a,c=o.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},A(i,...n)]}function A(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return o.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function O(t){const n=T(t),r=o.forwardRef(((t,r)=>{const{children:i,...a}=t,s=o.Children.toArray(i),l=s.find(H);if(l){const t=l.props.children,i=s.map((e=>e===l?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e));return e.jsx(n,{...a,ref:r,children:o.isValidElement(t)?o.cloneElement(t,void 0,i):null})}return e.jsx(n,{...a,ref:r,children:i})}));return r.displayName=`${t}.Slot`,r}function T(e){const t=o.forwardRef(((e,t)=>{const{children:n,...r}=e;if(o.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==o.Fragment&&(i.ref=t?c(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var D=Symbol("radix.slottable");function H(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===D}var I=o.createContext(void 0);var V=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=O(`Primitive.${n}`),i=o.forwardRef(((t,o)=>{const{asChild:i,...a}=t,s=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(s,{...a,ref:o})}));return i.displayName=`Primitive.${n}`,{...t,[n]:i}}),{});function F(e){const t=o.useRef(e);return o.useEffect((()=>{t.current=e})),o.useMemo((()=>(...e)=>t.current?.(...e)),[])}var Z,W="dismissableLayer.update",B="dismissableLayer.pointerDownOutside",U="dismissableLayer.focusOutside",z=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$=o.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,f=o.useContext(z),[p,h]=o.useState(null),m=p?.ownerDocument??globalThis?.document,[,C]=o.useState({}),v=u(n,(e=>h(e))),g=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(x),w=p?g.indexOf(p):-1,b=f.layersWithOutsidePointerEventsDisabled.size>0,j=w>=y,E=function(e,t=globalThis?.document){const n=F(e),r=o.useRef(!1),i=o.useRef((()=>{}));return o.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){K(B,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...f.branches].some((e=>e.contains(t)));j&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())}),m),S=function(e,t=globalThis?.document){const n=F(e),r=o.useRef(!1);return o.useEffect((()=>{const e=e=>{if(e.target&&!r.current){K(U,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...f.branches].some((e=>e.contains(t)))||(s?.(e),l?.(e),e.defaultPrevented||c?.())}),m);return function(e,t=globalThis?.document){const n=F(e);o.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{w===f.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),m),o.useEffect((()=>{if(p)return r&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(Z=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),q(),()=>{r&&1===f.layersWithOutsidePointerEventsDisabled.size&&(m.body.style.pointerEvents=Z)}}),[p,m,r,f]),o.useEffect((()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),q())}),[p,f]),o.useEffect((()=>{const e=()=>C({});return document.addEventListener(W,e),()=>document.removeEventListener(W,e)}),[]),e.jsx(V.div,{...d,ref:v,style:{pointerEvents:b?j?"auto":"none":void 0,...t.style},onFocusCapture:P(t.onFocusCapture,S.onFocusCapture),onBlurCapture:P(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:P(t.onPointerDownCapture,E.onPointerDownCapture)})}));$.displayName="DismissableLayer";function q(){const e=new CustomEvent(W);document.dispatchEvent(e)}function K(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&i.flushSync((()=>e.dispatchEvent(t)))}(o,a):o.dispatchEvent(a)}o.forwardRef(((t,n)=>{const r=o.useContext(z),i=o.useRef(null),a=u(n,i);return o.useEffect((()=>{const e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.jsx(V.div,{...t,ref:a})})).displayName="DismissableLayerBranch";var Y=0;function X(){const 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 J="focusScope.autoFocusOnMount",G="focusScope.autoFocusOnUnmount",Q={bubbles:!1,cancelable:!0},ee=o.forwardRef(((t,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=o.useState(null),f=F(a),p=F(s),h=o.useRef(null),m=u(n,(e=>d(e))),C=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect((()=>{if(i){let e=function(e){if(C.paused||!c)return;const t=e.target;c.contains(t)?h.current=t:oe(h.current,{select:!0})},t=function(e){if(C.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||oe(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&oe(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[i,c,C.paused]),o.useEffect((()=>{if(c){ie.add(C);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(J,Q);c.addEventListener(J,f),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(oe(r,{select:t}),document.activeElement!==n)return}((e=te(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&oe(c))}return()=>{c.removeEventListener(J,f),setTimeout((()=>{const e=new CustomEvent(G,Q);c.addEventListener(G,p),c.dispatchEvent(e),e.defaultPrevented||oe(t??document.body,{select:!0}),c.removeEventListener(G,p),ie.remove(C)}),0)}}var e}),[c,f,p,C]);const v=o.useCallback((e=>{if(!r&&!i)return;if(C.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=te(e),n=ne(t,e),r=ne(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&oe(i,{select:!0})):(e.preventDefault(),r&&oe(o,{select:!0})):n===t&&e.preventDefault()}}),[r,i,C.paused]);return e.jsx(V.div,{tabIndex:-1,...l,ref:m,onKeyDown:v})}));function te(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 ne(e,t){for(const n of e)if(!re(n,{upTo:t}))return n}function re(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function oe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}ee.displayName="FocusScope";var ie=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ae(e,t),e.unshift(t)},remove(t){e=ae(e,t),e[0]?.resume()}}}();function ae(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var se=globalThis?.document?o.useLayoutEffect:()=>{},le=o[" useId ".trim().toString()]||(()=>{}),ce=0;function ue(e){const[t,n]=o.useState(le());return se((()=>{n((e=>e??String(ce++)))}),[e]),e||(t?`radix-${t}`:"")}const de=["top","right","bottom","left"],fe=Math.min,pe=Math.max,he=Math.round,me=Math.floor,Ce=e=>({x:e,y:e}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},ge={start:"end",end:"start"};function xe(e,t,n){return pe(e,fe(t,n))}function ye(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function je(e){return"x"===e?"y":"x"}function Ee(e){return"y"===e?"height":"width"}function Se(e){return["top","bottom"].includes(we(e))?"y":"x"}function Ne(e){return je(Se(e))}function Le(e){return e.replace(/start|end/g,(e=>ge[e]))}function ke(e){return e.replace(/left|right|bottom|top/g,(e=>ve[e]))}function Re(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Me(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Pe(e,t,n){let{reference:r,floating:o}=e;const i=Se(t),a=Ne(t),s=Ee(a),l=we(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.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-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(be(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function _e(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=ye(t,e),h=Re(p),m=s[f?"floating"===d?"reference":"floating":d],C=Me(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},y=Me(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:g,strategy:l}):v);return{top:(C.top-y.top+h.top)/x.y,bottom:(y.bottom-C.bottom+h.bottom)/x.y,left:(C.left-y.left+h.left)/x.x,right:(y.right-C.right+h.right)/x.x}}function Ae(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Oe(e){return de.some((t=>e[t]>=0))}function Te(){return"undefined"!=typeof window}function De(e){return Ve(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ie(e){var t;return null==(t=(Ve(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ve(e){return!!Te()&&(e instanceof Node||e instanceof He(e).Node)}function Fe(e){return!!Te()&&(e instanceof Element||e instanceof He(e).Element)}function Ze(e){return!!Te()&&(e instanceof HTMLElement||e instanceof He(e).HTMLElement)}function We(e){return!(!Te()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof He(e).ShadowRoot)}function Be(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ue(e){return["table","td","th"].includes(De(e))}function ze(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function $e(e){const t=qe(),n=Fe(e)?Ye(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function qe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ke(e){return["html","body","#document"].includes(De(e))}function Ye(e){return He(e).getComputedStyle(e)}function Xe(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Je(e){if("html"===De(e))return e;const t=e.assignedSlot||e.parentNode||We(e)&&e.host||Ie(e);return We(t)?t.host:t}function Ge(e){const t=Je(e);return Ke(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&Be(t)?t:Ge(t)}function Qe(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Ge(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=He(o);if(i){const e=et(a);return t.concat(a,a.visualViewport||[],Be(o)?o:[],e&&n?Qe(e):[])}return t.concat(o,Qe(o,[],n))}function et(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tt(e){const t=Ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=he(n)!==i||he(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function nt(e){return Fe(e)?e:e.contextElement}function rt(e){const t=nt(e);if(!Ze(t))return Ce(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=tt(t);let a=(i?he(n.width):n.width)/r,s=(i?he(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ot=Ce(0);function it(e){const t=He(e);return qe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ot}function at(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=nt(e);let a=Ce(1);t&&(r?Fe(r)&&(a=rt(r)):a=rt(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==He(e))&&t}(i,n,r)?it(i):Ce(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=He(i),t=r&&Fe(r)?He(r):r;let n=e,o=et(n);for(;o&&r&&t!==n;){const e=rt(o),t=o.getBoundingClientRect(),r=Ye(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=He(o),o=et(n)}}return Me({width:u,height:d,x:l,y:c})}function st(e,t){const n=Xe(e).scrollLeft;return t?t.left+n:at(Ie(e)).left+n}function lt(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:st(e,r)),y:r.top+t.scrollTop}}function ct(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=He(e),r=Ie(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=qe();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Ie(e),n=Xe(e),r=e.ownerDocument.body,o=pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+st(e);const s=-n.scrollTop;return"rtl"===Ye(r).direction&&(a+=pe(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Ie(e));else if(Fe(t))r=function(e,t){const n=at(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ze(e)?rt(e):Ce(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=it(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Me(r)}function ut(e,t){const n=Je(e);return!(n===t||!Fe(n)||Ke(n))&&("fixed"===Ye(n).position||ut(n,t))}function dt(e,t,n){const r=Ze(t),o=Ie(t),i="fixed"===n,a=at(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ce(0);function c(){l.x=st(o)}if(r||!r&&!i)if(("body"!==De(t)||Be(o))&&(s=Xe(t)),r){const e=at(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?Ce(0):lt(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function ft(e){return"static"===Ye(e).position}function pt(e,t){if(!Ze(e)||"fixed"===Ye(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function ht(e,t){const n=He(e);if(ze(e))return n;if(!Ze(e)){let t=Je(e);for(;t&&!Ke(t);){if(Fe(t)&&!ft(t))return t;t=Je(t)}return n}let r=pt(e,t);for(;r&&Ue(r)&&ft(r);)r=pt(r,t);return r&&Ke(r)&&ft(r)&&!$e(r)?n:r||function(e){let t=Je(e);for(;Ze(t)&&!Ke(t);){if($e(t))return t;if(ze(t))return null;t=Je(t)}return null}(e)||n}const mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Ie(r),s=!!t&&ze(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ce(1);const u=Ce(0),d=Ze(r);if((d||!d&&!i)&&(("body"!==De(r)||Be(a))&&(l=Xe(r)),Ze(r))){const e=at(r);c=rt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?Ce(0):lt(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Ie,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ze(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Qe(e,[],!1).filter((e=>Fe(e)&&"body"!==De(e))),o=null;const i="fixed"===Ye(e).position;let a=i?Je(e):e;for(;Fe(a)&&!Ke(a);){const t=Ye(a),n=$e(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Be(a)&&!n&&ut(e,a))?r=r.filter((e=>e!==a)):o=t,a=Je(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=ct(t,n,o);return e.top=pe(r.top,e.top),e.right=fe(r.right,e.right),e.bottom=fe(r.bottom,e.bottom),e.left=pe(r.left,e.left),e}),ct(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ht,getElementRects:async function(e){const t=this.getOffsetParent||ht,n=this.getDimensions,r=await n(e.floating);return{reference:dt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=tt(e);return{width:t,height:n}},getScale:rt,isElement:Fe,isRTL:function(e){return"rtl"===Ye(e).direction}};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=nt(e),u=o||i?[...c?Qe(c):[],...Qe(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Ie(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-me(d)+"px "+-me(o.clientWidth-(u+f))+"px "+-me(o.clientHeight-(d+p))+"px "+-me(u)+"px",threshold:pe(0,fe(1,l))||1};let m=!0;function C(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Ct(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(C,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(C,h)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?at(e):null;return l&&function t(){const r=at(e);m&&!Ct(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const gt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=we(n),s=be(n),l="y"===Se(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=ye(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},xt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ye(e,t),c={x:n,y:r},u=await _e(t,l),d=Se(we(o)),f=je(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=xe(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=xe(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},yt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...C}=ye(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=we(o),g=Se(s),x=we(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(x||!m?[ke(s)]:function(e){const t=ke(e);return[Le(e),t,Le(t)]}(s)),b="none"!==h;!f&&b&&w.push(...function(e,t,n,r){const o=be(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(we(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Le)))),i}(s,m,h,y));const j=[s,...w],E=await _e(t,C),S=[];let N=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(E[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=be(e),o=Ne(e),i=Ee(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ke(a)),[a,ke(a)]}(o,a,y);S.push(E[e[0]],E[e[1]])}if(N=[...N,{placement:o,overflows:S}],!S.every((e=>e<=0))){var L,k;const e=((null==(L=i.flip)?void 0:L.index)||0)+1,t=j[e];if(t){var R;const n="alignment"===d&&g!==Se(t),r=(null==(R=N[0])?void 0:R.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(k=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var M;const e=null==(M=N.filter((e=>{if(b){const t=Se(e.placement);return t===g||"y"===t}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])?void 0:M[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},wt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=ye(e,t),u=await _e(t,c),d=we(o),f=be(o),p="y"===Se(o),{width:h,height:m}=i.floating;let C,v;"top"===d||"bottom"===d?(C=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,C="end"===f?"top":"bottom");const g=m-u.top-u.bottom,x=h-u.left-u.right,y=fe(m-u[C],g),w=fe(h-u[v],x),b=!t.middlewareData.shift;let j=y,E=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(j=g),b&&!f){const e=pe(u.left,0),t=pe(u.right,0),n=pe(u.top,0),r=pe(u.bottom,0);p?E=h-2*(0!==e||0!==t?e+t:pe(u.left,u.right)):j=m-2*(0!==n||0!==r?n+r:pe(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:j});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},bt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ye(e,t);switch(r){case"referenceHidden":{const e=Ae(await _e(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Oe(e)}}}case"escaped":{const e=Ae(await _e(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Oe(e)}}}default:return{}}}}},jt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ye(e,t)||{};if(null==c)return{};const d=Re(u),f={x:n,y:r},p=Ne(o),h=Ee(p),m=await a.getDimensions(c),C="y"===p,v=C?"top":"left",g=C?"bottom":"right",x=C?"clientHeight":"clientWidth",y=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=b?b[x]:0;j&&await(null==a.isElement?void 0:a.isElement(b))||(j=s.floating[x]||i.floating[h]);const E=y/2-w/2,S=j/2-m[h]/2-1,N=fe(d[v],S),L=fe(d[g],S),k=N,R=j-m[h]-L,M=j/2-m[h]/2+E,P=xe(k,M,R),_=!l.arrow&&null!=be(o)&&M!==P&&i.reference[h]/2-(M<k?N:L)-m[h]/2<0,A=_?M<k?M-k:M-R:0;return{[p]:f[p]+A,data:{[p]:P,centerOffset:M-P-A,..._&&{alignmentOffset:A}},reset:_}}}),Et=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=ye(e,t),u={x:n,y:r},d=Se(o),f=je(d);let p=u[f],h=u[d];const m=ye(s,t),C="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+C.mainAxis,n=i.reference[f]+i.reference[e]-C.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,g;const e="y"===f?"width":"height",t=["top","left"].includes(we(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:C.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?C.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},St=(e,t,n)=>{const r=new Map,o={platform:mt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Pe(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:C,y:v,data:g,reset:x}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=C?C:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...g}},x&&h<=50&&(h++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Pe(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Nt="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function Lt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Lt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Lt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function kt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){const n=kt(e);return Math.round(t*n)/n}function Mt(e){const t=o.useRef(e);return Nt((()=>{t.current=e})),t}const Pt=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?jt({element:n.current,padding:r}).fn(t):{}:n?jt({element:n,padding:r}).fn(t):{};var o}}),_t=(e,t)=>({...gt(e),options:[e,t]}),At=(e,t)=>({...xt(e),options:[e,t]}),Ot=(e,t)=>({...Et(e),options:[e,t]}),Tt=(e,t)=>({...yt(e),options:[e,t]}),Dt=(e,t)=>({...wt(e),options:[e,t]}),Ht=(e,t)=>({...bt(e),options:[e,t]}),It=(e,t)=>({...Pt(e),options:[e,t]});var Vt=o.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...a}=t;return e.jsx(V.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Vt.displayName="Arrow";var Ft=Vt;function Zt(e){const[t,n]=o.useState(void 0);return se((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var Wt="Popper",[Bt,Ut]=_(Wt),[zt,$t]=Bt(Wt),qt=t=>{const{__scopePopper:n,children:r}=t,[i,a]=o.useState(null);return e.jsx(zt,{scope:n,anchor:i,onAnchorChange:a,children:r})};qt.displayName=Wt;var Kt="PopperAnchor",Yt=o.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:i,...a}=t,s=$t(Kt,r),l=o.useRef(null),c=u(n,l);return o.useEffect((()=>{s.onAnchorChange(i?.current||l.current)})),i?null:e.jsx(V.div,{...a,ref:c})}));Yt.displayName=Kt;var Xt="PopperContent",[Jt,Gt]=Bt(Xt),Qt=o.forwardRef(((t,n)=>{const{__scopePopper:r,side:a="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:C=!1,updatePositionStrategy:v="optimized",onPlaced:g,...x}=t,y=$t(Xt,r),[w,b]=o.useState(null),j=u(n,(e=>b(e))),[E,S]=o.useState(null),N=Zt(E),L=N?.width??0,k=N?.height??0,R=a+("center"!==l?"-"+l:""),M="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},P=Array.isArray(p)?p:[p],_=P.length>0,A={padding:M,boundary:P.filter(rn),altBoundary:_},{refs:O,floatingStyles:T,placement:D,isPositioned:H,middlewareData:I}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=o.useState(r);Lt(h,r)||m(r);const[C,v]=o.useState(null),[g,x]=o.useState(null),y=o.useCallback((e=>{e!==E.current&&(E.current=e,v(e))}),[]),w=o.useCallback((e=>{e!==S.current&&(S.current=e,x(e))}),[]),b=s||C,j=l||g,E=o.useRef(null),S=o.useRef(null),N=o.useRef(f),L=null!=u,k=Mt(u),R=Mt(a),M=Mt(d),P=o.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:h};R.current&&(e.platform=R.current),St(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==M.current};_.current&&!Lt(N.current,t)&&(N.current=t,i.flushSync((()=>{p(t)})))}))}),[h,t,n,R,M]);Nt((()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const _=o.useRef(!1);Nt((()=>(_.current=!0,()=>{_.current=!1})),[]),Nt((()=>{if(b&&(E.current=b),j&&(S.current=j),b&&j){if(k.current)return k.current(b,j,P);P()}}),[b,j,P,k,L]);const A=o.useMemo((()=>({reference:E,floating:S,setReference:y,setFloating:w})),[y,w]),O=o.useMemo((()=>({reference:b,floating:j})),[b,j]),T=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!O.floating)return e;const t=Rt(O.floating,f.x),r=Rt(O.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...kt(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,O.floating,f.x,f.y]);return o.useMemo((()=>({...f,update:P,refs:A,elements:O,floatingStyles:T})),[f,P,A,O,T])}({strategy:"fixed",placement:R,whileElementsMounted:(...e)=>vt(...e,{animationFrame:"always"===v}),elements:{reference:y.anchor},middleware:[_t({mainAxis:s+k,alignmentAxis:c}),f&&At({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?Ot():void 0,...A}),f&&Tt({...A}),Dt({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&It({element:E,padding:d}),on({arrowWidth:L,arrowHeight:k}),C&&Ht({strategy:"referenceHidden",...A})]}),[Z,W]=an(D),B=F(g);se((()=>{H&&B?.()}),[H,B]);const U=I.arrow?.x,z=I.arrow?.y,$=0!==I.arrow?.centerOffset,[q,K]=o.useState();return se((()=>{w&&K(window.getComputedStyle(w).zIndex)}),[w]),e.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:H?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:q,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(Jt,{scope:r,placedSide:Z,onArrowChange:S,arrowX:U,arrowY:z,shouldHideArrow:$,children:e.jsx(V.div,{"data-side":Z,"data-align":W,...x,ref:j,style:{...x.style,animation:H?void 0:"none"}})})})}));Qt.displayName=Xt;var en="PopperArrow",tn={top:"bottom",right:"left",bottom:"top",left:"right"},nn=o.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=Gt(en,r),a=tn[i.placedSide];return e.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e.jsx(Ft,{...o,ref:n,style:{...o.style,display:"block"}})})}));function rn(e){return null!==e}nn.displayName=en;var on=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=an(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=i?u:`${d}px`,h=-s+"px"):"top"===l?(p=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",h=i?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function an(e){const[t,n="center"]=e.split("-");return[t,n]}var sn=qt,ln=Yt,cn=Qt,un=nn,dn=o.forwardRef(((t,r)=>{const{container:i,...a}=t,[s,l]=o.useState(!1);se((()=>l(!0)),[]);const c=i||s&&globalThis?.document?.body;return c?n.createPortal(e.jsx(V.div,{...a,ref:r}),c):null}));dn.displayName="Portal";var fn=o[" useInsertionEffect ".trim().toString()]||se;function pn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return fn((()=>{a.current=t}),[t]),o.useEffect((()=>{i.current!==n&&(a.current?.(n),i.current=n)}),[n,i]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:i;{const t=o.useRef(void 0!==e);o.useEffect((()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${r} 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.`)}t.current=l}),[l,r])}const u=o.useCallback((t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)}),[l,e,a,s]);return[c,u]}function hn(e){const t=o.useRef({value:e,previous:e});return o.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}var mn=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"});o.forwardRef(((t,n)=>e.jsx(V.span,{...t,ref:n,style:{...mn,...t.style}}))).displayName="VisuallyHidden";var Cn=new WeakMap,vn=new WeakMap,gn={},xn=0,yn=function(e){return e&&(e.host||yn(e.parentNode))},wn=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=yn(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);gn[n]||(gn[n]=new WeakMap);var i=gn[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(Cn.get(e)||0)+1,c=(i.get(e)||0)+1;Cn.set(e,l),i.set(e,c),a.push(e),1===l&&o&&vn.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),xn++,function(){a.forEach((function(e){var t=Cn.get(e)-1,o=i.get(e)-1;Cn.set(e,t),i.set(e,o),t||(vn.has(e)||e.removeAttribute(r),vn.delete(e)),o||e.removeAttribute(n)})),--xn||(Cn=new WeakMap,Cn=new WeakMap,vn=new WeakMap,gn={})}},bn=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),wn(r,o,n,"aria-hidden")):function(){return null}},jn="right-scroll-bar-position",En="width-before-scroll-bar";function Sn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Nn="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,Ln=new WeakMap;function kn(e,n){var r,o,i,a=(r=null,o=function(t){return e.forEach((function(e){return Sn(e,t)}))},(i=t.useState((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return Nn((function(){var t=Ln.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach((function(e){r.has(e)||Sn(e,null)})),r.forEach((function(e){n.has(e)||Sn(e,o)}))}Ln.set(a,e)}),[e]),a}function Rn(e){return e}var Mn=function(e){var t=e.sideCar,n=s(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return o.createElement(r,a({},n))};Mn.isSideCarExport=!0;var Pn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Rn);var n=[],r=!1;return{read:function(){if(r)throw new 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 o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},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 o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=a({async:!0,ssr:!1},e),t}(),_n=function(){},An=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:_n,onWheelCapture:_n,onTouchMoveCapture:_n}),i=r[0],l=r[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,m=e.sideCar,C=e.noRelative,v=e.noIsolation,g=e.inert,x=e.allowPinchZoom,y=e.as,w=void 0===y?"div":y,b=e.gapMode,j=s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,S=kn([n,t]),N=a(a({},j),i);return o.createElement(o.Fragment,null,p&&o.createElement(E,{sideCar:Pn,removeScrollBar:f,shards:h,noRelative:C,noIsolation:v,inert:g,setCallbacks:l,allowPinchZoom:!!x,lockRef:n,gapMode:b}),c?o.cloneElement(o.Children.only(u),a(a({},N),{ref:S})):o.createElement(w,a({},N,{className:d,ref:S}),u))}));An.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},An.classNames={fullWidth:En,zeroRight:jn};function On(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Tn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=On())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dn=function(){var e,t=(e=Tn(),function(t,n){o.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Hn={left:0,top:0,right:0,gap:0},In=function(e){return parseInt(e||"",10)||0},Vn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Hn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[In(n),In(r),In(o)]}(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])}},Fn=Dn(),Zn="data-scroll-locked",Wn=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Zn,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(jn," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(En," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(jn," .").concat(jn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(En," .").concat(En," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Zn,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Bn=function(){var e=parseInt(document.body.getAttribute(Zn)||"0",10);return isFinite(e)?e:0},Un=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;o.useEffect((function(){return document.body.setAttribute(Zn,(Bn()+1).toString()),function(){var e=Bn()-1;e<=0?document.body.removeAttribute(Zn):document.body.setAttribute(Zn,e.toString())}}),[]);var a=o.useMemo((function(){return Vn(i)}),[i]);return o.createElement(Fn,{styles:Wn(a,!t,i,n?"":"!important")})},zn=!1;if("undefined"!=typeof window)try{var $n=Object.defineProperty({},"passive",{get:function(){return zn=!0,!0}});window.addEventListener("test",$n,$n),window.removeEventListener("test",$n,$n)}catch(e){zn=!1}var qn=!!zn&&{passive:!1},Kn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Yn=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Xn(e,r)){var o=Jn(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xn=function(e,t){return"v"===e?function(e){return Kn(e,"overflowY")}(t):function(e){return Kn(e,"overflowX")}(t)},Jn=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Qn=function(e){return[e.deltaX,e.deltaY]},er=function(e){return e&&"current"in e?e.current:e},tr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},nr=0,rr=[];function or(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ir,ar=(ir=function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(nr++)[0],a=o.useState(Dn)[0],s=o.useRef(e);o.useEffect((function(){s.current=e}),[e]),o.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(er),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var l=o.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var o,i=Gn(e),a=n.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Yn(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Yn(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var f=Jn(e,a),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Xn(e,a)&&(u+=h,d+=p),a=a.parentNode.host||a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)}),[]),c=o.useCallback((function(e){var n=e;if(rr.length&&rr[rr.length-1]===a){var r="deltaY"in n?Qn(n):Gn(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(s.current.shards||[]).map(er).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?l(n,i[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=o.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:or(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=o.useCallback((function(e){n.current=Gn(e),r.current=void 0}),[]),f=o.useCallback((function(t){u(t.type,Qn(t),t.target,l(t,e.lockRef.current))}),[]),p=o.useCallback((function(t){u(t.type,Gn(t),t.target,l(t,e.lockRef.current))}),[]);o.useEffect((function(){return rr.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,qn),document.addEventListener("touchmove",c,qn),document.addEventListener("touchstart",d,qn),function(){rr=rr.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,qn),document.removeEventListener("touchmove",c,qn),document.removeEventListener("touchstart",d,qn)}}),[]);var h=e.removeScrollBar,m=e.inert;return o.createElement(o.Fragment,null,m?o.createElement(a,{styles:tr(i)}):null,h?o.createElement(Un,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Pn.useMedium(ir),Mn),sr=o.forwardRef((function(e,t){return o.createElement(An,a({},e,{ref:t,sideCar:ar}))}));sr.classNames=An.classNames;var lr=[" ","Enter","ArrowUp","ArrowDown"],cr=[" ","Enter"],ur="Select",[dr,fr,pr]=function(n){const r=n+"CollectionProvider",[o,i]=_(r),[a,s]=o(r,{collectionRef:{current:null},itemMap:new Map}),l=n=>{const{scope:r,children:o}=n,i=t.useRef(null),s=t.useRef(new Map).current;return e.jsx(a,{scope:r,itemMap:s,collectionRef:i,children:o})};l.displayName=r;const c=n+"CollectionSlot",d=O(c),f=t.forwardRef(((t,n)=>{const{scope:r,children:o}=t,i=u(n,s(c,r).collectionRef);return e.jsx(d,{ref:i,children:o})}));f.displayName=c;const p=n+"CollectionItemSlot",h="data-radix-collection-item",m=O(p),C=t.forwardRef(((n,r)=>{const{scope:o,children:i,...a}=n,l=t.useRef(null),c=u(r,l),d=s(p,o);return t.useEffect((()=>(d.itemMap.set(l,{ref:l,...a}),()=>{d.itemMap.delete(l)}))),e.jsx(m,{[h]:"",ref:c,children:i})}));return C.displayName=p,[{Provider:l,Slot:f,ItemSlot:C},function(e){const r=s(n+"CollectionConsumer",e);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},i]}(ur),[hr,mr]=_(ur,[pr,Ut]),Cr=Ut(),[vr,gr]=hr(ur),[xr,yr]=hr(ur),wr=t=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:a,onOpenChange:s,value:l,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:h,required:m,form:C}=t,v=Cr(n),[g,x]=o.useState(null),[y,w]=o.useState(null),[b,j]=o.useState(!1),E=function(e){const t=o.useContext(I);return e||t||"ltr"}(d),[S,N]=pn({prop:i,defaultProp:a??!1,onChange:s,caller:ur}),[L,k]=pn({prop:l,defaultProp:c,onChange:u,caller:ur}),R=o.useRef(null),M=!g||(C||!!g.closest("form")),[P,_]=o.useState(new Set),A=Array.from(P).map((e=>e.props.value)).join(";");return e.jsx(sn,{...v,children:e.jsxs(vr,{required:m,scope:n,trigger:g,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:b,onValueNodeHasChildrenChange:j,contentId:ue(),value:L,onValueChange:k,open:S,onOpenChange:N,dir:E,triggerPointerDownPosRef:R,disabled:h,children:[e.jsx(dr.Provider,{scope:n,children:e.jsx(xr,{scope:t.__scopeSelect,onNativeOptionAdd:o.useCallback((e=>{_((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:o.useCallback((e=>{_((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),M?e.jsxs(ro,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:L,onChange:e=>k(e.target.value),disabled:h,form:C,children:[void 0===L?e.jsx("option",{value:""}):null,Array.from(P)]},A):null]})})};wr.displayName=ur;var br="SelectTrigger",jr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:i=!1,...a}=t,s=Cr(r),l=gr(br,r),c=l.disabled||i,d=u(n,l.onTriggerChange),f=fr(r),p=o.useRef("touch"),[h,m,C]=io((e=>{const t=f().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=ao(t,e,n);void 0!==r&&l.onValueChange(r.value)})),v=e=>{c||(l.onOpenChange(!0),C()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e.jsx(ln,{asChild:!0,...s,children:e.jsx(V.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":oo(l.value)?"":void 0,...a,ref:d,onClick:P(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&v(e)})),onPointerDown:P(a.onPointerDown,(e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(v(e),e.preventDefault())})),onKeyDown:P(a.onKeyDown,(e=>{const t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||lr.includes(e.key)&&(v(),e.preventDefault())}))})})}));jr.displayName=br;var Er="SelectValue",Sr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:i,children:a,placeholder:s="",...l}=t,c=gr(Er,r),{onValueNodeHasChildrenChange:d}=c,f=void 0!==a,p=u(n,c.onValueNodeChange);return se((()=>{d(f)}),[d,f]),e.jsx(V.span,{...l,ref:p,style:{pointerEvents:"none"},children:oo(c.value)?e.jsx(e.Fragment,{children:s}):a})}));Sr.displayName=Er;var Nr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,children:o,...i}=t;return e.jsx(V.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})}));Nr.displayName="SelectIcon";var Lr=t=>e.jsx(dn,{asChild:!0,...t});Lr.displayName="SelectPortal";var kr="SelectContent",Rr=o.forwardRef(((t,n)=>{const r=gr(kr,t.__scopeSelect),[a,s]=o.useState();if(se((()=>{s(new DocumentFragment)}),[]),!r.open){const n=a;return n?i.createPortal(e.jsx(Pr,{scope:t.__scopeSelect,children:e.jsx(dr.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),n):null}return e.jsx(Or,{...t,ref:n})}));Rr.displayName=kr;var Mr=10,[Pr,_r]=hr(kr),Ar=O("SelectContent.RemoveScroll"),Or=o.forwardRef(((t,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:s,onPointerDownOutside:l,side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:C,sticky:v,hideWhenDetached:g,avoidCollisions:x,...y}=t,w=gr(kr,r),[b,j]=o.useState(null),[E,S]=o.useState(null),N=u(n,(e=>j(e))),[L,k]=o.useState(null),[R,M]=o.useState(null),_=fr(r),[A,O]=o.useState(!1),T=o.useRef(!1);o.useEffect((()=>{if(b)return bn(b)}),[b]),o.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??X()),document.body.insertAdjacentElement("beforeend",e[1]??X()),Y++,()=>{1===Y&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Y--}}),[]);const D=o.useCallback((e=>{const[t,...n]=_().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&E&&(E.scrollTop=0),n===r&&E&&(E.scrollTop=E.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[_,E]),H=o.useCallback((()=>D([L,b])),[D,L,b]);o.useEffect((()=>{A&&H()}),[A,H]);const{onOpenChange:I,triggerPointerDownPosRef:V}=w;o.useEffect((()=>{if(b){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(V.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():b.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[b,I,V]),o.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[F,Z]=io((e=>{const t=_().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=ao(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),W=o.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&(k(e),r&&(T.current=!0))}),[w.value]),B=o.useCallback((()=>b?.focus()),[b]),U=o.useCallback(((e,t,n)=>{const r=!T.current&&!n;(void 0!==w.value&&w.value===t||r)&&M(e)}),[w.value]),z="popper"===i?Dr:Tr,q=z===Dr?{side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:m,collisionPadding:C,sticky:v,hideWhenDetached:g,avoidCollisions:x}:{};return e.jsx(Pr,{scope:r,content:b,viewport:E,onViewportChange:S,itemRefCallback:W,selectedItem:L,onItemLeave:B,itemTextRefCallback:U,focusSelectedItem:H,selectedItemText:R,position:i,isPositioned:A,searchRef:F,children:e.jsx(sr,{as:Ar,allowPinchZoom:!0,children:e.jsx(ee,{asChild:!0,trapped:w.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:P(a,(e=>{w.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:e.jsx($,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:e.jsx(z,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:e=>e.preventDefault(),...y,...q,onPlaced:()=>O(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:P(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>D(t))),e.preventDefault()}}))})})})})})}));Or.displayName="SelectContentImpl";var Tr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:i,...a}=t,s=gr(kr,r),l=_r(kr,r),[c,d]=o.useState(null),[f,p]=o.useState(null),h=u(n,(e=>p(e))),m=fr(r),C=o.useRef(!1),v=o.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:w}=l,b=o.useCallback((()=>{if(s.trigger&&s.valueNode&&c&&f&&g&&x&&y){const e=s.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==s.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),u=window.innerWidth-Mr,d=M(i,[Mr,Math.max(Mr,u-l)]);c.style.minWidth=s+"px",c.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),u=window.innerWidth-Mr,d=M(i,[Mr,Math.max(Mr,u-l)]);c.style.minWidth=s+"px",c.style.right=d+"px"}const o=m(),a=window.innerHeight-2*Mr,l=g.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),h=parseInt(u.borderBottomWidth,10),v=d+p+l+parseInt(u.paddingBottom,10)+h,w=Math.min(5*x.offsetHeight,v),b=window.getComputedStyle(g),j=parseInt(b.paddingTop,10),E=parseInt(b.paddingBottom,10),S=e.top+e.height/2-Mr,N=a-S,L=x.offsetHeight/2,k=d+p+(x.offsetTop+L),R=v-k;if(k<=S){const e=o.length>0&&x===o[o.length-1].ref.current;c.style.bottom="0px";const t=f.clientHeight-g.offsetTop-g.offsetHeight,n=k+Math.max(N,L+(e?E:0)+t+h);c.style.height=n+"px"}else{const e=o.length>0&&x===o[0].ref.current;c.style.top="0px";const t=Math.max(S,d+g.offsetTop+(e?j:0)+L)+R;c.style.height=t+"px",g.scrollTop=k-S+g.offsetTop}c.style.margin=`${Mr}px 0`,c.style.minHeight=w+"px",c.style.maxHeight=a+"px",i?.(),requestAnimationFrame((()=>C.current=!0))}}),[m,s.trigger,s.valueNode,c,f,g,x,y,s.dir,i]);se((()=>b()),[b]);const[j,E]=o.useState();se((()=>{f&&E(window.getComputedStyle(f).zIndex)}),[f]);const S=o.useCallback((e=>{e&&!0===v.current&&(b(),w?.(),v.current=!1)}),[b,w]);return e.jsx(Hr,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:C,onScrollButtonChange:S,children:e.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:e.jsx(V.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));Tr.displayName="SelectItemAlignedPosition";var Dr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Mr,...a}=t,s=Cr(r);return e.jsx(cn,{...s,...a,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})}));Dr.displayName="SelectPopperPosition";var[Hr,Ir]=hr(kr,{}),Vr="SelectViewport",Fr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:i,...a}=t,s=_r(Vr,r),l=Ir(Vr,r),c=u(n,s.onViewportChange),d=o.useRef(0);return e.jsxs(e.Fragment,{children:[e.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:i}),e.jsx(dr.Slot,{scope:r,children:e.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:P(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=l;if(r?.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Mr,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))})})]})}));Fr.displayName=Vr;var Zr="SelectGroup",[Wr,Br]=hr(Zr);o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=ue();return e.jsx(Wr,{scope:r,id:i,children:e.jsx(V.div,{role:"group","aria-labelledby":i,...o,ref:n})})})).displayName=Zr;var Ur="SelectLabel";o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=Br(Ur,r);return e.jsx(V.div,{id:i.id,...o,ref:n})})).displayName=Ur;var zr="SelectItem",[$r,qr]=hr(zr),Kr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,value:i,disabled:a=!1,textValue:s,...l}=t,c=gr(zr,r),d=_r(zr,r),f=c.value===i,[p,h]=o.useState(s??""),[m,C]=o.useState(!1),v=u(n,(e=>d.itemRefCallback?.(e,i,a))),g=ue(),x=o.useRef("touch"),y=()=>{a||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new 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 e.jsx($r,{scope:r,value:i,disabled:a,textId:g,isSelected:f,onItemTextChange:o.useCallback((e=>{h((t=>t||(e?.textContent??"").trim()))}),[]),children:e.jsx(dr.ItemSlot,{scope:r,value:i,disabled:a,textValue:p,children:e.jsx(V.div,{role:"option","aria-labelledby":g,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:v,onFocus:P(l.onFocus,(()=>C(!0))),onBlur:P(l.onBlur,(()=>C(!1))),onClick:P(l.onClick,(()=>{"mouse"!==x.current&&y()})),onPointerUp:P(l.onPointerUp,(()=>{"mouse"===x.current&&y()})),onPointerDown:P(l.onPointerDown,(e=>{x.current=e.pointerType})),onPointerMove:P(l.onPointerMove,(e=>{x.current=e.pointerType,a?d.onItemLeave?.():"mouse"===x.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:P(l.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()})),onKeyDown:P(l.onKeyDown,(e=>{""!==d.searchRef?.current&&" "===e.key||(cr.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Kr.displayName=zr;var Yr="SelectItemText",Xr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,className:a,style:s,...l}=t,c=gr(Yr,r),d=_r(Yr,r),f=qr(Yr,r),p=yr(Yr,r),[h,m]=o.useState(null),C=u(n,(e=>m(e)),f.onItemTextChange,(e=>d.itemTextRefCallback?.(e,f.value,f.disabled))),v=h?.textContent,g=o.useMemo((()=>e.jsx("option",{value:f.value,disabled:f.disabled,children:v},f.value)),[f.disabled,f.value,v]),{onNativeOptionAdd:x,onNativeOptionRemove:y}=p;return se((()=>(x(g),()=>y(g))),[x,y,g]),e.jsxs(e.Fragment,{children:[e.jsx(V.span,{id:f.textId,...l,ref:C}),f.isSelected&&c.valueNode&&!c.valueNodeHasChildren?i.createPortal(l.children,c.valueNode):null]})}));Xr.displayName=Yr;var Jr="SelectItemIndicator",Gr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return qr(Jr,r).isSelected?e.jsx(V.span,{"aria-hidden":!0,...o,ref:n}):null}));Gr.displayName=Jr;var Qr="SelectScrollUpButton";o.forwardRef(((t,n)=>{const r=_r(Qr,t.__scopeSelect),i=Ir(Qr,t.__scopeSelect),[a,s]=o.useState(!1),l=u(n,i.onScrollButtonChange);return se((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?e.jsx(to,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=Qr;var eo="SelectScrollDownButton";o.forwardRef(((t,n)=>{const r=_r(eo,t.__scopeSelect),i=Ir(eo,t.__scopeSelect),[a,s]=o.useState(!1),l=u(n,i.onScrollButtonChange);return se((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;s(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?e.jsx(to,{...t,ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=eo;var to=o.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:i,...a}=t,s=_r("SelectScrollButton",r),l=o.useRef(null),c=fr(r),u=o.useCallback((()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[]);return o.useEffect((()=>()=>u()),[u]),se((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),e.jsx(V.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:P(a.onPointerDown,(()=>{null===l.current&&(l.current=window.setInterval(i,50))})),onPointerMove:P(a.onPointerMove,(()=>{s.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(i,50))})),onPointerLeave:P(a.onPointerLeave,(()=>{u()}))})}));o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return e.jsx(V.div,{"aria-hidden":!0,...o,ref:n})})).displayName="SelectSeparator";var no="SelectArrow";o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=Cr(r),a=gr(no,r),s=_r(no,r);return a.open&&"popper"===s.position?e.jsx(un,{...i,...o,ref:n}):null})).displayName=no;var ro=o.forwardRef((({__scopeSelect:t,value:n,...r},i)=>{const a=o.useRef(null),s=u(i,a),l=hn(n);return o.useEffect((()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[l,n]),e.jsx(V.select,{...r,style:{...mn,...r.style},ref:s,defaultValue:n})}));function oo(e){return""===e||void 0===e}function io(e){const t=F(e),n=o.useRef(""),r=o.useRef(0),i=o.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=o.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return o.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,i,a]}function ao(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===r.length&&(i=i.filter((e=>e!==n)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}ro.displayName="SelectBubbleInput";var so=wr,lo=jr,co=Sr,uo=Nr,fo=Lr,po=Rr,ho=Fr,mo=Kr,Co=Xr,vo=Gr;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o=r(t),i=r(n),l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function c(...e){return t=>{let n=!1;const r=e.map((e=>{const r=s(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():s(e[t],null)}}}}function u(...e){return o.useCallback(c(...e),e)}function d(e){const t=o.forwardRef(((e,t)=>{const{children:n,...r}=e,i=u(o.isValidElement(n)?function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n):void 0,t);if(o.isValidElement(n)){const e=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==o.Fragment&&(e.ref=i),o.cloneElement(n,e)}return o.Children.count(n)>1?o.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}"function"==typeof SuppressedError&&SuppressedError;var f=Symbol("radix.slottable");function p(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}var m=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=function(t){const n=d(t),r=o.forwardRef(((t,r)=>{const{children:i,...l}=t,a=o.Children.toArray(i),s=a.find(p);if(s){const t=s.props.children,i=a.map((e=>e===s?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e));return e.jsx(n,{...l,ref:r,children:o.isValidElement(t)?o.cloneElement(t,void 0,i):null})}return e.jsx(n,{...l,ref:r,children:i})}));return r.displayName=`${t}.Slot`,r}(`Primitive.${n}`),i=o.forwardRef(((t,o)=>{const{asChild:i,...l}=t,a=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(a,{...l,ref:o})}));return i.displayName=`Primitive.${n}`,{...t,[n]:i}}),{}),h=o.forwardRef(((t,n)=>e.jsx(m.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}})));h.displayName="Label";var v=h,g=function(t){var n=t.children,r=t.className,o=t.onClick,i=t.disabled,l=void 0!==i&&i;return e.jsx("button",{className:"flex flex-col justify-center items-center gap-2 w-[322px] h-[48px] shrink-0 rounded-[12px] cursor-pointer bg-[#11E5C5] hover:bg-[#7dffeb] text-[#3C3C40] text-center font-poppins text-sm font-medium leading-[110%] active:bg-[#11e5c57c] ".concat(r),onClick:o,disabled:l,children:n})},C=function(t){var n=t.className;return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"90",height:"16",viewBox:"0 0 90 16",fill:"none",className:n,children:[e.jsxs("g",{clipPath:"url(#clip0_17364_64593)",children:[e.jsx("mask",{id:"mask0_17364_64593",maskUnits:"userSpaceOnUse",x:"10",y:"3",width:"7",height:"7",children:e.jsx("path",{d:"M10.4512 3.52246H16.0069V9.22579H10.4512V3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask0_17364_64593)",children:e.jsx("path",{d:"M15.9716 3.52246V5.25302C15.9716 7.42691 14.2543 9.18913 12.136 9.18913H10.4512V7.45857C10.4512 5.28524 12.1675 3.52246 14.2852 3.52246H15.9716Z",fill:"#11E5C5"})}),e.jsx("mask",{id:"mask1_17364_64593",maskUnits:"userSpaceOnUse",x:"10",y:"9",width:"7",height:"7",children:e.jsx("path",{d:"M10.4512 9.80566H16.0069V15.4712H10.4512V9.80566Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask1_17364_64593)",children:e.jsx("path",{d:"M15.9716 15.4712V13.7407C15.9716 11.5668 14.2543 9.80566 12.136 9.80566H10.4512V11.5351C10.4512 13.7096 12.1675 15.4712 14.2852 15.4712H15.9716Z",fill:"#11E5C5"})}),e.jsx("mask",{id:"mask2_17364_64593",maskUnits:"userSpaceOnUse",x:"0",y:"3",width:"7",height:"13",children:e.jsx("path",{d:"M0.330563 3.50293H6.09267V15.4707H0.330563V3.50293Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask2_17364_64593)",children:e.jsx("path",{d:"M0.330563 3.52832C3.54516 3.52832 6.15119 6.20165 6.15119 9.5011C6.15119 12.8005 3.54516 15.4639 0.330563 15.4639V3.52832Z",fill:"#192441"})}),e.jsx("path",{d:"M20.3102 13.0132C19.5694 12.1821 19.1987 11.1643 19.1987 9.95875C19.1987 8.75431 19.5694 7.7332 20.3102 6.89542C21.0526 6.05931 21.996 5.64042 23.1395 5.64042C24.1902 5.64042 25.0562 5.97931 25.7363 6.65709V0.375977H28.4756V14.021H25.7666V13.1015H25.7363C25.0562 13.8738 24.1902 14.2593 23.1395 14.2593C21.996 14.2593 21.0526 13.8438 20.3102 13.0132ZM22.6355 8.57987C22.2789 8.93987 22.1017 9.39931 22.1017 9.95875C22.1017 10.5188 22.2708 10.9776 22.6095 11.3332C22.9509 11.6871 23.4001 11.8638 23.9577 11.8638C24.4937 11.8638 24.9353 11.6849 25.28 11.3243C25.6246 10.9654 25.7964 10.5099 25.7964 9.95875C25.7964 9.39931 25.6181 8.93987 25.2626 8.57987C24.9093 8.22042 24.4747 8.04042 23.9577 8.04042C23.4321 8.04042 22.991 8.22042 22.6355 8.57987Z",fill:"#192441"}),e.jsx("path",{d:"M30.0959 13.0134C29.3551 12.1823 28.9845 11.1645 28.9845 9.95896C28.9845 8.75451 29.3551 7.7334 30.0959 6.89562C30.8389 6.05951 31.7818 5.64062 32.9252 5.64062C33.976 5.64062 34.8419 5.97951 35.522 6.65729V5.87896H38.2614V14.0212H35.5524V13.1017H35.522C34.8419 13.874 33.976 14.2595 32.9252 14.2595C31.7818 14.2595 30.8389 13.844 30.0959 13.0134ZM32.4212 8.58007C32.0652 8.94007 31.8875 9.39951 31.8875 9.95896C31.8875 10.519 32.0565 10.9778 32.3958 11.3334C32.7366 11.6873 33.1859 11.864 33.7435 11.864C34.28 11.864 34.7211 11.6851 35.0658 11.3245C35.4104 10.9656 35.5827 10.5101 35.5827 9.95896C35.5827 9.39951 35.4039 8.94007 35.0484 8.58007C34.6956 8.22062 34.2605 8.04063 33.7435 8.04063C33.2184 8.04063 32.7767 8.22062 32.4212 8.58007Z",fill:"#192441"}),e.jsx("path",{d:"M39.8042 5.87878V2.85156H42.543V5.87878H44.2099V8.02267H42.543V10.6082C42.543 11.3599 42.7478 11.7355 43.1591 11.7355C43.2626 11.7355 43.3699 11.7155 43.4821 11.6738C43.5965 11.6293 43.6853 11.5877 43.7493 11.5455L43.8398 11.4838L44.5199 13.751C43.9308 14.0893 43.2605 14.2593 42.5089 14.2593C41.994 14.2593 41.5508 14.1666 41.1779 13.981C40.8078 13.7955 40.5276 13.5466 40.338 13.2338C40.1488 12.9227 40.0117 12.5955 39.9288 12.2527C39.8448 11.9082 39.8042 11.5399 39.8042 11.1477V8.02267H38.6586V5.87878H39.8042Z",fill:"#192441"}),e.jsx("path",{d:"M45.2151 13.0134C44.4743 12.1823 44.1042 11.1645 44.1042 9.95896C44.1042 8.75451 44.4743 7.7334 45.2151 6.89562C45.9581 6.05951 46.901 5.64062 48.0444 5.64062C49.0957 5.64062 49.9612 5.97951 50.6418 6.65729V5.87896H53.3806V14.0212H50.6716V13.1017H50.6418C49.9612 13.874 49.0957 14.2595 48.0444 14.2595C46.901 14.2595 45.9581 13.844 45.2151 13.0134ZM47.541 8.58007C47.1844 8.94007 47.0067 9.39951 47.0067 9.95896C47.0067 10.519 47.1758 10.9778 47.515 11.3334C47.8564 11.6873 48.3051 11.864 48.8627 11.864C49.3992 11.864 49.8403 11.6851 50.185 11.3245C50.5296 10.9656 50.7019 10.5101 50.7019 9.95896C50.7019 9.39951 50.5231 8.94007 50.1676 8.58007C49.8148 8.22062 49.3797 8.04063 48.8627 8.04063C48.3376 8.04063 47.896 8.22062 47.541 8.58007Z",fill:"#192441"}),e.jsx("path",{d:"M63.5197 5.87875L59.7469 9.76875L63.8904 14.021H60.3674L57.1973 10.7676V14.021H54.4585V0.375977H57.1973V8.72098L59.9626 5.87875H63.5197Z",fill:"#192441"}),e.jsx("path",{d:"M71.6998 10.339H65.9463C65.9463 10.9112 66.1246 11.3356 66.4845 11.6123C66.8465 11.8862 67.2393 12.0228 67.6647 12.0228C68.1058 12.0228 68.4548 11.9634 68.7112 11.8417C68.9696 11.7178 69.2634 11.4773 69.5939 11.1167L71.5751 12.1334C70.7504 13.5512 69.3799 14.2595 67.4621 14.2595C66.2672 14.2595 65.2419 13.8395 64.3873 13.0001C63.5311 12.1578 63.1035 11.1434 63.1035 9.95896C63.1035 8.77451 63.5311 7.76007 64.3873 6.9134C65.2419 6.06507 66.2672 5.64062 67.4621 5.64062C68.7198 5.64062 69.7413 6.01507 70.5287 6.7634C71.3177 7.50896 71.7128 8.57451 71.7128 9.95896C71.7128 10.1512 71.7084 10.2773 71.6998 10.339ZM66.0238 8.7834H69.0385C68.9783 8.36229 68.8157 8.0384 68.5518 7.81063C68.2868 7.58118 67.9498 7.46618 67.5396 7.46618C67.0854 7.46618 66.7234 7.5884 66.4541 7.83285C66.1875 8.07507 66.0428 8.39229 66.0238 8.7834Z",fill:"#192441"}),e.jsx("path",{d:"M80.2489 10.339H74.4955C74.4955 10.9112 74.6738 11.3356 75.0336 11.6123C75.3956 11.8862 75.7885 12.0228 76.2139 12.0228C76.655 12.0228 77.004 11.9634 77.2603 11.8417C77.5188 11.7178 77.8125 11.4773 78.1431 11.1167L80.1243 12.1334C79.2995 13.5512 77.929 14.2595 76.0112 14.2595C74.8163 14.2595 73.791 13.8395 72.9364 13.0001C72.0802 12.1578 71.6526 11.1434 71.6526 9.95896C71.6526 8.77451 72.0802 7.76007 72.9364 6.9134C73.791 6.06507 74.8163 5.64062 76.0112 5.64062C77.269 5.64062 78.2905 6.01507 79.0779 6.7634C79.8669 7.50896 80.2619 8.57451 80.2619 9.95896C80.2619 10.1512 80.2576 10.2773 80.2489 10.339ZM74.573 8.7834H77.5876C77.5275 8.36229 77.3649 8.0384 77.101 7.81063C76.836 7.58118 76.4989 7.46618 76.0887 7.46618C75.6346 7.46618 75.2726 7.5884 75.0033 7.83285C74.7366 8.07507 74.592 8.39229 74.573 8.7834Z",fill:"#192441"}),e.jsx("path",{d:"M80.7702 14.0212V5.87896H83.5096V6.73674H83.5394C84.2514 6.00618 85.009 5.64062 85.8138 5.64062C86.2034 5.64062 86.5909 5.6934 86.9762 5.79951C87.3642 5.90563 87.7354 6.07174 88.0919 6.29451C88.4469 6.51562 88.7357 6.82951 88.9574 7.23618C89.1785 7.64285 89.289 8.11785 89.289 8.65951V14.0212H86.5546V9.41951C86.5546 8.99562 86.4218 8.62618 86.1579 8.31007C85.8967 7.99174 85.5553 7.83285 85.1331 7.83285C84.7197 7.83285 84.3452 7.99618 84.0092 8.3234C83.6754 8.65062 83.5096 9.01618 83.5096 9.41951V14.0212H80.7702Z",fill:"#192441"}),e.jsx("mask",{id:"mask3_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"3",height:"13",children:e.jsx("path",{d:"M7.03613 3.52246H9.56629V15.4802H7.03613V3.52246Z",fill:"white"})}),e.jsxs("g",{mask:"url(#mask3_17364_64593)",children:[e.jsx("mask",{id:"mask4_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"3",height:"13",children:e.jsx("path",{d:"M8.30094 3.52246C9 3.52246 9.56629 4.10413 9.56629 4.82079V14.1747C9.56629 14.8919 9 15.4736 8.30094 15.4736C7.60242 15.4736 7.03613 14.8919 7.03613 14.1747V4.82079C7.03613 4.10413 7.60242 3.52246 8.30094 3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask4_17364_64593)",children:e.jsx("path",{d:"M7.03613 3.52246H9.56629V15.4702H7.03613V3.52246Z",fill:"#192441"})})]}),e.jsx("mask",{id:"mask5_17364_64593",maskUnits:"userSpaceOnUse",x:"8",y:"8",width:"2",height:"8",children:e.jsx("path",{d:"M8.30961 8.45801H9.57496V15.473H8.30961V8.45801Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask5_17364_64593)",children:e.jsx("path",{d:"M8.30961 8.45801H9.57496V15.4719H8.30961V8.45801Z",fill:"#192441"})}),e.jsx("mask",{id:"mask6_17364_64593",maskUnits:"userSpaceOnUse",x:"7",y:"3",width:"2",height:"8",children:e.jsx("path",{d:"M7.0448 3.52246H8.30961V10.5363H7.0448V3.52246Z",fill:"white"})}),e.jsx("g",{mask:"url(#mask6_17364_64593)",children:e.jsx("path",{d:"M7.0448 3.52246H8.30961V10.5363H7.0448V3.52246Z",fill:"#192441"})})]}),e.jsx("defs",{children:e.jsx("clipPath",{id:"clip0_17364_64593",children:e.jsx("rect",{width:"90",height:"16",fill:"white"})})})]})},x=function(t){var n=t.className;return e.jsxs("div",{className:"flex items-center justify-center flex-row ".concat(n),children:[e.jsx("span",{className:"text-xs font-semibold text-[#3C3C40] text-center mt-0.5",children:"Propulsé par "}),e.jsx(C,{className:"inline-block w-[90px] h-[18px] mb-[2px] ml-1"})]})},y=function(t){var n=t.children,r=t.className;return e.jsx("h1",{className:"text-[#3C3C40] text-center font-poppins text-2xl font-bold leading-[110%] ".concat(r),children:n})},b=function(t){var n=t.children,r=t.className;return e.jsx("h2",{className:"text-[#3C3C40] text-center text-xs font-semibold leading-[120%] ".concat(r),children:n})},w=function(t){var n=t.children,r=t.className,o=t.onClick,i=t.disabled,l=void 0!==i&&i,a=t.type;return e.jsx(e.Fragment,{children:"continue"===a?e.jsx("button",{className:"inline-flex h-9 items-center justify-center gap-2 shrink-0 cursor-pointer bg-[#11E5C5] hover:bg-[#7dffeb] text-[#3C3C40] rounded-md ".concat(r),onClick:o,disabled:l,children:e.jsx("span",{className:"mx-6 text-sm",children:n})}):e.jsx("button",{className:"inline-flex h-9 items-center justify-center gap-2 shrink-0 cursor-pointer bg-transparent border-1 border-[#3C3C40] hover:bg-[#3c3c401e] text-[#3C3C40] rounded-md ".concat(r),onClick:o,disabled:l,children:e.jsx("span",{className:"mx-6 text-sm",children:n})})})},E=function(e){void 0===e&&(e=640);var n=t.useState("undefined"!=typeof window&&window.innerWidth<e),r=n[0],o=n[1];return t.useEffect((function(){var t=window.matchMedia("(max-width: ".concat(e,"px)")),n=function(){return o(t.matches)};return t.addEventListener("change",n),n(),function(){return t.removeEventListener("change",n)}}),[e]),r},j=Array.from({length:31},(function(e,t){return t+1})),S=Array.from({length:100},(function(e,t){return(new Date).getFullYear()-t})),N=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],k=function(n){var r=n.stepObject,o=n.setUserInput,i=r.setStep,a=r.step,s=E(),c=t.useState({firstName:!1,lastName:!1,birthDate:!1,notMajor:!1}),u=c[0],d=c[1],f=t.useState({lastName:"",firstName:"",birthDate:"",day:"",month:"",year:""}),p=f[0],m=f[1],h=function(){var e,t,n,r,s,c;(p.firstName||d((function(e){return l(l({},e),{firstName:!0})})),p.lastName||d((function(e){return l(l({},e),{lastName:!0})})),p.birthDate||d((function(e){return l(l({},e),{birthDate:!0})})),!p.birthDate||(e=p.birthDate,t=new Date,n=new Date(e),r=t.getFullYear()-n.getFullYear(),s=t.getMonth()-n.getMonth(),c=t.getDate()-n.getDate(),r>18||18===r&&(s>0||0===s&&c>=0)))?p.firstName&&p.lastName&&p.birthDate&&(i(a+1),o({lastName:p.lastName,firstName:p.firstName,birthDate:p.birthDate})):d((function(e){return l(l({},e),{notMajor:!0})}))},C=function(e,t){d((function(t){var n;return l(l({},t),((n={})[e]=!1,n))})),"day"!==e&&"month"!==e&&"year"!==e||d((function(e){return l(l({},e),{birthDate:!1})})),m((function(n){var r,o=l(l({},n),((r={})[e]=t,r)),i=o.day,a=o.month,s=o.year;if(i&&a&&s){var c=a.padStart(2,"0"),u=i.padStart(2,"0");o.birthDate="".concat(s,"-").concat(c,"-").concat(u)}else o.birthDate="";return o}))};return e.jsxs("div",{className:"space-y-4 pt-8 relative justify-center items-center w-full max-w-[322px] mx-auto",children:[e.jsxs("div",{className:"flex flex-col gap-5 mt-4",children:[e.jsx(y,{children:"Informations d’identité"}),e.jsx(b,{children:"Afin de commencer le processus de vérification, veuillez entrer vos informations d’identité"})]}),e.jsxs("div",{className:"flex flex-col gap-6 mt-8 w-[322px]",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(v,{htmlFor:"firstName",className:"text-xl font-semibold",children:"Prénom"}),e.jsx("input",{id:"firstName",type:"text",value:p.firstName,onChange:function(e){return C("firstName",e.target.value)},className:"border rounded-md p-2 focus:outline-none focus:ring-2 focus:ring-[#11E5C5] ".concat(u.firstName?"border-red-500":"border-gray-300")}),u.firstName&&e.jsx("p",{className:"text-red-500 text-sm",children:"Veuillez entrer votre prénom"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(v,{htmlFor:"lastName",className:"text-xl font-semibold",children:"Nom"}),e.jsx("input",{id:"lastName",type:"text",value:p.lastName,onChange:function(e){return C("lastName",e.target.value)},className:"border rounded-md p-2 focus:outline-none focus:ring-2 focus:ring-[#11E5C5] ".concat(u.lastName?"border-red-500":"border-gray-300")}),u.lastName&&e.jsx("p",{className:"text-red-500 text-sm",children:"Veuillez entrer votre nom"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(v,{className:"text-xl font-semibold",children:"Date de naissance"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{value:p.day,onChange:function(e){return C("day",e.target.value)},className:"border rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]\n ".concat(u.birthDate||u.notMajor?"border-red-500":"border-gray-300"),children:[e.jsx("option",{value:"",children:"Jour"}),j.map((function(t){return e.jsx("option",{value:String(t),children:t},t)}))]}),e.jsxs("select",{value:p.month,onChange:function(e){return C("month",e.target.value)},className:"border rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]\n ".concat(u.birthDate||u.notMajor?"border-red-500":"border-gray-300"),children:[e.jsx("option",{value:"",children:"Mois"}),N.map((function(t,n){return e.jsx("option",{value:String(n+1).padStart(2,"0"),children:t},t)}))]}),e.jsxs("select",{value:p.year,onChange:function(e){return C("year",e.target.value)},className:"border rounded-md p-2 w-1/3 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]\n ".concat(u.birthDate||u.notMajor?"border-red-500":"border-gray-300"),children:[e.jsx("option",{value:"",children:"Année"}),S.map((function(t){return e.jsx("option",{value:String(t),children:t},t)}))]})]}),u.birthDate&&e.jsx("p",{className:"text-red-500 text-sm",children:"Veuillez entrer votre date de naissance"}),u.notMajor&&e.jsx("p",{className:"text-red-500 text-sm",children:"Vous devez être majeur pour continuer"})]})]}),!s&&e.jsxs("div",{className:"flex flex-row justify-end-safe gap-3 mt-12 mb-[-24px]",children:[e.jsx(w,{onClick:function(){i(a-1)},type:"back",children:"Retour"}),e.jsx(w,{onClick:h,type:"continue",children:"Continuer"})]}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:s&&e.jsx(g,{onClick:h,className:"w-full",children:"Continuer"})}),e.jsx(x,{})]})]})},L=function(t){var n=t.children,r=t.className,o=void 0===r?"":r;return e.jsx("div",{className:"bg-white shadow-md rounded-lg p-4 ".concat(o),children:n})},P=function(t){var n=t.className;return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"230",height:"230",viewBox:"0 0 230 230",fill:"none",className:n,children:[e.jsx("path",{d:"M39.6888 205.896C-1.8998 181.884 -1.8998 142.95 39.6888 118.956C81.2774 94.9626 148.709 94.9442 190.311 118.956C231.914 142.968 231.9 181.903 190.311 205.896C148.723 229.89 81.282 229.913 39.6888 205.896Z",fill:"#F5F5F5"}),e.jsx("path",{d:"M175.177 67.2377L175.104 67.2009L157.568 57.1085L157.463 57.0579C149.27 52.9179 138.34 54.1645 126.583 61.7637C102.966 77.0357 84.9712 112.189 86.388 140.281C87.0918 154.279 92.4922 163.879 100.648 168.102L100.717 168.139L118.257 178.236L118.34 178.282C126.532 182.422 137.471 181.193 149.238 173.585C172.854 158.313 190.849 123.16 189.433 95.0677C188.738 81.0607 183.338 71.4605 175.177 67.2377Z",fill:"#37474F"}),e.jsx("path",{d:"M117.654 177.909L100.74 168.129L100.657 168.079C92.5014 163.847 87.1056 154.246 86.3972 140.267C85.767 127.737 89.0008 113.812 94.8612 100.882L94.9762 100.597L112.401 110.974C106.531 123.905 103.307 137.829 103.937 150.359C104.604 164.063 109.788 173.548 117.654 177.909Z",fill:"#263238"}),e.jsx("path",{d:"M149.247 173.576C172.863 158.304 190.859 123.151 189.442 95.0586C188.025 66.9664 167.73 56.5796 144.113 71.8516C120.497 87.1236 102.497 122.277 103.914 150.364C105.331 178.452 125.631 188.848 149.247 173.576Z",fill:"#455A64"}),e.jsx("path",{d:"M169.248 65.0576L139.647 126.04L133.276 119.14C131.376 117.162 128.777 116.008 126.035 115.926C123.294 115.844 120.63 116.84 118.616 118.7C116.601 120.561 115.396 123.137 115.26 125.876C115.124 128.615 116.068 131.298 117.889 133.349L134.674 151.533C136.52 153.538 139.078 154.74 141.8 154.882C141.993 154.882 142.186 154.882 142.379 154.882C142.887 154.881 143.394 154.844 143.897 154.771C145.587 154.525 147.191 153.869 148.568 152.861C149.946 151.852 151.055 150.521 151.8 148.985L185.748 79.0646C182.266 71.2998 176.47 66.4882 169.248 65.0576Z",fill:"#37474F"}),e.jsx("path",{d:"M193.287 44.9738C193.103 44.868 192.91 44.7668 192.717 44.6748C190.547 43.6235 188.049 43.4757 185.771 44.2639C183.493 45.0522 181.62 46.712 180.564 48.8792L142.899 126.463L140.755 124.163C140.137 123.487 139.417 122.911 138.621 122.456C137.499 121.812 132.724 119.048 131.951 118.601C130.067 117.512 127.855 117.133 125.717 117.536C123.578 117.938 121.654 119.093 120.295 120.793C118.936 122.492 118.231 124.623 118.308 126.797C118.386 128.972 119.241 131.047 120.718 132.645L137.503 150.824C138.133 151.507 138.863 152.089 139.67 152.549C140.765 153.17 145.521 155.93 146.303 156.381C147.385 157.008 148.584 157.404 149.826 157.546C151.067 157.689 152.325 157.573 153.52 157.208C154.716 156.842 155.823 156.234 156.772 155.421C157.722 154.609 158.494 153.609 159.04 152.485L203.601 60.7012C204.602 58.6326 204.785 56.2617 204.112 54.064C203.439 51.8663 201.96 50.0044 199.971 48.8516L193.287 44.9738Z",fill:"#11E5C5"}),e.jsx("path",{opacity:"0.15",d:"M193.287 44.9738C193.103 44.868 192.91 44.7668 192.717 44.6748C190.547 43.6235 188.049 43.4757 185.771 44.2639C183.493 45.0522 181.62 46.712 180.564 48.8792L142.899 126.463L140.755 124.163C140.137 123.487 139.417 122.911 138.621 122.456C137.499 121.812 132.724 119.048 131.951 118.601C130.067 117.512 127.855 117.133 125.717 117.536C123.578 117.938 121.654 119.093 120.295 120.793C118.936 122.492 118.231 124.623 118.308 126.797C118.386 128.972 119.241 131.047 120.718 132.645L137.503 150.824C138.133 151.507 138.863 152.089 139.67 152.549C140.765 153.17 145.521 155.93 146.303 156.381C147.385 157.008 148.584 157.404 149.826 157.546C151.067 157.689 152.325 157.573 153.52 157.208C154.716 156.842 155.823 156.234 156.772 155.421C157.722 154.609 158.494 153.609 159.04 152.485L203.601 60.7012C204.602 58.6326 204.785 56.2617 204.112 54.064C203.439 51.8663 201.96 50.0044 199.971 48.8516L193.287 44.9738Z",fill:"black"}),e.jsx("path",{opacity:"0.15",d:"M146.28 156.363C145.507 155.903 140.76 153.143 139.651 152.531C138.845 152.071 138.114 151.489 137.485 150.806L120.699 132.627C119.959 131.82 119.372 130.884 118.965 129.867L125.64 133.717C126.044 134.738 126.636 135.674 127.383 136.477L144.164 154.657C144.781 155.327 145.494 155.902 146.28 156.363Z",fill:"black"}),e.jsx("path",{opacity:"0.15",d:"M189.35 49.9368C188.473 50.7237 187.757 51.6736 187.243 52.7336L148.502 132.534L142.899 126.462L180.564 48.8788C181.077 47.8169 181.795 46.8666 182.675 46.082L189.35 49.9368Z",fill:"black"}),e.jsx("path",{d:"M199.396 48.5292C197.226 47.4804 194.729 47.3339 192.451 48.1219C190.174 48.9098 188.301 50.568 187.243 52.7336L148.502 132.534L140.76 124.144C139.103 122.461 136.856 121.489 134.495 121.434C132.134 121.378 129.845 122.244 128.111 123.847C126.377 125.451 125.335 127.666 125.206 130.024C125.077 132.382 125.871 134.698 127.42 136.481L144.201 154.665C145.205 155.752 146.46 156.577 147.856 157.069C149.252 157.561 150.746 157.705 152.21 157.488C153.674 157.271 155.063 156.701 156.257 155.826C157.45 154.951 158.412 153.797 159.059 152.466L203.619 60.6824C204.669 58.5105 204.814 56.0107 204.022 53.732C203.231 51.4533 201.567 49.582 199.396 48.5292Z",fill:"#11E5C5"}),e.jsx("path",{d:"M72.3258 57.4997C68.816 57.4997 66.4148 58.4197 63.9216 61.9617C61.6216 65.2185 55.3472 76.0745 55.3472 76.0745C55.3472 76.0745 50.7472 66.6353 50.2872 64.7539C49.8272 62.8725 49.8548 62.0353 50.2872 61.2165C50.9203 60.2487 51.3174 59.1458 51.4464 57.9965C51.6258 55.7333 52.1778 53.7967 51.6718 53.7323C50.2688 53.6541 50.2136 55.4573 49.4776 56.5199C49.3841 56.6225 49.2678 56.7016 49.138 56.7508C49.0082 56.8 48.8687 56.818 48.7307 56.8032C48.5927 56.7884 48.4602 56.7413 48.3438 56.6657C48.2274 56.5901 48.1304 56.4882 48.0608 56.3681C47.7526 55.7379 47.9182 54.7029 47.771 53.9577C47.8109 53.543 47.8769 53.1313 47.9688 52.7249C48.5002 52.8205 49.0428 52.836 49.5788 52.7709C50.186 53.7231 50.6 54.1233 51.4464 53.7369C51.5568 53.5621 51.083 52.3569 50.5264 51.4369C50.4428 51.2962 50.3074 51.1938 50.1492 51.1517C49.1287 50.8933 48.0638 50.8635 47.0304 51.0643C46.9523 51.0723 46.8766 51.096 46.8078 51.134C46.739 51.1719 46.6786 51.2233 46.6302 51.2851C46.2418 51.8541 45.9324 52.473 45.7102 53.1251C45.6504 53.3229 45.4664 53.3183 45.4204 53.1481C44.9604 50.9263 44.9604 47.7707 44.9604 46.2941C44.9604 45.1303 43.263 44.9463 43.2032 46.6115C43.1023 48.8458 43.1407 51.0842 43.3182 53.3137C43.3182 53.5161 43.1158 53.6127 43.033 53.3919C42.7386 52.6053 42.0164 50.2271 41.7128 46.1239C41.63 45.0199 39.8452 44.8405 39.8728 46.3907C39.9427 49.1391 40.3004 51.8726 40.94 54.5465C40.9952 54.7397 40.8158 54.9099 40.6824 54.6891C39.845 53.0754 39.176 51.3798 38.686 49.6291C38.3042 48.2951 36.524 48.6355 36.846 50.2961C37.4026 53.2723 38.2858 57.0351 39.606 59.7261C41.0136 62.6011 42.228 64.0409 42.9272 66.2995C43.6264 68.5581 46.5198 81.3507 49.6156 86.3371C52.0398 90.2471 54.8136 89.8837 57.799 87.8229C60.7844 85.7621 71.4518 70.8995 71.4518 70.8995L72.3258 57.4997Z",fill:"#9E6767"}),e.jsx("path",{d:"M55.3472 76.0699C55.3472 76.0699 56.8422 78.6045 57.0722 80.6331C57.4522 78.6634 57.0743 76.6229 56.0142 74.9199L55.3472 76.0699Z",fill:"#874C4C"}),e.jsx("path",{d:"M73.071 57.4998C71.2862 57.3158 69.0644 57.256 66.5896 58.8154C64.1148 60.3748 63.25 62.546 62.0494 64.4458C60.8488 66.3456 56.6996 73.0754 56.6996 73.0754C56.6996 73.0754 58.2222 79.4648 64.2758 80.7804L73.3424 68.48L73.071 57.4998Z",fill:"#455A64"}),e.jsx("path",{d:"M81.1992 169.845C81.6592 169.786 82.271 171.354 82.2802 171.865C82.2894 172.375 81.7742 173.475 81.098 174.505C80.1942 175.732 79.4449 177.065 78.867 178.475C78.3472 179.892 77.8688 180.821 76.4198 182.675C74.8098 184.74 71.0286 188.195 65.2878 186.695C63.8848 186.327 63.1856 185.886 62.675 185.375C62.451 185.149 62.2948 184.864 62.224 184.554C62.1533 184.243 62.1709 183.919 62.2748 183.618L81.1992 169.845Z",fill:"#263238"}),e.jsx("path",{d:"M69.92 168.051V168.102C69.8542 168.531 69.8667 168.969 69.9568 169.395C70.1146 170.661 70.0023 171.947 69.6273 173.167C69.2522 174.388 68.623 175.514 67.781 176.474C66.9813 177.309 66.0786 178.038 65.0946 178.645C62.1874 180.485 61.8746 181.741 62.284 183.618C63.2592 185.803 69.851 187.132 73.6414 183.88C75.2769 182.61 76.5271 180.911 77.2524 178.972C77.8025 177.583 78.4417 176.23 79.166 174.924C79.8974 173.544 81.2866 171.989 81.328 170.568C81.351 169.786 80.5782 168.332 79.8284 167.136C79.1384 166.037 78.4254 164.992 77.8044 165.112L77.9792 165.733C77.4594 166.271 76.7096 166.474 76.2588 167.113C75.6976 167.89 75.716 168.953 75.371 169.827C75.3597 169.872 75.3386 169.914 75.3092 169.95C75.2798 169.985 75.2427 170.014 75.2008 170.034C75.1522 170.042 75.1023 170.034 75.0584 170.012C75.0145 169.99 74.979 169.954 74.957 169.91C74.9194 169.819 74.9022 169.722 74.9064 169.625L74.865 168.286C74.8857 168.029 74.8175 167.772 74.6718 167.559C74.313 167.154 73.4298 167.2 72.9376 167.182C72.2751 167.187 71.6133 167.227 70.955 167.302C70.7268 167.279 70.4982 167.339 70.311 167.472C70.123 167.619 69.9862 167.822 69.92 168.051Z",fill:"#37474F"}),e.jsx("path",{d:"M60.1772 141.307C61.709 146.344 68.8712 163.782 69.299 164.831L70.725 168.29C71.6641 168.599 72.6702 168.642 73.6322 168.415C73.784 170.084 74.037 172.702 74.1336 174.022C74.1704 175.554 74.3038 177.449 73.9726 178.962C73.692 180.25 73.3654 181.603 73.1216 182.895C73.0158 183.466 72.91 184.041 72.8226 184.616C72.6742 185.218 72.7242 185.852 72.9652 186.424C73.1119 186.673 73.3056 186.892 73.5356 187.068C74.5573 187.87 75.8486 188.249 77.142 188.126C77.8259 188.093 78.4877 187.873 79.0556 187.491C80.1688 186.695 80.5598 185.31 81.1256 184.133C81.742 182.859 81.5442 182.716 81.5856 181.35C81.6224 180.393 81.8892 177.964 82.271 175.425C82.6528 172.886 84.2996 163.962 85.0908 155.07C85.4133 151.121 85.4133 147.151 85.0908 143.202C91.3744 126.131 94.1712 115.979 94.9946 110.312C95.8272 104.553 95.427 102.492 95.3212 99.1846L64.7634 99.9206C62.3162 115.717 58.121 134.554 60.1772 141.307Z",fill:"#9E6767"}),e.jsx("path",{d:"M59.6988 128.703C60.329 122.898 64.6714 100.583 64.6714 100.583H95.4546C95.4546 100.583 95.6524 104.866 95.5972 106.834C95.542 108.803 94.9072 112.396 93.8078 116.954C92.7084 121.513 88.6328 134.379 87.8278 136.274C87.0228 138.17 85.5278 143.667 85.5278 143.667C86.2822 153.989 84.318 163.253 82.846 175.568C82.846 175.568 82.4182 177.228 78.0574 176.902C73.8162 176.58 72.9606 175.016 72.9606 175.016L72.68 164.394C72.68 164.394 70.38 165.103 69 164.781C69 164.781 59.8874 142.282 59.4458 140.93C59.0042 139.577 59.0686 134.508 59.6988 128.703Z",fill:"#11E5C5"}),e.jsx("path",{opacity:"0.45",d:"M59.6988 128.703C60.329 122.898 64.6714 100.583 64.6714 100.583H95.4546C95.4546 100.583 95.6524 104.866 95.5972 106.834C95.542 108.803 94.9072 112.396 93.8078 116.954C92.7084 121.513 88.6328 134.379 87.8278 136.274C87.0228 138.17 85.5278 143.667 85.5278 143.667C86.2822 153.989 84.318 163.253 82.846 175.568C82.846 175.568 82.4182 177.228 78.0574 176.902C73.8162 176.58 72.9606 175.016 72.9606 175.016L72.68 164.394C72.68 164.394 70.38 165.103 69 164.781C69 164.781 59.8874 142.282 59.4458 140.93C59.0042 139.577 59.0686 134.508 59.6988 128.703Z",fill:"black"}),e.jsx("path",{opacity:"0.2",d:"M72.7582 115.129C68.3974 111.2 67.4268 108.072 67.4268 108.072C69.6192 110.542 72.2153 112.622 75.1042 114.222C75.1042 114.222 70.9642 136.082 71.2678 140.576C71.5714 145.07 72.68 164.395 72.68 164.395C72.68 164.579 69.7452 143.957 69.6578 142.315C69.46 137.968 72.7582 115.129 72.7582 115.129Z",fill:"black"}),e.jsx("path",{d:"M82.34 186.512C82.7678 186.636 82.7126 187.915 82.5194 188.393C82.0407 189.228 81.3627 189.931 80.546 190.44C79.3492 191.255 78.3509 192.329 77.625 193.582C76.4439 195.388 74.8817 196.915 73.048 198.053C70.6056 199.439 67.727 199.842 64.998 199.18C62.1092 198.361 61.8424 197.653 61.8654 196.563L82.34 186.512Z",fill:"#263238"}),e.jsx("path",{d:"M73.416 179.823C72.657 183.503 71.3368 186.208 68.2778 188.48C65.8398 190.293 64.0734 191.213 62.1276 192.827C61.3042 193.517 61.2352 194.985 61.8654 196.567C63.181 197.62 65.0486 198.228 67.5556 198.223C70.3616 198.223 71.438 197.722 73.048 196.622C73.8389 196.082 74.5753 195.465 75.2468 194.782C76.5946 193.43 77.5468 191.76 78.5036 190.688C79.4604 189.616 81.581 188.522 82.1836 187.229C82.5148 186.521 82.3768 184.878 82.156 183.48C81.9536 182.197 82.3446 179.943 81.7282 179.8L81.6408 180.72C81.5902 180.927 81.4614 181.033 81.029 181.18C80.6404 181.264 80.2394 181.275 79.8468 181.212C79.7073 181.162 79.5554 181.156 79.4126 181.197C79.2698 181.237 79.1433 181.321 79.051 181.438C78.637 181.925 78.5266 182.615 77.993 183.02C77.9585 183.05 77.9176 183.072 77.8734 183.084C77.8529 183.096 77.8296 183.102 77.8061 183.101C77.7825 183.1 77.7597 183.093 77.74 183.08C77.7257 183.058 77.7163 183.033 77.7124 183.006C77.7084 182.98 77.71 182.954 77.717 182.928L77.8688 181.548C77.8871 181.411 77.8871 181.271 77.8688 181.134C77.8399 181.006 77.7839 180.885 77.7046 180.781C77.6252 180.676 77.5244 180.589 77.4088 180.527C77.0214 180.301 76.6051 180.13 76.1714 180.016C75.7201 179.894 75.2579 179.815 74.7914 179.782C74.3336 179.723 73.8694 179.737 73.416 179.823Z",fill:"#455A64"}),e.jsx("path",{d:"M92.6762 58.8205C92.6762 58.8205 93.9412 60.5593 94.9762 64.1427C96.236 70.0278 96.8835 76.0275 96.9082 82.0459C96.9082 90.1741 95.8134 103.344 95.8134 103.344C86.3788 108.073 71.162 105.276 64.4644 100.662C64.7358 99.1993 64.9658 91.5081 65.4948 86.4343C65.849 77.7311 66.1434 73.1725 66.2032 69.2993C66.3274 61.5621 70.1776 57.5647 73.1032 57.5049L80.4908 57.6199L92.6762 58.8205Z",fill:"#11E5C5"}),e.jsx("path",{d:"M95.0038 100.956C93.6008 102.111 90.8638 104.328 90.344 105.446C89.7644 106.724 89.424 108.666 89.033 109.392C88.642 110.119 89.2308 110.487 90.0404 110.225C90.85 109.963 91.333 109.277 91.9586 107.603C92.5842 105.929 94.323 104.618 94.323 104.618L95.0038 100.956Z",fill:"#874C4C"}),e.jsx("path",{d:"M89.8794 116.012C90.2152 116.661 90.9972 116.665 91.7194 116.721C92.5999 116.821 93.4918 116.721 94.3276 116.426C95.332 116.136 96.213 115.523 96.8346 114.683C97.543 113.662 97.727 112.383 98.1318 111.21C98.9782 108.749 101.499 106.973 101.913 104.365C102.083 103.289 102.083 102.019 102.373 101.352C102.552 100.956 106.697 93.8217 108.178 90.7305C109.595 87.7589 110.658 86.3605 109.37 82.7909C108.082 79.2213 103.698 66.6587 100.593 62.2933C98.8356 59.8185 96.0434 59.1101 92.6578 58.8203C90.0818 65.5271 93.0764 72.4593 93.0764 72.4593L99.912 85.6061C99.912 85.6061 97.2624 94.6589 95.6064 99.6913C95.1464 101.071 94.2264 101.955 93.173 103.505C92.713 104.176 91.6734 105.345 91.3054 106.076C90.8454 106.996 90.8454 107.603 90.6154 108.905C90.2566 110.98 89.7 115.704 89.8794 116.012Z",fill:"#9E6767"}),e.jsx("path",{d:"M92.3128 58.7832C94.093 58.8522 96.6506 59.1558 98.1778 59.9286C99.705 60.7014 100.768 61.6536 102.525 65.1772C104.282 68.7008 106.853 75.5456 106.853 75.5456C106.853 75.5456 106.002 80.7114 97.8328 82.05L92.3128 71.8702C92.3128 71.8702 89.8518 65.5268 92.3128 58.7832Z",fill:"#455A64"}),e.jsx("path",{d:"M71.0884 42.3428C71.3298 42.7793 71.5388 43.2328 71.714 43.6998C71.9861 44.3098 72.3339 44.8832 72.749 45.4064C73.807 46.6254 75.2928 47.5178 76.6498 48.3826C77.4686 48.907 78.407 49.3992 79.4098 49.2566C80.4126 49.114 81.5304 49.3302 82.5654 49.4222L86.1856 49.7488L85.9832 53.553C85.9832 53.553 86.4432 52.5456 87.0458 51.3404C87.5702 50.3054 89.769 45.0568 89.7782 45.0338C90.8684 42.4348 92.161 38.9664 90.8592 36.234C90.5632 35.5612 90.0689 34.9947 89.4424 34.6102C89.5685 34.1901 89.6091 33.7491 89.562 33.313C89.4896 32.694 89.2793 32.099 88.9465 31.572C88.6138 31.045 88.167 30.5993 87.6392 30.2678C86.6089 29.5716 85.4476 29.0926 84.226 28.8602C82.6059 28.4875 80.948 28.3038 79.2856 28.3128C77.6567 28.3625 76.0349 28.5487 74.4372 28.8694C73.5459 29.034 72.6431 29.1279 71.737 29.15C71.3467 29.1756 70.9548 29.1571 70.5686 29.0948C70.0886 28.9514 69.6171 28.7809 69.1564 28.5842C69.1163 28.5674 69.0733 28.5587 69.0299 28.5587C68.9865 28.5587 68.9434 28.5674 68.9034 28.5842C68.8669 28.6085 68.836 28.6404 68.813 28.6777C68.79 28.715 68.7753 28.7569 68.77 28.8004C68.6504 29.3747 68.6554 29.968 68.7847 30.5401C68.9141 31.1123 69.1648 31.65 69.5198 32.117C69.3129 32.0888 69.1113 32.0299 68.9218 31.9422C68.7066 31.8426 68.4991 31.7273 68.3008 31.5972C67.9632 31.3709 67.6675 31.0876 67.4268 30.76C67.3936 30.7087 67.343 30.6711 67.2842 30.6542C67.1922 30.6542 67.1186 30.7186 67.0634 30.7922C66.8151 31.1614 66.6461 31.5781 66.5669 32.0159C66.4877 32.4538 66.5002 32.9032 66.6034 33.336C66.8063 34.2047 67.2167 35.0112 67.7994 35.6866C67.5151 36.1459 67.351 36.6694 67.322 37.2087C67.2931 37.7481 67.4003 38.2861 67.6338 38.7732C67.8384 39.2052 68.1136 39.6001 68.448 39.9416C68.862 40.3648 69.368 40.7098 69.7866 41.1054C70.2666 41.4665 70.7034 41.8817 71.0884 42.3428Z",fill:"#37474F"}),e.jsx("path",{d:"M82.1146 36.0043C82.1012 36.6912 82.1896 37.3764 82.3768 38.0375C82.5951 38.6182 82.9464 39.1396 83.4026 39.5601C83.9187 39.9979 84.3958 40.4796 84.8286 40.9999C85.2958 41.8097 85.5697 42.7164 85.629 43.6495C85.6316 43.9243 85.6958 44.195 85.8168 44.4418C85.9378 44.6885 86.1126 44.9051 86.3282 45.0755C87.3126 45.6873 87.9014 44.5051 88.4258 43.9255C89.102 43.2999 91.1122 42.5455 92.0414 44.6707C93.0028 46.8787 91.2272 49.8043 89.6126 50.2551C86.8296 51.0325 86.2224 49.1373 86.2224 49.1373L85.6888 59.0733C84.1202 62.0495 80.431 62.9971 78.0068 62.5233C75.9138 62.1139 74.7638 60.6465 76.7326 58.5213L76.8384 55.4945C76.8384 55.4945 74.3268 55.7935 73.117 55.5635C71.0976 55.1863 70.0994 53.4705 69.552 51.2579C68.6826 47.7021 68.2824 43.9623 69.3634 35.9537C69.8556 35.6823 71.8474 37.2325 74.8834 37.4395C77.3787 37.6153 79.8756 37.1198 82.1146 36.0043Z",fill:"#9E6767"}),e.jsx("path",{d:"M76.82 55.4847C76.82 55.4847 81.374 54.7211 82.984 53.9299C83.9288 53.4749 84.7143 52.7455 85.238 51.8369C84.9692 52.7544 84.5186 53.6085 83.9132 54.3485C82.708 55.7883 76.7786 56.6899 76.7786 56.6899L76.82 55.4847Z",fill:"#874C4C"}),e.jsx("path",{d:"M79.189 39.5598L81.3096 40.2084C81.3907 39.9187 81.3565 39.6089 81.2141 39.3439C81.0717 39.0789 80.8323 38.8793 80.546 38.787C80.4062 38.746 80.2595 38.7336 80.1147 38.7505C79.97 38.7674 79.8301 38.8133 79.7035 38.8854C79.5769 38.9575 79.4661 39.0544 79.3777 39.1703C79.2893 39.2861 79.2251 39.4186 79.189 39.5598Z",fill:"#263238"}),e.jsx("path",{d:"M78.453 49.6064L75.3296 50.6644C75.3904 50.8732 75.4925 51.0676 75.6299 51.2362C75.7673 51.4047 75.9371 51.544 76.1293 51.6457C76.3215 51.7473 76.5322 51.8094 76.7488 51.8281C76.9654 51.8468 77.1836 51.8218 77.3904 51.7546C77.8107 51.6031 78.156 51.2949 78.3541 50.8944C78.5522 50.494 78.5876 50.0324 78.453 49.6064Z",fill:"#874C4C"}),e.jsx("path",{d:"M78.2 50.3701C77.7923 50.3704 77.3963 50.5061 77.0741 50.7559C76.7518 51.0057 76.5217 51.3554 76.4198 51.7501C76.735 51.8537 77.0752 51.8537 77.3904 51.7501C77.6814 51.6472 77.9388 51.4669 78.1349 51.2286C78.3311 50.9903 78.4585 50.703 78.5036 50.3977C78.4034 50.3795 78.3018 50.3702 78.2 50.3701Z",fill:"#F28F8F"}),e.jsx("path",{d:"M69.7222 39.8959L71.8796 39.6153C71.8632 39.4756 71.819 39.3406 71.7497 39.2183C71.6803 39.096 71.5871 38.9888 71.4756 38.903C71.3642 38.8173 71.2367 38.7547 71.1006 38.719C70.9646 38.6834 70.8228 38.6753 70.6836 38.6953C70.3992 38.7322 70.1401 38.8778 69.9608 39.1017C69.7815 39.3256 69.696 39.6103 69.7222 39.8959Z",fill:"#263238"}),e.jsx("path",{d:"M82.984 40.8154L90.1002 43.2396C89.7015 43.2442 89.3091 43.3404 88.9534 43.5206C88.5977 43.7009 88.2881 43.9604 88.0486 44.2792L83.0116 42.3656L82.984 40.8154Z",fill:"#263238"}),e.jsx("path",{d:"M70.7848 43.5936C70.7767 43.7081 70.7916 43.8231 70.8286 43.9317C70.8656 44.0404 70.924 44.1405 71.0003 44.2262C71.0766 44.312 71.1693 44.3816 71.2729 44.4309C71.3765 44.4803 71.4889 44.5084 71.6036 44.5136C71.7178 44.5149 71.8311 44.4936 71.937 44.451C72.043 44.4084 72.1395 44.3454 72.2211 44.2655C72.3026 44.1856 72.3677 44.0905 72.4125 43.9855C72.4573 43.8804 72.481 43.7676 72.4822 43.6534C72.4903 43.539 72.4754 43.424 72.4384 43.3154C72.4014 43.2067 72.343 43.1066 72.2667 43.0209C72.1904 42.9351 72.0977 42.8655 71.9941 42.8162C71.8905 42.7668 71.778 42.7387 71.6634 42.7334C71.5492 42.7322 71.4359 42.7535 71.33 42.7961C71.224 42.8387 71.1275 42.9017 71.0459 42.9816C70.9643 43.0614 70.8993 43.1566 70.8545 43.2616C70.8097 43.3667 70.786 43.4795 70.7848 43.5936Z",fill:"#263238"}),e.jsx("path",{d:"M78.913 43.5939C78.914 43.7608 78.964 43.9238 79.0569 44.0625C79.1498 44.2012 79.2815 44.3095 79.4354 44.3739C79.5894 44.4383 79.7589 44.4561 79.9229 44.4249C80.0869 44.3937 80.2381 44.315 80.3577 44.1986C80.4773 44.0821 80.56 43.933 80.5955 43.7699C80.631 43.6068 80.6178 43.4369 80.5574 43.2813C80.4971 43.1256 80.3923 42.9912 80.2562 42.8946C80.12 42.7981 79.9584 42.7437 79.7916 42.7383C79.5618 42.7359 79.3404 42.8245 79.1757 42.9848C79.0111 43.1452 78.9166 43.3641 78.913 43.5939Z",fill:"#263238"}),e.jsx("path",{d:"M66.585 41.331C66.6371 41.703 66.797 42.0517 67.045 42.3338C67.1305 42.4388 67.1917 42.5613 67.2244 42.6926C67.39 43.378 67.5326 44.6752 67.8592 45.402C68.081 45.9878 68.4817 46.4889 69.0043 46.834C69.527 47.1792 70.1452 47.3509 70.771 47.3248C71.1043 47.3373 71.4379 47.3095 71.7646 47.242H71.8382C72.1218 47.1753 72.3944 47.0684 72.6478 46.9246L72.6938 46.8924L72.7628 46.851L72.8502 46.7912L72.9284 46.7268L73.0158 46.6578C73.0465 46.637 73.0743 46.6122 73.0986 46.5842C73.1542 46.534 73.2064 46.4802 73.255 46.4232C73.5265 46.1195 73.7457 45.7729 73.9036 45.3974C74.3268 44.4498 74.2164 43.125 74.9064 42.9686H74.9892H75.0812C76.0012 42.9686 75.9184 44.4268 76.4612 45.4572C77.004 46.4876 77.8412 47.495 79.8974 47.5226H80.1596C80.2301 47.5273 80.3007 47.5273 80.3712 47.5226C80.5368 47.5125 80.7014 47.4895 80.8634 47.4536L81.0152 47.4168C81.065 47.4058 81.1141 47.3919 81.1624 47.3754L81.259 47.3478C81.4517 47.28 81.6367 47.1921 81.811 47.0856C81.8751 47.0485 81.9366 47.007 81.995 46.9614C82.1092 46.8778 82.2155 46.7839 82.3124 46.6808C82.5747 46.4014 82.785 46.0774 82.9334 45.724C83.2508 45.011 83.3336 43.7138 83.49 43.0376C83.5174 42.8987 83.5705 42.7661 83.6464 42.6466C83.892 42.3773 84.0521 42.0411 84.1064 41.6806C84.1174 41.4959 84.0676 41.3127 83.9646 41.159C83.8616 41.0053 83.711 40.8896 83.536 40.8296L83.0346 40.7652C81.4246 40.5674 79.327 40.4846 78.0712 40.825C76.498 41.2528 75.9506 41.745 75.072 41.745C74.1934 41.745 73.7196 41.2022 72.2246 40.7146C71.0378 40.3282 69.0736 40.342 67.574 40.48L67.114 40.526C66.9504 40.5846 66.8103 40.6948 66.7148 40.84C66.6194 40.9853 66.5738 41.1576 66.585 41.331ZM76.9442 42.32C77.0684 42.1659 77.2256 42.0417 77.4042 41.9566C77.4287 41.9387 77.4549 41.9233 77.4824 41.9106H77.5284C77.5974 41.8738 77.671 41.837 77.7492 41.8048L77.9562 41.722C78.1758 41.6386 78.4 41.5679 78.6278 41.5104L78.8946 41.446C79.1246 41.4 79.3546 41.3632 79.5846 41.3402C79.6397 41.3359 79.6951 41.3359 79.7502 41.3402C81.2636 41.216 82.2112 41.5748 82.5562 41.883C82.9012 42.1912 82.7494 43.608 82.6068 44.321V44.3716C82.6068 44.3716 82.6068 44.4084 82.6068 44.4268C82.6068 44.5142 82.57 44.6108 82.5424 44.7166C82.5148 44.8224 82.5102 44.8316 82.4918 44.8914C82.4596 44.988 82.4274 45.0846 82.3906 45.1858C82.3772 45.2204 82.3618 45.2542 82.3446 45.287C82.3382 45.3074 82.3305 45.3274 82.3216 45.3468L82.2894 45.4158L82.248 45.4986L82.1974 45.5952C82.1974 45.6274 82.156 45.6596 82.133 45.6918C82.1143 45.7272 82.0927 45.7611 82.0686 45.793C81.8313 46.1285 81.5115 46.3971 81.14 46.5728C80.7684 46.7485 80.3579 46.8253 79.948 46.7958C79.5362 46.8183 79.1242 46.7537 78.739 46.6063C78.3538 46.4589 78.004 46.2319 77.7124 45.9402C77.3492 45.5327 77.0973 45.0384 76.981 44.505C76.7556 43.7 76.6498 42.7524 76.9442 42.32ZM68.0294 41.5794C68.1388 41.4822 68.2631 41.403 68.3974 41.3448H68.425L68.5906 41.2804L68.6918 41.2482H68.7746H68.8298H68.8528H68.9356C69.0414 41.2482 69.1564 41.2068 69.2852 41.1884H69.4738H70.0856C70.3064 41.1884 70.5456 41.2206 70.7848 41.2528C71.8658 41.4092 72.9974 41.9106 73.2918 42.3568C73.5862 42.803 73.5218 43.7368 73.3792 44.5142C73.3483 44.6956 73.3021 44.8741 73.2412 45.0478C73.2398 45.0616 73.2398 45.0755 73.2412 45.0892C73.2412 45.0892 73.2412 45.1214 73.2412 45.1398V45.1766L73.2136 45.241L73.1584 45.3698C73.1584 45.4066 73.1216 45.448 73.0986 45.4848C73.0994 45.4971 73.0994 45.5094 73.0986 45.5216L73.0526 45.5998L73.0112 45.6642C72.7658 46.0258 72.4258 46.3131 72.0284 46.4948C71.6309 46.6765 71.1912 46.7456 70.7572 46.6946C70.3644 46.6862 69.9782 46.592 69.6256 46.4186C68.5492 45.8758 68.2732 44.666 68.149 44.1186C67.919 43.2952 67.7074 41.883 68.0294 41.5748V41.5794Z",fill:"#263238"}),e.jsx("path",{d:"M75.3296 42.991L75.1686 48.9066L71.8704 47.9498L74.9478 42.9404C75.0773 42.928 75.2078 42.9453 75.3296 42.991Z",fill:"#874C4C"})]})},R=function(t){var n=t.setStep;return e.jsxs("div",{className:"relative flex sm:items-center justify-content w-full px-6 sm:px-12 pt-8 pb-[80px] overflow-hidden sm:flex-col",children:[e.jsxs("div",{className:"w-[345px] flex flex-col sm:flex-col-reverse items-center mx-auto overflow-hidden",children:[e.jsx(P,{className:"w-[230px] h-[230px] mb-[78px]"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(y,{className:"mb-5 sm:mb-2",children:"Vérifions votre identité"}),e.jsx(b,{children:"Pour réduire le risque de fraude, nous devons vérifier votre identité"})]})]}),e.jsx("div",{className:"hidden sm:flex w-[450px]",children:e.jsx("p",{className:"text-[#3C3C40B3] text-center text-[12px] font-semibold leading-[120%] mb-[18px]",children:"En cliquant sur commencer, j’accepte les conditions d’utilisation de Datakeen et je déclare avoir lu la déclaration de protection des données."})}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(g,{onClick:function(){n(1)},className:"w-full",children:"Commencer ma vérification"})}),e.jsx(x,{})]})]})},O=function(t){var n=t.children,r=t.className;return e.jsx("div",{className:" text-[#3C3C40] text-center text-sm font-medium leading-[120%] ".concat(r),children:n})};function M(e,[t,n]){return Math.min(n,Math.max(t,e))}function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function A(t,n=[]){let r=[];const i=()=>{const e=r.map((e=>o.createContext(e)));return function(n){const r=n?.[t]||e;return o.useMemo((()=>({[`__scope${t}`]:{...n,[t]:r}})),[n,r])}};return i.scopeName=t,[function(n,i){const l=o.createContext(i),a=r.length;r=[...r,i];const s=n=>{const{scope:r,children:i,...s}=n,c=r?.[t]?.[a]||l,u=o.useMemo((()=>s),Object.values(s));return e.jsx(c.Provider,{value:u,children:i})};return s.displayName=n+"Provider",[s,function(e,r){const s=r?.[t]?.[a]||l,c=o.useContext(s);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},D(i,...n)]}function D(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return o.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function _(t){const n=F(t),r=o.forwardRef(((t,r)=>{const{children:i,...l}=t,a=o.Children.toArray(i),s=a.find(H);if(s){const t=s.props.children,i=a.map((e=>e===s?o.Children.count(t)>1?o.Children.only(null):o.isValidElement(t)?t.props.children:null:e));return e.jsx(n,{...l,ref:r,children:o.isValidElement(t)?o.cloneElement(t,void 0,i):null})}return e.jsx(n,{...l,ref:r,children:i})}));return r.displayName=`${t}.Slot`,r}function F(e){const t=o.forwardRef(((e,t)=>{const{children:n,...r}=e;if(o.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==o.Fragment&&(i.ref=t?c(t,e):e),o.cloneElement(n,i)}return o.Children.count(n)>1?o.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var I=Symbol("radix.slottable");function H(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===I}var V=o.createContext(void 0);var W=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((t,n)=>{const r=_(`Primitive.${n}`),i=o.forwardRef(((t,o)=>{const{asChild:i,...l}=t,a=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e.jsx(a,{...l,ref:o})}));return i.displayName=`Primitive.${n}`,{...t,[n]:i}}),{});function B(e){const t=o.useRef(e);return o.useEffect((()=>{t.current=e})),o.useMemo((()=>(...e)=>t.current?.(...e)),[])}var Z,U="dismissableLayer.update",$="dismissableLayer.pointerDownOutside",q="dismissableLayer.focusOutside",z=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K=o.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...d}=t,f=o.useContext(z),[p,m]=o.useState(null),h=p?.ownerDocument??globalThis?.document,[,v]=o.useState({}),g=u(n,(e=>m(e))),C=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),y=C.indexOf(x),b=p?C.indexOf(p):-1,w=f.layersWithOutsidePointerEventsDisabled.size>0,E=b>=y,j=function(e,t=globalThis?.document){const n=B(e),r=o.useRef(!1),i=o.useRef((()=>{}));return o.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){X($,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...f.branches].some((e=>e.contains(t)));E&&!n&&(l?.(e),s?.(e),e.defaultPrevented||c?.())}),h),S=function(e,t=globalThis?.document){const n=B(e),r=o.useRef(!1);return o.useEffect((()=>{const e=e=>{if(e.target&&!r.current){X(q,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...f.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||c?.())}),h);return function(e,t=globalThis?.document){const n=B(e);o.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===f.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),h),o.useEffect((()=>{if(p)return r&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(Z=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Y(),()=>{r&&1===f.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Z)}}),[p,h,r,f]),o.useEffect((()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Y())}),[p,f]),o.useEffect((()=>{const e=()=>v({});return document.addEventListener(U,e),()=>document.removeEventListener(U,e)}),[]),e.jsx(W.div,{...d,ref:g,style:{pointerEvents:w?E?"auto":"none":void 0,...t.style},onFocusCapture:T(t.onFocusCapture,S.onFocusCapture),onBlurCapture:T(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:T(t.onPointerDownCapture,j.onPointerDownCapture)})}));K.displayName="DismissableLayer";function Y(){const e=new CustomEvent(U);document.dispatchEvent(e)}function X(e,t,n,{discrete:r}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&i.flushSync((()=>e.dispatchEvent(t)))}(o,l):o.dispatchEvent(l)}o.forwardRef(((t,n)=>{const r=o.useContext(z),i=o.useRef(null),l=u(n,i);return o.useEffect((()=>{const e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),e.jsx(W.div,{...t,ref:l})})).displayName="DismissableLayerBranch";var G=0;function J(){const 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 Q="focusScope.autoFocusOnMount",ee="focusScope.autoFocusOnUnmount",te={bubbles:!1,cancelable:!0},ne=o.forwardRef(((t,n)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:a,...s}=t,[c,d]=o.useState(null),f=B(l),p=B(a),m=o.useRef(null),h=u(n,(e=>d(e))),v=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect((()=>{if(i){let e=function(e){if(v.paused||!c)return;const t=e.target;c.contains(t)?m.current=t:le(m.current,{select:!0})},t=function(e){if(v.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||le(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&le(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[i,c,v.paused]),o.useEffect((()=>{if(c){ae.add(v);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(Q,te);c.addEventListener(Q,f),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(le(r,{select:t}),document.activeElement!==n)return}((e=re(c),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&le(c))}return()=>{c.removeEventListener(Q,f),setTimeout((()=>{const e=new CustomEvent(ee,te);c.addEventListener(ee,p),c.dispatchEvent(e),e.defaultPrevented||le(t??document.body,{select:!0}),c.removeEventListener(ee,p),ae.remove(v)}),0)}}var e}),[c,f,p,v]);const g=o.useCallback((e=>{if(!r&&!i)return;if(v.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=re(e),n=oe(t,e),r=oe(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&le(i,{select:!0})):(e.preventDefault(),r&&le(o,{select:!0})):n===t&&e.preventDefault()}}),[r,i,v.paused]);return e.jsx(W.div,{tabIndex:-1,...s,ref:h,onKeyDown:g})}));function re(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 oe(e,t){for(const n of e)if(!ie(n,{upTo:t}))return n}function ie(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function le(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}ne.displayName="FocusScope";var ae=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=se(e,t),e.unshift(t)},remove(t){e=se(e,t),e[0]?.resume()}}}();function se(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var ce=globalThis?.document?o.useLayoutEffect:()=>{},ue=o[" useId ".trim().toString()]||(()=>{}),de=0;function fe(e){const[t,n]=o.useState(ue());return ce((()=>{n((e=>e??String(de++)))}),[e]),e||(t?`radix-${t}`:"")}const pe=["top","right","bottom","left"],me=Math.min,he=Math.max,ve=Math.round,ge=Math.floor,Ce=e=>({x:e,y:e}),xe={left:"right",right:"left",bottom:"top",top:"bottom"},ye={start:"end",end:"start"};function be(e,t,n){return he(e,me(t,n))}function we(e,t){return"function"==typeof e?e(t):e}function Ee(e){return e.split("-")[0]}function je(e){return e.split("-")[1]}function Se(e){return"x"===e?"y":"x"}function Ne(e){return"y"===e?"height":"width"}function ke(e){return["top","bottom"].includes(Ee(e))?"y":"x"}function Le(e){return Se(ke(e))}function Pe(e){return e.replace(/start|end/g,(e=>ye[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>xe[e]))}function Oe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Me(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Te(e,t,n){let{reference:r,floating:o}=e;const i=ke(t),l=Le(t),a=Ne(l),s=Ee(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.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-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(je(t)){case"start":p[l]-=f*(n&&c?-1:1);break;case"end":p[l]+=f*(n&&c?-1:1)}return p}async function Ae(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=we(t,e),m=Oe(p),h=a[f?"floating"===d?"reference":"floating":d],v=Me(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(C))&&await(null==i.getScale?void 0:i.getScale(C))||{x:1,y:1},y=Me(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:C,strategy:s}):g);return{top:(v.top-y.top+m.top)/x.y,bottom:(y.bottom-v.bottom+m.bottom)/x.y,left:(v.left-y.left+m.left)/x.x,right:(y.right-v.right+m.right)/x.x}}function De(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _e(e){return pe.some((t=>e[t]>=0))}function Fe(){return"undefined"!=typeof window}function Ie(e){return We(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ve(e){var t;return null==(t=(We(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function We(e){return!!Fe()&&(e instanceof Node||e instanceof He(e).Node)}function Be(e){return!!Fe()&&(e instanceof Element||e instanceof He(e).Element)}function Ze(e){return!!Fe()&&(e instanceof HTMLElement||e instanceof He(e).HTMLElement)}function Ue(e){return!(!Fe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof He(e).ShadowRoot)}function $e(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function qe(e){return["table","td","th"].includes(Ie(e))}function ze(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ke(e){const t=Ye(),n=Be(e)?Ge(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Ye(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Xe(e){return["html","body","#document"].includes(Ie(e))}function Ge(e){return He(e).getComputedStyle(e)}function Je(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if("html"===Ie(e))return e;const t=e.assignedSlot||e.parentNode||Ue(e)&&e.host||Ve(e);return Ue(t)?t.host:t}function et(e){const t=Qe(e);return Xe(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&$e(t)?t:et(t)}function tt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=et(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=He(o);if(i){const e=nt(l);return t.concat(l,l.visualViewport||[],$e(o)?o:[],e&&n?tt(e):[])}return t.concat(o,tt(o,[],n))}function nt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rt(e){const t=Ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=ve(n)!==i||ve(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function ot(e){return Be(e)?e:e.contextElement}function it(e){const t=ot(e);if(!Ze(t))return Ce(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=rt(t);let l=(i?ve(n.width):n.width)/r,a=(i?ve(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}const lt=Ce(0);function at(e){const t=He(e);return Ye()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lt}function st(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ot(e);let l=Ce(1);t&&(r?Be(r)&&(l=it(r)):l=it(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==He(e))&&t}(i,n,r)?at(i):Ce(0);let s=(o.left+a.x)/l.x,c=(o.top+a.y)/l.y,u=o.width/l.x,d=o.height/l.y;if(i){const e=He(i),t=r&&Be(r)?He(r):r;let n=e,o=nt(n);for(;o&&r&&t!==n;){const e=it(o),t=o.getBoundingClientRect(),r=Ge(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=i,c+=l,n=He(o),o=nt(n)}}return Me({width:u,height:d,x:s,y:c})}function ct(e,t){const n=Je(e).scrollLeft;return t?t.left+n:st(Ve(e)).left+n}function ut(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:ct(e,r)),y:r.top+t.scrollTop}}function dt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=He(e),r=Ve(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=Ye();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){const t=Ve(e),n=Je(e),r=e.ownerDocument.body,o=he(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=he(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ct(e);const a=-n.scrollTop;return"rtl"===Ge(r).direction&&(l+=he(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(Ve(e));else if(Be(t))r=function(e,t){const n=st(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ze(e)?it(e):Ce(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=at(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Me(r)}function ft(e,t){const n=Qe(e);return!(n===t||!Be(n)||Xe(n))&&("fixed"===Ge(n).position||ft(n,t))}function pt(e,t,n){const r=Ze(t),o=Ve(t),i="fixed"===n,l=st(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=Ce(0);function c(){s.x=ct(o)}if(r||!r&&!i)if(("body"!==Ie(t)||$e(o))&&(a=Je(t)),r){const e=st(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?Ce(0):ut(o,a);return{x:l.left+a.scrollLeft-s.x-u.x,y:l.top+a.scrollTop-s.y-u.y,width:l.width,height:l.height}}function mt(e){return"static"===Ge(e).position}function ht(e,t){if(!Ze(e)||"fixed"===Ge(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ve(e)===n&&(n=n.ownerDocument.body),n}function vt(e,t){const n=He(e);if(ze(e))return n;if(!Ze(e)){let t=Qe(e);for(;t&&!Xe(t);){if(Be(t)&&!mt(t))return t;t=Qe(t)}return n}let r=ht(e,t);for(;r&&qe(r)&&mt(r);)r=ht(r,t);return r&&Xe(r)&&mt(r)&&!Ke(r)?n:r||function(e){let t=Qe(e);for(;Ze(t)&&!Xe(t);){if(Ke(t))return t;if(ze(t))return null;t=Qe(t)}return null}(e)||n}const gt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=Ve(r),a=!!t&&ze(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=Ce(1);const u=Ce(0),d=Ze(r);if((d||!d&&!i)&&(("body"!==Ie(r)||$e(l))&&(s=Je(r)),Ze(r))){const e=st(r);c=it(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!l||d||i?Ce(0):ut(l,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-s.scrollTop*c.y+u.y+f.y}},getDocumentElement:Ve,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ze(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=tt(e,[],!1).filter((e=>Be(e)&&"body"!==Ie(e))),o=null;const i="fixed"===Ge(e).position;let l=i?Qe(e):e;for(;Be(l)&&!Xe(l);){const t=Ge(l),n=Ke(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||$e(l)&&!n&&ft(e,l))?r=r.filter((e=>e!==l)):o=t,l=Qe(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=i[0],a=i.reduce(((e,n)=>{const r=dt(t,n,o);return e.top=he(r.top,e.top),e.right=me(r.right,e.right),e.bottom=me(r.bottom,e.bottom),e.left=he(r.left,e.left),e}),dt(t,l,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:vt,getElementRects:async function(e){const t=this.getOffsetParent||vt,n=this.getDimensions,r=await n(e.floating);return{reference:pt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=rt(e);return{width:t,height:n}},getScale:it,isElement:Be,isRTL:function(e){return"rtl"===Ge(e).direction}};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ot(e),u=o||i?[...c?tt(c):[],...tt(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=Ve(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const m={rootMargin:-ge(d)+"px "+-ge(o.clientWidth-(u+f))+"px "+-ge(o.clientHeight-(d+p))+"px "+-ge(u)+"px",threshold:he(0,me(1,s))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return l();r?l(!1,r):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}1!==r||Ct(c,e.getBoundingClientRect())||l(),h=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,m=null;l&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!s&&m.observe(c),m.observe(t));let h=s?st(e):null;return s&&function t(){const r=st(e);h&&!Ct(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const yt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:a}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=Ee(n),a=je(n),s="y"===ke(n),c=["left","top"].includes(l)?-1:1,u=i&&s?-1:1,d=we(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}},bt=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=we(e,t),c={x:n,y:r},u=await Ae(t,s),d=ke(Ee(o)),f=Se(d);let p=c[f],m=c[d];if(i){const e="y"===f?"bottom":"right";p=be(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";m=be(m+u["y"===d?"top":"left"],m,m-u[e])}const h=a.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:l}}}}}},wt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...v}=we(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Ee(o),C=ke(a),x=Ee(a)===a,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=f||(x||!h?[Re(a)]:function(e){const t=Re(e);return[Pe(e),t,Pe(t)]}(a)),w="none"!==m;!f&&w&&b.push(...function(e,t,n,r){const o=je(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(Ee(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Pe)))),i}(a,h,m,y));const E=[a,...b],j=await Ae(t,v),S=[];let N=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(j[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=je(e),o=Le(e),i=Ne(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Re(l)),[l,Re(l)]}(o,l,y);S.push(j[e[0]],j[e[1]])}if(N=[...N,{placement:o,overflows:S}],!S.every((e=>e<=0))){var k,L;const e=((null==(k=i.flip)?void 0:k.index)||0)+1,t=E[e];if(t){var P;const n="alignment"===d&&C!==ke(t),r=(null==(P=N[0])?void 0:P.overflows[0])>0;if(!n||r)return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(L=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=N.filter((e=>{if(w){const t=ke(e.placement);return t===C||"y"===t}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])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Et=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:a}=t,{apply:s=()=>{},...c}=we(e,t),u=await Ae(t,c),d=Ee(o),f=je(o),p="y"===ke(o),{width:m,height:h}=i.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const C=h-u.top-u.bottom,x=m-u.left-u.right,y=me(h-u[v],C),b=me(m-u[g],x),w=!t.middlewareData.shift;let E=y,j=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(j=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=C),w&&!f){const e=he(u.left,0),t=he(u.right,0),n=he(u.top,0),r=he(u.bottom,0);p?j=m-2*(0!==e||0!==t?e+t:he(u.left,u.right)):E=h-2*(0!==n||0!==r?n+r:he(u.top,u.bottom))}await s({...t,availableWidth:j,availableHeight:E});const S=await l.getDimensions(a.floating);return m!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}},jt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=we(e,t);switch(r){case"referenceHidden":{const e=De(await Ae(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_e(e)}}}case"escaped":{const e=De(await Ae(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_e(e)}}}default:return{}}}}},St=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:s}=t,{element:c,padding:u=0}=we(e,t)||{};if(null==c)return{};const d=Oe(u),f={x:n,y:r},p=Le(o),m=Ne(p),h=await l.getDimensions(c),v="y"===p,g=v?"top":"left",C=v?"bottom":"right",x=v?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[p]-f[p]-i.floating[m],b=f[p]-i.reference[p],w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(c));let E=w?w[x]:0;E&&await(null==l.isElement?void 0:l.isElement(w))||(E=a.floating[x]||i.floating[m]);const j=y/2-b/2,S=E/2-h[m]/2-1,N=me(d[g],S),k=me(d[C],S),L=N,P=E-h[m]-k,R=E/2-h[m]/2+j,O=be(L,R,P),M=!s.arrow&&null!=je(o)&&R!==O&&i.reference[m]/2-(R<L?N:k)-h[m]/2<0,T=M?R<L?R-L:R-P:0;return{[p]:f[p]+T,data:{[p]:O,centerOffset:R-O-T,...M&&{alignmentOffset:T}},reset:M}}}),Nt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:c=!0}=we(e,t),u={x:n,y:r},d=ke(o),f=Se(d);let p=u[f],m=u[d];const h=we(a,t),v="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var g,C;const e="y"===f?"width":"height",t=["top","left"].includes(Ee(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=l.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(C=l.offset)?void 0:C[d])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},kt=(e,t,n)=>{const r=new Map,o={platform:gt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Te(c,r,s),f=r,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:v,y:g,data:C,reset:x}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[i]:{...p[i],...C}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Te(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Lt="undefined"!=typeof document?t.useLayoutEffect:t.useEffect;function Pt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Pt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Pt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Rt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ot(e,t){const n=Rt(e);return Math.round(t*n)/n}function Mt(e){const t=o.useRef(e);return Lt((()=>{t.current=e})),t}const Tt=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?St({element:n.current,padding:r}).fn(t):{}:n?St({element:n,padding:r}).fn(t):{};var o}}),At=(e,t)=>({...yt(e),options:[e,t]}),Dt=(e,t)=>({...bt(e),options:[e,t]}),_t=(e,t)=>({...Nt(e),options:[e,t]}),Ft=(e,t)=>({...wt(e),options:[e,t]}),It=(e,t)=>({...Et(e),options:[e,t]}),Ht=(e,t)=>({...jt(e),options:[e,t]}),Vt=(e,t)=>({...Tt(e),options:[e,t]});var Wt=o.forwardRef(((t,n)=>{const{children:r,width:o=10,height:i=5,...l}=t;return e.jsx(W.svg,{...l,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Wt.displayName="Arrow";var Bt=Wt;function Zt(e){const[t,n]=o.useState(void 0);return ce((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var Ut="Popper",[$t,qt]=A(Ut),[zt,Kt]=$t(Ut),Yt=t=>{const{__scopePopper:n,children:r}=t,[i,l]=o.useState(null);return e.jsx(zt,{scope:n,anchor:i,onAnchorChange:l,children:r})};Yt.displayName=Ut;var Xt="PopperAnchor",Gt=o.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:i,...l}=t,a=Kt(Xt,r),s=o.useRef(null),c=u(n,s);return o.useEffect((()=>{a.onAnchorChange(i?.current||s.current)})),i?null:e.jsx(W.div,{...l,ref:c})}));Gt.displayName=Xt;var Jt="PopperContent",[Qt,en]=$t(Jt),tn=o.forwardRef(((t,n)=>{const{__scopePopper:r,side:l="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:g="optimized",onPlaced:C,...x}=t,y=Kt(Jt,r),[b,w]=o.useState(null),E=u(n,(e=>w(e))),[j,S]=o.useState(null),N=Zt(j),k=N?.width??0,L=N?.height??0,P=l+("center"!==s?"-"+s:""),R="number"==typeof m?m:{top:0,right:0,bottom:0,left:0,...m},O=Array.isArray(p)?p:[p],M=O.length>0,T={padding:R,boundary:O.filter(ln),altBoundary:M},{refs:A,floatingStyles:D,placement:_,isPositioned:F,middlewareData:I}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=o.useState(r);Pt(m,r)||h(r);const[v,g]=o.useState(null),[C,x]=o.useState(null),y=o.useCallback((e=>{e!==j.current&&(j.current=e,g(e))}),[]),b=o.useCallback((e=>{e!==S.current&&(S.current=e,x(e))}),[]),w=a||v,E=s||C,j=o.useRef(null),S=o.useRef(null),N=o.useRef(f),k=null!=u,L=Mt(u),P=Mt(l),R=Mt(d),O=o.useCallback((()=>{if(!j.current||!S.current)return;const e={placement:t,strategy:n,middleware:m};P.current&&(e.platform=P.current),kt(j.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==R.current};M.current&&!Pt(N.current,t)&&(N.current=t,i.flushSync((()=>{p(t)})))}))}),[m,t,n,P,R]);Lt((()=>{!1===d&&N.current.isPositioned&&(N.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const M=o.useRef(!1);Lt((()=>(M.current=!0,()=>{M.current=!1})),[]),Lt((()=>{if(w&&(j.current=w),E&&(S.current=E),w&&E){if(L.current)return L.current(w,E,O);O()}}),[w,E,O,L,k]);const T=o.useMemo((()=>({reference:j,floating:S,setReference:y,setFloating:b})),[y,b]),A=o.useMemo((()=>({reference:w,floating:E})),[w,E]),D=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Ot(A.floating,f.x),r=Ot(A.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Rt(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,A.floating,f.x,f.y]);return o.useMemo((()=>({...f,update:O,refs:T,elements:A,floatingStyles:D})),[f,O,T,A,D])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>xt(...e,{animationFrame:"always"===g}),elements:{reference:y.anchor},middleware:[At({mainAxis:a+L,alignmentAxis:c}),f&&Dt({mainAxis:!0,crossAxis:!1,limiter:"partial"===h?_t():void 0,...T}),f&&Ft({...T}),It({...T,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}}),j&&Vt({element:j,padding:d}),an({arrowWidth:k,arrowHeight:L}),v&&Ht({strategy:"referenceHidden",...T})]}),[H,V]=sn(_),Z=B(C);ce((()=>{F&&Z?.()}),[F,Z]);const U=I.arrow?.x,$=I.arrow?.y,q=0!==I.arrow?.centerOffset,[z,K]=o.useState();return ce((()=>{b&&K(window.getComputedStyle(b).zIndex)}),[b]),e.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:F?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(Qt,{scope:r,placedSide:H,onArrowChange:S,arrowX:U,arrowY:$,shouldHideArrow:q,children:e.jsx(W.div,{"data-side":H,"data-align":V,...x,ref:E,style:{...x.style,animation:F?void 0:"none"}})})})}));tn.displayName=Jt;var nn="PopperArrow",rn={top:"bottom",right:"left",bottom:"top",left:"right"},on=o.forwardRef((function(t,n){const{__scopePopper:r,...o}=t,i=en(nn,r),l=rn[i.placedSide];return e.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e.jsx(Bt,{...o,ref:n,style:{...o.style,display:"block"}})})}));function ln(e){return null!==e}on.displayName=nn;var an=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,l=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[s,c]=sn(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+l/2,f=(o.arrow?.y??0)+a/2;let p="",m="";return"bottom"===s?(p=i?u:`${d}px`,m=-a+"px"):"top"===s?(p=i?u:`${d}px`,m=`${r.floating.height+a}px`):"right"===s?(p=-a+"px",m=i?u:`${f}px`):"left"===s&&(p=`${r.floating.width+a}px`,m=i?u:`${f}px`),{data:{x:p,y:m}}}});function sn(e){const[t,n="center"]=e.split("-");return[t,n]}var cn=Yt,un=Gt,dn=tn,fn=on,pn=o.forwardRef(((t,r)=>{const{container:i,...l}=t,[a,s]=o.useState(!1);ce((()=>s(!0)),[]);const c=i||a&&globalThis?.document?.body;return c?n.createPortal(e.jsx(W.div,{...l,ref:r}),c):null}));pn.displayName="Portal";var mn=o[" useInsertionEffect ".trim().toString()]||ce;function hn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,l,a]=function({defaultProp:e,onChange:t}){const[n,r]=o.useState(e),i=o.useRef(n),l=o.useRef(t);return mn((()=>{l.current=t}),[t]),o.useEffect((()=>{i.current!==n&&(l.current?.(n),i.current=n)}),[n,i]),[n,r,l]}({defaultProp:t,onChange:n}),s=void 0!==e,c=s?e:i;{const t=o.useRef(void 0!==e);o.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} 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.`)}t.current=s}),[s,r])}const u=o.useCallback((t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&a.current?.(n)}else l(t)}),[s,e,l,a]);return[c,u]}function vn(e){const t=o.useRef({value:e,previous:e});return o.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}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"});o.forwardRef(((t,n)=>e.jsx(W.span,{...t,ref:n,style:{...gn,...t.style}}))).displayName="VisuallyHidden";var Cn=new WeakMap,xn=new WeakMap,yn={},bn=0,wn=function(e){return e&&(e.host||wn(e.parentNode))},En=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=wn(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);yn[n]||(yn[n]=new WeakMap);var i=yn[n],l=[],a=new Set,s=new Set(o),c=function(e){e&&!a.has(e)&&(a.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(a.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(Cn.get(e)||0)+1,c=(i.get(e)||0)+1;Cn.set(e,s),i.set(e,c),l.push(e),1===s&&o&&xn.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),a.clear(),bn++,function(){l.forEach((function(e){var t=Cn.get(e)-1,o=i.get(e)-1;Cn.set(e,t),i.set(e,o),t||(xn.has(e)||e.removeAttribute(r),xn.delete(e)),o||e.removeAttribute(n)})),--bn||(Cn=new WeakMap,Cn=new WeakMap,xn=new WeakMap,yn={})}},jn=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),En(r,o,n,"aria-hidden")):function(){return null}},Sn="right-scroll-bar-position",Nn="width-before-scroll-bar";function kn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Ln="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,Pn=new WeakMap;function Rn(e,n){var r,o,i,l=(r=null,o=function(t){return e.forEach((function(e){return kn(e,t)}))},(i=t.useState((function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=o,i.facade);return Ln((function(){var t=Pn.get(l);if(t){var n=new Set(t),r=new Set(e),o=l.current;n.forEach((function(e){r.has(e)||kn(e,null)})),r.forEach((function(e){n.has(e)||kn(e,o)}))}Pn.set(l,e)}),[e]),l}function On(e){return e}var Mn=function(e){var t=e.sideCar,n=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return o.createElement(r,l({},n))};Mn.isSideCarExport=!0;var Tn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=On);var n=[],r=!1,o={read:function(){if(r)throw new 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 o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},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 o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),n={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=l({async:!0,ssr:!1},e),t}(),An=function(){},Dn=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:An,onWheelCapture:An,onTouchMoveCapture:An}),i=r[0],s=r[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,m=e.shards,h=e.sideCar,v=e.noRelative,g=e.noIsolation,C=e.inert,x=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,w=e.gapMode,E=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,S=Rn([n,t]),N=l(l({},E),i);return o.createElement(o.Fragment,null,p&&o.createElement(j,{sideCar:Tn,removeScrollBar:f,shards:m,noRelative:v,noIsolation:g,inert:C,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:w}),c?o.cloneElement(o.Children.only(u),l(l({},N),{ref:S})):o.createElement(b,l({},N,{className:d,ref:S}),u))}));Dn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dn.classNames={fullWidth:Nn,zeroRight:Sn};function _n(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Fn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=_n())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},In=function(){var e,t=(e=Fn(),function(t,n){o.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Hn={left:0,top:0,right:0,gap:0},Vn=function(e){return parseInt(e||"",10)||0},Wn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Hn;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Vn(n),Vn(r),Vn(o)]}(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])}},Bn=In(),Zn="data-scroll-locked",Un=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(Zn,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Sn," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(Nn," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(Sn," .").concat(Sn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Nn," .").concat(Nn," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Zn,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},$n=function(){var e=parseInt(document.body.getAttribute(Zn)||"0",10);return isFinite(e)?e:0},qn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;o.useEffect((function(){return document.body.setAttribute(Zn,($n()+1).toString()),function(){var e=$n()-1;e<=0?document.body.removeAttribute(Zn):document.body.setAttribute(Zn,e.toString())}}),[]);var l=o.useMemo((function(){return Wn(i)}),[i]);return o.createElement(Bn,{styles:Un(l,!t,i,n?"":"!important")})},zn=!1;if("undefined"!=typeof window)try{var Kn=Object.defineProperty({},"passive",{get:function(){return zn=!0,!0}});window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch(e){zn=!1}var Yn=!!zn&&{passive:!1},Xn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Gn=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Jn(e,r)){var o=Qn(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Jn=function(e,t){return"v"===e?function(e){return Xn(e,"overflowY")}(t):function(e){return Xn(e,"overflowX")}(t)},Qn=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tr=function(e){return[e.deltaX,e.deltaY]},nr=function(e){return e&&"current"in e?e.current:e},rr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},or=0,ir=[];function lr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ar,sr=(ar=function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(or++)[0],l=o.useState(In)[0],a=o.useRef(e);o.useEffect((function(){a.current=e}),[e]),o.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(nr),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=o.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=er(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-i[0],c="deltaY"in e?e.deltaY:l[1]-i[1],u=e.target,d=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Gn(d,u);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Gn(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var p=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,a=t.contains(l),s=!1,c=i>0,u=0,d=0;do{var f=Qn(e,l),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Jn(e,l)&&(u+=m,d+=p),l=l.parentNode.host||l.parentNode}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(s=!0),s}(p,t,e,"h"===p?s:c)}),[]),c=o.useCallback((function(e){var n=e;if(ir.length&&ir[ir.length-1]===l){var r="deltaY"in n?tr(n):er(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(a.current.shards||[]).map(nr).filter(Boolean).filter((function(e){return e.contains(n.target)}));(i.length>0?s(n,i[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),u=o.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:lr(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),d=o.useCallback((function(e){n.current=er(e),r.current=void 0}),[]),f=o.useCallback((function(t){u(t.type,tr(t),t.target,s(t,e.lockRef.current))}),[]),p=o.useCallback((function(t){u(t.type,er(t),t.target,s(t,e.lockRef.current))}),[]);o.useEffect((function(){return ir.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Yn),document.addEventListener("touchmove",c,Yn),document.addEventListener("touchstart",d,Yn),function(){ir=ir.filter((function(e){return e!==l})),document.removeEventListener("wheel",c,Yn),document.removeEventListener("touchmove",c,Yn),document.removeEventListener("touchstart",d,Yn)}}),[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(l,{styles:rr(i)}):null,m?o.createElement(qn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Tn.useMedium(ar),Mn),cr=o.forwardRef((function(e,t){return o.createElement(Dn,l({},e,{ref:t,sideCar:sr}))}));cr.classNames=Dn.classNames;var ur=[" ","Enter","ArrowUp","ArrowDown"],dr=[" ","Enter"],fr="Select",[pr,mr,hr]=function(n){const r=n+"CollectionProvider",[o,i]=A(r),[l,a]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=n=>{const{scope:r,children:o}=n,i=t.useRef(null),a=t.useRef(new Map).current;return e.jsx(l,{scope:r,itemMap:a,collectionRef:i,children:o})};s.displayName=r;const c=n+"CollectionSlot",d=_(c),f=t.forwardRef(((t,n)=>{const{scope:r,children:o}=t,i=u(n,a(c,r).collectionRef);return e.jsx(d,{ref:i,children:o})}));f.displayName=c;const p=n+"CollectionItemSlot",m="data-radix-collection-item",h=_(p),v=t.forwardRef(((n,r)=>{const{scope:o,children:i,...l}=n,s=t.useRef(null),c=u(r,s),d=a(p,o);return t.useEffect((()=>(d.itemMap.set(s,{ref:s,...l}),()=>{d.itemMap.delete(s)}))),e.jsx(h,{[m]:"",ref:c,children:i})}));return v.displayName=p,[{Provider:s,Slot:f,ItemSlot:v},function(e){const r=a(n+"CollectionConsumer",e),o=t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${m}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)));return n}),[r.collectionRef,r.itemMap]);return o},i]}(fr),[vr,gr]=A(fr,[hr,qt]),Cr=qt(),[xr,yr]=vr(fr),[br,wr]=vr(fr),Er=t=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:l,onOpenChange:a,value:s,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:v}=t,g=Cr(n),[C,x]=o.useState(null),[y,b]=o.useState(null),[w,E]=o.useState(!1),j=function(e){const t=o.useContext(V);return e||t||"ltr"}(d),[S,N]=hn({prop:i,defaultProp:l??!1,onChange:a,caller:fr}),[k,L]=hn({prop:s,defaultProp:c,onChange:u,caller:fr}),P=o.useRef(null),R=!C||(v||!!C.closest("form")),[O,M]=o.useState(new Set),T=Array.from(O).map((e=>e.props.value)).join(";");return e.jsx(cn,{...g,children:e.jsxs(xr,{required:h,scope:n,trigger:C,onTriggerChange:x,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:fe(),value:k,onValueChange:L,open:S,onOpenChange:N,dir:j,triggerPointerDownPosRef:P,disabled:m,children:[e.jsx(pr.Provider,{scope:n,children:e.jsx(br,{scope:t.__scopeSelect,onNativeOptionAdd:o.useCallback((e=>{M((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:o.useCallback((e=>{M((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:r})}),R?e.jsxs(io,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:k,onChange:e=>L(e.target.value),disabled:m,form:v,children:[void 0===k?e.jsx("option",{value:""}):null,Array.from(O)]},T):null]})})};Er.displayName=fr;var jr="SelectTrigger",Sr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,disabled:i=!1,...l}=t,a=Cr(r),s=yr(jr,r),c=s.disabled||i,d=u(n,s.onTriggerChange),f=mr(r),p=o.useRef("touch"),[m,h,v]=ao((e=>{const t=f().filter((e=>!e.disabled)),n=t.find((e=>e.value===s.value)),r=so(t,e,n);void 0!==r&&s.onValueChange(r.value)})),g=e=>{c||(s.onOpenChange(!0),v()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return e.jsx(un,{asChild:!0,...a,children:e.jsx(W.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":lo(s.value)?"":void 0,...l,ref:d,onClick:T(l.onClick,(e=>{e.currentTarget.focus(),"mouse"!==p.current&&g(e)})),onPointerDown:T(l.onPointerDown,(e=>{p.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())})),onKeyDown:T(l.onKeyDown,(e=>{const t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),t&&" "===e.key||ur.includes(e.key)&&(g(),e.preventDefault())}))})})}));Sr.displayName=jr;var Nr="SelectValue",kr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,className:o,style:i,children:l,placeholder:a="",...s}=t,c=yr(Nr,r),{onValueNodeHasChildrenChange:d}=c,f=void 0!==l,p=u(n,c.onValueNodeChange);return ce((()=>{d(f)}),[d,f]),e.jsx(W.span,{...s,ref:p,style:{pointerEvents:"none"},children:lo(c.value)?e.jsx(e.Fragment,{children:a}):l})}));kr.displayName=Nr;var Lr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,children:o,...i}=t;return e.jsx(W.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})}));Lr.displayName="SelectIcon";var Pr=t=>e.jsx(pn,{asChild:!0,...t});Pr.displayName="SelectPortal";var Rr="SelectContent",Or=o.forwardRef(((t,n)=>{const r=yr(Rr,t.__scopeSelect),[l,a]=o.useState();if(ce((()=>{a(new DocumentFragment)}),[]),!r.open){const n=l;return n?i.createPortal(e.jsx(Tr,{scope:t.__scopeSelect,children:e.jsx(pr.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),n):null}return e.jsx(_r,{...t,ref:n})}));Or.displayName=Rr;var Mr=10,[Tr,Ar]=vr(Rr),Dr=_("SelectContent.RemoveScroll"),_r=o.forwardRef(((t,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:C,avoidCollisions:x,...y}=t,b=yr(Rr,r),[w,E]=o.useState(null),[j,S]=o.useState(null),N=u(n,(e=>E(e))),[k,L]=o.useState(null),[P,R]=o.useState(null),O=mr(r),[M,A]=o.useState(!1),D=o.useRef(!1);o.useEffect((()=>{if(w)return jn(w)}),[w]),o.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??J()),document.body.insertAdjacentElement("beforeend",e[1]??J()),G++,()=>{1===G&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),G--}}),[]);const _=o.useCallback((e=>{const[t,...n]=O().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&j&&(j.scrollTop=0),n===r&&j&&(j.scrollTop=j.scrollHeight),n?.focus(),document.activeElement!==o)return}}),[O,j]),F=o.useCallback((()=>_([k,w])),[_,k,w]);o.useEffect((()=>{M&&F()}),[M,F]);const{onOpenChange:I,triggerPointerDownPosRef:H}=b;o.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(H.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||I(!1),document.removeEventListener("pointermove",t),H.current=null};return null!==H.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,I,H]),o.useEffect((()=>{const e=()=>I(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[I]);const[V,W]=ao((e=>{const t=O().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=so(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),B=o.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==b.value&&b.value===t||r)&&(L(e),r&&(D.current=!0))}),[b.value]),Z=o.useCallback((()=>w?.focus()),[w]),U=o.useCallback(((e,t,n)=>{const r=!D.current&&!n;(void 0!==b.value&&b.value===t||r)&&R(e)}),[b.value]),$="popper"===i?Ir:Fr,q=$===Ir?{side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:C,avoidCollisions:x}:{};return e.jsx(Tr,{scope:r,content:w,viewport:j,onViewportChange:S,itemRefCallback:B,selectedItem:k,onItemLeave:Z,itemTextRefCallback:U,focusSelectedItem:F,selectedItemText:P,position:i,isPositioned:M,searchRef:V,children:e.jsx(cr,{as:Dr,allowPinchZoom:!0,children:e.jsx(ne,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:T(l,(e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:e.jsx(K,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:e.jsx($,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...q,onPlaced:()=>A(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:T(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||W(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>_(t))),e.preventDefault()}}))})})})})})}));_r.displayName="SelectContentImpl";var Fr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:i,...l}=t,a=yr(Rr,r),s=Ar(Rr,r),[c,d]=o.useState(null),[f,p]=o.useState(null),m=u(n,(e=>p(e))),h=mr(r),v=o.useRef(!1),g=o.useRef(!0),{viewport:C,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=s,w=o.useCallback((()=>{if(a.trigger&&a.valueNode&&c&&f&&C&&x&&y){const e=a.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=y.getBoundingClientRect();if("rtl"!==a.dir){const o=r.left-t.left,i=n.left-o,l=e.left-i,a=e.width+l,s=Math.max(a,t.width),u=window.innerWidth-Mr,d=M(i,[Mr,Math.max(Mr,u-s)]);c.style.minWidth=a+"px",c.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,l=window.innerWidth-e.right-i,a=e.width+l,s=Math.max(a,t.width),u=window.innerWidth-Mr,d=M(i,[Mr,Math.max(Mr,u-s)]);c.style.minWidth=a+"px",c.style.right=d+"px"}const o=h(),l=window.innerHeight-2*Mr,s=C.scrollHeight,u=window.getComputedStyle(f),d=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),g=d+p+s+parseInt(u.paddingBottom,10)+m,b=Math.min(5*x.offsetHeight,g),w=window.getComputedStyle(C),E=parseInt(w.paddingTop,10),j=parseInt(w.paddingBottom,10),S=e.top+e.height/2-Mr,N=l-S,k=x.offsetHeight/2,L=d+p+(x.offsetTop+k),P=g-L;if(L<=S){const e=o.length>0&&x===o[o.length-1].ref.current;c.style.bottom="0px";const t=f.clientHeight-C.offsetTop-C.offsetHeight,n=L+Math.max(N,k+(e?j:0)+t+m);c.style.height=n+"px"}else{const e=o.length>0&&x===o[0].ref.current;c.style.top="0px";const t=Math.max(S,d+C.offsetTop+(e?E:0)+k)+P;c.style.height=t+"px",C.scrollTop=L-S+C.offsetTop}c.style.margin=`${Mr}px 0`,c.style.minHeight=b+"px",c.style.maxHeight=l+"px",i?.(),requestAnimationFrame((()=>v.current=!0))}}),[h,a.trigger,a.valueNode,c,f,C,x,y,a.dir,i]);ce((()=>w()),[w]);const[E,j]=o.useState();ce((()=>{f&&j(window.getComputedStyle(f).zIndex)}),[f]);const S=o.useCallback((e=>{e&&!0===g.current&&(w(),b?.(),g.current=!1)}),[w,b]);return e.jsx(Hr,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:S,children:e.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:e.jsx(W.div,{...l,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})}));Fr.displayName="SelectItemAlignedPosition";var Ir=o.forwardRef(((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Mr,...l}=t,a=Cr(r);return e.jsx(dn,{...a,...l,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...l.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)"}})}));Ir.displayName="SelectPopperPosition";var[Hr,Vr]=vr(Rr,{}),Wr="SelectViewport",Br=o.forwardRef(((t,n)=>{const{__scopeSelect:r,nonce:i,...l}=t,a=Ar(Wr,r),s=Vr(Wr,r),c=u(n,a.onViewportChange),d=o.useRef(0);return e.jsxs(e.Fragment,{children:[e.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:i}),e.jsx(pr.Slot,{scope:r,children:e.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:T(l.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Mr,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),l=Math.max(o,i);if(l<r){const o=l+e,i=Math.min(r,o),a=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))})})]})}));Br.displayName=Wr;var Zr="SelectGroup",[Ur,$r]=vr(Zr);o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=fe();return e.jsx(Ur,{scope:r,id:i,children:e.jsx(W.div,{role:"group","aria-labelledby":i,...o,ref:n})})})).displayName=Zr;var qr="SelectLabel";o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=$r(qr,r);return e.jsx(W.div,{id:i.id,...o,ref:n})})).displayName=qr;var zr="SelectItem",[Kr,Yr]=vr(zr),Xr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:a,...s}=t,c=yr(zr,r),d=Ar(zr,r),f=c.value===i,[p,m]=o.useState(a??""),[h,v]=o.useState(!1),g=u(n,(e=>d.itemRefCallback?.(e,i,l))),C=fe(),x=o.useRef("touch"),y=()=>{l||(c.onValueChange(i),c.onOpenChange(!1))};if(""===i)throw new 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 e.jsx(Kr,{scope:r,value:i,disabled:l,textId:C,isSelected:f,onItemTextChange:o.useCallback((e=>{m((t=>t||(e?.textContent??"").trim()))}),[]),children:e.jsx(pr.ItemSlot,{scope:r,value:i,disabled:l,textValue:p,children:e.jsx(W.div,{role:"option","aria-labelledby":C,"data-highlighted":h?"":void 0,"aria-selected":f&&h,"data-state":f?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...s,ref:g,onFocus:T(s.onFocus,(()=>v(!0))),onBlur:T(s.onBlur,(()=>v(!1))),onClick:T(s.onClick,(()=>{"mouse"!==x.current&&y()})),onPointerUp:T(s.onPointerUp,(()=>{"mouse"===x.current&&y()})),onPointerDown:T(s.onPointerDown,(e=>{x.current=e.pointerType})),onPointerMove:T(s.onPointerMove,(e=>{x.current=e.pointerType,l?d.onItemLeave?.():"mouse"===x.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:T(s.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()})),onKeyDown:T(s.onKeyDown,(e=>{""!==d.searchRef?.current&&" "===e.key||(dr.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));Xr.displayName=zr;var Gr="SelectItemText",Jr=o.forwardRef(((t,n)=>{const{__scopeSelect:r,className:l,style:a,...s}=t,c=yr(Gr,r),d=Ar(Gr,r),f=Yr(Gr,r),p=wr(Gr,r),[m,h]=o.useState(null),v=u(n,(e=>h(e)),f.onItemTextChange,(e=>d.itemTextRefCallback?.(e,f.value,f.disabled))),g=m?.textContent,C=o.useMemo((()=>e.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value)),[f.disabled,f.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:y}=p;return ce((()=>(x(C),()=>y(C))),[x,y,C]),e.jsxs(e.Fragment,{children:[e.jsx(W.span,{id:f.textId,...s,ref:v}),f.isSelected&&c.valueNode&&!c.valueNodeHasChildren?i.createPortal(s.children,c.valueNode):null]})}));Jr.displayName=Gr;var Qr="SelectItemIndicator",eo=o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return Yr(Qr,r).isSelected?e.jsx(W.span,{"aria-hidden":!0,...o,ref:n}):null}));eo.displayName=Qr;var to="SelectScrollUpButton";o.forwardRef(((t,n)=>{const r=Ar(to,t.__scopeSelect),i=Vr(to,t.__scopeSelect),[l,a]=o.useState(!1),s=u(n,i.onScrollButtonChange);return ce((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),l?e.jsx(ro,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=to;var no="SelectScrollDownButton";o.forwardRef(((t,n)=>{const r=Ar(no,t.__scopeSelect),i=Vr(no,t.__scopeSelect),[l,a]=o.useState(!1),s=u(n,i.onScrollButtonChange);return ce((()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),l?e.jsx(ro,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=no;var ro=o.forwardRef(((t,n)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=t,a=Ar("SelectScrollButton",r),s=o.useRef(null),c=mr(r),u=o.useCallback((()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)}),[]);return o.useEffect((()=>()=>u()),[u]),ce((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),e.jsx(W.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:T(l.onPointerDown,(()=>{null===s.current&&(s.current=window.setInterval(i,50))})),onPointerMove:T(l.onPointerMove,(()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(i,50))})),onPointerLeave:T(l.onPointerLeave,(()=>{u()}))})}));o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t;return e.jsx(W.div,{"aria-hidden":!0,...o,ref:n})})).displayName="SelectSeparator";var oo="SelectArrow";o.forwardRef(((t,n)=>{const{__scopeSelect:r,...o}=t,i=Cr(r),l=yr(oo,r),a=Ar(oo,r);return l.open&&"popper"===a.position?e.jsx(fn,{...i,...o,ref:n}):null})).displayName=oo;var io=o.forwardRef((({__scopeSelect:t,value:n,...r},i)=>{const l=o.useRef(null),a=u(i,l),s=vn(n);return o.useEffect((()=>{const e=l.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[s,n]),e.jsx(W.select,{...r,style:{...gn,...r.style},ref:a,defaultValue:n})}));function lo(e){return""===e||void 0===e}function ao(e){const t=B(e),n=o.useRef(""),r=o.useRef(0),i=o.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),l=o.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return o.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,i,l]}function so(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=(l=e,a=Math.max(o,0),l.map(((e,t)=>l[(a+t)%l.length])));var l,a;1===r.length&&(i=i.filter((e=>e!==n)));const s=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return s!==n?s:void 0}io.displayName="SelectBubbleInput";var co=Er,uo=Sr,fo=kr,po=Lr,mo=Pr,ho=Or,vo=Br,go=Xr,Co=Jr,xo=eo;
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.511.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const yo=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,t,n)=>n?n.toUpperCase():t.toLowerCase())))(e);return t.charAt(0).toUpperCase()+t.slice(1)},bo=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim(),wo=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v0.511.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
-
var
|
|
15
|
+
var Eo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
16
16
|
/**
|
|
17
17
|
* @license lucide-react v0.511.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const jo=t.forwardRef((({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:a,...s},c)=>t.createElement("svg",{ref:c,...Eo,width:n,height:n,stroke:e,strokeWidth:o?24*Number(r)/Number(n):r,className:bo("lucide",i),...!l&&!wo(s)&&{"aria-hidden":"true"},...s},[...a.map((([e,n])=>t.createElement(e,n))),...Array.isArray(l)?l:[l]]))),So=(e,n)=>{const r=t.forwardRef((({className:r,...o},i)=>{return t.createElement(jo,{ref:i,iconNode:n,className:bo(`lucide-${l=yo(e),l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...o});var l}));return r.displayName=yo(e),r},No=So("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ko=So("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Lo=So("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.511.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/var No=function(t){var n=t.items,r=t.title,o=t.selectedItem,i=t.onChange;return e.jsxs("div",{className:"w-64",children:[e.jsx("label",{className:"block mb-1 text-sm font-medium text-gray-700",children:r}),e.jsxs(so,{value:o.id,onValueChange:function(e){var t=n.find((function(t){return t.id===e}));t&&i(t)},children:[e.jsxs(lo,{className:"inline-flex items-center justify-between w-full px-4 py-2 text-sm bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[e.jsx(co,{placeholder:"Select an option"}),e.jsx(uo,{className:"ml-2",children:e.jsx(So,{className:"w-4 h-4"})})]}),e.jsx(fo,{children:e.jsx(po,{className:"z-50 overflow-hidden bg-white border border-gray-200 rounded-md shadow-lg animate-fade-in",children:e.jsx(ho,{className:"p-1",children:n.map((function(t){return e.jsxs(mo,{value:t.id,className:"relative flex select-none items-center rounded-md px-3 py-2 text-sm text-gray-700 cursor-pointer focus:bg-indigo-100 radix-disabled:opacity-50",children:[e.jsx(Co,{children:t.label}),e.jsx(vo,{className:"absolute right-2",children:e.jsx(Eo,{className:"w-4 h-4 text-indigo-600"})})]},t.id)}))})})})]})]})},Lo=[{id:"fr",label:"🇫🇷 Français"},{id:"en",label:"🇺🇸 Anglais"},{id:"zh",label:"🇨🇳 Chinois (Mandarin)"},{id:"hi",label:"🇮🇳 Hindi"},{id:"es",label:"🇪🇸 Espagnol"},{id:"ar",label:"🇸🇦 Arabe"},{id:"bn",label:"🇧🇩 Bengali"},{id:"pt",label:"🇵🇹 Portugais"},{id:"ru",label:"🇷🇺 Russe"},{id:"ja",label:"🇯🇵 Japonais"}];var ko=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),a=o.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return o.useReducer(((e,n)=>t[e][n]??e),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect((()=>{const e=Ro(r.current);a.current="mounted"===l?e:"none"}),[l]),se((()=>{const t=r.current,n=i.current;if(n!==e){const r=a.current,o=Ro(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),se((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,o=o=>{const a=Ro(r.current).includes(o.animationName);if(o.target===t&&a&&(c("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(a.current=Ro(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",o),t.addEventListener("animationend",o),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",o),t.removeEventListener("animationend",o)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:o.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),i="function"==typeof n?n({present:r.isPresent}):o.Children.only(n),a=u(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||r.isPresent?o.cloneElement(i,{ref:a}):null};function Ro(e){return e?.animationName||"none"}ko.displayName="Presence";var Mo="Checkbox",[Po,_o]=_(Mo),[Ao,Oo]=Po(Mo);function To(t){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:a,disabled:s,form:l,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=t,[h,m]=pn({prop:r,defaultProp:a??!1,onChange:u,caller:Mo}),[C,v]=o.useState(null),[g,x]=o.useState(null),y=o.useRef(!1),w=!C||(!!l||!!C.closest("form")),b={checked:h,disabled:s,setChecked:m,control:C,setControl:v,name:c,form:l,value:f,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:!Uo(a)&&a,isFormControl:w,bubbleInput:g,setBubbleInput:x};return e.jsx(Ao,{scope:n,...b,children:Bo(p)?p(b):i})}var Do="CheckboxTrigger",Ho=o.forwardRef((({__scopeCheckbox:t,onKeyDown:n,onClick:r,...i},a)=>{const{control:s,value:l,disabled:c,checked:d,required:f,setControl:p,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:C,bubbleInput:v}=Oo(Do,t),g=u(a,p),x=o.useRef(d);return o.useEffect((()=>{const e=s?.form;if(e){const t=()=>h(x.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[s,h]),e.jsx(V.button,{type:"button",role:"checkbox","aria-checked":Uo(d)?"mixed":d,"aria-required":f,"data-state":zo(d),"data-disabled":c?"":void 0,disabled:c,value:l,...i,ref:g,onKeyDown:P(n,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:P(r,(e=>{h((e=>!!Uo(e)||!e)),v&&C&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})}));Ho.displayName=Do;var Io=o.forwardRef(((t,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:a,required:s,disabled:l,value:c,onCheckedChange:u,form:d,...f}=t;return e.jsx(To,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:l,required:s,onCheckedChange:u,name:o,form:d,value:c,internal_do_not_use_render:({isFormControl:t})=>e.jsxs(e.Fragment,{children:[e.jsx(Ho,{...f,ref:n,__scopeCheckbox:r}),t&&e.jsx(Wo,{__scopeCheckbox:r})]})})}));Io.displayName=Mo;var Vo="CheckboxIndicator",Fo=o.forwardRef(((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=t,a=Oo(Vo,r);return e.jsx(ko,{present:o||Uo(a.checked)||!0===a.checked,children:e.jsx(V.span,{"data-state":zo(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...t.style}})})}));Fo.displayName=Vo;var Zo="CheckboxBubbleInput",Wo=o.forwardRef((({__scopeCheckbox:t,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:c,disabled:d,name:f,value:p,form:h,bubbleInput:m,setBubbleInput:C}=Oo(Zo,t),v=u(r,C),g=hn(s),x=Zt(i);o.useEffect((()=>{const e=m;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(g!==s&&n){const t=new Event("click",{bubbles:r});e.indeterminate=Uo(s),n.call(e,!Uo(s)&&s),e.dispatchEvent(t)}}),[m,g,s,a]);const y=o.useRef(!Uo(s)&&s);return e.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??y.current,required:c,disabled:d,name:f,value:p,form:h,...n,tabIndex:-1,ref:v,style:{...n.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}));function Bo(e){return"function"==typeof e}function Uo(e){return"indeterminate"===e}function zo(e){return Uo(e)?"indeterminate":e?"checked":"unchecked"}Wo.displayName=Zo;var $o=["color"],qo=t.forwardRef((function(e,n){var r=e.color,o=void 0===r?"currentColor":r,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,$o);return t.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Ko=function(n){var r=n.setStep,o=t.useState(Lo[0]),i=o[0],a=o[1],s=t.useState(!1),l=s[0],c=s[1],u=t.useState(!1),d=u[0],f=u[1];return e.jsxs("div",{className:"relative flex sm:items-center justify-content w-full px-4 sm:px-12 pt-8 pb-[80px] overflow-hidden flex-col",children:[e.jsxs("div",{className:"flex flex-col gap-5 mt-4",children:[e.jsx(y,{children:"Nos conditions d’utilisation"}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center gap-2",children:e.jsx(No,{title:"",items:Lo,selectedItem:i,onChange:a})}),e.jsxs(R,{className:"text-left",children:["Ce parcours d’identification est proposé par Datakeen.",e.jsx("br",{}),e.jsx("br",{}),"Nous capturons des photos et/ou vidéos de vos documents et de votre visage afin de vérifier votre identité pour le compte de l’entité qui en fait la demande. Cela inclut la collecte et l’analyse de données biométriques.",e.jsx("br",{}),e.jsx("br",{}),"Datakeen peut également utiliser vos données en tant que responsable du traitement pour ses propres besoins, conformément à sa politique de confidentialité.",e.jsx("br",{}),e.jsx("br",{}),'En cliquant sur "Continuer", vous confirmez avoir pris connaissance et accepté les conditions générales d’utilisation.']})]}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[d&&e.jsx(R,{className:"text-red-500 text-left mt-4",children:"Vous devez accepter les conditions d’utilisation pour continuer."}),e.jsxs("div",{className:"flex flex-row items-center justify-center w-full gap-3 ".concat(d?"mt-2":"mt-4"),children:[e.jsx(Io,{id:"checkbox",checked:l,onCheckedChange:function(e){return function(e){c(e),f(!1)}(!!e)},className:"h-5 w-5 shrink-0 rounded border bg-white data-[state=checked]:bg-[#11E5C5] data-[state=checked]:border-[#11E5C5] ".concat(d?"border-red-500":"border-[#C4C4C4]"),children:e.jsx(Fo,{className:"flex items-center justify-center text-white",children:e.jsx(qo,{className:"h-4 w-4"})})}),e.jsx(C,{htmlFor:"checkbox",children:e.jsx(R,{className:"text-left ".concat(d?"text-red-500":""),children:"Je consens à ce que mes informations biométriques soient traitées dans le but de vérifier mon identité à distance."})})]}),e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(v,{onClick:function(){l?r(1):f(!0)},className:"w-full",children:"Continuer"})}),e.jsx(x,{})]})]})},Yo=function(n){var r=n.stepObject,o=function(e){void 0===e&&(e=768);var n=t.useState("undefined"!=typeof window&&window.innerWidth<e),r=n[0],o=n[1];return t.useEffect((function(){var t=window.matchMedia("(max-width: ".concat(e,"px)")),n=function(){return o(t.matches)};return t.addEventListener("change",n),n(),function(){return t.removeEventListener("change",n)}}),[e]),r}(),i=r.setStep,a=t.useState(0),s=a[0],l=a[1];return e.jsxs(e.Fragment,{children:[0===s&&e.jsx(k,{setStep:o?l:i}),1===s&&e.jsx(Ko,{setStep:i})]})},Xo=function(n){var r=n.sessionId,o=t.useState(0),i=o[0],a=o[1],s=t.useState({lastName:"",firstName:"",birthDate:""}),l=s[0],c=s[1],u={setStep:a,step:i};return r?(t.useEffect((function(){console.log("Session ID:",r),console.log("User Input:",l)}),[r,l]),e.jsxs(N,{className:"w-full h-screen sm:w-[600px] sm:h-[600px] background-white rounded-lg overflow-auto sm:pt-4 sm:pb-4 z-10",children:[0===i&&e.jsx(Yo,{stepObject:u}),1===i&&e.jsx(S,{stepObject:u,setUserInput:c})]})):e.jsx("div",{className:"flex flex-col items-center justify-center h-screen",children:e.jsx("h1",{className:"text-2xl font-bold",children:"Session ID is required"})})};module.exports=function(n){return{SessionComponent:t.useMemo((function(){return n?e.jsx(Xo,{sessionId:n}):e.jsx("div",{children:"No session ID provided."})}),[n])}};
|
|
27
|
+
*/var Po=function(t){var n=t.items,r=t.title,o=t.selectedItem,i=t.onChange;return e.jsxs("div",{className:"w-64",children:[e.jsx("label",{className:"block mb-1 text-sm font-medium text-gray-700",children:r}),e.jsxs(co,{value:o.id,onValueChange:function(e){var t=n.find((function(t){return t.id===e}));t&&i(t)},children:[e.jsxs(uo,{className:"inline-flex items-center justify-between w-full px-4 py-2 text-sm bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#11E5C5]",children:[e.jsx(fo,{placeholder:"Select an option"}),e.jsx(po,{className:"ml-2",children:e.jsx(ko,{className:"w-4 h-4"})})]}),e.jsx(mo,{children:e.jsx(ho,{className:"z-50 overflow-hidden bg-white border border-gray-200 rounded-md shadow-lg animate-fade-in",children:e.jsx(vo,{className:"p-1",children:n.map((function(t){return e.jsxs(go,{value:t.id,className:"relative flex select-none items-center rounded-md px-3 py-2 text-sm text-gray-700 cursor-pointer focus:bg-[#41f6db25] radix-disabled:opacity-50",children:[e.jsx(Co,{children:t.label}),e.jsx(xo,{className:"absolute right-2",children:e.jsx(No,{className:"w-4 h-4 text-[#11E5C5]"})})]},t.id)}))})})})]})]})},Ro=[{id:"fr",label:"🇫🇷 Français"},{id:"en",label:"🇺🇸 English"},{id:"es",label:"🇪🇸 Español"},{id:"pt",label:"🇵🇹 Português"},{id:"de",label:"🇩🇪 Deutsch"},{id:"it",label:"🇮🇹 Italiano"}];var Oo=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=o.useState(),r=o.useRef(null),i=o.useRef(e),l=o.useRef("none"),a=e?"mounted":"unmounted",[s,c]=function(e,t){return o.useReducer(((e,n)=>t[e][n]??e),e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return o.useEffect((()=>{const e=Mo(r.current);l.current="mounted"===s?e:"none"}),[s]),ce((()=>{const t=r.current,n=i.current;if(n!==e){const r=l.current,o=Mo(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}}),[e,c]),ce((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,o=o=>{const l=Mo(r.current).includes(o.animationName);if(o.target===t&&l&&(c("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},a=e=>{e.target===t&&(l.current=Mo(r.current))};return t.addEventListener("animationstart",a),t.addEventListener("animationcancel",o),t.addEventListener("animationend",o),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",a),t.removeEventListener("animationcancel",o),t.removeEventListener("animationend",o)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:o.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),i="function"==typeof n?n({present:r.isPresent}):o.Children.only(n),l=u(r.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||r.isPresent?o.cloneElement(i,{ref:l}):null};function Mo(e){return e?.animationName||"none"}Oo.displayName="Presence";var To="Checkbox",[Ao,Do]=A(To),[_o,Fo]=Ao(To);function Io(t){const{__scopeCheckbox:n,checked:r,children:i,defaultChecked:l,disabled:a,form:s,name:c,onCheckedChange:u,required:d,value:f="on",internal_do_not_use_render:p}=t,[m,h]=hn({prop:r,defaultProp:l??!1,onChange:u,caller:To}),[v,g]=o.useState(null),[C,x]=o.useState(null),y=o.useRef(!1),b=!v||(!!s||!!v.closest("form")),w={checked:m,disabled:a,setChecked:h,control:v,setControl:g,name:c,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:d,defaultChecked:!zo(l)&&l,isFormControl:b,bubbleInput:C,setBubbleInput:x};return e.jsx(_o,{scope:n,...w,children:qo(p)?p(w):i})}var Ho="CheckboxTrigger",Vo=o.forwardRef((({__scopeCheckbox:t,onKeyDown:n,onClick:r,...i},l)=>{const{control:a,value:s,disabled:c,checked:d,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:v,bubbleInput:g}=Fo(Ho,t),C=u(l,p),x=o.useRef(d);return o.useEffect((()=>{const e=a?.form;if(e){const t=()=>m(x.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[a,m]),e.jsx(W.button,{type:"button",role:"checkbox","aria-checked":zo(d)?"mixed":d,"aria-required":f,"data-state":Ko(d),"data-disabled":c?"":void 0,disabled:c,value:s,...i,ref:C,onKeyDown:T(n,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:T(r,(e=>{m((e=>!!zo(e)||!e)),g&&v&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})}));Vo.displayName=Ho;var Wo=o.forwardRef(((t,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:l,required:a,disabled:s,value:c,onCheckedChange:u,form:d,...f}=t;return e.jsx(Io,{__scopeCheckbox:r,checked:i,defaultChecked:l,disabled:s,required:a,onCheckedChange:u,name:o,form:d,value:c,internal_do_not_use_render:({isFormControl:t})=>e.jsxs(e.Fragment,{children:[e.jsx(Vo,{...f,ref:n,__scopeCheckbox:r}),t&&e.jsx($o,{__scopeCheckbox:r})]})})}));Wo.displayName=To;var Bo="CheckboxIndicator",Zo=o.forwardRef(((t,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=t,l=Fo(Bo,r);return e.jsx(Oo,{present:o||zo(l.checked)||!0===l.checked,children:e.jsx(W.span,{"data-state":Ko(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...t.style}})})}));Zo.displayName=Bo;var Uo="CheckboxBubbleInput",$o=o.forwardRef((({__scopeCheckbox:t,...n},r)=>{const{control:i,hasConsumerStoppedPropagationRef:l,checked:a,defaultChecked:s,required:c,disabled:d,name:f,value:p,form:m,bubbleInput:h,setBubbleInput:v}=Fo(Uo,t),g=u(r,v),C=vn(a),x=Zt(i);o.useEffect((()=>{const e=h;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!l.current;if(C!==a&&n){const t=new Event("click",{bubbles:r});e.indeterminate=zo(a),n.call(e,!zo(a)&&a),e.dispatchEvent(t)}}),[h,C,a,l]);const y=o.useRef(!zo(a)&&a);return e.jsx(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??y.current,required:c,disabled:d,name:f,value:p,form:m,...n,tabIndex:-1,ref:g,style:{...n.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}));function qo(e){return"function"==typeof e}function zo(e){return"indeterminate"===e}function Ko(e){return zo(e)?"indeterminate":e?"checked":"unchecked"}$o.displayName=Uo;var Yo=["color"],Xo=t.forwardRef((function(e,n){var r=e.color,o=void 0===r?"currentColor":r,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,Yo);return t.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Go=function(n){var r=n.setStep,o=t.useState(Ro[0]),i=o[0],l=o[1],a=t.useState(!1),s=a[0],c=a[1],u=t.useState(!1),d=u[0],f=u[1];return e.jsxs("div",{className:"relative flex sm:items-center justify-content w-full px-4 sm:px-12 pt-8 pb-[80px] overflow-hidden flex-col",children:[e.jsxs("div",{className:"flex flex-col gap-5 mt-4",children:[e.jsx(y,{children:"Nos conditions d’utilisation"}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center gap-2",children:e.jsx(Po,{title:"",items:Ro,selectedItem:i,onChange:l})}),e.jsxs(O,{className:"text-left",children:["Ce parcours d’identification est proposé par Datakeen.",e.jsx("br",{}),e.jsx("br",{}),"Nous capturons des photos et/ou vidéos de vos documents et de votre visage afin de vérifier votre identité pour le compte de l’entité qui en fait la demande. Cela inclut la collecte et l’analyse de données biométriques.",e.jsx("br",{}),e.jsx("br",{}),"Datakeen peut également utiliser vos données en tant que responsable du traitement pour ses propres besoins, conformément à sa politique de confidentialité.",e.jsx("br",{}),e.jsx("br",{}),'En cliquant sur "Continuer", vous confirmez avoir pris connaissance et accepté les conditions générales d’utilisation.']})]}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[d&&e.jsx(O,{className:"text-red-500 text-left mt-4",children:"Vous devez accepter les conditions d’utilisation pour continuer."}),e.jsxs("div",{className:"flex flex-row items-center justify-center w-full gap-3 ".concat(d?"mt-2":"mt-4"),children:[e.jsx(Wo,{id:"checkbox",checked:s,onCheckedChange:function(e){return function(e){c(e),f(!1)}(!!e)},className:"h-5 w-5 shrink-0 rounded border bg-white data-[state=checked]:bg-[#11E5C5] data-[state=checked]:border-[#11E5C5] ".concat(d?"border-red-500":"border-[#C4C4C4]"),children:e.jsx(Zo,{className:"flex items-center justify-center text-white",children:e.jsx(Xo,{className:"h-4 w-4"})})}),e.jsx(v,{htmlFor:"checkbox",children:e.jsx(O,{className:"text-left ".concat(d?"text-red-500":""),children:"Je consens à ce que mes informations biométriques soient traitées dans le but de vérifier mon identité à distance."})})]}),e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(g,{onClick:function(){s?r(1):f(!0)},className:"w-full",children:"Continuer"})}),e.jsx(x,{})]})]})},Jo=function(n){var r=n.stepObject,o=E(),i=r.setStep,l=t.useState(0),a=l[0],s=l[1];return e.jsxs(e.Fragment,{children:[0===a&&e.jsx(R,{setStep:o?s:i}),1===a&&e.jsx(Go,{setStep:i})]})},Qo=[{id:"jdi-1",label:"Carte d'identité - Grand format"},{id:"jdi-2",label:"Carte d'identité - Format carte"},{id:"jdi-3",label:"Passeport biométrique"},{id:"jdi-4",label:"Titre de séjour"},{id:"jdi-5",label:"Permis de conduire - Format carte"},{id:"jdi-6",label:"Permis de conduire - Format dépliant"}],ei=[{id:"jdi-2",label:"Carte d'identité"},{id:"jdi-3",label:"Passeport biométrique"},{id:"jdi-4",label:"Titre de séjour"},{id:"jdi-5",label:"Permis de conduire"}],ti=[{id:"fr",label:"France"},{id:"es",label:"Espagne"},{id:"pt",label:"Portugal"},{id:"de",label:"Allemagne"},{id:"it",label:"Italie"},{id:"us",label:"États-Unis"},{id:"uk",label:"Royaume-Uni"}],ni=function(e){switch(e){case"fr":return Qo;case"es":return ei;default:return[]}return[]},ri=Object.defineProperty,oi=(e,t,n)=>(((e,t,n)=>{t in e?ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let ii=new class{constructor(){oi(this,"current",this.detect()),oi(this,"handoffState","pending"),oi(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}};function li(e){var t,n;return ii.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?null!=(n=null==(t=e.current)?void 0:t.ownerDocument)?n:document:null:document}function ai(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function si(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add((()=>e.removeEventListener(n,r,o)))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(n)))},nextFrame:(...e)=>t.requestAnimationFrame((()=>t.requestAnimationFrame(...e))),setTimeout(...e){let n=setTimeout(...e);return t.add((()=>clearTimeout(n)))},microTask(...e){let n={current:!0};return ai((()=>{n.current&&e[0]()})),t.add((()=>{n.current=!1}))},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add((()=>{Object.assign(e.style,{[t]:r})}))},group(e){let t=si();return e(t),this.add((()=>t.dispose()))},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function ci(){let[e]=t.useState(si);return t.useEffect((()=>()=>e.dispose()),[e]),e}let ui=(e,n)=>{ii.isServer?t.useEffect(e,n):t.useLayoutEffect(e,n)};function di(e){let n=t.useRef(e);return ui((()=>{n.current=e}),[e]),n}let fi=function(e){let n=di(e);return t.useCallback(((...e)=>n.current(...e)),[n])},pi=t.createContext(void 0);function mi(...e){return Array.from(new Set(e.flatMap((e=>"string"==typeof e?e.split(" "):[])))).filter(Boolean).join(" ")}function hi(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,hi),r}var vi=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(vi||{}),gi=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(gi||{});function Ci(){let e=function(){let e=t.useRef([]),n=t.useCallback((t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)}),[]);return(...t)=>{if(!t.every((e=>null==e)))return e.current=t,n}}();return t.useCallback((t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:a}){a=null!=a?a:yi;let s=bi(t,e);if(i)return xi(s,n,r,l,a);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=s;if(e)return xi(t,n,r,l,a)}if(1&c){let{unmount:e=!0,...t}=s;return hi(e?0:1,{0:()=>null,1:()=>xi({...t,hidden:!0,style:{display:"none"}},n,r,l,a)})}return xi(s,n,r,l,a)}({mergeRefs:e,...t})),[e])}function xi(e,n={},r,o,i){let{as:l=r,children:a,refName:s="ref",...c}=ji(e,["unmount","static"]),u=void 0!==e.ref?{[s]:e.ref}:{},d="function"==typeof a?a(n):a;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(n)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let f={};if(n){let e=!1,t=[];for(let[r,o]of Object.entries(n))"boolean"==typeof o&&(e=!0),!0===o&&t.push(r.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`)));if(e){f["data-headlessui-state"]=t.join(" ");for(let e of t)f[`data-${e}`]=""}}if(l===t.Fragment&&(Object.keys(Ei(c)).length>0||Object.keys(Ei(f)).length>0)){if(t.isValidElement(d)&&!(Array.isArray(d)&&d.length>1)){let e=d.props,n=null==e?void 0:e.className,r="function"==typeof n?(...e)=>mi(n(...e),c.className):mi(n,c.className),o=r?{className:r}:{},l=bi(d.props,Ei(ji(c,["ref"])));for(let e in f)e in l&&delete f[e];return t.cloneElement(d,Object.assign({},l,f,u,{ref:i(Si(d),u.ref)},o))}if(Object.keys(Ei(c)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${o} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Ei(c)).concat(Object.keys(Ei(f))).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"))}return t.createElement(l,Object.assign({},ji(c,["ref"]),l!==t.Fragment&&u,l!==t.Fragment&&f),d)}function yi(...e){return e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function bi(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function wi(e){var n;return Object.assign(t.forwardRef(e),{displayName:null!=(n=e.displayName)?n:e.name})}function Ei(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function ji(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function Si(e){return t.version.split(".")[0]>="19"?e.props.ref:e.ref}var Ni=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ni||{});let ki=wi((function(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return Ci()({ourProps:i,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})}));function Li(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function Pi(e){return Li(e)&&"tagName"in e}function Ri(e){return Pi(e)&&"accessKey"in e}function Oi(e){return Pi(e)&&"tabIndex"in e}let Mi=Symbol();function Ti(...e){let n=t.useRef(e);t.useEffect((()=>{n.current=e}),[e]);let r=fi((e=>{for(let t of n.current)null!=t&&("function"==typeof t?t(e):t.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Mi])))?void 0:r}let Ai=t.createContext(null);function Di(){let e=t.useContext(Ai);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Di),e}return e}Ai.displayName="DescriptionContext";let _i=wi((function(e,n){let r=t.useId(),o=t.useContext(pi),{id:i=`headlessui-description-${r}`,...l}=e,a=Di(),s=Ti(n);ui((()=>a.register(i)),[i,a.register]);let c=o||!1,u=t.useMemo((()=>({...a.slot,disabled:c})),[a.slot,c]),d={ref:s,...a.props,id:i};return Ci()({ourProps:d,theirProps:l,slot:u,defaultTag:"p",name:a.name||"Description"})})),Fi=Object.assign(_i,{});var Ii=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ii||{});let Hi=t.createContext((()=>{}));function Vi({value:e,children:n}){return t.createElement(Hi.Provider,{value:e},n)}let Wi=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}};var Bi,Zi,Ui,$i=Object.defineProperty,qi=(e,t,n)=>(((e,t,n)=>{t in e?$i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,t+"",n),n),zi=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ki=(e,t,n)=>(zi(e,t,"read from private field"),n?n.call(e):t.get(e)),Yi=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Xi=(e,t,n,r)=>(zi(e,t,"write to private field"),t.set(e,n),n);let Gi=class{constructor(e){Yi(this,Bi,{}),Yi(this,Zi,new Wi((()=>new Set))),Yi(this,Ui,new Set),qi(this,"disposables",si()),Xi(this,Bi,e)}dispose(){this.disposables.dispose()}get state(){return Ki(this,Bi)}subscribe(e,t){let n={selector:e,callback:t,current:e(Ki(this,Bi))};return Ki(this,Ui).add(n),this.disposables.add((()=>{Ki(this,Ui).delete(n)}))}on(e,t){return Ki(this,Zi).get(e).add(t),this.disposables.add((()=>{Ki(this,Zi).get(e).delete(t)}))}send(e){let t=this.reduce(Ki(this,Bi),e);if(t!==Ki(this,Bi)){Xi(this,Bi,t);for(let e of Ki(this,Ui)){let t=e.selector(Ki(this,Bi));Ji(e.current,t)||(e.current=t,e.callback(t))}for(let t of Ki(this,Zi).get(e.type))t(Ki(this,Bi),e)}}};function Ji(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&Qi(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&Qi(e.entries(),t.entries()):!(!el(e)||!el(t))&&Qi(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function Qi(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function el(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}Bi=new WeakMap,Zi=new WeakMap,Ui=new WeakMap;var tl=Object.defineProperty,nl=(e,t,n)=>(((e,t,n)=>{t in e?tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),rl=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(rl||{});let ol={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(-1!==o){let t=e.stack.slice();return t.splice(o,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},il=class e extends Gi{constructor(){super(...arguments),nl(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),nl(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return hi(t.type,ol,e,t)}};const ll=new Wi((()=>il.new()));var al,sl={exports:{}},cl={};var ul,dl,fl={};
|
|
28
|
+
/**
|
|
29
|
+
* @license React
|
|
30
|
+
* use-sync-external-store-with-selector.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/var pl=(dl||(dl=1,"production"===process.env.NODE_ENV?sl.exports=function(){if(al)return cl;al=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,a=e.useDebugValue;return cl.useSyncExternalStoreWithSelector=function(e,t,s,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l((function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var l=c(e);return void 0!==u&&u(t,l)?(r=e,t):(r=e,o=l)}var r,o,i=!1,l=void 0===s?null:s;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,s,c,u]);var p=r(e,d[0],d[1]);return i((function(){f.hasValue=!0,f.value=p}),[p]),a(p),p},cl}():sl.exports=(ul||(ul=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,a=e.useDebugValue;fl.useSyncExternalStoreWithSelector=function(e,t,s,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l((function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var l=c(e);return void 0!==u&&u(t,l)?(r=e,t):(r=e,o=l)}var r,o,i=!1,l=void 0===s?null:s;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,s,c,u]);var p=r(e,d[0],d[1]);return i((function(){f.hasValue=!0,f.value=p}),[p]),a(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),fl)),sl.exports);function ml(e,t,n=Ji){return pl.useSyncExternalStoreWithSelector(fi((t=>e.subscribe(hl,t))),fi((()=>e.state)),fi((()=>e.state)),fi(t),n)}function hl(e){return e}function vl(e,n){let r=t.useId(),o=ll.get(n),[i,l]=ml(o,t.useCallback((e=>[o.selectors.isTop(e,r),o.selectors.inStack(e,r)]),[o,r]));return ui((()=>{if(e)return o.actions.push(r),()=>o.actions.pop(r)}),[o,e,r]),!!e&&(!l||i)}let gl=new Map,Cl=new Map;function xl(e){var t;let n=null!=(t=Cl.get(e))?t:0;return Cl.set(e,n+1),0!==n||(gl.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>yl(e)}function yl(e){var t;let n=null!=(t=Cl.get(e))?t:1;if(1===n?Cl.delete(e):Cl.set(e,n-1),1!==n)return;let r=gl.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,gl.delete(e))}let bl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(","),wl=["[data-autofocus]"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var El=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(El||{}),jl=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(jl||{}),Sl=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Sl||{});var Nl=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Nl||{});var kl=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(kl||{});function Ll(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let Pl=["textarea","input"].join(",");function Rl(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,l=Array.isArray(e)?n?function(e,t=e=>e){return e.slice().sort(((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(wl)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e):function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(bl)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e);o.length>0&&l.length>1&&(l=l.filter((e=>!o.some((t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))))),r=null!=r?r:i.activeElement;let a,s=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,l.indexOf(r))-1;if(4&t)return Math.max(0,l.indexOf(r))+1;if(8&t)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,f=l.length;do{if(d>=f||d+f<=0)return 0;let e=c+d;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}a=l[e],null==a||a.focus(u),d+=s}while(a!==i.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Pl))&&n}(a)&&a.select(),2}function Ol(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Ml(){return Ol()||/Android/gi.test(window.navigator.userAgent)}function Tl(e,n,r,o){let i=di(r);t.useEffect((()=>{if(e)return document.addEventListener(n,t,o),()=>document.removeEventListener(n,t,o);function t(e){i.current(e)}}),[e,n,o])}function Al(e,n,r,o){let i=di(r);t.useEffect((()=>{if(e)return window.addEventListener(n,t,o),()=>window.removeEventListener(n,t,o);function t(e){i.current(e)}}),[e,n,o])}function Dl(e,n,r){let o=di(r),i=t.useCallback((function(e,t){if(e.defaultPrevented)return;let r=t(e);if(null===r||!r.getRootNode().contains(r)||!r.isConnected)return;let i=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(n);for(let t of i)if(null!==t&&(t.contains(r)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=li(e))?void 0:n.body)&&hi(t,{0:()=>e.matches(bl),1(){let t=e;for(;null!==t;){if(t.matches(bl))return!0;t=t.parentElement}return!1}})}(r,Nl.Loose)&&-1!==r.tabIndex&&e.preventDefault(),o.current(e,r)}),[o,n]),l=t.useRef(null);Tl(e,"pointerdown",(e=>{var t,n;Ml()||(l.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),Tl(e,"pointerup",(e=>{if(Ml()||!l.current)return;let t=l.current;return l.current=null,i(e,(()=>t))}),!0);let a=t.useRef({x:0,y:0});Tl(e,"touchstart",(e=>{a.current.x=e.touches[0].clientX,a.current.y=e.touches[0].clientY}),!0),Tl(e,"touchend",(e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-a.current.x)>=30||Math.abs(n-a.current.y)>=30))return i(e,(()=>Oi(e.target)?e.target:null))}),!0),Al(e,"blur",(e=>i(e,(()=>function(e){return Ri(e)&&"IFRAME"===e.nodeName}(window.document.activeElement)?window.document.activeElement:null))),!0)}function _l(...e){return t.useMemo((()=>li(...e)),[...e])}function Fl(e,n,r,o){let i=di(r);t.useEffect((()=>{function t(e){i.current(e)}return(e=null!=e?e:window).addEventListener(n,t,o),()=>e.removeEventListener(n,t,o)}),[e,n,o])}function Il(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function Hl(){return Ol()?{before({doc:e,d:t,meta:n}){function r(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}t.microTask((()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=si();n.style(e.documentElement,"scrollBehavior","auto"),t.add((()=>t.microTask((()=>n.dispose()))))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,i=null;t.addEventListener(e,"click",(t=>{if(Oi(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),l=e.querySelector(o);Oi(l)&&!r(l)&&(i=l)}catch{}}),!0),t.addEventListener(e,"touchstart",(e=>{if(Oi(e.target)&&function(e){return Pi(e)&&"style"in e}(e.target))if(r(e.target)){let n=e.target;for(;n.parentElement&&r(n.parentElement);)n=n.parentElement;t.style(n,"overscrollBehavior","contain")}else t.style(e.target,"touchAction","none")})),t.addEventListener(e,"touchmove",(e=>{if(Oi(e.target)){if(function(e){return Ri(e)&&"INPUT"===e.nodeName}(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}}),{passive:!1}),t.add((()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),i&&i.isConnected&&(i.scrollIntoView({block:"nearest"}),i=null)}))}))}}:{}}function Vl(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Wl=function(e,t){let n=e(),r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let i=t[e].call(n,...o);i&&(n=i,r.forEach((e=>e())))}}}((()=>new Map),{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:si(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Vl(n)},o=[Hl(),Il(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];o.forEach((({before:e})=>null==e?void 0:e(r))),o.forEach((({after:e})=>null==e?void 0:e(r)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function Bl(e,n,r=()=>({containers:[]})){let o=function(e){return t.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}(Wl),i=n?o.get(n):void 0,l=!!i&&i.count>0;return ui((()=>{if(n&&e)return Wl.dispatch("PUSH",n,r),()=>Wl.dispatch("POP",n,r)}),[e,n]),l}var Zl,Ul;Wl.subscribe((()=>{let e=Wl.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&Wl.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&Wl.dispatch("TEARDOWN",n)}})),"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(Zl=null==process?void 0:process.env)?void 0:Zl.NODE_ENV)&&void 0===(null==(Ul=null==Element?void 0:Element.prototype)?void 0:Ul.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var $l=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))($l||{});function ql(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}function zl(e,n,r,o){let[i,l]=t.useState(r),{hasFlag:a,addFlag:s,removeFlag:c}=function(e=0){let[n,r]=t.useState(e),o=t.useCallback((e=>r(e)),[n]),i=t.useCallback((e=>r((t=>t|e))),[n]),l=t.useCallback((e=>(n&e)===e),[n]),a=t.useCallback((e=>r((t=>t&~e))),[r]),s=t.useCallback((e=>r((t=>t^e))),[r]);return{flags:n,setFlag:o,addFlag:i,hasFlag:l,removeFlag:a,toggleFlag:s}}(e&&i?3:0),u=t.useRef(!1),d=t.useRef(!1),f=ci();return ui((()=>{var t;if(e)return r&&l(!0),n?(null==(t=null==o?void 0:o.start)||t.call(o,r),function(e,{prepare:t,run:n,done:r,inFlight:o}){let i=si();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),i.nextFrame((()=>{n(),i.requestAnimationFrame((()=>{i.add(function(e,t){var n,r;let o=si();if(!e)return o.dispose;let i=!1;o.add((()=>{i=!0}));let l=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter((e=>e instanceof CSSTransition)))?r:[];return 0===l.length?(t(),o.dispose):(Promise.allSettled(l.map((e=>e.finished))).then((()=>{i||t()})),o.dispose)}(e,r))}))})),i.dispose}(n,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(r?(s(3),c(4)):(s(4),c(2)))},run(){d.current?r?(c(3),s(4)):(c(4),s(3)):r?c(1):s(1)},done(){var e;d.current&&"function"==typeof n.getAnimations&&n.getAnimations().length>0||(u.current=!1,c(7),r||l(!1),null==(e=null==o?void 0:o.end)||e.call(o,r))}})):void(r&&s(3))}),[e,r,n,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Kl(e,n){let r=t.useRef([]),o=fi(e);t.useEffect((()=>{let e=[...r.current];for(let[t,i]of n.entries())if(r.current[t]!==i){let t=o(n,e);return r.current=n,t}}),[o,...n])}let Yl=t.createContext(null);Yl.displayName="OpenClosedContext";var Xl=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Xl||{});function Gl(){return t.useContext(Yl)}function Jl({value:e,children:n}){return t.createElement(Yl.Provider,{value:e},n)}function Ql({children:e}){return t.createElement(Yl.Provider,{value:null},e)}let ea=[];function ta(e){let n=fi(e),r=t.useRef(!1);t.useEffect((()=>(r.current=!1,()=>{r.current=!0,ai((()=>{r.current&&n()}))})),[n])}function na(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in o&&o.useSyncExternalStore((()=>()=>{}),(()=>!1),(()=>!e))}(),[t,n]=o.useState(ii.isHandoffComplete);return t&&!1===ii.isHandoffComplete&&n(!1),o.useEffect((()=>{!0!==t&&n(!0)}),[t]),o.useEffect((()=>ii.handoff()),[]),!e&&t}!function(e){function t(){"loading"!==document.readyState&&(e(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}((()=>{function e(e){if(!Oi(e.target)||e.target===document.body||ea[0]===e.target)return;let t=e.target;t=t.closest(bl),ea.unshift(null!=t?t:e.target),ea=ea.filter((e=>null!=e&&e.isConnected)),ea.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}));let ra=t.createContext(!1);function oa(){return t.useContext(ra)}function ia(e){return t.createElement(ra.Provider,{value:e.force},e.children)}let la=t.Fragment,aa=wi((function(e,r){let{ownerDocument:o=null,...i}=e,l=t.useRef(null),a=Ti(function(e,t=!0){return Object.assign(e,{[Mi]:t})}((e=>{l.current=e})),r),s=_l(l),c=null!=o?o:s,u=function(e){let n=oa(),r=t.useContext(ca),[o,i]=t.useState((()=>{var t;if(!n&&null!==r)return null!=(t=r.current)?t:null;if(ii.isServer)return null;let o=null==e?void 0:e.getElementById("headlessui-portal-root");if(o)return o;if(null===e)return null;let i=e.createElement("div");return i.setAttribute("id","headlessui-portal-root"),e.body.appendChild(i)}));return t.useEffect((()=>{null!==o&&(null!=e&&e.body.contains(o)||null==e||e.body.appendChild(o))}),[o,e]),t.useEffect((()=>{n||null!==r&&i(r.current)}),[r,i,n]),o}(c),[d]=t.useState((()=>{var e;return ii.isServer?null:null!=(e=null==c?void 0:c.createElement("div"))?e:null})),f=t.useContext(ua),p=na();ui((()=>{!u||!d||u.contains(d)||(d.setAttribute("data-headlessui-portal",""),u.appendChild(d))}),[u,d]),ui((()=>{if(d&&f)return f.register(d)}),[f,d]),ta((()=>{var e;!u||!d||(Li(d)&&u.contains(d)&&u.removeChild(d),u.childNodes.length<=0&&(null==(e=u.parentElement)||e.removeChild(u)))}));let m=Ci();return p&&u&&d?n.createPortal(m({ourProps:{ref:a},theirProps:i,slot:{},defaultTag:la,name:"Portal"}),d):null}));let sa=t.Fragment,ca=t.createContext(null);let ua=t.createContext(null);function da(){let e=t.useContext(ua),n=t.useRef([]),r=fi((t=>(n.current.push(t),e&&e.register(t),()=>o(t)))),o=fi((t=>{let r=n.current.indexOf(t);-1!==r&&n.current.splice(r,1),e&&e.unregister(t)})),i=t.useMemo((()=>({register:r,unregister:o,portals:n})),[r,o,n]);return[n,t.useMemo((()=>function({children:e}){return t.createElement(ua.Provider,{value:i},e)}),[i])]}let fa=wi((function(e,n){let r=Ti(n),{enabled:o=!0,ownerDocument:i,...l}=e,a=Ci();return o?t.createElement(aa,{...l,ownerDocument:i,ref:r}):a({ourProps:{ref:r},theirProps:l,slot:{},defaultTag:la,name:"Portal"})})),pa=wi((function(e,n){let{target:r,...o}=e,i={ref:Ti(n)},l=Ci();return t.createElement(ca.Provider,{value:r},l({ourProps:i,theirProps:o,defaultTag:sa,name:"Popover.Group"}))})),ma=Object.assign(fa,{Group:pa});function ha(e,t=("undefined"!=typeof document?document.defaultView:null),n){let r=vl(e,"escape");Fl(t,"keydown",(e=>{r&&(e.defaultPrevented||e.key===Ii.Escape&&n(e))}))}let va=t.createContext(null);function ga({children:e,node:n}){let[r,o]=t.useState(null),i=Ca(null!=n?n:r);return t.createElement(va.Provider,{value:i},e,null===i&&t.createElement(ki,{features:Ni.Hidden,ref:e=>{var t,n;if(e)for(let r of null!=(n=null==(t=li(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(r!==document.body&&r!==document.head&&Pi(r)&&null!=r&&r.contains(e)){o(r);break}}}))}function Ca(e=null){var n;return null!=(n=t.useContext(va))?n:e}function xa(){let e=t.useRef(!1);return ui((()=>(e.current=!0,()=>{e.current=!1})),[]),e}var ya=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ya||{});function ba(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)Pi(n.current)&&t.add(n.current);return t}var wa=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(wa||{});let Ea=wi((function(e,n){let r=t.useRef(null),o=Ti(r,n),{initialFocus:i,initialFocusFallback:l,containers:a,features:s=15,...c}=e;na()||(s=0);let u=_l(r);Sa(s,{ownerDocument:u});let d=Na(s,{ownerDocument:u,container:r,initialFocus:i,initialFocusFallback:l});ka(s,{ownerDocument:u,container:r,containers:a,previousActiveElement:d});let f=function(){let e=t.useRef(0);return Al(!0,"keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}(),p=fi((e=>{if(!Ri(r.current))return;let t=r.current;hi(f.current,{[ya.Forwards]:()=>{Rl(t,El.First,{skipElements:[e.relatedTarget,l]})},[ya.Backwards]:()=>{Rl(t,El.Last,{skipElements:[e.relatedTarget,l]})}})})),m=vl(!!(2&s),"focus-trap#tab-lock"),h=ci(),v=t.useRef(!1),g={ref:o,onKeyDown(e){"Tab"==e.key&&(v.current=!0,h.requestAnimationFrame((()=>{v.current=!1})))},onBlur(e){if(!(4&s))return;let t=ba(a);Ri(r.current)&&t.add(r.current);let n=e.relatedTarget;Oi(n)&&"true"!==n.dataset.headlessuiFocusGuard&&(La(t,n)||(v.current?Rl(r.current,hi(f.current,{[ya.Forwards]:()=>El.Next,[ya.Backwards]:()=>El.Previous})|El.WrapAround,{relativeTo:e.target}):Oi(e.target)&&Ll(e.target)))}},C=Ci();return t.createElement(t.Fragment,null,m&&t.createElement(ki,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ni.Focusable}),C({ourProps:g,theirProps:c,defaultTag:"div",name:"FocusTrap"}),m&&t.createElement(ki,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Ni.Focusable}))})),ja=Object.assign(Ea,{features:wa});function Sa(e,{ownerDocument:n}){let r=!!(8&e),o=function(e=!0){let n=t.useRef(ea.slice());return Kl((([e],[t])=>{!0===t&&!1===e&&ai((()=>{n.current.splice(0)})),!1===t&&!0===e&&(n.current=ea.slice())}),[e,ea,n]),fi((()=>{var e;return null!=(e=n.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(r);Kl((()=>{r||(null==n?void 0:n.activeElement)===(null==n?void 0:n.body)&&Ll(o())}),[r]),ta((()=>{r&&Ll(o())}))}function Na(e,{ownerDocument:n,container:r,initialFocus:o,initialFocusFallback:i}){let l=t.useRef(null),a=vl(!!(1&e),"focus-trap#initial-focus"),s=xa();return Kl((()=>{if(0===e)return;if(!a)return void(null!=i&&i.current&&Ll(i.current));let t=r.current;t&&ai((()=>{if(!s.current)return;let r=null==n?void 0:n.activeElement;if(null!=o&&o.current){if((null==o?void 0:o.current)===r)return void(l.current=r)}else if(t.contains(r))return void(l.current=r);if(null!=o&&o.current)Ll(o.current);else{if(16&e){if(Rl(t,El.First|El.AutoFocus)!==jl.Error)return}else if(Rl(t,El.First)!==jl.Error)return;if(null!=i&&i.current&&(Ll(i.current),(null==n?void 0:n.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}l.current=null==n?void 0:n.activeElement}))}),[i,a,e]),l}function ka(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let i=xa(),l=!!(4&e);Fl(null==t?void 0:t.defaultView,"focus",(e=>{if(!l||!i.current)return;let t=ba(r);Ri(n.current)&&t.add(n.current);let a=o.current;if(!a)return;let s=e.target;Ri(s)?La(t,s)?(o.current=s,Ll(s)):(e.preventDefault(),e.stopPropagation(),Ll(a)):Ll(o.current)}),!0)}function La(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Pa(e){var n;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(n=e.as)?n:Da)!==t.Fragment||1===t.Children.count(e.children)}let Ra=t.createContext(null);Ra.displayName="TransitionContext";var Oa=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Oa||{});let Ma=t.createContext(null);function Ta(e){return"children"in e?Ta(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Aa(e,n){let r=di(e),o=t.useRef([]),i=xa(),l=ci(),a=fi(((e,t=gi.Hidden)=>{let n=o.current.findIndex((({el:t})=>t===e));-1!==n&&(hi(t,{[gi.Unmount](){o.current.splice(n,1)},[gi.Hidden](){o.current[n].state="hidden"}}),l.microTask((()=>{var e;!Ta(o)&&i.current&&(null==(e=r.current)||e.call(r))})))})),s=fi((e=>{let t=o.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):o.current.push({el:e,state:"visible"}),()=>a(e,gi.Unmount)})),c=t.useRef([]),u=t.useRef(Promise.resolve()),d=t.useRef({enter:[],leave:[]}),f=fi(((e,t,r)=>{c.current.splice(0),n&&(n.chains.current[t]=n.chains.current[t].filter((([t])=>t!==e))),null==n||n.chains.current[t].push([e,new Promise((e=>{c.current.push(e)}))]),null==n||n.chains.current[t].push([e,new Promise((e=>{Promise.all(d.current[t].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===t?u.current=u.current.then((()=>null==n?void 0:n.wait.current)).then((()=>r(t))):r(t)})),p=fi(((e,t,n)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=c.current.shift())||e()})).then((()=>n(t)))}));return t.useMemo((()=>({children:o,register:s,unregister:a,onStart:f,onStop:p,wait:u,chains:d})),[s,a,o,f,p,d,u])}Ma.displayName="NestingContext";let Da=t.Fragment,_a=vi.RenderStrategy;let Fa=wi((function(e,n){let{show:r,appear:o=!1,unmount:i=!0,...l}=e,a=t.useRef(null),s=Ti(...Pa(e)?[a,n]:null===n?[]:[n]);na();let c=Gl();if(void 0===r&&null!==c&&(r=(c&Xl.Open)===Xl.Open),void 0===r)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,d]=t.useState(r?"visible":"hidden"),f=Aa((()=>{r||d("hidden")})),[p,m]=t.useState(!0),h=t.useRef([r]);ui((()=>{!1!==p&&h.current[h.current.length-1]!==r&&(h.current.push(r),m(!1))}),[h,r]);let v=t.useMemo((()=>({show:r,appear:o,initial:p})),[r,o,p]);ui((()=>{r?d("visible"):!Ta(f)&&null!==a.current&&d("hidden")}),[r,f]);let g={unmount:i},C=fi((()=>{var t;p&&m(!1),null==(t=e.beforeEnter)||t.call(e)})),x=fi((()=>{var t;p&&m(!1),null==(t=e.beforeLeave)||t.call(e)})),y=Ci();return t.createElement(Ma.Provider,{value:f},t.createElement(Ra.Provider,{value:v},y({ourProps:{...g,as:t.Fragment,children:t.createElement(Ia,{ref:s,...g,...l,beforeEnter:C,beforeLeave:x})},theirProps:{},defaultTag:t.Fragment,features:_a,visible:"visible"===u,name:"Transition"})))})),Ia=wi((function(e,n){var r,o;let{transition:i=!0,beforeEnter:l,afterEnter:a,beforeLeave:s,afterLeave:c,enter:u,enterFrom:d,enterTo:f,entered:p,leave:m,leaveFrom:h,leaveTo:v,...g}=e,[C,x]=t.useState(null),y=t.useRef(null),b=Pa(e),w=Ti(...b?[y,n,x]:null===n?[]:[n]),E=null==(r=g.unmount)||r?gi.Unmount:gi.Hidden,{show:j,appear:S,initial:N}=function(){let e=t.useContext(Ra);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[k,L]=t.useState(j?"visible":"hidden"),P=function(){let e=t.useContext(Ma);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:R,unregister:O}=P;ui((()=>R(y)),[R,y]),ui((()=>{if(E===gi.Hidden&&y.current)return j&&"visible"!==k?void L("visible"):hi(k,{hidden:()=>O(y),visible:()=>R(y)})}),[k,y,R,O,j,E]);let M=na();ui((()=>{if(b&&M&&"visible"===k&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[y,k,M,b]);let T=N&&!S,A=S&&j&&N,D=t.useRef(!1),_=Aa((()=>{D.current||(L("hidden"),O(y))}),P),F=fi((e=>{D.current=!0;let t=e?"enter":"leave";_.onStart(y,t,(e=>{"enter"===e?null==l||l():"leave"===e&&(null==s||s())}))})),I=fi((e=>{let t=e?"enter":"leave";D.current=!1,_.onStop(y,t,(e=>{"enter"===e?null==a||a():"leave"===e&&(null==c||c())})),"leave"===t&&!Ta(_)&&(L("hidden"),O(y))}));t.useEffect((()=>{b&&i||(F(j),I(j))}),[j,b,i]);let H=!(!i||!b||!M||T),[,V]=zl(H,C,j,{start:F,end:I}),W=Ei({ref:w,className:(null==(o=mi(g.className,A&&u,A&&d,V.enter&&u,V.enter&&V.closed&&d,V.enter&&!V.closed&&f,V.leave&&m,V.leave&&!V.closed&&h,V.leave&&V.closed&&v,!V.transition&&j&&p))?void 0:o.trim())||void 0,...ql(V)}),B=0;"visible"===k&&(B|=Xl.Open),"hidden"===k&&(B|=Xl.Closed),j&&"hidden"===k&&(B|=Xl.Opening),!j&&"visible"===k&&(B|=Xl.Closing);let Z=Ci();return t.createElement(Ma.Provider,{value:_},t.createElement(Jl,{value:B},Z({ourProps:W,theirProps:g,defaultTag:Da,features:_a,visible:"visible"===k,name:"Transition.Child"})))})),Ha=wi((function(e,n){let r=null!==t.useContext(Ra),o=null!==Gl();return t.createElement(t.Fragment,null,!r&&o?t.createElement(Fa,{ref:n,...e}):t.createElement(Ia,{ref:n,...e}))})),Va=Object.assign(Fa,{Child:Ha,Root:Fa});var Wa=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Wa||{}),Ba=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Ba||{});let Za={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},Ua=t.createContext(null);function $a(e){let n=t.useContext(Ua);if(null===n){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,$a),t}return n}function qa(e,t){return hi(t.type,Za,e,t)}Ua.displayName="DialogContext";let za=wi((function(e,n){let r=t.useId(),{id:o=`headlessui-dialog-${r}`,open:i,onClose:l,initialFocus:a,role:s="dialog",autoFocus:c=!0,__demoMode:u=!1,unmount:d=!1,...f}=e,p=t.useRef(!1);s="dialog"===s||"alertdialog"===s?s:(p.current||(p.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let m=Gl();void 0===i&&null!==m&&(i=(m&Xl.Open)===Xl.Open);let h=t.useRef(null),v=Ti(h,n),g=_l(h),C=i?0:1,[x,y]=t.useReducer(qa,{titleId:null,descriptionId:null,panelRef:t.createRef()}),b=fi((()=>l(!1))),w=fi((e=>y({type:0,id:e}))),E=!!na()&&0===C,[j,S]=da(),N={get current(){var e;return null!=(e=x.panelRef.current)?e:h.current}},k=Ca(),{resolveContainers:L}=function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=_l(n),o=fi((()=>{var o,i;let l=[];for(let t of e)null!==t&&(Pi(t)?l.push(t):"current"in t&&Pi(t.current)&&l.push(t.current));if(null!=t&&t.current)for(let e of t.current)l.push(e);for(let e of null!=(o=null==r?void 0:r.querySelectorAll("html > *, body > *"))?o:[])e!==document.body&&e!==document.head&&Pi(e)&&"headlessui-portal-root"!==e.id&&(n&&(e.contains(n)||e.contains(null==(i=null==n?void 0:n.getRootNode())?void 0:i.host))||l.some((t=>e.contains(t)))||l.push(e));return l}));return{resolveContainers:o,contains:fi((e=>o().some((t=>t.contains(e)))))}}({mainTreeNode:k,portals:j,defaultContainers:[N]}),P=null!==m&&(m&Xl.Closing)===Xl.Closing;!function(e,{allowed:t,disallowed:n}={}){let r=vl(e,"inert-others");ui((()=>{var e,o;if(!r)return;let i=si();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&i.add(xl(t));let l=null!=(o=null==t?void 0:t())?o:[];for(let e of l){if(!e)continue;let t=li(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)l.some((t=>e.contains(t)))||i.add(xl(e));n=n.parentElement}}return i.dispose}),[r,t,n])}(!u&&!P&&E,{allowed:fi((()=>{var e,t;return[null!=(t=null==(e=h.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]})),disallowed:fi((()=>{var e;return[null!=(e=null==k?void 0:k.closest("body > *:not(#headlessui-portal-root)"))?e:null]}))});let R=ll.get(null);ui((()=>{if(E)return R.actions.push(o),()=>R.actions.pop(o)}),[R,o,E]);let O=ml(R,t.useCallback((e=>R.selectors.isTop(e,o)),[R,o]));Dl(O,L,(e=>{e.preventDefault(),b()})),ha(O,null==g?void 0:g.defaultView,(e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),b()})),function(e,t,n=()=>[document.body]){Bl(vl(e,"scroll-lock"),t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}}))}(!u&&!P&&E,g,L),function(e,n,r){let o=di((e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&r()}));t.useEffect((()=>{if(!e)return;let t=null===n?null:Ri(n)?n:n.current;if(!t)return;let r=si();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver((()=>o.current(t)));e.observe(t),r.add((()=>e.disconnect()))}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver((()=>o.current(t)));e.observe(t),r.add((()=>e.disconnect()))}return()=>r.dispose()}),[n,o,e])}(E,h,b);let[M,T]=function(){let[e,n]=t.useState([]);return[e.length>0?e.join(" "):void 0,t.useMemo((()=>function(e){let r=fi((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),o=t.useMemo((()=>({register:r,slot:e.slot,name:e.name,props:e.props,value:e.value})),[r,e.slot,e.name,e.props,e.value]);return t.createElement(Ai.Provider,{value:o},e.children)}),[n])]}(),A=t.useMemo((()=>[{dialogState:C,close:b,setTitleId:w,unmount:d},x]),[C,x,b,w,d]),D=t.useMemo((()=>({open:0===C})),[C]),_={ref:v,id:o,role:s,tabIndex:-1,"aria-modal":u?void 0:0===C||void 0,"aria-labelledby":x.titleId,"aria-describedby":M,unmount:d},F=!function(){var e;let[n]=t.useState((()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null)),[r,o]=t.useState(null!=(e=null==n?void 0:n.matches)&&e);return ui((()=>{if(n)return n.addEventListener("change",e),()=>n.removeEventListener("change",e);function e(e){o(e.matches)}}),[n]),r}(),I=wa.None;E&&!u&&(I|=wa.RestoreFocus,I|=wa.TabLock,c&&(I|=wa.AutoFocus),F&&(I|=wa.InitialFocus));let H=Ci();return t.createElement(Ql,null,t.createElement(ia,{force:!0},t.createElement(ma,null,t.createElement(Ua.Provider,{value:A},t.createElement(pa,{target:h},t.createElement(ia,{force:!1},t.createElement(T,{slot:D},t.createElement(S,null,t.createElement(ja,{initialFocus:a,initialFocusFallback:h,containers:L,features:I},t.createElement(Vi,{value:b},H({ourProps:_,theirProps:f,slot:D,defaultTag:Ka,features:Ya,visible:0===C,name:"Dialog"})))))))))))})),Ka="div",Ya=vi.RenderStrategy|vi.Static;let Xa=wi((function(e,n){let{transition:r=!1,open:o,...i}=e,l=Gl(),a=e.hasOwnProperty("open")||null!==l,s=e.hasOwnProperty("onClose");if(!a&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!l&&"boolean"!=typeof e.open)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if("function"!=typeof e.onClose)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return void 0===o&&!r||i.static?t.createElement(ga,null,t.createElement(za,{ref:n,open:o,...i})):t.createElement(ga,null,t.createElement(Va,{show:o,transition:r,unmount:i.unmount},t.createElement(za,{ref:n,...i})))})),Ga=wi((function(e,n){let r=t.useId(),{id:o=`headlessui-dialog-panel-${r}`,transition:i=!1,...l}=e,[{dialogState:a,unmount:s},c]=$a("Dialog.Panel"),u=Ti(n,c.panelRef),d=t.useMemo((()=>({open:0===a})),[a]),f=fi((e=>{e.stopPropagation()})),p={ref:u,id:o,onClick:f},m=i?Ha:t.Fragment,h=i?{unmount:s}:{},v=Ci();return t.createElement(m,{...h},v({ourProps:p,theirProps:l,slot:d,defaultTag:"div",name:"Dialog.Panel"}))}));wi((function(e,n){let{transition:r=!1,...o}=e,[{dialogState:i,unmount:l}]=$a("Dialog.Backdrop"),a=t.useMemo((()=>({open:0===i})),[i]),s={ref:n,"aria-hidden":!0},c=r?Ha:t.Fragment,u=r?{unmount:l}:{},d=Ci();return t.createElement(c,{...u},d({ourProps:s,theirProps:o,slot:a,defaultTag:"div",name:"Dialog.Backdrop"}))}));let Ja=wi((function(e,n){let r=t.useId(),{id:o=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:l,setTitleId:a}]=$a("Dialog.Title"),s=Ti(n);t.useEffect((()=>(a(o),()=>a(null))),[o,a]);let c=t.useMemo((()=>({open:0===l})),[l]),u={ref:s,id:o};return Ci()({ourProps:u,theirProps:i,slot:c,defaultTag:"h2",name:"Dialog.Title"})})),Qa=Object.assign(Xa,{Panel:Ga,Title:Ja,Description:Fi});var es=function(n){var r=n.title,o=n.items,i=n.selectedItem,l=n.onChange,a=n.className,s=void 0===a?"":a,c=t.useState(!1),u=c[0],d=c[1],f=t.useState(""),p=f[0],m=f[1],h=o.filter((function(e){return e.label.toLowerCase().includes(p.toLowerCase())}));return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col py-6 space-y-2 w-full max-w-[322px] mx-auto ".concat(s),children:[e.jsx("h2",{className:"text-xl font-bold text-left text-[#3C3C40]",children:r}),e.jsxs("button",{onClick:function(){return d(!0)},className:"border rounded-lg px-4 py-3 text-left w-full flex items-center justify-between",style:{borderColor:"rgba(60, 60, 64, 0.3)"},children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{children:(null==i?void 0:i.label)||"Sélectionner un pays"})}),e.jsx(ko,{className:"h-4 w-4 text-gray-400"})]})]}),e.jsxs(Qa,{open:u,onClose:function(){return d(!1)},className:"relative z-50",children:[e.jsx("div",{className:"fixed inset-0 bg-[#00000084] bg-opacity-50","aria-hidden":"true"}),e.jsx("div",{className:"fixed inset-0 flex items-end",children:e.jsxs(Qa.Panel,{className:"w-full bg-white h-[75%] rounded-t-2xl p-4 overflow-y-auto",children:[e.jsxs("div",{className:"flex items-center h-[60px] border rounded-lg mb-4 px-3 py-2",style:{borderColor:"rgba(60, 60, 64, 0.3)"},children:[e.jsx("input",{type:"text",className:"flex-grow outline-none placeholder-gray-500 text-md",placeholder:r,value:p,onChange:function(e){return m(e.target.value)}}),e.jsx("div",{className:"border-l h-5 mx-2",style:{borderColor:"rgba(60, 60, 64, 0.3)"}}),e.jsx(Lo,{className:"w-4 h-4 text-gray-400"})]}),e.jsxs("ul",{className:"space-y-2",children:[h.map((function(t){return e.jsxs("li",{children:[e.jsx("button",{className:"w-full text-left px-4 py-2 rounded hover:bg-gray-100 flex items-center gap-2",onClick:function(){l(t),d(!1),m("")},children:e.jsx("span",{children:t.label})}),e.jsx("div",{className:"border-b border-gray-200",style:{borderColor:"rgba(60, 60, 64, 0.3)"}})]},t.id)})),0===h.length&&e.jsx("li",{className:"text-center text-gray-400 text-sm py-2",children:"Aucun pays trouvé"})]})]})})]})]})},ts=function(n){var r=n.setStep,o=t.useState(null),i=o[0],l=o[1],a=t.useState(null),s=a[0],c=a[1];return e.jsxs("div",{className:"relative flex sm:items-center justify-content w-full px-6 sm:px-12 pt-8 pb-[80px] overflow-hidden sm:flex-col",children:[e.jsxs("div",{className:"flex flex-col gap-5 mt-4 mx-auto w-full max-w-[322px]",children:[e.jsx("div",{className:"flex flex-col sm:flex-col-reverse items-center mx-auto overflow-hidden",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx(y,{className:"mb-5 sm:mb-2",children:"Pays émetteur du document"}),e.jsx(b,{children:"Sélectionnez le pays émetteur indiqué sur votre document d’identité, ainsi que le type de document que vous souhaitez"})]})}),e.jsx("div",{className:"flex flex-col sm:flex-row items-center",children:e.jsx(es,{title:"Pays émetteur",items:ti,selectedItem:i,onChange:l})}),i&&e.jsx("div",{className:"flex flex-col sm:flex-row items-center mt-[-30px]",children:e.jsx(es,{title:"Type de document",items:ni(i.id),selectedItem:s,onChange:c})})]}),e.jsxs("div",{className:"fixed bottom-5 left-0 w-full px-6 sm:static sm:px-12 pb-[env(safe-area-inset-bottom)] bg-white",children:[e.jsx("div",{className:"max-w-[345px] mx-auto py-4 sm:mb-4",children:e.jsx(g,{onClick:function(){r(0)},className:"w-full",children:"Commencer ma vérification"})}),e.jsx(x,{})]})]})},ns=function(n){var r=n.sessionId,o=t.useState(0),i=o[0],l=o[1],a=t.useState({lastName:"",firstName:"",birthDate:""});a[0];var s=a[1],c={setStep:l,step:i};return r?e.jsxs(L,{className:"w-full h-screen sm:w-[600px] sm:h-[600px] background-white rounded-lg overflow-auto sm:pt-4 sm:pb-4 z-10",children:[0===i&&e.jsx(Jo,{stepObject:c}),1===i&&e.jsx(k,{stepObject:c,setUserInput:s}),2===i&&e.jsx(ts,{setStep:l})]}):e.jsx("div",{className:"flex flex-col items-center justify-center h-screen",children:e.jsx("h1",{className:"text-2xl font-bold",children:"Session ID is required"})})};module.exports=function(n){return{SessionComponent:t.useMemo((function(){return n?e.jsx(ns,{sessionId:n}):e.jsx("div",{children:"No session ID provided."})}),[n])}};
|
|
28
37
|
//# sourceMappingURL=index.js.map
|