ezux 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/EzContextMenu-9STA_8UL.cjs +1 -0
- package/dist/EzContextMenu-vcwZjlYv.js +288 -0
- package/dist/EzErrorBoundary-C7R4h7QH.cjs +1 -0
- package/dist/EzErrorBoundary-b-fGQvjw.js +74 -0
- package/dist/EzEventModal-C1ItJBxp.cjs +1 -0
- package/dist/EzEventModal-MDtx4Gwd.js +720 -0
- package/dist/EzFlow-B3oi5QvJ.js +2533 -0
- package/dist/EzFlow-BeiFmX7h.cjs +5 -0
- package/dist/EzGroupingPanel-B1B2B3Sc.js +107 -0
- package/dist/EzGroupingPanel-BGHywLsj.cjs +1 -0
- package/dist/EzKanban-CEPmBCZV.js +1589 -0
- package/dist/EzKanban-CsnJ80LW.cjs +2 -0
- package/dist/EzLayout-DYRKNOrI.cjs +1 -0
- package/dist/EzLayout-DyMI9A92.js +6986 -0
- package/dist/EzProvider-Df2qgeDn.js +975 -0
- package/dist/EzProvider-DntSad5M.cjs +1 -0
- package/dist/EzScheduler-CTYXyOG8.js +2737 -0
- package/dist/EzScheduler-CzL68fTe.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-CPSPAjdk.cjs +1 -0
- package/dist/EzSchedulerQuickAdd-wXGn1L1c.js +124 -0
- package/dist/EzSchedulerToolbar-B5iXsdn2.cjs +1 -0
- package/dist/EzSchedulerToolbar-NdKzGgMo.js +306 -0
- package/dist/EzSignature-Bg9jJvHp.cjs +1 -0
- package/dist/EzSignature-CZk-iAb3.js +375 -0
- package/dist/EzTable-Bde5BUoE.cjs +3 -0
- package/dist/EzTable-CaCyWXNv.js +4291 -0
- package/dist/EzTableEditDialog-5CJ-i5FI.js +84 -0
- package/dist/EzTableEditDialog-DAPhmWxI.cjs +1 -0
- package/dist/EzTableFooter-B347PRkZ.js +35 -0
- package/dist/EzTableFooter-ZqHoQKYB.cjs +1 -0
- package/dist/EzTableToolbar-D4Qw-fwb.js +161 -0
- package/dist/EzTableToolbar-DNxAgMdI.cjs +1 -0
- package/dist/EzTreeView-ChsTltti.js +819 -0
- package/dist/EzTreeView-D8k-Wmxa.cjs +1 -0
- package/dist/HighlightText-BZ_1jMaA.js +56 -0
- package/dist/HighlightText-V5NgtV18.cjs +1 -0
- package/dist/KanbanBoard-BzIhmn-2.cjs +1 -0
- package/dist/KanbanBoard-DTsy_GAc.js +1698 -0
- package/dist/NotificationPanel-B0pVgPcO.js +55 -0
- package/dist/NotificationPanel-ulIs4r-0.cjs +1 -0
- package/dist/TooltipWrapper-66yWxRSD.js +44 -0
- package/dist/TooltipWrapper-QRc3qTIG.cjs +1 -0
- package/dist/advanced.cjs +10 -0
- package/dist/advanced.d.ts +2616 -0
- package/dist/advanced.es.js +401 -0
- package/dist/avatar-DOjSWi4R.js +24 -0
- package/dist/avatar-hWg4zkh7.cjs +1 -0
- package/dist/button-BN0DK137.js +42 -0
- package/dist/button-CfngAt_5.cjs +1 -0
- package/dist/calendar-DEtDSI0W.js +112 -0
- package/dist/calendar-DroJGSPS.cjs +1 -0
- package/dist/card-CswobLmE.cjs +1 -0
- package/dist/card-vtDNxeL3.js +50 -0
- package/dist/checkbox-BpxQa4HQ.cjs +1 -0
- package/dist/checkbox-CS_BOaA6.js +22 -0
- package/dist/chunk-D-qHiVGv.cjs +1 -0
- package/dist/date-time-picker-C6i4TdP7.js +127 -0
- package/dist/date-time-picker-CfHnqJDm.cjs +1 -0
- package/dist/dropdown-menu-HrOgNiFv.js +78 -0
- package/dist/dropdown-menu-Xjuk1Xa-.cjs +1 -0
- package/dist/ezux.css +2 -1
- package/dist/flow.cjs +1 -0
- package/dist/flow.d.ts +539 -0
- package/dist/flow.es.js +2 -0
- package/dist/index.cjs +3 -12
- package/dist/index.d.ts +385 -1368
- package/dist/index.es.js +230 -1041
- package/dist/input-BE8Mmo8X.js +13 -0
- package/dist/input-DPWRzn7K.cjs +1 -0
- package/dist/kanban.cjs +1 -1
- package/dist/kanban.es.js +4 -17
- package/dist/label-4cHst7uN.cjs +1 -0
- package/dist/label-BLMeK8-Z.js +14 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +4 -0
- package/dist/layout.es.js +2 -20
- package/dist/mock-services.cjs +1 -0
- package/dist/mock-services.d.ts +273 -0
- package/dist/mock-services.es.js +161 -0
- package/dist/popover--Cf3FJ0g.cjs +1 -0
- package/dist/popover-CbakOivq.js +15 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/scheduler.cjs +1 -1
- package/dist/scheduler.d.ts +78 -3
- package/dist/scheduler.es.js +2 -11
- package/dist/scroll-area-CBllCk9n.js +35 -0
- package/dist/scroll-area-COOakfzY.cjs +1 -0
- package/dist/select-1vYIUsge.cjs +1 -0
- package/dist/select-Bes3Q6zL.js +43 -0
- package/dist/signature.cjs +1 -1
- package/dist/signature.es.js +2 -4
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +78 -24
- package/dist/table.es.js +2 -17
- package/dist/theme-vars.css +143 -135
- package/dist/tooltip-BRCnO0kH.cjs +1 -0
- package/dist/tooltip-CrhCAu6_.js +14 -0
- package/dist/treeview.cjs +1 -1
- package/dist/treeview.es.js +2 -954
- package/dist/useComponentState-CYR9x36s.js +57 -0
- package/dist/useComponentState-DqA-gi3-.cjs +1 -0
- package/dist/useImperativeAPI-CPRA9SCj.js +7 -0
- package/dist/useImperativeAPI-KOlk1Cvt.cjs +1 -0
- package/dist/useInitCoreServices-CRq0kPGA.cjs +1 -0
- package/dist/useInitCoreServices-lkTv2its.js +40 -0
- package/dist/useService-BkqWkhiU.js +10 -0
- package/dist/useService-CKITee_1.cjs +1 -0
- package/dist/useServiceState-BDTGXKyx.cjs +1 -0
- package/dist/useServiceState-CInpkGt2.js +21 -0
- package/dist/utils-DyS9jpam.cjs +1 -0
- package/dist/utils-hFRduYmq.js +8 -0
- package/package.json +42 -16
- package/dist/EzContextMenu-B6HBUjWv.cjs +0 -5
- package/dist/EzContextMenu-BSA_B6Pr.js +0 -3500
- package/dist/EzErrorBoundary-CEdz_hDo.cjs +0 -41
- package/dist/EzErrorBoundary-D4NBadES.js +0 -3727
- package/dist/EzEventModal-BUMp_BFi.js +0 -689
- package/dist/EzEventModal-xzHfzi0O.cjs +0 -1
- package/dist/EzGroupingPanel-BUsIYDRi.js +0 -143
- package/dist/EzGroupingPanel-D0HdSomF.cjs +0 -1
- package/dist/EzSchedulerQuickAdd-C653LTGh.js +0 -118
- package/dist/EzSchedulerQuickAdd-UnOWCpJd.cjs +0 -1
- package/dist/EzSchedulerToolbar-C-5OdRY6.cjs +0 -1
- package/dist/EzSchedulerToolbar-CO5jjDQg.js +0 -240
- package/dist/EzSignature-BaNesxwC.cjs +0 -1
- package/dist/EzSignature-D4EYwo9W.js +0 -419
- package/dist/EzTableEditDialog-Cd948V1C.js +0 -63
- package/dist/EzTableEditDialog-NiOubaMT.cjs +0 -1
- package/dist/EzTableFooter-CWjfGCjL.cjs +0 -1
- package/dist/EzTableFooter-DveD12RC.js +0 -54
- package/dist/EzTableToolbar-Bz8UWv6j.js +0 -246
- package/dist/EzTableToolbar-DHE7Bb1R.cjs +0 -1
- package/dist/HighlightText-8D6KEyBw.js +0 -68
- package/dist/HighlightText-LtZmzCle.cjs +0 -1
- package/dist/NotificationPanel-D2Y-_ahk.js +0 -68
- package/dist/NotificationPanel-zLxrtTGf.cjs +0 -1
- package/dist/TooltipWrapper-BrRTi5EJ.js +0 -2021
- package/dist/TooltipWrapper-DWts4bAI.cjs +0 -1
- package/dist/avatar-BeK0E4mn.js +0 -41
- package/dist/avatar-DZAaTK2f.cjs +0 -1
- package/dist/bell-DAz8P0BR.js +0 -14
- package/dist/bell-DOX2y38e.cjs +0 -1
- package/dist/calendar-BMZ8ddOf.cjs +0 -1
- package/dist/calendar-Dy3rVMW2.js +0 -90
- package/dist/checkbox-B0lGHUyy.cjs +0 -1
- package/dist/checkbox-boJRxICT.js +0 -46
- package/dist/chevron-down-C3s8jU6B.js +0 -5
- package/dist/chevron-down-DZVL7VHW.cjs +0 -1
- package/dist/chevron-left-BFr8XZyF.js +0 -5
- package/dist/chevron-left-HWhRo6IH.cjs +0 -1
- package/dist/circle-alert-77QqFR-z.cjs +0 -1
- package/dist/circle-alert-B2AMDd8N.js +0 -9
- package/dist/circle-x-Cv7bfIC_.js +0 -9
- package/dist/circle-x-DwVXxhXr.cjs +0 -1
- package/dist/date-time-picker-DTxHdPgQ.cjs +0 -1
- package/dist/date-time-picker-Dj2eftJI.js +0 -1636
- package/dist/download-0ZhO2XaW.cjs +0 -1
- package/dist/download-panVHmk6.js +0 -9
- package/dist/ellipsis-CuqNthAj.js +0 -9
- package/dist/ellipsis-CzlqJf-i.cjs +0 -1
- package/dist/grip-vertical-CSyDKBul.js +0 -12
- package/dist/grip-vertical-DZNBW1Dn.cjs +0 -1
- package/dist/index-B3ipEEhH.cjs +0 -2
- package/dist/index-BPPb7bcs.js +0 -3220
- package/dist/index-BQKw_Vho.js +0 -9604
- package/dist/index-C5STgBSy.js +0 -5203
- package/dist/index-C6NfgycP.js +0 -4644
- package/dist/index-D4f2ZdrG.cjs +0 -2
- package/dist/index-DUY1SqMo.cjs +0 -1
- package/dist/index-c1Zg--dt.cjs +0 -7
- package/dist/input-BgM_la4k.cjs +0 -1
- package/dist/input-jYQ5VKNR.js +0 -21
- package/dist/isBefore-C3Y_wbk3.js +0 -15
- package/dist/isBefore-Cp1ttk6q.cjs +0 -1
- package/dist/label-ClOW9UCt.js +0 -55
- package/dist/label-Dx6oDB-X.cjs +0 -1
- package/dist/layers-BA4i1fYX.js +0 -27
- package/dist/layers-xSPd-hz3.cjs +0 -1
- package/dist/popover-BJq1CKmi.cjs +0 -1
- package/dist/popover-Cmlb7w3R.js +0 -341
- package/dist/scroll-area-9fwpVNxT.js +0 -573
- package/dist/scroll-area-CwwZSSA4.cjs +0 -1
- package/dist/select-GxA46anr.cjs +0 -1
- package/dist/select-mDCun_IR.js +0 -35
- package/dist/settings-CvyjK75A.js +0 -31
- package/dist/settings-DKPknrt8.cjs +0 -1
- package/dist/sortable.esm-CsRPuXyD.cjs +0 -1
- package/dist/sortable.esm-CzMCDPet.js +0 -477
- package/dist/tooltip-B41iztKT.cjs +0 -1
- package/dist/tooltip-BCtrEe0z.js +0 -490
- package/dist/useComponentState-C87xXa5d.js +0 -64
- package/dist/useComponentState-DDgGbBXv.cjs +0 -1
- package/dist/useImperativeAPI-DXmCQvPL.js +0 -7
- package/dist/useImperativeAPI-DbZ3owSV.cjs +0 -1
- package/dist/useInitCoreServices-CwXv2p4S.cjs +0 -1
- package/dist/useInitCoreServices-D1WaWlaI.js +0 -3929
- package/dist/useService-8OoezWr8.cjs +0 -1
- package/dist/useService-BUi3uAqE.js +0 -10
- package/dist/useServiceState-BjpCjUn2.cjs +0 -1
- package/dist/useServiceState-VE-viK8b.js +0 -24
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const Rt=require("react"),Q=require("react/jsx-runtime"),N=require("./tooltip-B41iztKT.cjs");function Pt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const y=Pt(Rt);var q=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Et={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Ft=class{#t=Et;#e=!1;setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&this.#e&&t!==this.#t&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#t,provider:t}),this.#t=t,process.env.NODE_ENV!=="production"&&(this.#e=!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&(this.#e=!0),this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},T=new Ft;function Mt(t){setTimeout(t,0)}var D=typeof window>"u"||"Deno"in globalThis;function b(){}function Qt(t,e){return typeof t=="function"?t(e):t}function B(t){return typeof t=="number"&&t>=0&&t!==1/0}function yt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function E(t,e){return typeof t=="function"?t(e):t}function w(t,e){return typeof t=="function"?t(e):t}function rt(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:a,queryKey:o,stale:n}=t;if(o){if(i){if(e.queryHash!==X(o,e.options))return!1}else if(!A(e.queryKey,o))return!1}if(s!=="all"){const h=e.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof n=="boolean"&&e.isStale()!==n||r&&r!==e.state.fetchStatus||a&&!a(e))}function nt(t,e){const{exact:s,status:i,predicate:r,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(s){if(I(e.options.mutationKey)!==I(a))return!1}else if(!A(e.options.mutationKey,a))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function X(t,e){return(e?.queryKeyHashFn||I)(t)}function I(t){return JSON.stringify(t,(e,s)=>z(s)?Object.keys(s).sort().reduce((i,r)=>(i[r]=s[r],i),{}):s)}function A(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>A(t[s],e[s])):!1}var Tt=Object.prototype.hasOwnProperty;function V(t,e,s=0){if(t===e)return t;if(s>500)return e;const i=at(t)&&at(e);if(!i&&!(z(t)&&z(e)))return e;const a=(i?t:Object.keys(t)).length,o=i?e:Object.keys(e),n=o.length,h=i?new Array(n):{};let l=0;for(let u=0;u<n;u++){const m=i?u:o[u],c=t[m],v=e[m];if(c===v){h[m]=c,(i?u<a:Tt.call(t,m))&&l++;continue}if(c===null||v===null||typeof c!="object"||typeof v!="object"){h[m]=v;continue}const d=V(c,v,s+1);h[m]=d,d===c&&l++}return a===n&&l===a?t:h}function K(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function at(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function z(t){if(!ot(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!ot(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function ot(t){return Object.prototype.toString.call(t)==="[object Object]"}function Dt(t){return new Promise(e=>{T.setTimeout(e,t)})}function W(t,e,s){if(typeof s.structuralSharing=="function")return s.structuralSharing(t,e);if(s.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return V(t,e)}catch(i){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${i}`),i}return V(t,e)}return e}function It(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function qt(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var L=Symbol();function mt(t,e){return process.env.NODE_ENV!=="production"&&t.queryFn===L&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`),!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===L?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Y(t,e){return typeof t=="function"?t(...e):!!t}function xt(t,e,s){let i=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),i||(i=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),t}var At=class extends q{#t;#e;#s;constructor(){super(),this.#s=t=>{if(!D&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},tt=new At;function $(){let t,e;const s=new Promise((r,a)=>{t=r,e=a});s.status="pending",s.catch(()=>{});function i(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},s.reject=r=>{i({status:"rejected",reason:r}),e(r)},s}var jt=Mt;function Ut(){let t=[],e=0,s=n=>{n()},i=n=>{n()},r=jt;const a=n=>{e?t.push(n):r(()=>{s(n)})},o=()=>{const n=t;t=[],n.length&&r(()=>{i(()=>{n.forEach(h=>{s(h)})})})};return{batch:n=>{let h;e++;try{h=n()}finally{e--,e||o()}return h},batchCalls:n=>(...h)=>{a(()=>{n(...h)})},schedule:a,setNotifyFunction:n=>{s=n},setBatchNotifyFunction:n=>{i=n},setScheduler:n=>{r=n}}}var p=Ut(),kt=class extends q{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(!D&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},H=new kt;function Nt(t){return Math.min(1e3*2**t,3e4)}function vt(t){return(t??"online")==="online"?H.isOnline():!0}var J=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function gt(t){let e=!1,s=0,i;const r=$(),a=()=>r.status!=="pending",o=f=>{if(!a()){const g=new J(f);c(g),t.onCancel?.(g)}},n=()=>{e=!0},h=()=>{e=!1},l=()=>tt.isFocused()&&(t.networkMode==="always"||H.isOnline())&&t.canRun(),u=()=>vt(t.networkMode)&&t.canRun(),m=f=>{a()||(i?.(),r.resolve(f))},c=f=>{a()||(i?.(),r.reject(f))},v=()=>new Promise(f=>{i=g=>{(a()||l())&&f(g)},t.onPause?.()}).then(()=>{i=void 0,a()||t.onContinue?.()}),d=()=>{if(a())return;let f;const g=s===0?t.initialPromise:void 0;try{f=g??t.fn()}catch(O){f=Promise.reject(O)}Promise.resolve(f).then(m).catch(O=>{if(a())return;const C=t.retry??(D?0:3),R=t.retryDelay??Nt,F=typeof R=="function"?R(s,O):R,M=C===!0||typeof C=="number"&&s<C||typeof C=="function"&&C(s,O);if(e||!M){c(O);return}s++,t.onFail?.(s,O),Dt(F).then(()=>l()?void 0:v()).then(()=>{e?c(O):d()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i?.(),r),cancelRetry:n,continueRetry:h,canStart:u,start:()=>(u()?d():v().then(d),r)}}var bt=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B(this.gcTime)&&(this.#t=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(D?1/0:300*1e3))}clearGcTimeout(){this.#t&&(T.clearTimeout(this.#t),this.#t=void 0)}},_t=class extends bt{#t;#e;#s;#r;#i;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#s=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=ht(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#a,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=ht(this.options);e.data!==void 0&&(this.setState(ut(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,e){const s=W(this.state.data,t,this.options);return this.#n({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#n({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(b).catch(b):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>w(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===L||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>E(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yt(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#n({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const n=this.observers.find(h=>h.options.queryFn);n&&this.setOptions(n.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const s=new AbortController,i=n=>{Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},r=()=>{const n=mt(this.options,e),l=(()=>{const u={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(u),u})();return this.#o=!1,this.options.persister?this.options.persister(n,l,this):n(l)},o=(()=>{const n={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return i(n),n})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#n({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=gt({initialPromise:e?.initialPromise,fn:o.fetchFn,onCancel:n=>{n instanceof J&&n.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(n,h)=>{this.#n({type:"failed",failureCount:n,error:h})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const n=await this.#i.start();if(n===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(n),this.#s.config.onSuccess?.(n,this),this.#s.config.onSettled?.(n,this.state.error,this),n}catch(n){if(n instanceof J){if(n.silent)return this.#i.promise;if(n.revert){if(this.state.data===void 0)throw n;return this.state.data}}throw this.#n({type:"error",error:n}),this.#s.config.onError?.(n,this),this.#s.config.onSettled?.(this.state.data,n,this),n}finally{this.scheduleGc()}}#n(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ot(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...ut(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?i:void 0,i;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),p.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function Ot(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ut(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ht(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Kt=class extends q{constructor(t,e){super(),this.options=e,this.#t=t,this.#n=null,this.#o=$(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#s=void 0;#r=void 0;#i;#a;#o;#n;#y;#f;#d;#h;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),ct(this.#e,this.options)?this.#l():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Z(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Z(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof w(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),e._defaulted&&!K(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&<(this.#e,s,this.options,e)&&this.#l(),this.updateResult(),i&&(this.#e!==s||w(this.options.enabled,this.#e)!==w(e.enabled,this.#e)||E(this.options.staleTime,this.#e)!==E(e.staleTime,this.#e))&&this.#m();const r=this.#v();i&&(this.#e!==s||w(this.options.enabled,this.#e)!==w(e.enabled,this.#e)||r!==this.#u)&&this.#g(r)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return Ht(this,s)&&(this.#r=s,this.#a=this.options,this.#i=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#l(t){this.#w();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(b)),e}#m(){this.#O();const t=E(this.options.staleTime,this.#e);if(D||this.#r.isStale||!B(t))return;const s=yt(this.#r.dataUpdatedAt,t)+1;this.#h=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#g(t){this.#S(),this.#u=t,!(D||w(this.options.enabled,this.#e)===!1||!B(this.#u)||this.#u===0)&&(this.#c=T.setInterval(()=>{(this.options.refetchIntervalInBackground||tt.isFocused())&&this.#l()},this.#u))}#b(){this.#m(),this.#g(this.#v())}#O(){this.#h&&(T.clearTimeout(this.#h),this.#h=void 0)}#S(){this.#c&&(T.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const s=this.#e,i=this.options,r=this.#r,a=this.#i,o=this.#a,h=t!==s?t.state:this.#s,{state:l}=t;let u={...l},m=!1,c;if(e._optimisticResults){const S=this.hasListeners(),x=!S&&ct(t,e),j=S&<(t,s,e,i);(x||j)&&(u={...u,...Ot(l.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:v,errorUpdatedAt:d,status:f}=u;c=u.data;let g=!1;if(e.placeholderData!==void 0&&c===void 0&&f==="pending"){let S;r?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(S=r.data,g=!0):S=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,S!==void 0&&(f="success",c=W(r?.data,S,e),m=!0)}if(e.select&&c!==void 0&&!g)if(r&&c===a?.data&&e.select===this.#y)c=this.#f;else try{this.#y=e.select,c=e.select(c),c=W(r?.data,c,e),this.#f=c,this.#n=null}catch(S){this.#n=S}this.#n&&(v=this.#n,c=this.#f,d=Date.now(),f="error");const O=u.fetchStatus==="fetching",C=f==="pending",R=f==="error",F=C&&O,M=c!==void 0,P={status:f,fetchStatus:u.fetchStatus,isPending:C,isSuccess:f==="success",isError:R,isInitialLoading:F,isLoading:F,data:c,dataUpdatedAt:u.dataUpdatedAt,error:v,errorUpdatedAt:d,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>h.dataUpdateCount||u.errorUpdateCount>h.errorUpdateCount,isFetching:O,isRefetching:O&&!C,isLoadingError:R&&!M,isPaused:u.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&M,isStale:et(t,e),refetch:this.refetch,promise:this.#o,isEnabled:w(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const S=P.data!==void 0,x=P.status==="error"&&!S,j=k=>{x?k.reject(P.error):S&&k.resolve(P.data)},it=()=>{const k=this.#o=P.promise=$();j(k)},U=this.#o;switch(U.status){case"pending":t.queryHash===s.queryHash&&j(U);break;case"fulfilled":(x||P.data!==U.value)&&it();break;case"rejected":(!x||P.error!==U.reason)&&it();break}}return P}updateResult(){const t=this.#r,e=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#a=this.options,this.#i.data!==void 0&&(this.#d=this.#e),K(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const a=new Set(r??this.#p);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(o=>{const n=o;return this.#r[n]!==t[n]&&a.has(n)})};this.#C({listeners:s()})}#w(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){p.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Lt(t,e){return w(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ct(t,e){return Lt(t,e)||t.state.data!==void 0&&Z(t,e,e.refetchOnMount)}function Z(t,e,s){if(w(e.enabled,t)!==!1&&E(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&et(t,e)}return!1}function lt(t,e,s,i){return(t!==e||w(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&et(t,s)}function et(t,e){return w(e.enabled,t)!==!1&&t.isStaleByTime(E(e.staleTime,t))}function Ht(t,e){return!K(t.getCurrentResult(),e)}function ft(t){return{onFetch:(e,s)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[];let n={pages:[],pageParams:[]},h=0;const l=async()=>{let u=!1;const m=d=>{xt(d,()=>e.signal,()=>u=!0)},c=mt(e.options,e.fetchOptions),v=async(d,f,g)=>{if(u)return Promise.reject();if(f==null&&d.pages.length)return Promise.resolve(d);const C=(()=>{const G={client:e.client,queryKey:e.queryKey,pageParam:f,direction:g?"backward":"forward",meta:e.options.meta};return m(G),G})(),R=await c(C),{maxPages:F}=e.options,M=g?qt:It;return{pages:M(d.pages,R,F),pageParams:M(d.pageParams,f,F)}};if(r&&a.length){const d=r==="backward",f=d?Gt:dt,g={pages:a,pageParams:o},O=f(i,g);n=await v(g,O,d)}else{const d=t??a.length;do{const f=h===0?o[0]??i.initialPageParam:dt(i,n);if(h>0&&f==null)break;n=await v(n,f),h++}while(h<d)}return n};e.options.persister?e.fetchFn=()=>e.options.persister?.(l,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=l}}}function dt(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function Gt(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var Bt=class extends bt{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||St(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#i({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=gt({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#i({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const i=this.state.status==="pending",r=!this.#r.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const o=await this.options.onMutate?.(t,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:t,isPaused:r})}const a=await this.#r.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#i({type:"success",data:a}),a}catch(a){try{await this.#s.config.onError?.(a,t,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(a,t,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,a,t,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:a}),a}finally{this.#s.runNext(this)}}#i(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),p.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function St(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vt=class extends q{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,e,s){const i=new Bt({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#t.add(t);const e=_(t);if(typeof e=="string"){const s=this.#e.get(e);s?s.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=_(t);if(typeof e=="string"){const s=this.#e.get(e);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=_(t);if(typeof e=="string"){const i=this.#e.get(e)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const e=_(t);return typeof e=="string"?this.#e.get(e)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){p.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>nt(e,s))}findAll(t={}){return this.getAll().filter(e=>nt(t,e))}notify(t){p.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return p.batch(()=>Promise.all(t.map(e=>e.continue().catch(b))))}};function _(t){return t.options.scope?.id}var zt=class extends q{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),K(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&I(e.mutationKey)!==I(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){const t=this.#s?.state??St();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){p.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#e.variables,s=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#e)})})}},Wt=class extends q{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){const i=e.queryKey,r=e.queryHash??X(i,e);let a=this.get(r);return a||(a=new _t({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){p.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>rt(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>rt(t,s)):e}notify(t){p.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){p.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){p.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=class{#t;#e;#s;#r;#i;#a;#o;#n;constructor(t={}){this.#t=t.queryCache||new Wt,this.#e=t.mutationCache||new Vt,this.#s=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=tt.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#n=H.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#n?.(),this.#n=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#t.build(this,e),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(E(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:s})=>{const i=s.data;return[e,i]})}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),a=this.#t.get(i.queryHash)?.state.data,o=Qt(e,a);if(o!==void 0)return this.#t.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return p.batch(()=>this.#t.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;p.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#t;return p.batch(()=>(s.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},i=p.batch(()=>this.#t.findAll(t).map(r=>r.cancel(s)));return Promise.all(i).then(b).catch(b)}invalidateQueries(t,e={}){return p.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},i=p.batch(()=>this.#t.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let a=r.fetch(void 0,s);return s.throwOnError||(a=a.catch(b)),r.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(b)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#t.build(this,e);return s.isStaleByTime(E(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(b).catch(b)}fetchInfiniteQuery(t){return t.behavior=ft(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(b).catch(b)}ensureInfiniteQueryData(t){return t.behavior=ft(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return H.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(I(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(i=>{A(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,e){this.#i.set(I(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(i=>{A(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=X(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===L&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},wt=y.createContext(void 0),st=t=>{const e=y.useContext(wt);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Jt=({client:t,children:e})=>(y.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Q.jsx(wt.Provider,{value:t,children:e})),Ct=y.createContext(!1),Zt=()=>y.useContext(Ct);Ct.Provider;function Xt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Yt=y.createContext(Xt()),te=()=>y.useContext(Yt),ee=(t,e,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?Y(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},se=t=>{y.useEffect(()=>{t.clearReset()},[t])},ie=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||Y(s,[t.error,i])),re=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},ne=(t,e)=>t.isLoading&&t.isFetching&&!e,ae=(t,e)=>t?.suspense&&e.isPending,pt=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function oe(t,e,s){if(process.env.NODE_ENV!=="production"&&(typeof t!="object"||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const i=Zt(),r=te(),a=st(),o=a.defaultQueryOptions(t);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const n=a.getQueryCache().get(o.queryHash);process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=i?"isRestoring":"optimistic",re(o),ee(o,r,n),se(r);const h=!a.getQueryCache().get(o.queryHash),[l]=y.useState(()=>new e(a,o)),u=l.getOptimisticResult(o),m=!i&&t.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(c=>{const v=m?l.subscribe(p.batchCalls(c)):b;return l.updateResult(),v},[l,m]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(o)},[o,l]),ae(o,u))throw pt(o,l,r);if(ie({result:u,errorResetBoundary:r,throwOnError:o.throwOnError,query:n,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!D&&ne(u,i)&&(h?pt(o,l,r):n?.promise)?.catch(b).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function ue(t,e){return oe(t,Kt)}function he(t,e){const s=st(),[i]=y.useState(()=>new zt(s,t));y.useEffect(()=>{i.setOptions(t)},[i,t]);const r=y.useSyncExternalStore(y.useCallback(o=>i.subscribe(p.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=y.useCallback((o,n)=>{i.mutate(o,n).catch(b)},[i]);if(r.error&&Y(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:a,mutateAsync:r.mutate}}const ce=(t,e,s,i)=>({getData:t,addRecord:e,updateRecord:s,deleteRecord:i}),le=(t,e)=>({showSpinner:t,hideSpinner:e}),fe=(t,e)=>{const s={refresh:t};return e&&(s.forceUpdate=e),s},de=(t,e,s,i,r,a)=>{const o={selectRow:t,selectRows:e,clearSelection:s,selectAll:i,getSelectedRecords:r};return a&&(o.selectRowByRange=a),o},pe=(t,e)=>{const s={scrollToIndex:t};return e&&(s.goToPage=e),s},ye=(t,e,s)=>{const i={};return t&&(i.exportDataAsCsv=t),e&&(i.exportToExcel=e),s&&(i.print=s),i},me=({children:t,content:e,enabled:s=!0,delayDuration:i=300,side:r,align:a,className:o})=>!s||!e?Q.jsx(Q.Fragment,{children:t}):Q.jsx(N.TooltipProvider,{children:Q.jsxs(N.Tooltip,{delayDuration:i,children:[Q.jsx(N.TooltipTrigger,{asChild:!0,children:t}),Q.jsx(N.TooltipContent,{side:r,align:a,className:o,children:e})]})});exports.QueryClient=$t;exports.QueryClientProvider=Jt;exports.TooltipWrapper=me;exports.createCRUDMethods=ce;exports.createExportMethods=ye;exports.createNavigationMethods=pe;exports.createRefreshMethods=fe;exports.createSelectionMethods=de;exports.createSpinnerMethods=le;exports.useMutation=he;exports.useQuery=ue;exports.useQueryClient=st;
|
package/dist/avatar-BeK0E4mn.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as s from "react";
|
|
3
|
-
import { c as t } from "./useInitCoreServices-D1WaWlaI.js";
|
|
4
|
-
const f = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
ref: r,
|
|
8
|
-
className: t(
|
|
9
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
10
|
-
a
|
|
11
|
-
),
|
|
12
|
-
...e
|
|
13
|
-
}
|
|
14
|
-
));
|
|
15
|
-
f.displayName = "Avatar";
|
|
16
|
-
const o = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
17
|
-
"img",
|
|
18
|
-
{
|
|
19
|
-
ref: r,
|
|
20
|
-
className: t("aspect-square h-full w-full", a),
|
|
21
|
-
...e
|
|
22
|
-
}
|
|
23
|
-
));
|
|
24
|
-
o.displayName = "AvatarImage";
|
|
25
|
-
const c = s.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ l(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
ref: r,
|
|
29
|
-
className: t(
|
|
30
|
-
"flex h-full w-full items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",
|
|
31
|
-
a
|
|
32
|
-
),
|
|
33
|
-
...e
|
|
34
|
-
}
|
|
35
|
-
));
|
|
36
|
-
c.displayName = "AvatarFallback";
|
|
37
|
-
export {
|
|
38
|
-
f as A,
|
|
39
|
-
c as a,
|
|
40
|
-
o as b
|
|
41
|
-
};
|
package/dist/avatar-DZAaTK2f.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),u=require("react"),c=require("./useInitCoreServices-CwXv2p4S.cjs");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const l=f(u),s=l.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:c.cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));s.displayName="Avatar";const i=l.forwardRef(({className:e,...t},a)=>r.jsx("img",{ref:a,className:c.cn("aspect-square h-full w-full",e),...t}));i.displayName="AvatarImage";const o=l.forwardRef(({className:e,...t},a)=>r.jsx("div",{ref:a,className:c.cn("flex h-full w-full items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",e),...t}));o.displayName="AvatarFallback";exports.Avatar=s;exports.AvatarFallback=o;exports.AvatarImage=i;
|
package/dist/bell-DAz8P0BR.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { c as e } from "./EzErrorBoundary-D4NBadES.js";
|
|
2
|
-
const c = [
|
|
3
|
-
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
4
|
-
[
|
|
5
|
-
"path",
|
|
6
|
-
{
|
|
7
|
-
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
8
|
-
key: "11g9vi"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
], t = e("bell", c);
|
|
12
|
-
export {
|
|
13
|
-
t as B
|
|
14
|
-
};
|
package/dist/bell-DOX2y38e.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./EzErrorBoundary-CEdz_hDo.cjs");const c=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],t=e.createLucideIcon("bell",c);exports.Bell=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const f=require("./EzErrorBoundary-CEdz_hDo.cjs"),e=require("react/jsx-runtime"),u=require("react"),p=require("./useInitCoreServices-CwXv2p4S.cjs"),o=require("./tooltip-B41iztKT.cjs"),q=require("./chevron-left-HWhRo6IH.cjs"),B=require("./isBefore-Cp1ttk6q.cjs"),r=require("./index-B3ipEEhH.cjs");const F=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],I=f.createLucideIcon("trash-2",F);function z(n){return r.constructFrom(n,Date.now())}function W(n,i){return r.isSameDay(r.constructFrom(n,n),z(n))}function L({selected:n,onSelect:i,className:g,locale:a,minDate:h,modifiers:y={}}){const[s,l]=u.useState(new Date),v=()=>l(r.subMonths(s)),b=()=>l(r.addMonths(s,1)),j=r.startOfWeek(r.startOfMonth(s),{weekStartsOn:0}),N=r.endOfWeek(r.endOfMonth(s),{weekStartsOn:0}),w=r.eachDayOfInterval({start:j,end:N}),M=u.useMemo(()=>new Intl.DateTimeFormat(a,{month:"long",year:"numeric"}),[a]),T=u.useMemo(()=>new Intl.DateTimeFormat(a,{day:"numeric"}),[a]),D=["Su","Mo","Tu","We","Th","Fr","Sa"];return e.jsxs("div",{className:p.cn("p-4 bg-background text-foreground select-none",g),style:{minWidth:"280px"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[e.jsx("div",{className:"font-bold text-lg text-foreground",children:M.format(s)}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(o.Button,{variant:"ghost",size:"icon",onClick:v,className:"h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5",children:e.jsx(q.ChevronLeft,{className:"h-5 w-5"})}),e.jsx(o.Button,{variant:"ghost",size:"icon",onClick:b,className:"h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5",children:e.jsx(f.ChevronRight,{className:"h-5 w-5"})})]})]}),e.jsx("div",{className:"grid gap-0 mb-2",style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"},children:D.map((t,c)=>e.jsx("div",{className:"text-center text-[13px] text-muted-foreground/60 font-medium h-8 flex items-center justify-center",children:t},c))}),e.jsx("div",{className:"grid gap-y-1",style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"},children:w.map(t=>{const c=n&&r.isSameDay(t,n),k=r.isSameMonth(t,s),C=h?B.isBefore(t,r.startOfDay(h)):!1,S=t.toISOString().split("T")[0],d=y[S],O=d?.disabled,m=C||O,x=e.jsx("button",{onClick:()=>!m&&i&&i(t),disabled:m,className:p.cn("h-9 w-9 p-0 text-[14px] rounded-md flex items-center justify-center transition-all duration-150 relative","hover:bg-accent text-foreground",c?"bg-primary text-primary-foreground hover:bg-primary/90 font-bold shadow-sm z-10":"",!k&&"text-muted-foreground/30",W(t)&&!c&&"text-primary font-bold border-b-2 border-primary rounded-none",m&&"opacity-50 cursor-not-allowed hover:bg-transparent text-muted-foreground",d?.className),children:e.jsx("time",{dateTime:t.toISOString(),children:T.format(t)})});return e.jsx("div",{className:"flex items-center justify-center",children:d?.tooltip?e.jsx(o.TooltipProvider,{children:e.jsxs(o.Tooltip,{delayDuration:300,children:[e.jsx(o.TooltipTrigger,{asChild:!0,children:e.jsx("span",{className:"cursor-default",children:x})}),e.jsx(o.TooltipContent,{className:"text-xs font-semibold px-2 py-1",children:d.tooltip})]})}):x},t.toString())})}),e.jsx("div",{className:"mt-2 pt-2 border-t border-border/30 flex justify-center",children:e.jsx(o.Button,{variant:"ghost",className:"text-primary font-bold hover:bg-primary/5 w-full h-10 text-[15px]",onClick:()=>{const t=new Date;l(t),i&&i(t)},children:"Today"})})]})}exports.Calendar=L;exports.Trash2=I;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { c as I, C as B } from "./EzErrorBoundary-D4NBadES.js";
|
|
2
|
-
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { useState as W, useMemo as u } from "react";
|
|
4
|
-
import { c as f } from "./useInitCoreServices-D1WaWlaI.js";
|
|
5
|
-
import { B as l, T as z, b as L, d as V, e as _ } from "./tooltip-BCtrEe0z.js";
|
|
6
|
-
import { C as H } from "./chevron-left-BFr8XZyF.js";
|
|
7
|
-
import { i as K } from "./isBefore-C3Y_wbk3.js";
|
|
8
|
-
import { c as g, i as x, s as P, a as R, e as q, b as A, d as E, g as G, h as J, j as Q, k as U } from "./index-C6NfgycP.js";
|
|
9
|
-
const X = [
|
|
10
|
-
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
11
|
-
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
12
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
13
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
14
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
15
|
-
], it = I("trash-2", X);
|
|
16
|
-
function Y(r) {
|
|
17
|
-
return g(r, Date.now());
|
|
18
|
-
}
|
|
19
|
-
function Z(r, a) {
|
|
20
|
-
return x(
|
|
21
|
-
g(r, r),
|
|
22
|
-
Y(r)
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
function dt({ selected: r, onSelect: a, className: y, locale: n, minDate: h, modifiers: b = {} }) {
|
|
26
|
-
const [o, c] = W(/* @__PURE__ */ new Date()), v = () => c(Q(o)), N = () => c(U(o, 1)), w = P(R(o), { weekStartsOn: 0 }), M = q(A(o), { weekStartsOn: 0 }), T = E({ start: w, end: M }), k = u(() => new Intl.DateTimeFormat(n, { month: "long", year: "numeric" }), [n]), C = u(() => new Intl.DateTimeFormat(n, { day: "numeric" }), [n]), D = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
27
|
-
return /* @__PURE__ */ d("div", { className: f("p-4 bg-background text-foreground select-none", y), style: { minWidth: "280px" }, children: [
|
|
28
|
-
/* @__PURE__ */ d("div", { className: "flex items-center justify-between mb-4 px-1", children: [
|
|
29
|
-
/* @__PURE__ */ t("div", { className: "font-bold text-lg text-foreground", children: k.format(o) }),
|
|
30
|
-
/* @__PURE__ */ d("div", { className: "flex gap-1", children: [
|
|
31
|
-
/* @__PURE__ */ t(l, { variant: "ghost", size: "icon", onClick: v, className: "h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5", children: /* @__PURE__ */ t(H, { className: "h-5 w-5" }) }),
|
|
32
|
-
/* @__PURE__ */ t(l, { variant: "ghost", size: "icon", onClick: N, className: "h-8 w-8 text-muted-foreground hover:text-primary hover:bg-primary/5", children: /* @__PURE__ */ t(B, { className: "h-5 w-5" }) })
|
|
33
|
-
] })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ t(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: "grid gap-0 mb-2",
|
|
39
|
-
style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)" },
|
|
40
|
-
children: D.map((e, s) => /* @__PURE__ */ t("div", { className: "text-center text-[13px] text-muted-foreground/60 font-medium h-8 flex items-center justify-center", children: e }, s))
|
|
41
|
-
}
|
|
42
|
-
),
|
|
43
|
-
/* @__PURE__ */ t(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: "grid gap-y-1",
|
|
47
|
-
style: { display: "grid", gridTemplateColumns: "repeat(7, 1fr)" },
|
|
48
|
-
children: T.map((e) => {
|
|
49
|
-
const s = r && x(e, r), j = G(e, o), O = h ? K(e, J(h)) : !1, S = e.toISOString().split("T")[0], i = b[S], F = i?.disabled, m = O || F, p = /* @__PURE__ */ t(
|
|
50
|
-
"button",
|
|
51
|
-
{
|
|
52
|
-
onClick: () => !m && a && a(e),
|
|
53
|
-
disabled: m,
|
|
54
|
-
className: f(
|
|
55
|
-
"h-9 w-9 p-0 text-[14px] rounded-md flex items-center justify-center transition-all duration-150 relative",
|
|
56
|
-
"hover:bg-accent text-foreground",
|
|
57
|
-
s ? "bg-primary text-primary-foreground hover:bg-primary/90 font-bold shadow-sm z-10" : "",
|
|
58
|
-
!j && "text-muted-foreground/30",
|
|
59
|
-
Z(e) && !s && "text-primary font-bold border-b-2 border-primary rounded-none",
|
|
60
|
-
m && "opacity-50 cursor-not-allowed hover:bg-transparent text-muted-foreground",
|
|
61
|
-
i?.className
|
|
62
|
-
),
|
|
63
|
-
children: /* @__PURE__ */ t("time", { dateTime: e.toISOString(), children: C.format(e) })
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
return /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: i?.tooltip ? /* @__PURE__ */ t(z, { children: /* @__PURE__ */ d(L, { delayDuration: 300, children: [
|
|
67
|
-
/* @__PURE__ */ t(V, { asChild: !0, children: /* @__PURE__ */ t("span", { className: "cursor-default", children: p }) }),
|
|
68
|
-
/* @__PURE__ */ t(_, { className: "text-xs font-semibold px-2 py-1", children: i.tooltip })
|
|
69
|
-
] }) }) : p }, e.toString());
|
|
70
|
-
})
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
/* @__PURE__ */ t("div", { className: "mt-2 pt-2 border-t border-border/30 flex justify-center", children: /* @__PURE__ */ t(
|
|
74
|
-
l,
|
|
75
|
-
{
|
|
76
|
-
variant: "ghost",
|
|
77
|
-
className: "text-primary font-bold hover:bg-primary/5 w-full h-10 text-[15px]",
|
|
78
|
-
onClick: () => {
|
|
79
|
-
const e = /* @__PURE__ */ new Date();
|
|
80
|
-
c(e), a && a(e);
|
|
81
|
-
},
|
|
82
|
-
children: "Today"
|
|
83
|
-
}
|
|
84
|
-
) })
|
|
85
|
-
] });
|
|
86
|
-
}
|
|
87
|
-
export {
|
|
88
|
-
dt as C,
|
|
89
|
-
it as T
|
|
90
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const a=require("./EzErrorBoundary-CEdz_hDo.cjs"),u=require("react/jsx-runtime"),l=require("react"),f=require("./useInitCoreServices-CwXv2p4S.cjs");function b(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const i=b(l);const k=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],h=a.createLucideIcon("funnel",k);const p=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],z=a.createLucideIcon("plus",p),o=i.forwardRef(({className:t,checked:e,onCheckedChange:n,...c},s)=>{const r=i.useRef(null);return i.useImperativeHandle(s,()=>r.current),i.useEffect(()=>{r.current&&(r.current.indeterminate=e==="indeterminate")},[e]),u.jsx("input",{type:"checkbox",className:f.cn("peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900","accent-zinc-900 dark:accent-zinc-50",t),ref:r,checked:e==="indeterminate"?!1:e,onChange:d=>{n?.(d.target.checked)},...c})});o.displayName="Checkbox";exports.Checkbox=o;exports.Funnel=h;exports.Plus=z;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { c } from "./EzErrorBoundary-D4NBadES.js";
|
|
2
|
-
import { jsx as d } from "react/jsx-runtime";
|
|
3
|
-
import * as t from "react";
|
|
4
|
-
import { c as f } from "./useInitCoreServices-D1WaWlaI.js";
|
|
5
|
-
const l = [
|
|
6
|
-
[
|
|
7
|
-
"path",
|
|
8
|
-
{
|
|
9
|
-
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
10
|
-
key: "sc7q7i"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
], p = c("funnel", l);
|
|
14
|
-
const u = [
|
|
15
|
-
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
16
|
-
["path", { d: "M12 5v14", key: "s699le" }]
|
|
17
|
-
], z = c("plus", u), b = t.forwardRef(
|
|
18
|
-
({ className: r, checked: e, onCheckedChange: i, ...a }, s) => {
|
|
19
|
-
const n = t.useRef(null);
|
|
20
|
-
return t.useImperativeHandle(s, () => n.current), t.useEffect(() => {
|
|
21
|
-
n.current && (n.current.indeterminate = e === "indeterminate");
|
|
22
|
-
}, [e]), /* @__PURE__ */ d(
|
|
23
|
-
"input",
|
|
24
|
-
{
|
|
25
|
-
type: "checkbox",
|
|
26
|
-
className: f(
|
|
27
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-zinc-200 border-zinc-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-zinc-900 data-[state=checked]:text-zinc-50 dark:border-zinc-800 dark:border-zinc-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 dark:data-[state=checked]:bg-zinc-50 dark:data-[state=checked]:text-zinc-900",
|
|
28
|
-
"accent-zinc-900 dark:accent-zinc-50",
|
|
29
|
-
r
|
|
30
|
-
),
|
|
31
|
-
ref: n,
|
|
32
|
-
checked: e === "indeterminate" ? !1 : e,
|
|
33
|
-
onChange: (o) => {
|
|
34
|
-
i?.(o.target.checked);
|
|
35
|
-
},
|
|
36
|
-
...a
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
b.displayName = "Checkbox";
|
|
42
|
-
export {
|
|
43
|
-
b as C,
|
|
44
|
-
p as F,
|
|
45
|
-
z as P
|
|
46
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./EzErrorBoundary-CEdz_hDo.cjs");const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],r=o.createLucideIcon("chevron-down",n);exports.ChevronDown=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./EzErrorBoundary-CEdz_hDo.cjs");const o=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],r=e.createLucideIcon("chevron-left",o);exports.ChevronLeft=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./EzErrorBoundary-CEdz_hDo.cjs");const c=[["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"}]],r=e.createLucideIcon("circle-alert",c);exports.CircleAlert=r;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { c as e } from "./EzErrorBoundary-D4NBadES.js";
|
|
2
|
-
const c = [
|
|
3
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
5
|
-
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
6
|
-
], y = e("circle-alert", c);
|
|
7
|
-
export {
|
|
8
|
-
y as C
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { c } from "./EzErrorBoundary-D4NBadES.js";
|
|
2
|
-
const e = [
|
|
3
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4
|
-
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
5
|
-
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
6
|
-
], o = c("circle-x", e);
|
|
7
|
-
export {
|
|
8
|
-
o as C
|
|
9
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("./EzErrorBoundary-CEdz_hDo.cjs");const e=[["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"}]],r=c.createLucideIcon("circle-x",e);exports.CircleX=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const A=require("./EzErrorBoundary-CEdz_hDo.cjs"),m=require("react/jsx-runtime"),Y=require("react"),N=require("./useInitCoreServices-CwXv2p4S.cjs"),z=require("./calendar-BMZ8ddOf.cjs"),Q=require("./popover-BJq1CKmi.cjs"),a=require("./index-B3ipEEhH.cjs"),V=require("./tooltip-B41iztKT.cjs"),Z=require("./isBefore-Cp1ttk6q.cjs");const K=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],$=A.createLucideIcon("paperclip",K);function U(){return Object.assign({},a.getDefaultOptions())}function J(s,e){const r=a.toDate(s,e?.in).getDay();return r===0?7:r}function S(s,e){const r=ee(e)?new e(0):a.constructFrom(e,0);return r.setFullYear(s.getFullYear(),s.getMonth(),s.getDate()),r.setHours(s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),r}function ee(s){return typeof s=="function"&&s.prototype?.constructor===s}const te=10;class W{subPriority=0;validate(e,r){return!0}}class re extends W{constructor(e,r,t,n,o){super(),this.value=e,this.validateValue=r,this.setValue=t,this.priority=n,o&&(this.subPriority=o)}validate(e,r){return this.validateValue(e,this.value,r)}set(e,r,t){return this.setValue(e,r,this.value,t)}}class se extends W{priority=te;subPriority=-1;constructor(e,r){super(),this.context=e||(t=>a.constructFrom(r,t))}set(e,r){return r.timestampIsSet?e:a.constructFrom(e,S(e,this.context))}}class u{run(e,r,t,n){const o=this.parse(e,r,t,n);return o?{setter:new re(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,r,t){return!0}}class ne extends u{priority=140;parse(e,r,t){switch(r){case"G":case"GG":case"GGG":return t.era(e,{width:"abbreviated"})||t.era(e,{width:"narrow"});case"GGGGG":return t.era(e,{width:"narrow"});default:return t.era(e,{width:"wide"})||t.era(e,{width:"abbreviated"})||t.era(e,{width:"narrow"})}}set(e,r,t){return r.era=t,e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const p={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},M={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function x(s,e){return s&&{value:e(s.value),rest:s.rest}}function f(s,e){const r=e.match(s);return r?{value:parseInt(r[0],10),rest:e.slice(r[0].length)}:null}function O(s,e){const r=e.match(s);if(!r)return null;if(r[0]==="Z")return{value:0,rest:e.slice(1)};const t=r[1]==="+"?1:-1,n=r[2]?parseInt(r[2],10):0,o=r[3]?parseInt(r[3],10):0,d=r[5]?parseInt(r[5],10):0;return{value:t*(n*a.millisecondsInHour+o*a.millisecondsInMinute+d*a.millisecondsInSecond),rest:e.slice(r[0].length)}}function j(s){return f(p.anyDigitsSigned,s)}function h(s,e){switch(s){case 1:return f(p.singleDigit,e);case 2:return f(p.twoDigits,e);case 3:return f(p.threeDigits,e);case 4:return f(p.fourDigits,e);default:return f(new RegExp("^\\d{1,"+s+"}"),e)}}function L(s,e){switch(s){case 1:return f(p.singleDigitSigned,e);case 2:return f(p.twoDigitsSigned,e);case 3:return f(p.threeDigitsSigned,e);case 4:return f(p.fourDigitsSigned,e);default:return f(new RegExp("^-?\\d{1,"+s+"}"),e)}}function R(s){switch(s){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function B(s,e){const r=e>0,t=r?e:1-e;let n;if(t<=50)n=s||100;else{const o=t+50,d=Math.trunc(o/100)*100,y=s>=o%100;n=s+d-(y?100:0)}return r?n:1-n}function G(s){return s%400===0||s%4===0&&s%100!==0}class oe extends u{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,r,t){const n=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return x(h(4,e),n);case"yo":return x(t.ordinalNumber(e,{unit:"year"}),n);default:return x(h(r.length,e),n)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,t){const n=e.getFullYear();if(t.isTwoDigitYear){const d=B(t.year,n);return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}const o=!("era"in r)||r.era===1?t.year:1-t.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class ae extends u{priority=130;parse(e,r,t){const n=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return x(h(4,e),n);case"Yo":return x(t.ordinalNumber(e,{unit:"year"}),n);default:return x(h(r.length,e),n)}}validate(e,r){return r.isTwoDigitYear||r.year>0}set(e,r,t,n){const o=a.getWeekYear(e,n);if(t.isTwoDigitYear){const y=B(t.year,o);return e.setFullYear(y,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),a.startOfWeek(e,n)}const d=!("era"in r)||r.era===1?t.year:1-t.year;return e.setFullYear(d,0,n.firstWeekContainsDate),e.setHours(0,0,0,0),a.startOfWeek(e,n)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ie extends u{priority=130;parse(e,r){return L(r==="R"?4:r.length,e)}set(e,r,t){const n=a.constructFrom(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),a.startOfISOWeek(n)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class ce extends u{priority=130;parse(e,r){return L(r==="u"?4:r.length,e)}set(e,r,t){return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class ue extends u{priority=120;parse(e,r,t){switch(r){case"Q":case"QQ":return h(r.length,e);case"Qo":return t.ordinalNumber(e,{unit:"quarter"});case"QQQ":return t.quarter(e,{width:"abbreviated",context:"formatting"})||t.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return t.quarter(e,{width:"narrow",context:"formatting"});default:return t.quarter(e,{width:"wide",context:"formatting"})||t.quarter(e,{width:"abbreviated",context:"formatting"})||t.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=1&&r<=4}set(e,r,t){return e.setMonth((t-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class le extends u{priority=120;parse(e,r,t){switch(r){case"q":case"qq":return h(r.length,e);case"qo":return t.ordinalNumber(e,{unit:"quarter"});case"qqq":return t.quarter(e,{width:"abbreviated",context:"standalone"})||t.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return t.quarter(e,{width:"narrow",context:"standalone"});default:return t.quarter(e,{width:"wide",context:"standalone"})||t.quarter(e,{width:"abbreviated",context:"standalone"})||t.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=1&&r<=4}set(e,r,t){return e.setMonth((t-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class de extends u{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,r,t){const n=o=>o-1;switch(r){case"M":return x(f(p.month,e),n);case"MM":return x(h(2,e),n);case"Mo":return x(t.ordinalNumber(e,{unit:"month"}),n);case"MMM":return t.month(e,{width:"abbreviated",context:"formatting"})||t.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return t.month(e,{width:"narrow",context:"formatting"});default:return t.month(e,{width:"wide",context:"formatting"})||t.month(e,{width:"abbreviated",context:"formatting"})||t.month(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=11}set(e,r,t){return e.setMonth(t,1),e.setHours(0,0,0,0),e}}class we extends u{priority=110;parse(e,r,t){const n=o=>o-1;switch(r){case"L":return x(f(p.month,e),n);case"LL":return x(h(2,e),n);case"Lo":return x(t.ordinalNumber(e,{unit:"month"}),n);case"LLL":return t.month(e,{width:"abbreviated",context:"standalone"})||t.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return t.month(e,{width:"narrow",context:"standalone"});default:return t.month(e,{width:"wide",context:"standalone"})||t.month(e,{width:"abbreviated",context:"standalone"})||t.month(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=11}set(e,r,t){return e.setMonth(t,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function fe(s,e,r){const t=a.toDate(s,r?.in),n=a.getWeek(t,r)-e;return t.setDate(t.getDate()-n*7),a.toDate(t,r?.in)}class he extends u{priority=100;parse(e,r,t){switch(r){case"w":return f(p.week,e);case"wo":return t.ordinalNumber(e,{unit:"week"});default:return h(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,t,n){return a.startOfWeek(fe(e,t,n),n)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function pe(s,e,r){const t=a.toDate(s,r?.in),n=a.getISOWeek(t,r)-e;return t.setDate(t.getDate()-n*7),t}class xe extends u{priority=100;parse(e,r,t){switch(r){case"I":return f(p.week,e);case"Io":return t.ordinalNumber(e,{unit:"week"});default:return h(r.length,e)}}validate(e,r){return r>=1&&r<=53}set(e,r,t){return a.startOfISOWeek(pe(e,t))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const me=[31,28,31,30,31,30,31,31,30,31,30,31],ye=[31,29,31,30,31,30,31,31,30,31,30,31];class be extends u{priority=90;subPriority=1;parse(e,r,t){switch(r){case"d":return f(p.date,e);case"do":return t.ordinalNumber(e,{unit:"date"});default:return h(r.length,e)}}validate(e,r){const t=e.getFullYear(),n=G(t),o=e.getMonth();return n?r>=1&&r<=ye[o]:r>=1&&r<=me[o]}set(e,r,t){return e.setDate(t),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class ge extends u{priority=90;subpriority=1;parse(e,r,t){switch(r){case"D":case"DD":return f(p.dayOfYear,e);case"Do":return t.ordinalNumber(e,{unit:"date"});default:return h(r.length,e)}}validate(e,r){const t=e.getFullYear();return G(t)?r>=1&&r<=366:r>=1&&r<=365}set(e,r,t){return e.setMonth(0,t),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function F(s,e,r){const t=a.getDefaultOptions(),n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,o=a.toDate(s,r?.in),d=o.getDay(),k=(e%7+7)%7,g=7-n,T=e<0||e>6?e-(d+g)%7:(k+g)%7-(d+g)%7;return a.addDays(o,T,r)}class Te extends u{priority=90;parse(e,r,t){switch(r){case"E":case"EE":case"EEE":return t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return t.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"});default:return t.day(e,{width:"wide",context:"formatting"})||t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,t,n){return e=F(e,t,n),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class De extends u{priority=90;parse(e,r,t,n){const o=d=>{const y=Math.floor((d-1)/7)*7;return(d+n.weekStartsOn+6)%7+y};switch(r){case"e":case"ee":return x(h(r.length,e),o);case"eo":return x(t.ordinalNumber(e,{unit:"day"}),o);case"eee":return t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"});case"eeeee":return t.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"});default:return t.day(e,{width:"wide",context:"formatting"})||t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"})}}validate(e,r){return r>=0&&r<=6}set(e,r,t,n){return e=F(e,t,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Pe extends u{priority=90;parse(e,r,t,n){const o=d=>{const y=Math.floor((d-1)/7)*7;return(d+n.weekStartsOn+6)%7+y};switch(r){case"c":case"cc":return x(h(r.length,e),o);case"co":return x(t.ordinalNumber(e,{unit:"day"}),o);case"ccc":return t.day(e,{width:"abbreviated",context:"standalone"})||t.day(e,{width:"short",context:"standalone"})||t.day(e,{width:"narrow",context:"standalone"});case"ccccc":return t.day(e,{width:"narrow",context:"standalone"});case"cccccc":return t.day(e,{width:"short",context:"standalone"})||t.day(e,{width:"narrow",context:"standalone"});default:return t.day(e,{width:"wide",context:"standalone"})||t.day(e,{width:"abbreviated",context:"standalone"})||t.day(e,{width:"short",context:"standalone"})||t.day(e,{width:"narrow",context:"standalone"})}}validate(e,r){return r>=0&&r<=6}set(e,r,t,n){return e=F(e,t,n),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function ke(s,e,r){const t=a.toDate(s,r?.in),n=J(t,r),o=e-n;return a.addDays(t,o,r)}class Me extends u{priority=90;parse(e,r,t){const n=o=>o===0?7:o;switch(r){case"i":case"ii":return h(r.length,e);case"io":return t.ordinalNumber(e,{unit:"day"});case"iii":return x(t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"}),n);case"iiiii":return x(t.day(e,{width:"narrow",context:"formatting"}),n);case"iiiiii":return x(t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"}),n);default:return x(t.day(e,{width:"wide",context:"formatting"})||t.day(e,{width:"abbreviated",context:"formatting"})||t.day(e,{width:"short",context:"formatting"})||t.day(e,{width:"narrow",context:"formatting"}),n)}}validate(e,r){return r>=1&&r<=7}set(e,r,t){return e=ke(e,t),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Oe extends u{priority=80;parse(e,r,t){switch(r){case"a":case"aa":case"aaa":return t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return t.dayPeriod(e,{width:"narrow",context:"formatting"});default:return t.dayPeriod(e,{width:"wide",context:"formatting"})||t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,t){return e.setHours(R(t),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class _e extends u{priority=80;parse(e,r,t){switch(r){case"b":case"bb":case"bbb":return t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return t.dayPeriod(e,{width:"narrow",context:"formatting"});default:return t.dayPeriod(e,{width:"wide",context:"formatting"})||t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,t){return e.setHours(R(t),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class Ye extends u{priority=80;parse(e,r,t){switch(r){case"B":case"BB":case"BBB":return t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return t.dayPeriod(e,{width:"narrow",context:"formatting"});default:return t.dayPeriod(e,{width:"wide",context:"formatting"})||t.dayPeriod(e,{width:"abbreviated",context:"formatting"})||t.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,r,t){return e.setHours(R(t),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class He extends u{priority=70;parse(e,r,t){switch(r){case"h":return f(p.hour12h,e);case"ho":return t.ordinalNumber(e,{unit:"hour"});default:return h(r.length,e)}}validate(e,r){return r>=1&&r<=12}set(e,r,t){const n=e.getHours()>=12;return n&&t<12?e.setHours(t+12,0,0,0):!n&&t===12?e.setHours(0,0,0,0):e.setHours(t,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class Ie extends u{priority=70;parse(e,r,t){switch(r){case"H":return f(p.hour23h,e);case"Ho":return t.ordinalNumber(e,{unit:"hour"});default:return h(r.length,e)}}validate(e,r){return r>=0&&r<=23}set(e,r,t){return e.setHours(t,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class ve extends u{priority=70;parse(e,r,t){switch(r){case"K":return f(p.hour11h,e);case"Ko":return t.ordinalNumber(e,{unit:"hour"});default:return h(r.length,e)}}validate(e,r){return r>=0&&r<=11}set(e,r,t){return e.getHours()>=12&&t<12?e.setHours(t+12,0,0,0):e.setHours(t,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class qe extends u{priority=70;parse(e,r,t){switch(r){case"k":return f(p.hour24h,e);case"ko":return t.ordinalNumber(e,{unit:"hour"});default:return h(r.length,e)}}validate(e,r){return r>=1&&r<=24}set(e,r,t){const n=t<=24?t%24:t;return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class Ee extends u{priority=60;parse(e,r,t){switch(r){case"m":return f(p.minute,e);case"mo":return t.ordinalNumber(e,{unit:"minute"});default:return h(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,t){return e.setMinutes(t,0,0),e}incompatibleTokens=["t","T"]}class Ne extends u{priority=50;parse(e,r,t){switch(r){case"s":return f(p.second,e);case"so":return t.ordinalNumber(e,{unit:"second"});default:return h(r.length,e)}}validate(e,r){return r>=0&&r<=59}set(e,r,t){return e.setSeconds(t,0),e}incompatibleTokens=["t","T"]}class Le extends u{priority=30;parse(e,r){const t=n=>Math.trunc(n*Math.pow(10,-r.length+3));return x(h(r.length,e),t)}set(e,r,t){return e.setMilliseconds(t),e}incompatibleTokens=["t","T"]}class Ce extends u{priority=10;parse(e,r){switch(r){case"X":return O(M.basicOptionalMinutes,e);case"XX":return O(M.basic,e);case"XXXX":return O(M.basicOptionalSeconds,e);case"XXXXX":return O(M.extendedOptionalSeconds,e);default:return O(M.extended,e)}}set(e,r,t){return r.timestampIsSet?e:a.constructFrom(e,e.getTime()-a.getTimezoneOffsetInMilliseconds(e)-t)}incompatibleTokens=["t","T","x"]}class Qe extends u{priority=10;parse(e,r){switch(r){case"x":return O(M.basicOptionalMinutes,e);case"xx":return O(M.basic,e);case"xxxx":return O(M.basicOptionalSeconds,e);case"xxxxx":return O(M.extendedOptionalSeconds,e);default:return O(M.extended,e)}}set(e,r,t){return r.timestampIsSet?e:a.constructFrom(e,e.getTime()-a.getTimezoneOffsetInMilliseconds(e)-t)}incompatibleTokens=["t","T","X"]}class Re extends u{priority=40;parse(e){return j(e)}set(e,r,t){return[a.constructFrom(e,t*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Fe extends u{priority=20;parse(e){return j(e)}set(e,r,t){return[a.constructFrom(e,t),{timestampIsSet:!0}]}incompatibleTokens="*"}const We={G:new ne,y:new oe,Y:new ae,R:new ie,u:new ce,Q:new ue,q:new le,M:new de,L:new we,w:new he,I:new xe,d:new be,D:new ge,E:new Te,e:new De,c:new Pe,i:new Me,a:new Oe,b:new _e,B:new Ye,h:new He,H:new Ie,K:new ve,k:new qe,m:new Ee,s:new Ne,S:new Le,X:new Ce,x:new Qe,t:new Re,T:new Fe},je=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ge=/^'([^]*?)'?$/,Xe=/''/g,Ae=/\S/,ze=/[a-zA-Z]/;function Ve(s,e,r,t){const n=()=>a.constructFrom(r,NaN),o=U(),d=o.locale??a.enUS,y=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,k=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,g={firstWeekContainsDate:y,weekStartsOn:k,locale:d},T=[new se(t?.in,r)],C=e.match(Be).map(c=>{const w=c[0];if(w in a.longFormatters){const D=a.longFormatters[w];return D(c,d.formatLong)}return c}).join("").match(je),H=[];for(let c of C){a.isProtectedWeekYearToken(c)&&a.warnOrThrowProtectedError(c,e,s),a.isProtectedDayOfYearToken(c)&&a.warnOrThrowProtectedError(c,e,s);const w=c[0],D=We[w];if(D){const{incompatibleTokens:q}=D;if(Array.isArray(q)){const i=H.find(l=>q.includes(l.token)||l.token===w);if(i)throw new RangeError(`The format string mustn't contain \`${i.fullToken}\` and \`${c}\` at the same time`)}else if(D.incompatibleTokens==="*"&&H.length>0)throw new RangeError(`The format string mustn't contain \`${c}\` and any other token at the same time`);H.push({token:w,fullToken:c});const _=D.run(s,c,d.match,g);if(!_)return n();T.push(_.setter),s=_.rest}else{if(w.match(ze))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(c==="''"?c="'":w==="'"&&(c=Ze(c)),s.indexOf(c)===0)s=s.slice(c.length);else return n()}}if(s.length>0&&Ae.test(s))return n();const v=T.map(c=>c.priority).sort((c,w)=>w-c).filter((c,w,D)=>D.indexOf(c)===w).map(c=>T.filter(w=>w.priority===c).sort((w,D)=>D.subPriority-w.subPriority)).map(c=>c[0]);let P=a.toDate(r,t?.in);if(isNaN(+P))return n();const I={};for(const c of v){if(!c.validate(P,g))return n();const w=c.set(P,I,g);Array.isArray(w)?(P=w[0],Object.assign(I,w[1])):P=w}return P}function Ze(s){return s.match(Ge)[1].replace(Xe,"'")}function Ke({date:s,setDate:e,disabled:r,id:t,locale:n,className:o,mode:d="datetime",minDate:y}){const[k,g]=Y.useState(!1),[T,C]=Y.useState("date"),[H,v]=Y.useState(""),P=Y.useRef(null),I=d==="datetime"?"M/d/yy h:mm a":"M/d/yy";Y.useEffect(()=>{s&&a.isValid(s)?v(a.format(s,I)):v("")},[s,I]);const c=i=>{const l=i.target.value;v(l);const b=Ve(l,I,new Date);a.isValid(b)&&e(b)},w=i=>{if(!i){e(void 0);return}const l=s||new Date,b=new Date(i);d==="datetime"?(b.setHours(l.getHours()),b.setMinutes(l.getMinutes())):(b.setHours(0),b.setMinutes(0)),e(b),g(!1)},D=(i,l)=>{const b=s||new Date,E=new Date(b);E.setHours(i),E.setMinutes(l),e(E),g(!1)},q=(i,l)=>{i.preventDefault(),i.stopPropagation(),k&&T===l?g(!1):(C(l),g(!0))},_=Y.useMemo(()=>{const i=[];let l=a.startOfDay(new Date);for(let b=0;b<48;b++)i.push({label:a.format(l,"h:mm a"),hh:l.getHours(),mm:l.getMinutes()}),l=a.addMinutes(l,30);return y&&s&&a.isSameDay(s,y)?i.filter(b=>{const E=b.hh*60+b.mm,X=y.getHours()*60+y.getMinutes();return E>X}):i},[s,y]);return Y.useEffect(()=>{if(k&&T==="time"&&P.current&&s){const i=_.findIndex(l=>l.hh===s.getHours()&&l.mm===(s.getMinutes()>=30?30:0));if(i!==-1){const l=P.current.children[i];l&&(P.current.scrollTop=l.offsetTop-80)}}},[k,T,s,_]),m.jsxs(Q.Popover,{open:k,onOpenChange:g,children:[m.jsx(Q.PopoverTrigger,{asChild:!0,children:m.jsxs("div",{className:N.cn("group flex items-center w-full h-10 rounded-md border border-slate-200 bg-background transition-all focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",r&&"opacity-50 cursor-not-allowed",o),children:[m.jsx("input",{id:t,className:"flex-1 min-w-0 h-full px-3 bg-transparent text-sm font-medium outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",value:H,onChange:c,placeholder:d==="datetime"?"M/D/YY H:MM AM":"M/D/YY",disabled:r,autoComplete:"off"}),H&&!r&&m.jsx("button",{type:"button",onClick:i=>{i.preventDefault(),i.stopPropagation(),e(void 0)},onPointerDown:i=>i.stopPropagation(),className:"h-full px-2 text-slate-400 hover:text-slate-600 transition-colors",children:m.jsx(V.X,{className:"w-4 h-4"})}),m.jsx("div",{className:"h-6 w-[1px] bg-slate-200"}),m.jsx("button",{type:"button",onClick:i=>q(i,"date"),onPointerDown:i=>i.stopPropagation(),disabled:r,className:N.cn("h-full px-3 flex items-center justify-center text-slate-500 hover:bg-slate-50 transition-colors",T==="date"&&k&&"text-primary"),children:m.jsx(Z.Calendar,{className:"w-4 h-4"})}),d==="datetime"&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"h-6 w-[1px] bg-slate-200"}),m.jsx("button",{type:"button",onClick:i=>q(i,"time"),onPointerDown:i=>i.stopPropagation(),disabled:r,className:N.cn("h-full px-3 flex items-center justify-center text-slate-500 hover:bg-slate-50 transition-colors rounded-r-md",T==="time"&&k&&"text-primary"),children:m.jsx(a.Clock,{className:"w-4 h-4"})})]})]})}),m.jsx(Q.PopoverContent,{className:"w-auto p-0 shadow-xl border border-border bg-popover text-popover-foreground overflow-hidden animate-in fade-in zoom-in-95 duration-150",style:{zIndex:11e3,maxWidth:"300px",width:"auto"},align:"start",sideOffset:4,children:T==="date"?m.jsx(z.Calendar,{selected:s,onSelect:w,locale:n,minDate:y}):m.jsx("div",{ref:P,className:"w-[180px] overflow-y-auto py-1 custom-scrollbar",style:{height:"363px"},children:_.map(i=>{const l=s&&s.getHours()===i.hh&&s.getMinutes()===i.mm;return m.jsx("button",{type:"button",onClick:()=>D(i.hh,i.mm),className:N.cn("w-full text-left px-4 py-2.5 text-[14px] transition-colors",l?"bg-primary text-white font-bold":"text-slate-700 hover:bg-primary/5 hover:text-primary"),children:i.label},i.label)})})})]})}exports.DateTimePicker=Ke;exports.Paperclip=$;
|