expo-device-hub 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/_expo/static/js/web/{index-9d93e1d9e55e5bd5baa8b2a91749e86f.js → index-7a1b828737986b293cdcc63c4dfbdf18.js} +186 -183
- package/dist/client/index.html +4 -1
- package/dist/server/cli.mjs +70 -2
- package/dist/server/index.mjs +257 -43
- package/package.json +6 -1
- package/vendor/serve-emu/dist/cli.js +123 -3
- package/vendor/serve-emu/dist/middleware.js +197 -23
- package/vendor/serve-emu/dist/origin-policy.js +54 -0
- package/vendor/serve-emu/dist/request-body.js +36 -0
- package/vendor/serve-emu/dist/server.js +14 -4
- package/vendor/serve-emu/dist/stream-settings.js +38 -0
- package/vendor/serve-emu/dist/webrtc-publisher.js +568 -0
- package/vendor/serve-emu/dist/webrtc-signaling.js +48 -0
- package/vendor/serve-sim/NOTICE +12 -0
- package/vendor/serve-sim/dist/middleware.js +61 -53
- package/vendor/serve-sim/dist/native/serve-sim-native.node +0 -0
- package/vendor/serve-sim/dist/serve-sim.js +88 -79
|
@@ -188,10 +188,10 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
188
188
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.installOnUIRuntime=function(t){const o=globalThis?.expo?.installOnUIRuntime;if(!o)throw Error("Native method to install Expo Modules on the worklets UI runtime wasn't found in `expo-modules-core`.");o(t)}},142,[]);
|
|
189
189
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useEvent=function(u,s,c=null){const[o,f]=(0,t.useState)(c);return n(u,s,t=>f(t)),o},e.useEventListener=n;var t=r(d[0]);function n(n,u,s){const c=(0,t.useRef)(s);c.current=s,(0,t.useEffect)(()=>{const t=n.addListener(u,(...t)=>c.current(...t));return()=>t.remove()},[n,u,c])}},143,[38]);
|
|
190
190
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]);function l(){return(0,n.jsx)(u.default,{dom:{scrollEnabled:!1}})}},144,[145,151]);
|
|
191
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return
|
|
191
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return I}}),r(d[0]),r(d[1]);var t=r(d[2]),o=r(d[3]),s=r(d[4]),n=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),v=r(d[10]),f=r(d[11]),p=r(d[12]),b=r(d[13]),D=r(d[14]),S=r(d[15]),O=r(d[16]),w=r(d[17]),y=r(d[18]),M=r(d[19]),k=r(d[20]);function x(t,o){const s=new Set(t.map(t=>t.id));return[...t,...o.filter(t=>!s.has(t.id))]}const j=280,A=560,R=320;function C(t,o){const s=('undefined'==typeof window?1/0:window.innerWidth)-o-R,n=Math.max(j,Math.min(A,s));return Math.min(Math.max(t,j),n)}function I(j){const A=(0,f.useColorScheme)(),I=(0,l.dashboardHideBootDevice)(),T=(0,M.dashboardPlatformFilter)(),{booted:L,recent:W}=(0,p.useDeviceLists)(),E=(0,S.useNewDeviceOptions)(),z=(0,v.useHideUnsupportedDevices)(),H=(0,h.useDashboardStore)(t=>t.selectedDeviceId),_=(0,h.useDashboardStore)(t=>t.selectDevice),F=(0,h.useDashboardStore)(t=>t.reconcileSelectedDevice),P=(0,h.useDashboardStore)(t=>t.addedDevices),U=(0,h.useDashboardStore)(t=>t.trackAddedDevice),N=(0,h.useDashboardStore)(t=>t.dismissDevice),B=(0,s.useMemo)(y.browserStreamModeAvailability,[]),q=(0,h.useDashboardStore)(t=>t.streamMode),G=(0,h.useDashboardStore)(t=>t.chooseStreamMode),[J,K]=(0,s.useState)(()=>'mjpeg'===q?'mjpeg':'h264'===q?'h264':'auto'),Q=(0,h.useDashboardStore)(t=>t.sidebarWidths.left),V=(0,h.useDashboardStore)(t=>t.sidebarWidths.right),X=(0,h.useDashboardStore)(t=>t.resizeSidebar),Y=(0,s.useRef)(h.DEFAULT_SIDEBAR_WIDTH),Z=(0,s.useRef)(h.DEFAULT_SIDEBAR_WIDTH),$=(0,w.useSidebarLayout)({leftWidth:Q,rightWidth:V,minStreamWidth:R}),ee=(0,s.useMemo)(()=>'android'===T?[]:x(L.simulators,P.filter(t=>'ios'===t.platform)),[L.simulators,P,T]),te=(0,s.useMemo)(()=>'ios'===T?[]:x(L.emulators,P.filter(t=>'android'===t.platform)),[L.emulators,P,T]),ie=(0,s.useMemo)(()=>(0,v.visibleDevices)(W.simulators,z),[W.simulators,z]),oe=(0,s.useMemo)(()=>(0,v.visibleDevices)(W.emulators,z),[W.emulators,z]),re=(0,s.useMemo)(()=>(0,v.visibleNewDeviceOptions)(E.ios,z),[E.ios,z]),se=(0,s.useMemo)(()=>(0,v.visibleNewDeviceOptions)(E.android,z),[E.android,z]);async function de(t){const o='new'===t.kind?await(0,u.createDevice)(t.device):t.device.booted?{id:t.device.id,error:null}:await(0,u.bootDevice)(t.device);if(!o.id)return{ok:!1,error:o.error??'The device did not come online.'};const s='new'===t.kind?{id:o.id,name:t.device.name,version:t.device.version,platform:t.device.platform,physical:!1,booted:!0,supported:t.device.supported,lastUsedAt:Date.now()}:Object.assign({},t.device,{id:o.id,booted:!0,lastUsedAt:Date.now()}),n='new'===t.kind?[t.device.name,o.id]:[t.device.name,t.device.id,o.id];return U(s,n),{ok:!0}}async function ae(t){await(0,u.shutdownDevice)(t),N(t.id)}async function ne(t){await(0,u.removeDevice)(t),N(t.id)}(0,s.useEffect)(()=>{const t=document.documentElement;return t.classList.toggle('dark-theme','dark'===A),()=>t.classList.remove('dark-theme')},[A]),(0,s.useEffect)(()=>{const t=[...ee,...te];F(t.map(t=>t.id))},[ee,te,F]);const le=[...ee,...te],ce=le.find(t=>t.id===H)??le[0],ue='android'===ce?.platform?(0,y.androidStreamModeAvailability)(B,void 0!==window.MediaSource):B,me=t=>{G(t,ue)},he=(0,t.useActiveDeviceClient)(ce?{platform:ce.platform,device:ce.id,streamMode:q}:null,(0,c.basePath)()),ve=(0,D.useArgentInteractions)(),fe=ce?ve[ce.id]??null:null,ge=Object.keys(ve);return(0,k.jsxs)("div",{ref:$.containerRef,className:'dark'===A?'dark-theme':void 0,style:{display:'flex',position:'relative',flex:1,width:'100%',minWidth:0,height:'100vh',boxSizing:'border-box',backgroundColor:o.bg.subtle,color:o.text.default,fontFamily:'var(--expo-font-sans)',overflow:'hidden'},children:[(0,k.jsx)(n.AnimatedDockedSidebar,{side:"left",width:Q,open:$.leftDocked,sidebarOpen:$.leftOpen,children:(0,k.jsx)(o.Sidebar,{simulators:ee,emulators:te,recentSimulators:ie,recentEmulators:oe,simulatorOptions:re,emulatorOptions:se,agentDeviceIds:ge,selectedId:H,onSelect:_,onAddDevice:I?void 0:de,onToggle:$.closeLeft,platform:T,width:Q})}),$.leftDocked&&(0,k.jsx)(o.ResizeHandle,{side:"left",offset:Q,onResizeStart:()=>{Y.current=Q},onResize:t=>X('left',C(Y.current+t,$.rightDocked?V:0))}),ce?(0,k.jsx)(o.StreamPanel,{device:ce,client:he,agentInteraction:fe,DeviceScreen:t.DeviceScreen,displayScreen:t.displayScreen,onShutdown:()=>ae(ce),onRemove:()=>ne(ce),framed:$.containerWidth>=600}):(0,k.jsx)(o.EmptyState,{platform:T}),$.rightDocked&&(0,k.jsx)(o.ResizeHandle,{side:"right",offset:V,onResizeStart:()=>{Z.current=V},onResize:t=>X('right',C(Z.current+t,$.leftDocked?Q:0))}),(0,k.jsx)(n.AnimatedDockedSidebar,{side:"right",width:V,open:$.rightDocked,sidebarOpen:$.rightOpen,children:(0,k.jsx)(o.LogSidebar,{client:he,streamMode:q,httpCodec:J,streamModeAvailability:ue,onStreamModeChange:me,onHttpCodecChange:K,onToggle:$.closeRight,width:V})}),(0,k.jsx)(O.SidebarOverlay,{side:"left",open:$.leftOverlay,sidebarOpen:$.leftOpen,topmost:'left'===$.lastOpened||!$.rightOverlay,onDismiss:$.closeLeft,children:(0,k.jsx)(o.Sidebar,{simulators:ee,emulators:te,recentSimulators:ie,recentEmulators:oe,simulatorOptions:re,emulatorOptions:se,agentDeviceIds:ge,selectedId:H,onSelect:_,onAddDevice:I?void 0:de,onToggle:$.closeLeft,platform:T,width:Q})}),(0,k.jsx)(O.SidebarOverlay,{side:"right",open:$.rightOverlay,sidebarOpen:$.rightOpen,topmost:'right'===$.lastOpened||!$.leftOverlay,onDismiss:$.closeRight,children:(0,k.jsx)(o.LogSidebar,{client:he,streamMode:q,httpCodec:J,streamModeAvailability:ue,onStreamModeChange:me,onHttpCodecChange:K,onToggle:$.closeRight,width:V})}),!$.leftOpen&&(0,k.jsx)(b.FloatingSidebarToggle,{side:"left",inset:(0,b.floatingSidebarToggleInset)($.rightOverlay,$.containerWidth,V),onClick:$.openLeft}),!$.rightOpen&&(0,k.jsx)(b.FloatingSidebarToggle,{side:"right",inset:(0,b.floatingSidebarToggleInset)($.leftOverlay,$.containerWidth,Q),onClick:$.openRight})]})}},145,[146,147,148,181,38,322,324,325,327,329,336,337,338,340,341,344,345,346,335,347,151]);
|
|
192
192
|
__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, dependencyMap) {},146,[]);
|
|
193
193
|
__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, dependencyMap) {},147,[]);
|
|
194
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DeviceScreen",{enumerable:!0,get:function(){return n.DeviceScreen}}),Object.defineProperty(e,"AGENT_INTERACTION_IDLE_TIMEOUT_MS",{enumerable:!0,get:function(){return c.AGENT_INTERACTION_IDLE_TIMEOUT_MS}}),Object.defineProperty(e,"agentInteractionCursorExpiresAt",{enumerable:!0,get:function(){return c.agentInteractionCursorExpiresAt}}),Object.defineProperty(e,"agentInteractionEndMs",{enumerable:!0,get:function(){return c.agentInteractionEndMs}}),Object.defineProperty(e,"agentInteractionPointsAt",{enumerable:!0,get:function(){return c.agentInteractionPointsAt}}),Object.defineProperty(e,"displayScreen",{enumerable:!0,get:function(){return u.displayScreen}}),Object.defineProperty(e,"streamGeometry",{enumerable:!0,get:function(){return u.streamGeometry}}),Object.defineProperty(e,"useIosDeviceClient",{enumerable:!0,get:function(){return o.useIosDeviceClient}}),Object.defineProperty(e,"useAndroidDeviceClient",{enumerable:!0,get:function(){return f.useAndroidDeviceClient}}),Object.defineProperty(e,"useActiveDeviceClient",{enumerable:!0,get:function(){return b.useActiveDeviceClient}});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]),c=r(d[2]),u=r(d[3]),o=r(d[4]),f=r(d[5]),b=r(d[6])},148,[149,150,155,153,157,
|
|
194
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DeviceScreen",{enumerable:!0,get:function(){return n.DeviceScreen}}),Object.defineProperty(e,"AGENT_INTERACTION_IDLE_TIMEOUT_MS",{enumerable:!0,get:function(){return c.AGENT_INTERACTION_IDLE_TIMEOUT_MS}}),Object.defineProperty(e,"agentInteractionCursorExpiresAt",{enumerable:!0,get:function(){return c.agentInteractionCursorExpiresAt}}),Object.defineProperty(e,"agentInteractionEndMs",{enumerable:!0,get:function(){return c.agentInteractionEndMs}}),Object.defineProperty(e,"agentInteractionPointsAt",{enumerable:!0,get:function(){return c.agentInteractionPointsAt}}),Object.defineProperty(e,"displayScreen",{enumerable:!0,get:function(){return u.displayScreen}}),Object.defineProperty(e,"streamGeometry",{enumerable:!0,get:function(){return u.streamGeometry}}),Object.defineProperty(e,"useIosDeviceClient",{enumerable:!0,get:function(){return o.useIosDeviceClient}}),Object.defineProperty(e,"useAndroidDeviceClient",{enumerable:!0,get:function(){return f.useAndroidDeviceClient}}),Object.defineProperty(e,"useActiveDeviceClient",{enumerable:!0,get:function(){return b.useActiveDeviceClient}});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]),c=r(d[2]),u=r(d[3]),o=r(d[4]),f=r(d[5]),b=r(d[6])},148,[149,150,155,153,157,173,179]);
|
|
195
195
|
__d(function(g,r,i,a,m,e,d){},149,[]);
|
|
196
196
|
__d(function(g,_r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceScreen=function({client:a,borderRadius:l,squircle:p,agentInteraction:f}){const{videoKind:v,attachVideo:h,sendTouch:b,sendMultiTouch:y,sendKey:x,screen:w,status:j,error:I}=a,E=!!y,C=(0,n.useRef)(null),[R,k]=(0,n.useState)(null),D=(0,n.useRef)(new Map),O=(0,n.useCallback)(()=>{for(const t of D.current.values())x(Object.assign({},t,{phase:'up',repeat:!1}));D.current.clear()},[x]);(0,n.useEffect)(()=>{const t=()=>O(),n=()=>{document.hidden&&O()};return window.addEventListener('blur',t),document.addEventListener('visibilitychange',n),()=>{window.removeEventListener('blur',t),document.removeEventListener('visibilitychange',n),O()}},[O]);const M=(t,n)=>({phase:n,code:t.code,key:t.key,repeat:t.repeat});(0,n.useEffect)(()=>{const t=C.current;if(!t||'undefined'==typeof ResizeObserver)return;const n=new ResizeObserver(t=>{const n=t[0]?.contentRect;n&&k({w:n.width,h:n.height})});return n.observe(t),()=>n.disconnect()},[]);const P=(0,n.useRef)(new Map),S=(0,n.useRef)('none'),F=(0,n.useRef)(null),K=(0,n.useRef)(!1),T=(0,n.useRef)({x:0,y:0}),[A,z]=(0,n.useState)(null),L=(0,n.useRef)({}),_=(0,n.useRef)(0),U=()=>{_.current=0;const t=L.current;L.current={},t.single&&b(Object.assign({phase:'move'},t.single)),t.multi&&(y?.(t.multi),z({a:t.multi.a,b:t.multi.b}))},X=()=>{_.current||(_.current=requestAnimationFrame(U))},Y=(t,n)=>{const r=C.current?.getBoundingClientRect();return r&&0!==r.width&&0!==r.height?{x:s((t-r.left)/r.width),y:s((n-r.top)/r.height)}:null},$=t=>K.current?{x:s(t.x+T.current.x),y:s(t.y+T.current.y)}:{x:1-t.x,y:1-t.y},q=(t,n)=>{_.current&&(cancelAnimationFrame(_.current),_.current=0),L.current={},y?.({phase:'end',a:t,b:n}),z(null)},B=t=>{const n=P.current.get(t.pointerId);if(!n)return;t.preventDefault();const r=Y(t.clientX,t.clientY)??n;try{C.current?.releasePointerCapture(t.pointerId)}catch{}if('alt'===S.current)return q(r,$(r)),S.current='none',void P.current.clear();if('two'===S.current){const[t,n]=[...P.current.values()];return q(t??r,n??r),S.current='none',void P.current.clear()}'single'===S.current&&t.pointerId===F.current&&(_.current&&(cancelAnimationFrame(_.current),_.current=0),L.current={},b(Object.assign({phase:'end'},r)),S.current='none',F.current=null),P.current.delete(t.pointerId)},G=(0,r.streamGeometry)(w).rotationDegrees,N=90===Math.abs(G),V=Object.assign({position:'relative',width:'100%',height:'100%',overflow:'hidden',backgroundColor:'#000',borderRadius:l},p?{cornerShape:'superellipse(1.3)'}:{}),W=0===G?{display:'block',position:'absolute',inset:0,width:'100%',height:'100%',objectFit:'cover'}:{display:'block',position:'absolute',top:'50%',left:'50%',width:N&&R?`${R.h}px`:'100%',height:N&&R?`${R.w}px`:'100%',transform:`translate(-50%, -50%) rotate(${G}deg)`,transformOrigin:'center center',objectFit:'cover'};return Object.assign(W,{userSelect:'none',WebkitUserSelect:'none',pointerEvents:'none'}),(0,t.jsxs)("div",{style:V,children:['canvas'===v?(0,t.jsx)("canvas",{ref:h,style:W}):'video'===v?(0,t.jsx)("video",{ref:h,autoPlay:!0,muted:!0,playsInline:!0,style:W}):(0,t.jsx)("img",{ref:h,alt:"Device screen",draggable:!1,style:W}),(0,t.jsx)("div",{ref:C,role:"application","aria-label":"Interactive device screen. Focus to control it with your keyboard. Press Shift and Escape to stop keyboard control.",tabIndex:0,style:{position:'absolute',inset:0,cursor:u,touchAction:'none',borderRadius:l,outline:'none'},onBlur:()=>{O()},onKeyDown:t=>{if('Escape'===t.key&&t.shiftKey)return t.preventDefault(),O(),void t.currentTarget.blur();if(t.nativeEvent.isComposing)return;const n=M(t,'down');if(!x(n))return;t.preventDefault(),D.current.set(t.code||t.key,n)},onKeyUp:t=>{const n=t.code||t.key,r=D.current.delete(n),o=x(M(t,'up'));(r||o)&&t.preventDefault()},onPointerDown:t=>{if('mouse'===t.pointerType&&0!==t.button)return;const n=Y(t.clientX,t.clientY);if(!n)return;t.preventDefault(),C.current?.focus({preventScroll:!0});try{C.current?.setPointerCapture(t.pointerId)}catch{}if(P.current.set(t.pointerId,n),E&&'mouse'===t.pointerType&&t.altKey&&'none'===S.current){S.current='alt',K.current=t.shiftKey,T.current={x:1-2*n.x,y:1-2*n.y};const r=$(n);return z({a:n,b:r}),void y?.({phase:'begin',a:n,b:r})}if(E&&P.current.size>=2&&'alt'!==S.current){'single'===S.current&&(b(Object.assign({phase:'end'},n)),F.current=null);const[t,r]=[...P.current.values()];return S.current='two',z({a:t,b:r}),void y?.({phase:'begin',a:t,b:r})}'none'===S.current&&(S.current='single',F.current=t.pointerId,b(Object.assign({phase:'begin'},n)))},onPointerMove:t=>{if(!P.current.get(t.pointerId))return;const n=t.nativeEvent,r='function'==typeof n.getCoalescedEvents?n.getCoalescedEvents():null,o=r&&r.length>0?r[r.length-1]:t,c=Y(o.clientX,o.clientY);if(!c)return;if(t.preventDefault(),P.current.set(t.pointerId,c),'alt'===S.current)L.current.multi={phase:'move',a:c,b:$(c)},X();else if('two'===S.current){const[t,n]=[...P.current.values()];L.current.multi={phase:'move',a:t,b:n},X()}else'single'===S.current&&t.pointerId===F.current&&(L.current.single=c,X())},onPointerUp:B,onPointerCancel:B,onContextMenu:t=>t.preventDefault()}),A&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.TouchIndicator,{point:A.a}),(0,t.jsx)(c.TouchIndicator,{point:A.b})]}),(0,t.jsx)(o.AgentInteractionIndicator,{interaction:f}),'streaming'!==j&&(0,t.jsx)("div",{style:{position:'absolute',inset:0,display:'flex',alignItems:'center',justifyContent:'center',padding:24,textAlign:'center',pointerEvents:'none',backgroundColor:'rgba(0, 0, 0, 0.55)',color:'error'===j?'#fca5a5':'rgba(255, 255, 255, 0.7)',fontSize:13,fontFamily:'var(--expo-font-mono)'},children:'error'===j?I??'Disconnected':'connecting'===j?'Connecting\u2026':'Not connected'})]})};var t=_r(d[0]),n=_r(d[1]),r=_r(d[2]),o=_r(d[3]),c=_r(d[4]);const s=t=>Math.min(1,Math.max(0,t)),u="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='9' fill='rgba(255,255,255,0.45)' stroke='rgba(0,0,0,0.55)' stroke-width='1.25'/%3E%3C/svg%3E\") 12 12, pointer"},150,[151,38,153,154,156]);
|
|
197
197
|
__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},151,[152]);
|
|
@@ -210,193 +210,196 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
|
|
|
210
210
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AgentInteractionIndicator=function({interaction:u}){const l=(0,n.useRef)([]),f=(0,n.useRef)([]),h=t=>{f.current=t;for(let n=0;n<l.current.length;n++){const o=l.current[n];if(!o)continue;const s=t[n];o.hidden=!s,s&&(o.style.transform=`translate3d(${100*s.x}%, ${100*s.y}%, 0)`)}};return(0,n.useEffect)(()=>{if(!u)return void h([]);const t=u,n=window.matchMedia?.(c).matches??!1,s=f.current,l=n?0:(0,o.agentInteractionTravelMs)(s,t),v=(0,o.agentInteractionEndMs)(t),T=l+v,w=Date.now(),p=Date.parse(t.timestamp),A=Number.isFinite(p)?p:w,I=(0,o.agentInteractionCursorExpiresAt)(t,A);if(w>=I)return void h([]);const _=l>0?w:A;let x=0,y=0,E=0;const b=()=>{cancelAnimationFrame(x),x=0,clearTimeout(y),y=0,h([])};function j(){if(Date.now()>=I)return void b();const c=n?v:Math.max(0,Date.now()-_);h(n?(0,o.agentInteractionPointsAt)(t,c):(0,o.agentInteractionPointsWithTravelAt)(t,s,c)),!n&&c<T&&(x=requestAnimationFrame(()=>{clearTimeout(y),y=0,j()}),y=window.setTimeout(()=>{cancelAnimationFrame(x),x=0,j()},100))}return E=window.setTimeout(b,I-w),j(),()=>{cancelAnimationFrame(x),clearTimeout(y),clearTimeout(E)}},[u]),(0,t.jsx)("div",{"aria-hidden":"true","data-testid":"agent-interaction-indicator",style:{position:'absolute',inset:0,overflow:'hidden',pointerEvents:'none'},children:[0,1].map(n=>(0,t.jsx)("div",{ref:t=>{l.current[n]=t},hidden:!0,style:{position:'absolute',inset:0,willChange:'transform'},children:(0,t.jsx)("div",{"data-agent-touch":n,style:Object.assign({},s.AGENT_TOUCH_INDICATOR_STYLE,{left:0,top:0,transform:'translate(-50%, -50%)'})})},n))})};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]);const c='(prefers-reduced-motion: reduce)'},154,[151,38,155,156]);
|
|
211
211
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AGENT_INTERACTION_IDLE_TIMEOUT_MS",{enumerable:!0,get:function(){return n}}),e.agentInteractionEndMs=s,e.agentInteractionCursorExpiresAt=function(t,o=Date.now()){const u=Date.parse(t.timestamp);return(Number.isFinite(u)?u:o)+s(t)+n},e.agentInteractionPointsAt=o,e.agentInteractionTravelMs=u,e.agentInteractionPointsWithTravelAt=function(t,n,s){const c=u(n,t);if(0===c)return o(t,s);if(s>=c)return o(t,s-c);return f(n,o(t,0),M(s/c))};const t=220,n=6e4;function s(t){return t.segments.reduce((t,n)=>Math.max(t,n.startMs+(n.frames.at(-1)?.atMs??0)),0)}function o(t,n){const s=t.segments[0];if(!s)return[];let o=0;for(let s=0;s<t.segments.length;s++){const u=t.segments[s];if(u){if(u.startMs>n)break;o=s}}const u=t.segments[o]??s,p=t.segments[o+1],h=u.frames.at(-1),l=u.startMs+(h?.atMs??0);if(p&&h&&n>=l){const t=p.frames[0],s=p.startMs-l;if(t&&s>0&&h.points.length===t.points.length)return f(h.points,t.points,M((n-l)/s))}return c(u,Math.max(0,n-u.startMs))}function u(n,s){const u=o(s,0);return n.length!==u.length||0===n.length?0:n.some((t,n)=>{const s=u[n];return s&&(t.x!==s.x||t.y!==s.y)})?t:0}function c(t,n){const s=t.frames[0];if(!s)return[];const o=t.frames.at(-1)??s;if(n<=s.atMs)return s.points;if(n>=o.atMs)return o.points;for(let s=1;s<t.frames.length;s++){const o=t.frames[s],u=t.frames[s-1];if(!o||!u||n>o.atMs)continue;if(u.points.length!==o.points.length||o.atMs===u.atMs)return o.points;const c=(n-u.atMs)/(o.atMs-u.atMs),M='ease-out'===t.easing?1-Math.pow(1-c,3):c;return f(u.points,o.points,M)}return o.points}function f(t,n,s){const o=Math.min(1,Math.max(0,s));return t.map((t,s)=>{const u=n[s]??t;return{x:t.x+(u.x-t.x)*o,y:t.y+(u.y-t.y)*o}})}function M(t){const n=Math.min(1,Math.max(0,t));return n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2}},155,[]);
|
|
212
212
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TOUCH_INDICATOR_STYLE",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"AGENT_TOUCH_INDICATOR_STYLE",{enumerable:!0,get:function(){return n}}),e.TouchIndicator=function({point:n}){return(0,t.jsx)("div",{style:Object.assign({},o,{left:100*n.x+"%",top:100*n.y+"%",transform:'translate(-50%, -50%)'})})};var t=r(d[0]);const o={position:'absolute',width:20,height:20,borderRadius:'50%',background:'rgba(255, 255, 255, 0.45)',border:'1.25px solid rgba(0, 0, 0, 0.55)',boxShadow:'0 1px 3px rgba(0, 0, 0, 0.45)',pointerEvents:'none',boxSizing:'border-box'},n=Object.assign({},o,{border:'2px solid var(--expo-theme-border-info)'})},156,[151]);
|
|
213
|
-
__d(function(g,_r,i,_a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toQueryStyleHelperWsUrl=F,e.useIosDeviceClient=function(W){const{baseUrl:M,enabled:H=!0,device:V=null,streamMode:z}=W,B=H&&!!M,[G,K]=(0,t.useState)('idle'),[q,Q]=(0,t.useState)(null),[X,Y]=(0,t.useState)(null),[Z,ee]=(0,t.useState)(0),[te,re]=(0,t.useState)([]),[ne,se]=(0,t.useState)(!1),[ae,ce]=(0,t.useState)(o.createIosEventLogState),oe=ae.events,[ie,le]=(0,t.useState)(!1),[ue,de]=(0,t.useState)(null),[fe,pe]=(0,t.useState)(N),[ge,he]=(0,t.useState)(null),[me,Se]=(0,t.useState)(null),[ve,be]=(0,t.useState)(null),[ye,we]=(0,t.useState)(()=>new Set),[Ee,ke]=(0,t.useState)(null),[Ce,Oe]=(0,t.useState)(!1),[Re,Te]=(0,t.useState)(null),[Ae,Ue]=(0,t.useState)(null),Pe=(0,t.useRef)(null),xe=(0,t.useRef)(0),Ne=(0,t.useRef)(null),Ie=(0,t.useRef)(null),De=(0,t.useRef)(null),We=(0,t.useRef)(null),[$e,je]=(0,t.useReducer)(r.avccFallbackReducer,r.initialAvccFallback),[Le,Fe]=(0,t.useState)('h264'),[_e,Je]=(0,t.useState)('h264'),[Me,He]=(0,t.useState)(!1),Ve=(0,t.useRef)(new d.DeviceSettingWriteTracker),ze=(0,t.useRef)(ge);(0,t.useLayoutEffect)(()=>{ze.current=ge},[ge]);const Be=(0,t.useRef)(0),Ge=(0,t.useRef)(null),Ke=(0,t.useRef)(!1),qe=(0,t.useRef)(null),Qe=(0,t.useRef)(0);(0,t.useEffect)(()=>()=>{qe.current?.abort()},[]);const Xe='webrtc'===z&&!Me,Ye=('h264'===z||Me)&&(0,s.isAvccSupported)()&&!$e.fellBack;(0,t.useEffect)(()=>{'webrtc'!==z&&(He(!1),Je(Le))},[z,Le]);const Ze=(0,t.useRef)(!1),et=(0,t.useRef)(null);(0,t.useEffect)(()=>{et.current=X},[X]);const tt=(0,t.useRef)(!1),rt=(0,t.useCallback)(()=>{const t=Ne.current,r=We.current;t&&r&&(t.src=`${r}${r.includes('?')?'&':'?'}t=${Date.now()}`)},[]),nt=(0,t.useCallback)(t=>{Xe?(De.current=t??null,Ie.current=null,Ne.current=null):Ye?(Ie.current=t??null,De.current=null,Ne.current=null):(Ne.current=t??null,Ie.current=null,De.current=null,t&&rt())},[rt,Ye,Xe]),st=(0,t.useCallback)(t=>{const r=Pe.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=(0,a.streamGeometry)(et.current).inputOrientation;let s;'begin'===t.phase?(Ze.current=void 0!==(0,a.homeIndicatorEdge)(t.y),Ze.current&&(s=a.HID_EDGE_BOTTOM)):Ze.current&&(s=a.HID_EDGE_BOTTOM,'end'===t.phase&&(Ze.current=!1));const c=(0,a.rawPointForDisplayPoint)(n,t.x,t.y),o=void 0===s?void 0:(0,a.rawEdgeForDisplayEdge)(n,s),l=void 0===o?Object.assign({type:t.phase},c):Object.assign({type:t.phase},c,{edge:o});r.send(j(E,l))},[]),at=(0,t.useCallback)(t=>{const r=Pe.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=(0,a.streamGeometry)(et.current).inputOrientation,s=(0,a.rawPointForDisplayPoint)(n,t.a.x,t.a.y),c=(0,a.rawPointForDisplayPoint)(n,t.b.x,t.b.y);r.send(j(C,{type:t.phase,x1:s.x,y1:s.y,x2:c.x,y2:c.y}))},[]),ct=(0,t.useCallback)(t=>{const r=Pe.current;if(!r||r.readyState!==WebSocket.OPEN)return!1;const n=(0,u.hidUsageForCode)(t.code);return null!==n&&(r.send(j(O,{type:t.phase,usage:n})),!0)},[]),ot=(0,t.useCallback)(t=>{const r=Pe.current;r&&r.readyState===WebSocket.OPEN&&r.send(j(A,{enabled:t}))},[]),it=(0,t.useCallback)(()=>{const t=Pe.current;t&&t.readyState===WebSocket.OPEN&&t.send(j(T,{}))},[]),lt=(0,t.useCallback)(t=>{const r=Pe.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=D[t];n&&r.send(j(k,{button:n}))},[]),ut=(0,t.useCallback)(async()=>{const t=Pe.current;if(!t||t.readyState!==WebSocket.OPEN)return;const r=(r,n)=>t.send(j(O,{type:r,usage:n}));r('down',x),await new Promise(t=>setTimeout(t,30)),r('up',x)},[]),dt=(0,t.useCallback)(()=>{const t=Pe.current;if(!t||t.readyState!==WebSocket.OPEN)return;const r=et.current?.orientation??'portrait',n=I[(I.indexOf(r)+1)%I.length];t.send(j(R,{orientation:n}))},[]),ft=(0,t.useCallback)(async()=>{if(!M)return null;const t=ge?.device??V,r=`${M.replace(/\/$/,'')}/api/screenshot${t?`?device=${encodeURIComponent(t)}`:''}`;try{const t=await fetch(r,{cache:'no-store'});return t.ok?await t.blob():null}catch{return null}},[M,V,ge]),pt=(0,t.useCallback)((t,r)=>{const n=ge;if(!n?.execWsUrl||!n.execToken||!n.device)return;const{device:s,execToken:a,execWsUrl:c}=n,o=Ve.current,l=o.start(t);l&&(we(o.pending),be(n=>Object.assign({},n??{},{[t]:r})),'appearance'!==t||'light'!==r&&'dark'!==r||Se(r),_(c,a,{device:s,option:t,value:r}).catch(async()=>{if(o.isCurrent(l)&&ze.current===n)try{const r=await _(c,a,{device:s});if(!o.isCurrent(l)||ze.current!==n)return;const u={};for(const[t,n]of Object.entries(r.status??{}))'string'==typeof n&&(u[t]=n);if(be(r=>(0,d.mergeAuthoritativeDeviceSetting)(r,t,u)),'appearance'===t){const t=u.appearance;'light'!==t&&'dark'!==t||Se(t)}}catch{}}).finally(()=>{o.finish(l)&&we(o.pending)}))},[ge]),gt=(0,t.useCallback)(t=>pt('appearance',t),[pt]),ht=(0,t.useCallback)(t=>{Fe(t),Je(t),He(!1)},[]),mt=(0,t.useCallback)(t=>{const r=ge?.streamSettingsUrl;if(!r||Ke.current||0===Object.keys(t).length)return;const n=Ge.current??p.DEFAULT_DEVICE_STREAM_SETTINGS,s=(0,p.normalizeDeviceStreamSettings)(Object.assign({},n,t),n),a=++Be.current,c=new AbortController;qe.current=c,Ke.current=!0,Ge.current=s,ke(s),Oe(!0),fetch(r,{method:'PATCH',headers:{'Content-Type':'application/json'},body:JSON.stringify(t),signal:c.signal}).then(async t=>{if(!t.ok)throw new Error(`Stream settings update failed (${t.status})`);const r=(0,p.normalizeDeviceStreamSettings)(await t.json(),s);Be.current===a&&(Ge.current=r,ke(r))}).catch(()=>{c.signal.aborted||Be.current!==a||(Ge.current=n,ke(n))}).finally(()=>{qe.current===c&&(qe.current=null),c.signal.aborted||Be.current!==a||(Ke.current=!1,Oe(!1))})},[ge?.streamSettingsUrl]),St=(0,t.useCallback)(()=>se(!0),[]),vt=(0,t.useCallback)(()=>se(!1),[]),bt=(0,t.useCallback)(()=>re([]),[]),yt=(0,t.useCallback)(()=>le(!0),[]),wt=(0,t.useCallback)(()=>le(!1),[]),Et=(0,t.useCallback)(()=>{const t=ge?.device;t&&ce(r=>(0,o.clearIosEventLogState)(r,t))},[ge?.device]);(0,t.useEffect)(()=>{if(!B||!M)return he(null),void K('idle');let t=!1,r=null;K('connecting'),Q(null);const n=`${M.replace(/\/$/,'')}/api${V?`?device=${encodeURIComponent(V)}`:''}`,s=t=>{const r=(0,f.proxyPreviewConfigForBrowser)(t,window.location),n=r.basePath??'',s=t=>t?new URL(t,M).toString():null;return Object.assign({url:r.url,streamUrl:r.streamUrl??`${r.url}/stream.mjpeg`,wsUrl:F(r.wsUrl??`${L(r.url)}/ws`),device:r.device??null,execWsUrl:L(new URL(`${n}/exec-ws`,M).toString()),execToken:r.execToken??null,logsPath:r.logsEndpoint??null,appStateUrl:s(r.appStateEndpoint),eventsPath:r.eventLogEventsEndpoint??null,metricsPath:r.metricsEndpoint??null,streamSettingsUrl:r.streamSettingsEndpoint?r.proxyHelpers?`${r.url}/stream-settings`:s(r.streamSettingsEndpoint):null,initialStreamSettings:r.streamSettings,gridApiUrl:new URL(r.gridApiEndpoint??'/grid/api',M).toString(),webRtcCodec:'webrtc'===r.streamSettings?.transport?r.streamSettings.codec:'h264'},'webrtc'===r.streamSettings?.transport&&r.streamSettings.iceServers?{webRtcIceServers:r.streamSettings.iceServers}:{})};let a=!1;const o=async()=>{if(!t)try{const l=await fetch(n,{signal:AbortSignal.timeout(3e3)});if(!l.ok)return void(t||(r=setTimeout(o,b)));const u=await l.json();if(u&&u.url&&u.device){if(!t){const t=s(u);ht(t.webRtcCodec),he(t)}return}V&&!a&&(a=!0,(0,c.startIosHelper)(V,M).catch(()=>{})),t||(r=setTimeout(o,b))}catch{t||(r=setTimeout(o,b))}};return o(),()=>{t=!0,r&&clearTimeout(r)}},[B,M,V]);const kt=(0,t.useRef)({frames:0,startedAt:0}),Ct=(0,t.useCallback)(()=>{const t=performance.now(),r=kt.current;if(0===r.startedAt&&(r.startedAt=t),r.frames++,t-r.startedAt<1e3)return;const n=Math.round(1e3*r.frames/(t-r.startedAt));r.frames=0,r.startedAt=t,ee(t=>t===n?t:n)},[]),{stream:Ot,failure:Rt,error:Tt,markFrameDecoded:At}=(0,S.useWebRtcStream)({offerUrl:ge?`${ge.url}/webrtc/offer`:'',closeUrl:ge?`${ge.url}/webrtc/close`:'',enabled:B&&Xe&&!!ge,codec:_e,iceServers:ge?.webRtcIceServers}),Ut=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!Xe||!Rt)return;if(Ut.current===Rt.sessionId)return;Ut.current=Rt.sessionId;const t=(0,v.webRtcFallbackDecision)(Le,_e,Rt);t&&('switch-to-http'===t.type?He(!0):Je(t.codec))},[Xe,Rt,Le,_e]),(0,t.useEffect)(()=>{Xe&&(Tt?(K('error'),Q(Tt)):Ot||(K('connecting'),Q(null)))},[Xe,Tt,Ot]),(0,t.useEffect)(()=>{if(!Xe)return;const t=De.current;if(!t)return;let r=!1,n=!0,s=0;const a=()=>{r||(t.videoWidth>0&&t.videoHeight>0&&!tt.current&&Y({width:t.videoWidth,height:t.videoHeight}),Ct(),n&&(n=!1,At(),K('streaming'),Q(null)))},c=()=>{a(),s=t.requestVideoFrameCallback(c)},o=()=>a();if(t.srcObject=Ot,Ot){'function'==typeof t.requestVideoFrameCallback?s=t.requestVideoFrameCallback(c):t.addEventListener('timeupdate',o),t.addEventListener('loadeddata',a,{once:!0}),t.play().catch(()=>{})}return()=>{r=!0,t.removeEventListener('loadeddata',a),t.removeEventListener('timeupdate',o),s&&'function'==typeof t.cancelVideoFrameCallback&&t.cancelVideoFrameCallback(s),t.srcObject=null}},[Xe,Ot,At,Ct]),(0,t.useEffect)(()=>{je('reset'),He(!1),ee(0)},[z,ge?.url,ge?.webRtcCodec]),(0,t.useEffect)(()=>{if(!Ye||!ge?.url)return;const t=setTimeout(()=>je('timeout'),r.AVCC_FRAME_TIMEOUT_MS);return()=>clearTimeout(t)},[Ye,ge?.url]),(0,h.useAvccStream)({url:ge?.url??'',enabled:B&&Ye&&!!ge,canvasRef:Ie,onFirstFrame:()=>{K('streaming'),Q(null)},onFrame:Ct,onDecodedFrame:()=>je('decoded-frame'),onResize:(t,r)=>{tt.current||Y({width:t,height:r})},onError:t=>{K('error'),Q(t)},onDecoderError:()=>je('error')});const Pt=Ye||Xe?null:ge?.streamUrl??null;(0,t.useEffect)(()=>{if(!Pt)return void(We.current=null);We.current=Pt,K('connecting'),Q(null);let t=!1,r=!1,n=null;const s=Ne.current,a=()=>{if(t||r)return;const n=Ne.current;n&&0!==n.naturalWidth&&0!==n.naturalHeight&&(r=!0,K('streaming'),Q(null),tt.current||Y(t=>t&&t.width===n.naturalWidth&&t.height===n.naturalHeight?t:{width:n.naturalWidth,height:n.naturalHeight}))},c=()=>{t||(r=!1,K('error'),Q('Stream unavailable \u2014 retrying\u2026'),n=setTimeout(()=>{t||rt()},b))};s?.addEventListener('load',a),s?.addEventListener('error',c),rt();const o=setInterval(a,400);return()=>{t=!0,clearInterval(o),n&&clearTimeout(n),s?.removeEventListener('load',a),s?.removeEventListener('error',c);const r=Ne.current;r&&r.removeAttribute('src'),Y(null),ee(0)}},[Pt,rt]);const xt=ge?.wsUrl??null;(0,t.useEffect)(()=>{if(Te(null),!xt)return;let t=!1,r=null;tt.current=!1;const n=()=>{if(t)return;let s;try{s=new WebSocket(xt)}catch{return}s.binaryType='arraybuffer',Pe.current=s,s.onopen=()=>{s.send(j(A,{enabled:!1}))},s.onmessage=r=>{if(!(r.data instanceof ArrayBuffer))return;const n=new Uint8Array(r.data);if(!(n.length<1))if(n[0]!==P){if(n[0]===U)try{const t=JSON.parse($.decode(n.subarray(1)));t.width>0&&t.height>0&&(tt.current=!0,Y(r=>r&&r.width===t.width&&r.height===t.height&&r.orientation===t.orientation?r:t))}catch{}}else try{const r=JSON.parse($.decode(n.subarray(1)));!t&&r.ok&&'boolean'==typeof r.enabled&&Te(r.enabled)}catch{}},s.onclose=()=>{t||(Pe.current=null,r=setTimeout(n,b))},s.onerror=()=>{try{s.close()}catch{}}};return n(),()=>{t=!0,r&&clearTimeout(r);try{Pe.current?.close()}catch{}Pe.current=null,Te(null)}},[xt]);const Nt=ge?.execWsUrl??null,It=ge?.execToken??null,Dt=ge?.logsPath??null,Wt=ge?.eventsPath??null,$t=ge?.metricsPath??null,jt=ge?.device??null;(0,t.useEffect)(()=>{ce((0,o.createIosEventLogState)())},[Wt,jt]),(0,t.useEffect)(()=>{if(Qe.current=0,!$t)return void de(null);de({hostCores:null,samples:[],errored:!1,stale:!1});const t=setInterval(()=>{const t=Qe.current;t>0&&Date.now()-t>y&&de(t=>t?Object.assign({},t,{stale:!0}):t)},1e3);return()=>clearInterval(t)},[$t]),(0,t.useEffect)(()=>{if(!Nt||!It)return;const t=new Map,r=new Map;if(ne&&Dt&&(t.set(1,'logs'),r.set(1,Dt)),ie&&Wt&&jt&&(t.set(2,'events'),r.set(2,Wt)),$t&&(t.set(3,'metrics'),r.set(3,$t)),0===t.size)return;let s=!1,a=null,c=null;const l=new Map,u=()=>{$t&&de(t=>t?Object.assign({},t,{errored:!0}):t)},d=(t,r)=>{if('logs'===t){let t=r.data;try{const n=JSON.parse(r.data);'string'==typeof n.eventMessage&&(t=n.eventMessage)}catch{}return void(t&&re(r=>[...r,{id:"i"+ ++xe.current,source:'syslog',message:t}].slice(-200)))}if('events'===t&&jt)ce(t=>(0,o.mergeIosEventLogPayload)(t,r.data,jt));else if('metrics'===t)try{const t=JSON.parse(r.data);if('meta'===r.event){const r=(0,n.parseActivityHostCores)(t);return void de(t=>t?Object.assign({},t,{hostCores:r,errored:!1}):t)}const s=(0,n.parseActivitySample)(t);if(!s)return;Qe.current=Date.now(),de(t=>(0,n.appendActivitySample)(t??{hostCores:null,samples:[],errored:!1,stale:!1},s))}catch{}},f=()=>{if(!s){l.clear();try{a=new WebSocket(Nt)}catch{return u(),void(c=setTimeout(f,b))}a.onopen=()=>a?.send(JSON.stringify({token:It})),a.onmessage=n=>{let s;try{s=JSON.parse(String(n.data))}catch{return}if(s.ready)for(const[t,n]of r)a?.send(JSON.stringify({sub:t,path:n}));else if('number'==typeof s.sub&&t.has(s.sub)){if(s.end)return u(),void a?.close();if('string'==typeof s.data){const r=s.sub,n=t.get(r);l.set(r,w(l.get(r)??'',s.data,t=>d(n,t)))}}},a.onclose=()=>{s||(u(),c=setTimeout(f,b))},a.onerror=()=>{try{a?.close()}catch{}}}};return f(),()=>{s=!0,c&&clearTimeout(c);try{a?.close()}catch{}}},[ne,ie,Nt,It,Dt,Wt,$t,jt]),(0,t.useEffect)(()=>{if(Ve.current.reset(),we(new Set),!Nt||!It||!jt)return Se(null),void be(null);let t=!1;return _(Nt,It,{device:jt}).then(r=>{if(t)return;const n={};for(const[t,s]of Object.entries(r.status??{}))'string'==typeof s&&(n[t]=s);be(n),'light'!==n.appearance&&'dark'!==n.appearance||Se(n.appearance)}).catch(()=>{}),()=>{t=!0}},[Nt,It,jt]);const Lt=ge?.streamSettingsUrl??null,Ft=ge?.initialStreamSettings;(0,t.useEffect)(()=>{qe.current?.abort(),qe.current=null,Ke.current=!1;const t=++Be.current;if(!Lt)return Ge.current=null,ke(null),void Oe(!1);const r=(0,p.normalizeDeviceStreamSettings)(Ft);Ge.current=r,ke(r),Ke.current=!0,Oe(!0);const n=new AbortController;return fetch(Lt,{cache:'no-store',signal:n.signal}).then(async n=>{if(!n.ok)throw new Error(`Stream settings request failed (${n.status})`);const s=(0,p.normalizeDeviceStreamSettings)(await n.json(),r);Be.current===t&&(Ge.current=s,ke(s))}).catch(()=>{}).finally(()=>{n.signal.aborted||Be.current!==t||(Ke.current=!1,Oe(!1))}),()=>n.abort()},[Lt,Ft]);const _t=ge?.appStateUrl??null;(0,t.useEffect)(()=>{if(Ue(null),!_t)return;let t=null;try{t=new EventSource(_t)}catch{return}return t.onmessage=t=>{try{const r=JSON.parse(String(t.data));r.bundleId&&Ue(t=>t&&t.id===r.bundleId?t.pid===r.pid&&t.isReactNative===r.isReactNative?t:Object.assign({},t,{pid:r.pid,isReactNative:r.isReactNative}):{id:r.bundleId,pid:r.pid,isReactNative:r.isReactNative})}catch{}},()=>t?.close()},[_t]);const Jt=Ae?.id??null;(0,t.useEffect)(()=>{if(!(Jt&&Nt&&It&&jt))return;let t=!1;return(0,l.getIosAppDetails)(t=>J(Nt,It,t),jt,Jt).then(r=>{!t&&r&&Ue(t=>t&&t.id===Jt?Object.assign({},t,r):t)}).catch(()=>{}),()=>{t=!0}},[Jt,Nt,It,jt]);const Mt=ge?.gridApiUrl??null;return(0,t.useEffect)(()=>{if(!Mt)return void pe(N);let t=!1;return fetch(Mt,{signal:AbortSignal.timeout(3e3)}).then(t=>t.json()).then(r=>{!t&&Array.isArray(r.devices)&&0!==r.devices.length&&pe(r.devices.map(t=>({id:String(t.device??t.id??'ios'),name:String(t.name??t.device??'Simulator'),system:'string'==typeof t.runtime?t.runtime:void 0,platform:'ios',current:null!=t.helper})))}).catch(()=>{}),()=>{t=!0}},[Mt]),{platform:'ios',status:G,error:q,screen:X,fps:Z,devices:fe,logs:te,logsEnabled:ne,attachLogs:St,detachLogs:vt,clearLogs:bt,events:oe,eventsEnabled:ie,attachEvents:yt,detachEvents:wt,clearEvents:Et,activity:ue,deviceSettings:ve,deviceSettingsPending:ye,setDeviceSetting:pt,streamSettings:Ee,streamSettingsPending:Ce,updateStreamSettings:mt,webRtcCodec:Le,setWebRtcCodec:ht,capabilities:{deviceSettings:!!Nt&&!!It&&!!jt,activity:!!$t,events:!!Wt,streamSettings:!!Lt},foregroundApp:Ae,videoKind:Xe?'video':Ye?'canvas':'img',attachVideo:nt,sendTouch:st,sendMultiTouch:at,sendKey:ct,pressButton:lt,reload:ut,rotate:dt,screenshot:ft,appearance:me,setAppearance:gt,hardwareKeyboardConnected:Re,setHardwareKeyboardConnected:ot,toggleSoftwareKeyboard:it}};var t=_r(_d[0]),r=_r(_d[1]),n=_r(_d[2]),s=_r(_d[3]),a=_r(_d[4]),c=_r(_d[5]),o=_r(_d[6]),l=_r(_d[7]),u=_r(_d[8]),d=_r(_d[9]),f=_r(_d[10]),p=_r(_d[11]),h=_r(_d[12]),S=_r(_d[13]),v=_r(_d[14]);const b=1500,y=8e3;function w(t,r,n){let s,a=`${t}${r}`.replace(/\r\n/g,'\n').replace(/\r/g,'\n');for(;-1!==(s=a.indexOf('\n\n'));){const t=a.slice(0,s).split('\n');a=a.slice(s+2);const r=t.find(t=>t.startsWith('event:'))?.slice(6).trim()||'message',c=t.filter(t=>t.startsWith('data:')).map(t=>t.slice(5).replace(/^ /,'')).join('\n');c&&n({event:r,data:c})}return a}const E=3,k=4,C=5,O=6,R=7,T=12,A=13,U=130,P=131,x=21,N=[{id:'ios',name:'iPhone Simulator',platform:'ios',current:!0}],I=['portrait','landscape_left','portrait_upside_down','landscape_right'],D={home:'home',appSwitcher:'app_switcher',power:'lock',back:null,recents:null},W=new TextEncoder,$=new TextDecoder;function j(t,r){const n=W.encode(JSON.stringify(r)),s=new Uint8Array(1+n.length);return s[0]=t,s.set(n,1),s}function L(t){return t.replace(/^http/,'ws')}function F(t){const r=new URL(t),n=r.pathname.match(/^(.*\/helper)\/([^/]+)\/ws$/);if(!n)throw new Error(`Invalid helper ws url, no deviceId matched: ${t}`);return r.pathname=`${n[1]}/ws`,r.searchParams.has('device')||r.searchParams.set('device',decodeURIComponent(n[2])),r.toString()}function _(t,r,n){return new Promise((s,a)=>{let c;try{c=new WebSocket(t)}catch(t){return void a(t)}let o,l=!1;const u=t=>{if(!l){l=!0,clearTimeout(o);try{c.close()}catch{}t()}};o=setTimeout(()=>u(()=>a(new Error('exec-ws timeout'))),5e3),c.onopen=()=>c.send(JSON.stringify({token:r})),c.onmessage=t=>{let r;try{r=JSON.parse(String(t.data))}catch{return}r.ready?c.send(JSON.stringify({id:1,ui:n})):1===r.id&&(r.error?u(()=>a(new Error(r.error))):u(()=>s(r)))},c.onerror=()=>u(()=>a(new Error('exec-ws error'))),c.onclose=()=>u(()=>a(new Error('exec-ws closed')))})}function J(t,r,n){return new Promise((s,a)=>{let c;try{c=new WebSocket(t)}catch(t){return void a(t)}let o,l=!1;const u=t=>{if(!l){l=!0,clearTimeout(o);try{c.close()}catch{}t()}};o=setTimeout(()=>u(()=>a(new Error('exec-ws timeout'))),1e4),c.onopen=()=>c.send(JSON.stringify({token:r})),c.onmessage=t=>{let r;try{r=JSON.parse(String(t.data))}catch{return}r.ready?c.send(JSON.stringify({id:1,command:n})):1===r.id&&(r.error?u(()=>a(new Error(r.error))):u(()=>s({stdout:r.stdout??'',stderr:r.stderr??'',exitCode:r.exitCode??1})))},c.onerror=()=>u(()=>a(new Error('exec-ws error'))),c.onclose=()=>u(()=>a(new Error('exec-ws closed')))})}},157,[38,158,159,160,153,161,162,163,164,165,166,167,168,169,170]);
|
|
213
|
+
__d(function(g,_r,i,_a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toQueryStyleHelperWsUrl=J,e.useIosDeviceClient=function(L){const{baseUrl:V,enabled:z=!0,device:B=null,streamMode:G}=L,K=z&&!!V,[q,Q]=(0,t.useState)('idle'),[X,Y]=(0,t.useState)(null),[Z,ee]=(0,t.useState)(null),[te,re]=(0,t.useState)(0),[ne,se]=(0,t.useState)([]),[ae,ce]=(0,t.useState)(!1),[oe,ie]=(0,t.useState)(o.createIosEventLogState),le=oe.events,[ue,de]=(0,t.useState)(!1),[fe,pe]=(0,t.useState)(null),[ge,me]=(0,t.useState)(I),[he,Se]=(0,t.useState)(null),[ve,be]=(0,t.useState)(null),[ye,we]=(0,t.useState)(null),[Ee,ke]=(0,t.useState)(()=>new Set),[Ce,Oe]=(0,t.useState)(null),[Re,Te]=(0,t.useState)(!1),[Ae,Pe]=(0,t.useState)(null),[Ue,xe]=(0,t.useState)(null),Ne=(0,t.useRef)(null),Ie=(0,t.useRef)(0),De=(0,t.useRef)(null),We=(0,t.useRef)(null),je=(0,t.useRef)(null),Le=(0,t.useRef)(null),[Fe,$e]=(0,t.useReducer)(r.avccFallbackReducer,r.initialAvccFallback),[_e,Je]=(0,t.useState)('h264'),[Me,He]=(0,t.useState)('h264'),[Ve,ze]=(0,t.useState)(!1),Be=(0,t.useRef)(new f.DeviceSettingWriteTracker),Ge=(0,t.useRef)(he);(0,t.useLayoutEffect)(()=>{Ge.current=he},[he]);const Ke=(0,t.useRef)(0),qe=(0,t.useRef)(null),Qe=(0,t.useRef)(!1),Xe=(0,t.useRef)(null),Ye=(0,t.useRef)(0);(0,t.useEffect)(()=>()=>{Xe.current?.abort()},[]);const Ze='webrtc'===G&&!Ve,et=('h264'===G||Ve)&&(0,s.isAvccSupported)()&&!Fe.fellBack;(0,t.useEffect)(()=>{'webrtc'!==G&&(ze(!1),He(_e))},[G,_e]);const tt=(0,t.useRef)(!1),rt=(0,t.useRef)(null);(0,t.useEffect)(()=>{rt.current=Z},[Z]);const nt=(0,t.useRef)(!1),st=(0,t.useCallback)(()=>{const t=De.current,r=Le.current;t&&r&&(t.src=`${r}${r.includes('?')?'&':'?'}t=${Date.now()}`)},[]),at=(0,t.useCallback)(t=>{Ze?(je.current=t??null,We.current=null,De.current=null):et?(We.current=t??null,je.current=null,De.current=null):(De.current=t??null,We.current=null,je.current=null,t&&st())},[st,et,Ze]),ct=(0,t.useCallback)(t=>{const r=Ne.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=(0,a.streamGeometry)(rt.current).inputOrientation;let s;'begin'===t.phase?(tt.current=void 0!==(0,a.homeIndicatorEdge)(t.y),tt.current&&(s=a.HID_EDGE_BOTTOM)):tt.current&&(s=a.HID_EDGE_BOTTOM,'end'===t.phase&&(tt.current=!1));const c=(0,a.rawPointForDisplayPoint)(n,t.x,t.y),o=void 0===s?void 0:(0,a.rawEdgeForDisplayEdge)(n,s),l=void 0===o?Object.assign({type:t.phase},c):Object.assign({type:t.phase},c,{edge:o});r.send($(k,l))},[]),ot=(0,t.useCallback)(t=>{const r=Ne.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=(0,a.streamGeometry)(rt.current).inputOrientation,s=(0,a.rawPointForDisplayPoint)(n,t.a.x,t.a.y),c=(0,a.rawPointForDisplayPoint)(n,t.b.x,t.b.y);r.send($(O,{type:t.phase,x1:s.x,y1:s.y,x2:c.x,y2:c.y}))},[]),it=(0,t.useCallback)(t=>{const r=Ne.current;if(!r||r.readyState!==WebSocket.OPEN)return!1;const n=(0,d.hidUsageForCode)(t.code);return null!==n&&(r.send($(R,{type:t.phase,usage:n})),!0)},[]),lt=(0,t.useCallback)(t=>{const r=Ne.current;r&&r.readyState===WebSocket.OPEN&&r.send($(P,{enabled:t}))},[]),ut=(0,t.useCallback)(()=>{const t=Ne.current;t&&t.readyState===WebSocket.OPEN&&t.send($(A,{}))},[]),dt=(0,t.useCallback)(t=>{const r=Ne.current;if(!r||r.readyState!==WebSocket.OPEN)return;const n=j[t];n&&r.send($(C,{button:n}))},[]),ft=(0,t.useCallback)(async()=>{const t=Ne.current;if(!t||t.readyState!==WebSocket.OPEN)return;const r=(r,n)=>t.send($(R,{type:r,usage:n}));r('down',N),await new Promise(t=>setTimeout(t,30)),r('up',N)},[]),pt=(0,t.useCallback)(()=>{const t=Ne.current;if(!t||t.readyState!==WebSocket.OPEN)return;const r=rt.current?.orientation??'portrait',n=W[(W.indexOf(r)+1)%W.length];t.send($(T,{orientation:n}))},[]),gt=(0,t.useCallback)(async()=>{if(!V)return null;const t=he?.device??B;return(0,u.fetchIosScreenshot)(V,t)},[V,B,he]),mt=(0,t.useCallback)((t,r)=>{const n=he;if(!n?.execWsUrl||!n.execToken||!n.device)return;const{device:s,execToken:a,execWsUrl:c}=n,o=Be.current,l=o.start(t);l&&(ke(o.pending),we(n=>Object.assign({},n??{},{[t]:r})),'appearance'!==t||'light'!==r&&'dark'!==r||be(r),M(c,a,{device:s,option:t,value:r}).catch(async()=>{if(o.isCurrent(l)&&Ge.current===n)try{const r=await M(c,a,{device:s});if(!o.isCurrent(l)||Ge.current!==n)return;const u={};for(const[t,n]of Object.entries(r.status??{}))'string'==typeof n&&(u[t]=n);if(we(r=>(0,f.mergeAuthoritativeDeviceSetting)(r,t,u)),'appearance'===t){const t=u.appearance;'light'!==t&&'dark'!==t||be(t)}}catch{}}).finally(()=>{o.finish(l)&&ke(o.pending)}))},[he]),ht=(0,t.useCallback)(t=>mt('appearance',t),[mt]),St=(0,t.useCallback)(t=>{Je(t),He(t),ze(!1)},[]),vt=(0,t.useCallback)(t=>{const r=he?.streamSettingsUrl;if(!r||Qe.current||0===Object.keys(t).length)return;const n=qe.current??h.DEFAULT_DEVICE_STREAM_SETTINGS,s=(0,h.normalizeDeviceStreamSettings)(Object.assign({},n,t),n),a=++Ke.current,c=new AbortController;Xe.current=c,Qe.current=!0,qe.current=s,Oe(s),Te(!0),fetch(r,{method:'PATCH',headers:{'Content-Type':'application/json'},body:JSON.stringify(t),signal:c.signal}).then(async t=>{if(!t.ok)throw new Error(`Stream settings update failed (${t.status})`);const r=(0,h.normalizeDeviceStreamSettings)(await t.json(),s);Ke.current===a&&(qe.current=r,Oe(r))}).catch(()=>{c.signal.aborted||Ke.current!==a||(qe.current=n,Oe(n))}).finally(()=>{Xe.current===c&&(Xe.current=null),c.signal.aborted||Ke.current!==a||(Qe.current=!1,Te(!1))})},[he?.streamSettingsUrl]),bt=(0,t.useCallback)(()=>ce(!0),[]),yt=(0,t.useCallback)(()=>ce(!1),[]),wt=(0,t.useCallback)(()=>se([]),[]),Et=(0,t.useCallback)(()=>de(!0),[]),kt=(0,t.useCallback)(()=>de(!1),[]),Ct=(0,t.useCallback)(()=>{const t=he?.device;t&&ie(r=>(0,o.clearIosEventLogState)(r,t))},[he?.device]);(0,t.useEffect)(()=>{if(!K||!V)return Se(null),void Q('idle');let t=!1,r=null;Q('connecting'),Y(null);const n=`${V.replace(/\/$/,'')}/api${B?`?device=${encodeURIComponent(B)}`:''}`,s=t=>{const r=(0,p.proxyPreviewConfigForBrowser)(t,window.location),n=r.basePath??'',s=t=>t?new URL(t,V).toString():null;return Object.assign({url:r.url,streamUrl:r.streamUrl??`${r.url}/stream.mjpeg`,wsUrl:J(r.wsUrl??`${_(r.url)}/ws`),device:r.device??null,execWsUrl:_(new URL(`${n}/exec-ws`,V).toString()),execToken:r.execToken??null,logsPath:r.logsEndpoint??null,appStateUrl:s(r.appStateEndpoint),eventsPath:r.eventLogEventsEndpoint??null,metricsPath:r.metricsEndpoint??null,streamSettingsUrl:r.streamSettingsEndpoint?r.proxyHelpers?`${r.url}/stream-settings`:s(r.streamSettingsEndpoint):null,initialStreamSettings:r.streamSettings,gridApiUrl:new URL(r.gridApiEndpoint??'/grid/api',V).toString(),webRtcCodec:'webrtc'===r.streamSettings?.transport?r.streamSettings.codec:'h264'},'webrtc'===r.streamSettings?.transport&&r.streamSettings.iceServers?{webRtcIceServers:r.streamSettings.iceServers}:{})};let a=!1;const o=async()=>{if(!t)try{const l=await fetch(n,{signal:AbortSignal.timeout(3e3)});if(!l.ok)return void(t||(r=setTimeout(o,y)));const u=await l.json();if(u&&u.url&&u.device){if(!t){const t=s(u);St(t.webRtcCodec),Se(t)}return}B&&!a&&(a=!0,(0,c.startIosHelper)(B,V).catch(()=>{})),t||(r=setTimeout(o,y))}catch{t||(r=setTimeout(o,y))}};return o(),()=>{t=!0,r&&clearTimeout(r)}},[K,V,B,St]);const Ot=(0,t.useRef)({frames:0,startedAt:0}),Rt=(0,t.useCallback)(()=>{const t=performance.now(),r=Ot.current;if(0===r.startedAt&&(r.startedAt=t),r.frames++,t-r.startedAt<1e3)return;const n=Math.round(1e3*r.frames/(t-r.startedAt));r.frames=0,r.startedAt=t,re(t=>t===n?t:n)},[]),{stream:Tt,failure:At,error:Pt,markFrameDecoded:Ut}=(0,v.useWebRtcStream)({offerUrl:he?`${he.url}/webrtc/offer`:'',closeUrl:he?`${he.url}/webrtc/close`:'',enabled:K&&Ze&&!!he,codec:Me,iceServers:he?.webRtcIceServers}),xt=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!Ze||!At)return;if(xt.current===At.sessionId)return;xt.current=At.sessionId;const t=(0,b.webRtcFallbackDecision)(_e,Me,At);t&&('switch-to-http'===t.type?ze(!0):He(t.codec))},[Ze,At,_e,Me]),(0,t.useEffect)(()=>{Ze&&(Pt?(Q('error'),Y(Pt)):Tt||(Q('connecting'),Y(null)))},[Ze,Pt,Tt]),(0,t.useEffect)(()=>{if(!Ze)return;const t=je.current;if(!t)return;let r=!1,n=!0,s=0;const a=()=>{r||(t.videoWidth>0&&t.videoHeight>0&&!nt.current&&ee({width:t.videoWidth,height:t.videoHeight}),Rt(),n&&(n=!1,Ut(),Q('streaming'),Y(null)))},c=()=>{a(),s=t.requestVideoFrameCallback(c)},o=()=>a();if(t.srcObject=Tt,Tt){'function'==typeof t.requestVideoFrameCallback?s=t.requestVideoFrameCallback(c):t.addEventListener('timeupdate',o),t.addEventListener('loadeddata',a,{once:!0}),t.play().catch(()=>{})}return()=>{r=!0,t.removeEventListener('loadeddata',a),t.removeEventListener('timeupdate',o),s&&'function'==typeof t.cancelVideoFrameCallback&&t.cancelVideoFrameCallback(s),t.srcObject=null}},[Ze,Tt,Ut,Rt]),(0,t.useEffect)(()=>{$e('reset'),ze(!1),re(0)},[G,he?.url,he?.webRtcCodec]),(0,t.useEffect)(()=>{if(!et||!he?.url)return;const t=setTimeout(()=>$e('timeout'),r.AVCC_FRAME_TIMEOUT_MS);return()=>clearTimeout(t)},[et,he?.url]),(0,S.useAvccStream)({url:he?.url??'',enabled:K&&et&&!!he,canvasRef:We,onFirstFrame:()=>{Q('streaming'),Y(null)},onFrame:Rt,onDecodedFrame:()=>$e('decoded-frame'),onResize:(t,r)=>{nt.current||ee({width:t,height:r})},onError:t=>{Q('error'),Y(t)},onDecoderError:()=>$e('error')});const Nt=et||Ze?null:he?.streamUrl??null;(0,t.useEffect)(()=>{if(!Nt)return void(Le.current=null);Le.current=Nt,Q('connecting'),Y(null);let t=!1,r=!1,n=null;const s=De.current,a=()=>{if(t||r)return;const n=De.current;n&&0!==n.naturalWidth&&0!==n.naturalHeight&&(r=!0,Q('streaming'),Y(null),nt.current||ee(t=>t&&t.width===n.naturalWidth&&t.height===n.naturalHeight?t:{width:n.naturalWidth,height:n.naturalHeight}))},c=()=>{t||(r=!1,Q('error'),Y('Stream unavailable \u2014 retrying\u2026'),n=setTimeout(()=>{t||st()},y))};s?.addEventListener('load',a),s?.addEventListener('error',c),st();const o=setInterval(a,400);return()=>{t=!0,clearInterval(o),n&&clearTimeout(n),s?.removeEventListener('load',a),s?.removeEventListener('error',c);const r=De.current;r&&r.removeAttribute('src'),ee(null),re(0)}},[Nt,st]);const It=he?.wsUrl??null;(0,t.useEffect)(()=>{if(Pe(null),!It)return;let t=!1,r=null;nt.current=!1;const n=()=>{if(t)return;let s;try{s=new WebSocket(It)}catch{return}s.binaryType='arraybuffer',Ne.current=s,s.onopen=()=>{s.send($(P,{enabled:!1}))},s.onmessage=r=>{if(!(r.data instanceof ArrayBuffer))return;const n=new Uint8Array(r.data);if(!(n.length<1))if(n[0]!==x){if(n[0]===U)try{const t=JSON.parse(F.decode(n.subarray(1)));t.width>0&&t.height>0&&(nt.current=!0,ee(r=>r&&r.width===t.width&&r.height===t.height&&r.orientation===t.orientation?r:t))}catch{}}else try{const r=JSON.parse(F.decode(n.subarray(1)));!t&&r.ok&&'boolean'==typeof r.enabled&&Pe(r.enabled)}catch{}},s.onclose=()=>{t||(Ne.current=null,r=setTimeout(n,y))},s.onerror=()=>{try{s.close()}catch{}}};return n(),()=>{t=!0,r&&clearTimeout(r);try{Ne.current?.close()}catch{}Ne.current=null,Pe(null)}},[It]);const Dt=he?.execWsUrl??null,Wt=he?.execToken??null,jt=he?.logsPath??null,Lt=he?.eventsPath??null,Ft=he?.metricsPath??null,$t=he?.device??null;(0,t.useEffect)(()=>{ie((0,o.createIosEventLogState)())},[Lt,$t]),(0,t.useEffect)(()=>{if(Ye.current=0,!Ft)return void pe(null);pe({hostCores:null,samples:[],errored:!1,stale:!1});const t=setInterval(()=>{const t=Ye.current;t>0&&Date.now()-t>w&&pe(t=>t?Object.assign({},t,{stale:!0}):t)},1e3);return()=>clearInterval(t)},[Ft]),(0,t.useEffect)(()=>{if(!Dt||!Wt)return;const t=new Map,r=new Map;if(ae&&jt&&(t.set(1,'logs'),r.set(1,jt)),ue&&Lt&&$t&&(t.set(2,'events'),r.set(2,Lt)),Ft&&(t.set(3,'metrics'),r.set(3,Ft)),0===t.size)return;let s=!1,a=null,c=null;const l=new Map,u=()=>{Ft&&pe(t=>t?Object.assign({},t,{errored:!0}):t)},d=(t,r)=>{if('logs'===t){let t=r.data;try{const n=JSON.parse(r.data);'string'==typeof n.eventMessage&&(t=n.eventMessage)}catch{}return void(t&&se(r=>[...r,{id:"i"+ ++Ie.current,source:'syslog',message:t}].slice(-200)))}if('events'===t&&$t)ie(t=>(0,o.mergeIosEventLogPayload)(t,r.data,$t));else if('metrics'===t)try{const t=JSON.parse(r.data);if('meta'===r.event){const r=(0,n.parseActivityHostCores)(t);return void pe(t=>t?Object.assign({},t,{hostCores:r,errored:!1}):t)}const s=(0,n.parseActivitySample)(t);if(!s)return;Ye.current=Date.now(),pe(t=>(0,n.appendActivitySample)(t??{hostCores:null,samples:[],errored:!1,stale:!1},s))}catch{}},f=()=>{if(!s){l.clear();try{a=new WebSocket(Dt)}catch{return u(),void(c=setTimeout(f,y))}a.onopen=()=>a?.send(JSON.stringify({token:Wt})),a.onmessage=n=>{let s;try{s=JSON.parse(String(n.data))}catch{return}if(s.ready)for(const[t,n]of r)a?.send(JSON.stringify({sub:t,path:n}));else if('number'==typeof s.sub&&t.has(s.sub)){if(s.end)return u(),void a?.close();if('string'==typeof s.data){const r=s.sub,n=t.get(r);l.set(r,E(l.get(r)??'',s.data,t=>d(n,t)))}}},a.onclose=()=>{s||(u(),c=setTimeout(f,y))},a.onerror=()=>{try{a?.close()}catch{}}}};return f(),()=>{s=!0,c&&clearTimeout(c);try{a?.close()}catch{}}},[ae,ue,Dt,Wt,jt,Lt,Ft,$t]),(0,t.useEffect)(()=>{if(Be.current.reset(),ke(new Set),!Dt||!Wt||!$t)return be(null),void we(null);let t=!1;return M(Dt,Wt,{device:$t}).then(r=>{if(t)return;const n={};for(const[t,s]of Object.entries(r.status??{}))'string'==typeof s&&(n[t]=s);we(n),'light'!==n.appearance&&'dark'!==n.appearance||be(n.appearance)}).catch(()=>{}),()=>{t=!0}},[Dt,Wt,$t]);const _t=he?.streamSettingsUrl??null,Jt=he?.initialStreamSettings;(0,t.useEffect)(()=>{Xe.current?.abort(),Xe.current=null,Qe.current=!1;const t=++Ke.current;if(!_t)return qe.current=null,Oe(null),void Te(!1);const r=(0,h.normalizeDeviceStreamSettings)(Jt);qe.current=r,Oe(r),Qe.current=!0,Te(!0);const n=new AbortController;return fetch(_t,{cache:'no-store',signal:n.signal}).then(async n=>{if(!n.ok)throw new Error(`Stream settings request failed (${n.status})`);const s=(0,h.normalizeDeviceStreamSettings)(await n.json(),r);Ke.current===t&&(qe.current=s,Oe(s))}).catch(()=>{}).finally(()=>{n.signal.aborted||Ke.current!==t||(Qe.current=!1,Te(!1))}),()=>n.abort()},[_t,Jt]);const Mt=he?.appStateUrl??null;(0,t.useEffect)(()=>{if(xe(null),!Mt)return;let t=null;try{t=new EventSource(Mt)}catch{return}return t.onmessage=t=>{try{const r=JSON.parse(String(t.data));r.bundleId&&xe(t=>t&&t.id===r.bundleId?t.pid===r.pid&&t.isReactNative===r.isReactNative?t:Object.assign({},t,{pid:r.pid,isReactNative:r.isReactNative}):{id:r.bundleId,pid:r.pid,isReactNative:r.isReactNative})}catch{}},()=>t?.close()},[Mt]);const Ht=Ue?.id??null;(0,t.useEffect)(()=>{if(!(Ht&&Dt&&Wt&&$t))return;let t=!1;return(0,l.getIosAppDetails)(t=>H(Dt,Wt,t),$t,Ht).then(r=>{!t&&r&&xe(t=>t&&t.id===Ht?Object.assign({},t,r):t)}).catch(()=>{}),()=>{t=!0}},[Ht,Dt,Wt,$t]);const Vt=he?.gridApiUrl??null;return(0,t.useEffect)(()=>{if(!Vt)return void me(I);let t=!1;return fetch(Vt,{signal:AbortSignal.timeout(3e3)}).then(t=>t.json()).then(r=>{!t&&Array.isArray(r.devices)&&0!==r.devices.length&&me(r.devices.map(t=>({id:String(t.device??t.id??'ios'),name:String(t.name??t.device??'Simulator'),system:'string'==typeof t.runtime?t.runtime:void 0,platform:'ios',current:null!=t.helper})))}).catch(()=>{}),()=>{t=!0}},[Vt]),{platform:'ios',status:q,error:X,screen:Z,fps:te,devices:ge,logs:ne,logsEnabled:ae,attachLogs:bt,detachLogs:yt,clearLogs:wt,events:le,eventsEnabled:ue,attachEvents:Et,detachEvents:kt,clearEvents:Ct,activity:fe,deviceSettings:ye,deviceSettingsPending:Ee,setDeviceSetting:mt,streamCapabilities:D,streamSettings:Ce,streamSettingsPending:Re,updateStreamSettings:vt,webRtcCodec:_e,setWebRtcCodec:St,capabilities:{deviceSettings:!!Dt&&!!Wt&&!!$t,activity:!!Ft,events:!!Lt,streamSettings:!!_t},foregroundApp:Ue,videoKind:Ze?'video':et?'canvas':'img',attachVideo:at,sendTouch:ct,sendMultiTouch:ot,sendKey:it,pressButton:dt,reload:ft,rotate:pt,screenshot:gt,appearance:ve,setAppearance:ht,hardwareKeyboardConnected:Ae,setHardwareKeyboardConnected:lt,toggleSoftwareKeyboard:ut}};var t=_r(_d[0]),r=_r(_d[1]),n=_r(_d[2]),s=_r(_d[3]),a=_r(_d[4]),c=_r(_d[5]),o=_r(_d[6]),l=_r(_d[7]),u=_r(_d[8]),d=_r(_d[9]),f=_r(_d[10]),p=_r(_d[11]),h=_r(_d[12]),S=_r(_d[13]),v=_r(_d[14]),b=_r(_d[15]);const y=1500,w=8e3;function E(t,r,n){let s,a=`${t}${r}`.replace(/\r\n/g,'\n').replace(/\r/g,'\n');for(;-1!==(s=a.indexOf('\n\n'));){const t=a.slice(0,s).split('\n');a=a.slice(s+2);const r=t.find(t=>t.startsWith('event:'))?.slice(6).trim()||'message',c=t.filter(t=>t.startsWith('data:')).map(t=>t.slice(5).replace(/^ /,'')).join('\n');c&&n({event:r,data:c})}return a}const k=3,C=4,O=5,R=6,T=7,A=12,P=13,U=130,x=131,N=21,I=[{id:'ios',name:'iPhone Simulator',platform:'ios',current:!0}],D={modeAvailability:{mjpeg:!0,h264:!0,webrtc:!0},httpCodecs:['auto','h264','mjpeg'],webRtcCodecs:['h264','vp9','vp8']},W=['portrait','landscape_left','portrait_upside_down','landscape_right'],j={home:'home',appSwitcher:'app_switcher',power:'lock',back:null,recents:null},L=new TextEncoder,F=new TextDecoder;function $(t,r){const n=L.encode(JSON.stringify(r)),s=new Uint8Array(1+n.length);return s[0]=t,s.set(n,1),s}function _(t){return t.replace(/^http/,'ws')}function J(t){const r=new URL(t),n=r.pathname.match(/^(.*\/helper)\/([^/]+)\/ws$/);if(!n)throw new Error(`Invalid helper ws url, no deviceId matched: ${t}`);return r.pathname=`${n[1]}/ws`,r.searchParams.has('device')||r.searchParams.set('device',decodeURIComponent(n[2])),r.toString()}function M(t,r,n){return new Promise((s,a)=>{let c;try{c=new WebSocket(t)}catch(t){return void a(t)}let o,l=!1;const u=t=>{if(!l){l=!0,clearTimeout(o);try{c.close()}catch{}t()}};o=setTimeout(()=>u(()=>a(new Error('exec-ws timeout'))),5e3),c.onopen=()=>c.send(JSON.stringify({token:r})),c.onmessage=t=>{let r;try{r=JSON.parse(String(t.data))}catch{return}r.ready?c.send(JSON.stringify({id:1,ui:n})):1===r.id&&(r.error?u(()=>a(new Error(r.error))):u(()=>s(r)))},c.onerror=()=>u(()=>a(new Error('exec-ws error'))),c.onclose=()=>u(()=>a(new Error('exec-ws closed')))})}function H(t,r,n){return new Promise((s,a)=>{let c;try{c=new WebSocket(t)}catch(t){return void a(t)}let o,l=!1;const u=t=>{if(!l){l=!0,clearTimeout(o);try{c.close()}catch{}t()}};o=setTimeout(()=>u(()=>a(new Error('exec-ws timeout'))),1e4),c.onopen=()=>c.send(JSON.stringify({token:r})),c.onmessage=t=>{let r;try{r=JSON.parse(String(t.data))}catch{return}r.ready?c.send(JSON.stringify({id:1,command:n})):1===r.id&&(r.error?u(()=>a(new Error(r.error))):u(()=>s({stdout:r.stdout??'',stderr:r.stderr??'',exitCode:r.exitCode??1})))},c.onerror=()=>u(()=>a(new Error('exec-ws error'))),c.onclose=()=>u(()=>a(new Error('exec-ws closed')))})}},157,[38,158,159,160,153,161,162,163,164,165,166,167,168,169,170,171]);
|
|
214
214
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"initialAvccFallback",{enumerable:!0,get:function(){return t}}),e.avccFallbackReducer=function(c,n){switch(n){case'decoded-frame':return c.streamed?c:Object.assign({},c,{streamed:!0});case'timeout':return c.streamed||c.fellBack?c:Object.assign({},c,{fellBack:!0});case'error':return c.fellBack?c:Object.assign({},c,{fellBack:!0});case'reset':return t}},Object.defineProperty(e,"AVCC_FRAME_TIMEOUT_MS",{enumerable:!0,get:function(){return c}});const t={streamed:!1,fellBack:!1};const c=4e3},158,[]);
|
|
215
215
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MAX_ACTIVITY_SAMPLES",{enumerable:!0,get:function(){return n}}),e.parseActivitySample=function(n){if(!n||'object'!=typeof n||Array.isArray(n))return null;const l=n,u=t(l.t),s=t(l.cpuPct),c=t(l.memBytes),o=t(l.netInBytesPerSec),y=t(l.netOutBytesPerSec);if(null===u||null===s||null===c||null===o||null===y||null!==l.bundleId&&'string'!=typeof l.bundleId)return null;return{t:u,bundleId:l.bundleId,cpuPct:s,memBytes:c,netInBytesPerSec:o,netOutBytesPerSec:y}},e.parseActivityHostCores=function(n){if(!n||'object'!=typeof n||Array.isArray(n))return null;const l=t(n.hostCores);return null!==l&&l>0?l:null},e.appendActivitySample=function(n,t){const l=[...n.samples].reverse().find(n=>null!==n.bundleId)?.bundleId,u=void 0!==l&&null!==t.bundleId&&l!==t.bundleId;return Object.assign({},n,{samples:[...u?[]:n.samples,t].slice(-60),errored:!1,stale:!1})};const n=60;function t(n){return'number'==typeof n&&Number.isFinite(n)?n:null}},159,[]);
|
|
216
216
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AVCC_TAG_DESCRIPTION",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"AVCC_TAG_KEYFRAME",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"AVCC_TAG_DELTA",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"AVCC_TAG_SEED",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"AvccDemuxer",{enumerable:!0,get:function(){return u}}),e.avcCodecString=function(t){if(t.length<4)return'avc1.42E01E';const n=t=>t.toString(16).padStart(2,'0');return`avc1.${n(t[1])}${n(t[2])}${n(t[3])}`},e.isAvccSupported=function(){return'undefined'!=typeof globalThis&&void 0!==globalThis.VideoDecoder};const t=1,n=2,s=3,h=4,f={[t]:'description',[n]:'keyframe',[s]:'delta',[h]:'seed'};class u{buffer=new Uint8Array(65536);length=0;start=0;append(t){if(this.length+t.length>this.buffer.length&&(this.start>0&&(this.buffer.copyWithin(0,this.start,this.length),this.length-=this.start,this.start=0),this.length+t.length>this.buffer.length)){let n=this.buffer.length;for(;n<this.length+t.length;)n*=2;const s=new Uint8Array(n);s.set(this.buffer.subarray(0,this.length)),this.buffer=s}this.buffer.set(t,this.length),this.length+=t.length}push(t){t.length>0&&this.append(t);const n=[],s=this.buffer;for(;this.length-this.start>=4;){const t=this.start,h=(s[t]<<24|s[t+1]<<16|s[t+2]<<8|s[t+3])>>>0;if(this.length-t-4<h)break;if(h<1){this.start+=4;continue}const u=f[s[t+4]];u&&n.push({type:u,payload:s.slice(t+5,t+4+h)}),this.start+=4+h}return this.start>0&&(this.start<this.length&&this.buffer.copyWithin(0,this.start,this.length),this.length-=this.start,this.start=0),n}reset(){this.length=0,this.start=0}}},160,[]);
|
|
217
217
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.endpointFor=function(s,c){return o(`${t(c)}${n[s]}`)},e.startIosHelper=async function(n,s){const c=t(o(s));await fetch(`${c}/grid/api/start`,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({udid:n}),signal:AbortSignal.timeout(19e4)})};const n={ios:'/vendor/serve-sim',android:'/vendor/serve-emu'};function t(n){return n.replace(/\/+$/,'')}function o(n){return n.startsWith('http')?n:'undefined'!=typeof window&&window.location?.origin?`${window.location.origin}${n}`:n}},161,[]);
|
|
218
218
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MAX_IOS_DEVICE_EVENTS",{enumerable:!0,get:function(){return t}}),e.parseIosEventLogPayload=p,e.mapIosEventLogEntry=T,e.createIosEventLogState=function(t=0){const n=Math.max(0,Math.floor(t));return{events:[],clearedThroughId:n,latestId:n,hasSnapshot:!1,clearPending:!1}},e.mergeIosEventLogPayload=function(t,n,s){const o=p(n);if(!o)return t;const c=void 0!==o.events,u=(o.events??[]).reduce((t,n)=>Math.max(t,n.id),0),l=c&&t.hasSnapshot&&(t.latestId>0&&0===u||u>0&&u<t.latestId);let f=l?0:t.clearedThroughId;if(c&&t.clearPending)for(const t of o.events??[])f=Math.max(f,t.id);const h=new Map;if(!l)for(const n of t.events){const t=v(n,s);null!==t&&t>f&&h.set(t,n)}const y=[...o.events??[],...o.event?[o.event]:[]];for(const t of y)t.id<=f||h.set(t.id,T(t,s));return{events:[...h.entries()].sort(([t],[n])=>t-n).slice(-500).map(([,t])=>t),clearedThroughId:f,latestId:c?Math.max(u,o.event?.id??0):Math.max(t.latestId,o.event?.id??0),hasSnapshot:t.hasSnapshot||c,clearPending:!c&&t.clearPending}},e.clearIosEventLogState=function(t,n){let s=t.clearedThroughId;for(const o of t.events){const t=v(o,n);null!==t&&(s=Math.max(s,t))}return{events:[],clearedThroughId:s,latestId:t.latestId,hasSnapshot:t.hasSnapshot,clearPending:!t.hasSnapshot}};const t=500,n=/^(?:command|credential|password|path|secret|stderr|stdout|text|token)$/i,s=/^[a-z0-9][a-z0-9._:/-]*$/i,o=128,c=5;function u(t){return null!==t&&'object'==typeof t&&!Array.isArray(t)}function l(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function f(t){return'string'==typeof t&&t.length>0&&t.length<=o&&s.test(t)?t:null}function h(t){if(!u(t))return null;if(!Number.isSafeInteger(t.id)||t.id<0)return null;if('string'!=typeof t.timestamp||!Number.isFinite(Date.parse(t.timestamp)))return null;const n=f(t.source),s=f(t.kind);if(!n||!s)return null;const o=void 0===t.action?void 0:f(t.action);if(void 0!==t.action&&!o)return null;const c='ok'===t.status||'error'===t.status?t.status:void 0,l=u(t.details)?Object.assign({},t.details):void 0;return Object.assign({id:t.id,timestamp:t.timestamp,source:n,kind:s},'string'==typeof t.msg?{msg:t.msg}:{},'string'==typeof t.summary?{summary:t.summary}:{},'string'==typeof t.device?{device:t.device}:{},o?{action:o}:{},c?{status:c}:{},l?{details:l}:{})}function p(t){let n=t;if('string'==typeof n)try{n=JSON.parse(n)}catch{return null}if(!u(n))return null;const s={};let o=!1;if(l(n,'events')){if(!Array.isArray(n.events))return null;s.events=n.events.map(t=>h(t)).filter(t=>null!==t),o=!0}if(l(n,'event')){const t=h(n.event);if(!t)return o?s:null;s.event=t,o=!0}return o?s:null}function y(t,n){return`ios:${encodeURIComponent(t)}:${n}`}function v(t,n){const s=`ios:${encodeURIComponent(n)}:`;if(!t.id.startsWith(s))return null;const o=Number(t.id.slice(s.length));return Number.isSafeInteger(o)&&o>=0?o:null}function k(t){return t.replace(/[-_]+/g,' ')}function $(t){const n=k(t);return n.length>0?`${n[0].toUpperCase()}${n.slice(1)}`:n}function I(t){return'number'==typeof t&&Number.isFinite(t)?t:null}function b(t,n){const s=t?.[n];if(!u(s))return null;const o=I(s.x),c=I(s.y);return null===o||null===c?null:{x:o,y:c}}function S(t){return Math.min(1,Math.max(0,t)).toFixed(2)}function w(t){return`${S(t.x)}, ${S(t.y)}`}function M(t){return'string'!=typeof t?'key':'character'===t||/^(?:Arrow(?:Down|Left|Right|Up)|Backspace|CapsLock|Delete|End|Enter|Escape|F\d{1,2}|Home|Insert|Numpad[A-Za-z0-9]+|PageDown|PageUp|Pause|PrintScreen|ScrollLock|Space|Tab)$/.test(t)||/^(?:Alt|Control|Meta|Shift)(?:Left|Right)$/.test(t)?t:'character'}function A(t,s){if(s>=c)return'[truncated]';if(Array.isArray(t))return t.slice(0,100).map(t=>A(t,s+1));if(!u(t))return t;const o={};for(const[c,u]of Object.entries(t))o[c]=n.test(c)?'[redacted]':A(u,s+1);return o}function E(t){if(!t.details)return;const n=A(t.details,0);if('key'===t.kind){const s=M(t.details.key);n.key=s,'character'===s&&(n.redacted=!0,delete n.usage)}return n}function P(t){switch(t.kind){case'tap':case'drag':case'touch':case'multi-touch':case'scroll':return'touch';case'key':case'software-keyboard':return'keyboard';case'ui-setting':return'settings';default:return t.kind}}function x(t){return'tap'===t.kind||'drag'===t.kind||'scroll'===t.kind?t.kind:'software-keyboard'===t.kind?'toggle':'multi-touch'===t.kind?t.action?`multi-touch-${t.action}`:'multi-touch':t.action}function C(t,n){const s=x(t);switch(t.kind){case'tap':{const t=b(n,'current')??b(n,'start');return t?`Tap at ${w(t)}`:'Tap'}case'drag':{const t=b(n,'start'),s=b(n,'current');return t&&s?`Drag from ${w(t)} to ${w(s)}`:'Drag'}case'touch':return s?`Touch ${k(s)}`:'Touch';case'multi-touch':return t.action?`Multi-touch ${k(t.action)}`:'Multi-touch';case'scroll':return'Scroll';case'key':{const t=M(n?.key);return s?`Key ${k(s)} ${t}`:`Key ${t}`}case'software-keyboard':return'Software keyboard';case'button':return s?`Button ${$(s)}`:'Button';case'rotate':return s?`Rotate ${k(s)}`:'Rotate';case'memory-warning':return'Memory warning';case'ca-debug':return s?`Core Animation ${k(s)}`:'Core Animation setting';case'digital-crown':return'Digital Crown';case'app':return s?`${$(s)} app`:'App event';case'media':return'Add media';case'screenshot':return'Screenshot';case'camera':return s?`Camera ${k(s)}`:'Camera';case'ui-setting':{const t=f(n?.value);return s?`Set ${$(s)}${t?` to ${$(t)}`:''}`:'Device setting changed'}default:return`Event ${k(t.kind)}`}}function T(t,n){const s=E(t),o=x(t);return Object.assign({id:y(n,t.id),timestamp:t.timestamp,source:t.source,kind:P(t)},o?{action:o}:{},{message:C(t,s)},t.status?{status:t.status}:{},s?{details:s}:{})}},162,[]);
|
|
219
219
|
__d(function(g,r,i,a,m,e,d){"use strict";function n(n){return`'${n.replace(/'/g,"'\\''")}'`}async function t(t,o,l){const s=await t(`xcrun simctl get_app_container ${o} ${n(l)} app`);if(0!==s.exitCode)return null;const c=s.stdout.trim();if(!c)return null;const u=await t(`plutil -convert json -o - ${n(`${c}/Info.plist`)}`);let p,$={};if(0===u.exitCode)try{$=JSON.parse(u.stdout)}catch{}const F=$?.CFBundleIcons?.CFBundlePrimaryIcon??$?.['CFBundleIcons~ipad']?.CFBundlePrimaryIcon,C=F?.CFBundleIconFiles??$?.CFBundleIconFiles;let f;if(C&&C.length>0?p=C[C.length-1]:'string'==typeof $?.CFBundleIconFile&&(p=$.CFBundleIconFile),p){const o=[`${p}@3x.png`,`${p}@2x.png`,`${p}.png`,`${p}60x60@3x.png`,`${p}60x60@2x.png`],l=(await t(`bash -c ${n(o.map(t=>`[ -f ${n(`${c}/${t}`)} ] && echo ${n(`${c}/${t}`)} && exit 0`).join('; ')+'; exit 1')}`)).stdout.trim();if(l){const o=await t(`base64 -i ${n(l)}`);0===o.exitCode&&(f=`data:image/png;base64,${o.stdout.replace(/\s+/g,'')}`)}}return{appPath:c,label:$.CFBundleDisplayName??$.CFBundleName,version:$.CFBundleShortVersionString,build:$.CFBundleVersion,minOS:$.MinimumOSVersion,executable:$.CFBundleExecutable,iconDataUrl:f}}Object.defineProperty(e,'__esModule',{value:!0}),e.shellEscape=n,e.fetchIosAppDetails=t,e.getIosAppDetails=function(n,l,s){const c=`${l}:${s}`,u=o.get(c);if(u)return u;const p=t(n,l,s).catch(n=>{throw o.delete(c),n});return o.set(c,p),p};const o=new Map},163,[]);
|
|
220
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
221
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
222
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
223
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
224
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
225
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
226
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
227
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
228
|
-
__d(function(g,
|
|
229
|
-
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildCodecString=function(t){const n=t[1].toString(16).padStart(2,'0'),i=t[2].toString(16).padStart(2,'0'),o=t[3].toString(16).padStart(2,'0');return`avc1.${n}${i}${o}`},e.scanAU=function(t){let n=!1,i=null;const o=t.length;let s=0;for(;s+2<o;){if(0===t[s]&&0===t[s+1]){let u=0;if(1===t[s+2]?u=3:s+3<o&&0===t[s+2]&&1===t[s+3]&&(u=4),u){const o=31&t[s+u];7!==o||i||(i=t.subarray(s+u)),5===o&&(n=!0),s+=u+1;continue}}s++}return{isKey:n,spsBytes:i}},e.parseFramePacket=function(s){const u=s instanceof Uint8Array?s:new Uint8Array(s);if(u.byteLength>i){const s=new DataView(u.buffer,u.byteOffset,i);if(s.getUint32(0,!1)===t&&s.getUint8(4)===n){const t=s.getBigUint64(8,!1);return{data:u.subarray(i),isKey:0!==(s.getUint8(5)&o),timestamp:t<=BigInt(Number.MAX_SAFE_INTEGER)?Number(t):null}}}return{data:u,isKey:null,timestamp:null}},e.isWebCodecsSupported=function(){return'undefined'!=typeof globalThis&&'VideoDecoder'in globalThis&&'EncodedVideoChunk'in globalThis};const t=1397050709,n=1,i=16,o=1},173,[]);
|
|
220
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fetchIosScreenshot=async function(t,c,n=fetch){const o=`${t.replace(/\/$/,'')}/api/screenshot${c?`?device=${encodeURIComponent(c)}`:''}`;try{const t=await n(o,{method:'POST',cache:'no-store'});return t.ok?await t.blob():null}catch{return null}}},164,[]);
|
|
221
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.hidUsageForCode=function(o){return t[o]??null},e.androidMessageForKeyboardInput=function(t){if('down'!==t.phase)return null;if('Escape'===t.key)return{type:'back'};const u=o[t.key];return void 0!==u?{type:'key',keycode:u}:1===t.key.length?{type:'text',text:t.key}:null};const t={KeyA:4,KeyB:5,KeyC:6,KeyD:7,KeyE:8,KeyF:9,KeyG:10,KeyH:11,KeyI:12,KeyJ:13,KeyK:14,KeyL:15,KeyM:16,KeyN:17,KeyO:18,KeyP:19,KeyQ:20,KeyR:21,KeyS:22,KeyT:23,KeyU:24,KeyV:25,KeyW:26,KeyX:27,KeyY:28,KeyZ:29,Digit1:30,Digit2:31,Digit3:32,Digit4:33,Digit5:34,Digit6:35,Digit7:36,Digit8:37,Digit9:38,Digit0:39,Enter:40,Escape:41,Backspace:42,Tab:43,Space:44,Minus:45,Equal:46,BracketLeft:47,BracketRight:48,Backslash:49,Semicolon:51,Quote:52,Backquote:53,Comma:54,Period:55,Slash:56,CapsLock:57,F1:58,F2:59,F3:60,F4:61,F5:62,F6:63,F7:64,F8:65,F9:66,F10:67,F11:68,F12:69,PrintScreen:70,ScrollLock:71,Pause:72,Insert:73,Home:74,PageUp:75,Delete:76,End:77,PageDown:78,ArrowRight:79,ArrowLeft:80,ArrowDown:81,ArrowUp:82,NumLock:83,NumpadDivide:84,NumpadMultiply:85,NumpadSubtract:86,NumpadAdd:87,NumpadEnter:88,Numpad1:89,Numpad2:90,Numpad3:91,Numpad4:92,Numpad5:93,Numpad6:94,Numpad7:95,Numpad8:96,Numpad9:97,Numpad0:98,NumpadDecimal:99,ControlLeft:224,ShiftLeft:225,AltLeft:226,MetaLeft:227,ControlRight:228,ShiftRight:229,AltRight:230,MetaRight:231};const o={ArrowUp:19,ArrowDown:20,ArrowLeft:21,ArrowRight:22,Tab:61,Enter:66,Backspace:67,Delete:112,Home:122,End:123,PageUp:92,PageDown:93}},165,[]);
|
|
222
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DeviceSettingWriteTracker",{enumerable:!0,get:function(){return t}}),e.mergeAuthoritativeDeviceSetting=function(t,n,s){const c=Object.assign({},t??{}),u=s[n];'string'==typeof u?c[n]=u:delete c[n];return c};class t{#e=new Map;#t=0;#i=0;start(t){if(this.#e.has(t))return null;const n={key:t,generation:this.#t,id:++this.#i};return this.#e.set(t,n),n}isCurrent(t){return t.generation===this.#t&&this.#e.get(t.key)===t}finish(t){return!!this.isCurrent(t)&&(this.#e.delete(t.key),!0)}reset(){this.#t++,this.#e.clear()}get pending(){return new Set(this.#e.keys())}}},166,[]);
|
|
223
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.proxyPreviewConfigForBrowser=function(o,t){if(!o.device||!o.proxyHelpers)return o;const s=`${'/'===o.basePath?'':(o.basePath??'').replace(/\/+$/,'')}/helper/${encodeURIComponent(o.device)}`,n=`${t.protocol}//${t.host}`,c='https:'===t.protocol?'wss:':'ws:';return Object.assign({},o,{url:`${n}${s}`,streamUrl:`${n}${s}/stream.mjpeg`,wsUrl:`${c}//${t.host}${s}/ws`})}},167,[]);
|
|
224
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_DEVICE_STREAM_SETTINGS",{enumerable:!0,get:function(){return t}}),e.normalizeDeviceStreamSettings=function(n,s=t){const p=n&&'object'==typeof n&&!Array.isArray(n)?n:{};return{mjpegFps:o(p.mjpegFps,s.mjpegFps,1,120),mjpegQuality:u(p.mjpegQuality,s.mjpegQuality,.05,1),maxDimension:o(p.maxDimension,s.maxDimension,0,4096),h264Bitrate:o(p.h264Bitrate,s.h264Bitrate,1e5,5e7),h264Fps:o(p.h264Fps,s.h264Fps,1,120)}};const t={mjpegFps:60,mjpegQuality:.7,maxDimension:0,h264Bitrate:6e6,h264Fps:60};function n(t){return'number'==typeof t&&Number.isFinite(t)?t:null}function u(t,u,o,s){const p=n(t);return null===p?u:Math.min(s,Math.max(o,p))}function o(t,n,o,s){return Math.round(u(t,n,o,s))}},168,[]);
|
|
225
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useAvccStream=function({url:s,enabled:l,canvasRef:u,onFirstFrame:f,onFrame:h,onDecodedFrame:y,onResize:p,onError:w,onDecoderError:F}){const E=(0,t.useRef)({onFirstFrame:f,onFrame:h,onDecodedFrame:y,onResize:p,onError:w,onDecoderError:F});E.current={onFirstFrame:f,onFrame:h,onDecodedFrame:y,onResize:p,onError:w,onDecoderError:F},(0,t.useEffect)(()=>{if(!l||!s||!(0,o.isAvccSupported)())return;const t=new AbortController,f=new o.AvccDemuxer;let h=!1,y=!1,p=!1,w=0,F=null,D=null;const b=()=>!h&&!t.signal.aborted,v=t=>{E.current.onDecoderError?E.current.onDecoderError():E.current.onError?.(t)},k=(t,o,n,c)=>{if(!b())return;const s=u.current;if(!s)return;s.width===o&&s.height===n||(s.width=o,s.height=n,E.current.onResize?.(o,n));const l=s.getContext('2d');l&&(l.drawImage(t,0,0,o,n),E.current.onFrame?.(),c&&!p&&(p=!0,E.current.onDecodedFrame?.()),y||(y=!0,E.current.onFirstFrame?.()))},R=async t=>{const o=await createImageBitmap(new Blob([t],{type:'image/jpeg'}));try{b()&&k(o,o.width,o.height,!1)}finally{o.close()}},z=t=>{D&&'closed'!==D.state||(D=new VideoDecoder({output:t=>{try{b()&&k(t,t.displayWidth,t.displayHeight,!0)}finally{t.close()}},error:t=>v(`decoder: ${t.message}`)}));try{D.configure({codec:(0,o.avcCodecString)(t),description:t,optimizeForLatency:!0,hardwareAcceleration:'prefer-hardware'})}catch(t){v(`config: ${t.message}`)}},A=(t,o)=>{if('configured'===D?.state)try{D.decode(new EncodedVideoChunk({type:'keyframe'===t?'key':'delta',timestamp:w,data:o})),w+=c}catch{}},C=(t,o)=>{switch(t){case'seed':R(o).catch(()=>{});break;case'description':z(o);break;case'keyframe':case'delta':A(t,o)}},$=async()=>{f.reset();try{const o=await fetch(`${s}/stream.avcc`,{signal:t.signal});if(!o.ok)throw new Error(`H.264 stream failed (${o.status})`);const n=o.body?.getReader();if(!n)return;for(;;){const{done:t,value:o}=await n.read();if(t)break;if(o)for(const t of f.push(o))C(t.type,t.payload)}}catch{}finally{b()&&b()&&!F&&(F=setTimeout(()=>{F=null,$()},n))}};return $(),()=>{if(h=!0,F&&clearTimeout(F),t.abort(),f.reset(),D&&'closed'!==D.state)try{D.close()}catch{}D=null}},[s,l,u])};var t=r(d[0]),o=r(d[1]);const n=1e3,c=16667},169,[38,160]);
|
|
226
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.preferredVideoCodecs=y,e.buildWebRtcOfferPayload=R,e.isRetryableWebRtcOfferStatus=T,e.shouldFallbackCodecAfterFirstFrameTimeout=C,e.useWebRtcStream=function({offerUrl:n,closeUrl:h,enabled:W,codec:I,iceServers:k,iceTransportPolicy:E="all",sendIceServersInOffer:L=!0,allowCodecFallback:O=!0,onKeyframeNeeded:P}){const[$,D]=(0,t.useState)(null),[F,U]=(0,t.useState)(null),[M,j]=(0,t.useState)(null),[A,_]=(0,t.useState)(0),G=(0,t.useRef)(void 0),N=(0,t.useRef)(!1),V=(0,t.useRef)(0),q=(0,t.useCallback)(()=>{N.current=!0,V.current=0,void 0!==G.current&&(window.clearTimeout(G.current),G.current=void 0),U(null),j(null)},[]);return(0,t.useEffect)(()=>{V.current=0},[W,n,h,I,k,E,L,O]),(0,t.useEffect)(()=>{if(!W||!n)return;if(U(null),'undefined'==typeof RTCPeerConnection||'undefined'==typeof RTCRtpReceiver)return D(null),j('WebRTC is not supported by this browser.'),void U({sessionId:S(),kind:'permanent'});let t,$,F=!1,M=null,A=null,q=!1,z=!1,B=!1;const H=new AbortController,J=S(),K=k?.length?k:c;D(null),U(null),j(null),N.current=!1,void 0!==G.current&&(window.clearTimeout(G.current),G.current=void 0);const x=(t=!1)=>A||(A=(0,o.closeWebRtcSession)({url:h,sessionId:J,keepalive:t}),A),Q=()=>{x(!0)};window.addEventListener('pagehide',Q),window.addEventListener('beforeunload',Q);const X=()=>{void 0!==G.current&&(window.clearTimeout(G.current),G.current=void 0)},Y=()=>{void 0!==$&&(window.clearTimeout($),$=void 0)},Z=()=>{X(),Y(),D(null),M?.close()},ee=()=>{try{P?.()}catch{}},te=t=>{F||q||(q=!0,j(t),U({sessionId:J,kind:'permanent'}),Z(),x())},ne=n=>{if(F||q)return;q=!0,U(null);const o=V.current++,c=Math.min(w*2**Math.min(o,4),p);ee(),j(`${n} Retrying...`),Z(),x(),t=window.setTimeout(()=>{F||_(t=>t+1)},c)},re=()=>{!F&&!N.current&&z&&B&&void 0===G.current&&(G.current=window.setTimeout(()=>{if(G.current=void 0,F||N.current)return;C(O,M?.connectionState??'closed')?(ee(),F||q||(q=!0,Z(),x().finally(()=>{F||U({sessionId:J,kind:'codec',codec:I})}))):ne('WebRTC did not establish a video path.')},u))};return(async()=>{try{M=new RTCPeerConnection({iceServers:K,iceTransportPolicy:E});const c=M.addTransceiver('video',{direction:'recvonly'}),u=RTCRtpReceiver.getCapabilities('video');u?.codecs.length&&'setCodecPreferences'in c&&c.setCodecPreferences(y(u.codecs,I)),M.ontrack=t=>{F||(z=!0,N.current=!1,t.track.onended=()=>ne('WebRTC video track ended.'),D(t.streams[0]??new MediaStream([t.track])),X(),re())},M.onconnectionstatechange=()=>{!F&&M&&('connected'===M.connectionState?(B=!0,Y(),re()):'disconnected'===M.connectionState?(B=!1,X(),void 0===$&&($=window.setTimeout(()=>{$=void 0,!F&&M&&'connected'!==M.connectionState&&ne('WebRTC remained disconnected.')},b))):'failed'!==M.connectionState&&'closed'!==M.connectionState||ne('WebRTC connection failed.'))};const w=await M.createOffer();await M.setLocalDescription(w),await(t=M,new Promise(n=>{if('complete'===t.iceGatheringState)return void n();let o,c=!1;const l=()=>{c||(c=!0,t.removeEventListener('icegatheringstatechange',u),void 0!==o&&window.clearTimeout(o),n())},u=()=>{'complete'===t.iceGatheringState&&l()};t.addEventListener('icegatheringstatechange',u),o=window.setTimeout(l,s)}));const p=M.localDescription;if(!p)throw new Error('WebRTC offer was not created');const C=await(0,o.postWebRtcOffer)({url:n,signal:H.signal,requestTimeoutMs:l,busyRetryIntervalMs:f,busyRetryCount:v,body:JSON.stringify(R({description:p,sessionId:J,codec:I,iceServers:K,sendIceServersInOffer:L}))});if(!C.ok){const t=C.status;await(C.body?.cancel());const n=`WebRTC offer failed: HTTP ${t}.`;return void(T(t)?ne(n):te(n))}const S=await C.json();if(F)return void await x(!0);try{await M.setRemoteDescription(S)}catch{te('WebRTC returned an invalid session description.')}}catch(t){if(F||H.signal.aborted)return;if(t instanceof o.WebRtcSignalingBusyError)return void ne('WebRTC signaling stayed busy for too long.');const n=t instanceof o.WebRtcSignalingTimeoutError?'WebRTC signaling timed out.':'WebRTC signaling failed.';ne(n)}var t})(),()=>{F=!0,window.removeEventListener('pagehide',Q),window.removeEventListener('beforeunload',Q),H.abort(),void 0!==t&&window.clearTimeout(t),X(),Y(),x(!0),D(null),M?.close()}},[W,n,h,I,k,E,L,O,P,A]),{stream:$,failure:F,error:M,markFrameDecoded:q}};var t=r(d[0]),n=r(d[1]),o=r(d[2]);const c=[{urls:['stun:stun.l.google.com:19302']},{urls:['stun:stun1.l.google.com:19302']}],s=3e3,l=2e4,u=4e3,f=500,v=30,w=500,p=5e3,b=1e4;function y(t,n){const o='h264'===n?'video/h264':'vp9'===n?'video/vp9':'video/vp8';if('h264'!==n)return[...t.filter(t=>t.mimeType.toLowerCase()===o),...t.filter(t=>t.mimeType.toLowerCase()!==o)];const c=t=>t.mimeType.toLowerCase()===o,s=t=>/(?:^|;)\s*packetization-mode=1(?:\s*;|$)/i.test(t.sdpFmtpLine??'');return[...t.filter(t=>c(t)&&s(t)),...t.filter(t=>c(t)&&!s(t)),...t.filter(t=>!c(t))]}function R({description:t,sessionId:n,codec:o,iceServers:c,sendIceServersInOffer:s=!0}){return Object.assign({type:t.type,sdp:t.sdp,sessionId:n,codec:o},s?{iceServers:c}:{})}function T(t){return 408===t||425===t||429===t||t>=500}function C(t,o){return t&&'codec'===(0,n.webRtcFailureDisposition)('first-frame-timeout',o)}function S(){if('function'==typeof crypto.randomUUID)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint8Array(16));t[6]=15&t[6]|64,t[8]=63&t[8]|128;const n=Array.from(t,t=>t.toString(16).padStart(2,'0')).join('');return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}},170,[38,171,172]);
|
|
227
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.nextWebRtcFallbackCodec=n,e.webRtcFallbackDecision=function(t,c,o){if('permanent'===o.kind)return{type:'switch-to-http'};if(o.codec!==c)return null;const u=n(t,c);return u&&u!==c?{type:'retry-codec',codec:u}:{type:'switch-to-http'}},e.webRtcFailureDisposition=function(t,n){return'first-frame-timeout'===t&&'connected'===n?'codec':'transport'};const t={h264:['h264','vp8','vp9'],vp9:['vp9','vp8'],vp8:['vp8']};function n(n,c){const o=t[n],u=o.indexOf(c);return-1===u?o[0]??null:o[u+1]??null}},171,[]);
|
|
228
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WebRtcSignalingBusyError",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"WebRtcSignalingTimeoutError",{enumerable:!0,get:function(){return n}}),e.closeWebRtcSession=async function({url:t,sessionId:n,keepalive:o=!1,sendBeacon:s,fetchImpl:c=fetch}){const u=JSON.stringify({sessionId:n}),l=s??('undefined'!=typeof navigator&&'function'==typeof navigator.sendBeacon?navigator.sendBeacon.bind(navigator):void 0);if(o&&l)try{if(l(t,new Blob([u],{type:'text/plain;charset=UTF-8'})))return}catch{}await c(t,{method:'POST',headers:{'Content-Type':'application/json'},body:u,keepalive:o}).then(()=>{},()=>{})},e.postWebRtcOffer=async function({url:c,body:u,signal:l,requestTimeoutMs:b,busyRetryIntervalMs:f,busyRetryCount:y,fetchImpl:p=fetch}){for(let h=0;h<=y;h++){if(l?.aborted)throw o(l);const w=new AbortController;let v=!1;const T=()=>w.abort(l?o(l):void 0);l?.addEventListener('abort',T,{once:!0});const E=setTimeout(()=>{v=!0,w.abort()},b);let R;try{R=await p(c,{method:'POST',headers:{'Content-Type':'application/json'},signal:w.signal,body:u})}catch(t){if(v&&!l?.aborted)throw new n;throw t}finally{clearTimeout(E),l?.removeEventListener('abort',T)}if(409!==R.status)return R;if(await(R.body?.cancel()),h===y)throw new t;await s(f,l)}throw new t};class t extends Error{constructor(){super('WebRTC signaling stayed busy for too long. Reload to try again.'),this.name='WebRtcSignalingBusyError'}}class n extends Error{constructor(){super('WebRTC signaling timed out.'),this.name='WebRtcSignalingTimeoutError'}}function o(t){return t.reason??new DOMException('The operation was aborted','AbortError')}function s(t,n){return n?.aborted?Promise.reject(o(n)):new Promise((s,c)=>{const u=setTimeout(function(){n?.removeEventListener('abort',l),s()},t);function l(){clearTimeout(u),c(n?o(n):new DOMException('The operation was aborted','AbortError'))}n?.addEventListener('abort',l,{once:!0})})}},172,[]);
|
|
229
|
+
__d(function(g,_r,i,_a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.androidWsUrlFor=R,e.parseServeEmuStreamSettings=O,e.useAndroidDeviceClient=function(N){const{baseUrl:P,enabled:I=!0,device:T=null,streamMode:j}=N,$=I&&!!P,[W,D]=(0,t.useState)('idle'),[F,z]=(0,t.useState)(null),[K,U]=(0,t.useState)(null),[L,M]=(0,t.useState)(0),[J,V]=(0,t.useState)([]),[H,x]=(0,t.useState)(!1),[q,_]=(0,t.useState)([]),[B,Q]=(0,t.useState)(!1),[G,X]=(0,t.useState)(w),[Y,Z]=(0,t.useState)(null),[ee,te]=(0,t.useState)(null),[re,ne]=(0,t.useState)(()=>new Set),[ae,ie]=(0,t.useState)(null),[oe,ce]=(0,t.useState)(null),[se,le]=(0,t.useState)(null),[ue,de]=(0,t.useState)(!1),[pe,fe]=(0,t.useState)(!1),[he,ye]=(0,t.useState)(null),ve=(0,t.useRef)(null),ge=(0,t.useRef)(null),be=(0,t.useRef)(0),me=(0,t.useRef)((0,r.createAndroidEventCursor)()),Se=(0,t.useRef)(new a.DeviceSettingWriteTracker),we=(0,t.useRef)({appearance:0,network:0,'text-size':0}),ke=`${$?'active':'inactive'}\0${P??''}\0${T??''}`,Ce=(0,t.useRef)(ke);(0,t.useLayoutEffect)(()=>{Ce.current=ke},[ke]);const Ee=(0,t.useCallback)(t=>{ge.current='CANVAS'===t?.tagName?t:null;const r='VIDEO'===t?.tagName?t:null;le(t=>t===r?t:r)},[]),Ae=(0,t.useCallback)(()=>x(!0),[]),Re=(0,t.useCallback)(()=>x(!1),[]),Ne=(0,t.useCallback)(()=>V([]),[]),Oe=(0,t.useCallback)(()=>Q(!0),[]),Pe=(0,t.useCallback)(()=>Q(!1),[]),Ie=(0,t.useCallback)(()=>{me.current=(0,r.clearAndroidEventCursor)(me.current),_([])},[]),Te=(0,t.useCallback)(t=>{const r=ve.current;return!(!r||r.readyState!==WebSocket.OPEN)&&(r.send(JSON.stringify(Object.assign({ack:!1},t))),!0)},[]),je=(0,t.useCallback)(t=>{Te({type:'touch',action:C[t.phase],x:t.x,y:t.y,pointerId:0})},[Te]),$e=(0,t.useCallback)(t=>{const r=k[t];r&&Te(r)},[Te]),We=(0,t.useCallback)(t=>{const r=(0,c.androidMessageForKeyboardInput)(t);return!!r&&Te(r)},[Te]),De=(0,t.useCallback)(()=>{Te({type:'key',keycode:S,record:!1})},[Te]),Fe=(0,t.useCallback)(()=>{if(!P)return;const t=K&&K.width>K.height?'portrait':'landscape',r=`${E(P,'/api/orientation')}${T?`?device=${encodeURIComponent(T)}`:''}`;fetch(r,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({orientation:t})}).catch(()=>{})},[P,T,K]),ze=(0,t.useCallback)(async()=>{if(!P)return null;const t=`${E(P,'/api/screenshot')}${T?`?device=${encodeURIComponent(T)}`:''}`;try{const r=await fetch(t,{cache:'no-store'});return r.ok?await r.blob():null}catch{return null}},[P,T]),Ke=(0,t.useCallback)((t,r)=>{if(!P)return;const o=(0,n.androidDeviceSettingRequest)(t,r);if(!o)return;const c=t,s=Se.current,l=s.start(t);if(!l)return;we.current[c]++;const u=ke,d=ee?.[t],p=A(P,o.path,T);ne(s.pending),te(n=>Object.assign({},n??{},{[t]:r})),'appearance'===t&&Z(r),fetch(p,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(o.body)}).then(async r=>{if(!r.ok)throw new Error(`Device option update failed (${r.status})`);const a=await r.json(),o=(0,n.parseAndroidDeviceSetting)(c,a);if(null===o)throw new Error('Device option update was rejected');s.isCurrent(l)&&Ce.current===u&&(te(r=>Object.assign({},r??{},{[t]:o})),'appearance'===t&&Z(o))}).catch(async()=>{if(!s.isCurrent(l)||Ce.current!==u)return;let r=null;try{const t=await fetch(p,{cache:'no-store'});if(!t.ok)throw new Error('Device option refresh failed');r=(0,n.parseAndroidDeviceSetting)(c,await t.json())}catch{r=d??null}s.isCurrent(l)&&Ce.current===u&&(te(n=>(0,a.mergeAuthoritativeDeviceSetting)(n,t,null===r?{}:{[t]:r})),'appearance'===t&&Z('light'===r||'dark'===r?r:null))}).finally(()=>{s.finish(l)&&ne(s.pending)})},[P,ke,ee,T]),Ue=(0,t.useCallback)(t=>Ke('appearance',t),[Ke]);(0,t.useEffect)(()=>{if(ce(null),!$||!P)return;let t=!1,r=!1,n=null;const a=A(P,'/api',T),o=async()=>{if(!t&&!r){r=!0,n=new AbortController;try{const r=await fetch(a,{cache:'no-store',signal:n.signal});if(!r.ok)return;const o=await r.json();if(t)return;const c=O(o.stream)??{transport:'websocket'};ce(t=>JSON.stringify(t)===JSON.stringify(c)?t:c);const s=Number(o.size?.width),l=Number(o.size?.height);s>0&&l>0&&U(t=>t?.width===s&&t.height===l?t:{width:s,height:l})}catch{}finally{r=!1,n=null}}};o();const c=setInterval(o,h);return()=>{t=!0,clearInterval(c),n?.abort()}},[$,P,T]);const Le='webrtc'===j,Me=Le&&null===oe,Je=Le&&'webrtc'===oe?.transport,Ve=(0,t.useCallback)(()=>{Te({type:'reset-video'})},[Te]),{stream:He,error:xe,markFrameDecoded:qe}=(0,l.useWebRtcStream)({offerUrl:P?A(P,'/webrtc/offer',T):'',closeUrl:P?A(P,'/webrtc/close',T):'',enabled:$&&Je,codec:'h264',iceServers:'webrtc'===oe?.transport?oe.iceServers:void 0,iceTransportPolicy:'webrtc'===oe?.transport?oe.iceTransportPolicy:'all',sendIceServersInOffer:!1,allowCodecFallback:!1,onKeyframeNeeded:Ve});return(0,t.useEffect)(()=>{if(!Je)return de(!1),fe(!1),void ye(null);xe?(D('error'),z(xe)):he?(D('error'),z(he)):He&&ue&&pe?(D('streaming'),z(null)):(D('connecting'),z(null))},[Je,xe,he,pe,He,ue]),(0,t.useEffect)(()=>{if(!Je)return;const t=se;if(!t)return;let r=!1,n=!0,a=0,o=0,c=performance.now();const s=()=>{if(r)return;if(t.videoWidth>0&&t.videoHeight>0){const r=t.videoWidth,n=t.videoHeight;U(t=>t?.width===r&&t.height===n?t:{width:r,height:n})}n&&(n=!1,qe(),de(!0)),o++;const a=performance.now();if(a-c>=1e3){const t=Math.round(1e3*o/(a-c));o=0,c=a,M(r=>r===t?r:t)}},l=()=>{s(),a=t.requestVideoFrameCallback(l)},u=()=>s();return t.srcObject=He,de(!1),He&&('function'==typeof t.requestVideoFrameCallback?a=t.requestVideoFrameCallback(l):t.addEventListener('timeupdate',u),t.addEventListener('loadeddata',s,{once:!0}),t.play().catch(()=>{})),()=>{r=!0,t.removeEventListener('loadeddata',s),t.removeEventListener('timeupdate',u),a&&'function'==typeof t.cancelVideoFrameCallback&&t.cancelVideoFrameCallback(a),t.srcObject=null,de(!1),M(0)}},[Je,He,se,qe]),(0,t.useEffect)(()=>{if(!$||!P)return void D('idle');if(Me)return D('connecting'),void z(null);if(Je)return;const t=!(0,o.isWebCodecsSupported)();if(t&&!s.MsePlayer.isSupported())return D('error'),void z('This browser cannot decode H.264 (WebCodecs unavailable).');D('connecting'),z(null);let r=!1,n=null,a=!1,c=500,l=null,p=null,f=!1,h=!1,y=0,v=0,b=0,S=performance.now();const w=()=>{if(p&&'closed'!==p.state)try{p.close()}catch{}p=null},k=()=>{const t=ve.current,r=performance.now();t&&t.readyState===WebSocket.OPEN&&(r-y<d||(y=r,t.send(JSON.stringify({type:'reset-video',ack:!1}))))},C=t=>{const n=ge.current,o=n?.getContext('2d',{alpha:!1,desynchronized:!0});if(!n||!o)return void t.close();n.width===t.displayWidth&&n.height===t.displayHeight||(n.width=t.displayWidth,n.height=t.displayHeight,U({width:t.displayWidth,height:t.displayHeight})),o.drawImage(t,0,0),t.close(),r||a||(a=!0,D('streaming'),z(null)),b++;const c=performance.now();if(c-S>=1e3){const t=Math.round(1e3*b/(c-S));b=0,S=c,M(r=>r===t?r:t)}},E=t=>{if('configured'===p?.state)return!0;w();const n=new VideoDecoder({output:t=>{r||p!==n?t.close():C(t)},error:()=>{p===n&&(w(),f=!1,h=!0,k())}});try{return n.configure({codec:(0,o.buildCodecString)(t),optimizeForLatency:!0}),p=n,!0}catch{try{n.close()}catch{}return k(),!1}},A=c=>{const l=(0,o.parseFramePacket)(c);if(t){const t=l.isKey??(0,o.scanAU)(l.data).isKey;if(!n){const t=ge.current;if(!t)return void k();n=new s.MsePlayer(t,{onFirstFrame:()=>{r||a||(a=!0,D('streaming'),z(null))},onResize:(t,n)=>{r||U({width:t,height:n})},onFps:t=>{r||M(r=>r===t?r:t)},onError:t=>{r||(D('error'),z(t))},requestKeyframe:k})}return void n.feed(l.data,t,l.timestamp)}const d=null===l.isKey||l.isKey&&(!p||'configured'!==p.state||h)?(0,o.scanAU)(l.data):null,y=l.isKey??d?.isKey??!1,b=d?.spsBytes??null;if(!b||E(b)){if(h){if(!y)return;if(!p||'configured'!==p.state)return void k();h=!1}if(p&&'configured'===p.state){if(p.decodeQueueSize>u)return w(),f=!1,h=!0,void k();if(!f){if(!y)return void k();f=!0}try{p.decode(new EncodedVideoChunk({type:y?'key':'delta',timestamp:l.timestamp??Math.round(1e6*v/60),data:l.data})),v++}catch{w(),f=!1,h=!0,k()}}else y||k()}},N=()=>{if(r)return;let o;try{o=new WebSocket(R(P,T,!0))}catch(t){return D('error'),void z(t instanceof Error?t.message:'Invalid server URL')}o.binaryType='arraybuffer',ve.current=o,o.onopen=()=>{r||(c=500,t&&k())},o.onerror=()=>{},o.onclose=()=>{r||(w(),n?.destroy(),n=null,f=!1,v=0,a&&(a=!1,D('error'),z(t=>t??'Disconnected \u2014 retrying\u2026')),l=setTimeout(N,c),c=Math.min(Math.round(1.6*c),5e3))},o.onmessage=t=>{if(!r)if('string'!=typeof t.data)A(t.data);else try{const r=JSON.parse(t.data);'video-session'===r.type&&r.size&&Number.isFinite(r.size.width)&&Number.isFinite(r.size.height)&&(w(),n?.destroy(),n=null,v=0,f=!1,h=!0,U({width:r.size.width,height:r.size.height}),k())}catch{}}};return N(),()=>{r=!0,l&&clearTimeout(l),w(),n?.destroy(),n=null;try{ve.current?.close()}catch{}ve.current=null,D('idle'),U(null),M(0)}},[$,P,T,Me,Je]),(0,t.useEffect)(()=>{if(!$||!P||!Je)return fe(!1),void ye(null);let t=!1,r=500,n=null;const a=R(P,T,!1);fe(!1),ye(null);const o=a=>{if(t)return;fe(!1),ye(a);const o=r;r=Math.min(Math.round(1.6*r),5e3),n=setTimeout(c,o)};function c(){if(t)return;let n;try{n=new WebSocket(a)}catch{return void o('WebRTC input connection failed. Retrying...')}ve.current=n,n.onopen=()=>{t||(r=500,fe(!0),ye(null),n.send(JSON.stringify({type:'reset-video',ack:!1})))},n.onerror=()=>{},n.onclose=()=>{ve.current===n&&(ve.current=null),o('WebRTC input disconnected. Retrying...')},n.onmessage=r=>{if(!t&&'string'==typeof r.data)try{const t=JSON.parse(r.data);!1===t.ok&&t.error&&z(t.error)}catch{}}}return c(),()=>{t=!0,n&&clearTimeout(n);const r=ve.current;try{r?.close()}catch{}ve.current===r&&(ve.current=null),fe(!1)}},[$,P,T,Je]),(0,t.useEffect)(()=>{if(!H||!$||!P)return;let t=null;try{t=new EventSource(E(P,"/api/logcat"+(T?`?device=${encodeURIComponent(T)}`:'')))}catch{return}return t.addEventListener('log',t=>{try{const r=JSON.parse(t.data);V(t=>[...t,{id:"a"+ ++be.current,source:'logcat',message:r.line}].slice(-200))}catch{}}),()=>t?.close()},[H,$,P,T]),(0,t.useEffect)(()=>{_([]),me.current=(0,r.createAndroidEventCursor)()},[P,T]),(0,t.useEffect)(()=>{if(!B||!$||!P)return;let t=!1,n=!1,a=null;const o=`${E(P,'/api/session')}${T?`?device=${encodeURIComponent(T)}`:''}`,c=T??'default',s=async()=>{if(!t&&!n){n=!0,a=new AbortController;try{const n=await fetch(o,{cache:'no-store',signal:a.signal});if(!n.ok)return;const s=await n.json();if(t||!Array.isArray(s.events))return;const l=s.events;me.current=(0,r.mergeAndroidEventSnapshotCursor)(me.current,l),_(t=>(0,r.reconcileAndroidSessionEvents)(t,l.filter(t=>t.id>me.current.clearedThroughId),c))}catch{}finally{n=!1,a=null}}};s();const l=setInterval(s,f);return()=>{t=!0,clearInterval(l),a?.abort()}},[B,$,P,T]),(0,t.useEffect)(()=>{if(!$||!P)return void X(w);let t=!1;return fetch(E(P,'/api/devices')).then(t=>t.json()).then(r=>{if(t||!Array.isArray(r.devices)||0===r.devices.length)return;const n=T??r.defaultSerial??null;X(r.devices.map(t=>{const r=String(t.serial??t.id??'android');return{id:r,name:String(t.model??t.name??t.product??r),platform:'android',current:r===n}}))}).catch(()=>{}),()=>{t=!0}},[$,P,T]),(0,t.useEffect)(()=>{if(ie(null),!$||!P)return;let t=!1;const r=`${E(P,'/api/foreground')}${T?`?device=${encodeURIComponent(T)}`:''}`,n=async()=>{try{const n=await fetch(r,{cache:'no-store'}),a=await n.json();if(t||!a.ok||!a.app?.packageName)return;const o={id:a.app.packageName,label:a.app.label??void 0,pid:a.app.pid??void 0,activity:a.app.activity??void 0,version:a.app.versionName??void 0,build:a.app.versionCode??void 0,minSdk:a.app.minSdk??void 0,debuggable:a.app.debuggable??void 0};ie(t=>{return t&&(n=o,(r=t).id===n.id&&r.label===n.label&&r.pid===n.pid&&r.activity===n.activity&&r.version===n.version&&r.build===n.build&&r.minSdk===n.minSdk&&r.debuggable===n.debuggable)?t:o;var r,n})}catch{}};n();const a=setInterval(n,p);return()=>{t=!0,clearInterval(a)}},[$,P,T]),(0,t.useEffect)(()=>{const t=Se.current;t.reset();for(const t of v)we.current[t]++;if(ne(new Set),te(null),Z(null),!$||!P)return;let r=!1,a=!1,o=[];const c=ke,s=async s=>{if(r||a)return;a=!0;const l=[];o=l;const u=await Promise.all(s.map(async r=>{const a=we.current[r],o=t.pending.has(r),c=new AbortController;l.push(c);try{const t=await fetch(A(P,(0,n.androidDeviceSettingPath)(r),T),{cache:'no-store',signal:c.signal});return t.ok?{key:r,version:a,pendingAtStart:o,handled:!0,value:(0,n.parseAndroidDeviceSetting)(r,await t.json())}:{key:r,version:a,pendingAtStart:o,handled:!1}}catch{return{key:r,version:a,pendingAtStart:o,handled:!1}}}));if(a=!1,r||Ce.current!==c)return;if(!u.some(t=>t.handled))return;te(r=>{const n=Object.assign({},r??{});for(const r of u)r.handled&&(r.pendingAtStart||we.current[r.key]===r.version&&(t.pending.has(r.key)||(null===r.value?delete n[r.key]:n[r.key]=r.value)));return n});const d=u.find(t=>'appearance'===t.key);!d?.handled||d.pendingAtStart||we.current.appearance!==d.version||t.pending.has('appearance')||'light'!==d.value&&'dark'!==d.value||Z(d.value)};s(v);const l=setInterval(()=>{s(b)},y);return()=>{r=!0,clearInterval(l);for(const t of o)t.abort();t.reset()}},[$,P,ke,T]),{platform:'android',status:W,error:F,screen:K,fps:L,devices:G,logs:J,logsEnabled:H,attachLogs:Ae,detachLogs:Re,clearLogs:Ne,events:q,eventsEnabled:B,attachEvents:Oe,detachEvents:Pe,clearEvents:Ie,activity:null,deviceSettings:ee,deviceSettingsPending:re,setDeviceSetting:Ke,streamSettings:null,streamSettingsPending:!1,updateStreamSettings:()=>{},webRtcCodec:'h264',setWebRtcCodec:()=>{},streamCapabilities:{modeAvailability:{mjpeg:!1,h264:!0,webrtc:'webrtc'===oe?.transport},httpCodecs:['h264'],webRtcCodecs:['h264']},capabilities:{deviceSettings:!0,activity:!1,events:!0,streamSettings:!1},foregroundApp:ae,videoKind:Je?'video':'canvas',attachVideo:Ee,sendTouch:je,sendKey:We,pressButton:$e,reload:De,rotate:Fe,screenshot:ze,appearance:Y,setAppearance:Ue,hardwareKeyboardConnected:null,setHardwareKeyboardConnected:()=>{},toggleSoftwareKeyboard:()=>{}}};var t=_r(_d[0]),r=_r(_d[1]),n=_r(_d[2]),a=_r(_d[3]),o=_r(_d[4]),c=_r(_d[5]),s=_r(_d[6]),l=_r(_d[7]);const u=4,d=1500,p=5e3,f=1e3,h=1500,y=3e3,v=['appearance','network','text-size'],b=['network','text-size'],S=46;const w=[{id:'android',name:'Emulator Android',platform:'android',current:!0}],k={home:{type:'home'},back:{type:'back'},recents:{type:'recents'},appSwitcher:{type:'recents'},power:{type:'power'}},C={begin:'down',move:'move',end:'up'};function E(t,r){return`${t.replace(/\/$/,'')}${r}`}function A(t,r,n){const a=new URL(E(t,r));return n&&a.searchParams.set('device',n),a.toString()}function R(t,r,n){const a=new URL(E(t,'/ws'));return a.protocol='https:'===a.protocol?'wss:':'ws:',n?a.searchParams.set('frame-meta','1'):a.searchParams.set('video','0'),r&&a.searchParams.set('device',r),a.toString()}function N(t){if(!t||'object'!=typeof t||Array.isArray(t))return!1;const r=t;return Array.isArray(r.urls)&&r.urls.length>0&&r.urls.every(t=>'string'==typeof t)&&(void 0===r.username||'string'==typeof r.username)&&(void 0===r.credential||'string'==typeof r.credential)}function O(t){if(!t||'object'!=typeof t||Array.isArray(t))return null;const r=t;return'websocket'===r.transport?{transport:'websocket'}:'webrtc'!==r.transport||'h264'!==r.codec||!Array.isArray(r.iceServers)||!r.iceServers.every(N)||'all'!==r.iceTransportPolicy&&'relay'!==r.iceTransportPolicy?null:{transport:'webrtc',codec:'h264',iceServers:r.iceServers,iceTransportPolicy:r.iceTransportPolicy}}},173,[38,174,175,166,176,165,177,170]);
|
|
230
230
|
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MAX_ANDROID_DEVICE_EVENTS",{enumerable:!0,get:function(){return t}}),e.createAndroidEventCursor=function(){return{latestId:0,clearedThroughId:0,hasSnapshot:!1,clearPending:!1}},e.clearAndroidEventCursor=function(t){return t.hasSnapshot?Object.assign({},t,{clearedThroughId:Math.max(t.clearedThroughId,t.latestId),clearPending:!1}):Object.assign({},t,{clearPending:!0})},e.mergeAndroidEventSnapshotCursor=function(t,n){const s=n.reduce((t,n)=>Number.isSafeInteger(n.id)&&n.id>0?Math.max(t,n.id):t,0);let o=t.hasSnapshot&&(t.latestId>0&&0===s||s>0&&s<t.latestId)?0:t.clearedThroughId;t.clearPending&&(o=Math.max(o,s));return{latestId:s,clearedThroughId:o,hasSnapshot:!0,clearPending:!1}},e.mapAndroidSessionEvent=p,e.mapAndroidSessionEvents=y,e.reconcileAndroidSessionEvents=function(t,n,s){const o=y(n,s);return t.length===o.length&&t.every((t,n)=>{const s=o[n];return void 0!==s&&t.id===s.id&&t.timestamp===s.timestamp&&t.source===s.source&&t.kind===s.kind&&t.action===s.action&&t.status===s.status&&t.message===s.message&&JSON.stringify(t.details)===JSON.stringify(s.details)})?t:o};const t=500;function n(t,n){return`android:${encodeURIComponent(t)}:${n}`}function s(t){return'number'==typeof t&&Number.isFinite(t)?`${Math.round(100*t)}%`:'?'}function o(t,n){return`${s(t)}, ${s(n)}`}function c(t){return'number'==typeof t&&Number.isFinite(t)?t:null}function u(t){return'string'==typeof t?Array.from(t).length:0}function l(t){return t?'text'!==t.type?Object.assign({},t):{type:'text',textLength:u(t.text),redacted:!0}:{}}function h(t,s){const h=t.gesture,p='string'==typeof h?.type?h.type:'unknown',y={id:n(s,t.id),timestamp:t.at,source:t.source,details:{delayMs:t.delayMs,gesture:l(h)}};switch(p){case'touch':{const t='string'==typeof h?.action?h.action:'unknown';return Object.assign({},y,{kind:'touch',action:t,message:`Touch ${t} at ${o(h?.x,h?.y)}`})}case'tap':return Object.assign({},y,{kind:'touch',action:'tap',message:`Tap at ${o(h?.x,h?.y)}`});case'swipe':{const t=c(h?.durationMs);return Object.assign({},y,{kind:'touch',action:'swipe',message:`Swipe ${o(h?.x1,h?.y1)} \u2192 ${o(h?.x2,h?.y2)}${null===t?'':` (${Math.round(t)} ms)`}`})}case'key':{const t=c(h?.keycode);return Object.assign({},y,{kind:'keyboard',action:'key',message:null===t?'Key input':`Keycode ${t}`})}case'text':{const t=u(h?.text);return Object.assign({},y,{kind:'keyboard',action:'text',message:`Text input (${t} ${1===t?'character':'characters'}, redacted)`})}case'back':case'home':case'recents':case'power':return Object.assign({},y,{kind:'button',action:p,message:`Button ${f=p,f.length>0?`${f[0].toUpperCase()}${f.slice(1)}`:f}`});default:return Object.assign({},y,{kind:'gesture',action:p,message:`Gesture ${p}`})}var f}function p(t,s){if('gesture'===t.kind)return h(t,s);if('location'===t.kind){const o=c(t.location?.latitude),u=c(t.location?.longitude),l=null===o||null===u?'unknown coordinates':`${o.toFixed(5)}, ${u.toFixed(5)}`;return{id:n(s,t.id),timestamp:t.at,source:t.source,kind:'location',action:'set',message:`Location ${l}`,details:{delayMs:t.delayMs,location:Object.assign({},t.location)}}}return{id:n(s,t.id),timestamp:t.at,source:t.source,kind:t.kind||'event',message:`Event ${t.kind||'unknown'}`,details:{delayMs:t.delayMs}}}function y(t,n){return t.slice(-500).map(t=>p(t,n))}},174,[]);
|
|
231
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
232
|
-
__d(function(g,
|
|
233
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
234
|
-
__d(function(g,
|
|
235
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
236
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
237
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
238
|
-
__d(function(g,r,i,a,m,
|
|
239
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
240
|
-
__d(function(g,r,i,a,m,
|
|
241
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
242
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
243
|
-
__d(function(g,r,i,a,m,
|
|
244
|
-
__d(function(g,r,i,a,m,
|
|
245
|
-
__d(function(g,r,i,a,m,
|
|
246
|
-
__d(function(g,r,
|
|
247
|
-
__d(function(g,r,i,a,m,
|
|
248
|
-
__d(function(g,r,
|
|
249
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
250
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
251
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
252
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
253
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
254
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["
|
|
255
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
256
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["
|
|
257
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
258
|
-
__d(function(g,r,
|
|
259
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
260
|
-
__d(function(g,r,
|
|
261
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
262
|
-
__d(function(_g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return G}}),_e.__extends=t,Object.defineProperty(_e,"__assign",{enumerable:!0,get:function(){return r}}),_e.__rest=n,_e.__decorate=o,_e.__param=a,_e.__esDecorate=i,_e.__runInitializers=c,_e.__propKey=u,_e.__setFunctionName=s,_e.__metadata=f,_e.__awaiter=l,_e.__generator=p,Object.defineProperty(_e,"__createBinding",{enumerable:!0,get:function(){return y}}),_e.__exportStar=_,_e.__values=d,_e.__read=h,_e.__spread=b,_e.__spreadArrays=v,_e.__spreadArray=w,_e.__await=m,_e.__asyncGenerator=g,_e.__asyncDelegator=O,_e.__asyncValues=j,_e.__makeTemplateObject=P,_e.__importStar=x,_e.__importDefault=T,_e.__classPrivateFieldGet=I,_e.__classPrivateFieldSet=D,_e.__classPrivateFieldIn=R,_e.__addDisposableResource=k,_e.__disposeResources=F,_e.__rewriteRelativeImportExtension=C;var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function o(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function a(e,t){return function(r,n){t(r,n,e)}}function i(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var _={};for(var d in n)_[d]="access"===d?{}:n[d];for(var d in n.access)_.access[d]=n.access[d];_.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var h=(0,r[y])("accessor"===u?{get:l.get,set:l.set}:l[s],_);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(c=i(h.get))&&(l.get=c),(c=i(h.set))&&(l.set=c),(c=i(h.init))&&o.unshift(c)}else(c=i(h))&&("field"===u?o.unshift(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function s(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function c(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}u((n=n.apply(e,t||[])).next())})}function p(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(t){return u([e,t])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var y=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function _(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function w(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),n[Symbol.asyncIterator]=function(){return this},n;function i(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{(r=o[e](t)).value instanceof m?Promise.resolve(r.value.v).then(u,s):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,a){o(n,a,(t=e[r](t)).done,t.value)})}}function o(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},E=function(e){return E=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},E(e)};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=E(e),n=0;n<r.length;n++)"default"!==r[n]&&y(t,e,r[n]);return S(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function k(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function F(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return(function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error})()}function C(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e}):e}var G={__extends:t,__assign:r,__rest:n,__decorate:o,__param:a,__esDecorate:i,__runInitializers:c,__propKey:u,__setFunctionName:s,__metadata:f,__awaiter:l,__generator:p,__createBinding:y,__exportStar:_,__values:d,__read:h,__spread:b,__spreadArrays:v,__spreadArray:w,__await:m,__asyncGenerator:g,__asyncDelegator:O,__asyncValues:j,__makeTemplateObject:P,__importStar:x,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:D,__classPrivateFieldIn:R,__addDisposableResource:k,__disposeResources:F,__rewriteRelativeImportExtension:C}},206,[]);
|
|
263
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
264
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"zeroRightClassName",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"fullWidthClassName",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"noScrollbarsClassName",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"removedBarSizeVariable",{enumerable:!0,get:function(){return l}});var t='right-scroll-bar-position',n='width-before-scroll-bar',o='with-scroll-bars-hidden',l='--removed-body-scroll-bar-size'},208,[]);
|
|
265
|
-
__d(function(g,r,i,a,m,
|
|
266
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
267
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
268
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
269
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
270
|
-
__d(function(g,r,i,a,m,
|
|
271
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
272
|
-
__d(function(g,r,i,a,m,
|
|
273
|
-
__d(function(g,r,i,a,m,e,d){"use strict";
|
|
274
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
275
|
-
__d(function(g,r,i,a,m,e,d){"use strict";
|
|
276
|
-
__d(function(g,r,i,a,m,
|
|
277
|
-
__d(function(g,r,i,a,m,
|
|
278
|
-
__d(function(g,r,i,a,m,
|
|
279
|
-
__d(function(g,r,i,a,m,
|
|
280
|
-
__d(function(g,r,i,a,m,
|
|
281
|
-
__d(function(g,r,i,
|
|
282
|
-
__d(function(g,r,i,a,m,_e,
|
|
283
|
-
__d(function(g,r,i,
|
|
284
|
-
__d(function(g,r,i,a,m,
|
|
285
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),
|
|
286
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
287
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
288
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
289
|
-
__d(function(g,r,i,a,m,
|
|
290
|
-
__d(function(g,r,i,a,m,
|
|
291
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
292
|
-
__d(function(g,r,i,a,m,
|
|
293
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
294
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
295
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
296
|
-
__d(function(g,r,i,a,m,
|
|
297
|
-
__d(function(g,r,i,a,m,
|
|
298
|
-
__d(function(g,r,i,a,m,
|
|
299
|
-
__d(function(g,r,i,a,m,_e,
|
|
300
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["
|
|
301
|
-
__d(function(g,r,_i,a,m,_e,_d){"use strict";const e=["__scopeMenu"],n=["forceMount"],t=["__scopeMenu","loop","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll"],o=["__scopeMenu"],u=["__scopeMenu"],c=["disabled","onSelect"],s=["__scopeMenu","disabled","textValue"],i=["checked","onCheckedChange"],l=["value","onValueChange"],d=["value"],f=["__scopeMenu","forceMount"],p=["__scopeMenu"],b=["__scopeMenu"],v=["forceMount","align"];function h(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Anchor",{enumerable:!0,get:function(){return on}}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return bn}}),Object.defineProperty(_e,"CheckboxItem",{enumerable:!0,get:function(){return dn}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(_e,"Group",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return ln}}),Object.defineProperty(_e,"ItemIndicator",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return an}}),Object.defineProperty(_e,"Menu",{enumerable:!0,get:function(){return se}}),Object.defineProperty(_e,"MenuAnchor",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"MenuArrow",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"MenuCheckboxItem",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(_e,"MenuContent",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"MenuGroup",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(_e,"MenuItem",{enumerable:!0,get:function(){return we}}),Object.defineProperty(_e,"MenuItemIndicator",{enumerable:!0,get:function(){return He}}),Object.defineProperty(_e,"MenuLabel",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(_e,"MenuPortal",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(_e,"MenuRadioGroup",{enumerable:!0,get:function(){return De}}),Object.defineProperty(_e,"MenuRadioItem",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"MenuSeparator",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(_e,"MenuSub",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(_e,"MenuSubContent",{enumerable:!0,get:function(){return We}}),Object.defineProperty(_e,"MenuSubTrigger",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return un}}),Object.defineProperty(_e,"RadioGroup",{enumerable:!0,get:function(){return fn}}),Object.defineProperty(_e,"RadioItem",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(_e,"Separator",{enumerable:!0,get:function(){return gn}}),Object.defineProperty(_e,"Sub",{enumerable:!0,get:function(){return vn}}),Object.defineProperty(_e,"SubContent",{enumerable:!0,get:function(){return jn}}),Object.defineProperty(_e,"SubTrigger",{enumerable:!0,get:function(){return hn}}),Object.defineProperty(_e,"createMenuScope",{enumerable:!0,get:function(){return ee}});var j,y=r(_d[0]),O=(j=y)&&j.__esModule?j:{default:j},M=h(r(_d[1])),P=r(_d[2]),_=r(_d[3]),C=r(_d[4]),w=r(_d[5]),x=r(_d[6]),E=r(_d[7]),R=r(_d[8]),k=r(_d[9]),S=r(_d[10]),D=r(_d[11]),I=h(D),F=r(_d[12]),T=r(_d[13]),L=r(_d[14]),A=r(_d[15]),H=h(A),K=r(_d[16]),G=r(_d[17]),N=r(_d[18]),V=r(_d[19]),U=r(_d[20]),B=["Enter"," "],X=["ArrowUp","PageDown","End"],Y=["ArrowDown","PageUp","Home",...X],z={ltr:[...B,"ArrowRight"],rtl:[...B,"ArrowLeft"]},W={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Z="Menu",[q,J,Q]=(0,_.createCollection)(Z),[$,ee]=(0,w.createContextScope)(Z,[Q,D.createPopperScope,A.createRovingFocusGroupScope]),ne=(0,D.createPopperScope)(),te=(0,A.createRovingFocusGroupScope)(),[re,oe]=$(Z),[ue,ce]=$(Z),se=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:u,onOpenChange:c,modal:s=!0}=e,i=ne(n),[l,d]=M.useState(null),f=M.useRef(!1),p=(0,G.useCallbackRef)(c),b=(0,x.useDirection)(u);return M.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}},[]),M.useEffect(()=>{if(!t)return;const e=()=>p(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[t,p]),(0,U.jsx)(I.Root,Object.assign({},i,{children:(0,U.jsx)(re,{scope:n,open:t,onOpenChange:p,content:l,onContentChange:d,children:(0,U.jsx)(ue,{scope:n,onClose:M.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:b,modal:s,children:o})})}))};se.displayName=Z;var ae=M.forwardRef((n,t)=>{const{__scopeMenu:o}=n,u=(0,O.default)(n,e),c=ne(o);return(0,U.jsx)(I.Anchor,Object.assign({},c,u,{ref:t}))});ae.displayName="MenuAnchor";var ie="MenuPortal",[le,de]=$(ie,{forceMount:void 0}),fe=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:u}=e,c=oe(ie,n);return(0,U.jsx)(le,{scope:n,forceMount:t,children:(0,U.jsx)(T.Presence,{present:t||c.open,children:(0,U.jsx)(F.Portal,{asChild:!0,container:u,children:o})})})};fe.displayName=ie;var pe="MenuContent",[me,ge]=$(pe),be=M.forwardRef((e,t)=>{const o=de(pe,e.__scopeMenu),{forceMount:u=o.forceMount}=e,c=(0,O.default)(e,n),s=oe(pe,e.__scopeMenu),i=ce(pe,e.__scopeMenu);return(0,U.jsx)(q.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(T.Presence,{present:u||s.open,children:(0,U.jsx)(q.Slot,{scope:e.__scopeMenu,children:i.modal?(0,U.jsx)(ve,Object.assign({},c,{ref:t})):(0,U.jsx)(he,Object.assign({},c,{ref:t}))})})})}),ve=M.forwardRef((e,n)=>{const t=oe(pe,e.__scopeMenu),o=M.useRef(null),u=(0,C.useComposedRefs)(n,o);return M.useEffect(()=>{const e=o.current;if(e)return(0,N.hideOthers)(e)},[]),(0,U.jsx)(ye,Object.assign({},e,{ref:u,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:(0,P.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),he=M.forwardRef((e,n)=>{const t=oe(pe,e.__scopeMenu);return(0,U.jsx)(ye,Object.assign({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),je=(0,K.createSlot)("MenuContent.ScrollLock"),ye=M.forwardRef((e,n)=>{const{__scopeMenu:o,loop:u=!1,trapFocus:c,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:b,onInteractOutside:v,onDismiss:h,disableOutsideScroll:j}=e,y=(0,O.default)(e,t),_=oe(pe,o),w=ce(pe,o),x=ne(o),S=te(o),D=J(o),[F,T]=M.useState(null),L=M.useRef(null),A=(0,C.useComposedRefs)(n,L,_.onContentChange),K=M.useRef(0),G=M.useRef(""),N=M.useRef(0),B=M.useRef(null),z=M.useRef("right"),W=M.useRef(0),Z=j?V.RemoveScroll:M.Fragment,q=j?{as:je,allowPinchZoom:!0}:void 0,Q=e=>{const n=G.current+e,t=D().filter(e=>!e.disabled),o=document.activeElement,u=t.find(e=>e.ref.current===o)?.textValue,c=$e(t.map(e=>e.textValue),n,u),s=t.find(e=>e.textValue===c)?.ref.current;!(function e(n){G.current=n,window.clearTimeout(K.current),""!==n&&(K.current=window.setTimeout(()=>e(""),1e3))})(n),s&&setTimeout(()=>s.focus())};M.useEffect(()=>()=>window.clearTimeout(K.current),[]),(0,R.useFocusGuards)();const $=M.useCallback(e=>z.current===B.current?.side&&nn(e,B.current?.area),[]);return(0,U.jsx)(me,{scope:o,searchRef:G,onItemEnter:M.useCallback(e=>{$(e)&&e.preventDefault()},[$]),onItemLeave:M.useCallback(e=>{$(e)||(L.current?.focus(),T(null))},[$]),onTriggerLeave:M.useCallback(e=>{$(e)&&e.preventDefault()},[$]),pointerGraceTimerRef:N,onPointerGraceIntentChange:M.useCallback(e=>{B.current=e},[]),children:(0,U.jsx)(Z,Object.assign({},q,{children:(0,U.jsx)(k.FocusScope,{asChild:!0,trapped:c,onMountAutoFocus:(0,P.composeEventHandlers)(s,e=>{e.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,U.jsx)(E.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:b,onInteractOutside:v,onDismiss:h,children:(0,U.jsx)(H.Root,Object.assign({asChild:!0},S,{dir:w.dir,orientation:"vertical",loop:u,currentTabStopId:F,onCurrentTabStopIdChange:T,onEntryFocus:(0,P.composeEventHandlers)(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(I.Content,Object.assign({role:"menu","aria-orientation":"vertical","data-state":Ze(_.open),"data-radix-menu-content":"",dir:w.dir},x,y,{ref:A,style:Object.assign({outline:"none"},y.style),onKeyDown:(0,P.composeEventHandlers)(y.onKeyDown,e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&o&&Q(e.key));const u=L.current;if(e.target!==u)return;if(!Y.includes(e.key))return;e.preventDefault();const c=D().filter(e=>!e.disabled).map(e=>e.ref.current);X.includes(e.key)&&c.reverse(),Qe(c)}),onBlur:(0,P.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(K.current),G.current="")}),onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(e=>{const n=e.target,t=W.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>W.current?"right":"left";z.current=n,W.current=e.clientX}}))}))}))})})}))})});be.displayName=pe;var Oe=M.forwardRef((e,n)=>{const t=(0,O.default)(e,o);return(0,U.jsx)(L.Primitive.div,Object.assign({role:"group"},t,{ref:n}))});Oe.displayName="MenuGroup";var Me=M.forwardRef((e,n)=>{const t=(0,O.default)(e,u);return(0,U.jsx)(L.Primitive.div,Object.assign({},t,{ref:n}))});Me.displayName="MenuLabel";var Pe="MenuItem",Ce="menu.itemSelect",we=M.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o}=e,u=(0,O.default)(e,c),s=M.useRef(null),i=ce(Pe,e.__scopeMenu),l=ge(Pe,e.__scopeMenu),d=(0,C.useComposedRefs)(n,s),f=M.useRef(!1);return(0,U.jsx)(xe,Object.assign({},u,{ref:d,disabled:t,onClick:(0,P.composeEventHandlers)(e.onClick,()=>{const e=s.current;if(!t&&e){const n=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>o?.(e),{once:!0}),(0,L.dispatchDiscreteCustomEvent)(e,n),n.defaultPrevented?f.current=!1:i.onClose()}}),onPointerDown:n=>{e.onPointerDown?.(n),f.current=!0},onPointerUp:(0,P.composeEventHandlers)(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,e=>{if(t||e.target!==e.currentTarget)return;""!==l.searchRef.current&&" "===e.key||B.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})}))});we.displayName=Pe;var xe=M.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:u}=e,c=(0,O.default)(e,s),i=ge(Pe,t),l=te(t),d=M.useRef(null),f=(0,C.useComposedRefs)(n,d),[p,b]=M.useState(!1),[v,h]=M.useState("");return M.useEffect(()=>{const e=d.current;e&&h((e.textContent??"").trim())},[c.children]),(0,U.jsx)(q.ItemSlot,{scope:t,disabled:o,textValue:u??v,children:(0,U.jsx)(H.Item,Object.assign({asChild:!0},l,{focusable:!o,children:(0,U.jsx)(L.Primitive.div,Object.assign({role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},c,{ref:f,onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(e=>{if(o)i.onItemLeave(e);else if(i.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:(0,P.composeEventHandlers)(e.onPointerLeave,tn(e=>i.onItemLeave(e))),onFocus:(0,P.composeEventHandlers)(e.onFocus,()=>b(!0)),onBlur:(0,P.composeEventHandlers)(e.onBlur,()=>b(!1))}))}))})}),Ee=M.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o}=e,u=(0,O.default)(e,i);return(0,U.jsx)(Le,{scope:e.__scopeMenu,checked:t,children:(0,U.jsx)(we,Object.assign({role:"menuitemcheckbox","aria-checked":qe(t)?"mixed":t},u,{ref:n,"data-state":Je(t),onSelect:(0,P.composeEventHandlers)(u.onSelect,()=>o?.(!!qe(t)||!t),{checkForDefaultPrevented:!1})}))})});Ee.displayName="MenuCheckboxItem";var Re="MenuRadioGroup",[ke,Se]=$(Re,{value:void 0,onValueChange:()=>{}}),De=M.forwardRef((e,n)=>{const{value:t,onValueChange:o}=e,u=(0,O.default)(e,l),c=(0,G.useCallbackRef)(o);return(0,U.jsx)(ke,{scope:e.__scopeMenu,value:t,onValueChange:c,children:(0,U.jsx)(Oe,Object.assign({},u,{ref:n}))})});De.displayName=Re;var Ie="MenuRadioItem",Fe=M.forwardRef((e,n)=>{const{value:t}=e,o=(0,O.default)(e,d),u=Se(Ie,e.__scopeMenu),c=t===u.value;return(0,U.jsx)(Le,{scope:e.__scopeMenu,checked:c,children:(0,U.jsx)(we,Object.assign({role:"menuitemradio","aria-checked":c},o,{ref:n,"data-state":Je(c),onSelect:(0,P.composeEventHandlers)(o.onSelect,()=>u.onValueChange?.(t),{checkForDefaultPrevented:!1})}))})});Fe.displayName=Ie;var Te="MenuItemIndicator",[Le,Ae]=$(Te,{checked:!1}),He=M.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o}=e,u=(0,O.default)(e,f),c=Ae(Te,t);return(0,U.jsx)(T.Presence,{present:o||qe(c.checked)||!0===c.checked,children:(0,U.jsx)(L.Primitive.span,Object.assign({},u,{ref:n,"data-state":Je(c.checked)}))})});He.displayName=Te;var Ke=M.forwardRef((e,n)=>{const t=(0,O.default)(e,p);return(0,U.jsx)(L.Primitive.div,Object.assign({role:"separator","aria-orientation":"horizontal"},t,{ref:n}))});Ke.displayName="MenuSeparator";var Ge=M.forwardRef((e,n)=>{const{__scopeMenu:t}=e,o=(0,O.default)(e,b),u=ne(t);return(0,U.jsx)(I.Arrow,Object.assign({},u,o,{ref:n}))});Ge.displayName="MenuArrow";var Ne="MenuSub",[Ve,Ue]=$(Ne),Be=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:u}=e,c=oe(Ne,n),s=ne(n),[i,l]=M.useState(null),[d,f]=M.useState(null),p=(0,G.useCallbackRef)(u);return M.useEffect(()=>(!1===c.open&&p(!1),()=>p(!1)),[c.open,p]),(0,U.jsx)(I.Root,Object.assign({},s,{children:(0,U.jsx)(re,{scope:n,open:o,onOpenChange:p,content:d,onContentChange:f,children:(0,U.jsx)(Ve,{scope:n,contentId:(0,S.useId)(),triggerId:(0,S.useId)(),trigger:i,onTriggerChange:l,children:t})})}))};Be.displayName=Ne;var Xe="MenuSubTrigger",Ye=M.forwardRef((e,n)=>{const t=oe(Xe,e.__scopeMenu),o=ce(Xe,e.__scopeMenu),u=Ue(Xe,e.__scopeMenu),c=ge(Xe,e.__scopeMenu),s=M.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=c,d={__scopeMenu:e.__scopeMenu},f=M.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);M.useEffect(()=>f,[f]),M.useEffect(()=>{const e=i.current;return()=>{window.clearTimeout(e),l(null)}},[i,l]);const p=(0,C.useComposedRefs)(n,u.onTriggerChange);return(0,U.jsx)(ae,Object.assign({asChild:!0},d,{children:(0,U.jsx)(xe,Object.assign({id:u.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?u.contentId:void 0,"data-state":Ze(t.open)},e,{ref:p,onClick:n=>{e.onClick?.(n),e.disabled||n.defaultPrevented||(n.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(n=>{c.onItemEnter(n),n.defaultPrevented||e.disabled||t.open||s.current||(c.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{t.onOpenChange(!0),f()},100))})),onPointerLeave:(0,P.composeEventHandlers)(e.onPointerLeave,tn(e=>{f();const n=t.content?.getBoundingClientRect();if(n){const o=t.content?.dataset.side,u="right"===o,s=u?-5:5,l=n[u?"left":"right"],d=n[u?"right":"left"];c.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:l,y:n.top},{x:d,y:n.top},{x:d,y:n.bottom},{x:l,y:n.bottom}],side:o}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(e),e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,n=>{if(e.disabled||n.target!==n.currentTarget)return;""!==c.searchRef.current&&" "===n.key||z[o.dir].includes(n.key)&&(t.onOpenChange(!0),t.content?.focus(),n.preventDefault())})}))}))});Ye.displayName=Xe;var ze="MenuSubContent",We=M.forwardRef((e,n)=>{const t=de(pe,e.__scopeMenu),{forceMount:o=t.forceMount,align:u="start"}=e,c=(0,O.default)(e,v),s=oe(pe,e.__scopeMenu),i=ce(pe,e.__scopeMenu),l=Ue(ze,e.__scopeMenu),d=M.useRef(null),f=(0,C.useComposedRefs)(n,d);return(0,U.jsx)(q.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(T.Presence,{present:o||s.open,children:(0,U.jsx)(q.Slot,{scope:e.__scopeMenu,children:(0,U.jsx)(ye,Object.assign({id:l.contentId,"aria-labelledby":l.triggerId},c,{ref:f,align:u,side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,P.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:(0,P.composeEventHandlers)(e.onEscapeKeyDown,e=>{i.onClose(),e.preventDefault()}),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,e=>{const n=e.currentTarget.contains(e.target),t=W[i.dir].includes(e.key);n&&t&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})}))})})})});function Ze(e){return e?"open":"closed"}function qe(e){return"indeterminate"===e}function Je(e){return qe(e)?"indeterminate":e?"checked":"unchecked"}function Qe(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}function $e(e,n,t){const o=n.length>1&&Array.from(n).every(e=>e===n[0])?n[0]:n,u=t?e.indexOf(t):-1;let c=(s=e,i=Math.max(u,0),s.map((e,n)=>s[(i+n)%s.length]));var s,i;1===o.length&&(c=c.filter(e=>e!==t));const l=c.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return l!==t?l:void 0}function en(e,n){const{x:t,y:o}=e;let u=!1;for(let e=0,c=n.length-1;e<n.length;c=e++){const s=n[e],i=n[c],l=s.x,d=s.y,f=i.x,p=i.y;d>o!=p>o&&t<(f-l)*(o-d)/(p-d)+l&&(u=!u)}return u}function nn(e,n){if(!n)return!1;return en({x:e.clientX,y:e.clientY},n)}function tn(e){return n=>"mouse"===n.pointerType?e(n):void 0}We.displayName=ze;var rn=se,on=ae,un=fe,cn=be,sn=Oe,an=Me,ln=we,dn=Ee,fn=De,pn=Fe,mn=He,gn=Ke,bn=Ge,vn=Be,hn=Ye,jn=We},245,[131,38,189,246,190,191,247,196,203,200,192,248,201,202,197,256,198,199,240,204,151]);
|
|
302
|
-
__d(function(g,r,_i,
|
|
303
|
-
__d(function(g,r,i,a,m,
|
|
304
|
-
__d(function(g,r,i,a,m,_e,
|
|
305
|
-
__d(function(g,r,
|
|
306
|
-
__d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getOverflowAncestors",{enumerable:!0,get:function(){return o.getOverflowAncestors}}),Object.defineProperty(e,"arrow",{enumerable:!0,get:function(){return M}}),Object.defineProperty(e,"autoPlacement",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"autoUpdate",{enumerable:!0,get:function(){return W}}),Object.defineProperty(e,"computePosition",{enumerable:!0,get:function(){return V}}),Object.defineProperty(e,"detectOverflow",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"flip",{enumerable:!0,get:function(){return F}}),Object.defineProperty(e,"hide",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"inline",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"limitShift",{enumerable:!0,get:function(){return B}}),Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"platform",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"shift",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"size",{enumerable:!0,get:function(){return H}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);function i(t){const i=(0,o.getComputedStyle)(t);let l=parseFloat(i.width)||0,c=parseFloat(i.height)||0;const s=(0,o.isHTMLElement)(t),f=s?t.offsetWidth:l,u=s?t.offsetHeight:c,a=(0,n.round)(l)!==f||(0,n.round)(c)!==u;return a&&(l=f,c=u),{width:l,height:c,$:a}}function l(t){return(0,o.isElement)(t)?t:t.contextElement}function c(t){const c=l(t);if(!(0,o.isHTMLElement)(c))return(0,n.createCoords)(1);const s=c.getBoundingClientRect(),{width:f,height:u,$:a}=i(c);let h=(a?(0,n.round)(s.width):s.width)/f,p=(a?(0,n.round)(s.height):s.height)/u;return h&&Number.isFinite(h)||(h=1),p&&Number.isFinite(p)||(p=1),{x:h,y:p}}const s=(0,n.createCoords)(0);function f(t){const n=(0,o.getWindow)(t);return(0,o.isWebKit)()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:s}function u(t,n,i){return void 0===n&&(n=!1),!!i&&n&&i===(0,o.getWindow)(t)}function a(i,s,a,h){void 0===s&&(s=!1),void 0===a&&(a=!1);const p=i.getBoundingClientRect(),y=l(i);let b=(0,n.createCoords)(1);s&&(h?(0,o.isElement)(h)&&(b=c(h)):b=c(i));const w=u(y,a,h)?f(y):(0,n.createCoords)(0);let x=(p.left+w.x)/b.x,v=(p.top+w.y)/b.y,E=p.width/b.x,C=p.height/b.y;if(y&&h){const t=(0,o.getWindow)(y),n=(0,o.isElement)(h)?(0,o.getWindow)(h):h;let i=t,l=(0,o.getFrameElement)(i);for(;l&&n!==i;){const t=c(l),n=l.getBoundingClientRect(),s=(0,o.getComputedStyle)(l),f=n.left+(l.clientLeft+parseFloat(s.paddingLeft))*t.x,u=n.top+(l.clientTop+parseFloat(s.paddingTop))*t.y;x*=t.x,v*=t.y,E*=t.x,C*=t.y,x+=f,v+=u,i=(0,o.getWindow)(l),l=(0,o.getFrameElement)(i)}}return(0,t.rectToClientRect)({width:E,height:C,x:x,y:v})}function h(t,n){const i=(0,o.getNodeScroll)(t).scrollLeft;return n?n.left+i:a((0,o.getDocumentElement)(t)).left+i}function p(t,n){const o=t.getBoundingClientRect();return{x:o.left+n.scrollLeft-h(t,o),y:o.top+n.scrollTop}}function y(t){const i=(0,o.getNodeScroll)(t),l=t.ownerDocument.body,c=(0,n.max)(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=(0,n.max)(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let f=-i.scrollLeft+h(t);const u=-i.scrollTop;return'rtl'===(0,o.getComputedStyle)(l).direction&&(f+=(0,n.max)(t.clientWidth,l.clientWidth)-c),{width:c,height:s,x:f,y:u}}function b(t,n,i){void 0===i&&(i='viewport');const l='layoutViewport'===i,c=(0,o.getWindow)(t),s=(0,o.getDocumentElement)(t),f=c.visualViewport;let u=s.clientWidth,a=s.clientHeight,p=0,y=0;if(f){const t=!(0,o.isWebKit)()||'fixed'===n;l?t||(p=-f.offsetLeft,y=-f.offsetTop):(u=f.width,a=f.height,t&&(p=f.offsetLeft,y=f.offsetTop))}if(h(s)<=0){const t=s.ownerDocument,n=t.body,o=getComputedStyle(n),i='CSS1Compat'===t.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,l=Math.abs(s.clientWidth-n.clientWidth-i),c='stable both-edges'===getComputedStyle(s).scrollbarGutter?l/2:l;c<=25&&(u-=c)}return{width:u,height:a,x:p,y:y}}function w(t,n){const o=a(t,!0,'fixed'===n),i=o.top+t.clientTop,l=o.left+t.clientLeft,s=c(t);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:l*s.x,y:i*s.y}}function x(n,i,l){let c;if('viewport'===i||'layoutViewport'===i)c=b(n,l,i);else if('document'===i)c=y((0,o.getDocumentElement)(n));else if((0,o.isElement)(i))c=w(i,l);else{const t=f(n);c={x:i.x-t.x,y:i.y-t.y,width:i.width,height:i.height}}return(0,t.rectToClientRect)(c)}function v(t,n){const i=n.get(t);if(i)return i;let l=(0,o.getOverflowAncestors)(t,[],!1).filter(t=>(0,o.isElement)(t)&&'body'!==(0,o.getNodeName)(t)),c=null;const s='fixed'===(0,o.getComputedStyle)(t).position;let f=s?(0,o.getParentNode)(t):t;for(;(0,o.isElement)(f)&&!(0,o.isLastTraversableNode)(f);){const t=(0,o.getComputedStyle)(f),n=(0,o.isContainingBlock)(f),i=c?c.position:s?'fixed':'';!n&&('fixed'===i||'absolute'===i&&'static'===t.position)?l=l.filter(t=>t!==f):c=t,f=(0,o.getParentNode)(f)}return n.set(t,l),l}function E(t,i,l){const c=(0,o.isHTMLElement)(i),s=(0,o.getDocumentElement)(i),f='fixed'===l,u=a(t,!0,f,i);let y={scrollLeft:0,scrollTop:0};const b=(0,n.createCoords)(0);if((c||!f)&&(('body'!==(0,o.getNodeName)(i)||(0,o.isOverflowElement)(s))&&(y=(0,o.getNodeScroll)(i)),c)){const t=a(i,!0,f,i);b.x=t.x+i.clientLeft,b.y=t.y+i.clientTop}!c&&s&&(b.x=h(s));const w=!s||c||f?(0,n.createCoords)(0):p(s,y);return{x:u.left+y.scrollLeft-b.x-w.x,y:u.top+y.scrollTop-b.y-w.y,width:u.width,height:u.height}}function C(t){return'static'===(0,o.getComputedStyle)(t).position}function L(t,n){if(!(0,o.isHTMLElement)(t)||'fixed'===(0,o.getComputedStyle)(t).position)return null;if(n)return n(t);let i=t.offsetParent;return(0,o.getDocumentElement)(t)===i&&(i=i.ownerDocument.body),i}function O(t,n){const i=(0,o.getWindow)(t);if((0,o.isTopLayer)(t))return i;if(!(0,o.isHTMLElement)(t)){let n=(0,o.getParentNode)(t);for(;n&&!(0,o.isLastTraversableNode)(n);){if((0,o.isElement)(n)&&!C(n))return n;n=(0,o.getParentNode)(n)}return i}let l=L(t,n);for(;l&&(0,o.isTableElement)(l)&&C(l);)l=L(l,n);return l&&(0,o.isLastTraversableNode)(l)&&C(l)&&!(0,o.isContainingBlock)(l)?i:l||(0,o.getContainingBlock)(t)||i}const T={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:i,rect:l,offsetParent:s,strategy:f}=t;const u='fixed'===f,h=(0,o.getDocumentElement)(s),y=!!i&&(0,o.isTopLayer)(i.floating);if(s===h||y&&u)return l;let b={scrollLeft:0,scrollTop:0},w=(0,n.createCoords)(1);const x=(0,n.createCoords)(0),v=(0,o.isHTMLElement)(s);if((v||!u)&&(('body'!==(0,o.getNodeName)(s)||(0,o.isOverflowElement)(h))&&(b=(0,o.getNodeScroll)(s)),v)){const t=a(s);w=c(s),x.x=t.x+s.clientLeft,x.y=t.y+s.clientTop}const E=!h||v||u?(0,n.createCoords)(0):p(h,b);return{width:l.width*w.x,height:l.height*w.y,x:l.x*w.x-b.scrollLeft*w.x+x.x+E.x,y:l.y*w.y-b.scrollTop*w.y+x.y+E.y}},getDocumentElement:o.getDocumentElement,getClippingRect:function(t){let{element:i,boundary:l,rootBoundary:c,strategy:s}=t;const f=[...'clippingAncestors'===l?(0,o.isTopLayer)(i)?[]:v(i,this._c):[].concat(l),c],u=x(i,f[0],s);let a=u.top,h=u.right,p=u.bottom,y=u.left;for(let t=1;t<f.length;t++){const o=x(i,f[t],s);a=(0,n.max)(o.top,a),h=(0,n.min)(o.right,h),p=(0,n.min)(o.bottom,p),y=(0,n.max)(o.left,y)}return{width:h-y,height:p-a,x:y,y:a}},getOffsetParent:O,getElementRects:async function(t){const n=this.getOffsetParent||O,o=this.getDimensions,i=await o(t.floating);return{reference:E(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:n,height:o}=i(t);return{width:n,height:o}},getScale:c,isElement:o.isElement,isRTL:function(t){return'rtl'===(0,o.getComputedStyle)(t).direction}};function P(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function R(t,i,l){let c,s=null;const f=(0,o.getDocumentElement)(t);function u(){var t;clearTimeout(c),null==(t=s)||t.disconnect(),s=null}function a(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),u();const h=t.getBoundingClientRect(),{left:p,top:y,width:b,height:w}=h;if(o||i(),!b||!w)return;const x={rootMargin:-(0,n.floor)(y)+"px "+-(0,n.floor)(f.clientWidth-(p+b))+"px "+-(0,n.floor)(f.clientHeight-(y+w))+"px "+-(0,n.floor)(p)+"px",threshold:(0,n.max)(0,(0,n.min)(1,l))||1};let v=!0;function E(n){const o=n[0].intersectionRatio;if(!P(h,t.getBoundingClientRect()))return a();if(o!==l){if(!v)return a();o?a(!1,o):c=setTimeout(()=>{a(!1,1e-7)},1e3)}v=!1}try{s=new IntersectionObserver(E,Object.assign({},x,{root:f.ownerDocument}))}catch(t){s=new IntersectionObserver(E,x)}s.observe(t)}const h=(0,o.getWindow)(t),p=()=>a(l);return h.addEventListener('resize',p),a(!0),()=>{h.removeEventListener('resize',p),u()}}function W(t,n,i,c){void 0===c&&(c={});const{ancestorScroll:s=!0,ancestorResize:f=!0,elementResize:u='function'==typeof ResizeObserver,layoutShift:h='function'==typeof IntersectionObserver,animationFrame:p=!1}=c,y=l(t),b=s||f?[...y?(0,o.getOverflowAncestors)(y):[],...n?(0,o.getOverflowAncestors)(n):[]]:[];b.forEach(t=>{s&&t.addEventListener('scroll',i),f&&t.addEventListener('resize',i)});const w=y&&h?R(y,i,f):null;let x,v=-1,E=null;u&&(E=new ResizeObserver(t=>{let[o]=t;o&&o.target===y&&E&&n&&(E.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var t;null==(t=E)||t.observe(n)})),i()}),y&&!p&&E.observe(y),n&&E.observe(n));let C=p?a(t):null;return p&&(function n(){const o=a(t);C&&!P(C,o)&&i();C=o,x=requestAnimationFrame(n)})(),i(),()=>{var t;b.forEach(t=>{s&&t.removeEventListener('scroll',i),f&&t.removeEventListener('resize',i)}),null==w||w(),null==(t=E)||t.disconnect(),E=null,p&&cancelAnimationFrame(x)}}const S=t.detectOverflow,N=t.offset,j=t.autoPlacement,D=t.shift,F=t.flip,H=t.size,A=t.hide,M=t.arrow,z=t.inline,B=t.limitShift,V=(n,o,i)=>{const l=new Map,c=null!=i?i:{},s=Object.assign({},T,c.platform,{_c:l});return(0,t.computePosition)(n,o,Object.assign({},c,{platform:s}))}},250,[251,252,253]);
|
|
307
|
-
__d(function(g,r,_i,_a,m,_e,_d){"use strict";const e=["crossAxis","alignment","allowedPlacements","autoAlignment"],t=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],n=["strategy"],i=["mainAxis","crossAxis","limiter"],a=["apply"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"rectToClientRect",{enumerable:!0,get:function(){return c.rectToClientRect}}),Object.defineProperty(_e,"arrow",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"autoPlacement",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"computePosition",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"detectOverflow",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"flip",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"hide",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"inline",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"limitShift",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"offset",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"shift",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"size",{enumerable:!0,get:function(){return D}});var l,o=r(_d[0]),s=(l=o)&&l.__esModule?l:{default:l},c=r(_d[1]);function f(e,t,n){let{reference:i,floating:a}=e;const l=(0,c.getSideAxis)(t),o=(0,c.getAlignmentAxis)(t),s=(0,c.getAxisLength)(o),f=(0,c.getSide)(t),u='y'===l,d=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2,y=i[s]/2-a[s]/2;let x;switch(f){case'top':x={x:d,y:i.y-a.height};break;case'bottom':x={x:d,y:i.y+i.height};break;case'right':x={x:i.x+i.width,y:p};break;case'left':x={x:i.x-a.width,y:p};break;default:x={x:i.x,y:i.y}}const h=(0,c.getAlignment)(t);return h&&(x[o]+=y*('end'===h?1:-1)*(n&&u?-1:1)),x}async function u(e,t){var n;void 0===t&&(t={});const{x:i,y:a,platform:l,rects:o,elements:s,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:y=!1,padding:x=0}=(0,c.evaluate)(t,e),h=(0,c.getPaddingObject)(x),w=s[y?'floating'===p?'reference':'floating':p],v=(0,c.rectToClientRect)(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(w)))||n?w:w.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:f})),b='floating'===p?{x:i,y:a,width:o.floating.width,height:o.floating.height}:o.reference,A=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),O=await(null==l.isElement?void 0:l.isElement(A))&&await(null==l.getScale?void 0:l.getScale(A))||{x:1,y:1},P=(0,c.rectToClientRect)(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:A,strategy:f}):b);return{top:(v.top-P.top+h.top)/O.y,bottom:(P.bottom-v.bottom+h.bottom)/O.y,left:(v.left-P.left+h.left)/O.x,right:(P.right-v.right+h.right)/O.x}}const d=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:o}=n,s=o.detectOverflow?o:Object.assign({},o,{detectOverflow:u}),c=await(null==o.isRTL?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:y}=f(d,i,c),x=i,h=0;const w={};for(let n=0;n<l.length;n++){const u=l[n];if(!u)continue;const{name:v,fn:b}=u,{x:A,y:O,data:P,reset:R}=await b({x:p,y:y,initialPlacement:i,placement:x,strategy:a,middlewareData:w,rects:d,platform:s,elements:{reference:e,floating:t}});p=null!=A?A:p,y=null!=O?O:y,w[v]=Object.assign({},w[v],P),R&&h<50&&(h++,'object'==typeof R&&(R.placement&&(x=R.placement),R.rects&&(d=!0===R.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):R.rects),({x:p,y:y}=f(d,x,c))),n=-1)}return{x:p,y:y,placement:x,strategy:a,middlewareData:w}},p=e=>({name:'arrow',options:e,async fn(t){const{x:n,y:i,placement:a,rects:l,platform:o,elements:s,middlewareData:f}=t,{element:u,padding:d=0}=(0,c.evaluate)(e,t)||{};if(null==u)return{};const p=(0,c.getPaddingObject)(d),y={x:n,y:i},x=(0,c.getAlignmentAxis)(a),h=(0,c.getAxisLength)(x),w=await o.getDimensions(u),v='y'===x,b=v?'top':'left',A=v?'bottom':'right',O=v?'clientHeight':'clientWidth',P=l.reference[h]+l.reference[x]-y[x]-l.floating[h],R=y[x]-l.reference[x],S=await(null==o.getOffsetParent?void 0:o.getOffsetParent(u));let j=S?S[O]:0;j&&await(null==o.isElement?void 0:o.isElement(S))||(j=s.floating[O]||l.floating[h]);const T=P/2-R/2,C=j/2-w[h]/2-1,D=(0,c.min)(p[b],C),E=(0,c.min)(p[A],C),L=j-w[h]-E,k=j/2-w[h]/2+T,H=(0,c.clamp)(D,k,L),_=!f.arrow&&null!=(0,c.getAlignment)(a)&&k!==H&&l.reference[h]/2-(k<D?D:E)-w[h]/2<0,B=_?k<D?k-D:k-L:0;return{[x]:y[x]+B,data:Object.assign({[x]:H,centerOffset:k-H-B},_&&{alignmentOffset:B}),reset:_}}});function y(e,t,n){return(e?[...n.filter(t=>(0,c.getAlignment)(t)===e),...n.filter(t=>(0,c.getAlignment)(t)!==e)]:n.filter(e=>(0,c.getSide)(e)===e)).filter(n=>!e||((0,c.getAlignment)(n)===e||!!t&&(0,c.getOppositeAlignmentPlacement)(n)!==n))}const x=function(t){return void 0===t&&(t={}),{name:'autoPlacement',options:t,async fn(n){var i,a,l;const{rects:o,middlewareData:f,placement:u,platform:d,elements:p}=n,x=(0,c.evaluate)(t,n),{crossAxis:h=!1,alignment:w,allowedPlacements:v=c.placements,autoAlignment:b=!0}=x,A=(0,s.default)(x,e),O=void 0!==w||v===c.placements?y(w||null,b,v):v,P=(null==(i=f.autoPlacement)?void 0:i.index)||0,R=O[P];if(null==R)return{};if(u!==R)return{reset:{placement:O[0]}};const S=await d.detectOverflow(n,A),j=(0,c.getAlignmentSides)(R,o,await(null==d.isRTL?void 0:d.isRTL(p.floating))),T=[S[(0,c.getSide)(R)],S[j[0]],S[j[1]]],C=[...(null==(a=f.autoPlacement)?void 0:a.overflows)||[],{placement:R,overflows:T}],D=O[P+1];if(D)return{data:{index:P+1,overflows:C},reset:{placement:D}};const E=C.map(e=>{const t=(0,c.getAlignment)(e.placement);return[e.placement,t&&h?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),L=(null==(l=E.filter(e=>e[2].slice(0,(0,c.getAlignment)(e[0])?2:3).every(e=>e<=0))[0])?void 0:l[0])||E[0][0];return L!==u?{data:{index:P+1,overflows:C},reset:{placement:L}}:{}}}},h=function(e){return void 0===e&&(e={}),{name:'flip',options:e,async fn(n){var i,a;const{placement:l,middlewareData:o,rects:f,initialPlacement:u,platform:d,elements:p}=n,y=(0,c.evaluate)(e,n),{mainAxis:x=!0,crossAxis:h=!0,fallbackPlacements:w,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:A=!0}=y,O=(0,s.default)(y,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const P=(0,c.getSide)(l),R=(0,c.getSideAxis)(u),S=(0,c.getSide)(u)===u,j=await(null==d.isRTL?void 0:d.isRTL(p.floating)),T=w||(S||!A?[(0,c.getOppositePlacement)(u)]:(0,c.getExpandedPlacements)(u)),C='none'!==b;!w&&C&&T.push(...(0,c.getOppositeAxisPlacements)(u,A,b,j));const D=[u,...T],E=await d.detectOverflow(n,O),L=[];let k=(null==(a=o.flip)?void 0:a.overflows)||[];if(x&&L.push(E[P]),h){const e=(0,c.getAlignmentSides)(l,f,j);L.push(E[e[0]],E[e[1]])}if(k=[...k,{placement:l,overflows:L}],!L.every(e=>e<=0)){var H,_;const e=((null==(H=o.flip)?void 0:H.index)||0)+1,t=D[e];if(t){if(!('alignment'===h&&R!==(0,c.getSideAxis)(t))||k.every(e=>(0,c.getSideAxis)(e.placement)!==R||e.overflows[0]>0))return{data:{index:e,overflows:k},reset:{placement:t}}}let n=null==(_=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(v){case'bestFit':{var B;const e=null==(B=k.filter(e=>{if(C){const t=(0,c.getSideAxis)(e.placement);return t===R||'y'===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(n=e);break}case'initialPlacement':n=u}if(l!==n)return{reset:{placement:n}}}return{}}}};function w(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function v(e){return c.sides.some(t=>e[t]>=0)}const b=function(e){return void 0===e&&(e={}),{name:'hide',options:e,async fn(t){const{rects:i,platform:a}=t,l=(0,c.evaluate)(e,t),{strategy:o="referenceHidden"}=l,f=(0,s.default)(l,n);switch(o){case'referenceHidden':{const e=w(await a.detectOverflow(t,Object.assign({},f,{elementContext:'reference'})),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:v(e)}}}case'escaped':{const e=w(await a.detectOverflow(t,Object.assign({},f,{altBoundary:!0})),i.floating);return{data:{escapedOffsets:e,escaped:v(e)}}}default:return{}}}}};function A(e){const t=(0,c.min)(...e.map(e=>e.left)),n=(0,c.min)(...e.map(e=>e.top));return{x:t,y:n,width:(0,c.max)(...e.map(e=>e.right))-t,height:(0,c.max)(...e.map(e=>e.bottom))-n}}function O(e){const t=e.slice().sort((e,t)=>e.y-t.y),n=[];let i=null;for(let e=0;e<t.length;e++){const a=t[e];!i||a.y-i.y>i.height/2?n.push([a]):n[n.length-1].push(a),i=a}return n.map(e=>(0,c.rectToClientRect)(A(e)))}const P=function(e){return void 0===e&&(e={}),{name:'inline',options:e,async fn(t){const{placement:n,elements:i,rects:a,platform:l,strategy:o}=t,{padding:s=2,x:f,y:u}=(0,c.evaluate)(e,t),d=Array.from(await(null==l.getClientRects?void 0:l.getClientRects(i.reference))||[]);if(!d.length)return{};const p=O(d),y=(0,c.rectToClientRect)(A(d)),x=(0,c.getPaddingObject)(s);const h=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=f&&null!=u)return p.find(e=>f>e.left-x.left&&f<e.right+x.right&&u>e.top-x.top&&u<e.bottom+x.bottom)||y;if(p.length>=2){if('y'===(0,c.getSideAxis)(n)){const e=p[0],t=p[p.length-1],i='top'===(0,c.getSide)(n),a=e.top,l=t.bottom,o=i?e.left:t.left,s=i?e.right:t.right;return(0,c.rectToClientRect)({x:o,y:a,width:s-o,height:l-a})}const e='left'===(0,c.getSide)(n),t=(0,c.max)(...p.map(e=>e.right)),i=(0,c.min)(...p.map(e=>e.left)),a=p.filter(n=>e?n.left===i:n.right===t),l=a[0].top,o=a[a.length-1].bottom;return(0,c.rectToClientRect)({x:i,y:l,width:t-i,height:o-l})}return y}},floating:i.floating,strategy:o});return a.reference.x!==h.reference.x||a.reference.y!==h.reference.y||a.reference.width!==h.reference.width||a.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},R=new Set(['left','top']);async function S(e,t){const{placement:n,platform:i,elements:a}=e,l=await(null==i.isRTL?void 0:i.isRTL(a.floating)),o=(0,c.getSide)(n),s=(0,c.getAlignment)(n),f='y'===(0,c.getSideAxis)(n),u=R.has(o)?-1:1,d=l&&f?-1:1,p=(0,c.evaluate)(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:h}='number'==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&'number'==typeof h&&(x='end'===s?-1*h:h),f?{x:x*d,y:y*u}:{x:y*u,y:x*d}}const j=function(e){return void 0===e&&(e=0),{name:'offset',options:e,async fn(t){var n,i;const{x:a,y:l,placement:o,middlewareData:s}=t,c=await S(t,e);return o===(null==(n=s.offset)?void 0:n.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:a+c.x,y:l+c.y,data:Object.assign({},c,{placement:o})}}}},T=function(e){return void 0===e&&(e={}),{name:'shift',options:e,async fn(t){const{x:n,y:a,placement:l,platform:o}=t,f=(0,c.evaluate)(e,t),{mainAxis:u=!0,crossAxis:d=!1,limiter:p={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=f,y=(0,s.default)(f,i),x={x:n,y:a},h=await o.detectOverflow(t,y),w=(0,c.getSideAxis)(l),v=(0,c.getOppositeAxis)(w);let b=x[v],A=x[w];const O=(e,t)=>(0,c.clamp)(t+h['y'===e?'top':'left'],t,t-h['y'===e?'bottom':'right']);u&&(b=O(v,b)),d&&(A=O(w,A));const P=p.fn(Object.assign({},t,{[v]:b,[w]:A}));return Object.assign({},P,{data:{x:P.x-n,y:P.y-a,enabled:{[v]:u,[w]:d}}})}}},C=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,i;const{x:a,y:l,placement:o,rects:s,middlewareData:f}=t,{offset:u=0,mainAxis:d=!0,crossAxis:p=!0}=(0,c.evaluate)(e,t),y={x:a,y:l},x=(0,c.getSideAxis)(o),h=(0,c.getOppositeAxis)(x);let w=y[h],v=y[x];const b=(0,c.evaluate)(u,t),A='number'==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:null!=(n=b.mainAxis)?n:0,crossAxis:null!=(i=b.crossAxis)?i:0};if(d){const e='y'===h?'height':'width',t=s.reference[h]-s.floating[e]+A.mainAxis,n=s.reference[h]+s.reference[e]-A.mainAxis;w<t?w=t:w>n&&(w=n)}if(p){var O,P;const e='y'===h?'width':'height',t=R.has((0,c.getSide)(o)),n=s.reference[x]-s.floating[e]+(t&&(null==(O=f.offset)?void 0:O[x])||0)+(t?0:A.crossAxis),i=s.reference[x]+s.reference[e]+(t?0:(null==(P=f.offset)?void 0:P[x])||0)-(t?A.crossAxis:0);v<n?v=n:v>i&&(v=i)}return{[h]:w,[x]:v}}}},D=function(e){return void 0===e&&(e={}),{name:'size',options:e,async fn(t){const{placement:n,rects:i,platform:l,elements:o}=t,f=(0,c.evaluate)(e,t),{apply:u=()=>{}}=f,d=(0,s.default)(f,a),p=await l.detectOverflow(t,d),y=(0,c.getSide)(n),x=(0,c.getAlignment)(n),h='y'===(0,c.getSideAxis)(n),{width:w,height:v}=i.floating;let b,A;'top'===y||'bottom'===y?(b=y,A=x===(await(null==l.isRTL?void 0:l.isRTL(o.floating))?'start':'end')?'left':'right'):(A=y,b='end'===x?'top':'bottom');const O=v-p.top-p.bottom,P=w-p.left-p.right,R=(0,c.min)(v-p[b],O),S=(0,c.min)(w-p[A],P),j=t.middlewareData.shift,T=!j;let C=R,D=S;null!=j&&j.enabled.x&&(D=P),null!=j&&j.enabled.y&&(C=O),T&&!x&&(h?D=w-2*(0,c.max)(p.left,p.right):C=v-2*(0,c.max)(p.top,p.bottom)),await u(Object.assign({},t,{availableWidth:D,availableHeight:C}));const E=await l.getDimensions(o.floating);return w!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}}},251,[131,252]);
|
|
308
|
-
__d(function(g,r,i,a,m,
|
|
309
|
-
__d(function(g,r,i,a,m,
|
|
310
|
-
__d(function(g,r,
|
|
311
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useSize",{enumerable:!0,get:function(){return n}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]);function n(n){const[o,f]=e.useState(void 0);return(0,t.useLayoutEffect)(()=>{if(n){f({width:n.offsetWidth,height:n.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const t=e[0];let o,u;if("borderBoxSize"in t){const e=t.borderBoxSize,n=Array.isArray(e)?e[0]:e;o=n.inlineSize,u=n.blockSize}else o=n.offsetWidth,u=n.offsetHeight;f({width:o,height:u})});return e.observe(n,{box:"border-box"}),()=>e.unobserve(n)}f(void 0)},[n]),o}},255,[38,193]);
|
|
312
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopId","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus"],t=["__scopeRovingFocusGroup","focusable","active","tabStopId","children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return U}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"RovingFocusGroup",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"RovingFocusGroupItem",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"createRovingFocusGroupScope",{enumerable:!0,get:function(){return O}});var o,n=r(_d[0]),u=(o=n)&&o.__esModule?o:{default:o},c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[1])),s=r(_d[2]),l=r(_d[3]),f=r(_d[4]),d=r(_d[5]),p=r(_d[6]),v=r(_d[7]),b=r(_d[8]),y=r(_d[9]),F=r(_d[10]),I=r(_d[11]),w=r(_d[12]),R=r(_d[13]),S="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},E="RovingFocusGroup",[j,_,T]=(0,l.createCollection)(E),[C,O]=(0,d.createContextScope)(E,[T]),[P,x]=C(E),A=c.forwardRef((e,t)=>(0,R.jsx)(j.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(j.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(D,Object.assign({},e,{ref:t}))})}));A.displayName=E;var D=c.forwardRef((t,o)=>{const{__scopeRovingFocusGroup:n,orientation:l,loop:d=!1,dir:p,currentTabStopId:I,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:j,onEntryFocus:T,preventScrollOnEntryFocus:C=!1}=t,O=(0,u.default)(t,e),x=c.useRef(null),A=(0,f.useComposedRefs)(o,x),D=(0,F.useDirection)(p),[G,k]=(0,y.useControllableState)({prop:I,defaultProp:w??null,onChange:j,caller:E}),[H,K]=c.useState(!1),L=(0,b.useCallbackRef)(T),B=_(n),U=c.useRef(!1),[N,z]=c.useState(0);return c.useEffect(()=>{const e=x.current;if(e)return e.addEventListener(S,L),()=>e.removeEventListener(S,L)},[L]),(0,R.jsx)(P,{scope:n,orientation:l,dir:D,loop:d,currentTabStopId:G,onItemFocus:c.useCallback(e=>k(e),[k]),onItemShiftTab:c.useCallback(()=>K(!0),[]),onFocusableItemAdd:c.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>z(e=>e-1),[]),children:(0,R.jsx)(v.Primitive.div,Object.assign({tabIndex:H||0===N?-1:0,"data-orientation":l},O,{ref:A,style:Object.assign({outline:"none"},t.style),onMouseDown:(0,s.composeEventHandlers)(t.onMouseDown,()=>{U.current=!0}),onFocus:(0,s.composeEventHandlers)(t.onFocus,e=>{const t=!U.current;if(e.target===e.currentTarget&&t&&!H){const t=new CustomEvent(S,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=B().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===G),...e].filter(Boolean).map(e=>e.ref.current),C)}}U.current=!1}),onBlur:(0,s.composeEventHandlers)(t.onBlur,()=>K(!1))}))})}),G="RovingFocusGroupItem",k=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,focusable:l=!0,active:f=!1,tabStopId:d,children:b}=e,y=(0,u.default)(e,t),F=(0,p.useId)(),S=d||F,h=x(G,n),E=h.currentTabStopId===S,T=_(n),{onFocusableItemAdd:C,onFocusableItemRemove:O,currentTabStopId:P}=h,A=(0,w.useIsHydrated)();return(0,I.useLayoutEffect)(()=>{if(A&&l)return C(),()=>O()},[A,l,C,O]),c.useEffect(()=>{if(!A&&l)return C(),()=>O()},[A,l,C,O]),(0,R.jsx)(j.ItemSlot,{scope:n,id:S,focusable:l,active:f,children:(0,R.jsx)(v.Primitive.span,Object.assign({tabIndex:E?0:-1,"data-orientation":h.orientation},y,{ref:o,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{l?h.onItemFocus(S):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>h.onItemFocus(S)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=L(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let u=T().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)u.reverse();else if("prev"===t||"next"===t){"prev"===t&&u.reverse();const c=u.indexOf(e.currentTarget);u=h.loop?(n=c+1,(o=u).map((e,t)=>o[(n+t)%o.length])):u.slice(c+1)}setTimeout(()=>M(u))}var o,n}),children:"function"==typeof b?b({isCurrentTabStop:E,hasTabStop:null!=P}):b}))})});k.displayName=G;var H={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function L(e,t,o){const n=K(e.key,o);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return H[n]}function M(e,t=!1){const o=document.activeElement;for(const n of e){if(n===o)return;if(n.focus({preventScroll:t}),document.activeElement!==o)return}}var B=A,U=k},256,[131,38,189,246,190,191,192,197,199,194,247,193,257,151]);
|
|
313
|
-
__d(function(g,r,i,a,m,
|
|
314
|
-
__d(function(g,r,i,a,m,
|
|
315
|
-
__d(function(g,r,i,a,m,
|
|
316
|
-
__d(function(g,r,i,a,m,
|
|
317
|
-
__d(function(g,r,i,a,m,
|
|
318
|
-
__d(function(g,r,i,a,m,
|
|
319
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeSelect","children"],t=["__scopeSelect","disabled"],n=["__scopeSelect","className","style","children","placeholder"],o=["__scopeSelect","children"],l=["__scopeSelect","forceMount"],c=["forceMount"],s=["position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions"],u=["__scopeSelect","onPlaced"],d=["__scopeSelect","align","collisionPadding"],f=["__scopeSelect","nonce"],p=["__scopeSelect"],b=["__scopeSelect"],h=["__scopeSelect","value","disabled","textValue"],v=["__scopeSelect","className","style"],S=["__scopeSelect"],w=["__scopeSelect","onAutoScroll"],y=["__scopeSelect"],x=["__scopeSelect"],j=["__scopeSelect"];function P(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(_e,"Group",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"Icon",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(_e,"ItemIndicator",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"ItemText",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"ScrollDownButton",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(_e,"ScrollUpButton",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(_e,"Select",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"SelectArrow",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(_e,"SelectContent",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(_e,"SelectGroup",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"SelectIcon",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"SelectItem",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(_e,"SelectItemIndicator",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"SelectItemText",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"SelectLabel",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(_e,"SelectPortal",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e,"SelectScrollDownButton",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(_e,"SelectScrollUpButton",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(_e,"SelectSeparator",{enumerable:!0,get:function(){return et}}),Object.defineProperty(_e,"SelectTrigger",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e,"SelectValue",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(_e,"SelectViewport",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"Separator",{enumerable:!0,get:function(){return et}}),Object.defineProperty(_e,"Trigger",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e,"Value",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(_e,"Viewport",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"createSelectScope",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"unstable_BubbleInput",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(_e,"unstable_Provider",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(_e,"unstable_SelectBubbleInput",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(_e,"unstable_SelectProvider",{enumerable:!0,get:function(){return ge}});var _,C=r(_d[0]),O=(_=C)&&_.__esModule?_:{default:_},E=P(r(_d[1])),I=P(r(_d[2])),R=r(_d[3]),T=r(_d[4]),D=r(_d[5]),k=r(_d[6]),L=r(_d[7]),H=r(_d[8]),M=r(_d[9]),A=r(_d[10]),B=r(_d[11]),V=r(_d[12]),F=r(_d[13]),N=P(F),K=r(_d[14]),W=r(_d[15]),U=r(_d[16]),q=r(_d[17]),z=r(_d[18]),G=r(_d[19]),Y=r(_d[20]),X=r(_d[21]),Z=r(_d[22]),$=r(_d[23]),J=r(_d[24]),Q=r(_d[25]),ee=Object.defineProperty,te=(e,t)=>ee(e,"name",{value:t,configurable:!0}),ne=[" ","Enter","ArrowUp","ArrowDown"],oe=[" ","Enter"],re="Select",[le,ce,ie]=(0,D.createCollection)(re),[se,ae]=(0,L.createContextScope)(re,[ie,F.createPopperScope]),ue=(0,F.createPopperScope)(),[de,fe]=se(re),[pe,me]=se(re);function ge(e){const{__scopeSelect:t,children:n,open:o,defaultOpen:l,onOpenChange:c,value:s,defaultValue:u,onValueChange:d,dir:f,name:p,autoComplete:b,disabled:h,required:v,form:S,internal_do_not_use_render:w}=e,y=ue(t),[x,j]=E.useState(null),[P,_]=E.useState(null),[C,O]=E.useState(!1),I=(0,H.useDirection)(f),[R,T]=(0,G.useControllableState)({prop:o,defaultProp:l??!1,onChange:c,caller:re}),[D,k]=(0,G.useControllableState)({prop:s,defaultProp:u,onChange:d,caller:re}),L=E.useRef(null),M=E.useRef(D);E.useEffect(()=>{const e=S?x?.ownerDocument.getElementById(S):x?.form;if(e instanceof HTMLFormElement){const t=te(()=>k(M.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[S,x,k]);const A=!x||(!!S||!!x.closest("form")),[B,F]=E.useState(new Set),K=(0,V.useId)(),W=Array.from(B).map(e=>e.props.value).join(";"),U=E.useCallback(e=>{F(t=>new Set(t).add(e))},[]),q=E.useCallback(e=>{F(t=>{const n=new Set(t);return n.delete(e),n})},[]),z={required:v,trigger:x,onTriggerChange:j,valueNode:P,onValueNodeChange:_,valueNodeHasChildren:C,onValueNodeHasChildrenChange:O,contentId:K,value:D,onValueChange:k,open:R,onOpenChange:T,dir:I,triggerPointerDownPosRef:L,disabled:h,name:p,autoComplete:b,form:S,nativeOptions:B,nativeSelectKey:W,isFormControl:A};return(0,Q.jsx)(N.Root,Object.assign({},y,{children:(0,Q.jsx)(de,Object.assign({scope:t},z,{children:(0,Q.jsx)(le.Provider,{scope:t,children:(0,Q.jsx)(pe,{scope:t,onNativeOptionAdd:U,onNativeOptionRemove:q,children:ot(w)?w(z):n})})}))}))}te(ge,"SelectProvider");var be=te(t=>{const{__scopeSelect:n,children:o}=t,l=(0,O.default)(t,e);return(0,Q.jsx)(ge,Object.assign({__scopeSelect:n},l,{internal_do_not_use_render:({isFormControl:e})=>(0,Q.jsxs)(Q.Fragment,{children:[o,e?(0,Q.jsx)(nt,{__scopeSelect:n}):null]})}))},"Select"),he=E.forwardRef(te(function(e,n){const{__scopeSelect:o,disabled:l=!1}=e,c=(0,O.default)(e,t),s=ue(o),u=fe("SelectTrigger",o),d=u.disabled||l,f=(0,k.useComposedRefs)(n,u.onTriggerChange),p=ce(o),b=E.useRef("touch"),[h,v,S]=lt(e=>{const t=p().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),o=ct(t,e,n);void 0!==o&&u.onValueChange(o.value)}),w=te(e=>{d||(u.onOpenChange(!0),S()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,Q.jsx)(N.Anchor,Object.assign({asChild:!0},s,{children:(0,Q.jsx)(U.Primitive.button,Object.assign({type:"button",role:"combobox","aria-controls":u.open?u.contentId:void 0,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":rt(u.value)?"":void 0},c,{ref:f,onClick:(0,T.composeEventHandlers)(c.onClick,e=>{e.currentTarget.focus(),"mouse"!==b.current&&w(e)}),onPointerDown:(0,T.composeEventHandlers)(c.onPointerDown,e=>{b.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,T.composeEventHandlers)(c.onKeyDown,e=>{const t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),t&&" "===e.key||ne.includes(e.key)&&(w(),e.preventDefault())})}))}))},"SelectTrigger")),ve=E.forwardRef(te(function(e,t){const{__scopeSelect:o,children:l,placeholder:c=""}=e,s=(0,O.default)(e,n),u=fe("SelectValue",o),{onValueNodeHasChildrenChange:d}=u,f=void 0!==l,p=(0,k.useComposedRefs)(t,u.onValueNodeChange);(0,Y.useLayoutEffect)(()=>{d(f)},[d,f]);const b=rt(u.value);return(0,Q.jsx)(U.Primitive.span,Object.assign({},s,{asChild:!b&&s.asChild,ref:p,style:{pointerEvents:"none"},children:(0,Q.jsx)(E.Fragment,{children:b?c:l},b?"placeholder":"value")}))},"SelectValue")),Se=E.forwardRef(te(function(e,t){const{children:n}=e,l=(0,O.default)(e,o);return(0,Q.jsx)(U.Primitive.span,Object.assign({"aria-hidden":!0},l,{ref:t,children:n||"\u25bc"}))},"SelectIcon")),[we,ye]=se("SelectPortal",{forceMount:void 0}),xe=te(e=>{const{forceMount:t}=e,n=(0,O.default)(e,l);return(0,Q.jsx)(we,{scope:e.__scopeSelect,forceMount:t,children:(0,Q.jsx)(K.Portal,Object.assign({asChild:!0},n))})},"SelectPortal"),je="SelectContent",Pe=E.forwardRef(te(function(e,t){const n=ye(je,e.__scopeSelect),{forceMount:o=n.forceMount}=e,l=(0,O.default)(e,c),s=fe(je,e.__scopeSelect),[u,d]=E.useState();return(0,Y.useLayoutEffect)(()=>{d(new DocumentFragment)},[]),(0,Q.jsx)(W.Presence,{present:o||s.open,children:({present:e})=>e?(0,Q.jsx)(Te,Object.assign({},l,{ref:t})):(0,Q.jsx)(Ce,Object.assign({},l,{fragment:u}))})},"SelectContent")),Ce=E.forwardRef(te(function(e,t){const{__scopeSelect:n,children:o,fragment:l}=e;return l?I.createPortal((0,Q.jsx)(Ee,{scope:n,children:(0,Q.jsx)(le.Slot,{scope:n,children:(0,Q.jsx)("div",{ref:t,children:o})})}),l):null},"SelectContentFragment")),Oe=10,[Ee,Ie]=se(je),Re=(0,q.createSlot)("SelectContent.RemoveScroll"),Te=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,{position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,side:d,sideOffset:f,align:p,alignOffset:b,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:w,hideWhenDetached:y,avoidCollisions:x}=e,j=(0,O.default)(e,s),P=fe(je,n),[_,C]=E.useState(null),[I,R]=E.useState(null),D=(0,k.useComposedRefs)(t,C),[L,H]=E.useState(null),[V,F]=E.useState(null),N=ce(n),[K,W]=E.useState(!1),U=E.useRef(!1);E.useEffect(()=>{if(_)return(0,$.hideOthers)(_)},[_]),(0,A.useFocusGuards)();const q=E.useCallback(e=>{const[t,...n]=N().map(e=>e.ref.current),[o]=n.slice(-1),l=document.activeElement;for(const n of e){if(n===l)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&I&&(I.scrollTop=0),n===o&&I&&(I.scrollTop=I.scrollHeight),n?.focus(),document.activeElement!==l)return}},[N,I]),z=E.useCallback(()=>q([L,_]),[q,L,_]);E.useEffect(()=>{K&&z()},[K,z]);const{onOpenChange:G,triggerPointerDownPosRef:Y}=P;E.useEffect(()=>{if(_){let e={x:0,y:0};const t=te(t=>{e={x:Math.abs(Math.round(t.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Y.current?.y??0))}},"handlePointerMove"),n=te(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(_)||G(!1),document.removeEventListener("pointermove",t),Y.current=null},"handlePointerUp");return null!==Y.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[_,G,Y]),E.useEffect(()=>{const e=te(()=>G(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);const[X,Z]=lt(e=>{const t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),o=ct(t,e,n);o&&setTimeout(()=>o.ref.current?.focus())}),ee=E.useCallback((e,t,n)=>{const o=!U.current&&!n;(void 0!==P.value&&P.value===t||o)&&(H(e),o&&(U.current=!0))},[P.value]),ne=E.useCallback(()=>_?.focus(),[_]),oe=E.useCallback((e,t,n)=>{const o=!U.current&&!n;(void 0!==P.value&&P.value===t||o)&&F(e)},[P.value]),re="popper"===o?ke:De,le=re===ke?{side:d,sideOffset:f,align:p,alignOffset:b,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:w,hideWhenDetached:y,avoidCollisions:x}:{};return(0,Q.jsx)(Ee,{scope:n,content:_,viewport:I,onViewportChange:R,itemRefCallback:ee,selectedItem:L,onItemLeave:ne,itemTextRefCallback:oe,focusSelectedItem:z,selectedItemText:V,position:o,isPositioned:K,searchRef:X,children:(0,Q.jsx)(J.RemoveScroll,{as:Re,allowPinchZoom:!0,children:(0,Q.jsx)(B.FocusScope,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,T.composeEventHandlers)(l,e=>{P.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Q.jsx)(M.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:(0,Q.jsx)(re,Object.assign({role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault()},j,le,{onPlaced:()=>W(!0),ref:D,style:Object.assign({display:"flex",flexDirection:"column",outline:"none"},j.style),onKeyDown:(0,T.composeEventHandlers)(j.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,o=t.indexOf(n);t=t.slice(o+1)}setTimeout(()=>q(t)),e.preventDefault()}})}))})})})})},"SelectContentImpl")),De=E.forwardRef(te(function(e,t){const{__scopeSelect:n,onPlaced:o}=e,l=(0,O.default)(e,u),c=fe(je,n),s=Ie(je,n),[d,f]=E.useState(null),[p,b]=E.useState(null),h=(0,k.useComposedRefs)(t,b),v=ce(n),S=E.useRef(!1),w=E.useRef(!0),{viewport:y,selectedItem:x,selectedItemText:j,focusSelectedItem:P}=s,_=E.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&p&&y&&x&&j){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),l=j.getBoundingClientRect();if("rtl"!==c.dir){const o=l.left-t.left,c=n.left-o,s=e.left-c,u=e.width+s,f=Math.max(u,t.width),p=window.innerWidth-Oe,b=(0,R.clamp)(c,[Oe,Math.max(Oe,p-f)]);d.style.minWidth=u+"px",d.style.left=b+"px"}else{const o=t.right-l.right,c=window.innerWidth-n.right-o,s=window.innerWidth-e.right-c,u=e.width+s,f=Math.max(u,t.width),p=window.innerWidth-Oe,b=(0,R.clamp)(c,[Oe,Math.max(Oe,p-f)]);d.style.minWidth=u+"px",d.style.right=b+"px"}const s=v(),u=window.innerHeight-20,f=y.scrollHeight,b=window.getComputedStyle(p),h=parseInt(b.borderTopWidth,10),w=parseInt(b.paddingTop,10),P=parseInt(b.borderBottomWidth,10),_=h+w+f+parseInt(b.paddingBottom,10)+P,C=Math.min(5*x.offsetHeight,_),O=window.getComputedStyle(y),E=parseInt(O.paddingTop,10),I=parseInt(O.paddingBottom,10),T=e.top+e.height/2-Oe,D=u-T,k=x.offsetHeight/2,L=h+w+(x.offsetTop+k),H=_-L;if(L<=T){const e=s.length>0&&x===s[s.length-1].ref.current;d.style.bottom="0px";const t=p.clientHeight-y.offsetTop-y.offsetHeight,n=L+Math.max(D,k+(e?I:0)+t+P);d.style.height=n+"px"}else{const e=s.length>0&&x===s[0].ref.current;d.style.top="0px";const t=Math.max(T,h+y.offsetTop+(e?E:0)+k)+H;d.style.height=t+"px",y.scrollTop=L-T+y.offsetTop}d.style.margin=`${Oe}px 0`,d.style.minHeight=C+"px",d.style.maxHeight=u+"px",o?.(),requestAnimationFrame(()=>S.current=!0)}},[v,c.trigger,c.valueNode,d,p,y,x,j,c.dir,o]);(0,Y.useLayoutEffect)(()=>_(),[_]);const[C,I]=E.useState();(0,Y.useLayoutEffect)(()=>{p&&I(window.getComputedStyle(p).zIndex)},[p]);const T=E.useCallback(e=>{e&&!0===w.current&&(_(),P?.(),w.current=!1)},[_,P]);return(0,Q.jsx)(Le,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:S,onScrollButtonChange:T,children:(0,Q.jsx)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:(0,Q.jsx)(U.Primitive.div,Object.assign({},l,{ref:h,style:Object.assign({boxSizing:"border-box",maxHeight:"100%"},l.style)}))})})},"SelectItemAlignedPosition")),ke=E.forwardRef(te(function(e,t){const{__scopeSelect:n,align:o="start",collisionPadding:l=Oe}=e,c=(0,O.default)(e,d),s=ue(n);return(0,Q.jsx)(N.Content,Object.assign({},s,c,{ref:t,align:o,collisionPadding:l,style:Object.assign({boxSizing:"border-box"},c.style,{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"})}))},"SelectPopperPosition")),[Le,He]=se(je,{}),Me="SelectViewport",Ae=E.forwardRef(te(function(e,t){const{__scopeSelect:n,nonce:o}=e,l=(0,O.default)(e,f),c=Ie(Me,n),s=He(Me,n),u=(0,k.useComposedRefs)(t,c.onViewportChange),d=E.useRef(0);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Q.jsx)(le.Slot,{scope:n,children:(0,Q.jsx)(U.Primitive.div,Object.assign({"data-radix-select-viewport":"",role:"presentation"},l,{ref:u,style:Object.assign({position:"relative",flex:1,overflow:"hidden auto"},l.style),onScroll:(0,T.composeEventHandlers)(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=s;if(o?.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const o=window.innerHeight-20,l=parseFloat(n.style.minHeight),c=parseFloat(n.style.height),s=Math.max(l,c);if(s<o){const l=s+e,c=Math.min(o,l),u=l-c;n.style.height=c+"px","0px"===n.style.bottom&&(t.scrollTop=u>0?u:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})}))})]})},"SelectViewport")),[Be,Ve]=se("SelectGroup"),Fe=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,p),l=(0,V.useId)();return(0,Q.jsx)(Be,{scope:n,id:l,children:(0,Q.jsx)(U.Primitive.div,Object.assign({role:"group","aria-labelledby":l},o,{ref:t}))})},"SelectGroup")),Ne=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,b),l=Ve("SelectLabel",n);return(0,Q.jsx)(U.Primitive.div,Object.assign({id:l.id},o,{ref:t}))},"SelectLabel")),Ke="SelectItem",[We,Ue]=se(Ke),qe=E.forwardRef(te(function(e,t){const{__scopeSelect:n,value:o,disabled:l=!1,textValue:c}=e,s=(0,O.default)(e,h),u=fe(Ke,n),d=Ie(Ke,n),f=u.value===o,[p,b]=E.useState(c??""),[v,S]=E.useState(!1),w=(0,z.useCallbackRef)(e=>d.itemRefCallback?.(e,o,l)),y=(0,k.useComposedRefs)(t,w),x=(0,V.useId)(),j=E.useRef("touch"),P=te(()=>{l||(u.onValueChange(o),u.onOpenChange(!1))},"handleSelect");return(0,Q.jsx)(We,{scope:n,value:o,disabled:l,textId:x,isSelected:f,onItemTextChange:E.useCallback(e=>{b(t=>t||(e?.textContent??"").trim())},[]),children:(0,Q.jsx)(le.ItemSlot,{scope:n,value:o,disabled:l,textValue:p,children:(0,Q.jsx)(U.Primitive.div,Object.assign({role:"option","aria-labelledby":x,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1},s,{ref:y,onFocus:(0,T.composeEventHandlers)(s.onFocus,()=>S(!0)),onBlur:(0,T.composeEventHandlers)(s.onBlur,()=>S(!1)),onClick:(0,T.composeEventHandlers)(s.onClick,()=>{"mouse"!==j.current&&P()}),onPointerUp:(0,T.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===j.current&&P()}),onPointerDown:(0,T.composeEventHandlers)(s.onPointerDown,e=>{j.current=e.pointerType}),onPointerMove:(0,T.composeEventHandlers)(s.onPointerMove,e=>{j.current=e.pointerType,l?d.onItemLeave?.():"mouse"===j.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,T.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,T.composeEventHandlers)(s.onKeyDown,e=>{if(l||e.target!==e.currentTarget)return;""!==d.searchRef?.current&&" "===e.key||(oe.includes(e.key)&&P()," "===e.key&&e.preventDefault())})}))})})},"SelectItem")),ze="SelectItemText",Ge=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,v),l=fe(ze,n),c=Ie(ze,n),s=Ue(ze,n),u=me(ze,n),[d,f]=E.useState(null),p=(0,z.useCallbackRef)(e=>c.itemTextRefCallback?.(e,s.value,s.disabled)),b=(0,k.useComposedRefs)(t,f,s.onItemTextChange,p),h=d?.textContent,S=E.useMemo(()=>(0,Q.jsx)("option",{value:s.value,disabled:s.disabled,children:h},s.value),[s.disabled,s.value,h]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=u;return(0,Y.useLayoutEffect)(()=>(w(S),()=>y(S)),[w,y,S]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(U.Primitive.span,Object.assign({id:s.textId},o,{ref:b})),s.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!rt(l.value)?I.createPortal(o.children,l.valueNode):null]})},"SelectItemText")),Ye=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,S);return Ue("SelectItemIndicator",n).isSelected?(0,Q.jsx)(U.Primitive.span,Object.assign({"aria-hidden":!0},o,{ref:t})):null},"SelectItemIndicator")),Xe="SelectScrollUpButton",Ze=E.forwardRef(te(function(e,t){const n=Ie(Xe,e.__scopeSelect),o=He(Xe,e.__scopeSelect),[l,c]=E.useState(!1),s=(0,k.useComposedRefs)(t,o.onScrollButtonChange);return(0,Y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;c(e)};te(e,"handleScroll");const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),l?(0,Q.jsx)(Qe,Object.assign({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null},"SelectScrollUpButton")),$e="SelectScrollDownButton",Je=E.forwardRef(te(function(e,t){const n=Ie($e,e.__scopeSelect),o=He($e,e.__scopeSelect),[l,c]=E.useState(!1),s=(0,k.useComposedRefs)(t,o.onScrollButtonChange);return(0,Y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;c(n)};te(e,"handleScroll");const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),l?(0,Q.jsx)(Qe,Object.assign({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null},"SelectScrollDownButton")),Qe=E.forwardRef(te(function(e,t){const{__scopeSelect:n,onAutoScroll:o}=e,l=(0,O.default)(e,w),c=Ie("SelectScrollButton",n),s=E.useRef(null),u=ce(n),d=E.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),(0,Y.useLayoutEffect)(()=>{const e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,Q.jsx)(U.Primitive.div,Object.assign({"aria-hidden":!0},l,{ref:t,style:Object.assign({flexShrink:0},l.style),onPointerDown:(0,T.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:(0,T.composeEventHandlers)(l.onPointerMove,()=>{c.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:(0,T.composeEventHandlers)(l.onPointerLeave,()=>{d()})}))},"SelectScrollButtonImpl")),et=E.forwardRef(te(function(e,t){const n=(0,O.default)(e,y);return(0,Q.jsx)(U.Primitive.div,Object.assign({"aria-hidden":!0},n,{ref:t}))},"SelectSeparator")),tt=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,x),l=ue(n);return"popper"===Ie("SelectArrow",n).position?(0,Q.jsx)(N.Arrow,Object.assign({},l,o,{ref:t})):null},"SelectArrow")),nt=E.forwardRef(te(function(e,t){let{__scopeSelect:n}=e,o=(0,O.default)(e,j);const l=fe("SelectBubbleInput",n),{value:c,onValueChange:s,required:u,disabled:d,name:f,autoComplete:p,form:b}=l,{nativeOptions:h,nativeSelectKey:v}=l,S=E.useRef(null),w=(0,k.useComposedRefs)(t,S),y=c??"",x=(0,X.usePrevious)(y),P=Array.from(h).some(e=>""===(e.props.value??""));return E.useEffect(()=>{const e=S.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(x!==y&&n){const t=new Event("change",{bubbles:!0});n.call(e,y),e.dispatchEvent(t)}},[x,y]),(0,Q.jsxs)(U.Primitive.select,Object.assign({"aria-hidden":!0,required:u,tabIndex:-1,name:f,autoComplete:p,disabled:d,form:b,onChange:e=>s(e.target.value)},o,{style:Object.assign({},Z.VISUALLY_HIDDEN_STYLES,o.style),ref:w,defaultValue:y,children:[rt(c)&&!P?(0,Q.jsx)("option",{value:""}):null,Array.from(h)]}),v)},"SelectBubbleInput"));function ot(e){return"function"==typeof e}function rt(e){return""===e||void 0===e}function lt(e){const t=(0,z.useCallbackRef)(e),n=E.useRef(""),o=E.useRef(0),l=E.useCallback(e=>{const l=n.current+e;t(l),te(function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))},"updateSearch")(l)},[t]),c=E.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,c]}function ct(e,t,n){const o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=it(e,Math.max(l,0));1===o.length&&(c=c.filter(e=>e!==n));const s=c.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}function it(e,t){return e.map((n,o)=>e[(t+o)%e.length])}te(ot,"isFunction"),te(rt,"shouldShowPlaceholder"),te(lt,"useTypeaheadSearch"),te(ct,"findNextItem"),te(it,"wrapArray")},263,[131,38,40,264,265,266,270,269,272,273,276,277,278,280,283,284,274,271,275,285,279,288,289,240,204,151]);
|
|
320
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
321
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
322
|
-
__d(function(g,r,
|
|
323
|
-
__d(function(g,r,i,a,m,
|
|
324
|
-
__d(function(g,r,i,a,m,_e,d){var e=0;m.exports=function(t){return"__private_"+e+++"_"+t},m.exports.__esModule=!0,m.exports.default=m.exports},268,[]);
|
|
325
|
-
__d(function(g,r,i,a,m,
|
|
326
|
-
__d(function(g,r,
|
|
327
|
-
__d(function(g,r,
|
|
328
|
-
__d(function(g,r,i,a,m,_e,
|
|
329
|
-
__d(function(g,r,i,a,m,_e,
|
|
330
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["
|
|
331
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
332
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
333
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
334
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
335
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
336
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
337
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
338
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
339
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["
|
|
340
|
-
__d(function(g,r,
|
|
341
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";
|
|
342
|
-
__d(function(g,r,
|
|
343
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
344
|
-
__d(function(g,r,i,a,m,
|
|
345
|
-
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"
|
|
346
|
-
__d(function(g,r,i,a,m,
|
|
347
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
348
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
349
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0})
|
|
350
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0})
|
|
351
|
-
__d(function(g,r,i,
|
|
352
|
-
__d(function(g,r,i,
|
|
353
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
354
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
355
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
356
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
357
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
358
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
359
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
360
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
361
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
362
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
363
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
364
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
365
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
366
|
-
__d(function(g,r,i,
|
|
367
|
-
__d(function(g,r,i,
|
|
368
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
369
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
370
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
371
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
372
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
373
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
374
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
375
|
-
__d(function(g,r,i,a,m,e,d){},319,[]);
|
|
376
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
377
|
-
__d(function(g,r,i,a,m,e,d){
|
|
378
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
379
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
380
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
381
|
-
__d(function(g,r,i,a,m,e,d){"use strict";
|
|
382
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
383
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0})
|
|
384
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
385
|
-
__d(function(g,r,i,a,m,
|
|
386
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
387
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
388
|
-
__d(function(g,r,i,a,m,
|
|
389
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
390
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
391
|
-
__d(function(g,r,i,a,m,
|
|
392
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
393
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
394
|
-
__d(function(g,r,i,a,m,
|
|
395
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
396
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
397
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
398
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
399
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
400
|
-
__d(function(g,r,i,a,m,e,d){"use strict";
|
|
231
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.androidFontScaleForTextSize=t,e.androidTextSizeForFontScale=l,e.androidDeviceSettingPath=o,e.androidDeviceSettingRequest=function(n,l){if('appearance'===n&&('light'===l||'dark'===l))return{path:o(n),body:{night:'dark'===l?'yes':'no'}};if('network'===n&&('on'===l||'off'===l))return{path:o(n),body:{enabled:'on'===l}};if('text-size'===n){const u=t(l);return null===u?null:{path:o(n),body:{scale:u}}}return null},e.parseAndroidDeviceSetting=function(n,t){if(!t||'object'!=typeof t||Array.isArray(t))return null;const o=t;if(!0!==o.ok)return null;if('appearance'===n)return'yes'===o.night?'dark':'no'===o.night||'auto'===o.night?'light':null;if('network'===n){const n=o.network;if(!n||'object'!=typeof n||Array.isArray(n))return null;const t=n.enabled;return!0===t?'on':!1===t?'off':null===t?'unknown':null}const u=o.fontScale;return!u||'object'!=typeof u||Array.isArray(u)?null:l(u.scale)};const n=[{value:'small',scale:.85},{value:'medium',scale:1},{value:'large',scale:1.15},{value:'extra-large',scale:1.3}];function t(t){return n.find(n=>n.value===t)?.scale??null}function l(t){const l=Number(t);return!Number.isFinite(l)||l<=0?null:n.reduce((n,t)=>Math.abs(t.scale-l)<Math.abs(n.scale-l)?t:n).value}function o(n){return'appearance'===n?'/api/uimode':'network'===n?'/api/network':'/api/font-scale'}},175,[]);
|
|
232
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildCodecString=function(t){const n=t[1].toString(16).padStart(2,'0'),i=t[2].toString(16).padStart(2,'0'),o=t[3].toString(16).padStart(2,'0');return`avc1.${n}${i}${o}`},e.scanAU=function(t){let n=!1,i=null;const o=t.length;let s=0;for(;s+2<o;){if(0===t[s]&&0===t[s+1]){let u=0;if(1===t[s+2]?u=3:s+3<o&&0===t[s+2]&&1===t[s+3]&&(u=4),u){const o=31&t[s+u];7!==o||i||(i=t.subarray(s+u)),5===o&&(n=!0),s+=u+1;continue}}s++}return{isKey:n,spsBytes:i}},e.parseFramePacket=function(s){const u=s instanceof Uint8Array?s:new Uint8Array(s);if(u.byteLength>i){const s=new DataView(u.buffer,u.byteOffset,i);if(s.getUint32(0,!1)===t&&s.getUint8(4)===n){const t=s.getBigUint64(8,!1);return{data:u.subarray(i),isKey:0!==(s.getUint8(5)&o),timestamp:t<=BigInt(Number.MAX_SAFE_INTEGER)?Number(t):null}}}return{data:u,isKey:null,timestamp:null}},e.isWebCodecsSupported=function(){return'undefined'!=typeof globalThis&&'VideoDecoder'in globalThis&&'EncodedVideoChunk'in globalThis};const t=1397050709,n=1,i=16,o=1},176,[]);
|
|
233
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MsePlayer",{enumerable:!0,get:function(){return o}});var t=r(d[0]);const s='video/mp4; codecs="avc1.42E01E"';class o{static isSupported(){if('undefined'==typeof window||'undefined'==typeof MediaSource)return!1;try{return MediaSource.isTypeSupported(s)}catch{return!1}}muxer=new t.FragmentedMp4Muxer;sourceBuffer=null;queue=[];destroyed=!1;painted=!1;rafHandle=0;fpsWindowStart=0;fpsBaseFrames=0;constructor(t,s={}){this.canvas=t,this.callbacks=s,this.ctx=t.getContext('2d',{alpha:!1,desynchronized:!0});const o=document.createElement('video');o.muted=!0,o.defaultMuted=!0,o.autoplay=!0,o.playsInline=!0,o.setAttribute('playsinline',''),o.style.cssText='position:fixed;left:0;bottom:0;width:4px;height:4px;opacity:0.01;pointer-events:none;z-index:-1;',(document.body??document.documentElement).appendChild(o),this.video=o,this.mediaSource=new MediaSource,this.objectUrl=URL.createObjectURL(this.mediaSource),o.src=this.objectUrl,this.mediaSource.addEventListener('sourceopen',this.onSourceOpen,{once:!0}),o.addEventListener('error',this.onVideoError),this.rafHandle=requestAnimationFrame(this.tick)}feed(t,s,o){if(this.destroyed)return;if(!this.muxer.ready&&!s)return void this.callbacks.requestKeyframe?.();const{init:n,segment:c}=this.muxer.append(t,s,o);n&&(this.queue.push(n),this.setupSourceBuffer()),c&&this.queue.push(c),this.pump()}destroy(){this.destroyed=!0,this.rafHandle&&cancelAnimationFrame(this.rafHandle),this.rafHandle=0,this.video.removeEventListener('error',this.onVideoError);try{this.sourceBuffer&&this.sourceBuffer.removeEventListener('updateend',this.pump)}catch{}try{'open'===this.mediaSource.readyState&&this.mediaSource.endOfStream()}catch{}try{this.video.pause(),this.video.removeAttribute('src'),this.video.load(),this.video.remove()}catch{}try{URL.revokeObjectURL(this.objectUrl)}catch{}this.queue.length=0}onSourceOpen=()=>{try{URL.revokeObjectURL(this.objectUrl)}catch{}this.setupSourceBuffer(),this.pump()};onVideoError=()=>{this.destroyed||this.callbacks.onError?.('Video playback error')};setupSourceBuffer(){if(this.sourceBuffer||'open'!==this.mediaSource.readyState)return;const t=this.muxer.codec;if(!t)return;let o=`video/mp4; codecs="${t}"`;if(!MediaSource.isTypeSupported(o)){if(!MediaSource.isTypeSupported(s))return void this.callbacks.onError?.('This browser cannot decode this H.264 profile.');o=s}try{const t=this.mediaSource.addSourceBuffer(o);t.mode='segments',t.addEventListener('updateend',this.pump),this.sourceBuffer=t}catch{this.callbacks.onError?.('Failed to start MSE video buffer.')}}pump=()=>{const t=this.sourceBuffer;if(this.destroyed||!t||t.updating||'open'!==this.mediaSource.readyState)return;if(this.pruneBackBuffer())return;const s=this.queue.shift();if(s)try{t.appendBuffer(s)}catch(t){'QuotaExceededError'===t?.name?(this.queue.unshift(s),this.pruneBackBuffer(!0)):this.callbacks.onError?.('Failed to append video data.')}};pruneBackBuffer(t=!1){const s=this.sourceBuffer;if(!s||s.updating||0===s.buffered.length)return!1;const o=s.buffered.start(0),n=this.video.currentTime-(t?3:30);if(n>o+.1)try{return s.remove(o,n),!0}catch{return!1}return!1}tick=()=>{if(this.destroyed)return;this.rafHandle=requestAnimationFrame(this.tick);const t=this.video,s=t.buffered;if(s.length>0){const o=s.start(0),n=s.end(s.length-1),c=n-t.currentTime;if(t.currentTime>n+.05||t.currentTime<o-.05||c>.5){try{t.currentTime=Math.max(o,n-.03)}catch{}t.playbackRate=1}else t.playbackRate=c>.05?1+Math.min(8*(c-.05),1.5):1}t.paused&&t.readyState>=2&&t.play().catch(()=>{}),0!==t.videoWidth&&(this.painted||(this.painted=!0,this.canvas.width=t.videoWidth,this.canvas.height=t.videoHeight,this.callbacks.onResize?.(t.videoWidth,t.videoHeight),this.callbacks.onFirstFrame?.(),this.fpsWindowStart=performance.now(),this.fpsBaseFrames=t.getVideoPlaybackQuality?.().totalVideoFrames??0),this.ctx&&this.ctx.drawImage(t,0,0),this.reportFps())};reportFps(){const t=performance.now();if(t-this.fpsWindowStart<1e3)return;const s=this.video.getVideoPlaybackQuality?.().totalVideoFrames;if(null!=s){const o=Math.round(1e3*(s-this.fpsBaseFrames)/(t-this.fpsWindowStart));this.callbacks.onFps?.(o),this.fpsBaseFrames=s}this.fpsWindowStart=t}}},177,[178]);
|
|
234
|
+
__d(function(g,_r,_i,a,m,e,d){"use strict";function t(t){return new Uint8Array([t>>8&255,255&t])}function n(t){return new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t])}function i(t){const i=Math.floor(t/4294967296),s=t>>>0;return new Uint8Array([...n(i),...n(s)])}function s(t){return new Uint8Array([t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)])}function r(t){let n=0;for(const i of t)n+=i.byteLength;const i=new Uint8Array(n);let s=0;for(const n of t)i.set(n,s),s+=n.byteLength;return i}function o(t,...i){const o=r(i);return r([n(8+o.byteLength),s(t),o])}function*h(t){const n=t.length,i=i=>{for(let s=i;s+2<n;s++)if(0===t[s]&&0===t[s+1]){if(1===t[s+2])return{pos:s,len:3};if(s+3<n&&0===t[s+2]&&1===t[s+3])return{pos:s,len:4}}return null};let s=i(0);for(;s;){const r=s.pos+s.len,o=i(r),h=o?o.pos:n;h>r&&(yield t.subarray(r,h)),s=o}}function u(t){const n=[];for(let i=0;i<t.length;i++)i+2<t.length&&0===t[i]&&0===t[i+1]&&3===t[i+2]?(n.push(0,0),i+=2):n.push(t[i]);return new Uint8Array(n)}Object.defineProperty(e,'__esModule',{value:!0}),e.codecStringFromSps=y,Object.defineProperty(e,"FragmentedMp4Muxer",{enumerable:!0,get:function(){return w}});class c{pos=0;constructor(t){this.data=t}bit(){const t=(this.data[this.pos>>3]??0)>>7-(7&this.pos)&1;return this.pos++,t}bits(t){let n=0;for(let i=0;i<t;i++)n=n<<1|this.bit();return n>>>0}ue(){let t=0;for(;0===this.bit()&&t<32;)t++;return 0===t?0:(1<<t)-1+this.bits(t)}se(){const t=this.ue();return 1&t?t+1>>1:-(t>>1)}}const l=new Set([100,110,122,244,44,83,86,118,128,138,139,134,135]);function f(t,n){let i=8,s=8;for(let r=0;r<n;r++){if(0!==s){s=(i+t.se()+256)%256}i=0===s?i:s}}function b(t){const n=new c(u(t.subarray(1))),i=n.bits(8);n.bits(8),n.bits(8),n.ue();let s=1;if(l.has(i)&&(s=n.ue(),3===s&&n.bit(),n.ue(),n.ue(),n.bit(),n.bit())){const t=3!==s?8:12;for(let i=0;i<t;i++)n.bit()&&f(n,i<6?16:64)}n.ue();const r=n.ue();if(0===r)n.ue();else if(1===r){n.bit(),n.se(),n.se();const t=n.ue();for(let i=0;i<t;i++)n.se()}n.ue(),n.bit();const o=n.ue(),h=n.ue(),b=n.bit();b||n.bit(),n.bit();let y=0,p=0,w=0,A=0;n.bit()&&(y=n.ue(),p=n.ue(),w=n.ue(),A=n.ue());const U=16*(o+1),v=(2-b)*(h+1)*16,L=0===s?1:0===s?1:2,M=(0===s?1:0===s?1:2)*(2-b);return{width:Math.max(0,U-L*(y+p)),height:Math.max(0,v-M*(w+A))}}function y(t){const n=t=>t.toString(16).padStart(2,'0');return`avc1.${n(t[1])}${n(t[2])}${n(t[3])}`}const p=r([n(65536),n(0),n(0),n(0),n(65536),n(0),n(0),n(0),n(1073741824)]);class w{sps=null;pps=null;codecKey='';width=0;height=0;seq=1;baseMediaDecodeTime=0;prevPtsTicks=null;get codec(){return this.sps?y(this.sps):null}get ready(){return!!this.sps&&!!this.pps}append(t,n,i){const s=[];let r,o=null,u=null;for(const n of h(t)){const t=31&n[0];7===t?o=n.slice():8===t?u=n.slice():t>=1&&t<=6&&s.push(n)}if(o&&u){const t=`${o.join(',')}|${u.join(',')}`;if(t!==this.codecKey){this.sps=o,this.pps=u,this.codecKey=t;const n=b(o);this.width=n.width,this.height=n.height,r=this.buildInit()}}if(!this.ready||0===s.length)return{init:r};const c=null==i?null:Math.round(9e4*i/1e6);let l=3e3;if(null!=c&&null!=this.prevPtsTicks){const t=c-this.prevPtsTicks;l=t>0?Math.min(t,45e4):3e3}null!=c&&(this.prevPtsTicks=c);return{init:r,segment:this.buildSegment(s,n,l)}}get dimensions(){return this.width&&this.height?{width:this.width,height:this.height}:null}buildInit(){const i=this.sps,h=this.pps,u=o('avcC',new Uint8Array([1,i[1],i[2],i[3],255,225]),t(i.byteLength),i,new Uint8Array([1]),t(h.byteLength),h),c=o('avc1',new Uint8Array(6),t(1),new Uint8Array(16),t(this.width),t(this.height),n(4718592),n(4718592),n(0),t(1),new Uint8Array(32),t(24),new Uint8Array([255,255]),u),l=o('stbl',o('stsd',n(0),n(1),c),o('stts',n(0),n(0)),o('stsc',n(0),n(0)),o('stsz',n(0),n(0),n(0)),o('stco',n(0),n(0))),f=o('dinf',o('dref',n(0),n(1),o('url ',n(1)))),b=o('minf',o('vmhd',n(1),n(0),n(0)),f,l),y=o('mdhd',n(0),n(0),n(0),n(9e4),n(0),t(21956),t(0)),w=o('hdlr',n(0),n(0),s('vide'),n(0),n(0),n(0),new Uint8Array([...s('Vide'),...s('oHan'),...s('dler'),0])),A=o('mdia',y,w,b),U=o('tkhd',new Uint8Array([0,0,0,7]),n(0),n(0),n(1),n(0),n(0),n(0),n(0),t(0),t(0),t(0),t(0),p,n(this.width<<16),n(this.height<<16)),v=o('trak',U,A),L=o('mvhd',n(0),n(0),n(0),n(1e3),n(0),n(65536),t(256),t(0),n(0),n(0),p,n(0),n(0),n(0),n(0),n(0),n(0),n(2)),M=o('trex',n(0),n(1),n(1),n(0),n(0),n(0)),S=o('moov',L,v,o('mvex',M));return r([o('ftyp',s('isom'),n(0),s('isom'),s('iso6'),s('avc1'),s('mp41')),S])}buildSegment(t,s,h){let u=0;for(const n of t)u+=4+n.byteLength;const c=new Uint8Array(u);let l=0;for(const i of t)c.set(n(i.byteLength),l),l+=4,c.set(i,l),l+=i.byteLength;const f=o('mfhd',n(0),n(this.seq++)),b=o('tfhd',new Uint8Array([0,2,0,0]),n(1)),y=o('tfdt',new Uint8Array([1,0,0,0]),i(this.baseMediaDecodeTime)),p=o('trun',new Uint8Array([0,0,7,1]),n(1),n(0),n(h),n(u),n(s?33554432:16842752)),w=o('moof',f,o('traf',b,y,p));return new DataView(w.buffer,w.byteOffset,w.byteLength).setInt32(w.byteLength-16,w.byteLength+8,!1),this.baseMediaDecodeTime+=h,r([w,o('mdat',c)])}}},178,[]);
|
|
235
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useActiveDeviceClient=function(s,u){const c='ios'===s?.platform,v='android'===s?.platform,_=(0,o.useIosDeviceClient)({enabled:c,baseUrl:c?(0,n.endpointFor)('ios',u):null,device:c?s?.device??null:null,streamMode:s?.streamMode}),b=(0,l.useAndroidDeviceClient)({enabled:v,baseUrl:v?(0,n.endpointFor)('android',u):null,device:v?s?.device??null:null,streamMode:s?.streamMode});return c?_:v?b:t.NOOP_DEVICE_CLIENT};var n=r(d[0]),l=r(d[1]),o=r(d[2]),t=r(d[3])},179,[161,173,157,180]);
|
|
236
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NOOP_DEVICE_CLIENT",{enumerable:!0,get:function(){return t}});const t={platform:'ios',status:'idle',error:null,screen:null,fps:0,devices:[],logs:[],logsEnabled:!1,attachLogs:()=>{},detachLogs:()=>{},clearLogs:()=>{},events:[],eventsEnabled:!1,attachEvents:()=>{},detachEvents:()=>{},clearEvents:()=>{},activity:null,deviceSettings:null,deviceSettingsPending:new Set,setDeviceSetting:()=>{},streamCapabilities:null,streamSettings:null,streamSettingsPending:!1,updateStreamSettings:()=>{},webRtcCodec:'h264',setWebRtcCodec:()=>{},capabilities:{deviceSettings:!1,activity:!1,events:!1,streamSettings:!1},foregroundApp:null,videoKind:'img',attachVideo:()=>{},sendTouch:()=>{},sendKey:()=>!1,pressButton:()=>{},reload:()=>{},rotate:()=>{},screenshot:async()=>null,appearance:null,setAppearance:()=>{},hardwareKeyboardConnected:null,setHardwareKeyboardConnected:()=>{},toggleSoftwareKeyboard:()=>{}}},180,[]);
|
|
237
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Button",{enumerable:!0,get:function(){return t.Button}}),Object.defineProperty(e,"ControlButton",{enumerable:!0,get:function(){return n.ControlButton}}),Object.defineProperty(e,"DeviceListItem",{enumerable:!0,get:function(){return o.DeviceListItem}}),Object.defineProperty(e,"DialogRoot",{enumerable:!0,get:function(){return u.DialogRoot}}),Object.defineProperty(e,"DialogContent",{enumerable:!0,get:function(){return u.DialogContent}}),Object.defineProperty(e,"DialogTitle",{enumerable:!0,get:function(){return u.DialogTitle}}),Object.defineProperty(e,"DialogContentContainer",{enumerable:!0,get:function(){return u.DialogContentContainer}}),Object.defineProperty(e,"DialogFooter",{enumerable:!0,get:function(){return u.DialogFooter}}),Object.defineProperty(e,"DialogClose",{enumerable:!0,get:function(){return u.DialogClose}}),Object.defineProperty(e,"Dropdown",{enumerable:!0,get:function(){return c.Dropdown}}),Object.defineProperty(e,"DropdownItem",{enumerable:!0,get:function(){return b.DropdownItem}}),Object.defineProperty(e,"Logo",{enumerable:!0,get:function(){return f.Logo}}),Object.defineProperty(e,"ResizeHandle",{enumerable:!0,get:function(){return l.ResizeHandle}}),Object.defineProperty(e,"SegmentedControl",{enumerable:!0,get:function(){return p.SegmentedControl}}),Object.defineProperty(e,"Select",{enumerable:!0,get:function(){return y.Select}}),Object.defineProperty(e,"SidebarToggle",{enumerable:!0,get:function(){return O.SidebarToggle}}),Object.defineProperty(e,"Switch",{enumerable:!0,get:function(){return P.Switch}}),Object.defineProperty(e,"cx",{enumerable:!0,get:function(){return j.cx}}),Object.defineProperty(e,"Sidebar",{enumerable:!0,get:function(){return D.Sidebar}}),Object.defineProperty(e,"LogSidebar",{enumerable:!0,get:function(){return C.LogSidebar}}),Object.defineProperty(e,"StreamPanel",{enumerable:!0,get:function(){return v.StreamPanel}}),Object.defineProperty(e,"DeviceTitle",{enumerable:!0,get:function(){return L.DeviceTitle}}),Object.defineProperty(e,"EmptyState",{enumerable:!0,get:function(){return w.EmptyState}}),Object.defineProperty(e,"DeviceSection",{enumerable:!0,get:function(){return h.DeviceSection}}),Object.defineProperty(e,"OutputSection",{enumerable:!0,get:function(){return E.OutputSection}}),Object.defineProperty(e,"CurrentAppSection",{enumerable:!0,get:function(){return R.CurrentAppSection}}),Object.defineProperty(e,"DeviceOptionsSection",{enumerable:!0,get:function(){return B.DeviceOptionsSection}}),Object.defineProperty(e,"ActivitySection",{enumerable:!0,get:function(){return T.ActivitySection}}),Object.defineProperty(e,"EventsSection",{enumerable:!0,get:function(){return M.EventsSection}}),Object.defineProperty(e,"LogsSection",{enumerable:!0,get:function(){return A.LogsSection}}),Object.defineProperty(e,"CollapsibleSection",{enumerable:!0,get:function(){return F.CollapsibleSection}}),Object.defineProperty(e,"KeyboardSection",{enumerable:!0,get:function(){return I.KeyboardSection}}),Object.defineProperty(e,"PhoneFrame",{enumerable:!0,get:function(){return _.PhoneFrame}}),Object.defineProperty(e,"LogControls",{enumerable:!0,get:function(){return k.LogControls}}),Object.defineProperty(e,"LogList",{enumerable:!0,get:function(){return x.LogList}}),Object.defineProperty(e,"LogRow",{enumerable:!0,get:function(){return z.LogRow}}),Object.defineProperty(e,"StreamControls",{enumerable:!0,get:function(){return H.StreamControls}}),Object.defineProperty(e,"StreamSection",{enumerable:!0,get:function(){return K.StreamSection}}),Object.defineProperty(e,"StreamOptionsSection",{enumerable:!0,get:function(){return q.StreamOptionsSection}}),Object.defineProperty(e,"RecentDevicesModal",{enumerable:!0,get:function(){return G.RecentDevicesModal}}),Object.defineProperty(e,"BootErrorModal",{enumerable:!0,get:function(){return J.BootErrorModal}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),b=r(d[5]),f=r(d[6]),l=r(d[7]),p=r(d[8]),y=r(d[9]),O=r(d[10]),P=r(d[11]),j=r(d[12]),S=r(d[13]);Object.keys(S).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return S[t]}})});var s=r(d[14]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var D=r(d[15]),C=r(d[16]),v=r(d[17]),L=r(d[18]),w=r(d[19]),h=r(d[20]),E=r(d[21]),R=r(d[22]),B=r(d[23]),T=r(d[24]),M=r(d[25]),A=r(d[26]),F=r(d[27]),I=r(d[28]),_=r(d[29]),k=r(d[30]),x=r(d[31]),z=r(d[32]),H=r(d[33]),K=r(d[34]),q=r(d[35]),G=r(d[36]),J=r(d[37]),N=r(d[38]);Object.keys(N).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return N[t]}})})},181,[182,184,185,189,248,263,264,265,266,267,291,292,247,186,183,293,297,311,312,317,295,318,300,302,298,305,309,299,303,313,306,307,308,316,319,310,296,320,321]);
|
|
238
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Button=function({children:n,theme:l="primary",size:u="sm",leftSlot:b,rightSlot:h,block:x=!1,disabled:y=!1,type:p="button",href:v,target:j,onClick:f,className:k,style:S}){const[O,z]=(0,s.useState)(!1),[I,R]=(0,s.useState)(!1),C=o[l],B=Object.assign({display:'inline-flex',alignItems:'center',justifyContent:'center',gap:'2xs'===u?4:'xs'===u?6:8,border:'1px solid',fontWeight:500,whiteSpace:'nowrap',cursor:y?'default':'pointer',textDecoration:'none',transition:'background-color 150ms ease, transform 100ms ease, opacity 150ms ease',width:x?'100%':void 0,transform:!y&&I?'scale(0.98)':void 0},c[u],{backgroundColor:y?C.disabledBackground:O?C.hover:C.background,borderColor:y?C.disabledBorder:C.border,color:y?C.disabledText:C.text,opacity:y?.8:1,pointerEvents:y?'none':void 0},S),M=(0,t.jsxs)(t.Fragment,{children:[b,null!=n&&(0,t.jsx)("span",{style:{display:'flex',lineHeight:1},children:n}),h]}),w={onMouseEnter:()=>z(!0),onMouseLeave:()=>{z(!1),R(!1)},onMouseDown:()=>R(!0),onMouseUp:()=>R(!1)};if(v)return(0,t.jsx)("a",Object.assign({href:y?void 0:v,target:j,className:k,style:B,onClick:y?void 0:f},w,{children:M}));return(0,t.jsx)("button",Object.assign({type:p,className:k,style:B,disabled:y,onClick:y?void 0:f},w,{children:M}))};var t=r(d[0]),s=r(d[1]),n=r(d[2]);const o={primary:l('primary'),secondary:l('secondary'),tertiary:l('tertiary'),quaternary:l('quaternary'),'primary-destructive':l('primary-destructive'),'secondary-destructive':l('secondary-destructive'),'tertiary-destructive':l('tertiary-destructive'),'agent-overlay':l('agent-overlay')};function l(t){const s=s=>`var(--expo-theme-button-${t}-${s})`;return{background:s('background'),hover:s('hover'),text:s('text'),border:s('border'),disabledBackground:s('disabled-background'),disabledBorder:s('disabled-border'),disabledText:s('disabled-text')}}const c={'2xs':Object.assign({height:28,paddingInline:8,borderRadius:n.radius.lg},n.textSize.xs),xs:Object.assign({height:32,paddingInline:12,borderRadius:n.radius.lg},n.textSize.xs),sm:Object.assign({height:36,paddingInline:16,borderRadius:n.radius.lg},n.textSize.sm),md:Object.assign({height:40,paddingInline:16,borderRadius:n.radius.lg},n.textSize.sm),lg:Object.assign({height:44,paddingInline:24,borderRadius:n.radius.lg},n.textSize.base),xl:Object.assign({height:48,paddingInline:24,borderRadius:n.radius.lg},n.textSize.base),'2xl':Object.assign({height:60,paddingInline:24,borderRadius:n.radius.lg},n.textSize.lg)}},182,[151,38,183]);
|
|
239
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"bg",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"text",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"icon",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"border",{enumerable:!0,get:function(){return x}}),Object.defineProperty(e,"radius",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"font",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"textSize",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"heading",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"tokens",{enumerable:!0,get:function(){return u}});const t={default:'var(--expo-theme-background-default)',screen:'var(--expo-theme-background-screen)',subtle:'var(--expo-theme-background-subtle)',element:'var(--expo-theme-background-element)',hover:'var(--expo-theme-background-hover)',selected:'var(--expo-theme-background-selected)',overlay:'var(--expo-theme-background-overlay)',success:'var(--expo-theme-background-success)',warning:'var(--expo-theme-background-warning)',danger:'var(--expo-theme-background-danger)',info:'var(--expo-theme-background-info)',preview:'var(--expo-theme-background-preview)'},n={default:'var(--expo-theme-text-default)',secondary:'var(--expo-theme-text-secondary)',tertiary:'var(--expo-theme-text-tertiary)',quaternary:'var(--expo-theme-text-quaternary)',link:'var(--expo-theme-text-link)',success:'var(--expo-theme-text-success)',warning:'var(--expo-theme-text-warning)',danger:'var(--expo-theme-text-danger)',info:'var(--expo-theme-text-info)',preview:'var(--expo-theme-text-preview)'},o={default:'var(--expo-theme-icon-default)',secondary:'var(--expo-theme-icon-secondary)',tertiary:'var(--expo-theme-icon-tertiary)',quaternary:'var(--expo-theme-icon-quaternary)',success:'var(--expo-theme-icon-success)',warning:'var(--expo-theme-icon-warning)',danger:'var(--expo-theme-icon-danger)',info:'var(--expo-theme-icon-info)',preview:'var(--expo-theme-icon-preview)'},x={default:'var(--expo-theme-border-default)',secondary:'var(--expo-theme-border-secondary)',success:'var(--expo-theme-border-success)',warning:'var(--expo-theme-border-warning)',danger:'var(--expo-theme-border-danger)',info:'var(--expo-theme-border-info)',preview:'var(--expo-theme-border-preview)'},p={none:'0',xs:'var(--expo-radius-xs)',sm:'var(--expo-radius-sm)',md:'var(--expo-radius-md)',lg:'var(--expo-radius-lg)',xl:'var(--expo-radius-xl)','2xl':'var(--expo-radius-2xl)','3xl':'var(--expo-radius-3xl)',full:'var(--expo-radius-full)'},c={none:'var(--expo-theme-shadows-none)',xs:'var(--expo-theme-shadows-xs)',sm:'var(--expo-theme-shadows-sm)',md:'var(--expo-theme-shadows-md)',lg:'var(--expo-theme-shadows-lg)',xl:'var(--expo-theme-shadows-xl)'},h={sans:'var(--expo-font-sans)',mono:'var(--expo-font-mono)'},l={'2xl':{fontSize:24,fontWeight:500,lineHeight:1.2,letterSpacing:'-0.5px'},xl:{fontSize:20,fontWeight:500,lineHeight:1.2,letterSpacing:'-0.25px'},lg:{fontSize:18,fontWeight:400,lineHeight:1.4,letterSpacing:'0'},base:{fontSize:16,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},sm:{fontSize:14,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},xs:{fontSize:12,fontWeight:400,lineHeight:1.6,letterSpacing:'0'},'2xs':{fontSize:10,fontWeight:500,lineHeight:1.6,letterSpacing:'0'}},s={'5xl':{fontSize:64,fontWeight:600,lineHeight:1.1,letterSpacing:'-3px'},'4xl':{fontSize:48,fontWeight:600,lineHeight:1.1,letterSpacing:'-2px'},'3xl':{fontSize:32,fontWeight:600,lineHeight:1.1,letterSpacing:'-0.5px'},'2xl':{fontSize:24,fontWeight:600,lineHeight:1.2,letterSpacing:'-0.5px'},xl:{fontSize:20,fontWeight:600,lineHeight:1.4,letterSpacing:'-0.25px'},lg:{fontSize:18,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},base:{fontSize:16,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},sm:{fontSize:14,fontWeight:600,lineHeight:1.4,letterSpacing:'0'},xs:{fontSize:12,fontWeight:600,lineHeight:1.6,letterSpacing:'0'}},u={bg:t,text:n,icon:o,border:x,radius:p,shadow:c,font:h,textSize:l,heading:s}},183,[]);
|
|
240
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";const e=["icon","label","variant","style","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ControlButton",{enumerable:!0,get:function(){return c}});var n,o=r(d[0]),t=(n=o)&&n.__esModule?n:{default:n},s=r(d[1]),l=r(d[2]),u=r(d[3]);const c=(0,l.forwardRef)(function(n,o){let{icon:c,label:f,variant:b="default",style:p,onMouseEnter:y,onMouseLeave:x,onMouseDown:M,onMouseUp:j}=n,v=(0,t.default)(n,e);const[h,_]=(0,l.useState)(!1),[w,O]=(0,l.useState)(!1),D='primary'===b,S=D?60:32,k={display:'flex',alignItems:'center',justifyContent:'center',width:S,height:S,borderRadius:u.radius.full,boxSizing:'border-box',border:D?'none':`1px solid ${u.border.default}`,backgroundColor:D?u.text.default:h?u.bg.element:'transparent',color:D?u.bg.default:u.icon.default,opacity:D&&h?.85:1,transition:'background-color 150ms ease, opacity 150ms ease, transform 100ms ease',transform:w?'scale(0.98)':void 0};return(0,s.jsxs)("button",Object.assign({ref:o,type:"button",onMouseEnter:e=>{_(!0),y?.(e)},onMouseLeave:e=>{_(!1),O(!1),x?.(e)},onMouseDown:e=>{O(!0),M?.(e)},onMouseUp:e=>{O(!1),j?.(e)},style:Object.assign({display:'flex',flexDirection:'column',alignItems:'center',gap:6,padding:0,border:'none',background:'none',cursor:'pointer',fontFamily:'inherit'},p)},v,{children:[(0,s.jsx)("span",{style:k,children:c}),(0,s.jsx)("span",{style:Object.assign({},u.textSize['2xs'],{color:u.text.secondary,textAlign:'center'}),children:f})]}))})},184,[131,151,38,183]);
|
|
241
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceListItem=function({name:c,version:f,unsupported:p=!1,usedByAgent:x=!1,selected:b=!1,onClick:h}){const[v,y]=(0,n.useState)(!1),[w,j]=(0,n.useState)(!1),R=(0,n.useRef)(null),S=(0,n.useRef)(null),W=(0,n.useRef)(null),k=(0,n.useRef)(null),C=(0,u.useCompactAgentDeviceStatus)({buttonRef:R,nameRef:S,statusLabelRef:W,versionRef:k}),M={display:'flex',justifyContent:'space-between',alignItems:'center',gap:16,width:'100%',maxWidth:'100%',minWidth:0,boxSizing:'border-box',padding:16,overflow:'hidden',border:'none',borderRadius:o.radius.xl,backgroundColor:b?o.bg.hover:v?o.bg.element:'transparent',cursor:'pointer',textAlign:'left',fontFamily:'inherit',transition:'background-color 150ms ease, transform 100ms ease',transform:w?'scale(0.98)':void 0};return(0,t.jsxs)("button",{ref:R,type:"button",style:M,onClick:h,"aria-pressed":b,"aria-label":`${c}, ${f}${x?', used by agent':''}`,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),j(!1)},onMouseDown:()=>j(!0),onMouseUp:()=>j(!1),children:[(0,t.jsxs)("span",{style:{display:'flex',alignItems:'center',gap:8,flex:'1 1 auto',minWidth:0,overflow:'hidden'},children:[p&&(0,t.jsx)("span",{role:"img","aria-label":"Unsupported or untested device",title:"This device type is unsupported or untested.",style:{display:'flex',flex:'0 0 auto',color:o.icon.warning},children:(0,t.jsx)(s.WarningIcon,{size:16})}),(0,t.jsx)("span",{ref:S,title:c,style:Object.assign({},o.textSize.sm,{minWidth:0,flex:'1 1 auto',fontWeight:500,color:o.text.default,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}),children:c}),(0,t.jsx)(l.AgentDeviceStatus,{active:x,compact:C,labelRef:W})]}),(0,t.jsx)("span",{ref:k,style:Object.assign({},o.textSize.sm,{fontWeight:500,color:o.text.secondary,whiteSpace:'nowrap',flexShrink:0}),children:f})]})};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5])},185,[151,38,186,183,187,188]);
|
|
242
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PlusIcon=function({size:t=18,color:n="currentColor",strokeWidth:s=1.5,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M12 5v14M5 12h14",stroke:n,strokeWidth:s,strokeLinecap:"round"})})},e.CloseIcon=function({size:t=18,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M18 6 6 18M6 6l12 12",stroke:n,strokeWidth:s,strokeLinecap:"round"})})},e.PhoneIcon=function({size:t=28,color:n="currentColor",strokeWidth:s=1.5,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("rect",{x:"6",y:"2",width:"12",height:"20",rx:"3",stroke:n,strokeWidth:s}),(0,o.jsx)("path",{d:"M10 18.5h4",stroke:n,strokeWidth:s,strokeLinecap:"round"})]})},e.RefreshIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.5,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M21 12a9 9 0 1 1-2.64-6.36M21 3v4.5h-4.5",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.HomeIcon=function({size:t=20,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M3 9.5 12 3l9 6.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1V9.5Z",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.BackIcon=function({size:t=18,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M19 12H5M12 19l-7-7 7-7",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.RecentsIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("rect",{x:"5",y:"5",width:"14",height:"14",rx:"2",stroke:n,strokeWidth:s})})},e.ThemeIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.5,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:n,strokeWidth:s}),(0,o.jsx)("path",{d:"M12 3a9 9 0 0 1 0 18Z",fill:n})]})},e.CameraIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.33,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("path",{d:"M3 8a2 2 0 0 1 2-2h1.5L8 4h8l1.5 2H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8Z",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("circle",{cx:"12",cy:"13",r:"3.25",stroke:n,strokeWidth:s})]})},e.DotsIcon=function({size:t=16,color:n="currentColor",style:s}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:n,style:s,children:[(0,o.jsx)("circle",{cx:"5",cy:"12",r:"1.5"}),(0,o.jsx)("circle",{cx:"12",cy:"12",r:"1.5"}),(0,o.jsx)("circle",{cx:"19",cy:"12",r:"1.5"})]})},e.SidebarIcon=function({size:t=20,color:n="currentColor",strokeWidth:s=1.5,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:n,strokeWidth:s}),(0,o.jsx)("path",{d:"M9 3v18",stroke:n,strokeWidth:s,strokeLinecap:"round"})]})},e.RotateIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("path",{d:"M21 12a9 9 0 1 1-3-6.7L21 8",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M21 3v5h-5",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})]})},e.PowerIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("path",{d:"M12 2v10",stroke:n,strokeWidth:s,strokeLinecap:"round"}),(0,o.jsx)("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:n,strokeWidth:s,strokeLinecap:"round"})]})},e.TrashIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=1.67,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6M10 11v6M14 11v6",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.SmartphoneIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=2,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2.5",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M12 18h.01",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})]})},e.WarningIcon=function({size:t=16,color:n="currentColor",strokeWidth:s=2,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",style:h,children:[(0,o.jsx)("path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M12 9v4M12 17h.01",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})]})},e.CheckIcon=function({size:t=17,color:n="currentColor",strokeWidth:s=2.5,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("polyline",{points:"20 6 9 17 4 12",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.ChevronDownIcon=function({size:t=14,color:n="currentColor",strokeWidth:s=2,style:h}){return(0,o.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:(0,o.jsx)("polyline",{points:"6 9 12 15 18 9",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})})},e.ChevronsUpDownIcon=function({size:t=14,color:n="currentColor",strokeWidth:s=2,style:h}){return(0,o.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:h,children:[(0,o.jsx)("polyline",{points:"7 15 12 20 17 15",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("polyline",{points:"7 9 12 4 17 9",stroke:n,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round"})]})};var o=r(d[0])},186,[151]);
|
|
243
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AgentDeviceStatus=function({active:l,compact:s=!1,labelRef:c}){return(0,t.jsxs)("span",{"aria-hidden":!l,"data-agent-device-status":l?'active':'inactive',style:Object.assign({display:'inline-flex',alignItems:'center',gap:s?0:5,flexShrink:0,visibility:l?'visible':'hidden',color:n.text.info},n.textSize['2xs']),children:[(0,t.jsx)("span",{"data-agent-device-badge":!0,style:{width:7,height:7,flexShrink:0,borderRadius:n.radius.full,backgroundColor:n.icon.info}}),(0,t.jsx)("span",{ref:c,"data-agent-device-label":!0,style:{display:'inline-block',maxWidth:s?0:void 0,overflow:'hidden',whiteSpace:'nowrap'},children:"Used by agent"})]})};var t=r(d[0]),n=r(d[1])},187,[151,183]);
|
|
244
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldCompactAgentDeviceStatus=c,e.useCompactAgentDeviceStatus=function({buttonRef:n,nameRef:o,statusLabelRef:s,versionRef:u}){const[l,f]=(0,t.useState)(!1);return(0,t.useLayoutEffect)(()=>{const t=n.current,l=o.current,b=s.current,v=u.current,h=t?.querySelector('[data-agent-device-badge]');if(!(t&&l&&b&&v&&h))return;const p=()=>{const n=window.getComputedStyle(t),o=t.clientWidth-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight);f(c({available:o,name:l.scrollWidth,version:v.scrollWidth,badge:h.offsetWidth,label:b.scrollWidth}))};let R=!1;p();const y=new ResizeObserver(p);return y.observe(t),document.fonts?.ready.then(()=>{R||p()}),()=>{R=!0,y.disconnect()}},[n,o,s,u]),l};var t=r(d[0]);const n=16,o=8,s=5;function c(t){return t.name+o+t.badge+s+t.label+n+t.version>t.available}},188,[38]);
|
|
245
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";const e=["children","className","containerClassName","overlayClassName"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.DialogRoot=function({children:e,open:l,onOpenChange:t}){return(0,s.jsx)(o.Root,{open:l,onOpenChange:t,children:e})},_e.DialogContent=function(l){let{children:t,className:u,containerClassName:h,overlayClassName:f}=l,p=(0,n.default)(l,e);return(0,s.jsx)(o.Portal,{children:(0,s.jsxs)(o.Overlay,{className:"dialog-overlay group absolute z-dialogOverlay-600",children:[(0,s.jsx)("div",{className:(0,x.cx)('fixed inset-0 bg-[#000000]/50','group-data-[state=open]:animate-fadeIn group-data-[state=closed]:animate-fadeOut',f)}),(0,s.jsx)("div",{className:"fixed top-0 left-0 z-dialogContent-601 flex h-dvh w-dvw items-center justify-center",children:(0,s.jsxs)(o.Content,Object.assign({className:(0,x.cx)('overflow-hidden rounded-lg shadow-md outline-0','data-[state=open]:animate-largeSlideUpAndFadeIn data-[state=closed]:animate-fadeOut',h)},p,{children:[(0,s.jsx)(c.VisuallyHidden,{asChild:!0,children:(0,s.jsx)(o.Description,{})}),(0,s.jsx)("div",{className:(0,x.cx)('w-[90vw] max-w-125 overflow-hidden rounded-lg border border-default bg-default text-default outline-0',u),children:t})]}))})]})})},_e.DialogTitle=function({title:e}){return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2.5 border-b border-b-default px-6 py-4",children:[(0,s.jsx)(o.Title,{asChild:!0,children:(0,s.jsx)("h2",{style:Object.assign({},u.heading.base,{margin:0}),children:e})}),(0,s.jsx)(f,{children:(0,s.jsx)("button",{type:"button","aria-label":"Close",className:"dialog-close-button",children:(0,s.jsx)(h.CloseIcon,{size:20})})})]})},_e.DialogContentContainer=function({children:e,className:l}){return(0,s.jsx)("div",{className:(0,x.cx)('flex max-h-[calc(90vh-69px-53px)] flex-col gap-1.5 overflow-y-auto p-6 pt-4 outline-0',l),children:e})},_e.DialogFooter=function({children:e}){return(0,s.jsx)("div",{className:"flex items-center justify-end gap-3 border-t border-t-default bg-subtle px-3 py-4 max-md:py-2",children:e})},_e.DialogClose=f;var l,t=r(d[0]),n=(l=t)&&l.__esModule?l:{default:l},s=r(d[1]),o=r(d[2]),c=r(d[3]),u=r(d[4]),x=r(d[5]),h=r(d[6]);function f({children:e}){return(0,s.jsx)(o.Close,{asChild:!0,children:e})}},189,[131,151,190,243,183,247,186]);
|
|
246
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeDialog"],t=["forceMount"],n=["__scopeDialog"],o=["forceMount"],s=["__scopeDialog","trapFocus","onOpenAutoFocus","onCloseAutoFocus"],c=["__scopeDialog"],u=["__scopeDialog"],l=["__scopeDialog"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Close",{enumerable:!0,get:function(){return re}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(_e,"Description",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(_e,"Dialog",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"DialogClose",{enumerable:!0,get:function(){return re}}),Object.defineProperty(_e,"DialogContent",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(_e,"DialogDescription",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(_e,"DialogOverlay",{enumerable:!0,get:function(){return q}}),Object.defineProperty(_e,"DialogPortal",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"DialogTitle",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(_e,"DialogTrigger",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"Overlay",{enumerable:!0,get:function(){return q}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"Title",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(_e,"Trigger",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"WarningProvider",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(_e,"createDialogScope",{enumerable:!0,get:function(){return N}});var d,f=r(_d[0]),p=(d=f)&&d.__esModule?d:{default:d},b=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),O=r(_d[2]),j=r(_d[3]),D=r(_d[4]),_=r(_d[5]),v=r(_d[6]),y=r(_d[7]),P=r(_d[8]),C=r(_d[9]),R=r(_d[10]),h=r(_d[11]),x=r(_d[12]),F=r(_d[13]),w=r(_d[14]),I=r(_d[15]),E=r(_d[16]),M="Dialog",[A,N]=(0,D.createContextScope)(M),[S,T]=A(M),k=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:s,onOpenChange:c,modal:u=!0}=e,l=b.useRef(null),d=b.useRef(null),[f,p]=(0,v.useControllableState)({prop:o,defaultProp:s??!1,onChange:c,caller:M});return(0,E.jsx)(S,{scope:t,triggerRef:l,contentRef:d,contentId:(0,_.useId)(),titleId:(0,_.useId)(),descriptionId:(0,_.useId)(),open:f,onOpenChange:p,onOpenToggle:b.useCallback(()=>p(e=>!e),[p]),modal:u,children:n})};k.displayName=M;var H="DialogTrigger",L=b.forwardRef((t,n)=>{const{__scopeDialog:o}=t,s=(0,p.default)(t,e),c=T(H,o),u=(0,j.useComposedRefs)(n,c.triggerRef);return(0,E.jsx)(h.Primitive.button,Object.assign({type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":ae(c.open)},s,{ref:u,onClick:(0,O.composeEventHandlers)(t.onClick,c.onOpenToggle)}))});L.displayName=H;var G="DialogPortal",[K,U]=A(G,{forceMount:void 0}),W=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:s}=e,c=T(G,t);return(0,E.jsx)(K,{scope:t,forceMount:n,children:b.Children.map(o,e=>(0,E.jsx)(R.Presence,{present:n||c.open,children:(0,E.jsx)(C.Portal,{asChild:!0,container:s,children:e})}))})};W.displayName=G;var Z="DialogOverlay",q=b.forwardRef((e,n)=>{const o=U(Z,e.__scopeDialog),{forceMount:s=o.forceMount}=e,c=(0,p.default)(e,t),u=T(Z,e.__scopeDialog);return u.modal?(0,E.jsx)(R.Presence,{present:s||u.open,children:(0,E.jsx)(B,Object.assign({},c,{ref:n}))}):null});q.displayName=Z;var z=(0,I.createSlot)("DialogOverlay.RemoveScroll"),B=b.forwardRef((e,t)=>{const{__scopeDialog:o}=e,s=(0,p.default)(e,n),c=T(Z,o),u=(0,y.useDismissableLayerSurface)(),l=(0,j.useComposedRefs)(t,u);return(0,E.jsx)(F.RemoveScroll,{as:z,allowPinchZoom:!0,shards:[c.contentRef],children:(0,E.jsx)(h.Primitive.div,Object.assign({"data-state":ae(c.open)},s,{ref:l,style:Object.assign({pointerEvents:"auto"},s.style)}))})}),J="DialogContent",Q=b.forwardRef((e,t)=>{const n=U(J,e.__scopeDialog),{forceMount:s=n.forceMount}=e,c=(0,p.default)(e,o),u=T(J,e.__scopeDialog);return(0,E.jsx)(R.Presence,{present:s||u.open,children:u.modal?(0,E.jsx)(V,Object.assign({},c,{ref:t})):(0,E.jsx)(X,Object.assign({},c,{ref:t}))})});Q.displayName=J;var V=b.forwardRef((e,t)=>{const n=T(J,e.__scopeDialog),o=b.useRef(null),s=(0,j.useComposedRefs)(t,n.contentRef,o);return b.useEffect(()=>{const e=o.current;if(e)return(0,w.hideOthers)(e)},[]),(0,E.jsx)(Y,Object.assign({},e,{ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:(0,O.composeEventHandlers)(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:(0,O.composeEventHandlers)(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,O.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault())}))}),X=b.forwardRef((e,t)=>{const n=T(J,e.__scopeDialog),o=b.useRef(!1),s=b.useRef(!1);return(0,E.jsx)(Y,Object.assign({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(o.current||n.triggerRef.current?.focus(),t.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(o.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));const c=t.target,u=n.triggerRef.current?.contains(c);u&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}}))}),Y=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:c,onCloseAutoFocus:u}=e,l=(0,p.default)(e,s),d=T(J,n);return(0,x.useFocusGuards)(),(0,E.jsx)(E.Fragment,{children:(0,E.jsx)(P.FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:c,onUnmountAutoFocus:u,children:(0,E.jsx)(y.DismissableLayer,Object.assign({role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":ae(d.open)},l,{ref:t,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)}))})})}),$="DialogTitle",ee=b.forwardRef((e,t)=>{const{__scopeDialog:n}=e,o=(0,p.default)(e,c),s=T($,n);return(0,E.jsx)(h.Primitive.h2,Object.assign({id:s.titleId},o,{ref:t}))});ee.displayName=$;var te="DialogDescription",ne=b.forwardRef((e,t)=>{const{__scopeDialog:n}=e,o=(0,p.default)(e,u),s=T(te,n);return(0,E.jsx)(h.Primitive.p,Object.assign({id:s.descriptionId},o,{ref:t}))});ne.displayName=te;var oe="DialogClose",re=b.forwardRef((e,t)=>{const{__scopeDialog:n}=e,o=(0,p.default)(e,l),s=T(oe,n);return(0,E.jsx)(h.Primitive.button,Object.assign({type:"button"},o,{ref:t,onClick:(0,O.composeEventHandlers)(e.onClick,()=>s.onOpenChange(!1))}))});re.displayName=oe;var ie=e=>e.children;function ae(e){return e?"open":"closed"}},190,[131,38,191,192,193,194,196,198,202,203,204,199,205,206,242,200,151]);
|
|
247
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"canUseDOM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"composeEventHandlers",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"getActiveElement",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"getOwnerDocument",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getOwnerWindow",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"isFrame",{enumerable:!0,get:function(){return f}});var n=!("undefined"==typeof window||!window.document||!window.document.createElement);function t(n,t,{checkForDefaultPrevented:o=!0}={}){return function(u){if(n?.(u),!1===o||!u||!u.defaultPrevented)return t?.(u)}}function o(t){if(!n)throw new Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}function u(t){if(!n)throw new Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}function c(n,t=!1){const{activeElement:o}=u(n);if(!o?.nodeName)return null;if(f(o)&&o.contentDocument)return c(o.contentDocument.body,t);if(t){const n=o.getAttribute("aria-activedescendant");if(n){const t=u(o).getElementById(n);if(t)return t}}return o}function f(n){return"IFRAME"===n.tagName}},191,[]);
|
|
248
|
+
__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"composeRefs",{enumerable:!0,get:function(){return n}}),Object.defineProperty(_e,"useComposedRefs",{enumerable:!0,get:function(){return u}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));function t(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return n=>{let u=!1;const o=e.map(e=>{const o=t(e,n);return u||"function"!=typeof o||(u=!0),o});if(u)return()=>{for(let n=0;n<o.length;n++){const u=o[n];"function"==typeof u?u():t(e[n],null)}}}}function u(...t){return e.useCallback(n(...t),t)}},192,[38]);
|
|
249
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children"],t=["scope","children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"createContext",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"createContextScope",{enumerable:!0,get:function(){return f}});var n,o=r(_d[0]),c=(n=o)&&n.__esModule?n:{default:n},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),s=r(_d[2]);function d(t,n){const o=u.createContext(n);o.displayName=t+"Context";const d=t=>{const{children:n}=t,d=(0,c.default)(t,e),f=u.useMemo(()=>d,Object.values(d));return(0,s.jsx)(o.Provider,{value:f,children:n})};return d.displayName=t+"Provider",[d,function(e,c={}){const{optional:s=!1}=c,d=u.useContext(o);if(d)return d;if(void 0!==n)return n;if(!s)throw new Error(`\`${e}\` must be used within \`${t}\``)}]}function f(e,n=[]){let o=[];const d=()=>{const t=o.map(e=>u.createContext(e));return function(n){const o=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:Object.assign({},n,{[e]:o})}),[n,o])}};return d.scopeName=e,[function(n,d){const f=u.createContext(d);f.displayName=n+"Context";const l=o.length;o=[...o,d];const p=n=>{const{scope:o,children:d}=n,p=(0,c.default)(n,t),b=o?.[e]?.[l]||f,v=u.useMemo(()=>p,Object.values(p));return(0,s.jsx)(b.Provider,{value:v,children:d})};return p.displayName=n+"Provider",[p,function(t,o,c={}){const{optional:s=!1}=c,p=o?.[e]?.[l]||f,b=u.useContext(p);if(b)return b;if(void 0!==d)return d;if(!s)throw new Error(`\`${t}\` must be used within \`${n}\``)}]},l(d,...n)]}function l(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:o})=>{const c=n(e)[`__scope${o}`];return Object.assign({},t,c)},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}},193,[131,38,151]);
|
|
250
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useId",{enumerable:!0,get:function(){return o}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=e[" useId ".trim().toString()]||(()=>{}),u=0;function o(o){const[c,f]=e.useState(n());return(0,t.useLayoutEffect)(()=>{o||f(e=>e??String(u++))},[o]),o||(c?`radix-${c}`:"")}},194,[38,195]);
|
|
251
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useLayoutEffect",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=globalThis?.document?e.useLayoutEffect:()=>{}},195,[38]);
|
|
252
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useControllableState",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"useControllableStateReducer",{enumerable:!0,get:function(){return f}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=e[" useInsertionEffect ".trim().toString()]||t.useLayoutEffect;function c({prop:t,defaultProp:n,onChange:o=()=>{},caller:c}){const[l,f,d]=u({defaultProp:n,onChange:o}),p=void 0!==t,b=p?t:l;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==p){const t=e?"controlled":"uncontrolled",n=p?"controlled":"uncontrolled";console.warn(`${c} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=p},[p,c])}return[b,e.useCallback(e=>{if(p){const n=s(e)?e(t):e;n!==t&&d.current?.(n)}else f(e)},[p,t,f,d])]}function u({defaultProp:t,onChange:n}){const[c,u]=e.useState(t),s=e.useRef(c),l=e.useRef(n);return o(()=>{l.current=n},[n]),e.useEffect(()=>{s.current!==c&&(l.current?.(c),s.current=c)},[c,s]),[c,u,l]}function s(e){return"function"==typeof e}var l=Symbol("RADIX:SYNC_STATE");function f(t,o,c,u){const{prop:s,defaultProp:f,onChange:d,caller:p}=o,b=void 0!==s,v=(0,n.useEffectEvent)(d);{const t=e.useRef(void 0!==s);e.useEffect(()=>{const e=t.current;if(e!==b){const t=e?"controlled":"uncontrolled",n=b?"controlled":"uncontrolled";console.warn(`${p} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=b},[b,p])}const h=[Object.assign({},c,{state:f})];u&&h.push(u);const[O,j]=e.useReducer((e,n)=>{if(n.type===l)return Object.assign({},e,{state:n.state});const o=t(e,n);return b&&!Object.is(o.state,e.state)&&v(o.state),o},...h),y=O.state,E=e.useRef(y);e.useEffect(()=>{E.current!==y&&(E.current=y,b||v(y))},[y,E,b]);const C=e.useMemo(()=>void 0!==s?Object.assign({},O,{state:s}):O,[O,s]);return e.useEffect(()=>{b&&!Object.is(s,O.state)&&j({type:l,state:s})},[s,O.state,b]),[C,j]}},196,[38,195,197]);
|
|
253
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useEffectEvent",{enumerable:!0,get:function(){return o}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=t[" useEffectEvent ".trim().toString()],u=t[" useInsertionEffect ".trim().toString()];function o(o){if("function"==typeof n)return n(o);const f=t.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return"function"==typeof u?u(()=>{f.current=o}):(0,e.useLayoutEffect)(()=>{f.current=o}),t.useMemo(()=>(...e)=>f.current?.(...e),[])}},197,[195,38]);
|
|
254
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["disableOutsidePointerEvents","deferPointerDownOutside","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Branch",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"DismissableLayer",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"DismissableLayerBranch",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"useDismissableLayerSurface",{enumerable:!0,get:function(){return w}});var t,n,s=r(_d[0]),o=(t=s)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),d=r(_d[3]),l=r(_d[4]),f=r(_d[5]),v=r(_d[6]),b="dismissableLayer.update",E=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),p=u.forwardRef((t,s)=>{const{disableOutsidePointerEvents:p=!1,deferPointerDownOutside:y=!1,onEscapeKeyDown:w,onPointerDownOutside:O,onFocusOutside:L,onInteractOutside:C,onDismiss:R}=t,k=(0,o.default)(t,e),S=u.useContext(E),[j,x]=u.useState(null),B=j?.ownerDocument??globalThis?.document,[,W]=u.useState({}),_=(0,l.useComposedRefs)(s,x),F=Array.from(S.layers),[T]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),H=T?F.indexOf(T):-1,M=j?F.indexOf(j):-1,N=S.layersWithOutsidePointerEventsDisabled.size>0,z=M>=H,A=u.useRef(!1),I=D(e=>{O?.(e),C?.(e),e.defaultPrevented||R?.()},{ownerDocument:B,deferPointerDownOutside:y,isDeferredPointerDownOutsideRef:A,dismissableSurfaces:S.dismissableSurfaces,shouldHandlePointerDownOutside:u.useCallback(e=>{if(!(e instanceof Node))return!1;const t=[...S.branches].some(t=>t.contains(e));return z&&!t},[S.branches,z])}),K=P(e=>{if(y&&A.current)return;const t=e.target;[...S.branches].some(e=>e.contains(t))||(L?.(e),C?.(e),e.defaultPrevented||R?.())},B),q=!!j&&M===F.length-1,G=(0,f.useCallbackRef)(e=>{"Escape"===e.key&&(w?.(e),!e.defaultPrevented&&R&&(e.preventDefault(),R()))});return u.useEffect(()=>{if(q)return B.addEventListener("keydown",G,{capture:!0}),()=>B.removeEventListener("keydown",G,{capture:!0})},[B,q,G]),u.useEffect(()=>{if(j)return p&&(0===S.layersWithOutsidePointerEventsDisabled.size&&(n=B.body.style.pointerEvents,B.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(j)),S.layers.add(j),h(),()=>{p&&(S.layersWithOutsidePointerEventsDisabled.delete(j),0===S.layersWithOutsidePointerEventsDisabled.size&&(B.body.style.pointerEvents=n))}},[j,B,p,S]),u.useEffect(()=>()=>{j&&(S.layers.delete(j),S.layersWithOutsidePointerEventsDisabled.delete(j),h())},[j,S]),u.useEffect(()=>{const e=()=>W({});return document.addEventListener(b,e),()=>document.removeEventListener(b,e)},[]),(0,v.jsx)(d.Primitive.div,Object.assign({},k,{ref:_,style:Object.assign({pointerEvents:N?z?"auto":"none":void 0},t.style),onFocusCapture:(0,c.composeEventHandlers)(t.onFocusCapture,K.onFocusCapture),onBlurCapture:(0,c.composeEventHandlers)(t.onBlurCapture,K.onBlurCapture),onPointerDownCapture:(0,c.composeEventHandlers)(t.onPointerDownCapture,I.onPointerDownCapture)}))});p.displayName="DismissableLayer";var y=u.forwardRef((e,t)=>{const n=u.useContext(E),s=u.useRef(null),o=(0,l.useComposedRefs)(t,s);return u.useEffect(()=>{const e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,v.jsx)(d.Primitive.div,Object.assign({},e,{ref:o}))});function w(){const e=u.useContext(E),[t,n]=u.useState(null);return u.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}y.displayName="DismissableLayerBranch";var O=()=>!0;function D(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=O}=t,l=(0,f.useCallbackRef)(e),v=u.useRef(!1),b=u.useRef(!1),E=u.useRef(new Map),p=u.useRef(()=>{});return u.useEffect(()=>{function e(){b.current=!1,o.current=!1,E.current.clear()}function t(e){if(!b.current)return;const t=e.target;t instanceof Node&&[...c].some(e=>e.contains(t))||E.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{b.current&&p.current()},0)}function u(e){b.current&&E.current.set(e.type,!1)}const f=t=>{if(t.target&&!v.current){let u=function(){n.removeEventListener("click",p.current);const t=Array.from(E.current.values()).some(Boolean);e(),t||L("dismissableLayer.pointerDownOutside",l,c,{discrete:!0})};if(!d(t.target))return n.removeEventListener("click",p.current),e(),void(v.current=!1);const c={originalEvent:t};b.current=!0,o.current=s&&0===t.button,E.current.clear(),s&&0===t.button?(n.removeEventListener("click",p.current),p.current=u,n.addEventListener("click",p.current,{once:!0})):u()}else n.removeEventListener("click",p.current),e();v.current=!1},y=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const e of y)n.addEventListener(e,t,!0),n.addEventListener(e,u);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",f),n.removeEventListener("click",p.current);for(const e of y)n.removeEventListener(e,t,!0),n.removeEventListener(e,u)}},[n,l,s,o,c,d]),{onPointerDownCapture:()=>v.current=!0}}function P(e,t=globalThis?.document){const n=(0,f.useCallbackRef)(e),s=u.useRef(!1);return u.useEffect(()=>{const e=e=>{if(e.target&&!s.current){L("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function h(){const e=new CustomEvent(b);document.dispatchEvent(e)}function L(e,t,n,{discrete:s}){const o=n.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?(0,d.dispatchDiscreteCustomEvent)(o,u):o.dispatchEvent(u)}var C=p,R=y},198,[131,38,191,199,192,201,151]);
|
|
255
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["asChild"];function t(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Primitive",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"dispatchDiscreteCustomEvent",{enumerable:!0,get:function(){return b}});var n,u=r(_d[0]),o=(n=u)&&n.__esModule?n:{default:n},c=t(r(_d[1])),f=t(r(_d[2])),s=r(_d[3]),d=r(_d[4]),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const u=(0,s.createSlot)(`Primitive.${n}`),f=c.forwardRef((t,c)=>{const{asChild:f}=t,s=(0,o.default)(t,e),l=f?u:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,d.jsx)(l,Object.assign({},s,{ref:c}))});return f.displayName=`Primitive.${n}`,Object.assign({},t,{[n]:f})},{});function b(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}var p=l},199,[131,38,40,200,151]);
|
|
256
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"Slot",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"Slottable",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"createSlot",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"createSlottable",{enumerable:!0,get:function(){return u}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]);function s(t){const n=l.forwardRef((n,s)=>{let{children:d}=n,u=(0,o.default)(n,e),f=null,_=!1;const E=[];j(d)&&"function"==typeof S&&(d=S(d._payload)),l.Children.forEach(d,e=>{if(t=e,l.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){_=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;j(n)&&"function"==typeof S&&(n=S(n._payload)),f=b(t,n),E.push(f?.props?.children)}else E.push(e);var t}),f?f=l.cloneElement(f,void 0,E):!_&&1===l.Children.count(d)&&l.isValidElement(d)&&(f=d);const P=f?h(f):void 0,R=(0,c.useComposedRefs)(s,P);if(!f){if(d||0===d)throw new Error(_?v(t):O(t));return d}const $=y(u,f.props??{});return f.type!==l.Fragment&&($.ref=s?R:P),l.cloneElement(f,$)});return n.displayName=`${t}.Slot`,n}var d=s("Slot"),p=Symbol.for("radix.slottable");function u(e){const t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=p,t}var f=u("Slottable"),b=(e,t)=>{if("child"in e.props){const t=e.props.child;return l.isValidElement(t)?l.cloneElement(t,void 0,e.props.children(t.props.children)):null}return l.isValidElement(t)?t:null};function y(e,t){const n=Object.assign({},t);for(const o in t){const l=e[o],c=t[o];/^on[A-Z]/.test(o)?l&&c?n[o]=(...e)=>{const t=c(...e);return l(...e),t}:l&&(n[o]=l):"style"===o?n[o]=Object.assign({},l,c):"className"===o&&(n[o]=[l,c].filter(Boolean).join(" "))}return Object.assign({},e,n)}function h(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _=Symbol.for("react.lazy");function j(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===_&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}var O=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,v=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,S=l[" use ".trim().toString()]},200,[131,38,192]);
|
|
257
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useCallbackRef",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));function t(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}},201,[38]);
|
|
258
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FocusScope",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return C}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),s=r(_d[3]),d=r(_d[4]),f=r(_d[5]),l="focusScope.autoFocusOnMount",p="focusScope.autoFocusOnUnmount",v={bubbles:!1,cancelable:!0},b=u.forwardRef((t,n)=>{const{loop:b=!1,trapped:F=!1,onMountAutoFocus:S,onUnmountAutoFocus:L}=t,O=(0,o.default)(t,e),[C,P]=u.useState(null),_=(0,d.useCallbackRef)(S),k=(0,d.useCallbackRef)(L),R=u.useRef(null),I=(0,c.useComposedRefs)(n,P),M=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(F){let e=function(e){if(M.paused||!C)return;const t=e.target;C.contains(t)?R.current=t:T(R.current,{select:!0})},t=function(e){if(M.paused||!C)return;const t=e.relatedTarget;null!==t&&(C.contains(t)||T(R.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&T(C)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return C&&o.observe(C,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}},[F,C,M.paused]),u.useEffect(()=>{if(C){N.add(M);const e=document.activeElement;if(!C.contains(e)){const t=new CustomEvent(l,v);C.addEventListener(l,_),C.dispatchEvent(t),t.defaultPrevented||(E(h(C).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&T(C))}return()=>{C.removeEventListener(l,_),setTimeout(()=>{const t=new CustomEvent(p,v);C.addEventListener(p,k),C.dispatchEvent(t),t.defaultPrevented||T(e??document.body,{select:!0}),C.removeEventListener(p,k),N.remove(M)},0)}}},[C,_,k,M]);const j=u.useCallback(e=>{if(!b&&!F)return;if(M.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,u]=y(t);o&&u?e.shiftKey||n!==u?e.shiftKey&&n===o&&(e.preventDefault(),b&&T(u,{select:!0})):(e.preventDefault(),b&&T(o,{select:!0})):n===t&&e.preventDefault()}},[b,F,M.paused]);return(0,f.jsx)(s.Primitive.div,Object.assign({tabIndex:-1},O,{ref:I,onKeyDown:j}))});function E(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(T(o,{select:t}),document.activeElement!==n)return}function y(e){const t=h(e);return[F(t,e),F(t.reverse(),e)]}function h(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F(e,t){const n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(const o of e){if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):S(o,{upTo:t})))return o}}function S(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function L(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&L(e)&&t&&e.select()}}b.displayName="FocusScope";var N=(function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=O(e,t),e.unshift(t)},remove(t){e=O(e,t),e[0]?.resume()}}})();function O(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}var C=b},202,[131,38,192,199,201,151]);
|
|
259
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["container"];function t(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return y}});var n,o=r(_d[0]),u=(n=o)&&n.__esModule?n:{default:n},c=t(r(_d[1])),f=t(r(_d[2])),l=r(_d[3]),s=r(_d[4]),d=r(_d[5]),b=c.forwardRef((t,n)=>{const{container:o}=t,b=(0,u.default)(t,e),[y,P]=c.useState(!1);(0,s.useLayoutEffect)(()=>P(!0),[]);const j=o||y&&globalThis?.document?.body;return j?f.createPortal((0,d.jsx)(l.Primitive.div,Object.assign({},b,{ref:n})),j):null});b.displayName="Portal";var y=b},203,[131,38,40,199,195,151]);
|
|
260
|
+
__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Presence",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return l}});var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),n=r(_d[1]);function t(n,t){return e.useReducer((e,n)=>t[e][n]??e,n)}var u=n=>{const{present:t,children:u}=n,i=o(t),s="function"==typeof u?u({present:i.isPresent}):e.Children.only(u),l=c(i.ref,f(s));return"function"==typeof u||i.isPresent?e.cloneElement(s,{ref:l}):null};function o(u){const[o,i]=e.useState(),c=e.useRef(null),f=e.useRef(u),l=e.useRef("none"),d=e.useRef(void 0),p=u?"mounted":"unmounted",[N,O]=t(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{"mounted"===N?(l.current=d.current??s(c.current),d.current=void 0):l.current="none"},[N]),(0,n.useLayoutEffect)(()=>{const e=c.current,n=f.current;if(n!==u){const t=l.current,o=s(e);if(u)d.current=o,O("MOUNT");else if("none"===o||"none"===e?.display)O("UNMOUNT");else{O(n&&t!==o?"ANIMATION_OUT":"UNMOUNT")}f.current=u}},[u,O]),(0,n.useLayoutEffect)(()=>{if(o){let e;const n=o.ownerDocument.defaultView??window,t=t=>{const u=s(c.current).includes(CSS.escape(t.animationName));if(t.target===o&&u&&(O("ANIMATION_END"),!f.current)){const t=o.style.animationFillMode;o.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=t)})}},u=e=>{e.target===o&&(l.current=s(c.current))};return o.addEventListener("animationstart",u),o.addEventListener("animationcancel",t),o.addEventListener("animationend",t),()=>{n.clearTimeout(e),o.removeEventListener("animationstart",u),o.removeEventListener("animationcancel",t),o.removeEventListener("animationend",t)}}O("ANIMATION_END")},[o,O]),{isPresent:["mounted","unmountSuspended"].includes(N),ref:e.useCallback(e=>{if(e){const n=getComputedStyle(e);c.current=n,d.current=s(n)}else c.current=null;i(e)},[])}}function i(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function c(...n){const t=e.useRef(n);return t.current=n,e.useCallback(e=>{const n=t.current;let u=!1;const o=n.map(n=>{const t=i(n,e);return u||"function"!=typeof t||(u=!0),t});if(u)return()=>{for(let e=0;e<o.length;e++){const t=o[e];"function"==typeof t?t():i(n[e],null)}}},[])}function s(e){return e?.animationName||"none"}function f(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}u.displayName="Presence";var l=u},204,[38,195]);
|
|
261
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FocusGuards",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"useFocusGuards",{enumerable:!0,get:function(){return u}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=0,n=null;function o(e){return u(),e.children}function u(){e.useEffect(()=>{n||(n={start:c(),end:c()});const{start:e,end:o}=n;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==o&&document.body.insertAdjacentElement("beforeend",o),t++,()=>{1===t&&(n?.start.remove(),n?.end.remove(),n=null),t=Math.max(0,t-1)}},[])}function c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},205,[38]);
|
|
262
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"RemoveScroll",{enumerable:!0,get:function(){return u.default}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},206,[207]);
|
|
263
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),u=r(_d[2]),o=r(_d[3]),c=(e=o)&&e.__esModule?e:{default:e},f=n.forwardRef(function(e,o){return n.createElement(u.RemoveScroll,(0,t.__assign)({},e,{ref:o,sideCar:c.default}))});f.classNames=u.RemoveScroll.classNames;var l=f},207,[208,38,209,230]);
|
|
264
|
+
__d(function(_g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return G}}),_e.__extends=t,Object.defineProperty(_e,"__assign",{enumerable:!0,get:function(){return r}}),_e.__rest=n,_e.__decorate=o,_e.__param=a,_e.__esDecorate=i,_e.__runInitializers=c,_e.__propKey=u,_e.__setFunctionName=s,_e.__metadata=f,_e.__awaiter=l,_e.__generator=p,Object.defineProperty(_e,"__createBinding",{enumerable:!0,get:function(){return y}}),_e.__exportStar=_,_e.__values=d,_e.__read=h,_e.__spread=b,_e.__spreadArrays=v,_e.__spreadArray=w,_e.__await=m,_e.__asyncGenerator=g,_e.__asyncDelegator=O,_e.__asyncValues=j,_e.__makeTemplateObject=P,_e.__importStar=x,_e.__importDefault=T,_e.__classPrivateFieldGet=I,_e.__classPrivateFieldSet=D,_e.__classPrivateFieldIn=R,_e.__addDisposableResource=k,_e.__disposeResources=F,_e.__rewriteRelativeImportExtension=C;var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function o(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function a(e,t){return function(r,n){t(r,n,e)}}function i(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=n.kind,s="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var _={};for(var d in n)_[d]="access"===d?{}:n[d];for(var d in n.access)_.access[d]=n.access[d];_.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var h=(0,r[y])("accessor"===u?{get:l.get,set:l.set}:l[s],_);if("accessor"===u){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(c=i(h.get))&&(l.get=c),(c=i(h.set))&&(l.set=c),(c=i(h.init))&&o.unshift(c)}else(c=i(h))&&("field"===u?o.unshift(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function c(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function u(e){return"symbol"==typeof e?e:"".concat(e)}function s(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function c(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}u((n=n.apply(e,t||[])).next())})}function p(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(t){return u([e,t])}}function u(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var y=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function _(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,c=a.length;i<c;i++,o++)n[o]=a[i];return n}function w(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function g(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",function(e){return function(t){return Promise.resolve(t).then(e,s)}}),n[Symbol.asyncIterator]=function(){return this},n;function i(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||c(e,t)})},t&&(n[e]=t(n[e])))}function c(e,t){try{(r=o[e](t)).value instanceof m?Promise.resolve(r.value.v).then(u,s):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function u(e){c("next",e)}function s(e){c("throw",e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:m(e[n](t)),done:!1}:o?o(t):t}:o}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,a){o(n,a,(t=e[r](t)).done,t.value)})}}function o(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},E=function(e){return E=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},E(e)};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=E(e),n=0;n<r.length;n++)"default"!==r[n]&&y(t,e,r[n]);return S(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function R(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function k(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function F(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return(function o(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error})()}function C(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,o,a){return r?t?".jsx":".js":!n||o&&a?n+o+"."+a.toLowerCase()+"js":e}):e}var G={__extends:t,__assign:r,__rest:n,__decorate:o,__param:a,__esDecorate:i,__runInitializers:c,__propKey:u,__setFunctionName:s,__metadata:f,__awaiter:l,__generator:p,__createBinding:y,__exportStar:_,__values:d,__read:h,__spread:b,__spreadArrays:v,__spreadArray:w,__await:m,__asyncGenerator:g,__asyncDelegator:O,__asyncValues:j,__makeTemplateObject:P,__importStar:x,__importDefault:T,__classPrivateFieldGet:I,__classPrivateFieldSet:D,__classPrivateFieldIn:R,__addDisposableResource:k,__disposeResources:F,__rewriteRelativeImportExtension:C}},208,[]);
|
|
265
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"RemoveScroll",{enumerable:!0,get:function(){return c}});var e=r(_d[0]),o=(function(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),o.default=e,o})(r(_d[1])),n=r(_d[2]),l=r(_d[3]),t=r(_d[4]),s=function(){},c=o.forwardRef(function(n,c){var u=o.useRef(null),d=o.useState({onScrollCapture:s,onWheelCapture:s,onTouchMoveCapture:s}),f=d[0],_=d[1],h=n.forwardProps,v=n.children,p=n.className,b=n.removeScrollBar,C=n.enabled,P=n.shards,R=n.sideCar,w=n.noRelative,M=n.noIsolation,S=n.inert,y=n.allowPinchZoom,N=n.as,O=void 0===N?'div':N,j=n.gapMode,E=(0,e.__rest)(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=R,k=(0,l.useMergeRefs)([u,c]),I=(0,e.__assign)((0,e.__assign)({},E),f);return o.createElement(o.Fragment,null,C&&o.createElement(B,{sideCar:t.effectCar,removeScrollBar:b,shards:P,noRelative:w,noIsolation:M,inert:S,setCallbacks:_,allowPinchZoom:!!y,lockRef:u,gapMode:j}),h?o.cloneElement(o.Children.only(v),(0,e.__assign)((0,e.__assign)({},I),{ref:k})):o.createElement(O,(0,e.__assign)({},I,{className:p,ref:k}),v))});c.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},c.classNames={fullWidth:n.fullWidthClassName,zeroRight:n.zeroRightClassName}},209,[208,38,210,211,220]);
|
|
266
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"zeroRightClassName",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"fullWidthClassName",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"noScrollbarsClassName",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"removedBarSizeVariable",{enumerable:!0,get:function(){return l}});var t='right-scroll-bar-position',n='width-before-scroll-bar',o='with-scroll-bars-hidden',l='--removed-body-scroll-bar-size'},210,[]);
|
|
267
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"assignRef",{enumerable:!0,get:function(){return n.assignRef}}),Object.defineProperty(e,"useCallbackRef",{enumerable:!0,get:function(){return t.useCallbackRef}}),Object.defineProperty(e,"createCallbackRef",{enumerable:!0,get:function(){return f.createCallbackRef}}),Object.defineProperty(e,"mergeRefs",{enumerable:!0,get:function(){return u.mergeRefs}}),Object.defineProperty(e,"useMergeRefs",{enumerable:!0,get:function(){return c.useMergeRefs}}),Object.defineProperty(e,"useTransformRef",{enumerable:!0,get:function(){return o.useTransformRef}}),Object.defineProperty(e,"transformRef",{enumerable:!0,get:function(){return b.transformRef}}),Object.defineProperty(e,"refToCallback",{enumerable:!0,get:function(){return l.refToCallback}}),Object.defineProperty(e,"useRefToCallback",{enumerable:!0,get:function(){return l.useRefToCallback}});var n=r(d[0]),t=r(d[1]),f=r(d[2]),u=r(d[3]),c=r(d[4]),o=r(d[5]),b=r(d[6]),l=r(d[7])},211,[212,213,214,215,216,217,218,219]);
|
|
268
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.assignRef=function(n,t){'function'==typeof n?n(t):n&&(n.current=t);return n}},212,[]);
|
|
269
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useCallbackRef=function(c,t){var l=(0,u.useState)(function(){return{value:c,callback:t,facade:{get current(){return l.value},set current(u){var c=l.value;c!==u&&(l.value=u,l.callback(u,c))}}}})[0];return l.callback=t,l.facade};var u=r(d[0])},213,[38]);
|
|
270
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createCallbackRef=function(t){var n=null;return{get current(){return n},set current(u){var c=n;c!==u&&(n=u,t(u,c))}}}},214,[]);
|
|
271
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.mergeRefs=function(u){return(0,t.createCallbackRef)(function(t){return u.forEach(function(u){return(0,n.assignRef)(u,t)})})};var n=r(d[0]),t=r(d[1])},215,[212,214]);
|
|
272
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useMergeRefs=function(e,c){var o=(0,t.useCallbackRef)(c||null,function(t){return e.forEach(function(e){return(0,n.assignRef)(e,t)})});return u(function(){var t=f.get(o);if(t){var u=new Set(t),c=new Set(e),s=o.current;u.forEach(function(e){c.has(e)||(0,n.assignRef)(e,null)}),c.forEach(function(e){u.has(e)||(0,n.assignRef)(e,s)})}f.set(o,e)},[e]),o};var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),n=r(_d[1]),t=r(_d[2]),u='undefined'!=typeof window?e.useLayoutEffect:e.useEffect,f=new WeakMap},216,[38,212,213]);
|
|
273
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useTransformRef=function(t,f){return(0,u.useCallbackRef)(null,function(u){return(0,n.assignRef)(t,f(u))})};var n=r(d[0]),u=r(d[1])},217,[212,213]);
|
|
274
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.transformRef=function(f,u){return(0,t.createCallbackRef)(function(t){return(0,n.assignRef)(f,u(t))})};var n=r(d[0]),t=r(d[1])},218,[212,214]);
|
|
275
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function n(n){return function(t){'function'==typeof n?n(t):n&&(n.current=t)}}Object.defineProperty(e,'__esModule',{value:!0}),e.refToCallback=n,e.useRefToCallback=function(n){return c(n)};var t=function(){return null},u=new WeakMap,c=function(c){var f=c||t,o=u.get(f);if(o)return o;var l=n(f);return u.set(f,l),l}},219,[]);
|
|
276
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"effectCar",{enumerable:!0,get:function(){return t}});var t=(0,r(d[0]).createSidecarMedium)()},220,[221]);
|
|
277
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"sidecar",{enumerable:!0,get:function(){return t.sidecar}}),Object.defineProperty(e,"useSidecar",{enumerable:!0,get:function(){return n.useSidecar}}),Object.defineProperty(e,"setConfig",{enumerable:!0,get:function(){return u.setConfig}}),Object.defineProperty(e,"createMedium",{enumerable:!0,get:function(){return c.createMedium}}),Object.defineProperty(e,"createSidecarMedium",{enumerable:!0,get:function(){return c.createSidecarMedium}}),Object.defineProperty(e,"renderCar",{enumerable:!0,get:function(){return o.renderCar}}),Object.defineProperty(e,"exportSidecar",{enumerable:!0,get:function(){return f.exportSidecar}});var t=r(d[0]),n=r(d[1]),u=r(d[2]),c=r(d[3]),o=r(d[4]),f=r(d[5])},221,[222,223,226,227,228,229]);
|
|
278
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.sidecar=function(u,c){var o=function(){return c};return function(f){var s=(0,n.useSidecar)(u,f.sideCar),d=s[0];return s[1]&&c?o:d?t.createElement(d,(0,e.__assign)({},f)):null}};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2])},222,[208,38,223]);
|
|
279
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useSidecar=function(e,t){var c=t&&t.options||o;if(n.env.isNode&&!c.ssr)return[null,null];return u(e,t)};var e=r(d[0]),n=r(d[1]),t=new WeakMap,o={};function u(u,c){var s=c&&c.options||o,f=n.env.forceCache||n.env.isNode&&!!s.ssr||!s.async,l=(0,e.useState)(f?function(){return t.get(u)}:void 0),v=l[0],w=l[1],S=(0,e.useState)(null),p=S[0],h=S[1];return(0,e.useEffect)(function(){v||u().then(function(e){var n,o=c?c.read():e.default||e;if(!o)throw console.error('Sidecar error: with importer',u),c?(console.error('Sidecar error: with medium',c),n=new Error('Sidecar medium was not found')):n=new Error('Sidecar was not found in exports'),h(function(){return n}),n;t.set(u,o),w(function(){return o})},function(e){return h(function(){return e})})},[]),[v,p]}},223,[38,224]);
|
|
280
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"env",{enumerable:!0,get:function(){return t}});var t={isNode:r(d[0]).isNode,forceCache:!1}},224,[225]);
|
|
281
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return t}});const t=!1},225,[]);
|
|
282
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"config",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"setConfig",{enumerable:!0,get:function(){return n}});var e={onError:function(e){return console.error(e)}},n=function(n){Object.assign(e,n)}},226,[]);
|
|
283
|
+
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createMedium=function(n,o){void 0===o&&(o=u);return t(n,o)},e.createSidecarMedium=function(u){void 0===u&&(u={});var o=t(null);return o.options=(0,n.__assign)({async:!0,ssr:!1},u),o};var n=r(d[0]);function u(n){return n}function t(n,t){void 0===t&&(t=u);var o=[],c=!1;return{read:function(){if(c)throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');return o.length?o[o.length-1]:n},useMedium:function(n){var u=t(n,c);return o.push(u),function(){o=o.filter(function(n){return n!==u})}},assignSyncMedium:function(n){for(c=!0;o.length;){var u=o;o=[],u.forEach(n)}o={push:function(u){return n(u)},filter:function(){return o}}},assignMedium:function(n){c=!0;var u=[];if(o.length){var t=o;o=[],t.forEach(n),u=o}var f=function(){var t=u;u=[],t.forEach(n)},a=function(){return Promise.resolve().then(f)};a(),o={push:function(n){u.push(n),a()},filter:function(n){return u=u.filter(n),o}}}}}},227,[208]);
|
|
284
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.renderCar=function(u,c){function f(c){var f=c.stateRef,o=c.props,l=(0,t.useCallback)(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,t.useLayoutEffect)(function(){f.current(e)}),null},[]);return n.createElement(u,(0,e.__assign)({},o,{children:l}))}var o=n.memo(function(e){var n=e.stateRef,u=e.defaultState,c=e.children,f=(0,t.useState)(u.current),o=f[0],l=f[1];return(0,t.useEffect)(function(){n.current=l},[]),c.apply(void 0,o)},function(){return!0});return function(e){var t=n.useRef(c(e)),u=n.useRef(function(e){return t.current=e});return n.createElement(n.Fragment,null,n.createElement(f,{stateRef:u,props:e}),n.createElement(o,{stateRef:u,defaultState:t,children:e.children}))}};var e=r(_d[0]),t=r(_d[1]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(t)},228,[208,38]);
|
|
285
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.exportSidecar=function(e,t){return e.useMedium(t),n};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=function(n){var o=n.sideCar,u=(0,e.__rest)(n,["sideCar"]);if(!o)throw new Error('Sidecar: please provide `sideCar` property to import the right car');var c=o.read();if(!c)throw new Error('Sidecar medium not found');return t.createElement(c,(0,e.__assign)({},u))};n.isSideCarExport=!0},229,[208,38]);
|
|
286
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});var t=r(d[0]),c=r(d[1]),n=r(d[2]),o=(0,t.exportSidecar)(n.effectCar,c.RemoveScrollSideCar)},230,[221,231,220]);
|
|
287
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"getTouchXY",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"getDeltaXY",{enumerable:!0,get:function(){return s}}),_e.RemoveScrollSideCar=function(y){var k=t.useRef([]),E=t.useRef([0,0]),P=t.useRef(),w=t.useState(h++)[0],C=t.useState(o.styleSingleton)[0],R=t.useRef(y);t.useEffect(function(){R.current=y},[y]),t.useEffect(function(){if(y.inert){document.body.classList.add("block-interactivity-".concat(w));var t=(0,e.__spreadArray)([y.lockRef.current],(y.shards||[]).map(f),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(w))}),function(){document.body.classList.remove("block-interactivity-".concat(w)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(w))})}}},[y.inert,y.lockRef.current,y.shards]);var S=t.useCallback(function(e,t){if('touches'in e&&2===e.touches.length||'wheel'===e.type&&e.ctrlKey)return!R.current.allowPinchZoom;var n,o=l(e),c=E.current,s='deltaX'in e?e.deltaX:c[0]-o[0],f='deltaY'in e?e.deltaY:c[1]-o[1],d=e.target,v=Math.abs(s)>Math.abs(f)?'h':'v';if('touches'in e&&'h'===v&&'range'===d.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(!!p&&(p===d||p.contains(d)))return!1;var b=(0,u.locationCouldBeScrolled)(v,d);if(!b)return!0;if(b?n=v:(n='v'===v?'h':'v',b=(0,u.locationCouldBeScrolled)(v,d)),!b)return!1;if(!P.current&&'changedTouches'in e&&(s||f)&&(P.current=n),!n)return!0;var y=P.current||n;return(0,u.handleScroll)(y,t,e,'h'===y?s:f,!0)},[]),L=t.useCallback(function(e){var t=e;if(p.length&&p[p.length-1]===C){var n='deltaY'in t?s(t):l(t),o=k.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&d(e.delta,n)})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var c=(R.current.shards||[]).map(f).filter(Boolean).filter(function(e){return e.contains(t.target)});(c.length>0?S(t,c[0]):!R.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),_=t.useCallback(function(e,t,n,o){var c={name:e,delta:t,target:n,should:o,shadowParent:b(n)};k.current.push(c),setTimeout(function(){k.current=k.current.filter(function(e){return e!==c})},1)},[]),M=t.useCallback(function(e){E.current=l(e),P.current=void 0},[]),O=t.useCallback(function(e){_(e.type,s(e),e.target,S(e,y.lockRef.current))},[]),T=t.useCallback(function(e){_(e.type,l(e),e.target,S(e,y.lockRef.current))},[]);t.useEffect(function(){return p.push(C),y.setCallbacks({onScrollCapture:O,onWheelCapture:O,onTouchMoveCapture:T}),document.addEventListener('wheel',L,c.nonPassive),document.addEventListener('touchmove',L,c.nonPassive),document.addEventListener('touchstart',M,c.nonPassive),function(){p=p.filter(function(e){return e!==C}),document.removeEventListener('wheel',L,c.nonPassive),document.removeEventListener('touchmove',L,c.nonPassive),document.removeEventListener('touchstart',M,c.nonPassive)}},[]);var Y=y.removeScrollBar,j=y.inert;return t.createElement(t.Fragment,null,j?t.createElement(C,{styles:v(w)}):null,Y?t.createElement(n.RemoveScrollBar,{noRelative:y.noRelative,gapMode:y.gapMode}):null)};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2]),o=r(_d[3]),c=r(_d[4]),u=r(_d[5]),l=function(e){return'changedTouches'in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},s=function(e){return[e.deltaX,e.deltaY]},f=function(e){return e&&'current'in e?e.current:e},d=function(e,t){return e[0]===t[0]&&e[1]===t[1]},v=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},h=0,p=[];function b(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}},231,[208,38,232,234,240,241]);
|
|
288
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"RemoveScrollBar",{enumerable:!0,get:function(){return t.RemoveScrollBar}}),Object.defineProperty(e,"zeroRightClassName",{enumerable:!0,get:function(){return n.zeroRightClassName}}),Object.defineProperty(e,"fullWidthClassName",{enumerable:!0,get:function(){return n.fullWidthClassName}}),Object.defineProperty(e,"noScrollbarsClassName",{enumerable:!0,get:function(){return n.noScrollbarsClassName}}),Object.defineProperty(e,"removedBarSizeVariable",{enumerable:!0,get:function(){return n.removedBarSizeVariable}}),Object.defineProperty(e,"getGapWidth",{enumerable:!0,get:function(){return l.getGapWidth}});var t=r(d[0]),n=r(d[1]),l=r(d[2])},232,[233,210,239]);
|
|
289
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"lockAttribute",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"useLockAttribute",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"RemoveScrollBar",{enumerable:!0,get:function(){return f}});var n=(function(n){if(n&&n.__esModule)return n;var t={};return n&&Object.keys(n).forEach(function(e){var o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,o.get?o:{enumerable:!0,get:function(){return n[e]}})}),t.default=n,t})(r(_d[0])),t=r(_d[1]),e=r(_d[2]),o=r(_d[3]),c=(0,t.styleSingleton)(),u='data-scroll-locked',d=function(n,t,o,c){var d=n.left,l=n.top,s=n.right,f=n.gap;return void 0===o&&(o='margin'),"\n .".concat(e.noScrollbarsClassName," {\n overflow: hidden ").concat(c,";\n padding-right: ").concat(f,"px ").concat(c,";\n }\n body[").concat(u,"] {\n overflow: hidden ").concat(c,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(c,";"),'margin'===o&&"\n padding-left: ".concat(d,"px;\n padding-top: ").concat(l,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(f,"px ").concat(c,";\n "),'padding'===o&&"padding-right: ".concat(f,"px ").concat(c,";")].filter(Boolean).join(''),"\n }\n \n .").concat(e.zeroRightClassName," {\n right: ").concat(f,"px ").concat(c,";\n }\n \n .").concat(e.fullWidthClassName," {\n margin-right: ").concat(f,"px ").concat(c,";\n }\n \n .").concat(e.zeroRightClassName," .").concat(e.zeroRightClassName," {\n right: 0 ").concat(c,";\n }\n \n .").concat(e.fullWidthClassName," .").concat(e.fullWidthClassName," {\n margin-right: 0 ").concat(c,";\n }\n \n body[").concat(u,"] {\n ").concat(e.removedBarSizeVariable,": ").concat(f,"px;\n }\n")},l=function(){var n=parseInt(document.body.getAttribute(u)||'0',10);return isFinite(n)?n:0},s=function(){n.useEffect(function(){return document.body.setAttribute(u,(l()+1).toString()),function(){var n=l()-1;n<=0?document.body.removeAttribute(u):document.body.setAttribute(u,n.toString())}},[])},f=function(t){var e=t.noRelative,u=t.noImportant,l=t.gapMode,f=void 0===l?'margin':l;s();var p=n.useMemo(function(){return(0,o.getGapWidth)(f)},[f]);return n.createElement(c,{styles:d(p,!e,f,u?'':'!important')})}},233,[38,234,210,239]);
|
|
290
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"styleSingleton",{enumerable:!0,get:function(){return t.styleSingleton}}),Object.defineProperty(e,"stylesheetSingleton",{enumerable:!0,get:function(){return n.stylesheetSingleton}}),Object.defineProperty(e,"styleHookSingleton",{enumerable:!0,get:function(){return o.styleHookSingleton}});var t=r(d[0]),n=r(d[1]),o=r(d[2])},234,[235,237,236]);
|
|
291
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"styleSingleton",{enumerable:!0,get:function(){return t}});var n=r(d[0]),t=function(){var t=(0,n.styleHookSingleton)();return function(n){var u=n.styles,o=n.dynamic;return t(u,o),null}}},235,[236]);
|
|
292
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"styleHookSingleton",{enumerable:!0,get:function(){return n}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=function(){var n=(0,t.stylesheetSingleton)();return function(t,u){e.useEffect(function(){return n.add(t),function(){n.remove()}},[t&&u])}}},236,[38,237]);
|
|
293
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"stylesheetSingleton",{enumerable:!0,get:function(){return o}});var t=r(d[0]);function n(){if(!document)return null;var n=document.createElement('style');n.type='text/css';var u=(0,t.getNonce)();return u&&n.setAttribute('nonce',u),n}function u(t){(document.head||document.getElementsByTagName('head')[0]).appendChild(t)}var o=function(){var t=0,o=null;return{add:function(c){var l,s;0==t&&(o=n())&&(s=c,(l=o).styleSheet?l.styleSheet.cssText=s:l.appendChild(document.createTextNode(s)),u(o)),t++},remove:function(){! --t&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}}},237,[238]);
|
|
294
|
+
__d(function(g,r,i,a,m,e,d){"use strict";var n;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"setNonce",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"getNonce",{enumerable:!0,get:function(){return c}});var t=function(t){n=t},c=function(){return n||('undefined'!=typeof __webpack_nonce__?__webpack_nonce__:void 0)}},238,[]);
|
|
295
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"zeroGap",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"getGapWidth",{enumerable:!0,get:function(){return u}});var t={left:0,top:0,right:0,gap:0},n=function(t){return parseInt(t||'',10)||0},o=function(t){var o=window.getComputedStyle(document.body),u=o['padding'===t?'paddingLeft':'marginLeft'],p=o['padding'===t?'paddingTop':'marginTop'],f=o['padding'===t?'paddingRight':'marginRight'];return[n(u),n(p),n(f)]},u=function(n){if(void 0===n&&(n='margin'),'undefined'==typeof window)return t;var u=o(n),p=document.documentElement.clientWidth,f=window.innerWidth;return{left:u[0],top:u[1],right:u[2],gap:Math.max(0,f-p+u[2]-u[0])}}},239,[]);
|
|
296
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"nonPassive",{enumerable:!0,get:function(){return o}});var t=!1;if('undefined'!=typeof window)try{var n=Object.defineProperty({},'passive',{get:function(){return t=!0,!0}});window.addEventListener('test',n,n),window.removeEventListener('test',n,n)}catch(n){t=!1}var o=!!t&&{passive:!1}},240,[]);
|
|
297
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"locationCouldBeScrolled",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"handleScroll",{enumerable:!0,get:function(){return h}});var t=function(t){return'TEXTAREA'===t.tagName},n=function(n,o){if(!(n instanceof Element))return!1;var u=window.getComputedStyle(n);return'hidden'!==u[o]&&!(u.overflowY===u.overflowX&&!t(n)&&'visible'===u[o])},o=function(t){return n(t,'overflowY')},u=function(t){return n(t,'overflowX')},c=function(t,n){var o=n.ownerDocument,u=n;do{if('undefined'!=typeof ShadowRoot&&u instanceof ShadowRoot&&(u=u.host),f(t,u)){var c=s(t,u);if(c[1]>c[2])return!0}u=u.parentNode}while(u&&u!==o.body);return!1},l=function(t){return[t.scrollLeft,t.scrollWidth,t.clientWidth]},f=function(t,n){return'v'===t?o(n):u(n)},s=function(t,n){return'v'===t?[(o=n).scrollTop,o.scrollHeight,o.clientHeight]:l(n);var o},v=function(t,n){return'h'===t&&'rtl'===n?-1:1},h=function(t,n,o,u,c){var l=v(t,window.getComputedStyle(n).direction),h=l*u,w=o.target,b=n.contains(w),p=!1,y=h>0,N=0,E=0;do{if(!w)break;var S=s(t,w),T=S[0],_=S[1]-S[2]-l*T;(T||_)&&f(t,w)&&(N+=_,E+=T);var M=w.parentNode;w=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!b&&w!==document.body||b&&(n.contains(w)||n===w));return(y&&(c&&Math.abs(N)<1||!c&&h>N)||!y&&(c&&Math.abs(E)<1||!c&&-h>E))&&(p=!0),p}},241,[]);
|
|
298
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"hideOthers",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"inertOthers",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"supportsInert",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"suppressOthers",{enumerable:!0,get:function(){return h}});var e=function(e){return'undefined'==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},t=new WeakMap,n=new WeakMap,o={},u=0,c=function(e){return e&&(e.host||c(e.parentNode))},f=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=c(t);return n&&e.contains(n)?n:(console.error('aria-hidden',t,'in not contained inside',e,'. Doing nothing'),null)}).filter(function(e){return Boolean(e)})},s=function(e,c,s,l){var p=f(c,Array.isArray(e)?e:[e]);o[s]||(o[s]=new WeakMap);var y=o[s],h=[],v=new Set,b=new Set(p),A=function(e){e&&!v.has(e)&&(v.add(e),A(e.parentNode))};p.forEach(A);var w=function(e){e&&!b.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(v.has(e))w(e);else try{var o=e.getAttribute(l),u=null!==o&&'false'!==o,c=(t.get(e)||0)+1,f=(y.get(e)||0)+1;t.set(e,c),y.set(e,f),h.push(e),1===c&&u&&n.set(e,!0),1===f&&e.setAttribute(s,'true'),u||e.setAttribute(l,'true')}catch(t){console.error('aria-hidden: cannot operate on ',e,t)}})};return w(c),v.clear(),u++,function(){h.forEach(function(e){var o=t.get(e)-1,u=y.get(e)-1;t.set(e,o),y.set(e,u),o||(n.has(e)||e.removeAttribute(l),n.delete(e)),u||e.removeAttribute(s)}),--u||(t=new WeakMap,t=new WeakMap,n=new WeakMap,o={})}},l=function(t,n,o){void 0===o&&(o='data-aria-hidden');var u=Array.from(Array.isArray(t)?t:[t]),c=n||e(t);return c?(u.push.apply(u,Array.from(c.querySelectorAll('[aria-live], script'))),s(u,c,o,'aria-hidden')):function(){return null}},p=function(t,n,o){void 0===o&&(o='data-inert-ed');var u=n||e(t);return u?s(t,u,o,'inert'):function(){return null}},y=function(){return'undefined'!=typeof HTMLElement&&HTMLElement.prototype.hasOwnProperty('inert')},h=function(e,t,n){return void 0===n&&(n='data-suppressed'),(y()?p:l)(e,t,n)}},242,[]);
|
|
299
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"VISUALLY_HIDDEN_STYLES",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"VisuallyHidden",{enumerable:!0,get:function(){return f}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=Object.defineProperty,u=(e,t)=>o(e,"name",{value:t,configurable:!0}),c=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),f=e.forwardRef(u(function(e,o){return(0,n.jsx)(t.Primitive.span,Object.assign({},e,{ref:o,style:Object.assign({},c,e.style)}))},"VisuallyHidden")),d=f},243,[38,244,151]);
|
|
300
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["asChild"];function t(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Primitive",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return v}}),Object.defineProperty(_e,"dispatchDiscreteCustomEvent",{enumerable:!0,get:function(){return p}});var n,u=r(_d[0]),o=(n=u)&&n.__esModule?n:{default:n},c=t(r(_d[1])),s=t(r(_d[2])),f=r(_d[3]),d=r(_d[4]),l=Object.defineProperty,b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const u=(0,f.createSlot)(`Primitive.${n}`),s=c.forwardRef((t,c)=>{const{asChild:s}=t,f=(0,o.default)(t,e),l=s?u:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,d.jsx)(l,Object.assign({},f,{ref:c}))});return s.displayName=`Primitive.${n}`,Object.assign({},t,{[n]:s})},{});function p(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}l(p,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0});var v=b},244,[131,38,40,245,151]);
|
|
301
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"Slot",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"Slottable",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"createSlot",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"createSlottable",{enumerable:!0,get:function(){return b}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),s=Object.defineProperty,u=(e,t)=>s(e,"name",{value:t,configurable:!0});function f(t){const n=l.forwardRef((n,s)=>{let{children:u}=n,f=(0,o.default)(n,e),p=null,d=!1;const b=[];E(u)&&"function"==typeof $&&(u=$(u._payload)),l.Children.forEach(u,e=>{if(O(e)){d=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;E(n)&&"function"==typeof $&&(n=$(n._payload)),p=h(t,n),b.push(p?.props?.children)}else b.push(e)}),p?p=l.cloneElement(p,void 0,b):!d&&1===l.Children.count(u)&&l.isValidElement(u)&&(p=u);const y=p?j(p):void 0,_=(0,c.useComposedRefs)(s,y);if(!p){if(u||0===u)throw new Error(d?R(t):P(t));return u}const v=S(f,p.props??{});return p.type!==l.Fragment&&(v.ref=s?_:y),l.cloneElement(p,v)});return n.displayName=`${t}.Slot`,n}u(f,"createSlot");var p=f("Slot"),d=Symbol.for("radix.slottable");function b(e){const t=u(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=d,t}u(b,"createSlottable");var y=b("Slottable"),h=u((e,t)=>{if("child"in e.props){const t=e.props.child;return l.isValidElement(t)?l.cloneElement(t,void 0,e.props.children(t.props.children)):null}return l.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function S(e,t){const n=Object.assign({},t);for(const o in t){const l=e[o],c=t[o];/^on[A-Z]/.test(o)?l&&c?n[o]=(...e)=>{const t=c(...e);return l(...e),t}:l&&(n[o]=l):"style"===o?n[o]=Object.assign({},l,c):"className"===o&&(n[o]=[l,c].filter(Boolean).join(" "))}return Object.assign({},e,n)}function j(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function O(e){return l.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===d}u(S,"mergeProps"),u(j,"getElementRef"),u(O,"isSlottable");var _=Symbol.for("react.lazy");function E(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===_&&"_payload"in e&&v(e._payload)}function v(e){return"object"==typeof e&&null!==e&&"then"in e}u(E,"isLazyComponent"),u(v,"isPromiseLike");var P=u(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),R=u(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),$=l[" use ".trim().toString()]},245,[131,38,246]);
|
|
302
|
+
__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"composeRefs",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"useComposedRefs",{enumerable:!0,get:function(){return f}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=Object.defineProperty,n=(e,n)=>t(e,"name",{value:n,configurable:!0});function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function u(...e){return t=>{let n=!1;const u=e.map(e=>{const u=o(e,t);return n||"function"!=typeof u||(n=!0),u});if(n)return()=>{for(let t=0;t<u.length;t++){const n=u[t];"function"==typeof n?n():o(e[t],null)}}}}function f(...t){return e.useCallback(u(...t),t)}n(o,"setRef"),n(u,"composeRefs"),n(f,"useComposedRefs")},246,[38]);
|
|
303
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.cx=function(...n){return n.filter(Boolean).join(' ')}},247,[]);
|
|
304
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";const e=["children","trigger","className","sideOffset","collisionPadding","side","disabled"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.Dropdown=function(s){let{children:t,trigger:f,className:b,sideOffset:h=8,collisionPadding:u={left:16,right:16},side:x="bottom",disabled:j=!1}=s,p=(0,l.default)(s,e);return(0,o.jsxs)(n.Root,{children:[(0,o.jsx)(n.Trigger,{disabled:j,asChild:!0,children:f}),(0,o.jsx)(n.Portal,{children:(0,o.jsxs)(n.Content,Object.assign({className:(0,c.cx)('z-overDialog-605 flex min-w-55 flex-col gap-1 rounded-xl border border-secondary bg-default p-2 shadow-md','will-change-[opacity,transform]','data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade',b),side:x,sideOffset:h,collisionPadding:u},p,{children:[(0,o.jsx)(n.Arrow,{asChild:!0,children:(0,o.jsx)("div",{className:"relative -top-1 size-2.5 rotate-45 border-r border-b border-secondary bg-default"})}),t]}))})]})};var s,t=r(d[0]),l=(s=t)&&s.__esModule?s:{default:s},o=r(d[1]),n=r(d[2]),c=r(d[3])},248,[131,151,249,247]);
|
|
305
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeDropdownMenu","disabled"],n=["__scopeDropdownMenu"],o=["__scopeDropdownMenu"],t=["__scopeDropdownMenu"],u=["__scopeDropdownMenu"],d=["__scopeDropdownMenu"],p=["__scopeDropdownMenu"],c=["__scopeDropdownMenu"],s=["__scopeDropdownMenu"],l=["__scopeDropdownMenu"],f=["__scopeDropdownMenu"],b=["__scopeDropdownMenu"],w=["__scopeDropdownMenu"],j=["__scopeDropdownMenu"];function D(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(o){var t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,t.get?t:{enumerable:!0,get:function(){return e[o]}})}),n.default=e,n}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(_e,"CheckboxItem",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(_e,"DropdownMenu",{enumerable:!0,get:function(){return K}}),Object.defineProperty(_e,"DropdownMenuArrow",{enumerable:!0,get:function(){return $}}),Object.defineProperty(_e,"DropdownMenuCheckboxItem",{enumerable:!0,get:function(){return V}}),Object.defineProperty(_e,"DropdownMenuContent",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"DropdownMenuGroup",{enumerable:!0,get:function(){return J}}),Object.defineProperty(_e,"DropdownMenuItem",{enumerable:!0,get:function(){return U}}),Object.defineProperty(_e,"DropdownMenuItemIndicator",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(_e,"DropdownMenuLabel",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(_e,"DropdownMenuPortal",{enumerable:!0,get:function(){return q}}),Object.defineProperty(_e,"DropdownMenuRadioGroup",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"DropdownMenuRadioItem",{enumerable:!0,get:function(){return X}}),Object.defineProperty(_e,"DropdownMenuSeparator",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(_e,"DropdownMenuSub",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(_e,"DropdownMenuSubContent",{enumerable:!0,get:function(){return re}}),Object.defineProperty(_e,"DropdownMenuSubTrigger",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(_e,"DropdownMenuTrigger",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"Group",{enumerable:!0,get:function(){return de}}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(_e,"ItemIndicator",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"RadioGroup",{enumerable:!0,get:function(){return se}}),Object.defineProperty(_e,"RadioItem",{enumerable:!0,get:function(){return le}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(_e,"Separator",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"Sub",{enumerable:!0,get:function(){return we}}),Object.defineProperty(_e,"SubContent",{enumerable:!0,get:function(){return je}}),Object.defineProperty(_e,"SubTrigger",{enumerable:!0,get:function(){return me}}),Object.defineProperty(_e,"Trigger",{enumerable:!0,get:function(){return te}}),Object.defineProperty(_e,"createDropdownMenuScope",{enumerable:!0,get:function(){return A}});var O,M=r(_d[0]),_=(O=M)&&O.__esModule?O:{default:O},y=D(r(_d[1])),h=r(_d[2]),v=r(_d[3]),P=r(_d[4]),x=r(_d[5]),I=r(_d[6]),R=r(_d[7]),C=D(R),S=r(_d[8]),N=r(_d[9]),T="DropdownMenu",[k,A]=(0,P.createContextScope)(T,[R.createMenuScope]),E=(0,R.createMenuScope)(),[G,H]=k(T),K=e=>{const{__scopeDropdownMenu:n,children:o,dir:t,open:u,defaultOpen:d,onOpenChange:p,modal:c=!0}=e,s=E(n),l=y.useRef(null),[f,b]=(0,x.useControllableState)({prop:u,defaultProp:d??!1,onChange:p,caller:T});return(0,N.jsx)(G,{scope:n,triggerId:(0,S.useId)(),triggerRef:l,contentId:(0,S.useId)(),open:f,onOpenChange:b,onOpenToggle:y.useCallback(()=>b(e=>!e),[b]),modal:c,children:(0,N.jsx)(C.Root,Object.assign({},s,{open:f,onOpenChange:b,dir:t,modal:c,children:o}))})};K.displayName=T;var L="DropdownMenuTrigger",F=y.forwardRef((n,o)=>{const{__scopeDropdownMenu:t,disabled:u=!1}=n,d=(0,_.default)(n,e),p=H(L,t),c=E(t),s=(0,v.useComposedRefs)(o,p.triggerRef);return(0,N.jsx)(C.Anchor,Object.assign({asChild:!0},c,{children:(0,N.jsx)(I.Primitive.button,Object.assign({type:"button",id:p.triggerId,"aria-haspopup":"menu","aria-expanded":p.open,"aria-controls":p.open?p.contentId:void 0,"data-state":p.open?"open":"closed","data-disabled":u?"":void 0,disabled:u},d,{ref:s,onPointerDown:(0,h.composeEventHandlers)(n.onPointerDown,e=>{u||0!==e.button||!1!==e.ctrlKey||(p.onOpenToggle(),p.open||e.preventDefault())}),onKeyDown:(0,h.composeEventHandlers)(n.onKeyDown,e=>{u||(["Enter"," "].includes(e.key)&&p.onOpenToggle(),"ArrowDown"===e.key&&p.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})}))}))});F.displayName=L;var q=e=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,n),u=E(o);return(0,N.jsx)(C.Portal,Object.assign({},u,t))};q.displayName="DropdownMenuPortal";var z="DropdownMenuContent",B=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:t}=e,u=(0,_.default)(e,o),d=H(z,t),p=E(t),c=y.useRef(!1);return(0,N.jsx)(C.Content,Object.assign({id:d.contentId,"aria-labelledby":d.triggerId},p,u,{ref:n,onCloseAutoFocus:(0,h.composeEventHandlers)(e.onCloseAutoFocus,e=>{c.current||d.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:(0,h.composeEventHandlers)(e.onInteractOutside,e=>{const n=e.detail.originalEvent,o=0===n.button&&!0===n.ctrlKey,t=2===n.button||o;d.modal&&!t||(c.current=!0)}),style:Object.assign({},e.style,{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"})}))});B.displayName=z;var J=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,u=(0,_.default)(e,t),d=E(o);return(0,N.jsx)(C.Group,Object.assign({},d,u,{ref:n}))});J.displayName="DropdownMenuGroup";var Q=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,u),d=E(o);return(0,N.jsx)(C.Label,Object.assign({},d,t,{ref:n}))});Q.displayName="DropdownMenuLabel";var U=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,d),u=E(o);return(0,N.jsx)(C.Item,Object.assign({},u,t,{ref:n}))});U.displayName="DropdownMenuItem";var V=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,p),u=E(o);return(0,N.jsx)(C.CheckboxItem,Object.assign({},u,t,{ref:n}))});V.displayName="DropdownMenuCheckboxItem";var W=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,c),u=E(o);return(0,N.jsx)(C.RadioGroup,Object.assign({},u,t,{ref:n}))});W.displayName="DropdownMenuRadioGroup";var X=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,s),u=E(o);return(0,N.jsx)(C.RadioItem,Object.assign({},u,t,{ref:n}))});X.displayName="DropdownMenuRadioItem";var Y=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,l),u=E(o);return(0,N.jsx)(C.ItemIndicator,Object.assign({},u,t,{ref:n}))});Y.displayName="DropdownMenuItemIndicator";var Z=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,f),u=E(o);return(0,N.jsx)(C.Separator,Object.assign({},u,t,{ref:n}))});Z.displayName="DropdownMenuSeparator";var $=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,b),u=E(o);return(0,N.jsx)(C.Arrow,Object.assign({},u,t,{ref:n}))});$.displayName="DropdownMenuArrow";var ee=e=>{const{__scopeDropdownMenu:n,children:o,open:t,onOpenChange:u,defaultOpen:d}=e,p=E(n),[c,s]=(0,x.useControllableState)({prop:t,defaultProp:d??!1,onChange:u,caller:"DropdownMenuSub"});return(0,N.jsx)(C.Sub,Object.assign({},p,{open:c,onOpenChange:s,children:o}))},ne=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,w),u=E(o);return(0,N.jsx)(C.SubTrigger,Object.assign({},u,t,{ref:n}))});ne.displayName="DropdownMenuSubTrigger";var re=y.forwardRef((e,n)=>{const{__scopeDropdownMenu:o}=e,t=(0,_.default)(e,j),u=E(o);return(0,N.jsx)(C.SubContent,Object.assign({},u,t,{ref:n,style:Object.assign({},e.style,{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"})}))});re.displayName="DropdownMenuSubContent";var oe=K,te=F,ae=q,ue=B,de=J,pe=Q,ie=U,ce=V,se=W,le=X,fe=Y,be=Z,ge=$,we=ee,me=ne,je=re},249,[131,38,191,192,193,196,199,250,194,151]);
|
|
306
|
+
__d(function(g,r,_i,a,m,_e,_d){"use strict";const e=["__scopeMenu"],n=["forceMount"],t=["__scopeMenu","loop","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll"],o=["__scopeMenu"],u=["__scopeMenu"],c=["disabled","onSelect"],s=["__scopeMenu","disabled","textValue"],i=["checked","onCheckedChange"],l=["value","onValueChange"],d=["value"],f=["__scopeMenu","forceMount"],p=["__scopeMenu"],b=["__scopeMenu"],v=["forceMount","align"];function h(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Anchor",{enumerable:!0,get:function(){return on}}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return bn}}),Object.defineProperty(_e,"CheckboxItem",{enumerable:!0,get:function(){return dn}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(_e,"Group",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return ln}}),Object.defineProperty(_e,"ItemIndicator",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return an}}),Object.defineProperty(_e,"Menu",{enumerable:!0,get:function(){return se}}),Object.defineProperty(_e,"MenuAnchor",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"MenuArrow",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"MenuCheckboxItem",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(_e,"MenuContent",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"MenuGroup",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(_e,"MenuItem",{enumerable:!0,get:function(){return we}}),Object.defineProperty(_e,"MenuItemIndicator",{enumerable:!0,get:function(){return He}}),Object.defineProperty(_e,"MenuLabel",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(_e,"MenuPortal",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(_e,"MenuRadioGroup",{enumerable:!0,get:function(){return De}}),Object.defineProperty(_e,"MenuRadioItem",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"MenuSeparator",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(_e,"MenuSub",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(_e,"MenuSubContent",{enumerable:!0,get:function(){return We}}),Object.defineProperty(_e,"MenuSubTrigger",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return un}}),Object.defineProperty(_e,"RadioGroup",{enumerable:!0,get:function(){return fn}}),Object.defineProperty(_e,"RadioItem",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(_e,"Separator",{enumerable:!0,get:function(){return gn}}),Object.defineProperty(_e,"Sub",{enumerable:!0,get:function(){return vn}}),Object.defineProperty(_e,"SubContent",{enumerable:!0,get:function(){return jn}}),Object.defineProperty(_e,"SubTrigger",{enumerable:!0,get:function(){return hn}}),Object.defineProperty(_e,"createMenuScope",{enumerable:!0,get:function(){return ee}});var j,y=r(_d[0]),O=(j=y)&&j.__esModule?j:{default:j},M=h(r(_d[1])),P=r(_d[2]),_=r(_d[3]),C=r(_d[4]),w=r(_d[5]),x=r(_d[6]),E=r(_d[7]),R=r(_d[8]),k=r(_d[9]),S=r(_d[10]),D=r(_d[11]),I=h(D),F=r(_d[12]),T=r(_d[13]),L=r(_d[14]),A=r(_d[15]),H=h(A),K=r(_d[16]),G=r(_d[17]),N=r(_d[18]),V=r(_d[19]),U=r(_d[20]),B=["Enter"," "],X=["ArrowUp","PageDown","End"],Y=["ArrowDown","PageUp","Home",...X],z={ltr:[...B,"ArrowRight"],rtl:[...B,"ArrowLeft"]},W={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Z="Menu",[q,J,Q]=(0,_.createCollection)(Z),[$,ee]=(0,w.createContextScope)(Z,[Q,D.createPopperScope,A.createRovingFocusGroupScope]),ne=(0,D.createPopperScope)(),te=(0,A.createRovingFocusGroupScope)(),[re,oe]=$(Z),[ue,ce]=$(Z),se=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:u,onOpenChange:c,modal:s=!0}=e,i=ne(n),[l,d]=M.useState(null),f=M.useRef(!1),p=(0,G.useCallbackRef)(c),b=(0,x.useDirection)(u);return M.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}},[]),M.useEffect(()=>{if(!t)return;const e=()=>p(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[t,p]),(0,U.jsx)(I.Root,Object.assign({},i,{children:(0,U.jsx)(re,{scope:n,open:t,onOpenChange:p,content:l,onContentChange:d,children:(0,U.jsx)(ue,{scope:n,onClose:M.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:b,modal:s,children:o})})}))};se.displayName=Z;var ae=M.forwardRef((n,t)=>{const{__scopeMenu:o}=n,u=(0,O.default)(n,e),c=ne(o);return(0,U.jsx)(I.Anchor,Object.assign({},c,u,{ref:t}))});ae.displayName="MenuAnchor";var ie="MenuPortal",[le,de]=$(ie,{forceMount:void 0}),fe=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:u}=e,c=oe(ie,n);return(0,U.jsx)(le,{scope:n,forceMount:t,children:(0,U.jsx)(T.Presence,{present:t||c.open,children:(0,U.jsx)(F.Portal,{asChild:!0,container:u,children:o})})})};fe.displayName=ie;var pe="MenuContent",[me,ge]=$(pe),be=M.forwardRef((e,t)=>{const o=de(pe,e.__scopeMenu),{forceMount:u=o.forceMount}=e,c=(0,O.default)(e,n),s=oe(pe,e.__scopeMenu),i=ce(pe,e.__scopeMenu);return(0,U.jsx)(q.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(T.Presence,{present:u||s.open,children:(0,U.jsx)(q.Slot,{scope:e.__scopeMenu,children:i.modal?(0,U.jsx)(ve,Object.assign({},c,{ref:t})):(0,U.jsx)(he,Object.assign({},c,{ref:t}))})})})}),ve=M.forwardRef((e,n)=>{const t=oe(pe,e.__scopeMenu),o=M.useRef(null),u=(0,C.useComposedRefs)(n,o);return M.useEffect(()=>{const e=o.current;if(e)return(0,N.hideOthers)(e)},[]),(0,U.jsx)(ye,Object.assign({},e,{ref:u,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:(0,P.composeEventHandlers)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))}),he=M.forwardRef((e,n)=>{const t=oe(pe,e.__scopeMenu);return(0,U.jsx)(ye,Object.assign({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))}),je=(0,K.createSlot)("MenuContent.ScrollLock"),ye=M.forwardRef((e,n)=>{const{__scopeMenu:o,loop:u=!1,trapFocus:c,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:b,onInteractOutside:v,onDismiss:h,disableOutsideScroll:j}=e,y=(0,O.default)(e,t),_=oe(pe,o),w=ce(pe,o),x=ne(o),S=te(o),D=J(o),[F,T]=M.useState(null),L=M.useRef(null),A=(0,C.useComposedRefs)(n,L,_.onContentChange),K=M.useRef(0),G=M.useRef(""),N=M.useRef(0),B=M.useRef(null),z=M.useRef("right"),W=M.useRef(0),Z=j?V.RemoveScroll:M.Fragment,q=j?{as:je,allowPinchZoom:!0}:void 0,Q=e=>{const n=G.current+e,t=D().filter(e=>!e.disabled),o=document.activeElement,u=t.find(e=>e.ref.current===o)?.textValue,c=$e(t.map(e=>e.textValue),n,u),s=t.find(e=>e.textValue===c)?.ref.current;!(function e(n){G.current=n,window.clearTimeout(K.current),""!==n&&(K.current=window.setTimeout(()=>e(""),1e3))})(n),s&&setTimeout(()=>s.focus())};M.useEffect(()=>()=>window.clearTimeout(K.current),[]),(0,R.useFocusGuards)();const $=M.useCallback(e=>z.current===B.current?.side&&nn(e,B.current?.area),[]);return(0,U.jsx)(me,{scope:o,searchRef:G,onItemEnter:M.useCallback(e=>{$(e)&&e.preventDefault()},[$]),onItemLeave:M.useCallback(e=>{$(e)||(L.current?.focus(),T(null))},[$]),onTriggerLeave:M.useCallback(e=>{$(e)&&e.preventDefault()},[$]),pointerGraceTimerRef:N,onPointerGraceIntentChange:M.useCallback(e=>{B.current=e},[]),children:(0,U.jsx)(Z,Object.assign({},q,{children:(0,U.jsx)(k.FocusScope,{asChild:!0,trapped:c,onMountAutoFocus:(0,P.composeEventHandlers)(s,e=>{e.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,U.jsx)(E.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:b,onInteractOutside:v,onDismiss:h,children:(0,U.jsx)(H.Root,Object.assign({asChild:!0},S,{dir:w.dir,orientation:"vertical",loop:u,currentTabStopId:F,onCurrentTabStopIdChange:T,onEntryFocus:(0,P.composeEventHandlers)(d,e=>{w.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(I.Content,Object.assign({role:"menu","aria-orientation":"vertical","data-state":Ze(_.open),"data-radix-menu-content":"",dir:w.dir},x,y,{ref:A,style:Object.assign({outline:"none"},y.style),onKeyDown:(0,P.composeEventHandlers)(y.onKeyDown,e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&o&&Q(e.key));const u=L.current;if(e.target!==u)return;if(!Y.includes(e.key))return;e.preventDefault();const c=D().filter(e=>!e.disabled).map(e=>e.ref.current);X.includes(e.key)&&c.reverse(),Qe(c)}),onBlur:(0,P.composeEventHandlers)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(K.current),G.current="")}),onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(e=>{const n=e.target,t=W.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>W.current?"right":"left";z.current=n,W.current=e.clientX}}))}))}))})})}))})});be.displayName=pe;var Oe=M.forwardRef((e,n)=>{const t=(0,O.default)(e,o);return(0,U.jsx)(L.Primitive.div,Object.assign({role:"group"},t,{ref:n}))});Oe.displayName="MenuGroup";var Me=M.forwardRef((e,n)=>{const t=(0,O.default)(e,u);return(0,U.jsx)(L.Primitive.div,Object.assign({},t,{ref:n}))});Me.displayName="MenuLabel";var Pe="MenuItem",Ce="menu.itemSelect",we=M.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o}=e,u=(0,O.default)(e,c),s=M.useRef(null),i=ce(Pe,e.__scopeMenu),l=ge(Pe,e.__scopeMenu),d=(0,C.useComposedRefs)(n,s),f=M.useRef(!1);return(0,U.jsx)(xe,Object.assign({},u,{ref:d,disabled:t,onClick:(0,P.composeEventHandlers)(e.onClick,()=>{const e=s.current;if(!t&&e){const n=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>o?.(e),{once:!0}),(0,L.dispatchDiscreteCustomEvent)(e,n),n.defaultPrevented?f.current=!1:i.onClose()}}),onPointerDown:n=>{e.onPointerDown?.(n),f.current=!0},onPointerUp:(0,P.composeEventHandlers)(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,e=>{if(t||e.target!==e.currentTarget)return;""!==l.searchRef.current&&" "===e.key||B.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})}))});we.displayName=Pe;var xe=M.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:u}=e,c=(0,O.default)(e,s),i=ge(Pe,t),l=te(t),d=M.useRef(null),f=(0,C.useComposedRefs)(n,d),[p,b]=M.useState(!1),[v,h]=M.useState("");return M.useEffect(()=>{const e=d.current;e&&h((e.textContent??"").trim())},[c.children]),(0,U.jsx)(q.ItemSlot,{scope:t,disabled:o,textValue:u??v,children:(0,U.jsx)(H.Item,Object.assign({asChild:!0},l,{focusable:!o,children:(0,U.jsx)(L.Primitive.div,Object.assign({role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0},c,{ref:f,onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(e=>{if(o)i.onItemLeave(e);else if(i.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:(0,P.composeEventHandlers)(e.onPointerLeave,tn(e=>i.onItemLeave(e))),onFocus:(0,P.composeEventHandlers)(e.onFocus,()=>b(!0)),onBlur:(0,P.composeEventHandlers)(e.onBlur,()=>b(!1))}))}))})}),Ee=M.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o}=e,u=(0,O.default)(e,i);return(0,U.jsx)(Le,{scope:e.__scopeMenu,checked:t,children:(0,U.jsx)(we,Object.assign({role:"menuitemcheckbox","aria-checked":qe(t)?"mixed":t},u,{ref:n,"data-state":Je(t),onSelect:(0,P.composeEventHandlers)(u.onSelect,()=>o?.(!!qe(t)||!t),{checkForDefaultPrevented:!1})}))})});Ee.displayName="MenuCheckboxItem";var Re="MenuRadioGroup",[ke,Se]=$(Re,{value:void 0,onValueChange:()=>{}}),De=M.forwardRef((e,n)=>{const{value:t,onValueChange:o}=e,u=(0,O.default)(e,l),c=(0,G.useCallbackRef)(o);return(0,U.jsx)(ke,{scope:e.__scopeMenu,value:t,onValueChange:c,children:(0,U.jsx)(Oe,Object.assign({},u,{ref:n}))})});De.displayName=Re;var Ie="MenuRadioItem",Fe=M.forwardRef((e,n)=>{const{value:t}=e,o=(0,O.default)(e,d),u=Se(Ie,e.__scopeMenu),c=t===u.value;return(0,U.jsx)(Le,{scope:e.__scopeMenu,checked:c,children:(0,U.jsx)(we,Object.assign({role:"menuitemradio","aria-checked":c},o,{ref:n,"data-state":Je(c),onSelect:(0,P.composeEventHandlers)(o.onSelect,()=>u.onValueChange?.(t),{checkForDefaultPrevented:!1})}))})});Fe.displayName=Ie;var Te="MenuItemIndicator",[Le,Ae]=$(Te,{checked:!1}),He=M.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o}=e,u=(0,O.default)(e,f),c=Ae(Te,t);return(0,U.jsx)(T.Presence,{present:o||qe(c.checked)||!0===c.checked,children:(0,U.jsx)(L.Primitive.span,Object.assign({},u,{ref:n,"data-state":Je(c.checked)}))})});He.displayName=Te;var Ke=M.forwardRef((e,n)=>{const t=(0,O.default)(e,p);return(0,U.jsx)(L.Primitive.div,Object.assign({role:"separator","aria-orientation":"horizontal"},t,{ref:n}))});Ke.displayName="MenuSeparator";var Ge=M.forwardRef((e,n)=>{const{__scopeMenu:t}=e,o=(0,O.default)(e,b),u=ne(t);return(0,U.jsx)(I.Arrow,Object.assign({},u,o,{ref:n}))});Ge.displayName="MenuArrow";var Ne="MenuSub",[Ve,Ue]=$(Ne),Be=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:u}=e,c=oe(Ne,n),s=ne(n),[i,l]=M.useState(null),[d,f]=M.useState(null),p=(0,G.useCallbackRef)(u);return M.useEffect(()=>(!1===c.open&&p(!1),()=>p(!1)),[c.open,p]),(0,U.jsx)(I.Root,Object.assign({},s,{children:(0,U.jsx)(re,{scope:n,open:o,onOpenChange:p,content:d,onContentChange:f,children:(0,U.jsx)(Ve,{scope:n,contentId:(0,S.useId)(),triggerId:(0,S.useId)(),trigger:i,onTriggerChange:l,children:t})})}))};Be.displayName=Ne;var Xe="MenuSubTrigger",Ye=M.forwardRef((e,n)=>{const t=oe(Xe,e.__scopeMenu),o=ce(Xe,e.__scopeMenu),u=Ue(Xe,e.__scopeMenu),c=ge(Xe,e.__scopeMenu),s=M.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=c,d={__scopeMenu:e.__scopeMenu},f=M.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);M.useEffect(()=>f,[f]),M.useEffect(()=>{const e=i.current;return()=>{window.clearTimeout(e),l(null)}},[i,l]);const p=(0,C.useComposedRefs)(n,u.onTriggerChange);return(0,U.jsx)(ae,Object.assign({asChild:!0},d,{children:(0,U.jsx)(xe,Object.assign({id:u.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?u.contentId:void 0,"data-state":Ze(t.open)},e,{ref:p,onClick:n=>{e.onClick?.(n),e.disabled||n.defaultPrevented||(n.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:(0,P.composeEventHandlers)(e.onPointerMove,tn(n=>{c.onItemEnter(n),n.defaultPrevented||e.disabled||t.open||s.current||(c.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{t.onOpenChange(!0),f()},100))})),onPointerLeave:(0,P.composeEventHandlers)(e.onPointerLeave,tn(e=>{f();const n=t.content?.getBoundingClientRect();if(n){const o=t.content?.dataset.side,u="right"===o,s=u?-5:5,l=n[u?"left":"right"],d=n[u?"right":"left"];c.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:l,y:n.top},{x:d,y:n.top},{x:d,y:n.bottom},{x:l,y:n.bottom}],side:o}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(e),e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,n=>{if(e.disabled||n.target!==n.currentTarget)return;""!==c.searchRef.current&&" "===n.key||z[o.dir].includes(n.key)&&(t.onOpenChange(!0),t.content?.focus(),n.preventDefault())})}))}))});Ye.displayName=Xe;var ze="MenuSubContent",We=M.forwardRef((e,n)=>{const t=de(pe,e.__scopeMenu),{forceMount:o=t.forceMount,align:u="start"}=e,c=(0,O.default)(e,v),s=oe(pe,e.__scopeMenu),i=ce(pe,e.__scopeMenu),l=Ue(ze,e.__scopeMenu),d=M.useRef(null),f=(0,C.useComposedRefs)(n,d);return(0,U.jsx)(q.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(T.Presence,{present:o||s.open,children:(0,U.jsx)(q.Slot,{scope:e.__scopeMenu,children:(0,U.jsx)(ye,Object.assign({id:l.contentId,"aria-labelledby":l.triggerId},c,{ref:f,align:u,side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{i.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,P.composeEventHandlers)(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:(0,P.composeEventHandlers)(e.onEscapeKeyDown,e=>{i.onClose(),e.preventDefault()}),onKeyDown:(0,P.composeEventHandlers)(e.onKeyDown,e=>{const n=e.currentTarget.contains(e.target),t=W[i.dir].includes(e.key);n&&t&&(s.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})}))})})})});function Ze(e){return e?"open":"closed"}function qe(e){return"indeterminate"===e}function Je(e){return qe(e)?"indeterminate":e?"checked":"unchecked"}function Qe(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}function $e(e,n,t){const o=n.length>1&&Array.from(n).every(e=>e===n[0])?n[0]:n,u=t?e.indexOf(t):-1;let c=(s=e,i=Math.max(u,0),s.map((e,n)=>s[(i+n)%s.length]));var s,i;1===o.length&&(c=c.filter(e=>e!==t));const l=c.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return l!==t?l:void 0}function en(e,n){const{x:t,y:o}=e;let u=!1;for(let e=0,c=n.length-1;e<n.length;c=e++){const s=n[e],i=n[c],l=s.x,d=s.y,f=i.x,p=i.y;d>o!=p>o&&t<(f-l)*(o-d)/(p-d)+l&&(u=!u)}return u}function nn(e,n){if(!n)return!1;return en({x:e.clientX,y:e.clientY},n)}function tn(e){return n=>"mouse"===n.pointerType?e(n):void 0}We.displayName=ze;var rn=se,on=ae,un=fe,cn=be,sn=Oe,an=Me,ln=we,dn=Ee,fn=De,pn=Fe,mn=He,gn=Ke,bn=Ge,vn=Be,hn=Ye,jn=We},250,[131,38,191,251,192,193,252,198,205,202,194,253,203,204,199,261,200,201,242,206,151]);
|
|
307
|
+
__d(function(g,r,_i,_a,m,_e,_d){"use strict";const e=["scope","children"],t=["state"],s=["scope","children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"createCollection",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"unstable_createCollection",{enumerable:!0,get:function(){return b}});var n,i=r(_d[0]),o=(n=i)&&n.__esModule?n:{default:n},c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(r(_d[1])),l=r(_d[2]),u=r(_d[3]),f=r(_d[4]),a=r(_d[5]);function h(t){const s=t+"CollectionProvider",[n,i]=(0,l.createContextScope)(s),[h,d]=n(s,{collectionRef:{current:null},itemMap:new Map}),p=e=>{const{scope:t,children:s}=e,n=c.useRef(null),i=c.useRef(new Map).current;return(0,a.jsx)(h,{scope:t,itemMap:i,collectionRef:n,children:s})};p.displayName=s;const y=t+"CollectionSlot",O=(0,f.createSlot)(y),R=c.forwardRef((e,t)=>{const{scope:s,children:n}=e,i=d(y,s),o=(0,u.useComposedRefs)(t,i.collectionRef);return(0,a.jsx)(O,{ref:o,children:n})});R.displayName=y;const b=t+"CollectionItemSlot",j="data-radix-collection-item",k=(0,f.createSlot)(b),x=c.forwardRef((t,s)=>{const{scope:n,children:i}=t,l=(0,o.default)(t,e),f=c.useRef(null),h=(0,u.useComposedRefs)(s,f),p=d(b,n);return c.useEffect(()=>(p.itemMap.set(f,Object.assign({ref:f},l)),()=>{p.itemMap.delete(f)})),(0,a.jsx)(k,Object.assign({},{[j]:""},{ref:h,children:i}))});return x.displayName=b,[{Provider:p,Slot:R,ItemSlot:x},function(e){const s=d(t+"CollectionConsumer",e);return c.useCallback(()=>{const e=s.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${j}]`));return Array.from(s.itemMap.values()).sort((e,s)=>t.indexOf(e.ref.current)-t.indexOf(s.ref.current))},[s.collectionRef,s.itemMap])},i]}var d=new WeakMap,p=class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],d.set(this,!0)}set(e,t){return d.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,s){const n=this.has(t),i=this.#e.length,o=R(e);let c=o>=0?o:i+o;const l=c<0||c>=i?-1:c;if(l===this.size||n&&l===this.size-1||-1===l)return this.set(t,s),this;const u=this.size+(n?0:1);o<0&&c++;const f=[...this.#e];let a,h=!1;for(let e=c;e<u;e++)if(c===e){let i=f[e];f[e]===t&&(i=f[e+1]),n&&this.delete(t),a=this.get(i),this.set(t,s)}else{h||f[e-1]!==t||(h=!0);const s=f[h?e:e-1],n=a;a=this.get(s),this.delete(s),this.set(s,n)}return this}with(t,s,n){const i=new e(this);return i.insert(t,s,n),i}before(e){const t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,s){const n=this.#e.indexOf(e);return-1===n?this:this.insert(n,t,s)}after(e){let t=this.#e.indexOf(e);if(t=-1===t||t===this.size-1?-1:t+1,-1!==t)return this.entryAt(t)}setAfter(e,t,s){const n=this.#e.indexOf(e);return-1===n?this:this.insert(n+1,t,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){const t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){const t=y(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){const t=y(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return y(this.#e,e)}from(e,t){const s=this.indexOf(e);if(-1===s)return;let n=s+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){const s=this.indexOf(e);if(-1===s)return;let n=s+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let s=0;for(const n of this){if(Reflect.apply(e,t,[n,s,this]))return n;s++}}findIndex(e,t){let s=0;for(const n of this){if(Reflect.apply(e,t,[n,s,this]))return s;s++}return-1}filter(t,s){const n=[];let i=0;for(const e of this)Reflect.apply(t,s,[e,i,this])&&n.push(e),i++;return new e(n)}map(t,s){const n=[];let i=0;for(const e of this)n.push([e[0],Reflect.apply(t,s,[e,i,this])]),i++;return new e(n)}reduce(...e){const[t,s]=e;let n=0,i=s??this.at(0);for(const s of this)i=0===n&&1===e.length?s:Reflect.apply(t,this,[i,s,n,this]),n++;return i}reduceRight(...e){const[t,s]=e;let n=s??this.at(-1);for(let s=this.size-1;s>=0;s--){const i=this.at(s);n=s===this.size-1&&1===e.length?i:Reflect.apply(t,this,[n,i,s,this])}return n}toSorted(t){const s=[...this.entries()].sort(t);return new e(s)}toReversed(){const t=new e;for(let e=this.size-1;e>=0;e--){const s=this.keyAt(e),n=this.get(s);t.set(s,n)}return t}toSpliced(...t){const s=[...this.entries()];return s.splice(...t),new e(s)}slice(t,s){const n=new e;let i=this.size-1;if(void 0===t)return n;t<0&&(t+=this.size),void 0!==s&&s>0&&(i=s-1);for(let e=t;e<=i;e++){const t=this.keyAt(e),s=this.get(t);n.set(t,s)}return n}every(e,t){let s=0;for(const n of this){if(!Reflect.apply(e,t,[n,s,this]))return!1;s++}return!0}some(e,t){let s=0;for(const n of this){if(Reflect.apply(e,t,[n,s,this]))return!0;s++}return!1}};function y(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const s=O(e,t);return-1===s?void 0:e[s]}function O(e,t){const s=e.length,n=R(t),i=n>=0?n:s+n;return i<0||i>=s?-1:i}function R(e){return e!=e||0===e?0:Math.trunc(e)}function b(e){const n=e+"CollectionProvider",[i,h]=(0,l.createContextScope)(n),[d,y]=i(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new p,setItemMap:()=>{}}),O=e=>{let{state:s}=e,n=(0,o.default)(e,t);return s?(0,a.jsx)(b,Object.assign({},n,{state:s})):(0,a.jsx)(R,Object.assign({},n))};O.displayName=n;const R=e=>{const t=z();return(0,a.jsx)(b,Object.assign({},e,{state:t}))};R.displayName=n+"Init";const b=e=>{const{scope:t,children:s,state:n}=e,i=c.useRef(null),[o,l]=c.useState(null),f=(0,u.useComposedRefs)(i,l),[h,p]=n;return c.useEffect(()=>{if(!o)return;const e=C(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,a.jsx)(d,{scope:t,itemMap:h,setItemMap:p,collectionRef:f,collectionRefObject:i,collectionElement:o,children:s})};b.displayName=n+"Impl";const k=e+"CollectionSlot",S=(0,f.createSlot)(k),M=c.forwardRef((e,t)=>{const{scope:s,children:n}=e,i=y(k,s),o=(0,u.useComposedRefs)(t,i.collectionRef);return(0,a.jsx)(S,{ref:o,children:n})});M.displayName=k;const v=e+"CollectionItemSlot",w="data-radix-collection-item",A=(0,f.createSlot)(v),I=c.forwardRef((e,t)=>{const{scope:n,children:i}=e,l=(0,o.default)(e,s),f=c.useRef(null),[h,d]=c.useState(null),O=(0,u.useComposedRefs)(t,f,d),R=y(v,n),{setItemMap:b}=R,k=c.useRef(l);j(k.current,l)||(k.current=l);const C=k.current;return c.useEffect(()=>{const e=C;return b(t=>h?t.has(h)?t.set(h,Object.assign({},e,{element:h})).toSorted(x):(t.set(h,Object.assign({},e,{element:h})),t.toSorted(x)):t),()=>{b(e=>h&&e.has(h)?(e.delete(h),new p(e)):e)}},[h,C,b]),(0,a.jsx)(A,Object.assign({},{[w]:""},{ref:O,children:i}))});function z(){return c.useState(new p)}I.displayName=v;return[{Provider:O,Slot:M,ItemSlot:I},{createCollectionScope:h,useCollection:function(t){const{itemMap:s}=y(e+"CollectionConsumer",t);return s},useInitCollection:z}]}function j(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null==e||null==t)return!1;const s=Object.keys(e),n=Object.keys(t);if(s.length!==n.length)return!1;for(const n of s){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(e[n]!==t[n])return!1}return!0}function k(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function x(e,t){return e[1].element&&t[1].element?k(e[1].element,t[1].element)?-1:1:0}function C(e){return new MutationObserver(t=>{for(const s of t)if("childList"===s.type)return void e()})}},251,[131,38,193,192,200,151]);
|
|
308
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DirectionProvider",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"Provider",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"useDirection",{enumerable:!0,get:function(){return u}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=e.createContext(void 0),o=e=>{const{dir:o,children:u}=e;return(0,t.jsx)(n.Provider,{value:o,children:u})};function u(t){const o=e.useContext(n);return t||o||"ltr"}var c=o},252,[38,151]);
|
|
309
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopePopper","virtualRef"],t=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"],n=["__scopePopper"];function o(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ALIGN_OPTIONS",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"Anchor",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"Popper",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"PopperAnchor",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"PopperArrow",{enumerable:!0,get:function(){return z}}),Object.defineProperty(_e,"PopperContent",{enumerable:!0,get:function(){return D}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return X}}),Object.defineProperty(_e,"SIDE_OPTIONS",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"createPopperScope",{enumerable:!0,get:function(){return _}});var s,l=r(_d[0]),d=(s=l)&&s.__esModule?s:{default:s},p=o(r(_d[1])),c=r(_d[2]),u=o(r(_d[3])),f=r(_d[4]),h=r(_d[5]),b=r(_d[6]),y=r(_d[7]),P=r(_d[8]),w=r(_d[9]),O=r(_d[10]),x=["top","right","bottom","left"],j=["start","center","end"],v="Popper",[S,_]=(0,h.createContextScope)(v),[A,C]=S(v),R=e=>{const{__scopePopper:t,children:n}=e,[o,s]=p.useState(null),[l,d]=p.useState(void 0);return(0,O.jsx)(A,{scope:t,anchor:o,onAnchorChange:s,placementState:l,setPlacementState:d,children:n})};R.displayName=v;var $="PopperAnchor",E=p.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:s}=t,l=(0,d.default)(t,e),c=C($,o),u=p.useRef(null),h=c.onAnchorChange,y=p.useCallback(e=>{u.current=e,e&&h(e)},[h]),P=(0,f.useComposedRefs)(n,y),w=p.useRef(null);p.useEffect(()=>{if(!s)return;const e=w.current;w.current=s.current,e!==w.current&&h(w.current)});const x=c.placementState&&M(c.placementState),j=x?.[0],v=x?.[1];return s?null:(0,O.jsx)(b.Primitive.div,Object.assign({"data-radix-popper-side":j,"data-radix-popper-align":v},l,{ref:P}))});E.displayName=$;var H="PopperContent",[N,k]=S(H),D=p.forwardRef((e,n)=>{const{__scopePopper:o,side:s="bottom",sideOffset:l=0,align:u="center",alignOffset:h=0,arrowPadding:x=0,avoidCollisions:j=!0,collisionBoundary:v=[],collisionPadding:S=0,sticky:_="partial",hideWhenDetached:A=!1,updatePositionStrategy:R="optimized",onPlaced:$}=e,E=(0,d.default)(e,t),k=C(H,o),[D,I]=p.useState(null),W=(0,f.useComposedRefs)(n,I),[z,X]=p.useState(null),B=(0,w.useSize)(z),F=B?.width??0,T=B?.height??0,G=s+("center"!==u?"-"+u:""),U="number"==typeof S?S:Object.assign({top:0,right:0,bottom:0,left:0},S),q=Array.isArray(v)?v:[v],J=q.length>0,K={padding:U,boundary:q.filter(Y),altBoundary:J},{refs:Q,floatingStyles:V,placement:Z,isPositioned:ee,middlewareData:te}=(0,c.useFloating)({strategy:"fixed",placement:G,whileElementsMounted:(...e)=>(0,c.autoUpdate)(...e,{animationFrame:"always"===R}),elements:{reference:k.anchor},middleware:[(0,c.offset)({mainAxis:l+T,alignmentAxis:h}),j&&(0,c.shift)(Object.assign({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?(0,c.limitShift)():void 0},K)),j&&(0,c.flip)(Object.assign({},K)),(0,c.size)(Object.assign({},K,{apply:({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:s,height:l}=t.reference,d=e.floating.style;d.setProperty("--radix-popper-available-width",`${n}px`),d.setProperty("--radix-popper-available-height",`${o}px`),d.setProperty("--radix-popper-anchor-width",`${s}px`),d.setProperty("--radix-popper-anchor-height",`${l}px`)}})),z&&(0,c.arrow)({element:z,padding:x}),L({arrowWidth:F,arrowHeight:T}),A&&(0,c.hide)(Object.assign({strategy:"referenceHidden"},K,{boundary:J?K.boundary:void 0}))]}),re=k.setPlacementState;(0,P.useLayoutEffect)(()=>(re(Z),()=>{re(void 0)}),[Z,re]);const[ne,oe]=M(Z),ae=(0,y.useCallbackRef)($);(0,P.useLayoutEffect)(()=>{ee&&ae?.()},[ee,ae]);const ie=te.arrow?.x,se=te.arrow?.y,le=0!==te.arrow?.centerOffset,[de,pe]=p.useState();return(0,P.useLayoutEffect)(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),(0,O.jsx)("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:Object.assign({},V,{transform:ee?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" ")},te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}),dir:e.dir,children:(0,O.jsx)(N,{scope:o,placedSide:ne,placedAlign:oe,onArrowChange:X,arrowX:ie,arrowY:se,shouldHideArrow:le,children:(0,O.jsx)(b.Primitive.div,Object.assign({"data-side":ne,"data-align":oe},E,{ref:W,style:Object.assign({},E.style,{animation:ee?void 0:"none"})}))})})});D.displayName=H;var I="PopperArrow",W={top:"bottom",right:"left",bottom:"top",left:"right"},z=p.forwardRef(function(e,t){const{__scopePopper:o}=e,s=(0,d.default)(e,n),l=k(I,o),p=W[l.placedSide];return(0,O.jsx)("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:(0,O.jsx)(u.Root,Object.assign({},s,{ref:t,style:Object.assign({},s.style,{display:"block"})}))})});function Y(e){return null!==e}z.displayName=I;var L=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:s}=t,l=0!==s.arrow?.centerOffset,d=l?0:e.arrowWidth,p=l?0:e.arrowHeight,[c,u]=M(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(s.arrow?.x??0)+d/2,b=(s.arrow?.y??0)+p/2;let y="",P="";return"bottom"===c?(y=l?f:`${h}px`,P=-p+"px"):"top"===c?(y=l?f:`${h}px`,P=`${o.floating.height+p}px`):"right"===c?(y=-p+"px",P=l?f:`${b}px`):"left"===c&&(y=`${o.floating.width+p}px`,P=l?f:`${b}px`),{data:{x:y,y:P}}}});function M(e){const[t,n="center"]=e.split("-");return[t,n]}var X=R,B=E,F=D,T=z},253,[131,38,254,259,192,193,199,201,195,260,151]);
|
|
310
|
+
__d(function(g,r,_i,_a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"autoUpdate",{enumerable:!0,get:function(){return t.autoUpdate}}),Object.defineProperty(_e,"computePosition",{enumerable:!0,get:function(){return t.computePosition}}),Object.defineProperty(_e,"detectOverflow",{enumerable:!0,get:function(){return t.detectOverflow}}),Object.defineProperty(_e,"getOverflowAncestors",{enumerable:!0,get:function(){return t.getOverflowAncestors}}),Object.defineProperty(_e,"platform",{enumerable:!0,get:function(){return t.platform}}),Object.defineProperty(_e,"arrow",{enumerable:!0,get:function(){return v}}),Object.defineProperty(_e,"autoPlacement",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"flip",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"hide",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"inline",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"limitShift",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"offset",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"shift",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"size",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"useFloating",{enumerable:!0,get:function(){return l}});var t=r(_d[0]),n=r(_d[1]),o=e(n),u=e(r(_d[2])),i='undefined'!=typeof document?n.useLayoutEffect:function(){};function f(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if('function'==typeof e&&e.toString()===t.toString())return!0;let n,o,u;if(e&&t&&'object'==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!==o--;)if(!f(e[o],t[o]))return!1;return!0}if(u=Object.keys(e),n=u.length,n!==Object.keys(t).length)return!1;for(o=n;0!==o--;)if(!{}.hasOwnProperty.call(t,u[o]))return!1;for(o=n;0!==o--;){const n=u[o];if(('_owner'!==n||!e.$$typeof)&&!f(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function c(e){if('undefined'==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function a(e,t){const n=c(e);return Math.round(t*n)/n}function s(e){const t=o.useRef(e);return i(()=>{t.current=e}),t}function l(e){void 0===e&&(e={});const{placement:n="bottom",strategy:l="absolute",middleware:p=[],platform:d,elements:{reference:b,floating:y}={},transform:O=!0,whileElementsMounted:P,open:j}=e,[w,h]=o.useState({x:0,y:0,strategy:l,placement:n,middlewareData:{},isPositioned:!1}),[v,S]=o.useState(p);f(v,p)||S(p);const[M,R]=o.useState(null),[_,k]=o.useState(null),x=o.useCallback(e=>{e!==E.current&&(E.current=e,R(e))},[]),A=o.useCallback(e=>{e!==z.current&&(z.current=e,k(e))},[]),C=b||M,D=y||_,E=o.useRef(null),z=o.useRef(null),F=o.useRef(w),U=null!=P,$=s(P),L=s(d),V=s(j),q=o.useCallback(()=>{if(!E.current||!z.current)return;const e={placement:n,strategy:l,middleware:v};L.current&&(e.platform=L.current),(0,t.computePosition)(E.current,z.current,e).then(e=>{const t=Object.assign({},e,{isPositioned:!1!==V.current});B.current&&!f(F.current,t)&&(F.current=t,u.flushSync(()=>{h(t)}))})},[v,n,l,L,V]);i(()=>{!1===j&&F.current.isPositioned&&(F.current.isPositioned=!1,h(e=>Object.assign({},e,{isPositioned:!1})))},[j]);const B=o.useRef(!1);i(()=>(B.current=!0,()=>{B.current=!1}),[]),i(()=>{if(C&&(E.current=C),D&&(z.current=D),C&&D){if($.current)return $.current(C,D,q);q()}},[C,D,q,$,U]);const G=o.useMemo(()=>({reference:E,floating:z,setReference:x,setFloating:A}),[x,A]),H=o.useMemo(()=>({reference:C,floating:D}),[C,D]),I=o.useMemo(()=>{const e={position:l,left:0,top:0};if(!H.floating)return e;const t=a(H.floating,w.x),n=a(H.floating,w.y);return O?Object.assign({},e,{transform:"translate("+t+"px, "+n+"px)"},c(H.floating)>=1.5&&{willChange:'transform'}):{position:l,left:t,top:n}},[l,O,H.floating,w.x,w.y]);return o.useMemo(()=>Object.assign({},w,{update:q,refs:G,elements:H,floatingStyles:I}),[w,q,G,H,I])}const p=e=>({name:'arrow',options:e,fn(n){const{element:o,padding:u}='function'==typeof e?e(n):e;return o&&(i=o,{}.hasOwnProperty.call(i,'current'))?null!=o.current?(0,t.arrow)({element:o.current,padding:u}).fn(n):{}:o?(0,t.arrow)({element:o,padding:u}).fn(n):{};var i}}),d=(e,n)=>{const o=(0,t.offset)(e);return{name:o.name,fn:o.fn,options:[e,n]}},b=(e,n)=>{const o=(0,t.shift)(e);return{name:o.name,fn:o.fn,options:[e,n]}},y=(e,n)=>({fn:(0,t.limitShift)(e).fn,options:[e,n]}),O=(e,n)=>{const o=(0,t.flip)(e);return{name:o.name,fn:o.fn,options:[e,n]}},P=(e,n)=>{const o=(0,t.size)(e);return{name:o.name,fn:o.fn,options:[e,n]}},j=(e,n)=>{const o=(0,t.autoPlacement)(e);return{name:o.name,fn:o.fn,options:[e,n]}},w=(e,n)=>{const o=(0,t.hide)(e);return{name:o.name,fn:o.fn,options:[e,n]}},h=(e,n)=>{const o=(0,t.inline)(e);return{name:o.name,fn:o.fn,options:[e,n]}},v=(e,t)=>{const n=p(e);return{name:n.name,fn:n.fn,options:[e,t]}}},254,[255,38,40]);
|
|
311
|
+
__d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getOverflowAncestors",{enumerable:!0,get:function(){return o.getOverflowAncestors}}),Object.defineProperty(e,"arrow",{enumerable:!0,get:function(){return M}}),Object.defineProperty(e,"autoPlacement",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"autoUpdate",{enumerable:!0,get:function(){return W}}),Object.defineProperty(e,"computePosition",{enumerable:!0,get:function(){return V}}),Object.defineProperty(e,"detectOverflow",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"flip",{enumerable:!0,get:function(){return F}}),Object.defineProperty(e,"hide",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"inline",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"limitShift",{enumerable:!0,get:function(){return B}}),Object.defineProperty(e,"offset",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"platform",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"shift",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"size",{enumerable:!0,get:function(){return H}});var t=r(d[0]),n=r(d[1]),o=r(d[2]);function i(t){const i=(0,o.getComputedStyle)(t);let l=parseFloat(i.width)||0,c=parseFloat(i.height)||0;const s=(0,o.isHTMLElement)(t),f=s?t.offsetWidth:l,u=s?t.offsetHeight:c,a=(0,n.round)(l)!==f||(0,n.round)(c)!==u;return a&&(l=f,c=u),{width:l,height:c,$:a}}function l(t){return(0,o.isElement)(t)?t:t.contextElement}function c(t){const c=l(t);if(!(0,o.isHTMLElement)(c))return(0,n.createCoords)(1);const s=c.getBoundingClientRect(),{width:f,height:u,$:a}=i(c);let h=(a?(0,n.round)(s.width):s.width)/f,p=(a?(0,n.round)(s.height):s.height)/u;return h&&Number.isFinite(h)||(h=1),p&&Number.isFinite(p)||(p=1),{x:h,y:p}}const s=(0,n.createCoords)(0);function f(t){const n=(0,o.getWindow)(t);return(0,o.isWebKit)()&&n.visualViewport?{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}:s}function u(t,n,i){return void 0===n&&(n=!1),!!i&&n&&i===(0,o.getWindow)(t)}function a(i,s,a,h){void 0===s&&(s=!1),void 0===a&&(a=!1);const p=i.getBoundingClientRect(),y=l(i);let b=(0,n.createCoords)(1);s&&(h?(0,o.isElement)(h)&&(b=c(h)):b=c(i));const w=u(y,a,h)?f(y):(0,n.createCoords)(0);let x=(p.left+w.x)/b.x,v=(p.top+w.y)/b.y,E=p.width/b.x,C=p.height/b.y;if(y&&h){const t=(0,o.getWindow)(y),n=(0,o.isElement)(h)?(0,o.getWindow)(h):h;let i=t,l=(0,o.getFrameElement)(i);for(;l&&n!==i;){const t=c(l),n=l.getBoundingClientRect(),s=(0,o.getComputedStyle)(l),f=n.left+(l.clientLeft+parseFloat(s.paddingLeft))*t.x,u=n.top+(l.clientTop+parseFloat(s.paddingTop))*t.y;x*=t.x,v*=t.y,E*=t.x,C*=t.y,x+=f,v+=u,i=(0,o.getWindow)(l),l=(0,o.getFrameElement)(i)}}return(0,t.rectToClientRect)({width:E,height:C,x:x,y:v})}function h(t,n){const i=(0,o.getNodeScroll)(t).scrollLeft;return n?n.left+i:a((0,o.getDocumentElement)(t)).left+i}function p(t,n){const o=t.getBoundingClientRect();return{x:o.left+n.scrollLeft-h(t,o),y:o.top+n.scrollTop}}function y(t){const i=(0,o.getNodeScroll)(t),l=t.ownerDocument.body,c=(0,n.max)(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=(0,n.max)(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let f=-i.scrollLeft+h(t);const u=-i.scrollTop;return'rtl'===(0,o.getComputedStyle)(l).direction&&(f+=(0,n.max)(t.clientWidth,l.clientWidth)-c),{width:c,height:s,x:f,y:u}}function b(t,n,i){void 0===i&&(i='viewport');const l='layoutViewport'===i,c=(0,o.getWindow)(t),s=(0,o.getDocumentElement)(t),f=c.visualViewport;let u=s.clientWidth,a=s.clientHeight,p=0,y=0;if(f){const t=!(0,o.isWebKit)()||'fixed'===n;l?t||(p=-f.offsetLeft,y=-f.offsetTop):(u=f.width,a=f.height,t&&(p=f.offsetLeft,y=f.offsetTop))}if(h(s)<=0){const t=s.ownerDocument,n=t.body,o=getComputedStyle(n),i='CSS1Compat'===t.compatMode&&parseFloat(o.marginLeft)+parseFloat(o.marginRight)||0,l=Math.abs(s.clientWidth-n.clientWidth-i),c='stable both-edges'===getComputedStyle(s).scrollbarGutter?l/2:l;c<=25&&(u-=c)}return{width:u,height:a,x:p,y:y}}function w(t,n){const o=a(t,!0,'fixed'===n),i=o.top+t.clientTop,l=o.left+t.clientLeft,s=c(t);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:l*s.x,y:i*s.y}}function x(n,i,l){let c;if('viewport'===i||'layoutViewport'===i)c=b(n,l,i);else if('document'===i)c=y((0,o.getDocumentElement)(n));else if((0,o.isElement)(i))c=w(i,l);else{const t=f(n);c={x:i.x-t.x,y:i.y-t.y,width:i.width,height:i.height}}return(0,t.rectToClientRect)(c)}function v(t,n){const i=n.get(t);if(i)return i;let l=(0,o.getOverflowAncestors)(t,[],!1).filter(t=>(0,o.isElement)(t)&&'body'!==(0,o.getNodeName)(t)),c=null;const s='fixed'===(0,o.getComputedStyle)(t).position;let f=s?(0,o.getParentNode)(t):t;for(;(0,o.isElement)(f)&&!(0,o.isLastTraversableNode)(f);){const t=(0,o.getComputedStyle)(f),n=(0,o.isContainingBlock)(f),i=c?c.position:s?'fixed':'';!n&&('fixed'===i||'absolute'===i&&'static'===t.position)?l=l.filter(t=>t!==f):c=t,f=(0,o.getParentNode)(f)}return n.set(t,l),l}function E(t,i,l){const c=(0,o.isHTMLElement)(i),s=(0,o.getDocumentElement)(i),f='fixed'===l,u=a(t,!0,f,i);let y={scrollLeft:0,scrollTop:0};const b=(0,n.createCoords)(0);if((c||!f)&&(('body'!==(0,o.getNodeName)(i)||(0,o.isOverflowElement)(s))&&(y=(0,o.getNodeScroll)(i)),c)){const t=a(i,!0,f,i);b.x=t.x+i.clientLeft,b.y=t.y+i.clientTop}!c&&s&&(b.x=h(s));const w=!s||c||f?(0,n.createCoords)(0):p(s,y);return{x:u.left+y.scrollLeft-b.x-w.x,y:u.top+y.scrollTop-b.y-w.y,width:u.width,height:u.height}}function C(t){return'static'===(0,o.getComputedStyle)(t).position}function L(t,n){if(!(0,o.isHTMLElement)(t)||'fixed'===(0,o.getComputedStyle)(t).position)return null;if(n)return n(t);let i=t.offsetParent;return(0,o.getDocumentElement)(t)===i&&(i=i.ownerDocument.body),i}function O(t,n){const i=(0,o.getWindow)(t);if((0,o.isTopLayer)(t))return i;if(!(0,o.isHTMLElement)(t)){let n=(0,o.getParentNode)(t);for(;n&&!(0,o.isLastTraversableNode)(n);){if((0,o.isElement)(n)&&!C(n))return n;n=(0,o.getParentNode)(n)}return i}let l=L(t,n);for(;l&&(0,o.isTableElement)(l)&&C(l);)l=L(l,n);return l&&(0,o.isLastTraversableNode)(l)&&C(l)&&!(0,o.isContainingBlock)(l)?i:l||(0,o.getContainingBlock)(t)||i}const T={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:i,rect:l,offsetParent:s,strategy:f}=t;const u='fixed'===f,h=(0,o.getDocumentElement)(s),y=!!i&&(0,o.isTopLayer)(i.floating);if(s===h||y&&u)return l;let b={scrollLeft:0,scrollTop:0},w=(0,n.createCoords)(1);const x=(0,n.createCoords)(0),v=(0,o.isHTMLElement)(s);if((v||!u)&&(('body'!==(0,o.getNodeName)(s)||(0,o.isOverflowElement)(h))&&(b=(0,o.getNodeScroll)(s)),v)){const t=a(s);w=c(s),x.x=t.x+s.clientLeft,x.y=t.y+s.clientTop}const E=!h||v||u?(0,n.createCoords)(0):p(h,b);return{width:l.width*w.x,height:l.height*w.y,x:l.x*w.x-b.scrollLeft*w.x+x.x+E.x,y:l.y*w.y-b.scrollTop*w.y+x.y+E.y}},getDocumentElement:o.getDocumentElement,getClippingRect:function(t){let{element:i,boundary:l,rootBoundary:c,strategy:s}=t;const f=[...'clippingAncestors'===l?(0,o.isTopLayer)(i)?[]:v(i,this._c):[].concat(l),c],u=x(i,f[0],s);let a=u.top,h=u.right,p=u.bottom,y=u.left;for(let t=1;t<f.length;t++){const o=x(i,f[t],s);a=(0,n.max)(o.top,a),h=(0,n.min)(o.right,h),p=(0,n.min)(o.bottom,p),y=(0,n.max)(o.left,y)}return{width:h-y,height:p-a,x:y,y:a}},getOffsetParent:O,getElementRects:async function(t){const n=this.getOffsetParent||O,o=this.getDimensions,i=await o(t.floating);return{reference:E(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:n,height:o}=i(t);return{width:n,height:o}},getScale:c,isElement:o.isElement,isRTL:function(t){return'rtl'===(0,o.getComputedStyle)(t).direction}};function P(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function R(t,i,l){let c,s=null;const f=(0,o.getDocumentElement)(t);function u(){var t;clearTimeout(c),null==(t=s)||t.disconnect(),s=null}function a(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),u();const h=t.getBoundingClientRect(),{left:p,top:y,width:b,height:w}=h;if(o||i(),!b||!w)return;const x={rootMargin:-(0,n.floor)(y)+"px "+-(0,n.floor)(f.clientWidth-(p+b))+"px "+-(0,n.floor)(f.clientHeight-(y+w))+"px "+-(0,n.floor)(p)+"px",threshold:(0,n.max)(0,(0,n.min)(1,l))||1};let v=!0;function E(n){const o=n[0].intersectionRatio;if(!P(h,t.getBoundingClientRect()))return a();if(o!==l){if(!v)return a();o?a(!1,o):c=setTimeout(()=>{a(!1,1e-7)},1e3)}v=!1}try{s=new IntersectionObserver(E,Object.assign({},x,{root:f.ownerDocument}))}catch(t){s=new IntersectionObserver(E,x)}s.observe(t)}const h=(0,o.getWindow)(t),p=()=>a(l);return h.addEventListener('resize',p),a(!0),()=>{h.removeEventListener('resize',p),u()}}function W(t,n,i,c){void 0===c&&(c={});const{ancestorScroll:s=!0,ancestorResize:f=!0,elementResize:u='function'==typeof ResizeObserver,layoutShift:h='function'==typeof IntersectionObserver,animationFrame:p=!1}=c,y=l(t),b=s||f?[...y?(0,o.getOverflowAncestors)(y):[],...n?(0,o.getOverflowAncestors)(n):[]]:[];b.forEach(t=>{s&&t.addEventListener('scroll',i),f&&t.addEventListener('resize',i)});const w=y&&h?R(y,i,f):null;let x,v=-1,E=null;u&&(E=new ResizeObserver(t=>{let[o]=t;o&&o.target===y&&E&&n&&(E.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var t;null==(t=E)||t.observe(n)})),i()}),y&&!p&&E.observe(y),n&&E.observe(n));let C=p?a(t):null;return p&&(function n(){const o=a(t);C&&!P(C,o)&&i();C=o,x=requestAnimationFrame(n)})(),i(),()=>{var t;b.forEach(t=>{s&&t.removeEventListener('scroll',i),f&&t.removeEventListener('resize',i)}),null==w||w(),null==(t=E)||t.disconnect(),E=null,p&&cancelAnimationFrame(x)}}const S=t.detectOverflow,N=t.offset,j=t.autoPlacement,D=t.shift,F=t.flip,H=t.size,A=t.hide,M=t.arrow,z=t.inline,B=t.limitShift,V=(n,o,i)=>{const l=new Map,c=null!=i?i:{},s=Object.assign({},T,c.platform,{_c:l});return(0,t.computePosition)(n,o,Object.assign({},c,{platform:s}))}},255,[256,257,258]);
|
|
312
|
+
__d(function(g,r,_i,_a,m,_e,_d){"use strict";const e=["crossAxis","alignment","allowedPlacements","autoAlignment"],t=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],n=["strategy"],i=["mainAxis","crossAxis","limiter"],a=["apply"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"rectToClientRect",{enumerable:!0,get:function(){return c.rectToClientRect}}),Object.defineProperty(_e,"arrow",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"autoPlacement",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"computePosition",{enumerable:!0,get:function(){return d}}),Object.defineProperty(_e,"detectOverflow",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"flip",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"hide",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"inline",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"limitShift",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"offset",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"shift",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"size",{enumerable:!0,get:function(){return D}});var l,o=r(_d[0]),s=(l=o)&&l.__esModule?l:{default:l},c=r(_d[1]);function f(e,t,n){let{reference:i,floating:a}=e;const l=(0,c.getSideAxis)(t),o=(0,c.getAlignmentAxis)(t),s=(0,c.getAxisLength)(o),f=(0,c.getSide)(t),u='y'===l,d=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2,y=i[s]/2-a[s]/2;let x;switch(f){case'top':x={x:d,y:i.y-a.height};break;case'bottom':x={x:d,y:i.y+i.height};break;case'right':x={x:i.x+i.width,y:p};break;case'left':x={x:i.x-a.width,y:p};break;default:x={x:i.x,y:i.y}}const h=(0,c.getAlignment)(t);return h&&(x[o]+=y*('end'===h?1:-1)*(n&&u?-1:1)),x}async function u(e,t){var n;void 0===t&&(t={});const{x:i,y:a,platform:l,rects:o,elements:s,strategy:f}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:y=!1,padding:x=0}=(0,c.evaluate)(t,e),h=(0,c.getPaddingObject)(x),w=s[y?'floating'===p?'reference':'floating':p],v=(0,c.rectToClientRect)(await l.getClippingRect({element:null==(n=await(null==l.isElement?void 0:l.isElement(w)))||n?w:w.contextElement||await(null==l.getDocumentElement?void 0:l.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:f})),b='floating'===p?{x:i,y:a,width:o.floating.width,height:o.floating.height}:o.reference,A=await(null==l.getOffsetParent?void 0:l.getOffsetParent(s.floating)),O=await(null==l.isElement?void 0:l.isElement(A))&&await(null==l.getScale?void 0:l.getScale(A))||{x:1,y:1},P=(0,c.rectToClientRect)(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:A,strategy:f}):b);return{top:(v.top-P.top+h.top)/O.y,bottom:(P.bottom-v.bottom+h.bottom)/O.y,left:(v.left-P.left+h.left)/O.x,right:(P.right-v.right+h.right)/O.x}}const d=async(e,t,n)=>{const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:o}=n,s=o.detectOverflow?o:Object.assign({},o,{detectOverflow:u}),c=await(null==o.isRTL?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:y}=f(d,i,c),x=i,h=0;const w={};for(let n=0;n<l.length;n++){const u=l[n];if(!u)continue;const{name:v,fn:b}=u,{x:A,y:O,data:P,reset:R}=await b({x:p,y:y,initialPlacement:i,placement:x,strategy:a,middlewareData:w,rects:d,platform:s,elements:{reference:e,floating:t}});p=null!=A?A:p,y=null!=O?O:y,w[v]=Object.assign({},w[v],P),R&&h<50&&(h++,'object'==typeof R&&(R.placement&&(x=R.placement),R.rects&&(d=!0===R.rects?await o.getElementRects({reference:e,floating:t,strategy:a}):R.rects),({x:p,y:y}=f(d,x,c))),n=-1)}return{x:p,y:y,placement:x,strategy:a,middlewareData:w}},p=e=>({name:'arrow',options:e,async fn(t){const{x:n,y:i,placement:a,rects:l,platform:o,elements:s,middlewareData:f}=t,{element:u,padding:d=0}=(0,c.evaluate)(e,t)||{};if(null==u)return{};const p=(0,c.getPaddingObject)(d),y={x:n,y:i},x=(0,c.getAlignmentAxis)(a),h=(0,c.getAxisLength)(x),w=await o.getDimensions(u),v='y'===x,b=v?'top':'left',A=v?'bottom':'right',O=v?'clientHeight':'clientWidth',P=l.reference[h]+l.reference[x]-y[x]-l.floating[h],R=y[x]-l.reference[x],S=await(null==o.getOffsetParent?void 0:o.getOffsetParent(u));let j=S?S[O]:0;j&&await(null==o.isElement?void 0:o.isElement(S))||(j=s.floating[O]||l.floating[h]);const T=P/2-R/2,C=j/2-w[h]/2-1,D=(0,c.min)(p[b],C),E=(0,c.min)(p[A],C),L=j-w[h]-E,k=j/2-w[h]/2+T,H=(0,c.clamp)(D,k,L),_=!f.arrow&&null!=(0,c.getAlignment)(a)&&k!==H&&l.reference[h]/2-(k<D?D:E)-w[h]/2<0,B=_?k<D?k-D:k-L:0;return{[x]:y[x]+B,data:Object.assign({[x]:H,centerOffset:k-H-B},_&&{alignmentOffset:B}),reset:_}}});function y(e,t,n){return(e?[...n.filter(t=>(0,c.getAlignment)(t)===e),...n.filter(t=>(0,c.getAlignment)(t)!==e)]:n.filter(e=>(0,c.getSide)(e)===e)).filter(n=>!e||((0,c.getAlignment)(n)===e||!!t&&(0,c.getOppositeAlignmentPlacement)(n)!==n))}const x=function(t){return void 0===t&&(t={}),{name:'autoPlacement',options:t,async fn(n){var i,a,l;const{rects:o,middlewareData:f,placement:u,platform:d,elements:p}=n,x=(0,c.evaluate)(t,n),{crossAxis:h=!1,alignment:w,allowedPlacements:v=c.placements,autoAlignment:b=!0}=x,A=(0,s.default)(x,e),O=void 0!==w||v===c.placements?y(w||null,b,v):v,P=(null==(i=f.autoPlacement)?void 0:i.index)||0,R=O[P];if(null==R)return{};if(u!==R)return{reset:{placement:O[0]}};const S=await d.detectOverflow(n,A),j=(0,c.getAlignmentSides)(R,o,await(null==d.isRTL?void 0:d.isRTL(p.floating))),T=[S[(0,c.getSide)(R)],S[j[0]],S[j[1]]],C=[...(null==(a=f.autoPlacement)?void 0:a.overflows)||[],{placement:R,overflows:T}],D=O[P+1];if(D)return{data:{index:P+1,overflows:C},reset:{placement:D}};const E=C.map(e=>{const t=(0,c.getAlignment)(e.placement);return[e.placement,t&&h?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),L=(null==(l=E.filter(e=>e[2].slice(0,(0,c.getAlignment)(e[0])?2:3).every(e=>e<=0))[0])?void 0:l[0])||E[0][0];return L!==u?{data:{index:P+1,overflows:C},reset:{placement:L}}:{}}}},h=function(e){return void 0===e&&(e={}),{name:'flip',options:e,async fn(n){var i,a;const{placement:l,middlewareData:o,rects:f,initialPlacement:u,platform:d,elements:p}=n,y=(0,c.evaluate)(e,n),{mainAxis:x=!0,crossAxis:h=!0,fallbackPlacements:w,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:A=!0}=y,O=(0,s.default)(y,t);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const P=(0,c.getSide)(l),R=(0,c.getSideAxis)(u),S=(0,c.getSide)(u)===u,j=await(null==d.isRTL?void 0:d.isRTL(p.floating)),T=w||(S||!A?[(0,c.getOppositePlacement)(u)]:(0,c.getExpandedPlacements)(u)),C='none'!==b;!w&&C&&T.push(...(0,c.getOppositeAxisPlacements)(u,A,b,j));const D=[u,...T],E=await d.detectOverflow(n,O),L=[];let k=(null==(a=o.flip)?void 0:a.overflows)||[];if(x&&L.push(E[P]),h){const e=(0,c.getAlignmentSides)(l,f,j);L.push(E[e[0]],E[e[1]])}if(k=[...k,{placement:l,overflows:L}],!L.every(e=>e<=0)){var H,_;const e=((null==(H=o.flip)?void 0:H.index)||0)+1,t=D[e];if(t){if(!('alignment'===h&&R!==(0,c.getSideAxis)(t))||k.every(e=>(0,c.getSideAxis)(e.placement)!==R||e.overflows[0]>0))return{data:{index:e,overflows:k},reset:{placement:t}}}let n=null==(_=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(v){case'bestFit':{var B;const e=null==(B=k.filter(e=>{if(C){const t=(0,c.getSideAxis)(e.placement);return t===R||'y'===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(n=e);break}case'initialPlacement':n=u}if(l!==n)return{reset:{placement:n}}}return{}}}};function w(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function v(e){return c.sides.some(t=>e[t]>=0)}const b=function(e){return void 0===e&&(e={}),{name:'hide',options:e,async fn(t){const{rects:i,platform:a}=t,l=(0,c.evaluate)(e,t),{strategy:o="referenceHidden"}=l,f=(0,s.default)(l,n);switch(o){case'referenceHidden':{const e=w(await a.detectOverflow(t,Object.assign({},f,{elementContext:'reference'})),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:v(e)}}}case'escaped':{const e=w(await a.detectOverflow(t,Object.assign({},f,{altBoundary:!0})),i.floating);return{data:{escapedOffsets:e,escaped:v(e)}}}default:return{}}}}};function A(e){const t=(0,c.min)(...e.map(e=>e.left)),n=(0,c.min)(...e.map(e=>e.top));return{x:t,y:n,width:(0,c.max)(...e.map(e=>e.right))-t,height:(0,c.max)(...e.map(e=>e.bottom))-n}}function O(e){const t=e.slice().sort((e,t)=>e.y-t.y),n=[];let i=null;for(let e=0;e<t.length;e++){const a=t[e];!i||a.y-i.y>i.height/2?n.push([a]):n[n.length-1].push(a),i=a}return n.map(e=>(0,c.rectToClientRect)(A(e)))}const P=function(e){return void 0===e&&(e={}),{name:'inline',options:e,async fn(t){const{placement:n,elements:i,rects:a,platform:l,strategy:o}=t,{padding:s=2,x:f,y:u}=(0,c.evaluate)(e,t),d=Array.from(await(null==l.getClientRects?void 0:l.getClientRects(i.reference))||[]);if(!d.length)return{};const p=O(d),y=(0,c.rectToClientRect)(A(d)),x=(0,c.getPaddingObject)(s);const h=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=f&&null!=u)return p.find(e=>f>e.left-x.left&&f<e.right+x.right&&u>e.top-x.top&&u<e.bottom+x.bottom)||y;if(p.length>=2){if('y'===(0,c.getSideAxis)(n)){const e=p[0],t=p[p.length-1],i='top'===(0,c.getSide)(n),a=e.top,l=t.bottom,o=i?e.left:t.left,s=i?e.right:t.right;return(0,c.rectToClientRect)({x:o,y:a,width:s-o,height:l-a})}const e='left'===(0,c.getSide)(n),t=(0,c.max)(...p.map(e=>e.right)),i=(0,c.min)(...p.map(e=>e.left)),a=p.filter(n=>e?n.left===i:n.right===t),l=a[0].top,o=a[a.length-1].bottom;return(0,c.rectToClientRect)({x:i,y:l,width:t-i,height:o-l})}return y}},floating:i.floating,strategy:o});return a.reference.x!==h.reference.x||a.reference.y!==h.reference.y||a.reference.width!==h.reference.width||a.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},R=new Set(['left','top']);async function S(e,t){const{placement:n,platform:i,elements:a}=e,l=await(null==i.isRTL?void 0:i.isRTL(a.floating)),o=(0,c.getSide)(n),s=(0,c.getAlignment)(n),f='y'===(0,c.getSideAxis)(n),u=R.has(o)?-1:1,d=l&&f?-1:1,p=(0,c.evaluate)(t,e);let{mainAxis:y,crossAxis:x,alignmentAxis:h}='number'==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&'number'==typeof h&&(x='end'===s?-1*h:h),f?{x:x*d,y:y*u}:{x:y*u,y:x*d}}const j=function(e){return void 0===e&&(e=0),{name:'offset',options:e,async fn(t){var n,i;const{x:a,y:l,placement:o,middlewareData:s}=t,c=await S(t,e);return o===(null==(n=s.offset)?void 0:n.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:a+c.x,y:l+c.y,data:Object.assign({},c,{placement:o})}}}},T=function(e){return void 0===e&&(e={}),{name:'shift',options:e,async fn(t){const{x:n,y:a,placement:l,platform:o}=t,f=(0,c.evaluate)(e,t),{mainAxis:u=!0,crossAxis:d=!1,limiter:p={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=f,y=(0,s.default)(f,i),x={x:n,y:a},h=await o.detectOverflow(t,y),w=(0,c.getSideAxis)(l),v=(0,c.getOppositeAxis)(w);let b=x[v],A=x[w];const O=(e,t)=>(0,c.clamp)(t+h['y'===e?'top':'left'],t,t-h['y'===e?'bottom':'right']);u&&(b=O(v,b)),d&&(A=O(w,A));const P=p.fn(Object.assign({},t,{[v]:b,[w]:A}));return Object.assign({},P,{data:{x:P.x-n,y:P.y-a,enabled:{[v]:u,[w]:d}}})}}},C=function(e){return void 0===e&&(e={}),{options:e,fn(t){var n,i;const{x:a,y:l,placement:o,rects:s,middlewareData:f}=t,{offset:u=0,mainAxis:d=!0,crossAxis:p=!0}=(0,c.evaluate)(e,t),y={x:a,y:l},x=(0,c.getSideAxis)(o),h=(0,c.getOppositeAxis)(x);let w=y[h],v=y[x];const b=(0,c.evaluate)(u,t),A='number'==typeof b?{mainAxis:b,crossAxis:0}:{mainAxis:null!=(n=b.mainAxis)?n:0,crossAxis:null!=(i=b.crossAxis)?i:0};if(d){const e='y'===h?'height':'width',t=s.reference[h]-s.floating[e]+A.mainAxis,n=s.reference[h]+s.reference[e]-A.mainAxis;w<t?w=t:w>n&&(w=n)}if(p){var O,P;const e='y'===h?'width':'height',t=R.has((0,c.getSide)(o)),n=s.reference[x]-s.floating[e]+(t&&(null==(O=f.offset)?void 0:O[x])||0)+(t?0:A.crossAxis),i=s.reference[x]+s.reference[e]+(t?0:(null==(P=f.offset)?void 0:P[x])||0)-(t?A.crossAxis:0);v<n?v=n:v>i&&(v=i)}return{[h]:w,[x]:v}}}},D=function(e){return void 0===e&&(e={}),{name:'size',options:e,async fn(t){const{placement:n,rects:i,platform:l,elements:o}=t,f=(0,c.evaluate)(e,t),{apply:u=()=>{}}=f,d=(0,s.default)(f,a),p=await l.detectOverflow(t,d),y=(0,c.getSide)(n),x=(0,c.getAlignment)(n),h='y'===(0,c.getSideAxis)(n),{width:w,height:v}=i.floating;let b,A;'top'===y||'bottom'===y?(b=y,A=x===(await(null==l.isRTL?void 0:l.isRTL(o.floating))?'start':'end')?'left':'right'):(A=y,b='end'===x?'top':'bottom');const O=v-p.top-p.bottom,P=w-p.left-p.right,R=(0,c.min)(v-p[b],O),S=(0,c.min)(w-p[A],P),j=t.middlewareData.shift,T=!j;let C=R,D=S;null!=j&&j.enabled.x&&(D=P),null!=j&&j.enabled.y&&(C=O),T&&!x&&(h?D=w-2*(0,c.max)(p.left,p.right):C=v-2*(0,c.max)(p.top,p.bottom)),await u(Object.assign({},t,{availableWidth:D,availableHeight:C}));const E=await l.getDimensions(o.floating);return w!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}}},256,[131,257]);
|
|
313
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"alignments",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"clamp",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"createCoords",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"evaluate",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"expandPaddingObject",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"floor",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"getAlignment",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"getAlignmentAxis",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"getAlignmentSides",{enumerable:!0,get:function(){return M}}),Object.defineProperty(e,"getAxisLength",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"getExpandedPlacements",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"getOppositeAlignmentPlacement",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"getOppositeAxis",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"getOppositeAxisPlacements",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"getOppositePlacement",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"getPaddingObject",{enumerable:!0,get:function(){return q}}),Object.defineProperty(e,"getSide",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"getSideAxis",{enumerable:!0,get:function(){return x}}),Object.defineProperty(e,"max",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"min",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"placements",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"rectToClientRect",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"round",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"sides",{enumerable:!0,get:function(){return t}});const t=['top','right','bottom','left'],n=['start','end'],o=t.reduce((t,o)=>t.concat(o,o+"-"+n[0],o+"-"+n[1]),[]),u=Math.min,c=Math.max,f=Math.round,l=Math.floor,b=t=>({x:t,y:t}),p={left:'right',right:'left',bottom:'top',top:'bottom'};function s(t,n,o){return c(t,u(n,o))}function y(t,n){return'function'==typeof t?t(n):t}function O(t){return t.split('-')[0]}function P(t){return t.split('-')[1]}function h(t){return'x'===t?'y':'x'}function j(t){return'y'===t?'height':'width'}function x(t){const n=t[0];return't'===n||'b'===n?'y':'x'}function A(t){return h(x(t))}function M(t,n,o){void 0===o&&(o=!1);const u=P(t),c=A(t),f=j(c);let l='x'===c?u===(o?'end':'start')?'right':'left':'start'===u?'bottom':'top';return n.reference[f]>n.floating[f]&&(l=T(l)),[l,T(l)]}function v(t){const n=T(t);return[w(t),n,w(n)]}function w(t){return t.includes('start')?t.replace('start','end'):t.replace('end','start')}const _=['left','right'],S=['right','left'],C=['top','bottom'],E=['bottom','top'];function L(t,n,o){switch(t){case'top':case'bottom':return o?n?S:_:n?_:S;case'left':case'right':return n?C:E;default:return[]}}function R(t,n,o,u){const c=P(t);let f=L(O(t),'start'===o,u);return c&&(f=f.map(t=>t+"-"+c),n&&(f=f.concat(f.map(w)))),f}function T(t){const n=O(t);return p[n]+t.slice(n.length)}function k(t){var n,o,u,c;return{top:null!=(n=t.top)?n:0,right:null!=(o=t.right)?o:0,bottom:null!=(u=t.bottom)?u:0,left:null!=(c=t.left)?c:0}}function q(t){return'number'!=typeof t?k(t):{top:t,right:t,bottom:t,left:t}}function z(t){const{x:n,y:o,width:u,height:c}=t;return{width:u,height:c,top:o,left:n,right:n+u,bottom:o+c,x:n,y:o}}},257,[]);
|
|
314
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function t(){return'undefined'!=typeof window}function n(t){return c(t)?(t.nodeName||'').toLowerCase():'#document'}function o(t){var n;return(null==t||null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function u(t){var n;return null==(n=(c(t)?t.ownerDocument:t.document)||window.document)?void 0:n.documentElement}function c(n){return!!t()&&(n instanceof Node||n instanceof o(n).Node)}function l(n){return!!t()&&(n instanceof Element||n instanceof o(n).Element)}function f(n){return!!t()&&(n instanceof HTMLElement||n instanceof o(n).HTMLElement)}function s(n){return!(!t()||'undefined'==typeof ShadowRoot)&&(n instanceof ShadowRoot||n instanceof o(n).ShadowRoot)}function b(t){const{overflow:n,overflowX:o,overflowY:u,display:c}=N(t);return/auto|scroll|overlay|hidden|clip/.test(n+u+o)&&'inline'!==c&&'contents'!==c}function p(t){return/^(table|td|th)$/.test(n(t))}function y(t){try{if(t.matches(':popover-open'))return!0}catch(t){}try{return t.matches(':modal')}catch(t){return!1}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getComputedStyle",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"getContainingBlock",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"getDocumentElement",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getFrameElement",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"getNearestOverflowAncestor",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"getNodeName",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"getNodeScroll",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"getOverflowAncestors",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"getParentNode",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"getWindow",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"isContainingBlock",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"isElement",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"isHTMLElement",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"isLastTraversableNode",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"isOverflowElement",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"isShadowRoot",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"isTableElement",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"isTopLayer",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"isWebKit",{enumerable:!0,get:function(){return S}});const w=/transform|translate|scale|rotate|perspective|filter/,O=/paint|layout|strict|content/,P=t=>!!t&&'none'!==t;let j;function v(t){const n=l(t)?N(t):t;return P(n.transform)||P(n.translate)||P(n.scale)||P(n.rotate)||P(n.perspective)||!S()&&(P(n.backdropFilter)||P(n.filter))||w.test(n.willChange||'')||O.test(n.contain||'')}function h(t){let n=L(t);for(;f(n)&&!E(n);){if(v(n))return n;if(y(n))return null;n=L(n)}return null}function S(){return null==j&&(j='undefined'!=typeof CSS&&CSS.supports&&CSS.supports('-webkit-backdrop-filter','none')),j}function E(t){return/^(html|body|#document)$/.test(n(t))}function N(t){return o(t).getComputedStyle(t)}function C(t){return l(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function L(t){if('html'===n(t))return t;const o=t.assignedSlot||t.parentNode||s(t)&&t.host||u(t);return s(o)?o.host:o}function T(t){const n=L(t);return E(n)?(t.ownerDocument||t).body:f(n)&&b(n)?n:T(n)}function k(t,n,u){var c;void 0===n&&(n=[]),void 0===u&&(u=!0);const l=T(t),f=l===(null==(c=t.ownerDocument)?void 0:c.body),s=o(l);if(f){const t=D(s);return n.concat(s,s.visualViewport||[],b(l)?l:[],t&&u?k(t):[])}return n.concat(l,k(l,[],u))}function D(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}},258,[]);
|
|
315
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children","width","height"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return f}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),d=r(_d[3]),s=u.forwardRef((t,n)=>{const{children:u,width:s=10,height:f=5}=t,l=(0,o.default)(t,e);return(0,d.jsx)(c.Primitive.svg,Object.assign({},l,{ref:n,width:s,height:f,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?u:(0,d.jsx)("polygon",{points:"0,0 30,0 15,10"})}))});s.displayName="Arrow";var f=s},259,[131,38,199,151]);
|
|
316
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useSize",{enumerable:!0,get:function(){return n}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]);function n(n){const[o,f]=e.useState(void 0);return(0,t.useLayoutEffect)(()=>{if(n){f({width:n.offsetWidth,height:n.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const t=e[0];let o,u;if("borderBoxSize"in t){const e=t.borderBoxSize,n=Array.isArray(e)?e[0]:e;o=n.inlineSize,u=n.blockSize}else o=n.offsetWidth,u=n.offsetHeight;f({width:o,height:u})});return e.observe(n,{box:"border-box"}),()=>e.unobserve(n)}f(void 0)},[n]),o}},260,[38,195]);
|
|
317
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopId","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus"],t=["__scopeRovingFocusGroup","focusable","active","tabStopId","children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return U}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"RovingFocusGroup",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"RovingFocusGroupItem",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"createRovingFocusGroupScope",{enumerable:!0,get:function(){return O}});var o,n=r(_d[0]),u=(o=n)&&o.__esModule?o:{default:o},c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[1])),s=r(_d[2]),l=r(_d[3]),f=r(_d[4]),d=r(_d[5]),p=r(_d[6]),v=r(_d[7]),b=r(_d[8]),y=r(_d[9]),F=r(_d[10]),I=r(_d[11]),w=r(_d[12]),R=r(_d[13]),S="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},E="RovingFocusGroup",[j,_,T]=(0,l.createCollection)(E),[C,O]=(0,d.createContextScope)(E,[T]),[P,x]=C(E),A=c.forwardRef((e,t)=>(0,R.jsx)(j.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(j.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(D,Object.assign({},e,{ref:t}))})}));A.displayName=E;var D=c.forwardRef((t,o)=>{const{__scopeRovingFocusGroup:n,orientation:l,loop:d=!1,dir:p,currentTabStopId:I,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:j,onEntryFocus:T,preventScrollOnEntryFocus:C=!1}=t,O=(0,u.default)(t,e),x=c.useRef(null),A=(0,f.useComposedRefs)(o,x),D=(0,F.useDirection)(p),[G,k]=(0,y.useControllableState)({prop:I,defaultProp:w??null,onChange:j,caller:E}),[H,K]=c.useState(!1),L=(0,b.useCallbackRef)(T),B=_(n),U=c.useRef(!1),[N,z]=c.useState(0);return c.useEffect(()=>{const e=x.current;if(e)return e.addEventListener(S,L),()=>e.removeEventListener(S,L)},[L]),(0,R.jsx)(P,{scope:n,orientation:l,dir:D,loop:d,currentTabStopId:G,onItemFocus:c.useCallback(e=>k(e),[k]),onItemShiftTab:c.useCallback(()=>K(!0),[]),onFocusableItemAdd:c.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>z(e=>e-1),[]),children:(0,R.jsx)(v.Primitive.div,Object.assign({tabIndex:H||0===N?-1:0,"data-orientation":l},O,{ref:A,style:Object.assign({outline:"none"},t.style),onMouseDown:(0,s.composeEventHandlers)(t.onMouseDown,()=>{U.current=!0}),onFocus:(0,s.composeEventHandlers)(t.onFocus,e=>{const t=!U.current;if(e.target===e.currentTarget&&t&&!H){const t=new CustomEvent(S,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=B().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===G),...e].filter(Boolean).map(e=>e.ref.current),C)}}U.current=!1}),onBlur:(0,s.composeEventHandlers)(t.onBlur,()=>K(!1))}))})}),G="RovingFocusGroupItem",k=c.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:n,focusable:l=!0,active:f=!1,tabStopId:d,children:b}=e,y=(0,u.default)(e,t),F=(0,p.useId)(),S=d||F,h=x(G,n),E=h.currentTabStopId===S,T=_(n),{onFocusableItemAdd:C,onFocusableItemRemove:O,currentTabStopId:P}=h,A=(0,w.useIsHydrated)();return(0,I.useLayoutEffect)(()=>{if(A&&l)return C(),()=>O()},[A,l,C,O]),c.useEffect(()=>{if(!A&&l)return C(),()=>O()},[A,l,C,O]),(0,R.jsx)(j.ItemSlot,{scope:n,id:S,focusable:l,active:f,children:(0,R.jsx)(v.Primitive.span,Object.assign({tabIndex:E?0:-1,"data-orientation":h.orientation},y,{ref:o,onMouseDown:(0,s.composeEventHandlers)(e.onMouseDown,e=>{l?h.onItemFocus(S):e.preventDefault()}),onFocus:(0,s.composeEventHandlers)(e.onFocus,()=>h.onItemFocus(S)),onKeyDown:(0,s.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=L(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let u=T().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)u.reverse();else if("prev"===t||"next"===t){"prev"===t&&u.reverse();const c=u.indexOf(e.currentTarget);u=h.loop?(n=c+1,(o=u).map((e,t)=>o[(n+t)%o.length])):u.slice(c+1)}setTimeout(()=>M(u))}var o,n}),children:"function"==typeof b?b({isCurrentTabStop:E,hasTabStop:null!=P}):b}))})});k.displayName=G;var H={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function L(e,t,o){const n=K(e.key,o);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return H[n]}function M(e,t=!1){const o=document.activeElement;for(const n of e){if(n===o)return;if(n.focus({preventScroll:t}),document.activeElement!==o)return}}var B=A,U=k},261,[131,38,191,251,192,193,194,199,201,196,252,195,262,151]);
|
|
318
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useIsHydrated",{enumerable:!0,get:function(){return o}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=!1;var n=e[" useSyncExternalStore ".trim().toString()];function u(){return()=>{}}var o="function"==typeof n?function(){return n(u,()=>!0,()=>!1)}:function(){const[n,u]=e.useState(t);return e.useEffect(()=>{t||(t=!0,u(!0))},[]),n}},262,[38]);
|
|
319
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";const e=["label","description","Icon","rightSlot","disabled","destructive","onSelect","preventAutoClose"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.DropdownItem=function(t){let{label:s,description:x,Icon:u,rightSlot:f,disabled:p,destructive:v,onSelect:h,preventAutoClose:j}=t,b=(0,l.default)(t,e);return(0,n.jsx)(c.Item,Object.assign({"aria-disabled":p,className:(0,o.cx)('relative z-40 flex cursor-pointer items-center justify-between rounded-lg p-2 transition select-none','hocus:bg-hover','hover:outline-0',!p&&'active:scale-98',p&&'cursor-default opacity-60 hocus:bg-default'),onSelect:e=>{p?e.preventDefault():(j&&e.preventDefault(),h?.(e))}},b,{children:(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5",children:[(0,n.jsxs)("div",{className:(0,o.cx)('flex items-center justify-between',p&&'pointer-events-none'),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[u&&(0,n.jsx)("span",{className:(0,o.cx)('flex',v?'text-icon-danger':'text-icon-default'),children:(0,n.jsx)(u,{size:16})}),'string'==typeof s?(0,n.jsx)("p",{className:(0,o.cx)(v?'text-danger':'text-default','text-sm font-medium'),children:s}):s]}),'string'==typeof f?(0,n.jsx)("p",{className:"text-xs text-secondary",children:f}):f]}),x&&'string'==typeof x?(0,n.jsx)("p",{className:"text-xs leading-4.5 text-tertiary",children:x}):null,x&&'string'!=typeof x?x:null]})}))};var t,s=r(d[0]),l=(t=s)&&t.__esModule?t:{default:t},n=r(d[1]),c=r(d[2]),o=r(d[3])},263,[131,151,249,247]);
|
|
320
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Logo=function({style:c}){return(0,l.jsx)("svg",{viewBox:"0 0 71 20",width:72,height:20,fill:"none",role:"img","aria-label":"Expo",style:Object.assign({color:t.text.default,userSelect:'none',WebkitUserSelect:'none',flexShrink:0},c),children:(0,l.jsx)("path",{d:"M9.258 6.342c.158-.23.331-.26.472-.26.14 0 .374.03.532.26 2.06 2.806 6.332 10.208 6.727 10.611.585.597 1.388.225 1.854-.452.46-.667.587-1.135.587-1.634 0-.34-6.653-12.614-7.324-13.636C11.462.248 11.252 0 10.15 0h-.825c-1.1 0-1.259.248-1.903 1.23C6.75 2.254.097 14.528.097 14.868c0 .5.127.967.587 1.634.466.677 1.269 1.05 1.854.452.395-.403 4.661-7.805 6.72-10.61zm14.941-5.237v15.344h9.35v-3.113h-6.125v-3.244h5.45V6.98h-5.45V4.218h6.125V1.105h-9.35zM46.25 16.449l-3.88-5.568 3.619-5.195h-3.662L40.54 8.23l-1.765-2.543h-3.706l3.618 5.217-3.857 5.546h3.661l2.027-2.915 2.027 2.915h3.705zm7.572-10.982c-1.482 0-2.637.614-3.378 1.732V5.686H47.37V20h3.073v-5.063c.74 1.117 1.896 1.731 3.378 1.731 2.768 0 4.97-2.52 4.97-5.611 0-3.091-2.202-5.59-4.97-5.59zm-.697 8.242c-1.504 0-2.681-1.14-2.681-2.652 0-1.49 1.177-2.653 2.68-2.653 1.483 0 2.681 1.184 2.681 2.653 0 1.49-1.198 2.652-2.68 2.652zm12.188-8.242c-3.16 0-5.558 2.411-5.558 5.612 0 3.2 2.397 5.59 5.557 5.59 3.139 0 5.558-2.39 5.558-5.59 0-3.2-2.42-5.612-5.558-5.612zm0 2.96c1.438 0 2.55 1.117 2.55 2.652 0 1.49-1.112 2.63-2.55 2.63-1.46 0-2.55-1.14-2.55-2.63 0-1.535 1.09-2.653 2.55-2.653z",fill:"currentColor"})})};var l=r(d[0]),t=r(d[1])},264,[151,183]);
|
|
321
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ResizeHandle=function({side:s,offset:c,onResize:u,onResizeStart:l,onResizeEnd:f}){const[p,b]=(0,n.useState)(!1),[P,y]=(0,n.useState)(!1),v=(0,n.useRef)(0),z=(0,n.useRef)(!1);function R(t){z.current&&(z.current=!1,y(!1),t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId),f?.())}const h=p||P;return(0,t.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",onPointerDown:function(t){0===t.button&&(t.preventDefault(),v.current=t.clientX,z.current=!0,y(!0),t.currentTarget.setPointerCapture(t.pointerId),l?.())},onPointerMove:function(t){if(!z.current)return;const n=t.clientX-v.current;u('left'===s?n:-n)},onPointerUp:R,onPointerCancel:R,onPointerEnter:()=>b(!0),onPointerLeave:()=>b(!1),style:{position:'absolute',top:0,bottom:0,[s]:c,transform:'left'===s?'translateX(-50%)':'translateX(50%)',width:12,display:'flex',alignItems:'center',justifyContent:'center',boxSizing:'border-box',cursor:'col-resize',touchAction:'none',zIndex:5},children:(0,t.jsx)("div",{style:{width:4,height:40,borderRadius:999,backgroundColor:P?o.icon.secondary:o.icon.tertiary,opacity:h?1:0,transition:'opacity 120ms ease, background-color 120ms ease'}})})};var t=r(d[0]),n=r(d[1]),o=r(d[2])},265,[151,38,183]);
|
|
322
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SegmentedControl=function({ariaLabel:c,ariaDescribedBy:f,options:h,value:p,onChange:x}){const v=h.findIndex(t=>t.value===p),y=(0,o.useRef)([]),[w,z]=(0,o.useState)(null),S=(0,o.useCallback)(()=>{const t=y.current[v];if(!t)return void z(null);const o={left:t.offsetLeft,width:t.offsetWidth};z(t=>t?.left===o.left&&t.width===o.width?t:o)},[v]);return(0,o.useLayoutEffect)(()=>{if(S(),'undefined'==typeof ResizeObserver)return;const t=new ResizeObserver(S);return y.current.forEach(o=>{o&&t.observe(o)}),()=>t.disconnect()},[S,h.length]),(0,t.jsxs)("div",{role:"group","aria-label":c,"aria-describedby":f,style:{display:'flex',position:'relative',flexShrink:0,marginLeft:'auto',gap:u,height:l,padding:u,boxSizing:'border-box',border:`1px solid ${n.border.default}`,borderRadius:n.radius.full,backgroundColor:n.bg.subtle},children:[w&&(0,t.jsx)("span",{"aria-hidden":"true",style:{position:'absolute',top:u,left:w.left,width:w.width,height:s,borderRadius:n.radius.full,backgroundColor:n.text.default,transition:'left 180ms cubic-bezier(.4, 0, .2, 1), width 180ms cubic-bezier(.4, 0, .2, 1)'}}),h.map((o,l)=>{const u=p===o.value;return(0,t.jsx)("button",{ref:t=>{y.current[l]=t},type:"button",disabled:o.disabled,"aria-pressed":u,onClick:()=>x(o.value),style:Object.assign({},n.textSize.xs,{position:'relative',zIndex:1,width:'auto',height:s,flexShrink:0,boxSizing:'border-box',padding:`0 ${b}px`,border:0,borderRadius:n.radius.full,backgroundColor:'transparent',color:u?n.bg.default:n.text.secondary,fontFamily:'inherit',fontWeight:500,whiteSpace:'nowrap',cursor:o.disabled?'default':'pointer',opacity:o.disabled?.5:1,transition:'color 120ms cubic-bezier(.4, 0, .2, 1)'}),children:o.label},o.value)})]})};var t=r(d[0]),o=r(d[1]),n=r(d[2]);const l=28,s=22,u=2,b=8},266,[151,38,183]);
|
|
323
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Select=function({ariaLabel:c,value:h,options:x,disabled:u=!1,onChange:b}){const[p,f]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),w=x.find(t=>t.value===h)?.label??h;return(0,t.jsxs)(n.Root,{value:h,open:p,onOpenChange:f,disabled:u,onValueChange:t=>b(t),children:[(0,t.jsxs)(n.Trigger,{"aria-label":c,onFocus:()=>j(!0),onBlur:()=>j(!1),style:Object.assign({},o.textSize.xs,{display:'inline-flex',width:'max-content',height:30,flexShrink:0,alignItems:'center',justifyContent:'space-between',gap:8,boxSizing:'border-box',padding:'0 7px 0 9px',border:`1px solid ${o.border.default}`,borderRadius:o.radius.md,outline:'none',backgroundColor:o.bg.subtle,boxShadow:y?`0 0 0 2px ${o.border.secondary}`:o.shadow.none,color:o.text.default,fontFamily:'inherit',cursor:u?'default':'pointer',opacity:u?.5:1}),children:[(0,t.jsxs)("span",{style:{display:'inline-grid',minWidth:0,whiteSpace:'nowrap'},children:[(0,t.jsx)(n.Value,{children:w}),(0,t.jsx)("span",{"aria-hidden":"true",style:{display:'inline-grid',gridArea:'2 / 1',height:0,overflow:'hidden',visibility:'hidden'},children:x.map(n=>(0,t.jsx)("span",{style:{gridArea:'1 / 1'},children:n.label},n.value))})]}),(0,t.jsx)(n.Icon,{"aria-hidden":"true",style:{display:'flex',flexShrink:0,color:o.icon.secondary,transform:p?'rotate(180deg)':void 0,transition:'transform 120ms ease'},children:(0,t.jsx)(s.ChevronDownIcon,{size:14})})]}),(0,t.jsx)(n.Portal,{children:(0,t.jsx)(n.Content,{position:"popper",align:"end",sideOffset:4,collisionPadding:8,className:"will-change-[opacity,transform] data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade data-[side=right]:animate-slideLeftAndFade data-[side=top]:animate-slideDownAndFade",style:Object.assign({},o.textSize.xs,{zIndex:605,width:'var(--radix-select-trigger-width)',minWidth:'var(--radix-select-trigger-width)',maxHeight:'var(--radix-select-content-available-height)',boxSizing:'border-box',overflow:'hidden',padding:4,border:`1px solid ${o.border.default}`,borderRadius:o.radius.md,outline:'none',backgroundColor:o.bg.subtle,boxShadow:o.shadow.md,color:o.text.default,fontFamily:'inherit'}),children:(0,t.jsx)(n.Viewport,{children:x.map(l=>(0,t.jsxs)(n.Item,{value:l.value,textValue:l.label,disabled:l.disabled,className:"data-[highlighted]:bg-hover data-[state=checked]:bg-element",style:{display:'flex',width:'100%',height:30,alignItems:'center',justifyContent:'space-between',gap:4,boxSizing:'border-box',padding:'0 4px',borderRadius:o.radius.sm,outline:'none',color:o.text.default,cursor:l.disabled?'default':'pointer',opacity:l.disabled?.5:1,userSelect:'none'},children:[(0,t.jsx)(n.ItemText,{children:l.label}),(0,t.jsx)("span",{"aria-hidden":"true",style:{display:'flex',width:14,flexShrink:0,alignItems:'center',justifyContent:'center',color:o.icon.default},children:(0,t.jsx)(n.ItemIndicator,{children:(0,t.jsx)(s.CheckIcon,{size:12})})})]},l.value))})})})]})};var t=r(d[0]),n=r(d[1]),l=r(d[2]),o=r(d[3]),s=r(d[4])},267,[151,268,38,183,186]);
|
|
324
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopeSelect","children"],t=["__scopeSelect","disabled"],n=["__scopeSelect","className","style","children","placeholder"],o=["__scopeSelect","children"],l=["__scopeSelect","forceMount"],c=["forceMount"],s=["position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions"],u=["__scopeSelect","onPlaced"],d=["__scopeSelect","align","collisionPadding"],f=["__scopeSelect","nonce"],p=["__scopeSelect"],b=["__scopeSelect"],h=["__scopeSelect","value","disabled","textValue"],v=["__scopeSelect","className","style"],S=["__scopeSelect"],w=["__scopeSelect","onAutoScroll"],y=["__scopeSelect"],x=["__scopeSelect"],j=["__scopeSelect"];function P(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(_e,"Group",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"Icon",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"Item",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(_e,"ItemIndicator",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"ItemText",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"ScrollDownButton",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(_e,"ScrollUpButton",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(_e,"Select",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"SelectArrow",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(_e,"SelectContent",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(_e,"SelectGroup",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(_e,"SelectIcon",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"SelectItem",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(_e,"SelectItemIndicator",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(_e,"SelectItemText",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(_e,"SelectLabel",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(_e,"SelectPortal",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e,"SelectScrollDownButton",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(_e,"SelectScrollUpButton",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(_e,"SelectSeparator",{enumerable:!0,get:function(){return et}}),Object.defineProperty(_e,"SelectTrigger",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e,"SelectValue",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(_e,"SelectViewport",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"Separator",{enumerable:!0,get:function(){return et}}),Object.defineProperty(_e,"Trigger",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e,"Value",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(_e,"Viewport",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"createSelectScope",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"unstable_BubbleInput",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(_e,"unstable_Provider",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(_e,"unstable_SelectBubbleInput",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(_e,"unstable_SelectProvider",{enumerable:!0,get:function(){return ge}});var _,C=r(_d[0]),O=(_=C)&&_.__esModule?_:{default:_},E=P(r(_d[1])),I=P(r(_d[2])),R=r(_d[3]),T=r(_d[4]),D=r(_d[5]),k=r(_d[6]),L=r(_d[7]),H=r(_d[8]),M=r(_d[9]),A=r(_d[10]),B=r(_d[11]),V=r(_d[12]),F=r(_d[13]),N=P(F),K=r(_d[14]),W=r(_d[15]),U=r(_d[16]),q=r(_d[17]),z=r(_d[18]),G=r(_d[19]),Y=r(_d[20]),X=r(_d[21]),Z=r(_d[22]),$=r(_d[23]),J=r(_d[24]),Q=r(_d[25]),ee=Object.defineProperty,te=(e,t)=>ee(e,"name",{value:t,configurable:!0}),ne=[" ","Enter","ArrowUp","ArrowDown"],oe=[" ","Enter"],re="Select",[le,ce,ie]=(0,D.createCollection)(re),[se,ae]=(0,L.createContextScope)(re,[ie,F.createPopperScope]),ue=(0,F.createPopperScope)(),[de,fe]=se(re),[pe,me]=se(re);function ge(e){const{__scopeSelect:t,children:n,open:o,defaultOpen:l,onOpenChange:c,value:s,defaultValue:u,onValueChange:d,dir:f,name:p,autoComplete:b,disabled:h,required:v,form:S,internal_do_not_use_render:w}=e,y=ue(t),[x,j]=E.useState(null),[P,_]=E.useState(null),[C,O]=E.useState(!1),I=(0,H.useDirection)(f),[R,T]=(0,G.useControllableState)({prop:o,defaultProp:l??!1,onChange:c,caller:re}),[D,k]=(0,G.useControllableState)({prop:s,defaultProp:u,onChange:d,caller:re}),L=E.useRef(null),M=E.useRef(D);E.useEffect(()=>{const e=S?x?.ownerDocument.getElementById(S):x?.form;if(e instanceof HTMLFormElement){const t=te(()=>k(M.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[S,x,k]);const A=!x||(!!S||!!x.closest("form")),[B,F]=E.useState(new Set),K=(0,V.useId)(),W=Array.from(B).map(e=>e.props.value).join(";"),U=E.useCallback(e=>{F(t=>new Set(t).add(e))},[]),q=E.useCallback(e=>{F(t=>{const n=new Set(t);return n.delete(e),n})},[]),z={required:v,trigger:x,onTriggerChange:j,valueNode:P,onValueNodeChange:_,valueNodeHasChildren:C,onValueNodeHasChildrenChange:O,contentId:K,value:D,onValueChange:k,open:R,onOpenChange:T,dir:I,triggerPointerDownPosRef:L,disabled:h,name:p,autoComplete:b,form:S,nativeOptions:B,nativeSelectKey:W,isFormControl:A};return(0,Q.jsx)(N.Root,Object.assign({},y,{children:(0,Q.jsx)(de,Object.assign({scope:t},z,{children:(0,Q.jsx)(le.Provider,{scope:t,children:(0,Q.jsx)(pe,{scope:t,onNativeOptionAdd:U,onNativeOptionRemove:q,children:ot(w)?w(z):n})})}))}))}te(ge,"SelectProvider");var be=te(t=>{const{__scopeSelect:n,children:o}=t,l=(0,O.default)(t,e);return(0,Q.jsx)(ge,Object.assign({__scopeSelect:n},l,{internal_do_not_use_render:({isFormControl:e})=>(0,Q.jsxs)(Q.Fragment,{children:[o,e?(0,Q.jsx)(nt,{__scopeSelect:n}):null]})}))},"Select"),he=E.forwardRef(te(function(e,n){const{__scopeSelect:o,disabled:l=!1}=e,c=(0,O.default)(e,t),s=ue(o),u=fe("SelectTrigger",o),d=u.disabled||l,f=(0,k.useComposedRefs)(n,u.onTriggerChange),p=ce(o),b=E.useRef("touch"),[h,v,S]=lt(e=>{const t=p().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),o=ct(t,e,n);void 0!==o&&u.onValueChange(o.value)}),w=te(e=>{d||(u.onOpenChange(!0),S()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,Q.jsx)(N.Anchor,Object.assign({asChild:!0},s,{children:(0,Q.jsx)(U.Primitive.button,Object.assign({type:"button",role:"combobox","aria-controls":u.open?u.contentId:void 0,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":rt(u.value)?"":void 0},c,{ref:f,onClick:(0,T.composeEventHandlers)(c.onClick,e=>{e.currentTarget.focus(),"mouse"!==b.current&&w(e)}),onPointerDown:(0,T.composeEventHandlers)(c.onPointerDown,e=>{b.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,T.composeEventHandlers)(c.onKeyDown,e=>{const t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),t&&" "===e.key||ne.includes(e.key)&&(w(),e.preventDefault())})}))}))},"SelectTrigger")),ve=E.forwardRef(te(function(e,t){const{__scopeSelect:o,children:l,placeholder:c=""}=e,s=(0,O.default)(e,n),u=fe("SelectValue",o),{onValueNodeHasChildrenChange:d}=u,f=void 0!==l,p=(0,k.useComposedRefs)(t,u.onValueNodeChange);(0,Y.useLayoutEffect)(()=>{d(f)},[d,f]);const b=rt(u.value);return(0,Q.jsx)(U.Primitive.span,Object.assign({},s,{asChild:!b&&s.asChild,ref:p,style:{pointerEvents:"none"},children:(0,Q.jsx)(E.Fragment,{children:b?c:l},b?"placeholder":"value")}))},"SelectValue")),Se=E.forwardRef(te(function(e,t){const{children:n}=e,l=(0,O.default)(e,o);return(0,Q.jsx)(U.Primitive.span,Object.assign({"aria-hidden":!0},l,{ref:t,children:n||"\u25bc"}))},"SelectIcon")),[we,ye]=se("SelectPortal",{forceMount:void 0}),xe=te(e=>{const{forceMount:t}=e,n=(0,O.default)(e,l);return(0,Q.jsx)(we,{scope:e.__scopeSelect,forceMount:t,children:(0,Q.jsx)(K.Portal,Object.assign({asChild:!0},n))})},"SelectPortal"),je="SelectContent",Pe=E.forwardRef(te(function(e,t){const n=ye(je,e.__scopeSelect),{forceMount:o=n.forceMount}=e,l=(0,O.default)(e,c),s=fe(je,e.__scopeSelect),[u,d]=E.useState();return(0,Y.useLayoutEffect)(()=>{d(new DocumentFragment)},[]),(0,Q.jsx)(W.Presence,{present:o||s.open,children:({present:e})=>e?(0,Q.jsx)(Te,Object.assign({},l,{ref:t})):(0,Q.jsx)(Ce,Object.assign({},l,{fragment:u}))})},"SelectContent")),Ce=E.forwardRef(te(function(e,t){const{__scopeSelect:n,children:o,fragment:l}=e;return l?I.createPortal((0,Q.jsx)(Ee,{scope:n,children:(0,Q.jsx)(le.Slot,{scope:n,children:(0,Q.jsx)("div",{ref:t,children:o})})}),l):null},"SelectContentFragment")),Oe=10,[Ee,Ie]=se(je),Re=(0,q.createSlot)("SelectContent.RemoveScroll"),Te=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,{position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,side:d,sideOffset:f,align:p,alignOffset:b,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:w,hideWhenDetached:y,avoidCollisions:x}=e,j=(0,O.default)(e,s),P=fe(je,n),[_,C]=E.useState(null),[I,R]=E.useState(null),D=(0,k.useComposedRefs)(t,C),[L,H]=E.useState(null),[V,F]=E.useState(null),N=ce(n),[K,W]=E.useState(!1),U=E.useRef(!1);E.useEffect(()=>{if(_)return(0,$.hideOthers)(_)},[_]),(0,A.useFocusGuards)();const q=E.useCallback(e=>{const[t,...n]=N().map(e=>e.ref.current),[o]=n.slice(-1),l=document.activeElement;for(const n of e){if(n===l)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&I&&(I.scrollTop=0),n===o&&I&&(I.scrollTop=I.scrollHeight),n?.focus(),document.activeElement!==l)return}},[N,I]),z=E.useCallback(()=>q([L,_]),[q,L,_]);E.useEffect(()=>{K&&z()},[K,z]);const{onOpenChange:G,triggerPointerDownPosRef:Y}=P;E.useEffect(()=>{if(_){let e={x:0,y:0};const t=te(t=>{e={x:Math.abs(Math.round(t.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(Y.current?.y??0))}},"handlePointerMove"),n=te(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(_)||G(!1),document.removeEventListener("pointermove",t),Y.current=null},"handlePointerUp");return null!==Y.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[_,G,Y]),E.useEffect(()=>{const e=te(()=>G(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);const[X,Z]=lt(e=>{const t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),o=ct(t,e,n);o&&setTimeout(()=>o.ref.current?.focus())}),ee=E.useCallback((e,t,n)=>{const o=!U.current&&!n;(void 0!==P.value&&P.value===t||o)&&(H(e),o&&(U.current=!0))},[P.value]),ne=E.useCallback(()=>_?.focus(),[_]),oe=E.useCallback((e,t,n)=>{const o=!U.current&&!n;(void 0!==P.value&&P.value===t||o)&&F(e)},[P.value]),re="popper"===o?ke:De,le=re===ke?{side:d,sideOffset:f,align:p,alignOffset:b,arrowPadding:h,collisionBoundary:v,collisionPadding:S,sticky:w,hideWhenDetached:y,avoidCollisions:x}:{};return(0,Q.jsx)(Ee,{scope:n,content:_,viewport:I,onViewportChange:R,itemRefCallback:ee,selectedItem:L,onItemLeave:ne,itemTextRefCallback:oe,focusSelectedItem:z,selectedItemText:V,position:o,isPositioned:K,searchRef:X,children:(0,Q.jsx)(J.RemoveScroll,{as:Re,allowPinchZoom:!0,children:(0,Q.jsx)(B.FocusScope,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,T.composeEventHandlers)(l,e=>{P.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Q.jsx)(M.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:(0,Q.jsx)(re,Object.assign({role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault()},j,le,{onPlaced:()=>W(!0),ref:D,style:Object.assign({display:"flex",flexDirection:"column",outline:"none"},j.style),onKeyDown:(0,T.composeEventHandlers)(j.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,o=t.indexOf(n);t=t.slice(o+1)}setTimeout(()=>q(t)),e.preventDefault()}})}))})})})})},"SelectContentImpl")),De=E.forwardRef(te(function(e,t){const{__scopeSelect:n,onPlaced:o}=e,l=(0,O.default)(e,u),c=fe(je,n),s=Ie(je,n),[d,f]=E.useState(null),[p,b]=E.useState(null),h=(0,k.useComposedRefs)(t,b),v=ce(n),S=E.useRef(!1),w=E.useRef(!0),{viewport:y,selectedItem:x,selectedItemText:j,focusSelectedItem:P}=s,_=E.useCallback(()=>{if(c.trigger&&c.valueNode&&d&&p&&y&&x&&j){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),l=j.getBoundingClientRect();if("rtl"!==c.dir){const o=l.left-t.left,c=n.left-o,s=e.left-c,u=e.width+s,f=Math.max(u,t.width),p=window.innerWidth-Oe,b=(0,R.clamp)(c,[Oe,Math.max(Oe,p-f)]);d.style.minWidth=u+"px",d.style.left=b+"px"}else{const o=t.right-l.right,c=window.innerWidth-n.right-o,s=window.innerWidth-e.right-c,u=e.width+s,f=Math.max(u,t.width),p=window.innerWidth-Oe,b=(0,R.clamp)(c,[Oe,Math.max(Oe,p-f)]);d.style.minWidth=u+"px",d.style.right=b+"px"}const s=v(),u=window.innerHeight-20,f=y.scrollHeight,b=window.getComputedStyle(p),h=parseInt(b.borderTopWidth,10),w=parseInt(b.paddingTop,10),P=parseInt(b.borderBottomWidth,10),_=h+w+f+parseInt(b.paddingBottom,10)+P,C=Math.min(5*x.offsetHeight,_),O=window.getComputedStyle(y),E=parseInt(O.paddingTop,10),I=parseInt(O.paddingBottom,10),T=e.top+e.height/2-Oe,D=u-T,k=x.offsetHeight/2,L=h+w+(x.offsetTop+k),H=_-L;if(L<=T){const e=s.length>0&&x===s[s.length-1].ref.current;d.style.bottom="0px";const t=p.clientHeight-y.offsetTop-y.offsetHeight,n=L+Math.max(D,k+(e?I:0)+t+P);d.style.height=n+"px"}else{const e=s.length>0&&x===s[0].ref.current;d.style.top="0px";const t=Math.max(T,h+y.offsetTop+(e?E:0)+k)+H;d.style.height=t+"px",y.scrollTop=L-T+y.offsetTop}d.style.margin=`${Oe}px 0`,d.style.minHeight=C+"px",d.style.maxHeight=u+"px",o?.(),requestAnimationFrame(()=>S.current=!0)}},[v,c.trigger,c.valueNode,d,p,y,x,j,c.dir,o]);(0,Y.useLayoutEffect)(()=>_(),[_]);const[C,I]=E.useState();(0,Y.useLayoutEffect)(()=>{p&&I(window.getComputedStyle(p).zIndex)},[p]);const T=E.useCallback(e=>{e&&!0===w.current&&(_(),P?.(),w.current=!1)},[_,P]);return(0,Q.jsx)(Le,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:S,onScrollButtonChange:T,children:(0,Q.jsx)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:(0,Q.jsx)(U.Primitive.div,Object.assign({},l,{ref:h,style:Object.assign({boxSizing:"border-box",maxHeight:"100%"},l.style)}))})})},"SelectItemAlignedPosition")),ke=E.forwardRef(te(function(e,t){const{__scopeSelect:n,align:o="start",collisionPadding:l=Oe}=e,c=(0,O.default)(e,d),s=ue(n);return(0,Q.jsx)(N.Content,Object.assign({},s,c,{ref:t,align:o,collisionPadding:l,style:Object.assign({boxSizing:"border-box"},c.style,{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"})}))},"SelectPopperPosition")),[Le,He]=se(je,{}),Me="SelectViewport",Ae=E.forwardRef(te(function(e,t){const{__scopeSelect:n,nonce:o}=e,l=(0,O.default)(e,f),c=Ie(Me,n),s=He(Me,n),u=(0,k.useComposedRefs)(t,c.onViewportChange),d=E.useRef(0);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Q.jsx)(le.Slot,{scope:n,children:(0,Q.jsx)(U.Primitive.div,Object.assign({"data-radix-select-viewport":"",role:"presentation"},l,{ref:u,style:Object.assign({position:"relative",flex:1,overflow:"hidden auto"},l.style),onScroll:(0,T.composeEventHandlers)(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:o}=s;if(o?.current&&n){const e=Math.abs(d.current-t.scrollTop);if(e>0){const o=window.innerHeight-20,l=parseFloat(n.style.minHeight),c=parseFloat(n.style.height),s=Math.max(l,c);if(s<o){const l=s+e,c=Math.min(o,l),u=l-c;n.style.height=c+"px","0px"===n.style.bottom&&(t.scrollTop=u>0?u:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})}))})]})},"SelectViewport")),[Be,Ve]=se("SelectGroup"),Fe=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,p),l=(0,V.useId)();return(0,Q.jsx)(Be,{scope:n,id:l,children:(0,Q.jsx)(U.Primitive.div,Object.assign({role:"group","aria-labelledby":l},o,{ref:t}))})},"SelectGroup")),Ne=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,b),l=Ve("SelectLabel",n);return(0,Q.jsx)(U.Primitive.div,Object.assign({id:l.id},o,{ref:t}))},"SelectLabel")),Ke="SelectItem",[We,Ue]=se(Ke),qe=E.forwardRef(te(function(e,t){const{__scopeSelect:n,value:o,disabled:l=!1,textValue:c}=e,s=(0,O.default)(e,h),u=fe(Ke,n),d=Ie(Ke,n),f=u.value===o,[p,b]=E.useState(c??""),[v,S]=E.useState(!1),w=(0,z.useCallbackRef)(e=>d.itemRefCallback?.(e,o,l)),y=(0,k.useComposedRefs)(t,w),x=(0,V.useId)(),j=E.useRef("touch"),P=te(()=>{l||(u.onValueChange(o),u.onOpenChange(!1))},"handleSelect");return(0,Q.jsx)(We,{scope:n,value:o,disabled:l,textId:x,isSelected:f,onItemTextChange:E.useCallback(e=>{b(t=>t||(e?.textContent??"").trim())},[]),children:(0,Q.jsx)(le.ItemSlot,{scope:n,value:o,disabled:l,textValue:p,children:(0,Q.jsx)(U.Primitive.div,Object.assign({role:"option","aria-labelledby":x,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1},s,{ref:y,onFocus:(0,T.composeEventHandlers)(s.onFocus,()=>S(!0)),onBlur:(0,T.composeEventHandlers)(s.onBlur,()=>S(!1)),onClick:(0,T.composeEventHandlers)(s.onClick,()=>{"mouse"!==j.current&&P()}),onPointerUp:(0,T.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===j.current&&P()}),onPointerDown:(0,T.composeEventHandlers)(s.onPointerDown,e=>{j.current=e.pointerType}),onPointerMove:(0,T.composeEventHandlers)(s.onPointerMove,e=>{j.current=e.pointerType,l?d.onItemLeave?.():"mouse"===j.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,T.composeEventHandlers)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,T.composeEventHandlers)(s.onKeyDown,e=>{if(l||e.target!==e.currentTarget)return;""!==d.searchRef?.current&&" "===e.key||(oe.includes(e.key)&&P()," "===e.key&&e.preventDefault())})}))})})},"SelectItem")),ze="SelectItemText",Ge=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,v),l=fe(ze,n),c=Ie(ze,n),s=Ue(ze,n),u=me(ze,n),[d,f]=E.useState(null),p=(0,z.useCallbackRef)(e=>c.itemTextRefCallback?.(e,s.value,s.disabled)),b=(0,k.useComposedRefs)(t,f,s.onItemTextChange,p),h=d?.textContent,S=E.useMemo(()=>(0,Q.jsx)("option",{value:s.value,disabled:s.disabled,children:h},s.value),[s.disabled,s.value,h]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=u;return(0,Y.useLayoutEffect)(()=>(w(S),()=>y(S)),[w,y,S]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(U.Primitive.span,Object.assign({id:s.textId},o,{ref:b})),s.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!rt(l.value)?I.createPortal(o.children,l.valueNode):null]})},"SelectItemText")),Ye=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,S);return Ue("SelectItemIndicator",n).isSelected?(0,Q.jsx)(U.Primitive.span,Object.assign({"aria-hidden":!0},o,{ref:t})):null},"SelectItemIndicator")),Xe="SelectScrollUpButton",Ze=E.forwardRef(te(function(e,t){const n=Ie(Xe,e.__scopeSelect),o=He(Xe,e.__scopeSelect),[l,c]=E.useState(!1),s=(0,k.useComposedRefs)(t,o.onScrollButtonChange);return(0,Y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;c(e)};te(e,"handleScroll");const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),l?(0,Q.jsx)(Qe,Object.assign({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null},"SelectScrollUpButton")),$e="SelectScrollDownButton",Je=E.forwardRef(te(function(e,t){const n=Ie($e,e.__scopeSelect),o=He($e,e.__scopeSelect),[l,c]=E.useState(!1),s=(0,k.useComposedRefs)(t,o.onScrollButtonChange);return(0,Y.useLayoutEffect)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;c(n)};te(e,"handleScroll");const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),l?(0,Q.jsx)(Qe,Object.assign({},e,{ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null},"SelectScrollDownButton")),Qe=E.forwardRef(te(function(e,t){const{__scopeSelect:n,onAutoScroll:o}=e,l=(0,O.default)(e,w),c=Ie("SelectScrollButton",n),s=E.useRef(null),u=ce(n),d=E.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return E.useEffect(()=>()=>d(),[d]),(0,Y.useLayoutEffect)(()=>{const e=u().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[u]),(0,Q.jsx)(U.Primitive.div,Object.assign({"aria-hidden":!0},l,{ref:t,style:Object.assign({flexShrink:0},l.style),onPointerDown:(0,T.composeEventHandlers)(l.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:(0,T.composeEventHandlers)(l.onPointerMove,()=>{c.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:(0,T.composeEventHandlers)(l.onPointerLeave,()=>{d()})}))},"SelectScrollButtonImpl")),et=E.forwardRef(te(function(e,t){const n=(0,O.default)(e,y);return(0,Q.jsx)(U.Primitive.div,Object.assign({"aria-hidden":!0},n,{ref:t}))},"SelectSeparator")),tt=E.forwardRef(te(function(e,t){const{__scopeSelect:n}=e,o=(0,O.default)(e,x),l=ue(n);return"popper"===Ie("SelectArrow",n).position?(0,Q.jsx)(N.Arrow,Object.assign({},l,o,{ref:t})):null},"SelectArrow")),nt=E.forwardRef(te(function(e,t){let{__scopeSelect:n}=e,o=(0,O.default)(e,j);const l=fe("SelectBubbleInput",n),{value:c,onValueChange:s,required:u,disabled:d,name:f,autoComplete:p,form:b}=l,{nativeOptions:h,nativeSelectKey:v}=l,S=E.useRef(null),w=(0,k.useComposedRefs)(t,S),y=c??"",x=(0,X.usePrevious)(y),P=Array.from(h).some(e=>""===(e.props.value??""));return E.useEffect(()=>{const e=S.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(x!==y&&n){const t=new Event("change",{bubbles:!0});n.call(e,y),e.dispatchEvent(t)}},[x,y]),(0,Q.jsxs)(U.Primitive.select,Object.assign({"aria-hidden":!0,required:u,tabIndex:-1,name:f,autoComplete:p,disabled:d,form:b,onChange:e=>s(e.target.value)},o,{style:Object.assign({},Z.VISUALLY_HIDDEN_STYLES,o.style),ref:w,defaultValue:y,children:[rt(c)&&!P?(0,Q.jsx)("option",{value:""}):null,Array.from(h)]}),v)},"SelectBubbleInput"));function ot(e){return"function"==typeof e}function rt(e){return""===e||void 0===e}function lt(e){const t=(0,z.useCallbackRef)(e),n=E.useRef(""),o=E.useRef(0),l=E.useCallback(e=>{const l=n.current+e;t(l),te(function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))},"updateSearch")(l)},[t]),c=E.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,c]}function ct(e,t,n){const o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=it(e,Math.max(l,0));1===o.length&&(c=c.filter(e=>e!==n));const s=c.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}function it(e,t){return e.map((n,o)=>e[(t+o)%e.length])}te(ot,"isFunction"),te(rt,"shouldShowPlaceholder"),te(lt,"useTypeaheadSearch"),te(ct,"findNextItem"),te(it,"wrapArray")},268,[131,38,40,269,270,271,246,274,275,276,278,279,280,282,285,286,244,245,277,287,281,290,243,242,206,151]);
|
|
325
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"clamp",{enumerable:!0,get:function(){return t}});function t(t,[n,u]){return Math.min(u,Math.max(n,t))}(0,Object.defineProperty)(t,"name",{value:"clamp",configurable:!0})},269,[]);
|
|
326
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"canUseDOM",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"composeEventHandlers",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"getActiveElement",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"getOwnerDocument",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"getOwnerWindow",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"isFrame",{enumerable:!0,get:function(){return w}});var n=Object.defineProperty,t=(t,o)=>n(t,"name",{value:o,configurable:!0}),o=!("undefined"==typeof window||!window.document||!window.document.createElement);function u(n,o,{checkForDefaultPrevented:u=!0}={}){return t(function(t){if(n?.(t),!1===u||!t||!t.defaultPrevented)return o?.(t)},"handleEvent")}function c(n){if(!o)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}function f(n){if(!o)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}function l(n,t=!1){const{activeElement:o}=f(n);if(!o?.nodeName)return null;if(w(o)&&o.contentDocument)return l(o.contentDocument.body,t);if(t){const n=o.getAttribute("aria-activedescendant");if(n){const t=f(o).getElementById(n);if(t)return t}}return o}function w(n){return"IFRAME"===n.tagName}t(u,"composeEventHandlers"),t(c,"getOwnerWindow"),t(f,"getOwnerDocument"),t(l,"getActiveElement"),t(w,"isFrame")},270,[]);
|
|
327
|
+
__d(function(g,r,_i,_a,m,_e,_d){"use strict";var e,t;const n=["scope","children"],s=["state"],i=["scope","children"];function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"createCollection",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"unstable_createCollection",{enumerable:!0,get:function(){return S}});var l=o(r(_d[0])),c=o(r(_d[1])),u=o(r(_d[2])),f=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),a=r(_d[4]),h=r(_d[5]),d=r(_d[6]),p=r(_d[7]),y=Object.defineProperty,O=(e,t)=>y(e,"name",{value:t,configurable:!0});function R(e){const t=e+"CollectionProvider",[s,i]=(0,a.createContextScope)(t),[o,l]=s(t,{collectionRef:{current:null},itemMap:new Map}),c=O(e=>{const{scope:t,children:n}=e,s=f.useRef(null),i=f.useRef(new Map).current;return(0,p.jsx)(o,{scope:t,itemMap:i,collectionRef:s,children:n})},"CollectionProvider");c.displayName=t;const y=e+"CollectionSlot",R=(0,d.createSlot)(y),b=f.forwardRef((e,t)=>{const{scope:n,children:s}=e,i=l(y,n),o=(0,h.useComposedRefs)(t,i.collectionRef);return(0,p.jsx)(R,{ref:o,children:s})});b.displayName=y;const C=e+"CollectionItemSlot",j="data-radix-collection-item",v=(0,d.createSlot)(C),x=f.forwardRef((e,t)=>{const{scope:s,children:i}=e,o=(0,u.default)(e,n),c=f.useRef(null),a=(0,h.useComposedRefs)(t,c),d=l(C,s);return f.useEffect(()=>(d.itemMap.set(c,Object.assign({ref:c},o)),()=>{d.itemMap.delete(c)})),(0,p.jsx)(v,Object.assign({},{[j]:""},{ref:a,children:i}))});function S(t){const n=l(e+"CollectionConsumer",t);return f.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${j}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return x.displayName=C,O(S,"useCollection"),[{Provider:c,Slot:b,ItemSlot:x},S,i]}O(R,"createCollection");var b=new WeakMap,C=(t=(0,c.default)("keys"),e=class e extends Map{constructor(e){super(e),Object.defineProperty(this,t,{writable:!0,value:void 0}),(0,l.default)(this,t)[t]=[...super.keys()],b.set(this,!0)}set(e,n){return b.get(this)&&(this.has(e)?(0,l.default)(this,t)[t][(0,l.default)(this,t)[t].indexOf(e)]=e:(0,l.default)(this,t)[t].push(e)),super.set(e,n),this}insert(e,n,s){const i=this.has(n),o=(0,l.default)(this,t)[t].length,c=x(e);let u=c>=0?c:o+c;const f=u<0||u>=o?-1:u;if(f===this.size||i&&f===this.size-1||-1===f)return this.set(n,s),this;const a=this.size+(i?0:1);c<0&&u++;const h=[...(0,l.default)(this,t)[t]];let d,p=!1;for(let e=u;e<a;e++)if(u===e){let t=h[e];h[e]===n&&(t=h[e+1]),i&&this.delete(n),d=this.get(t),this.set(n,s)}else{p||h[e-1]!==n||(p=!0);const t=h[p?e:e-1],s=d;d=this.get(t),this.delete(t),this.set(t,s)}return this}with(t,n,s){const i=new e(this);return i.insert(t,n,s),i}before(e){const n=(0,l.default)(this,t)[t].indexOf(e)-1;if(!(n<0))return this.entryAt(n)}setBefore(e,n,s){const i=(0,l.default)(this,t)[t].indexOf(e);return-1===i?this:this.insert(i,n,s)}after(e){let n=(0,l.default)(this,t)[t].indexOf(e);if(n=-1===n||n===this.size-1?-1:n+1,-1!==n)return this.entryAt(n)}setAfter(e,n,s){const i=(0,l.default)(this,t)[t].indexOf(e);return-1===i?this:this.insert(i+1,n,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return(0,l.default)(this,t)[t]=[],super.clear()}delete(e){const n=super.delete(e);return n&&(0,l.default)(this,t)[t].splice((0,l.default)(this,t)[t].indexOf(e),1),n}deleteAt(e){const t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){const n=j((0,l.default)(this,t)[t],e);if(void 0!==n)return this.get(n)}entryAt(e){const n=j((0,l.default)(this,t)[t],e);if(void 0!==n)return[n,this.get(n)]}indexOf(e){return(0,l.default)(this,t)[t].indexOf(e)}keyAt(e){return j((0,l.default)(this,t)[t],e)}from(e,t){const n=this.indexOf(e);if(-1===n)return;let s=n+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(e,t){const n=this.indexOf(e);if(-1===n)return;let s=n+t;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(e,t){let n=0;for(const s of this){if(Reflect.apply(e,t,[s,n,this]))return s;n++}}findIndex(e,t){let n=0;for(const s of this){if(Reflect.apply(e,t,[s,n,this]))return n;n++}return-1}filter(t,n){const s=[];let i=0;for(const e of this)Reflect.apply(t,n,[e,i,this])&&s.push(e),i++;return new e(s)}map(t,n){const s=[];let i=0;for(const e of this)s.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(s)}reduce(...e){const[t,n]=e;let s=0,i=n??this.at(0);for(const n of this)i=0===s&&1===e.length?n:Reflect.apply(t,this,[i,n,s,this]),s++;return i}reduceRight(...e){const[t,n]=e;let s=n??this.at(-1);for(let n=this.size-1;n>=0;n--){const i=this.at(n);s=n===this.size-1&&1===e.length?i:Reflect.apply(t,this,[s,i,n,this])}return s}toSorted(t){const n=[...this.entries()].sort(t);return new e(n)}toReversed(){const t=new e;for(let e=this.size-1;e>=0;e--){const n=this.keyAt(e),s=this.get(n);t.set(n,s)}return t}toSpliced(...t){const n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){const s=new e;let i=this.size-1;if(void 0===t)return s;t<0&&(t+=this.size),void 0!==n&&n>0&&(i=n-1);for(let e=t;e<=i;e++){const t=this.keyAt(e),n=this.get(t);s.set(t,n)}return s}every(e,t){let n=0;for(const s of this){if(!Reflect.apply(e,t,[s,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(const s of this){if(Reflect.apply(e,t,[s,n,this]))return!0;n++}return!1}},O(e,"OrderedDict"),e);function j(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=v(e,t);return-1===n?void 0:e[n]}function v(e,t){const n=e.length,s=x(t),i=s>=0?s:n+s;return i<0||i>=n?-1:i}function x(e){return e!=e||0===e?0:Math.trunc(e)}function S(e){const t=e+"CollectionProvider",[n,o]=(0,a.createContextScope)(t),[l,c]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new C,setItemMap:O(()=>{},"setItemMap")}),y=O(e=>{let{state:t}=e,n=(0,u.default)(e,s);return t?(0,p.jsx)(b,Object.assign({},n,{state:t})):(0,p.jsx)(R,Object.assign({},n))},"CollectionProvider");y.displayName=t;const R=O(e=>{const t=z();return(0,p.jsx)(b,Object.assign({},e,{state:t}))},"CollectionInit");R.displayName=t+"Init";const b=O(e=>{const{scope:t,children:n,state:s}=e,i=f.useRef(null),[o,c]=f.useState(null),u=(0,h.useComposedRefs)(i,c),[a,d]=s;return f.useEffect(()=>{if(!o)return;const e=P(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,p.jsx)(l,{scope:t,itemMap:a,setItemMap:d,collectionRef:u,collectionRefObject:i,collectionElement:o,children:n})},"CollectionProviderImpl");b.displayName=t+"Impl";const j=e+"CollectionSlot",v=(0,d.createSlot)(j),x=f.forwardRef((e,t)=>{const{scope:n,children:s}=e,i=c(j,n),o=(0,h.useComposedRefs)(t,i.collectionRef);return(0,p.jsx)(v,{ref:o,children:s})});x.displayName=j;const S=e+"CollectionItemSlot",M="data-radix-collection-item",A=(0,d.createSlot)(S),k=f.forwardRef((e,t)=>{const{scope:n,children:s}=e,o=(0,u.default)(e,i),l=f.useRef(null),[a,d]=f.useState(null),y=(0,h.useComposedRefs)(t,l,d),O=c(S,n),{setItemMap:R}=O,b=f.useRef(o);w(b.current,o)||(b.current=o);const j=b.current;return f.useEffect(()=>{const e=j;return R(t=>a?t.has(a)?t.set(a,Object.assign({},e,{element:a})).toSorted(I):(t.set(a,Object.assign({},e,{element:a})),t.toSorted(I)):t),()=>{R(e=>a&&e.has(a)?(e.delete(a),new C(e)):e)}},[a,j,R]),(0,p.jsx)(A,Object.assign({},{[M]:""},{ref:y,children:s}))});function z(){return f.useState(new C)}function N(t){const{itemMap:n}=c(e+"CollectionConsumer",t);return n}k.displayName=S,O(z,"useInitCollection"),O(N,"useCollection");return[{Provider:y,Slot:x,ItemSlot:k},{createCollectionScope:o,useCollection:N,useInitCollection:z}]}function w(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null==e||null==t)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const s of n){if(!Object.prototype.hasOwnProperty.call(t,s))return!1;if(e[s]!==t[s])return!1}return!0}function M(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function I(e,t){return e[1].element&&t[1].element?M(e[1].element,t[1].element)?-1:1:0}function P(e){return new MutationObserver(t=>{for(const n of t)if("childList"===n.type)return void e()})}O(j,"at"),O(v,"toSafeIndex"),O(x,"toSafeInteger"),O(S,"createCollection"),O(w,"shallowEqual"),O(M,"isElementPreceding"),O(I,"sortByDocumentPosition"),O(P,"getChildListObserver")},271,[272,273,131,38,274,246,245,151]);
|
|
328
|
+
__d(function(g,r,i,a,m,_e,d){m.exports=function(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e},m.exports.__esModule=!0,m.exports.default=m.exports},272,[]);
|
|
329
|
+
__d(function(g,r,i,a,m,_e,d){var e=0;m.exports=function(t){return"__private_"+e+++"_"+t},m.exports.__esModule=!0,m.exports.default=m.exports},273,[]);
|
|
330
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children"],t=["scope","children"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"createContext",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"createContextScope",{enumerable:!0,get:function(){return l}});var n,o=r(_d[0]),c=(n=o)&&n.__esModule?n:{default:n},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),s=r(_d[2]),p=Object.defineProperty,d=(e,t)=>p(e,"name",{value:t,configurable:!0});function f(t,n){const o=u.createContext(n);o.displayName=t+"Context";const p=d(t=>{const{children:n}=t,p=(0,c.default)(t,e),d=u.useMemo(()=>p,Object.values(p));return(0,s.jsx)(o.Provider,{value:d,children:n})},"Provider");function f(e,c={}){const{optional:s=!1}=c,p=u.useContext(o);if(p)return p;if(void 0!==n)return n;if(!s)throw new Error(`\`${e}\` must be used within \`${t}\``)}return p.displayName=t+"Provider",d(f,"useContext"),[p,f]}function l(e,n=[]){let o=[];function p(n,p){const f=u.createContext(p);f.displayName=n+"Context";const l=o.length;o=[...o,p];const b=d(n=>{const{scope:o,children:p}=n,d=(0,c.default)(n,t),b=o?.[e]?.[l]||f,v=u.useMemo(()=>d,Object.values(d));return(0,s.jsx)(b.Provider,{value:v,children:p})},"Provider");function v(t,o,c={}){const{optional:s=!1}=c,d=o?.[e]?.[l]||f,b=u.useContext(d);if(b)return b;if(void 0!==p)return p;if(!s)throw new Error(`\`${t}\` must be used within \`${n}\``)}return b.displayName=n+"Provider",d(v,"useContext"),[b,v]}d(p,"createContext");const f=d(()=>{const t=o.map(e=>u.createContext(e));return d(function(n){const o=n?.[e]||t;return u.useMemo(()=>({[`__scope${e}`]:Object.assign({},n,{[e]:o})}),[n,o])},"useScope")},"createScope");return f.scopeName=e,[p,b(f,...n)]}function b(...e){const t=e[0];if(1===e.length)return t;const n=d(()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return d(function(e){const o=n.reduce((t,{useScope:n,scopeName:o})=>{const c=n(e)[`__scope${o}`];return Object.assign({},t,c)},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}d(f,"createContext"),d(l,"createContextScope"),d(b,"composeContextScopes")},274,[131,38,151]);
|
|
331
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DirectionProvider",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"Provider",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"useDirection",{enumerable:!0,get:function(){return d}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=Object.defineProperty,o=(e,t)=>n(e,"name",{value:t,configurable:!0}),u=e.createContext(void 0),c=o(e=>{const{dir:n,children:o}=e;return(0,t.jsx)(u.Provider,{value:n,children:o})},"DirectionProvider");function d(t){const n=e.useContext(u);return t||n||"ltr"}o(d,"useDirection");var f=c},275,[38,151]);
|
|
332
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["disableOutsidePointerEvents","deferPointerDownOutside","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Branch",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"DismissableLayer",{enumerable:!0,get:function(){return D}}),Object.defineProperty(_e,"DismissableLayerBranch",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"useDismissableLayerSurface",{enumerable:!0,get:function(){return w}});var t,n,s=r(_d[0]),o=(t=s)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),d=r(_d[3]),l=r(_d[4]),f=r(_d[5]),v=r(_d[6]),b=Object.defineProperty,p=(e,t)=>b(e,"name",{value:t,configurable:!0}),E="dismissableLayer.update",y=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),D=u.forwardRef(p(function(t,s){const{disableOutsidePointerEvents:b=!1,deferPointerDownOutside:D=!1,onEscapeKeyDown:O,onPointerDownOutside:w,onFocusOutside:P,onInteractOutside:R,onDismiss:S}=t,k=(0,o.default)(t,e),j=u.useContext(y),[B,F]=u.useState(null),_=B?.ownerDocument??globalThis?.document,[,x]=u.useState({}),I=(0,l.useComposedRefs)(s,F),W=Array.from(j.layers),[T]=[...j.layersWithOutsidePointerEventsDisabled].slice(-1),H=T?W.indexOf(T):-1,A=B?W.indexOf(B):-1,M=j.layersWithOutsidePointerEventsDisabled.size>0,z=A>=H,U=u.useRef(!1),K=h(e=>{w?.(e),R?.(e),e.defaultPrevented||S?.()},{ownerDocument:_,deferPointerDownOutside:D,isDeferredPointerDownOutsideRef:U,dismissableSurfaces:j.dismissableSurfaces,shouldHandlePointerDownOutside:u.useCallback(e=>{if(!(e instanceof Node))return!1;const t=[...j.branches].some(t=>t.contains(e));return z&&!t},[j.branches,z])}),N=C(e=>{if(D&&U.current)return;const t=e.target;[...j.branches].some(e=>e.contains(t))||(P?.(e),R?.(e),e.defaultPrevented||S?.())},_),q=!!B&&A===W.length-1,G=(0,f.useCallbackRef)(e=>{"Escape"===e.key&&(O?.(e),!e.defaultPrevented&&S&&(e.preventDefault(),S()))});return u.useEffect(()=>{if(q)return _.addEventListener("keydown",G,{capture:!0}),()=>_.removeEventListener("keydown",G,{capture:!0})},[_,q,G]),u.useEffect(()=>{if(B)return b&&(0===j.layersWithOutsidePointerEventsDisabled.size&&(n=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),j.layersWithOutsidePointerEventsDisabled.add(B)),j.layers.add(B),L(),()=>{b&&(j.layersWithOutsidePointerEventsDisabled.delete(B),0===j.layersWithOutsidePointerEventsDisabled.size&&(_.body.style.pointerEvents=n))}},[B,_,b,j]),u.useEffect(()=>()=>{B&&(j.layers.delete(B),j.layersWithOutsidePointerEventsDisabled.delete(B),L())},[B,j]),u.useEffect(()=>{const e=p(()=>x({}),"handleUpdate");return document.addEventListener(E,e),()=>document.removeEventListener(E,e)},[]),(0,v.jsx)(d.Primitive.div,Object.assign({},k,{ref:I,style:Object.assign({pointerEvents:M?z?"auto":"none":void 0},t.style),onFocusCapture:(0,c.composeEventHandlers)(t.onFocusCapture,N.onFocusCapture),onBlurCapture:(0,c.composeEventHandlers)(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:(0,c.composeEventHandlers)(t.onPointerDownCapture,K.onPointerDownCapture)}))},"DismissableLayer")),O=u.forwardRef(p(function(e,t){const n=u.useContext(y),s=u.useRef(null),o=(0,l.useComposedRefs)(t,s);return u.useEffect(()=>{const e=s.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,v.jsx)(d.Primitive.div,Object.assign({},e,{ref:o}))},"DismissableLayerBranch"));function w(){const e=u.useContext(y),[t,n]=u.useState(null);return u.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}p(w,"useDismissableLayerSurface");var P=p(()=>!0,"IS_TRUE");function h(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=P}=t,l=(0,f.useCallbackRef)(e),v=u.useRef(!1),b=u.useRef(!1),E=u.useRef(new Map),y=u.useRef(()=>{});return u.useEffect(()=>{function e(){b.current=!1,o.current=!1,E.current.clear()}function t(){return Array.from(E.current.values()).some(Boolean)}function u(e){if(!b.current)return;const t=e.target;t instanceof Node&&[...c].some(e=>e.contains(t))||E.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{b.current&&y.current()},0)}function f(e){b.current&&E.current.set(e.type,!1)}p(e,"resetOutsideInteraction"),p(t,"isOutsideInteractionIntercepted"),p(u,"handleInteractionCapture"),p(f,"handleInteractionBubble");const D=p(u=>{if(u.target&&!v.current){let c=function(){n.removeEventListener("click",y.current);const s=t();e(),s||R("dismissableLayer.pointerDownOutside",l,f,{discrete:!0})};if(p(c,"handleAndDispatchPointerDownOutsideEvent"),!d(u.target))return n.removeEventListener("click",y.current),e(),void(v.current=!1);const f={originalEvent:u};b.current=!0,o.current=s&&0===u.button,E.current.clear(),s&&0===u.button?(n.removeEventListener("click",y.current),y.current=c,n.addEventListener("click",y.current,{once:!0})):c()}else n.removeEventListener("click",y.current),e();v.current=!1},"handlePointerDown"),O=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const e of O)n.addEventListener(e,u,!0),n.addEventListener(e,f);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",D)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",D),n.removeEventListener("click",y.current);for(const e of O)n.removeEventListener(e,u,!0),n.removeEventListener(e,f)}},[n,l,s,o,c,d]),{onPointerDownCapture:p(()=>v.current=!0,"onPointerDownCapture")}}function C(e,t=globalThis?.document){const n=(0,f.useCallbackRef)(e),s=u.useRef(!1);return u.useEffect(()=>{const e=p(e=>{if(e.target&&!s.current){R("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})}},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:p(()=>s.current=!0,"onFocusCapture"),onBlurCapture:p(()=>s.current=!1,"onBlurCapture")}}function L(){const e=new CustomEvent(E);document.dispatchEvent(e)}function R(e,t,n,{discrete:s}){const o=n.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),s?(0,d.dispatchDiscreteCustomEvent)(o,u):o.dispatchEvent(u)}p(h,"usePointerDownOutside"),p(C,"useFocusOutside"),p(L,"dispatchUpdate"),p(R,"handleAndDispatchCustomEvent");var S=D,k=O},276,[131,38,270,244,246,277,151]);
|
|
333
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useCallbackRef",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));function t(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}(0,Object.defineProperty)(t,"name",{value:"useCallbackRef",configurable:!0})},277,[38]);
|
|
334
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FocusGuards",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"useFocusGuards",{enumerable:!0,get:function(){return d}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=Object.defineProperty,n=(e,n)=>t(e,"name",{value:n,configurable:!0}),u=0,o=null;function c(e){return d(),e.children}function d(){e.useEffect(()=>{o||(o={start:s(),end:s()});const{start:e,end:t}=o;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),u++,()=>{1===u&&(o?.start.remove(),o?.end.remove(),o=null),u=Math.max(0,u-1)}},[])}function s(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}n(c,"FocusGuards"),n(d,"useFocusGuards"),n(s,"createFocusGuard")},278,[38]);
|
|
335
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FocusScope",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return I}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),s=r(_d[3]),d=r(_d[4]),f=r(_d[5]),l=Object.defineProperty,p=(e,t)=>l(e,"name",{value:t,configurable:!0}),v="focusScope.autoFocusOnMount",b="focusScope.autoFocusOnUnmount",E={bubbles:!1,cancelable:!0},y=u.forwardRef(p(function(t,n){const{loop:l=!1,trapped:y=!1,onMountAutoFocus:T,onUnmountAutoFocus:L}=t,O=(0,o.default)(t,e),[N,P]=u.useState(null),I=(0,d.useCallbackRef)(T),R=(0,d.useCallbackRef)(L),M=u.useRef(null),j=(0,c.useComposedRefs)(n,P),K=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(y){let e=function(e){if(K.paused||!N)return;const t=e.target;N.contains(t)?M.current=t:k(M.current,{select:!0})},t=function(e){if(K.paused||!N)return;const t=e.relatedTarget;null!==t&&(N.contains(t)||k(M.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&k(N)};p(e,"handleFocusIn"),p(t,"handleFocusOut"),p(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);const o=new MutationObserver(n);return N&&o.observe(N,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),o.disconnect()}}},[y,N,K.paused]),u.useEffect(()=>{if(N){C.add(K);const e=document.activeElement;if(!N.contains(e)){const t=new CustomEvent(v,E);N.addEventListener(v,I),N.dispatchEvent(t),t.defaultPrevented||(h(_(S(N)),{select:!0}),document.activeElement===e&&k(N))}return()=>{N.removeEventListener(v,I),setTimeout(()=>{const t=new CustomEvent(b,E);N.addEventListener(b,R),N.dispatchEvent(t),t.defaultPrevented||k(e??document.body,{select:!0}),N.removeEventListener(b,R),C.remove(K)},0)}}},[N,I,R,K]);const w=u.useCallback(e=>{if(!l&&!y)return;if(K.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,u]=F(t);o&&u?e.shiftKey||n!==u?e.shiftKey&&n===o&&(e.preventDefault(),l&&k(u,{select:!0})):(e.preventDefault(),l&&k(o,{select:!0})):n===t&&e.preventDefault()}},[l,y,K.paused]);return(0,f.jsx)(s.Primitive.div,Object.assign({tabIndex:-1},O,{ref:j,onKeyDown:w}))},"FocusScope"));function h(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(k(o,{select:t}),document.activeElement!==n)return}function F(e){const t=S(e);return[T(t,e),T(t.reverse(),e)]}function S(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:p(e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function T(e,t){const n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(const o of e){if(!(n?!o.checkVisibility({checkVisibilityCSS:!0}):L(o,{upTo:t})))return o}}function L(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function O(e){return e instanceof HTMLInputElement&&"select"in e}function k(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&O(e)&&t&&e.select()}}p(h,"focusFirst"),p(F,"getTabbableEdges"),p(S,"getTabbableCandidates"),p(T,"findVisible"),p(L,"isHidden"),p(O,"isSelectableInput"),p(k,"focus");var C=N();function N(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=P(e,t),e.unshift(t)},remove(t){e=P(e,t),e[0]?.resume()}}}function P(e,t){const n=[...e],o=n.indexOf(t);return-1!==o&&n.splice(o,1),n}function _(e){return e.filter(e=>"A"!==e.tagName)}p(N,"createFocusScopesStack"),p(P,"arrayRemove"),p(_,"removeLinks");var I=y},279,[131,38,246,244,277,151]);
|
|
336
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useId",{enumerable:!0,get:function(){return c}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=Object.defineProperty,u=e[" useId ".trim().toString()]||(()=>{}),o=0;function c(n){const[c,f]=e.useState(u());return(0,t.useLayoutEffect)(()=>{n||f(e=>e??String(o++))},[n]),n||(c?`radix-${c}`:"")}n(c,"name",{value:"useId",configurable:!0})},280,[38,281]);
|
|
337
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useLayoutEffect",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=globalThis?.document?e.useLayoutEffect:()=>{}},281,[38]);
|
|
338
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["__scopePopper","virtualRef"],t=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"],n=["__scopePopper"];function o(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ALIGN_OPTIONS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"Anchor",{enumerable:!0,get:function(){return X}}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"Content",{enumerable:!0,get:function(){return B}}),Object.defineProperty(_e,"Popper",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"PopperAnchor",{enumerable:!0,get:function(){return H}}),Object.defineProperty(_e,"PopperArrow",{enumerable:!0,get:function(){return M}}),Object.defineProperty(_e,"PopperContent",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"SIDE_OPTIONS",{enumerable:!0,get:function(){return v}}),Object.defineProperty(_e,"createPopperScope",{enumerable:!0,get:function(){return C}});var s,l=r(_d[0]),p=(s=l)&&s.__esModule?s:{default:s},d=o(r(_d[1])),c=r(_d[2]),u=o(r(_d[3])),f=r(_d[4]),h=r(_d[5]),b=r(_d[6]),y=r(_d[7]),P=r(_d[8]),w=r(_d[9]),O=r(_d[10]),x=Object.defineProperty,j=(e,t)=>x(e,"name",{value:t,configurable:!0}),v=["top","right","bottom","left"],S=["start","center","end"],A="Popper",[_,C]=(0,h.createContextScope)(A),[R,$]=_(A),E=j(e=>{const{__scopePopper:t,children:n}=e,[o,s]=d.useState(null),[l,p]=d.useState(void 0);return(0,O.jsx)(R,{scope:t,anchor:o,onAnchorChange:s,placementState:l,setPlacementState:p,children:n})},"Popper"),H=d.forwardRef(j(function(t,n){const{__scopePopper:o,virtualRef:s}=t,l=(0,p.default)(t,e),c=$("PopperAnchor",o),u=d.useRef(null),h=c.onAnchorChange,y=d.useCallback(e=>{u.current=e,e&&h(e)},[h]),P=(0,f.useComposedRefs)(n,y),w=d.useRef(null);d.useEffect(()=>{if(!s)return;const e=w.current;w.current=s.current,e!==w.current&&h(w.current)});const x=c.placementState&&F(c.placementState),j=x?.[0],v=x?.[1];return s?null:(0,O.jsx)(b.Primitive.div,Object.assign({"data-radix-popper-side":j,"data-radix-popper-align":v},l,{ref:P}))},"PopperAnchor")),k="PopperContent",[D,I]=_(k),W=d.forwardRef(j(function(e,n){const{__scopePopper:o,side:s="bottom",sideOffset:l=0,align:u="center",alignOffset:h=0,arrowPadding:x=0,avoidCollisions:v=!0,collisionBoundary:S=[],collisionPadding:A=0,sticky:_="partial",hideWhenDetached:C=!1,updatePositionStrategy:R="optimized",onPlaced:E}=e,H=(0,p.default)(e,t),I=$(k,o),[W,z]=d.useState(null),M=(0,f.useComposedRefs)(n,z),[L,X]=d.useState(null),B=(0,w.useSize)(L),T=B?.width??0,G=B?.height??0,U=s+("center"!==u?"-"+u:""),q="number"==typeof A?A:Object.assign({top:0,right:0,bottom:0,left:0},A),J=Array.isArray(S)?S:[S],K=J.length>0,Q={padding:q,boundary:J.filter(N),altBoundary:K},{refs:V,floatingStyles:Z,placement:ee,isPositioned:te,middlewareData:re}=(0,c.useFloating)({strategy:"fixed",placement:U,whileElementsMounted:j((...e)=>(0,c.autoUpdate)(...e,{animationFrame:"always"===R}),"whileElementsMounted"),elements:{reference:I.anchor},middleware:[(0,c.offset)({mainAxis:l+G,alignmentAxis:h}),v&&(0,c.shift)(Object.assign({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?(0,c.limitShift)():void 0},Q)),v&&(0,c.flip)(Object.assign({},Q)),(0,c.size)(Object.assign({},Q,{apply:j(({elements:e,rects:t,availableWidth:n,availableHeight:o})=>{const{width:s,height:l}=t.reference,p=e.floating.style;p.setProperty("--radix-popper-available-width",`${n}px`),p.setProperty("--radix-popper-available-height",`${o}px`),p.setProperty("--radix-popper-anchor-width",`${s}px`),p.setProperty("--radix-popper-anchor-height",`${l}px`)},"apply")})),L&&(0,c.arrow)({element:L,padding:x}),Y({arrowWidth:T,arrowHeight:G}),C&&(0,c.hide)(Object.assign({strategy:"referenceHidden"},Q,{boundary:K?Q.boundary:void 0}))]}),ne=I.setPlacementState;(0,P.useLayoutEffect)(()=>(ne(ee),()=>{ne(void 0)}),[ee,ne]);const[oe,ie]=F(ee),ae=(0,y.useCallbackRef)(E);(0,P.useLayoutEffect)(()=>{te&&ae?.()},[te,ae]);const se=re.arrow?.x,le=re.arrow?.y,pe=0!==re.arrow?.centerOffset,[de,ce]=d.useState();return(0,P.useLayoutEffect)(()=>{W&&ce(window.getComputedStyle(W).zIndex)},[W]),(0,O.jsx)("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:Object.assign({},Z,{transform:te?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(" ")},re.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}),dir:e.dir,children:(0,O.jsx)(D,{scope:o,placedSide:oe,placedAlign:ie,onArrowChange:X,arrowX:se,arrowY:le,shouldHideArrow:pe,children:(0,O.jsx)(b.Primitive.div,Object.assign({"data-side":oe,"data-align":ie},H,{ref:M,style:Object.assign({},H.style,{animation:te?H.style?.animation:"none"})}))})})},"PopperContent")),z={top:"bottom",right:"left",bottom:"top",left:"right"},M=d.forwardRef(j(function(e,t){const{__scopePopper:o}=e,s=(0,p.default)(e,n),l=I("PopperArrow",o),d=z[l.placedSide];return(0,O.jsx)("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:(0,O.jsx)(u.Root,Object.assign({},s,{ref:t,style:Object.assign({},s.style,{display:"block"})}))})},"PopperArrow"));function N(e){return null!==e}j(N,"isNotNull");var Y=j(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:s}=t,l=0!==s.arrow?.centerOffset,p=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[c,u]=F(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(s.arrow?.x??0)+p/2,b=(s.arrow?.y??0)+d/2;let y="",P="";return"bottom"===c?(y=l?f:`${h}px`,P=-d+"px"):"top"===c?(y=l?f:`${h}px`,P=`${o.floating.height+d}px`):"right"===c?(y=-d+"px",P=l?f:`${b}px`):"left"===c&&(y=`${o.floating.width+d}px`,P=l?f:`${b}px`),{data:{x:y,y:P}}}}),"transformOrigin");function F(e){const[t,n="center"]=e.split("-");return[t,n]}j(F,"getSideAndAlignFromPlacement");var L=E,X=H,B=W,T=M},282,[131,38,254,283,246,274,244,277,281,284,151]);
|
|
339
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children","width","height"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Arrow",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return h}});var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=r(_d[2]),f=r(_d[3]),d=Object.defineProperty,s=(e,t)=>d(e,"name",{value:t,configurable:!0}),l=u.forwardRef(s(function(t,n){const{children:u,width:d=10,height:s=5}=t,l=(0,o.default)(t,e);return(0,f.jsx)(c.Primitive.svg,Object.assign({},l,{ref:n,width:d,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?u:(0,f.jsx)("polygon",{points:"0,0 30,0 15,10"})}))},"Arrow")),h=l},283,[131,38,244,151]);
|
|
340
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useSize",{enumerable:!0,get:function(){return n}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]);function n(n){const[o,u]=e.useState(void 0);return(0,t.useLayoutEffect)(()=>{if(n){u({width:n.offsetWidth,height:n.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const t=e[0];let o,f;if("borderBoxSize"in t){const e=t.borderBoxSize,n=Array.isArray(e)?e[0]:e;o=n.inlineSize,f=n.blockSize}else o=n.offsetWidth,f=n.offsetHeight;u({width:o,height:f})});return e.observe(n,{box:"border-box"}),()=>e.unobserve(n)}u(void 0)},[n]),o}(0,Object.defineProperty)(n,"name",{value:"useSize",configurable:!0})},284,[38,281]);
|
|
341
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["container"];function t(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Portal",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return y}});var n,o=r(_d[0]),u=(n=o)&&n.__esModule?n:{default:n},c=t(r(_d[1])),f=t(r(_d[2])),l=r(_d[3]),d=r(_d[4]),s=r(_d[5]),b=Object.defineProperty,P=(e,t)=>b(e,"name",{value:t,configurable:!0}),j=c.forwardRef(P(function(t,n){const{container:o}=t,b=(0,u.default)(t,e),[P,j]=c.useState(!1);(0,d.useLayoutEffect)(()=>j(!0),[]);const y=o||P&&globalThis?.document?.body;return y?f.createPortal((0,s.jsx)(l.Primitive.div,Object.assign({},b,{ref:n})),y):null},"Portal")),y=j},285,[131,38,40,244,281,151]);
|
|
342
|
+
__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Presence",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"Root",{enumerable:!0,get:function(){return p}});var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),n=r(_d[1]),t=Object.defineProperty,u=(e,n)=>t(e,"name",{value:n,configurable:!0});function o(n,t){return e.useReducer((e,n)=>t[e][n]??e,n)}u(o,"useStateMachine");var i=u(n=>{const{present:t,children:u}=n,o=c(t),i="function"==typeof u?u({present:o.isPresent}):e.Children.only(u),s=f(o.ref,d(i));return"function"==typeof u||o.isPresent?e.cloneElement(i,{ref:s}):null},"Presence");function c(t){const[i,c]=e.useState(),s=e.useRef(null),f=e.useRef(t),d=e.useRef("none"),p=e.useRef(void 0),N=t?"mounted":"unmounted",[O,y]=o(N,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{"mounted"===O?(d.current=p.current??l(s.current),p.current=void 0):d.current="none"},[O]),(0,n.useLayoutEffect)(()=>{const e=s.current,n=f.current;if(n!==t){const u=d.current,o=l(e);if(t)p.current=o,y("MOUNT");else if("none"===o||"none"===e?.display)y("UNMOUNT");else{y(n&&u!==o?"ANIMATION_OUT":"UNMOUNT")}f.current=t}},[t,y]),(0,n.useLayoutEffect)(()=>{if(i){let e;const n=i.ownerDocument.defaultView??window,t=u(t=>{const u=l(s.current).includes(CSS.escape(t.animationName));if(t.target===i&&u&&(y("ANIMATION_END"),!f.current)){const t=i.style.animationFillMode;i.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=t)})}},"handleAnimationEnd"),o=u(e=>{e.target===i&&(d.current=l(s.current))},"handleAnimationStart");return i.addEventListener("animationstart",o),i.addEventListener("animationcancel",t),i.addEventListener("animationend",t),()=>{n.clearTimeout(e),i.removeEventListener("animationstart",o),i.removeEventListener("animationcancel",t),i.removeEventListener("animationend",t)}}y("ANIMATION_END")},[i,y]),{isPresent:["mounted","unmountSuspended"].includes(O),ref:e.useCallback(e=>{if(e){const n=getComputedStyle(e);s.current=n,p.current=l(n)}else s.current=null;c(e)},[])}}function s(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function f(...n){const t=e.useRef(n);return t.current=n,e.useCallback(e=>{const n=t.current;let u=!1;const o=n.map(n=>{const t=s(n,e);return u||"function"!=typeof t||(u=!0),t});if(u)return()=>{for(let e=0;e<o.length;e++){const t=o[e];"function"==typeof t?t():s(n[e],null)}}},[])}function l(e){return e?.animationName||"none"}function d(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}u(c,"usePresence"),u(s,"setRef"),u(f,"useStableComposedRefs"),u(l,"getAnimationName"),u(d,"getElementRef");var p=i},286,[38,281]);
|
|
343
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useControllableState",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"useControllableStateReducer",{enumerable:!0,get:function(){return p}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]),c=Object.defineProperty,u=(e,t)=>c(e,"name",{value:t,configurable:!0}),s=e[" useInsertionEffect ".trim().toString()]||n.useLayoutEffect;function l({prop:n,defaultProp:o,onChange:c=u(()=>{},"onChange"),caller:s}){const[l,b,p]=f({defaultProp:o,onChange:c}),v=void 0!==n,h=v?n:l;if(t.IS_DEVELOPMENT){const t=e.useRef(void 0!==n);e.useEffect(()=>{const e=t.current;if(e!==v){const t=e?"controlled":"uncontrolled",n=v?"controlled":"uncontrolled";console.warn(`${s} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=v},[v,s])}return[h,e.useCallback(e=>{if(v){const t=d(e)?e(n):e;t!==n&&p.current?.(t)}else b(e)},[v,n,b,p])]}function f({defaultProp:t,onChange:n}){const[o,c]=e.useState(t),u=e.useRef(o),l=e.useRef(n);return s(()=>{l.current=n},[n]),e.useEffect(()=>{u.current!==o&&(l.current?.(o),u.current=o)},[o,u]),[o,c,l]}function d(e){return"function"==typeof e}u(l,"useControllableState"),u(f,"useUncontrolledState"),u(d,"isFunction");var b=Symbol("RADIX:SYNC_STATE");function p(n,c,u,s){const{prop:l,defaultProp:f,onChange:d,caller:p}=c,v=void 0!==l,h=(0,o.useEffectEvent)(d);if(t.IS_DEVELOPMENT){const t=e.useRef(void 0!==l);e.useEffect(()=>{const e=t.current;if(e!==v){const t=e?"controlled":"uncontrolled",n=v?"controlled":"uncontrolled";console.warn(`${p} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=v},[v,p])}const E=[Object.assign({},u,{state:f})];s&&E.push(s);const[O,C]=e.useReducer((e,t)=>{if(t.type===b)return Object.assign({},e,{state:t.state});const o=n(e,t);return v&&!Object.is(o.state,e.state)&&h(o.state),o},...E),j=O.state,y=e.useRef(j);e.useEffect(()=>{y.current!==j&&(y.current=j,v||h(j))},[j,y,v]);const P=e.useMemo(()=>void 0!==l?Object.assign({},O,{state:l}):O,[O,l]);return e.useEffect(()=>{v&&!Object.is(l,O.state)&&C({type:b,state:l})},[l,O.state,v]),[P,C]}u(p,"useControllableStateReducer")},287,[38,288,281,289]);
|
|
344
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"IS_DEVELOPMENT",{enumerable:!0,get:function(){return t}});var t=!1},288,[]);
|
|
345
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useEffectEvent",{enumerable:!0,get:function(){return o}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=Object.defineProperty,u=t[" useEffectEvent ".trim().toString()],f=t[" useInsertionEffect ".trim().toString()];function o(n){if("function"==typeof u)return u(n);const o=t.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return"function"==typeof f?f(()=>{o.current=n}):(0,e.useLayoutEffect)(()=>{o.current=n}),t.useMemo(()=>(...e)=>o.current?.(...e),[])}n(o,"name",{value:"useEffectEvent",configurable:!0})},289,[281,38]);
|
|
346
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"usePrevious",{enumerable:!0,get:function(){return u}});var e=(function(e){if(e&&e.__esModule)return e;var u={};return e&&Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(u,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),u.default=e,u})(r(_d[0]));function u(u){const t=e.useRef({value:u,previous:u});return e.useMemo(()=>(t.current.value!==u&&(t.current.previous=t.current.value,t.current.value=u),t.current.previous),[u])}(0,Object.defineProperty)(u,"name",{value:"usePrevious",configurable:!0})},290,[38]);
|
|
347
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarToggle=function({onClick:l,floating:u=!1,side:c="left"}){const[b,f]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),y=u?{width:40,height:40,borderRadius:t.radius.lg,border:'none',backgroundColor:b?t.bg.element:'transparent'}:{width:32,height:32,borderRadius:t.radius.md,border:'none',backgroundColor:b?t.bg.element:'transparent'};return(0,o.jsx)("button",{type:"button","aria-label":"Toggle sidebar",onClick:l,onMouseEnter:()=>f(!0),onMouseLeave:()=>{f(!1),p(!1)},onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),style:Object.assign({display:'flex',alignItems:'center',justifyContent:'center',padding:0,cursor:'pointer',boxSizing:'border-box',transition:'background-color 150ms ease, transform 100ms ease',transform:h?'scale(0.98)':void 0},y),children:(0,o.jsx)(s.SidebarIcon,{size:20,color:t.icon.default,style:'right'===c?{transform:'scaleX(-1)'}:void 0})})};var o=r(d[0]),n=r(d[1]),t=r(d[2]),s=r(d[3])},291,[151,38,183,186]);
|
|
348
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Switch=function({checked:s,onChange:l,label:c}){const[u,b]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1),f={display:'flex',alignItems:'center',justifyContent:'center',width:32,height:32,boxSizing:'border-box',borderRadius:o.radius.full,border:`1px solid ${o.border.default}`,backgroundColor:u?o.bg.element:'transparent',transition:'background-color 150ms ease, transform 100ms ease',transform:h?'scale(0.98)':void 0};return(0,t.jsxs)("button",{type:"button",role:"switch","aria-checked":s,"aria-label":c,onClick:()=>l?.(!s),onMouseEnter:()=>b(!0),onMouseLeave:()=>{b(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),style:{display:'flex',flexDirection:'column',alignItems:'center',gap:6,padding:0,border:'none',background:'none',cursor:'pointer',fontFamily:'inherit'},children:[(0,t.jsx)("span",{style:f,children:(0,t.jsx)("span",{style:{width:16,height:16,borderRadius:o.radius.full,backgroundColor:o.text.default}})}),c&&(0,t.jsx)("span",{style:Object.assign({},o.textSize['2xs'],{color:o.text.secondary,textAlign:'center'}),children:c})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2])},292,[151,38,183]);
|
|
349
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Sidebar=function({simulators:n,emulators:l,recentSimulators:c,recentEmulators:u,simulatorOptions:b,emulatorOptions:p,agentDeviceIds:v=[],selectedId:x,onSelect:h,onAddDevice:S,onToggle:f,platform:j,width:y=400}){return(0,t.jsxs)("aside",{style:{display:'flex',flexDirection:'column',gap:32,width:`min(${y}px, 100vw)`,flexShrink:0,height:'100vh',boxSizing:'border-box',padding:'32px 24px',overflow:'hidden'},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',justifyContent:'space-between',gap:8},children:[(0,t.jsx)(o.Logo,{}),f&&(0,t.jsx)(o.SidebarToggle,{onClick:f})]}),'android'!==j&&(0,t.jsx)(s.DeviceSection,{title:"Simulators",addLabel:"Add simulator",kind:"simulator",emptyLabel:S?'No booted simulators. Use the + button to add one.':'No booted simulators.',devices:n,recent:c,options:b,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S}),'ios'!==j&&(0,t.jsx)(s.DeviceSection,{title:"Emulators",addLabel:"Add emulator",kind:"emulator",emptyLabel:S?'No booted emulators or devices. Use the + button to add one.':'No booted emulators or devices.',devices:l,recent:u,options:p,agentDeviceIds:v,selectedId:x,onSelect:h,onAdd:S})]})};var t=r(d[0]),o=r(d[1]),s=r(d[2])},293,[151,294,295]);
|
|
350
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var u=r(d[4]);Object.keys(u).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var f=r(d[5]);Object.keys(f).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})});var l=r(d[6]);Object.keys(l).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var b=r(d[7]);Object.keys(b).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return b[t]}})});var p=r(d[8]);Object.keys(p).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}})});var y=r(d[9]);Object.keys(y).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return y[t]}})});var O=r(d[10]);Object.keys(O).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return O[t]}})});var j=r(d[11]);Object.keys(j).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return j[t]}})});var s=r(d[12]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var P=r(d[13]);Object.keys(P).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return P[t]}})});var h=r(d[14]);Object.keys(h).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return h[t]}})})},294,[182,184,185,189,248,263,264,265,266,267,291,292,247,186,183]);
|
|
351
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceSection=function({title:l,addLabel:c,kind:u,emptyLabel:p,devices:b,recent:x,options:y,agentDeviceIds:v=[],selectedId:f,onSelect:h,onAdd:j}){const[k,S]=(0,s.useState)(!1),[C,D]=(0,s.useState)(!1),[I,M]=(0,s.useState)(!1),L=new Set(b.map(t=>t.id)),_=x.filter(t=>!L.has(t.id));return(0,t.jsxs)("section",{style:{display:'grid',gap:12,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',gap:8},children:[(0,t.jsx)("span",{style:Object.assign({},n.textSize.sm,{fontWeight:500,color:n.text.default}),children:l}),!!j&&(0,t.jsx)("button",{type:"button","aria-label":c,onClick:()=>M(!0),onMouseEnter:()=>S(!0),onMouseLeave:()=>{S(!1),D(!1)},onMouseDown:()=>D(!0),onMouseUp:()=>D(!1),style:{display:'flex',alignItems:'center',justifyContent:'center',width:26,height:26,padding:0,borderRadius:n.radius.full,border:`1px solid ${n.border.default}`,backgroundColor:k?n.bg.hover:n.bg.default,cursor:'pointer',transition:'background-color 150ms ease, transform 100ms ease',transform:C?'scale(0.98)':void 0},children:(0,t.jsx)(n.PlusIcon,{size:18,color:n.icon.secondary})})]}),(0,t.jsx)("div",{style:{display:'grid',gap:6,minWidth:0},children:0===b.length?(0,t.jsx)("p",{style:Object.assign({},n.textSize.sm,{color:n.text.secondary,margin:0,padding:'12px 16px',borderRadius:n.radius.xl,border:`1px dashed ${n.border.default}`,backgroundColor:n.bg.default}),children:p}):b.map(s=>(0,t.jsx)(n.DeviceListItem,{name:s.name,version:s.version,unsupported:!s.supported,usedByAgent:v.includes(s.id),selected:s.id===f,onClick:()=>h(s.id)},s.id))}),(0,t.jsx)(o.RecentDevicesModal,{open:I,onClose:()=>M(!1),kind:u,devices:_,options:y,onAdd:j||(async()=>({ok:!1,error:'Device actions are unavailable.'}))})]})};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3])},295,[151,38,294,296]);
|
|
352
|
+
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.RecentDevicesModal=function({open:h,onClose:f,kind:b,devices:v,options:y,onAdd:j}){const w='simulator'===b?'ios':'android',C=b,S=`Add a${'emulator'===b?'n':''} ${C}`,$=(0,t.useMemo)(()=>[...v].sort((n,t)=>(t.lastUsedAt??0)-(n.lastUsedAt??0)),[v]),[k,z]=(0,t.useState)({kind:'new'}),[A,F]=(0,t.useState)(''),[D,M]=(0,t.useState)(''),[_,I]=(0,t.useState)(''),[R,B]=(0,t.useState)(!1),[N,T]=(0,t.useState)(!1),[O,U]=(0,t.useState)(!1),[E,W]=(0,t.useState)(null);(0,t.useEffect)(()=>{if(!h)return;const n=y.runtimes[0],t=n?.models[0];F(n?.value??''),M(t?.value??''),I(x(t?.label??'',$,w)),B(!1),T(!1),U(!1),W(null),z($.length?{kind:'recent',id:$[0].id}:{kind:'new'})},[h,y]);const Z='new'===k.kind,H='recent'===k.kind?$.find(n=>n.id===k.id):void 0,q=(0,t.useMemo)(()=>{const n=new Map;for(const t of y.runtimes)for(const o of t.models)n.has(o.value)||n.set(o.value,o);return[...n.values()].sort((n,t)=>n.label.localeCompare(t.label,void 0,{numeric:!0}))},[y.runtimes]),L='android'===w?y.runtimes.filter(n=>n.models.some(n=>n.value===D)):y.runtimes,P=L.find(n=>n.value===A),V='android'===w?q:P?.models??[],Y=P?.models.find(n=>n.value===D),G=()=>{z({kind:'new'}),W(null)};function J(n){const t=y.runtimes.find(t=>t.value===n);if(F(n),G(),'ios'===w){const n=t?.models[0];M(n?.value??''),R||I(x(n?.label??'',$,w))}}function K(n){M(n),G();const t=V.find(t=>t.value===n);if('android'===w){const t=y.runtimes.find(t=>t.models.some(t=>t.value===n));F(t?.value??'')}R||I(x(t?.label??'',$,w))}const Q=_.trim(),X=Q.length>0&&('android'!==w||l.test(Q)),ee='android'===w&&R&&Q.length>0&&!l.test(Q),ne=`new-${w}-device-name-hint`,te=Z?X&&A.length>0&&D.length>0:!!H;return(0,n.jsx)(o.DialogRoot,{open:h,onOpenChange:n=>{n||f()},children:(0,n.jsxs)(o.DialogContent,{children:[(0,n.jsx)(o.DialogTitle,{title:S}),(0,n.jsxs)("form",{onSubmit:async function(n){if(n.preventDefault(),te&&!O){U(!0),W(null);try{const n=Z&&P&&Y?{kind:'new',device:{platform:w,name:Q,runtime:P.value,deviceType:Y.value,version:P.label,supported:Y.supported}}:{kind:'recent',device:H},t=await j(n);t.ok?f():W(t.error)}catch(n){W(n instanceof Error?n.message:String(n))}finally{U(!1)}}},children:[(0,n.jsxs)(o.DialogContentContainer,{children:[(0,n.jsx)(s,{children:"Recents"}),(0,n.jsx)("div",{style:{display:'flex',flexDirection:'column',gap:3},children:0===$.length?(0,n.jsxs)("p",{style:{margin:0,padding:'2px 2px 6px 2px',fontSize:13,color:o.text.tertiary},children:["No recent ",C,"s."]}):$.map(t=>(0,n.jsx)(c,{device:t,selected:'recent'===k.kind&&k.id===t.id,onSelect:()=>{z({kind:'recent',id:t.id}),W(null)}},t.id))}),(0,n.jsxs)("div",{style:{marginTop:10},children:[(0,n.jsxs)(s,{active:Z,children:["New ",C]}),(0,n.jsx)("div",{onClick:G,style:{borderRadius:o.radius.lg,overflow:'hidden',backgroundColor:o.bg.subtle,border:`1px solid ${Z?o.border.default:o.border.secondary}`,transition:'border-color 150ms ease'},children:0===y.runtimes.length?(0,n.jsxs)("p",{style:{margin:0,padding:13,color:o.text.tertiary,fontSize:13},children:["No usable ",'ios'===w?'iOS runtimes':'Android system images'," were found on this host."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:"Name"}),'android'===w&&(0,n.jsx)("span",{id:ne,style:{color:ee?o.text.danger:o.text.tertiary,fontSize:11,lineHeight:1.3},children:a})]}),htmlFor:`new-${w}-device-name`,last:!1,children:(0,n.jsx)("div",{style:{flex:'0 0 58%'},children:(0,n.jsx)("input",{id:`new-${w}-device-name`,type:"text",value:_,placeholder:Y?.label||`New ${C}`,autoComplete:"off",spellCheck:!1,pattern:'android'===w?'[A-Za-z0-9._-]+':void 0,title:'android'===w?a:void 0,"aria-invalid":!!ee||void 0,"aria-describedby":'android'===w?ne:void 0,disabled:O,onChange:n=>{return t=n.currentTarget.value,I(t),B(!0),void G();var t},onFocus:()=>{T(!0),G()},onBlur:()=>T(!1),style:{width:'100%',boxSizing:'border-box',padding:'6px 10px',border:`1px solid ${ee?o.border.danger:o.border.default}`,borderRadius:o.radius.md,backgroundColor:o.bg.default,color:Z?o.text.default:o.text.tertiary,caretColor:o.text.default,fontSize:16,fontFamily:'inherit',outline:'none',boxShadow:N?`0 0 0 3px ${o.bg.element}`:'none'}})})}),'android'===w?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:"Model",htmlFor:`new-${w}-model`,last:!1,children:(0,n.jsx)(p,{id:`new-${w}-model`,value:D,options:V,disabled:O,onChange:K,onActivate:G,trailing:(0,n.jsx)(o.ChevronsUpDownIcon,{size:14,color:o.icon.secondary})})}),(0,n.jsx)(u,{label:"OS version",htmlFor:`new-${w}-runtime`,last:!0,children:(0,n.jsx)(p,{id:`new-${w}-runtime`,value:A,options:L,disabled:O,onChange:J,onActivate:G,trailing:(0,n.jsx)(o.ChevronDownIcon,{size:14,color:o.icon.secondary})})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u,{label:"OS version",htmlFor:`new-${w}-runtime`,last:!1,children:(0,n.jsx)(p,{id:`new-${w}-runtime`,value:A,options:L,disabled:O,onChange:J,onActivate:G,trailing:(0,n.jsx)(o.ChevronDownIcon,{size:14,color:o.icon.secondary})})}),(0,n.jsx)(u,{label:"Model",htmlFor:`new-${w}-model`,last:!0,children:(0,n.jsx)(p,{id:`new-${w}-model`,value:D,options:V,disabled:O,onChange:K,onActivate:G,trailing:(0,n.jsx)(o.ChevronsUpDownIcon,{size:14,color:o.icon.secondary})})})]})]})})]}),E&&(0,n.jsx)("p",{role:"alert",style:{margin:'12px 0 0',padding:'9px 11px',border:`1px solid ${o.border.danger}`,borderRadius:o.radius.lg,backgroundColor:o.bg.danger,color:o.text.danger,fontSize:13,whiteSpace:'pre-wrap'},children:E})]}),(0,n.jsxs)(o.DialogFooter,{children:[(0,n.jsx)(o.Button,{type:"button",theme:"quaternary",disabled:O,onClick:f,children:"Cancel"}),(0,n.jsx)(o.Button,{type:"submit",theme:"primary",disabled:!te||O,children:O?Z?'Creating\u2026':'Booting\u2026':Z?'Create & Boot':'Boot'})]})]})]})})};var n=r(d[0]),t=r(d[1]),o=r(d[2]);const l=/^[A-Za-z0-9._-]+$/,a='Allowed: a-z A-Z 0-9 . _ -';function s({children:t,active:l=!1}){return(0,n.jsx)("span",{style:{display:'block',marginBottom:4,fontFamily:o.font.mono,fontSize:11,fontWeight:l?600:400,letterSpacing:'0.06em',textTransform:'uppercase',color:l?o.text.default:o.text.tertiary},children:t})}function c({device:l,selected:a,onSelect:s}){const[c,u]=(0,t.useState)(!1);return(0,n.jsxs)("button",{type:"button","aria-pressed":a,onClick:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{display:'flex',alignItems:'center',gap:12,width:'100%',padding:'9px 11px',border:'none',borderRadius:o.radius.lg,textAlign:'left',fontFamily:'inherit',cursor:'pointer',backgroundColor:a?o.bg.hover:c?o.bg.element:'transparent',transition:'background-color 150ms ease'},children:[(0,n.jsx)("span",{style:{display:'flex',alignItems:'center',justifyContent:'center',width:31,height:31,flex:'0 0 auto',borderRadius:o.radius.lg,backgroundColor:o.bg.element,color:a?o.text.default:o.icon.default},children:a?(0,n.jsx)(o.CheckIcon,{size:16}):(0,n.jsx)(o.SmartphoneIcon,{size:16})}),(0,n.jsxs)("span",{style:{display:'flex',flexDirection:'column',gap:2,minWidth:0},children:[(0,n.jsx)("span",{style:{fontSize:14,fontWeight:a?600:500,color:o.text.default,lineHeight:1.25},children:l.name}),(0,n.jsxs)("span",{style:{display:'flex',alignItems:'center',gap:6,fontSize:12,color:o.text.tertiary,lineHeight:1.25},children:[(0,n.jsx)("span",{style:{width:6,height:6,flex:'0 0 auto',borderRadius:'50%',backgroundColor:l.booted?o.icon.success:o.icon.quaternary}}),l.booted?'Booted \xb7 now':h(l.lastUsedAt)]})]}),(0,n.jsx)("span",{style:{marginLeft:'auto',flex:'0 0 auto',fontSize:11,color:o.text.secondary,backgroundColor:o.bg.element,borderRadius:o.radius.full,padding:'3px 9px',fontVariantNumeric:'tabular-nums',whiteSpace:'nowrap'},children:l.version})]})}function u({label:t,htmlFor:l,last:a,children:s}){return(0,n.jsxs)("div",{style:{display:'flex',alignItems:'center',justifyContent:'space-between',gap:12,padding:'11px 13px',borderBottom:a?void 0:`1px solid ${o.border.secondary}`},children:[(0,n.jsx)("label",{htmlFor:l,style:{display:'flex',flexDirection:'column',gap:2,fontSize:13,color:o.text.secondary,cursor:'pointer'},children:t}),s]})}function p({id:l,value:a,options:s,disabled:c,onChange:u,onActivate:p,trailing:x}){const[h,f]=(0,t.useState)(!1),b={width:'100%',boxSizing:'border-box',padding:'6px 28px 6px 10px',border:`1px solid ${o.border.default}`,borderRadius:o.radius.md,backgroundColor:o.bg.default,color:o.text.default,fontSize:16,fontFamily:'inherit',appearance:'none',WebkitAppearance:'none',MozAppearance:'none',outline:'none',cursor:'pointer',boxShadow:h?`0 0 0 3px ${o.bg.element}`:'none'};return(0,n.jsxs)("div",{style:{position:'relative',flex:'0 0 58%'},children:[(0,n.jsx)("select",{id:l,value:a,disabled:c,onChange:n=>u(n.currentTarget.value),onMouseDown:p,onFocus:()=>{f(!0),p()},onBlur:()=>f(!1),style:b,children:0===s.length?(0,n.jsx)("option",{value:"",children:"\u2014"}):s.map(t=>(0,n.jsx)("option",{value:t.value,children:t.label},t.value))}),(0,n.jsx)("span",{style:{position:'absolute',right:10,top:'50%',transform:'translateY(-50%)',pointerEvents:'none',display:'flex',color:o.icon.secondary},children:x})]})}function x(n,t,o){const l='android'===o?n.trim().replace(/[^A-Za-z0-9._-]+/g,'_').replace(/^_+|_+$/g,''):n;if(!l)return'';const a=new Set(t.map(n=>n.name));if(!a.has(l))return l;let s=2;const c='android'===o?'_':' ';for(;a.has(`${l}${c}${s}`);)s++;return`${l}${c}${s}`}function h(n){if(!n)return'Idle';const t=Date.now()-n,o=Math.round(t/6e4);if(o<1)return'now';if(o<60)return`${o}m ago`;const l=Math.round(o/60);if(l<24)return`${l}h ago`;const a=Math.round(l/24);if(a<7)return`${a} day${1===a?'':'s'} ago`;const s=Math.round(a/7);if(s<5)return`${s} week${1===s?'':'s'} ago`;const c=Math.round(a/30);return`${c} month${1===c?'':'s'} ago`}},296,[151,38,294]);
|
|
353
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogSidebar=function({onToggle:h,client:v,streamMode:f,httpCodec:S,streamModeAvailability:b,onStreamModeChange:j,onHttpCodecChange:y,width:C=400}){return(0,t.jsxs)("aside",{style:{display:'flex',flexDirection:'column',width:`min(${C}px, 100vw)`,flexShrink:0,height:'100vh',boxSizing:'border-box',gap:12,padding:'32px 24px',overflow:'hidden'},children:[h&&(0,t.jsx)("div",{style:{display:'flex',alignItems:'center',justifyContent:'flex-start'},children:(0,t.jsx)(n.SidebarToggle,{side:"right",onClick:h})}),(0,t.jsxs)("div",{style:{display:'flex',flex:1,minHeight:0,flexDirection:'column',overflowX:'hidden',overflowY:'auto'},children:[(0,t.jsx)(l.CurrentAppSection,{client:v}),v?.capabilities.deviceSettings&&(0,t.jsx)(s.DeviceOptionsSection,{client:v}),v?.capabilities.activity&&(0,t.jsx)(o.ActivitySection,{client:v}),v?.capabilities.events&&(0,t.jsx)(c.EventsSection,{client:v}),v?.streamCapabilities&&(0,t.jsx)(p.StreamOptionsSection,{client:v,streamMode:f,httpCodec:S,streamModeAvailability:b,onStreamModeChange:j,onHttpCodecChange:y}),(0,t.jsx)(x.LogsSection,{client:v})]})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2]),l=r(d[3]),s=r(d[4]),c=r(d[5]),x=r(d[6]),p=r(d[7])},297,[151,294,298,300,302,305,309,310]);
|
|
354
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ActivitySection=function({client:o}){const[c,x]=(0,s.useState)(!1),b=o?.activity??null,v=b?.samples.slice(-60)??[],f=y(v),j=[{label:'CPU',color:l.text.info,values:v.map(t=>t.cpuPct)}],$=[{label:'Memory',color:l.text.preview,values:v.map(t=>t.memBytes)}],M=[{label:'Inbound',color:l.text.success,values:v.map(t=>t.netInBytesPerSec)},{label:'Outbound',color:l.text.warning,values:v.map(t=>t.netOutBytesPerSec)}],S=Math.max(100,100*(b?.hostCores??0));let k=null;b?.errored?k='Activity data is unavailable for this app.':f?b?.stale&&(k='Activity data is paused. Showing the most recent samples.'):k='Waiting for activity data\u2026';return(0,t.jsxs)(n.CollapsibleSection,{title:"Activity",open:c,onOpenChange:x,children:[k&&(0,t.jsx)("span",{role:b?.errored?'alert':void 0,style:Object.assign({},l.textSize.xs,{display:'block',padding:'2px 0 8px',color:l.text.tertiary}),children:k}),f&&(0,t.jsxs)("div",{style:{display:'flex',minWidth:0,flexDirection:'column',gap:8},children:[(0,t.jsx)(h,{title:"CPU",value:`${Math.round(f.cpuPct)}%`,description:b?.hostCores?`Up to ${100*b.hostCores}% across host cores`:void 0,series:j,maxValue:Math.max(S,p(j))}),(0,t.jsx)(h,{title:"Memory",value:u(f.memBytes),series:$,maxValue:p($)}),(0,t.jsx)(h,{title:"Network",value:`\u2193 ${u(f.netInBytesPerSec)}/s \xb7 \u2191 ${u(f.netOutBytesPerSec)}/s`,series:M,maxValue:p(M)})]})]})};var t=r(d[0]),s=r(d[1]),l=r(d[2]),n=r(d[3]);const o=100,c=28;function x(t,s){if(0===t.length)return'';const l=Math.max(s,1);return t.map((s,n)=>{const x=1===t.length?o:n/(t.length-1)*o,u=Number.isFinite(s)?Math.max(0,s):0,p=c-26*Math.min(1,u/l)-1;return`${0===n?'M':'L'} ${x.toFixed(2)} ${p.toFixed(2)}`}).join(' ')}function u(t){const s=Number.isFinite(t)?Math.max(0,t):0;return s<1024?`${Math.round(s)} B`:s<1048576?`${(s/1024).toFixed(s<10240?1:0)} KB`:s<1073741824?`${(s/1048576).toFixed(s<10485760?1:0)} MB`:`${(s/1073741824).toFixed(1)} GB`}function p(t,s=1){return Math.max(s,...t.flatMap(t=>t.values))}function h({title:s,value:n,description:u,series:p,maxValue:h}){return(0,t.jsxs)("div",{style:{padding:'9px 10px 8px',border:`1px solid ${l.border.secondary}`,borderRadius:l.radius.md,backgroundColor:l.bg.subtle},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'baseline',gap:8},children:[(0,t.jsx)("span",{style:Object.assign({},l.textSize.xs,{flex:1,fontWeight:500,color:l.text.default}),children:s}),(0,t.jsx)("span",{style:Object.assign({},l.textSize.xs,{color:l.text.secondary}),children:n})]}),u&&(0,t.jsx)("span",{style:Object.assign({},l.textSize['2xs'],{display:'block',color:l.text.tertiary}),children:u}),(0,t.jsxs)("svg",{role:"img","aria-label":`${s}: ${n}`,viewBox:`0 0 ${o} ${c}`,preserveAspectRatio:"none",style:{display:'block',width:'100%',height:38,marginTop:7},children:[(0,t.jsx)("line",{x1:"0",y1:14,x2:o,y2:14,stroke:l.border.secondary,strokeWidth:"0.5",vectorEffect:"non-scaling-stroke"}),p.map(s=>(0,t.jsx)("path",{d:x(s.values,h),fill:"none",stroke:s.color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},s.label))]}),p.length>1&&(0,t.jsx)("div",{style:{display:'flex',gap:12,marginTop:2},children:p.map(s=>(0,t.jsx)("span",{style:Object.assign({},l.textSize['2xs'],{color:s.color,whiteSpace:'nowrap'}),children:s.label},s.label))})]})}function y(t){return t.at(-1)??null}},298,[151,38,294,299]);
|
|
355
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.CollapsibleSection=function({title:s,open:l,onOpenChange:c,children:x}){const b=(0,n.useId)();return(0,t.jsxs)("section",{"aria-label":s,style:{minWidth:0,borderBottom:`1px solid ${o.border.secondary}`},children:[(0,t.jsxs)("button",{type:"button","aria-expanded":l,"aria-controls":b,onClick:()=>c(!l),style:{display:'flex',width:'100%',minHeight:40,alignItems:'center',justifyContent:'space-between',gap:12,padding:'8px 0',boxSizing:'border-box',border:0,backgroundColor:'transparent',color:o.text.tertiary,fontFamily:'inherit',textAlign:'left',cursor:'pointer'},children:[(0,t.jsx)("span",{style:Object.assign({},o.textSize.xs,{color:o.text.tertiary,fontWeight:500}),children:s}),(0,t.jsx)(o.ChevronDownIcon,{size:14,color:o.icon.tertiary,style:{flexShrink:0,transform:l?'rotate(0deg)':'rotate(-90deg)',transition:'transform 160ms cubic-bezier(.4, 0, .2, 1)'}})]}),l&&(0,t.jsx)("div",{id:b,style:{minWidth:0,paddingBottom:8},children:x})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2])},299,[151,38,294]);
|
|
356
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.CurrentAppSection=function({client:s}){const h=s?.foregroundApp??null,p=h?h.label??h.id:o,b=[{label:'App ID',value:h?.id??o},{label:'Version',value:h?.version??o},{label:'Build number',value:h?.build??o},'android'===s?.platform?{label:'Minimum SDK',value:null!=h?.minSdk?String(h.minSdk):o}:{label:'Minimum iOS',value:h?.minOS??o},{label:'PID',value:null!=h?.pid?String(h.pid):o}];return(0,t.jsxs)("section",{"aria-label":"Current app",style:{padding:'18px 0 20px'},children:[(0,t.jsxs)("div",{style:{display:'flex',alignItems:'flex-start',justifyContent:'space-between',gap:16,marginBottom:18},children:[(0,t.jsxs)("div",{style:{display:'flex',flexDirection:'column',gap:4,minWidth:0},children:[(0,t.jsx)(n.SidebarSectionHeading,{children:"Current app"}),(0,t.jsxs)("div",{style:{display:'flex',flexWrap:'wrap',alignItems:'center',gap:6},children:[(0,t.jsx)("span",{title:p,style:Object.assign({},l.heading.xl,{color:h?l.text.default:l.text.tertiary,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}),children:p}),h?.isReactNative&&(0,t.jsx)(x,{color:"info",children:"React Native"}),h?.debuggable&&(0,t.jsx)(x,{color:"warning",children:"debuggable"})]})]}),(0,t.jsx)(c,{iconDataUrl:h?.iconDataUrl})]}),(0,t.jsx)("dl",{style:{display:'grid',gridTemplateColumns:'auto minmax(0, 1fr)',rowGap:4,columnGap:16,margin:0},children:b.map(l=>(0,t.jsx)(u,{detail:l},l.label))})]})};var t=r(d[0]),l=r(d[1]),n=r(d[2]);const s=52,o='unknown';function c({iconDataUrl:n}){return(0,t.jsx)("span",{"aria-hidden":"true",style:{display:'flex',alignItems:'center',justifyContent:'center',width:s,height:s,flexShrink:0,boxSizing:'border-box',overflow:'hidden',border:n?void 0:`1px solid ${l.border.default}`,borderRadius:l.radius.lg,backgroundColor:l.bg.element},children:n?(0,t.jsx)("img",{src:n,alt:"",width:s,height:s,style:{display:'block',width:'100%',height:'100%',objectFit:'cover'}}):(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",stroke:l.icon.quaternary}),(0,t.jsx)("path",{d:"M10 4v4h12",stroke:l.icon.quaternary})]})})}function u({detail:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{style:Object.assign({},l.textSize.xs,{color:l.text.tertiary}),children:n.label}),(0,t.jsx)("dd",{title:n.value,style:Object.assign({},l.textSize.xs,{minWidth:0,margin:0,color:l.text.default,fontFamily:l.font.mono,textAlign:'right',overflowWrap:'anywhere',fontVariantNumeric:'tabular-nums'}),children:n.value})]})}function x({color:n,children:s}){return(0,t.jsx)("span",{style:Object.assign({},l.textSize['2xs'],{color:l.text[n],background:l.bg[n],borderRadius:l.radius.full,padding:'0 8px',flexShrink:0}),children:s})}},300,[151,294,301]);
|
|
357
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarSectionHeading=function({children:n}){return(0,t.jsx)("span",{style:Object.assign({},o.textSize.xs,{display:"block",fontFamily:o.font.mono,color:o.text.tertiary}),children:n})},e.SidebarRow=function({label:n,children:l,borderBottom:s=!0,compact:c=!1}){return(0,t.jsxs)("div",{style:{display:"flex",flexWrap:c?"wrap":void 0,alignItems:"center",gap:c?12:16,height:c?void 0:51,minHeight:c?51:void 0,boxSizing:"border-box",padding:"11px 0",borderBottom:s?`1px solid ${o.border.secondary}`:void 0},children:[(0,t.jsx)("span",{style:Object.assign({},o.textSize.sm,{flex:1,fontWeight:500,color:o.text.default}),children:n}),l]})},e.SidebarSwitch=function({checked:n,disabled:l=!1,label:s,onChange:c}){return(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":n,"aria-label":s,disabled:l,onClick:()=>c(!n),style:{width:44,height:26,padding:3,boxSizing:"border-box",flexShrink:0,border:0,borderRadius:o.radius.full,backgroundColor:n?o.text.default:o.bg.selected,cursor:l?"default":"pointer",opacity:l?.5:1,transition:"background-color 180ms cubic-bezier(.4, 0, .2, 1)"},children:(0,t.jsx)("span",{style:{display:"block",width:20,height:20,borderRadius:o.radius.full,backgroundColor:o.bg.default,boxShadow:o.shadow.xs,transform:`translateX(${n?18:0}px)`,transition:"transform 180ms cubic-bezier(.4, 0, .2, 1)"}})})};var t=r(d[0]),o=r(d[1])},301,[151,294]);
|
|
358
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceOptionsSection=function({client:j}){const[C,y]=(0,o.useState)(!0),L=j?.deviceSettings??null,R=j?.deviceSettingsPending??k,q=j?.platform;function z(l){return null===L?'appearance'===l||'ios'===q:void 0!==L[l]&&'unsupported'!==L[l]}function B(l){return L?.[l]??u[l]}function O(l,o){const t=null===L||R.has(l);return o.map(l=>Object.assign({},l,{disabled:t}))}function X(l,o){null===L||R.has(l)||j?.setDeviceSetting(l,o)}const D='ios'===j?.platform,_=w.filter(z);function G(l){return D||_.at(-1)!==l}return(0,l.jsxs)(n.CollapsibleSection,{title:"Device options",open:C,onOpenChange:y,children:[z('appearance')&&(0,l.jsx)(c.SidebarRow,{compact:!0,label:"Appearance",borderBottom:G('appearance'),children:(0,l.jsx)(t.SegmentedControl,{ariaLabel:"Appearance",options:O('appearance',b),value:B('appearance'),onChange:l=>X('appearance',l)})}),'ios'===q&&z('liquid-glass')&&(0,l.jsx)(c.SidebarRow,{compact:!0,label:"Liquid glass",borderBottom:G('liquid-glass'),children:(0,l.jsx)(t.SegmentedControl,{ariaLabel:"Liquid glass",options:O('liquid-glass',v),value:B('liquid-glass'),onChange:l=>X('liquid-glass',l)})}),'ios'===q&&z('color-filter')&&(0,l.jsx)(c.SidebarRow,{compact:!0,label:"Color filter",borderBottom:G('color-filter'),children:(0,l.jsx)(t.SegmentedControl,{ariaLabel:"Color filter",options:O('color-filter',f),value:B('color-filter'),onChange:l=>X('color-filter',l)})}),'android'===q&&z('network')&&(0,l.jsx)(c.SidebarRow,{compact:!0,label:"Network",borderBottom:G('network'),children:(0,l.jsx)(t.SegmentedControl,{ariaLabel:"Network",options:O('network',p),value:B('network'),onChange:l=>X('network',l)})}),('ios'===q||'android'===q)&&z('text-size')&&(0,l.jsx)(c.SidebarRow,{compact:!0,label:"Text size",borderBottom:G('text-size'),children:(0,l.jsx)(t.SegmentedControl,{ariaLabel:"Text size",options:O('text-size','android'===q?h:x),value:B('text-size'),onChange:l=>X('text-size',l)})}),'ios'===q&&S.map(({key:o,label:t})=>z(o)?(0,l.jsx)(c.SidebarRow,{label:t,borderBottom:G(o),children:(0,l.jsx)(c.SidebarSwitch,{checked:'on'===B(o),disabled:null===L||R.has(o),label:t,onChange:l=>X(o,l?'on':'off')})},o):null),'ios'===j?.platform&&(0,l.jsx)(s.KeyboardSection,{client:j})]})};var l=r(d[0]),o=r(d[1]),t=r(d[2]),n=r(d[3]),s=r(d[4]),c=r(d[5]);const u={appearance:'light',network:'on','liquid-glass':'clear','color-filter':'none','text-size':'large','reduce-motion':'off','increase-contrast':'off','show-borders':'off','reduce-transparency':'off',voiceover:'off'},b=[{value:'light',label:'Light'},{value:'dark',label:'Dark'}],p=[{value:'on',label:'On'},{value:'off',label:'Off'}],v=[{value:'clear',label:'Clear'},{value:'tinted',label:'Tinted'}],f=[{value:'none',label:'None'},{value:'grayscale',label:'Gray'},{value:'red-green',label:'R-G'},{value:'green-red',label:'G-R'},{value:'blue-yellow',label:'B-Y'}],x=[{value:'extra-small',label:'XS'},{value:'small',label:'S'},{value:'medium',label:'M'},{value:'large',label:'L'},{value:'extra-large',label:'XL'},{value:'extra-extra-large',label:'2XL'},{value:'extra-extra-extra-large',label:'3XL'}],h=[{value:'small',label:'S'},{value:'medium',label:'M'},{value:'large',label:'L'},{value:'extra-large',label:'XL'}],S=[{key:'reduce-motion',label:'Reduce motion'},{key:'increase-contrast',label:'Increase contrast'},{key:'show-borders',label:'Show borders'},{key:'reduce-transparency',label:'Reduce transparency'},{key:'voiceover',label:'VoiceOver'}],w=['appearance','network','liquid-glass','color-filter','text-size',...S.map(({key:l})=>l)],k=new Set},302,[151,38,294,299,303,301]);
|
|
359
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.KeyboardSection=function({client:l}){const c=l.hardwareKeyboardConnected;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.SidebarRow,{label:"Hardware keyboard",children:(0,o.jsx)(n.SidebarActionButton,{disabled:null===c,onClick:()=>l.setHardwareKeyboardConnected(!c),children:"Toggle"})}),(0,o.jsx)(t.SidebarRow,{label:"Software keyboard",borderBottom:!1,children:(0,o.jsx)(n.SidebarActionButton,{disabled:null===c,onClick:()=>l.toggleSoftwareKeyboard(),children:"Toggle"})})]})};var o=r(d[0]),n=r(d[1]),t=r(d[2])},303,[151,304,301]);
|
|
360
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarActionButton=function({children:l,disabled:o,onClick:s}){return(0,n.jsx)(t.Button,{size:"2xs",theme:"secondary",disabled:o,onClick:s,style:{flexShrink:0,borderRadius:t.radius.full,paddingInline:14,fontWeight:600},children:l})};var n=r(d[0]),t=r(d[1])},304,[151,294]);
|
|
361
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.EventsSection=function({client:v}){const[u,l]=(0,n.useState)(!1),h=v?.events,E=v?.eventsEnabled??!1,p=v?.attachEvents,S=v?.detachEvents,b=(0,n.useMemo)(()=>(h??[]).map(t=>({id:t.id,source:t.source,message:t.message})),[h]);return(0,n.useEffect)(()=>(u?p?.():S?.(),()=>S?.()),[p,S,u]),(0,t.jsxs)(s.CollapsibleSection,{title:"Events",open:u,onOpenChange:l,children:[(0,t.jsx)(o.LogControls,{count:h?.length??0,running:E,unit:"event",onClear:()=>v?.clearEvents(),onStart:()=>v?.attachEvents(),onStop:()=>v?.detachEvents()}),(0,t.jsx)(c.LogList,{logs:b,enabled:E,emptyMessage:E?'No events yet. Touch or interact with the device to see them here.':'Events are paused. Press Start to observe device events.'})]})};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),c=r(d[4])},305,[151,38,299,306,307]);
|
|
362
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogControls=function({count:l,running:s,unit:c="line",onClear:u,onStart:x,onStop:b}){return(0,t.jsxs)("div",{style:{display:'flex',alignItems:'center',gap:10,width:'100%',minWidth:0,boxSizing:'border-box',backgroundColor:n.bg.subtle},children:[(0,t.jsxs)("span",{style:Object.assign({},n.textSize['2xs'],{flex:1,minWidth:0,fontFamily:n.font.mono,fontWeight:400,color:n.text.tertiary,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}),children:[l," ",1===l?c:`${c}s`]}),(0,t.jsx)(o.SidebarActionButton,{onClick:s?b:x,children:s?'Stop':'Start'}),(0,t.jsx)(o.SidebarActionButton,{disabled:0===l,onClick:u,children:"Clear"})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2])},306,[151,294,304]);
|
|
363
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogList=function({logs:u=[],enabled:b=!1,emptyMessage:h}){const x=(0,l.useRef)(null);(0,l.useEffect)(()=>{const o=x.current;o&&(o.scrollTop=o.scrollHeight)},[u]);const p=h??(b?'No logs. The stream resumes on the next event.':'Logs are paused. Press Start to stream device logs.');return(0,o.jsxs)("div",{ref:x,className:"hub-log-scroll",style:c,children:[(0,o.jsx)("style",{children:s}),0===u.length?(0,o.jsx)("div",{style:{display:'flex',flex:1,alignItems:'center',justifyContent:'center',padding:'40px 24px',textAlign:'center'},children:(0,o.jsx)("span",{style:Object.assign({},n.textSize.xs,{color:n.text.secondary}),children:p})}):u.map(l=>(0,o.jsx)(t.LogRow,{entry:l},l.id))]})};var o=r(d[0]),l=r(d[1]),n=r(d[2]),t=r(d[3]);const s="\n.hub-log-scroll::-webkit-scrollbar { width: 12px; }\n.hub-log-scroll::-webkit-scrollbar-track { background: transparent; }\n.hub-log-scroll::-webkit-scrollbar-thumb {\n background-color: var(--expo-theme-background-selected);\n border-radius: 8px;\n border: 3px solid transparent;\n background-clip: padding-box;\n min-height: 24px;\n}\n.hub-log-scroll::-webkit-scrollbar-thumb:hover {\n background-color: var(--expo-theme-border-default);\n}\n",c={height:200,flexShrink:0,overflowY:'auto',overflowX:'hidden',display:'flex',flexDirection:'column',overflowAnchor:'none'}},307,[151,38,294,308]);
|
|
364
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogRow=function({entry:n}){const o=n.message.length>68?`${n.message.slice(0,68)}\u2026`:n.message;return(0,s.jsxs)("div",{style:{display:'flex',alignItems:'flex-start',gap:8,padding:'8px 0',borderBottom:`1px solid ${t.border.secondary}`},children:[(0,s.jsx)("span",{style:Object.assign({},t.textSize['2xs'],{padding:'1px 5px',borderRadius:t.radius.sm,backgroundColor:t.bg.element,fontFamily:t.font.mono,color:t.text.tertiary,flexShrink:0,marginTop:1}),children:n.source}),(0,s.jsx)("span",{title:n.message,style:Object.assign({},t.textSize.xs,{flex:1,minWidth:0,color:t.text.secondary,overflowWrap:'anywhere'}),children:o})]})};var s=r(d[0]),t=r(d[1])},308,[151,294]);
|
|
365
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LogsSection=function({client:c}){const[u,L]=(0,t.useState)(!1),h=c?.logs??[],f=c?.logsEnabled??!1,p=c?.attachLogs,S=c?.detachLogs;return(0,t.useEffect)(()=>(u?p?.():S?.(),()=>S?.()),[p,S,u]),(0,o.jsxs)(n.CollapsibleSection,{title:"Logs",open:u,onOpenChange:L,children:[(0,o.jsx)(s.LogControls,{count:h.length,running:f,onClear:()=>c?.clearLogs(),onStart:()=>c?.attachLogs(),onStop:()=>c?.detachLogs()}),(0,o.jsx)(l.LogList,{logs:h,enabled:f})]})};var o=r(d[0]),t=r(d[1]),n=r(d[2]),s=r(d[3]),l=r(d[4])},309,[151,38,299,306,307]);
|
|
366
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamOptionsSection=function({client:y,defaultOpen:P=!1,streamMode:R="mjpeg",httpCodec:M,streamModeAvailability:f=c,onStreamModeChange:F,onHttpCodecChange:T}){const[A,O]=(0,t.useState)(P),H=y.streamCapabilities??p,L={mjpeg:f.mjpeg&&H.modeAvailability.mjpeg,h264:f.h264&&H.modeAvailability.h264,webrtc:f.webrtc&&H.modeAvailability.webrtc},W=L[R]?R:u.find(l=>L[l])??R,$='android'===y.platform?'websocket':'http',B='android'===y.platform?'WebSocket':'HTTP',E=[{value:$,label:B},{value:'webrtc',label:'WebRTC'}],G=h.filter(l=>H.httpCodecs.includes(l.value)),J=v.filter(l=>H.webRtcCodecs.includes(l.value)),V=y.streamSettings??s,N=!(null!==y.streamSettings)||y.streamSettingsPending,k='webrtc'===W?'webrtc':$,q=L.mjpeg||L.h264;function z(l){return'h264'===l?L.h264:'mjpeg'===l?L.mjpeg:q}const D=M??('mjpeg'===W?'mjpeg':'h264'===W?'h264':'auto'),Q='mjpeg'===W||'h264'===W?W:null,_=(Q&&H.httpCodecs.includes(Q)&&z(Q)?Q:void 0)??G.find(l=>z(l.value))?.value,I=H.httpCodecs.includes(D)&&z(D)?D:_??D,K=H.webRtcCodecs.includes(y.webRtcCodec)?y.webRtcCodec:J[0]?.value??y.webRtcCodec,U='webrtc'===k||L.h264&&'mjpeg'!==I;function X(l){return'mjpeg'===l?'mjpeg':L.h264?'h264':'mjpeg'}function Y(l,t){N||y.updateStreamSettings({[l]:t})}const Z=H.modeAvailability.h264&&!f.h264||H.modeAvailability.webrtc&&!f.webrtc,ee='android'===y.platform&&!H.modeAvailability.webrtc;return(0,l.jsxs)(o.CollapsibleSection,{title:"Stream options",open:A,onOpenChange:O,children:[(0,l.jsx)(b.SidebarRow,{label:"Transport",children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:"Stream transport",options:E.map(l=>Object.assign({},l,{disabled:!F||('webrtc'===l.value?!L.webrtc:!q)})),value:k,onChange:function(l){F?.('webrtc'===l?'webrtc':X(I))}})}),G.length>0&&(0,l.jsx)(b.SidebarRow,{label:`${B} codec`,children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:`${B} codec`,options:G.map(l=>Object.assign({},l,{disabled:'webrtc'===k||!T||!z(l.value)})),value:I,onChange:function(l){T?.(l),'webrtc'!==k&&F?.(X(l))}})}),J.length>0&&(0,l.jsx)(b.SidebarRow,{label:"WebRTC codec",borderBottom:y.capabilities.streamSettings,children:(0,l.jsx)(n.SegmentedControl,{ariaLabel:"WebRTC codec",options:J.map(l=>Object.assign({},l,{disabled:'webrtc'!==k||!L.webrtc})),value:K,onChange:l=>y.setWebRtcCodec(l)})}),Z&&(0,l.jsx)("span",{style:Object.assign({},n.textSize.xs,{display:'block',padding:'0 0 8px',color:n.text.tertiary}),children:'android'===y.platform?'WebRTC requires localhost or HTTPS.':'H.264 and WebRTC require localhost or HTTPS. MJPEG remains available on insecure HTTP.'}),ee&&(0,l.jsx)("span",{style:Object.assign({},n.textSize.xs,{display:'block',padding:'0 0 8px',color:n.text.tertiary}),children:"Start the standalone server with --transport webrtc to enable WebRTC."}),y.capabilities.streamSettings&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(b.SidebarRow,{label:"Max size",children:(0,l.jsx)(n.Select,{ariaLabel:"Max size",value:String(V.maxDimension),options:C(V.maxDimension,j,l=>0===l?'Full':`${l} px`),disabled:N,onChange:l=>Y('maxDimension',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"MJPEG FPS",children:(0,l.jsx)(n.Select,{ariaLabel:"MJPEG FPS",value:String(V.mjpegFps),options:C(V.mjpegFps,S,l=>`${l} FPS`),disabled:N||'http'!==k,onChange:l=>Y('mjpegFps',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"MJPEG quality",children:(0,l.jsx)(n.Select,{ariaLabel:"MJPEG quality",value:String(V.mjpegQuality),options:C(V.mjpegQuality,x,l=>`${Math.round(100*l)}%`),disabled:N||'http'!==k,onChange:l=>Y('mjpegQuality',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"Video FPS",children:(0,l.jsx)(n.Select,{ariaLabel:"Video FPS",value:String(V.h264Fps),options:C(V.h264Fps,S,l=>`${l} FPS`),disabled:N||!U,onChange:l=>Y('h264Fps',Number(l))})}),(0,l.jsx)(b.SidebarRow,{label:"Video bitrate",borderBottom:!1,children:(0,l.jsx)(n.Select,{ariaLabel:"Video bitrate",value:String(V.h264Bitrate),options:C(V.h264Bitrate,w,l=>l/1e6+" Mbps"),disabled:N||!U,onChange:l=>Y('h264Bitrate',Number(l))})})]})]})};var l=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),b=r(d[4]);const s={mjpegFps:30,mjpegQuality:.7,maxDimension:0,h264Bitrate:6e6,h264Fps:30},c={mjpeg:!0,h264:!0,webrtc:!0},p={modeAvailability:c,httpCodecs:['auto','h264','mjpeg'],webRtcCodecs:['h264','vp9','vp8']},u=['mjpeg','h264','webrtc'],h=[{value:'auto',label:'Auto'},{value:'h264',label:'H.264'},{value:'mjpeg',label:'MJPEG'}],v=[{value:'h264',label:'H.264'},{value:'vp9',label:'VP9'},{value:'vp8',label:'VP8'}],j=[{value:'0',label:'Full'},{value:'1920',label:'1920 px'},{value:'1600',label:'1600 px'},{value:'1280',label:'1280 px'},{value:'960',label:'960 px'},{value:'720',label:'720 px'}],S=['60','30','20','15','10','5'].map(l=>({value:l,label:`${l} FPS`})),x=[{value:'0.45',label:'45%'},{value:'0.55',label:'55%'},{value:'0.7',label:'70%'},{value:'0.85',label:'85%'},{value:'1',label:'100%'}],w=[{value:'1500000',label:'1.5 Mbps'},{value:'3000000',label:'3 Mbps'},{value:'6000000',label:'6 Mbps'},{value:'10000000',label:'10 Mbps'},{value:'16000000',label:'16 Mbps'}];function C(l,t,n){const o=String(l);return t.some(l=>l.value===o)?t:[{value:o,label:n(l)},...t]}},310,[151,38,294,299,301]);
|
|
367
|
+
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamPanel=function({device:p,client:u,agentInteraction:f,DeviceScreen:h,displayScreen:x,onShutdown:v,onRemove:b,framed:y=!0}){return(0,n.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:40,padding:40,margin:y?'16px 8px':0,boxSizing:'border-box',backgroundColor:t.bg.default,border:y?`1px solid ${t.border.secondary}`:'none',borderRadius:y?t.radius.lg:0,boxShadow:y?t.shadow.sm:'none',overflow:'hidden'},children:[(0,n.jsxs)("div",{style:{display:'flex',flexDirection:'column',alignItems:'center',gap:20,width:'100%',minHeight:0},children:[(0,n.jsx)(o.DeviceTitle,{device:p,status:u.status},p.id),(0,n.jsx)(a.PhoneFrame,{platform:p.platform,client:u,agentInteraction:f,DeviceScreen:h,displayScreen:x})]}),(0,n.jsx)(c.StreamControls,{platform:p.platform,physical:p.physical,appearance:u.appearance,onToggleAppearance:()=>u.setAppearance('dark'===u.appearance?'light':'dark'),onHome:()=>u.pressButton('home'),onBack:()=>u.pressButton('back'),onRecents:()=>u.pressButton('recents'),onReload:()=>u.reload(),onRotate:()=>u.rotate(),onSave:async()=>{const n=await u.screenshot();n&&s(n,l(p.name))},onShutdown:v,onRemove:b})]})};var n=r(d[0]),t=r(d[1]),o=r(d[2]),a=r(d[3]),c=r(d[4]);function s(n,t){const o=URL.createObjectURL(n),a=document.createElement('a');a.href=o,a.download=t,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(o),0)}function l(n){return`${n.trim().replace(/[^a-zA-Z0-9._-]+/g,'-').replace(/^-+|-+$/g,'')||'device'}-${(new Date).toISOString().replace(/[:.]/g,'-').replace(/Z$/,'')}.png`}},311,[151,294,312,313,316]);
|
|
368
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DeviceTitle=function({device:s,status:c}){const[b,u]=(0,l.useState)(null),x=b===s.id,f=x?s.id:s.name,h=t[c];return(0,o.jsx)(n.Button,{theme:"tertiary",size:"2xs",onClick:()=>u(x?null:s.id),leftSlot:(0,o.jsx)("span",{title:f,style:{display:'block',flex:'1 1 auto',minWidth:0,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap',fontFamily:x?n.font.mono:n.font.sans},children:f}),rightSlot:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{"aria-hidden":!0,style:{width:6,height:6,flexShrink:0,boxSizing:'content-box',border:`2px solid ${h.ringColor}`,borderRadius:n.radius.full,backgroundColor:h.dotColor}}),(0,o.jsx)("span",{"aria-live":"polite",style:{flexShrink:0,color:h.labelColor},children:h.label})]}),style:{maxWidth:'min(100%, 320px)',minWidth:0,flexShrink:0,boxSizing:'border-box',gap:6,paddingInline:12,borderWidth:.5,borderColor:n.border.default,borderRadius:n.radius.full}})};var o=r(d[0]),l=r(d[1]),n=r(d[2]);const t={idle:{label:'Offline',dotColor:n.icon.danger,ringColor:n.border.danger,labelColor:n.text.secondary},connecting:{label:'Starting',dotColor:n.icon.warning,ringColor:n.border.warning,labelColor:n.text.secondary},streaming:{label:'Live',dotColor:n.text.success,ringColor:n.border.success,labelColor:n.text.success},error:{label:'Error',dotColor:n.icon.danger,ringColor:n.border.danger,labelColor:n.text.secondary}}},312,[151,38,294]);
|
|
369
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PhoneFrame=function({platform:h,client:x,agentInteraction:b,DeviceScreen:y,displayScreen:j}){const[f,P]=(0,n.useState)(!1),[S,w]=(0,n.useState)(null),{ratio:F,radiusFraction:$,squircle:q}=v[h],O=x?j(x.screen):null,_=O&&O.height>0?O.width/O.height:F,I={width:`min(${p*Math.max(_,1)}px, calc((100vh - ${u}px) * ${_}), 100%)`,aspectRatio:`${_}`,containerType:'inline-size',position:'relative',isolation:'isolate'},M=$/Math.max(_,1)*100,T=`${M.toFixed(3)}cqw`,k=x&&'idle'!==x.status,z=!!b&&f&&S!==b.id;return(0,t.jsx)("div",{"data-testid":"device-screen-frame","data-agent-active":b?'true':'false',style:Object.assign({},I,{boxShadow:l,borderRadius:T}),onPointerEnter:t=>{'mouse'===t.pointerType&&P(!0)},onPointerLeave:()=>P(!1),children:(0,t.jsxs)("div",{"data-testid":"device-screen-clip",style:{position:'absolute',inset:0,clipPath:(0,c.deviceScreenClipPath)(M,q)},children:[k?(0,t.jsx)(y,{client:x,agentInteraction:b}):(0,t.jsx)("div",{style:{width:'100%',height:'100%',backgroundColor:s.bg.element}}),(0,t.jsx)("div",{"data-testid":"agent-device-overlay-clip",style:{position:'absolute',inset:0,zIndex:2,pointerEvents:z?'auto':'none'},children:(0,t.jsx)(o.AgentDeviceOverlay,{visible:z,onTakeOver:()=>w(b?.id??null)})})]})})};var t=r(d[0]),n=r(d[1]),s=r(d[2]),o=r(d[3]),c=r(d[4]);const l='0 40px 80px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.28)',u=258,p=480,v={ios:{ratio:.460431654676259,radiusFraction:.14066496163682865,squircle:!0},android:{ratio:.450070323488045,radiusFraction:.02564102564102564,squircle:!1}}},313,[151,38,294,314,315]);
|
|
370
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AgentDeviceOverlay=function({visible:c,onTakeOver:h}){return(0,t.jsx)("div",{hidden:!c,"aria-hidden":!c,role:"dialog","aria-label":"Agent device activity","data-testid":"agent-device-overlay",style:{position:'absolute',inset:0,zIndex:2,display:c?'flex':'none',alignItems:'center',justifyContent:'center',padding:24,boxSizing:'border-box',pointerEvents:'auto',textAlign:'center',backgroundColor:s},children:(0,t.jsxs)("div",{style:{display:'flex',width:'100%',maxWidth:300,flexDirection:'column',alignItems:'center',gap:12},children:[(0,t.jsx)("div",{style:Object.assign({color:o},n.textSize.sm,{fontWeight:600}),children:"Agent is using this device"}),(0,t.jsx)("div",{style:Object.assign({maxWidth:260,color:l},n.textSize.xs),children:"Taking over might collide with what the agent is doing."}),(0,t.jsx)(n.Button,{theme:"agent-overlay",size:"sm",onClick:h,style:{fontFamily:'inherit'},children:(0,t.jsx)("span",{style:Object.assign({},n.textSize.xs,{fontWeight:500}),children:"Take over anyway"})})]})})};var t=r(d[0]),n=r(d[1]);const s='rgba(0, 0, 0, 0.55)',l='rgba(255, 255, 255, 0.7)',o='rgba(218, 233, 255, 0.74)'},314,[151,294]);
|
|
371
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deviceScreenClipPath=function($,f){const u=n($),l=n($*(f?o:t)),s=`-${c}`,h=`calc(${u} - ${c})`,v=`calc(100% - ${u} + ${c})`;return[`shape(from ${u} ${s}`,`hline to calc(100% - ${u})`,`curve to 100% ${h} with ${l} 0 from start / 0 -${l} from end`,`vline to ${v}`,`curve to calc(100% - ${u}) calc(100% + ${c}) with 0 ${l} from start / ${l} 0 from end`,`hline to ${u}`,`curve to 0 ${v} with -${l} 0 from start / 0 ${l} from end`,`vline to ${h}`,`curve to ${u} ${s} with 0 -${l} from start / -${l} 0 from end`,'close)'].join(', ')};const t=$(1),o=$(1.1),c='0.5px';function $(t){return(Math.pow(.5,Math.pow(.5,t))-.5)/.375}function n(t){return`${t.toFixed(3)}cqw`}},315,[]);
|
|
372
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamControls=function({platform:t,physical:l,appearance:c,onToggleAppearance:s,onHome:I,onBack:p,onRecents:x,onReload:j,onRotate:u,onSave:b,onShutdown:h,onRemove:C}){const R='android'===t,S=(0,o.jsxs)(n.Dropdown,{side:"top",align:"end",alignOffset:-80,onCloseAutoFocus:o=>o.preventDefault(),trigger:(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.DotsIcon,{}),label:"More"}),children:[R&&(0,o.jsx)(n.DropdownItem,{label:"Back",Icon:n.BackIcon,onSelect:p}),R&&(0,o.jsx)(n.DropdownItem,{label:"Recents",Icon:n.RecentsIcon,onSelect:x}),(0,o.jsx)(n.DropdownItem,{label:"Rotate",Icon:n.RotateIcon,onSelect:u}),(0,o.jsx)(n.DropdownItem,{label:"Shutdown",Icon:n.PowerIcon,onSelect:h}),!l&&(0,o.jsx)(n.DropdownItem,{label:"Remove",Icon:n.TrashIcon,destructive:!0,onSelect:C})]});return(0,o.jsxs)("div",{style:{display:'flex',alignItems:'flex-end',gap:24},children:[(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.CameraIcon,{}),label:"Save",onClick:b}),(0,o.jsx)(n.Switch,{checked:'dark'===c,onChange:s,label:"Theme"}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.HomeIcon,{}),label:"Home",variant:"primary",onClick:I}),(0,o.jsx)(n.ControlButton,{icon:(0,o.jsx)(n.RefreshIcon,{}),label:"Reload",onClick:j}),S]})};var o=r(d[0]),n=r(d[1])},316,[151,294]);
|
|
373
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.EmptyState=function({platform:n}){const s='ios'===n?'No booted simulators':'android'===n?'No booted emulators':'No booted devices',l='ios'===n?'There are no booted simulators. Use the + button to add one.':'android'===n?'There are no booted emulators or connected devices. Use the + button to add one.':'There are no booted simulators, emulators, or connected devices. Use the + button to add a simulator or emulator.';return(0,o.jsxs)("section",{style:{flex:1,minWidth:0,display:'flex',flexDirection:'column',alignItems:'center',justifyContent:'center',gap:16,padding:40,margin:'16px 8px',boxSizing:'border-box',backgroundColor:t.bg.default,border:`1px solid ${t.border.secondary}`,borderRadius:t.radius.lg,boxShadow:t.shadow.sm,overflow:'hidden',textAlign:'center'},children:[(0,o.jsx)("div",{style:{display:'flex',alignItems:'center',justifyContent:'center',width:56,height:56,borderRadius:t.radius.full,border:`1px solid ${t.border.secondary}`,backgroundColor:t.bg.subtle},children:(0,o.jsx)(t.PhoneIcon,{size:28,color:t.icon.secondary})}),(0,o.jsx)("h2",{style:Object.assign({},t.heading.lg,{color:t.text.default,margin:0}),children:s}),(0,o.jsx)("p",{style:Object.assign({},t.textSize.sm,{color:t.text.secondary,margin:0,maxWidth:320}),children:l})]})};var o=r(d[0]),t=r(d[1])},317,[151,294]);
|
|
374
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.OutputSection=function({client:c}){return(0,t.jsx)(n.LogsSection,{client:c})};var t=r(d[0]),n=r(d[1])},318,[151,309]);
|
|
375
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamSection=function({mode:b,availability:u,onChange:v}){const h=(0,l.useId)(),j=!u.h264||!u.webrtc,p=c.map(t=>Object.assign({},t,{disabled:!u[t.value]}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.SidebarRow,{label:"Stream",children:(0,t.jsx)(n.SegmentedControl,{ariaLabel:"Stream mode",ariaDescribedBy:j?h:void 0,options:p,value:b,onChange:v})}),j&&(0,t.jsx)("span",{id:h,style:Object.assign({},s.textSize.xs,{display:'block',padding:'0 0 11px',color:s.text.tertiary}),children:"H.264 and WebRTC require localhost or HTTPS. MJPEG is used on insecure HTTP."})]})};var t=r(d[0]),l=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]);const c=[{value:'mjpeg',label:'MJPEG'},{value:'h264',label:'H.264'},{value:'webrtc',label:'WebRTC'}]},319,[151,38,266,294,301]);
|
|
376
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.BootErrorModal=function({open:n,onClose:l,deviceName:s,message:c}){return(0,o.jsx)(t.DialogRoot,{open:n,onOpenChange:o=>{o||l()},children:(0,o.jsxs)(t.DialogContent,{children:[(0,o.jsx)(t.DialogTitle,{title:"Failed to boot device"}),(0,o.jsxs)(t.DialogContentContainer,{children:[(0,o.jsxs)("p",{style:{margin:0,fontSize:14,lineHeight:1.5,color:t.text.secondary},children:[(0,o.jsx)("strong",{style:{color:t.text.default,fontWeight:600},children:s})," could not be booted."]}),(0,o.jsx)("pre",{style:{margin:'6px 0 0',padding:'10px 12px',overflowX:'auto',whiteSpace:'pre-wrap',overflowWrap:'anywhere',backgroundColor:t.bg.subtle,border:`1px solid ${t.border.default}`,borderRadius:t.radius.lg,color:t.text.danger,fontFamily:t.font.mono,fontSize:12,lineHeight:1.5},children:c})]}),(0,o.jsx)(t.DialogFooter,{children:(0,o.jsx)(t.Button,{theme:"primary",onClick:l,children:"Close"})})]})})};var o=r(d[0]),t=r(d[1])},320,[151,294]);
|
|
377
|
+
__d(function(g,r,i,a,m,e,d){},321,[]);
|
|
378
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AnimatedDockedSidebar=function({side:s,width:o,open:l,sidebarOpen:h,children:S}){const{present:c,reducedMotion:I,visible:_}=(0,t.useSidebarPresence)(l,!h);if(!c)return null;const u=I?void 0:`width ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`,A=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsx)("div",{"aria-hidden":!_||void 0,"data-sidebar-docked":s,"data-state":_?'open':'closed',style:{width:_?o:0,height:'100%',flexShrink:0,overflow:'hidden',pointerEvents:_?'auto':'none',transition:u},children:(0,n.jsx)("div",{style:{width:o,height:'100%',transform:_?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:A,willChange:'transform'},children:S})})};var t=r(d[0]),n=r(d[1])},322,[323,151]);
|
|
379
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SIDEBAR_TRANSITION_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SIDEBAR_TRANSITION_EASING",{enumerable:!0,get:function(){return c}}),e.useSidebarPresence=function(c,o){const s=u(),[f,w]=(0,t.useState)(c),[S,b]=(0,t.useState)(c),l=(0,t.useRef)(c);return(0,t.useEffect)(()=>{if(c){const t=l.current;if(l.current=!0,w(!0),s||t)return void b(!0);let n=0;const c=requestAnimationFrame(()=>{n=requestAnimationFrame(()=>b(!0))});return()=>{cancelAnimationFrame(c),cancelAnimationFrame(n)}}if(b(!1),!o||s)return l.current=!1,void w(!1);const t=window.setTimeout(()=>{l.current=!1,w(!1)},n);return()=>window.clearTimeout(t)},[o,c,s]),{present:f,reducedMotion:s,visible:c&&S}};var t=r(d[0]);const n=200,c='cubic-bezier(0.16, 1, 0.3, 1)';function u(){const[n,c]=(0,t.useState)(()=>'undefined'!=typeof window&&!0===window.matchMedia?.('(prefers-reduced-motion: reduce)').matches);return(0,t.useEffect)(()=>{const t=window.matchMedia?.('(prefers-reduced-motion: reduce)');if(!t)return;const n=()=>c(t.matches);return t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n}},323,[38]);
|
|
380
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.dashboardHideBootDevice=function(){return'undefined'!=typeof window&&!0===window.__EXPO_DEVICE_HUB_HIDE_BOOT_DEVICE__}},324,[]);
|
|
381
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.basePath=function(){if(window.__DEV__)return'/_expo/plugins/expo-device-hub';const n=window.__EXPO_DEVICE_HUB_BASE_PATH__;if(null==n)throw new Error('window.__EXPO_DEVICE_HUB_BASE_PATH__ is not defined');return(0,_.trimTrailingSlash)(n)};var _=r(d[0])},325,[326]);
|
|
382
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.trimTrailingSlash=function(t){return t.replace(/\/+$/,'')}},326,[]);
|
|
383
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shutdownDevice=function(t){return u(o(),t)},e.removeDevice=function(t){return u(c(),t)},e.bootDevice=async function(t){return p(s(),{platform:t.platform,id:t.id,name:t.name})},e.createDevice=async function(t){return p(l(),{platform:t.platform,name:t.name,runtime:t.runtime,deviceType:t.deviceType})};var t=r(d[0]),n=r(d[1]);const o=()=>`${(0,t.basePath)()}/api/devices/shutdown`,c=()=>`${(0,t.basePath)()}/api/devices/remove`,s=()=>`${(0,t.basePath)()}/api/devices/boot`,l=()=>`${(0,t.basePath)()}/api/devices/create`;async function u(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify({platform:o.platform,id:o.id,name:o.name})});if(!c.ok)throw new Error(`Unexpected ${c.status}`);const s=await c.json();return(0,n.logUtilityErrors)(s.errors),!0===s.ok}catch(t){return console.warn('[expo-device-hub] Device action failed:',t),!1}}async function p(t,o){try{const c=await fetch(t,{method:'POST',headers:{'Content-Type':'application/json',Accept:'application/json'},body:JSON.stringify(o),signal:AbortSignal.timeout(2e5)}),s=await c.json();if((0,n.logUtilityErrors)(s.errors),!c.ok)return{id:null,error:s.error??`Unexpected ${c.status}`};const l=s.id??s.serial;return s.ok&&l?{id:l,error:null}:{id:null,error:s.error??'The device did not come online.'}}catch(t){return console.warn('[expo-device-hub] Device start failed:',t),{id:null,error:t instanceof Error?t.message:String(t)}}}},327,[325,328]);
|
|
384
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){if(!t||'object'!=typeof t)return!1;const o=t;return'string'==typeof o.id&&'string'==typeof o.message&&'string'==typeof o.error}Object.defineProperty(e,'__esModule',{value:!0}),e.isUtilityError=t,e.logUtilityErrors=function(o,n=new Set){const s=new Set;if(!Array.isArray(o))return s;for(const f of o)t(f)&&!s.has(f.id)&&(s.add(f.id),n.has(f.id)||console.error(f.message,f.error));return s}},328,[]);
|
|
385
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_SIDEBAR_WIDTH",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return u}}),e.readHideUnsupportedDevices=l,e.persistHideUnsupportedDevicesDefault=function(t){try{null===t.getItem(u)&&t.setItem(u,'true')}catch{}},e.createDashboardStore=v,Object.defineProperty(e,"useDashboardStore",{enumerable:!0,get:function(){return f}});var t=r(d[0]),s=r(d[1]),c=r(d[2]),n=r(d[3]);const o=400,u='expo-device-hub.hideUnsupportedDevices';function l(t){try{return'false'!==t.getItem(u)}catch{return!0}}function b(){if('undefined'==typeof window)return!0;try{return l(window.localStorage)}catch{return!0}}function D(){const t=(0,n.browserStreamModeAvailability)();return{selectedDeviceId:'',addedDevices:[],streamMode:(0,n.resolveStreamMode)((0,c.dashboardTransport)(),t),sidebarWidths:{left:o,right:o},sidebarPreferences:{left:(0,s.dashboardHideSidebar)()?'hidden':'auto',right:'auto'},lastOpenedSidebar:'right',hideUnsupportedDevices:b()}}function v(s={}){return(0,t.create)()(t=>Object.assign({},D(),s,{selectDevice:s=>t({selectedDeviceId:s}),reconcileSelectedDevice:s=>t(t=>s.includes(t.selectedDeviceId)?t:{selectedDeviceId:s[0]??''}),trackAddedDevice:(s,c)=>t(t=>{const n=new Set([...c,s.id]);return{addedDevices:[...t.addedDevices.filter(t=>!n.has(t.id)),s],selectedDeviceId:s.id}}),dismissDevice:s=>t(t=>({addedDevices:t.addedDevices.filter(t=>t.id!==s),selectedDeviceId:t.selectedDeviceId===s?'':t.selectedDeviceId})),chooseStreamMode:(s,c)=>t({streamMode:(0,n.resolveStreamMode)(s,c)}),resizeSidebar:(s,c)=>t(t=>({sidebarWidths:Object.assign({},t.sidebarWidths,{[s]:c})})),openSidebar:(s,c)=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:c?'auto':'open'}),lastOpenedSidebar:s})),closeSidebar:s=>t(t=>({sidebarPreferences:Object.assign({},t.sidebarPreferences,{[s]:'hidden'})})),setHideUnsupportedDevices:s=>t({hideUnsupportedDevices:s})}))}const f=v()},329,[330,333,334,335]);
|
|
386
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})})},330,[331,332]);
|
|
387
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createStore",{enumerable:!0,get:function(){return n}});const t=t=>{let n;const c=new Set,o=(t,o)=>{const s="function"==typeof t?t(n):t;if(!Object.is(s,n)){const t=n;n=(null!=o?o:"object"!=typeof s||null===s)?s:Object.assign({},n,s),c.forEach(c=>c(n,t))}},s=()=>n,u={setState:o,getState:s,getInitialState:()=>l,subscribe:t=>(c.add(t),()=>c.delete(t))},l=n=t(o,s,u);return u},n=n=>n?t(n):t},331,[]);
|
|
388
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"create",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"useStore",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]);const c=e=>e;function l(e,t=c){const n=u.default.useSyncExternalStore(e.subscribe,u.default.useCallback(()=>t(e.getState()),[e,t]),u.default.useCallback(()=>t(e.getInitialState()),[e,t]));return u.default.useDebugValue(n),n}const s=e=>{const t=(0,n.createStore)(e),u=e=>l(t,e);return Object.assign(u,t),u},o=e=>e?s(e):s},332,[38,331]);
|
|
389
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.dashboardHideSidebar=function(){return'undefined'!=typeof window&&!0===window.__EXPO_DEVICE_HUB_HIDE_SIDEBAR__}},333,[]);
|
|
390
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_TRANSPORT",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"TRANSPORTS",{enumerable:!0,get:function(){return t}}),e.parseTransport=o,e.dashboardTransport=function(){return'undefined'==typeof window?n:o(window.__EXPO_DEVICE_HUB_TRANSPORT__)??n};const n='mjpeg',t=['mjpeg','h264','webrtc'];function o(n){return t.includes(n)?n:void 0}},334,[]);
|
|
391
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return{mjpeg:!0,h264:t.secureContext&&t.h264Decoder,webrtc:t.secureContext&&t.webRtc}}Object.defineProperty(e,'__esModule',{value:!0}),e.streamModeAvailability=t,e.browserStreamModeAvailability=function(){if('undefined'==typeof window)return{mjpeg:!0,h264:!1,webrtc:!1};return t({secureContext:window.isSecureContext,h264Decoder:void 0!==window.VideoDecoder,webRtc:void 0!==window.RTCPeerConnection&&void 0!==window.RTCRtpReceiver})},e.androidStreamModeAvailability=function(t,o){return Object.assign({},t,{h264:t.h264||o})},e.resolveStreamMode=function(t,o){return o[t]?t:'mjpeg'}},335,[]);
|
|
392
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY",{enumerable:!0,get:function(){return n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY}}),Object.defineProperty(e,"persistHideUnsupportedDevicesDefault",{enumerable:!0,get:function(){return n.persistHideUnsupportedDevicesDefault}}),Object.defineProperty(e,"readHideUnsupportedDevices",{enumerable:!0,get:function(){return n.readHideUnsupportedDevices}}),e.useHideUnsupportedDevices=function(){const s=(0,n.useDashboardStore)(t=>t.hideUnsupportedDevices),o=(0,n.useDashboardStore)(t=>t.setHideUnsupportedDevices);return(0,t.useEffect)(()=>{(0,n.persistHideUnsupportedDevicesDefault)(window.localStorage);const t=t=>{t&&null!==t.key&&t.key!==n.HIDE_UNSUPPORTED_DEVICES_STORAGE_KEY||o((0,n.readHideUnsupportedDevices)(window.localStorage))};return t(),window.addEventListener('storage',t),()=>window.removeEventListener('storage',t)},[o]),s},e.visibleDevices=function(t,n){return n?t.filter(t=>t.supported):t},e.visibleNewDeviceOptions=function(t,n){return n?{runtimes:t.runtimes.map(t=>Object.assign({},t,{models:t.models.filter(t=>t.supported)})).filter(t=>t.models.length>0)}:t};var t=r(d[0]),n=r(d[1])},336,[38,329]);
|
|
393
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useColorScheme=function(){const[n,c]=(0,t.useState)('light');return(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.matchMedia)return;const t=window.matchMedia('(prefers-color-scheme: dark)'),n=()=>c(t.matches?'dark':'light');return n(),t.addEventListener('change',n),()=>t.removeEventListener('change',n)},[]),n};var t=r(d[0])},337,[38]);
|
|
394
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";const e=["errors"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.devicesWebSocketUrl=f,_e.parseDeviceListMessage=_,_e.splitDeviceList=b,_e.useDeviceLists=function(){const e=S();return(0,n.useMemo)(()=>b(e),[e])};var t,s=r(d[0]),o=(t=s)&&t.__esModule?t:{default:t},n=r(d[1]),u=r(d[2]),c=r(d[3]),l=r(d[4]);function f(e=window.location.href){const t=new URL(`${(0,c.basePath)()}/api/devices/ws`,e);return t.protocol='https:'===t.protocol?'wss:':'ws:',t.toString()}const v={simulators:[],emulators:[]},y=500,p=1e4;function S(){const[t,s]=(0,n.useState)(v);return(0,n.useEffect)(()=>{let t=!1,n=null,u=null,c=y,v=new Set;function S(){if(t)return;let u;try{u=new WebSocket(f())}catch{return void b()}n=u,u.onopen=()=>{c=y},u.onmessage=t=>{const n=_(t.data);if(!n)return;v=(0,l.logUtilityErrors)(n.errors,v);const u=(0,o.default)(n,e);s(u)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,b())}}function b(){t||u||(u=setTimeout(()=>{u=null,S()},c),c=Math.min(2*c,p))}return S(),()=>{t=!0,u&&clearTimeout(u),n?.close()}},[]),t}function _(e){if('string'!=typeof e)return null;try{const t=JSON.parse(e);if(t.type!==u.DEVICE_LIST_MESSAGE_TYPE||!Array.isArray(t.devices?.simulators)||!Array.isArray(t.devices?.emulators)||void 0!==t.devices.errors&&!Array.isArray(t.devices.errors))return null;const s=t.devices.errors?.filter(l.isUtilityError);return Object.assign({simulators:t.devices.simulators,emulators:t.devices.emulators},s?{errors:s}:{})}catch{return null}}function b(e){const t=t=>({simulators:e.simulators.filter(e=>e.booted===t),emulators:e.emulators.filter(e=>e.booted===t)});return{booted:t(!0),recent:t(!1)}}},338,[131,38,339,325,328]);
|
|
395
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEVICE_LIST_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}});const t='device-list'},339,[]);
|
|
396
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.floatingSidebarToggleInset=function(t,n,c){return t&&n<c+s?l:o},e.FloatingSidebarToggle=function({side:l,inset:s=o,onClick:c}){return(0,n.jsx)("div",{"data-floating-sidebar-toggle":l,style:{position:'absolute',top:28,[l]:s,zIndex:15},children:(0,n.jsx)(t.SidebarToggle,{floating:!0,side:l,onClick:c})})};var t=r(d[0]),n=r(d[1]);const o=24,l=80,s=40},340,[181,151]);
|
|
397
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.argentInteractionsWebSocketUrl=l,e.useArgentInteractions=f,e.useArgentInteraction=function(t){const n=f();return t?n[t]??null:null},e.parseArgentInteractionMessage=y;var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]);const c=500,u=1e4;function l(t=window.location.href){const n=new URL(`${(0,s.basePath)()}/api/argent-interactions/ws`,t);return n.protocol='https:'===n.protocol?'wss:':'ws:',n.toString()}function f(){const[n,s]=(0,t.useState)({}),[f,p]=(0,t.useState)(()=>Date.now());(0,t.useEffect)(()=>{let t=!1,n=null,f=null,A=c;function w(){if(t)return;let u;try{u=new WebSocket(l())}catch{return void I()}n=u,u.onopen=()=>{A=c},u.onmessage=t=>{const n=y(t.data);if(!n)return;const c=Date.now(),u=(0,o.normalizeAgentInteractionTimestamp)(n.interaction,c);s(t=>Object.assign({},t,{[u.deviceId]:u})),p(c)},u.onerror=()=>u.close(),u.onclose=()=>{n===u&&(n=null,I())}}function I(){t||f||(f=setTimeout(()=>{f=null,w()},A),A=Math.min(2*A,u))}return w(),()=>{t=!0,f&&clearTimeout(f),n?.close()}},[]);const A=(0,t.useMemo)(()=>(0,o.activeAgentInteractions)(n,f),[n,f]);return(0,t.useEffect)(()=>{const t=(0,o.nextAgentInteractionExpiry)(A,f);if(null===t)return;const n=window.setTimeout(()=>p(Date.now()),Math.max(0,t-Date.now()));return()=>window.clearTimeout(n)},[A,f]),A}function y(t){if('string'!=typeof t)return null;try{const o=JSON.parse(t),s=o.interaction;return o.type===n.ARGENT_INTERACTION_MESSAGE_TYPE&&'string'==typeof s?.id&&'string'==typeof s.deviceId&&'string'==typeof s.timestamp&&Array.isArray(s.segments)&&s.segments.every(p)?o:null}catch{return null}}function p(t){return!!(A(t)&&w(t.startMs)&&Array.isArray(t.frames))&&t.frames.every(t=>A(t)&&w(t.atMs)&&Array.isArray(t.points)&&t.points.length>=1&&t.points.length<=2&&t.points.every(t=>A(t)&&w(t.x)&&w(t.y)))}function A(t){return'object'==typeof t&&null!==t&&!Array.isArray(t)}function w(t){return'number'==typeof t&&Number.isFinite(t)}},341,[38,342,343,325]);
|
|
398
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ARGENT_INTERACTION_MESSAGE_TYPE",{enumerable:!0,get:function(){return t}}),e.argentInteractionMessage=function(n){return{type:t,interaction:n}};const t='argent-interaction'},342,[]);
|
|
399
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeAgentInteractionTimestamp=function(t,n){return Number.isFinite(Date.parse(t.timestamp))?t:Object.assign({},t,{timestamp:new Date(n).toISOString()})},e.activeAgentInteractions=function(n,s){return Object.fromEntries(Object.entries(n).filter(([,n])=>(0,t.agentInteractionCursorExpiresAt)(n,s)>s))},e.nextAgentInteractionExpiry=function(n,s){let o=1/0;for(const c of Object.values(n)){const n=(0,t.agentInteractionCursorExpiresAt)(c,s);n>s&&(o=Math.min(o,n))}return Number.isFinite(o)?o:null};var t=r(d[0])},343,[148]);
|
|
400
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNewDeviceOptions=function(){const[o,c]=(0,t.useState)(u);return(0,t.useEffect)(()=>{let t=!1;return(async()=>{try{const o=await fetch(s(),{headers:{Accept:'application/json'}});if(!o.ok)throw new Error(`Unexpected ${o.status}`);const u=await o.json();(0,n.logUtilityErrors)(u.errors),t||c({ios:u.ios,android:u.android})}catch(t){console.warn('[expo-device-hub] No new-device-options endpoint, using empty options:',t)}})(),()=>{t=!0}},[]),o};var t=r(d[0]),o=r(d[1]),n=r(d[2]);const s=()=>`${(0,o.basePath)()}/api/new-device-options`,c={runtimes:[]},u={ios:c,android:c}},344,[38,325,328]);
|
|
401
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.SidebarOverlay=function({side:s,open:l,sidebarOpen:c,topmost:u,onDismiss:b,children:p}){const{present:v,reducedMotion:I,visible:S}=(0,t.useSidebarPresence)(l,!c);if(!v)return null;const _=u?12:10,f=I?void 0:`opacity ${t.SIDEBAR_TRANSITION_MS}ms ease`,h=I?void 0:`transform ${t.SIDEBAR_TRANSITION_MS}ms ${t.SIDEBAR_TRANSITION_EASING}`;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":"true","data-sidebar-backdrop":s,onClick:b,style:{position:'absolute',inset:0,backgroundColor:o.bg.overlay,opacity:S?.35:0,pointerEvents:S?'auto':'none',transition:f,zIndex:_}}),(0,n.jsx)("div",{"aria-hidden":!S||void 0,"data-sidebar-overlay":s,"data-state":S?'open':'closed',style:{position:'absolute',top:0,[s]:0,zIndex:_+1,backgroundColor:o.bg.subtle,boxShadow:o.shadow.lg,pointerEvents:S?'auto':'none',transform:S?'translateX(0)':`translateX(${'left'===s?'-100%':'100%'})`,transition:h,willChange:'transform'},children:p})]})};var o=r(d[0]),t=r(d[1]),n=r(d[2])},345,[181,323,151]);
|
|
402
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSidebarLayout=o,e.useSidebarLayout=function({leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=(0,t.useRef)(null),[u,l]=(0,t.useState)(()=>'undefined'==typeof window?0:window.innerWidth),b=(0,n.useDashboardStore)(t=>t.sidebarPreferences.left),S=(0,n.useDashboardStore)(t=>t.sidebarPreferences.right),p=(0,n.useDashboardStore)(t=>t.lastOpenedSidebar),W=(0,n.useDashboardStore)(t=>t.openSidebar),O=(0,n.useDashboardStore)(t=>t.closeSidebar);(0,t.useEffect)(()=>{const t=f.current;if(!t)return;const n=()=>l(t.getBoundingClientRect().width);n();const o=new ResizeObserver(n);return o.observe(t),()=>o.disconnect()},[]);const D=o({leftPreference:b,rightPreference:S,containerWidth:u,leftWidth:s,rightWidth:c,minStreamWidth:h});return Object.assign({},D,{containerRef:f,containerWidth:u,leftOpen:D.leftOpen,lastOpened:p,openLeft:()=>{const t=u>=s+h+(D.rightDocked?c:0);W('left',t)},closeLeft:()=>O('left'),openRight:()=>{W('right',u>=c+h)},closeRight:()=>O('right')})};var t=r(d[0]),n=r(d[1]);function o({leftPreference:t,rightPreference:n,containerWidth:o,leftWidth:s,rightWidth:c,minStreamWidth:h}){const f=o>=c+h,u='open'===n||'auto'===n&&f,l=u&&f,b=o>=s+h+(l?c:0),S='open'===t||'auto'===t&&b,p=S&&b;return{leftOpen:S,leftDocked:p,leftOverlay:S&&!p,rightOpen:u,rightDocked:l,rightOverlay:u&&!l}}},346,[38,329]);
|
|
403
|
+
__d(function(g,r,i,a,m,e,d){"use strict";function o(o){return'ios'===o||'android'===o?o:void 0}Object.defineProperty(e,'__esModule',{value:!0}),e.parsePlatformFilter=o,e.dashboardPlatformFilter=function(){return'undefined'==typeof window?void 0:o(window.__EXPO_DEVICE_HUB_PLATFORM__)}},347,[]);
|
|
401
404
|
__r(3);
|
|
402
405
|
__r(0);
|