@hot-updater/console 1.0.0-rc.0 → 1.0.0-rc.2
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/.output/nitro.json +1 -1
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +1 -0
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +1 -0
- package/.output/public/assets/api-keys-BzKocqRy.js +1 -0
- package/.output/public/assets/api-keys-api-BHcODB7q.js +1 -0
- package/.output/public/assets/card-Dhr_eFYj.js +1 -0
- package/.output/public/assets/{chart-no-axes-combined-FaYMGmQS.js → chart-no-axes-combined-Dy4WJv2U.js} +1 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +1 -0
- package/.output/public/assets/createServerFn-CA8fs7QD.js +3 -0
- package/.output/public/assets/dialog-CUTrcPlB.js +1 -0
- package/.output/public/assets/{dist-DspNKfMj.js → dist-C_NydL0e.js} +1 -1
- package/.output/public/assets/index-DdAz-CXv.js +10 -0
- package/.output/public/assets/input-group-cSOG4wh_.js +1 -0
- package/.output/public/assets/insights-C0PBSZ-n.js +1 -0
- package/.output/public/assets/installations-CE33wgbY.js +2 -0
- package/.output/public/assets/installations-CStZja8x.js +1 -0
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +1 -0
- package/.output/public/assets/link-CI8idAUi.js +1 -0
- package/.output/public/assets/loader-circle-BoxLrsOu.js +1 -0
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +1 -0
- package/.output/public/assets/{routes-DcQnVajO.js → routes-DGVXdzpw.js} +2 -2
- package/.output/public/assets/routes-DTlwOr8I.js +1 -0
- package/.output/public/assets/{shield-check-DE_hVuHu.js → shield-check-uK3MHWJZ.js} +1 -1
- package/.output/public/assets/signing-CMf4aqDO.js +1 -0
- package/.output/public/assets/styles-BCvbtKsm.css +2 -0
- package/.output/public/assets/table-2vcV89QB.js +1 -0
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +1 -0
- package/.output/public/assets/x-DCd0j8c6.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DBP9TQ7K.mjs → __23tanstack-start-server-fn-resolver-B7ioJhtE.mjs} +44 -52
- package/.output/server/_libs/@base-ui/react+[...].mjs +1906 -4040
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +52 -4
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/lucide-react.mjs +36 -3
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__react-query.mjs +2 -2
- package/.output/server/_libs/verkit.mjs +20 -15
- package/.output/server/_runtime.mjs +1 -10
- package/.output/server/_ssr/HashValueDisplay-DwpGLfrl.mjs +55 -0
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +484 -0
- package/.output/server/_ssr/{api-keys-BnM_o2nS.mjs → api-keys-CZeTPQys.mjs} +11 -13
- package/.output/server/_ssr/{api-keys-api-CIywsSF5.mjs → api-keys-api-BUPQVSpk.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-BSp1wkIV.mjs → api-keys-rpc-Cs7tS5_j.mjs} +5 -5
- package/.output/server/_ssr/{api-rpc-cG5wd_tO.mjs → api-rpc-tAupfGQm.mjs} +73 -142
- package/.output/server/_ssr/{auth-rpc-BrJ6obHJ.mjs → auth-rpc-DUaeOWKK.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-DwKoZoQM.mjs → auth.server-DW71WzsD.mjs} +2 -5
- package/.output/server/_ssr/{bundle-signing-rpc-COoQhW8E.mjs → bundle-signing-rpc-BhnBw0-d.mjs} +2 -2
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +12 -0
- package/.output/server/_ssr/{alert-Dim3MGY5.mjs → card-BRiPmi0C.mjs} +61 -39
- package/.output/server/_ssr/{config.server-DEiLhKmy.mjs → config.server-afDuAwaG.mjs} +15 -8
- package/.output/server/_ssr/{createSsrRpc-9P0S0lJ3.mjs → createSsrRpc-DjWNJ0uc.mjs} +6 -6
- package/.output/server/_ssr/databaseJsonValue-d6I3nAS4.mjs +45 -0
- package/.output/server/_ssr/{databaseRows-CwbNwYSl.mjs → databaseRows-5bCRTxm-.mjs} +4 -44
- package/.output/server/_ssr/{deleteBundle-Cu_XOMt0.mjs → deleteBundle-BTGwBgzx.mjs} +2 -2
- package/.output/server/_ssr/{dialog-CQuRMNZ4.mjs → dialog-DS-nw-pA.mjs} +2 -2
- package/.output/server/_ssr/{dist-BVSLTpoP.mjs → dist-CyzPaI5v.mjs} +2 -2
- package/.output/server/_ssr/{getBundleChildren-BcRMFoDF.mjs → getBundleChildren-C0vh4ZvE.mjs} +2 -2
- package/.output/server/_ssr/input-group-BpsnmvZw.mjs +70 -0
- package/.output/server/_ssr/insights-BdS364Xu.mjs +460 -0
- package/.output/server/_ssr/insights-rpc-38DujK0G.mjs +57 -0
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +303 -0
- package/.output/server/_ssr/installations-CtA59MQG.mjs +29 -0
- package/.output/server/_ssr/installations-DiVKEF5T.mjs +627 -0
- package/.output/server/_ssr/{router-C-KUBfOi.mjs → router-B9wG_9f8.mjs} +37 -46
- package/.output/server/_ssr/{routes-Z7TwC6nC.mjs → routes-CKrrS2q2.mjs} +3 -3
- package/.output/server/_ssr/{routes-BM4ht9jb.mjs → routes-D7Yh_jfj.mjs} +402 -390
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +438 -0
- package/.output/server/_ssr/{server-BjzmvXnO.mjs → server-D_C2rMzf.mjs} +5 -5
- package/.output/server/_ssr/{signing-k8GxyBDF.mjs → signing-Dz1WkZOf.mjs} +16 -85
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{field-DRIXKjZG.mjs → table-CnZmon_Z.mjs} +51 -5
- package/.output/server/_ssr/{uuidv7-BbJ-9D_I.mjs → uuidv7-D0QFkPL_.mjs} +3 -3
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +97 -0
- package/.output/server/index.mjs +168 -203
- package/lib/index.d.mts +4 -4
- package/lib/vite-internal.mjs +1 -1
- package/lib/vite.d.mts +0 -1
- package/package.json +8 -8
- package/src/components/AppSidebar.tsx +12 -16
- package/src/components/ConsoleAccessPage.tsx +1 -1
- package/src/components/HashValueDisplay.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +1 -1
- package/src/components/features/bundles/BundleChildrenPanel.tsx +7 -6
- package/src/components/features/bundles/BundleMetadata.tsx +1 -20
- package/src/components/features/channels/ChannelManagementDialog.tsx +1 -1
- package/src/components/features/insights/EventDetails.tsx +151 -0
- package/src/components/features/insights/EventHistoryCard.tsx +245 -0
- package/src/components/features/insights/EventHistoryList.tsx +63 -0
- package/src/components/features/insights/InsightsBundleReports.tsx +51 -0
- package/src/components/features/insights/InsightsControls.tsx +121 -0
- package/src/components/features/{analytics/AnalyticsErrorAlert.tsx → insights/InsightsErrorAlert.tsx} +6 -6
- package/src/components/features/insights/InsightsOverview.tsx +203 -0
- package/src/components/features/insights/InsightsPageHeader.tsx +48 -0
- package/src/components/features/insights/InsightsPagination.tsx +52 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +250 -0
- package/src/components/features/insights/InstallationMatchesCard.tsx +178 -0
- package/src/components/features/insights/InstallationPageHeader.tsx +90 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +24 -24
- package/src/components/features/signing/BundleSigningPage.tsx +18 -126
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/combobox.tsx +1 -0
- package/src/components/ui/skeleton.tsx +4 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/index.ts +7 -3
- package/src/lib/api-rpc.ts +19 -90
- package/src/lib/api.ts +0 -99
- package/src/lib/insights-api.ts +100 -0
- package/src/lib/insights-rpc.ts +88 -0
- package/src/lib/insights-view.ts +15 -0
- package/src/lib/public-bundle-error.ts +19 -0
- package/src/lib/server/bundle-signing.server.ts +5 -82
- package/src/lib/server/console-runtime.server.ts +0 -9
- package/src/lib/server/releaseReachability.ts +1 -4
- package/src/lib/server/runtime.server.ts +6 -142
- package/src/routeTree.gen.ts +21 -21
- package/src/router.tsx +3 -0
- package/src/routes/-installations-search.ts +25 -12
- package/src/routes/__root.tsx +6 -16
- package/src/routes/api-keys.tsx +1 -1
- package/src/routes/index.tsx +21 -81
- package/src/routes/insights.tsx +84 -0
- package/src/routes/installations.tsx +294 -142
- package/src/styles.css +6 -0
- package/.output/public/assets/AnalyticsCapabilityContext-BCke57-7.js +0 -1
- package/.output/public/assets/BundleActivityChart-CnsBe_1J.js +0 -42
- package/.output/public/assets/BundleIdDisplay-Dky75zLU.js +0 -1
- package/.output/public/assets/alert-C-1KvDW8.js +0 -1
- package/.output/public/assets/analytics-Bqz0c-BT.js +0 -1
- package/.output/public/assets/analytics-api-CJdrTLLO.js +0 -1
- package/.output/public/assets/api-B_Rh-uzC.js +0 -1
- package/.output/public/assets/api-keys-BurCFhzH.js +0 -1
- package/.output/public/assets/api-keys-api-BEDJdQg3.js +0 -1
- package/.output/public/assets/badge-Bf0fZ-Gx.js +0 -1
- package/.output/public/assets/createServerFn-gM2-LFBy.js +0 -3
- package/.output/public/assets/dialog-BS60BRr2.js +0 -1
- package/.output/public/assets/download-O-yNBc9H.js +0 -1
- package/.output/public/assets/field-Buq148-A.js +0 -1
- package/.output/public/assets/index-kFhd2S78.js +0 -10
- package/.output/public/assets/installations-BrQ-od41.js +0 -2
- package/.output/public/assets/installations-CGlZ3ROz.js +0 -1
- package/.output/public/assets/lazyRouteComponent-rPzgA7S-.js +0 -1
- package/.output/public/assets/loader-circle-DCYF-wJl.js +0 -1
- package/.output/public/assets/refresh-cw-n8XYbPPj.js +0 -1
- package/.output/public/assets/routes-CrdokJ80.js +0 -1
- package/.output/public/assets/search-DLhbWw3W.js +0 -1
- package/.output/public/assets/signing-HRexfjsH.js +0 -1
- package/.output/public/assets/styles-eB4EtvFS.css +0 -2
- package/.output/public/assets/table-D8CLieHX.js +0 -1
- package/.output/public/assets/textarea-YJLTVAoq.js +0 -1
- package/.output/public/assets/useMutation-JsGVjQMY.js +0 -1
- package/.output/public/assets/useOpenInteractionType-4cRD5xO0.js +0 -1
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +0 -1554
- package/.output/server/_libs/d3-array.mjs +0 -231
- package/.output/server/_libs/d3-color.mjs +0 -330
- package/.output/server/_libs/d3-format.mjs +0 -252
- package/.output/server/_libs/d3-interpolate.mjs +0 -207
- package/.output/server/_libs/d3-path.mjs +0 -77
- package/.output/server/_libs/d3-scale+[...].mjs +0 -1907
- package/.output/server/_libs/d3-shape.mjs +0 -818
- package/.output/server/_libs/decimal.js-light.mjs +0 -884
- package/.output/server/_libs/es-toolkit.mjs +0 -1134
- package/.output/server/_libs/eventemitter3.mjs +0 -236
- package/.output/server/_libs/immer.mjs +0 -532
- package/.output/server/_libs/react-redux+[...].mjs +0 -205
- package/.output/server/_libs/recharts+[...].mjs +0 -14117
- package/.output/server/_ssr/AnalyticsCapabilityContext-ui4DX8GO.mjs +0 -15
- package/.output/server/_ssr/BundleActivityChart-BiB9ZORH.mjs +0 -288
- package/.output/server/_ssr/BundleIdDisplay-Czk6iR6p.mjs +0 -13
- package/.output/server/_ssr/analytics-DtMTn8fn.mjs +0 -858
- package/.output/server/_ssr/analytics-api-Cg1M5v_H.mjs +0 -71
- package/.output/server/_ssr/analytics-input-fRRRn0uA.mjs +0 -96
- package/.output/server/_ssr/analytics-rpc-DY5uXvHT.mjs +0 -155
- package/.output/server/_ssr/api-BTSv1tZb.mjs +0 -282
- package/.output/server/_ssr/badge-DCxbEeof.mjs +0 -26
- package/.output/server/_ssr/bundle-signing.server-D5u8KkMp.mjs +0 -51
- package/.output/server/_ssr/installations-B-azgAvX.mjs +0 -19
- package/.output/server/_ssr/installations-Ctvzp2JH.mjs +0 -535
- package/.output/server/_ssr/runtime.server-awTLiiXW.mjs +0 -527
- package/.output/server/_ssr/table-v1yCvYo7.mjs +0 -53
- package/.output/server/_ssr/textarea-DYHnskhb.mjs +0 -14
- package/.output/server/_tanstack-start-manifest_v-CH4StzJu.mjs +0 -108
- package/src/components/features/analytics/ActivityChart.tsx +0 -150
- package/src/components/features/analytics/AnalyticsCapabilityContext.tsx +0 -24
- package/src/components/features/analytics/AnalyticsControls.tsx +0 -115
- package/src/components/features/analytics/AnalyticsOverview.tsx +0 -208
- package/src/components/features/analytics/BundleDistribution.tsx +0 -133
- package/src/components/features/analytics/BundleSelector.tsx +0 -114
- package/src/components/features/analytics/InstallationHistoryCard.tsx +0 -248
- package/src/components/features/analytics/InstallationMatchesCard.tsx +0 -132
- package/src/components/features/analytics/InstallationPageHeader.tsx +0 -138
- package/src/components/features/analytics/InstallationPagination.tsx +0 -48
- package/src/components/features/analytics/InstallationSearch.tsx +0 -230
- package/src/components/features/analytics/UpdateOutcomes.tsx +0 -147
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -193
- package/src/components/features/bundles/BundleAnalyticsSummary.tsx +0 -123
- package/src/lib/analytics-api.ts +0 -145
- package/src/lib/analytics-error.ts +0 -19
- package/src/lib/analytics-input.ts +0 -187
- package/src/lib/analytics-overview.ts +0 -170
- package/src/lib/analytics-rpc.ts +0 -218
- package/src/lib/server/releaseActivity.ts +0 -27
- package/src/routes/analytics.tsx +0 -139
- /package/.output/public/assets/{preload-helper-TKOBYGYD.js → preload-helper-CQ36nxok.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bn as e,C as t,Cn as n,Dr as r,En as i,Fn as a,Hn as o,In as s,Ln as c,Nn as l,Nt as u,Sn as d,St as f,Wt as p,Zn as m,_t as h,bn as g,gn as _,gt as v,ht as y,kr as b,mt as x,nn as S,pt as C,vn as w,vt as T,w as E,wn as D,xn as O,xt as k,yn as A,yt as j}from"./createServerFn-CA8fs7QD.js";import{t as M}from"./link-CI8idAUi.js";import{h as N,i as P,l as F,m as I,n as L,s as R,t as z,u as ee}from"./InsightsPageHeader-Car5LNiZ.js";import{d as B,s as V,u as te}from"./table-2vcV89QB.js";import{a as H,i as U,n as W,o as ne,r as G,t as K}from"./card-Dhr_eFYj.js";import{a as q,c as re,g as ie,h as ae,i as J,l as oe,m as se,n as ce,o as le,p as ue,r as de,t as Y,u as fe}from"./composite-Bp98A0Ld.js";import{a as pe,i as me,n as he,r as ge}from"./useCompositeListItem-CHLITE_4.js";var X=b(r(),1),_e={applied:`Applied reports`,recovered:`Recovered-from reports`,adopted:`Adopted reports`},Z=m();function ve({selection:e}){let[t,n]=(0,X.useState)([void 0]),r=ee({...e,cursor:t.at(-1),limit:50},!0);return(0,Z.jsx)(L,{title:_e[e.bundle.outcome],error:r.error,eventsLocation:{eventsBefore:e.beforeReceivedAtMs},history:r.data,isFetching:r.isFetching,isLoading:r.isLoading,onNext:()=>{let e=r.data?.nextCursor;e&&n(t=>[...t,e])},onPrevious:()=>n(e=>e.slice(0,-1)),onRefresh:()=>{r.refetch()},pageNumber:t.length,children:(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Reports for the selected bundle and the measured period. New reports appear after refreshing the overview.`})})}var ye=X.createContext(void 0);function be(e=!0){let t=X.useContext(ye);if(t===void 0&&!e)throw Error(o(7));return t}function xe(t={}){let{highlightItemOnHover:n,highlightedIndex:r,onHighlightedIndexChange:i}=D(),{ref:a,index:o}=he(t),s=r===o,c=X.useRef(null),l=e(a,c);return{compositeProps:X.useMemo(()=>({tabIndex:s?0:-1,onFocus(){i(o)},onMouseMove(){let e=c.current;if(!n||!e)return;let t=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!t&&e.focus()}}),[s,i,o,n]),compositeRef:l,index:o}}function Se(e){let{render:t,className:n,style:r,state:i=c,props:o=s,refs:l=s,metadata:u,stateAttributesMapping:d,tag:f=`div`,...p}=e,{compositeProps:m,compositeRef:h}=xe({metadata:u});return a(f,e,{state:i,ref:[...l,h],props:[m,...o,p],stateAttributesMapping:d})}var Ce=X.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:s,pressed:c,render:l,type:f,value:m,nativeButton:h=!0,style:g,..._}=e,v=E(m||void 0),y=be(),b=y?.value??[],x=y?void 0:r,S=(i||y?.disabled)??!1,[C,w]=pe({controlled:y?v!==void 0&&b.indexOf(v)>-1:c,default:x,name:`Toggle`,state:`pressed`}),{getButtonProps:T,buttonRef:D}=d({disabled:S,native:h}),O={disabled:S,pressed:C},k=[D,t],A=[{"aria-pressed":C,onClick(e){let t=!C,n=u(p,e.nativeEvent);v&&y?.setGroupValue?.(v,t,n),s?.(t,n),!n.isCanceled&&w(t)}},_,T],j=a(`button`,e,{enabled:!y,state:O,ref:k,props:A});return y?(0,Z.jsx)(Se,{tag:`button`,render:l,className:n,style:g,state:O,refs:k,props:A}):j});function we(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Te=[];function Ee(t){let{itemSizes:n,cols:r=1,loopFocus:a=!0,onLoop:o,dense:s=!1,orientation:c=`both`,direction:l,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:p,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:_,modifierKeys:b=Te}=t,[w,E]=X.useState(0),D=r>1,O=X.useRef(null),A=e(O,p),M=X.useRef([]),N=X.useRef(!1),P=u??w,F=i((e,t=!1)=>{if((d??E)(e),t){let t=M.current[e];ie(O.current,t,l,c)}}),I=i(e=>{if(e.size===0||N.current)return;N.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&F(r),ie(O.current,n,l,c)}),L=i((e,t,n)=>o?o?.(e,t,n,M):n),R=X.useMemo(()=>({"aria-orientation":c===`both`?void 0:c,ref:A,onFocus(e){let t=O.current,n=S(e.nativeEvent);!t||n==null||!ae(n)||n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let t=m?le:ce;if(!t.has(e.key)||De(e,b)||!O.current)return;let i=l===`rtl`,u=i?de:J,d={horizontal:u,vertical:Y,both:u}[c],p=i?J:de,w={horizontal:p,vertical:q,both:p}[c],E=S(e.nativeEvent);if(E!=null&&ae(E)&&!we(E)){let t=E.selectionStart,n=E.selectionEnd,r=E.value??``;if(t==null||e.shiftKey||t!==n||e.key!==w&&t<r.length||e.key!==d&&t>0)return}let A=P,N=j(M,_),I=T(M,_);if(D){let t=n||Array.from({length:M.current.length},()=>({width:1,height:1})),o=C(t,r,s),l=o.findIndex(e=>e!=null&&!f(M.current,e,_)),u=o.reduce((e,t,n)=>t!=null&&!f(M.current,t,_)?n:e,-1);A=o[h(o.map(e=>e==null?null:M.current[e]),{event:e,orientation:c,loopFocus:a,onLoop:L,cols:r,disabledIndices:v([..._||M.current.map((e,t)=>f(M.current,t)?t:void 0),void 0],o),minIndex:l,maxIndex:u,prevIndex:y(P>I?N:P,t,o,r,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:i})]}let R={horizontal:[u],vertical:[Y],both:[u,Y]}[c],z={horizontal:[p],vertical:[q],both:[p,q]}[c],ee=D?t:{horizontal:m?oe:re,vertical:m?se:ue,both:t}[c];m&&(e.key===`Home`?A=N:e.key===`End`&&(A=I)),A===P&&(R.includes(e.key)||z.includes(e.key))&&(a&&A===I&&R.includes(e.key)?(A=N,o&&(A=o(e,P,A,M))):a&&A===N&&z.includes(e.key)?(A=I,o&&(A=o(e,P,A,M))):A=x(M.current,{startingIndex:A,decrement:z.includes(e.key),disabledIndices:_})),A!==P&&!k(M.current,A)&&(g&&e.stopPropagation(),ee.has(e.key)&&e.preventDefault(),F(A,!0),queueMicrotask(()=>{M.current[A]?.focus()}))}}),[r,s,l,_,M,m,P,D,n,a,o,L,A,b,F,c,g]);return X.useMemo(()=>({props:R,highlightedIndex:P,onHighlightedIndexChange:F,elementsRef:M,disabledIndices:_,onMapChange:I,relayKeyboardEvent:R.onKeyDown}),[R,P,F,M,_,I])}function De(e,t){for(let n of fe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Oe(e){let{render:r,className:i,style:o,refs:l=s,props:u=s,state:d=c,stateAttributesMapping:f,highlightedIndex:p,onHighlightedIndexChange:m,orientation:h,dense:g,itemSizes:_,loopFocus:v,onLoop:y,cols:b,enableHomeAndEndKeys:x,onMapChange:S,stopEventPropagation:C=!0,rootRef:w,disabledIndices:T,modifierKeys:E,highlightItemOnHover:D=!1,tag:O=`div`,...k}=e,{props:A,highlightedIndex:j,onHighlightedIndexChange:M,elementsRef:N,onMapChange:P,relayKeyboardEvent:F}=Ee({itemSizes:_,cols:b,loopFocus:v,onLoop:y,dense:g,orientation:h,highlightedIndex:p,onHighlightedIndexChange:m,rootRef:w,stopEventPropagation:C,enableHomeAndEndKeys:x,direction:t(),disabledIndices:T,modifierKeys:E}),I=a(O,e,{state:d,ref:l,props:[A,...u,k],stateAttributesMapping:f}),L=X.useMemo(()=>({highlightedIndex:j,onHighlightedIndexChange:M,highlightItemOnHover:D,relayKeyboardEvent:F}),[j,M,D,F]);return(0,Z.jsx)(n.Provider,{value:L,children:(0,Z.jsx)(me,{elementsRef:N,onMapChange:e=>{S?.(e),P(e)},children:I})})}var ke=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({}),Ae={multiple(e){return e?{[ke.multiple]:``}:null}},je=X.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:o=!0,onValueChange:c,orientation:l=`horizontal`,multiple:u=!1,value:d,className:f,render:p,style:m,...h}=e,g=ge(!0),_=X.useMemo(()=>d!==void 0||n!==void 0,[d,n]),v=(g?.disabled??!1)||r,[y,b]=pe({controlled:d,default:d===void 0?n??s:void 0,name:`ToggleGroup`,state:`value`}),x=i((e,t,n)=>{let r;u?(r=y.slice(),t?r.push(e):r.splice(y.indexOf(e),1)):r=t?[e]:[],c?.(r,n),!n.isCanceled&&b(r)}),S={disabled:v,multiple:u,orientation:l},C=X.useMemo(()=>({disabled:v,orientation:l,setGroupValue:x,value:y,isValueInitialized:_}),[v,l,x,y,_]),w={role:`group`},T=a(`div`,e,{enabled:!!g,state:S,ref:t,props:[w,h],stateAttributesMapping:Ae});return(0,Z.jsx)(ye.Provider,{value:C,children:g?T:(0,Z.jsx)(Oe,{render:p,className:f,style:m,state:S,refs:[t],props:[w,h],stateAttributesMapping:Ae,loopFocus:o,enableHomeAndEndKeys:!0,orientation:l})})}),Me=l(`group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent hover:bg-muted`},size:{default:`h-7 min-w-7 px-2 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5`,sm:`h-6 min-w-6 rounded-[min(var(--radius-md),8px)] px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,lg:`h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`}},defaultVariants:{variant:`default`,size:`default`}}),Ne=X.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function Pe({className:e,variant:t,size:n,spacing:r=2,orientation:i=`horizontal`,children:a,...o}){return(0,Z.jsx)(je,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,"data-orientation":i,style:{"--gap":r},className:O(`group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch`,e),...o,children:(0,Z.jsx)(Ne.Provider,{value:{variant:t,size:n,spacing:r,orientation:i},children:a})})}function Q({className:e,children:t,variant:n=`default`,size:r=`default`,...i}){let a=X.useContext(Ne);return(0,Z.jsx)(Ce,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:O(`shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t`,Me({variant:a.variant||n,size:a.size||r}),e),...i,children:t})}var Fe=[{value:`24h`,label:`24 hours`,shortLabel:`24h`},{value:`7d`,label:`7 days`,shortLabel:`7d`},{value:`30d`,label:`30 days`,shortLabel:`30d`}];function Ie({onWindowChange:e,onScopeChange:t,scope:n,window:r}){let[i,a]=(0,X.useState)(n.platform),[o,s]=(0,X.useState)(n.channel),[c,l]=(0,X.useState)(n.bundleId??``);return(0,Z.jsxs)(`section`,{"aria-label":`Insights controls`,className:`flex flex-col gap-4`,children:[(0,Z.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),t({platform:i,channel:o,bundleId:c||void 0})},children:(0,Z.jsxs)(te,{className:`items-end sm:flex-row`,children:[(0,Z.jsxs)(V,{className:`w-full sm:w-auto`,children:[(0,Z.jsx)(B,{children:`Platform`}),(0,Z.jsxs)(Pe,{"aria-label":`Platform`,value:[i],onValueChange:e=>{(e[0]===`ios`||e[0]===`android`)&&a(e[0])},spacing:0,variant:`outline`,children:[(0,Z.jsx)(Q,{className:`h-11 lg:h-8`,value:`ios`,children:`iOS`}),(0,Z.jsx)(Q,{className:`h-11 lg:h-8`,value:`android`,children:`Android`})]})]}),(0,Z.jsxs)(V,{children:[(0,Z.jsx)(B,{htmlFor:`insights-channel`,children:`Channel`}),(0,Z.jsx)(w,{className:`h-11 lg:h-8`,id:`insights-channel`,value:o,onChange:e=>s(e.target.value),required:!0,maxLength:1024})]}),(0,Z.jsxs)(V,{children:[(0,Z.jsx)(B,{htmlFor:`insights-bundle`,children:`Bundle ID (optional)`}),(0,Z.jsx)(w,{className:`h-11 lg:h-8`,id:`insights-bundle`,placeholder:`Select a bundle by ID`,value:c,onChange:e=>l(e.target.value),maxLength:1024})]}),(0,Z.jsx)(A,{className:`h-11 w-full sm:w-auto lg:h-8`,type:`submit`,variant:`outline`,children:`Apply filters`})]})}),(0,Z.jsxs)(V,{orientation:`horizontal`,className:`w-full`,children:[(0,Z.jsx)(B,{className:`sr-only`,children:`Reporting period`}),(0,Z.jsx)(Pe,{"aria-label":`Reporting period`,className:`w-full sm:w-fit`,onValueChange:t=>{t[0]&&e(t[0])},spacing:0,size:`lg`,value:[r],variant:`outline`,children:Fe.map(e=>(0,Z.jsx)(Q,{"aria-label":e.label,className:`h-11 flex-1 px-4 sm:flex-none lg:h-8 lg:px-2.5`,value:e.value,children:e.shortLabel},e.value))})]})]})}var Le={"24h":`the last 24 hours`,"7d":`the last 7 days`,"30d":`the last 30 days`};function $(e){let t=F();if(e.status===`loading`)return(0,Z.jsxs)(K,{"aria-label":`Loading reporting installations`,className:`shadow-sm`,children:[(0,Z.jsxs)(H,{className:`px-4 pt-4 pb-2 sm:px-6 sm:pt-6`,children:[(0,Z.jsx)(_,{className:`h-4 w-40`}),(0,Z.jsx)(_,{className:`h-3 w-full max-w-md`})]}),(0,Z.jsx)(W,{className:`px-4 pb-6 sm:px-6`,children:(0,Z.jsx)(_,{className:`h-12 w-28`})}),(0,Z.jsx)(U,{className:`border-t px-4 py-3 sm:px-6`,children:(0,Z.jsx)(_,{className:`h-8 w-full max-w-sm`})})]});if(e.status===`error`)return(0,Z.jsx)(P,{error:e.error,fallbackTitle:`Reporting installations unavailable`});let{active:n}=e,r=n.bundle;return(0,Z.jsxs)(`section`,{"aria-labelledby":`reporting-installations-heading`,className:`flex flex-col gap-4`,children:[(0,Z.jsxs)(K,{className:`min-w-0 overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(H,{className:`gap-2 px-4 pt-4 pb-2 sm:px-6 sm:pt-6`,children:[(0,Z.jsx)(ne,{className:`text-sm font-medium`,children:(0,Z.jsx)(`h2`,{id:`reporting-installations-heading`,children:`Reporting installations`})}),(0,Z.jsxs)(G,{children:[n.platform===`ios`?`iOS`:`Android`,` · `,n.channel,` ·`,` `,Le[n.window],`. Installations are counted by their last report received.`]})]}),(0,Z.jsx)(W,{className:`px-4 pt-2 pb-5 sm:px-6 sm:pb-6`,children:(0,Z.jsx)(`p`,{className:`text-4xl font-semibold tracking-tight tabular-nums sm:text-5xl`,children:n.reportingInstallations.count.toLocaleString()})}),(0,Z.jsxs)(U,{className:`flex flex-wrap items-center justify-between gap-3 border-t bg-muted/15 px-4 py-3 sm:px-6`,children:[(0,Z.jsxs)(`dl`,{className:`min-w-0 text-xs`,children:[(0,Z.jsx)(`dt`,{className:`text-muted-foreground`,children:`Measured at`}),(0,Z.jsx)(`dd`,{className:`font-medium tabular-nums`,children:(0,Z.jsx)(R,{formatter:t,touch:!0,value:n.reportingInstallations.measuredAtMs})})]}),(0,Z.jsxs)(M,{className:g({className:`h-11 px-3 lg:h-8`,variant:`outline`}),to:`/installations`,children:[`View events`,(0,Z.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-end`})]})]})]}),r?(0,Z.jsxs)(K,{className:`min-w-0 overflow-hidden shadow-sm`,children:[(0,Z.jsxs)(H,{children:[(0,Z.jsx)(ne,{children:`Selected bundle`}),(0,Z.jsx)(G,{className:`break-all`,children:r.bundleId})]}),(0,Z.jsx)(W,{children:(0,Z.jsxs)(`dl`,{className:`flex flex-col gap-5`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{className:`text-sm`,children:`Selected bundle installations`}),(0,Z.jsx)(`dd`,{className:`mt-1 text-2xl font-semibold tabular-nums`,children:r.reportingInstallations.count.toLocaleString()})]}),(0,Z.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`Measured at`,` `,(0,Z.jsx)(R,{formatter:t,touch:!0,value:r.reportingInstallations.measuredAtMs})]})]}),[[`applied`,r.appliedReports],[`recovered`,r.recoveredReports],[`adopted`,r.adoptedReports]].map(([i,a])=>(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`dt`,{className:`text-sm`,children:_e[i]}),(0,Z.jsx)(`dd`,{className:`mt-1 text-2xl font-semibold tabular-nums`,children:a.count.toLocaleString()}),(0,Z.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Measured at`,` `,(0,Z.jsx)(R,{formatter:t,touch:!0,value:a.measuredAtMs})]})]}),(0,Z.jsxs)(A,{className:`h-11 lg:h-8`,variant:`outline`,onClick:()=>e.onOutcomeSelect({bundle:{platform:n.platform,channel:n.channel,bundleId:r.bundleId,outcome:i},sinceMs:n.sinceMs,beforeReceivedAtMs:n.beforeReceivedAtMs}),children:[`View `,i,` reports`,(0,Z.jsx)(N,{"aria-hidden":`true`,"data-icon":`inline-end`})]})]},i))]})}),(0,Z.jsx)(U,{children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Installation counts are independent live measurements. Outcome counts are accepted reports, not unique devices or update attempts. Recovery reports identify the bundle recovered from.`})})]}):null,(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Offline installations, opt-outs, and reports that did not reach the server are absent.`})]})}function Re(){let[e,t]=(0,X.useState)(`30d`),[n,r]=(0,X.useState)({platform:`ios`,channel:`production`}),[i,a]=(0,X.useState)(null),o=I({...n,window:e});return(0,Z.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,Z.jsx)(z,{view:`overview`}),(0,Z.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,Z.jsxs)(`div`,{className:`mx-auto flex w-full max-w-4xl flex-col gap-4 sm:gap-6`,children:[(0,Z.jsx)(Ie,{scope:n,onScopeChange:e=>{r(e),a(null)},onWindowChange:e=>{t(e),a(null)},window:e}),(0,Z.jsx)(A,{className:`h-11 self-end lg:h-8`,variant:`outline`,disabled:o.isFetching,onClick:()=>{a(null),o.refetch()},children:`Refresh overview`}),o.isLoading?(0,Z.jsx)($,{status:`loading`}):o.error?(0,Z.jsx)($,{status:`error`,error:o.error}):o.data?(0,Z.jsx)($,{status:`success`,active:o.data,onOutcomeSelect:a}):(0,Z.jsx)($,{status:`loading`}),i?(0,Z.jsx)(ve,{selection:i},JSON.stringify(i)):null]})})]})}export{Re as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/installations-CStZja8x.js","assets/createServerFn-CA8fs7QD.js","assets/link-CI8idAUi.js","assets/InsightsPageHeader-Car5LNiZ.js","assets/chart-no-axes-combined-Dy4WJv2U.js","assets/table-2vcV89QB.js","assets/HashValueDisplay-CB0Eskit.js","assets/dist-C_NydL0e.js","assets/refresh-cw-Bqc72UZG.js","assets/card-Dhr_eFYj.js","assets/x-DCd0j8c6.js","assets/input-group-cSOG4wh_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Cr as e,Sr as t,wr as n,xr as r,yr as i}from"./createServerFn-CA8fs7QD.js";import{A as a,C as o,D as s,E as c,I as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,T as _,_ as v,b as y,d as b,f as x,h as S,k as C,m as w,p as T,u as E,v as D,w as O,x as k,y as ee,z as A}from"./link-CI8idAUi.js";import{a as te,n as ne,t as re}from"./lazyRouteComponent-Ccp3bwBY.js";import{t as ie}from"./preload-helper-CQ36nxok.js";var ae=se(JSON.parse),oe=ce(JSON.stringify,JSON.parse);function se(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=r(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ce(e,n){let r=typeof n==`function`;function i(t){if(typeof t==`object`&&t)try{return e(t)}catch{}else if(r&&typeof t==`string`)try{return n(t),e(t)}catch{}return t}return e=>{let n=t(e,i);return n?`?${n}`:``}}var j=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},le=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),M=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),N=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},ue=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},P=(t,n,r)=>{if(!(!i(r)&&!e(r)))throw i(r)&&r.redirectHandled&&!r.options.reloadDocument?r:(n&&(n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.loaderPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0,n._nonReactive.error=r,t.updateMatch(n.id,a=>({...a,status:i(r)?`redirected`:e(r)?`notFound`:a.status===`pending`?`success`:a.status,context:N(t,n.index),isFetching:!1,error:r})),e(r)&&!r.routeId&&(r.routeId=n.routeId),n._nonReactive.loadPromise?.resolve()),i(r)&&(t.rendered=!0,r.options._fromLocation=t.location,r.redirectHandled=!0,r=t.router.resolveRedirect(r)),r)},de=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},fe=(e,t,n)=>{let r=N(e,n);e.updateMatch(t,e=>({...e,context:r}))},F=(t,n,r)=>{let{id:a,routeId:o}=t.matches[n],s=t.router.looseRoutesById[o];if(r instanceof Promise)throw r;t.firstBadMatchIndex??=n,P(t,t.router.getMatch(a),r);try{s.options.onError?.(r)}catch(e){r=e,P(t,t.router.getMatch(a),r)}t.updateMatch(a,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:r,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!i(r)&&!e(r)&&(t.serialError??=r)},pe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!M(e,t)&&(n.options.loader||n.options.beforeLoad||Ce(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{j(e)},i);r._nonReactive.pendingTimeout=t}},me=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&P(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},he=(t,n,r,a)=>{let o=t.router.getMatch(n),c=o._nonReactive.loadPromise;o._nonReactive.loadPromise=s(()=>{c?.resolve(),c=void 0});let{paramsError:u,searchError:d}=o;u&&F(t,r,u),d&&F(t,r,d),pe(t,n,a,o);let f=new AbortController,p=!1,m=()=>{p||(p=!0,t.updateMatch(n,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:f})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(n,e=>({...e,isFetching:!1}))};if(!a.options.beforeLoad){t.router.batch(()=>{m(),h()});return}o._nonReactive.beforeLoadPromise=s();let g={...N(t,r,!1),...o.__routeContext},{search:_,params:v,cause:y}=o,b=M(t,n),x={search:_,abortController:f,params:v,preload:b,context:g,location:t.location,navigate:e=>t.router.navigate({...e,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:b?`preload`:y,matches:t.matches,routeId:a.id,...t.router.options.additionalContext},S=a=>{if(a===void 0){t.router.batch(()=>{m(),h()});return}(i(a)||e(a))&&(m(),F(t,r,a)),t.router.batch(()=>{m(),t.updateMatch(n,e=>({...e,__beforeLoadContext:a})),h()})},C;try{if(C=a.options.beforeLoad(x),l(C))return m(),C.catch(e=>{F(t,r,e)}).then(S)}catch(e){m(),F(t,r,e)}S(C)},ge=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>he(e,n,t,i),s=()=>{if(de(e,n))return;let t=me(e,n,i);return l(t)?t.then(o):o()};return a()},_e=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=N(e,r),d=M(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ye=async(t,n,r,a,o)=>{try{let s=t.router.getMatch(r);try{I(o);let e=o.options.loader,i=typeof e==`function`?e:e?.handler,c=i?.(ve(t,n,r,a,o)),u=!!i&&l(c);if((u||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&t.updateMatch(r,e=>({...e,isFetching:`loader`})),i){let e=u?await c:c;P(t,t.router.getMatch(r),e),e!==void 0&&t.updateMatch(r,t=>({...t,loaderData:e}))}o._lazyPromise&&await o._lazyPromise;let d=s._nonReactive.minPendingPromise;d&&await d,o._componentsPromise&&await o._componentsPromise,t.updateMatch(r,e=>({...e,error:void 0,context:N(t,a),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(n){let c=n;if(c?.name===`AbortError`){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}t.updateMatch(r,e=>({...e,status:e.status===`pending`?`success`:e.status,isFetching:!1,context:N(t,a)}));return}let l=s._nonReactive.minPendingPromise;l&&await l,e(n)&&await o.options.notFoundComponent?.preload?.(),P(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(e){c=e,P(t,t.router.getMatch(r),e)}!i(c)&&!e(c)&&await I(o,[`errorComponent`]),t.updateMatch(r,e=>({...e,error:c,context:N(t,a),status:`error`,isFetching:!1}))}}catch(e){let n=t.router.getMatch(r);n&&(n._nonReactive.loaderPromise=void 0),P(t,n,e)}},be=async(e,t,n)=>{async function r(r,o,s,u,d){let p=Date.now()-o.updatedAt,m=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,h=d.options.shouldReload,g=typeof h==`function`?h(ve(e,t,a,n,d)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||s!==void 0&&s!==u.id);c=_===`success`&&(v||(g??y)),r&&d.options.preload===!1||(c&&!e.sync&&f?(l=!0,(async()=>{try{await ye(e,t,a,n,d);let r=e.router.getMatch(a);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){i(t)&&await e.router.navigate(t.options)}})()):_!==`success`||c?await ye(e,t,a,n,d):fe(e,a,n))}let{id:a,routeId:o}=e.matches[n],c=!1,l=!1,u=e.router.looseRoutesById[o],d=u.options.loader,f=((typeof d==`function`?void 0:d?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(de(e,a)){if(!e.router.getMatch(a))return e.matches[n];fe(e,a,n)}else{let t=e.router.getMatch(a),i=e.router.stores.matchesId.get()[n],c=(i&&e.router.stores.matchStores.get(i)||null)?.routeId===o?i:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,l=M(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&f)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),i=n._nonReactive.error||n.error;i&&P(e,n,i),n.status===`pending`&&await r(l,t,c,n,u)}else{let n=l&&!e.router.stores.matchStores.has(a),i=e.router.getMatch(a);i._nonReactive.loaderPromise=s(),n!==i.preload&&e.updateMatch(a,e=>({...e,preload:n})),await r(l,t,c,i,u)}}let p=e.router.getMatch(a);l||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,l||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;let m=l?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:m,invalid:!1})),e.router.getMatch(a)):p};async function xe(t){let r=t,a=[];le(r.router)&&j(r);let o;for(let t=0;t<r.matches.length;t++){try{let e=ge(r,t);l(e)&&await e}catch(t){if(i(t))throw t;if(e(t))o=t;else if(!r.preload)throw t;break}if(r.serialError||r.firstBadMatchIndex!=null)break}let s=r.firstBadMatchIndex??r.matches.length,c=o&&!r.preload?ue(r,o):void 0,u=o&&r.preload?0:c===void 0?s:Math.min(c+1,s),d,f;for(let e=0;e<u;e++)a.push(be(r,a,e));try{await Promise.all(a)}catch{let t=await Promise.allSettled(a);for(let n of t){if(n.status!==`rejected`)continue;let t=n.reason;if(i(t))throw t;e(t)?d??=t:f??=t}if(f!==void 0)throw f}let p=d??(o&&!r.preload?o:void 0),m=r.firstBadMatchIndex===void 0?r.matches.length-1:r.firstBadMatchIndex;if(!p&&o&&r.preload)return r.matches;if(p){let e=ue(r,p);e===void 0&&n();let t=r.matches[e],i=r.router.looseRoutesById[t.routeId],a=r.router.options?.defaultNotFoundComponent;!i.options.notFoundComponent&&a&&(i.options.notFoundComponent=a),p.routeId=t.routeId;let o=t.routeId===r.router.routeTree.id;r.updateMatch(t.id,e=>({...e,...o?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:p},isFetching:!1})),m=e,await I(i,[`notFoundComponent`])}else if(!r.preload){let e=r.matches[0];e.globalNotFound||r.router.getMatch(e.id)?.globalNotFound&&r.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(r.serialError&&r.firstBadMatchIndex!==void 0){let e=r.router.looseRoutesById[r.matches[r.firstBadMatchIndex].routeId];await I(e,[`errorComponent`])}for(let e=0;e<=m;e++){let{id:t,routeId:n}=r.matches[e],i=r.router.looseRoutesById[n];try{let e=_e(r,t,i);if(e){let n=await e;r.updateMatch(t,e=>({...e,...n}))}}catch(e){console.error(`Error executing head for route ${n}:`,e)}}let h=j(r);if(l(h)&&await h,p)throw p;if(r.serialError&&!r.preload&&!r.onReady)throw r.serialError;return r.matches}function Se(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function I(e,t=L){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===L?(()=>{if(e._componentsPromise===void 0){let t=Se(e,L);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Se(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ce(e){for(let t of L)if(e.options[t]?.preload)return!0;return!1}var L=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function we(e){return{input:({url:t})=>{for(let n of e)t=R(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ee(e[n],t);return t}}}function Te(e){let t=S(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=T([`/`,t,e.pathname]),e)}}function R(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ee(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function De(e){let t=e;return{get(){return t},set(e){t=d(e,t)}}}function Oe(e){return{get(){return e()}}}function ke(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>z(o,_.get())),x=r(()=>z(s,v.get())),S=r(()=>z(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=O(64);function k(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let ee={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:k,setMatches:A,setPending:te,setCached:ne};A(e.matches),a?.(ee);function A(e){B(e,o,_,n,i)}function te(e){B(e,s,v,n,i)}function ne(e){B(e,c,y,n,i)}return ee}function z(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function B(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}c(n.get(),a)||n.set(a)})}var V=`__TSR_index`,Ae=`popstate`,je=`beforeunload`;function Me(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=H(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[V];i=Ne(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[V];i=Ne(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[V]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Ne(e,t){t||={};let n=U();return{...t,key:n,__TSR_key:n,[V]:e}}function Pe(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>H(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=U();t.history.replaceState({[V]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=H(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[V]-l.state[V],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Me({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(je,S,{capture:!0}),t.removeEventListener(Ae,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(je,S,{capture:!0}),t.addEventListener(Ae,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Fe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function H(e,t){let n=Fe(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=U();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[V]:0,key:a,__TSR_key:a}}}function U(){return(Math.random()+1).toString(36).substring(7)}function Ie(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function W(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var G=new WeakMap,Le=class{constructor(t,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=b(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pe()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=O(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ke(ze(this.latestLocation),e),et(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=S(o);t&&t!==`/`&&e.push(Te({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:we(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&g(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:p(e).path,external:!1,searchStr:o,search:h(t?.search,i),hash:p(r.slice(1)).path,state:A(t?.state,a)}}let o=new URL(i,this.origin),s=R(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:p(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:h(t?.search,c),hash:p(s.hash.slice(1)).path,state:A(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>w({base:e,to:t.includes(`//`)?E(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Be({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,m=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,d(t.params,c)),g=this.routesByPath[v(u)],_;if(g)_=this.getRouteBranch(g);else if(u.includes(`$`))_=[];else{let e=this.getMatchedRoutes(u);_=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(_=[..._,this.options.notFoundRoute])}if(_.length&&f(m))for(let e of _){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(m,t(m))}catch{}}let y=e.leaveParams?u:p(x({path:u,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,b=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};_.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,q(t.options.validateSearch,{...e,...b}))}catch{}}),b=e}b=Ve({search:b,dest:t,destRoutes:_,_includeValidateSearch:e._includeValidateSearch}),b=h(s,b);let S=this.options.stringifySearch(b),C=t.hash===!0?n.hash:t.hash?d(t.hash,n.hash):void 0,w=C?`#${C}`:``,T=t.state===!0?n.state:t.state?d(t.state,n.state):{};T=A(n.state,T);let E=`${y}${S}${w}`,D,O,k=!1;if(this.rewrite){let e=new URL(E,this.origin),t=Ee(this.rewrite,e);D=e.href.replace(e.origin,``),t.origin===this.origin?O=t.pathname+t.search+t.hash:(O=t.href,k=!0)}else D=a(E),O=D;return{publicHref:O,href:D,pathname:y,search:b,searchStr:S,state:T,hash:C??``,external:k,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ee(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,d(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=C(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=v(this.latestLocation.href)===v(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=s(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=H(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=R(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(m(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async t=>{let n=t?.action?.type,r,a,o,s=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad(),n?G.set(this.latestLocation,n):G.delete(this.latestLocation);let e=this.latestLocation,r=W(e,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await xe({router:this,sync:t?.sync,forceStaleReload:s.href===e.href,matches:this.stores.pendingMatches.get(),location:e,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(t){i(t)?(r=t,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):e(t)&&(a=t);let n=r?r.status:a?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(n),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(e=>e.status===`error`)&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(W(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&m(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=I,this.preloadRoute=async t=>{let n=t._builtLocation??this.buildLocation(t),r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:t}),a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),s=r.filter(e=>!o.has(e.id));if(s.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...s])}try{return r=await xe({router:this,matches:r,location:n,preload:!0,updateMatch:(e,t)=>{a.has(e)?r=r.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),r}catch(t){if(i(t))return t.options.reloadDocument?void 0:await this.preloadRoute({...t.options,_fromLocation:n});e(t)||console.error(t);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=k(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!C(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?C(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??`fuzzy`,stringifySearch:t.stringifySearch??oe,parseSearch:t.parseSearch??ae,protocolAllowlist:t.protocolAllowlist??_}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=D(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){let r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:o}=r,{matchedRoutes:c}=r,l=!1;(a?a.path!==`/`&&o[`**`]:v(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?Ue(this.options.notFoundMode,c):void 0,d=Array(c.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let r=0;r<c.length;r++){let a=c[r],l=d[r-1],p,m,g;{let e=l?.search??t.search,r=l?._strictSearch??void 0;try{let t=q(a.options.validateSearch,{...e})??void 0;p={...e,...t},m={...r,...t},g=void 0}catch(t){let r=t;if(t instanceof K||(r=new K(t.message,{cause:t})),n?.throwOnError)throw r;p=e,m={},g=r}}let _=a.options.loaderDeps?.({search:p})??``,v=_?JSON.stringify(_):``,{interpolatedPath:y,usedParams:b}=x({path:a.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),S=a.id+y+v,C=this.getMatch(S),w=f.get(a.id),T=C?._strictParams??b,E;if(!C)try{We(a,T)}catch(t){if(E=e(t)||i(t)?t:new Re(t.message,{cause:t}),n?.throwOnError)throw E}Object.assign(o,T);let D=w?`stay`:`enter`,O;if(C)O={...C,cause:D,params:w?.params??o,_strictParams:T,search:h(w?w.search:C.search,p),_strictSearch:m};else{let e=a.options.loader||a.options.beforeLoad||a.lazyFn||Ce(a)?`pending`:`success`;O={id:S,ssr:a.options.ssr,index:r,routeId:a.id,params:w?.params??o,_strictParams:T,pathname:y,updatedAt:Date.now(),search:w?h(w.search,p):p,_strictSearch:m,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:E,__routeContext:void 0,_nonReactive:{loadPromise:s()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:D,loaderDeps:w?A(w.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:a.options.staticData||{},fullPath:a.fullPath}}n?.preload||(O.globalNotFound=u===a.id),O.searchError=g;let k=this.getParentContext(l);O.context={...k,...O.__routeContext,...O.__beforeLoadContext},d[r]=O}for(let e=0;e<d.length;e++){let n=d[e],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?h(a.params,o):o,!i){let i=d[e-1],a=this.getParentContext(i);if(r.options.context){let e={deps:n.loaderDeps,params:n.params,context:a??{},location:t,navigate:e=>this.navigate({...e,_fromLocation:t}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:d,routeId:r.id};n.__routeContext=r.options.context(e)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return d}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=u(t),i={...e.search};for(let e of t)try{Object.assign(i,q(e.options.validateSearch,i))}catch{}let a=u(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{We(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},K=class extends Error{},Re=class extends Error{};function ze(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function q(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new K(`Async validation not supported`);if(n.issues)throw new K(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Be({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=v(e),a,o=y(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Ve({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return He(n)(e,t,r??!1)}function He(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=q(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=d(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ue(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return te}function We(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Ge(){try{return sessionStorage}catch{return}}var Ke=`tsr-scroll-restoration-v1_3`,qe=Ge();function Je(){try{return JSON.parse(qe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ye(){try{qe?.setItem(Ke,JSON.stringify(J))}catch{}}var J=Je(),Y=`data-scroll-restoration-id`,Xe=e=>e.state.__TSR_key||e.href;function Ze(e){let t=e.getAttribute(Y);if(t)return`[${Y}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}function Qe(e,t){let n=J[(t.getKey||Xe)(e.latestLocation)];if(!n)return;if(t.id)return n[`[${Y}="${t.id}"]`];let r=t.getElement?.();if(r)return n[r===window?Z:Ze(r)]}var X=!1,Z=`window`;function Q(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=[];for(let n of e){if(n===Z)continue;let e=Q(n);e&&t.push(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Xe,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(X||!r.restoring))if(e.target===document)o(Z,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=J[e]||={};for(let[e,n]of a)e===Z?t[Z]=n:e.isConnected&&(t[Ze(e)]=n)};n&&!r.restoration&&(r.restoration=!0,X=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ye()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=J[u];if(e){let t=J[l];for(let n in e){if(n===Z){if(s)continue}else{let e=Q(n);if(!e||s&&o&&(c??=$e(o),c.includes(e)))continue}t||=J[l]={},t[n]??=e[n]}}}X=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=G.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?J[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Z){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Q(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=$e(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{X=!1}}))}var $=e=>typeof e==`string`&&e.length>0?e:void 0,tt=e=>typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:void 0;function nt(e){if(e.pathname===`/installations`){let t=rt(e.search);if(t.query===void 0&&t.installId===void 0)return`/installations?eventsBefore=${t.eventsBefore??`new`}&eventsCursor=${t.eventsCursor??`first`}`}return e.state.__TSR_key}function rt(e){return{query:typeof e.query==`string`?e.query:void 0,installId:typeof e.installId==`string`?e.installId:void 0,eventsCursor:$(e.eventsCursor),eventsBefore:tt(e.eventsBefore),searchCursor:$(e.searchCursor),historyCursor:$(e.historyCursor),historyBefore:tt(e.historyBefore)}}var it=ne(`/installations`)({component:re(()=>ie(()=>import(`./installations-CStZja8x.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),`component`),validateSearch:rt});export{Le as a,De as c,et as i,Oe as l,nt as n,Ie as o,Qe as r,W as s,it as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dr as e,Gn as t,Zn as n,_n as r,bn as i,gn as a,kr as o,xn as s,yn as c}from"./createServerFn-CA8fs7QD.js";import{r as l}from"./link-CI8idAUi.js";import{i as u,n as d,r as f,t as p}from"./installations-CE33wgbY.js";import{a as m,c as h,d as g,f as ee,i as _,l as v,n as te,o as y,p as ne,r as b,s as x,t as re,u as S}from"./InsightsPageHeader-Car5LNiZ.js";import{a as C,d as w,i as T,n as E,o as D,p as O,r as k,s as A,t as j}from"./table-2vcV89QB.js";import{i as M,n as N,t as P}from"./HashValueDisplay-CB0Eskit.js";import{t as F}from"./refresh-cw-Bqc72UZG.js";import{t as I}from"./x-DCd0j8c6.js";import{a as L,n as R,o as z,t as B}from"./card-Dhr_eFYj.js";import{i as V,n as H,r as U,t as W}from"./input-group-cSOG4wh_.js";function G(){u(l(),!0)}function K(e){return G(),f(l(),e)}var ie=t(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ae=t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),q=o(e(),1),J=n(),oe=e=>e.userId??e.username??`—`,se=e=>`lastKnownBundleId`in e?e.lastKnownBundleId:e.toBundleId??e.fromBundleId;function ce({error:e,history:t,isLoading:n,onNext:i,onPrevious:o,onRefresh:s,pageNumber:l,selectedEvent:u,selectedInstallId:d}){let f=v(),p=u?se(u):void 0;return(0,J.jsxs)(B,{className:`@container min-h-0 min-w-0 shadow-sm`,children:[(0,J.jsx)(L,{className:`p-4 sm:p-6`,children:(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,J.jsx)(z,{className:`text-sm font-medium`,children:(0,J.jsx)(`h2`,{children:d===void 0?`Select an installation`:`Installation history`})})}),s&&d!==void 0?(0,J.jsxs)(c,{className:`h-11 lg:h-8`,size:`lg`,variant:`outline`,onClick:s,disabled:n,children:[(0,J.jsx)(F,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Refresh`]}):null]})}),(0,J.jsxs)(R,{className:`min-h-0 p-0`,children:[d!==void 0&&u?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`section`,{"aria-labelledby":`latest-installation-state`,className:`px-4 pb-4 sm:px-6 sm:pb-6`,children:[(0,J.jsx)(`h3`,{className:`sr-only`,id:`latest-installation-state`,children:`Latest reported state`}),(0,J.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4 @[36rem]:grid-cols-3`,children:[(0,J.jsxs)(`div`,{className:`col-span-2 min-w-0 @[36rem]:col-span-1`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`User ID`}),(0,J.jsx)(`dd`,{className:`mt-1 text-sm font-medium wrap-anywhere`,children:oe(u)})]}),(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Install ID`}),(0,J.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:(0,J.jsx)(P,{value:d,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`})})]}),(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last known bundle`}),(0,J.jsx)(`dd`,{className:`mt-1 font-mono text-xs`,children:p?(0,J.jsx)(P,{value:p,buttonClassName:`min-h-11 px-3 lg:min-h-0 lg:px-1.5`}):`—`})]})]})]}),(0,J.jsx)(r,{})]}):null,d===void 0?null:n?(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 p-6`,role:`status`,"aria-label":`Loading installation history`,children:[(0,J.jsx)(a,{className:`h-10 w-full`}),(0,J.jsx)(a,{className:`h-10 w-full`}),(0,J.jsx)(a,{className:`h-10 w-full`})]}):e?(0,J.jsx)(`div`,{className:`p-6`,children:(0,J.jsx)(_,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation history unavailable`})}):t&&t.data.length>0?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`@[48rem]:hidden`,children:(0,J.jsx)(m,{events:t.data,formatter:f})}),(0,J.jsx)(`div`,{className:`hidden @[48rem]:block`,children:(0,J.jsxs)(j,{className:`min-w-3xl table-fixed`,children:[(0,J.jsx)(C,{children:(0,J.jsxs)(D,{className:`[&>th]:px-4 sm:[&>th]:px-6`,children:[(0,J.jsx)(T,{className:`w-64`,children:`Time`}),(0,J.jsx)(T,{className:`w-48`,children:`Event`}),(0,J.jsx)(T,{className:`w-32`,children:`App`}),(0,J.jsx)(T,{className:`w-52`,children:`Bundle`})]})}),(0,J.jsx)(E,{children:t.data.map(e=>(0,J.jsxs)(D,{className:`[&>td]:px-4 [&>td]:py-4 [&>td]:align-top sm:[&>td]:px-6`,children:[(0,J.jsx)(k,{className:`whitespace-normal text-xs tabular-nums`,children:(0,J.jsx)(x,{value:e.receivedAtMs,formatter:f})}),(0,J.jsx)(k,{children:(0,J.jsx)(h,{type:e.type})}),(0,J.jsx)(k,{className:`whitespace-normal text-xs`,children:(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`span`,{children:[e.platform===`ios`?`iOS`:`Android`,` `,e.appVersion]}),(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:e.channel})]})}),(0,J.jsx)(k,{className:`whitespace-normal text-xs`,children:(0,J.jsx)(y,{event:e})})]},e.id))})]})}),(0,J.jsx)(b,{hasPrevious:l>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:i,onPrevious:o,pageLength:t.data.length,pageNumber:l})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`div`,{className:`p-6 text-sm text-muted-foreground`,children:l>1||t?.nextCursor?`No bundle changes on this page.`:`No bundle changes recorded yet.`}),t&&(l>1||t.nextCursor)?(0,J.jsx)(b,{hasPrevious:l>1,label:`Installation history`,nextCursor:t.nextCursor,onNext:i,onPrevious:o,pageLength:0,pageNumber:l}):null]})]})]})}var le=e=>e.lastKnownBundleId,Y=e=>e.userId??e.username??`—`;function ue({error:e,onNext:t,onPrevious:n,onSelect:r,pageNumber:a,results:o,selectedInstallId:l}){let[u,d]=(0,q.useState)(!1),f=(0,q.useId)(),p=(0,q.useRef)(null),m=!e&&o&&o.data.length>0;return(0,J.jsxs)(B,{className:`min-h-0 min-w-0 shadow-sm`,children:[(0,J.jsx)(L,{className:`p-4 sm:px-6`,children:(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,J.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:(0,J.jsx)(z,{className:`text-sm font-medium`,children:(0,J.jsx)(`h2`,{children:`Matching installations`})})}),(0,J.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:m?(0,J.jsx)(c,{"aria-controls":f,"aria-expanded":u,"aria-label":u?`Hide matching installations`:`Show matching installations`,className:`size-11 lg:hidden`,onClick:()=>d(!u),ref:p,size:`icon-lg`,variant:`ghost`,children:(0,J.jsx)(M,{"aria-hidden":`true`,className:s(u&&`rotate-180`)})}):null})]})}),(0,J.jsxs)(R,{className:s(`min-h-0 p-0`,m&&!u&&`hidden lg:block`),id:f,children:[e?(0,J.jsx)(`div`,{className:`p-6`,children:(0,J.jsx)(_,{error:e instanceof Error?e:Error(),fallbackTitle:`Installation search unavailable`})}):o&&o.data.length>0?(0,J.jsx)(`ul`,{"aria-label":`Matching installations`,className:`divide-y`,children:o.data.map(e=>{let t=le(e),n=e.installId===l;return(0,J.jsx)(`li`,{children:(0,J.jsxs)(`button`,{"aria-label":`${Y(e)}, install ID ${e.installId}`,"aria-pressed":n,className:`group flex w-full min-w-0 flex-col gap-2 border-l-2 border-transparent px-4 py-4 text-left outline-none transition-colors hover:bg-muted/40 focus-visible:border-ring focus-visible:bg-muted/40 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/30 aria-pressed:border-primary aria-pressed:bg-muted/60 motion-reduce:transition-none sm:px-6`,onClick:()=>{r(e.installId),d(!1),p.current?.focus()},type:`button`,children:[(0,J.jsxs)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:[(0,J.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium`,children:Y(e)}),n?(0,J.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs font-medium text-primary`,children:[(0,J.jsx)(O,{"aria-hidden":`true`,className:`size-3.5`}),(0,J.jsx)(`span`,{className:`sr-only`,children:`Selected`})]}):null]}),(0,J.jsx)(`span`,{className:`flex flex-wrap items-center gap-2`,children:(0,J.jsx)(`span`,{className:`font-mono text-xs`,title:e.installId,children:N(e.installId)})}),(0,J.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Bundle`}),t?(0,J.jsx)(`span`,{className:`font-mono text-xs`,title:t,children:N(t)}):(0,J.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`—`})]})]})},e.installId)})}):(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 p-4 sm:px-6`,children:[(0,J.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No matches`}),(0,J.jsx)(`a`,{className:i({variant:`outline`,className:`h-11 px-3 lg:h-8`}),href:`#installation-history-search`,children:`Edit search`})]}),o&&(o.data.length>0||a>1||o.nextCursor)?(0,J.jsx)(b,{hasPrevious:a>1,label:`Installation results`,nextCursor:o.nextCursor,onNext:t,onPrevious:n,pageLength:o.data.length,pageNumber:a}):null]})]})}function de({draftQuery:e,onDraftQueryChange:t,onSubmit:n,onClear:r}){return(0,J.jsx)(`form`,{"aria-label":`Find installation`,onSubmit:t=>{t.preventDefault(),e.trim()&&n()},role:`search`,children:(0,J.jsxs)(A,{className:`gap-2`,children:[(0,J.jsx)(w,{className:`sr-only`,htmlFor:`installation-history-search`,children:`User ID or installation ID`}),(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsxs)(W,{className:`h-11 w-auto min-w-0 flex-1 basis-44 lg:h-8`,children:[(0,J.jsx)(H,{children:(0,J.jsx)(ae,{"aria-hidden":`true`})}),(0,J.jsx)(V,{autoComplete:`off`,className:`h-11 text-base md:text-base lg:h-8 lg:text-xs`,id:`installation-history-search`,maxLength:1024,name:`installation`,onChange:e=>t(e.target.value),placeholder:`User ID or installation ID`,spellCheck:!1,type:`search`,value:e}),e.length>0?(0,J.jsx)(H,{align:`inline-end`,children:(0,J.jsx)(U,{"aria-label":`Clear installation lookup`,className:`size-11 lg:size-5`,onClick:r,size:`icon-xs`,children:(0,J.jsx)(I,{"aria-hidden":`true`})})}):null]}),(0,J.jsx)(c,{"aria-label":`Find installation`,className:`h-11 px-3 lg:h-8`,disabled:e.trim().length===0,size:`lg`,type:`submit`,variant:`outline`,children:`Find`})]})]})})}function fe(){return(0,J.jsxs)(`div`,{className:`grid items-stretch gap-6 lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,J.jsx)(a,{className:`h-64 w-full lg:h-full`}),(0,J.jsx)(a,{className:`h-64 w-full lg:h-full`})]})}var pe=20,X=50,Z=()=>Date.now(),Q=(e,t)=>[...e,t??``],$=e=>({cursor:e?.at(-1)||void 0,stack:e.slice(0,-1)});function me(){let e=p.useSearch(),t=p.useNavigate(),[n,r]=(0,q.useState)(e.query??``),[i]=(0,q.useState)(Z),[a]=(0,q.useState)(Z),[o,s]=(0,q.useState)([]),[l,u]=(0,q.useState)([]),[f,m]=(0,q.useState)([]),h=e.query?.trim()??``,_=h.length>0,v=e.installId!==void 0,y=_||v,b=e.eventsBefore??i,x=e.historyBefore??a,C=(n,r=!1)=>{t({to:`/installations`,search:{...e,...n},replace:r})};(0,q.useEffect)(()=>{r(e.query??``)},[e.query]),(0,q.useEffect)(()=>{e.eventsBefore===void 0&&C({eventsBefore:b},!0)},[b,e.eventsBefore]),(0,q.useEffect)(()=>{v&&e.historyBefore===void 0&&C({historyBefore:x},!0)},[v,x,e.historyBefore]);let w=S({beforeReceivedAtMs:b,cursor:e.eventsCursor,limit:X},!y),T=ne({cursor:e.searchCursor,identity:h,limit:pe},_);(0,q.useEffect)(()=>{let e=T.data?.data[0]?.installId;!_||v||e===void 0||(m([]),C({historyBefore:Z(),historyCursor:void 0,installId:e},!0))},[_,v,T.data?.data]);let E=ee(e.installId??``,v),D=g({beforeReceivedAtMs:x,cursor:e.historyCursor,installId:e.installId??``,limit:X},v),O=E.data??T.data?.data.find(({installId:t})=>t===e.installId)??D.data?.data[0],k=y?`installation-history-${e.historyCursor??`first`}`:`all-events-${e.eventsCursor??`first`}`,A=(0,q.useRef)(null),j=K({id:k,getKey:d});(0,q.useLayoutEffect)(()=>{!y&&!w.isLoading&&A.current&&(A.current.scrollTop=j?.scrollY??0)},[w.isLoading,y,j?.scrollY,k]);let M=()=>{r(``),m([]),u([]),C({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:void 0,searchCursor:void 0})},N=(0,J.jsx)(de,{draftQuery:n,onClear:M,onDraftQueryChange:r,onSubmit:()=>{let e=n.trim();if(!e){M();return}m([]),u([]),C({historyBefore:void 0,historyCursor:void 0,installId:void 0,query:e,searchCursor:void 0})}});return(0,J.jsxs)(`div`,{className:`flex h-svh min-h-0 flex-col`,children:[(0,J.jsx)(re,{view:`events`}),(0,J.jsx)(`div`,{ref:A,"data-scroll-restoration-id":k,id:`insights-events-scroll`,className:`min-h-0 min-w-0 flex-1 overflow-y-auto bg-muted/5 p-3 sm:p-6`,children:(0,J.jsxs)(`div`,{className:`mx-auto flex w-full max-w-7xl flex-col gap-4 sm:gap-6`,children:[y?(0,J.jsx)(B,{className:`shadow-sm`,children:(0,J.jsxs)(R,{className:`flex flex-col gap-3 p-4 sm:p-6`,children:[(0,J.jsxs)(c,{className:`-ml-2 h-11 self-start lg:h-8`,onClick:M,variant:`ghost`,children:[(0,J.jsx)(ie,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Back to all events`]}),N]})}):null,y?T.isLoading&&_?(0,J.jsx)(fe,{}):(0,J.jsxs)(`div`,{className:`grid min-h-0 min-w-0 items-stretch gap-4 sm:gap-6 ${_?`lg:min-h-96 lg:grid-cols-[minmax(18rem,20rem)_minmax(0,1fr)]`:`lg:grid-cols-1`}`,children:[_?(0,J.jsx)(ue,{error:T.error,onNext:()=>{T.data?.nextCursor&&(u(Q(l,e.searchCursor)),C({installId:void 0,searchCursor:T.data.nextCursor},!0))},onPrevious:()=>{let e=$(l);u(e.stack),C({installId:void 0,searchCursor:e.cursor},!0)},onSelect:e=>{m([]),C({historyBefore:Z(),historyCursor:void 0,installId:e})},pageNumber:l.length+1,results:T.data,selectedInstallId:e.installId}):null,(0,J.jsx)(ce,{error:D.error??E.error,history:D.data,isLoading:D.isLoading||E.isLoading,onNext:()=>{D.data?.nextCursor&&(m(Q(f,e.historyCursor)),C({historyCursor:D.data.nextCursor},!0))},onPrevious:()=>{let e=$(f);m(e.stack),C({historyCursor:e.cursor},!0)},onRefresh:()=>{m([]),C({historyBefore:Z(),historyCursor:void 0},!0)},pageNumber:f.length+1,selectedEvent:O,selectedInstallId:e.installId})]}):(0,J.jsx)(te,{error:w.error,eventsLocation:{eventsBefore:b,eventsCursor:e.eventsCursor},history:w.data,isFetching:w.isFetching,isLoading:w.isLoading,onNext:()=>{w.data?.nextCursor&&(s(Q(o,e.eventsCursor)),C({eventsCursor:w.data.nextCursor},!0))},onPrevious:()=>{let e=$(o);s(e.stack),C({eventsCursor:e.cursor},!0)},onRefresh:()=>{s([]),C({eventsBefore:Z(),eventsCursor:void 0},!0)},pageNumber:o.length+1,children:N})]})},k)]})}export{me as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dr as e,Zn as t,br as n,kr as r,wr as i}from"./createServerFn-CA8fs7QD.js";import{F as a,_ as o,g as s,n as c,p as l,r as u,s as d,t as f,z as p}from"./link-CI8idAUi.js";var m=`__root__`,h=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=m:this.parentRoute||i();let r=n?m:t?.path;r&&r!==`/`&&(r=s(r));let a=t?.id||r,c=n?m:l([this.parentRoute.id===`__root__`?``:this.parentRoute.id,a]);r===`__root__`&&(r=`/`),c!==`__root__`&&(c=l([`/`,c]));let u=c===`__root__`?`/`:l([this.parentRoute.fullPath,r]);this._path=r,this._id=c,this._fullPath=u,this._to=o(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>n({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},g=class extends h{constructor(e){super(e)}},_=r(e(),1),v=_.createContext(void 0),y=_.createContext(void 0),b={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function x(e){let t=u(),n=_.useContext(e.from?y:v),r=e.from??n,a=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=_.useRef(void 0);return c(a??b,n=>{if((e.shouldThrow??!0)&&!n&&i(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=p(o.current,r);return o.current=e,e}return r})}function S(e){return x({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function C(e){let{select:t,...n}=e;return x({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function w(e){return x({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function T(e){return x({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function E(e){let t=u();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function D(e){return x({...e,select:t=>e.select?e.select(t.context):t.context})}var O=t(),k=class extends h{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function A(e){return new k(e)}function j(){return e=>N(e)}var M=class extends g{constructor(e){super(e),this.useMatch=e=>x({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>D({...e,from:this.id}),this.useSearch=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>w({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>C({...e,from:this.id}),this.useLoaderData=e=>S({...e,from:this.id}),this.useNavigate=()=>E({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,O.jsx)(f,{ref:t,from:this.fullPath,...e}))}};function N(e){return new M(e)}function P(e){return new F(e,{silent:!0}).createRoute}var F=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=A(e);return t.isRoot=!1,t},this.silent=t?.silent}};function I(e,t){let n,r,i,o,s=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,a(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(d)d(s());else throw s();return _.createElement(r,e)};return c.preload=s,c}export{m as a,v as i,P as n,j as r,I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dr as e,Er as t,Kn as n,Zn as r,kr as i,wr as a}from"./createServerFn-CA8fs7QD.js";function o(e){return e[e.length-1]}function s(e){return typeof e==`function`}function c(e,t){return s(e)?e(t):e}var l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;function d(e){for(let t in e)if(l.call(e,t))return!0;return!1}var f=()=>Object.create(null),p=(e,t)=>m(e,t,f);function m(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=v(e)&&v(i);if(!a&&!(g(e)&&g(i)))return i;let o=a?e:h(e);if(!o)return i;let s=a?i:h(i);if(!s)return i;let c=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;t<u;t++){let o=a?t:s[t],u=e[o],p=i[o];if(u===p){d[o]=u,(a?t<c:l.call(e,o))&&f++;continue}if(u===null||p===null||typeof u!=`object`||typeof p!=`object`){d[o]=p;continue}let h=m(u,p,n,r+1);d[o]=h,h===u&&f++}return c===u&&f===c?e:d}function h(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!u.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!u.call(e,t))return!1;r.push(t)}return r}function g(e){if(!_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!_(n)||!n.hasOwnProperty(`isPrototypeOf`))}function _(e){return Object.prototype.toString.call(e)===`[object Object]`}function v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function y(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!y(e[r],t[r],n))return!1;return!0}if(g(e)&&g(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!y(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!y(e[o],t[o],n)))return!1;return i===a}return!1}function b(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function x(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function S(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function C(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function w(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return C(t)}var T=[`http:`,`https:`,`mailto:`,`tel:`];function ee(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var E={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},D=/[&><\u2028\u2029]/g;function O(e){return e.replace(D,e=>E[e])}function te(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=w(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=w(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ne(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function re(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,ie=5;function ae(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function oe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ae(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function j(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=oe(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=N(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=N(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=P(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=N(n.fullPath??n.from);e.kind=ie,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=N(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)j(e,t,r,s,i,a,o)}function se(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function M(e){if(e.pathless)for(let t of e.pathless)M(t);if(e.static)for(let t of e.static.values())M(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())M(t);if(e.dynamic?.length){e.dynamic.sort(se);for(let t of e.dynamic)M(t)}if(e.optional?.length){e.optional.sort(se);for(let t of e.optional)M(t)}if(e.wildcard?.length){e.wildcard.sort(se);for(let t of e.wildcard)M(t)}}function N(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function P(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function F(e,t){let n=N(`/`),r=new Uint16Array(6);for(let t of e)j(!1,r,t,1,n,0);M(n),t.masksTree=n,t.flatCache=k(1e3)}function I(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=z(e,t.masksTree);return t.flatCache.set(e,r),r}function ce(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(`/`),j(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),z(r,o,n)}function le(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=z(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=V(a.route)),t.matchCache.set(r,a),a}function L(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function R(e,t=!1,n){let r=N(e.fullPath),i=new Uint16Array(6),o={},s={},c=0;return j(t,i,e,1,r,0,e=>{if(n?.(e,c),e.id in o&&a(),o[e.id]=e,c!==0&&e.path){let t=L(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++}),M(r),{processedTree:{segmentTree:r,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function z(e,t,n=!1){let r=e.split(`/`),i=ue(e,r,t,n);if(!i)return null;let[a]=B(e,r,i);return{route:i.node.route,rawParams:a}}function B(e,t,n){let r=H(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===ie){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function V(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function H(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ue(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!o(t),a=i&&e!==`/`,s=t.length-+!!i,c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:o,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!K(u,n))continue;if(i.parse){if(!G(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&K(l,n)&&(l=n);let v=o===s;if(v&&(i.route&&(!a||i.kind===A||i.kind===2)&&K(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[o],b;if(v&&i.index){let n={node:i.index,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(G(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&W(p,s))return n;K(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(o).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}c.push({node:n,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];c.push({node:r,index:o,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}c.push({node:n,index:o+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+U(s,o),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:o+1,skipped:d,depth:f+1,statics:p,dynamics:m+U(s,o),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:o+1,skipped:d,depth:f+1,statics:p+U(s,o),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:o,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function U(e,t){return 2**(e-t-1)}function W(e,t){return e===2**(t-1)-1}function G(e,t,n){let r,i;try{[r,i]=B(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function K(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function q(e){return J(e.filter(e=>e!==void 0).join(`/`))}function J(e){return e.replace(/\/{2,}/g,`/`)}function de(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Y(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function fe(e){return Y(de(e))}function X(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function pe(e,t,n){return X(e,n)===X(t,n)}function me({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,s;if(r){s=i?t:a?e:e+`\0`+t;let n=r.get(s);if(n)return n}let c;if(a)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&o(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&c.push(r):c=[r]:r===`..`?c.pop():r===`.`||c.push(r)}}c.length>1&&(o(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=J(c.join(`/`))||`/`;return s&&r&&r.set(s,l),l}function he(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function ge(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>ve(e,n)).join(`/`):ve(r,n):r}function _e({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=oe(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=ge(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ge(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function ve(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ye=`Error preloading route! ☝️`,Z=i(e(),1),be=Z.use,xe=typeof window<`u`?Z.useLayoutEffect:Z.useEffect;function Se(e){let t=Z.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ce(e,t,n={},r={}){Z.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function we(e){let t=Z.useRef(null);return Z.useImperativeHandle(e,()=>t.current,[]),t}var Te=r();function Ee({children:e,fallback:t=null}){return De()?(0,Te.jsx)(Z.Fragment,{children:e}):(0,Te.jsx)(Z.Fragment,{children:t})}function De(){return Z.useSyncExternalStore(Oe,()=>!0,()=>!1)}function Oe(){return()=>{}}var ke=Z.createContext(null);function Ae(e){return Z.useContext(ke)}var je=n();function Me(e,t){return e===t}function Ne(e,t,n=Me){let r=(0,Z.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,Z.useCallback)(()=>e?.get(),[e]);return(0,je.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Pe=i(t(),1);function Fe(e,t){let n=Ae(),r=we(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:v,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:te,params:ne,search:re,hash:k,state:A,mask:ie,reloadDocument:ae,unsafeRelative:oe,from:j,_fromLocation:se,...M}=e,N=De(),P=Z.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),F=Ne(n.stores.location,e=>e,(e,t)=>e.href===t.href),I=Z.useMemo(()=>{let e={_fromLocation:F,...P};return n.buildLocation(e)},[n,F,P]),ce=I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,le=I.maskedLocation?I.maskedLocation.external:I.external,L=Z.useMemo(()=>He(ce,le,n.history,b),[b,le,ce,n.history]),R=Z.useMemo(()=>{if(L?.external)return ee(L.href,n.protocolAllowlist)?void 0:L.href;if(!Ue(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),ee(s,n.protocolAllowlist)?void 0:s}catch{}},[s,L,n.protocolAllowlist]),z=Z.useMemo(()=>{if(R)return!1;if(o?.exact){if(!pe(F.pathname,I.pathname,n.basepath))return!1}else{let e=X(F.pathname,n.basepath),t=X(I.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!y(F.search,I.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?N&&F.hash===I.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,F,R,N,I.hash,I.pathname,I.search,n.basepath]),B=z?c(i,{})??Le:Ie,V=z?Ie:c(a,{})??Ie,H=[S,B.className,V.className].filter(Boolean).join(` `),ue=(x||B.style||V.style)&&{...x,...B.style,...V.style},[U,W]=Z.useState(!1),G=Z.useRef(!1),K=e.reloadDocument||R?!1:l??n.options.defaultPreload,q=u??n.options.defaultPreloadDelay??0,J=Z.useCallback(()=>{n.preloadRoute({...P,_builtLocation:I}).catch(e=>{console.warn(e),console.warn(ye)})},[n,P,I]);Ce(r,Z.useCallback(e=>{e?.isIntersecting&&J()},[J]),Ve,{disabled:!!b||K!==`viewport`}),Z.useEffect(()=>{G.current||!b&&K===`render`&&(J(),G.current=!0)},[b,J,K]);let de=e=>{let t=e.currentTarget.getAttribute(`target`),r=v===void 0?t:v;if(!b&&!Ge(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Pe.flushSync)(()=>{W(!0)});let t=n.subscribe(`onResolved`,()=>{t(),W(!1)});n.navigate({...P,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:te})}};if(R)return{...M,ref:r,href:R,..._&&{children:_},...v&&{target:v},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let Y=e=>{if(b||K!==`intent`)return;if(!q){J();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),J()},q);Q.set(t,n)},fe=e=>{b||K!==`intent`||J()},me=e=>{if(b||!K||!q)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...M,...B,...V,href:L?.href,ref:r,onClick:$([C,de]),onBlur:$([w,me]),onFocus:$([T,Y]),onMouseEnter:$([E,Y]),onMouseLeave:$([D,me]),onTouchStart:$([O,fe]),disabled:!!b,target:v,...ue&&{style:ue},...H&&{className:H},...b&&Re,...z&&ze,...N&&U&&Be}}var Ie={},Le={className:`active`},Re={role:`link`,"aria-disabled":!0},ze={"data-status":`active`,"aria-current":`page`},Be={"data-transitioning":`transitioning`},Q=new WeakMap,Ve={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function He(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ue(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var We=Z.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Fe(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return Z.createElement(`a`,t,o)}return Z.createElement(n,a,o)});function Ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{ne as A,R as C,b as D,re as E,x as F,S as I,o as L,c as M,d as N,te as O,ee as P,p as R,F as S,T,Y as _,Ee as a,le as b,xe as c,he as d,_e as f,de as g,fe as h,ke as i,O as j,y as k,Se as l,me as m,Ne as n,De as o,q as p,Ae as r,be as s,We as t,J as u,V as v,k as w,ce as x,I as y,m as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$n as e,Dr as t,Gn as n,Xn as r,ar as i,er as a,fr as o,gr as s,kr as c,lr as l,nr as u,pr as d}from"./createServerFn-CA8fs7QD.js";var f=class extends e{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||p(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=a({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),u.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function p(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var m=class extends s{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),o(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&i(t.mutationKey)!==i(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??p();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){u.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},h=c(t(),1);function g(e,t){let n=r(t),[i]=h.useState(()=>new m(n,e));h.useEffect(()=>{i.setOptions(e)},[i,e]);let a=h.useSyncExternalStore(h.useCallback(e=>i.subscribe(u.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=h.useCallback((e,t)=>{i.mutate(e,t).catch(l)},[i]);if(a.error&&d(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var _=n(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]);export{g as n,f as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Gn as e}from"./createServerFn-CA8fs7QD.js";var t=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]);export{t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-DTlwOr8I.js","assets/createServerFn-CA8fs7QD.js","assets/dialog-CUTrcPlB.js","assets/composite-Bp98A0Ld.js","assets/x-DCd0j8c6.js","assets/useCompositeListItem-CHLITE_4.js","assets/loader-circle-BoxLrsOu.js","assets/link-CI8idAUi.js","assets/table-2vcV89QB.js","assets/HashValueDisplay-CB0Eskit.js","assets/dist-C_NydL0e.js","assets/card-Dhr_eFYj.js","assets/input-group-cSOG4wh_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Gn as e}from"./createServerFn-CA8fs7QD.js";import{n as t,t as n}from"./lazyRouteComponent-Ccp3bwBY.js";import{t as r}from"./preload-helper-CQ36nxok.js";var i=e(`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`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),a=e=>typeof e==`string`&&e.trim().length>0?e.trim():void 0;function o(e){let t=typeof e.page==`number`?e.page:typeof e.page==`string`?Number(e.page):void 0,n=a(e.beforeReleaseId),r=n?void 0:a(e.afterReleaseId),i=e.enabled===!0||e.enabled===`true`?!0:e.enabled===!1||e.enabled===`false`?!1:void 0;return{afterReleaseId:r,beforeReleaseId:n,bundleId:a(e.bundleId),channelId:a(e.channelId),enabled:i,page:t!==void 0&&Number.isInteger(t)&&t>1?t:void 0,platform:e.platform===`ios`||e.platform===`android`?e.platform:void 0,releaseId:a(e.releaseId),targetAppVersion:a(e.targetAppVersion)}}function s(e,t){return{...e,...t,afterReleaseId:void 0,beforeReleaseId:void 0,page:void 0,releaseId:void 0}}var c=t(`/`)({component:n(()=>r(()=>import(`./routes-DTlwOr8I.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),`component`),validateSearch:o});export{s as n,i as r,c as t};
|