united-tattoo/.open-next/assets/_next/static/chunks/1289-cf6c0ce38c294aae.js
Nicholai 16cee69250 __Admin dashboard scaffolded with D1 database and R2 file uploads__
This commit implements the core admin dashboard functionality including NextAuth authentication, Cloudflare D1 database integration with complete schema, and Cloudflare R2 file upload system for portfolio images. Features include artist management, appointment scheduling, and data migration capabilities.
2025-09-17 16:08:34 -06:00

1 line
28 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1289],{40875:function(t,e,n){n.d(e,{Z:function(){return r}});let r=(0,n(79205).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},50032:function(t,e,n){n.d(e,{x7:function(){return tL},Me:function(){return tx},oo:function(){return tT},RR:function(){return tA},Cp:function(){return tS},dr:function(){return tE},cv:function(){return tb},uY:function(){return tR},dp:function(){return tC}});let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,a=Math.floor,u=t=>({x:t,y:t}),f={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function s(t,e){return"function"==typeof t?t(e):t}function d(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function h(t){return"x"===t?"y":"x"}function m(t){return"y"===t?"height":"width"}let g=new Set(["top","bottom"]);function y(t){return g.has(d(t))?"y":"x"}function w(t){return t.replace(/start|end/g,t=>c[t])}let v=["left","right"],x=["right","left"],b=["top","bottom"],R=["bottom","top"];function A(t){return t.replace(/left|right|bottom|top/g,t=>f[t])}function C(t){return"number"!=typeof t?{top:0,right:0,bottom:0,left:0,...t}:{top:t,right:t,bottom:t,left:t}}function S(t){let{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function L(t,e,n){let r,{reference:i,floating:o}=t,l=y(e),a=h(y(e)),u=m(a),f=d(e),c="y"===l,s=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,w=i[u]/2-o[u]/2;switch(f){case"top":r={x:s,y:i.y-o.height};break;case"bottom":r={x:s,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:g};break;case"left":r={x:i.x-o.width,y:g};break;default:r={x:i.x,y:i.y}}switch(p(e)){case"start":r[a]-=w*(n&&c?-1:1);break;case"end":r[a]+=w*(n&&c?-1:1)}return r}let E=async(t,e,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=o.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(e)),f=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:s}=L(f,r,u),d=r,p={},h=0;for(let n=0;n<a.length;n++){let{name:o,fn:m}=a[n],{x:g,y:y,data:w,reset:v}=await m({x:c,y:s,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:f,platform:l,elements:{reference:t,floating:e}});c=null!=g?g:c,s=null!=y?y:s,p={...p,[o]:{...p[o],...w}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(f=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:c,y:s}=L(f,d,u)),n=-1)}return{x:c,y:s,placement:d,strategy:i,middlewareData:p}};async function T(t,e){var n;void 0===e&&(e={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=s(e,t),m=C(h),g=a[p?"floating"===d?"reference":"floating":d],y=S(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:f,rootBoundary:c,strategy:u})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),x=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},b=S(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:u}):w);return{top:(y.top-b.top+m.top)/x.y,bottom:(b.bottom-y.bottom+m.bottom)/x.y,left:(y.left-b.left+m.left)/x.x,right:(b.right-y.right+m.right)/x.x}}function O(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function P(t){return r.some(e=>t[e]>=0)}let M=new Set(["left","top"]);async function k(t,e){let{placement:n,platform:r,elements:i}=t,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=d(n),a=p(n),u="y"===y(n),f=M.has(l)?-1:1,c=o&&u?-1:1,h=s(e,t),{mainAxis:m,crossAxis:g,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(g="end"===a?-1*w:w),u?{x:g*c,y:m*f}:{x:m*f,y:g*c}}function D(){return"undefined"!=typeof window}function F(t){return j(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function W(t){var e;return null==(e=(j(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function j(t){return!!D()&&(t instanceof Node||t instanceof H(t).Node)}function N(t){return!!D()&&(t instanceof Element||t instanceof H(t).Element)}function V(t){return!!D()&&(t instanceof HTMLElement||t instanceof H(t).HTMLElement)}function Y(t){return!!D()&&"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof H(t).ShadowRoot)}let B=new Set(["inline","contents"]);function z(t){let{overflow:e,overflowX:n,overflowY:r,display:i}=U(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!B.has(i)}let I=new Set(["table","td","th"]),_=[":popover-open",":modal"];function q(t){return _.some(e=>{try{return t.matches(e)}catch(t){return!1}})}let X=["transform","translate","scale","rotate","perspective"],Z=["transform","translate","scale","rotate","perspective","filter"],$=["paint","layout","strict","content"];function G(t){let e=J(),n=N(t)?U(t):t;return X.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||Z.some(t=>(n.willChange||"").includes(t))||$.some(t=>(n.contain||"").includes(t))}function J(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let K=new Set(["html","body","#document"]);function Q(t){return K.has(F(t))}function U(t){return H(t).getComputedStyle(t)}function tt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function te(t){if("html"===F(t))return t;let e=t.assignedSlot||t.parentNode||Y(t)&&t.host||W(t);return Y(e)?e.host:e}function tn(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);let i=function t(e){let n=te(e);return Q(n)?e.ownerDocument?e.ownerDocument.body:e.body:V(n)&&z(n)?n:t(n)}(t),o=i===(null==(r=t.ownerDocument)?void 0:r.body),l=H(i);if(o){let t=tr(l);return e.concat(l,l.visualViewport||[],z(i)?i:[],t&&n?tn(t):[])}return e.concat(i,tn(i,[],n))}function tr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ti(t){let e=U(t),n=parseFloat(e.width)||0,r=parseFloat(e.height)||0,i=V(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,u=l(n)!==o||l(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function to(t){return N(t)?t:t.contextElement}function tl(t){let e=to(t);if(!V(e))return u(1);let n=e.getBoundingClientRect(),{width:r,height:i,$:o}=ti(e),a=(o?l(n.width):n.width)/r,f=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),f&&Number.isFinite(f)||(f=1),{x:a,y:f}}let ta=u(0);function tu(t){let e=H(t);return J()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ta}function tf(t,e,n,r){var i;void 0===e&&(e=!1),void 0===n&&(n=!1);let o=t.getBoundingClientRect(),l=to(t),a=u(1);e&&(r?N(r)&&(a=tl(r)):a=tl(t));let f=(void 0===(i=n)&&(i=!1),r&&(!i||r===H(l))&&i)?tu(l):u(0),c=(o.left+f.x)/a.x,s=(o.top+f.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(l){let t=H(l),e=r&&N(r)?H(r):r,n=t,i=tr(n);for(;i&&r&&e!==n;){let t=tl(i),e=i.getBoundingClientRect(),r=U(i),o=e.left+(i.clientLeft+parseFloat(r.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(r.paddingTop))*t.y;c*=t.x,s*=t.y,d*=t.x,p*=t.y,c+=o,s+=l,i=tr(n=H(i))}}return S({width:d,height:p,x:c,y:s})}function tc(t,e){let n=tt(t).scrollLeft;return e?e.left+n:tf(W(t)).left+n}function ts(t,e){let n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-tc(t,n),y:n.top+e.scrollTop}}let td=new Set(["absolute","fixed"]);function tp(t,e,n){let r;if("viewport"===e)r=function(t,e){let n=H(t),r=W(t),i=n.visualViewport,o=r.clientWidth,l=r.clientHeight,a=0,u=0;if(i){o=i.width,l=i.height;let t=J();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,u=i.offsetTop)}let f=tc(r);if(f<=0){let t=r.ownerDocument,e=t.body,n=getComputedStyle(e),i="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-e.clientWidth-i);l<=25&&(o-=l)}else f<=25&&(o+=f);return{width:o,height:l,x:a,y:u}}(t,n);else if("document"===e)r=function(t){let e=W(t),n=tt(t),r=t.ownerDocument.body,i=o(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),l=o(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+tc(t),u=-n.scrollTop;return"rtl"===U(r).direction&&(a+=o(e.clientWidth,r.clientWidth)-i),{width:i,height:l,x:a,y:u}}(W(t));else if(N(e))r=function(t,e){let n=tf(t,!0,"fixed"===e),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=V(t)?tl(t):u(1),l=t.clientWidth*o.x;return{width:l,height:t.clientHeight*o.y,x:i*o.x,y:r*o.y}}(e,n);else{let n=tu(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return S(r)}function th(t){return"static"===U(t).position}function tm(t,e){if(!V(t)||"fixed"===U(t).position)return null;if(e)return e(t);let n=t.offsetParent;return W(t)===n&&(n=n.ownerDocument.body),n}function tg(t,e){var n;let r=H(t);if(q(t))return r;if(!V(t)){let e=te(t);for(;e&&!Q(e);){if(N(e)&&!th(e))return e;e=te(e)}return r}let i=tm(t,e);for(;i&&(n=i,I.has(F(n)))&&th(i);)i=tm(i,e);return i&&Q(i)&&th(i)&&!G(i)?r:i||function(t){let e=te(t);for(;V(e)&&!Q(e);){if(G(e))return e;if(q(e))break;e=te(e)}return null}(t)||r}let ty=async function(t){let e=this.getOffsetParent||tg,n=this.getDimensions,r=await n(t.floating);return{reference:function(t,e,n){let r=V(e),i=W(e),o="fixed"===n,l=tf(t,!0,o,e),a={scrollLeft:0,scrollTop:0},f=u(0);if(r||!r&&!o){if(("body"!==F(e)||z(i))&&(a=tt(e)),r){let t=tf(e,!0,o,e);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop}else i&&(f.x=tc(i))}o&&!r&&i&&(f.x=tc(i));let c=!i||r||o?u(0):ts(i,a);return{x:l.left+a.scrollLeft-f.x-c.x,y:l.top+a.scrollTop-f.y-c.y,width:l.width,height:l.height}}(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},tw={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t,o="fixed"===i,l=W(r),a=!!e&&q(e.floating);if(r===l||a&&o)return n;let f={scrollLeft:0,scrollTop:0},c=u(1),s=u(0),d=V(r);if((d||!d&&!o)&&(("body"!==F(r)||z(l))&&(f=tt(r)),V(r))){let t=tf(r);c=tl(r),s.x=t.x+r.clientLeft,s.y=t.y+r.clientTop}let p=!l||d||o?u(0):ts(l,f);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-f.scrollLeft*c.x+s.x+p.x,y:n.y*c.y-f.scrollTop*c.y+s.y+p.y}},getDocumentElement:W,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:l}=t,a=[..."clippingAncestors"===n?q(e)?[]:function(t,e){let n=e.get(t);if(n)return n;let r=tn(t,[],!1).filter(t=>N(t)&&"body"!==F(t)),i=null,o="fixed"===U(t).position,l=o?te(t):t;for(;N(l)&&!Q(l);){let e=U(l),n=G(l);n||"fixed"!==e.position||(i=null),(o?!n&&!i:!n&&"static"===e.position&&!!i&&td.has(i.position)||z(l)&&!n&&function t(e,n){let r=te(e);return!(r===n||!N(r)||Q(r))&&("fixed"===U(r).position||t(r,n))}(t,l))?r=r.filter(t=>t!==l):i=e,l=te(l)}return e.set(t,r),r}(e,this._c):[].concat(n),r],u=a[0],f=a.reduce((t,n)=>{let r=tp(e,n,l);return t.top=o(r.top,t.top),t.right=i(r.right,t.right),t.bottom=i(r.bottom,t.bottom),t.left=o(r.left,t.left),t},tp(e,u,l));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}},getOffsetParent:tg,getElementRects:ty,getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){let{width:e,height:n}=ti(t);return{width:e,height:n}},getScale:tl,isElement:N,isRTL:function(t){return"rtl"===U(t).direction}};function tv(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tx(t,e,n,r){let l;void 0===r&&(r={});let{ancestorScroll:u=!0,ancestorResize:f=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=to(t),h=u||f?[...p?tn(p):[],...tn(e)]:[];h.forEach(t=>{u&&t.addEventListener("scroll",n,{passive:!0}),f&&t.addEventListener("resize",n)});let m=p&&s?function(t,e){let n,r=null,l=W(t);function u(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return!function f(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),u();let d=t.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=d;if(c||e(),!m||!g)return;let y=a(h),w=a(l.clientWidth-(p+m)),v={rootMargin:-y+"px "+-w+"px "+-a(l.clientHeight-(h+g))+"px "+-a(p)+"px",threshold:o(0,i(1,s))||1},x=!0;function b(e){let r=e[0].intersectionRatio;if(r!==s){if(!x)return f();r?f(!1,r):n=setTimeout(()=>{f(!1,1e-7)},1e3)}1!==r||tv(d,t.getBoundingClientRect())||f(),x=!1}try{r=new IntersectionObserver(b,{...v,root:l.ownerDocument})}catch(t){r=new IntersectionObserver(b,v)}r.observe(t)}(!0),u}(p,n):null,g=-1,y=null;c&&(y=new ResizeObserver(t=>{let[r]=t;r&&r.target===p&&y&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(e)})),n()}),p&&!d&&y.observe(p),y.observe(e));let w=d?tf(t):null;return d&&function e(){let r=tf(t);w&&!tv(w,r)&&n(),w=r,l=requestAnimationFrame(e)}(),n(),()=>{var t;h.forEach(t=>{u&&t.removeEventListener("scroll",n),f&&t.removeEventListener("resize",n)}),null==m||m(),null==(t=y)||t.disconnect(),y=null,d&&cancelAnimationFrame(l)}}let tb=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;let{x:i,y:o,placement:l,middlewareData:a}=e,u=await k(e,t);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:l}}}}},tR=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:r,placement:l}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=s(t,e),p={x:n,y:r},m=await T(e,c),g=y(d(l)),w=h(g),v=p[w],x=p[g];if(a){let t="y"===w?"top":"left",e="y"===w?"bottom":"right",n=v+m[t],r=v-m[e];v=o(n,i(v,r))}if(u){let t="y"===g?"top":"left",e="y"===g?"bottom":"right",n=x+m[t],r=x-m[e];x=o(n,i(x,r))}let b=f.fn({...e,[w]:v,[g]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[w]:a,[g]:u}}}}}},tA=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r,i,o,l;let{placement:a,middlewareData:u,rects:f,initialPlacement:c,platform:g,elements:C}=e,{mainAxis:S=!0,crossAxis:L=!0,fallbackPlacements:E,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:M=!0,...k}=s(t,e);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let D=d(a),F=y(c),H=d(c)===c,W=await (null==g.isRTL?void 0:g.isRTL(C.floating)),j=E||(H||!M?[A(c)]:function(t){let e=A(t);return[w(t),e,w(e)]}(c)),N="none"!==P;!E&&N&&j.push(...function(t,e,n,r){let i=p(t),o=function(t,e,n){switch(t){case"top":case"bottom":if(n)return e?x:v;return e?v:x;case"left":case"right":return e?b:R;default:return[]}}(d(t),"start"===n,r);return i&&(o=o.map(t=>t+"-"+i),e&&(o=o.concat(o.map(w)))),o}(c,M,P,W));let V=[c,...j],Y=await T(e,k),B=[],z=(null==(r=u.flip)?void 0:r.overflows)||[];if(S&&B.push(Y[D]),L){let t=function(t,e,n){void 0===n&&(n=!1);let r=p(t),i=h(y(t)),o=m(i),l="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=A(l)),[l,A(l)]}(a,f,W);B.push(Y[t[0]],Y[t[1]])}if(z=[...z,{placement:a,overflows:B}],!B.every(t=>t<=0)){let t=((null==(i=u.flip)?void 0:i.index)||0)+1,e=V[t];if(e&&(!("alignment"===L&&F!==y(e))||z.every(t=>y(t.placement)!==F||t.overflows[0]>0)))return{data:{index:t,overflows:z},reset:{placement:e}};let n=null==(o=z.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:o.placement;if(!n)switch(O){case"bestFit":{let t=null==(l=z.filter(t=>{if(N){let e=y(t.placement);return e===F||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:l[0];t&&(n=t);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}},tC=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,r;let l,a;let{placement:u,rects:f,platform:c,elements:h}=e,{apply:m=()=>{},...g}=s(t,e),w=await T(e,g),v=d(u),x=p(u),b="y"===y(u),{width:R,height:A}=f.floating;"top"===v||"bottom"===v?(l=v,a=x===(await (null==c.isRTL?void 0:c.isRTL(h.floating))?"start":"end")?"left":"right"):(a=v,l="end"===x?"top":"bottom");let C=A-w.top-w.bottom,S=R-w.left-w.right,L=i(A-w[l],C),E=i(R-w[a],S),O=!e.middlewareData.shift,P=L,M=E;if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(M=S),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(P=C),O&&!x){let t=o(w.left,0),e=o(w.right,0),n=o(w.top,0),r=o(w.bottom,0);b?M=R-2*(0!==t||0!==e?t+e:o(w.left,w.right)):P=A-2*(0!==n||0!==r?n+r:o(w.top,w.bottom))}await m({...e,availableWidth:M,availableHeight:P});let k=await c.getDimensions(h.floating);return R!==k.width||A!==k.height?{reset:{rects:!0}}:{}}}},tS=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:r="referenceHidden",...i}=s(t,e);switch(r){case"referenceHidden":{let t=O(await T(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{let t=O(await T(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}},tL=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:r,placement:l,rects:a,platform:u,elements:f,middlewareData:c}=e,{element:d,padding:g=0}=s(t,e)||{};if(null==d)return{};let w=C(g),v={x:n,y:r},x=h(y(l)),b=m(x),R=await u.getDimensions(d),A="y"===x,S=A?"clientHeight":"clientWidth",L=a.reference[b]+a.reference[x]-v[x]-a.floating[b],E=v[x]-a.reference[x],T=await (null==u.getOffsetParent?void 0:u.getOffsetParent(d)),O=T?T[S]:0;O&&await (null==u.isElement?void 0:u.isElement(T))||(O=f.floating[S]||a.floating[b]);let P=O/2-R[b]/2-1,M=i(w[A?"top":"left"],P),k=i(w[A?"bottom":"right"],P),D=O-R[b]-k,F=O/2-R[b]/2+(L/2-E/2),H=o(M,i(F,D)),W=!c.arrow&&null!=p(l)&&F!==H&&a.reference[b]/2-(F<M?M:k)-R[b]/2<0,j=W?F<M?F-M:F-D:0;return{[x]:v[x]+j,data:{[x]:H,centerOffset:F-H-j,...W&&{alignmentOffset:j}},reset:W}}}),tE=function(t){return void 0===t&&(t={}),{options:t,fn(e){let{x:n,y:r,placement:i,rects:o,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=s(t,e),c={x:n,y:r},p=y(i),m=h(p),g=c[m],w=c[p],v=s(a,e),x="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){let t="y"===m?"height":"width",e=o.reference[m]-o.floating[t]+x.mainAxis,n=o.reference[m]+o.reference[t]-x.mainAxis;g<e?g=e:g>n&&(g=n)}if(f){var b,R;let t="y"===m?"width":"height",e=M.has(d(i)),n=o.reference[p]-o.floating[t]+(e&&(null==(b=l.offset)?void 0:b[p])||0)+(e?0:x.crossAxis),r=o.reference[p]+o.reference[t]+(e?0:(null==(R=l.offset)?void 0:R[p])||0)-(e?x.crossAxis:0);w<n?w=n:w>r&&(w=r)}return{[m]:g,[p]:w}}}},tT=(t,e,n)=>{let r=new Map,i={platform:tw,...n},o={...i.platform,_c:r};return E(t,e,{...i,platform:o})}},97859:function(t,e,n){n.d(e,{Cp:function(){return w},RR:function(){return g},YF:function(){return s},cv:function(){return p},dp:function(){return y},dr:function(){return m},uY:function(){return h},x7:function(){return v}});var r=n(50032),i=n(2265),o=n(54887),l="undefined"!=typeof document?i.useLayoutEffect:function(){};function a(t,e){let n,r,i;if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if((n=t.length)!==e.length)return!1;for(r=n;0!=r--;)if(!a(t[r],e[r]))return!1;return!0}if((n=(i=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!t.$$typeof)&&!a(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function u(t){return"undefined"==typeof window?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function f(t,e){let n=u(t);return Math.round(e*n)/n}function c(t){let e=i.useRef(t);return l(()=>{e.current=t}),e}function s(t){void 0===t&&(t={});let{placement:e="bottom",strategy:n="absolute",middleware:s=[],platform:d,elements:{reference:p,floating:h}={},transform:m=!0,whileElementsMounted:g,open:y}=t,[w,v]=i.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=i.useState(s);a(x,s)||b(s);let[R,A]=i.useState(null),[C,S]=i.useState(null),L=i.useCallback(t=>{t!==P.current&&(P.current=t,A(t))},[]),E=i.useCallback(t=>{t!==M.current&&(M.current=t,S(t))},[]),T=p||R,O=h||C,P=i.useRef(null),M=i.useRef(null),k=i.useRef(w),D=null!=g,F=c(g),H=c(d),W=c(y),j=i.useCallback(()=>{if(!P.current||!M.current)return;let t={placement:e,strategy:n,middleware:x};H.current&&(t.platform=H.current),(0,r.oo)(P.current,M.current,t).then(t=>{let e={...t,isPositioned:!1!==W.current};N.current&&!a(k.current,e)&&(k.current=e,o.flushSync(()=>{v(e)}))})},[x,e,n,H,W]);l(()=>{!1===y&&k.current.isPositioned&&(k.current.isPositioned=!1,v(t=>({...t,isPositioned:!1})))},[y]);let N=i.useRef(!1);l(()=>(N.current=!0,()=>{N.current=!1}),[]),l(()=>{if(T&&(P.current=T),O&&(M.current=O),T&&O){if(F.current)return F.current(T,O,j);j()}},[T,O,j,F,D]);let V=i.useMemo(()=>({reference:P,floating:M,setReference:L,setFloating:E}),[L,E]),Y=i.useMemo(()=>({reference:T,floating:O}),[T,O]),B=i.useMemo(()=>{let t={position:n,left:0,top:0};if(!Y.floating)return t;let e=f(Y.floating,w.x),r=f(Y.floating,w.y);return m?{...t,transform:"translate("+e+"px, "+r+"px)",...u(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}},[n,m,Y.floating,w.x,w.y]);return i.useMemo(()=>({...w,update:j,refs:V,elements:Y,floatingStyles:B}),[w,j,V,Y,B])}let d=t=>({name:"arrow",options:t,fn(e){let{element:n,padding:i}="function"==typeof t?t(e):t;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(e):{}:n?(0,r.x7)({element:n,padding:i}).fn(e):{}}}),p=(t,e)=>({...(0,r.cv)(t),options:[t,e]}),h=(t,e)=>({...(0,r.uY)(t),options:[t,e]}),m=(t,e)=>({...(0,r.dr)(t),options:[t,e]}),g=(t,e)=>({...(0,r.RR)(t),options:[t,e]}),y=(t,e)=>({...(0,r.dp)(t),options:[t,e]}),w=(t,e)=>({...(0,r.Cp)(t),options:[t,e]}),v=(t,e)=>({...d(t),options:[t,e]})},58068:function(t,e,n){n.d(e,{B:function(){return u}});var r=n(2265),i=n(73966),o=n(98575),l=n(37053),a=n(57437);function u(t){let e=t+"CollectionProvider",[n,u]=(0,i.b)(e),[f,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=t=>{let{scope:e,children:n}=t,i=r.useRef(null),o=r.useRef(new Map).current;return(0,a.jsx)(f,{scope:e,itemMap:o,collectionRef:i,children:n})};s.displayName=e;let d=t+"CollectionSlot",p=(0,l.Z8)(d),h=r.forwardRef((t,e)=>{let{scope:n,children:r}=t,i=c(d,n),l=(0,o.e)(e,i.collectionRef);return(0,a.jsx)(p,{ref:l,children:r})});h.displayName=d;let m=t+"CollectionItemSlot",g="data-radix-collection-item",y=(0,l.Z8)(m),w=r.forwardRef((t,e)=>{let{scope:n,children:i,...l}=t,u=r.useRef(null),f=(0,o.e)(e,u),s=c(m,n);return r.useEffect(()=>(s.itemMap.set(u,{ref:u,...l}),()=>void s.itemMap.delete(u))),(0,a.jsx)(y,{[g]:"",ref:f,children:i})});return w.displayName=m,[{Provider:s,Slot:h,ItemSlot:w},function(e){let n=c(t+"CollectionConsumer",e);return r.useCallback(()=>{let t=n.collectionRef.current;if(!t)return[];let e=Array.from(t.querySelectorAll("[".concat(g,"]")));return Array.from(n.itemMap.values()).sort((t,n)=>e.indexOf(t.ref.current)-e.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},u]}},29114:function(t,e,n){n.d(e,{gm:function(){return o}});var r=n(2265);n(57437);var i=r.createContext(void 0);function o(t){let e=r.useContext(i);return t||e||"ltr"}},21107:function(t,e,n){n.d(e,{ee:function(){return D},Eh:function(){return H},VY:function(){return F},fC:function(){return k},D7:function(){return g}});var r=n(2265),i=n(97859),o=n(50032),l=n(66840),a=n(57437),u=r.forwardRef((t,e)=>{let{children:n,width:r=10,height:i=5,...o}=t;return(0,a.jsx)(l.WV.svg,{...o,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:(0,a.jsx)("polygon",{points:"0,0 30,0 15,10"})})});u.displayName="Arrow";var f=n(98575),c=n(73966),s=n(26606),d=n(61188),p=n(90420),h="Popper",[m,g]=(0,c.b)(h),[y,w]=m(h),v=t=>{let{__scopePopper:e,children:n}=t,[i,o]=r.useState(null);return(0,a.jsx)(y,{scope:e,anchor:i,onAnchorChange:o,children:n})};v.displayName=h;var x="PopperAnchor",b=r.forwardRef((t,e)=>{let{__scopePopper:n,virtualRef:i,...o}=t,u=w(x,n),c=r.useRef(null),s=(0,f.e)(e,c),d=r.useRef(null);return r.useEffect(()=>{let t=d.current;d.current=(null==i?void 0:i.current)||c.current,t!==d.current&&u.onAnchorChange(d.current)}),i?null:(0,a.jsx)(l.WV.div,{...o,ref:s})});b.displayName=x;var R="PopperContent",[A,C]=m(R),S=r.forwardRef((t,e)=>{var n,u,c,h,m,g,y,v;let{__scopePopper:x,side:b="bottom",sideOffset:C=0,align:S="center",alignOffset:L=0,arrowPadding:E=0,avoidCollisions:T=!0,collisionBoundary:k=[],collisionPadding:D=0,sticky:F="partial",hideWhenDetached:H=!1,updatePositionStrategy:W="optimized",onPlaced:j,...N}=t,V=w(R,x),[Y,B]=r.useState(null),z=(0,f.e)(e,t=>B(t)),[I,_]=r.useState(null),q=(0,p.t)(I),X=null!==(y=null==q?void 0:q.width)&&void 0!==y?y:0,Z=null!==(v=null==q?void 0:q.height)&&void 0!==v?v:0,$="number"==typeof D?D:{top:0,right:0,bottom:0,left:0,...D},G=Array.isArray(k)?k:[k],J=G.length>0,K={padding:$,boundary:G.filter(O),altBoundary:J},{refs:Q,floatingStyles:U,placement:tt,isPositioned:te,middlewareData:tn}=(0,i.YF)({strategy:"fixed",placement:b+("center"!==S?"-"+S:""),whileElementsMounted:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,o.Me)(...e,{animationFrame:"always"===W})},elements:{reference:V.anchor},middleware:[(0,i.cv)({mainAxis:C+Z,alignmentAxis:L}),T&&(0,i.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===F?(0,i.dr)():void 0,...K}),T&&(0,i.RR)({...K}),(0,i.dp)({...K,apply:t=>{let{elements:e,rects:n,availableWidth:r,availableHeight:i}=t,{width:o,height:l}=n.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(i,"px")),a.setProperty("--radix-popper-anchor-width","".concat(o,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),I&&(0,i.x7)({element:I,padding:E}),P({arrowWidth:X,arrowHeight:Z}),H&&(0,i.Cp)({strategy:"referenceHidden",...K})]}),[tr,ti]=M(tt),to=(0,s.W)(j);(0,d.b)(()=>{te&&(null==to||to())},[te,to]);let tl=null===(n=tn.arrow)||void 0===n?void 0:n.x,ta=null===(u=tn.arrow)||void 0===u?void 0:u.y,tu=(null===(c=tn.arrow)||void 0===c?void 0:c.centerOffset)!==0,[tf,tc]=r.useState();return(0,d.b)(()=>{Y&&tc(window.getComputedStyle(Y).zIndex)},[Y]),(0,a.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:te?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:tf,"--radix-popper-transform-origin":[null===(h=tn.transformOrigin)||void 0===h?void 0:h.x,null===(m=tn.transformOrigin)||void 0===m?void 0:m.y].join(" "),...(null===(g=tn.hide)||void 0===g?void 0:g.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:(0,a.jsx)(A,{scope:x,placedSide:tr,onArrowChange:_,arrowX:tl,arrowY:ta,shouldHideArrow:tu,children:(0,a.jsx)(l.WV.div,{"data-side":tr,"data-align":ti,...N,ref:z,style:{...N.style,animation:te?void 0:"none"}})})})});S.displayName=R;var L="PopperArrow",E={top:"bottom",right:"left",bottom:"top",left:"right"},T=r.forwardRef(function(t,e){let{__scopePopper:n,...r}=t,i=C(L,n),o=E[i.placedSide];return(0,a.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:(0,a.jsx)(u,{...r,ref:e,style:{...r.style,display:"block"}})})});function O(t){return null!==t}T.displayName=L;var P=t=>({name:"transformOrigin",options:t,fn(e){var n,r,i,o,l;let{placement:a,rects:u,middlewareData:f}=e,c=(null===(n=f.arrow)||void 0===n?void 0:n.centerOffset)!==0,s=c?0:t.arrowWidth,d=c?0:t.arrowHeight,[p,h]=M(a),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(o=null===(r=f.arrow)||void 0===r?void 0:r.x)&&void 0!==o?o:0)+s/2,y=(null!==(l=null===(i=f.arrow)||void 0===i?void 0:i.y)&&void 0!==l?l:0)+d/2,w="",v="";return"bottom"===p?(w=c?m:"".concat(g,"px"),v="".concat(-d,"px")):"top"===p?(w=c?m:"".concat(g,"px"),v="".concat(u.floating.height+d,"px")):"right"===p?(w="".concat(-d,"px"),v=c?m:"".concat(y,"px")):"left"===p&&(w="".concat(u.floating.width+d,"px"),v=c?m:"".concat(y,"px")),{data:{x:w,y:v}}}});function M(t){let[e,n="center"]=t.split("-");return[e,n]}var k=v,D=b,F=S,H=T}}]);