(()=>{"use strict";var e={20(e,t,n){
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var r=n(594),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:l.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},848(e,t,n){e.exports=n(20)},594(e){e.exports=React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{Button:()=>Ht,buttonVariants:()=>Vt});var o={};n.r(o),n.d(o,{Input:()=>Yt});var a={};n.r(a),n.d(a,{Table:()=>nn,TableBody:()=>on,TableCaption:()=>un,TableCell:()=>cn,TableFooter:()=>an,TableHead:()=>sn,TableHeader:()=>rn,TableRow:()=>ln});var i={};n.r(i),n.d(i,{Sheet:()=>pa,SheetClose:()=>ga,SheetContent:()=>ba,SheetDescription:()=>Ca,SheetFooter:()=>wa,SheetHeader:()=>ya,SheetTitle:()=>xa,SheetTrigger:()=>ma});var l={};n.r(l),n.d(l,{Badge:()=>ei,badgeVariants:()=>Ja});var s={};n.r(s),n.d(s,{Accordion:()=>dl,AccordionContent:()=>ml,AccordionItem:()=>fl,AccordionTrigger:()=>pl});var c={};n.r(c),n.d(c,{Alert:()=>xl,AlertDescription:()=>Sl,AlertTitle:()=>Cl});var u={};n.r(u),n.d(u,{Button:()=>Oc,CaptionLabel:()=>Nc,Chevron:()=>Dc,Day:()=>Pc,DayButton:()=>_c,Dropdown:()=>jc,DropdownNav:()=>Ic,Footer:()=>Fc,Month:()=>Tc,MonthCaption:()=>Ac,MonthGrid:()=>Lc,Months:()=>zc,MonthsDropdown:()=>Hc,Nav:()=>Bc,NextMonthButton:()=>Gc,Option:()=>Yc,PreviousMonthButton:()=>qc,Root:()=>$c,Select:()=>Uc,Week:()=>Kc,WeekNumber:()=>Qc,WeekNumberHeader:()=>Jc,Weekday:()=>Zc,Weekdays:()=>Xc,Weeks:()=>eu,YearsDropdown:()=>tu});var d={};n.r(d),n.d(d,{formatCaption:()=>nu,formatDay:()=>ou,formatMonthCaption:()=>ru,formatMonthDropdown:()=>au,formatWeekNumber:()=>lu,formatWeekNumberHeader:()=>su,formatWeekdayName:()=>iu,formatYearCaption:()=>uu,formatYearDropdown:()=>cu});var f={};n.r(f),n.d(f,{labelCaption:()=>mu,labelDay:()=>fu,labelDayButton:()=>du,labelGrid:()=>pu,labelGridcell:()=>gu,labelMonthDropdown:()=>hu,labelNav:()=>vu,labelNext:()=>yu,labelPrevious:()=>wu,labelWeekNumber:()=>Cu,labelWeekNumberHeader:()=>Su,labelWeekday:()=>xu,labelYearDropdown:()=>ku});var p={};n.r(p),n.d(p,{Calendar:()=>gd,CalendarDayButton:()=>hd});var m={};n.r(m),n.d(m,{Card:()=>Rd,CardAction:()=>Dd,CardContent:()=>Pd,CardDescription:()=>Nd,CardFooter:()=>_d,CardHeader:()=>Md,CardTitle:()=>Od});var g={};n.r(g),n.d(g,{Dialog:()=>Hd,DialogClose:()=>Yd,DialogContent:()=>$d,DialogDescription:()=>Xd,DialogFooter:()=>Kd,DialogHeader:()=>Ud,DialogOverlay:()=>qd,DialogPortal:()=>Gd,DialogTitle:()=>Zd,DialogTrigger:()=>Bd});var h={};n.r(h),n.d(h,{DropdownMenu:()=>Xh,DropdownMenuCheckboxItem:()=>rv,DropdownMenuContent:()=>ev,DropdownMenuGroup:()=>tv,DropdownMenuItem:()=>nv,DropdownMenuLabel:()=>iv,DropdownMenuPortal:()=>Qh,DropdownMenuRadioGroup:()=>ov,DropdownMenuRadioItem:()=>av,DropdownMenuSeparator:()=>lv,DropdownMenuShortcut:()=>sv,DropdownMenuSub:()=>cv,DropdownMenuSubContent:()=>dv,DropdownMenuSubTrigger:()=>uv,DropdownMenuTrigger:()=>Jh});var v={};n.r(v),n.d(v,{Label:()=>vv});var b={};n.r(b),n.d(b,{Popover:()=>ub,PopoverAnchor:()=>pb,PopoverContent:()=>fb,PopoverTrigger:()=>db});var y={};n.r(y),n.d(y,{Select:()=>Qy,SelectContent:()=>nw,SelectGroup:()=>Jy,SelectItem:()=>ow,SelectLabel:()=>rw,SelectScrollDownButton:()=>lw,SelectScrollUpButton:()=>iw,SelectSeparator:()=>aw,SelectTrigger:()=>tw,SelectValue:()=>ew});var w={};n.r(w),n.d(w,{Switch:()=>Cw});var x={};n.r(x),n.d(x,{Textarea:()=>Ew});var C=n(594),S=n.n(C);function k(e,t){return"function"==typeof e?e(t):e}function E(e,t){return n=>{t.setState(t=>({...t,[e]:k(n,t[e])}))}}function R(e){return e instanceof Function}function M(e,t){const n=[],r=e=>{e.forEach(e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)})};return r(e),n}function O(e,t,n){let r,o=[];return a=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(a),s=l.length!==o.length||l.some((e,t)=>o[t]!==e);if(!s)return r;let c;if(o=l,n.key&&n.debug&&(c=Date.now()),r=t(...l),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-i))/100,t=Math.round(100*(Date.now()-c))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function N(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const D="debugHeaders";function P(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(o,e)}),o}const _={createTable:e=>{e.getHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var a,i;const l=null!=(a=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[],s=null!=(i=null==o?void 0:o.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[];return j(t,[...l,...n.filter(e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))),...s],e)},N(e.options,D)),e.getCenterHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>j(t,n=n.filter(e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id))),e,"center"),N(e.options,D)),e.getLeftHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;return j(t,null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],e,"left")},N(e.options,D)),e.getRightHeaderGroups=O(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;return j(t,null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],e,"right")},N(e.options,D)),e.getFooterGroups=O(()=>[e.getHeaderGroups()],e=>[...e].reverse(),N(e.options,D)),e.getLeftFooterGroups=O(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),N(e.options,D)),e.getCenterFooterGroups=O(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),N(e.options,D)),e.getRightFooterGroups=O(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),N(e.options,D)),e.getFlatHeaders=O(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),N(e.options,D)),e.getLeftFlatHeaders=O(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),N(e.options,D)),e.getCenterFlatHeaders=O(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),N(e.options,D)),e.getRightFlatHeaders=O(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),N(e.options,D)),e.getCenterLeafHeaders=O(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),N(e.options,D)),e.getLeftLeafHeaders=O(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),N(e.options,D)),e.getRightLeafHeaders=O(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),N(e.options,D)),e.getLeafHeaders=O(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,o,a,i,l,s;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(a=null==(i=t[0])?void 0:i.headers)?a:[],...null!=(l=null==(s=n[0])?void 0:s.headers)?l:[]].map(e=>e.getLeafHeaders()).flat()},N(e.options,D))}};function j(e,t,n,r){var o,a;let i=0;const l=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&l(e.columns,t+1)},0)};l(e);let s=[];const c=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},a=[];e.forEach(e=>{const i=[...a].reverse()[0];let l,s=!1;if(e.column.depth===o.depth&&e.column.parent?l=e.column.parent:(l=e.column,s=!0),i&&(null==i?void 0:i.column)===l)i.subHeaders.push(e);else{const o=P(n,l,{id:[r,t,l.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:s,placeholderId:s?`${a.filter(e=>e.column===l).length}`:void 0,depth:t,index:a.length});o.subHeaders.push(e),a.push(o)}o.headers.push(e),e.headerGroup=o}),s.push(o),t>0&&c(a,t-1)},u=t.map((e,t)=>P(n,e,{depth:i,index:t}));c(u,i-1),s.reverse();const d=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)})):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return d(null!=(o=null==(a=s[0])?void 0:a.headers)?o:[]),s}const I=(e,t,n,r,o,a,i)=>{let l={id:t,index:r,original:n,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:t=>{if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=a?a:[],getLeafRows:()=>M(l.subRows,e=>e.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let e=[],t=l;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:O(()=>[e.getAllLeafColumns()],t=>t.map(t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:O(()=>[e,n,t,o],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),N(e.options,"debugCells"))};return e._features.forEach(r=>{null==r.createCell||r.createCell(o,n,t,e)},{}),o}(e,l,t,t.id)),N(e.options,"debugRows")),_getAllCellsByColumnId:O(()=>[l.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),N(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(l,e)}return l},F={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},T=(e,t,n)=>{var r,o;const a=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(a))};T.autoRemove=e=>q(e);const A=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};A.autoRemove=e=>q(e);const L=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};L.autoRemove=e=>q(e);const z=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};z.autoRemove=e=>q(e);const W=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});W.autoRemove=e=>q(e)||!(null!=e&&e.length);const V=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});V.autoRemove=e=>q(e)||!(null!=e&&e.length);const H=(e,t,n)=>e.getValue(t)===n;H.autoRemove=e=>q(e);const B=(e,t,n)=>e.getValue(t)==n;B.autoRemove=e=>q(e);const G=(e,t,n)=>{let[r,o]=n;const a=e.getValue(t);return a>=r&&a<=o};G.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,a=null===t||Number.isNaN(r)?-1/0:r,i=null===n||Number.isNaN(o)?1/0:o;if(a>i){const e=a;a=i,i=e}return[a,i]},G.autoRemove=e=>q(e)||q(e[0])&&q(e[1]);const Y={includesString:T,includesStringSensitive:A,equalsString:L,arrIncludes:z,arrIncludesAll:W,arrIncludesSome:V,equals:H,weakEquals:B,inNumberRange:G};function q(e){return null==e||""===e}const $={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:E("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?Y.includesString:"number"==typeof r?Y.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?Y.equals:Array.isArray(r)?Y.arrIncludes:Y.weakEquals},e.getFilterFn=()=>{var n,r;return R(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:Y[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find(t=>t.id===e.id),a=k(n,o?o.value:void 0);var i;if(U(r,a,e))return null!=(i=null==t?void 0:t.filter(t=>t.id!==e.id))?i:[];const l={id:e.id,value:a};var s;return o?null!=(s=null==t?void 0:t.map(t=>t.id===e.id?l:t))?s:[]:null!=t&&t.length?[...t,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var r;return null==(r=k(t,e))?void 0:r.filter(e=>{const t=n.find(t=>t.id===e.id);if(t){if(U(t.getFilterFn(),e.value,t))return!1}return!0})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function U(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const K={sum:(e,t,n)=>n.reduce((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(t=>t.getValue(e));if(r=n,!Array.isArray(r)||!r.every(e=>"number"==typeof e))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),a=n.sort((e,t)=>e-t);return n.length%2!=0?a[o]:(a[o-1]+a[o])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},Z={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:E("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?K.sum:"[object Date]"===Object.prototype.toString.call(r)?K.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return R(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:K[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}};const X={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:E("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=O(e=>[re(t,e)],t=>t.findIndex(t=>t.id===e.id),N(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=re(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=re(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=O(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter(e=>!t.includes(e.id));return"remove"===n?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}(o,t,n)},N(e.options,"debugTable"))}},Q={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:E("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,o,a,i,l,s;return"right"===n?{left:(null!=(a=null==e?void 0:e.left)?a:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(l=null==e?void 0:e.left)?l:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(s=null==e?void 0:e.right)?s:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(e=>e.id),{left:r,right:o}=t.getState().columnPinning,a=n.some(e=>null==r?void 0:r.includes(e)),i=n.some(e=>null==o?void 0:o.includes(e));return a?"left":!!i&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},N(t.options,"debugRows")),e.getLeftVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),N(t.options,"debugRows")),e.getRightVisibleCells=O(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),N(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(a=r.right)?void 0:a.length))},e.getLeftLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),N(e.options,"debugColumns")),e.getRightLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),N(e.options,"debugColumns")),e.getCenterLeafColumns=O(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},N(e.options,"debugColumns"))}};const J={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ee={getDefaultColumnDef:()=>J,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:E("columnSizing",e),onColumnSizingInfoChange:E("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const a=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:J.minSize,null!=(r=null!=a?a:e.columnDef.size)?r:J.size),null!=(o=e.columnDef.maxSize)?o:J.maxSize)},e.getStart=O(e=>[e,re(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),N(t.options,"debugColumns")),e.getAfter=O(e=>[e,re(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),N(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return a=>{if(!r||!o)return;if(null==a.persist||a.persist(),ne(a)&&a.touches&&a.touches.length>1)return;const i=e.getSize(),l=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],s=ne(a)?Math.round(a.touches[0].clientX):a.clientX,c={},u=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,o;const a="rtl"===t.options.columnResizeDirection?-1:1,i=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*a,l=Math.max(i/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;c[t]=Math.round(100*Math.max(n+n*l,0))/100}),{...e,deltaOffset:i,deltaPercentage:l}}),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing(e=>({...e,...c})))},d=e=>u("move",e),f=e=>{u("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||("undefined"!=typeof document?document:null);const m={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",m.moveHandler),null==p||p.removeEventListener("mouseup",m.upHandler),f(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",g.moveHandler),null==p||p.removeEventListener("touchend",g.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},h=!!function(){if("boolean"==typeof te)return te;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return te=e,te}()&&{passive:!1};ne(a)?(null==p||p.addEventListener("touchmove",g.moveHandler,h),null==p||p.addEventListener("touchend",g.upHandler,h)):(null==p||p.addEventListener("mousemove",m.moveHandler,h),null==p||p.addEventListener("mouseup",m.upHandler,h)),t.setColumnSizingInfo(e=>({...e,startOffset:s,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}};let te=null;function ne(e){return"touchstart"===e.type}function re(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const oe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:E("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):o.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(t=>{ae(o,t.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=O(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ie(e,n):{rows:[],flatRows:[],rowsById:{}},N(e.options,"debugTable")),e.getFilteredSelectedRowModel=O(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ie(e,n):{rows:[],flatRows:[],rowsById:{}},N(e.options,"debugTable")),e.getGroupedSelectedRowModel=O(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ie(e,n):{rows:[],flatRows:[],rowsById:{}},N(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return a;const l={...a};return ae(l,e.id,n,null==(i=null==r?void 0:r.selectChildren)||i,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return le(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===se(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===se(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},ae=(e,t,n,r,o)=>{var a;const i=o.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(a=i.subRows)&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(t=>ae(e,t.id,n,r,o))};function ie(e,t){const n=e.getState().rowSelection,r=[],o={},a=function(e,t){return e.map(e=>{var t;const i=le(e,n);if(i&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:a(e.subRows)}),i)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:o}}function le(e,t){var n;return null!=(n=t[e.id])&&n}function se(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,a=!1;return e.subRows.forEach(e=>{if((!a||o)&&(e.getCanSelect()&&(le(e,t)?a=!0:o=!1),e.subRows&&e.subRows.length)){const n=se(e,t);"all"===n?a=!0:"some"===n?(a=!0,o=!1):o=!1}}),o?"all":!!a&&"some"}const ce=/([0-9]+)/gm;function ue(e,t){return e===t?0:e>t?1:-1}function de(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function fe(e,t){const n=e.split(ce).filter(Boolean),r=t.split(ce).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),a=parseInt(t,10),i=[o,a].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(o)?-1:1;if(o>a)return 1;if(a>o)return-1}}return n.length-r.length}const pe={alphanumeric:(e,t,n)=>fe(de(e.getValue(n)).toLowerCase(),de(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>fe(de(e.getValue(n)),de(t.getValue(n))),text:(e,t,n)=>ue(de(e.getValue(n)).toLowerCase(),de(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>ue(de(e.getValue(n)),de(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>ue(e.getValue(n),t.getValue(n))},me=[_,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:E("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=O(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),N(t.options,"debugRows")),e.getVisibleCells=O(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],N(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>O(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),N(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(0,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(0,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(0,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(0,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},X,Q,F,$,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:E("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,a;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(a=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||a)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Y.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return R(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:Y[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:E("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return pe.datetime;if("string"==typeof n&&(r=!0,n.split(ce).length>1))return pe.alphanumeric}return r?pe.text:pe.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return R(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:pe[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),a=null!=n;t.setSorting(i=>{const l=null==i?void 0:i.find(t=>t.id===e.id),s=null==i?void 0:i.findIndex(t=>t.id===e.id);let c,u=[],d=a?n:"desc"===o;var f;(c=null!=i&&i.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=i&&i.length&&s!==i.length-1?"replace":l?"toggle":"replace","toggle"===c&&(a||o||(c="remove")),"add"===c)?(u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):u="toggle"===c?i.map(t=>t.id===e.id?{...t,desc:d}:t):"remove"===c?i.filter(t=>t.id!==e.id):[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?!!(i===a||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===i?"asc":"desc"):a},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Z,{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:E("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}}else e._queue(()=>{t=!0})},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some(e=>!e.getIsExpanded())},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{const n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const a=!0===r||!(null==r||!r[e.id]);let i={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{i[e]=!0}):i=r,n=null!=(o=n)?o:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:t,...n}=i;return n}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:E("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}}else e._queue(()=>{t=!0})},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>k(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination(n=>{let r=k(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{const n=Math.max(1,k(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let o=k(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}}),e.getPageOptions=O(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map((e,t)=>t)),t},N(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:E("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],i=o?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],l=new Set([...i,e.id,...a]);t.setRowPinning(e=>{var t,r,o,a,i,s;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter(e=>!(null!=l&&l.has(e))),bottom:[...(null!=(a=null==e?void 0:e.bottom)?a:[]).filter(e=>!(null!=l&&l.has(e))),...Array.from(l)]}:"top"===n?{top:[...(null!=(i=null==e?void 0:e.top)?i:[]).filter(e=>!(null!=l&&l.has(e))),...Array.from(l)],bottom:(null!=(s=null==e?void 0:e.bottom)?s:[]).filter(e=>!(null!=l&&l.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=l&&l.has(e))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=l&&l.has(e)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,a=n.some(e=>null==r?void 0:r.includes(e)),i=n.some(e=>null==o?void 0:o.includes(e));return a?"top":!!i&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const a=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==a?void 0:a.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,a;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(a=r.bottom)?void 0:a.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map(t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r}))},e.getTopRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),N(e.options,"debugRows")),e.getBottomRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),N(e.options,"debugRows")),e.getCenterRows=O(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},N(e.options,"debugRows"))}},oe,ee];function ge(e){var t,n;const r=[...me,...null!=(t=e._features)?t:[]];let o={_features:r};const a=o._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o)),{});let i={...null!=(n=e.initialState)?n:{}};o._features.forEach(e=>{var t;i=null!=(t=null==e.getInitialState?void 0:e.getInitialState(i))?t:i});const l=[];let s=!1;const c={_features:r,options:{...a,...e},initialState:i,_queue:e=>{l.push(e),s||(s=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();s=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=k(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(a,e):{...a,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:O(()=>[o.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},N(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:O(()=>[o._getColumnDefs()],e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{const a=function(e,t,n,r){var o,a;const i={...e._getDefaultColumnDef(),...t},l=i.accessorKey;let s,c=null!=(o=null!=(a=i.id)?a:l?"function"==typeof String.prototype.replaceAll?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)?o:"string"==typeof i.header?i.header:void 0;if(i.accessorFn?s=i.accessorFn:l&&(s=l.includes(".")?e=>{let t=e;for(const e of l.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[i.accessorKey]),!c)throw new Error;let u={id:`${String(c)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:O(()=>[!0],()=>{var e;return[u,...null==(e=u.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},N(e.options,"debugColumns")),getLeafColumns:O(()=>[e._getOrderColumnsFn()],e=>{var t;if(null!=(t=u.columns)&&t.length){let t=u.columns.flatMap(e=>e.getLeafColumns());return e(t)}return[u]},N(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(u,e);return u}(o,e,r,n),i=e;return a.columns=i.columns?t(i.columns,a,r+1):[],a})};return t(e)},N(e,"debugColumns")),getAllFlatColumns:O(()=>[o.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),N(e,"debugColumns")),_getAllFlatColumnsById:O(()=>[o.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),N(e,"debugColumns")),getAllLeafColumns:O(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),N(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,c);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}
/**
   * react-table
   *
   * Copyright (c) TanStack
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   */
function he(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?C.createElement(e,t):e:null;var n}const ve=wp.i18n,be=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim();
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
var ye={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"};
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const we=(0,C.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},s)=>(0,C.createElement)("svg",{ref:s,...ye,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:be("lucide",o),...l},[...i.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])),xe=(e,t)=>{const n=(0,C.forwardRef)(({className:n,...r},o)=>{return(0,C.createElement)(we,{ref:o,iconNode:t,className:be(`lucide-${a=e,a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var a});return n.displayName=`${e}`,n},Ce=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Se=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),ke=xe("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Ee=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Re=xe("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function Me(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Oe(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Me(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():Me(e[t],null)}}}}function Ne(...e){return C.useCallback(Oe(...e),e)}var De=n(848),Pe=Symbol.for("react.lazy"),_e=C[" use ".trim().toString()];function je(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Pe&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Ie(e){const t=Te(e),n=C.forwardRef((e,n)=>{let{children:r,...o}=e;je(r)&&"function"==typeof _e&&(r=_e(r._payload));const a=C.Children.toArray(r),i=a.find(Le);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Fe=Ie("Slot");function Te(e){const t=C.forwardRef((e,t)=>{let{children:n,...r}=e;if(je(n)&&"function"==typeof _e&&(n=_e(n._payload)),C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ae=Symbol("radix.slottable");function Le(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ae}function ze(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ze(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function We(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ze(e))&&(r&&(r+=" "),r+=t);return r}const Ve=We,He=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Be=We,Ge=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Be(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=He(t)||He(r);return o[e][i]}),l=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),s=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...l}[t]):{...a,...l}[t]===n})?[...e,n,r]:e},[]);return Be(e,i,s,null==n?void 0:n.class,null==n?void 0:n.className)},Ye=e=>{const t=Ke(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),qe(n,t)||Ue(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},qe=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?qe(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},$e=/^\[(.+)\]$/,Ue=e=>{if($e.test(e)){const t=$e.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ke=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Je(Object.entries(e.classGroups),n).forEach(([e,n])=>{Ze(n,r,e,t)}),r},Ze=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Xe(t,e)).classGroupId=n)}if("function"==typeof e)return Qe(e)?void Ze(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{Ze(o,Xe(t,e),n,r)})})},Xe=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Qe=e=>e.isThemeGetter,Je=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},tt=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,l=0,s=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===l){if(u===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(s,c)),s=c+a;continue}if("/"===u){i=c;continue}}"["===u?l++:"]"===u&&l--}const c=0===n.length?e:e.substring(s),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:i&&i>s?i-s:void 0}};return n?e=>n({className:e,parseClassName:i}):i},nt=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},rt=/\s+/;function ot(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=at(e))&&(r&&(r+=" "),r+=t);return r}const at=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=at(e[r]))&&(n&&(n+=" "),n+=t);return n};function it(e,...t){let n,r,o,a=function(l){const s=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:et(e.cacheSize),parseClassName:tt(e),...Ye(e)}))(s),r=n.cache.get,o=n.cache.set,a=i,i(l)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(rt);let l="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:s,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){l=t+(l.length>0?" "+l:l);continue}if(p=r(u),!p){l=t+(l.length>0?" "+l:l);continue}f=!1}const m=nt(s).join(":"),g=c?m+"!":m,h=g+p;if(a.includes(h))continue;a.push(h);const v=o(p,f);for(let e=0;e<v.length;++e){const t=v[e];a.push(g+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,a),a}return function(){return a(ot.apply(null,arguments))}}const lt=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},st=/^\[(?:([a-z-]+):)?(.+)\]$/i,ct=/^\d+\/\d+$/,ut=new Set(["px","full","screen"]),dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>bt(e)||ut.has(e)||ct.test(e),vt=e=>Pt(e,"length",_t),bt=e=>Boolean(e)&&!Number.isNaN(Number(e)),yt=e=>Pt(e,"number",bt),wt=e=>Boolean(e)&&Number.isInteger(Number(e)),xt=e=>e.endsWith("%")&&bt(e.slice(0,-1)),Ct=e=>st.test(e),St=e=>dt.test(e),kt=new Set(["length","size","percentage"]),Et=e=>Pt(e,kt,jt),Rt=e=>Pt(e,"position",jt),Mt=new Set(["image","url"]),Ot=e=>Pt(e,Mt,Ft),Nt=e=>Pt(e,"",It),Dt=()=>!0,Pt=(e,t,n)=>{const r=st.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},_t=e=>ft.test(e)&&!pt.test(e),jt=()=>!1,It=e=>mt.test(e),Ft=e=>gt.test(e),Tt=(Symbol.toStringTag,()=>{const e=lt("colors"),t=lt("spacing"),n=lt("blur"),r=lt("brightness"),o=lt("borderColor"),a=lt("borderRadius"),i=lt("borderSpacing"),l=lt("borderWidth"),s=lt("contrast"),c=lt("grayscale"),u=lt("hueRotate"),d=lt("invert"),f=lt("gap"),p=lt("gradientColorStops"),m=lt("gradientColorStopPositions"),g=lt("inset"),h=lt("margin"),v=lt("opacity"),b=lt("padding"),y=lt("saturate"),w=lt("scale"),x=lt("sepia"),C=lt("skew"),S=lt("space"),k=lt("translate"),E=()=>["auto",Ct,t],R=()=>[Ct,t],M=()=>["",ht,vt],O=()=>["auto",bt,Ct],N=()=>["","0",Ct],D=()=>[bt,Ct];return{cacheSize:500,separator:":",theme:{colors:[Dt],spacing:[ht,vt],blur:["none","",St,Ct],brightness:D(),borderColor:[e],borderRadius:["none","","full",St,Ct],borderSpacing:R(),borderWidth:M(),contrast:D(),grayscale:N(),hueRotate:D(),invert:N(),gap:R(),gradientColorStops:[e],gradientColorStopPositions:[xt,vt],inset:E(),margin:E(),opacity:D(),padding:R(),saturate:D(),scale:D(),sepia:N(),skew:D(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",Ct]}],container:["container"],columns:[{columns:[St]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Ct]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",wt,Ct]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ct]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",wt,Ct]}],"grid-cols":[{"grid-cols":[Dt]}],"col-start-end":[{col:["auto",{span:["full",wt,Ct]},Ct]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[Dt]}],"row-start-end":[{row:["auto",{span:[wt,Ct]},Ct]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ct]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ct]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ct,t]}],"min-w":[{"min-w":[Ct,t,"min","max","fit"]}],"max-w":[{"max-w":[Ct,t,"none","full","min","max","fit","prose",{screen:[St]},St]}],h:[{h:[Ct,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ct,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ct,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ct,t,"auto","min","max","fit"]}],"font-size":[{text:["base",St,vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",yt]}],"font-family":[{font:[Dt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ct]}],"line-clamp":[{"line-clamp":["none",bt,yt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,Ct]}],"list-image":[{"list-image":["none",Ct]}],"list-style-type":[{list:["none","disc","decimal",Ct]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,vt]}],"underline-offset":[{"underline-offset":["auto",ht,Ct]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Rt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Et]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ot]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[ht,Ct]}],"outline-w":[{outline:[ht,vt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ht,vt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",St,Nt]}],"shadow-color":[{shadow:[Dt]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",St,Ct]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ct]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",Ct]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ct]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[wt,Ct]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ct]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ct]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ct]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,vt,yt]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),At=it(Tt);function Lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return At(We(t))}var zt=["className","variant","size","asChild"];function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(null,arguments)}var Vt=Ge("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ht(e){var t=e.className,n=e.variant,r=e.size,o=e.asChild,a=void 0!==o&&o,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,zt),l=a?Fe:"button";return C.createElement(l,Wt({"data-slot":"button",className:Lt(Vt({variant:n,size:r,className:t}))},i))}var Bt=["className","type"];function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gt.apply(null,arguments)}function Yt(e){var t=e.className,n=e.type,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Bt);return C.createElement("input",Gt({type:n,"data-slot":"input",className:Lt("file:text-foreground placeholder:text-muted-foreground/70! selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input! h-9 w-full min-w-0 rounded-md border bg-white! px-3 py-1 text-base shadow-xs! transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring! focus-visible:ring-ring/50! focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t)},r))}var qt=["className"],$t=["className"],Ut=["className"],Kt=["className"],Zt=["className"],Xt=["className"],Qt=["className"],Jt=["className"];function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},en.apply(null,arguments)}function tn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nn(e){var t=e.className,n=tn(e,qt);return C.createElement("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto"},C.createElement("table",en({"data-slot":"table",className:Lt("w-full caption-bottom text-sm",t)},n)))}function rn(e){var t=e.className,n=tn(e,$t);return C.createElement("thead",en({"data-slot":"table-header",className:Lt("[&_tr]:border-b",t)},n))}function on(e){var t=e.className,n=tn(e,Ut);return C.createElement("tbody",en({"data-slot":"table-body",className:Lt("[&_tr:last-child]:border-0",t)},n))}function an(e){var t=e.className,n=tn(e,Kt);return C.createElement("tfoot",en({"data-slot":"table-footer",className:Lt("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t)},n))}function ln(e){var t=e.className,n=tn(e,Zt);return C.createElement("tr",en({"data-slot":"table-row",className:Lt("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t)},n))}function sn(e){var t=e.className,n=tn(e,Xt);return C.createElement("th",en({"data-slot":"table-head",className:Lt("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t)},n))}function cn(e){var t=e.className,n=tn(e,Qt);return C.createElement("td",en({"data-slot":"table-cell",className:Lt("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t)},n))}function un(e){var t=e.className,n=tn(e,Jt);return C.createElement("caption",en({"data-slot":"table-caption",className:Lt("text-muted-foreground mt-4 text-sm",t)},n))}const dn=wp.element;function fn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const mn=xe("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),gn=xe("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),hn=xe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),vn=xe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),bn=xe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),yn=xe("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),wn=xe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),xn=xe("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),Cn=xe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);"undefined"==typeof window||!window.document||window.document.createElement;function Sn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function kn(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>C.createContext(e));return function(n){const r=n?.[e]||t;return C.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=C.createContext(r),a=n.length;n=[...n,r];const i=t=>{const{scope:n,children:r,...i}=t,l=n?.[e]?.[a]||o,s=C.useMemo(()=>i,Object.values(i));return(0,De.jsx)(l.Provider,{value:s,children:r})};return i.displayName=t+"Provider",[i,function(n,i){const l=i?.[e]?.[a]||o,s=C.useContext(l);if(s)return s;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},En(r,...t)]}function En(...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 C.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Rn=globalThis?.document?C.useLayoutEffect:()=>{},Mn=C[" useId ".trim().toString()]||(()=>{}),On=0;function Nn(e){const[t,n]=C.useState(Mn());return Rn(()=>{e||n(e=>e??String(On++))},[e]),e||(t?`radix-${t}`:"")}var Dn=C[" useInsertionEffect ".trim().toString()]||Rn;function Pn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=C.useState(e),o=C.useRef(n),a=C.useRef(t);return Dn(()=>{a.current=t},[t]),C.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),l=void 0!==e,s=l?e:o;{const t=C.useRef(void 0!==e);C.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 c=C.useCallback(t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else a(t)},[l,e,a,i]);return[s,c]}Symbol("RADIX:SYNC_STATE");const _n=ReactDOM;var jn=n.n(_n);function In(e){const t=Fn(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(An);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Fn(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tn=Symbol("radix.slottable");function An(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Tn}var Ln=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=In(`Primitive.${t}`),r=C.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,De.jsx)(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function zn(e,t){e&&_n.flushSync(()=>e.dispatchEvent(t))}function Wn(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...e)=>t.current?.(...e),[])}var Vn,Hn="dismissableLayer.update",Bn="dismissableLayer.pointerDownOutside",Gn="dismissableLayer.focusOutside",Yn=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qn=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...s}=e,c=C.useContext(Yn),[u,d]=C.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=C.useState({}),m=Ne(t,e=>d(e)),g=Array.from(c.layers),[h]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),b=u?g.indexOf(u):-1,y=c.layersWithOutsidePointerEventsDisabled.size>0,w=b>=v,x=function(e,t=globalThis?.document){const n=Wn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Kn(Bn,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...c.branches].some(e=>e.contains(t));w&&!n&&(o?.(e),i?.(e),e.defaultPrevented||l?.())},f),S=function(e,t=globalThis?.document){const n=Wn(e),r=C.useRef(!1);return C.useEffect(()=>{const e=e=>{if(e.target&&!r.current){Kn(Gn,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;[...c.branches].some(e=>e.contains(t))||(a?.(e),i?.(e),e.defaultPrevented||l?.())},f);return function(e,t=globalThis?.document){const n=Wn(e);C.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===c.layers.size-1&&(r?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},f),C.useEffect(()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Vn=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Un(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Vn)}},[u,f,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Un())},[u,c]),C.useEffect(()=>{const e=()=>p({});return document.addEventListener(Hn,e),()=>document.removeEventListener(Hn,e)},[]),(0,De.jsx)(Ln.div,{...s,ref:m,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:Sn(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Sn(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Sn(e.onPointerDownCapture,x.onPointerDownCapture)})});qn.displayName="DismissableLayer";var $n=C.forwardRef((e,t)=>{const n=C.useContext(Yn),r=C.useRef(null),o=Ne(t,r);return C.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,De.jsx)(Ln.div,{...e,ref:o})});function Un(){const e=new CustomEvent(Hn);document.dispatchEvent(e)}function Kn(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?zn(o,a):o.dispatchEvent(a)}$n.displayName="DismissableLayerBranch";var Zn="focusScope.autoFocusOnMount",Xn="focusScope.autoFocusOnUnmount",Qn={bubbles:!1,cancelable:!0},Jn=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,s]=C.useState(null),c=Wn(o),u=Wn(a),d=C.useRef(null),f=Ne(t,e=>s(e)),p=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let e=function(e){if(p.paused||!l)return;const t=e.target;l.contains(t)?d.current=t:rr(d.current,{select:!0})},t=function(e){if(p.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||rr(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&rr(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,l,p.paused]),C.useEffect(()=>{if(l){or.add(p);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Zn,Qn);l.addEventListener(Zn,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(rr(r,{select:t}),document.activeElement!==n)return}((e=er(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&rr(l))}return()=>{l.removeEventListener(Zn,c),setTimeout(()=>{const e=new CustomEvent(Xn,Qn);l.addEventListener(Xn,u),l.dispatchEvent(e),e.defaultPrevented||rr(t??document.body,{select:!0}),l.removeEventListener(Xn,u),or.remove(p)},0)}}var e},[l,c,u,p]);const m=C.useCallback(e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=er(e),n=tr(t,e),r=tr(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&rr(a,{select:!0})):(e.preventDefault(),n&&rr(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return(0,De.jsx)(Ln.div,{tabIndex:-1,...i,ref:f,onKeyDown:m})});function er(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 tr(e,t){for(const n of e)if(!nr(n,{upTo:t}))return n}function nr(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 rr(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()}}Jn.displayName="FocusScope";var or=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ar(e,t),e.unshift(t)},remove(t){e=ar(e,t),e[0]?.resume()}}}();function ar(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var ir=C.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=C.useState(!1);Rn(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?jn().createPortal((0,De.jsx)(Ln.div,{...r,ref:t}),i):null});ir.displayName="Portal";var lr=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=C.useState(),r=C.useRef(null),o=C.useRef(e),a=C.useRef("none"),i=e?"mounted":"unmounted",[l,s]=function(e,t){return C.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const e=sr(r.current);a.current="mounted"===l?e:"none"},[l]),Rn(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=sr(t);if(e)s("MOUNT");else if("none"===i||"none"===t?.display)s("UNMOUNT");else{s(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,s]),Rn(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=sr(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(s("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},l=e=>{e.target===t&&(a.current=sr(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:C.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):C.Children.only(n),a=Ne(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}(o));return"function"==typeof n||r.isPresent?C.cloneElement(o,{ref:a}):null};function sr(e){return e?.animationName||"none"}lr.displayName="Presence";var cr=0;function ur(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dr()),document.body.insertAdjacentElement("beforeend",e[1]??dr()),cr++,()=>{1===cr&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),cr--}},[])}function dr(){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 fr=function(){return fr=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},fr.apply(this,arguments)};function pr(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}Object.create;function mr(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;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))}Object.create;"function"==typeof SuppressedError&&SuppressedError;var gr="right-scroll-bar-position",hr="width-before-scroll-bar";function vr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var br="undefined"!=typeof window?C.useLayoutEffect:C.useEffect,yr=new WeakMap;function wr(e,t){var n,r,o,a=(n=t||null,r=function(t){return e.forEach(function(e){return vr(e,t)})},(o=(0,C.useState)(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return br(function(){var t=yr.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||vr(e,null)}),r.forEach(function(e){n.has(e)||vr(e,o)})}yr.set(a,e)},[e]),a}function xr(e){return e}function Cr(e,t){void 0===t&&(t=xr);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 a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}var Sr=function(e){void 0===e&&(e={});var t=Cr(null);return t.options=fr({async:!0,ssr:!1},e),t}(),kr=function(){},Er=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:kr,onWheelCapture:kr,onTouchMoveCapture:kr}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,g=e.inert,h=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,y=e.gapMode,w=pr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=f,S=wr([n,t]),k=fr(fr({},w),o);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Sr,removeScrollBar:c,shards:d,noRelative:p,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:y}),i?C.cloneElement(C.Children.only(l),fr(fr({},k),{ref:S})):C.createElement(b,fr({},k,{className:s,ref:S}),l))});Er.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Er.classNames={fullWidth:hr,zeroRight:gr};var Rr,Mr=function(e){var t=e.sideCar,n=pr(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 C.createElement(r,fr({},n))};Mr.isSideCarExport=!0;function Or(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Rr||n.nc;return t&&e.setAttribute("nonce",t),e}var Nr=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Or())&&(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)}}},Dr=function(){var e,t=(e=Nr(),function(t,n){C.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}},Pr={left:0,top:0,right:0,gap:0},_r=function(e){return parseInt(e||"",10)||0},jr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Pr;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[_r(n),_r(r),_r(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])}},Ir=Dr(),Fr="data-scroll-locked",Tr=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(l,"px ").concat(r,";\n  }\n  body[").concat(Fr,"] {\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(a,"px;\n    padding-right: ").concat(i,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(l,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(gr," {\n    right: ").concat(l,"px ").concat(r,";\n  }\n  \n  .").concat(hr," {\n    margin-right: ").concat(l,"px ").concat(r,";\n  }\n  \n  .").concat(gr," .").concat(gr," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(hr," .").concat(hr," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(Fr,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n  }\n")},Ar=function(){var e=parseInt(document.body.getAttribute(Fr)||"0",10);return isFinite(e)?e:0},Lr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;C.useEffect(function(){return document.body.setAttribute(Fr,(Ar()+1).toString()),function(){var e=Ar()-1;e<=0?document.body.removeAttribute(Fr):document.body.setAttribute(Fr,e.toString())}},[]);var a=C.useMemo(function(){return jr(o)},[o]);return C.createElement(Ir,{styles:Tr(a,!t,o,n?"":"!important")})},zr=!1;if("undefined"!=typeof window)try{var Wr=Object.defineProperty({},"passive",{get:function(){return zr=!0,!0}});window.addEventListener("test",Wr,Wr),window.removeEventListener("test",Wr,Wr)}catch(e){zr=!1}var Vr=!!zr&&{passive:!1},Hr=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])},Br=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Gr(e,r)){var o=Yr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gr=function(e,t){return"v"===e?function(e){return Hr(e,"overflowY")}(t):function(e){return Hr(e,"overflowX")}(t)},Yr=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},qr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},$r=function(e){return[e.deltaX,e.deltaY]},Ur=function(e){return e&&"current"in e?e.current:e},Kr=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Zr=0,Xr=[];function Qr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jr=(eo=function(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),o=C.useState(Zr++)[0],a=C.useState(Dr)[0],i=C.useRef(e);C.useEffect(function(){i.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=mr([e.lockRef.current],(e.shards||[]).map(Ur),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=C.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=qr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[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=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Br(d,u);if(!m)return!0;if(m?o=d:(o="v"===d?"h":"v",m=Br(d,u)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var g=r.current||o;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=a*r,l=n.target,s=t.contains(l),c=!1,u=i>0,d=0,f=0;do{if(!l)break;var p=Yr(e,l),m=p[0],g=p[1]-p[2]-a*m;(m||g)&&Gr(e,l)&&(d+=g,f+=m);var h=l.parentNode;l=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(u&&(o&&Math.abs(d)<1||!o&&i>d)||!u&&(o&&Math.abs(f)<1||!o&&-i>f))&&(c=!0),c}(g,t,e,"h"===g?s:c,!0)},[]),s=C.useCallback(function(e){var n=e;if(Xr.length&&Xr[Xr.length-1]===a){var r="deltaY"in n?$r(n):qr(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 s=(i.current.shards||[]).map(Ur).filter(Boolean).filter(function(e){return e.contains(n.target)});(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=C.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:Qr(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=qr(e),r.current=void 0},[]),d=C.useCallback(function(t){c(t.type,$r(t),t.target,l(t,e.lockRef.current))},[]),f=C.useCallback(function(t){c(t.type,qr(t),t.target,l(t,e.lockRef.current))},[]);C.useEffect(function(){return Xr.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",s,Vr),document.addEventListener("touchmove",s,Vr),document.addEventListener("touchstart",u,Vr),function(){Xr=Xr.filter(function(e){return e!==a}),document.removeEventListener("wheel",s,Vr),document.removeEventListener("touchmove",s,Vr),document.removeEventListener("touchstart",u,Vr)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:Kr(o)}):null,p?C.createElement(Lr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Sr.useMedium(eo),Mr);var eo,to=C.forwardRef(function(e,t){return C.createElement(Er,fr({},e,{ref:t,sideCar:Jr}))});to.classNames=Er.classNames;const no=to;var ro=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},oo=new WeakMap,ao=new WeakMap,io={},lo=0,so=function(e){return e&&(e.host||so(e.parentNode))},co=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=so(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]);io[n]||(io[n]=new WeakMap);var a=io[n],i=[],l=new Set,s=new Set(o),c=function(e){e&&!l.has(e)&&(l.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(l.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(oo.get(e)||0)+1,c=(a.get(e)||0)+1;oo.set(e,s),a.set(e,c),i.push(e),1===s&&o&&ao.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),l.clear(),lo++,function(){i.forEach(function(e){var t=oo.get(e)-1,o=a.get(e)-1;oo.set(e,t),a.set(e,o),t||(ao.has(e)||e.removeAttribute(r),ao.delete(e)),o||e.removeAttribute(n)}),--lo||(oo=new WeakMap,oo=new WeakMap,ao=new WeakMap,io={})}},uo=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||ro(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),co(r,o,n,"aria-hidden")):function(){return null}};function fo(e){const t=po(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(go);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function po(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mo=Symbol("radix.slottable");function go(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===mo}var ho="Dialog",[vo,bo]=kn(ho),[yo,wo]=vo(ho),xo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,l=C.useRef(null),s=C.useRef(null),[c,u]=Pn({prop:r,defaultProp:o??!1,onChange:a,caller:ho});return(0,De.jsx)(yo,{scope:t,triggerRef:l,contentRef:s,contentId:Nn(),titleId:Nn(),descriptionId:Nn(),open:c,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(e=>!e),[u]),modal:i,children:n})};xo.displayName=ho;var Co="DialogTrigger",So=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wo(Co,n),a=Ne(t,o.triggerRef);return(0,De.jsx)(Ln.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Bo(o.open),...r,ref:a,onClick:Sn(e.onClick,o.onOpenToggle)})});So.displayName=Co;var ko="DialogPortal",[Eo,Ro]=vo(ko,{forceMount:void 0}),Mo=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=wo(ko,t);return(0,De.jsx)(Eo,{scope:t,forceMount:n,children:C.Children.map(r,e=>(0,De.jsx)(lr,{present:n||a.open,children:(0,De.jsx)(ir,{asChild:!0,container:o,children:e})}))})};Mo.displayName=ko;var Oo="DialogOverlay",No=C.forwardRef((e,t)=>{const n=Ro(Oo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=wo(Oo,e.__scopeDialog);return a.modal?(0,De.jsx)(lr,{present:r||a.open,children:(0,De.jsx)(Po,{...o,ref:t})}):null});No.displayName=Oo;var Do=fo("DialogOverlay.RemoveScroll"),Po=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wo(Oo,n);return(0,De.jsx)(no,{as:Do,allowPinchZoom:!0,shards:[o.contentRef],children:(0,De.jsx)(Ln.div,{"data-state":Bo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),_o="DialogContent",jo=C.forwardRef((e,t)=>{const n=Ro(_o,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=wo(_o,e.__scopeDialog);return(0,De.jsx)(lr,{present:r||a.open,children:a.modal?(0,De.jsx)(Io,{...o,ref:t}):(0,De.jsx)(Fo,{...o,ref:t})})});jo.displayName=_o;var Io=C.forwardRef((e,t)=>{const n=wo(_o,e.__scopeDialog),r=C.useRef(null),o=Ne(t,n.contentRef,r);return C.useEffect(()=>{const e=r.current;if(e)return uo(e)},[]),(0,De.jsx)(To,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Sn(e.onFocusOutside,e=>e.preventDefault())})}),Fo=C.forwardRef((e,t)=>{const n=wo(_o,e.__scopeDialog),r=C.useRef(!1),o=C.useRef(!1);return(0,De.jsx)(To,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),To=C.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,l=wo(_o,n),s=C.useRef(null),c=Ne(t,s);return ur(),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Jn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,De.jsx)(qn,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Bo(l.open),...i,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)($o,{titleId:l.titleId}),(0,De.jsx)(Uo,{contentRef:s,descriptionId:l.descriptionId})]})]})}),Ao="DialogTitle",Lo=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wo(Ao,n);return(0,De.jsx)(Ln.h2,{id:o.titleId,...r,ref:t})});Lo.displayName=Ao;var zo="DialogDescription",Wo=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wo(zo,n);return(0,De.jsx)(Ln.p,{id:o.descriptionId,...r,ref:t})});Wo.displayName=zo;var Vo="DialogClose",Ho=C.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=wo(Vo,n);return(0,De.jsx)(Ln.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>o.onOpenChange(!1))})});function Bo(e){return e?"open":"closed"}Ho.displayName=Vo;var Go="DialogTitleWarning",[Yo,qo]=function(e,t){const n=C.createContext(t),r=e=>{const{children:t,...r}=e,o=C.useMemo(()=>r,Object.values(r));return(0,De.jsx)(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=C.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Go,{contentName:_o,titleName:Ao,docsSlug:"dialog"}),$o=({titleId:e})=>{const t=qo(Go),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return C.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},Uo=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qo("DialogDescriptionWarning").contentName}}.`;return C.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},Ko=xo,Zo=So,Xo=Mo,Qo=No,Jo=jo,ea=Lo,ta=Wo,na=Ho;
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const ra=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var oa=["className"],aa=["className","children","side"],ia=["className"],la=["className"],sa=["className"],ca=["className"];function ua(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function da(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(null,arguments)}function pa(e){var t=fa({},(da(e),e));return C.createElement(Ko,fa({"data-slot":"sheet"},t))}function ma(e){var t=fa({},(da(e),e));return C.createElement(Zo,fa({"data-slot":"sheet-trigger"},t))}function ga(e){var t=fa({},(da(e),e));return C.createElement(na,fa({"data-slot":"sheet-close"},t))}function ha(e){var t=fa({},(da(e),e));return C.createElement(Xo,fa({"data-slot":"sheet-portal"},t))}function va(e){var t=e.className,n=ua(e,oa);return C.createElement(Qo,fa({"data-slot":"sheet-overlay",className:Lt("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},n))}function ba(e){var t=e.className,n=e.children,r=e.side,o=void 0===r?"right":r,a=ua(e,aa);return C.createElement(ha,null,C.createElement(va,null),C.createElement(Jo,fa({"data-slot":"sheet-content",className:Lt("bg-background fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out","right"===o&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm","left"===o&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",t)},a),n,C.createElement(na,{className:"absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none","aria-label":"Close"},C.createElement(ra,{className:"h-4 w-4"}))))}function ya(e){var t=e.className,n=ua(e,ia);return C.createElement("div",fa({"data-slot":"sheet-header",className:Lt("flex flex-col gap-1.5 p-6",t)},n))}function wa(e){var t=e.className,n=ua(e,la);return C.createElement("div",fa({"data-slot":"sheet-footer",className:Lt("flex flex-col-reverse gap-2 p-6 pt-0 sm:flex-row sm:justify-end",t)},n))}function xa(e){var t=e.className,n=ua(e,sa);return C.createElement(ea,fa({"data-slot":"sheet-title",className:Lt("text-foreground font-semibold text-base",t)},n))}function Ca(e){var t=e.className,n=ua(e,ca);return C.createElement(ta,fa({"data-slot":"sheet-description",className:Lt("text-muted-foreground text-sm",t)},n))}var Sa=[{heading:(0,ve.__)("Getting Started","smartpay"),links:[{label:(0,ve.__)("Main Documentation","smartpay"),url:"https://docs.wpsmartpay.com/en/category/wpsmartpay",icon:gn},{label:(0,ve.__)("Available Shortcodes","smartpay"),url:"https://docs.wpsmartpay.com/en/available-shortcodes",icon:hn}]},{heading:(0,ve.__)("Configuration","smartpay"),links:[{label:(0,ve.__)("Product Configuration","smartpay"),url:"https://docs.wpsmartpay.com/en/product-configuration",icon:vn},{label:(0,ve.__)("Form Configuration","smartpay"),url:"https://docs.wpsmartpay.com/en/form-configuration",icon:bn},{label:(0,ve.__)("How to Setup Stripe","smartpay"),url:"https://docs.wpsmartpay.com/en/how-to-setup-stripe",icon:yn}]},{heading:(0,ve.__)("Extend","smartpay"),links:[{label:(0,ve.__)("Integrations","smartpay"),url:"https://docs.wpsmartpay.com/en/developer-integration",icon:wn},{label:(0,ve.__)("Developer Docs","smartpay"),url:"https://docs.wpsmartpay.com/en/category/developer",icon:xn}]}];function ka(e){var t=e.open,n=e.onOpenChange;return React.createElement(pa,{open:t,onOpenChange:n},React.createElement(ba,{side:"right",className:"w-80 sm:max-w-xs overflow-y-auto"},React.createElement(ya,{className:"pb-4 border-b border-border"},React.createElement(xa,{className:"flex items-center gap-2 text-base"},React.createElement(gn,{className:"h-4 w-4 text-muted-foreground"}),(0,ve.__)("Help & Documentation","smartpay")),React.createElement(Ca,{className:"text-xs"},(0,ve.__)("Guides, references and developer docs for WPSmartPay.","smartpay"))),React.createElement("nav",{className:"flex flex-col gap-6 px-6 pt-2 pb-5","aria-label":(0,ve.__)("Documentation links","smartpay")},Sa.map(function(e){return React.createElement("div",{key:e.heading},React.createElement("p",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground/60"},e.heading),React.createElement("ul",{className:"flex flex-col gap-0.5 list-none m-0 p-0"},e.links.map(function(e){var t=e.label,n=e.url,r=e.icon;return React.createElement("li",{key:t,className:"m-0 p-0"},React.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"group flex items-center gap-3 rounded-md px-3 py-2 text-sm text-foreground/80 hover:bg-muted hover:text-foreground transition-colors no-underline"},React.createElement(r,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground group-hover:text-foreground transition-colors"}),React.createElement("span",{className:"flex-1 leading-snug"},t),React.createElement(Cn,{className:"h-3 w-3 flex-shrink-0 opacity-0 group-hover:opacity-40 transition-opacity"})))})))})),React.createElement("div",{className:"mt-auto px-6 pb-6 pt-4 border-t border-border"},React.createElement("a",{href:"https://wpsmartpay.com/support/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full rounded-md border border-border bg-muted/40 px-4 py-2 text-sm text-muted-foreground hover:bg-muted hover:text-foreground transition-colors no-underline"},(0,ve.__)("Contact Support","smartpay"),React.createElement(Cn,{className:"h-3.5 w-3.5 opacity-60"})))))}function Ea(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ra(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ra(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ra(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ma="SmartPay";
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const Oa=xe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Na=xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Da=xe("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Pa=xe("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]),_a=xe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),ja=xe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Ia=xe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Fa=xe("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]),Ta=xe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Aa=xe("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),La=xe("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]),za=xe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Wa=xe("Percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]),Va=xe("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),Ha=xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Ba=xe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Ga=xe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),Ya=xe("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]),qa=xe("Sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]),$a=xe("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),Ua=xe("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),Ka=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Za=xe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);window.WPSmartPayIcons={AlertCircle:Oa,AlertTriangle:Na,BadgeCheck:Da,Ban:Pa,Box:_a,CalendarIcon:ja,CheckCircle2:Ia,ChevronDown:Se,ChevronUp:Ce,ChevronsUpDown:ke,CircleUser:Fa,Clock:Ta,Eye:Aa,FilePenLine:La,LinkIcon:za,Loader2:Ee,Percent:Wa,Pin:Va,Plus:Ha,RotateCcw:Ba,Save:Ga,SearchX:Re,ShieldOff:Ya,Sigma:qa,SquarePen:$a,Timer:Ua,Trash2:Ka,XCircle:Za};var Xa=["className","variant","asChild"];function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qa.apply(null,arguments)}var Ja=Ge("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"inline-block px-2 py-0.5 text-xs font-semibold bg-blue-100 text-blue-700 rounded w-fit",secondary:"inline-block px-2 py-0.5 text-xs font-semibold bg-blue-100 text-blue-700 rounded w-fit",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function ei(e){var t=e.className,n=e.variant,r=e.asChild,o=void 0!==r&&r,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Xa),i=o?Fe:"span";return C.createElement(i,Qa({"data-slot":"badge",className:Lt(Ja({variant:n}),t)},a))}function ti(e){const t=ni(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(oi);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ni(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ri=Symbol("radix.slottable");function oi(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ri}function ai(e){const t=e+"CollectionProvider",[n,r]=kn(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=S().useRef(null),a=S().useRef(new Map).current;return(0,De.jsx)(o,{scope:t,itemMap:a,collectionRef:r,children:n})};i.displayName=t;const l=e+"CollectionSlot",s=ti(l),c=S().forwardRef((e,t)=>{const{scope:n,children:r}=e,o=Ne(t,a(l,n).collectionRef);return(0,De.jsx)(s,{ref:o,children:r})});c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=ti(u),p=S().forwardRef((e,t)=>{const{scope:n,children:r,...o}=e,i=S().useRef(null),l=Ne(t,i),s=a(u,n);return S().useEffect(()=>(s.itemMap.set(i,{ref:i,...o}),()=>{s.itemMap.delete(i)})),(0,De.jsx)(f,{[d]:"",ref:l,children:r})});return p.displayName=u,[{Provider:i,Slot:c,ItemSlot:p},function(t){const n=a(e+"CollectionConsumer",t);return S().useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}var ii=new WeakMap;Map;function li(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=function(e,t){const n=e.length,r=si(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return-1===n?void 0:e[n]}function si(e){return e!=e||0===e?0:Math.trunc(e)}var ci="Collapsible",[ui,di]=kn(ci),[fi,pi]=ui(ci),mi=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[s,c]=Pn({prop:r,defaultProp:o??!1,onChange:i,caller:ci});return(0,De.jsx)(fi,{scope:n,disabled:a,contentId:Nn(),open:s,onOpenToggle:C.useCallback(()=>c(e=>!e),[c]),children:(0,De.jsx)(Ln.div,{"data-state":wi(s),"data-disabled":a?"":void 0,...l,ref:t})})});mi.displayName=ci;var gi="CollapsibleTrigger",hi=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=pi(gi,n);return(0,De.jsx)(Ln.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":wi(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Sn(e.onClick,o.onOpenToggle)})});hi.displayName=gi;var vi="CollapsibleContent",bi=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=pi(vi,e.__scopeCollapsible);return(0,De.jsx)(lr,{present:n||o.open,children:({present:e})=>(0,De.jsx)(yi,{...r,ref:t,present:e})})});bi.displayName=vi;var yi=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=pi(vi,n),[l,s]=C.useState(r),c=C.useRef(null),u=Ne(t,c),d=C.useRef(0),f=d.current,p=C.useRef(0),m=p.current,g=i.open||l,h=C.useRef(g),v=C.useRef(void 0);return C.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),Rn(()=>{const e=c.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,h.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),s(r)}},[i.open,r]),(0,De.jsx)(Ln.div,{"data-state":wi(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&o})});function wi(e){return e?"open":"closed"}var xi=mi,Ci=hi,Si=bi,ki=C.createContext(void 0);function Ei(e){const t=C.useContext(ki);return e||t||"ltr"}var Ri="Accordion",Mi=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Oi,Ni,Di]=ai(Ri),[Pi,_i]=kn(Ri,[Di,di]),ji=di(),Ii=S().forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return(0,De.jsx)(Oi.Provider,{scope:e.__scopeAccordion,children:"multiple"===n?(0,De.jsx)(Wi,{...a,ref:t}):(0,De.jsx)(zi,{...o,ref:t})})});Ii.displayName=Ri;var[Fi,Ti]=Pi(Ri),[Ai,Li]=Pi(Ri,{collapsible:!1}),zi=S().forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,s]=Pn({prop:n,defaultProp:r??"",onChange:o,caller:Ri});return(0,De.jsx)(Fi,{scope:e.__scopeAccordion,value:S().useMemo(()=>l?[l]:[],[l]),onItemOpen:s,onItemClose:S().useCallback(()=>a&&s(""),[a,s]),children:(0,De.jsx)(Ai,{scope:e.__scopeAccordion,collapsible:a,children:(0,De.jsx)(Bi,{...i,ref:t})})})}),Wi=S().forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,l]=Pn({prop:n,defaultProp:r??[],onChange:o,caller:Ri}),s=S().useCallback(e=>l((t=[])=>[...t,e]),[l]),c=S().useCallback(e=>l((t=[])=>t.filter(t=>t!==e)),[l]);return(0,De.jsx)(Fi,{scope:e.__scopeAccordion,value:i,onItemOpen:s,onItemClose:c,children:(0,De.jsx)(Ai,{scope:e.__scopeAccordion,collapsible:!0,children:(0,De.jsx)(Bi,{...a,ref:t})})})}),[Vi,Hi]=Pi(Ri),Bi=S().forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,l=Ne(S().useRef(null),t),s=Ni(n),c="ltr"===Ei(o),u=Sn(e.onKeyDown,e=>{if(!Mi.includes(e.key))return;const t=e.target,n=s().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),o=n.length;if(-1===r)return;e.preventDefault();let i=r;const l=o-1,u=()=>{i=r+1,i>l&&(i=0)},d=()=>{i=r-1,i<0&&(i=l)};switch(e.key){case"Home":i=0;break;case"End":i=l;break;case"ArrowRight":"horizontal"===a&&(c?u():d());break;case"ArrowDown":"vertical"===a&&u();break;case"ArrowLeft":"horizontal"===a&&(c?d():u());break;case"ArrowUp":"vertical"===a&&d()}const f=i%o;n[f].ref.current?.focus()});return(0,De.jsx)(Vi,{scope:n,disabled:r,direction:o,orientation:a,children:(0,De.jsx)(Oi.Slot,{scope:n,children:(0,De.jsx)(Ln.div,{...i,"data-orientation":a,ref:l,onKeyDown:r?void 0:u})})})}),Gi="AccordionItem",[Yi,qi]=Pi(Gi),$i=S().forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Hi(Gi,n),i=Ti(Gi,n),l=ji(n),s=Nn(),c=r&&i.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,De.jsx)(Yi,{scope:n,open:c,disabled:u,triggerId:s,children:(0,De.jsx)(xi,{"data-orientation":a.orientation,"data-state":el(c),...l,...o,ref:t,disabled:u,open:c,onOpenChange:e=>{e?i.onItemOpen(r):i.onItemClose(r)}})})});$i.displayName=Gi;var Ui="AccordionHeader",Ki=S().forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hi(Ri,n),a=qi(Ui,n);return(0,De.jsx)(Ln.h3,{"data-orientation":o.orientation,"data-state":el(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Ki.displayName=Ui;var Zi="AccordionTrigger",Xi=S().forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hi(Ri,n),a=qi(Zi,n),i=Li(Zi,n),l=ji(n);return(0,De.jsx)(Oi.ItemSlot,{scope:n,children:(0,De.jsx)(Ci,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...r,ref:t})})});Xi.displayName=Zi;var Qi="AccordionContent",Ji=S().forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hi(Ri,n),a=qi(Qi,n),i=ji(n);return(0,De.jsx)(Si,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function el(e){return e?"open":"closed"}Ji.displayName=Qi;var tl=Ii,nl=$i,rl=Ki,ol=Xi,al=Ji,il=["className"],ll=["className","children"],sl=["className","children"];function cl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ul(){return ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ul.apply(null,arguments)}function dl(e){var t=ul({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return React.createElement(tl,ul({"data-slot":"accordion"},t))}function fl(e){var t=e.className,n=cl(e,il);return React.createElement(nl,ul({"data-slot":"accordion-item",className:Lt("border-b last:border-b-0",t)},n))}function pl(e){var t=e.className,n=e.children,r=cl(e,ll);return React.createElement(rl,{className:"flex"},React.createElement(ol,ul({"data-slot":"accordion-trigger",className:Lt("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",t)},r),n,React.createElement(Se,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})))}function ml(e){var t=e.className,n=e.children,r=cl(e,sl);return React.createElement(al,ul({"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down text-sm"},r),React.createElement("div",{className:Lt("pt-0 pb-4",t)},n))}var gl=["className","variant"],hl=["className"],vl=["className"];function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bl.apply(null,arguments)}function yl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wl=Ge("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function xl(e){var t=e.className,n=e.variant,r=yl(e,gl);return C.createElement("div",bl({"data-slot":"alert",role:"alert",className:Lt(wl({variant:n}),t)},r))}function Cl(e){var t=e.className,n=yl(e,hl);return C.createElement("div",bl({"data-slot":"alert-title",className:Lt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t)},n))}function Sl(e){var t=e.className,n=yl(e,vl);return C.createElement("div",bl({"data-slot":"alert-description",className:Lt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t)},n))}
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const kl=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),El=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Rl,Ml,Ol,Nl;function Dl(){const e={};for(const t in Rl)e[Rl[t]]=`rdp-${Rl[t]}`;for(const t in Ml)e[Ml[t]]=`rdp-${Ml[t]}`;for(const t in Ol)e[Ol[t]]=`rdp-${Ol[t]}`;for(const t in Nl)e[Nl[t]]=`rdp-${Nl[t]}`;return e}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(Rl||(Rl={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(Ml||(Ml={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(Ol||(Ol={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(Nl||(Nl={}));const Pl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function _l(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jl={date:_l({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:_l({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:_l({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Il={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Fl(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Tl={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Fl({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Fl({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fl({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Fl({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Fl({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Al(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,e=>e.test(i)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(l,e=>e.test(i));let c;c=e.valueCallback?e.valueCallback(s):s,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}const Ll={ordinalNumber:(zl={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(zl.matchPattern);if(!n)return null;const r=n[0],o=e.match(zl.parsePattern);if(!o)return null;let a=zl.valueCallback?zl.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Al({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Al({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Al({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Al({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Al({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var zl;const Wl={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Pl[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:jl,formatRelative:(e,t,n,r)=>Il[e],localize:Tl,match:Ll,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Vl={};function Hl(){return Vl}Math.pow(10,8);const Bl=6048e5,Gl=864e5,Yl=Symbol.for("constructDateFrom");function ql(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Yl in e?e[Yl](t):e instanceof Date?new e.constructor(t):new Date(t)}function $l(e,t){return ql(t||e,e)}function Ul(e){const t=$l(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Kl(e,...t){const n=ql.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Zl(e,t){const n=$l(e,t?.in);return n.setHours(0,0,0,0),n}function Xl(e,t,n){const[r,o]=Kl(n?.in,e,t),a=Zl(r),i=Zl(o),l=+a-Ul(a),s=+i-Ul(i);return Math.round((l-s)/Gl)}function Ql(e,t){const n=$l(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Jl(e,t){const n=$l(e,t?.in);return Xl(n,Ql(n))+1}function es(e,t){const n=Hl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$l(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ts(e,t){return es(e,{...t,weekStartsOn:1})}function ns(e,t){const n=$l(e,t?.in),r=n.getFullYear(),o=ql(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ts(o),i=ql(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const l=ts(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function rs(e,t){const n=ns(e,t),r=ql(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ts(r)}function os(e,t){const n=$l(e,t?.in),r=+ts(n)-+rs(n);return Math.round(r/Bl)+1}function as(e,t){const n=$l(e,t?.in),r=n.getFullYear(),o=Hl(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=ql(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const l=es(i,t),s=ql(t?.in||e,0);s.setFullYear(r,0,a),s.setHours(0,0,0,0);const c=es(s,t);return+n>=+l?r+1:+n>=+c?r:r-1}function is(e,t){const n=Hl(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=as(e,t),a=ql(t?.in||e,0);a.setFullYear(o,0,r),a.setHours(0,0,0,0);return es(a,t)}function ls(e,t){const n=$l(e,t?.in),r=+es(n,t)-+is(n,t);return Math.round(r/Bl)+1}function ss(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const cs={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ss("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):ss(n+1,2)},d:(e,t)=>ss(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>ss(e.getHours()%12||12,t.length),H:(e,t)=>ss(e.getHours(),t.length),m:(e,t)=>ss(e.getMinutes(),t.length),s:(e,t)=>ss(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return ss(Math.trunc(r*Math.pow(10,n-3)),t.length)}},us="midnight",ds="noon",fs="morning",ps="afternoon",ms="evening",gs="night",hs={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return cs.y(e,t)},Y:function(e,t,n,r){const o=as(e,r),a=o>0?o:1-o;if("YY"===t){return ss(a%100,2)}return"Yo"===t?n.ordinalNumber(a,{unit:"year"}):ss(a,t.length)},R:function(e,t){return ss(ns(e),t.length)},u:function(e,t){return ss(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ss(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ss(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return cs.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ss(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ls(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):ss(o,t.length)},I:function(e,t,n){const r=os(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ss(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):cs.d(e,t)},D:function(e,t,n){const r=Jl(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ss(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ss(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ss(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return ss(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?ds:0===r?us:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?ms:r>=12?ps:r>=4?fs:gs,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return cs.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):cs.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ss(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):ss(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):cs.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):cs.s(e,t)},S:function(e,t){return cs.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return bs(r);case"XXXX":case"XX":return ys(r);default:return ys(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return bs(r);case"xxxx":case"xx":return ys(r);default:return ys(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+vs(r,":");default:return"GMT"+ys(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+vs(r,":");default:return"GMT"+ys(r,":")}},t:function(e,t,n){return ss(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return ss(+e,t.length)}};function vs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+ss(a,2)}function bs(e,t){if(e%60==0){return(e>0?"-":"+")+ss(Math.abs(e)/60,2)}return ys(e,t)}function ys(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+ss(Math.trunc(r/60),2)+t+ss(r%60,2)}const ws=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xs=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Cs={p:xs,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ws(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",ws(r,t)).replace("{{time}}",xs(o,t))}},Ss=/^D+$/,ks=/^Y+$/,Es=["D","DD","YY","YYYY"];function Rs(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Ms(e){return!(!Rs(e)&&"number"!=typeof e||isNaN(+$l(e)))}const Os=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ns=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ds=/^'([^]*?)'?$/,Ps=/''/g,_s=/[a-zA-Z]/;function js(e,t,n){const r=Hl(),o=n?.locale??r.locale??Wl,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=$l(e,n?.in);if(!Ms(l))throw new RangeError("Invalid time value");let s=t.match(Ns).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Cs[t])(e,o.formatLong)}return e}).join("").match(Os).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Is(e)};if(hs[t])return{isToken:!0,value:e};if(t.match(_s))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(s=o.localize.preprocessor(l,s));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return s.map(r=>{if(!r.isToken)return r.value;const a=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return ks.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return Ss.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Es.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,hs[a[0]])(l,a,o.localize,c)}).join("")}function Is(e){const t=e.match(Ds);return t?t[1].replace(Ps,"'"):e}const Fs={...Wl,labels:{labelDayButton:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>js(e,t,{locale:Wl,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>js(e,n,{locale:Wl,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>js(e,t,{locale:Wl,...n});let a=o(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>js(e,n,{locale:Wl,...t}),r(e,"cccc")}}};Symbol.for("constructDateFrom");const Ts={},As={};function Ls(e,t){try{const n=(Ts[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in As?As[n]:Ws(n,n.split(":"))}catch{if(e in As)return As[e];const t=e?.match(zs);return t?Ws(e,t.slice(1)):NaN}}const zs=/([+-]\d\d):?(\d\d)?/;function Ws(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return As[e]=60*n+r>0?60*n+r+o:60*n-r-o}class Vs extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(Ls(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),Gs(this),Bs(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new Vs(...t,e):new Vs(Date.now(),e)}withTimeZone(e){return new Vs(+this,e)}getTimezoneOffset(){const e=-Ls(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Bs(this),+this}[Symbol.for("constructDateFrom")](e){return new Vs(+new Date(e),this.timeZone)}}const Hs=/^(get|set)(?!UTC)/;function Bs(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-Ls(e.timeZone,e)))}function Gs(e){const t=Ls(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=o- -new Date(+r).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=o-n;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const s=new Date(+e);s.setUTCSeconds(0);const c=o>0?s.getSeconds():(s.getSeconds()-60)%60,u=Math.round(-60*Ls(e.timeZone,e))%60;(u||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+c));const d=Ls(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f-l;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=Ls(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Hs.test(e))return;const t=e.replace(Hs,"$1UTC");Vs.prototype[t]&&(e.startsWith("get")?Vs.prototype[e]=function(){return this.internal[t]()}:(Vs.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Gs(e),+this},Vs.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Bs(this),+this}))});class Ys extends Vs{static tz(e,...t){return t.length?new Ys(...t,e):new Ys(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new Ys(+this,e)}[Symbol.for("constructDateFrom")](e){return new Ys(+new Date(e),this.timeZone)}}function qs(e,t,n){const r=$l(e,n?.in);return isNaN(t)?ql(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function $s(e,t,n){const r=$l(e,n?.in);if(isNaN(t))return ql(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),a=ql(n?.in||e,r.getTime());a.setMonth(r.getMonth()+t+1,0);return o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function Us(e,t,n){return qs(e,7*t,n)}function Ks(e,t,n){return $s(e,12*t,n)}function Zs(e,t,n){const[r,o]=Kl(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function Xs(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function Qs(e,t){const{start:n,end:r}=Xs(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let l=t?.step??1;if(!l)return[];l<0&&(l=-l,o=!o);const s=[];for(;+i<=a;)s.push(ql(n,i)),i.setMonth(i.getMonth()+l);return o?s.reverse():s}function Js(e,t){const{start:n,end:r}=Xs(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let l=t?.step??1;if(!l)return[];l<0&&(l=-l,o=!o);const s=[];for(;+i<=a;)s.push(ql(n,i)),i.setFullYear(i.getFullYear()+l);return o?s.reverse():s}function ec(e,t){const n=Hl(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=$l(e,t?.in),a=o.getDay(),i=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function tc(e,t){return ec(e,{...t,weekStartsOn:1})}function nc(e,t){const n=$l(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function rc(e,t){const n=$l(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function oc(e,t){return $l(e,t?.in).getMonth()}function ac(e,t){return $l(e,t?.in).getFullYear()}function ic(e,t){return+$l(e)>+$l(t)}function lc(e,t){return+$l(e)<+$l(t)}function sc(e,t,n){const[r,o]=Kl(n?.in,e,t);return+Zl(r)===+Zl(o)}function cc(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function uc(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function dc(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=ql.bind(null,e));const t=$l(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),ql(r,n||NaN)}function fc(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=ql.bind(null,e));const t=$l(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),ql(r,n||NaN)}function pc(e,t){const n=$l(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=ql(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function mc(e,t,n){const r=$l(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=ql(n?.in||e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const l=pc(i);return r.setMonth(t,Math.min(a,l)),r}function gc(e,t,n){const r=$l(e,n?.in);return isNaN(+r)?ql(n?.in||e,NaN):(r.setFullYear(t),r)}function hc(e,t){const n=$l(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function vc(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class bc{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?Ys.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new Ys(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):qs(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):$s(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):Us(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):Ks(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Xl(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):Zs(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):Qs(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):Js(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=vc(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):tc(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):nc(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):ec(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):rc(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):js(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):os(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):oc(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):ac(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):ls(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):ic(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):lc(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):Rs(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):sc(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):cc(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):uc(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):dc(e),this.min=e=>this.overrides?.min?this.overrides.min(e):fc(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):mc(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):gc(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):vc(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Zl(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):ts(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):hc(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):es(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Ql(e),this.options={locale:Fs,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&bc.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&bc.yearFirstLocales.has(o))try{const t=new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:n,numberingSystem:r});return t.format(e)}catch{}const a="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,a)}}bc.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const yc=new bc;function wc(e,t,n=!1,r=yc){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:l}=r;if(o&&a){i(a,o)<0&&([o,a]=[a,o]);return i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)}return!n&&a?l(a,t):!(n||!o)&&l(o,t)}function xc(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Cc(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Sc(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function kc(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function Ec(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Rc(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Mc(e,t,n=yc){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(Rc(t,n))return t.some(t=>o(e,t));if(Cc(t))return wc(t,e,!1,n);if(Ec(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(xc(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return Sc(t)?a(e,t.after)>0:kc(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function Oc(e){return C.createElement("button",{...e})}function Nc(e){return C.createElement("span",{...e})}function Dc(e){const{size:t=24,orientation:n="left",className:r}=e;return C.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&C.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&C.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&C.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&C.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Pc(e){const{day:t,modifiers:n,...r}=e;return C.createElement("td",{...r})}function _c(e){const{day:t,modifiers:n,...r}=e,o=C.useRef(null);return C.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),C.createElement("button",{ref:o,...r})}function jc(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[Rl.Dropdown],n].join(" "),l=t?.find(({value:e})=>e===a.value);return C.createElement("span",{"data-disabled":a.disabled,className:o[Rl.DropdownRoot]},C.createElement(r.Select,{className:i,...a},t?.map(({value:e,label:t,disabled:n})=>C.createElement(r.Option,{key:e,value:e,disabled:n},t))),C.createElement("span",{className:o[Rl.CaptionLabel],"aria-hidden":!0},l?.label,C.createElement(r.Chevron,{orientation:"down",size:18,className:o[Rl.Chevron]})))}function Ic(e){return C.createElement("div",{...e})}function Fc(e){return C.createElement("div",{...e})}function Tc(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r},e.children)}function Ac(e){const{calendarMonth:t,displayIndex:n,...r}=e;return C.createElement("div",{...r})}function Lc(e){return C.createElement("table",{...e})}function zc(e){return C.createElement("div",{...e})}const Wc=(0,C.createContext)(void 0);function Vc(){const e=(0,C.useContext)(Wc);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}function Hc(e){const{components:t}=Vc();return C.createElement(t.Dropdown,{...e})}function Bc(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:l,labels:{labelPrevious:s,labelNext:c}}=Vc(),u=(0,C.useCallback)(e=>{o&&n?.(e)},[o,n]),d=(0,C.useCallback)(e=>{r&&t?.(e)},[r,t]);return C.createElement("nav",{...a},C.createElement(i.PreviousMonthButton,{type:"button",className:l[Rl.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":s(r),onClick:d},C.createElement(i.Chevron,{disabled:!r||void 0,className:l[Rl.Chevron],orientation:"left"})),C.createElement(i.NextMonthButton,{type:"button",className:l[Rl.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":c(o),onClick:u},C.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:l[Rl.Chevron]})))}function Gc(e){const{components:t}=Vc();return C.createElement(t.Button,{...e})}function Yc(e){return C.createElement("option",{...e})}function qc(e){const{components:t}=Vc();return C.createElement(t.Button,{...e})}function $c(e){const{rootRef:t,...n}=e;return C.createElement("div",{...n,ref:t})}function Uc(e){return C.createElement("select",{...e})}function Kc(e){const{week:t,...n}=e;return C.createElement("tr",{...n})}function Zc(e){return C.createElement("th",{...e})}function Xc(e){return C.createElement("thead",{"aria-hidden":!0},C.createElement("tr",{...e}))}function Qc(e){const{week:t,...n}=e;return C.createElement("th",{...n})}function Jc(e){return C.createElement("th",{...e})}function eu(e){return C.createElement("tbody",{...e})}function tu(e){const{components:t}=Vc();return C.createElement(t.Dropdown,{...e})}function nu(e,t,n){return(n??new bc(t)).formatMonthYear(e)}const ru=nu;function ou(e,t,n){return(n??new bc(t)).format(e,"d")}function au(e,t=yc){return t.format(e,"LLLL")}function iu(e,t,n){return(n??new bc(t)).format(e,"cccccc")}function lu(e,t=yc){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function su(){return""}function cu(e,t=yc){return t.format(e,"yyyy")}const uu=cu;function du(e,t,n,r){let o=(r??new bc(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const fu=du;function pu(e,t,n){return(n??new bc(t)).formatMonthYear(e)}const mu=pu;function gu(e,t,n,r){let o=(r??new bc(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function hu(e){return"Choose the Month"}function vu(){return""}const bu="Go to the Next Month";function yu(e,t){return bu}function wu(e){return"Go to the Previous Month"}function xu(e,t,n){return(n??new bc(t)).format(e,"cccc")}function Cu(e,t){return`Week ${e}`}function Su(e){return"Week Number"}function ku(e){return"Choose the Year"}const Eu=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function Ru(e,t){const n=t.locale?.labels??{};return{...f,...e??{},labelDayButton:Eu(du,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:Eu(hu,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:Eu(yu,e?.labelNext,n.labelNext),labelPrevious:Eu(wu,e?.labelPrevious,n.labelPrevious),labelWeekNumber:Eu(Cu,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Eu(ku,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:Eu(pu,e?.labelGrid,n.labelGrid),labelGridcell:Eu(gu,e?.labelGridcell,n.labelGridcell),labelNav:Eu(vu,e?.labelNav,n.labelNav),labelWeekNumberHeader:Eu(Su,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Eu(xu,e?.labelWeekday,n.labelWeekday)}}function Mu(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:l,eachMonthOfInterval:s,getMonth:c}=o;return s({start:i(e),end:l(e)}).map(e=>{const i=r.formatMonthDropdown(e,o);return{value:c(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function Ou(e,t,n,r,o=!1){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:l,getYear:s}=r,c=l({start:a(e),end:i(t)});return o&&c.reverse(),c.map(e=>{const t=n.formatYearDropdown(e,r);return{value:s(e),label:t,disabled:!1}})}const Nu=e=>e instanceof HTMLElement?e:null,Du=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Pu=e=>Nu(e.querySelector("[data-animated-month]")),_u=e=>Nu(e.querySelector("[data-animated-caption]")),ju=e=>Nu(e.querySelector("[data-animated-weeks]")),Iu=e=>Nu(e.querySelector("[data-animated-nav]")),Fu=e=>Nu(e.querySelector("[data-animated-weekdays]"));function Tu(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:l=1}=e;let s=o||a||i;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=r;if(n&&c(n,s)<l-1){s=u(n,-1*(l-1))}return t&&c(s,t)<0&&(s=t),d(s)}class Au{constructor(e,t,n=yc){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(t,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class Lu{constructor(e,t){this.days=t,this.weekNumber=e}}class zu{constructor(e,t){this.date=e,this.weeks=t}}function Wu(e,t){const[n,r]=(0,C.useState)(e);return[void 0===t?n:t,r]}function Vu(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:l,addYears:s,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:g}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&g&&(r=g),!r&&p&&(r=u(p,11,31));const h="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=u(f,0,1):!n&&h&&(n=o(s(e.today??d(),-100))),r?r=l(r):p?r=u(p,11,31):!r&&h&&(r=c(e.today??d())),[n?a(n):n,r?a(r):r]}(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Tu(e,n,r,t),[l,s]=Wu(i,e.month?i:void 0);(0,C.useEffect)(()=>{const o=Tu(e,n,r,t);s(o)},[e.timeZone]);const{months:c,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,C.useMemo)(()=>{const o=function(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}(l,r,{numberOfMonths:e.numberOfMonths},t),i=function(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:l,broadcastCalendar:s}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:g,isAfter:h,startOfBroadcastWeek:v,startOfISOWeek:b,startOfWeek:y}=r,w=s?v(o,r):i?b(o):y(o),x=s?f(a):i?p(m(a)):g(m(a)),C=t&&(s?f(t):i?p(t):g(t)),S=u(C&&h(x,C)?C:x,w),k=d(a,o)+1,E=[];for(let e=0;e<=S;e++){const t=c(w,e);E.push(t)}const R=(s?35:42)*k;if(l&&E.length<R){const e=R-E.length;for(let t=0;t<e;t++){const e=c(E[E.length-1],1);E.push(e)}}return E}(o,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),s=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:l,endOfWeek:s,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{const g=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),h=n.broadcastCalendar?a(m):n.ISOWeek?i(l(m)):s(l(m)),v=t.filter(e=>e>=g&&e<=h),b=n.broadcastCalendar?35:42;if(n.fixedWeeks&&v.length<b){const e=t.filter(e=>{const t=b-v.length;return e>h&&e<=o(h,t)});v.push(...e)}const y=v.reduce((e,t)=>{const o=n.ISOWeek?c(t):u(t),a=e.find(e=>e.weekNumber===o),i=new Au(t,m,r);return a?a.days.push(i):e.push(new Lu(o,[i])),e},[]),w=new zu(m,y);return e.push(w),e},[]);return n.reverseMonths?m.reverse():m}(o,i,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),c=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(s),u=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(s),d=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,c=o?a??1:1,u=i(e);return t&&s(u,t)<=0?void 0:l(u,-c)}(l,n,e,t),f=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:l,differenceInCalendarMonths:s}=r,c=o?a:1,u=i(e);return t&&s(t,e)<a?void 0:l(u,c)}(l,r,e,t);return{months:s,weeks:c,days:u,previousMonth:d,nextMonth:f}},[t,l.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:g}=e,h=e=>{if(m)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),s(t),g?.(t)};return{months:c,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:h,goToDay:e=>{(e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||h(e.date)}}}var Hu,Bu,Gu;function Yu(e){return!e[Ml.disabled]&&!e[Ml.hidden]&&!e[Ml.outside]}function qu(e,t,n,r,o,a,i,l=0){if(l>365)return;const s=function(e,t,n,r,o,a,i){const{ISOWeek:l,broadcastCalendar:s}=a,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:g,max:h,min:v,startOfBroadcastWeek:b,startOfISOWeek:y,startOfWeek:w}=i;let x={day:c,week:d,month:u,year:f,startOfWeek:e=>s?b(e,i):l?y(e):w(e),endOfWeek:e=>s?p(e):l?m(e):g(e)}[e](n,"after"===t?1:-1);return"before"===t&&r?x=h([r,x]):"after"===t&&o&&(x=v([o,x])),x}(e,t,n.date,r,o,a,i),c=Boolean(a.disabled&&Mc(s,a.disabled,i)),u=Boolean(a.hidden&&Mc(s,a.hidden,i)),d=new Au(s,s,i);return c||u?qu(e,t,d,r,o,a,i,l+1):d}function $u(e,t,n,r,o){const{autoFocus:a}=e,[i,l]=(0,C.useState)(),s=function(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);Yu(e)&&(e[Ml.focused]&&a<Hu.FocusedModifier?(o=i,a=Hu.FocusedModifier):r?.isEqualTo(i)&&a<Hu.LastFocused?(o=i,a=Hu.LastFocused):n(i.date)&&a<Hu.Selected?(o=i,a=Hu.Selected):e[Ml.today]&&a<Hu.Today&&(o=i,a=Hu.Today))}return o||(o=e.find(e=>Yu(t(e)))),o}(t.days,n,r||(()=>!1),i),[c,u]=(0,C.useState)(a?s:void 0);return{isFocusTarget:e=>Boolean(s?.isEqualTo(e)),setFocused:u,focused:c,blur:()=>{l(c),u(void 0)},moveFocus:(n,r)=>{if(!c)return;const a=qu(n,r,c,t.navStart,t.navEnd,e,o);if(a){if(e.disableNavigation){if(!t.days.some(e=>e.isEqualTo(a)))return}t.goToDay(a),u(a)}}}}function Uu(e,t,n=yc){return wc(e,t.from,!1,n)||wc(e,t.to,!1,n)||wc(t,e.from,!1,n)||wc(t,e.to,!1,n)}function Ku(e,t,n=yc){const r=Array.isArray(t)?t:[t];if(r.filter(e=>"function"!=typeof e).some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return wc(e,t,!1,n);if(Rc(t,n))return t.some(t=>wc(e,t,!1,n));if(Cc(t))return!(!t.from||!t.to)&&Uu(e,{from:t.from,to:t.to},n);if(Ec(t))return function(e,t,n=yc){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n);if(xc(t)){return n.isAfter(t.before,t.after)?Uu(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):Mc(e.from,t,n)||Mc(e.to,t,n)}return!(!Sc(t)&&!kc(t))&&(Mc(e.from,t,n)||Mc(e.to,t,n))}))return!0;const o=r.filter(e=>"function"==typeof e);if(o.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(o.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}function Zu(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:i,onSelect:l}=e,[s,c]=Wu(a,l?a:void 0),u=l?a:s;return{selected:u,select:(a,s,d)=>{const{min:f,max:p}=e;let m;if(a){const e=u?.from,n=u?.to,r=!!e&&!!n,l=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=!o||!r&&u?.from?function(e,t,n=0,r=0,o=!1,a=yc){const{from:i,to:l}=t||{},{isSameDay:s,isAfter:c,isBefore:u}=a;let d;if(i||l){if(i&&!l)d=s(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:u(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&l)if(s(i,e)&&s(l,e))d=o?{from:i,to:l}:void 0;else if(s(i,e))d={from:i,to:n>0?void 0:e};else if(s(l,e))d={from:e,to:n>0?void 0:e};else if(u(e,i))d={from:e,to:l};else if(c(e,i))d={from:i,to:e};else{if(!c(e,l))throw new Error("Invalid range");d={from:i,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(a,u,f,p,i,t):!i&&l?void 0:{from:a,to:void 0}}return r&&n&&m?.from&&m.to&&Ku({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),l||c(m),l?.(m,a,s,d),m},isSelected:e=>u&&wc(u,e,!1,t)}}function Xu(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Wu(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t;return{selected:l,select:(e,t,n)=>{let a=e;return!r&&l&&l&&s(e,l)&&(a=void 0),o||i(a),o?.(a,e,t,n),a},isSelected:e=>!!l&&s(l,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Wu(n,o?n:void 0),l=o?n:a,{isSameDay:s}=t,c=e=>l?.some(t=>s(t,e))??!1,{min:u,max:d}=e;return{selected:l,select:(e,t,n)=>{let a=[...l??[]];if(c(e)){if(l?.length===u)return;if(r&&1===l?.length)return;a=l?.filter(t=>!s(t,e))}else a=l?.length===d?[e]:[...a,e];return o||i(a),o?.(a,e,t,n),a},isSelected:c}}(e,t),o=Zu(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Qu(e,t){return e instanceof Ys&&e.timeZone===t?e:new Ys(e,t)}function Ju(e,t,n){if(!n)return Qu(e,t);const r=Qu(e,t),o=new Ys(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(o.getTime())}function ed(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?Ju(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?Ju(e,t,n):e):Cc(e)?{...e,from:e.from?Qu(e.from,t):e.from,to:e.to?Qu(e.to,t):e.to}:xc(e)?{before:Ju(e.before,t,n),after:Ju(e.after,t,n)}:Sc(e)?{after:Ju(e.after,t,n)}:kc(e)?{before:Ju(e.before,t,n)}:e}function td(e,t,n){return e?Array.isArray(e)?e.map(e=>ed(e,t,n)):ed(e,t,n):e}function nd(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Qu(t.today,n)),t.month&&(t.month=Qu(t.month,n)),t.defaultMonth&&(t.defaultMonth=Qu(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Qu(t.startMonth,n)),t.endMonth&&(t.endMonth=Qu(t.endMonth,n)),"single"===t.mode&&t.selected?t.selected=Qu(t.selected,n):"multiple"===t.mode&&t.selected?t.selected=t.selected?.map(e=>Qu(e,n)):"range"===t.mode&&t.selected&&(t.selected={from:t.selected.from?Qu(t.selected.from,n):t.selected.from,to:t.selected.to?Qu(t.selected.to,n):t.selected.to}),void 0!==t.disabled&&(t.disabled=td(t.disabled,n)),void 0!==t.hidden&&(t.hidden=td(t.hidden,n)),t.modifiers)){const e={};Object.keys(t.modifiers).forEach(r=>{e[r]=td(t.modifiers?.[r],n)}),t.modifiers=e}const{components:r,formatters:o,labels:a,dateLib:i,locale:l,classNames:s}=(0,C.useMemo)(()=>{const e={...Fs,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,r=t.noonSafe&&t.timeZone?function(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,a=t=>{const n="number"==typeof t||"string"==typeof t?new Date(t):t;return new Ys(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},i=e=>{const t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(Ys.tz(e)),newDate:(t,n,r)=>new Ys(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{const n=a(e),r=t?.weekStartsOn??o,i=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-i),n},startOfISOWeek:e=>{const t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{const t=a(e);return t.setDate(1),t},startOfYear:e=>{const t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{const n=a(e),r=(((t?.weekStartsOn??o)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{const t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{const t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{const t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{const n=a(t.start),r=a(t.end),o=[],i=new Ys(n.getFullYear(),n.getMonth(),1,12,0,0,e),l=12*r.getFullYear()+r.getMonth();for(;12*i.getFullYear()+i.getMonth()<=l;)o.push(new Ys(i,e)),i.setMonth(i.getMonth()+1,1);return o},addDays:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+7*t),n},addMonths:(e,t)=>{const n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{const n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{const n=a(t.start),r=a(t.end),o=[],i=new Ys(n.getFullYear(),0,1,12,0,0,e);for(;i.getFullYear()<=r.getFullYear();)o.push(new Ys(i,e)),i.setFullYear(i.getFullYear()+1,0,1);return o},getWeek:(e,t)=>ls(i(e),{weekStartsOn:t?.weekStartsOn??o,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>os(i(e)),differenceInCalendarDays:(e,t)=>Xl(i(e),i(t)),differenceInCalendarMonths:(e,t)=>Zs(i(e),i(t))}}(t.timeZone,{weekStartsOn:n,locale:e}):void 0,o=t.dateLib&&r?{...r,...t.dateLib}:t.dateLib??r,a=new bc({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},o);return{dateLib:a,components:(l=t.components,{...u,...l}),formatters:(i=t.formatters,i?.formatMonthCaption&&!i.formatCaption&&(i.formatCaption=i.formatMonthCaption),i?.formatYearCaption&&!i.formatYearDropdown&&(i.formatYearDropdown=i.formatYearCaption),{...d,...i}),labels:Ru(t.labels,a.options),locale:e,classNames:{...Dl(),...t.classNames}};var i,l},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:i.today()});const{captionLayout:c,mode:f,navLayout:p,numberOfMonths:m=1,onDayBlur:g,onDayClick:h,onDayFocus:v,onDayKeyDown:b,onDayMouseEnter:y,onDayMouseLeave:w,onNextClick:x,onPrevClick:S,showWeekNumber:k,styles:E}=t,{formatCaption:R,formatDay:M,formatMonthDropdown:O,formatWeekNumber:N,formatWeekNumberHeader:D,formatWeekdayName:P,formatYearDropdown:_}=o,j=Vu(t,i),{days:I,months:F,navStart:T,navEnd:A,previousMonth:L,nextMonth:z,goToMonth:W}=j,V=function(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:l,showOutsideDays:s,broadcastCalendar:c,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:g,isAfter:h}=o,v=n&&p(n),b=r&&g(r),y={[Ml.focused]:[],[Ml.outside]:[],[Ml.disabled]:[],[Ml.hidden]:[],[Ml.today]:[]},w={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(v&&m(e,v)),g=Boolean(b&&h(e,b)),x=Boolean(a&&Mc(e,a,o)),C=Boolean(i&&Mc(e,i,o))||p||g||!c&&!s&&r||c&&!1===s&&r,S=d(e,u);r&&y.outside.push(t),x&&y.disabled.push(t),C&&y.hidden.push(t),S&&y.today.push(t),l&&Object.keys(l).forEach(n=>{const r=l?.[n];r&&Mc(e,r,o)&&(w[n]?w[n].push(t):w[n]=[t])})}return e=>{const t={[Ml.focused]:!1,[Ml.disabled]:!1,[Ml.hidden]:!1,[Ml.outside]:!1,[Ml.today]:!1},n={};for(const n in y){const r=y[n];t[n]=r.some(t=>t===e)}for(const t in w)n[t]=w[t].some(t=>t===e);return{...t,...n}}}(I,t,T,A,i),{isSelected:H,select:B,selected:G}=Xu(t,i)??{},{blur:Y,focused:q,isFocusTarget:$,moveFocus:U,setFocused:K}=$u(t,j,V,H??(()=>!1),i),{labelDayButton:Z,labelGridcell:X,labelGrid:Q,labelMonthDropdown:J,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ae,labelYearDropdown:ie}=a,le=(0,C.useMemo)(()=>function(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let t=0;t<7;t++){const n=e.addDays(a,t);i.push(n)}return i}(i,t.ISOWeek,t.broadcastCalendar,t.today),[i,t.ISOWeek,t.broadcastCalendar,t.today]),se=void 0!==f||void 0!==h,ce=(0,C.useCallback)(()=>{L&&(W(L),S?.(L))},[L,W,S]),ue=(0,C.useCallback)(()=>{z&&(W(z),x?.(z))},[W,z,x]),de=(0,C.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),K(e),t.disabled||(B?.(e.date,t,n),h?.(e.date,t,n))},[B,h,K]),fe=(0,C.useCallback)((e,t)=>n=>{K(e),v?.(e.date,t,n)},[v,K]),pe=(0,C.useCallback)((e,t)=>n=>{Y(),g?.(e.date,t,n)},[Y,g]),me=(0,C.useCallback)((e,n)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===t.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===t.dir?"before":"after"],ArrowDown:[r.shiftKey?"year":"week","after"],ArrowUp:[r.shiftKey?"year":"week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];U(e,t)}b?.(e.date,n,r)},[U,b,t.dir]),ge=(0,C.useCallback)((e,t)=>n=>{y?.(e.date,t,n)},[y]),he=(0,C.useCallback)((e,t)=>n=>{w?.(e.date,t,n)},[w]),ve=(0,C.useCallback)(e=>t=>{const n=Number(t.target.value),r=i.setMonth(i.startOfMonth(e),n);W(r)},[i,W]),be=(0,C.useCallback)(e=>t=>{const n=Number(t.target.value),r=i.setYear(i.startOfMonth(e),n);W(r)},[i,W]),{className:ye,style:we}=(0,C.useMemo)(()=>({className:[s[Rl.Root],t.className].filter(Boolean).join(" "),style:{...E?.[Rl.Root],...t.style}}),[s,t.className,t.style,E]),xe=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(t),Ce=(0,C.useRef)(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=(0,C.useRef)(null),l=(0,C.useRef)(r),s=(0,C.useRef)(!1);(0,C.useLayoutEffect)(()=>{const c=l.current;if(l.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==c.length&&r.length===c.length))return;const u=a.isSameMonth(r[0].date,c[0].date),d=a.isAfter(r[0].date,c[0].date),f=d?n[Nl.caption_after_enter]:n[Nl.caption_before_enter],p=d?n[Nl.weeks_after_enter]:n[Nl.weeks_before_enter],m=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Du(g).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=Pu(e);t&&e.contains(t)&&e.removeChild(t);const n=_u(e);n&&n.classList.remove(f);const r=ju(e);r&&r.classList.remove(p)}),i.current=g):i.current=null,s.current||u||o)return;const h=m instanceof HTMLElement?Du(m):[],v=Du(e.current);if(v?.every(e=>e instanceof HTMLElement)&&h&&h.every(e=>e instanceof HTMLElement)){s.current=!0;const t=[];e.current.style.isolation="isolate";const r=Iu(e.current);r&&(r.style.zIndex="1"),v.forEach((o,a)=>{const i=h[a];if(!i)return;o.style.position="relative",o.style.overflow="hidden";const l=_u(o);l&&l.classList.add(f);const c=ju(o);c&&c.classList.add(p);const u=()=>{s.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),l&&l.classList.remove(f),c&&c.classList.remove(p),o.style.position="",o.style.overflow="",o.contains(i)&&o.removeChild(i)};t.push(u),i.style.pointerEvents="none",i.style.position="absolute",i.style.overflow="hidden",i.setAttribute("aria-hidden","true");const m=Fu(i);m&&(m.style.opacity="0");const g=_u(i);g&&(g.classList.add(d?n[Nl.caption_before_exit]:n[Nl.caption_after_exit]),g.addEventListener("animationend",u));const v=ju(i);v&&v.classList.add(d?n[Nl.weeks_before_exit]:n[Nl.weeks_after_exit]),o.insertBefore(i,o.firstChild)})}})}(Ce,Boolean(t.animate),{classNames:s,months:F,focused:q,dateLib:i});const Se={dayPickerProps:t,selected:G,select:B,isSelected:H,months:F,nextMonth:z,previousMonth:L,goToMonth:W,getModifiers:V,components:r,classNames:s,styles:E,labels:a,formatters:o};return C.createElement(Wc.Provider,{value:Se},C.createElement(r.Root,{rootRef:t.animate?Ce:void 0,className:ye,style:we,dir:t.dir,id:t.id,lang:t.lang??l.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...xe},C.createElement(r.Months,{className:s[Rl.Months],style:E?.[Rl.Months]},!t.hideNavigation&&!p&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[Rl.Nav],style:E?.[Rl.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:L,nextMonth:z}),F.map((e,n)=>C.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:s[Rl.Month],style:E?.[Rl.Month],key:n,displayIndex:n,calendarMonth:e},"around"===p&&!t.hideNavigation&&0===n&&C.createElement(r.PreviousMonthButton,{type:"button",className:s[Rl.PreviousMonthButton],tabIndex:L?void 0:-1,"aria-disabled":!L||void 0,"aria-label":te(L),onClick:ce,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:!L||void 0,className:s[Rl.Chevron],orientation:"rtl"===t.dir?"right":"left"})),C.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[Rl.MonthCaption],style:E?.[Rl.MonthCaption],calendarMonth:e,displayIndex:n},c?.startsWith("dropdown")?C.createElement(r.DropdownNav,{className:s[Rl.Dropdowns],style:E?.[Rl.Dropdowns]},(()=>{const n="dropdown"===c||"dropdown-months"===c?C.createElement(r.MonthsDropdown,{key:"month",className:s[Rl.MonthsDropdown],"aria-label":J(),classNames:s,components:r,disabled:Boolean(t.disableNavigation),onChange:ve(e.date),options:Mu(e.date,T,A,o,i),style:E?.[Rl.Dropdown],value:i.getMonth(e.date)}):C.createElement("span",{key:"month"},O(e.date,i)),a="dropdown"===c||"dropdown-years"===c?C.createElement(r.YearsDropdown,{key:"year",className:s[Rl.YearsDropdown],"aria-label":ie(i.options),classNames:s,components:r,disabled:Boolean(t.disableNavigation),onChange:be(e.date),options:Ou(T,A,o,i,Boolean(t.reverseYears)),style:E?.[Rl.Dropdown],value:i.getYear(e.date)}):C.createElement("span",{key:"year"},_(e.date,i));return"year-first"===i.getMonthYearOrder()?[a,n]:[n,a]})(),C.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},R(e.date,i.options,i))):C.createElement(r.CaptionLabel,{className:s[Rl.CaptionLabel],role:"status","aria-live":"polite"},R(e.date,i.options,i))),"around"===p&&!t.hideNavigation&&n===m-1&&C.createElement(r.NextMonthButton,{type:"button",className:s[Rl.NextMonthButton],tabIndex:z?void 0:-1,"aria-disabled":!z||void 0,"aria-label":ne(z),onClick:ue,"data-animated-button":t.animate?"true":void 0},C.createElement(r.Chevron,{disabled:!z||void 0,className:s[Rl.Chevron],orientation:"rtl"===t.dir?"left":"right"})),n===m-1&&"after"===p&&!t.hideNavigation&&C.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[Rl.Nav],style:E?.[Rl.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:L,nextMonth:z}),C.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===f||"range"===f,"aria-label":Q(e.date,i.options,i)||void 0,className:s[Rl.MonthGrid],style:E?.[Rl.MonthGrid]},!t.hideWeekdays&&C.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[Rl.Weekdays],style:E?.[Rl.Weekdays]},k&&C.createElement(r.WeekNumberHeader,{"aria-label":ae(i.options),className:s[Rl.WeekNumberHeader],style:E?.[Rl.WeekNumberHeader],scope:"col"},D()),le.map(e=>C.createElement(r.Weekday,{"aria-label":re(e,i.options,i),className:s[Rl.Weekday],key:String(e),style:E?.[Rl.Weekday],scope:"col"},P(e,i.options,i)))),C.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[Rl.Weeks],style:E?.[Rl.Weeks]},e.weeks.map(e=>C.createElement(r.Week,{className:s[Rl.Week],key:e.weekNumber,style:E?.[Rl.Week],week:e},k&&C.createElement(r.WeekNumber,{week:e,style:E?.[Rl.WeekNumber],"aria-label":oe(e.weekNumber,{locale:l}),className:s[Rl.WeekNumber],scope:"row",role:"rowheader"},N(e.weekNumber,i)),e.days.map(e=>{const{date:n}=e,o=V(e);if(o[Ml.focused]=!o.hidden&&Boolean(q?.isEqualTo(e)),o[Ol.selected]=H?.(n)||o.selected,Cc(G)){const{from:e,to:t}=G;o[Ol.range_start]=Boolean(e&&t&&i.isSameDay(n,e)),o[Ol.range_end]=Boolean(e&&t&&i.isSameDay(n,t)),o[Ol.range_middle]=wc(G,n,!0,i)}const a=function(e,t={},n={}){let r={...t?.[Rl.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(o,E,t.modifiersStyles),l=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[Ml[r]]?e.push(t[Ml[r]]):t[Ol[r]]&&e.push(t[Ol[r]]),e),[t[Rl.Day]])}(o,s,t.modifiersClassNames),c=se||o.hidden?void 0:X(n,o,i.options,i);return C.createElement(r.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:o,className:l.join(" "),style:a,role:"gridcell","aria-selected":o.selected||void 0,"aria-label":c,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":o.selected||void 0,"data-disabled":o.disabled||void 0,"data-hidden":o.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":o.focused||void 0,"data-today":o.today||void 0},!o.hidden&&se?C.createElement(r.DayButton,{className:s[Rl.DayButton],style:E?.[Rl.DayButton],type:"button",day:e,modifiers:o,disabled:!o.focused&&o.disabled||void 0,"aria-disabled":o.focused&&o.disabled||void 0,tabIndex:$(e)?0:-1,"aria-label":Z(n,o,i.options,i),onClick:de(e,o),onBlur:pe(e,o),onFocus:fe(e,o),onKeyDown:me(e,o),onMouseEnter:ge(e,o),onMouseLeave:he(e,o)},M(n,i.options,i)):!o.hidden&&M(e.date,i.options,i))})))))))),t.footer&&C.createElement(r.Footer,{className:s[Rl.Footer],style:E?.[Rl.Footer],role:"status","aria-live":"polite"},t.footer)))}function rd(e){return rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rd(e)}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(Hu||(Hu={}));var od=["className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components"],ad=["className","rootRef"],id=["className","orientation"],ld=["children"],sd=["className","day","modifiers"];function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cd.apply(null,arguments)}function ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ud(Object(n),!0).forEach(function(t){fd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ud(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=rd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rd(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function md(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function gd(e){var t=e.className,n=e.classNames,r=e.showOutsideDays,o=void 0===r||r,a=e.captionLayout,i=void 0===a?"label":a,l=e.buttonVariant,s=void 0===l?"ghost":l,c=e.formatters,u=e.components,d=md(e,od),f=Dl();return C.createElement(nd,cd({showOutsideDays:o,className:Lt("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw(Bu||(Bu=pd(["rtl:**:[.rdp-button_next>svg]:rotate-180"],["rtl:**:[.rdp-button\\_next>svg]:rotate-180"]))),String.raw(Gu||(Gu=pd(["rtl:**:[.rdp-button_previous>svg]:rotate-180"],["rtl:**:[.rdp-button\\_previous>svg]:rotate-180"]))),t),captionLayout:i,formatters:dd({formatMonthDropdown:function(e){return e.toLocaleString("default",{month:"short"})}},c),classNames:dd({root:Lt("w-fit",f.root),months:Lt("flex gap-4 flex-col md:flex-row relative",f.months),month:Lt("flex flex-col w-full gap-4",f.month),nav:Lt("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",f.nav),button_previous:Lt(Vt({variant:s}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",f.button_previous),button_next:Lt(Vt({variant:s}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",f.button_next),month_caption:Lt("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",f.month_caption),dropdowns:Lt("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",f.dropdowns),dropdown_root:Lt("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",f.dropdown_root),dropdown:Lt("absolute bg-popover inset-0 opacity-0",f.dropdown),caption_label:Lt("select-none font-medium","label"===i?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",f.caption_label),table:"w-full border-collapse",weekdays:Lt("flex",f.weekdays),weekday:Lt("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",f.weekday),week:Lt("flex w-full mt-2",f.week),week_number_header:Lt("select-none w-(--cell-size)",f.week_number_header),week_number:Lt("text-[0.8rem] select-none text-muted-foreground",f.week_number),day:Lt("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",d.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",f.day),range_start:Lt("rounded-l-md bg-accent",f.range_start),range_middle:Lt("rounded-none",f.range_middle),range_end:Lt("rounded-r-md bg-accent",f.range_end),today:Lt("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",f.today),outside:Lt("text-muted-foreground aria-selected:text-muted-foreground",f.outside),disabled:Lt("text-muted-foreground opacity-50",f.disabled),hidden:Lt("invisible",f.hidden)},n),components:dd({Root:function(e){var t=e.className,n=e.rootRef,r=md(e,ad);return C.createElement("div",cd({"data-slot":"calendar",ref:n,className:Lt(t)},r))},Chevron:function(e){var t=e.className,n=e.orientation,r=md(e,id);return"left"===n?C.createElement(kl,cd({className:Lt("size-4",t)},r)):"right"===n?C.createElement(El,cd({className:Lt("size-4",t)},r)):C.createElement(Se,cd({className:Lt("size-4",t)},r))},DayButton:hd,WeekNumber:function(e){var t=e.children,n=md(e,ld);return C.createElement("td",n,C.createElement("div",{className:"flex size-(--cell-size) items-center justify-center text-center"},t))}},u)},d))}function hd(e){var t=e.className,n=e.day,r=e.modifiers,o=md(e,sd),a=Dl(),i=C.useRef(null);return C.useEffect(function(){var e;r.focused&&(null===(e=i.current)||void 0===e||e.focus())},[r.focused]),C.createElement(Ht,cd({ref:i,variant:"ghost",size:"icon","data-day":n.date.toLocaleDateString(),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:Lt("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",a.day,t)},o))}var vd=["className"],bd=["className"],yd=["className"],wd=["className"],xd=["className"],Cd=["className"],Sd=["className"];function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kd.apply(null,arguments)}function Ed(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Rd(e){var t=e.className,n=Ed(e,vd);return C.createElement("div",kd({"data-slot":"card",className:Lt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t)},n))}function Md(e){var t=e.className,n=Ed(e,bd);return C.createElement("div",kd({"data-slot":"card-header",className:Lt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t)},n))}function Od(e){var t=e.className,n=Ed(e,yd);return C.createElement("div",kd({"data-slot":"card-title",className:Lt("leading-none font-semibold",t)},n))}function Nd(e){var t=e.className,n=Ed(e,wd);return C.createElement("div",kd({"data-slot":"card-description",className:Lt("text-muted-foreground text-sm",t)},n))}function Dd(e){var t=e.className,n=Ed(e,xd);return C.createElement("div",kd({"data-slot":"card-action",className:Lt("col-start-2 row-span-2 row-start-1 self-start justify-self-end",t)},n))}function Pd(e){var t=e.className,n=Ed(e,Cd);return C.createElement("div",kd({"data-slot":"card-content",className:Lt("px-6",t)},n))}function _d(e){var t=e.className,n=Ed(e,Sd);return C.createElement("div",kd({"data-slot":"card-footer",className:Lt("flex items-center px-6 [.border-t]:pt-6",t)},n))}var jd=["className"],Id=["className","children","showCloseButton"],Fd=["className"],Td=["className"],Ad=["className"],Ld=["className"];function zd(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Wd(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vd.apply(null,arguments)}function Hd(e){var t=Vd({},(Wd(e),e));return C.createElement(Ko,Vd({"data-slot":"dialog"},t))}function Bd(e){var t=Vd({},(Wd(e),e));return C.createElement(Zo,Vd({"data-slot":"dialog-trigger"},t))}function Gd(e){var t=Vd({},(Wd(e),e));return C.createElement(Xo,Vd({"data-slot":"dialog-portal"},t))}function Yd(e){var t=Vd({},(Wd(e),e));return C.createElement(na,Vd({"data-slot":"dialog-close"},t))}function qd(e){var t=e.className,n=zd(e,jd);return C.createElement(Qo,Vd({"data-slot":"dialog-overlay",className:Lt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t)},n))}function $d(e){var t=e.className,n=e.children,r=e.showCloseButton,o=void 0===r||r,a=zd(e,Id);return C.createElement(Gd,{"data-slot":"dialog-portal"},C.createElement(qd,null),C.createElement(Jo,Vd({"data-slot":"dialog-content",className:Lt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg md:max-w-xl lg:max-w-2xl",t)},a),n,o&&C.createElement(na,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},C.createElement(ra,null),C.createElement("span",{className:"sr-only"},"Close"))))}function Ud(e){var t=e.className,n=zd(e,Fd);return C.createElement("div",Vd({"data-slot":"dialog-header",className:Lt("flex flex-col gap-2 text-center sm:text-left",t)},n))}function Kd(e){var t=e.className,n=zd(e,Td);return C.createElement("div",Vd({"data-slot":"dialog-footer",className:Lt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t)},n))}function Zd(e){var t=e.className,n=zd(e,Ad);return C.createElement(ea,Vd({"data-slot":"dialog-title",className:Lt("text-lg leading-none font-semibold",t)},n))}function Xd(e){var t=e.className,n=zd(e,Ld);return C.createElement(ta,Vd({"data-slot":"dialog-description",className:Lt("text-muted-foreground text-sm",t)},n))}const Qd=["top","right","bottom","left"],Jd=Math.min,ef=Math.max,tf=Math.round,nf=Math.floor,rf=e=>({x:e,y:e}),of={left:"right",right:"left",bottom:"top",top:"bottom"};function af(e,t,n){return ef(e,Jd(t,n))}function lf(e,t){return"function"==typeof e?e(t):e}function sf(e){return e.split("-")[0]}function cf(e){return e.split("-")[1]}function uf(e){return"x"===e?"y":"x"}function df(e){return"y"===e?"height":"width"}function ff(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function pf(e){return uf(ff(e))}function mf(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gf=["left","right"],hf=["right","left"],vf=["top","bottom"],bf=["bottom","top"];function yf(e,t,n,r){const o=cf(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?hf:gf:t?gf:hf;case"left":case"right":return t?vf:bf;default:return[]}}(sf(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(mf)))),a}function wf(e){const t=sf(e);return of[t]+e.slice(t.length)}function xf(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 Cf(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 Sf(e,t,n){let{reference:r,floating:o}=e;const a=ff(t),i=pf(t),l=df(i),s=sf(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/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(cf(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function kf(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=lf(t,e),m=xf(p),g=l[f?"floating"===d?"reference":"floating":d],h=Cf(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(g)))||n?g:g.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},w=Cf(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:s}):v);return{top:(h.top-w.top+m.top)/y.y,bottom:(w.bottom-h.bottom+m.bottom)/y.y,left:(h.left-w.left+m.left)/y.x,right:(w.right-h.right+m.right)/y.x}}function Ef(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rf(e){return Qd.some(t=>e[t]>=0)}const Mf=new Set(["left","top"]);function Of(){return"undefined"!=typeof window}function Nf(e){return _f(e)?(e.nodeName||"").toLowerCase():"#document"}function Df(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Pf(e){var t;return null==(t=(_f(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function _f(e){return!!Of()&&(e instanceof Node||e instanceof Df(e).Node)}function jf(e){return!!Of()&&(e instanceof Element||e instanceof Df(e).Element)}function If(e){return!!Of()&&(e instanceof HTMLElement||e instanceof Df(e).HTMLElement)}function Ff(e){return!(!Of()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Df(e).ShadowRoot)}function Tf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qf(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Af(e){return/^(table|td|th)$/.test(Nf(e))}function Lf(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const zf=/transform|translate|scale|rotate|perspective|filter/,Wf=/paint|layout|strict|content/,Vf=e=>!!e&&"none"!==e;let Hf;function Bf(e){const t=jf(e)?qf(e):e;return Vf(t.transform)||Vf(t.translate)||Vf(t.scale)||Vf(t.rotate)||Vf(t.perspective)||!Gf()&&(Vf(t.backdropFilter)||Vf(t.filter))||zf.test(t.willChange||"")||Wf.test(t.contain||"")}function Gf(){return null==Hf&&(Hf="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hf}function Yf(e){return/^(html|body|#document)$/.test(Nf(e))}function qf(e){return Df(e).getComputedStyle(e)}function $f(e){return jf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Uf(e){if("html"===Nf(e))return e;const t=e.assignedSlot||e.parentNode||Ff(e)&&e.host||Pf(e);return Ff(t)?t.host:t}function Kf(e){const t=Uf(e);return Yf(t)?e.ownerDocument?e.ownerDocument.body:e.body:If(t)&&Tf(t)?t:Kf(t)}function Zf(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Kf(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Df(o);if(a){const e=Xf(i);return t.concat(i,i.visualViewport||[],Tf(o)?o:[],e&&n?Zf(e):[])}return t.concat(o,Zf(o,[],n))}function Xf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Qf(e){const t=qf(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=If(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=tf(n)!==a||tf(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Jf(e){return jf(e)?e:e.contextElement}function ep(e){const t=Jf(e);if(!If(t))return rf(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Qf(t);let i=(a?tf(n.width):n.width)/r,l=(a?tf(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const tp=rf(0);function np(e){const t=Df(e);return Gf()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:tp}function rp(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Jf(e);let i=rf(1);t&&(r?jf(r)&&(i=ep(r)):i=ep(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Df(e))&&t}(a,n,r)?np(a):rf(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){const e=Df(a),t=r&&jf(r)?Df(r):r;let n=e,o=Xf(n);for(;o&&r&&t!==n;){const e=ep(o),t=o.getBoundingClientRect(),r=qf(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=a,c+=i,n=Df(o),o=Xf(n)}}return Cf({width:u,height:d,x:s,y:c})}function op(e,t){const n=$f(e).scrollLeft;return t?t.left+n:rp(Pf(e)).left+n}function ap(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-op(e,n),y:n.top+t.scrollTop}}function ip(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Df(e),r=Pf(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=Gf();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=op(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=Pf(e),n=$f(e),r=e.ownerDocument.body,o=ef(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ef(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+op(e);const l=-n.scrollTop;return"rtl"===qf(r).direction&&(i+=ef(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}}(Pf(e));else if(jf(t))r=function(e,t){const n=rp(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=If(e)?ep(e):rf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=np(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cf(r)}function lp(e,t){const n=Uf(e);return!(n===t||!jf(n)||Yf(n))&&("fixed"===qf(n).position||lp(n,t))}function sp(e,t,n){const r=If(t),o=Pf(t),a="fixed"===n,i=rp(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=rf(0);function c(){s.x=op(o)}if(r||!r&&!a)if(("body"!==Nf(t)||Tf(o))&&(l=$f(t)),r){const e=rp(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const u=!o||r||a?rf(0):ap(o,l);return{x:i.left+l.scrollLeft-s.x-u.x,y:i.top+l.scrollTop-s.y-u.y,width:i.width,height:i.height}}function cp(e){return"static"===qf(e).position}function up(e,t){if(!If(e)||"fixed"===qf(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Pf(e)===n&&(n=n.ownerDocument.body),n}function dp(e,t){const n=Df(e);if(Lf(e))return n;if(!If(e)){let t=Uf(e);for(;t&&!Yf(t);){if(jf(t)&&!cp(t))return t;t=Uf(t)}return n}let r=up(e,t);for(;r&&Af(r)&&cp(r);)r=up(r,t);return r&&Yf(r)&&cp(r)&&!Bf(r)?n:r||function(e){let t=Uf(e);for(;If(t)&&!Yf(t);){if(Bf(t))return t;if(Lf(t))return null;t=Uf(t)}return null}(e)||n}const fp={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Pf(r),l=!!t&&Lf(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=rf(1);const u=rf(0),d=If(r);if((d||!d&&!a)&&(("body"!==Nf(r)||Tf(i))&&(s=$f(r)),d)){const e=rp(r);c=ep(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?rf(0):ap(i,s);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:Pf,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?Lf(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Zf(e,[],!1).filter(e=>jf(e)&&"body"!==Nf(e)),o=null;const a="fixed"===qf(e).position;let i=a?Uf(e):e;for(;jf(i)&&!Yf(i);){const t=qf(i),n=Bf(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Tf(i)&&!n&&lp(e,i))?r=r.filter(e=>e!==i):o=t,i=Uf(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=ip(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=ip(t,a[e],o);l=ef(n.top,l),s=Jd(n.right,s),c=Jd(n.bottom,c),u=ef(n.left,u)}return{width:s-u,height:c-l,x:u,y:l}},getOffsetParent:dp,getElementRects:async function(e){const t=this.getOffsetParent||dp,n=this.getDimensions,r=await n(e.floating);return{reference:sp(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}=Qf(e);return{width:t,height:n}},getScale:ep,isElement:jf,isRTL:function(e){return"rtl"===qf(e).direction}};function pp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mp(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Jf(e),u=o||a?[...c?Zf(c):[],...t?Zf(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const d=c&&l?function(e,t){let n,r=null;const o=Pf(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-nf(d)+"px "+-nf(o.clientWidth-(u+f))+"px "+-nf(o.clientHeight-(d+p))+"px "+-nf(u)+"px",threshold:ef(0,Jd(1,s))||1};let g=!0;function h(t){const r=t[0].intersectionRatio;if(r!==s){if(!g)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||pp(c,e.getBoundingClientRect())||i(),g=!1}try{r=new IntersectionObserver(h,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(h,m)}r.observe(e)}(!0),a}(c,n):null;let f,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let g=s?rp(e):null;return s&&function t(){const r=rp(e);g&&!pp(g,r)&&n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const gp=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=sf(n),l=cf(n),s="y"===ff(n),c=Mf.has(i)?-1:1,u=a&&s?-1:1,d=lf(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 l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}},hp=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=lf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,c),f=ff(sf(o)),p=uf(f);let m=u[p],g=u[f];if(i){const e="y"===p?"bottom":"right";m=af(m+d["y"===p?"top":"left"],m,m-d[e])}if(l){const e="y"===f?"bottom":"right";g=af(g+d["y"===f?"top":"left"],g,g-d[e])}const h=s.fn({...t,[p]:m,[f]:g});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[f]:l}}}}}},vp=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=lf(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=sf(o),b=ff(l),y=sf(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(y||!g?[wf(l)]:function(e){const t=wf(e);return[mf(e),t,mf(t)]}(l)),C="none"!==m;!f&&C&&x.push(...yf(l,g,m,w));const S=[l,...x],k=await s.detectOverflow(t,h),E=[];let R=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&E.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=cf(e),o=pf(e),a=df(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=wf(i)),[i,wf(i)]}(o,i,w);E.push(k[e[0]],k[e[1]])}if(R=[...R,{placement:o,overflows:E}],!E.every(e=>e<=0)){var M,O;const e=((null==(M=a.flip)?void 0:M.index)||0)+1,t=S[e];if(t){if(!("alignment"===d&&b!==ff(t))||R.every(e=>ff(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:R},reset:{placement:t}}}let n=null==(O=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=R.filter(e=>{if(C){const t=ff(e.placement);return t===b||"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:N[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},bp=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...c}=lf(e,t),u=await i.detectOverflow(t,c),d=sf(o),f=cf(o),p="y"===ff(o),{width:m,height:g}=a.floating;let h,v;"top"===d||"bottom"===d?(h=d,v=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=d,h="end"===f?"top":"bottom");const b=g-u.top-u.bottom,y=m-u.left-u.right,w=Jd(g-u[h],b),x=Jd(m-u[v],y),C=!t.middlewareData.shift;let S=w,k=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=b),C&&!f){const e=ef(u.left,0),t=ef(u.right,0),n=ef(u.top,0),r=ef(u.bottom,0);p?k=m-2*(0!==e||0!==t?e+t:ef(u.left,u.right)):S=g-2*(0!==n||0!==r?n+r:ef(u.top,u.bottom))}await s({...t,availableWidth:k,availableHeight:S});const E=await i.getDimensions(l.floating);return m!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}},yp=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=lf(e,t);switch(o){case"referenceHidden":{const e=Ef(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Rf(e)}}}case"escaped":{const e=Ef(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Rf(e)}}}default:return{}}}}},xp=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:u=0}=lf(e,t)||{};if(null==c)return{};const d=xf(u),f={x:n,y:r},p=pf(o),m=df(p),g=await i.getDimensions(c),h="y"===p,v=h?"top":"left",b=h?"bottom":"right",y=h?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let S=C?C[y]:0;S&&await(null==i.isElement?void 0:i.isElement(C))||(S=l.floating[y]||a.floating[m]);const k=w/2-x/2,E=S/2-g[m]/2-1,R=Jd(d[v],E),M=Jd(d[b],E),O=R,N=S-g[m]-M,D=S/2-g[m]/2+k,P=af(O,D,N),_=!s.arrow&&null!=cf(o)&&D!==P&&a.reference[m]/2-(D<O?R:M)-g[m]/2<0,j=_?D<O?D-O:D-N:0;return{[p]:f[p]+j,data:{[p]:P,centerOffset:D-P-j,..._&&{alignmentOffset:j}},reset:_}}}),Cp=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=lf(e,t),u={x:n,y:r},d=ff(o),f=uf(d);let p=u[f],m=u[d];const g=lf(l,t),h="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(s){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+h.mainAxis,n=a.reference[f]+a.reference[e]-h.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var v,b;const e="y"===f?"width":"height",t=Mf.has(sf(o)),n=a.reference[d]-a.floating[e]+(t&&(null==(v=i.offset)?void 0:v[d])||0)+(t?0:h.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?h.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Sp=(e,t,n)=>{const r=new Map,o={platform:fp,...n},a={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:kf},s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Sf(c,r,s),f=r,p=0;const m={};for(let n=0;n<a.length;n++){const g=a[n];if(!g)continue;const{name:h,fn:v}=g,{x:b,y,data:w,reset:x}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=y?y:d,m[h]={...m[h],...w},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=Sf(c,f,s))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:a})};var kp="undefined"!=typeof document?C.useLayoutEffect:function(){};function Ep(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(!Ep(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)&&!Ep(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Rp(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Mp(e,t){const n=Rp(e);return Math.round(t*n)/n}function Op(e){const t=C.useRef(e);return kp(()=>{t.current=e}),t}const Np=(e,t)=>{const n=gp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Dp=(e,t)=>{const n=hp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pp=(e,t)=>({fn:Cp(e).fn,options:[e,t]}),_p=(e,t)=>{const n=vp(e);return{name:n.name,fn:n.fn,options:[e,t]}},jp=(e,t)=>{const n=bp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ip=(e,t)=>{const n=yp(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fp=(e,t)=>{const n=(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?xp({element:n.current,padding:r}).fn(t):{}:n?xp({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Tp=C.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,De.jsx)(Ln.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,De.jsx)("polygon",{points:"0,0 30,0 15,10"})})});Tp.displayName="Arrow";var Ap=Tp;function Lp(e){const[t,n]=C.useState(void 0);return Rn(()=>{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,a;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,a=t.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var zp="Popper",[Wp,Vp]=kn(zp),[Hp,Bp]=Wp(zp),Gp=e=>{const{__scopePopper:t,children:n}=e,[r,o]=C.useState(null);return(0,De.jsx)(Hp,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gp.displayName=zp;var Yp="PopperAnchor",qp=C.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Bp(Yp,n),i=C.useRef(null),l=Ne(t,i),s=C.useRef(null);return C.useEffect(()=>{const e=s.current;s.current=r?.current||i.current,e!==s.current&&a.onAnchorChange(s.current)}),r?null:(0,De.jsx)(Ln.div,{...o,ref:l})});qp.displayName=Yp;var $p="PopperContent",[Up,Kp]=Wp($p),Zp=C.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:s=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,h=Bp($p,n),[v,b]=C.useState(null),y=Ne(t,e=>b(e)),[w,x]=C.useState(null),S=Lp(w),k=S?.width??0,E=S?.height??0,R=r+("center"!==a?"-"+a:""),M="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(c)?c:[c],N=O.length>0,D={padding:M,boundary:O.filter(em),altBoundary:N},{refs:P,floatingStyles:_,placement:j,isPositioned:I,middlewareData:F}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Ep(f,r)||p(r);const[m,g]=C.useState(null),[h,v]=C.useState(null),b=C.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),y=C.useCallback(e=>{e!==k.current&&(k.current=e,v(e))},[]),w=a||m,x=i||h,S=C.useRef(null),k=C.useRef(null),E=C.useRef(u),R=null!=s,M=Op(s),O=Op(o),N=Op(c),D=C.useCallback(()=>{if(!S.current||!k.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Sp(S.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==N.current};P.current&&!Ep(E.current,t)&&(E.current=t,_n.flushSync(()=>{d(t)}))})},[f,t,n,O,N]);kp(()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const P=C.useRef(!1);kp(()=>(P.current=!0,()=>{P.current=!1}),[]),kp(()=>{if(w&&(S.current=w),x&&(k.current=x),w&&x){if(M.current)return M.current(w,x,D);D()}},[w,x,D,M,R]);const _=C.useMemo(()=>({reference:S,floating:k,setReference:b,setFloating:y}),[b,y]),j=C.useMemo(()=>({reference:w,floating:x}),[w,x]),I=C.useMemo(()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=Mp(j.floating,u.x),r=Mp(j.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Rp(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,j.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:D,refs:_,elements:j,floatingStyles:I}),[u,D,_,j,I])}({strategy:"fixed",placement:R,whileElementsMounted:(...e)=>mp(...e,{animationFrame:"always"===p}),elements:{reference:h.anchor},middleware:[Np({mainAxis:o+E,alignmentAxis:i}),s&&Dp({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?Pp():void 0,...D}),s&&_p({...D}),jp({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),w&&Fp({element:w,padding:l}),tm({arrowWidth:k,arrowHeight:E}),f&&Ip({strategy:"referenceHidden",...D})]}),[T,A]=nm(j),L=Wn(m);Rn(()=>{I&&L?.()},[I,L]);const z=F.arrow?.x,W=F.arrow?.y,V=0!==F.arrow?.centerOffset,[H,B]=C.useState();return Rn(()=>{v&&B(window.getComputedStyle(v).zIndex)},[v]),(0,De.jsx)("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(" "),...F.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,De.jsx)(Up,{scope:n,placedSide:T,onArrowChange:x,arrowX:z,arrowY:W,shouldHideArrow:V,children:(0,De.jsx)(Ln.div,{"data-side":T,"data-align":A,...g,ref:y,style:{...g.style,animation:I?void 0:"none"}})})})});Zp.displayName=$p;var Xp="PopperArrow",Qp={top:"bottom",right:"left",bottom:"top",left:"right"},Jp=C.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=Kp(Xp,n),a=Qp[o.placedSide];return(0,De.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,De.jsx)(Ap,{...r,ref:t,style:{...r.style,display:"block"}})})});function em(e){return null!==e}Jp.displayName=Xp;var tm=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[s,c]=nm(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+l/2;let p="",m="";return"bottom"===s?(p=a?u:`${d}px`,m=-l+"px"):"top"===s?(p=a?u:`${d}px`,m=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",m=a?u:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function nm(e){const[t,n="center"]=e.split("-");return[t,n]}var rm=Gp,om=qp,am=Zp,im=Jp,lm="rovingFocusGroup.onEntryFocus",sm={bubbles:!1,cancelable:!0},cm="RovingFocusGroup",[um,dm,fm]=ai(cm),[pm,mm]=kn(cm,[fm]),[gm,hm]=pm(cm),vm=C.forwardRef((e,t)=>(0,De.jsx)(um.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(um.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,De.jsx)(bm,{...e,ref:t})})}));vm.displayName=cm;var bm=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:s,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=C.useRef(null),p=Ne(t,f),m=Ei(a),[g,h]=Pn({prop:i,defaultProp:l??null,onChange:s,caller:cm}),[v,b]=C.useState(!1),y=Wn(c),w=dm(n),x=C.useRef(!1),[S,k]=C.useState(0);return C.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(lm,y),()=>e.removeEventListener(lm,y)},[y]),(0,De.jsx)(gm,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:g,onItemFocus:C.useCallback(e=>h(e),[h]),onItemShiftTab:C.useCallback(()=>b(!0),[]),onFocusableItemAdd:C.useCallback(()=>k(e=>e+1),[]),onFocusableItemRemove:C.useCallback(()=>k(e=>e-1),[]),children:(0,De.jsx)(Ln.div,{tabIndex:v||0===S?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:Sn(e.onMouseDown,()=>{x.current=!0}),onFocus:Sn(e.onFocus,e=>{const t=!x.current;if(e.target===e.currentTarget&&t&&!v){const t=new CustomEvent(lm,sm);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter(e=>e.focusable);Cm([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:Sn(e.onBlur,()=>b(!1))})})}),ym="RovingFocusGroupItem",wm=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...l}=e,s=Nn(),c=a||s,u=hm(ym,n),d=u.currentTabStopId===c,f=dm(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:g}=u;return C.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,De.jsx)(um.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:(0,De.jsx)(Ln.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...l,ref:t,onMouseDown:Sn(e.onMouseDown,e=>{r?u.onItemFocus(c):e.preventDefault()}),onFocus:Sn(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Sn(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:xm[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>Cm(o))}var n,r}),children:"function"==typeof i?i({isCurrentTabStop:d,hasTabStop:null!=g}):i})})});wm.displayName=ym;var xm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cm(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Sm=vm,km=wm;function Em(e){const t=Rm(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(Om);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Rm(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mm=Symbol("radix.slottable");function Om(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Mm}var Nm=["Enter"," "],Dm=["ArrowUp","PageDown","End"],Pm=["ArrowDown","PageUp","Home",...Dm],_m={ltr:[...Nm,"ArrowRight"],rtl:[...Nm,"ArrowLeft"]},jm={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Im="Menu",[Fm,Tm,Am]=ai(Im),[Lm,zm]=kn(Im,[Am,Vp,mm]),Wm=Vp(),Vm=mm(),[Hm,Bm]=Lm(Im),[Gm,Ym]=Lm(Im),qm=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,l=Wm(t),[s,c]=C.useState(null),u=C.useRef(!1),d=Wn(a),f=Ei(o);return C.useEffect(()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),(0,De.jsx)(rm,{...l,children:(0,De.jsx)(Hm,{scope:t,open:n,onOpenChange:d,content:s,onContentChange:c,children:(0,De.jsx)(Gm,{scope:t,onClose:C.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:r})})})};qm.displayName=Im;var $m=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wm(n);return(0,De.jsx)(om,{...o,...r,ref:t})});$m.displayName="MenuAnchor";var Um="MenuPortal",[Km,Zm]=Lm(Um,{forceMount:void 0}),Xm=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Bm(Um,t);return(0,De.jsx)(Km,{scope:t,forceMount:n,children:(0,De.jsx)(lr,{present:n||a.open,children:(0,De.jsx)(ir,{asChild:!0,container:o,children:r})})})};Xm.displayName=Um;var Qm="MenuContent",[Jm,eg]=Lm(Qm),tg=C.forwardRef((e,t)=>{const n=Zm(Qm,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Bm(Qm,e.__scopeMenu),i=Ym(Qm,e.__scopeMenu);return(0,De.jsx)(Fm.Provider,{scope:e.__scopeMenu,children:(0,De.jsx)(lr,{present:r||a.open,children:(0,De.jsx)(Fm.Slot,{scope:e.__scopeMenu,children:i.modal?(0,De.jsx)(ng,{...o,ref:t}):(0,De.jsx)(rg,{...o,ref:t})})})})}),ng=C.forwardRef((e,t)=>{const n=Bm(Qm,e.__scopeMenu),r=C.useRef(null),o=Ne(t,r);return C.useEffect(()=>{const e=r.current;if(e)return uo(e)},[]),(0,De.jsx)(ag,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Sn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),rg=C.forwardRef((e,t)=>{const n=Bm(Qm,e.__scopeMenu);return(0,De.jsx)(ag,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),og=Em("MenuContent.ScrollLock"),ag=C.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...g}=e,h=Bm(Qm,n),v=Ym(Qm,n),b=Wm(n),y=Vm(n),w=Tm(n),[x,S]=C.useState(null),k=C.useRef(null),E=Ne(t,k,h.onContentChange),R=C.useRef(0),M=C.useRef(""),O=C.useRef(0),N=C.useRef(null),D=C.useRef("right"),P=C.useRef(0),_=m?no:C.Fragment,j=m?{as:og,allowPinchZoom:!0}:void 0,I=e=>{const t=M.current+e,n=w().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,a=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(l=e,s=Math.max(a,0),l.map((e,t)=>l[(s+t)%l.length]));var l,s;1===o.length&&(i=i.filter(e=>e!==n));const c=i.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}(n.map(e=>e.textValue),t,o),i=n.find(e=>e.textValue===a)?.ref.current;!function e(t){M.current=t,window.clearTimeout(R.current),""!==t&&(R.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};C.useEffect(()=>()=>window.clearTimeout(R.current),[]),ur();const F=C.useCallback(e=>D.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){const i=t[e],l=t[a],s=i.x,c=i.y,u=l.x,d=l.y;c>r!=d>r&&n<(u-s)*(r-c)/(d-c)+s&&(o=!o)}return o}(n,t)}(e,N.current?.area),[]);return(0,De.jsx)(Jm,{scope:n,searchRef:M,onItemEnter:C.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:C.useCallback(e=>{F(e)||(k.current?.focus(),S(null))},[F]),onTriggerLeave:C.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:C.useCallback(e=>{N.current=e},[]),children:(0,De.jsx)(_,{...j,children:(0,De.jsx)(Jn,{asChild:!0,trapped:o,onMountAutoFocus:Sn(a,e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,De.jsx)(qn,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,De.jsx)(Sm,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Sn(s,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,De.jsx)(am,{role:"menu","aria-orientation":"vertical","data-state":jg(h.open),"data-radix-menu-content":"",dir:v.dir,...b,...g,ref:E,style:{outline:"none",...g.style},onKeyDown:Sn(g.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&I(e.key));const o=k.current;if(e.target!==o)return;if(!Pm.includes(e.key))return;e.preventDefault();const a=w().filter(e=>!e.disabled).map(e=>e.ref.current);Dm.includes(e.key)&&a.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(a)}),onBlur:Sn(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(R.current),M.current="")}),onPointerMove:Sn(e.onPointerMove,Tg(e=>{const t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>P.current?"right":"left";D.current=t,P.current=e.clientX}}))})})})})})})});tg.displayName=Qm;var ig=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(Ln.div,{role:"group",...r,ref:t})});ig.displayName="MenuGroup";var lg=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(Ln.div,{...r,ref:t})});lg.displayName="MenuLabel";var sg="MenuItem",cg="menu.itemSelect",ug=C.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=C.useRef(null),i=Ym(sg,e.__scopeMenu),l=eg(sg,e.__scopeMenu),s=Ne(t,a),c=C.useRef(!1);return(0,De.jsx)(dg,{...o,ref:s,disabled:n,onClick:Sn(e.onClick,()=>{const e=a.current;if(!n&&e){const t=new CustomEvent(cg,{bubbles:!0,cancelable:!0});e.addEventListener(cg,e=>r?.(e),{once:!0}),zn(e,t),t.defaultPrevented?c.current=!1:i.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),c.current=!0},onPointerUp:Sn(e.onPointerUp,e=>{c.current||e.currentTarget?.click()}),onKeyDown:Sn(e.onKeyDown,e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||Nm.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});ug.displayName=sg;var dg=C.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=eg(sg,n),l=Vm(n),s=C.useRef(null),c=Ne(t,s),[u,d]=C.useState(!1),[f,p]=C.useState("");return C.useEffect(()=>{const e=s.current;e&&p((e.textContent??"").trim())},[a.children]),(0,De.jsx)(Fm.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:(0,De.jsx)(km,{asChild:!0,...l,focusable:!r,children:(0,De.jsx)(Ln.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:Sn(e.onPointerMove,Tg(e=>{if(r)i.onItemLeave(e);else if(i.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:Sn(e.onPointerLeave,Tg(e=>i.onItemLeave(e))),onFocus:Sn(e.onFocus,()=>d(!0)),onBlur:Sn(e.onBlur,()=>d(!1))})})})}),fg=C.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,De.jsx)(wg,{scope:e.__scopeMenu,checked:n,children:(0,De.jsx)(ug,{role:"menuitemcheckbox","aria-checked":Ig(n)?"mixed":n,...o,ref:t,"data-state":Fg(n),onSelect:Sn(o.onSelect,()=>r?.(!!Ig(n)||!n),{checkForDefaultPrevented:!1})})})});fg.displayName="MenuCheckboxItem";var pg="MenuRadioGroup",[mg,gg]=Lm(pg,{value:void 0,onValueChange:()=>{}}),hg=C.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Wn(r);return(0,De.jsx)(mg,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,De.jsx)(ig,{...o,ref:t})})});hg.displayName=pg;var vg="MenuRadioItem",bg=C.forwardRef((e,t)=>{const{value:n,...r}=e,o=gg(vg,e.__scopeMenu),a=n===o.value;return(0,De.jsx)(wg,{scope:e.__scopeMenu,checked:a,children:(0,De.jsx)(ug,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Fg(a),onSelect:Sn(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});bg.displayName=vg;var yg="MenuItemIndicator",[wg,xg]=Lm(yg,{checked:!1}),Cg=C.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=xg(yg,n);return(0,De.jsx)(lr,{present:r||Ig(a.checked)||!0===a.checked,children:(0,De.jsx)(Ln.span,{...o,ref:t,"data-state":Fg(a.checked)})})});Cg.displayName=yg;var Sg=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,De.jsx)(Ln.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Sg.displayName="MenuSeparator";var kg=C.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Wm(n);return(0,De.jsx)(im,{...o,...r,ref:t})});kg.displayName="MenuArrow";var Eg="MenuSub",[Rg,Mg]=Lm(Eg),Og=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Bm(Eg,t),i=Wm(t),[l,s]=C.useState(null),[c,u]=C.useState(null),d=Wn(o);return C.useEffect(()=>(!1===a.open&&d(!1),()=>d(!1)),[a.open,d]),(0,De.jsx)(rm,{...i,children:(0,De.jsx)(Hm,{scope:t,open:r,onOpenChange:d,content:c,onContentChange:u,children:(0,De.jsx)(Rg,{scope:t,contentId:Nn(),triggerId:Nn(),trigger:l,onTriggerChange:s,children:n})})})};Og.displayName=Eg;var Ng="MenuSubTrigger",Dg=C.forwardRef((e,t)=>{const n=Bm(Ng,e.__scopeMenu),r=Ym(Ng,e.__scopeMenu),o=Mg(Ng,e.__scopeMenu),a=eg(Ng,e.__scopeMenu),i=C.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:s}=a,c={__scopeMenu:e.__scopeMenu},u=C.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return C.useEffect(()=>u,[u]),C.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),s(null)}},[l,s]),(0,De.jsx)($m,{asChild:!0,...c,children:(0,De.jsx)(dg,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":jg(n.open),...e,ref:Oe(t,o.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Sn(e.onPointerMove,Tg(t=>{a.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||i.current||(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Sn(e.onPointerLeave,Tg(e=>{u();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,o="right"===r,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Sn(e.onKeyDown,t=>{const o=""!==a.searchRef.current;e.disabled||o&&" "===t.key||_m[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Dg.displayName=Ng;var Pg="MenuSubContent",_g=C.forwardRef((e,t)=>{const n=Zm(Qm,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Bm(Qm,e.__scopeMenu),i=Ym(Qm,e.__scopeMenu),l=Mg(Pg,e.__scopeMenu),s=C.useRef(null),c=Ne(t,s);return(0,De.jsx)(Fm.Provider,{scope:e.__scopeMenu,children:(0,De.jsx)(lr,{present:r||a.open,children:(0,De.jsx)(Fm.Slot,{scope:e.__scopeMenu,children:(0,De.jsx)(ag,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:c,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&s.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Sn(e.onFocusOutside,e=>{e.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Sn(e.onEscapeKeyDown,e=>{i.onClose(),e.preventDefault()}),onKeyDown:Sn(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=jm[i.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function jg(e){return e?"open":"closed"}function Ig(e){return"indeterminate"===e}function Fg(e){return Ig(e)?"indeterminate":e?"checked":"unchecked"}function Tg(e){return t=>"mouse"===t.pointerType?e(t):void 0}_g.displayName=Pg;var Ag=qm,Lg=$m,zg=Xm,Wg=tg,Vg=ig,Hg=lg,Bg=ug,Gg=fg,Yg=hg,qg=bg,$g=Cg,Ug=Sg,Kg=kg,Zg=Og,Xg=Dg,Qg=_g,Jg="DropdownMenu",[eh,th]=kn(Jg,[zm]),nh=zm(),[rh,oh]=eh(Jg),ah=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,s=nh(t),c=C.useRef(null),[u,d]=Pn({prop:o,defaultProp:a??!1,onChange:i,caller:Jg});return(0,De.jsx)(rh,{scope:t,triggerId:Nn(),triggerRef:c,contentId:Nn(),open:u,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(e=>!e),[d]),modal:l,children:(0,De.jsx)(Ag,{...s,open:u,onOpenChange:d,dir:r,modal:l,children:n})})};ah.displayName=Jg;var ih="DropdownMenuTrigger",lh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=oh(ih,n),i=nh(n);return(0,De.jsx)(Lg,{asChild:!0,...i,children:(0,De.jsx)(Ln.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Oe(t,a.triggerRef),onPointerDown:Sn(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Sn(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});lh.displayName=ih;var sh=e=>{const{__scopeDropdownMenu:t,...n}=e,r=nh(t);return(0,De.jsx)(zg,{...r,...n})};sh.displayName="DropdownMenuPortal";var ch="DropdownMenuContent",uh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=oh(ch,n),a=nh(n),i=C.useRef(!1);return(0,De.jsx)(Wg,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:Sn(e.onCloseAutoFocus,e=>{i.current||o.triggerRef.current?.focus(),i.current=!1,e.preventDefault()}),onInteractOutside:Sn(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.modal&&!r||(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uh.displayName=ch;var dh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Vg,{...o,...r,ref:t})});dh.displayName="DropdownMenuGroup";var fh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Hg,{...o,...r,ref:t})});fh.displayName="DropdownMenuLabel";var ph=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Bg,{...o,...r,ref:t})});ph.displayName="DropdownMenuItem";var mh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Gg,{...o,...r,ref:t})});mh.displayName="DropdownMenuCheckboxItem";var gh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Yg,{...o,...r,ref:t})});gh.displayName="DropdownMenuRadioGroup";var hh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(qg,{...o,...r,ref:t})});hh.displayName="DropdownMenuRadioItem";var vh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)($g,{...o,...r,ref:t})});vh.displayName="DropdownMenuItemIndicator";var bh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Ug,{...o,...r,ref:t})});bh.displayName="DropdownMenuSeparator";var yh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Kg,{...o,...r,ref:t})});yh.displayName="DropdownMenuArrow";var wh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Xg,{...o,...r,ref:t})});wh.displayName="DropdownMenuSubTrigger";var xh=C.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=nh(n);return(0,De.jsx)(Qg,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xh.displayName="DropdownMenuSubContent";var Ch=ah,Sh=lh,kh=sh,Eh=uh,Rh=dh,Mh=fh,Oh=ph,Nh=mh,Dh=gh,Ph=hh,_h=vh,jh=bh,Ih=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=nh(t),[l,s]=Pn({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,De.jsx)(Zg,{...i,open:l,onOpenChange:s,children:n})},Fh=wh,Th=xh;
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const Ah=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Lh=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var zh=["className","sideOffset"],Wh=["className","inset","variant"],Vh=["className","children","checked"],Hh=["className","children"],Bh=["className","inset"],Gh=["className"],Yh=["className"],qh=["className","inset","children"],$h=["className"];function Uh(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Kh(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zh.apply(null,arguments)}function Xh(e){var t=Zh({},(Kh(e),e));return C.createElement(Ch,Zh({"data-slot":"dropdown-menu"},t))}function Qh(e){var t=Zh({},(Kh(e),e));return C.createElement(kh,Zh({"data-slot":"dropdown-menu-portal"},t))}function Jh(e){var t=Zh({},(Kh(e),e));return C.createElement(Sh,Zh({"data-slot":"dropdown-menu-trigger"},t))}function ev(e){var t=e.className,n=e.sideOffset,r=void 0===n?4:n,o=Uh(e,zh);return C.createElement(kh,null,C.createElement(Eh,Zh({"data-slot":"dropdown-menu-content",sideOffset:r,className:Lt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t)},o)))}function tv(e){var t=Zh({},(Kh(e),e));return C.createElement(Rh,Zh({"data-slot":"dropdown-menu-group"},t))}function nv(e){var t=e.className,n=e.inset,r=e.variant,o=void 0===r?"default":r,a=Uh(e,Wh);return C.createElement(Oh,Zh({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:Lt("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground! relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t)},a))}function rv(e){var t=e.className,n=e.children,r=e.checked,o=Uh(e,Vh);return C.createElement(Nh,Zh({"data-slot":"dropdown-menu-checkbox-item",className:Lt("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r},o),C.createElement("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},C.createElement(_h,null,C.createElement(Ah,{className:"size-4"}))),n)}function ov(e){var t=Zh({},(Kh(e),e));return C.createElement(Dh,Zh({"data-slot":"dropdown-menu-radio-group"},t))}function av(e){var t=e.className,n=e.children,r=Uh(e,Hh);return C.createElement(Ph,Zh({"data-slot":"dropdown-menu-radio-item",className:Lt("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t)},r),C.createElement("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},C.createElement(_h,null,C.createElement(Lh,{className:"size-2 fill-current"}))),n)}function iv(e){var t=e.className,n=e.inset,r=Uh(e,Bh);return C.createElement(Mh,Zh({"data-slot":"dropdown-menu-label","data-inset":n,className:Lt("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t)},r))}function lv(e){var t=e.className,n=Uh(e,Gh);return C.createElement(jh,Zh({"data-slot":"dropdown-menu-separator",className:Lt("bg-border -mx-1 my-1 h-px",t)},n))}function sv(e){var t=e.className,n=Uh(e,Yh);return C.createElement("span",Zh({"data-slot":"dropdown-menu-shortcut",className:Lt("text-muted-foreground ml-auto text-xs tracking-widest",t)},n))}function cv(e){var t=Zh({},(Kh(e),e));return C.createElement(Ih,Zh({"data-slot":"dropdown-menu-sub"},t))}function uv(e){var t=e.className,n=e.inset,r=e.children,o=Uh(e,qh);return C.createElement(Fh,Zh({"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:Lt("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t)},o),r,C.createElement(El,{className:"ml-auto size-4"}))}function dv(e){var t=e.className,n=Uh(e,$h);return C.createElement(Th,Zh({"data-slot":"dropdown-menu-sub-content",className:Lt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t)},n))}var fv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Ie(`Primitive.${t}`),r=C.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,De.jsx)(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var pv=C.forwardRef((e,t)=>(0,De.jsx)(fv.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));pv.displayName="Label";var mv=pv,gv=["className"];function hv(){return hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hv.apply(null,arguments)}function vv(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,gv);return C.createElement(mv,hv({"data-slot":"label",className:Lt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t)},n))}
/**
 * @license lucide-react v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */
const bv=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);function yv(e){return yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yv(e)}function wv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wv(Object(n),!0).forEach(function(t){Cv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cv(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=yv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yv(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sv(e){return function(e){if(Array.isArray(e))return Rv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ev(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||Ev(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ev(e,t){if(e){if("string"==typeof e)return Rv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rv(e,t):void 0}}function Rv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Mv(e){const t=Ov(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(Dv);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Ov(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Nv=Symbol("radix.slottable");function Dv(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Nv}var Pv="Popover",[_v,jv]=kn(Pv,[Vp]),Iv=Vp(),[Fv,Tv]=_v(Pv),Av=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,l=Iv(t),s=C.useRef(null),[c,u]=C.useState(!1),[d,f]=Pn({prop:r,defaultProp:o??!1,onChange:a,caller:Pv});return(0,De.jsx)(rm,{...l,children:(0,De.jsx)(Fv,{scope:t,contentId:Nn(),triggerRef:s,open:d,onOpenChange:f,onOpenToggle:C.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:c,onCustomAnchorAdd:C.useCallback(()=>u(!0),[]),onCustomAnchorRemove:C.useCallback(()=>u(!1),[]),modal:i,children:n})})};Av.displayName=Pv;var Lv="PopoverAnchor",zv=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tv(Lv,n),a=Iv(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=o;return C.useEffect(()=>(i(),()=>l()),[i,l]),(0,De.jsx)(om,{...a,...r,ref:t})});zv.displayName=Lv;var Wv="PopoverTrigger",Vv=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tv(Wv,n),a=Iv(n),i=Ne(t,o.triggerRef),l=(0,De.jsx)(Ln.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":tb(o.open),...r,ref:i,onClick:Sn(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?l:(0,De.jsx)(om,{asChild:!0,...a,children:l})});Vv.displayName=Wv;var Hv="PopoverPortal",[Bv,Gv]=_v(Hv,{forceMount:void 0}),Yv=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Tv(Hv,t);return(0,De.jsx)(Bv,{scope:t,forceMount:n,children:(0,De.jsx)(lr,{present:n||a.open,children:(0,De.jsx)(ir,{asChild:!0,container:o,children:r})})})};Yv.displayName=Hv;var qv="PopoverContent",$v=C.forwardRef((e,t)=>{const n=Gv(qv,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Tv(qv,e.__scopePopover);return(0,De.jsx)(lr,{present:r||a.open,children:a.modal?(0,De.jsx)(Kv,{...o,ref:t}):(0,De.jsx)(Zv,{...o,ref:t})})});$v.displayName=qv;var Uv=Mv("PopoverContent.RemoveScroll"),Kv=C.forwardRef((e,t)=>{const n=Tv(qv,e.__scopePopover),r=C.useRef(null),o=Ne(t,r),a=C.useRef(!1);return C.useEffect(()=>{const e=r.current;if(e)return uo(e)},[]),(0,De.jsx)(no,{as:Uv,allowPinchZoom:!0,children:(0,De.jsx)(Xv,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sn(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Sn(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Sn(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zv=C.forwardRef((e,t)=>{const n=Tv(qv,e.__scopePopover),r=C.useRef(!1),o=C.useRef(!1);return(0,De.jsx)(Xv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),Xv=C.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,...d}=e,f=Tv(qv,n),p=Iv(n);return ur(),(0,De.jsx)(Jn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,De.jsx)(qn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,De.jsx)(am,{"data-state":tb(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Qv="PopoverClose",Jv=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tv(Qv,n);return(0,De.jsx)(Ln.button,{type:"button",...r,ref:t,onClick:Sn(e.onClick,()=>o.onOpenChange(!1))})});Jv.displayName=Qv;var eb=C.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Iv(n);return(0,De.jsx)(im,{...o,...r,ref:t})});function tb(e){return e?"open":"closed"}eb.displayName="PopoverArrow";var nb=Av,rb=zv,ob=Vv,ab=Yv,ib=$v,lb=["className","align","sideOffset"];function sb(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function cb(){return cb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cb.apply(null,arguments)}function ub(e){var t=cb({},(sb(e),e));return C.createElement(nb,cb({"data-slot":"popover"},t))}function db(e){var t=cb({},(sb(e),e));return C.createElement(ob,cb({"data-slot":"popover-trigger"},t))}function fb(e){var t=e.className,n=e.align,r=void 0===n?"center":n,o=e.sideOffset,a=void 0===o?4:o,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,lb);return C.createElement(ab,null,C.createElement(ib,cb({"data-slot":"popover-content",align:r,sideOffset:a,className:Lt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t)},i)))}function pb(e){var t=cb({},(sb(e),e));return C.createElement(rb,cb({"data-slot":"popover-anchor"},t))}function mb(e,[t,n]){return Math.min(n,Math.max(t,e))}function gb(e){const t=hb(e),n=C.forwardRef((e,n)=>{const{children:r,...o}=e,a=C.Children.toArray(r),i=a.find(bb);if(i){const e=i.props.children,r=a.map(t=>t===i?C.Children.count(e)>1?C.Children.only(null):C.isValidElement(e)?e.props.children:null:t);return(0,De.jsx)(t,{...o,ref:n,children:C.isValidElement(e)?C.cloneElement(e,void 0,r):null})}return(0,De.jsx)(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function hb(e){const t=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.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),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==C.Fragment&&(o.ref=t?Oe(t,e):e),C.cloneElement(n,o)}return C.Children.count(n)>1?C.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vb=Symbol("radix.slottable");function bb(e){return C.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===vb}function yb(e){const t=C.useRef({value:e,previous:e});return C.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wb=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"}),xb=C.forwardRef((e,t)=>(0,De.jsx)(Ln.span,{...e,ref:t,style:{...wb,...e.style}}));xb.displayName="VisuallyHidden";var Cb=[" ","Enter","ArrowUp","ArrowDown"],Sb=[" ","Enter"],kb="Select",[Eb,Rb,Mb]=ai(kb),[Ob,Nb]=kn(kb,[Mb,Vp]),Db=Vp(),[Pb,_b]=Ob(kb),[jb,Ib]=Ob(kb),Fb=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:l,onValueChange:s,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,g=Db(t),[h,v]=C.useState(null),[b,y]=C.useState(null),[w,x]=C.useState(!1),S=Ei(c),[k,E]=Pn({prop:r,defaultProp:o??!1,onChange:a,caller:kb}),[R,M]=Pn({prop:i,defaultProp:l,onChange:s,caller:kb}),O=C.useRef(null),N=!h||(m||!!h.closest("form")),[D,P]=C.useState(new Set),_=Array.from(D).map(e=>e.props.value).join(";");return(0,De.jsx)(rm,{...g,children:(0,De.jsxs)(Pb,{required:p,scope:t,trigger:h,onTriggerChange:v,valueNode:b,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:Nn(),value:R,onValueChange:M,open:k,onOpenChange:E,dir:S,triggerPointerDownPosRef:O,disabled:f,children:[(0,De.jsx)(Eb.Provider,{scope:t,children:(0,De.jsx)(jb,{scope:e.__scopeSelect,onNativeOptionAdd:C.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:C.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),N?(0,De.jsxs)(Sy,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:R,onChange:e=>M(e.target.value),disabled:f,form:m,children:[void 0===R?(0,De.jsx)("option",{value:""}):null,Array.from(D)]},_):null]})})};Fb.displayName=kb;var Tb="SelectTrigger",Ab=C.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Db(n),i=_b(Tb,n),l=i.disabled||r,s=Ne(t,i.onTriggerChange),c=Rb(n),u=C.useRef("touch"),[d,f,p]=Ey(e=>{const t=c().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=Ry(t,e,n);void 0!==r&&i.onValueChange(r.value)}),m=e=>{l||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,De.jsx)(om,{asChild:!0,...a,children:(0,De.jsx)(Ln.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":ky(i.value)?"":void 0,...o,ref:s,onClick:Sn(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&m(e)}),onPointerDown:Sn(o.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(m(e),e.preventDefault())}),onKeyDown:Sn(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||Cb.includes(e.key)&&(m(),e.preventDefault())})})})});Ab.displayName=Tb;var Lb="SelectValue",zb=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...l}=e,s=_b(Lb,n),{onValueNodeHasChildrenChange:c}=s,u=void 0!==a,d=Ne(t,s.onValueNodeChange);return Rn(()=>{c(u)},[c,u]),(0,De.jsx)(Ln.span,{...l,ref:d,style:{pointerEvents:"none"},children:ky(s.value)?(0,De.jsx)(De.Fragment,{children:i}):a})});zb.displayName=Lb;var Wb=C.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,De.jsx)(Ln.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Wb.displayName="SelectIcon";var Vb=e=>(0,De.jsx)(ir,{asChild:!0,...e});Vb.displayName="SelectPortal";var Hb="SelectContent",Bb=C.forwardRef((e,t)=>{const n=_b(Hb,e.__scopeSelect),[r,o]=C.useState();if(Rn(()=>{o(new DocumentFragment)},[]),!n.open){const t=r;return t?_n.createPortal((0,De.jsx)(Yb,{scope:e.__scopeSelect,children:(0,De.jsx)(Eb.Slot,{scope:e.__scopeSelect,children:(0,De.jsx)("div",{children:e.children})})}),t):null}return(0,De.jsx)(Ub,{...e,ref:t})});Bb.displayName=Hb;var Gb=10,[Yb,qb]=Ob(Hb),$b=gb("SelectContent.RemoveScroll"),Ub=C.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:l,sideOffset:s,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:h,...v}=e,b=_b(Hb,n),[y,w]=C.useState(null),[x,S]=C.useState(null),k=Ne(t,e=>w(e)),[E,R]=C.useState(null),[M,O]=C.useState(null),N=Rb(n),[D,P]=C.useState(!1),_=C.useRef(!1);C.useEffect(()=>{if(y)return uo(y)},[y]),ur();const j=C.useCallback(e=>{const[t,...n]=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&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==o)return}},[N,x]),I=C.useCallback(()=>j([E,y]),[j,E,y]);C.useEffect(()=>{D&&I()},[D,I]);const{onOpenChange:F,triggerPointerDownPosRef:T}=b;C.useEffect(()=>{if(y){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(T.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(T.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||F(!1),document.removeEventListener("pointermove",t),T.current=null};return null!==T.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[y,F,T]),C.useEffect(()=>{const e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[F]);const[A,L]=Ey(e=>{const t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=Ry(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),z=C.useCallback((e,t,n)=>{const r=!_.current&&!n;(void 0!==b.value&&b.value===t||r)&&(R(e),r&&(_.current=!0))},[b.value]),W=C.useCallback(()=>y?.focus(),[y]),V=C.useCallback((e,t,n)=>{const r=!_.current&&!n;(void 0!==b.value&&b.value===t||r)&&O(e)},[b.value]),H="popper"===r?Zb:Kb,B=H===Zb?{side:l,sideOffset:s,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:g,avoidCollisions:h}:{};return(0,De.jsx)(Yb,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:z,selectedItem:E,onItemLeave:W,itemTextRefCallback:V,focusSelectedItem:I,selectedItemText:M,position:r,isPositioned:D,searchRef:A,children:(0,De.jsx)(no,{as:$b,allowPinchZoom:!0,children:(0,De.jsx)(Jn,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Sn(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,De.jsx)(qn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:(0,De.jsx)(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...B,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Sn(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||L(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().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(()=>j(t)),e.preventDefault()}})})})})})})});Ub.displayName="SelectContentImpl";var Kb=C.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=_b(Hb,n),i=qb(Hb,n),[l,s]=C.useState(null),[c,u]=C.useState(null),d=Ne(t,e=>u(e)),f=Rb(n),p=C.useRef(!1),m=C.useRef(!0),{viewport:g,selectedItem:h,selectedItemText:v,focusSelectedItem:b}=i,y=C.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&c&&g&&h&&v){const e=a.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-Gb,d=mb(a,[Gb,Math.max(Gb,u-c)]);l.style.minWidth=s+"px",l.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),u=window.innerWidth-Gb,d=mb(a,[Gb,Math.max(Gb,u-c)]);l.style.minWidth=s+"px",l.style.right=d+"px"}const i=f(),s=window.innerHeight-2*Gb,u=g.scrollHeight,d=window.getComputedStyle(c),m=parseInt(d.borderTopWidth,10),b=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),w=m+b+u+parseInt(d.paddingBottom,10)+y,x=Math.min(5*h.offsetHeight,w),C=window.getComputedStyle(g),S=parseInt(C.paddingTop,10),k=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Gb,R=s-E,M=h.offsetHeight/2,O=m+b+(h.offsetTop+M),N=w-O;if(O<=E){const e=i.length>0&&h===i[i.length-1].ref.current;l.style.bottom="0px";const t=c.clientHeight-g.offsetTop-g.offsetHeight,n=O+Math.max(R,M+(e?k:0)+t+y);l.style.height=n+"px"}else{const e=i.length>0&&h===i[0].ref.current;l.style.top="0px";const t=Math.max(E,m+g.offsetTop+(e?S:0)+M)+N;l.style.height=t+"px",g.scrollTop=O-E+g.offsetTop}l.style.margin=`${Gb}px 0`,l.style.minHeight=x+"px",l.style.maxHeight=s+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,l,c,g,h,v,a.dir,r]);Rn(()=>y(),[y]);const[w,x]=C.useState();Rn(()=>{c&&x(window.getComputedStyle(c).zIndex)},[c]);const S=C.useCallback(e=>{e&&!0===m.current&&(y(),b?.(),m.current=!1)},[y,b]);return(0,De.jsx)(Xb,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,De.jsx)("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,De.jsx)(Ln.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Kb.displayName="SelectItemAlignedPosition";var Zb=C.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Gb,...a}=e,i=Db(n);return(0,De.jsx)(am,{...i,...a,ref:t,align:r,collisionPadding:o,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)"}})});Zb.displayName="SelectPopperPosition";var[Xb,Qb]=Ob(Hb,{}),Jb="SelectViewport",ey=C.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=qb(Jb,n),i=Qb(Jb,n),l=Ne(t,a.onViewportChange),s=C.useRef(0);return(0,De.jsxs)(De.Fragment,{children:[(0,De.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:r}),(0,De.jsx)(Eb.Slot,{scope:n,children:(0,De.jsx)(Ln.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Sn(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*Gb,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop})})})]})});ey.displayName=Jb;var ty="SelectGroup",[ny,ry]=Ob(ty),oy=C.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Nn();return(0,De.jsx)(ny,{scope:n,id:o,children:(0,De.jsx)(Ln.div,{role:"group","aria-labelledby":o,...r,ref:t})})});oy.displayName=ty;var ay="SelectLabel",iy=C.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ry(ay,n);return(0,De.jsx)(Ln.div,{id:o.id,...r,ref:t})});iy.displayName=ay;var ly="SelectItem",[sy,cy]=Ob(ly),uy=C.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,l=_b(ly,n),s=qb(ly,n),c=l.value===r,[u,d]=C.useState(a??""),[f,p]=C.useState(!1),m=Ne(t,e=>s.itemRefCallback?.(e,r,o)),g=Nn(),h=C.useRef("touch"),v=()=>{o||(l.onValueChange(r),l.onOpenChange(!1))};if(""===r)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(0,De.jsx)(sy,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:C.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,De.jsx)(Eb.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:(0,De.jsx)(Ln.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:Sn(i.onFocus,()=>p(!0)),onBlur:Sn(i.onBlur,()=>p(!1)),onClick:Sn(i.onClick,()=>{"mouse"!==h.current&&v()}),onPointerUp:Sn(i.onPointerUp,()=>{"mouse"===h.current&&v()}),onPointerDown:Sn(i.onPointerDown,e=>{h.current=e.pointerType}),onPointerMove:Sn(i.onPointerMove,e=>{h.current=e.pointerType,o?s.onItemLeave?.():"mouse"===h.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Sn(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&s.onItemLeave?.()}),onKeyDown:Sn(i.onKeyDown,e=>{""!==s.searchRef?.current&&" "===e.key||(Sb.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});uy.displayName=ly;var dy="SelectItemText",fy=C.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=_b(dy,n),l=qb(dy,n),s=cy(dy,n),c=Ib(dy,n),[u,d]=C.useState(null),f=Ne(t,e=>d(e),s.onItemTextChange,e=>l.itemTextRefCallback?.(e,s.value,s.disabled)),p=u?.textContent,m=C.useMemo(()=>(0,De.jsx)("option",{value:s.value,disabled:s.disabled,children:p},s.value),[s.disabled,s.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:h}=c;return Rn(()=>(g(m),()=>h(m)),[g,h,m]),(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)(Ln.span,{id:s.textId,...a,ref:f}),s.isSelected&&i.valueNode&&!i.valueNodeHasChildren?_n.createPortal(a.children,i.valueNode):null]})});fy.displayName=dy;var py="SelectItemIndicator",my=C.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cy(py,n).isSelected?(0,De.jsx)(Ln.span,{"aria-hidden":!0,...r,ref:t}):null});my.displayName=py;var gy="SelectScrollUpButton",hy=C.forwardRef((e,t)=>{const n=qb(gy,e.__scopeSelect),r=Qb(gy,e.__scopeSelect),[o,a]=C.useState(!1),i=Ne(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,De.jsx)(yy,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});hy.displayName=gy;var vy="SelectScrollDownButton",by=C.forwardRef((e,t)=>{const n=qb(vy,e.__scopeSelect),r=Qb(vy,e.__scopeSelect),[o,a]=C.useState(!1),i=Ne(t,r.onScrollButtonChange);return Rn(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,De.jsx)(yy,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});by.displayName=vy;var yy=C.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=qb("SelectScrollButton",n),i=C.useRef(null),l=Rb(n),s=C.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return C.useEffect(()=>()=>s(),[s]),Rn(()=>{const e=l().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[l]),(0,De.jsx)(Ln.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Sn(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:Sn(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:Sn(o.onPointerLeave,()=>{s()})})}),wy=C.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,De.jsx)(Ln.div,{"aria-hidden":!0,...r,ref:t})});wy.displayName="SelectSeparator";var xy="SelectArrow",Cy=C.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Db(n),a=_b(xy,n),i=qb(xy,n);return a.open&&"popper"===i.position?(0,De.jsx)(im,{...o,...r,ref:t}):null});Cy.displayName=xy;var Sy=C.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=C.useRef(null),a=Ne(r,o),i=yb(t);return C.useEffect(()=>{const e=o.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),(0,De.jsx)(Ln.select,{...n,style:{...wb,...n.style},ref:a,defaultValue:t})});function ky(e){return""===e||void 0===e}function Ey(e){const t=Wn(e),n=C.useRef(""),r=C.useRef(0),o=C.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=C.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Ry(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 a=(i=e,l=Math.max(o,0),i.map((e,t)=>i[(l+t)%i.length]));var i,l;1===r.length&&(a=a.filter(e=>e!==n));const s=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}Sy.displayName="SelectBubbleInput";var My=Fb,Oy=Ab,Ny=zb,Dy=Wb,Py=Vb,_y=Bb,jy=ey,Iy=oy,Fy=iy,Ty=uy,Ay=fy,Ly=my,zy=hy,Wy=by,Vy=wy,Hy=["className","size","children"],By=["className","children","position","align"],Gy=["className"],Yy=["className","children"],qy=["className"],$y=["className"],Uy=["className"];function Ky(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Zy(e){if(null==e)throw new TypeError("Cannot destructure "+e)}function Xy(){return Xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xy.apply(null,arguments)}function Qy(e){var t=Xy({},(Zy(e),e));return C.createElement(My,Xy({"data-slot":"select"},t))}function Jy(e){var t=Xy({},(Zy(e),e));return C.createElement(Iy,Xy({"data-slot":"select-group"},t))}function ew(e){var t=Xy({},(Zy(e),e));return C.createElement(Ny,Xy({"data-slot":"select-value"},t))}function tw(e){var t=e.className,n=e.size,r=void 0===n?"default":n,o=e.children,a=Ky(e,Hy);return C.createElement(Oy,Xy({"data-slot":"select-trigger","data-size":r,className:Lt("border-input data-[placeholder]:text-muted-foreground! [&_svg:not([class*='text-'])]:text-muted-foreground! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-white px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t)},a),o,C.createElement(Dy,{asChild:!0},C.createElement(Se,{className:"size-4 opacity-50"})))}function nw(e){var t=e.className,n=e.children,r=e.position,o=void 0===r?"popper":r,a=e.align,i=void 0===a?"center":a,l=Ky(e,By);return C.createElement(Py,null,C.createElement(_y,Xy({"data-slot":"select-content",className:Lt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,align:i},l),C.createElement(iw,null),C.createElement(jy,{className:Lt("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1")},n),C.createElement(lw,null)))}function rw(e){var t=e.className,n=Ky(e,Gy);return C.createElement(Fy,Xy({"data-slot":"select-label",className:Lt("text-muted-foreground px-2 py-1.5 text-xs",t)},n))}function ow(e){var t=e.className,n=e.children,r=Ky(e,Yy);return C.createElement(Ty,Xy({"data-slot":"select-item",className:Lt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t)},r),C.createElement("span",{className:"absolute right-2 flex size-3.5 items-center justify-center"},C.createElement(Ly,null,C.createElement(Ah,{className:"size-4"}))),C.createElement(Ay,null,n))}function aw(e){var t=e.className,n=Ky(e,qy);return C.createElement(Vy,Xy({"data-slot":"select-separator",className:Lt("bg-border pointer-events-none -mx-1 my-1 h-px",t)},n))}function iw(e){var t=e.className,n=Ky(e,$y);return C.createElement(zy,Xy({"data-slot":"select-scroll-up-button",className:Lt("flex cursor-default items-center justify-center py-1",t)},n),C.createElement(Ce,{className:"size-4"}))}function lw(e){var t=e.className,n=Ky(e,Uy);return C.createElement(Wy,Xy({"data-slot":"select-scroll-down-button",className:Lt("flex cursor-default items-center justify-center py-1",t)},n),C.createElement(Se,{className:"size-4"}))}var sw="Switch",[cw,uw]=kn(sw),[dw,fw]=cw(sw),pw=C.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:c,form:u,...d}=e,[f,p]=C.useState(null),m=Ne(t,e=>p(e)),g=C.useRef(!1),h=!f||(u||!!f.closest("form")),[v,b]=Pn({prop:o,defaultProp:a??!1,onChange:c,caller:sw});return(0,De.jsxs)(dw,{scope:n,checked:v,disabled:l,children:[(0,De.jsx)(Ln.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":vw(v),"data-disabled":l?"":void 0,disabled:l,value:s,...d,ref:m,onClick:Sn(e.onClick,e=>{b(e=>!e),h&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),h&&(0,De.jsx)(hw,{control:f,bubbles:!g.current,name:r,value:s,checked:v,required:i,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});pw.displayName=sw;var mw="SwitchThumb",gw=C.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=fw(mw,n);return(0,De.jsx)(Ln.span,{"data-state":vw(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});gw.displayName=mw;var hw=C.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=C.useRef(null),l=Ne(i,a),s=yb(n),c=Lp(t);return C.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}},[s,n,r]),(0,De.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:l,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function vw(e){return e?"checked":"unchecked"}hw.displayName="SwitchBubbleInput";var bw=pw,yw=gw,ww=["className"];function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xw.apply(null,arguments)}function Cw(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ww);return C.createElement(bw,xw({"data-slot":"switch",className:Lt("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t)},n),C.createElement(yw,{"data-slot":"switch-thumb",className:Lt("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}))}var Sw=["className"];function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kw.apply(null,arguments)}function Ew(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Sw);return React.createElement("textarea",kw({"data-slot":"textarea",className:Lt("border-input! placeholder:text-muted-foreground/70! focus-visible:border-ring! focus-visible:ring-ring/50! aria-invalid:ring-destructive/20! dark:aria-invalid:ring-destructive/40! aria-invalid:border-destructive! dark:bg-input/30! flex field-sizing-content min-h-16 w-full rounded-md! border! bg-white! px-3! py-2! text-base shadow-xs! transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50! md:text-sm",t)},n))}function Rw(e){return Rw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rw(e)}function Mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ow(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mw(Object(n),!0).forEach(function(t){Nw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Rw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rw(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}window.WPSmartPayUI=Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow(Ow({},c),l),r),p),m),g),h),o),v),b),y),a),x),w),s),i),{},{DataTable:function(e){var t,n,r,o,a=e.columns,i=e.data,l=e.pagination,s=e.onPaginationChange,c=e.onSearchChange,u=e.onSortChange,d=e.isLoading,f=void 0!==d&&d,p=e.searchPlaceholder,m=void 0===p?"Search...":p,g=e.enableSearch,h=void 0===g||g,v=e.enableSorting,b=void 0!==v&&v,y=e.enableFilters,w=void 0!==y&&y,x=e.enableActions,S=void 0!==x&&x,k=e.enableRowSelection,E=void 0!==k&&k,R=e.rowSelection,M=void 0===R?{}:R,D=e.onRowSelectionChange,P=e.filters,_=void 0===P?[]:P,j=e.sortingState,F=void 0===j?[]:j,T=e.isJustifyBetween,A=void 0===T||T,L=e.actions,z=void 0===L?[]:L,W=fn((0,dn.useState)(""),2),V=W[0],H=W[1],B=fn((0,dn.useState)(""),2),G=B[0],Y=B[1],q=fn((0,dn.useState)(F),2),$=q[0],U=q[1];(0,dn.useEffect)(function(){var e=setTimeout(function(){Y(V)},500);return function(){return clearTimeout(e)}},[V]),(0,dn.useEffect)(function(){c&&h&&c(G)},[G,c,h]),(0,dn.useEffect)(function(){u&&b&&u($)},[$,u,b]);var K=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=C.useState(()=>({current:ge(t)})),[r,o]=C.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:i,columns:a,getCoreRowModel:e=>O(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[];for(let s=0;s<t.length;s++){const c=I(e,e._getRowId(t[s],s,a),t[s],s,o,void 0,null==a?void 0:a.id);var l;n.flatRows.push(c),n.rowsById[c.id]=c,i.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[s],s),null!=(l=c.originalSubRows)&&l.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return i};return n.rows=r(t),n},N(e.options,"debugTable",0,()=>e._autoResetPageIndex())),getSortedRowModel:b?e=>O(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],a=r.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),i={};a.forEach(t=>{const n=e.getColumn(t.id);n&&(i[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});const l=e=>{const t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let r=0;r<a.length;r+=1){var n;const o=a[r],l=i[o.id],s=l.sortUndefined,c=null!=(n=null==o?void 0:o.desc)&&n;let u=0;if(s){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===s)return n?-1:1;if("last"===s)return n?1:-1;u=n&&r?0:n?s:-s}}if(0===u&&(u=l.sortingFn(e,t,o.id)),0!==u)return c&&(u*=-1),l.invertSorting&&(u*=-1),u}return e.index-t.index}),t.forEach(e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=l(e.subRows))}),t};return{rows:l(n.rows),flatRows:o,rowsById:n.rowsById}},N(e.options,"debugTable",0,()=>e._autoResetPageIndex())):void 0,manualPagination:!0,manualSorting:b,pageCount:null!==(t=null==l?void 0:l.last_page)&&void 0!==t?t:-1,enableRowSelection:E,state:{pagination:{pageIndex:(null!==(n=null==l?void 0:l.current_page)&&void 0!==n?n:1)-1,pageSize:null!==(r=null==l?void 0:l.per_page)&&void 0!==r?r:10},sorting:b?$:void 0,rowSelection:M},onSortingChange:b?U:void 0,onRowSelectionChange:E&&D?function(e){var t="function"==typeof e?e(K.getState().rowSelection):e;D(t)}:void 0}),Z=l&&l.current_page>1,X=l&&l.current_page<l.last_page;return React.createElement("div",null,(h||w)&&React.createElement("div",{className:"flex items-center justify-between gap-4 py-4"},React.createElement("div",{className:"flex flex-wrap items-center gap-4 flex-1"+(A?" justify-between":"")},h&&React.createElement("div",{className:"relative w-xs"},React.createElement(Yt,{placeholder:m,value:V,onChange:function(e){H(e.target.value)},className:"max-w-xs"}),f&&V.length>0&&React.createElement(Ee,{className:"animate-spin absolute right-3 top-2.5 size-4 text-gray-500"})),w&&_&&_.length>0&&React.createElement("div",{className:"flex items-center gap-2"},_.map(function(e,t){return React.createElement("div",{key:t},e)})),S&&z&&z.length>0&&React.createElement("div",{className:"flex items-center gap-2 ml-auto"},z.map(function(e,t){return React.createElement("div",{key:t},e)})))),React.createElement("div",{className:"rounded-md border"},React.createElement(nn,null,React.createElement(rn,null,K.getHeaderGroups().map(function(e){return React.createElement(ln,{key:e.id},e.headers.map(function(e){var t=b&&e.column.getCanSort();return React.createElement(sn,{key:e.id},e.isPlaceholder?null:React.createElement("div",{className:t?"flex justify-end items-center cursor-pointer select-none":"",onClick:t?e.column.getToggleSortingHandler():void 0},he(e.column.columnDef.header,e.getContext()),function(e){if(!b||!e.column.getCanSort())return null;var t=e.column.getIsSorted();return"asc"===t?React.createElement(Ce,{className:"ml-2 h-4 w-4"}):"desc"===t?React.createElement(Se,{className:"ml-2 h-4 w-4"}):React.createElement(ke,{className:"ml-2 h-4 w-4"})}(e)))}))})),React.createElement(on,null,f?React.createElement(ln,null,React.createElement(cn,{colSpan:a.length,className:"h-24 text-center"},React.createElement("div",{className:"w-full flex items-center justify-center"},React.createElement(Ee,{className:"animate-spin size-6 text-gray-500"})))):null!==(o=K.getRowModel().rows)&&void 0!==o&&o.length?K.getRowModel().rows.map(function(e){return React.createElement(ln,{key:e.id,"data-state":e.getIsSelected()&&"selected"},e.getVisibleCells().map(function(e){return React.createElement(cn,{key:e.id},he(e.column.columnDef.cell,e.getContext()))}))}):React.createElement(ln,null,React.createElement(cn,{colSpan:a.length,className:"min-h-24 py-10! text-center bg-slate-50"},React.createElement("div",{className:"flex items-center justify-center flex-col text-slate-700 gap-3 w-full"},React.createElement(Re,{className:"size-10"}),React.createElement("span",{className:"font-semibold text-lg!"},(0,ve.__)("No Record Found.","smartpay")))))))),React.createElement("div",{className:"flex items-center justify-between space-x-2 py-4"},l&&React.createElement("div",{className:"text-sm text-gray-600"},(0,ve.__)("Showing","smartpay")," ",l.from," ",(0,ve.__)("to","smartpay")," ",l.to," ",(0,ve.__)("of","smartpay")," ",l.total," ",(0,ve.__)("results","smartpay")),React.createElement("div",{className:"text-sm text-gray-600"},l&&React.createElement(React.Fragment,null,(0,ve.__)("Page","smartpay")," ",l.current_page," ",(0,ve.__)("of","smartpay")," ",l.last_page)),React.createElement("div",{className:"flex space-x-2"},React.createElement(Ht,{variant:"outline",size:"sm",onClick:function(){s&&l&&l.current_page>1&&s({page:l.current_page-1,per_page:l.per_page})},disabled:!Z||f},(0,ve.__)("Previous","smartpay")),React.createElement(Ht,{variant:"outline",size:"sm",onClick:function(){s&&l&&l.current_page<l.last_page&&s({page:l.current_page+1,per_page:l.per_page})},disabled:!X||f},(0,ve.__)("Next","smartpay")))))},Header:function(e){var t=e.title,n=(e.subtitle,Ea((0,dn.useState)(!1),2)),r=n[0],o=n[1];return(0,dn.useEffect)(function(){document.title=t?"".concat(t," — ").concat(Ma):Ma},[t]),React.createElement(React.Fragment,null,React.createElement("div",{className:"smartpay-page-header"},React.createElement("div",{className:"smartpay-page-header__inner"},React.createElement("div",{className:"smartpay-page-header__logo"},React.createElement("img",{src:smartpay.logo,alt:"WPSmartPay"})),React.createElement("div",{className:"smartpay-page-header__actions"},React.createElement("button",{type:"button",className:"smartpay-page-header__help-btn",onClick:function(){return o(!0)},title:(0,ve.__)("Help & Documentation","smartpay"),"aria-label":(0,ve.__)("Open help documentation","smartpay")},React.createElement(mn,{style:{width:14,height:14,opacity:.7}}),(0,ve.__)("Help","smartpay"))))),React.createElement(ka,{open:r,onOpenChange:o}))},StatCard:function(e){var t=e.title,n=e.value,r=e.change,o=e.icon;return React.createElement("div",{className:"bg-card text-card-foreground rounded-xl border border-border p-6 flex flex-col gap-2 shadow-sm"},React.createElement("div",{className:"flex items-center justify-between"},React.createElement("span",{className:"text-sm font-medium text-muted-foreground"},t),o&&React.createElement(o,{className:"h-4 w-4 text-muted-foreground"})),React.createElement("span",{className:"text-3xl font-bold tracking-tight text-card-foreground"},n),r&&React.createElement("span",{className:"text-xs text-primary font-medium"},r))},StatusBadge:function(e){var t=e.status,n=null==t?void 0:t.toLowerCase(),r={completed:{icon:Ia,color:"bg-green-50 text-green-700 border-green-200!",label:"Completed"},refunded:{icon:Ba,color:"bg-blue-50 text-blue-700 border-blue-200!",label:"Refunded"},pending:{icon:Ta,color:"bg-yellow-50 text-yellow-800 border-yellow-200!",label:"Pending"},failed:{icon:Za,color:"bg-red-50 text-red-700 border-red-200!",label:"Failed"},abandoned:{icon:Na,color:"bg-gray-50 text-gray-700 border-gray-200!",label:"Abandoned"},processing:{icon:Ee,color:"bg-purple-50 text-purple-700 border-purple-200!",label:"Processing"},revoked:{icon:Pa,color:"bg-orange-50 text-orange-700 border-orange-200!",label:"Revoked"}},o=r[n]||r.pending,a=o.icon,i=o.color,l=o.label;return React.createElement(ei,{variant:"outline",className:Ve("flex items-center min-w-30 justify-center gap-1.5 px-2 py-1 rounded-full border text-xs font-medium",i)},React.createElement(a,{className:"w-3.5 h-3.5"}),l)},MultiSelect:function(e){var t=e.options,n=void 0===t?[]:t,r=e.placeholder,o=void 0===r?"Select options":r,a=e.searchBoxPlaceholder,i=void 0===a?"Search...":a,l=e.onChange,s=e.value,c=void 0===s?[]:s,u=e.searchable,d=void 0===u||u,f=e.onSearch,p=e.debounceTime,m=void 0===p?300:p,g=e.loading,h=void 0!==g&&g,v=kv((0,C.useState)(!1),2),b=v[0],y=v[1],w=kv((0,C.useState)(c),2),x=w[0],S=w[1],k=kv((0,C.useState)(""),2),E=k[0],R=k[1],M=(0,C.useRef)(null),O=(0,C.useRef)(""),N=(0,C.useRef)(null),D=(0,C.useRef)(null),P=n.length>0&&"group"in n[0];(0,C.useEffect)(function(){Array.isArray(c)&&S(c)},[c]),(0,C.useEffect)(function(){b&&d&&N.current&&N.current.focus()},[b,d]),(0,C.useEffect)(function(){if(f&&b&&O.current!==E)return O.current=E,M.current&&clearTimeout(M.current),M.current=setTimeout(function(){f(E)},m),function(){M.current&&clearTimeout(M.current)}},[E]);var _=function(e){var t=x.includes(e)?x.filter(function(t){return t!==e}):[].concat(Sv(x),[e]);S(t),null==l||l(t),y(!1),R(""),setTimeout(function(){var e;null===(e=D.current)||void 0===e||e.focus()},0)},j=function(){if(f)return n;if(!E)return n;var e=E.toLowerCase();return P?n.map(function(t){return xv(xv({},t),{},{options:t.options.filter(function(t){return t.label.toLowerCase().includes(e)})})}).filter(function(e){return e.options.length>0}):n.filter(function(t){return t.label.toLowerCase().includes(e)})}(),I=P?n.flatMap(function(e){return e.options}):n;return React.createElement("div",{className:"relative w-full"},React.createElement("div",{onClick:function(){return y(!b)},className:"flex h-auto min-h-10 w-full items-center justify-between rounded-md border border-slate-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-slate-500 hover:border-slate-300 cursor-pointer transition-all disabled:cursor-not-allowed disabled:opacity-50"},React.createElement("div",{className:"flex items-center gap-1.5 flex-wrap flex-1 mr-2"},0===x.length?React.createElement("span",{className:"text-slate-500"},o):React.createElement(React.Fragment,null,x.map(function(e){var t=I.find(function(t){return t.value===e});return t?React.createElement("span",{key:e,className:"inline-flex items-center gap-1 rounded-lg bg-slate-100 px-2 py-0.5 text-xs font-medium text-slate-900 border border-slate-200"},t.icon&&React.createElement("span",{className:"text-sm"},t.icon),t.label,React.createElement(ra,{className:"h-3 w-3 cursor-pointer text-slate-500 hover:text-slate-700",onClick:function(t){return function(e,t){t.stopPropagation();var n=x.filter(function(t){return t!==e});S(n),null==l||l(n)}(e,t)}})):null}),React.createElement("input",{ref:D,type:"text",className:"w-px min-h-4! h-4! border-none! outline-none! shadow-none bg-transparent p-0 m-0 caret-slate-900",onInput:function(e){var t=e.target.value;t&&(R(t),y(!0),setTimeout(function(){N.current&&(N.current.focus(),N.current.setSelectionRange(t.length,t.length))},0),e.target.value="")}}))),React.createElement(Se,{className:Lt("h-4 w-4 text-slate-500 transition-transform shrink-0 mt-0.5",b&&"rotate-180")})),b&&React.createElement(React.Fragment,null,React.createElement("div",{className:"fixed inset-0 z-40",onClick:function(){return y(!1)}}),React.createElement("div",{className:"absolute z-50 w-full mt-2 rounded-md border border-slate-200 bg-white shadow-md"},d&&React.createElement("div",{className:"p-3 border-b border-slate-200"},React.createElement("div",{className:"relative"},React.createElement(bv,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),h&&React.createElement(Ee,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 animate-spin"}),React.createElement("input",{ref:N,type:"text",placeholder:i,value:E,onChange:function(e){return R(e.target.value)},className:"flex h-9 w-full rounded-md border border-slate-200 bg-white pl-9! pr-3! py-1! text-sm shadow-sm transition-colors placeholder:text-slate-500 focus:outline-none focus:ring-1 focus:ring-slate-950",onClick:function(e){return e.stopPropagation()}}))),React.createElement("div",{className:"max-h-80 overflow-auto p-1"},h?React.createElement("div",{className:"py-6 text-center text-sm text-slate-500"},React.createElement(Ee,{className:"h-5 w-5 animate-spin mx-auto mb-2"}),"Loading..."):0===j.length?React.createElement("div",{className:"py-6 text-center text-sm text-slate-500"},"No options found"):P?j.map(function(e,t){return React.createElement("div",{key:t,className:"mb-1 last:mb-0"},React.createElement("div",{className:"px-2 py-1.5"},React.createElement("h3",{className:"text-xs! font-medium text-slate-400! uppercase m-0!"},e.group)),e.options.map(function(e){var t=x.includes(e.value);return React.createElement("div",{key:e.value,onClick:function(){return _(e.value)},className:Lt("relative flex cursor-pointer select-none items-center rounded-sm ml-2 px-2 py-1.5 text-sm outline-none transition-colors hover:bg-slate-200/80 hover:text-slate-900",t&&"bg-slate-200/80 text-slate-900 opacity-60",!t&&"text-slate-700")},e.icon&&React.createElement("span",{className:"mr-2 text-base"},e.icon),React.createElement("div",{className:"flex-1"},React.createElement("div",{className:"font-normal"},e.label),e.description&&React.createElement("div",{className:"text-xs text-slate-500 mt-0.5"},e.description)),t&&React.createElement("div",{className:"ml-2 h-1.5 w-1.5 rounded-full bg-slate-900"}))}))}):j.map(function(e){var t=x.includes(e.value);return React.createElement("div",{key:e.value,onClick:function(){return _(e.value)},className:Lt("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-slate-200/80 hover:text-slate-900",t&&"bg-slate-200/80 text-slate-900 opacity-60",!t&&"text-slate-700")},e.icon&&React.createElement("span",{className:"mr-2 text-base"},e.icon),React.createElement("div",{className:"flex-1"},React.createElement("div",{className:"font-normal"},e.label),e.description&&React.createElement("div",{className:"text-xs text-slate-500 mt-0.5"},e.description)),t&&React.createElement("div",{className:"ml-2 h-1.5 w-1.5 rounded-full bg-slate-900"}))})),x.length>0&&React.createElement("div",{className:"border-t border-slate-200 p-2 flex gap-2"},React.createElement("button",{onClick:function(){S([]),null==l||l([])},className:"inline-flex items-center justify-center flex-1 rounded-md text-sm font-medium ring-offset-white transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 h-9 px-3"},"Clear All")))))}})})();