sqlmesh 0.188.2.dev6__py3-none-any.whl → 0.188.2.dev8__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- sqlmesh/lsp/context.py +27 -1
- sqlmesh/lsp/custom.py +26 -0
- sqlmesh/lsp/main.py +60 -4
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/METADATA +1 -1
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/RECORD +53 -53
- web/client/dist/assets/{Audits-yd9300pl.js → Audits-CNkn30Bu.js} +1 -1
- web/client/dist/assets/{Banner-DQJLxQK4.js → Banner-BMu19thO.js} +1 -1
- web/client/dist/assets/{ChevronDownIcon-CglA7k4-.js → ChevronDownIcon-SI78_pgt.js} +1 -1
- web/client/dist/assets/{ChevronRightIcon-xw0l9rry.js → ChevronRightIcon-DvcjSEyM.js} +1 -1
- web/client/dist/assets/{Content-DdhorPW0.js → Content-BK6ZvWH8.js} +1 -1
- web/client/dist/assets/{Content-DQHjja2B.js → Content-BuovvkUB.js} +1 -1
- web/client/dist/assets/{Data-HtiT4UV2.js → Data-BdY6H-uU.js} +1 -1
- web/client/dist/assets/{DataCatalog-_7fRHUeM.js → DataCatalog-CVnpiGcp.js} +1 -1
- web/client/dist/assets/{Editor-BFYqqR17.js → Editor-ALoX4I6U.js} +1 -1
- web/client/dist/assets/{Editor-ncrD1ZO_.js → Editor-ttqMNvFU.js} +1 -1
- web/client/dist/assets/{Errors-BosrEbuf.js → Errors-1Z9mnHDd.js} +1 -1
- web/client/dist/assets/{FileExplorer-C6Imxadq.js → FileExplorer-N_rP1bCS.js} +1 -1
- web/client/dist/assets/{Footer-C9MHPzk1.js → Footer-C2z0sLXN.js} +1 -1
- web/client/dist/assets/{Header-DQF-wN9R.js → Header-BmTHO2La.js} +1 -1
- web/client/dist/assets/{Input-LXiA3uoO.js → Input-F4DL5_h8.js} +1 -1
- web/client/dist/assets/Lineage-B58aSBmy.js +1 -0
- web/client/dist/assets/{ListboxShow-BUIulc8M.js → ListboxShow-DlkxbLqo.js} +1 -1
- web/client/dist/assets/{ModelLineage-BbFqz62a.js → ModelLineage-DrZkk7za.js} +1 -1
- web/client/dist/assets/{Models-2zScbq9i.js → Models-BuOgiRPs.js} +1 -1
- web/client/dist/assets/{Page-Bf2QbngA.js → Page-BIRUe1KK.js} +1 -1
- web/client/dist/assets/{Plan-DIc3XAIr.js → Plan-CqEwcJdE.js} +1 -1
- web/client/dist/assets/{PlusCircleIcon-BIG5lKYN.js → PlusCircleIcon-DeWsoCUc.js} +1 -1
- web/client/dist/assets/{ReportErrors-DD5Tkzy2.js → ReportErrors-Dp7mrGQI.js} +1 -1
- web/client/dist/assets/{Root-B9zs-snk.js → Root-Cipvpumn.js} +1 -1
- web/client/dist/assets/{SearchList-DgKaZfJZ.js → SearchList-ISIumWZ3.js} +1 -1
- web/client/dist/assets/{SelectEnvironment-CP_GD64v.js → SelectEnvironment-CzaIoYWG.js} +1 -1
- web/client/dist/assets/{SourceList-DdN6hYD1.js → SourceList-DSwSywe1.js} +1 -1
- web/client/dist/assets/{SourceListItem-BynoG2tu.js → SourceListItem-DvsVB4rF.js} +1 -1
- web/client/dist/assets/{SplitPane-DrxVfnY9.js → SplitPane-orTCZ30m.js} +1 -1
- web/client/dist/assets/{Tests-A4Bnjxwk.js → Tests-DVP2w57x.js} +1 -1
- web/client/dist/assets/{Welcome-DbSZJpJE.js → Welcome-BU8aaKb1.js} +1 -1
- web/client/dist/assets/{context-Bxzp3TEa.js → context-BSTdE9fG.js} +1 -1
- web/client/dist/assets/{context-DUKxn1wN.js → context-CQWyuQhP.js} +1 -1
- web/client/dist/assets/{editor-CJ4oQlo_.js → editor-D2YqZoJd.js} +1 -1
- web/client/dist/assets/{file-CFuQwF_m.js → file-DgtoMe3u.js} +1 -1
- web/client/dist/assets/{floating-ui.react-dom-CN8_HaDW.js → floating-ui.react-dom-8hwAvuN1.js} +1 -1
- web/client/dist/assets/{help-BGO8vW5o.js → help-Dn6q7ttB.js} +1 -1
- web/client/dist/assets/{index-C_NFRX2g.js → index-DG6d5rM7.js} +1 -1
- web/client/dist/assets/{index-DGopuBhO.js → index-M-fcEAWc.js} +2 -2
- web/client/dist/assets/{plan-CN6Tq0vs.js → plan-0w1YtXVA.js} +1 -1
- web/client/dist/assets/{popover-DJJmvGdj.js → popover-BW7hkI4p.js} +1 -1
- web/client/dist/assets/{project-CmqDHjoE.js → project-st7AD14m.js} +1 -1
- web/client/dist/index.html +1 -1
- web/client/dist/assets/Lineage-BbURajUV.js +0 -1
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/WHEEL +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.188.2.dev6.dist-info → sqlmesh-0.188.2.dev8.dist-info}/top_level.txt +0 -0
|
@@ -40,7 +40,7 @@ var L1=Object.defineProperty;var og=n=>{throw TypeError(n)};var A1=(n,e,t)=>e in
|
|
|
40
40
|
`+c[y].replace(" at new "," at ");return r.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",r.displayName)),E}while(1<=y&&0<=S);break}}}finally{fe=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?j(r):""}function We(r){switch(r.tag){case 5:return j(r.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return r=Le(r.type,!1),r;case 11:return r=Le(r.type.render,!1),r;case 1:return r=Le(r.type,!0),r;default:return""}}function Be(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Re:return"Fragment";case A:return"Portal";case ne:return"Profiler";case pe:return"StrictMode";case yt:return"Suspense";case je:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case pt:return(r.displayName||"Context")+".Consumer";case Ce:return(r._context.displayName||"Context")+".Provider";case _t:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case et:return i=r.displayName||null,i!==null?i:Be(r.type)||"Memo";case Te:i=r._payload,r=r._init;try{return Be(r(i))}catch{}}return null}function ct(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(i);case 8:return i===pe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function tt(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function gt(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ot(r){var i=gt(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),l=""+r[i];if(!r.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,h=o.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,h.call(this,y)}}),Object.defineProperty(r,i,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ar(r){r._valueTracker||(r._valueTracker=ot(r))}function Ea(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),l="";return r&&(l=gt(r)?r.checked?"true":"false":r.value),r=l,r!==o?(i.setValue(r),!0):!1}function oo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function lr(r,i){var o=i.checked;return Y({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function Gl(r,i){var o=i.defaultValue==null?"":i.defaultValue,l=i.checked!=null?i.checked:i.defaultChecked;o=tt(i.value!=null?i.value:o),r._wrapperState={initialChecked:l,initialValue:o,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Jl(r,i){i=i.checked,i!=null&&z(r,"checked",i,!1)}function ao(r,i){Jl(r,i);var o=tt(i.value),l=i.type;if(o!=null)l==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(l==="submit"||l==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?xa(r,i.type,o):i.hasOwnProperty("defaultValue")&&xa(r,i.type,tt(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function Xl(r,i,o){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var l=i.type;if(!(l!=="submit"&&l!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,o||i===r.value||(r.value=i),r.defaultValue=i}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function xa(r,i,o){(i!=="number"||oo(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var Ss=Array.isArray;function xi(r,i,o,l){if(r=r.options,i){i={};for(var c=0;c<o.length;c++)i["$"+o[c]]=!0;for(o=0;o<r.length;o++)c=i.hasOwnProperty("$"+r[o].value),r[o].selected!==c&&(r[o].selected=c),c&&l&&(r[o].defaultSelected=!0)}else{for(o=""+tt(o),i=null,c=0;c<r.length;c++){if(r[c].value===o){r[c].selected=!0,l&&(r[c].defaultSelected=!0);return}i!==null||r[c].disabled||(i=r[c])}i!==null&&(i.selected=!0)}}function ur(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(t(91));return Y({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Di(r,i){var o=i.value;if(o==null){if(o=i.children,i=i.defaultValue,o!=null){if(i!=null)throw Error(t(92));if(Ss(o)){if(1<o.length)throw Error(t(93));o=o[0]}i=o}i==null&&(i=""),o=i}r._wrapperState={initialValue:tt(o)}}function Da(r,i){var o=tt(i.value),l=tt(i.defaultValue);o!=null&&(o=""+o,o!==r.value&&(r.value=o),i.defaultValue==null&&r.defaultValue!==o&&(r.defaultValue=o)),l!=null&&(r.defaultValue=""+l)}function lo(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function cr(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nn(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?cr(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var _s,uo=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,o,l,c){MSApp.execUnsafeLocalFunction(function(){return r(i,o,l,c)})}:r}(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(_s=_s||document.createElement("div"),_s.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=_s.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function bs(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var Sn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zl=["Webkit","ms","Moz","O"];Object.keys(Sn).forEach(function(r){Zl.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Sn[i]=Sn[r]})});function Ca(r,i,o){return i==null||typeof i=="boolean"||i===""?"":o||typeof i!="number"||i===0||Sn.hasOwnProperty(r)&&Sn[r]?(""+i).trim():i+"px"}function Oa(r,i){r=r.style;for(var o in i)if(i.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=Ca(o,i[o],l);o==="float"&&(o="cssFloat"),l?r.setProperty(o,c):r[o]=c}}var wd=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function co(r,i){if(i){if(wd[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(t(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(t(61))}if(i.style!=null&&typeof i.style!="object")throw Error(t(62))}}function Ci(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fo=null;function Is(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ra=null,Xr=null,Oi=null;function Fa(r){if(r=Ga(r)){if(typeof Ra!="function")throw Error(t(280));var i=r.stateNode;i&&(i=_u(i),Ra(r.stateNode,r.type,i))}}function Es(r){Xr?Oi?Oi.push(r):Oi=[r]:Xr=r}function xs(){if(Xr){var r=Xr,i=Oi;if(Oi=Xr=null,Fa(r),i)for(r=0;r<i.length;r++)Fa(i[r])}}function eu(r,i){return r(i)}function tu(){}var I=!1;function F(r,i,o){if(I)return r(i,o);I=!0;try{return eu(r,i,o)}finally{I=!1,(Xr!==null||Oi!==null)&&(tu(),xs())}}function B(r,i){var o=r.stateNode;if(o===null)return null;var l=_u(o);if(l===null)return null;o=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(r=r.type,l=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!l;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(t(231,i,typeof o));return o}var H=!1;if(f)try{var G={};Object.defineProperty(G,"passive",{get:function(){H=!0}}),window.addEventListener("test",G,G),window.removeEventListener("test",G,G)}catch{H=!1}function ue(r,i,o,l,c,h,y,S,E){var T=Array.prototype.slice.call(arguments,3);try{i.apply(o,T)}catch(V){this.onError(V)}}var me=!1,te=null,le=!1,ce=null,Ae={onError:function(r){me=!0,te=r}};function he(r,i,o,l,c,h,y,S,E){me=!1,te=null,ue.apply(Ae,arguments)}function Pe(r,i,o,l,c,h,y,S,E){if(he.apply(this,arguments),me){if(me){var T=te;me=!1,te=null}else throw Error(t(198));le||(le=!0,ce=T)}}function Ye(r){var i=r,o=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(o=i.return),r=i.return;while(r)}return i.tag===3?o:null}function Mt(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function zt(r){if(Ye(r)!==r)throw Error(t(188))}function un(r){var i=r.alternate;if(!i){if(i=Ye(r),i===null)throw Error(t(188));return i!==r?null:r}for(var o=r,l=i;;){var c=o.return;if(c===null)break;var h=c.alternate;if(h===null){if(l=c.return,l!==null){o=l;continue}break}if(c.child===h.child){for(h=c.child;h;){if(h===o)return zt(c),r;if(h===l)return zt(c),i;h=h.sibling}throw Error(t(188))}if(o.return!==l.return)o=c,l=h;else{for(var y=!1,S=c.child;S;){if(S===o){y=!0,o=c,l=h;break}if(S===l){y=!0,l=c,o=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===o){y=!0,o=h,l=c;break}if(S===l){y=!0,l=h,o=c;break}S=S.sibling}if(!y)throw Error(t(189))}}if(o.alternate!==l)throw Error(t(190))}if(o.tag!==3)throw Error(t(188));return o.stateNode.current===o?r:i}function Ke(r){return r=un(r),r!==null?Ri(r):null}function Ri(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Ri(r);if(i!==null)return i;r=r.sibling}return null}var Fr=e.unstable_scheduleCallback,Fi=e.unstable_cancelCallback,_n=e.unstable_shouldYield,Ds=e.unstable_requestPaint,mt=e.unstable_now,Ma=e.unstable_getCurrentPriorityLevel,dr=e.unstable_ImmediatePriority,Cs=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,bn=e.unstable_LowPriority,fr=e.unstable_IdlePriority,Zr=null,In=null;function Lt(r){if(In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Zr,r,void 0,(r.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:GS,nu=Math.log,Sd=Math.LN2;function GS(r){return r>>>=0,r===0?32:31-(nu(r)/Sd|0)|0}var ru=64,iu=4194304;function La(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function su(r,i){var o=r.pendingLanes;if(o===0)return 0;var l=0,c=r.suspendedLanes,h=r.pingedLanes,y=o&268435455;if(y!==0){var S=y&~c;S!==0?l=La(S):(h&=y,h!==0&&(l=La(h)))}else y=o&~c,y!==0?l=La(y):h!==0&&(l=La(h));if(l===0)return 0;if(i!==0&&i!==l&&(i&c)===0&&(c=l&-l,h=i&-i,c>=h||c===16&&(h&4194240)!==0))return i;if((l&4)!==0&&(l|=o&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=l;0<i;)o=31-Kt(i),c=1<<o,l|=r[o],i&=~c;return l}function JS(r,i){switch(r){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function XS(r,i){for(var o=r.suspendedLanes,l=r.pingedLanes,c=r.expirationTimes,h=r.pendingLanes;0<h;){var y=31-Kt(h),S=1<<y,E=c[y];E===-1?((S&o)===0||(S&l)!==0)&&(c[y]=JS(S,i)):E<=i&&(r.expiredLanes|=S),h&=~S}}function _d(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Np(){var r=ru;return ru<<=1,(ru&4194240)===0&&(ru=64),r}function bd(r){for(var i=[],o=0;31>o;o++)i.push(r);return i}function Aa(r,i,o){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-Kt(i),r[i]=o}function ZS(r,i){var o=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var l=r.eventTimes;for(r=r.expirationTimes;0<o;){var c=31-Kt(o),h=1<<c;i[c]=0,l[c]=-1,r[c]=-1,o&=~h}}function Id(r,i){var o=r.entangledLanes|=i;for(r=r.entanglements;o;){var l=31-Kt(o),c=1<<l;c&i|r[l]&i&&(r[l]|=i),o&=~c}}var at=0;function Bp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Up,Ed,jp,zp,$p,xd=!1,ou=[],Mi=null,Li=null,Ai=null,ka=new Map,Pa=new Map,ki=[],e_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vp(r,i){switch(r){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":Li=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":ka.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pa.delete(i.pointerId)}}function Ta(r,i,o,l,c,h){return r===null||r.nativeEvent!==h?(r={blockedOn:i,domEventName:o,eventSystemFlags:l,nativeEvent:h,targetContainers:[c]},i!==null&&(i=Ga(i),i!==null&&Ed(i)),r):(r.eventSystemFlags|=l,i=r.targetContainers,c!==null&&i.indexOf(c)===-1&&i.push(c),r)}function t_(r,i,o,l,c){switch(i){case"focusin":return Mi=Ta(Mi,r,i,o,l,c),!0;case"dragenter":return Li=Ta(Li,r,i,o,l,c),!0;case"mouseover":return Ai=Ta(Ai,r,i,o,l,c),!0;case"pointerover":var h=c.pointerId;return ka.set(h,Ta(ka.get(h)||null,r,i,o,l,c)),!0;case"gotpointercapture":return h=c.pointerId,Pa.set(h,Ta(Pa.get(h)||null,r,i,o,l,c)),!0}return!1}function Hp(r){var i=Os(r.target);if(i!==null){var o=Ye(i);if(o!==null){if(i=o.tag,i===13){if(i=Mt(o),i!==null){r.blockedOn=i,$p(r.priority,function(){jp(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function au(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var o=Cd(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(o===null){o=r.nativeEvent;var l=new o.constructor(o.type,o);fo=l,o.target.dispatchEvent(l),fo=null}else return i=Ga(o),i!==null&&Ed(i),r.blockedOn=o,!1;i.shift()}return!0}function Wp(r,i,o){au(r)&&o.delete(i)}function n_(){xd=!1,Mi!==null&&au(Mi)&&(Mi=null),Li!==null&&au(Li)&&(Li=null),Ai!==null&&au(Ai)&&(Ai=null),ka.forEach(Wp),Pa.forEach(Wp)}function Na(r,i){r.blockedOn===i&&(r.blockedOn=null,xd||(xd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,n_)))}function Ba(r){function i(c){return Na(c,r)}if(0<ou.length){Na(ou[0],r);for(var o=1;o<ou.length;o++){var l=ou[o];l.blockedOn===r&&(l.blockedOn=null)}}for(Mi!==null&&Na(Mi,r),Li!==null&&Na(Li,r),Ai!==null&&Na(Ai,r),ka.forEach(i),Pa.forEach(i),o=0;o<ki.length;o++)l=ki[o],l.blockedOn===r&&(l.blockedOn=null);for(;0<ki.length&&(o=ki[0],o.blockedOn===null);)Hp(o),o.blockedOn===null&&ki.shift()}var ho=q.ReactCurrentBatchConfig,lu=!0;function r_(r,i,o,l){var c=at,h=ho.transition;ho.transition=null;try{at=1,Dd(r,i,o,l)}finally{at=c,ho.transition=h}}function i_(r,i,o,l){var c=at,h=ho.transition;ho.transition=null;try{at=4,Dd(r,i,o,l)}finally{at=c,ho.transition=h}}function Dd(r,i,o,l){if(lu){var c=Cd(r,i,o,l);if(c===null)Hd(r,i,l,uu,o),Vp(r,l);else if(t_(c,r,i,o,l))l.stopPropagation();else if(Vp(r,l),i&4&&-1<e_.indexOf(r)){for(;c!==null;){var h=Ga(c);if(h!==null&&Up(h),h=Cd(r,i,o,l),h===null&&Hd(r,i,l,uu,o),h===c)break;c=h}c!==null&&l.stopPropagation()}else Hd(r,i,l,null,o)}}var uu=null;function Cd(r,i,o,l){if(uu=null,r=Is(l),r=Os(r),r!==null)if(i=Ye(r),i===null)r=null;else if(o=i.tag,o===13){if(r=Mt(i),r!==null)return r;r=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return uu=r,null}function Qp(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ma()){case dr:return 1;case Cs:return 4;case Je:case bn:return 16;case fr:return 536870912;default:return 16}default:return 16}}var Pi=null,Od=null,cu=null;function Kp(){if(cu)return cu;var r,i=Od,o=i.length,l,c="value"in Pi?Pi.value:Pi.textContent,h=c.length;for(r=0;r<o&&i[r]===c[r];r++);var y=o-r;for(l=1;l<=y&&i[o-l]===c[h-l];l++);return cu=c.slice(r,1<l?1-l:void 0)}function du(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function fu(){return!0}function qp(){return!1}function Bn(r){function i(o,l,c,h,y){this._reactName=o,this._targetInst=c,this.type=l,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in r)r.hasOwnProperty(S)&&(o=r[S],this[S]=o?o(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?fu:qp,this.isPropagationStopped=qp,this}return Y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),i}var po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rd=Bn(po),Ua=Y({},po,{view:0,detail:0}),s_=Bn(Ua),Fd,Md,ja,hu=Y({},Ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ad,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ja&&(ja&&r.type==="mousemove"?(Fd=r.screenX-ja.screenX,Md=r.screenY-ja.screenY):Md=Fd=0,ja=r),Fd)},movementY:function(r){return"movementY"in r?r.movementY:Md}}),Yp=Bn(hu),o_=Y({},hu,{dataTransfer:0}),a_=Bn(o_),l_=Y({},Ua,{relatedTarget:0}),Ld=Bn(l_),u_=Y({},po,{animationName:0,elapsedTime:0,pseudoElement:0}),c_=Bn(u_),d_=Y({},po,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),f_=Bn(d_),h_=Y({},po,{data:0}),Gp=Bn(h_),p_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},y_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function g_(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=y_[r])?!!i[r]:!1}function Ad(){return g_}var v_=Y({},Ua,{key:function(r){if(r.key){var i=p_[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=du(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?m_[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ad,charCode:function(r){return r.type==="keypress"?du(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?du(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),w_=Bn(v_),S_=Y({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jp=Bn(S_),__=Y({},Ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ad}),b_=Bn(__),I_=Y({},po,{propertyName:0,elapsedTime:0,pseudoElement:0}),E_=Bn(I_),x_=Y({},hu,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),D_=Bn(x_),C_=[9,13,27,32],kd=f&&"CompositionEvent"in window,za=null;f&&"documentMode"in document&&(za=document.documentMode);var O_=f&&"TextEvent"in window&&!za,Xp=f&&(!kd||za&&8<za&&11>=za),Zp=" ",em=!1;function tm(r,i){switch(r){case"keyup":return C_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nm(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var mo=!1;function R_(r,i){switch(r){case"compositionend":return nm(i);case"keypress":return i.which!==32?null:(em=!0,Zp);case"textInput":return r=i.data,r===Zp&&em?null:r;default:return null}}function F_(r,i){if(mo)return r==="compositionend"||!kd&&tm(r,i)?(r=Kp(),cu=Od=Pi=null,mo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Xp&&i.locale!=="ko"?null:i.data;default:return null}}var M_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function rm(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!M_[r.type]:i==="textarea"}function im(r,i,o,l){Es(l),i=vu(i,"onChange"),0<i.length&&(o=new Rd("onChange","change",null,o,l),r.push({event:o,listeners:i}))}var $a=null,Va=null;function L_(r){bm(r,0)}function pu(r){var i=So(r);if(Ea(i))return r}function A_(r,i){if(r==="change")return i}var sm=!1;if(f){var Pd;if(f){var Td="oninput"in document;if(!Td){var om=document.createElement("div");om.setAttribute("oninput","return;"),Td=typeof om.oninput=="function"}Pd=Td}else Pd=!1;sm=Pd&&(!document.documentMode||9<document.documentMode)}function am(){$a&&($a.detachEvent("onpropertychange",lm),Va=$a=null)}function lm(r){if(r.propertyName==="value"&&pu(Va)){var i=[];im(i,Va,r,Is(r)),F(L_,i)}}function k_(r,i,o){r==="focusin"?(am(),$a=i,Va=o,$a.attachEvent("onpropertychange",lm)):r==="focusout"&&am()}function P_(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return pu(Va)}function T_(r,i){if(r==="click")return pu(i)}function N_(r,i){if(r==="input"||r==="change")return pu(i)}function B_(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var hr=typeof Object.is=="function"?Object.is:B_;function Ha(r,i){if(hr(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var o=Object.keys(r),l=Object.keys(i);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var c=o[l];if(!p.call(i,c)||!hr(r[c],i[c]))return!1}return!0}function um(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function cm(r,i){var o=um(r);r=0;for(var l;o;){if(o.nodeType===3){if(l=r+o.textContent.length,r<=i&&l>=i)return{node:o,offset:i-r};r=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=um(o)}}function dm(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?dm(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function fm(){for(var r=window,i=oo();i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=oo(r.document)}return i}function Nd(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function U_(r){var i=fm(),o=r.focusedElem,l=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&dm(o.ownerDocument.documentElement,o)){if(l!==null&&Nd(o)){if(i=l.start,r=l.end,r===void 0&&(r=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(r,o.value.length);else if(r=(i=o.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var c=o.textContent.length,h=Math.min(l.start,c);l=l.end===void 0?h:Math.min(l.end,c),!r.extend&&h>l&&(c=l,l=h,h=c),c=cm(o,h);var y=cm(o,l);c&&y&&(r.rangeCount!==1||r.anchorNode!==c.node||r.anchorOffset!==c.offset||r.focusNode!==y.node||r.focusOffset!==y.offset)&&(i=i.createRange(),i.setStart(c.node,c.offset),r.removeAllRanges(),h>l?(r.addRange(i),r.extend(y.node,y.offset)):(i.setEnd(y.node,y.offset),r.addRange(i)))}}for(i=[],r=o;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<i.length;o++)r=i[o],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var j_=f&&"documentMode"in document&&11>=document.documentMode,yo=null,Bd=null,Wa=null,Ud=!1;function hm(r,i,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ud||yo==null||yo!==oo(l)||(l=yo,"selectionStart"in l&&Nd(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Wa&&Ha(Wa,l)||(Wa=l,l=vu(Bd,"onSelect"),0<l.length&&(i=new Rd("onSelect","select",null,i,o),r.push({event:i,listeners:l}),i.target=yo)))}function mu(r,i){var o={};return o[r.toLowerCase()]=i.toLowerCase(),o["Webkit"+r]="webkit"+i,o["Moz"+r]="moz"+i,o}var go={animationend:mu("Animation","AnimationEnd"),animationiteration:mu("Animation","AnimationIteration"),animationstart:mu("Animation","AnimationStart"),transitionend:mu("Transition","TransitionEnd")},jd={},pm={};f&&(pm=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function yu(r){if(jd[r])return jd[r];if(!go[r])return r;var i=go[r],o;for(o in i)if(i.hasOwnProperty(o)&&o in pm)return jd[r]=i[o];return r}var mm=yu("animationend"),ym=yu("animationiteration"),gm=yu("animationstart"),vm=yu("transitionend"),wm=new Map,Sm="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ti(r,i){wm.set(r,i),u(i,[r])}for(var zd=0;zd<Sm.length;zd++){var $d=Sm[zd],z_=$d.toLowerCase(),$_=$d[0].toUpperCase()+$d.slice(1);Ti(z_,"on"+$_)}Ti(mm,"onAnimationEnd"),Ti(ym,"onAnimationIteration"),Ti(gm,"onAnimationStart"),Ti("dblclick","onDoubleClick"),Ti("focusin","onFocus"),Ti("focusout","onBlur"),Ti(vm,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qa="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),V_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qa));function _m(r,i,o){var l=r.type||"unknown-event";r.currentTarget=o,Pe(l,i,void 0,r),r.currentTarget=null}function bm(r,i){i=(i&4)!==0;for(var o=0;o<r.length;o++){var l=r[o],c=l.event;l=l.listeners;e:{var h=void 0;if(i)for(var y=l.length-1;0<=y;y--){var S=l[y],E=S.instance,T=S.currentTarget;if(S=S.listener,E!==h&&c.isPropagationStopped())break e;_m(c,S,T),h=E}else for(y=0;y<l.length;y++){if(S=l[y],E=S.instance,T=S.currentTarget,S=S.listener,E!==h&&c.isPropagationStopped())break e;_m(c,S,T),h=E}}}if(le)throw r=ce,le=!1,ce=null,r}function bt(r,i){var o=i[Gd];o===void 0&&(o=i[Gd]=new Set);var l=r+"__bubble";o.has(l)||(Im(i,r,2,!1),o.add(l))}function Vd(r,i,o){var l=0;i&&(l|=4),Im(o,r,l,i)}var gu="_reactListening"+Math.random().toString(36).slice(2);function Ka(r){if(!r[gu]){r[gu]=!0,s.forEach(function(o){o!=="selectionchange"&&(V_.has(o)||Vd(o,!1,r),Vd(o,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[gu]||(i[gu]=!0,Vd("selectionchange",!1,i))}}function Im(r,i,o,l){switch(Qp(i)){case 1:var c=r_;break;case 4:c=i_;break;default:c=Dd}o=c.bind(null,i,o,r),c=void 0,!H||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(c=!0),l?c!==void 0?r.addEventListener(i,o,{capture:!0,passive:c}):r.addEventListener(i,o,!0):c!==void 0?r.addEventListener(i,o,{passive:c}):r.addEventListener(i,o,!1)}function Hd(r,i,o,l,c){var h=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var S=l.stateNode.containerInfo;if(S===c||S.nodeType===8&&S.parentNode===c)break;if(y===4)for(y=l.return;y!==null;){var E=y.tag;if((E===3||E===4)&&(E=y.stateNode.containerInfo,E===c||E.nodeType===8&&E.parentNode===c))return;y=y.return}for(;S!==null;){if(y=Os(S),y===null)return;if(E=y.tag,E===5||E===6){l=h=y;continue e}S=S.parentNode}}l=l.return}F(function(){var T=h,V=Is(o),W=[];e:{var $=wm.get(r);if($!==void 0){var X=Rd,se=r;switch(r){case"keypress":if(du(o)===0)break e;case"keydown":case"keyup":X=w_;break;case"focusin":se="focus",X=Ld;break;case"focusout":se="blur",X=Ld;break;case"beforeblur":case"afterblur":X=Ld;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=Yp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=a_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=b_;break;case mm:case ym:case gm:X=c_;break;case vm:X=E_;break;case"scroll":X=s_;break;case"wheel":X=D_;break;case"copy":case"cut":case"paste":X=f_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Jp}var oe=(i&4)!==0,Pt=!oe&&r==="scroll",M=oe?$!==null?$+"Capture":null:$;oe=[];for(var D=T,P;D!==null;){P=D;var Q=P.stateNode;if(P.tag===5&&Q!==null&&(P=Q,M!==null&&(Q=B(D,M),Q!=null&&oe.push(qa(D,Q,P)))),Pt)break;D=D.return}0<oe.length&&($=new X($,se,null,o,V),W.push({event:$,listeners:oe}))}}if((i&7)===0){e:{if($=r==="mouseover"||r==="pointerover",X=r==="mouseout"||r==="pointerout",$&&o!==fo&&(se=o.relatedTarget||o.fromElement)&&(Os(se)||se[ei]))break e;if((X||$)&&($=V.window===V?V:($=V.ownerDocument)?$.defaultView||$.parentWindow:window,X?(se=o.relatedTarget||o.toElement,X=T,se=se?Os(se):null,se!==null&&(Pt=Ye(se),se!==Pt||se.tag!==5&&se.tag!==6)&&(se=null)):(X=null,se=T),X!==se)){if(oe=Yp,Q="onMouseLeave",M="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(oe=Jp,Q="onPointerLeave",M="onPointerEnter",D="pointer"),Pt=X==null?$:So(X),P=se==null?$:So(se),$=new oe(Q,D+"leave",X,o,V),$.target=Pt,$.relatedTarget=P,Q=null,Os(V)===T&&(oe=new oe(M,D+"enter",se,o,V),oe.target=P,oe.relatedTarget=Pt,Q=oe),Pt=Q,X&&se)t:{for(oe=X,M=se,D=0,P=oe;P;P=vo(P))D++;for(P=0,Q=M;Q;Q=vo(Q))P++;for(;0<D-P;)oe=vo(oe),D--;for(;0<P-D;)M=vo(M),P--;for(;D--;){if(oe===M||M!==null&&oe===M.alternate)break t;oe=vo(oe),M=vo(M)}oe=null}else oe=null;X!==null&&Em(W,$,X,oe,!1),se!==null&&Pt!==null&&Em(W,Pt,se,oe,!0)}}e:{if($=T?So(T):window,X=$.nodeName&&$.nodeName.toLowerCase(),X==="select"||X==="input"&&$.type==="file")var ae=A_;else if(rm($))if(sm)ae=N_;else{ae=P_;var ge=k_}else(X=$.nodeName)&&X.toLowerCase()==="input"&&($.type==="checkbox"||$.type==="radio")&&(ae=T_);if(ae&&(ae=ae(r,T))){im(W,ae,o,V);break e}ge&&ge(r,$,T),r==="focusout"&&(ge=$._wrapperState)&&ge.controlled&&$.type==="number"&&xa($,"number",$.value)}switch(ge=T?So(T):window,r){case"focusin":(rm(ge)||ge.contentEditable==="true")&&(yo=ge,Bd=T,Wa=null);break;case"focusout":Wa=Bd=yo=null;break;case"mousedown":Ud=!0;break;case"contextmenu":case"mouseup":case"dragend":Ud=!1,hm(W,o,V);break;case"selectionchange":if(j_)break;case"keydown":case"keyup":hm(W,o,V)}var ve;if(kd)e:{switch(r){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else mo?tm(r,o)&&(Fe="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Fe="onCompositionStart");Fe&&(Xp&&o.locale!=="ko"&&(mo||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&mo&&(ve=Kp()):(Pi=V,Od="value"in Pi?Pi.value:Pi.textContent,mo=!0)),ge=vu(T,Fe),0<ge.length&&(Fe=new Gp(Fe,r,null,o,V),W.push({event:Fe,listeners:ge}),ve?Fe.data=ve:(ve=nm(o),ve!==null&&(Fe.data=ve)))),(ve=O_?R_(r,o):F_(r,o))&&(T=vu(T,"onBeforeInput"),0<T.length&&(V=new Gp("onBeforeInput","beforeinput",null,o,V),W.push({event:V,listeners:T}),V.data=ve))}bm(W,i)})}function qa(r,i,o){return{instance:r,listener:i,currentTarget:o}}function vu(r,i){for(var o=i+"Capture",l=[];r!==null;){var c=r,h=c.stateNode;c.tag===5&&h!==null&&(c=h,h=B(r,o),h!=null&&l.unshift(qa(r,h,c)),h=B(r,i),h!=null&&l.push(qa(r,h,c))),r=r.return}return l}function vo(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Em(r,i,o,l,c){for(var h=i._reactName,y=[];o!==null&&o!==l;){var S=o,E=S.alternate,T=S.stateNode;if(E!==null&&E===l)break;S.tag===5&&T!==null&&(S=T,c?(E=B(o,h),E!=null&&y.unshift(qa(o,E,S))):c||(E=B(o,h),E!=null&&y.push(qa(o,E,S)))),o=o.return}y.length!==0&&r.push({event:i,listeners:y})}var H_=/\r\n?/g,W_=/\u0000|\uFFFD/g;function xm(r){return(typeof r=="string"?r:""+r).replace(H_,`
|
|
41
41
|
`).replace(W_,"")}function wu(r,i,o){if(i=xm(i),xm(r)!==i&&o)throw Error(t(425))}function Su(){}var Wd=null,Qd=null;function Kd(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var qd=typeof setTimeout=="function"?setTimeout:void 0,Q_=typeof clearTimeout=="function"?clearTimeout:void 0,Dm=typeof Promise=="function"?Promise:void 0,K_=typeof queueMicrotask=="function"?queueMicrotask:typeof Dm<"u"?function(r){return Dm.resolve(null).then(r).catch(q_)}:qd;function q_(r){setTimeout(function(){throw r})}function Yd(r,i){var o=i,l=0;do{var c=o.nextSibling;if(r.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(l===0){r.removeChild(c),Ba(i);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=c}while(o);Ba(i)}function Ni(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Cm(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"){if(i===0)return r;i--}else o==="/$"&&i++}r=r.previousSibling}return null}var wo=Math.random().toString(36).slice(2),Mr="__reactFiber$"+wo,Ya="__reactProps$"+wo,ei="__reactContainer$"+wo,Gd="__reactEvents$"+wo,Y_="__reactListeners$"+wo,G_="__reactHandles$"+wo;function Os(r){var i=r[Mr];if(i)return i;for(var o=r.parentNode;o;){if(i=o[ei]||o[Mr]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(r=Cm(r);r!==null;){if(o=r[Mr])return o;r=Cm(r)}return i}r=o,o=r.parentNode}return null}function Ga(r){return r=r[Mr]||r[ei],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function So(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(t(33))}function _u(r){return r[Ya]||null}var Jd=[],_o=-1;function Bi(r){return{current:r}}function It(r){0>_o||(r.current=Jd[_o],Jd[_o]=null,_o--)}function vt(r,i){_o++,Jd[_o]=r.current,r.current=i}var Ui={},en=Bi(Ui),En=Bi(!1),Rs=Ui;function bo(r,i){var o=r.type.contextTypes;if(!o)return Ui;var l=r.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===i)return l.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in o)c[h]=i[h];return l&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=c),c}function xn(r){return r=r.childContextTypes,r!=null}function bu(){It(En),It(en)}function Om(r,i,o){if(en.current!==Ui)throw Error(t(168));vt(en,i),vt(En,o)}function Rm(r,i,o){var l=r.stateNode;if(i=i.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in i))throw Error(t(108,ct(r)||"Unknown",c));return Y({},o,l)}function Iu(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Ui,Rs=en.current,vt(en,r),vt(En,En.current),!0}function Fm(r,i,o){var l=r.stateNode;if(!l)throw Error(t(169));o?(r=Rm(r,i,Rs),l.__reactInternalMemoizedMergedChildContext=r,It(En),It(en),vt(en,r)):It(En),vt(En,o)}var ti=null,Eu=!1,Xd=!1;function Mm(r){ti===null?ti=[r]:ti.push(r)}function J_(r){Eu=!0,Mm(r)}function ji(){if(!Xd&&ti!==null){Xd=!0;var r=0,i=at;try{var o=ti;for(at=1;r<o.length;r++){var l=o[r];do l=l(!0);while(l!==null)}ti=null,Eu=!1}catch(c){throw ti!==null&&(ti=ti.slice(r+1)),Fr(dr,ji),c}finally{at=i,Xd=!1}}return null}var Io=[],Eo=0,xu=null,Du=0,Wn=[],Qn=0,Fs=null,ni=1,ri="";function Ms(r,i){Io[Eo++]=Du,Io[Eo++]=xu,xu=r,Du=i}function Lm(r,i,o){Wn[Qn++]=ni,Wn[Qn++]=ri,Wn[Qn++]=Fs,Fs=r;var l=ni;r=ri;var c=32-Kt(l)-1;l&=~(1<<c),o+=1;var h=32-Kt(i)+c;if(30<h){var y=c-c%5;h=(l&(1<<y)-1).toString(32),l>>=y,c-=y,ni=1<<32-Kt(i)+c|o<<c|l,ri=h+r}else ni=1<<h|o<<c|l,ri=r}function Zd(r){r.return!==null&&(Ms(r,1),Lm(r,1,0))}function ef(r){for(;r===xu;)xu=Io[--Eo],Io[Eo]=null,Du=Io[--Eo],Io[Eo]=null;for(;r===Fs;)Fs=Wn[--Qn],Wn[Qn]=null,ri=Wn[--Qn],Wn[Qn]=null,ni=Wn[--Qn],Wn[Qn]=null}var Un=null,jn=null,Dt=!1,pr=null;function Am(r,i){var o=Gn(5,null,null,0);o.elementType="DELETED",o.stateNode=i,o.return=r,i=r.deletions,i===null?(r.deletions=[o],r.flags|=16):i.push(o)}function km(r,i){switch(r.tag){case 5:var o=r.type;return i=i.nodeType!==1||o.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Un=r,jn=Ni(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Un=r,jn=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(o=Fs!==null?{id:ni,overflow:ri}:null,r.memoizedState={dehydrated:i,treeContext:o,retryLane:1073741824},o=Gn(18,null,null,0),o.stateNode=i,o.return=r,r.child=o,Un=r,jn=null,!0):!1;default:return!1}}function tf(r){return(r.mode&1)!==0&&(r.flags&128)===0}function nf(r){if(Dt){var i=jn;if(i){var o=i;if(!km(r,i)){if(tf(r))throw Error(t(418));i=Ni(o.nextSibling);var l=Un;i&&km(r,i)?Am(l,o):(r.flags=r.flags&-4097|2,Dt=!1,Un=r)}}else{if(tf(r))throw Error(t(418));r.flags=r.flags&-4097|2,Dt=!1,Un=r}}}function Pm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Un=r}function Cu(r){if(r!==Un)return!1;if(!Dt)return Pm(r),Dt=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Kd(r.type,r.memoizedProps)),i&&(i=jn)){if(tf(r))throw Tm(),Error(t(418));for(;i;)Am(r,i),i=Ni(i.nextSibling)}if(Pm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(t(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"){if(i===0){jn=Ni(r.nextSibling);break e}i--}else o!=="$"&&o!=="$!"&&o!=="$?"||i++}r=r.nextSibling}jn=null}}else jn=Un?Ni(r.stateNode.nextSibling):null;return!0}function Tm(){for(var r=jn;r;)r=Ni(r.nextSibling)}function xo(){jn=Un=null,Dt=!1}function rf(r){pr===null?pr=[r]:pr.push(r)}var X_=q.ReactCurrentBatchConfig;function Ja(r,i,o){if(r=o.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(t(309));var l=o.stateNode}if(!l)throw Error(t(147,r));var c=l,h=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===h?i.ref:(i=function(y){var S=c.refs;y===null?delete S[h]:S[h]=y},i._stringRef=h,i)}if(typeof r!="string")throw Error(t(284));if(!o._owner)throw Error(t(290,r))}return r}function Ou(r,i){throw r=Object.prototype.toString.call(i),Error(t(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function Nm(r){var i=r._init;return i(r._payload)}function Bm(r){function i(M,D){if(r){var P=M.deletions;P===null?(M.deletions=[D],M.flags|=16):P.push(D)}}function o(M,D){if(!r)return null;for(;D!==null;)i(M,D),D=D.sibling;return null}function l(M,D){for(M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function c(M,D){return M=qi(M,D),M.index=0,M.sibling=null,M}function h(M,D,P){return M.index=P,r?(P=M.alternate,P!==null?(P=P.index,P<D?(M.flags|=2,D):P):(M.flags|=2,D)):(M.flags|=1048576,D)}function y(M){return r&&M.alternate===null&&(M.flags|=2),M}function S(M,D,P,Q){return D===null||D.tag!==6?(D=Yf(P,M.mode,Q),D.return=M,D):(D=c(D,P),D.return=M,D)}function E(M,D,P,Q){var ae=P.type;return ae===Re?V(M,D,P.props.children,Q,P.key):D!==null&&(D.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Te&&Nm(ae)===D.type)?(Q=c(D,P.props),Q.ref=Ja(M,D,P),Q.return=M,Q):(Q=Xu(P.type,P.key,P.props,null,M.mode,Q),Q.ref=Ja(M,D,P),Q.return=M,Q)}function T(M,D,P,Q){return D===null||D.tag!==4||D.stateNode.containerInfo!==P.containerInfo||D.stateNode.implementation!==P.implementation?(D=Gf(P,M.mode,Q),D.return=M,D):(D=c(D,P.children||[]),D.return=M,D)}function V(M,D,P,Q,ae){return D===null||D.tag!==7?(D=Us(P,M.mode,Q,ae),D.return=M,D):(D=c(D,P),D.return=M,D)}function W(M,D,P){if(typeof D=="string"&&D!==""||typeof D=="number")return D=Yf(""+D,M.mode,P),D.return=M,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case ee:return P=Xu(D.type,D.key,D.props,null,M.mode,P),P.ref=Ja(M,null,D),P.return=M,P;case A:return D=Gf(D,M.mode,P),D.return=M,D;case Te:var Q=D._init;return W(M,Q(D._payload),P)}if(Ss(D)||ie(D))return D=Us(D,M.mode,P,null),D.return=M,D;Ou(M,D)}return null}function $(M,D,P,Q){var ae=D!==null?D.key:null;if(typeof P=="string"&&P!==""||typeof P=="number")return ae!==null?null:S(M,D,""+P,Q);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case ee:return P.key===ae?E(M,D,P,Q):null;case A:return P.key===ae?T(M,D,P,Q):null;case Te:return ae=P._init,$(M,D,ae(P._payload),Q)}if(Ss(P)||ie(P))return ae!==null?null:V(M,D,P,Q,null);Ou(M,P)}return null}function X(M,D,P,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return M=M.get(P)||null,S(D,M,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case ee:return M=M.get(Q.key===null?P:Q.key)||null,E(D,M,Q,ae);case A:return M=M.get(Q.key===null?P:Q.key)||null,T(D,M,Q,ae);case Te:var ge=Q._init;return X(M,D,P,ge(Q._payload),ae)}if(Ss(Q)||ie(Q))return M=M.get(P)||null,V(D,M,Q,ae,null);Ou(D,Q)}return null}function se(M,D,P,Q){for(var ae=null,ge=null,ve=D,Fe=D=0,Gt=null;ve!==null&&Fe<P.length;Fe++){ve.index>Fe?(Gt=ve,ve=null):Gt=ve.sibling;var Ze=$(M,ve,P[Fe],Q);if(Ze===null){ve===null&&(ve=Gt);break}r&&ve&&Ze.alternate===null&&i(M,ve),D=h(Ze,D,Fe),ge===null?ae=Ze:ge.sibling=Ze,ge=Ze,ve=Gt}if(Fe===P.length)return o(M,ve),Dt&&Ms(M,Fe),ae;if(ve===null){for(;Fe<P.length;Fe++)ve=W(M,P[Fe],Q),ve!==null&&(D=h(ve,D,Fe),ge===null?ae=ve:ge.sibling=ve,ge=ve);return Dt&&Ms(M,Fe),ae}for(ve=l(M,ve);Fe<P.length;Fe++)Gt=X(ve,M,Fe,P[Fe],Q),Gt!==null&&(r&&Gt.alternate!==null&&ve.delete(Gt.key===null?Fe:Gt.key),D=h(Gt,D,Fe),ge===null?ae=Gt:ge.sibling=Gt,ge=Gt);return r&&ve.forEach(function(Yi){return i(M,Yi)}),Dt&&Ms(M,Fe),ae}function oe(M,D,P,Q){var ae=ie(P);if(typeof ae!="function")throw Error(t(150));if(P=ae.call(P),P==null)throw Error(t(151));for(var ge=ae=null,ve=D,Fe=D=0,Gt=null,Ze=P.next();ve!==null&&!Ze.done;Fe++,Ze=P.next()){ve.index>Fe?(Gt=ve,ve=null):Gt=ve.sibling;var Yi=$(M,ve,Ze.value,Q);if(Yi===null){ve===null&&(ve=Gt);break}r&&ve&&Yi.alternate===null&&i(M,ve),D=h(Yi,D,Fe),ge===null?ae=Yi:ge.sibling=Yi,ge=Yi,ve=Gt}if(Ze.done)return o(M,ve),Dt&&Ms(M,Fe),ae;if(ve===null){for(;!Ze.done;Fe++,Ze=P.next())Ze=W(M,Ze.value,Q),Ze!==null&&(D=h(Ze,D,Fe),ge===null?ae=Ze:ge.sibling=Ze,ge=Ze);return Dt&&Ms(M,Fe),ae}for(ve=l(M,ve);!Ze.done;Fe++,Ze=P.next())Ze=X(ve,M,Fe,Ze.value,Q),Ze!==null&&(r&&Ze.alternate!==null&&ve.delete(Ze.key===null?Fe:Ze.key),D=h(Ze,D,Fe),ge===null?ae=Ze:ge.sibling=Ze,ge=Ze);return r&&ve.forEach(function(M1){return i(M,M1)}),Dt&&Ms(M,Fe),ae}function Pt(M,D,P,Q){if(typeof P=="object"&&P!==null&&P.type===Re&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case ee:e:{for(var ae=P.key,ge=D;ge!==null;){if(ge.key===ae){if(ae=P.type,ae===Re){if(ge.tag===7){o(M,ge.sibling),D=c(ge,P.props.children),D.return=M,M=D;break e}}else if(ge.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===Te&&Nm(ae)===ge.type){o(M,ge.sibling),D=c(ge,P.props),D.ref=Ja(M,ge,P),D.return=M,M=D;break e}o(M,ge);break}else i(M,ge);ge=ge.sibling}P.type===Re?(D=Us(P.props.children,M.mode,Q,P.key),D.return=M,M=D):(Q=Xu(P.type,P.key,P.props,null,M.mode,Q),Q.ref=Ja(M,D,P),Q.return=M,M=Q)}return y(M);case A:e:{for(ge=P.key;D!==null;){if(D.key===ge)if(D.tag===4&&D.stateNode.containerInfo===P.containerInfo&&D.stateNode.implementation===P.implementation){o(M,D.sibling),D=c(D,P.children||[]),D.return=M,M=D;break e}else{o(M,D);break}else i(M,D);D=D.sibling}D=Gf(P,M.mode,Q),D.return=M,M=D}return y(M);case Te:return ge=P._init,Pt(M,D,ge(P._payload),Q)}if(Ss(P))return se(M,D,P,Q);if(ie(P))return oe(M,D,P,Q);Ou(M,P)}return typeof P=="string"&&P!==""||typeof P=="number"?(P=""+P,D!==null&&D.tag===6?(o(M,D.sibling),D=c(D,P),D.return=M,M=D):(o(M,D),D=Yf(P,M.mode,Q),D.return=M,M=D),y(M)):o(M,D)}return Pt}var Do=Bm(!0),Um=Bm(!1),Ru=Bi(null),Fu=null,Co=null,sf=null;function of(){sf=Co=Fu=null}function af(r){var i=Ru.current;It(Ru),r._currentValue=i}function lf(r,i,o){for(;r!==null;){var l=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),r===o)break;r=r.return}}function Oo(r,i){Fu=r,sf=Co=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Dn=!0),r.firstContext=null)}function Kn(r){var i=r._currentValue;if(sf!==r)if(r={context:r,memoizedValue:i,next:null},Co===null){if(Fu===null)throw Error(t(308));Co=r,Fu.dependencies={lanes:0,firstContext:r}}else Co=Co.next=r;return i}var Ls=null;function uf(r){Ls===null?Ls=[r]:Ls.push(r)}function jm(r,i,o,l){var c=i.interleaved;return c===null?(o.next=o,uf(i)):(o.next=c.next,c.next=o),i.interleaved=o,ii(r,l)}function ii(r,i){r.lanes|=i;var o=r.alternate;for(o!==null&&(o.lanes|=i),o=r,r=r.return;r!==null;)r.childLanes|=i,o=r.alternate,o!==null&&(o.childLanes|=i),o=r,r=r.return;return o.tag===3?o.stateNode:null}var zi=!1;function cf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zm(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function si(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function $i(r,i,o){var l=r.updateQueue;if(l===null)return null;if(l=l.shared,(Xe&2)!==0){var c=l.pending;return c===null?i.next=i:(i.next=c.next,c.next=i),l.pending=i,ii(r,o)}return c=l.interleaved,c===null?(i.next=i,uf(l)):(i.next=c.next,c.next=i),l.interleaved=i,ii(r,o)}function Mu(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194240)!==0)){var l=i.lanes;l&=r.pendingLanes,o|=l,i.lanes=o,Id(r,o)}}function $m(r,i){var o=r.updateQueue,l=r.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var y={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};h===null?c=h=y:h=h.next=y,o=o.next}while(o!==null);h===null?c=h=i:h=h.next=i}else c=h=i;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:l.shared,effects:l.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}function Lu(r,i,o,l){var c=r.updateQueue;zi=!1;var h=c.firstBaseUpdate,y=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var E=S,T=E.next;E.next=null,y===null?h=T:y.next=T,y=E;var V=r.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==y&&(S===null?V.firstBaseUpdate=T:S.next=T,V.lastBaseUpdate=E))}if(h!==null){var W=c.baseState;y=0,V=T=E=null,S=h;do{var $=S.lane,X=S.eventTime;if((l&$)===$){V!==null&&(V=V.next={eventTime:X,lane:0,tag:S.tag,payload:S.payload,callback:S.callback,next:null});e:{var se=r,oe=S;switch($=i,X=o,oe.tag){case 1:if(se=oe.payload,typeof se=="function"){W=se.call(X,W,$);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,$=typeof se=="function"?se.call(X,W,$):se,$==null)break e;W=Y({},W,$);break e;case 2:zi=!0}}S.callback!==null&&S.lane!==0&&(r.flags|=64,$=c.effects,$===null?c.effects=[S]:$.push(S))}else X={eventTime:X,lane:$,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(T=V=X,E=W):V=V.next=X,y|=$;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;$=S,S=$.next,$.next=null,c.lastBaseUpdate=$,c.shared.pending=null}}while(!0);if(V===null&&(E=W),c.baseState=E,c.firstBaseUpdate=T,c.lastBaseUpdate=V,i=c.shared.interleaved,i!==null){c=i;do y|=c.lane,c=c.next;while(c!==i)}else h===null&&(c.shared.lanes=0);Ps|=y,r.lanes=y,r.memoizedState=W}}function Vm(r,i,o){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var l=r[i],c=l.callback;if(c!==null){if(l.callback=null,l=o,typeof c!="function")throw Error(t(191,c));c.call(l)}}}var Xa={},Lr=Bi(Xa),Za=Bi(Xa),el=Bi(Xa);function As(r){if(r===Xa)throw Error(t(174));return r}function df(r,i){switch(vt(el,i),vt(Za,r),vt(Lr,Xa),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Nn(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=Nn(i,r)}It(Lr),vt(Lr,i)}function Ro(){It(Lr),It(Za),It(el)}function Hm(r){As(el.current);var i=As(Lr.current),o=Nn(i,r.type);i!==o&&(vt(Za,r),vt(Lr,o))}function ff(r){Za.current===r&&(It(Lr),It(Za))}var Ot=Bi(0);function Au(r){for(var i=r;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var hf=[];function pf(){for(var r=0;r<hf.length;r++)hf[r]._workInProgressVersionPrimary=null;hf.length=0}var ku=q.ReactCurrentDispatcher,mf=q.ReactCurrentBatchConfig,ks=0,Rt=null,$t=null,qt=null,Pu=!1,tl=!1,nl=0,Z_=0;function tn(){throw Error(t(321))}function yf(r,i){if(i===null)return!1;for(var o=0;o<i.length&&o<r.length;o++)if(!hr(r[o],i[o]))return!1;return!0}function gf(r,i,o,l,c,h){if(ks=h,Rt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ku.current=r===null||r.memoizedState===null?r1:i1,r=o(l,c),tl){h=0;do{if(tl=!1,nl=0,25<=h)throw Error(t(301));h+=1,qt=$t=null,i.updateQueue=null,ku.current=s1,r=o(l,c)}while(tl)}if(ku.current=Bu,i=$t!==null&&$t.next!==null,ks=0,qt=$t=Rt=null,Pu=!1,i)throw Error(t(300));return r}function vf(){var r=nl!==0;return nl=0,r}function Ar(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Rt.memoizedState=qt=r:qt=qt.next=r,qt}function qn(){if($t===null){var r=Rt.alternate;r=r!==null?r.memoizedState:null}else r=$t.next;var i=qt===null?Rt.memoizedState:qt.next;if(i!==null)qt=i,$t=r;else{if(r===null)throw Error(t(310));$t=r,r={memoizedState:$t.memoizedState,baseState:$t.baseState,baseQueue:$t.baseQueue,queue:$t.queue,next:null},qt===null?Rt.memoizedState=qt=r:qt=qt.next=r}return qt}function rl(r,i){return typeof i=="function"?i(r):i}function wf(r){var i=qn(),o=i.queue;if(o===null)throw Error(t(311));o.lastRenderedReducer=r;var l=$t,c=l.baseQueue,h=o.pending;if(h!==null){if(c!==null){var y=c.next;c.next=h.next,h.next=y}l.baseQueue=c=h,o.pending=null}if(c!==null){h=c.next,l=l.baseState;var S=y=null,E=null,T=h;do{var V=T.lane;if((ks&V)===V)E!==null&&(E=E.next={lane:0,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),l=T.hasEagerState?T.eagerState:r(l,T.action);else{var W={lane:V,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null};E===null?(S=E=W,y=l):E=E.next=W,Rt.lanes|=V,Ps|=V}T=T.next}while(T!==null&&T!==h);E===null?y=l:E.next=S,hr(l,i.memoizedState)||(Dn=!0),i.memoizedState=l,i.baseState=y,i.baseQueue=E,o.lastRenderedState=l}if(r=o.interleaved,r!==null){c=r;do h=c.lane,Rt.lanes|=h,Ps|=h,c=c.next;while(c!==r)}else c===null&&(o.lanes=0);return[i.memoizedState,o.dispatch]}function Sf(r){var i=qn(),o=i.queue;if(o===null)throw Error(t(311));o.lastRenderedReducer=r;var l=o.dispatch,c=o.pending,h=i.memoizedState;if(c!==null){o.pending=null;var y=c=c.next;do h=r(h,y.action),y=y.next;while(y!==c);hr(h,i.memoizedState)||(Dn=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,l]}function Wm(){}function Qm(r,i){var o=Rt,l=qn(),c=i(),h=!hr(l.memoizedState,c);if(h&&(l.memoizedState=c,Dn=!0),l=l.queue,_f(Ym.bind(null,o,l,r),[r]),l.getSnapshot!==i||h||qt!==null&&qt.memoizedState.tag&1){if(o.flags|=2048,il(9,qm.bind(null,o,l,c,i),void 0,null),Yt===null)throw Error(t(349));(ks&30)!==0||Km(o,i,c)}return c}function Km(r,i,o){r.flags|=16384,r={getSnapshot:i,value:o},i=Rt.updateQueue,i===null?(i={lastEffect:null,stores:null},Rt.updateQueue=i,i.stores=[r]):(o=i.stores,o===null?i.stores=[r]:o.push(r))}function qm(r,i,o,l){i.value=o,i.getSnapshot=l,Gm(i)&&Jm(r)}function Ym(r,i,o){return o(function(){Gm(i)&&Jm(r)})}function Gm(r){var i=r.getSnapshot;r=r.value;try{var o=i();return!hr(r,o)}catch{return!0}}function Jm(r){var i=ii(r,1);i!==null&&vr(i,r,1,-1)}function Xm(r){var i=Ar();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rl,lastRenderedState:r},i.queue=r,r=r.dispatch=n1.bind(null,Rt,r),[i.memoizedState,r]}function il(r,i,o,l){return r={tag:r,create:i,destroy:o,deps:l,next:null},i=Rt.updateQueue,i===null?(i={lastEffect:null,stores:null},Rt.updateQueue=i,i.lastEffect=r.next=r):(o=i.lastEffect,o===null?i.lastEffect=r.next=r:(l=o.next,o.next=r,r.next=l,i.lastEffect=r)),r}function Zm(){return qn().memoizedState}function Tu(r,i,o,l){var c=Ar();Rt.flags|=r,c.memoizedState=il(1|i,o,void 0,l===void 0?null:l)}function Nu(r,i,o,l){var c=qn();l=l===void 0?null:l;var h=void 0;if($t!==null){var y=$t.memoizedState;if(h=y.destroy,l!==null&&yf(l,y.deps)){c.memoizedState=il(i,o,h,l);return}}Rt.flags|=r,c.memoizedState=il(1|i,o,h,l)}function ey(r,i){return Tu(8390656,8,r,i)}function _f(r,i){return Nu(2048,8,r,i)}function ty(r,i){return Nu(4,2,r,i)}function ny(r,i){return Nu(4,4,r,i)}function ry(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function iy(r,i,o){return o=o!=null?o.concat([r]):null,Nu(4,4,ry.bind(null,i,r),o)}function bf(){}function sy(r,i){var o=qn();i=i===void 0?null:i;var l=o.memoizedState;return l!==null&&i!==null&&yf(i,l[1])?l[0]:(o.memoizedState=[r,i],r)}function oy(r,i){var o=qn();i=i===void 0?null:i;var l=o.memoizedState;return l!==null&&i!==null&&yf(i,l[1])?l[0]:(r=r(),o.memoizedState=[r,i],r)}function ay(r,i,o){return(ks&21)===0?(r.baseState&&(r.baseState=!1,Dn=!0),r.memoizedState=o):(hr(o,i)||(o=Np(),Rt.lanes|=o,Ps|=o,r.baseState=!0),i)}function e1(r,i){var o=at;at=o!==0&&4>o?o:4,r(!0);var l=mf.transition;mf.transition={};try{r(!1),i()}finally{at=o,mf.transition=l}}function ly(){return qn().memoizedState}function t1(r,i,o){var l=Qi(r);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},uy(r))cy(i,o);else if(o=jm(r,i,o,l),o!==null){var c=dn();vr(o,r,l,c),dy(o,i,l)}}function n1(r,i,o){var l=Qi(r),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(uy(r))cy(i,c);else{var h=r.alternate;if(r.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,o);if(c.hasEagerState=!0,c.eagerState=S,hr(S,y)){var E=i.interleaved;E===null?(c.next=c,uf(i)):(c.next=E.next,E.next=c),i.interleaved=c;return}}catch{}finally{}o=jm(r,i,c,l),o!==null&&(c=dn(),vr(o,r,l,c),dy(o,i,l))}}function uy(r){var i=r.alternate;return r===Rt||i!==null&&i===Rt}function cy(r,i){tl=Pu=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function dy(r,i,o){if((o&4194240)!==0){var l=i.lanes;l&=r.pendingLanes,o|=l,i.lanes=o,Id(r,o)}}var Bu={readContext:Kn,useCallback:tn,useContext:tn,useEffect:tn,useImperativeHandle:tn,useInsertionEffect:tn,useLayoutEffect:tn,useMemo:tn,useReducer:tn,useRef:tn,useState:tn,useDebugValue:tn,useDeferredValue:tn,useTransition:tn,useMutableSource:tn,useSyncExternalStore:tn,useId:tn,unstable_isNewReconciler:!1},r1={readContext:Kn,useCallback:function(r,i){return Ar().memoizedState=[r,i===void 0?null:i],r},useContext:Kn,useEffect:ey,useImperativeHandle:function(r,i,o){return o=o!=null?o.concat([r]):null,Tu(4194308,4,ry.bind(null,i,r),o)},useLayoutEffect:function(r,i){return Tu(4194308,4,r,i)},useInsertionEffect:function(r,i){return Tu(4,2,r,i)},useMemo:function(r,i){var o=Ar();return i=i===void 0?null:i,r=r(),o.memoizedState=[r,i],r},useReducer:function(r,i,o){var l=Ar();return i=o!==void 0?o(i):i,l.memoizedState=l.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},l.queue=r,r=r.dispatch=t1.bind(null,Rt,r),[l.memoizedState,r]},useRef:function(r){var i=Ar();return r={current:r},i.memoizedState=r},useState:Xm,useDebugValue:bf,useDeferredValue:function(r){return Ar().memoizedState=r},useTransition:function(){var r=Xm(!1),i=r[0];return r=e1.bind(null,r[1]),Ar().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,o){var l=Rt,c=Ar();if(Dt){if(o===void 0)throw Error(t(407));o=o()}else{if(o=i(),Yt===null)throw Error(t(349));(ks&30)!==0||Km(l,i,o)}c.memoizedState=o;var h={value:o,getSnapshot:i};return c.queue=h,ey(Ym.bind(null,l,h,r),[r]),l.flags|=2048,il(9,qm.bind(null,l,h,o,i),void 0,null),o},useId:function(){var r=Ar(),i=Yt.identifierPrefix;if(Dt){var o=ri,l=ni;o=(l&~(1<<32-Kt(l)-1)).toString(32)+o,i=":"+i+"R"+o,o=nl++,0<o&&(i+="H"+o.toString(32)),i+=":"}else o=Z_++,i=":"+i+"r"+o.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},i1={readContext:Kn,useCallback:sy,useContext:Kn,useEffect:_f,useImperativeHandle:iy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:oy,useReducer:wf,useRef:Zm,useState:function(){return wf(rl)},useDebugValue:bf,useDeferredValue:function(r){var i=qn();return ay(i,$t.memoizedState,r)},useTransition:function(){var r=wf(rl)[0],i=qn().memoizedState;return[r,i]},useMutableSource:Wm,useSyncExternalStore:Qm,useId:ly,unstable_isNewReconciler:!1},s1={readContext:Kn,useCallback:sy,useContext:Kn,useEffect:_f,useImperativeHandle:iy,useInsertionEffect:ty,useLayoutEffect:ny,useMemo:oy,useReducer:Sf,useRef:Zm,useState:function(){return Sf(rl)},useDebugValue:bf,useDeferredValue:function(r){var i=qn();return $t===null?i.memoizedState=r:ay(i,$t.memoizedState,r)},useTransition:function(){var r=Sf(rl)[0],i=qn().memoizedState;return[r,i]},useMutableSource:Wm,useSyncExternalStore:Qm,useId:ly,unstable_isNewReconciler:!1};function mr(r,i){if(r&&r.defaultProps){i=Y({},i),r=r.defaultProps;for(var o in r)i[o]===void 0&&(i[o]=r[o]);return i}return i}function If(r,i,o,l){i=r.memoizedState,o=o(l,i),o=o==null?i:Y({},i,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var Uu={isMounted:function(r){return(r=r._reactInternals)?Ye(r)===r:!1},enqueueSetState:function(r,i,o){r=r._reactInternals;var l=dn(),c=Qi(r),h=si(l,c);h.payload=i,o!=null&&(h.callback=o),i=$i(r,h,c),i!==null&&(vr(i,r,c,l),Mu(i,r,c))},enqueueReplaceState:function(r,i,o){r=r._reactInternals;var l=dn(),c=Qi(r),h=si(l,c);h.tag=1,h.payload=i,o!=null&&(h.callback=o),i=$i(r,h,c),i!==null&&(vr(i,r,c,l),Mu(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var o=dn(),l=Qi(r),c=si(o,l);c.tag=2,i!=null&&(c.callback=i),i=$i(r,c,l),i!==null&&(vr(i,r,l,o),Mu(i,r,l))}};function fy(r,i,o,l,c,h,y){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(l,h,y):i.prototype&&i.prototype.isPureReactComponent?!Ha(o,l)||!Ha(c,h):!0}function hy(r,i,o){var l=!1,c=Ui,h=i.contextType;return typeof h=="object"&&h!==null?h=Kn(h):(c=xn(i)?Rs:en.current,l=i.contextTypes,h=(l=l!=null)?bo(r,c):Ui),i=new i(o,h),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Uu,r.stateNode=i,i._reactInternals=r,l&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=c,r.__reactInternalMemoizedMaskedChildContext=h),i}function py(r,i,o,l){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,l),i.state!==r&&Uu.enqueueReplaceState(i,i.state,null)}function Ef(r,i,o,l){var c=r.stateNode;c.props=o,c.state=r.memoizedState,c.refs={},cf(r);var h=i.contextType;typeof h=="object"&&h!==null?c.context=Kn(h):(h=xn(i)?Rs:en.current,c.context=bo(r,h)),c.state=r.memoizedState,h=i.getDerivedStateFromProps,typeof h=="function"&&(If(r,i,h,o),c.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(i=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),i!==c.state&&Uu.enqueueReplaceState(c,c.state,null),Lu(r,o,c,l),c.state=r.memoizedState),typeof c.componentDidMount=="function"&&(r.flags|=4194308)}function Fo(r,i){try{var o="",l=i;do o+=We(l),l=l.return;while(l);var c=o}catch(h){c=`
|
|
42
42
|
Error generating stack: `+h.message+`
|
|
43
|
-
`+h.stack}return{value:r,source:i,stack:c,digest:null}}function xf(r,i,o){return{value:r,source:null,stack:o??null,digest:i??null}}function Df(r,i){try{console.error(i.value)}catch(o){setTimeout(function(){throw o})}}var o1=typeof WeakMap=="function"?WeakMap:Map;function my(r,i,o){o=si(-1,o),o.tag=3,o.payload={element:null};var l=i.value;return o.callback=function(){Qu||(Qu=!0,zf=l),Df(r,i)},o}function yy(r,i,o){o=si(-1,o),o.tag=3;var l=r.type.getDerivedStateFromError;if(typeof l=="function"){var c=i.value;o.payload=function(){return l(c)},o.callback=function(){Df(r,i)}}var h=r.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(o.callback=function(){Df(r,i),typeof l!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var y=i.stack;this.componentDidCatch(i.value,{componentStack:y!==null?y:""})}),o}function gy(r,i,o){var l=r.pingCache;if(l===null){l=r.pingCache=new o1;var c=new Set;l.set(i,c)}else c=l.get(i),c===void 0&&(c=new Set,l.set(i,c));c.has(o)||(c.add(o),r=S1.bind(null,r,i,o),i.then(r,r))}function vy(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function wy(r,i,o,l,c){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(i=si(-1,1),i.tag=2,$i(o,i,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=c,r)}var a1=q.ReactCurrentOwner,Dn=!1;function cn(r,i,o,l){i.child=r===null?Um(i,null,o,l):Do(i,r.child,o,l)}function Sy(r,i,o,l,c){o=o.render;var h=i.ref;return Oo(i,c),l=gf(r,i,o,l,h,c),o=vf(),r!==null&&!Dn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~c,oi(r,i,c)):(Dt&&o&&Zd(i),i.flags|=1,cn(r,i,l,c),i.child)}function _y(r,i,o,l,c){if(r===null){var h=o.type;return typeof h=="function"&&!qf(h)&&h.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(i.tag=15,i.type=h,by(r,i,h,l,c)):(r=Xu(o.type,null,l,i,i.mode,c),r.ref=i.ref,r.return=i,i.child=r)}if(h=r.child,(r.lanes&c)===0){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:Ha,o(y,l)&&r.ref===i.ref)return oi(r,i,c)}return i.flags|=1,r=qi(h,l),r.ref=i.ref,r.return=i,i.child=r}function by(r,i,o,l,c){if(r!==null){var h=r.memoizedProps;if(Ha(h,l)&&r.ref===i.ref)if(Dn=!1,i.pendingProps=l=h,(r.lanes&c)!==0)(r.flags&131072)!==0&&(Dn=!0);else return i.lanes=r.lanes,oi(r,i,c)}return Cf(r,i,o,l,c)}function Iy(r,i,o){var l=i.pendingProps,c=l.children,h=r!==null?r.memoizedState:null;if(l.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(Lo,zn),zn|=o;else{if((o&1073741824)===0)return r=h!==null?h.baseLanes|o:o,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,vt(Lo,zn),zn|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=h!==null?h.baseLanes:o,vt(Lo,zn),zn|=l}else h!==null?(l=h.baseLanes|o,i.memoizedState=null):l=o,vt(Lo,zn),zn|=l;return cn(r,i,c,o),i.child}function Ey(r,i){var o=i.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(i.flags|=512,i.flags|=2097152)}function Cf(r,i,o,l,c){var h=xn(o)?Rs:en.current;return h=bo(i,h),Oo(i,c),o=gf(r,i,o,l,h,c),l=vf(),r!==null&&!Dn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~c,oi(r,i,c)):(Dt&&l&&Zd(i),i.flags|=1,cn(r,i,o,c),i.child)}function xy(r,i,o,l,c){if(xn(o)){var h=!0;Iu(i)}else h=!1;if(Oo(i,c),i.stateNode===null)zu(r,i),hy(i,o,l),Ef(i,o,l,c),l=!0;else if(r===null){var y=i.stateNode,S=i.memoizedProps;y.props=S;var E=y.context,T=o.contextType;typeof T=="object"&&T!==null?T=Kn(T):(T=xn(o)?Rs:en.current,T=bo(i,T));var V=o.getDerivedStateFromProps,W=typeof V=="function"||typeof y.getSnapshotBeforeUpdate=="function";W||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==l||E!==T)&&py(i,y,l,T),zi=!1;var $=i.memoizedState;y.state=$,Lu(i,l,y,c),E=i.memoizedState,S!==l||$!==E||En.current||zi?(typeof V=="function"&&(If(i,o,V,l),E=i.memoizedState),(S=zi||fy(i,o,S,l,$,E,T))?(W||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=E),y.props=l,y.state=E,y.context=T,l=S):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{y=i.stateNode,zm(r,i),S=i.memoizedProps,T=i.type===i.elementType?S:mr(i.type,S),y.props=T,W=i.pendingProps,$=y.context,E=o.contextType,typeof E=="object"&&E!==null?E=Kn(E):(E=xn(o)?Rs:en.current,E=bo(i,E));var X=o.getDerivedStateFromProps;(V=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==W||$!==E)&&py(i,y,l,E),zi=!1,$=i.memoizedState,y.state=$,Lu(i,l,y,c);var se=i.memoizedState;S!==W||$!==se||En.current||zi?(typeof X=="function"&&(If(i,o,X,l),se=i.memoizedState),(T=zi||fy(i,o,T,l,$,se,E)||!1)?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(l,se,E),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(l,se,E)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=se),y.props=l,y.state=se,y.context=E,l=T):(typeof y.componentDidUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=1024),l=!1)}return Of(r,i,o,l,h,c)}function Of(r,i,o,l,c,h){Ey(r,i);var y=(i.flags&128)!==0;if(!l&&!y)return c&&Fm(i,o,!1),oi(r,i,h);l=i.stateNode,a1.current=i;var S=y&&typeof o.getDerivedStateFromError!="function"?null:l.render();return i.flags|=1,r!==null&&y?(i.child=Do(i,r.child,null,h),i.child=Do(i,null,S,h)):cn(r,i,S,h),i.memoizedState=l.state,c&&Fm(i,o,!0),i.child}function Dy(r){var i=r.stateNode;i.pendingContext?Om(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Om(r,i.context,!1),df(r,i.containerInfo)}function Cy(r,i,o,l,c){return xo(),rf(c),i.flags|=256,cn(r,i,o,l),i.child}var Rf={dehydrated:null,treeContext:null,retryLane:0};function Ff(r){return{baseLanes:r,cachePool:null,transitions:null}}function Oy(r,i,o){var l=i.pendingProps,c=Ot.current,h=!1,y=(i.flags&128)!==0,S;if((S=y)||(S=r!==null&&r.memoizedState===null?!1:(c&2)!==0),S?(h=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(c|=1),vt(Ot,c&1),r===null)return nf(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(y=l.children,r=l.fallback,h?(l=i.mode,h=i.child,y={mode:"hidden",children:y},(l&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=y):h=Zu(y,l,0,null),r=Us(r,l,o,null),h.return=i,r.return=i,h.sibling=r,i.child=h,i.child.memoizedState=Ff(o),i.memoizedState=Rf,r):Mf(i,y));if(c=r.memoizedState,c!==null&&(S=c.dehydrated,S!==null))return l1(r,i,y,l,S,c,o);if(h){h=l.fallback,y=i.mode,c=r.child,S=c.sibling;var E={mode:"hidden",children:l.children};return(y&1)===0&&i.child!==c?(l=i.child,l.childLanes=0,l.pendingProps=E,i.deletions=null):(l=qi(c,E),l.subtreeFlags=c.subtreeFlags&14680064),S!==null?h=qi(S,h):(h=Us(h,y,o,null),h.flags|=2),h.return=i,l.return=i,l.sibling=h,i.child=l,l=h,h=i.child,y=r.child.memoizedState,y=y===null?Ff(o):{baseLanes:y.baseLanes|o,cachePool:null,transitions:y.transitions},h.memoizedState=y,h.childLanes=r.childLanes&~o,i.memoizedState=Rf,l}return h=r.child,r=h.sibling,l=qi(h,{mode:"visible",children:l.children}),(i.mode&1)===0&&(l.lanes=o),l.return=i,l.sibling=null,r!==null&&(o=i.deletions,o===null?(i.deletions=[r],i.flags|=16):o.push(r)),i.child=l,i.memoizedState=null,l}function Mf(r,i){return i=Zu({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function ju(r,i,o,l){return l!==null&&rf(l),Do(i,r.child,null,o),r=Mf(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function l1(r,i,o,l,c,h,y){if(o)return i.flags&256?(i.flags&=-257,l=xf(Error(t(422))),ju(r,i,y,l)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(h=l.fallback,c=i.mode,l=Zu({mode:"visible",children:l.children},c,0,null),h=Us(h,c,y,null),h.flags|=2,l.return=i,h.return=i,l.sibling=h,i.child=l,(i.mode&1)!==0&&Do(i,r.child,null,y),i.child.memoizedState=Ff(y),i.memoizedState=Rf,h);if((i.mode&1)===0)return ju(r,i,y,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var S=l.dgst;return l=S,h=Error(t(419)),l=xf(h,l,void 0),ju(r,i,y,l)}if(S=(y&r.childLanes)!==0,Dn||S){if(l=Yt,l!==null){switch(y&-y){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|y))!==0?0:c,c!==0&&c!==h.retryLane&&(h.retryLane=c,ii(r,c),vr(l,r,c,-1))}return Kf(),l=xf(Error(t(421))),ju(r,i,y,l)}return c.data==="$?"?(i.flags|=128,i.child=r.child,i=_1.bind(null,r),c._reactRetry=i,null):(r=h.treeContext,jn=Ni(c.nextSibling),Un=i,Dt=!0,pr=null,r!==null&&(Wn[Qn++]=ni,Wn[Qn++]=ri,Wn[Qn++]=Fs,ni=r.id,ri=r.overflow,Fs=i),i=Mf(i,l.children),i.flags|=4096,i)}function Ry(r,i,o){r.lanes|=i;var l=r.alternate;l!==null&&(l.lanes|=i),lf(r.return,i,o)}function Lf(r,i,o,l,c){var h=r.memoizedState;h===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:c}:(h.isBackwards=i,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=o,h.tailMode=c)}function Fy(r,i,o){var l=i.pendingProps,c=l.revealOrder,h=l.tail;if(cn(r,i,l.children,o),l=Ot.current,(l&2)!==0)l=l&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ry(r,o,i);else if(r.tag===19)Ry(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}l&=1}if(vt(Ot,l),(i.mode&1)===0)i.memoizedState=null;else switch(c){case"forwards":for(o=i.child,c=null;o!==null;)r=o.alternate,r!==null&&Au(r)===null&&(c=o),o=o.sibling;o=c,o===null?(c=i.child,i.child=null):(c=o.sibling,o.sibling=null),Lf(i,!1,c,o,h);break;case"backwards":for(o=null,c=i.child,i.child=null;c!==null;){if(r=c.alternate,r!==null&&Au(r)===null){i.child=c;break}r=c.sibling,c.sibling=o,o=c,c=r}Lf(i,!0,o,null,h);break;case"together":Lf(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function zu(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function oi(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),Ps|=i.lanes,(o&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(t(153));if(i.child!==null){for(r=i.child,o=qi(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=qi(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function u1(r,i,o){switch(i.tag){case 3:Dy(i),xo();break;case 5:Hm(i);break;case 1:xn(i.type)&&Iu(i);break;case 4:df(i,i.stateNode.containerInfo);break;case 10:var l=i.type._context,c=i.memoizedProps.value;vt(Ru,l._currentValue),l._currentValue=c;break;case 13:if(l=i.memoizedState,l!==null)return l.dehydrated!==null?(vt(Ot,Ot.current&1),i.flags|=128,null):(o&i.child.childLanes)!==0?Oy(r,i,o):(vt(Ot,Ot.current&1),r=oi(r,i,o),r!==null?r.sibling:null);vt(Ot,Ot.current&1);break;case 19:if(l=(o&i.childLanes)!==0,(r.flags&128)!==0){if(l)return Fy(r,i,o);i.flags|=128}if(c=i.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),vt(Ot,Ot.current),l)break;return null;case 22:case 23:return i.lanes=0,Iy(r,i,o)}return oi(r,i,o)}var My,Af,Ly,Ay;My=function(r,i){for(var o=i.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Af=function(){},Ly=function(r,i,o,l){var c=r.memoizedProps;if(c!==l){r=i.stateNode,As(Lr.current);var h=null;switch(o){case"input":c=lr(r,c),l=lr(r,l),h=[];break;case"select":c=Y({},c,{value:void 0}),l=Y({},l,{value:void 0}),h=[];break;case"textarea":c=ur(r,c),l=ur(r,l),h=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(r.onclick=Su)}co(o,l);var y;o=null;for(T in c)if(!l.hasOwnProperty(T)&&c.hasOwnProperty(T)&&c[T]!=null)if(T==="style"){var S=c[T];for(y in S)S.hasOwnProperty(y)&&(o||(o={}),o[y]="")}else T!=="dangerouslySetInnerHTML"&&T!=="children"&&T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(a.hasOwnProperty(T)?h||(h=[]):(h=h||[]).push(T,null));for(T in l){var E=l[T];if(S=c!=null?c[T]:void 0,l.hasOwnProperty(T)&&E!==S&&(E!=null||S!=null))if(T==="style")if(S){for(y in S)!S.hasOwnProperty(y)||E&&E.hasOwnProperty(y)||(o||(o={}),o[y]="");for(y in E)E.hasOwnProperty(y)&&S[y]!==E[y]&&(o||(o={}),o[y]=E[y])}else o||(h||(h=[]),h.push(T,o)),o=E;else T==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,S=S?S.__html:void 0,E!=null&&S!==E&&(h=h||[]).push(T,E)):T==="children"?typeof E!="string"&&typeof E!="number"||(h=h||[]).push(T,""+E):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&(a.hasOwnProperty(T)?(E!=null&&T==="onScroll"&&bt("scroll",r),h||S===E||(h=[])):(h=h||[]).push(T,E))}o&&(h=h||[]).push("style",o);var T=h;(i.updateQueue=T)&&(i.flags|=4)}},Ay=function(r,i,o,l){o!==l&&(i.flags|=4)};function sl(r,i){if(!Dt)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:l.sibling=null}}function nn(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,l=0;if(i)for(var c=r.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=r,c=c.sibling;else for(c=r.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=r,c=c.sibling;return r.subtreeFlags|=l,r.childLanes=o,i}function c1(r,i,o){var l=i.pendingProps;switch(ef(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(i),null;case 1:return xn(i.type)&&bu(),nn(i),null;case 3:return l=i.stateNode,Ro(),It(En),It(en),pf(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Cu(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,pr!==null&&(Hf(pr),pr=null))),Af(r,i),nn(i),null;case 5:ff(i);var c=As(el.current);if(o=i.type,r!==null&&i.stateNode!=null)Ly(r,i,o,l,c),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!l){if(i.stateNode===null)throw Error(t(166));return nn(i),null}if(r=As(Lr.current),Cu(i)){l=i.stateNode,o=i.type;var h=i.memoizedProps;switch(l[Mr]=i,l[Ya]=h,r=(i.mode&1)!==0,o){case"dialog":bt("cancel",l),bt("close",l);break;case"iframe":case"object":case"embed":bt("load",l);break;case"video":case"audio":for(c=0;c<Qa.length;c++)bt(Qa[c],l);break;case"source":bt("error",l);break;case"img":case"image":case"link":bt("error",l),bt("load",l);break;case"details":bt("toggle",l);break;case"input":Gl(l,h),bt("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!h.multiple},bt("invalid",l);break;case"textarea":Di(l,h),bt("invalid",l)}co(o,h),c=null;for(var y in h)if(h.hasOwnProperty(y)){var S=h[y];y==="children"?typeof S=="string"?l.textContent!==S&&(h.suppressHydrationWarning!==!0&&wu(l.textContent,S,r),c=["children",S]):typeof S=="number"&&l.textContent!==""+S&&(h.suppressHydrationWarning!==!0&&wu(l.textContent,S,r),c=["children",""+S]):a.hasOwnProperty(y)&&S!=null&&y==="onScroll"&&bt("scroll",l)}switch(o){case"input":ar(l),Xl(l,h,!0);break;case"textarea":ar(l),lo(l);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(l.onclick=Su)}l=c,i.updateQueue=l,l!==null&&(i.flags|=4)}else{y=c.nodeType===9?c:c.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=cr(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=y.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof l.is=="string"?r=y.createElement(o,{is:l.is}):(r=y.createElement(o),o==="select"&&(y=r,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):r=y.createElementNS(r,o),r[Mr]=i,r[Ya]=l,My(r,i,!1,!1),i.stateNode=r;e:{switch(y=Ci(o,l),o){case"dialog":bt("cancel",r),bt("close",r),c=l;break;case"iframe":case"object":case"embed":bt("load",r),c=l;break;case"video":case"audio":for(c=0;c<Qa.length;c++)bt(Qa[c],r);c=l;break;case"source":bt("error",r),c=l;break;case"img":case"image":case"link":bt("error",r),bt("load",r),c=l;break;case"details":bt("toggle",r),c=l;break;case"input":Gl(r,l),c=lr(r,l),bt("invalid",r);break;case"option":c=l;break;case"select":r._wrapperState={wasMultiple:!!l.multiple},c=Y({},l,{value:void 0}),bt("invalid",r);break;case"textarea":Di(r,l),c=ur(r,l),bt("invalid",r);break;default:c=l}co(o,c),S=c;for(h in S)if(S.hasOwnProperty(h)){var E=S[h];h==="style"?Oa(r,E):h==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&uo(r,E)):h==="children"?typeof E=="string"?(o!=="textarea"||E!=="")&&bs(r,E):typeof E=="number"&&bs(r,""+E):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(a.hasOwnProperty(h)?E!=null&&h==="onScroll"&&bt("scroll",r):E!=null&&z(r,h,E,y))}switch(o){case"input":ar(r),Xl(r,l,!1);break;case"textarea":ar(r),lo(r);break;case"option":l.value!=null&&r.setAttribute("value",""+tt(l.value));break;case"select":r.multiple=!!l.multiple,h=l.value,h!=null?xi(r,!!l.multiple,h,!1):l.defaultValue!=null&&xi(r,!!l.multiple,l.defaultValue,!0);break;default:typeof c.onClick=="function"&&(r.onclick=Su)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return nn(i),null;case 6:if(r&&i.stateNode!=null)Ay(r,i,r.memoizedProps,l);else{if(typeof l!="string"&&i.stateNode===null)throw Error(t(166));if(o=As(el.current),As(Lr.current),Cu(i)){if(l=i.stateNode,o=i.memoizedProps,l[Mr]=i,(h=l.nodeValue!==o)&&(r=Un,r!==null))switch(r.tag){case 3:wu(l.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&wu(l.nodeValue,o,(r.mode&1)!==0)}h&&(i.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Mr]=i,i.stateNode=l}return nn(i),null;case 13:if(It(Ot),l=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Dt&&jn!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Tm(),xo(),i.flags|=98560,h=!1;else if(h=Cu(i),l!==null&&l.dehydrated!==null){if(r===null){if(!h)throw Error(t(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(t(317));h[Mr]=i}else xo(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;nn(i),h=!1}else pr!==null&&(Hf(pr),pr=null),h=!0;if(!h)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=o,i):(l=l!==null,l!==(r!==null&&r.memoizedState!==null)&&l&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(Ot.current&1)!==0?Vt===0&&(Vt=3):Kf())),i.updateQueue!==null&&(i.flags|=4),nn(i),null);case 4:return Ro(),Af(r,i),r===null&&Ka(i.stateNode.containerInfo),nn(i),null;case 10:return af(i.type._context),nn(i),null;case 17:return xn(i.type)&&bu(),nn(i),null;case 19:if(It(Ot),h=i.memoizedState,h===null)return nn(i),null;if(l=(i.flags&128)!==0,y=h.rendering,y===null)if(l)sl(h,!1);else{if(Vt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(y=Au(r),y!==null){for(i.flags|=128,sl(h,!1),l=y.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),i.subtreeFlags=0,l=o,o=i.child;o!==null;)h=o,r=l,h.flags&=14680066,y=h.alternate,y===null?(h.childLanes=0,h.lanes=r,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=y.childLanes,h.lanes=y.lanes,h.child=y.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=y.memoizedProps,h.memoizedState=y.memoizedState,h.updateQueue=y.updateQueue,h.type=y.type,r=y.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return vt(Ot,Ot.current&1|2),i.child}r=r.sibling}h.tail!==null&&mt()>Ao&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304)}else{if(!l)if(r=Au(y),r!==null){if(i.flags|=128,l=!0,o=r.updateQueue,o!==null&&(i.updateQueue=o,i.flags|=4),sl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Dt)return nn(i),null}else 2*mt()-h.renderingStartTime>Ao&&o!==1073741824&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304);h.isBackwards?(y.sibling=i.child,i.child=y):(o=h.last,o!==null?o.sibling=y:i.child=y,h.last=y)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=mt(),i.sibling=null,o=Ot.current,vt(Ot,l?o&1|2:o&1),i):(nn(i),null);case 22:case 23:return Qf(),l=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==l&&(i.flags|=8192),l&&(i.mode&1)!==0?(zn&1073741824)!==0&&(nn(i),i.subtreeFlags&6&&(i.flags|=8192)):nn(i),null;case 24:return null;case 25:return null}throw Error(t(156,i.tag))}function d1(r,i){switch(ef(i),i.tag){case 1:return xn(i.type)&&bu(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Ro(),It(En),It(en),pf(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return ff(i),null;case 13:if(It(Ot),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(t(340));xo()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return It(Ot),null;case 4:return Ro(),null;case 10:return af(i.type._context),null;case 22:case 23:return Qf(),null;case 24:return null;default:return null}}var $u=!1,rn=!1,f1=typeof WeakSet=="function"?WeakSet:Set,re=null;function Mo(r,i){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){At(r,i,l)}else o.current=null}function kf(r,i,o){try{o()}catch(l){At(r,i,l)}}var ky=!1;function h1(r,i){if(Wd=lu,r=fm(),Nd(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,S=-1,E=-1,T=0,V=0,W=r,$=null;t:for(;;){for(var X;W!==o||c!==0&&W.nodeType!==3||(S=y+c),W!==h||l!==0&&W.nodeType!==3||(E=y+l),W.nodeType===3&&(y+=W.nodeValue.length),(X=W.firstChild)!==null;)$=W,W=X;for(;;){if(W===r)break t;if($===o&&++T===c&&(S=y),$===h&&++V===l&&(E=y),(X=W.nextSibling)!==null)break;W=$,$=W.parentNode}W=X}o=S===-1||E===-1?null:{start:S,end:E}}else o=null}o=o||{start:0,end:0}}else o=null;for(Qd={focusedElem:r,selectionRange:o},lu=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var se=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var oe=se.memoizedProps,Pt=se.memoizedState,M=i.stateNode,D=M.getSnapshotBeforeUpdate(i.elementType===i.type?oe:mr(i.type,oe),Pt);M.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var P=i.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Q){At(i,i.return,Q)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return se=ky,ky=!1,se}function ol(r,i,o){var l=i.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&r)===r){var h=c.destroy;c.destroy=void 0,h!==void 0&&kf(i,o,h)}c=c.next}while(c!==l)}}function Vu(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&r)===r){var l=o.create;o.destroy=l()}o=o.next}while(o!==i)}}function Pf(r){var i=r.ref;if(i!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof i=="function"?i(r):i.current=r}}function Py(r){var i=r.alternate;i!==null&&(r.alternate=null,Py(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Mr],delete i[Ya],delete i[Gd],delete i[Y_],delete i[G_])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Ty(r){return r.tag===5||r.tag===3||r.tag===4}function Ny(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Ty(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Tf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.nodeType===8?o.parentNode.insertBefore(r,i):o.insertBefore(r,i):(o.nodeType===8?(i=o.parentNode,i.insertBefore(r,o)):(i=o,i.appendChild(r)),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=Su));else if(l!==4&&(r=r.child,r!==null))for(Tf(r,i,o),r=r.sibling;r!==null;)Tf(r,i,o),r=r.sibling}function Nf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(l!==4&&(r=r.child,r!==null))for(Nf(r,i,o),r=r.sibling;r!==null;)Nf(r,i,o),r=r.sibling}var Jt=null,yr=!1;function Vi(r,i,o){for(o=o.child;o!==null;)By(r,i,o),o=o.sibling}function By(r,i,o){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Zr,o)}catch{}switch(o.tag){case 5:rn||Mo(o,i);case 6:var l=Jt,c=yr;Jt=null,Vi(r,i,o),Jt=l,yr=c,Jt!==null&&(yr?(r=Jt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):Jt.removeChild(o.stateNode));break;case 18:Jt!==null&&(yr?(r=Jt,o=o.stateNode,r.nodeType===8?Yd(r.parentNode,o):r.nodeType===1&&Yd(r,o),Ba(r)):Yd(Jt,o.stateNode));break;case 4:l=Jt,c=yr,Jt=o.stateNode.containerInfo,yr=!0,Vi(r,i,o),Jt=l,yr=c;break;case 0:case 11:case 14:case 15:if(!rn&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var h=c,y=h.destroy;h=h.tag,y!==void 0&&((h&2)!==0||(h&4)!==0)&&kf(o,i,y),c=c.next}while(c!==l)}Vi(r,i,o);break;case 1:if(!rn&&(Mo(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(S){At(o,i,S)}Vi(r,i,o);break;case 21:Vi(r,i,o);break;case 22:o.mode&1?(rn=(l=rn)||o.memoizedState!==null,Vi(r,i,o),rn=l):Vi(r,i,o);break;default:Vi(r,i,o)}}function Uy(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new f1),i.forEach(function(l){var c=b1.bind(null,r,l);o.has(l)||(o.add(l),l.then(c,c))})}}function gr(r,i){var o=i.deletions;if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];try{var h=r,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 5:Jt=S.stateNode,yr=!1;break e;case 3:Jt=S.stateNode.containerInfo,yr=!0;break e;case 4:Jt=S.stateNode.containerInfo,yr=!0;break e}S=S.return}if(Jt===null)throw Error(t(160));By(h,y,c),Jt=null,yr=!1;var E=c.alternate;E!==null&&(E.return=null),c.return=null}catch(T){At(c,i,T)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)jy(i,r),i=i.sibling}function jy(r,i){var o=r.alternate,l=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(gr(i,r),kr(r),l&4){try{ol(3,r,r.return),Vu(3,r)}catch(oe){At(r,r.return,oe)}try{ol(5,r,r.return)}catch(oe){At(r,r.return,oe)}}break;case 1:gr(i,r),kr(r),l&512&&o!==null&&Mo(o,o.return);break;case 5:if(gr(i,r),kr(r),l&512&&o!==null&&Mo(o,o.return),r.flags&32){var c=r.stateNode;try{bs(c,"")}catch(oe){At(r,r.return,oe)}}if(l&4&&(c=r.stateNode,c!=null)){var h=r.memoizedProps,y=o!==null?o.memoizedProps:h,S=r.type,E=r.updateQueue;if(r.updateQueue=null,E!==null)try{S==="input"&&h.type==="radio"&&h.name!=null&&Jl(c,h),Ci(S,y);var T=Ci(S,h);for(y=0;y<E.length;y+=2){var V=E[y],W=E[y+1];V==="style"?Oa(c,W):V==="dangerouslySetInnerHTML"?uo(c,W):V==="children"?bs(c,W):z(c,V,W,T)}switch(S){case"input":ao(c,h);break;case"textarea":Da(c,h);break;case"select":var $=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!h.multiple;var X=h.value;X!=null?xi(c,!!h.multiple,X,!1):$!==!!h.multiple&&(h.defaultValue!=null?xi(c,!!h.multiple,h.defaultValue,!0):xi(c,!!h.multiple,h.multiple?[]:"",!1))}c[Ya]=h}catch(oe){At(r,r.return,oe)}}break;case 6:if(gr(i,r),kr(r),l&4){if(r.stateNode===null)throw Error(t(162));c=r.stateNode,h=r.memoizedProps;try{c.nodeValue=h}catch(oe){At(r,r.return,oe)}}break;case 3:if(gr(i,r),kr(r),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Ba(i.containerInfo)}catch(oe){At(r,r.return,oe)}break;case 4:gr(i,r),kr(r);break;case 13:gr(i,r),kr(r),c=r.child,c.flags&8192&&(h=c.memoizedState!==null,c.stateNode.isHidden=h,!h||c.alternate!==null&&c.alternate.memoizedState!==null||(jf=mt())),l&4&&Uy(r);break;case 22:if(V=o!==null&&o.memoizedState!==null,r.mode&1?(rn=(T=rn)||V,gr(i,r),rn=T):gr(i,r),kr(r),l&8192){if(T=r.memoizedState!==null,(r.stateNode.isHidden=T)&&!V&&(r.mode&1)!==0)for(re=r,V=r.child;V!==null;){for(W=re=V;re!==null;){switch($=re,X=$.child,$.tag){case 0:case 11:case 14:case 15:ol(4,$,$.return);break;case 1:Mo($,$.return);var se=$.stateNode;if(typeof se.componentWillUnmount=="function"){l=$,o=$.return;try{i=l,se.props=i.memoizedProps,se.state=i.memoizedState,se.componentWillUnmount()}catch(oe){At(l,o,oe)}}break;case 5:Mo($,$.return);break;case 22:if($.memoizedState!==null){Vy(W);continue}}X!==null?(X.return=$,re=X):Vy(W)}V=V.sibling}e:for(V=null,W=r;;){if(W.tag===5){if(V===null){V=W;try{c=W.stateNode,T?(h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(S=W.stateNode,E=W.memoizedProps.style,y=E!=null&&E.hasOwnProperty("display")?E.display:null,S.style.display=Ca("display",y))}catch(oe){At(r,r.return,oe)}}}else if(W.tag===6){if(V===null)try{W.stateNode.nodeValue=T?"":W.memoizedProps}catch(oe){At(r,r.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===r)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===r)break e;for(;W.sibling===null;){if(W.return===null||W.return===r)break e;V===W&&(V=null),W=W.return}V===W&&(V=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:gr(i,r),kr(r),l&4&&Uy(r);break;case 21:break;default:gr(i,r),kr(r)}}function kr(r){var i=r.flags;if(i&2){try{e:{for(var o=r.return;o!==null;){if(Ty(o)){var l=o;break e}o=o.return}throw Error(t(160))}switch(l.tag){case 5:var c=l.stateNode;l.flags&32&&(bs(c,""),l.flags&=-33);var h=Ny(r);Nf(r,h,c);break;case 3:case 4:var y=l.stateNode.containerInfo,S=Ny(r);Tf(r,S,y);break;default:throw Error(t(161))}}catch(E){At(r,r.return,E)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function p1(r,i,o){re=r,zy(r)}function zy(r,i,o){for(var l=(r.mode&1)!==0;re!==null;){var c=re,h=c.child;if(c.tag===22&&l){var y=c.memoizedState!==null||$u;if(!y){var S=c.alternate,E=S!==null&&S.memoizedState!==null||rn;S=$u;var T=rn;if($u=y,(rn=E)&&!T)for(re=c;re!==null;)y=re,E=y.child,y.tag===22&&y.memoizedState!==null?Hy(c):E!==null?(E.return=y,re=E):Hy(c);for(;h!==null;)re=h,zy(h),h=h.sibling;re=c,$u=S,rn=T}$y(r)}else(c.subtreeFlags&8772)!==0&&h!==null?(h.return=c,re=h):$y(r)}}function $y(r){for(;re!==null;){var i=re;if((i.flags&8772)!==0){var o=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:rn||Vu(5,i);break;case 1:var l=i.stateNode;if(i.flags&4&&!rn)if(o===null)l.componentDidMount();else{var c=i.elementType===i.type?o.memoizedProps:mr(i.type,o.memoizedProps);l.componentDidUpdate(c,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var h=i.updateQueue;h!==null&&Vm(i,h,l);break;case 3:var y=i.updateQueue;if(y!==null){if(o=null,i.child!==null)switch(i.child.tag){case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}Vm(i,y,o)}break;case 5:var S=i.stateNode;if(o===null&&i.flags&4){o=S;var E=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&o.focus();break;case"img":E.src&&(o.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var T=i.alternate;if(T!==null){var V=T.memoizedState;if(V!==null){var W=V.dehydrated;W!==null&&Ba(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}rn||i.flags&512&&Pf(i)}catch($){At(i,i.return,$)}}if(i===r){re=null;break}if(o=i.sibling,o!==null){o.return=i.return,re=o;break}re=i.return}}function Vy(r){for(;re!==null;){var i=re;if(i===r){re=null;break}var o=i.sibling;if(o!==null){o.return=i.return,re=o;break}re=i.return}}function Hy(r){for(;re!==null;){var i=re;try{switch(i.tag){case 0:case 11:case 15:var o=i.return;try{Vu(4,i)}catch(E){At(i,o,E)}break;case 1:var l=i.stateNode;if(typeof l.componentDidMount=="function"){var c=i.return;try{l.componentDidMount()}catch(E){At(i,c,E)}}var h=i.return;try{Pf(i)}catch(E){At(i,h,E)}break;case 5:var y=i.return;try{Pf(i)}catch(E){At(i,y,E)}}}catch(E){At(i,i.return,E)}if(i===r){re=null;break}var S=i.sibling;if(S!==null){S.return=i.return,re=S;break}re=i.return}}var m1=Math.ceil,Hu=q.ReactCurrentDispatcher,Bf=q.ReactCurrentOwner,Yn=q.ReactCurrentBatchConfig,Xe=0,Yt=null,Bt=null,Xt=0,zn=0,Lo=Bi(0),Vt=0,al=null,Ps=0,Wu=0,Uf=0,ll=null,Cn=null,jf=0,Ao=1/0,ai=null,Qu=!1,zf=null,Hi=null,Ku=!1,Wi=null,qu=0,ul=0,$f=null,Yu=-1,Gu=0;function dn(){return(Xe&6)!==0?mt():Yu!==-1?Yu:Yu=mt()}function Qi(r){return(r.mode&1)===0?1:(Xe&2)!==0&&Xt!==0?Xt&-Xt:X_.transition!==null?(Gu===0&&(Gu=Np()),Gu):(r=at,r!==0||(r=window.event,r=r===void 0?16:Qp(r.type)),r)}function vr(r,i,o,l){if(50<ul)throw ul=0,$f=null,Error(t(185));Aa(r,o,l),((Xe&2)===0||r!==Yt)&&(r===Yt&&((Xe&2)===0&&(Wu|=o),Vt===4&&Ki(r,Xt)),On(r,l),o===1&&Xe===0&&(i.mode&1)===0&&(Ao=mt()+500,Eu&&ji()))}function On(r,i){var o=r.callbackNode;XS(r,i);var l=su(r,r===Yt?Xt:0);if(l===0)o!==null&&Fi(o),r.callbackNode=null,r.callbackPriority=0;else if(i=l&-l,r.callbackPriority!==i){if(o!=null&&Fi(o),i===1)r.tag===0?J_(Qy.bind(null,r)):Mm(Qy.bind(null,r)),K_(function(){(Xe&6)===0&&ji()}),o=null;else{switch(Bp(l)){case 1:o=dr;break;case 4:o=Cs;break;case 16:o=Je;break;case 536870912:o=fr;break;default:o=Je}o=eg(o,Wy.bind(null,r))}r.callbackPriority=i,r.callbackNode=o}}function Wy(r,i){if(Yu=-1,Gu=0,(Xe&6)!==0)throw Error(t(327));var o=r.callbackNode;if(ko()&&r.callbackNode!==o)return null;var l=su(r,r===Yt?Xt:0);if(l===0)return null;if((l&30)!==0||(l&r.expiredLanes)!==0||i)i=Ju(r,l);else{i=l;var c=Xe;Xe|=2;var h=qy();(Yt!==r||Xt!==i)&&(ai=null,Ao=mt()+500,Ns(r,i));do try{v1();break}catch(S){Ky(r,S)}while(!0);of(),Hu.current=h,Xe=c,Bt!==null?i=0:(Yt=null,Xt=0,i=Vt)}if(i!==0){if(i===2&&(c=_d(r),c!==0&&(l=c,i=Vf(r,c))),i===1)throw o=al,Ns(r,0),Ki(r,l),On(r,mt()),o;if(i===6)Ki(r,l);else{if(c=r.current.alternate,(l&30)===0&&!y1(c)&&(i=Ju(r,l),i===2&&(h=_d(r),h!==0&&(l=h,i=Vf(r,h))),i===1))throw o=al,Ns(r,0),Ki(r,l),On(r,mt()),o;switch(r.finishedWork=c,r.finishedLanes=l,i){case 0:case 1:throw Error(t(345));case 2:Bs(r,Cn,ai);break;case 3:if(Ki(r,l),(l&130023424)===l&&(i=jf+500-mt(),10<i)){if(su(r,0)!==0)break;if(c=r.suspendedLanes,(c&l)!==l){dn(),r.pingedLanes|=r.suspendedLanes&c;break}r.timeoutHandle=qd(Bs.bind(null,r,Cn,ai),i);break}Bs(r,Cn,ai);break;case 4:if(Ki(r,l),(l&4194240)===l)break;for(i=r.eventTimes,c=-1;0<l;){var y=31-Kt(l);h=1<<y,y=i[y],y>c&&(c=y),l&=~h}if(l=c,l=mt()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*m1(l/1960))-l,10<l){r.timeoutHandle=qd(Bs.bind(null,r,Cn,ai),l);break}Bs(r,Cn,ai);break;case 5:Bs(r,Cn,ai);break;default:throw Error(t(329))}}}return On(r,mt()),r.callbackNode===o?Wy.bind(null,r):null}function Vf(r,i){var o=ll;return r.current.memoizedState.isDehydrated&&(Ns(r,i).flags|=256),r=Ju(r,i),r!==2&&(i=Cn,Cn=o,i!==null&&Hf(i)),r}function Hf(r){Cn===null?Cn=r:Cn.push.apply(Cn,r)}function y1(r){for(var i=r;;){if(i.flags&16384){var o=i.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var c=o[l],h=c.getSnapshot;c=c.value;try{if(!hr(h(),c))return!1}catch{return!1}}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ki(r,i){for(i&=~Uf,i&=~Wu,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var o=31-Kt(i),l=1<<o;r[o]=-1,i&=~l}}function Qy(r){if((Xe&6)!==0)throw Error(t(327));ko();var i=su(r,0);if((i&1)===0)return On(r,mt()),null;var o=Ju(r,i);if(r.tag!==0&&o===2){var l=_d(r);l!==0&&(i=l,o=Vf(r,l))}if(o===1)throw o=al,Ns(r,0),Ki(r,i),On(r,mt()),o;if(o===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Bs(r,Cn,ai),On(r,mt()),null}function Wf(r,i){var o=Xe;Xe|=1;try{return r(i)}finally{Xe=o,Xe===0&&(Ao=mt()+500,Eu&&ji())}}function Ts(r){Wi!==null&&Wi.tag===0&&(Xe&6)===0&&ko();var i=Xe;Xe|=1;var o=Yn.transition,l=at;try{if(Yn.transition=null,at=1,r)return r()}finally{at=l,Yn.transition=o,Xe=i,(Xe&6)===0&&ji()}}function Qf(){zn=Lo.current,It(Lo)}function Ns(r,i){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,Q_(o)),Bt!==null)for(o=Bt.return;o!==null;){var l=o;switch(ef(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&bu();break;case 3:Ro(),It(En),It(en),pf();break;case 5:ff(l);break;case 4:Ro();break;case 13:It(Ot);break;case 19:It(Ot);break;case 10:af(l.type._context);break;case 22:case 23:Qf()}o=o.return}if(Yt=r,Bt=r=qi(r.current,null),Xt=zn=i,Vt=0,al=null,Uf=Wu=Ps=0,Cn=ll=null,Ls!==null){for(i=0;i<Ls.length;i++)if(o=Ls[i],l=o.interleaved,l!==null){o.interleaved=null;var c=l.next,h=o.pending;if(h!==null){var y=h.next;h.next=c,l.next=y}o.pending=l}Ls=null}return r}function Ky(r,i){do{var o=Bt;try{if(of(),ku.current=Bu,Pu){for(var l=Rt.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}Pu=!1}if(ks=0,qt=$t=Rt=null,tl=!1,nl=0,Bf.current=null,o===null||o.return===null){Vt=1,al=i,Bt=null;break}e:{var h=r,y=o.return,S=o,E=i;if(i=Xt,S.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var T=E,V=S,W=V.tag;if((V.mode&1)===0&&(W===0||W===11||W===15)){var $=V.alternate;$?(V.updateQueue=$.updateQueue,V.memoizedState=$.memoizedState,V.lanes=$.lanes):(V.updateQueue=null,V.memoizedState=null)}var X=vy(y);if(X!==null){X.flags&=-257,wy(X,y,S,h,i),X.mode&1&&gy(h,T,i),i=X,E=T;var se=i.updateQueue;if(se===null){var oe=new Set;oe.add(E),i.updateQueue=oe}else se.add(E);break e}else{if((i&1)===0){gy(h,T,i),Kf();break e}E=Error(t(426))}}else if(Dt&&S.mode&1){var Pt=vy(y);if(Pt!==null){(Pt.flags&65536)===0&&(Pt.flags|=256),wy(Pt,y,S,h,i),rf(Fo(E,S));break e}}h=E=Fo(E,S),Vt!==4&&(Vt=2),ll===null?ll=[h]:ll.push(h),h=y;do{switch(h.tag){case 3:h.flags|=65536,i&=-i,h.lanes|=i;var M=my(h,E,i);$m(h,M);break e;case 1:S=E;var D=h.type,P=h.stateNode;if((h.flags&128)===0&&(typeof D.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Hi===null||!Hi.has(P)))){h.flags|=65536,i&=-i,h.lanes|=i;var Q=yy(h,S,i);$m(h,Q);break e}}h=h.return}while(h!==null)}Gy(o)}catch(ae){i=ae,Bt===o&&o!==null&&(Bt=o=o.return);continue}break}while(!0)}function qy(){var r=Hu.current;return Hu.current=Bu,r===null?Bu:r}function Kf(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Yt===null||(Ps&268435455)===0&&(Wu&268435455)===0||Ki(Yt,Xt)}function Ju(r,i){var o=Xe;Xe|=2;var l=qy();(Yt!==r||Xt!==i)&&(ai=null,Ns(r,i));do try{g1();break}catch(c){Ky(r,c)}while(!0);if(of(),Xe=o,Hu.current=l,Bt!==null)throw Error(t(261));return Yt=null,Xt=0,Vt}function g1(){for(;Bt!==null;)Yy(Bt)}function v1(){for(;Bt!==null&&!_n();)Yy(Bt)}function Yy(r){var i=Zy(r.alternate,r,zn);r.memoizedProps=r.pendingProps,i===null?Gy(r):Bt=i,Bf.current=null}function Gy(r){var i=r;do{var o=i.alternate;if(r=i.return,(i.flags&32768)===0){if(o=c1(o,i,zn),o!==null){Bt=o;return}}else{if(o=d1(o,i),o!==null){o.flags&=32767,Bt=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Vt=6,Bt=null;return}}if(i=i.sibling,i!==null){Bt=i;return}Bt=i=r}while(i!==null);Vt===0&&(Vt=5)}function Bs(r,i,o){var l=at,c=Yn.transition;try{Yn.transition=null,at=1,w1(r,i,o,l)}finally{Yn.transition=c,at=l}return null}function w1(r,i,o,l){do ko();while(Wi!==null);if((Xe&6)!==0)throw Error(t(327));o=r.finishedWork;var c=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var h=o.lanes|o.childLanes;if(ZS(r,h),r===Yt&&(Bt=Yt=null,Xt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ku||(Ku=!0,eg(Je,function(){return ko(),null})),h=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||h){h=Yn.transition,Yn.transition=null;var y=at;at=1;var S=Xe;Xe|=4,Bf.current=null,h1(r,o),jy(o,r),U_(Qd),lu=!!Wd,Qd=Wd=null,r.current=o,p1(o),Ds(),Xe=S,at=y,Yn.transition=h}else r.current=o;if(Ku&&(Ku=!1,Wi=r,qu=c),h=r.pendingLanes,h===0&&(Hi=null),Lt(o.stateNode),On(r,mt()),i!==null)for(l=r.onRecoverableError,o=0;o<i.length;o++)c=i[o],l(c.value,{componentStack:c.stack,digest:c.digest});if(Qu)throw Qu=!1,r=zf,zf=null,r;return(qu&1)!==0&&r.tag!==0&&ko(),h=r.pendingLanes,(h&1)!==0?r===$f?ul++:(ul=0,$f=r):ul=0,ji(),null}function ko(){if(Wi!==null){var r=Bp(qu),i=Yn.transition,o=at;try{if(Yn.transition=null,at=16>r?16:r,Wi===null)var l=!1;else{if(r=Wi,Wi=null,qu=0,(Xe&6)!==0)throw Error(t(331));var c=Xe;for(Xe|=4,re=r.current;re!==null;){var h=re,y=h.child;if((re.flags&16)!==0){var S=h.deletions;if(S!==null){for(var E=0;E<S.length;E++){var T=S[E];for(re=T;re!==null;){var V=re;switch(V.tag){case 0:case 11:case 15:ol(8,V,h)}var W=V.child;if(W!==null)W.return=V,re=W;else for(;re!==null;){V=re;var $=V.sibling,X=V.return;if(Py(V),V===T){re=null;break}if($!==null){$.return=X,re=$;break}re=X}}}var se=h.alternate;if(se!==null){var oe=se.child;if(oe!==null){se.child=null;do{var Pt=oe.sibling;oe.sibling=null,oe=Pt}while(oe!==null)}}re=h}}if((h.subtreeFlags&2064)!==0&&y!==null)y.return=h,re=y;else e:for(;re!==null;){if(h=re,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:ol(9,h,h.return)}var M=h.sibling;if(M!==null){M.return=h.return,re=M;break e}re=h.return}}var D=r.current;for(re=D;re!==null;){y=re;var P=y.child;if((y.subtreeFlags&2064)!==0&&P!==null)P.return=y,re=P;else e:for(y=D;re!==null;){if(S=re,(S.flags&2048)!==0)try{switch(S.tag){case 0:case 11:case 15:Vu(9,S)}}catch(ae){At(S,S.return,ae)}if(S===y){re=null;break e}var Q=S.sibling;if(Q!==null){Q.return=S.return,re=Q;break e}re=S.return}}if(Xe=c,ji(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Zr,r)}catch{}l=!0}return l}finally{at=o,Yn.transition=i}}return!1}function Jy(r,i,o){i=Fo(o,i),i=my(r,i,1),r=$i(r,i,1),i=dn(),r!==null&&(Aa(r,1,i),On(r,i))}function At(r,i,o){if(r.tag===3)Jy(r,r,o);else for(;i!==null;){if(i.tag===3){Jy(i,r,o);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hi===null||!Hi.has(l))){r=Fo(o,r),r=yy(i,r,1),i=$i(i,r,1),r=dn(),i!==null&&(Aa(i,1,r),On(i,r));break}}i=i.return}}function S1(r,i,o){var l=r.pingCache;l!==null&&l.delete(i),i=dn(),r.pingedLanes|=r.suspendedLanes&o,Yt===r&&(Xt&o)===o&&(Vt===4||Vt===3&&(Xt&130023424)===Xt&&500>mt()-jf?Ns(r,0):Uf|=o),On(r,i)}function Xy(r,i){i===0&&((r.mode&1)===0?i=1:(i=iu,iu<<=1,(iu&130023424)===0&&(iu=4194304)));var o=dn();r=ii(r,i),r!==null&&(Aa(r,i,o),On(r,o))}function _1(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),Xy(r,o)}function b1(r,i){var o=0;switch(r.tag){case 13:var l=r.stateNode,c=r.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=r.stateNode;break;default:throw Error(t(314))}l!==null&&l.delete(i),Xy(r,o)}var Zy;Zy=function(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps||En.current)Dn=!0;else{if((r.lanes&o)===0&&(i.flags&128)===0)return Dn=!1,u1(r,i,o);Dn=(r.flags&131072)!==0}else Dn=!1,Dt&&(i.flags&1048576)!==0&&Lm(i,Du,i.index);switch(i.lanes=0,i.tag){case 2:var l=i.type;zu(r,i),r=i.pendingProps;var c=bo(i,en.current);Oo(i,o),c=gf(null,i,l,r,c,o);var h=vf();return i.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,xn(l)?(h=!0,Iu(i)):h=!1,i.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,cf(i),c.updater=Uu,i.stateNode=c,c._reactInternals=i,Ef(i,l,r,o),i=Of(null,i,l,!0,h,o)):(i.tag=0,Dt&&h&&Zd(i),cn(null,i,c,o),i=i.child),i;case 16:l=i.elementType;e:{switch(zu(r,i),r=i.pendingProps,c=l._init,l=c(l._payload),i.type=l,c=i.tag=E1(l),r=mr(l,r),c){case 0:i=Cf(null,i,l,r,o);break e;case 1:i=xy(null,i,l,r,o);break e;case 11:i=Sy(null,i,l,r,o);break e;case 14:i=_y(null,i,l,mr(l.type,r),o);break e}throw Error(t(306,l,""))}return i;case 0:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),Cf(r,i,l,c,o);case 1:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),xy(r,i,l,c,o);case 3:e:{if(Dy(i),r===null)throw Error(t(387));l=i.pendingProps,h=i.memoizedState,c=h.element,zm(r,i),Lu(i,l,null,o);var y=i.memoizedState;if(l=y.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){c=Fo(Error(t(423)),i),i=Cy(r,i,l,o,c);break e}else if(l!==c){c=Fo(Error(t(424)),i),i=Cy(r,i,l,o,c);break e}else for(jn=Ni(i.stateNode.containerInfo.firstChild),Un=i,Dt=!0,pr=null,o=Um(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(xo(),l===c){i=oi(r,i,o);break e}cn(r,i,l,o)}i=i.child}return i;case 5:return Hm(i),r===null&&nf(i),l=i.type,c=i.pendingProps,h=r!==null?r.memoizedProps:null,y=c.children,Kd(l,c)?y=null:h!==null&&Kd(l,h)&&(i.flags|=32),Ey(r,i),cn(r,i,y,o),i.child;case 6:return r===null&&nf(i),null;case 13:return Oy(r,i,o);case 4:return df(i,i.stateNode.containerInfo),l=i.pendingProps,r===null?i.child=Do(i,null,l,o):cn(r,i,l,o),i.child;case 11:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),Sy(r,i,l,c,o);case 7:return cn(r,i,i.pendingProps,o),i.child;case 8:return cn(r,i,i.pendingProps.children,o),i.child;case 12:return cn(r,i,i.pendingProps.children,o),i.child;case 10:e:{if(l=i.type._context,c=i.pendingProps,h=i.memoizedProps,y=c.value,vt(Ru,l._currentValue),l._currentValue=y,h!==null)if(hr(h.value,y)){if(h.children===c.children&&!En.current){i=oi(r,i,o);break e}}else for(h=i.child,h!==null&&(h.return=i);h!==null;){var S=h.dependencies;if(S!==null){y=h.child;for(var E=S.firstContext;E!==null;){if(E.context===l){if(h.tag===1){E=si(-1,o&-o),E.tag=2;var T=h.updateQueue;if(T!==null){T=T.shared;var V=T.pending;V===null?E.next=E:(E.next=V.next,V.next=E),T.pending=E}}h.lanes|=o,E=h.alternate,E!==null&&(E.lanes|=o),lf(h.return,o,i),S.lanes|=o;break}E=E.next}}else if(h.tag===10)y=h.type===i.type?null:h.child;else if(h.tag===18){if(y=h.return,y===null)throw Error(t(341));y.lanes|=o,S=y.alternate,S!==null&&(S.lanes|=o),lf(y,o,i),y=h.sibling}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===i){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}cn(r,i,c.children,o),i=i.child}return i;case 9:return c=i.type,l=i.pendingProps.children,Oo(i,o),c=Kn(c),l=l(c),i.flags|=1,cn(r,i,l,o),i.child;case 14:return l=i.type,c=mr(l,i.pendingProps),c=mr(l.type,c),_y(r,i,l,c,o);case 15:return by(r,i,i.type,i.pendingProps,o);case 17:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),zu(r,i),i.tag=1,xn(l)?(r=!0,Iu(i)):r=!1,Oo(i,o),hy(i,l,c),Ef(i,l,c,o),Of(null,i,l,!0,r,o);case 19:return Fy(r,i,o);case 22:return Iy(r,i,o)}throw Error(t(156,i.tag))};function eg(r,i){return Fr(r,i)}function I1(r,i,o,l){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(r,i,o,l){return new I1(r,i,o,l)}function qf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function E1(r){if(typeof r=="function")return qf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===_t)return 11;if(r===et)return 14}return 2}function qi(r,i){var o=r.alternate;return o===null?(o=Gn(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Xu(r,i,o,l,c,h){var y=2;if(l=r,typeof r=="function")qf(r)&&(y=1);else if(typeof r=="string")y=5;else e:switch(r){case Re:return Us(o.children,c,h,i);case pe:y=8,c|=8;break;case ne:return r=Gn(12,o,i,c|2),r.elementType=ne,r.lanes=h,r;case yt:return r=Gn(13,o,i,c),r.elementType=yt,r.lanes=h,r;case je:return r=Gn(19,o,i,c),r.elementType=je,r.lanes=h,r;case ze:return Zu(o,c,h,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Ce:y=10;break e;case pt:y=9;break e;case _t:y=11;break e;case et:y=14;break e;case Te:y=16,l=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return i=Gn(y,o,i,c),i.elementType=r,i.type=l,i.lanes=h,i}function Us(r,i,o,l){return r=Gn(7,r,l,i),r.lanes=o,r}function Zu(r,i,o,l){return r=Gn(22,r,l,i),r.elementType=ze,r.lanes=o,r.stateNode={isHidden:!1},r}function Yf(r,i,o){return r=Gn(6,r,null,i),r.lanes=o,r}function Gf(r,i,o){return i=Gn(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function x1(r,i,o,l,c){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bd(0),this.expirationTimes=bd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bd(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Jf(r,i,o,l,c,h,y,S,E){return r=new x1(r,i,o,S,E),i===1?(i=1,h===!0&&(i|=8)):i=0,h=Gn(3,null,null,i),r.current=h,h.stateNode=r,h.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},cf(h),r}function D1(r,i,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:l==null?null:""+l,children:r,containerInfo:i,implementation:o}}function tg(r){if(!r)return Ui;r=r._reactInternals;e:{if(Ye(r)!==r||r.tag!==1)throw Error(t(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(xn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(t(171))}if(r.tag===1){var o=r.type;if(xn(o))return Rm(r,o,i)}return i}function ng(r,i,o,l,c,h,y,S,E){return r=Jf(o,l,!0,r,c,h,y,S,E),r.context=tg(null),o=r.current,l=dn(),c=Qi(o),h=si(l,c),h.callback=i??null,$i(o,h,c),r.current.lanes=c,Aa(r,c,l),On(r,l),r}function ec(r,i,o,l){var c=i.current,h=dn(),y=Qi(c);return o=tg(o),i.context===null?i.context=o:i.pendingContext=o,i=si(h,y),i.payload={element:r},l=l===void 0?null:l,l!==null&&(i.callback=l),r=$i(c,i,y),r!==null&&(vr(r,c,y,h),Mu(r,c,y)),y}function tc(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function rg(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function Xf(r,i){rg(r,i),(r=r.alternate)&&rg(r,i)}function C1(){return null}var ig=typeof reportError=="function"?reportError:function(r){console.error(r)};function Zf(r){this._internalRoot=r}nc.prototype.render=Zf.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(t(409));ec(r,i,null,null)},nc.prototype.unmount=Zf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Ts(function(){ec(null,r,null,null)}),i[ei]=null}};function nc(r){this._internalRoot=r}nc.prototype.unstable_scheduleHydration=function(r){if(r){var i=zp();r={blockedOn:null,target:r,priority:i};for(var o=0;o<ki.length&&i!==0&&i<ki[o].priority;o++);ki.splice(o,0,r),o===0&&Hp(r)}};function eh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function rc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function sg(){}function O1(r,i,o,l,c){if(c){if(typeof l=="function"){var h=l;l=function(){var T=tc(y);h.call(T)}}var y=ng(i,l,r,0,null,!1,!1,"",sg);return r._reactRootContainer=y,r[ei]=y.current,Ka(r.nodeType===8?r.parentNode:r),Ts(),y}for(;c=r.lastChild;)r.removeChild(c);if(typeof l=="function"){var S=l;l=function(){var T=tc(E);S.call(T)}}var E=Jf(r,0,!1,null,null,!1,!1,"",sg);return r._reactRootContainer=E,r[ei]=E.current,Ka(r.nodeType===8?r.parentNode:r),Ts(function(){ec(i,E,o,l)}),E}function ic(r,i,o,l,c){var h=o._reactRootContainer;if(h){var y=h;if(typeof c=="function"){var S=c;c=function(){var E=tc(y);S.call(E)}}ec(i,y,r,c)}else y=O1(o,i,r,c,l);return tc(y)}Up=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var o=La(i.pendingLanes);o!==0&&(Id(i,o|1),On(i,mt()),(Xe&6)===0&&(Ao=mt()+500,ji()))}break;case 13:Ts(function(){var l=ii(r,1);if(l!==null){var c=dn();vr(l,r,1,c)}}),Xf(r,1)}},Ed=function(r){if(r.tag===13){var i=ii(r,134217728);if(i!==null){var o=dn();vr(i,r,134217728,o)}Xf(r,134217728)}},jp=function(r){if(r.tag===13){var i=Qi(r),o=ii(r,i);if(o!==null){var l=dn();vr(o,r,i,l)}Xf(r,i)}},zp=function(){return at},$p=function(r,i){var o=at;try{return at=r,i()}finally{at=o}},Ra=function(r,i,o){switch(i){case"input":if(ao(r,o),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<o.length;i++){var l=o[i];if(l!==r&&l.form===r.form){var c=_u(l);if(!c)throw Error(t(90));Ea(l),ao(l,c)}}}break;case"textarea":Da(r,o);break;case"select":i=o.value,i!=null&&xi(r,!!o.multiple,i,!1)}},eu=Wf,tu=Ts;var R1={usingClientEntryPoint:!1,Events:[Ga,So,_u,Es,xs,Wf]},cl={findFiberByHostInstance:Os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F1={bundleType:cl.bundleType,version:cl.version,rendererPackageName:cl.rendererPackageName,rendererConfig:cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Ke(r),r===null?null:r.stateNode},findFiberByHostInstance:cl.findFiberByHostInstance||C1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{Zr=sc.inject(F1),In=sc}catch{}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R1,Rn.createPortal=function(r,i){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eh(i))throw Error(t(200));return D1(r,i,null,o)},Rn.createRoot=function(r,i){if(!eh(r))throw Error(t(299));var o=!1,l="",c=ig;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onRecoverableError!==void 0&&(c=i.onRecoverableError)),i=Jf(r,1,!1,null,null,o,!1,l,c),r[ei]=i.current,Ka(r.nodeType===8?r.parentNode:r),new Zf(i)},Rn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=Ke(i),r=r===null?null:r.stateNode,r},Rn.flushSync=function(r){return Ts(r)},Rn.hydrate=function(r,i,o){if(!rc(i))throw Error(t(200));return ic(null,r,i,!0,o)},Rn.hydrateRoot=function(r,i,o){if(!eh(r))throw Error(t(405));var l=o!=null&&o.hydratedSources||null,c=!1,h="",y=ig;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),i=ng(i,null,r,1,o??null,c,!1,h,y),r[ei]=i.current,Ka(r),l)for(r=0;r<l.length;r++)o=l[r],c=o._getVersion,c=c(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,c]:i.mutableSourceEagerHydrationData.push(o,c);return new nc(i)},Rn.render=function(r,i,o){if(!rc(i))throw Error(t(200));return ic(null,r,i,!1,o)},Rn.unmountComponentAtNode=function(r){if(!rc(r))throw Error(t(40));return r._reactRootContainer?(Ts(function(){ic(null,null,r,!1,function(){r._reactRootContainer=null,r[ei]=null})}),!0):!1},Rn.unstable_batchedUpdates=Wf,Rn.unstable_renderSubtreeIntoContainer=function(r,i,o,l){if(!rc(o))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return ic(r,i,o,!1,l)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var pg;function Q1(){if(pg)return sh.exports;pg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),sh.exports=W1(),sh.exports}var mg;function K1(){if(mg)return ac;mg=1;var n=Q1();return ac.createRoot=n.createRoot,ac.hydrateRoot=n.hydrateRoot,ac}var q1=K1();const Y1=qv(q1);var _a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eo=typeof window>"u"||"Deno"in globalThis;function pn(){}function G1(n,e){return typeof n=="function"?n(e):n}function _h(n){return typeof n=="number"&&n>=0&&n!==1/0}function e0(n,e){return Math.max(n+(e||0)-Date.now(),0)}function ps(n,e){return typeof n=="function"?n(e):n}function Ir(n,e){return typeof n=="function"?n(e):n}function yg(n,e){const{type:t="all",exact:s,fetchStatus:a,predicate:u,queryKey:d,stale:f}=n;if(d){if(s){if(e.queryHash!==Zh(d,e.options))return!1}else if(!Ml(e.queryKey,d))return!1}if(t!=="all"){const p=e.isActive();if(t==="active"&&!p||t==="inactive"&&p)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||a&&a!==e.state.fetchStatus||u&&!u(e))}function gg(n,e){const{exact:t,status:s,predicate:a,mutationKey:u}=n;if(u){if(!e.options.mutationKey)return!1;if(t){if(to(e.options.mutationKey)!==to(u))return!1}else if(!Ml(e.options.mutationKey,u))return!1}return!(s&&e.state.status!==s||a&&!a(e))}function Zh(n,e){return((e==null?void 0:e.queryKeyHashFn)||to)(n)}function to(n){return JSON.stringify(n,(e,t)=>bh(t)?Object.keys(t).sort().reduce((s,a)=>(s[a]=t[a],s),{}):t)}function Ml(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ml(n[t],e[t])):!1}function t0(n,e){if(n===e)return n;const t=vg(n)&&vg(e);if(t||bh(n)&&bh(e)){const s=t?n:Object.keys(n),a=s.length,u=t?e:Object.keys(e),d=u.length,f=t?[]:{};let p=0;for(let m=0;m<d;m++){const g=t?m:u[m];(!t&&s.includes(g)||t)&&n[g]===void 0&&e[g]===void 0?(f[g]=void 0,p++):(f[g]=t0(n[g],e[g]),f[g]===n[g]&&n[g]!==void 0&&p++)}return a===d&&p===a?n:f}return e}function Rc(n,e){if(!e||Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function vg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function bh(n){if(!wg(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!wg(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function wg(n){return Object.prototype.toString.call(n)==="[object Object]"}function J1(n){return new Promise(e=>{setTimeout(e,n)})}function Ih(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?t0(n,e):e}function X1(n,e,t=0){const s=[...n,e];return t&&s.length>t?s.slice(1):s}function Z1(n,e,t=0){const s=[e,...n];return t&&s.length>t?s.slice(0,-1):s}var ep=Symbol();function n0(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===ep?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function r0(n,e){return typeof n=="function"?n(...e):!!n}var Ws,rs,na,Bv,eb=(Bv=class extends _a{constructor(){super();ye(this,Ws);ye(this,rs);ye(this,na);Z(this,na,e=>{if(!eo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){b(this,rs)||this.setEventListener(b(this,na))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,rs))==null||e.call(this),Z(this,rs,void 0))}setEventListener(e){var t;Z(this,na,e),(t=b(this,rs))==null||t.call(this),Z(this,rs,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){b(this,Ws)!==e&&(Z(this,Ws,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof b(this,Ws)=="boolean"?b(this,Ws):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ws=new WeakMap,rs=new WeakMap,na=new WeakMap,Bv),tp=new eb,ra,is,ia,Uv,tb=(Uv=class extends _a{constructor(){super();ye(this,ra,!0);ye(this,is);ye(this,ia);Z(this,ia,e=>{if(!eo&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){b(this,is)||this.setEventListener(b(this,ia))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,is))==null||e.call(this),Z(this,is,void 0))}setEventListener(e){var t;Z(this,ia,e),(t=b(this,is))==null||t.call(this),Z(this,is,e(this.setOnline.bind(this)))}setOnline(e){b(this,ra)!==e&&(Z(this,ra,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return b(this,ra)}},ra=new WeakMap,is=new WeakMap,ia=new WeakMap,Uv),Fc=new tb;function Eh(){let n,e;const t=new Promise((a,u)=>{n=a,e=u});t.status="pending",t.catch(()=>{});function s(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{s({status:"fulfilled",value:a}),n(a)},t.reject=a=>{s({status:"rejected",reason:a}),e(a)},t}function nb(n){return Math.min(1e3*2**n,3e4)}function i0(n){return(n??"online")==="online"?Fc.isOnline():!0}var s0=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function mc(n){return n instanceof s0}function o0(n){let e=!1,t=0,s=!1,a;const u=Eh(),d=L=>{var N;s||(w(new s0(L)),(N=n.abort)==null||N.call(n))},f=()=>{e=!0},p=()=>{e=!1},m=()=>tp.isFocused()&&(n.networkMode==="always"||Fc.isOnline())&&n.canRun(),g=()=>i0(n.networkMode)&&n.canRun(),v=L=>{var N;s||(s=!0,(N=n.onSuccess)==null||N.call(n,L),a==null||a(),u.resolve(L))},w=L=>{var N;s||(s=!0,(N=n.onError)==null||N.call(n,L),a==null||a(),u.reject(L))},_=()=>new Promise(L=>{var N;a=k=>{(s||m())&&L(k)},(N=n.onPause)==null||N.call(n)}).then(()=>{var L;a=void 0,s||(L=n.onContinue)==null||L.call(n)}),x=()=>{if(s)return;let L;const N=t===0?n.initialPromise:void 0;try{L=N??n.fn()}catch(k){L=Promise.reject(k)}Promise.resolve(L).then(v).catch(k=>{var A;if(s)return;const J=n.retry??(eo?0:3),z=n.retryDelay??nb,q=typeof z=="function"?z(t,k):z,ee=J===!0||typeof J=="number"&&t<J||typeof J=="function"&&J(t,k);if(e||!ee){w(k);return}t++,(A=n.onFail)==null||A.call(n,t,k),J1(q).then(()=>m()?void 0:_()).then(()=>{e?w(k):x()})})};return{promise:u,cancel:d,continue:()=>(a==null||a(),u),cancelRetry:f,continueRetry:p,canStart:g,start:()=>(g()?x():_().then(x),u)}}var rb=n=>setTimeout(n,0);function ib(){let n=[],e=0,t=f=>{f()},s=f=>{f()},a=rb;const u=f=>{e?n.push(f):a(()=>{t(f)})},d=()=>{const f=n;n=[],f.length&&a(()=>{s(()=>{f.forEach(p=>{t(p)})})})};return{batch:f=>{let p;e++;try{p=f()}finally{e--,e||d()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{t=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{a=f}}}var Ht=ib(),Qs,jv,a0=(jv=class{constructor(){ye(this,Qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_h(this.gcTime)&&Z(this,Qs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(eo?1/0:5*60*1e3))}clearGcTimeout(){b(this,Qs)&&(clearTimeout(b(this,Qs)),Z(this,Qs,void 0))}},Qs=new WeakMap,jv),sa,oa,Xn,Ks,sn,Ul,qs,Sr,ui,zv,sb=(zv=class extends a0{constructor(e){super();ye(this,Sr);ye(this,sa);ye(this,oa);ye(this,Xn);ye(this,Ks);ye(this,sn);ye(this,Ul);ye(this,qs);Z(this,qs,!1),Z(this,Ul,e.defaultOptions),this.setOptions(e.options),this.observers=[],Z(this,Ks,e.client),Z(this,Xn,b(this,Ks).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Z(this,sa,ob(this.options)),this.state=e.state??b(this,sa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=b(this,sn))==null?void 0:e.promise}setOptions(e){this.options={...b(this,Ul),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&b(this,Xn).remove(this)}setData(e,t){const s=Ih(this.state.data,e,this.options);return Ue(this,Sr,ui).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){Ue(this,Sr,ui).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,a;const t=(s=b(this,sn))==null?void 0:s.promise;return(a=b(this,sn))==null||a.cancel(e),t?t.then(pn).catch(pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,sa))}isActive(){return this.observers.some(e=>Ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ep||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ps(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!e0(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,sn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,sn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),b(this,Xn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(b(this,sn)&&(b(this,qs)?b(this,sn).cancel({revert:!0}):b(this,sn).cancelRetry()),this.scheduleGc()),b(this,Xn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Sr,ui).call(this,{type:"invalidate"})}fetch(e,t){var m,g,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(b(this,sn))return b(this,sn).continueRetry(),b(this,sn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const w=this.observers.find(_=>_.options.queryFn);w&&this.setOptions(w.options)}const s=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(Z(this,qs,!0),s.signal)})},u=()=>{const w=n0(this.options,t),x=(()=>{const L={client:b(this,Ks),queryKey:this.queryKey,meta:this.meta};return a(L),L})();return Z(this,qs,!1),this.options.persister?this.options.persister(w,x,this):w(x)},f=(()=>{const w={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:b(this,Ks),state:this.state,fetchFn:u};return a(w),w})();(m=this.options.behavior)==null||m.onFetch(f,this),Z(this,oa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&Ue(this,Sr,ui).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const p=w=>{var _,x,L,N;mc(w)&&w.silent||Ue(this,Sr,ui).call(this,{type:"error",error:w}),mc(w)||((x=(_=b(this,Xn).config).onError)==null||x.call(_,w,this),(N=(L=b(this,Xn).config).onSettled)==null||N.call(L,this.state.data,w,this)),this.scheduleGc()};return Z(this,sn,o0({initialPromise:t==null?void 0:t.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:w=>{var _,x,L,N;if(w===void 0){p(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(w)}catch(k){p(k);return}(x=(_=b(this,Xn).config).onSuccess)==null||x.call(_,w,this),(N=(L=b(this,Xn).config).onSettled)==null||N.call(L,w,this.state.error,this),this.scheduleGc()},onError:p,onFail:(w,_)=>{Ue(this,Sr,ui).call(this,{type:"failed",failureCount:w,error:_})},onPause:()=>{Ue(this,Sr,ui).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Sr,ui).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),b(this,sn).start()}},sa=new WeakMap,oa=new WeakMap,Xn=new WeakMap,Ks=new WeakMap,sn=new WeakMap,Ul=new WeakMap,qs=new WeakMap,Sr=new WeakSet,ui=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...l0(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return mc(a)&&a.revert&&b(this,oa)?{...b(this,oa),fetchStatus:"idle"}:{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),b(this,Xn).notify({query:this,type:"updated",action:e})})},zv);function l0(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:i0(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function ob(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,s=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var jr,$v,u0=($v=class extends _a{constructor(e={}){super();ye(this,jr);this.config=e,Z(this,jr,new Map)}build(e,t,s){const a=t.queryKey,u=t.queryHash??Zh(a,t);let d=this.get(u);return d||(d=new sb({client:e,queryKey:a,queryHash:u,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(d)),d}add(e){b(this,jr).has(e.queryHash)||(b(this,jr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=b(this,jr).get(e.queryHash);t&&(e.destroy(),t===e&&b(this,jr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ht.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return b(this,jr).get(e)}getAll(){return[...b(this,jr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>yg(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>yg(e,s)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jr=new WeakMap,$v),zr,fn,Ys,$r,Ji,Vv,ab=(Vv=class extends a0{constructor(e){super();ye(this,$r);ye(this,zr);ye(this,fn);ye(this,Ys);this.mutationId=e.mutationId,Z(this,fn,e.mutationCache),Z(this,zr,[]),this.state=e.state||c0(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){b(this,zr).includes(e)||(b(this,zr).push(e),this.clearGcTimeout(),b(this,fn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Z(this,zr,b(this,zr).filter(t=>t!==e)),this.scheduleGc(),b(this,fn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){b(this,zr).length||(this.state.status==="pending"?this.scheduleGc():b(this,fn).remove(this))}continue(){var e;return((e=b(this,Ys))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,m,g,v,w,_,x,L,N,k,J,z,q,ee,A,Re,pe;const t=()=>{Ue(this,$r,Ji).call(this,{type:"continue"})};Z(this,Ys,o0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(ne,Ce)=>{Ue(this,$r,Ji).call(this,{type:"failed",failureCount:ne,error:Ce})},onPause:()=>{Ue(this,$r,Ji).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>b(this,fn).canRun(this)}));const s=this.state.status==="pending",a=!b(this,Ys).canStart();try{if(s)t();else{Ue(this,$r,Ji).call(this,{type:"pending",variables:e,isPaused:a}),await((d=(u=b(this,fn).config).onMutate)==null?void 0:d.call(u,e,this));const Ce=await((p=(f=this.options).onMutate)==null?void 0:p.call(f,e));Ce!==this.state.context&&Ue(this,$r,Ji).call(this,{type:"pending",context:Ce,variables:e,isPaused:a})}const ne=await b(this,Ys).start();return await((g=(m=b(this,fn).config).onSuccess)==null?void 0:g.call(m,ne,e,this.state.context,this)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,ne,e,this.state.context)),await((x=(_=b(this,fn).config).onSettled)==null?void 0:x.call(_,ne,null,this.state.variables,this.state.context,this)),await((N=(L=this.options).onSettled)==null?void 0:N.call(L,ne,null,e,this.state.context)),Ue(this,$r,Ji).call(this,{type:"success",data:ne}),ne}catch(ne){try{throw await((J=(k=b(this,fn).config).onError)==null?void 0:J.call(k,ne,e,this.state.context,this)),await((q=(z=this.options).onError)==null?void 0:q.call(z,ne,e,this.state.context)),await((A=(ee=b(this,fn).config).onSettled)==null?void 0:A.call(ee,void 0,ne,this.state.variables,this.state.context,this)),await((pe=(Re=this.options).onSettled)==null?void 0:pe.call(Re,void 0,ne,e,this.state.context)),ne}finally{Ue(this,$r,Ji).call(this,{type:"error",error:ne})}}finally{b(this,fn).runNext(this)}}},zr=new WeakMap,fn=new WeakMap,Ys=new WeakMap,$r=new WeakSet,Ji=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ht.batch(()=>{b(this,zr).forEach(s=>{s.onMutationUpdate(e)}),b(this,fn).notify({mutation:this,type:"updated",action:e})})},Vv);function c0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pi,_r,jl,Hv,lb=(Hv=class extends _a{constructor(e={}){super();ye(this,pi);ye(this,_r);ye(this,jl);this.config=e,Z(this,pi,new Set),Z(this,_r,new Map),Z(this,jl,0)}build(e,t,s){const a=new ab({mutationCache:this,mutationId:++oc(this,jl)._,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){b(this,pi).add(e);const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t);s?s.push(e):b(this,_r).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(b(this,pi).delete(e)){const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&b(this,_r).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t),a=s==null?void 0:s.find(u=>u.state.status==="pending");return!a||a===e}else return!0}runNext(e){var s;const t=lc(e);if(typeof t=="string"){const a=(s=b(this,_r).get(t))==null?void 0:s.find(u=>u!==e&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{b(this,pi).forEach(e=>{this.notify({type:"removed",mutation:e})}),b(this,pi).clear(),b(this,_r).clear()})}getAll(){return Array.from(b(this,pi))}find(e){const t={exact:!0,...e};return this.getAll().find(s=>gg(t,s))}findAll(e={}){return this.getAll().filter(t=>gg(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(pn))))}},pi=new WeakMap,_r=new WeakMap,jl=new WeakMap,Hv);function lc(n){var e;return(e=n.options.scope)==null?void 0:e.id}function Sg(n){return{onFetch:(e,t)=>{var g,v,w,_,x;const s=e.options,a=(w=(v=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,u=((_=e.state.data)==null?void 0:_.pages)||[],d=((x=e.state.data)==null?void 0:x.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let L=!1;const N=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(e.signal.aborted?L=!0:e.signal.addEventListener("abort",()=>{L=!0}),e.signal)})},k=n0(e.options,e.fetchOptions),J=async(z,q,ee)=>{if(L)return Promise.reject();if(q==null&&z.pages.length)return Promise.resolve(z);const Re=(()=>{const pt={client:e.client,queryKey:e.queryKey,pageParam:q,direction:ee?"backward":"forward",meta:e.options.meta};return N(pt),pt})(),pe=await k(Re),{maxPages:ne}=e.options,Ce=ee?Z1:X1;return{pages:Ce(z.pages,pe,ne),pageParams:Ce(z.pageParams,q,ne)}};if(a&&u.length){const z=a==="backward",q=z?ub:_g,ee={pages:u,pageParams:d},A=q(s,ee);f=await J(ee,A,z)}else{const z=n??u.length;do{const q=p===0?d[0]??s.initialPageParam:_g(s,f);if(p>0&&q==null)break;f=await J(f,q),p++}while(p<z)}return f};e.options.persister?e.fetchFn=()=>{var L,N;return(N=(L=e.options).persister)==null?void 0:N.call(L,m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=m}}}function _g(n,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?n.getNextPageParam(e[s],e,t[s],t):void 0}function ub(n,{pages:e,pageParams:t}){var s;return e.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,e[0],e,t[0],t):void 0}var kt,ss,os,aa,la,as,ua,ca,Wv,cb=(Wv=class{constructor(n={}){ye(this,kt);ye(this,ss);ye(this,os);ye(this,aa);ye(this,la);ye(this,as);ye(this,ua);ye(this,ca);Z(this,kt,n.queryCache||new u0),Z(this,ss,n.mutationCache||new lb),Z(this,os,n.defaultOptions||{}),Z(this,aa,new Map),Z(this,la,new Map),Z(this,as,0)}mount(){oc(this,as)._++,b(this,as)===1&&(Z(this,ua,tp.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onFocus())})),Z(this,ca,Fc.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onOnline())})))}unmount(){var n,e;oc(this,as)._--,b(this,as)===0&&((n=b(this,ua))==null||n.call(this),Z(this,ua,void 0),(e=b(this,ca))==null||e.call(this),Z(this,ca,void 0))}isFetching(n){return b(this,kt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return b(this,ss).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=b(this,kt).build(this,e),s=t.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(ps(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(n){return b(this,kt).findAll(n).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(n,e,t){const s=this.defaultQueryOptions({queryKey:n}),a=b(this,kt).get(s.queryHash),u=a==null?void 0:a.state.data,d=G1(e,u);if(d!==void 0)return b(this,kt).build(this,s).setData(d,{...t,manual:!0})}setQueriesData(n,e,t){return Ht.batch(()=>b(this,kt).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=b(this,kt);Ht.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=b(this,kt);return Ht.batch(()=>(t.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},s=Ht.batch(()=>b(this,kt).findAll(n).map(a=>a.cancel(t)));return Promise.all(s).then(pn).catch(pn)}invalidateQueries(n,e={}){return Ht.batch(()=>(b(this,kt).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},s=Ht.batch(()=>b(this,kt).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,t);return t.throwOnError||(u=u.catch(pn)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(pn)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=b(this,kt).build(this,e);return t.isStaleByTime(ps(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(pn).catch(pn)}fetchInfiniteQuery(n){return n.behavior=Sg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(pn).catch(pn)}ensureInfiniteQueryData(n){return n.behavior=Sg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Fc.isOnline()?b(this,ss).resumePausedMutations():Promise.resolve()}getQueryCache(){return b(this,kt)}getMutationCache(){return b(this,ss)}getDefaultOptions(){return b(this,os)}setDefaultOptions(n){Z(this,os,n)}setQueryDefaults(n,e){b(this,aa).set(to(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...b(this,aa).values()],t={};return e.forEach(s=>{Ml(n,s.queryKey)&&Object.assign(t,s.defaultOptions)}),t}setMutationDefaults(n,e){b(this,la).set(to(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...b(this,la).values()],t={};return e.forEach(s=>{Ml(n,s.mutationKey)&&Object.assign(t,s.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...b(this,os).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=Zh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ep&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...b(this,os).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){b(this,kt).clear(),b(this,ss).clear()}},kt=new WeakMap,ss=new WeakMap,os=new WeakMap,aa=new WeakMap,la=new WeakMap,as=new WeakMap,ua=new WeakMap,ca=new WeakMap,Wv),Mn,qe,zl,hn,Gs,da,ls,us,$l,fa,ha,Js,Xs,cs,pa,it,vl,xh,Dh,Ch,Oh,Rh,Fh,Mh,d0,Qv,db=(Qv=class extends _a{constructor(e,t){super();ye(this,it);ye(this,Mn);ye(this,qe);ye(this,zl);ye(this,hn);ye(this,Gs);ye(this,da);ye(this,ls);ye(this,us);ye(this,$l);ye(this,fa);ye(this,ha);ye(this,Js);ye(this,Xs);ye(this,cs);ye(this,pa,new Set);this.options=t,Z(this,Mn,e),Z(this,us,null),Z(this,ls,Eh()),this.options.experimental_prefetchInRender||b(this,ls).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,qe).addObserver(this),bg(b(this,qe),this.options)?Ue(this,it,vl).call(this):this.updateResult(),Ue(this,it,Oh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lh(b(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lh(b(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,it,Rh).call(this),Ue(this,it,Fh).call(this),b(this,qe).removeObserver(this)}setOptions(e){const t=this.options,s=b(this,qe);if(this.options=b(this,Mn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,b(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,it,Mh).call(this),b(this,qe).setOptions(this.options),t._defaulted&&!Rc(this.options,t)&&b(this,Mn).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,qe),observer:this});const a=this.hasListeners();a&&Ig(b(this,qe),s,this.options,t)&&Ue(this,it,vl).call(this),this.updateResult(),a&&(b(this,qe)!==s||Ir(this.options.enabled,b(this,qe))!==Ir(t.enabled,b(this,qe))||ps(this.options.staleTime,b(this,qe))!==ps(t.staleTime,b(this,qe)))&&Ue(this,it,xh).call(this);const u=Ue(this,it,Dh).call(this);a&&(b(this,qe)!==s||Ir(this.options.enabled,b(this,qe))!==Ir(t.enabled,b(this,qe))||u!==b(this,cs))&&Ue(this,it,Ch).call(this,u)}getOptimisticResult(e){const t=b(this,Mn).getQueryCache().build(b(this,Mn),e),s=this.createResult(t,e);return hb(this,s)&&(Z(this,hn,s),Z(this,da,this.options),Z(this,Gs,b(this,qe).state)),s}getCurrentResult(){return b(this,hn)}trackResult(e,t){return new Proxy(e,{get:(s,a)=>(this.trackProp(a),t==null||t(a),Reflect.get(s,a))})}trackProp(e){b(this,pa).add(e)}getCurrentQuery(){return b(this,qe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=b(this,Mn).defaultQueryOptions(e),s=b(this,Mn).getQueryCache().build(b(this,Mn),t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return Ue(this,it,vl).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,hn)))}createResult(e,t){var ne;const s=b(this,qe),a=this.options,u=b(this,hn),d=b(this,Gs),f=b(this,da),m=e!==s?e.state:b(this,zl),{state:g}=e;let v={...g},w=!1,_;if(t._optimisticResults){const Ce=this.hasListeners(),pt=!Ce&&bg(e,t),_t=Ce&&Ig(e,s,t,a);(pt||_t)&&(v={...v,...l0(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:x,errorUpdatedAt:L,status:N}=v;_=v.data;let k=!1;if(t.placeholderData!==void 0&&_===void 0&&N==="pending"){let Ce;u!=null&&u.isPlaceholderData&&t.placeholderData===(f==null?void 0:f.placeholderData)?(Ce=u.data,k=!0):Ce=typeof t.placeholderData=="function"?t.placeholderData((ne=b(this,ha))==null?void 0:ne.state.data,b(this,ha)):t.placeholderData,Ce!==void 0&&(N="success",_=Ih(u==null?void 0:u.data,Ce,t),w=!0)}if(t.select&&_!==void 0&&!k)if(u&&_===(d==null?void 0:d.data)&&t.select===b(this,$l))_=b(this,fa);else try{Z(this,$l,t.select),_=t.select(_),_=Ih(u==null?void 0:u.data,_,t),Z(this,fa,_),Z(this,us,null)}catch(Ce){Z(this,us,Ce)}b(this,us)&&(x=b(this,us),_=b(this,fa),L=Date.now(),N="error");const J=v.fetchStatus==="fetching",z=N==="pending",q=N==="error",ee=z&&J,A=_!==void 0,pe={status:N,fetchStatus:v.fetchStatus,isPending:z,isSuccess:N==="success",isError:q,isInitialLoading:ee,isLoading:ee,data:_,dataUpdatedAt:v.dataUpdatedAt,error:x,errorUpdatedAt:L,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:J,isRefetching:J&&!z,isLoadingError:q&&!A,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:q&&A,isStale:np(e,t),refetch:this.refetch,promise:b(this,ls)};if(this.options.experimental_prefetchInRender){const Ce=yt=>{pe.status==="error"?yt.reject(pe.error):pe.data!==void 0&&yt.resolve(pe.data)},pt=()=>{const yt=Z(this,ls,pe.promise=Eh());Ce(yt)},_t=b(this,ls);switch(_t.status){case"pending":e.queryHash===s.queryHash&&Ce(_t);break;case"fulfilled":(pe.status==="error"||pe.data!==_t.value)&&pt();break;case"rejected":(pe.status!=="error"||pe.error!==_t.reason)&&pt();break}}return pe}updateResult(){const e=b(this,hn),t=this.createResult(b(this,qe),this.options);if(Z(this,Gs,b(this,qe).state),Z(this,da,this.options),b(this,Gs).data!==void 0&&Z(this,ha,b(this,qe)),Rc(t,e))return;Z(this,hn,t);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!b(this,pa).size)return!0;const d=new Set(u??b(this,pa));return this.options.throwOnError&&d.add("error"),Object.keys(b(this,hn)).some(f=>{const p=f;return b(this,hn)[p]!==e[p]&&d.has(p)})};Ue(this,it,d0).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,it,Oh).call(this)}},Mn=new WeakMap,qe=new WeakMap,zl=new WeakMap,hn=new WeakMap,Gs=new WeakMap,da=new WeakMap,ls=new WeakMap,us=new WeakMap,$l=new WeakMap,fa=new WeakMap,ha=new WeakMap,Js=new WeakMap,Xs=new WeakMap,cs=new WeakMap,pa=new WeakMap,it=new WeakSet,vl=function(e){Ue(this,it,Mh).call(this);let t=b(this,qe).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(pn)),t},xh=function(){Ue(this,it,Rh).call(this);const e=ps(this.options.staleTime,b(this,qe));if(eo||b(this,hn).isStale||!_h(e))return;const s=e0(b(this,hn).dataUpdatedAt,e)+1;Z(this,Js,setTimeout(()=>{b(this,hn).isStale||this.updateResult()},s))},Dh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,qe)):this.options.refetchInterval)??!1},Ch=function(e){Ue(this,it,Fh).call(this),Z(this,cs,e),!(eo||Ir(this.options.enabled,b(this,qe))===!1||!_h(b(this,cs))||b(this,cs)===0)&&Z(this,Xs,setInterval(()=>{(this.options.refetchIntervalInBackground||tp.isFocused())&&Ue(this,it,vl).call(this)},b(this,cs)))},Oh=function(){Ue(this,it,xh).call(this),Ue(this,it,Ch).call(this,Ue(this,it,Dh).call(this))},Rh=function(){b(this,Js)&&(clearTimeout(b(this,Js)),Z(this,Js,void 0))},Fh=function(){b(this,Xs)&&(clearInterval(b(this,Xs)),Z(this,Xs,void 0))},Mh=function(){const e=b(this,Mn).getQueryCache().build(b(this,Mn),this.options);if(e===b(this,qe))return;const t=b(this,qe);Z(this,qe,e),Z(this,zl,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},d0=function(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(b(this,hn))}),b(this,Mn).getQueryCache().notify({query:b(this,qe),type:"observerResultsUpdated"})})},Qv);function fb(n,e){return Ir(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function bg(n,e){return fb(n,e)||n.state.data!==void 0&&Lh(n,e,e.refetchOnMount)}function Lh(n,e,t){if(Ir(e.enabled,n)!==!1&&ps(e.staleTime,n)!=="static"){const s=typeof t=="function"?t(n):t;return s==="always"||s!==!1&&np(n,e)}return!1}function Ig(n,e,t,s){return(n!==e||Ir(s.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&np(n,t)}function np(n,e){return Ir(e.enabled,n)!==!1&&n.isStaleByTime(ps(e.staleTime,n))}function hb(n,e){return!Rc(n.getCurrentResult(),e)}var ds,fs,Ln,mi,_i,yc,Ah,Kv,pb=(Kv=class extends _a{constructor(t,s){super();ye(this,_i);ye(this,ds);ye(this,fs);ye(this,Ln);ye(this,mi);Z(this,ds,t),this.setOptions(s),this.bindMethods(),Ue(this,_i,yc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var a;const s=this.options;this.options=b(this,ds).defaultMutationOptions(t),Rc(this.options,s)||b(this,ds).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,Ln),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&to(s.mutationKey)!==to(this.options.mutationKey)?this.reset():((a=b(this,Ln))==null?void 0:a.state.status)==="pending"&&b(this,Ln).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=b(this,Ln))==null||t.removeObserver(this)}onMutationUpdate(t){Ue(this,_i,yc).call(this),Ue(this,_i,Ah).call(this,t)}getCurrentResult(){return b(this,fs)}reset(){var t;(t=b(this,Ln))==null||t.removeObserver(this),Z(this,Ln,void 0),Ue(this,_i,yc).call(this),Ue(this,_i,Ah).call(this)}mutate(t,s){var a;return Z(this,mi,s),(a=b(this,Ln))==null||a.removeObserver(this),Z(this,Ln,b(this,ds).getMutationCache().build(b(this,ds),this.options)),b(this,Ln).addObserver(this),b(this,Ln).execute(t)}},ds=new WeakMap,fs=new WeakMap,Ln=new WeakMap,mi=new WeakMap,_i=new WeakSet,yc=function(){var s;const t=((s=b(this,Ln))==null?void 0:s.state)??c0();Z(this,fs,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ah=function(t){Ht.batch(()=>{var s,a,u,d,f,p,m,g;if(b(this,mi)&&this.hasListeners()){const v=b(this,fs).variables,w=b(this,fs).context;(t==null?void 0:t.type)==="success"?((a=(s=b(this,mi)).onSuccess)==null||a.call(s,t.data,v,w),(d=(u=b(this,mi)).onSettled)==null||d.call(u,t.data,null,v,w)):(t==null?void 0:t.type)==="error"&&((p=(f=b(this,mi)).onError)==null||p.call(f,t.error,v,w),(g=(m=b(this,mi)).onSettled)==null||g.call(m,void 0,t.error,v,w))}this.listeners.forEach(v=>{v(b(this,fs))})})},Kv),f0=R.createContext(void 0),rp=n=>{const e=R.useContext(f0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},mb=({client:n,children:e})=>(R.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),U.jsx(f0.Provider,{value:n,children:e})),h0=R.createContext(!1),yb=()=>R.useContext(h0);h0.Provider;function gb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var vb=R.createContext(gb()),wb=()=>R.useContext(vb),Sb=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},_b=n=>{R.useEffect(()=>{n.clearReset()},[n])},bb=({result:n,errorResetBoundary:e,throwOnError:t,query:s,suspense:a})=>n.isError&&!e.isReset()&&!n.isFetching&&s&&(a&&n.data===void 0||r0(t,[n.error,s])),Ib=n=>{if(n.suspense){const e=s=>s==="static"?s:Math.max(s??1e3,1e3),t=n.staleTime;n.staleTime=typeof t=="function"?(...s)=>e(t(...s)):e(t),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Eb=(n,e)=>n.isLoading&&n.isFetching&&!e,xb=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,Eg=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function Db(n,e,t){var v,w,_,x,L;const s=yb(),a=wb(),u=rp(),d=u.defaultQueryOptions(n);(w=(v=u.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||w.call(v,d),d._optimisticResults=s?"isRestoring":"optimistic",Ib(d),Sb(d,a),_b(a);const f=!u.getQueryCache().get(d.queryHash),[p]=R.useState(()=>new e(u,d)),m=p.getOptimisticResult(d),g=!s&&n.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(N=>{const k=g?p.subscribe(Ht.batchCalls(N)):pn;return p.updateResult(),k},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),R.useEffect(()=>{p.setOptions(d)},[d,p]),xb(d,m))throw Eg(d,p,a);if(bb({result:m,errorResetBoundary:a,throwOnError:d.throwOnError,query:u.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw m.error;if((x=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||x.call(_,d,m),d.experimental_prefetchInRender&&!eo&&Eb(m,s)){const N=f?Eg(d,p,a):(L=u.getQueryCache().get(d.queryHash))==null?void 0:L.promise;N==null||N.catch(pn).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?m:p.trackResult(m)}function Cb(n,e){return Db(n,db)}function Ob(n,e){const t=rp(),[s]=R.useState(()=>new pb(t,n));R.useEffect(()=>{s.setOptions(n)},[s,n]);const a=R.useSyncExternalStore(R.useCallback(d=>s.subscribe(Ht.batchCalls(d)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=R.useCallback((d,f)=>{s.mutate(d,f).catch(pn)},[s]);if(a.error&&r0(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}const Rb=function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),Fb=function(n){return"/"+n},xg={},vn=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let d=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=d(t.map(m=>{if(m=Fb(m),m in xg)return;xg[m]=!0;const g=m.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const w=document.createElement("link");if(w.rel=g?"stylesheet":Rb,g||(w.as="script"),w.crossOrigin="",w.href=m,p&&w.setAttribute("nonce",p),document.head.appendChild(w),g)return new Promise((_,x)=>{w.addEventListener("load",_),w.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return e().catch(u)})};var fl={},Dg;function Mb(){if(Dg)return fl;Dg=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.parse=d,fl.serialize=m;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,e=/^[\u0021-\u003A\u003C-\u007E]*$/,t=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,u=(()=>{const w=function(){};return w.prototype=Object.create(null),w})();function d(w,_){const x=new u,L=w.length;if(L<2)return x;const N=(_==null?void 0:_.decode)||g;let k=0;do{const J=w.indexOf("=",k);if(J===-1)break;const z=w.indexOf(";",k),q=z===-1?L:z;if(J>q){k=w.lastIndexOf(";",J-1)+1;continue}const ee=f(w,k,J),A=p(w,J,ee),Re=w.slice(ee,A);if(x[Re]===void 0){let pe=f(w,J+1,q),ne=p(w,q,pe);const Ce=N(w.slice(pe,ne));x[Re]=Ce}k=q+1}while(k<L);return x}function f(w,_,x){do{const L=w.charCodeAt(_);if(L!==32&&L!==9)return _}while(++_<x);return x}function p(w,_,x){for(;_>x;){const L=w.charCodeAt(--_);if(L!==32&&L!==9)return _+1}return x}function m(w,_,x){const L=(x==null?void 0:x.encode)||encodeURIComponent;if(!n.test(w))throw new TypeError(`argument name is invalid: ${w}`);const N=L(_);if(!e.test(N))throw new TypeError(`argument val is invalid: ${_}`);let k=w+"="+N;if(!x)return k;if(x.maxAge!==void 0){if(!Number.isInteger(x.maxAge))throw new TypeError(`option maxAge is invalid: ${x.maxAge}`);k+="; Max-Age="+x.maxAge}if(x.domain){if(!t.test(x.domain))throw new TypeError(`option domain is invalid: ${x.domain}`);k+="; Domain="+x.domain}if(x.path){if(!s.test(x.path))throw new TypeError(`option path is invalid: ${x.path}`);k+="; Path="+x.path}if(x.expires){if(!v(x.expires)||!Number.isFinite(x.expires.valueOf()))throw new TypeError(`option expires is invalid: ${x.expires}`);k+="; Expires="+x.expires.toUTCString()}if(x.httpOnly&&(k+="; HttpOnly"),x.secure&&(k+="; Secure"),x.partitioned&&(k+="; Partitioned"),x.priority)switch(typeof x.priority=="string"?x.priority.toLowerCase():void 0){case"low":k+="; Priority=Low";break;case"medium":k+="; Priority=Medium";break;case"high":k+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${x.priority}`)}if(x.sameSite)switch(typeof x.sameSite=="string"?x.sameSite.toLowerCase():x.sameSite){case!0:case"strict":k+="; SameSite=Strict";break;case"lax":k+="; SameSite=Lax";break;case"none":k+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${x.sameSite}`)}return k}function g(w){if(w.indexOf("%")===-1)return w;try{return decodeURIComponent(w)}catch{return w}}function v(w){return a.call(w)==="[object Date]"}return fl}Mb();/**
|
|
43
|
+
`+h.stack}return{value:r,source:i,stack:c,digest:null}}function xf(r,i,o){return{value:r,source:null,stack:o??null,digest:i??null}}function Df(r,i){try{console.error(i.value)}catch(o){setTimeout(function(){throw o})}}var o1=typeof WeakMap=="function"?WeakMap:Map;function my(r,i,o){o=si(-1,o),o.tag=3,o.payload={element:null};var l=i.value;return o.callback=function(){Qu||(Qu=!0,zf=l),Df(r,i)},o}function yy(r,i,o){o=si(-1,o),o.tag=3;var l=r.type.getDerivedStateFromError;if(typeof l=="function"){var c=i.value;o.payload=function(){return l(c)},o.callback=function(){Df(r,i)}}var h=r.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(o.callback=function(){Df(r,i),typeof l!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var y=i.stack;this.componentDidCatch(i.value,{componentStack:y!==null?y:""})}),o}function gy(r,i,o){var l=r.pingCache;if(l===null){l=r.pingCache=new o1;var c=new Set;l.set(i,c)}else c=l.get(i),c===void 0&&(c=new Set,l.set(i,c));c.has(o)||(c.add(o),r=S1.bind(null,r,i,o),i.then(r,r))}function vy(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function wy(r,i,o,l,c){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(i=si(-1,1),i.tag=2,$i(o,i,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=c,r)}var a1=q.ReactCurrentOwner,Dn=!1;function cn(r,i,o,l){i.child=r===null?Um(i,null,o,l):Do(i,r.child,o,l)}function Sy(r,i,o,l,c){o=o.render;var h=i.ref;return Oo(i,c),l=gf(r,i,o,l,h,c),o=vf(),r!==null&&!Dn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~c,oi(r,i,c)):(Dt&&o&&Zd(i),i.flags|=1,cn(r,i,l,c),i.child)}function _y(r,i,o,l,c){if(r===null){var h=o.type;return typeof h=="function"&&!qf(h)&&h.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(i.tag=15,i.type=h,by(r,i,h,l,c)):(r=Xu(o.type,null,l,i,i.mode,c),r.ref=i.ref,r.return=i,i.child=r)}if(h=r.child,(r.lanes&c)===0){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:Ha,o(y,l)&&r.ref===i.ref)return oi(r,i,c)}return i.flags|=1,r=qi(h,l),r.ref=i.ref,r.return=i,i.child=r}function by(r,i,o,l,c){if(r!==null){var h=r.memoizedProps;if(Ha(h,l)&&r.ref===i.ref)if(Dn=!1,i.pendingProps=l=h,(r.lanes&c)!==0)(r.flags&131072)!==0&&(Dn=!0);else return i.lanes=r.lanes,oi(r,i,c)}return Cf(r,i,o,l,c)}function Iy(r,i,o){var l=i.pendingProps,c=l.children,h=r!==null?r.memoizedState:null;if(l.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(Lo,zn),zn|=o;else{if((o&1073741824)===0)return r=h!==null?h.baseLanes|o:o,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,vt(Lo,zn),zn|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=h!==null?h.baseLanes:o,vt(Lo,zn),zn|=l}else h!==null?(l=h.baseLanes|o,i.memoizedState=null):l=o,vt(Lo,zn),zn|=l;return cn(r,i,c,o),i.child}function Ey(r,i){var o=i.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(i.flags|=512,i.flags|=2097152)}function Cf(r,i,o,l,c){var h=xn(o)?Rs:en.current;return h=bo(i,h),Oo(i,c),o=gf(r,i,o,l,h,c),l=vf(),r!==null&&!Dn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~c,oi(r,i,c)):(Dt&&l&&Zd(i),i.flags|=1,cn(r,i,o,c),i.child)}function xy(r,i,o,l,c){if(xn(o)){var h=!0;Iu(i)}else h=!1;if(Oo(i,c),i.stateNode===null)zu(r,i),hy(i,o,l),Ef(i,o,l,c),l=!0;else if(r===null){var y=i.stateNode,S=i.memoizedProps;y.props=S;var E=y.context,T=o.contextType;typeof T=="object"&&T!==null?T=Kn(T):(T=xn(o)?Rs:en.current,T=bo(i,T));var V=o.getDerivedStateFromProps,W=typeof V=="function"||typeof y.getSnapshotBeforeUpdate=="function";W||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==l||E!==T)&&py(i,y,l,T),zi=!1;var $=i.memoizedState;y.state=$,Lu(i,l,y,c),E=i.memoizedState,S!==l||$!==E||En.current||zi?(typeof V=="function"&&(If(i,o,V,l),E=i.memoizedState),(S=zi||fy(i,o,S,l,$,E,T))?(W||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=E),y.props=l,y.state=E,y.context=T,l=S):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{y=i.stateNode,zm(r,i),S=i.memoizedProps,T=i.type===i.elementType?S:mr(i.type,S),y.props=T,W=i.pendingProps,$=y.context,E=o.contextType,typeof E=="object"&&E!==null?E=Kn(E):(E=xn(o)?Rs:en.current,E=bo(i,E));var X=o.getDerivedStateFromProps;(V=typeof X=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==W||$!==E)&&py(i,y,l,E),zi=!1,$=i.memoizedState,y.state=$,Lu(i,l,y,c);var se=i.memoizedState;S!==W||$!==se||En.current||zi?(typeof X=="function"&&(If(i,o,X,l),se=i.memoizedState),(T=zi||fy(i,o,T,l,$,se,E)||!1)?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(l,se,E),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(l,se,E)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=se),y.props=l,y.state=se,y.context=E,l=T):(typeof y.componentDidUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&$===r.memoizedState||(i.flags|=1024),l=!1)}return Of(r,i,o,l,h,c)}function Of(r,i,o,l,c,h){Ey(r,i);var y=(i.flags&128)!==0;if(!l&&!y)return c&&Fm(i,o,!1),oi(r,i,h);l=i.stateNode,a1.current=i;var S=y&&typeof o.getDerivedStateFromError!="function"?null:l.render();return i.flags|=1,r!==null&&y?(i.child=Do(i,r.child,null,h),i.child=Do(i,null,S,h)):cn(r,i,S,h),i.memoizedState=l.state,c&&Fm(i,o,!0),i.child}function Dy(r){var i=r.stateNode;i.pendingContext?Om(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Om(r,i.context,!1),df(r,i.containerInfo)}function Cy(r,i,o,l,c){return xo(),rf(c),i.flags|=256,cn(r,i,o,l),i.child}var Rf={dehydrated:null,treeContext:null,retryLane:0};function Ff(r){return{baseLanes:r,cachePool:null,transitions:null}}function Oy(r,i,o){var l=i.pendingProps,c=Ot.current,h=!1,y=(i.flags&128)!==0,S;if((S=y)||(S=r!==null&&r.memoizedState===null?!1:(c&2)!==0),S?(h=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(c|=1),vt(Ot,c&1),r===null)return nf(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(y=l.children,r=l.fallback,h?(l=i.mode,h=i.child,y={mode:"hidden",children:y},(l&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=y):h=Zu(y,l,0,null),r=Us(r,l,o,null),h.return=i,r.return=i,h.sibling=r,i.child=h,i.child.memoizedState=Ff(o),i.memoizedState=Rf,r):Mf(i,y));if(c=r.memoizedState,c!==null&&(S=c.dehydrated,S!==null))return l1(r,i,y,l,S,c,o);if(h){h=l.fallback,y=i.mode,c=r.child,S=c.sibling;var E={mode:"hidden",children:l.children};return(y&1)===0&&i.child!==c?(l=i.child,l.childLanes=0,l.pendingProps=E,i.deletions=null):(l=qi(c,E),l.subtreeFlags=c.subtreeFlags&14680064),S!==null?h=qi(S,h):(h=Us(h,y,o,null),h.flags|=2),h.return=i,l.return=i,l.sibling=h,i.child=l,l=h,h=i.child,y=r.child.memoizedState,y=y===null?Ff(o):{baseLanes:y.baseLanes|o,cachePool:null,transitions:y.transitions},h.memoizedState=y,h.childLanes=r.childLanes&~o,i.memoizedState=Rf,l}return h=r.child,r=h.sibling,l=qi(h,{mode:"visible",children:l.children}),(i.mode&1)===0&&(l.lanes=o),l.return=i,l.sibling=null,r!==null&&(o=i.deletions,o===null?(i.deletions=[r],i.flags|=16):o.push(r)),i.child=l,i.memoizedState=null,l}function Mf(r,i){return i=Zu({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function ju(r,i,o,l){return l!==null&&rf(l),Do(i,r.child,null,o),r=Mf(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function l1(r,i,o,l,c,h,y){if(o)return i.flags&256?(i.flags&=-257,l=xf(Error(t(422))),ju(r,i,y,l)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(h=l.fallback,c=i.mode,l=Zu({mode:"visible",children:l.children},c,0,null),h=Us(h,c,y,null),h.flags|=2,l.return=i,h.return=i,l.sibling=h,i.child=l,(i.mode&1)!==0&&Do(i,r.child,null,y),i.child.memoizedState=Ff(y),i.memoizedState=Rf,h);if((i.mode&1)===0)return ju(r,i,y,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var S=l.dgst;return l=S,h=Error(t(419)),l=xf(h,l,void 0),ju(r,i,y,l)}if(S=(y&r.childLanes)!==0,Dn||S){if(l=Yt,l!==null){switch(y&-y){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|y))!==0?0:c,c!==0&&c!==h.retryLane&&(h.retryLane=c,ii(r,c),vr(l,r,c,-1))}return Kf(),l=xf(Error(t(421))),ju(r,i,y,l)}return c.data==="$?"?(i.flags|=128,i.child=r.child,i=_1.bind(null,r),c._reactRetry=i,null):(r=h.treeContext,jn=Ni(c.nextSibling),Un=i,Dt=!0,pr=null,r!==null&&(Wn[Qn++]=ni,Wn[Qn++]=ri,Wn[Qn++]=Fs,ni=r.id,ri=r.overflow,Fs=i),i=Mf(i,l.children),i.flags|=4096,i)}function Ry(r,i,o){r.lanes|=i;var l=r.alternate;l!==null&&(l.lanes|=i),lf(r.return,i,o)}function Lf(r,i,o,l,c){var h=r.memoizedState;h===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:c}:(h.isBackwards=i,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=o,h.tailMode=c)}function Fy(r,i,o){var l=i.pendingProps,c=l.revealOrder,h=l.tail;if(cn(r,i,l.children,o),l=Ot.current,(l&2)!==0)l=l&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ry(r,o,i);else if(r.tag===19)Ry(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}l&=1}if(vt(Ot,l),(i.mode&1)===0)i.memoizedState=null;else switch(c){case"forwards":for(o=i.child,c=null;o!==null;)r=o.alternate,r!==null&&Au(r)===null&&(c=o),o=o.sibling;o=c,o===null?(c=i.child,i.child=null):(c=o.sibling,o.sibling=null),Lf(i,!1,c,o,h);break;case"backwards":for(o=null,c=i.child,i.child=null;c!==null;){if(r=c.alternate,r!==null&&Au(r)===null){i.child=c;break}r=c.sibling,c.sibling=o,o=c,c=r}Lf(i,!0,o,null,h);break;case"together":Lf(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function zu(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function oi(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),Ps|=i.lanes,(o&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(t(153));if(i.child!==null){for(r=i.child,o=qi(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=qi(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function u1(r,i,o){switch(i.tag){case 3:Dy(i),xo();break;case 5:Hm(i);break;case 1:xn(i.type)&&Iu(i);break;case 4:df(i,i.stateNode.containerInfo);break;case 10:var l=i.type._context,c=i.memoizedProps.value;vt(Ru,l._currentValue),l._currentValue=c;break;case 13:if(l=i.memoizedState,l!==null)return l.dehydrated!==null?(vt(Ot,Ot.current&1),i.flags|=128,null):(o&i.child.childLanes)!==0?Oy(r,i,o):(vt(Ot,Ot.current&1),r=oi(r,i,o),r!==null?r.sibling:null);vt(Ot,Ot.current&1);break;case 19:if(l=(o&i.childLanes)!==0,(r.flags&128)!==0){if(l)return Fy(r,i,o);i.flags|=128}if(c=i.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),vt(Ot,Ot.current),l)break;return null;case 22:case 23:return i.lanes=0,Iy(r,i,o)}return oi(r,i,o)}var My,Af,Ly,Ay;My=function(r,i){for(var o=i.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Af=function(){},Ly=function(r,i,o,l){var c=r.memoizedProps;if(c!==l){r=i.stateNode,As(Lr.current);var h=null;switch(o){case"input":c=lr(r,c),l=lr(r,l),h=[];break;case"select":c=Y({},c,{value:void 0}),l=Y({},l,{value:void 0}),h=[];break;case"textarea":c=ur(r,c),l=ur(r,l),h=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(r.onclick=Su)}co(o,l);var y;o=null;for(T in c)if(!l.hasOwnProperty(T)&&c.hasOwnProperty(T)&&c[T]!=null)if(T==="style"){var S=c[T];for(y in S)S.hasOwnProperty(y)&&(o||(o={}),o[y]="")}else T!=="dangerouslySetInnerHTML"&&T!=="children"&&T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(a.hasOwnProperty(T)?h||(h=[]):(h=h||[]).push(T,null));for(T in l){var E=l[T];if(S=c!=null?c[T]:void 0,l.hasOwnProperty(T)&&E!==S&&(E!=null||S!=null))if(T==="style")if(S){for(y in S)!S.hasOwnProperty(y)||E&&E.hasOwnProperty(y)||(o||(o={}),o[y]="");for(y in E)E.hasOwnProperty(y)&&S[y]!==E[y]&&(o||(o={}),o[y]=E[y])}else o||(h||(h=[]),h.push(T,o)),o=E;else T==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,S=S?S.__html:void 0,E!=null&&S!==E&&(h=h||[]).push(T,E)):T==="children"?typeof E!="string"&&typeof E!="number"||(h=h||[]).push(T,""+E):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&(a.hasOwnProperty(T)?(E!=null&&T==="onScroll"&&bt("scroll",r),h||S===E||(h=[])):(h=h||[]).push(T,E))}o&&(h=h||[]).push("style",o);var T=h;(i.updateQueue=T)&&(i.flags|=4)}},Ay=function(r,i,o,l){o!==l&&(i.flags|=4)};function sl(r,i){if(!Dt)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:l.sibling=null}}function nn(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,l=0;if(i)for(var c=r.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=r,c=c.sibling;else for(c=r.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=r,c=c.sibling;return r.subtreeFlags|=l,r.childLanes=o,i}function c1(r,i,o){var l=i.pendingProps;switch(ef(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(i),null;case 1:return xn(i.type)&&bu(),nn(i),null;case 3:return l=i.stateNode,Ro(),It(En),It(en),pf(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Cu(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,pr!==null&&(Hf(pr),pr=null))),Af(r,i),nn(i),null;case 5:ff(i);var c=As(el.current);if(o=i.type,r!==null&&i.stateNode!=null)Ly(r,i,o,l,c),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!l){if(i.stateNode===null)throw Error(t(166));return nn(i),null}if(r=As(Lr.current),Cu(i)){l=i.stateNode,o=i.type;var h=i.memoizedProps;switch(l[Mr]=i,l[Ya]=h,r=(i.mode&1)!==0,o){case"dialog":bt("cancel",l),bt("close",l);break;case"iframe":case"object":case"embed":bt("load",l);break;case"video":case"audio":for(c=0;c<Qa.length;c++)bt(Qa[c],l);break;case"source":bt("error",l);break;case"img":case"image":case"link":bt("error",l),bt("load",l);break;case"details":bt("toggle",l);break;case"input":Gl(l,h),bt("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!h.multiple},bt("invalid",l);break;case"textarea":Di(l,h),bt("invalid",l)}co(o,h),c=null;for(var y in h)if(h.hasOwnProperty(y)){var S=h[y];y==="children"?typeof S=="string"?l.textContent!==S&&(h.suppressHydrationWarning!==!0&&wu(l.textContent,S,r),c=["children",S]):typeof S=="number"&&l.textContent!==""+S&&(h.suppressHydrationWarning!==!0&&wu(l.textContent,S,r),c=["children",""+S]):a.hasOwnProperty(y)&&S!=null&&y==="onScroll"&&bt("scroll",l)}switch(o){case"input":ar(l),Xl(l,h,!0);break;case"textarea":ar(l),lo(l);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(l.onclick=Su)}l=c,i.updateQueue=l,l!==null&&(i.flags|=4)}else{y=c.nodeType===9?c:c.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=cr(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=y.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof l.is=="string"?r=y.createElement(o,{is:l.is}):(r=y.createElement(o),o==="select"&&(y=r,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):r=y.createElementNS(r,o),r[Mr]=i,r[Ya]=l,My(r,i,!1,!1),i.stateNode=r;e:{switch(y=Ci(o,l),o){case"dialog":bt("cancel",r),bt("close",r),c=l;break;case"iframe":case"object":case"embed":bt("load",r),c=l;break;case"video":case"audio":for(c=0;c<Qa.length;c++)bt(Qa[c],r);c=l;break;case"source":bt("error",r),c=l;break;case"img":case"image":case"link":bt("error",r),bt("load",r),c=l;break;case"details":bt("toggle",r),c=l;break;case"input":Gl(r,l),c=lr(r,l),bt("invalid",r);break;case"option":c=l;break;case"select":r._wrapperState={wasMultiple:!!l.multiple},c=Y({},l,{value:void 0}),bt("invalid",r);break;case"textarea":Di(r,l),c=ur(r,l),bt("invalid",r);break;default:c=l}co(o,c),S=c;for(h in S)if(S.hasOwnProperty(h)){var E=S[h];h==="style"?Oa(r,E):h==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&uo(r,E)):h==="children"?typeof E=="string"?(o!=="textarea"||E!=="")&&bs(r,E):typeof E=="number"&&bs(r,""+E):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(a.hasOwnProperty(h)?E!=null&&h==="onScroll"&&bt("scroll",r):E!=null&&z(r,h,E,y))}switch(o){case"input":ar(r),Xl(r,l,!1);break;case"textarea":ar(r),lo(r);break;case"option":l.value!=null&&r.setAttribute("value",""+tt(l.value));break;case"select":r.multiple=!!l.multiple,h=l.value,h!=null?xi(r,!!l.multiple,h,!1):l.defaultValue!=null&&xi(r,!!l.multiple,l.defaultValue,!0);break;default:typeof c.onClick=="function"&&(r.onclick=Su)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return nn(i),null;case 6:if(r&&i.stateNode!=null)Ay(r,i,r.memoizedProps,l);else{if(typeof l!="string"&&i.stateNode===null)throw Error(t(166));if(o=As(el.current),As(Lr.current),Cu(i)){if(l=i.stateNode,o=i.memoizedProps,l[Mr]=i,(h=l.nodeValue!==o)&&(r=Un,r!==null))switch(r.tag){case 3:wu(l.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&wu(l.nodeValue,o,(r.mode&1)!==0)}h&&(i.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Mr]=i,i.stateNode=l}return nn(i),null;case 13:if(It(Ot),l=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Dt&&jn!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Tm(),xo(),i.flags|=98560,h=!1;else if(h=Cu(i),l!==null&&l.dehydrated!==null){if(r===null){if(!h)throw Error(t(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(t(317));h[Mr]=i}else xo(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;nn(i),h=!1}else pr!==null&&(Hf(pr),pr=null),h=!0;if(!h)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=o,i):(l=l!==null,l!==(r!==null&&r.memoizedState!==null)&&l&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(Ot.current&1)!==0?Vt===0&&(Vt=3):Kf())),i.updateQueue!==null&&(i.flags|=4),nn(i),null);case 4:return Ro(),Af(r,i),r===null&&Ka(i.stateNode.containerInfo),nn(i),null;case 10:return af(i.type._context),nn(i),null;case 17:return xn(i.type)&&bu(),nn(i),null;case 19:if(It(Ot),h=i.memoizedState,h===null)return nn(i),null;if(l=(i.flags&128)!==0,y=h.rendering,y===null)if(l)sl(h,!1);else{if(Vt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(y=Au(r),y!==null){for(i.flags|=128,sl(h,!1),l=y.updateQueue,l!==null&&(i.updateQueue=l,i.flags|=4),i.subtreeFlags=0,l=o,o=i.child;o!==null;)h=o,r=l,h.flags&=14680066,y=h.alternate,y===null?(h.childLanes=0,h.lanes=r,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=y.childLanes,h.lanes=y.lanes,h.child=y.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=y.memoizedProps,h.memoizedState=y.memoizedState,h.updateQueue=y.updateQueue,h.type=y.type,r=y.dependencies,h.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return vt(Ot,Ot.current&1|2),i.child}r=r.sibling}h.tail!==null&&mt()>Ao&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304)}else{if(!l)if(r=Au(y),r!==null){if(i.flags|=128,l=!0,o=r.updateQueue,o!==null&&(i.updateQueue=o,i.flags|=4),sl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Dt)return nn(i),null}else 2*mt()-h.renderingStartTime>Ao&&o!==1073741824&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304);h.isBackwards?(y.sibling=i.child,i.child=y):(o=h.last,o!==null?o.sibling=y:i.child=y,h.last=y)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=mt(),i.sibling=null,o=Ot.current,vt(Ot,l?o&1|2:o&1),i):(nn(i),null);case 22:case 23:return Qf(),l=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==l&&(i.flags|=8192),l&&(i.mode&1)!==0?(zn&1073741824)!==0&&(nn(i),i.subtreeFlags&6&&(i.flags|=8192)):nn(i),null;case 24:return null;case 25:return null}throw Error(t(156,i.tag))}function d1(r,i){switch(ef(i),i.tag){case 1:return xn(i.type)&&bu(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Ro(),It(En),It(en),pf(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return ff(i),null;case 13:if(It(Ot),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(t(340));xo()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return It(Ot),null;case 4:return Ro(),null;case 10:return af(i.type._context),null;case 22:case 23:return Qf(),null;case 24:return null;default:return null}}var $u=!1,rn=!1,f1=typeof WeakSet=="function"?WeakSet:Set,re=null;function Mo(r,i){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){At(r,i,l)}else o.current=null}function kf(r,i,o){try{o()}catch(l){At(r,i,l)}}var ky=!1;function h1(r,i){if(Wd=lu,r=fm(),Nd(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,S=-1,E=-1,T=0,V=0,W=r,$=null;t:for(;;){for(var X;W!==o||c!==0&&W.nodeType!==3||(S=y+c),W!==h||l!==0&&W.nodeType!==3||(E=y+l),W.nodeType===3&&(y+=W.nodeValue.length),(X=W.firstChild)!==null;)$=W,W=X;for(;;){if(W===r)break t;if($===o&&++T===c&&(S=y),$===h&&++V===l&&(E=y),(X=W.nextSibling)!==null)break;W=$,$=W.parentNode}W=X}o=S===-1||E===-1?null:{start:S,end:E}}else o=null}o=o||{start:0,end:0}}else o=null;for(Qd={focusedElem:r,selectionRange:o},lu=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var se=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var oe=se.memoizedProps,Pt=se.memoizedState,M=i.stateNode,D=M.getSnapshotBeforeUpdate(i.elementType===i.type?oe:mr(i.type,oe),Pt);M.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var P=i.stateNode.containerInfo;P.nodeType===1?P.textContent="":P.nodeType===9&&P.documentElement&&P.removeChild(P.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Q){At(i,i.return,Q)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return se=ky,ky=!1,se}function ol(r,i,o){var l=i.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&r)===r){var h=c.destroy;c.destroy=void 0,h!==void 0&&kf(i,o,h)}c=c.next}while(c!==l)}}function Vu(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&r)===r){var l=o.create;o.destroy=l()}o=o.next}while(o!==i)}}function Pf(r){var i=r.ref;if(i!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof i=="function"?i(r):i.current=r}}function Py(r){var i=r.alternate;i!==null&&(r.alternate=null,Py(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Mr],delete i[Ya],delete i[Gd],delete i[Y_],delete i[G_])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Ty(r){return r.tag===5||r.tag===3||r.tag===4}function Ny(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Ty(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Tf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.nodeType===8?o.parentNode.insertBefore(r,i):o.insertBefore(r,i):(o.nodeType===8?(i=o.parentNode,i.insertBefore(r,o)):(i=o,i.appendChild(r)),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=Su));else if(l!==4&&(r=r.child,r!==null))for(Tf(r,i,o),r=r.sibling;r!==null;)Tf(r,i,o),r=r.sibling}function Nf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(l!==4&&(r=r.child,r!==null))for(Nf(r,i,o),r=r.sibling;r!==null;)Nf(r,i,o),r=r.sibling}var Jt=null,yr=!1;function Vi(r,i,o){for(o=o.child;o!==null;)By(r,i,o),o=o.sibling}function By(r,i,o){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Zr,o)}catch{}switch(o.tag){case 5:rn||Mo(o,i);case 6:var l=Jt,c=yr;Jt=null,Vi(r,i,o),Jt=l,yr=c,Jt!==null&&(yr?(r=Jt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):Jt.removeChild(o.stateNode));break;case 18:Jt!==null&&(yr?(r=Jt,o=o.stateNode,r.nodeType===8?Yd(r.parentNode,o):r.nodeType===1&&Yd(r,o),Ba(r)):Yd(Jt,o.stateNode));break;case 4:l=Jt,c=yr,Jt=o.stateNode.containerInfo,yr=!0,Vi(r,i,o),Jt=l,yr=c;break;case 0:case 11:case 14:case 15:if(!rn&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var h=c,y=h.destroy;h=h.tag,y!==void 0&&((h&2)!==0||(h&4)!==0)&&kf(o,i,y),c=c.next}while(c!==l)}Vi(r,i,o);break;case 1:if(!rn&&(Mo(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(S){At(o,i,S)}Vi(r,i,o);break;case 21:Vi(r,i,o);break;case 22:o.mode&1?(rn=(l=rn)||o.memoizedState!==null,Vi(r,i,o),rn=l):Vi(r,i,o);break;default:Vi(r,i,o)}}function Uy(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new f1),i.forEach(function(l){var c=b1.bind(null,r,l);o.has(l)||(o.add(l),l.then(c,c))})}}function gr(r,i){var o=i.deletions;if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];try{var h=r,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 5:Jt=S.stateNode,yr=!1;break e;case 3:Jt=S.stateNode.containerInfo,yr=!0;break e;case 4:Jt=S.stateNode.containerInfo,yr=!0;break e}S=S.return}if(Jt===null)throw Error(t(160));By(h,y,c),Jt=null,yr=!1;var E=c.alternate;E!==null&&(E.return=null),c.return=null}catch(T){At(c,i,T)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)jy(i,r),i=i.sibling}function jy(r,i){var o=r.alternate,l=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(gr(i,r),kr(r),l&4){try{ol(3,r,r.return),Vu(3,r)}catch(oe){At(r,r.return,oe)}try{ol(5,r,r.return)}catch(oe){At(r,r.return,oe)}}break;case 1:gr(i,r),kr(r),l&512&&o!==null&&Mo(o,o.return);break;case 5:if(gr(i,r),kr(r),l&512&&o!==null&&Mo(o,o.return),r.flags&32){var c=r.stateNode;try{bs(c,"")}catch(oe){At(r,r.return,oe)}}if(l&4&&(c=r.stateNode,c!=null)){var h=r.memoizedProps,y=o!==null?o.memoizedProps:h,S=r.type,E=r.updateQueue;if(r.updateQueue=null,E!==null)try{S==="input"&&h.type==="radio"&&h.name!=null&&Jl(c,h),Ci(S,y);var T=Ci(S,h);for(y=0;y<E.length;y+=2){var V=E[y],W=E[y+1];V==="style"?Oa(c,W):V==="dangerouslySetInnerHTML"?uo(c,W):V==="children"?bs(c,W):z(c,V,W,T)}switch(S){case"input":ao(c,h);break;case"textarea":Da(c,h);break;case"select":var $=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!h.multiple;var X=h.value;X!=null?xi(c,!!h.multiple,X,!1):$!==!!h.multiple&&(h.defaultValue!=null?xi(c,!!h.multiple,h.defaultValue,!0):xi(c,!!h.multiple,h.multiple?[]:"",!1))}c[Ya]=h}catch(oe){At(r,r.return,oe)}}break;case 6:if(gr(i,r),kr(r),l&4){if(r.stateNode===null)throw Error(t(162));c=r.stateNode,h=r.memoizedProps;try{c.nodeValue=h}catch(oe){At(r,r.return,oe)}}break;case 3:if(gr(i,r),kr(r),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Ba(i.containerInfo)}catch(oe){At(r,r.return,oe)}break;case 4:gr(i,r),kr(r);break;case 13:gr(i,r),kr(r),c=r.child,c.flags&8192&&(h=c.memoizedState!==null,c.stateNode.isHidden=h,!h||c.alternate!==null&&c.alternate.memoizedState!==null||(jf=mt())),l&4&&Uy(r);break;case 22:if(V=o!==null&&o.memoizedState!==null,r.mode&1?(rn=(T=rn)||V,gr(i,r),rn=T):gr(i,r),kr(r),l&8192){if(T=r.memoizedState!==null,(r.stateNode.isHidden=T)&&!V&&(r.mode&1)!==0)for(re=r,V=r.child;V!==null;){for(W=re=V;re!==null;){switch($=re,X=$.child,$.tag){case 0:case 11:case 14:case 15:ol(4,$,$.return);break;case 1:Mo($,$.return);var se=$.stateNode;if(typeof se.componentWillUnmount=="function"){l=$,o=$.return;try{i=l,se.props=i.memoizedProps,se.state=i.memoizedState,se.componentWillUnmount()}catch(oe){At(l,o,oe)}}break;case 5:Mo($,$.return);break;case 22:if($.memoizedState!==null){Vy(W);continue}}X!==null?(X.return=$,re=X):Vy(W)}V=V.sibling}e:for(V=null,W=r;;){if(W.tag===5){if(V===null){V=W;try{c=W.stateNode,T?(h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(S=W.stateNode,E=W.memoizedProps.style,y=E!=null&&E.hasOwnProperty("display")?E.display:null,S.style.display=Ca("display",y))}catch(oe){At(r,r.return,oe)}}}else if(W.tag===6){if(V===null)try{W.stateNode.nodeValue=T?"":W.memoizedProps}catch(oe){At(r,r.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===r)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===r)break e;for(;W.sibling===null;){if(W.return===null||W.return===r)break e;V===W&&(V=null),W=W.return}V===W&&(V=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:gr(i,r),kr(r),l&4&&Uy(r);break;case 21:break;default:gr(i,r),kr(r)}}function kr(r){var i=r.flags;if(i&2){try{e:{for(var o=r.return;o!==null;){if(Ty(o)){var l=o;break e}o=o.return}throw Error(t(160))}switch(l.tag){case 5:var c=l.stateNode;l.flags&32&&(bs(c,""),l.flags&=-33);var h=Ny(r);Nf(r,h,c);break;case 3:case 4:var y=l.stateNode.containerInfo,S=Ny(r);Tf(r,S,y);break;default:throw Error(t(161))}}catch(E){At(r,r.return,E)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function p1(r,i,o){re=r,zy(r)}function zy(r,i,o){for(var l=(r.mode&1)!==0;re!==null;){var c=re,h=c.child;if(c.tag===22&&l){var y=c.memoizedState!==null||$u;if(!y){var S=c.alternate,E=S!==null&&S.memoizedState!==null||rn;S=$u;var T=rn;if($u=y,(rn=E)&&!T)for(re=c;re!==null;)y=re,E=y.child,y.tag===22&&y.memoizedState!==null?Hy(c):E!==null?(E.return=y,re=E):Hy(c);for(;h!==null;)re=h,zy(h),h=h.sibling;re=c,$u=S,rn=T}$y(r)}else(c.subtreeFlags&8772)!==0&&h!==null?(h.return=c,re=h):$y(r)}}function $y(r){for(;re!==null;){var i=re;if((i.flags&8772)!==0){var o=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:rn||Vu(5,i);break;case 1:var l=i.stateNode;if(i.flags&4&&!rn)if(o===null)l.componentDidMount();else{var c=i.elementType===i.type?o.memoizedProps:mr(i.type,o.memoizedProps);l.componentDidUpdate(c,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var h=i.updateQueue;h!==null&&Vm(i,h,l);break;case 3:var y=i.updateQueue;if(y!==null){if(o=null,i.child!==null)switch(i.child.tag){case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}Vm(i,y,o)}break;case 5:var S=i.stateNode;if(o===null&&i.flags&4){o=S;var E=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&o.focus();break;case"img":E.src&&(o.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var T=i.alternate;if(T!==null){var V=T.memoizedState;if(V!==null){var W=V.dehydrated;W!==null&&Ba(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}rn||i.flags&512&&Pf(i)}catch($){At(i,i.return,$)}}if(i===r){re=null;break}if(o=i.sibling,o!==null){o.return=i.return,re=o;break}re=i.return}}function Vy(r){for(;re!==null;){var i=re;if(i===r){re=null;break}var o=i.sibling;if(o!==null){o.return=i.return,re=o;break}re=i.return}}function Hy(r){for(;re!==null;){var i=re;try{switch(i.tag){case 0:case 11:case 15:var o=i.return;try{Vu(4,i)}catch(E){At(i,o,E)}break;case 1:var l=i.stateNode;if(typeof l.componentDidMount=="function"){var c=i.return;try{l.componentDidMount()}catch(E){At(i,c,E)}}var h=i.return;try{Pf(i)}catch(E){At(i,h,E)}break;case 5:var y=i.return;try{Pf(i)}catch(E){At(i,y,E)}}}catch(E){At(i,i.return,E)}if(i===r){re=null;break}var S=i.sibling;if(S!==null){S.return=i.return,re=S;break}re=i.return}}var m1=Math.ceil,Hu=q.ReactCurrentDispatcher,Bf=q.ReactCurrentOwner,Yn=q.ReactCurrentBatchConfig,Xe=0,Yt=null,Bt=null,Xt=0,zn=0,Lo=Bi(0),Vt=0,al=null,Ps=0,Wu=0,Uf=0,ll=null,Cn=null,jf=0,Ao=1/0,ai=null,Qu=!1,zf=null,Hi=null,Ku=!1,Wi=null,qu=0,ul=0,$f=null,Yu=-1,Gu=0;function dn(){return(Xe&6)!==0?mt():Yu!==-1?Yu:Yu=mt()}function Qi(r){return(r.mode&1)===0?1:(Xe&2)!==0&&Xt!==0?Xt&-Xt:X_.transition!==null?(Gu===0&&(Gu=Np()),Gu):(r=at,r!==0||(r=window.event,r=r===void 0?16:Qp(r.type)),r)}function vr(r,i,o,l){if(50<ul)throw ul=0,$f=null,Error(t(185));Aa(r,o,l),((Xe&2)===0||r!==Yt)&&(r===Yt&&((Xe&2)===0&&(Wu|=o),Vt===4&&Ki(r,Xt)),On(r,l),o===1&&Xe===0&&(i.mode&1)===0&&(Ao=mt()+500,Eu&&ji()))}function On(r,i){var o=r.callbackNode;XS(r,i);var l=su(r,r===Yt?Xt:0);if(l===0)o!==null&&Fi(o),r.callbackNode=null,r.callbackPriority=0;else if(i=l&-l,r.callbackPriority!==i){if(o!=null&&Fi(o),i===1)r.tag===0?J_(Qy.bind(null,r)):Mm(Qy.bind(null,r)),K_(function(){(Xe&6)===0&&ji()}),o=null;else{switch(Bp(l)){case 1:o=dr;break;case 4:o=Cs;break;case 16:o=Je;break;case 536870912:o=fr;break;default:o=Je}o=eg(o,Wy.bind(null,r))}r.callbackPriority=i,r.callbackNode=o}}function Wy(r,i){if(Yu=-1,Gu=0,(Xe&6)!==0)throw Error(t(327));var o=r.callbackNode;if(ko()&&r.callbackNode!==o)return null;var l=su(r,r===Yt?Xt:0);if(l===0)return null;if((l&30)!==0||(l&r.expiredLanes)!==0||i)i=Ju(r,l);else{i=l;var c=Xe;Xe|=2;var h=qy();(Yt!==r||Xt!==i)&&(ai=null,Ao=mt()+500,Ns(r,i));do try{v1();break}catch(S){Ky(r,S)}while(!0);of(),Hu.current=h,Xe=c,Bt!==null?i=0:(Yt=null,Xt=0,i=Vt)}if(i!==0){if(i===2&&(c=_d(r),c!==0&&(l=c,i=Vf(r,c))),i===1)throw o=al,Ns(r,0),Ki(r,l),On(r,mt()),o;if(i===6)Ki(r,l);else{if(c=r.current.alternate,(l&30)===0&&!y1(c)&&(i=Ju(r,l),i===2&&(h=_d(r),h!==0&&(l=h,i=Vf(r,h))),i===1))throw o=al,Ns(r,0),Ki(r,l),On(r,mt()),o;switch(r.finishedWork=c,r.finishedLanes=l,i){case 0:case 1:throw Error(t(345));case 2:Bs(r,Cn,ai);break;case 3:if(Ki(r,l),(l&130023424)===l&&(i=jf+500-mt(),10<i)){if(su(r,0)!==0)break;if(c=r.suspendedLanes,(c&l)!==l){dn(),r.pingedLanes|=r.suspendedLanes&c;break}r.timeoutHandle=qd(Bs.bind(null,r,Cn,ai),i);break}Bs(r,Cn,ai);break;case 4:if(Ki(r,l),(l&4194240)===l)break;for(i=r.eventTimes,c=-1;0<l;){var y=31-Kt(l);h=1<<y,y=i[y],y>c&&(c=y),l&=~h}if(l=c,l=mt()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*m1(l/1960))-l,10<l){r.timeoutHandle=qd(Bs.bind(null,r,Cn,ai),l);break}Bs(r,Cn,ai);break;case 5:Bs(r,Cn,ai);break;default:throw Error(t(329))}}}return On(r,mt()),r.callbackNode===o?Wy.bind(null,r):null}function Vf(r,i){var o=ll;return r.current.memoizedState.isDehydrated&&(Ns(r,i).flags|=256),r=Ju(r,i),r!==2&&(i=Cn,Cn=o,i!==null&&Hf(i)),r}function Hf(r){Cn===null?Cn=r:Cn.push.apply(Cn,r)}function y1(r){for(var i=r;;){if(i.flags&16384){var o=i.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var c=o[l],h=c.getSnapshot;c=c.value;try{if(!hr(h(),c))return!1}catch{return!1}}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ki(r,i){for(i&=~Uf,i&=~Wu,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var o=31-Kt(i),l=1<<o;r[o]=-1,i&=~l}}function Qy(r){if((Xe&6)!==0)throw Error(t(327));ko();var i=su(r,0);if((i&1)===0)return On(r,mt()),null;var o=Ju(r,i);if(r.tag!==0&&o===2){var l=_d(r);l!==0&&(i=l,o=Vf(r,l))}if(o===1)throw o=al,Ns(r,0),Ki(r,i),On(r,mt()),o;if(o===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Bs(r,Cn,ai),On(r,mt()),null}function Wf(r,i){var o=Xe;Xe|=1;try{return r(i)}finally{Xe=o,Xe===0&&(Ao=mt()+500,Eu&&ji())}}function Ts(r){Wi!==null&&Wi.tag===0&&(Xe&6)===0&&ko();var i=Xe;Xe|=1;var o=Yn.transition,l=at;try{if(Yn.transition=null,at=1,r)return r()}finally{at=l,Yn.transition=o,Xe=i,(Xe&6)===0&&ji()}}function Qf(){zn=Lo.current,It(Lo)}function Ns(r,i){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,Q_(o)),Bt!==null)for(o=Bt.return;o!==null;){var l=o;switch(ef(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&bu();break;case 3:Ro(),It(En),It(en),pf();break;case 5:ff(l);break;case 4:Ro();break;case 13:It(Ot);break;case 19:It(Ot);break;case 10:af(l.type._context);break;case 22:case 23:Qf()}o=o.return}if(Yt=r,Bt=r=qi(r.current,null),Xt=zn=i,Vt=0,al=null,Uf=Wu=Ps=0,Cn=ll=null,Ls!==null){for(i=0;i<Ls.length;i++)if(o=Ls[i],l=o.interleaved,l!==null){o.interleaved=null;var c=l.next,h=o.pending;if(h!==null){var y=h.next;h.next=c,l.next=y}o.pending=l}Ls=null}return r}function Ky(r,i){do{var o=Bt;try{if(of(),ku.current=Bu,Pu){for(var l=Rt.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}Pu=!1}if(ks=0,qt=$t=Rt=null,tl=!1,nl=0,Bf.current=null,o===null||o.return===null){Vt=1,al=i,Bt=null;break}e:{var h=r,y=o.return,S=o,E=i;if(i=Xt,S.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var T=E,V=S,W=V.tag;if((V.mode&1)===0&&(W===0||W===11||W===15)){var $=V.alternate;$?(V.updateQueue=$.updateQueue,V.memoizedState=$.memoizedState,V.lanes=$.lanes):(V.updateQueue=null,V.memoizedState=null)}var X=vy(y);if(X!==null){X.flags&=-257,wy(X,y,S,h,i),X.mode&1&&gy(h,T,i),i=X,E=T;var se=i.updateQueue;if(se===null){var oe=new Set;oe.add(E),i.updateQueue=oe}else se.add(E);break e}else{if((i&1)===0){gy(h,T,i),Kf();break e}E=Error(t(426))}}else if(Dt&&S.mode&1){var Pt=vy(y);if(Pt!==null){(Pt.flags&65536)===0&&(Pt.flags|=256),wy(Pt,y,S,h,i),rf(Fo(E,S));break e}}h=E=Fo(E,S),Vt!==4&&(Vt=2),ll===null?ll=[h]:ll.push(h),h=y;do{switch(h.tag){case 3:h.flags|=65536,i&=-i,h.lanes|=i;var M=my(h,E,i);$m(h,M);break e;case 1:S=E;var D=h.type,P=h.stateNode;if((h.flags&128)===0&&(typeof D.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Hi===null||!Hi.has(P)))){h.flags|=65536,i&=-i,h.lanes|=i;var Q=yy(h,S,i);$m(h,Q);break e}}h=h.return}while(h!==null)}Gy(o)}catch(ae){i=ae,Bt===o&&o!==null&&(Bt=o=o.return);continue}break}while(!0)}function qy(){var r=Hu.current;return Hu.current=Bu,r===null?Bu:r}function Kf(){(Vt===0||Vt===3||Vt===2)&&(Vt=4),Yt===null||(Ps&268435455)===0&&(Wu&268435455)===0||Ki(Yt,Xt)}function Ju(r,i){var o=Xe;Xe|=2;var l=qy();(Yt!==r||Xt!==i)&&(ai=null,Ns(r,i));do try{g1();break}catch(c){Ky(r,c)}while(!0);if(of(),Xe=o,Hu.current=l,Bt!==null)throw Error(t(261));return Yt=null,Xt=0,Vt}function g1(){for(;Bt!==null;)Yy(Bt)}function v1(){for(;Bt!==null&&!_n();)Yy(Bt)}function Yy(r){var i=Zy(r.alternate,r,zn);r.memoizedProps=r.pendingProps,i===null?Gy(r):Bt=i,Bf.current=null}function Gy(r){var i=r;do{var o=i.alternate;if(r=i.return,(i.flags&32768)===0){if(o=c1(o,i,zn),o!==null){Bt=o;return}}else{if(o=d1(o,i),o!==null){o.flags&=32767,Bt=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Vt=6,Bt=null;return}}if(i=i.sibling,i!==null){Bt=i;return}Bt=i=r}while(i!==null);Vt===0&&(Vt=5)}function Bs(r,i,o){var l=at,c=Yn.transition;try{Yn.transition=null,at=1,w1(r,i,o,l)}finally{Yn.transition=c,at=l}return null}function w1(r,i,o,l){do ko();while(Wi!==null);if((Xe&6)!==0)throw Error(t(327));o=r.finishedWork;var c=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var h=o.lanes|o.childLanes;if(ZS(r,h),r===Yt&&(Bt=Yt=null,Xt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ku||(Ku=!0,eg(Je,function(){return ko(),null})),h=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||h){h=Yn.transition,Yn.transition=null;var y=at;at=1;var S=Xe;Xe|=4,Bf.current=null,h1(r,o),jy(o,r),U_(Qd),lu=!!Wd,Qd=Wd=null,r.current=o,p1(o),Ds(),Xe=S,at=y,Yn.transition=h}else r.current=o;if(Ku&&(Ku=!1,Wi=r,qu=c),h=r.pendingLanes,h===0&&(Hi=null),Lt(o.stateNode),On(r,mt()),i!==null)for(l=r.onRecoverableError,o=0;o<i.length;o++)c=i[o],l(c.value,{componentStack:c.stack,digest:c.digest});if(Qu)throw Qu=!1,r=zf,zf=null,r;return(qu&1)!==0&&r.tag!==0&&ko(),h=r.pendingLanes,(h&1)!==0?r===$f?ul++:(ul=0,$f=r):ul=0,ji(),null}function ko(){if(Wi!==null){var r=Bp(qu),i=Yn.transition,o=at;try{if(Yn.transition=null,at=16>r?16:r,Wi===null)var l=!1;else{if(r=Wi,Wi=null,qu=0,(Xe&6)!==0)throw Error(t(331));var c=Xe;for(Xe|=4,re=r.current;re!==null;){var h=re,y=h.child;if((re.flags&16)!==0){var S=h.deletions;if(S!==null){for(var E=0;E<S.length;E++){var T=S[E];for(re=T;re!==null;){var V=re;switch(V.tag){case 0:case 11:case 15:ol(8,V,h)}var W=V.child;if(W!==null)W.return=V,re=W;else for(;re!==null;){V=re;var $=V.sibling,X=V.return;if(Py(V),V===T){re=null;break}if($!==null){$.return=X,re=$;break}re=X}}}var se=h.alternate;if(se!==null){var oe=se.child;if(oe!==null){se.child=null;do{var Pt=oe.sibling;oe.sibling=null,oe=Pt}while(oe!==null)}}re=h}}if((h.subtreeFlags&2064)!==0&&y!==null)y.return=h,re=y;else e:for(;re!==null;){if(h=re,(h.flags&2048)!==0)switch(h.tag){case 0:case 11:case 15:ol(9,h,h.return)}var M=h.sibling;if(M!==null){M.return=h.return,re=M;break e}re=h.return}}var D=r.current;for(re=D;re!==null;){y=re;var P=y.child;if((y.subtreeFlags&2064)!==0&&P!==null)P.return=y,re=P;else e:for(y=D;re!==null;){if(S=re,(S.flags&2048)!==0)try{switch(S.tag){case 0:case 11:case 15:Vu(9,S)}}catch(ae){At(S,S.return,ae)}if(S===y){re=null;break e}var Q=S.sibling;if(Q!==null){Q.return=S.return,re=Q;break e}re=S.return}}if(Xe=c,ji(),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Zr,r)}catch{}l=!0}return l}finally{at=o,Yn.transition=i}}return!1}function Jy(r,i,o){i=Fo(o,i),i=my(r,i,1),r=$i(r,i,1),i=dn(),r!==null&&(Aa(r,1,i),On(r,i))}function At(r,i,o){if(r.tag===3)Jy(r,r,o);else for(;i!==null;){if(i.tag===3){Jy(i,r,o);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hi===null||!Hi.has(l))){r=Fo(o,r),r=yy(i,r,1),i=$i(i,r,1),r=dn(),i!==null&&(Aa(i,1,r),On(i,r));break}}i=i.return}}function S1(r,i,o){var l=r.pingCache;l!==null&&l.delete(i),i=dn(),r.pingedLanes|=r.suspendedLanes&o,Yt===r&&(Xt&o)===o&&(Vt===4||Vt===3&&(Xt&130023424)===Xt&&500>mt()-jf?Ns(r,0):Uf|=o),On(r,i)}function Xy(r,i){i===0&&((r.mode&1)===0?i=1:(i=iu,iu<<=1,(iu&130023424)===0&&(iu=4194304)));var o=dn();r=ii(r,i),r!==null&&(Aa(r,i,o),On(r,o))}function _1(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),Xy(r,o)}function b1(r,i){var o=0;switch(r.tag){case 13:var l=r.stateNode,c=r.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=r.stateNode;break;default:throw Error(t(314))}l!==null&&l.delete(i),Xy(r,o)}var Zy;Zy=function(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps||En.current)Dn=!0;else{if((r.lanes&o)===0&&(i.flags&128)===0)return Dn=!1,u1(r,i,o);Dn=(r.flags&131072)!==0}else Dn=!1,Dt&&(i.flags&1048576)!==0&&Lm(i,Du,i.index);switch(i.lanes=0,i.tag){case 2:var l=i.type;zu(r,i),r=i.pendingProps;var c=bo(i,en.current);Oo(i,o),c=gf(null,i,l,r,c,o);var h=vf();return i.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,xn(l)?(h=!0,Iu(i)):h=!1,i.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,cf(i),c.updater=Uu,i.stateNode=c,c._reactInternals=i,Ef(i,l,r,o),i=Of(null,i,l,!0,h,o)):(i.tag=0,Dt&&h&&Zd(i),cn(null,i,c,o),i=i.child),i;case 16:l=i.elementType;e:{switch(zu(r,i),r=i.pendingProps,c=l._init,l=c(l._payload),i.type=l,c=i.tag=E1(l),r=mr(l,r),c){case 0:i=Cf(null,i,l,r,o);break e;case 1:i=xy(null,i,l,r,o);break e;case 11:i=Sy(null,i,l,r,o);break e;case 14:i=_y(null,i,l,mr(l.type,r),o);break e}throw Error(t(306,l,""))}return i;case 0:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),Cf(r,i,l,c,o);case 1:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),xy(r,i,l,c,o);case 3:e:{if(Dy(i),r===null)throw Error(t(387));l=i.pendingProps,h=i.memoizedState,c=h.element,zm(r,i),Lu(i,l,null,o);var y=i.memoizedState;if(l=y.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){c=Fo(Error(t(423)),i),i=Cy(r,i,l,o,c);break e}else if(l!==c){c=Fo(Error(t(424)),i),i=Cy(r,i,l,o,c);break e}else for(jn=Ni(i.stateNode.containerInfo.firstChild),Un=i,Dt=!0,pr=null,o=Um(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(xo(),l===c){i=oi(r,i,o);break e}cn(r,i,l,o)}i=i.child}return i;case 5:return Hm(i),r===null&&nf(i),l=i.type,c=i.pendingProps,h=r!==null?r.memoizedProps:null,y=c.children,Kd(l,c)?y=null:h!==null&&Kd(l,h)&&(i.flags|=32),Ey(r,i),cn(r,i,y,o),i.child;case 6:return r===null&&nf(i),null;case 13:return Oy(r,i,o);case 4:return df(i,i.stateNode.containerInfo),l=i.pendingProps,r===null?i.child=Do(i,null,l,o):cn(r,i,l,o),i.child;case 11:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),Sy(r,i,l,c,o);case 7:return cn(r,i,i.pendingProps,o),i.child;case 8:return cn(r,i,i.pendingProps.children,o),i.child;case 12:return cn(r,i,i.pendingProps.children,o),i.child;case 10:e:{if(l=i.type._context,c=i.pendingProps,h=i.memoizedProps,y=c.value,vt(Ru,l._currentValue),l._currentValue=y,h!==null)if(hr(h.value,y)){if(h.children===c.children&&!En.current){i=oi(r,i,o);break e}}else for(h=i.child,h!==null&&(h.return=i);h!==null;){var S=h.dependencies;if(S!==null){y=h.child;for(var E=S.firstContext;E!==null;){if(E.context===l){if(h.tag===1){E=si(-1,o&-o),E.tag=2;var T=h.updateQueue;if(T!==null){T=T.shared;var V=T.pending;V===null?E.next=E:(E.next=V.next,V.next=E),T.pending=E}}h.lanes|=o,E=h.alternate,E!==null&&(E.lanes|=o),lf(h.return,o,i),S.lanes|=o;break}E=E.next}}else if(h.tag===10)y=h.type===i.type?null:h.child;else if(h.tag===18){if(y=h.return,y===null)throw Error(t(341));y.lanes|=o,S=y.alternate,S!==null&&(S.lanes|=o),lf(y,o,i),y=h.sibling}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===i){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}cn(r,i,c.children,o),i=i.child}return i;case 9:return c=i.type,l=i.pendingProps.children,Oo(i,o),c=Kn(c),l=l(c),i.flags|=1,cn(r,i,l,o),i.child;case 14:return l=i.type,c=mr(l,i.pendingProps),c=mr(l.type,c),_y(r,i,l,c,o);case 15:return by(r,i,i.type,i.pendingProps,o);case 17:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:mr(l,c),zu(r,i),i.tag=1,xn(l)?(r=!0,Iu(i)):r=!1,Oo(i,o),hy(i,l,c),Ef(i,l,c,o),Of(null,i,l,!0,r,o);case 19:return Fy(r,i,o);case 22:return Iy(r,i,o)}throw Error(t(156,i.tag))};function eg(r,i){return Fr(r,i)}function I1(r,i,o,l){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(r,i,o,l){return new I1(r,i,o,l)}function qf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function E1(r){if(typeof r=="function")return qf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===_t)return 11;if(r===et)return 14}return 2}function qi(r,i){var o=r.alternate;return o===null?(o=Gn(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Xu(r,i,o,l,c,h){var y=2;if(l=r,typeof r=="function")qf(r)&&(y=1);else if(typeof r=="string")y=5;else e:switch(r){case Re:return Us(o.children,c,h,i);case pe:y=8,c|=8;break;case ne:return r=Gn(12,o,i,c|2),r.elementType=ne,r.lanes=h,r;case yt:return r=Gn(13,o,i,c),r.elementType=yt,r.lanes=h,r;case je:return r=Gn(19,o,i,c),r.elementType=je,r.lanes=h,r;case ze:return Zu(o,c,h,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Ce:y=10;break e;case pt:y=9;break e;case _t:y=11;break e;case et:y=14;break e;case Te:y=16,l=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return i=Gn(y,o,i,c),i.elementType=r,i.type=l,i.lanes=h,i}function Us(r,i,o,l){return r=Gn(7,r,l,i),r.lanes=o,r}function Zu(r,i,o,l){return r=Gn(22,r,l,i),r.elementType=ze,r.lanes=o,r.stateNode={isHidden:!1},r}function Yf(r,i,o){return r=Gn(6,r,null,i),r.lanes=o,r}function Gf(r,i,o){return i=Gn(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function x1(r,i,o,l,c){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bd(0),this.expirationTimes=bd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bd(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Jf(r,i,o,l,c,h,y,S,E){return r=new x1(r,i,o,S,E),i===1?(i=1,h===!0&&(i|=8)):i=0,h=Gn(3,null,null,i),r.current=h,h.stateNode=r,h.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},cf(h),r}function D1(r,i,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:l==null?null:""+l,children:r,containerInfo:i,implementation:o}}function tg(r){if(!r)return Ui;r=r._reactInternals;e:{if(Ye(r)!==r||r.tag!==1)throw Error(t(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(xn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(t(171))}if(r.tag===1){var o=r.type;if(xn(o))return Rm(r,o,i)}return i}function ng(r,i,o,l,c,h,y,S,E){return r=Jf(o,l,!0,r,c,h,y,S,E),r.context=tg(null),o=r.current,l=dn(),c=Qi(o),h=si(l,c),h.callback=i??null,$i(o,h,c),r.current.lanes=c,Aa(r,c,l),On(r,l),r}function ec(r,i,o,l){var c=i.current,h=dn(),y=Qi(c);return o=tg(o),i.context===null?i.context=o:i.pendingContext=o,i=si(h,y),i.payload={element:r},l=l===void 0?null:l,l!==null&&(i.callback=l),r=$i(c,i,y),r!==null&&(vr(r,c,y,h),Mu(r,c,y)),y}function tc(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function rg(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function Xf(r,i){rg(r,i),(r=r.alternate)&&rg(r,i)}function C1(){return null}var ig=typeof reportError=="function"?reportError:function(r){console.error(r)};function Zf(r){this._internalRoot=r}nc.prototype.render=Zf.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(t(409));ec(r,i,null,null)},nc.prototype.unmount=Zf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Ts(function(){ec(null,r,null,null)}),i[ei]=null}};function nc(r){this._internalRoot=r}nc.prototype.unstable_scheduleHydration=function(r){if(r){var i=zp();r={blockedOn:null,target:r,priority:i};for(var o=0;o<ki.length&&i!==0&&i<ki[o].priority;o++);ki.splice(o,0,r),o===0&&Hp(r)}};function eh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function rc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function sg(){}function O1(r,i,o,l,c){if(c){if(typeof l=="function"){var h=l;l=function(){var T=tc(y);h.call(T)}}var y=ng(i,l,r,0,null,!1,!1,"",sg);return r._reactRootContainer=y,r[ei]=y.current,Ka(r.nodeType===8?r.parentNode:r),Ts(),y}for(;c=r.lastChild;)r.removeChild(c);if(typeof l=="function"){var S=l;l=function(){var T=tc(E);S.call(T)}}var E=Jf(r,0,!1,null,null,!1,!1,"",sg);return r._reactRootContainer=E,r[ei]=E.current,Ka(r.nodeType===8?r.parentNode:r),Ts(function(){ec(i,E,o,l)}),E}function ic(r,i,o,l,c){var h=o._reactRootContainer;if(h){var y=h;if(typeof c=="function"){var S=c;c=function(){var E=tc(y);S.call(E)}}ec(i,y,r,c)}else y=O1(o,i,r,c,l);return tc(y)}Up=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var o=La(i.pendingLanes);o!==0&&(Id(i,o|1),On(i,mt()),(Xe&6)===0&&(Ao=mt()+500,ji()))}break;case 13:Ts(function(){var l=ii(r,1);if(l!==null){var c=dn();vr(l,r,1,c)}}),Xf(r,1)}},Ed=function(r){if(r.tag===13){var i=ii(r,134217728);if(i!==null){var o=dn();vr(i,r,134217728,o)}Xf(r,134217728)}},jp=function(r){if(r.tag===13){var i=Qi(r),o=ii(r,i);if(o!==null){var l=dn();vr(o,r,i,l)}Xf(r,i)}},zp=function(){return at},$p=function(r,i){var o=at;try{return at=r,i()}finally{at=o}},Ra=function(r,i,o){switch(i){case"input":if(ao(r,o),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<o.length;i++){var l=o[i];if(l!==r&&l.form===r.form){var c=_u(l);if(!c)throw Error(t(90));Ea(l),ao(l,c)}}}break;case"textarea":Da(r,o);break;case"select":i=o.value,i!=null&&xi(r,!!o.multiple,i,!1)}},eu=Wf,tu=Ts;var R1={usingClientEntryPoint:!1,Events:[Ga,So,_u,Es,xs,Wf]},cl={findFiberByHostInstance:Os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F1={bundleType:cl.bundleType,version:cl.version,rendererPackageName:cl.rendererPackageName,rendererConfig:cl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:q.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Ke(r),r===null?null:r.stateNode},findFiberByHostInstance:cl.findFiberByHostInstance||C1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sc.isDisabled&&sc.supportsFiber)try{Zr=sc.inject(F1),In=sc}catch{}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R1,Rn.createPortal=function(r,i){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eh(i))throw Error(t(200));return D1(r,i,null,o)},Rn.createRoot=function(r,i){if(!eh(r))throw Error(t(299));var o=!1,l="",c=ig;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onRecoverableError!==void 0&&(c=i.onRecoverableError)),i=Jf(r,1,!1,null,null,o,!1,l,c),r[ei]=i.current,Ka(r.nodeType===8?r.parentNode:r),new Zf(i)},Rn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=Ke(i),r=r===null?null:r.stateNode,r},Rn.flushSync=function(r){return Ts(r)},Rn.hydrate=function(r,i,o){if(!rc(i))throw Error(t(200));return ic(null,r,i,!0,o)},Rn.hydrateRoot=function(r,i,o){if(!eh(r))throw Error(t(405));var l=o!=null&&o.hydratedSources||null,c=!1,h="",y=ig;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),i=ng(i,null,r,1,o??null,c,!1,h,y),r[ei]=i.current,Ka(r),l)for(r=0;r<l.length;r++)o=l[r],c=o._getVersion,c=c(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,c]:i.mutableSourceEagerHydrationData.push(o,c);return new nc(i)},Rn.render=function(r,i,o){if(!rc(i))throw Error(t(200));return ic(null,r,i,!1,o)},Rn.unmountComponentAtNode=function(r){if(!rc(r))throw Error(t(40));return r._reactRootContainer?(Ts(function(){ic(null,null,r,!1,function(){r._reactRootContainer=null,r[ei]=null})}),!0):!1},Rn.unstable_batchedUpdates=Wf,Rn.unstable_renderSubtreeIntoContainer=function(r,i,o,l){if(!rc(o))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return ic(r,i,o,!1,l)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var pg;function Q1(){if(pg)return sh.exports;pg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),sh.exports=W1(),sh.exports}var mg;function K1(){if(mg)return ac;mg=1;var n=Q1();return ac.createRoot=n.createRoot,ac.hydrateRoot=n.hydrateRoot,ac}var q1=K1();const Y1=qv(q1);var _a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eo=typeof window>"u"||"Deno"in globalThis;function pn(){}function G1(n,e){return typeof n=="function"?n(e):n}function _h(n){return typeof n=="number"&&n>=0&&n!==1/0}function e0(n,e){return Math.max(n+(e||0)-Date.now(),0)}function ps(n,e){return typeof n=="function"?n(e):n}function Ir(n,e){return typeof n=="function"?n(e):n}function yg(n,e){const{type:t="all",exact:s,fetchStatus:a,predicate:u,queryKey:d,stale:f}=n;if(d){if(s){if(e.queryHash!==Zh(d,e.options))return!1}else if(!Ml(e.queryKey,d))return!1}if(t!=="all"){const p=e.isActive();if(t==="active"&&!p||t==="inactive"&&p)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||a&&a!==e.state.fetchStatus||u&&!u(e))}function gg(n,e){const{exact:t,status:s,predicate:a,mutationKey:u}=n;if(u){if(!e.options.mutationKey)return!1;if(t){if(to(e.options.mutationKey)!==to(u))return!1}else if(!Ml(e.options.mutationKey,u))return!1}return!(s&&e.state.status!==s||a&&!a(e))}function Zh(n,e){return((e==null?void 0:e.queryKeyHashFn)||to)(n)}function to(n){return JSON.stringify(n,(e,t)=>bh(t)?Object.keys(t).sort().reduce((s,a)=>(s[a]=t[a],s),{}):t)}function Ml(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ml(n[t],e[t])):!1}function t0(n,e){if(n===e)return n;const t=vg(n)&&vg(e);if(t||bh(n)&&bh(e)){const s=t?n:Object.keys(n),a=s.length,u=t?e:Object.keys(e),d=u.length,f=t?[]:{},p=new Set(s);let m=0;for(let g=0;g<d;g++){const v=t?g:u[g];(!t&&p.has(v)||t)&&n[v]===void 0&&e[v]===void 0?(f[v]=void 0,m++):(f[v]=t0(n[v],e[v]),f[v]===n[v]&&n[v]!==void 0&&m++)}return a===d&&m===a?n:f}return e}function Rc(n,e){if(!e||Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function vg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function bh(n){if(!wg(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!wg(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function wg(n){return Object.prototype.toString.call(n)==="[object Object]"}function J1(n){return new Promise(e=>{setTimeout(e,n)})}function Ih(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?t0(n,e):e}function X1(n,e,t=0){const s=[...n,e];return t&&s.length>t?s.slice(1):s}function Z1(n,e,t=0){const s=[e,...n];return t&&s.length>t?s.slice(0,-1):s}var ep=Symbol();function n0(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===ep?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function r0(n,e){return typeof n=="function"?n(...e):!!n}var Ws,rs,na,Bv,eb=(Bv=class extends _a{constructor(){super();ye(this,Ws);ye(this,rs);ye(this,na);Z(this,na,e=>{if(!eo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){b(this,rs)||this.setEventListener(b(this,na))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,rs))==null||e.call(this),Z(this,rs,void 0))}setEventListener(e){var t;Z(this,na,e),(t=b(this,rs))==null||t.call(this),Z(this,rs,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){b(this,Ws)!==e&&(Z(this,Ws,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof b(this,Ws)=="boolean"?b(this,Ws):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ws=new WeakMap,rs=new WeakMap,na=new WeakMap,Bv),tp=new eb,ra,is,ia,Uv,tb=(Uv=class extends _a{constructor(){super();ye(this,ra,!0);ye(this,is);ye(this,ia);Z(this,ia,e=>{if(!eo&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){b(this,is)||this.setEventListener(b(this,ia))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,is))==null||e.call(this),Z(this,is,void 0))}setEventListener(e){var t;Z(this,ia,e),(t=b(this,is))==null||t.call(this),Z(this,is,e(this.setOnline.bind(this)))}setOnline(e){b(this,ra)!==e&&(Z(this,ra,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return b(this,ra)}},ra=new WeakMap,is=new WeakMap,ia=new WeakMap,Uv),Fc=new tb;function Eh(){let n,e;const t=new Promise((a,u)=>{n=a,e=u});t.status="pending",t.catch(()=>{});function s(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{s({status:"fulfilled",value:a}),n(a)},t.reject=a=>{s({status:"rejected",reason:a}),e(a)},t}function nb(n){return Math.min(1e3*2**n,3e4)}function i0(n){return(n??"online")==="online"?Fc.isOnline():!0}var s0=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function mc(n){return n instanceof s0}function o0(n){let e=!1,t=0,s=!1,a;const u=Eh(),d=L=>{var N;s||(w(new s0(L)),(N=n.abort)==null||N.call(n))},f=()=>{e=!0},p=()=>{e=!1},m=()=>tp.isFocused()&&(n.networkMode==="always"||Fc.isOnline())&&n.canRun(),g=()=>i0(n.networkMode)&&n.canRun(),v=L=>{var N;s||(s=!0,(N=n.onSuccess)==null||N.call(n,L),a==null||a(),u.resolve(L))},w=L=>{var N;s||(s=!0,(N=n.onError)==null||N.call(n,L),a==null||a(),u.reject(L))},_=()=>new Promise(L=>{var N;a=k=>{(s||m())&&L(k)},(N=n.onPause)==null||N.call(n)}).then(()=>{var L;a=void 0,s||(L=n.onContinue)==null||L.call(n)}),x=()=>{if(s)return;let L;const N=t===0?n.initialPromise:void 0;try{L=N??n.fn()}catch(k){L=Promise.reject(k)}Promise.resolve(L).then(v).catch(k=>{var A;if(s)return;const J=n.retry??(eo?0:3),z=n.retryDelay??nb,q=typeof z=="function"?z(t,k):z,ee=J===!0||typeof J=="number"&&t<J||typeof J=="function"&&J(t,k);if(e||!ee){w(k);return}t++,(A=n.onFail)==null||A.call(n,t,k),J1(q).then(()=>m()?void 0:_()).then(()=>{e?w(k):x()})})};return{promise:u,cancel:d,continue:()=>(a==null||a(),u),cancelRetry:f,continueRetry:p,canStart:g,start:()=>(g()?x():_().then(x),u)}}var rb=n=>setTimeout(n,0);function ib(){let n=[],e=0,t=f=>{f()},s=f=>{f()},a=rb;const u=f=>{e?n.push(f):a(()=>{t(f)})},d=()=>{const f=n;n=[],f.length&&a(()=>{s(()=>{f.forEach(p=>{t(p)})})})};return{batch:f=>{let p;e++;try{p=f()}finally{e--,e||d()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{t=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{a=f}}}var Ht=ib(),Qs,jv,a0=(jv=class{constructor(){ye(this,Qs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_h(this.gcTime)&&Z(this,Qs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(eo?1/0:5*60*1e3))}clearGcTimeout(){b(this,Qs)&&(clearTimeout(b(this,Qs)),Z(this,Qs,void 0))}},Qs=new WeakMap,jv),sa,oa,Xn,Ks,sn,Ul,qs,Sr,ui,zv,sb=(zv=class extends a0{constructor(e){super();ye(this,Sr);ye(this,sa);ye(this,oa);ye(this,Xn);ye(this,Ks);ye(this,sn);ye(this,Ul);ye(this,qs);Z(this,qs,!1),Z(this,Ul,e.defaultOptions),this.setOptions(e.options),this.observers=[],Z(this,Ks,e.client),Z(this,Xn,b(this,Ks).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Z(this,sa,ob(this.options)),this.state=e.state??b(this,sa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=b(this,sn))==null?void 0:e.promise}setOptions(e){this.options={...b(this,Ul),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&b(this,Xn).remove(this)}setData(e,t){const s=Ih(this.state.data,e,this.options);return Ue(this,Sr,ui).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){Ue(this,Sr,ui).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,a;const t=(s=b(this,sn))==null?void 0:s.promise;return(a=b(this,sn))==null||a.cancel(e),t?t.then(pn).catch(pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,sa))}isActive(){return this.observers.some(e=>Ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ep||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ps(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!e0(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,sn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,sn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),b(this,Xn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(b(this,sn)&&(b(this,qs)?b(this,sn).cancel({revert:!0}):b(this,sn).cancelRetry()),this.scheduleGc()),b(this,Xn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,Sr,ui).call(this,{type:"invalidate"})}fetch(e,t){var m,g,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(b(this,sn))return b(this,sn).continueRetry(),b(this,sn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const w=this.observers.find(_=>_.options.queryFn);w&&this.setOptions(w.options)}const s=new AbortController,a=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(Z(this,qs,!0),s.signal)})},u=()=>{const w=n0(this.options,t),x=(()=>{const L={client:b(this,Ks),queryKey:this.queryKey,meta:this.meta};return a(L),L})();return Z(this,qs,!1),this.options.persister?this.options.persister(w,x,this):w(x)},f=(()=>{const w={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:b(this,Ks),state:this.state,fetchFn:u};return a(w),w})();(m=this.options.behavior)==null||m.onFetch(f,this),Z(this,oa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&Ue(this,Sr,ui).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const p=w=>{var _,x,L,N;mc(w)&&w.silent||Ue(this,Sr,ui).call(this,{type:"error",error:w}),mc(w)||((x=(_=b(this,Xn).config).onError)==null||x.call(_,w,this),(N=(L=b(this,Xn).config).onSettled)==null||N.call(L,this.state.data,w,this)),this.scheduleGc()};return Z(this,sn,o0({initialPromise:t==null?void 0:t.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:w=>{var _,x,L,N;if(w===void 0){p(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(w)}catch(k){p(k);return}(x=(_=b(this,Xn).config).onSuccess)==null||x.call(_,w,this),(N=(L=b(this,Xn).config).onSettled)==null||N.call(L,w,this.state.error,this),this.scheduleGc()},onError:p,onFail:(w,_)=>{Ue(this,Sr,ui).call(this,{type:"failed",failureCount:w,error:_})},onPause:()=>{Ue(this,Sr,ui).call(this,{type:"pause"})},onContinue:()=>{Ue(this,Sr,ui).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),b(this,sn).start()}},sa=new WeakMap,oa=new WeakMap,Xn=new WeakMap,Ks=new WeakMap,sn=new WeakMap,Ul=new WeakMap,qs=new WeakMap,Sr=new WeakSet,ui=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...l0(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return mc(a)&&a.revert&&b(this,oa)?{...b(this,oa),fetchStatus:"idle"}:{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),b(this,Xn).notify({query:this,type:"updated",action:e})})},zv);function l0(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:i0(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function ob(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,s=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var jr,$v,u0=($v=class extends _a{constructor(e={}){super();ye(this,jr);this.config=e,Z(this,jr,new Map)}build(e,t,s){const a=t.queryKey,u=t.queryHash??Zh(a,t);let d=this.get(u);return d||(d=new sb({client:e,queryKey:a,queryHash:u,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(d)),d}add(e){b(this,jr).has(e.queryHash)||(b(this,jr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=b(this,jr).get(e.queryHash);t&&(e.destroy(),t===e&&b(this,jr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ht.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return b(this,jr).get(e)}getAll(){return[...b(this,jr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>yg(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>yg(e,s)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jr=new WeakMap,$v),zr,fn,Ys,$r,Ji,Vv,ab=(Vv=class extends a0{constructor(e){super();ye(this,$r);ye(this,zr);ye(this,fn);ye(this,Ys);this.mutationId=e.mutationId,Z(this,fn,e.mutationCache),Z(this,zr,[]),this.state=e.state||c0(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){b(this,zr).includes(e)||(b(this,zr).push(e),this.clearGcTimeout(),b(this,fn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Z(this,zr,b(this,zr).filter(t=>t!==e)),this.scheduleGc(),b(this,fn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){b(this,zr).length||(this.state.status==="pending"?this.scheduleGc():b(this,fn).remove(this))}continue(){var e;return((e=b(this,Ys))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,m,g,v,w,_,x,L,N,k,J,z,q,ee,A,Re,pe;const t=()=>{Ue(this,$r,Ji).call(this,{type:"continue"})};Z(this,Ys,o0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(ne,Ce)=>{Ue(this,$r,Ji).call(this,{type:"failed",failureCount:ne,error:Ce})},onPause:()=>{Ue(this,$r,Ji).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>b(this,fn).canRun(this)}));const s=this.state.status==="pending",a=!b(this,Ys).canStart();try{if(s)t();else{Ue(this,$r,Ji).call(this,{type:"pending",variables:e,isPaused:a}),await((d=(u=b(this,fn).config).onMutate)==null?void 0:d.call(u,e,this));const Ce=await((p=(f=this.options).onMutate)==null?void 0:p.call(f,e));Ce!==this.state.context&&Ue(this,$r,Ji).call(this,{type:"pending",context:Ce,variables:e,isPaused:a})}const ne=await b(this,Ys).start();return await((g=(m=b(this,fn).config).onSuccess)==null?void 0:g.call(m,ne,e,this.state.context,this)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,ne,e,this.state.context)),await((x=(_=b(this,fn).config).onSettled)==null?void 0:x.call(_,ne,null,this.state.variables,this.state.context,this)),await((N=(L=this.options).onSettled)==null?void 0:N.call(L,ne,null,e,this.state.context)),Ue(this,$r,Ji).call(this,{type:"success",data:ne}),ne}catch(ne){try{throw await((J=(k=b(this,fn).config).onError)==null?void 0:J.call(k,ne,e,this.state.context,this)),await((q=(z=this.options).onError)==null?void 0:q.call(z,ne,e,this.state.context)),await((A=(ee=b(this,fn).config).onSettled)==null?void 0:A.call(ee,void 0,ne,this.state.variables,this.state.context,this)),await((pe=(Re=this.options).onSettled)==null?void 0:pe.call(Re,void 0,ne,e,this.state.context)),ne}finally{Ue(this,$r,Ji).call(this,{type:"error",error:ne})}}finally{b(this,fn).runNext(this)}}},zr=new WeakMap,fn=new WeakMap,Ys=new WeakMap,$r=new WeakSet,Ji=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ht.batch(()=>{b(this,zr).forEach(s=>{s.onMutationUpdate(e)}),b(this,fn).notify({mutation:this,type:"updated",action:e})})},Vv);function c0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pi,_r,jl,Hv,lb=(Hv=class extends _a{constructor(e={}){super();ye(this,pi);ye(this,_r);ye(this,jl);this.config=e,Z(this,pi,new Set),Z(this,_r,new Map),Z(this,jl,0)}build(e,t,s){const a=new ab({mutationCache:this,mutationId:++oc(this,jl)._,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){b(this,pi).add(e);const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t);s?s.push(e):b(this,_r).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(b(this,pi).delete(e)){const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&b(this,_r).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=lc(e);if(typeof t=="string"){const s=b(this,_r).get(t),a=s==null?void 0:s.find(u=>u.state.status==="pending");return!a||a===e}else return!0}runNext(e){var s;const t=lc(e);if(typeof t=="string"){const a=(s=b(this,_r).get(t))==null?void 0:s.find(u=>u!==e&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{b(this,pi).forEach(e=>{this.notify({type:"removed",mutation:e})}),b(this,pi).clear(),b(this,_r).clear()})}getAll(){return Array.from(b(this,pi))}find(e){const t={exact:!0,...e};return this.getAll().find(s=>gg(t,s))}findAll(e={}){return this.getAll().filter(t=>gg(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(pn))))}},pi=new WeakMap,_r=new WeakMap,jl=new WeakMap,Hv);function lc(n){var e;return(e=n.options.scope)==null?void 0:e.id}function Sg(n){return{onFetch:(e,t)=>{var g,v,w,_,x;const s=e.options,a=(w=(v=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,u=((_=e.state.data)==null?void 0:_.pages)||[],d=((x=e.state.data)==null?void 0:x.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let L=!1;const N=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(e.signal.aborted?L=!0:e.signal.addEventListener("abort",()=>{L=!0}),e.signal)})},k=n0(e.options,e.fetchOptions),J=async(z,q,ee)=>{if(L)return Promise.reject();if(q==null&&z.pages.length)return Promise.resolve(z);const Re=(()=>{const pt={client:e.client,queryKey:e.queryKey,pageParam:q,direction:ee?"backward":"forward",meta:e.options.meta};return N(pt),pt})(),pe=await k(Re),{maxPages:ne}=e.options,Ce=ee?Z1:X1;return{pages:Ce(z.pages,pe,ne),pageParams:Ce(z.pageParams,q,ne)}};if(a&&u.length){const z=a==="backward",q=z?ub:_g,ee={pages:u,pageParams:d},A=q(s,ee);f=await J(ee,A,z)}else{const z=n??u.length;do{const q=p===0?d[0]??s.initialPageParam:_g(s,f);if(p>0&&q==null)break;f=await J(f,q),p++}while(p<z)}return f};e.options.persister?e.fetchFn=()=>{var L,N;return(N=(L=e.options).persister)==null?void 0:N.call(L,m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=m}}}function _g(n,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?n.getNextPageParam(e[s],e,t[s],t):void 0}function ub(n,{pages:e,pageParams:t}){var s;return e.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,e[0],e,t[0],t):void 0}var kt,ss,os,aa,la,as,ua,ca,Wv,cb=(Wv=class{constructor(n={}){ye(this,kt);ye(this,ss);ye(this,os);ye(this,aa);ye(this,la);ye(this,as);ye(this,ua);ye(this,ca);Z(this,kt,n.queryCache||new u0),Z(this,ss,n.mutationCache||new lb),Z(this,os,n.defaultOptions||{}),Z(this,aa,new Map),Z(this,la,new Map),Z(this,as,0)}mount(){oc(this,as)._++,b(this,as)===1&&(Z(this,ua,tp.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onFocus())})),Z(this,ca,Fc.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onOnline())})))}unmount(){var n,e;oc(this,as)._--,b(this,as)===0&&((n=b(this,ua))==null||n.call(this),Z(this,ua,void 0),(e=b(this,ca))==null||e.call(this),Z(this,ca,void 0))}isFetching(n){return b(this,kt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return b(this,ss).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=b(this,kt).build(this,e),s=t.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(ps(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(n){return b(this,kt).findAll(n).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(n,e,t){const s=this.defaultQueryOptions({queryKey:n}),a=b(this,kt).get(s.queryHash),u=a==null?void 0:a.state.data,d=G1(e,u);if(d!==void 0)return b(this,kt).build(this,s).setData(d,{...t,manual:!0})}setQueriesData(n,e,t){return Ht.batch(()=>b(this,kt).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=b(this,kt);Ht.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=b(this,kt);return Ht.batch(()=>(t.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},s=Ht.batch(()=>b(this,kt).findAll(n).map(a=>a.cancel(t)));return Promise.all(s).then(pn).catch(pn)}invalidateQueries(n,e={}){return Ht.batch(()=>(b(this,kt).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},s=Ht.batch(()=>b(this,kt).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,t);return t.throwOnError||(u=u.catch(pn)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(pn)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=b(this,kt).build(this,e);return t.isStaleByTime(ps(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(pn).catch(pn)}fetchInfiniteQuery(n){return n.behavior=Sg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(pn).catch(pn)}ensureInfiniteQueryData(n){return n.behavior=Sg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Fc.isOnline()?b(this,ss).resumePausedMutations():Promise.resolve()}getQueryCache(){return b(this,kt)}getMutationCache(){return b(this,ss)}getDefaultOptions(){return b(this,os)}setDefaultOptions(n){Z(this,os,n)}setQueryDefaults(n,e){b(this,aa).set(to(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...b(this,aa).values()],t={};return e.forEach(s=>{Ml(n,s.queryKey)&&Object.assign(t,s.defaultOptions)}),t}setMutationDefaults(n,e){b(this,la).set(to(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...b(this,la).values()],t={};return e.forEach(s=>{Ml(n,s.mutationKey)&&Object.assign(t,s.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...b(this,os).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=Zh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ep&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...b(this,os).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){b(this,kt).clear(),b(this,ss).clear()}},kt=new WeakMap,ss=new WeakMap,os=new WeakMap,aa=new WeakMap,la=new WeakMap,as=new WeakMap,ua=new WeakMap,ca=new WeakMap,Wv),Mn,qe,zl,hn,Gs,da,ls,us,$l,fa,ha,Js,Xs,cs,pa,it,vl,xh,Dh,Ch,Oh,Rh,Fh,Mh,d0,Qv,db=(Qv=class extends _a{constructor(e,t){super();ye(this,it);ye(this,Mn);ye(this,qe);ye(this,zl);ye(this,hn);ye(this,Gs);ye(this,da);ye(this,ls);ye(this,us);ye(this,$l);ye(this,fa);ye(this,ha);ye(this,Js);ye(this,Xs);ye(this,cs);ye(this,pa,new Set);this.options=t,Z(this,Mn,e),Z(this,us,null),Z(this,ls,Eh()),this.options.experimental_prefetchInRender||b(this,ls).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,qe).addObserver(this),bg(b(this,qe),this.options)?Ue(this,it,vl).call(this):this.updateResult(),Ue(this,it,Oh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lh(b(this,qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lh(b(this,qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,it,Rh).call(this),Ue(this,it,Fh).call(this),b(this,qe).removeObserver(this)}setOptions(e){const t=this.options,s=b(this,qe);if(this.options=b(this,Mn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,b(this,qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,it,Mh).call(this),b(this,qe).setOptions(this.options),t._defaulted&&!Rc(this.options,t)&&b(this,Mn).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,qe),observer:this});const a=this.hasListeners();a&&Ig(b(this,qe),s,this.options,t)&&Ue(this,it,vl).call(this),this.updateResult(),a&&(b(this,qe)!==s||Ir(this.options.enabled,b(this,qe))!==Ir(t.enabled,b(this,qe))||ps(this.options.staleTime,b(this,qe))!==ps(t.staleTime,b(this,qe)))&&Ue(this,it,xh).call(this);const u=Ue(this,it,Dh).call(this);a&&(b(this,qe)!==s||Ir(this.options.enabled,b(this,qe))!==Ir(t.enabled,b(this,qe))||u!==b(this,cs))&&Ue(this,it,Ch).call(this,u)}getOptimisticResult(e){const t=b(this,Mn).getQueryCache().build(b(this,Mn),e),s=this.createResult(t,e);return hb(this,s)&&(Z(this,hn,s),Z(this,da,this.options),Z(this,Gs,b(this,qe).state)),s}getCurrentResult(){return b(this,hn)}trackResult(e,t){return new Proxy(e,{get:(s,a)=>(this.trackProp(a),t==null||t(a),Reflect.get(s,a))})}trackProp(e){b(this,pa).add(e)}getCurrentQuery(){return b(this,qe)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=b(this,Mn).defaultQueryOptions(e),s=b(this,Mn).getQueryCache().build(b(this,Mn),t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return Ue(this,it,vl).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,hn)))}createResult(e,t){var ne;const s=b(this,qe),a=this.options,u=b(this,hn),d=b(this,Gs),f=b(this,da),m=e!==s?e.state:b(this,zl),{state:g}=e;let v={...g},w=!1,_;if(t._optimisticResults){const Ce=this.hasListeners(),pt=!Ce&&bg(e,t),_t=Ce&&Ig(e,s,t,a);(pt||_t)&&(v={...v,...l0(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:x,errorUpdatedAt:L,status:N}=v;_=v.data;let k=!1;if(t.placeholderData!==void 0&&_===void 0&&N==="pending"){let Ce;u!=null&&u.isPlaceholderData&&t.placeholderData===(f==null?void 0:f.placeholderData)?(Ce=u.data,k=!0):Ce=typeof t.placeholderData=="function"?t.placeholderData((ne=b(this,ha))==null?void 0:ne.state.data,b(this,ha)):t.placeholderData,Ce!==void 0&&(N="success",_=Ih(u==null?void 0:u.data,Ce,t),w=!0)}if(t.select&&_!==void 0&&!k)if(u&&_===(d==null?void 0:d.data)&&t.select===b(this,$l))_=b(this,fa);else try{Z(this,$l,t.select),_=t.select(_),_=Ih(u==null?void 0:u.data,_,t),Z(this,fa,_),Z(this,us,null)}catch(Ce){Z(this,us,Ce)}b(this,us)&&(x=b(this,us),_=b(this,fa),L=Date.now(),N="error");const J=v.fetchStatus==="fetching",z=N==="pending",q=N==="error",ee=z&&J,A=_!==void 0,pe={status:N,fetchStatus:v.fetchStatus,isPending:z,isSuccess:N==="success",isError:q,isInitialLoading:ee,isLoading:ee,data:_,dataUpdatedAt:v.dataUpdatedAt,error:x,errorUpdatedAt:L,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:J,isRefetching:J&&!z,isLoadingError:q&&!A,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:q&&A,isStale:np(e,t),refetch:this.refetch,promise:b(this,ls)};if(this.options.experimental_prefetchInRender){const Ce=yt=>{pe.status==="error"?yt.reject(pe.error):pe.data!==void 0&&yt.resolve(pe.data)},pt=()=>{const yt=Z(this,ls,pe.promise=Eh());Ce(yt)},_t=b(this,ls);switch(_t.status){case"pending":e.queryHash===s.queryHash&&Ce(_t);break;case"fulfilled":(pe.status==="error"||pe.data!==_t.value)&&pt();break;case"rejected":(pe.status!=="error"||pe.error!==_t.reason)&&pt();break}}return pe}updateResult(){const e=b(this,hn),t=this.createResult(b(this,qe),this.options);if(Z(this,Gs,b(this,qe).state),Z(this,da,this.options),b(this,Gs).data!==void 0&&Z(this,ha,b(this,qe)),Rc(t,e))return;Z(this,hn,t);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!b(this,pa).size)return!0;const d=new Set(u??b(this,pa));return this.options.throwOnError&&d.add("error"),Object.keys(b(this,hn)).some(f=>{const p=f;return b(this,hn)[p]!==e[p]&&d.has(p)})};Ue(this,it,d0).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,it,Oh).call(this)}},Mn=new WeakMap,qe=new WeakMap,zl=new WeakMap,hn=new WeakMap,Gs=new WeakMap,da=new WeakMap,ls=new WeakMap,us=new WeakMap,$l=new WeakMap,fa=new WeakMap,ha=new WeakMap,Js=new WeakMap,Xs=new WeakMap,cs=new WeakMap,pa=new WeakMap,it=new WeakSet,vl=function(e){Ue(this,it,Mh).call(this);let t=b(this,qe).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(pn)),t},xh=function(){Ue(this,it,Rh).call(this);const e=ps(this.options.staleTime,b(this,qe));if(eo||b(this,hn).isStale||!_h(e))return;const s=e0(b(this,hn).dataUpdatedAt,e)+1;Z(this,Js,setTimeout(()=>{b(this,hn).isStale||this.updateResult()},s))},Dh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,qe)):this.options.refetchInterval)??!1},Ch=function(e){Ue(this,it,Fh).call(this),Z(this,cs,e),!(eo||Ir(this.options.enabled,b(this,qe))===!1||!_h(b(this,cs))||b(this,cs)===0)&&Z(this,Xs,setInterval(()=>{(this.options.refetchIntervalInBackground||tp.isFocused())&&Ue(this,it,vl).call(this)},b(this,cs)))},Oh=function(){Ue(this,it,xh).call(this),Ue(this,it,Ch).call(this,Ue(this,it,Dh).call(this))},Rh=function(){b(this,Js)&&(clearTimeout(b(this,Js)),Z(this,Js,void 0))},Fh=function(){b(this,Xs)&&(clearInterval(b(this,Xs)),Z(this,Xs,void 0))},Mh=function(){const e=b(this,Mn).getQueryCache().build(b(this,Mn),this.options);if(e===b(this,qe))return;const t=b(this,qe);Z(this,qe,e),Z(this,zl,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},d0=function(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(b(this,hn))}),b(this,Mn).getQueryCache().notify({query:b(this,qe),type:"observerResultsUpdated"})})},Qv);function fb(n,e){return Ir(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function bg(n,e){return fb(n,e)||n.state.data!==void 0&&Lh(n,e,e.refetchOnMount)}function Lh(n,e,t){if(Ir(e.enabled,n)!==!1&&ps(e.staleTime,n)!=="static"){const s=typeof t=="function"?t(n):t;return s==="always"||s!==!1&&np(n,e)}return!1}function Ig(n,e,t,s){return(n!==e||Ir(s.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&np(n,t)}function np(n,e){return Ir(e.enabled,n)!==!1&&n.isStaleByTime(ps(e.staleTime,n))}function hb(n,e){return!Rc(n.getCurrentResult(),e)}var ds,fs,Ln,mi,_i,yc,Ah,Kv,pb=(Kv=class extends _a{constructor(t,s){super();ye(this,_i);ye(this,ds);ye(this,fs);ye(this,Ln);ye(this,mi);Z(this,ds,t),this.setOptions(s),this.bindMethods(),Ue(this,_i,yc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var a;const s=this.options;this.options=b(this,ds).defaultMutationOptions(t),Rc(this.options,s)||b(this,ds).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,Ln),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&to(s.mutationKey)!==to(this.options.mutationKey)?this.reset():((a=b(this,Ln))==null?void 0:a.state.status)==="pending"&&b(this,Ln).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=b(this,Ln))==null||t.removeObserver(this)}onMutationUpdate(t){Ue(this,_i,yc).call(this),Ue(this,_i,Ah).call(this,t)}getCurrentResult(){return b(this,fs)}reset(){var t;(t=b(this,Ln))==null||t.removeObserver(this),Z(this,Ln,void 0),Ue(this,_i,yc).call(this),Ue(this,_i,Ah).call(this)}mutate(t,s){var a;return Z(this,mi,s),(a=b(this,Ln))==null||a.removeObserver(this),Z(this,Ln,b(this,ds).getMutationCache().build(b(this,ds),this.options)),b(this,Ln).addObserver(this),b(this,Ln).execute(t)}},ds=new WeakMap,fs=new WeakMap,Ln=new WeakMap,mi=new WeakMap,_i=new WeakSet,yc=function(){var s;const t=((s=b(this,Ln))==null?void 0:s.state)??c0();Z(this,fs,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Ah=function(t){Ht.batch(()=>{var s,a,u,d,f,p,m,g;if(b(this,mi)&&this.hasListeners()){const v=b(this,fs).variables,w=b(this,fs).context;(t==null?void 0:t.type)==="success"?((a=(s=b(this,mi)).onSuccess)==null||a.call(s,t.data,v,w),(d=(u=b(this,mi)).onSettled)==null||d.call(u,t.data,null,v,w)):(t==null?void 0:t.type)==="error"&&((p=(f=b(this,mi)).onError)==null||p.call(f,t.error,v,w),(g=(m=b(this,mi)).onSettled)==null||g.call(m,void 0,t.error,v,w))}this.listeners.forEach(v=>{v(b(this,fs))})})},Kv),f0=R.createContext(void 0),rp=n=>{const e=R.useContext(f0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},mb=({client:n,children:e})=>(R.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),U.jsx(f0.Provider,{value:n,children:e})),h0=R.createContext(!1),yb=()=>R.useContext(h0);h0.Provider;function gb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var vb=R.createContext(gb()),wb=()=>R.useContext(vb),Sb=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},_b=n=>{R.useEffect(()=>{n.clearReset()},[n])},bb=({result:n,errorResetBoundary:e,throwOnError:t,query:s,suspense:a})=>n.isError&&!e.isReset()&&!n.isFetching&&s&&(a&&n.data===void 0||r0(t,[n.error,s])),Ib=n=>{if(n.suspense){const e=s=>s==="static"?s:Math.max(s??1e3,1e3),t=n.staleTime;n.staleTime=typeof t=="function"?(...s)=>e(t(...s)):e(t),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Eb=(n,e)=>n.isLoading&&n.isFetching&&!e,xb=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,Eg=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function Db(n,e,t){var v,w,_,x,L;const s=yb(),a=wb(),u=rp(),d=u.defaultQueryOptions(n);(w=(v=u.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||w.call(v,d),d._optimisticResults=s?"isRestoring":"optimistic",Ib(d),Sb(d,a),_b(a);const f=!u.getQueryCache().get(d.queryHash),[p]=R.useState(()=>new e(u,d)),m=p.getOptimisticResult(d),g=!s&&n.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(N=>{const k=g?p.subscribe(Ht.batchCalls(N)):pn;return p.updateResult(),k},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),R.useEffect(()=>{p.setOptions(d)},[d,p]),xb(d,m))throw Eg(d,p,a);if(bb({result:m,errorResetBoundary:a,throwOnError:d.throwOnError,query:u.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw m.error;if((x=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||x.call(_,d,m),d.experimental_prefetchInRender&&!eo&&Eb(m,s)){const N=f?Eg(d,p,a):(L=u.getQueryCache().get(d.queryHash))==null?void 0:L.promise;N==null||N.catch(pn).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?m:p.trackResult(m)}function Cb(n,e){return Db(n,db)}function Ob(n,e){const t=rp(),[s]=R.useState(()=>new pb(t,n));R.useEffect(()=>{s.setOptions(n)},[s,n]);const a=R.useSyncExternalStore(R.useCallback(d=>s.subscribe(Ht.batchCalls(d)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=R.useCallback((d,f)=>{s.mutate(d,f).catch(pn)},[s]);if(a.error&&r0(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}const Rb=function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),Fb=function(n){return"/"+n},xg={},vn=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let d=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=d(t.map(m=>{if(m=Fb(m),m in xg)return;xg[m]=!0;const g=m.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const w=document.createElement("link");if(w.rel=g?"stylesheet":Rb,g||(w.as="script"),w.crossOrigin="",w.href=m,p&&w.setAttribute("nonce",p),document.head.appendChild(w),g)return new Promise((_,x)=>{w.addEventListener("load",_),w.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return e().catch(u)})};var fl={},Dg;function Mb(){if(Dg)return fl;Dg=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.parse=d,fl.serialize=m;const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,e=/^[\u0021-\u003A\u003C-\u007E]*$/,t=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,u=(()=>{const w=function(){};return w.prototype=Object.create(null),w})();function d(w,_){const x=new u,L=w.length;if(L<2)return x;const N=(_==null?void 0:_.decode)||g;let k=0;do{const J=w.indexOf("=",k);if(J===-1)break;const z=w.indexOf(";",k),q=z===-1?L:z;if(J>q){k=w.lastIndexOf(";",J-1)+1;continue}const ee=f(w,k,J),A=p(w,J,ee),Re=w.slice(ee,A);if(x[Re]===void 0){let pe=f(w,J+1,q),ne=p(w,q,pe);const Ce=N(w.slice(pe,ne));x[Re]=Ce}k=q+1}while(k<L);return x}function f(w,_,x){do{const L=w.charCodeAt(_);if(L!==32&&L!==9)return _}while(++_<x);return x}function p(w,_,x){for(;_>x;){const L=w.charCodeAt(--_);if(L!==32&&L!==9)return _+1}return x}function m(w,_,x){const L=(x==null?void 0:x.encode)||encodeURIComponent;if(!n.test(w))throw new TypeError(`argument name is invalid: ${w}`);const N=L(_);if(!e.test(N))throw new TypeError(`argument val is invalid: ${_}`);let k=w+"="+N;if(!x)return k;if(x.maxAge!==void 0){if(!Number.isInteger(x.maxAge))throw new TypeError(`option maxAge is invalid: ${x.maxAge}`);k+="; Max-Age="+x.maxAge}if(x.domain){if(!t.test(x.domain))throw new TypeError(`option domain is invalid: ${x.domain}`);k+="; Domain="+x.domain}if(x.path){if(!s.test(x.path))throw new TypeError(`option path is invalid: ${x.path}`);k+="; Path="+x.path}if(x.expires){if(!v(x.expires)||!Number.isFinite(x.expires.valueOf()))throw new TypeError(`option expires is invalid: ${x.expires}`);k+="; Expires="+x.expires.toUTCString()}if(x.httpOnly&&(k+="; HttpOnly"),x.secure&&(k+="; Secure"),x.partitioned&&(k+="; Partitioned"),x.priority)switch(typeof x.priority=="string"?x.priority.toLowerCase():void 0){case"low":k+="; Priority=Low";break;case"medium":k+="; Priority=Medium";break;case"high":k+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${x.priority}`)}if(x.sameSite)switch(typeof x.sameSite=="string"?x.sameSite.toLowerCase():x.sameSite){case!0:case"strict":k+="; SameSite=Strict";break;case"lax":k+="; SameSite=Lax";break;case"none":k+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${x.sameSite}`)}return k}function g(w){if(w.indexOf("%")===-1)return w;try{return decodeURIComponent(w)}catch{return w}}function v(w){return a.call(w)==="[object Date]"}return fl}Mb();/**
|
|
44
44
|
* react-router v7.6.1
|
|
45
45
|
*
|
|
46
46
|
* Copyright (c) Remix Software Inc.
|
|
@@ -55,4 +55,4 @@ Error generating stack: `+h.message+`
|
|
|
55
55
|
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let v=io(),w;w=v;let _=w.pathname||"/",x=_;if(m!=="/"){let k=m.replace(/^\//,"").split("/");x="/"+_.replace(/^\//,"").split("/").slice(k.length).join("/")}let L=ns(n,{pathname:x});return jt(g||L!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),jt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),VI(L&&L.map(k=>Object.assign({},k,{params:Object.assign({},f,k.params),pathname:Kr([m,a.encodeLocation?a.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?m:Kr([m,a.encodeLocation?a.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),u,t,s)}function UI(){let n=qI(),e=Al(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:u},"ErrorBoundary")," or"," ",R.createElement("code",{style:u},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},e),t?R.createElement("pre",{style:a},t):null,d)}var jI=R.createElement(UI,null),zI=class extends R.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){console.error("React Router caught the following error during render",n,e)}render(){return this.state.error!==void 0?R.createElement(Or.Provider,{value:this.props.routeContext},R.createElement(up.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function $I({routeContext:n,match:e,children:t}){let s=R.useContext(ro);return s&&s.static&&s.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=e.route.id),R.createElement(Or.Provider,{value:n},t)}function VI(n,e=[],t=null,s=null){if(n==null){if(!t)return null;if(t.errors)n=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let a=n,u=t==null?void 0:t.errors;if(u!=null){let p=a.findIndex(m=>m.route.id&&(u==null?void 0:u[m.route.id])!==void 0);Qe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,p+1))}let d=!1,f=-1;if(t)for(let p=0;p<a.length;p++){let m=a[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=p),m.route.id){let{loaderData:g,errors:v}=t,w=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||w){d=!0,f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((p,m,g)=>{let v,w=!1,_=null,x=null;t&&(v=u&&m.route.id?u[m.route.id]:void 0,_=m.route.errorElement||jI,d&&(f<0&&g===0?(L0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,x=null):f===g&&(w=!0,x=m.route.hydrateFallbackElement||null)));let L=e.concat(a.slice(0,g+1)),N=()=>{let k;return v?k=_:w?k=x:m.route.Component?k=R.createElement(m.route.Component,null):m.route.element?k=m.route.element:k=p,R.createElement($I,{match:m,routeContext:{outlet:p,matches:L,isDataRoute:t!=null},children:k})};return t&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?R.createElement(zI,{location:t.location,revalidation:t.revalidation,component:_,error:v,children:N(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):N()},null)}function cp(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HI(n){let e=R.useContext(ro);return Qe(e,cp(n)),e}function WI(n){let e=R.useContext(Vl);return Qe(e,cp(n)),e}function QI(n){let e=R.useContext(Or);return Qe(e,cp(n)),e}function dp(n){let e=QI(n),t=e.matches[e.matches.length-1];return Qe(t.route.id,`${n} can only be used on routes that contain a unique "id"`),t.route.id}function KI(){return dp("useRouteId")}function qI(){var s;let n=R.useContext(up),e=WI("useRouteError"),t=dp("useRouteError");return n!==void 0?n:(s=e.errors)==null?void 0:s[t]}function YI(){let{router:n}=HI("useNavigate"),e=dp("useNavigate"),t=R.useRef(!1);return M0(()=>{t.current=!0}),R.useCallback(async(a,u={})=>{jt(t.current,F0),t.current&&(typeof a=="number"?n.navigate(a):await n.navigate(a,{fromRouteId:e,...u}))},[n,e])}var Wg={};function L0(n,e,t){!e&&!Wg[n]&&(Wg[n]=!0,jt(!1,t))}var Qg={};function Kg(n,e){!n&&!Qg[e]&&(Qg[e]=!0,console.warn(e))}function GI(n){let e={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:R.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:R.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:R.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),e}var JI=["HydrateFallback","hydrateFallbackElement"],XI=class{constructor(){this.status="pending",this.promise=new Promise((n,e)=>{this.resolve=t=>{this.status==="pending"&&(this.status="resolved",n(t))},this.reject=t=>{this.status==="pending"&&(this.status="rejected",e(t))}})}};function ZI({router:n,flushSync:e}){let[t,s]=R.useState(n.state),[a,u]=R.useState(),[d,f]=R.useState({isTransitioning:!1}),[p,m]=R.useState(),[g,v]=R.useState(),[w,_]=R.useState(),x=R.useRef(new Map),L=R.useCallback((z,{deletedFetchers:q,flushSync:ee,viewTransitionOpts:A})=>{z.fetchers.forEach((pe,ne)=>{pe.data!==void 0&&x.current.set(ne,pe.data)}),q.forEach(pe=>x.current.delete(pe)),Kg(ee===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Re=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Kg(A==null||Re,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!A||!Re){e&&ee?e(()=>s(z)):R.startTransition(()=>s(z));return}if(e&&ee){e(()=>{g&&(p&&p.resolve(),g.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:A.currentLocation,nextLocation:A.nextLocation})});let pe=n.window.document.startViewTransition(()=>{e(()=>s(z))});pe.finished.finally(()=>{e(()=>{m(void 0),v(void 0),u(void 0),f({isTransitioning:!1})})}),e(()=>v(pe));return}g?(p&&p.resolve(),g.skipTransition(),_({state:z,currentLocation:A.currentLocation,nextLocation:A.nextLocation})):(u(z),f({isTransitioning:!0,flushSync:!1,currentLocation:A.currentLocation,nextLocation:A.nextLocation}))},[n.window,e,g,p]);R.useLayoutEffect(()=>n.subscribe(L),[n,L]),R.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new XI)},[d]),R.useEffect(()=>{if(p&&a&&n.window){let z=a,q=p.promise,ee=n.window.document.startViewTransition(async()=>{R.startTransition(()=>s(z)),await q});ee.finished.finally(()=>{m(void 0),v(void 0),u(void 0),f({isTransitioning:!1})}),v(ee)}},[a,p,n.window]),R.useEffect(()=>{p&&a&&t.location.key===a.location.key&&p.resolve()},[p,g,t.location,a]),R.useEffect(()=>{!d.isTransitioning&&w&&(u(w.state),f({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),_(void 0))},[d.isTransitioning,w]);let N=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:z=>n.navigate(z),push:(z,q,ee)=>n.navigate(z,{state:q,preventScrollReset:ee==null?void 0:ee.preventScrollReset}),replace:(z,q,ee)=>n.navigate(z,{replace:!0,state:q,preventScrollReset:ee==null?void 0:ee.preventScrollReset})}),[n]),k=n.basename||"/",J=R.useMemo(()=>({router:n,navigator:N,static:!1,basename:k}),[n,N,k]);return R.createElement(R.Fragment,null,R.createElement(ro.Provider,{value:J},R.createElement(Vl.Provider,{value:t},R.createElement(R0.Provider,{value:x.current},R.createElement(lp.Provider,{value:d},R.createElement(nE,{basename:k,location:t.location,navigationType:t.historyAction,navigator:N},R.createElement(eE,{routes:n.routes,future:n.future,state:t})))))),null)}var eE=R.memo(tE);function tE({routes:n,future:e,state:t}){return BI(n,void 0,t,e)}function DO(n){return NI(n.context)}function nE({basename:n="/",children:e=null,location:t,navigationType:s="POP",navigator:a,static:u=!1}){Qe(!Hl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),f=R.useMemo(()=>({basename:d,navigator:a,static:u,future:{}}),[d,a,u]);typeof t=="string"&&(t=vs(t));let{pathname:p="/",search:m="",hash:g="",state:v=null,key:w="default"}=t,_=R.useMemo(()=>{let x=ir(p,d);return x==null?null:{location:{pathname:x,search:m,hash:g,state:v,key:w},navigationType:s}},[d,p,m,g,v,w,s]);return jt(_!=null,`<Router basename="${d}"> is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:R.createElement(Jr.Provider,{value:f},R.createElement(fd.Provider,{children:e,value:_}))}var vc="get",wc="application/x-www-form-urlencoded";function hd(n){return n!=null&&typeof n.tagName=="string"}function rE(n){return hd(n)&&n.tagName.toLowerCase()==="button"}function iE(n){return hd(n)&&n.tagName.toLowerCase()==="form"}function sE(n){return hd(n)&&n.tagName.toLowerCase()==="input"}function oE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function aE(n,e){return n.button===0&&(!e||e==="_self")&&!oE(n)}var cc=null;function lE(){if(cc===null)try{new FormData(document.createElement("form"),0),cc=!1}catch{cc=!0}return cc}var uE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fh(n){return n!=null&&!uE.has(n)?(jt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wc}"`),null):n}function cE(n,e){let t,s,a,u,d;if(iE(n)){let f=n.getAttribute("action");s=f?ir(f,e):null,t=n.getAttribute("method")||vc,a=fh(n.getAttribute("enctype"))||wc,u=new FormData(n)}else if(rE(n)||sE(n)&&(n.type==="submit"||n.type==="image")){let f=n.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||f.getAttribute("action");if(s=p?ir(p,e):null,t=n.getAttribute("formmethod")||f.getAttribute("method")||vc,a=fh(n.getAttribute("formenctype"))||fh(f.getAttribute("enctype"))||wc,u=new FormData(f,n),!lE()){let{name:m,type:g,value:v}=n;if(g==="image"){let w=m?`${m}.`:"";u.append(`${w}x`,"0"),u.append(`${w}y`,"0")}else m&&u.append(m,v)}}else{if(hd(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=vc,s=null,a=wc,d=n}return u&&a==="text/plain"&&(d=u,u=void 0),{action:s,method:t.toLowerCase(),encType:a,formData:u,body:d}}function fp(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}async function dE(n,e){if(n.id in e)return e[n.id];try{let t=await import(n.module);return e[n.id]=t,t}catch(t){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fE(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function hE(n,e,t){let s=await Promise.all(n.map(async a=>{let u=e.routes[a.route.id];if(u){let d=await dE(u,t);return d.links?d.links():[]}return[]}));return gE(s.flat(1).filter(fE).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function qg(n,e,t,s,a,u){let d=(p,m)=>t[m]?p.route.id!==t[m].route.id:!0,f=(p,m)=>{var g;return t[m].pathname!==p.pathname||((g=t[m].route.path)==null?void 0:g.endsWith("*"))&&t[m].params["*"]!==p.params["*"]};return u==="assets"?e.filter((p,m)=>d(p,m)||f(p,m)):u==="data"?e.filter((p,m)=>{var v;let g=s.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(d(p,m)||f(p,m))return!0;if(p.route.shouldRevalidate){let w=p.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((v=t[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function pE(n,e,{includeHydrateFallback:t}={}){return mE(n.map(s=>{let a=e.routes[s.route.id];if(!a)return[];let u=[a.module];return a.clientActionModule&&(u=u.concat(a.clientActionModule)),a.clientLoaderModule&&(u=u.concat(a.clientLoaderModule)),t&&a.hydrateFallbackModule&&(u=u.concat(a.hydrateFallbackModule)),a.imports&&(u=u.concat(a.imports)),u}).flat(1))}function mE(n){return[...new Set(n)]}function yE(n){let e={},t=Object.keys(n).sort();for(let s of t)e[s]=n[s];return e}function gE(n,e){let t=new Set;return new Set(e),n.reduce((s,a)=>{let u=JSON.stringify(yE(a));return t.has(u)||(t.add(u),s.push({key:u,link:a})),s},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vE=new Set([100,101,204,205]);function wE(n,e){let t=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return t.pathname==="/"?t.pathname="_root.data":e&&ir(t.pathname,e)==="/"?t.pathname=`${e.replace(/\/$/,"")}/_root.data`:t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function A0(){let n=R.useContext(ro);return fp(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function SE(){let n=R.useContext(Vl);return fp(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var hp=R.createContext(void 0);hp.displayName="FrameworkContext";function k0(){let n=R.useContext(hp);return fp(n,"You must render this element inside a <HydratedRouter> element"),n}function _E(n,e){let t=R.useContext(hp),[s,a]=R.useState(!1),[u,d]=R.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:v}=e,w=R.useRef(null);R.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let L=k=>{k.forEach(J=>{d(J.isIntersecting)})},N=new IntersectionObserver(L,{threshold:.5});return w.current&&N.observe(w.current),()=>{N.disconnect()}}},[n]),R.useEffect(()=>{if(s){let L=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(L)}}},[s]);let _=()=>{a(!0)},x=()=>{a(!1),d(!1)};return t?n!=="intent"?[u,w,{}]:[u,w,{onFocus:ml(f,_),onBlur:ml(p,x),onMouseEnter:ml(m,_),onMouseLeave:ml(g,x),onTouchStart:ml(v,_)}]:[!1,w,{}]}function ml(n,e){return t=>{n&&n(t),t.defaultPrevented||e(t)}}function bE({page:n,...e}){let{router:t}=A0(),s=R.useMemo(()=>ns(t.routes,n,t.basename),[t.routes,n,t.basename]);return s?R.createElement(EE,{page:n,matches:s,...e}):null}function IE(n){let{manifest:e,routeModules:t}=k0(),[s,a]=R.useState([]);return R.useEffect(()=>{let u=!1;return hE(n,e,t).then(d=>{u||a(d)}),()=>{u=!0}},[n,e,t]),s}function EE({page:n,matches:e,...t}){let s=io(),{manifest:a,routeModules:u}=k0(),{basename:d}=A0(),{loaderData:f,matches:p}=SE(),m=R.useMemo(()=>qg(n,e,p,a,s,"data"),[n,e,p,a,s]),g=R.useMemo(()=>qg(n,e,p,a,s,"assets"),[n,e,p,a,s]),v=R.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let x=new Set,L=!1;if(e.forEach(k=>{var z;let J=a.routes[k.route.id];!J||!J.hasLoader||(!m.some(q=>q.route.id===k.route.id)&&k.route.id in f&&((z=u[k.route.id])!=null&&z.shouldRevalidate)||J.hasClientLoader?L=!0:x.add(k.route.id))}),x.size===0)return[];let N=wE(n,d);return L&&x.size>0&&N.searchParams.set("_routes",e.filter(k=>x.has(k.route.id)).map(k=>k.route.id).join(",")),[N.pathname+N.search]},[d,f,s,a,m,e,n,u]),w=R.useMemo(()=>pE(g,a),[g,a]),_=IE(g);return R.createElement(R.Fragment,null,v.map(x=>R.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...t})),w.map(x=>R.createElement("link",{key:x,rel:"modulepreload",href:x,...t})),_.map(({key:x,link:L})=>R.createElement("link",{key:x,...L})))}function xE(...n){return e=>{n.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var P0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{P0&&(window.__reactRouterVersion="7.6.1")}catch{}function DE(n,e){return hI({basename:e==null?void 0:e.basename,unstable_getContext:e==null?void 0:e.unstable_getContext,future:e==null?void 0:e.future,history:kb({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||CE(),routes:n,mapRouteProperties:GI,hydrationRouteProperties:JI,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function CE(){let n=window==null?void 0:window.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:OE(n.errors)}),n}function OE(n){if(!n)return null;let e=Object.entries(n),t={};for(let[s,a]of e)if(a&&a.__type==="RouteErrorResponse")t[s]=new Ac(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let u=window[a.__subType];if(typeof u=="function")try{let d=new u(a.message);d.stack="",t[s]=d}catch{}}if(t[s]==null){let u=new Error(a.message);u.stack="",t[s]=u}}else t[s]=a;return t}var T0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pp=R.forwardRef(function({onClick:e,discover:t="render",prefetch:s="none",relative:a,reloadDocument:u,replace:d,state:f,target:p,to:m,preventScrollReset:g,viewTransition:v,...w},_){let{basename:x}=R.useContext(Jr),L=typeof m=="string"&&T0.test(m),N,k=!1;if(typeof m=="string"&&L&&(N=m,P0))try{let ne=new URL(window.location.href),Ce=m.startsWith("//")?new URL(ne.protocol+m):new URL(m),pt=ir(Ce.pathname,x);Ce.origin===ne.origin&&pt!=null?m=pt+Ce.search+Ce.hash:k=!0}catch{jt(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let J=AI(m,{relative:a}),[z,q,ee]=_E(s,w),A=LE(m,{replace:d,state:f,target:p,preventScrollReset:g,relative:a,viewTransition:v});function Re(ne){e&&e(ne),ne.defaultPrevented||A(ne)}let pe=R.createElement("a",{...w,...ee,href:N||J,onClick:k||u?e:Re,ref:xE(_,q),target:p,"data-discover":!L&&t==="render"?"true":void 0});return z&&!L?R.createElement(R.Fragment,null,pe,R.createElement(bE,{page:J})):pe});pp.displayName="Link";var RE=R.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:s="",end:a=!1,style:u,to:d,viewTransition:f,children:p,...m},g){let v=Wl(d,{relative:m.relative}),w=io(),_=R.useContext(Vl),{navigator:x,basename:L}=R.useContext(Jr),N=_!=null&&NE(v)&&f===!0,k=x.encodeLocation?x.encodeLocation(v).pathname:v.pathname,J=w.pathname,z=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;t||(J=J.toLowerCase(),z=z?z.toLowerCase():null,k=k.toLowerCase()),z&&L&&(z=ir(z,L)||z);const q=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let ee=J===k||!a&&J.startsWith(k)&&J.charAt(q)==="/",A=z!=null&&(z===k||!a&&z.startsWith(k)&&z.charAt(k.length)==="/"),Re={isActive:ee,isPending:A,isTransitioning:N},pe=ee?e:void 0,ne;typeof s=="function"?ne=s(Re):ne=[s,ee?"active":null,A?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof u=="function"?u(Re):u;return R.createElement(pp,{...m,"aria-current":pe,className:ne,ref:g,style:Ce,to:d,viewTransition:f},typeof p=="function"?p(Re):p)});RE.displayName="NavLink";var FE=R.forwardRef(({discover:n="render",fetcherKey:e,navigate:t,reloadDocument:s,replace:a,state:u,method:d=vc,action:f,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:v,...w},_)=>{let x=PE(),L=TE(f,{relative:m}),N=d.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&T0.test(f),J=z=>{if(p&&p(z),z.defaultPrevented)return;z.preventDefault();let q=z.nativeEvent.submitter,ee=(q==null?void 0:q.getAttribute("formmethod"))||d;x(q||z.currentTarget,{fetcherKey:e,method:ee,navigate:t,replace:a,state:u,relative:m,preventScrollReset:g,viewTransition:v})};return R.createElement("form",{ref:_,method:N,action:L,onSubmit:s?p:J,...w,"data-discover":!k&&n==="render"?"true":void 0})});FE.displayName="Form";function ME(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function N0(n){let e=R.useContext(ro);return Qe(e,ME(n)),e}function LE(n,{target:e,replace:t,state:s,preventScrollReset:a,relative:u,viewTransition:d}={}){let f=kI(),p=io(),m=Wl(n,{relative:u});return R.useCallback(g=>{if(aE(g,e)){g.preventDefault();let v=t!==void 0?t:ms(p)===ms(m);f(n,{replace:v,state:s,preventScrollReset:a,relative:u,viewTransition:d})}},[p,f,m,t,s,e,n,a,u,d])}var AE=0,kE=()=>`__${String(++AE)}__`;function PE(){let{router:n}=N0("useSubmit"),{basename:e}=R.useContext(Jr),t=KI();return R.useCallback(async(s,a={})=>{let{action:u,method:d,encType:f,formData:p,body:m}=cE(s,e);if(a.navigate===!1){let g=a.fetcherKey||kE();await n.fetch(g,t,a.action||u,{preventScrollReset:a.preventScrollReset,formData:p,body:m,formMethod:a.method||d,formEncType:a.encType||f,flushSync:a.flushSync})}else await n.navigate(a.action||u,{preventScrollReset:a.preventScrollReset,formData:p,body:m,formMethod:a.method||d,formEncType:a.encType||f,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,e,t])}function TE(n,{relative:e}={}){let{basename:t}=R.useContext(Jr),s=R.useContext(Or);Qe(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),u={...Wl(n||".",{relative:e})},d=io();if(n==null){u.search=d.search;let f=new URLSearchParams(u.search),p=f.getAll("index");if(p.some(g=>g==="")){f.delete("index"),p.filter(v=>v).forEach(v=>f.append("index",v));let g=f.toString();u.search=g?`?${g}`:""}}return(!n||n===".")&&a.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(u.pathname=u.pathname==="/"?t:Kr([t,u.pathname])),ms(u)}function NE(n,e={}){let t=R.useContext(lp);Qe(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=N0("useViewTransitionState"),a=Wl(n,{relative:e.relative});if(!t.isTransitioning)return!1;let u=ir(t.currentLocation.pathname,s)||t.currentLocation.pathname,d=ir(t.nextLocation.pathname,s)||t.nextLocation.pathname;return Lc(a.pathname,d)!=null||Lc(a.pathname,u)!=null}[...vE];function B0(n){var e,t,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(e=0;e<a;e++)n[e]&&(t=B0(n[e]))&&(s&&(s+=" "),s+=t)}else for(t in n)n[t]&&(s&&(s+=" "),s+=t);return s}function qr(){for(var n,e,t=0,s="",a=arguments.length;t<a;t++)(n=arguments[t])&&(e=B0(n))&&(s&&(s+=" "),s+=e);return s}const Tt={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl"},ft={Primary:"primary",Alternative:"alternative",Secondary:"secondary",Success:"success",Danger:"danger",Warning:"warning",Info:"info",Neutral:"neutral"},CO={Left:"left",Right:"right"},Yg=new Map([[Tt.sm,""],[Tt.md,"-2"],[Tt.lg,"-4"]]);function Gg({size:n=Tt.sm,orientation:e="horizontal",className:t}){return U.jsx("span",{className:qr(["block border-divider",e==="horizontal"&&`w-full border-b${Yg.get(n)??""}`,e==="vertical"&&`h-full border-r${Yg.get(n)??""}`],t)})}const U0=function({children:e}){return U.jsx(U.Fragment,{children:e})};function BE({children:n,layout:e="vertical"}){return U.jsx("div",{className:qr("font-sans w-full h-full flex overflow-hidden",e==="horizontal"?"flex-row":"flex-col"),children:n})}U0.Page=BE;const OO={Circle:"circle"},RO={Ghost:"ghost"},UE=new Map([["primary","border-primary-500 bg-primary-500 hover:bg-primary-400 active:bg-primary-400 text-light"],["alternative","border-neutral-300 bg-neutral-5 hover:bg-neutral-20 active:bg-neutral-200 text-neutral-600"],["secondary","border-secondary-500 bg-secondary-500 hover:bg-secondary-600 active:bg-secondary-400 text-neutral-100"],["success","border-success-500 bg-success-500 hover:bg-success-600 active:bg-success-400 text-neutral-100"],["danger","border-danger-500 bg-danger-500 hover:bg-danger-600 active:bg-danger-400 text-neutral-100"],["warning","border-warning-500 bg-warning-500 hover:bg-warning-600 active:bg-warning-400 text-neutral-100"],["neutral","border-neutral-200 bg-neutral-200 hover:bg-neutral-300 active:bg-neutral-300 text-primary-900"],["info","border-transparent bg-neutral-10 dark:bg-neutral-20 active:bg-neutral-10 text-neutral-700 dark:text-neutral-200"]]),jE=new Map([["rounded","rounded-md"],["square","rounded-none"],["circle","rounded-full"]]),zE=new Map([[Tt.xs,"text-xs leading-2 border"],[Tt.sm,"px-2 py-[0.125rem] text-xs leading-4 border-2"],[Tt.md,"px-3 py-2 text-base leading-6 border-2"],[Tt.lg,"px-4 py-3 text-lg border-4"]]),FO=j0(Zs.forwardRef(VE)),$E=j0(Zs.forwardRef(HE));function VE({type:n="button",disabled:e=!1,children:t=[],form:s,autoFocus:a,tabIndex:u,onClick:d,className:f},p){return U.jsx("button",{ref:p,type:n,autoFocus:a,tabIndex:u,form:s,disabled:e,onClick:d,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),m.stopPropagation(),d==null||d(m))},className:f,children:t})}function HE({children:n=[],autoFocus:e,tabIndex:t,className:s},a){return U.jsx("div",{ref:a,autoFocus:e,tabIndex:t,className:s,children:n})}function j0(n){return Zs.forwardRef(function({type:t="button",disabled:s=!1,variant:a="primary",shape:u="rounded",size:d=Tt.md,children:f=[],className:p,form:m,autoFocus:g,tabIndex:v,onClick:w},_){return U.jsx(n,{ref:_,type:t,disabled:s,form:m,autoFocus:g,tabIndex:v,onClick:w,className:qr("whitespace-nowrap flex m-1 items-center justify-center font-bold","focus:ring-4 focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",jE.get(u),zE.get(d),s?"opacity-50 bg-neutral-10 dark:bg-neutral-20 border-transparent text-prose cursor-not-allowed":UE.get(a),p),children:f})})}function Fn({description:n,link:e,headline:t="Not Found",message:s="Go Back Home"}){return U.jsx(U0.Page,{children:U.jsx("div",{className:"flex items-center justify-center w-full h-full",children:U.jsxs("div",{className:"text-center",children:[U.jsx("h1",{className:"text-[4rem] md:text-[6rem] lg:text-[9rem] text-secondary-10 dark:text-primary-10 mb-4",children:t}),yn(n)&&U.jsx("p",{className:"mb-10 py-5 px-4 text-neutral-70 dark:text-primary-70 w-full bg-primary-10 rounded-md",children:n}),yn(e)&&U.jsx("div",{className:"inline-block",children:U.jsx($E,{variant:ft.Alternative,children:U.jsx(pp,{to:e,children:s})})})]})})})}function $s({style:n,className:e,variant:t=ft.Info}){return U.jsxs("svg",{style:n,className:qr("animate-spin bg-transparent rounded-full",e),viewBox:"0 0 64 64",xmlns:"http://www.w3.org/2000/svg","aria-label":"Loading",role:"img",children:[U.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 59.7128C31.3054 68.5494 50.8763 63.3054 59.7128 48C68.5494 32.6946 63.3054 13.1237 48 4.28719C32.6946 -4.54937 13.1237 0.694636 4.28719 16C-4.54937 31.3054 0.694637 50.8763 16 59.7128ZM23 47.5885C31.6093 52.559 42.6179 49.6093 47.5885 41C52.559 32.3907 49.6093 21.3821 41 16.4115C32.3907 11.441 21.3821 14.3907 16.4115 23C11.441 31.6093 14.3907 42.6179 23 47.5885Z",className:"fill-theme-lighter"}),U.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.5827 26.5161C49.2259 21.9157 46.1691 17.8082 41.6875 15.2208C37.4263 12.7606 32.6191 12.103 28.1488 13.0114L25.1365 1.76921C32.4854 0.0988895 40.4586 1.08788 47.5 5.15321C54.7617 9.34574 59.6854 16.0326 61.8138 23.5067L50.5827 26.5161Z",className:qr(t===ft.Primary&&"fill-primary-500",t===ft.Secondary&&"fill-secondary-500",t===ft.Success&&"fill-success-500",t===ft.Warning&&"fill-warning-500",t===ft.Danger&&"fill-danger-500",t===ft.Info&&"fill-neutral-500"),stroke:qr(t===ft.Primary&&"var(--color-primary-500)",t===ft.Secondary&&"var(--color-secondary-500)",t===ft.Success&&"var(--color-success-500)",t===ft.Warning&&"var(--color-warning-500)",t===ft.Danger&&"var(--color-danger-500)",t===ft.Info&&"var(--color-neutral-500)"),strokeWidth:"4"})]})}function WE({as:n="p",size:e=Tt.sm,variant:t=ft.Info,text:s,className:a}){const u=n;return U.jsx(u,{className:qr("font-bold whitespace-nowrap",t===ft.Primary&&"text-primary-600 dark:text-primary-400",t===ft.Secondary&&"text-secondary-600 dark:text-secondary-400",t===ft.Success&&"text-success-600 dark:text-success-400",t===ft.Warning&&"text-warning-600 dark:text-warning-400",t===ft.Danger&&"text-danger-600 dark:text-danger-400",t===ft.Info&&"text-neutral-600 dark:text-neutral-400",e===Tt.xs&&"text-xs",e===Tt.sm&&"text-md",e===Tt.md&&"text-lg",e===Tt.lg&&"text-2xl",e===Tt.xl&&"text-4xl",a),children:s})}function Bo({hasSpinner:n=!1,size:e=Tt.sm,variant:t=ft.Info,text:s,children:a,className:u}){return U.jsx("span",{className:qr(t===ft.Primary&&"text-primary-600 dark:text-primary-400",t===ft.Secondary&&"text-secondary-600 dark:text-secondary-400",t===ft.Success&&"text-success-600 dark:text-success-400",t===ft.Warning&&"text-warning-600 dark:text-warning-400",t===ft.Danger&&"text-danger-600 dark:text-danger-400",t===ft.Info&&"text-neutral-600 dark:text-neutral-400",u),children:U.jsxs("span",{className:"flex items-center w-full",children:[n&&U.jsx($s,{variant:t,className:qr(e===Tt.xs&&"w-2 h-2 mr-2",e===Tt.sm&&"w-3 h-3 mr-2",e===Tt.md&&"w-4 h-4 mr-2",e===Tt.lg&&"w-5 h-5 mr-4",e===Tt.xl&&"w-6 h-6 mr-4")}),yn(s)?U.jsx(WE,{size:e,variant:t,text:s}):a]})})}var Jg=function(){return Jg=Object.assign||function(e){for(var t,s=1,a=arguments.length;s<a;s++){t=arguments[s];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u])}return e},Jg.apply(this,arguments)};function MO(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(n);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(n,s[a])&&(t[s[a]]=n[s[a]]);return t}function ke(n,e,t,s){function a(u){return u instanceof t?u:new t(function(d){d(u)})}return new(t||(t=Promise))(function(u,d){function f(g){try{m(s.next(g))}catch(v){d(v)}}function p(g){try{m(s.throw(g))}catch(v){d(v)}}function m(g){g.done?u(g.value):a(g.value).then(f,p)}m((s=s.apply(n,e||[])).next())})}function Xg(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],s=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function LO(n,e,t){if(t||arguments.length===2)for(var s=0,a=e.length,u;s<a;s++)(u||!(s in e))&&(u||(u=Array.prototype.slice.call(e,0,s)),u[s]=e[s]);return n.concat(u||Array.prototype.slice.call(e))}function Ne(n){return this instanceof Ne?(this.v=n,this):new Ne(n)}function Qr(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,u=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),f("next"),f("throw"),f("return",d),a[Symbol.asyncIterator]=function(){return this},a;function d(_){return function(x){return Promise.resolve(x).then(_,v)}}function f(_,x){s[_]&&(a[_]=function(L){return new Promise(function(N,k){u.push([_,L,N,k])>1||p(_,L)})},x&&(a[_]=x(a[_])))}function p(_,x){try{m(s[_](x))}catch(L){w(u[0][3],L)}}function m(_){_.value instanceof Ne?Promise.resolve(_.value.v).then(g,v):w(u[0][2],_)}function g(_){p("next",_)}function v(_){p("throw",_)}function w(_,x){_(x),u.shift(),u.length&&p(u[0][0],u[0][1])}}function Sc(n){var e,t;return e={},s("next"),s("throw",function(a){throw a}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(a,u){e[a]=n[a]?function(d){return(t=!t)?{value:Ne(n[a](d)),done:!1}:u?u(d):d}:u}}function Jo(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof Xg=="function"?Xg(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(u){t[u]=n[u]&&function(d){return new Promise(function(f,p){d=n[u](d),a(f,p,d.done,d.value)})}}function a(u,d,f,p){Promise.resolve(p).then(function(m){u({value:m,done:f})},d)}}const QE=new TextDecoder("utf-8"),Bh=n=>QE.decode(n),KE=new TextEncoder,mp=n=>KE.encode(n),qE=n=>typeof n=="number",YE=n=>typeof n=="boolean",mn=n=>typeof n=="function",Dr=n=>n!=null&&Object(n)===n,kl=n=>Dr(n)&&mn(n.then),pd=n=>Dr(n)&&mn(n[Symbol.iterator]),yp=n=>Dr(n)&&mn(n[Symbol.asyncIterator]),Uh=n=>Dr(n)&&Dr(n.schema),z0=n=>Dr(n)&&"done"in n&&"value"in n,$0=n=>Dr(n)&&mn(n.stat)&&qE(n.fd),V0=n=>Dr(n)&&gp(n.body),H0=n=>"_getDOMStream"in n&&"_getNodeStream"in n,gp=n=>Dr(n)&&mn(n.cancel)&&mn(n.getReader)&&!H0(n),W0=n=>Dr(n)&&mn(n.read)&&mn(n.pipe)&&YE(n.readable)&&!H0(n),GE=n=>Dr(n)&&mn(n.clear)&&mn(n.bytes)&&mn(n.position)&&mn(n.setPosition)&&mn(n.capacity)&&mn(n.getBufferIdentifier)&&mn(n.createLong),vp=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function JE(n){const e=n[0]?[n[0]]:[];let t,s,a,u;for(let d,f,p=0,m=0,g=n.length;++p<g;){if(d=e[m],f=n[p],!d||!f||d.buffer!==f.buffer||f.byteOffset<d.byteOffset){f&&(e[++m]=f);continue}if({byteOffset:t,byteLength:a}=d,{byteOffset:s,byteLength:u}=f,t+a<s||s+u<t){f&&(e[++m]=f);continue}e[m]=new Uint8Array(d.buffer,t,s-t+u)}return e}function Zg(n,e,t=0,s=e.byteLength){const a=n.byteLength,u=new Uint8Array(n.buffer,n.byteOffset,a),d=new Uint8Array(e.buffer,e.byteOffset,Math.min(s,a));return u.set(d,t),n}function Yr(n,e){const t=JE(n),s=t.reduce((g,v)=>g+v.byteLength,0);let a,u,d,f=0,p=-1;const m=Math.min(e||Number.POSITIVE_INFINITY,s);for(const g=t.length;++p<g;){if(a=t[p],u=a.subarray(0,Math.min(a.length,m-f)),m<=f+u.length){u.length<a.length?t[p]=a.subarray(u.length):u.length===a.length&&p++,d?Zg(d,u,f):d=u;break}Zg(d||(d=new Uint8Array(m)),u,f),f+=u.length}return[d||new Uint8Array(0),t.slice(p),s-(d?d.byteLength:0)]}function ut(n,e){let t=z0(e)?e.value:e;return t instanceof n?n===Uint8Array?new n(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=mp(t)),t instanceof ArrayBuffer?new n(t):t instanceof vp?new n(t):GE(t)?ut(n,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new n(0):new n(t.buffer,t.byteOffset,t.byteLength/n.BYTES_PER_ELEMENT):n.from(t)):new n(0)}const yl=n=>ut(Int32Array,n),ev=n=>ut(BigInt64Array,n),Ge=n=>ut(Uint8Array,n),jh=n=>(n.next(),n);function*XE(n,e){const t=function*(a){yield a},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof vp?t(e):pd(e)?e:t(e);return yield*jh(function*(a){let u=null;do u=a.next(yield ut(n,u));while(!u.done)}(s[Symbol.iterator]())),new n}const ZE=n=>XE(Uint8Array,n);function Q0(n,e){return Qr(this,arguments,function*(){if(kl(e))return yield Ne(yield Ne(yield*Sc(Jo(Q0(n,yield Ne(e))))));const s=function(d){return Qr(this,arguments,function*(){yield yield Ne(yield Ne(d))})},a=function(d){return Qr(this,arguments,function*(){yield Ne(yield*Sc(Jo(jh(function*(f){let p=null;do p=f.next(yield p==null?void 0:p.value);while(!p.done)}(d[Symbol.iterator]())))))})},u=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof vp?s(e):pd(e)?a(e):yp(e)?e:s(e);return yield Ne(yield*Sc(Jo(jh(function(d){return Qr(this,arguments,function*(){let f=null;do f=yield Ne(d.next(yield yield Ne(ut(n,f))));while(!f.done)})}(u[Symbol.asyncIterator]()))))),yield Ne(new n)})}const ex=n=>Q0(Uint8Array,n);function tx(n,e){let t=0;const s=n.length;if(s!==e.length)return!1;if(s>0)do if(n[t]!==e[t])return!1;while(++t<s);return!0}const er={fromIterable(n){return dc(nx(n))},fromAsyncIterable(n){return dc(rx(n))},fromDOMStream(n){return dc(ix(n))},fromNodeStream(n){return dc(ox(n))},toDOMStream(n,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(n,e){throw new Error('"toNodeStream" not available in this environment')}},dc=n=>(n.next(),n);function*nx(n){let e,t=!1,s=[],a,u,d,f=0;function p(){return u==="peek"?Yr(s,d)[0]:([a,s,f]=Yr(s,d),a)}({cmd:u,size:d}=(yield null)||{cmd:"read",size:0});const m=ZE(n)[Symbol.iterator]();try{do if({done:e,value:a}=Number.isNaN(d-f)?m.next():m.next(d-f),!e&&a.byteLength>0&&(s.push(a),f+=a.byteLength),e||d<=f)do({cmd:u,size:d}=yield p());while(d<f);while(!e)}catch(g){(t=!0)&&typeof m.throw=="function"&&m.throw(g)}finally{t===!1&&typeof m.return=="function"&&m.return(null)}return null}function rx(n){return Qr(this,arguments,function*(){let t,s=!1,a=[],u,d,f,p=0;function m(){return d==="peek"?Yr(a,f)[0]:([u,a,p]=Yr(a,f),u)}({cmd:d,size:f}=(yield yield Ne(null))||{cmd:"read",size:0});const g=ex(n)[Symbol.asyncIterator]();try{do if({done:t,value:u}=Number.isNaN(f-p)?yield Ne(g.next()):yield Ne(g.next(f-p)),!t&&u.byteLength>0&&(a.push(u),p+=u.byteLength),t||f<=p)do({cmd:d,size:f}=yield yield Ne(m()));while(f<p);while(!t)}catch(v){(s=!0)&&typeof g.throw=="function"&&(yield Ne(g.throw(v)))}finally{s===!1&&typeof g.return=="function"&&(yield Ne(g.return(new Uint8Array(0))))}return yield Ne(null)})}function ix(n){return Qr(this,arguments,function*(){let t=!1,s=!1,a=[],u,d,f,p=0;function m(){return d==="peek"?Yr(a,f)[0]:([u,a,p]=Yr(a,f),u)}({cmd:d,size:f}=(yield yield Ne(null))||{cmd:"read",size:0});const g=new sx(n);try{do if({done:t,value:u}=Number.isNaN(f-p)?yield Ne(g.read()):yield Ne(g.read(f-p)),!t&&u.byteLength>0&&(a.push(Ge(u)),p+=u.byteLength),t||f<=p)do({cmd:d,size:f}=yield yield Ne(m()));while(f<p);while(!t)}catch(v){(s=!0)&&(yield Ne(g.cancel(v)))}finally{s===!1?yield Ne(g.cancel()):n.locked&&g.releaseLock()}return yield Ne(null)})}class sx{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return ke(this,void 0,void 0,function*(){const{reader:t,source:s}=this;t&&(yield t.cancel(e).catch(()=>{})),s&&s.locked&&this.releaseLock()})}read(e){return ke(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};const t=yield this.reader.read();return!t.done&&(t.value=Ge(t)),t})}}const hh=(n,e)=>{const t=a=>s([e,a]);let s;return[e,t,new Promise(a=>(s=a)&&n.once(e,t))]};function ox(n){return Qr(this,arguments,function*(){const t=[];let s="error",a=!1,u=null,d,f,p=0,m=[],g;function v(){return d==="peek"?Yr(m,f)[0]:([g,m,p]=Yr(m,f),g)}if({cmd:d,size:f}=(yield yield Ne(null))||{cmd:"read",size:0},n.isTTY)return yield yield Ne(new Uint8Array(0)),yield Ne(null);try{t[0]=hh(n,"end"),t[1]=hh(n,"error");do{if(t[2]=hh(n,"readable"),[s,u]=yield Ne(Promise.race(t.map(_=>_[2]))),s==="error")break;if((a=s==="end")||(Number.isFinite(f-p)?(g=Ge(n.read(f-p)),g.byteLength<f-p&&(g=Ge(n.read()))):g=Ge(n.read()),g.byteLength>0&&(m.push(g),p+=g.byteLength)),a||f<=p)do({cmd:d,size:f}=yield yield Ne(v()));while(f<p)}while(!a)}finally{yield Ne(w(t,s==="error"?u:null))}return yield Ne(null);function w(_,x){return g=m=null,new Promise((L,N)=>{for(const[k,J]of _)n.off(k,J);try{const k=n.destroy;k&&k.call(n,x),x=void 0}catch(k){x=k||x}finally{x!=null?N(x):L()}})}})}var Ut;(function(n){n[n.V1=0]="V1",n[n.V2=1]="V2",n[n.V3=2]="V3",n[n.V4=3]="V4",n[n.V5=4]="V5"})(Ut||(Ut={}));var Pn;(function(n){n[n.Sparse=0]="Sparse",n[n.Dense=1]="Dense"})(Pn||(Pn={}));var an;(function(n){n[n.HALF=0]="HALF",n[n.SINGLE=1]="SINGLE",n[n.DOUBLE=2]="DOUBLE"})(an||(an={}));var sr;(function(n){n[n.DAY=0]="DAY",n[n.MILLISECOND=1]="MILLISECOND"})(sr||(sr={}));var Ie;(function(n){n[n.SECOND=0]="SECOND",n[n.MILLISECOND=1]="MILLISECOND",n[n.MICROSECOND=2]="MICROSECOND",n[n.NANOSECOND=3]="NANOSECOND"})(Ie||(Ie={}));var Gr;(function(n){n[n.YEAR_MONTH=0]="YEAR_MONTH",n[n.DAY_TIME=1]="DAY_TIME",n[n.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Gr||(Gr={}));const ph=2,Vr=4,yi=4,st=4,es=new Int32Array(2),tv=new Float32Array(es.buffer),nv=new Float64Array(es.buffer),fc=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var zh;(function(n){n[n.UTF8_BYTES=1]="UTF8_BYTES",n[n.UTF16_STRING=2]="UTF16_STRING"})(zh||(zh={}));let ma=class K0{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new K0(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readUint64(e){return BigInt.asUintN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<<BigInt(32)))}readFloat32(e){return es[0]=this.readInt32(e),tv[0]}readFloat64(e){return es[fc?0:1]=this.readInt32(e),es[fc?1:0]=this.readInt32(e+4),nv[0]}writeInt8(e,t){this.bytes_[e]=t}writeUint8(e,t){this.bytes_[e]=t}writeInt16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){tv[0]=t,this.writeInt32(e,es[0])}writeFloat64(e,t){nv[0]=t,this.writeInt32(e,es[fc?0:1]),this.writeInt32(e+4,es[fc?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+Vr+yi)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");let e="";for(let t=0;t<yi;t++)e+=String.fromCharCode(this.readInt8(this.position_+Vr+t));return e}__offset(e,t){const s=e-this.readInt32(e);return t<this.readInt16(s)?this.readInt16(s+t):0}__union(e,t){return e.bb_pos=t+this.readInt32(t),e.bb=this,e}__string(e,t){e+=this.readInt32(e);const s=this.readInt32(e);e+=Vr;const a=this.bytes_.subarray(e,e+s);return t===zh.UTF8_BYTES?a:this.text_decoder_.decode(a)}__union_with_string(e,t){return typeof e=="string"?this.__string(t):this.__union(e,t)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+Vr}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(e.length!=yi)throw new Error("FlatBuffers: file identifier must be length "+yi);for(let t=0;t<yi;t++)if(e.charCodeAt(t)!=this.readInt8(this.position()+Vr+t))return!1;return!0}createScalarList(e,t){const s=[];for(let a=0;a<t;++a){const u=e(a);u!==null&&s.push(u)}return s}createObjList(e,t){const s=[];for(let a=0;a<t;++a){const u=e(a);u!==null&&s.push(u.unpack())}return s}},q0=class Y0{constructor(e){this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder;let t;e?t=e:t=1024,this.bb=ma.allocate(t),this.space=t}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,t){e>this.minalign&&(this.minalign=e);const s=~(this.bb.capacity()-this.space+t)+1&e-1;for(;this.space<s+e+t;){const a=this.bb.capacity();this.bb=Y0.growByteBuffer(this.bb),this.space+=this.bb.capacity()-a}this.pad(s)}pad(e){for(let t=0;t<e;t++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(this.space-=1,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,t,s){(this.force_defaults||t!=s)&&(this.addInt8(t),this.slot(e))}addFieldInt16(e,t,s){(this.force_defaults||t!=s)&&(this.addInt16(t),this.slot(e))}addFieldInt32(e,t,s){(this.force_defaults||t!=s)&&(this.addInt32(t),this.slot(e))}addFieldInt64(e,t,s){(this.force_defaults||t!==s)&&(this.addInt64(t),this.slot(e))}addFieldFloat32(e,t,s){(this.force_defaults||t!=s)&&(this.addFloat32(t),this.slot(e))}addFieldFloat64(e,t,s){(this.force_defaults||t!=s)&&(this.addFloat64(t),this.slot(e))}addFieldOffset(e,t,s){(this.force_defaults||t!=s)&&(this.addOffset(t),this.slot(e))}addFieldStruct(e,t,s){t!=s&&(this.nested(t),this.slot(e))}nested(e){if(e!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){const t=e.capacity();if(t&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");const s=t<<1,a=ma.allocate(s);return a.setPosition(s-t),a.bytes().set(e.bytes(),s-t),a}addOffset(e){this.prep(Vr,0),this.writeInt32(this.offset()-e+Vr)}startObject(e){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=e;for(let t=0;t<e;t++)this.vtable[t]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);const e=this.offset();let t=this.vtable_in_use-1;for(;t>=0&&this.vtable[t]==0;t--);const s=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]!=0?e-this.vtable[t]:0);const a=2;this.addInt16(e-this.object_start);const u=(s+a)*ph;this.addInt16(u);let d=0;const f=this.space;e:for(t=0;t<this.vtables.length;t++){const p=this.bb.capacity()-this.vtables[t];if(u==this.bb.readInt16(p)){for(let m=ph;m<u;m+=ph)if(this.bb.readInt16(f+m)!=this.bb.readInt16(p+m))continue e;d=this.vtables[t];break}}return d?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,d-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,t,s){const a=s?st:0;if(t){const u=t;if(this.prep(this.minalign,Vr+yi+a),u.length!=yi)throw new TypeError("FlatBuffers: file identifier must be length "+yi);for(let d=yi-1;d>=0;d--)this.writeInt8(u.charCodeAt(d))}this.prep(this.minalign,Vr+a),this.addOffset(e),a&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){const s=this.bb.capacity()-e,a=s-this.bb.readInt32(s);if(!(t<this.bb.readInt16(a)&&this.bb.readInt16(a+t)!=0))throw new TypeError("FlatBuffers: field "+t+" must be set")}startVector(e,t,s){this.notNested(),this.vector_num_elems=t,this.prep(Vr,e*t),this.prep(s,e*t)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);const t=this.createString(e);return this.string_maps.set(e,t),t}createString(e){if(e==null)return 0;let t;return e instanceof Uint8Array?t=e:t=this.text_encoder.encode(e),this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length),this.bb.bytes().set(t,this.space),this.endVector()}createByteVector(e){return e==null?0:(this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length),this.bb.bytes().set(e,this.space),this.endVector())}createObjectOffset(e){return e===null?0:typeof e=="string"?this.createString(e):e.pack(this)}createObjectOffsetList(e){const t=[];for(let s=0;s<e.length;++s){const a=e[s];if(a!==null)t.push(this.createObjectOffset(a));else throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")}return t}createStructOffsetList(e,t){return t(this,e.length),this.createObjectOffsetList(e.slice().reverse()),this.endVector()}};var Pc;(function(n){n[n.BUFFER=0]="BUFFER"})(Pc||(Pc={}));var Tc;(function(n){n[n.LZ4_FRAME=0]="LZ4_FRAME",n[n.ZSTD=1]="ZSTD"})(Tc||(Tc={}));class ts{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new ts).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+st),(t||new ts).__init(e.readInt32(e.position())+e.position(),e)}codec(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):Tc.LZ4_FRAME}method(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Pc.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Tc.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,Pc.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,s){return ts.startBodyCompression(e),ts.addCodec(e,t),ts.addMethod(e,s),ts.endBodyCompression(e)}}class G0{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,t,s){return e.prep(8,16),e.writeInt64(BigInt(s??0)),e.writeInt64(BigInt(t??0)),e.offset()}}let J0=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,t,s){return e.prep(8,16),e.writeInt64(BigInt(s??0)),e.writeInt64(BigInt(t??0)),e.offset()}},di=class $h{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new $h).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+st),(t||new $h).__init(e.readInt32(e.position())+e.position(),e)}length(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}nodes(e,t){const s=this.bb.__offset(this.bb_pos,6);return s?(t||new J0).__init(this.bb.__vector(this.bb_pos+s)+e*16,this.bb):null}nodesLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){const s=this.bb.__offset(this.bb_pos,8);return s?(t||new G0).__init(this.bb.__vector(this.bb_pos+s)+e*16,this.bb):null}buffersLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){const t=this.bb.__offset(this.bb_pos,10);return t?(e||new ts).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}},Uo=class Vh{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new Vh).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+st),(t||new Vh).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}data(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new di).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){const e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}};var ya;(function(n){n[n.Little=0]="Little",n[n.Big=1]="Big"})(ya||(ya={}));var Nc;(function(n){n[n.DenseArray=0]="DenseArray"})(Nc||(Nc={}));class Hn{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new Hn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+st),(t||new Hn).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,s){return Hn.startInt(e),Hn.addBitWidth(e,t),Hn.addIsSigned(e,s),Hn.endInt(e)}}class gi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new gi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+st),(t||new gi).__init(e.readInt32(e.position())+e.position(),e)}id(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}indexType(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new Hn).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){const e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):Nc.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,BigInt("0"))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,Nc.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}}class Wt{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new Wt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+st),(t||new Wt).__init(e.readInt32(e.position())+e.position(),e)}key(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,s){return Wt.startKeyValue(e),Wt.addKey(e,t),Wt.addValue(e,s),Wt.endKeyValue(e)}}let rv=class _l{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new _l).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+st),(t||new _l).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return _l.startBinary(e),_l.endBinary(e)}},iv=class bl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new bl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+st),(t||new bl).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return bl.startBool(e),bl.endBool(e)}},_c=class jo{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new jo).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+st),(t||new jo).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):sr.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,sr.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return jo.startDate(e),jo.addUnit(e,t),jo.endDate(e)}},zo=class Zi{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new Zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+st),(t||new Zi).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,s,a){return Zi.startDecimal(e),Zi.addPrecision(e,t),Zi.addScale(e,s),Zi.addBitWidth(e,a),Zi.endDecimal(e)}},bc=class $o{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new $o).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+st),(t||new $o).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ie.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Ie.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return $o.startDuration(e),$o.addUnit(e,t),$o.endDuration(e)}},Ic=class Vo{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new Vo).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+st),(t||new Vo).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return Vo.startFixedSizeBinary(e),Vo.addByteWidth(e,t),Vo.endFixedSizeBinary(e)}},Ec=class Ho{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Ho).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+st),(t||new Ho).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Ho.startFixedSizeList(e),Ho.addListSize(e,t),Ho.endFixedSizeList(e)}};class Hr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+st),(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}precision(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):an.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,an.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Hr.startFloatingPoint(e),Hr.addPrecision(e,t),Hr.endFloatingPoint(e)}}class Wr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+st),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Gr.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Gr.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Wr.startInterval(e),Wr.addUnit(e,t),Wr.endInterval(e)}}let sv=class Il{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new Il).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+st),(t||new Il).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Il.startLargeBinary(e),Il.endLargeBinary(e)}},ov=class El{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new El).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+st),(t||new El).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return El.startLargeUtf8(e),El.endLargeUtf8(e)}},av=class xl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new xl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+st),(t||new xl).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return xl.startList(e),xl.endList(e)}},xc=class Wo{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new Wo).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+st),(t||new Wo).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return Wo.startMap(e),Wo.addKeysSorted(e,t),Wo.endMap(e)}},lv=class Dl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new Dl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+st),(t||new Dl).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Dl.startNull(e),Dl.endNull(e)}};class Hs{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Hs).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+st),(t||new Hs).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Hs.startStruct_(e),Hs.endStruct_(e)}}class tr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+st),(t||new tr).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ie.MILLISECOND}bitWidth(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Ie.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,s){return tr.startTime(e),tr.addUnit(e,t),tr.addBitWidth(e,s),tr.endTime(e)}}class nr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+st),(t||new nr).__init(e.readInt32(e.position())+e.position(),e)}unit(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ie.SECOND}timezone(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,Ie.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,s){return nr.startTimestamp(e),nr.addUnit(e,t),nr.addTimezone(e,s),nr.endTimestamp(e)}}class kn{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new kn).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+st),(t||new kn).__init(e.readInt32(e.position())+e.position(),e)}mode(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Pn.Sparse}typeIds(e){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){const e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Pn.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addInt32(t[s]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,s){return kn.startUnion(e),kn.addMode(e,t),kn.addTypeIds(e,s),kn.endUnion(e)}}let uv=class Cl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new Cl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+st),(t||new Cl).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Cl.startUtf8(e),Cl.endUtf8(e)}};var wt;(function(n){n[n.NONE=0]="NONE",n[n.Null=1]="Null",n[n.Int=2]="Int",n[n.FloatingPoint=3]="FloatingPoint",n[n.Binary=4]="Binary",n[n.Utf8=5]="Utf8",n[n.Bool=6]="Bool",n[n.Decimal=7]="Decimal",n[n.Date=8]="Date",n[n.Time=9]="Time",n[n.Timestamp=10]="Timestamp",n[n.Interval=11]="Interval",n[n.List=12]="List",n[n.Struct_=13]="Struct_",n[n.Union=14]="Union",n[n.FixedSizeBinary=15]="FixedSizeBinary",n[n.FixedSizeList=16]="FixedSizeList",n[n.Map=17]="Map",n[n.Duration=18]="Duration",n[n.LargeBinary=19]="LargeBinary",n[n.LargeUtf8=20]="LargeUtf8",n[n.LargeList=21]="LargeList",n[n.RunEndEncoded=22]="RunEndEncoded"})(wt||(wt={}));let Jn=class Dc{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new Dc).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+st),(t||new Dc).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):wt.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new gi).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const s=this.bb.__offset(this.bb_pos,14);return s?(t||new Dc).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const s=this.bb.__offset(this.bb_pos,16);return s?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,wt.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}},Br=class ci{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+st),(t||new ci).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ya.Little}fields(e,t){const s=this.bb.__offset(this.bb_pos,6);return s?(t||new Jn).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const s=this.bb.__offset(this.bb_pos,8);return s?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,ya.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let s=t.length-1;s>=0;s--)e.addInt64(t[s]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,s,a,u){return ci.startSchema(e),ci.addEndianness(e,t),ci.addFields(e,s),ci.addCustomMetadata(e,a),ci.addFeatures(e,u),ci.endSchema(e)}};var nt;(function(n){n[n.NONE=0]="NONE",n[n.Schema=1]="Schema",n[n.DictionaryBatch=2]="DictionaryBatch",n[n.RecordBatch=3]="RecordBatch",n[n.Tensor=4]="Tensor",n[n.SparseTensor=5]="SparseTensor"})(nt||(nt={}));var C;(function(n){n[n.NONE=0]="NONE",n[n.Null=1]="Null",n[n.Int=2]="Int",n[n.Float=3]="Float",n[n.Binary=4]="Binary",n[n.Utf8=5]="Utf8",n[n.Bool=6]="Bool",n[n.Decimal=7]="Decimal",n[n.Date=8]="Date",n[n.Time=9]="Time",n[n.Timestamp=10]="Timestamp",n[n.Interval=11]="Interval",n[n.List=12]="List",n[n.Struct=13]="Struct",n[n.Union=14]="Union",n[n.FixedSizeBinary=15]="FixedSizeBinary",n[n.FixedSizeList=16]="FixedSizeList",n[n.Map=17]="Map",n[n.Duration=18]="Duration",n[n.LargeBinary=19]="LargeBinary",n[n.LargeUtf8=20]="LargeUtf8",n[n.Dictionary=-1]="Dictionary",n[n.Int8=-2]="Int8",n[n.Int16=-3]="Int16",n[n.Int32=-4]="Int32",n[n.Int64=-5]="Int64",n[n.Uint8=-6]="Uint8",n[n.Uint16=-7]="Uint16",n[n.Uint32=-8]="Uint32",n[n.Uint64=-9]="Uint64",n[n.Float16=-10]="Float16",n[n.Float32=-11]="Float32",n[n.Float64=-12]="Float64",n[n.DateDay=-13]="DateDay",n[n.DateMillisecond=-14]="DateMillisecond",n[n.TimestampSecond=-15]="TimestampSecond",n[n.TimestampMillisecond=-16]="TimestampMillisecond",n[n.TimestampMicrosecond=-17]="TimestampMicrosecond",n[n.TimestampNanosecond=-18]="TimestampNanosecond",n[n.TimeSecond=-19]="TimeSecond",n[n.TimeMillisecond=-20]="TimeMillisecond",n[n.TimeMicrosecond=-21]="TimeMicrosecond",n[n.TimeNanosecond=-22]="TimeNanosecond",n[n.DenseUnion=-23]="DenseUnion",n[n.SparseUnion=-24]="SparseUnion",n[n.IntervalDayTime=-25]="IntervalDayTime",n[n.IntervalYearMonth=-26]="IntervalYearMonth",n[n.DurationSecond=-27]="DurationSecond",n[n.DurationMillisecond=-28]="DurationMillisecond",n[n.DurationMicrosecond=-29]="DurationMicrosecond",n[n.DurationNanosecond=-30]="DurationNanosecond"})(C||(C={}));var fi;(function(n){n[n.OFFSET=0]="OFFSET",n[n.DATA=1]="DATA",n[n.VALIDITY=2]="VALIDITY",n[n.TYPE=3]="TYPE"})(fi||(fi={}));const ax=void 0;function Pl(n){if(n===null)return"null";if(n===ax)return"undefined";switch(typeof n){case"number":return`${n}`;case"bigint":return`${n}`;case"string":return`"${n}"`}return typeof n[Symbol.toPrimitive]=="function"?n[Symbol.toPrimitive]("string"):ArrayBuffer.isView(n)?n instanceof BigInt64Array||n instanceof BigUint64Array?`[${[...n].map(e=>Pl(e))}]`:`[${n}]`:ArrayBuffer.isView(n)?`[${n}]`:JSON.stringify(n,(e,t)=>typeof t=="bigint"?`${t}`:t)}function Et(n){if(typeof n=="bigint"&&(n<Number.MIN_SAFE_INTEGER||n>Number.MAX_SAFE_INTEGER))throw new TypeError(`${n} is not safe to convert to a number.`);return Number(n)}function X0(n,e){return Et(n/e)+Et(n%e)/Et(e)}const lx=Symbol.for("isArrowBigNum");function Rr(n,...e){return e.length===0?Object.setPrototypeOf(ut(this.TypedArray,n),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(n,...e),this.constructor.prototype)}Rr.prototype[lx]=!0;Rr.prototype.toJSON=function(){return`"${Nl(this)}"`};Rr.prototype.valueOf=function(n){return Z0(this,n)};Rr.prototype.toString=function(){return Nl(this)};Rr.prototype[Symbol.toPrimitive]=function(n="default"){switch(n){case"number":return Z0(this);case"string":return Nl(this);case"default":return dx(this)}return Nl(this)};function Xo(...n){return Rr.apply(this,n)}function Zo(...n){return Rr.apply(this,n)}function Tl(...n){return Rr.apply(this,n)}Object.setPrototypeOf(Xo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Zo.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Tl.prototype,Object.create(Uint32Array.prototype));Object.assign(Xo.prototype,Rr.prototype,{constructor:Xo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Zo.prototype,Rr.prototype,{constructor:Zo,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Tl.prototype,Rr.prototype,{constructor:Tl,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const ux=BigInt(4294967296)*BigInt(4294967296),cx=ux-BigInt(1);function Z0(n,e){const{buffer:t,byteOffset:s,byteLength:a,signed:u}=n,d=new BigUint64Array(t,s,a/8),f=u&&d.at(-1)&BigInt(1)<<BigInt(63);let p=BigInt(0),m=0;if(f){for(const g of d)p|=(g^cx)*(BigInt(1)<<BigInt(64*m++));p*=BigInt(-1),p-=BigInt(1)}else for(const g of d)p|=g*(BigInt(1)<<BigInt(64*m++));if(typeof e=="number"){const g=BigInt(Math.pow(10,e)),v=p/g,w=p%g;return Et(v)+Et(w)/Et(g)}return Et(p)}function Nl(n){if(n.byteLength===8)return`${new n.BigIntArray(n.buffer,n.byteOffset,1)[0]}`;if(!n.signed)return mh(n);let e=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2);if(new Int16Array([e.at(-1)])[0]>=0)return mh(n);e=e.slice();let s=1;for(let u=0;u<e.length;u++){const d=e[u],f=~d+s;e[u]=f,s&=d===0?1:0}return`-${mh(e)}`}function dx(n){return n.byteLength===8?new n.BigIntArray(n.buffer,n.byteOffset,1)[0]:Nl(n)}function mh(n){let e="";const t=new Uint32Array(2);let s=new Uint16Array(n.buffer,n.byteOffset,n.byteLength/2);const a=new Uint32Array((s=new Uint16Array(s).reverse()).buffer);let u=-1;const d=s.length-1;do{for(t[0]=s[u=0];u<d;)s[u++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+s[u];s[u]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(a[0]||a[1]||a[2]||a[3]);return e??"0"}class wp{static new(e,t){switch(t){case!0:return new Xo(e);case!1:return new Zo(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new Xo(e)}return e.byteLength===16?new Tl(e):new Zo(e)}static signed(e){return new Xo(e)}static unsigned(e){return new Zo(e)}static decimal(e){return new Tl(e)}constructor(e,t){return wp.new(e,t)}}var ew,tw,nw,rw,iw,sw,ow,aw,lw,uw,cw,dw,fw,hw,pw,mw,yw,gw,vw,ww,Sw,_w;class de{static isNull(e){return(e==null?void 0:e.typeId)===C.Null}static isInt(e){return(e==null?void 0:e.typeId)===C.Int}static isFloat(e){return(e==null?void 0:e.typeId)===C.Float}static isBinary(e){return(e==null?void 0:e.typeId)===C.Binary}static isLargeBinary(e){return(e==null?void 0:e.typeId)===C.LargeBinary}static isUtf8(e){return(e==null?void 0:e.typeId)===C.Utf8}static isLargeUtf8(e){return(e==null?void 0:e.typeId)===C.LargeUtf8}static isBool(e){return(e==null?void 0:e.typeId)===C.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===C.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===C.Date}static isTime(e){return(e==null?void 0:e.typeId)===C.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===C.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===C.Interval}static isDuration(e){return(e==null?void 0:e.typeId)===C.Duration}static isList(e){return(e==null?void 0:e.typeId)===C.List}static isStruct(e){return(e==null?void 0:e.typeId)===C.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===C.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===C.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===C.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===C.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===C.Dictionary}static isDenseUnion(e){return de.isUnion(e)&&e.mode===Pn.Dense}static isSparseUnion(e){return de.isUnion(e)&&e.mode===Pn.Sparse}constructor(e){this.typeId=e}}ew=Symbol.toStringTag;de[ew]=(n=>(n.children=null,n.ArrayType=Array,n.OffsetArrayType=Int32Array,n[Symbol.toStringTag]="DataType"))(de.prototype);class ys extends de{constructor(){super(C.Null)}toString(){return"Null"}}tw=Symbol.toStringTag;ys[tw]=(n=>n[Symbol.toStringTag]="Null")(ys.prototype);class no extends de{constructor(e,t){super(C.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}nw=Symbol.toStringTag;no[nw]=(n=>(n.isSigned=null,n.bitWidth=null,n[Symbol.toStringTag]="Int"))(no.prototype);class Bl extends no{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Bl.prototype,"ArrayType",{value:Int32Array});class Bc extends de{constructor(e){super(C.Float),this.precision=e}get ArrayType(){switch(this.precision){case an.HALF:return Uint16Array;case an.SINGLE:return Float32Array;case an.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}rw=Symbol.toStringTag;Bc[rw]=(n=>(n.precision=null,n[Symbol.toStringTag]="Float"))(Bc.prototype);class Uc extends de{constructor(){super(C.Binary)}toString(){return"Binary"}}iw=Symbol.toStringTag;Uc[iw]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Binary"))(Uc.prototype);class jc extends de{constructor(){super(C.LargeBinary)}toString(){return"LargeBinary"}}sw=Symbol.toStringTag;jc[sw]=(n=>(n.ArrayType=Uint8Array,n.OffsetArrayType=BigInt64Array,n[Symbol.toStringTag]="LargeBinary"))(jc.prototype);class zc extends de{constructor(){super(C.Utf8)}toString(){return"Utf8"}}ow=Symbol.toStringTag;zc[ow]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Utf8"))(zc.prototype);class $c extends de{constructor(){super(C.LargeUtf8)}toString(){return"LargeUtf8"}}aw=Symbol.toStringTag;$c[aw]=(n=>(n.ArrayType=Uint8Array,n.OffsetArrayType=BigInt64Array,n[Symbol.toStringTag]="LargeUtf8"))($c.prototype);class Vc extends de{constructor(){super(C.Bool)}toString(){return"Bool"}}lw=Symbol.toStringTag;Vc[lw]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Bool"))(Vc.prototype);class Hc extends de{constructor(e,t,s=128){super(C.Decimal),this.scale=e,this.precision=t,this.bitWidth=s}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}uw=Symbol.toStringTag;Hc[uw]=(n=>(n.scale=null,n.precision=null,n.ArrayType=Uint32Array,n[Symbol.toStringTag]="Decimal"))(Hc.prototype);class Wc extends de{constructor(e){super(C.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${sr[this.unit]}>`}get ArrayType(){return this.unit===sr.DAY?Int32Array:BigInt64Array}}cw=Symbol.toStringTag;Wc[cw]=(n=>(n.unit=null,n[Symbol.toStringTag]="Date"))(Wc.prototype);class Qc extends de{constructor(e,t){super(C.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Ie[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}dw=Symbol.toStringTag;Qc[dw]=(n=>(n.unit=null,n.bitWidth=null,n[Symbol.toStringTag]="Time"))(Qc.prototype);class Kc extends de{constructor(e,t){super(C.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Ie[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}fw=Symbol.toStringTag;Kc[fw]=(n=>(n.unit=null,n.timezone=null,n.ArrayType=BigInt64Array,n[Symbol.toStringTag]="Timestamp"))(Kc.prototype);class qc extends de{constructor(e){super(C.Interval),this.unit=e}toString(){return`Interval<${Gr[this.unit]}>`}}hw=Symbol.toStringTag;qc[hw]=(n=>(n.unit=null,n.ArrayType=Int32Array,n[Symbol.toStringTag]="Interval"))(qc.prototype);class Yc extends de{constructor(e){super(C.Duration),this.unit=e}toString(){return`Duration<${Ie[this.unit]}>`}}pw=Symbol.toStringTag;Yc[pw]=(n=>(n.unit=null,n.ArrayType=BigInt64Array,n[Symbol.toStringTag]="Duration"))(Yc.prototype);class Gc extends de{constructor(e){super(C.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}mw=Symbol.toStringTag;Gc[mw]=(n=>(n.children=null,n[Symbol.toStringTag]="List"))(Gc.prototype);class gn extends de{constructor(e){super(C.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}yw=Symbol.toStringTag;gn[yw]=(n=>(n.children=null,n[Symbol.toStringTag]="Struct"))(gn.prototype);class Jc extends de{constructor(e,t,s){super(C.Union),this.mode=e,this.children=s,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((a,u,d)=>(a[u]=d)&&a||a,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}gw=Symbol.toStringTag;Jc[gw]=(n=>(n.mode=null,n.typeIds=null,n.children=null,n.typeIdToChildIndex=null,n.ArrayType=Int8Array,n[Symbol.toStringTag]="Union"))(Jc.prototype);class Xc extends de{constructor(e){super(C.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}vw=Symbol.toStringTag;Xc[vw]=(n=>(n.byteWidth=null,n.ArrayType=Uint8Array,n[Symbol.toStringTag]="FixedSizeBinary"))(Xc.prototype);class Zc extends de{constructor(e,t){super(C.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}ww=Symbol.toStringTag;Zc[ww]=(n=>(n.children=null,n.listSize=null,n[Symbol.toStringTag]="FixedSizeList"))(Zc.prototype);class ed extends de{constructor(e,t=!1){var s,a,u;if(super(C.Map),this.children=[e],this.keysSorted=t,e&&(e.name="entries",!((s=e==null?void 0:e.type)===null||s===void 0)&&s.children)){const d=(a=e==null?void 0:e.type)===null||a===void 0?void 0:a.children[0];d&&(d.name="key");const f=(u=e==null?void 0:e.type)===null||u===void 0?void 0:u.children[1];f&&(f.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}Sw=Symbol.toStringTag;ed[Sw]=(n=>(n.children=null,n.keysSorted=null,n[Symbol.toStringTag]="Map_"))(ed.prototype);const fx=(n=>()=>++n)(-1);class ga extends de{constructor(e,t,s,a){super(C.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=a||!1,this.id=s==null?fx():Et(s)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}_w=Symbol.toStringTag;ga[_w]=(n=>(n.id=null,n.indices=null,n.isOrdered=null,n.dictionary=null,n[Symbol.toStringTag]="Dictionary"))(ga.prototype);function hi(n){const e=n;switch(n.typeId){case C.Decimal:return n.bitWidth/32;case C.Interval:return 1+e.unit;case C.FixedSizeList:return e.listSize;case C.FixedSizeBinary:return e.byteWidth;default:return 1}}class He{visitMany(e,...t){return e.map((s,a)=>this.visit(s,...t.map(u=>u[a])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return hx(this,e,t)}getVisitFnByTypeId(e,t=!0){return Qo(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function hx(n,e,t=!0){return typeof e=="number"?Qo(n,e,t):typeof e=="string"&&e in C?Qo(n,C[e],t):e&&e instanceof de?Qo(n,cv(e),t):e!=null&&e.type&&e.type instanceof de?Qo(n,cv(e.type),t):Qo(n,C.NONE,t)}function Qo(n,e,t=!0){let s=null;switch(e){case C.Null:s=n.visitNull;break;case C.Bool:s=n.visitBool;break;case C.Int:s=n.visitInt;break;case C.Int8:s=n.visitInt8||n.visitInt;break;case C.Int16:s=n.visitInt16||n.visitInt;break;case C.Int32:s=n.visitInt32||n.visitInt;break;case C.Int64:s=n.visitInt64||n.visitInt;break;case C.Uint8:s=n.visitUint8||n.visitInt;break;case C.Uint16:s=n.visitUint16||n.visitInt;break;case C.Uint32:s=n.visitUint32||n.visitInt;break;case C.Uint64:s=n.visitUint64||n.visitInt;break;case C.Float:s=n.visitFloat;break;case C.Float16:s=n.visitFloat16||n.visitFloat;break;case C.Float32:s=n.visitFloat32||n.visitFloat;break;case C.Float64:s=n.visitFloat64||n.visitFloat;break;case C.Utf8:s=n.visitUtf8;break;case C.LargeUtf8:s=n.visitLargeUtf8;break;case C.Binary:s=n.visitBinary;break;case C.LargeBinary:s=n.visitLargeBinary;break;case C.FixedSizeBinary:s=n.visitFixedSizeBinary;break;case C.Date:s=n.visitDate;break;case C.DateDay:s=n.visitDateDay||n.visitDate;break;case C.DateMillisecond:s=n.visitDateMillisecond||n.visitDate;break;case C.Timestamp:s=n.visitTimestamp;break;case C.TimestampSecond:s=n.visitTimestampSecond||n.visitTimestamp;break;case C.TimestampMillisecond:s=n.visitTimestampMillisecond||n.visitTimestamp;break;case C.TimestampMicrosecond:s=n.visitTimestampMicrosecond||n.visitTimestamp;break;case C.TimestampNanosecond:s=n.visitTimestampNanosecond||n.visitTimestamp;break;case C.Time:s=n.visitTime;break;case C.TimeSecond:s=n.visitTimeSecond||n.visitTime;break;case C.TimeMillisecond:s=n.visitTimeMillisecond||n.visitTime;break;case C.TimeMicrosecond:s=n.visitTimeMicrosecond||n.visitTime;break;case C.TimeNanosecond:s=n.visitTimeNanosecond||n.visitTime;break;case C.Decimal:s=n.visitDecimal;break;case C.List:s=n.visitList;break;case C.Struct:s=n.visitStruct;break;case C.Union:s=n.visitUnion;break;case C.DenseUnion:s=n.visitDenseUnion||n.visitUnion;break;case C.SparseUnion:s=n.visitSparseUnion||n.visitUnion;break;case C.Dictionary:s=n.visitDictionary;break;case C.Interval:s=n.visitInterval;break;case C.IntervalDayTime:s=n.visitIntervalDayTime||n.visitInterval;break;case C.IntervalYearMonth:s=n.visitIntervalYearMonth||n.visitInterval;break;case C.Duration:s=n.visitDuration;break;case C.DurationSecond:s=n.visitDurationSecond||n.visitDuration;break;case C.DurationMillisecond:s=n.visitDurationMillisecond||n.visitDuration;break;case C.DurationMicrosecond:s=n.visitDurationMicrosecond||n.visitDuration;break;case C.DurationNanosecond:s=n.visitDurationNanosecond||n.visitDuration;break;case C.FixedSizeList:s=n.visitFixedSizeList;break;case C.Map:s=n.visitMap;break}if(typeof s=="function")return s;if(!t)return()=>null;throw new Error(`Unrecognized type '${C[e]}'`)}function cv(n){switch(n.typeId){case C.Null:return C.Null;case C.Int:{const{bitWidth:e,isSigned:t}=n;switch(e){case 8:return t?C.Int8:C.Uint8;case 16:return t?C.Int16:C.Uint16;case 32:return t?C.Int32:C.Uint32;case 64:return t?C.Int64:C.Uint64}return C.Int}case C.Float:switch(n.precision){case an.HALF:return C.Float16;case an.SINGLE:return C.Float32;case an.DOUBLE:return C.Float64}return C.Float;case C.Binary:return C.Binary;case C.LargeBinary:return C.LargeBinary;case C.Utf8:return C.Utf8;case C.LargeUtf8:return C.LargeUtf8;case C.Bool:return C.Bool;case C.Decimal:return C.Decimal;case C.Time:switch(n.unit){case Ie.SECOND:return C.TimeSecond;case Ie.MILLISECOND:return C.TimeMillisecond;case Ie.MICROSECOND:return C.TimeMicrosecond;case Ie.NANOSECOND:return C.TimeNanosecond}return C.Time;case C.Timestamp:switch(n.unit){case Ie.SECOND:return C.TimestampSecond;case Ie.MILLISECOND:return C.TimestampMillisecond;case Ie.MICROSECOND:return C.TimestampMicrosecond;case Ie.NANOSECOND:return C.TimestampNanosecond}return C.Timestamp;case C.Date:switch(n.unit){case sr.DAY:return C.DateDay;case sr.MILLISECOND:return C.DateMillisecond}return C.Date;case C.Interval:switch(n.unit){case Gr.DAY_TIME:return C.IntervalDayTime;case Gr.YEAR_MONTH:return C.IntervalYearMonth}return C.Interval;case C.Duration:switch(n.unit){case Ie.SECOND:return C.DurationSecond;case Ie.MILLISECOND:return C.DurationMillisecond;case Ie.MICROSECOND:return C.DurationMicrosecond;case Ie.NANOSECOND:return C.DurationNanosecond}return C.Duration;case C.Map:return C.Map;case C.List:return C.List;case C.Struct:return C.Struct;case C.Union:switch(n.mode){case Pn.Dense:return C.DenseUnion;case Pn.Sparse:return C.SparseUnion}return C.Union;case C.FixedSizeBinary:return C.FixedSizeBinary;case C.FixedSizeList:return C.FixedSizeList;case C.Dictionary:return C.Dictionary}throw new Error(`Unrecognized type '${C[n.typeId]}'`)}He.prototype.visitInt8=null;He.prototype.visitInt16=null;He.prototype.visitInt32=null;He.prototype.visitInt64=null;He.prototype.visitUint8=null;He.prototype.visitUint16=null;He.prototype.visitUint32=null;He.prototype.visitUint64=null;He.prototype.visitFloat16=null;He.prototype.visitFloat32=null;He.prototype.visitFloat64=null;He.prototype.visitDateDay=null;He.prototype.visitDateMillisecond=null;He.prototype.visitTimestampSecond=null;He.prototype.visitTimestampMillisecond=null;He.prototype.visitTimestampMicrosecond=null;He.prototype.visitTimestampNanosecond=null;He.prototype.visitTimeSecond=null;He.prototype.visitTimeMillisecond=null;He.prototype.visitTimeMicrosecond=null;He.prototype.visitTimeNanosecond=null;He.prototype.visitDenseUnion=null;He.prototype.visitSparseUnion=null;He.prototype.visitIntervalDayTime=null;He.prototype.visitIntervalYearMonth=null;He.prototype.visitDuration=null;He.prototype.visitDurationSecond=null;He.prototype.visitDurationMillisecond=null;He.prototype.visitDurationMicrosecond=null;He.prototype.visitDurationNanosecond=null;const bw=new Float64Array(1),Po=new Uint32Array(bw.buffer);function Iw(n){const e=(n&31744)>>10,t=(n&1023)/1024,s=Math.pow(-1,(n&32768)>>15);switch(e){case 31:return s*(t?Number.NaN:1/0);case 0:return s*(t?6103515625e-14*t:0)}return s*Math.pow(2,e-15)*(1+t)}function px(n){if(n!==n)return 32256;bw[0]=n;const e=(Po[1]&2147483648)>>16&65535;let t=Po[1]&2146435072,s=0;return t>=1089470464?Po[0]>0?t=31744:(t=(t&2080374784)>>16,s=(Po[1]&1048575)>>10):t<=1056964608?(s=1048576+(Po[1]&1048575),s=1048576+(s<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,s=(Po[1]&1048575)+512>>10),e|t|s&65535}class Ee extends He{}function Oe(n){return(e,t,s)=>{if(e.setValid(t,s!=null))return n(e,t,s)}}const mx=(n,e,t)=>{n[e]=Math.floor(t/864e5)},Ew=(n,e,t,s)=>{if(t+1<e.length){const a=Et(e[t]),u=Et(e[t+1]);n.set(s.subarray(0,u-a),a)}},yx=({offset:n,values:e},t,s)=>{const a=n+t;s?e[a>>3]|=1<<a%8:e[a>>3]&=~(1<<a%8)},Ii=({values:n},e,t)=>{n[e]=t},Sp=({values:n},e,t)=>{n[e]=t},xw=({values:n},e,t)=>{n[e]=px(t)},gx=(n,e,t)=>{switch(n.type.precision){case an.HALF:return xw(n,e,t);case an.SINGLE:case an.DOUBLE:return Sp(n,e,t)}},Dw=({values:n},e,t)=>{mx(n,e,t.valueOf())},Cw=({values:n},e,t)=>{n[e]=BigInt(t)},vx=({stride:n,values:e},t,s)=>{e.set(s.subarray(0,n),n*t)},Ow=({values:n,valueOffsets:e},t,s)=>Ew(n,e,t,s),Rw=({values:n,valueOffsets:e},t,s)=>Ew(n,e,t,mp(s)),wx=(n,e,t)=>{n.type.unit===sr.DAY?Dw(n,e,t):Cw(n,e,t)},Fw=({values:n},e,t)=>{n[e]=BigInt(t/1e3)},Mw=({values:n},e,t)=>{n[e]=BigInt(t)},Lw=({values:n},e,t)=>{n[e]=BigInt(t*1e3)},Aw=({values:n},e,t)=>{n[e]=BigInt(t*1e6)},Sx=(n,e,t)=>{switch(n.type.unit){case Ie.SECOND:return Fw(n,e,t);case Ie.MILLISECOND:return Mw(n,e,t);case Ie.MICROSECOND:return Lw(n,e,t);case Ie.NANOSECOND:return Aw(n,e,t)}},kw=({values:n},e,t)=>{n[e]=t},Pw=({values:n},e,t)=>{n[e]=t},Tw=({values:n},e,t)=>{n[e]=t},Nw=({values:n},e,t)=>{n[e]=t},_x=(n,e,t)=>{switch(n.type.unit){case Ie.SECOND:return kw(n,e,t);case Ie.MILLISECOND:return Pw(n,e,t);case Ie.MICROSECOND:return Tw(n,e,t);case Ie.NANOSECOND:return Nw(n,e,t)}},bx=({values:n,stride:e},t,s)=>{n.set(s.subarray(0,e),e*t)},Ix=(n,e,t)=>{const s=n.children[0],a=n.valueOffsets,u=or.getVisitFn(s);if(Array.isArray(t))for(let d=-1,f=a[e],p=a[e+1];f<p;)u(s,f++,t[++d]);else for(let d=-1,f=a[e],p=a[e+1];f<p;)u(s,f++,t.get(++d))},Ex=(n,e,t)=>{const s=n.children[0],{valueOffsets:a}=n,u=or.getVisitFn(s);let{[e]:d,[e+1]:f}=a;const p=t instanceof Map?t.entries():Object.entries(t);for(const m of p)if(u(s,d,m),++d>=f)break},xx=(n,e)=>(t,s,a,u)=>s&&t(s,n,e[u]),Dx=(n,e)=>(t,s,a,u)=>s&&t(s,n,e.get(u)),Cx=(n,e)=>(t,s,a,u)=>s&&t(s,n,e.get(a.name)),Ox=(n,e)=>(t,s,a,u)=>s&&t(s,n,e[a.name]),Rx=(n,e,t)=>{const s=n.type.children.map(u=>or.getVisitFn(u.type)),a=t instanceof Map?Cx(e,t):t instanceof ht?Dx(e,t):Array.isArray(t)?xx(e,t):Ox(e,t);n.type.children.forEach((u,d)=>a(s[d],n.children[d],u,d))},Fx=(n,e,t)=>{n.type.mode===Pn.Dense?Bw(n,e,t):Uw(n,e,t)},Bw=(n,e,t)=>{const s=n.type.typeIdToChildIndex[n.typeIds[e]],a=n.children[s];or.visit(a,n.valueOffsets[e],t)},Uw=(n,e,t)=>{const s=n.type.typeIdToChildIndex[n.typeIds[e]],a=n.children[s];or.visit(a,e,t)},Mx=(n,e,t)=>{var s;(s=n.dictionary)===null||s===void 0||s.set(n.values[e],t)},Lx=(n,e,t)=>{n.type.unit===Gr.DAY_TIME?jw(n,e,t):zw(n,e,t)},jw=({values:n},e,t)=>{n.set(t.subarray(0,2),2*e)},zw=({values:n},e,t)=>{n[e]=t[0]*12+t[1]%12},$w=({values:n},e,t)=>{n[e]=t},Vw=({values:n},e,t)=>{n[e]=t},Hw=({values:n},e,t)=>{n[e]=t},Ww=({values:n},e,t)=>{n[e]=t},Ax=(n,e,t)=>{switch(n.type.unit){case Ie.SECOND:return $w(n,e,t);case Ie.MILLISECOND:return Vw(n,e,t);case Ie.MICROSECOND:return Hw(n,e,t);case Ie.NANOSECOND:return Ww(n,e,t)}},kx=(n,e,t)=>{const{stride:s}=n,a=n.children[0],u=or.getVisitFn(a);if(Array.isArray(t))for(let d=-1,f=e*s;++d<s;)u(a,f+d,t[d]);else for(let d=-1,f=e*s;++d<s;)u(a,f+d,t.get(d))};Ee.prototype.visitBool=Oe(yx);Ee.prototype.visitInt=Oe(Ii);Ee.prototype.visitInt8=Oe(Ii);Ee.prototype.visitInt16=Oe(Ii);Ee.prototype.visitInt32=Oe(Ii);Ee.prototype.visitInt64=Oe(Ii);Ee.prototype.visitUint8=Oe(Ii);Ee.prototype.visitUint16=Oe(Ii);Ee.prototype.visitUint32=Oe(Ii);Ee.prototype.visitUint64=Oe(Ii);Ee.prototype.visitFloat=Oe(gx);Ee.prototype.visitFloat16=Oe(xw);Ee.prototype.visitFloat32=Oe(Sp);Ee.prototype.visitFloat64=Oe(Sp);Ee.prototype.visitUtf8=Oe(Rw);Ee.prototype.visitLargeUtf8=Oe(Rw);Ee.prototype.visitBinary=Oe(Ow);Ee.prototype.visitLargeBinary=Oe(Ow);Ee.prototype.visitFixedSizeBinary=Oe(vx);Ee.prototype.visitDate=Oe(wx);Ee.prototype.visitDateDay=Oe(Dw);Ee.prototype.visitDateMillisecond=Oe(Cw);Ee.prototype.visitTimestamp=Oe(Sx);Ee.prototype.visitTimestampSecond=Oe(Fw);Ee.prototype.visitTimestampMillisecond=Oe(Mw);Ee.prototype.visitTimestampMicrosecond=Oe(Lw);Ee.prototype.visitTimestampNanosecond=Oe(Aw);Ee.prototype.visitTime=Oe(_x);Ee.prototype.visitTimeSecond=Oe(kw);Ee.prototype.visitTimeMillisecond=Oe(Pw);Ee.prototype.visitTimeMicrosecond=Oe(Tw);Ee.prototype.visitTimeNanosecond=Oe(Nw);Ee.prototype.visitDecimal=Oe(bx);Ee.prototype.visitList=Oe(Ix);Ee.prototype.visitStruct=Oe(Rx);Ee.prototype.visitUnion=Oe(Fx);Ee.prototype.visitDenseUnion=Oe(Bw);Ee.prototype.visitSparseUnion=Oe(Uw);Ee.prototype.visitDictionary=Oe(Mx);Ee.prototype.visitInterval=Oe(Lx);Ee.prototype.visitIntervalDayTime=Oe(jw);Ee.prototype.visitIntervalYearMonth=Oe(zw);Ee.prototype.visitDuration=Oe(Ax);Ee.prototype.visitDurationSecond=Oe($w);Ee.prototype.visitDurationMillisecond=Oe(Vw);Ee.prototype.visitDurationMicrosecond=Oe(Hw);Ee.prototype.visitDurationNanosecond=Oe(Ww);Ee.prototype.visitFixedSizeList=Oe(kx);Ee.prototype.visitMap=Oe(Ex);const or=new Ee,br=Symbol.for("parent"),ea=Symbol.for("rowIndex");class _p{constructor(e,t){return this[br]=e,this[ea]=t,new Proxy(this,Nx)}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[ea],t=this[br],s=t.type.children,a={};for(let u=-1,d=s.length;++u<d;)a[s[u].name]=Tn.visit(t.children[u],e);return a}toString(){return`{${[...this].map(([e,t])=>`${Pl(e)}: ${Pl(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Px(this[br],this[ea])}}class Px{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,Tn.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(_p.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[br]:{writable:!0,enumerable:!1,configurable:!1,value:null},[ea]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});class Tx{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[br].type.children.map(t=>t.name)}has(e,t){return e[br].type.children.some(s=>s.name===t)}getOwnPropertyDescriptor(e,t){if(e[br].type.children.some(s=>s.name===t))return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const s=e[br].type.children.findIndex(a=>a.name===t);if(s!==-1){const a=Tn.visit(e[br].children[s],e[ea]);return Reflect.set(e,t,a),a}}set(e,t,s){const a=e[br].type.children.findIndex(u=>u.name===t);return a!==-1?(or.visit(e[br].children[a],e[ea],s),Reflect.set(e,t,s)):Reflect.has(e,t)||typeof t=="symbol"?Reflect.set(e,t,s):!1}}const Nx=new Tx;class we extends He{}function xe(n){return(e,t)=>e.getValid(t)?n(e,t):null}const Bx=(n,e)=>864e5*n[e],Ux=(n,e)=>null,Qw=(n,e,t)=>{if(t+1>=e.length)return null;const s=Et(e[t]),a=Et(e[t+1]);return n.subarray(s,a)},jx=({offset:n,values:e},t)=>{const s=n+t;return(e[s>>3]&1<<s%8)!==0},Kw=({values:n},e)=>Bx(n,e),qw=({values:n},e)=>Et(n[e]),ws=({stride:n,values:e},t)=>e[n*t],zx=({stride:n,values:e},t)=>Iw(e[n*t]),Yw=({values:n},e)=>n[e],$x=({stride:n,values:e},t)=>e.subarray(n*t,n*(t+1)),Gw=({values:n,valueOffsets:e},t)=>Qw(n,e,t),Jw=({values:n,valueOffsets:e},t)=>{const s=Qw(n,e,t);return s!==null?Bh(s):null},Vx=({values:n},e)=>n[e],Hx=({type:n,values:e},t)=>n.precision!==an.HALF?e[t]:Iw(e[t]),Wx=(n,e)=>n.type.unit===sr.DAY?Kw(n,e):qw(n,e),Xw=({values:n},e)=>1e3*Et(n[e]),Zw=({values:n},e)=>Et(n[e]),eS=({values:n},e)=>X0(n[e],BigInt(1e3)),tS=({values:n},e)=>X0(n[e],BigInt(1e6)),Qx=(n,e)=>{switch(n.type.unit){case Ie.SECOND:return Xw(n,e);case Ie.MILLISECOND:return Zw(n,e);case Ie.MICROSECOND:return eS(n,e);case Ie.NANOSECOND:return tS(n,e)}},nS=({values:n},e)=>n[e],rS=({values:n},e)=>n[e],iS=({values:n},e)=>n[e],sS=({values:n},e)=>n[e],Kx=(n,e)=>{switch(n.type.unit){case Ie.SECOND:return nS(n,e);case Ie.MILLISECOND:return rS(n,e);case Ie.MICROSECOND:return iS(n,e);case Ie.NANOSECOND:return sS(n,e)}},qx=({values:n,stride:e},t)=>wp.decimal(n.subarray(e*t,e*(t+1))),Yx=(n,e)=>{const{valueOffsets:t,stride:s,children:a}=n,{[e*s]:u,[e*s+1]:d}=t,p=a[0].slice(u,d-u);return new ht([p])},Gx=(n,e)=>{const{valueOffsets:t,children:s}=n,{[e]:a,[e+1]:u}=t,d=s[0];return new bp(d.slice(a,u-a))},Jx=(n,e)=>new _p(n,e),Xx=(n,e)=>n.type.mode===Pn.Dense?oS(n,e):aS(n,e),oS=(n,e)=>{const t=n.type.typeIdToChildIndex[n.typeIds[e]],s=n.children[t];return Tn.visit(s,n.valueOffsets[e])},aS=(n,e)=>{const t=n.type.typeIdToChildIndex[n.typeIds[e]],s=n.children[t];return Tn.visit(s,e)},Zx=(n,e)=>{var t;return(t=n.dictionary)===null||t===void 0?void 0:t.get(n.values[e])},eD=(n,e)=>n.type.unit===Gr.DAY_TIME?lS(n,e):uS(n,e),lS=({values:n},e)=>n.subarray(2*e,2*(e+1)),uS=({values:n},e)=>{const t=n[e],s=new Int32Array(2);return s[0]=Math.trunc(t/12),s[1]=Math.trunc(t%12),s},cS=({values:n},e)=>n[e],dS=({values:n},e)=>n[e],fS=({values:n},e)=>n[e],hS=({values:n},e)=>n[e],tD=(n,e)=>{switch(n.type.unit){case Ie.SECOND:return cS(n,e);case Ie.MILLISECOND:return dS(n,e);case Ie.MICROSECOND:return fS(n,e);case Ie.NANOSECOND:return hS(n,e)}},nD=(n,e)=>{const{stride:t,children:s}=n,u=s[0].slice(e*t,t);return new ht([u])};we.prototype.visitNull=xe(Ux);we.prototype.visitBool=xe(jx);we.prototype.visitInt=xe(Vx);we.prototype.visitInt8=xe(ws);we.prototype.visitInt16=xe(ws);we.prototype.visitInt32=xe(ws);we.prototype.visitInt64=xe(Yw);we.prototype.visitUint8=xe(ws);we.prototype.visitUint16=xe(ws);we.prototype.visitUint32=xe(ws);we.prototype.visitUint64=xe(Yw);we.prototype.visitFloat=xe(Hx);we.prototype.visitFloat16=xe(zx);we.prototype.visitFloat32=xe(ws);we.prototype.visitFloat64=xe(ws);we.prototype.visitUtf8=xe(Jw);we.prototype.visitLargeUtf8=xe(Jw);we.prototype.visitBinary=xe(Gw);we.prototype.visitLargeBinary=xe(Gw);we.prototype.visitFixedSizeBinary=xe($x);we.prototype.visitDate=xe(Wx);we.prototype.visitDateDay=xe(Kw);we.prototype.visitDateMillisecond=xe(qw);we.prototype.visitTimestamp=xe(Qx);we.prototype.visitTimestampSecond=xe(Xw);we.prototype.visitTimestampMillisecond=xe(Zw);we.prototype.visitTimestampMicrosecond=xe(eS);we.prototype.visitTimestampNanosecond=xe(tS);we.prototype.visitTime=xe(Kx);we.prototype.visitTimeSecond=xe(nS);we.prototype.visitTimeMillisecond=xe(rS);we.prototype.visitTimeMicrosecond=xe(iS);we.prototype.visitTimeNanosecond=xe(sS);we.prototype.visitDecimal=xe(qx);we.prototype.visitList=xe(Yx);we.prototype.visitStruct=xe(Jx);we.prototype.visitUnion=xe(Xx);we.prototype.visitDenseUnion=xe(oS);we.prototype.visitSparseUnion=xe(aS);we.prototype.visitDictionary=xe(Zx);we.prototype.visitInterval=xe(eD);we.prototype.visitIntervalDayTime=xe(lS);we.prototype.visitIntervalYearMonth=xe(uS);we.prototype.visitDuration=xe(tD);we.prototype.visitDurationSecond=xe(cS);we.prototype.visitDurationMillisecond=xe(dS);we.prototype.visitDurationMicrosecond=xe(fS);we.prototype.visitDurationNanosecond=xe(hS);we.prototype.visitFixedSizeList=xe(nD);we.prototype.visitMap=xe(Gx);const Tn=new we,Ko=Symbol.for("keys"),ta=Symbol.for("vals"),qo=Symbol.for("kKeysAsStrings"),Hh=Symbol.for("_kKeysAsStrings");class bp{constructor(e){return this[Ko]=new ht([e.children[0]]).memoize(),this[ta]=e.children[1],new Proxy(this,new iD)}get[qo](){return this[Hh]||(this[Hh]=Array.from(this[Ko].toArray(),String))}[Symbol.iterator](){return new rD(this[Ko],this[ta])}get size(){return this[Ko].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[Ko],t=this[ta],s={};for(let a=-1,u=e.length;++a<u;)s[e.get(a)]=Tn.visit(t,a);return s}toString(){return`{${[...this].map(([e,t])=>`${Pl(e)}: ${Pl(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class rD{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),Tn.visit(this.vals,e)]})}}class iD{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[qo]}has(e,t){return e[qo].includes(t)}getOwnPropertyDescriptor(e,t){if(e[qo].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const s=e[qo].indexOf(t);if(s!==-1){const a=Tn.visit(Reflect.get(e,ta),s);return Reflect.set(e,t,a),a}}set(e,t,s){const a=e[qo].indexOf(t);return a!==-1?(or.visit(Reflect.get(e,ta),a,s),Reflect.set(e,t,s)):Reflect.has(e,t)?Reflect.set(e,t,s):!1}}Object.defineProperties(bp.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ko]:{writable:!0,enumerable:!1,configurable:!1,value:null},[ta]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Hh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let dv;function pS(n,e,t,s){const{length:a=0}=n;let u=typeof e!="number"?0:e,d=typeof t!="number"?a:t;return u<0&&(u=(u%a+a)%a),d<0&&(d=(d%a+a)%a),d<u&&(dv=u,u=d,d=dv),d>a&&(d=a),s?s(n,u,d):[u,d]}const Ip=(n,e)=>n<0?e+n:n,fv=n=>n!==n;function ba(n){if(typeof n!=="object"||n===null)return fv(n)?fv:t=>t===n;if(n instanceof Date){const t=n.valueOf();return s=>s instanceof Date?s.valueOf()===t:!1}return ArrayBuffer.isView(n)?t=>t?tx(n,t):!1:n instanceof Map?oD(n):Array.isArray(n)?sD(n):n instanceof ht?aD(n):lD(n,!0)}function sD(n){const e=[];for(let t=-1,s=n.length;++t<s;)e[t]=ba(n[t]);return md(e)}function oD(n){let e=-1;const t=[];for(const s of n.values())t[++e]=ba(s);return md(t)}function aD(n){const e=[];for(let t=-1,s=n.length;++t<s;)e[t]=ba(n.get(t));return md(e)}function lD(n,e=!1){const t=Object.keys(n);if(!e&&t.length===0)return()=>!1;const s=[];for(let a=-1,u=t.length;++a<u;)s[a]=ba(n[t[a]]);return md(s,t)}function md(n,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return uD(n,t);case Map:return hv(n,t,t.keys());case bp:case _p:case Object:case void 0:return hv(n,t,e||Object.keys(t))}return t instanceof ht?cD(n,t):!1}}function uD(n,e){const t=n.length;if(e.length!==t)return!1;for(let s=-1;++s<t;)if(!n[s](e[s]))return!1;return!0}function cD(n,e){const t=n.length;if(e.length!==t)return!1;for(let s=-1;++s<t;)if(!n[s](e.get(s)))return!1;return!0}function hv(n,e,t){const s=t[Symbol.iterator](),a=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),u=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]();let d=0;const f=n.length;let p=u.next(),m=s.next(),g=a.next();for(;d<f&&!m.done&&!g.done&&!p.done&&!(m.value!==g.value||!n[d](p.value));++d,m=s.next(),g=a.next(),p=u.next());return d===f&&m.done&&g.done&&p.done?!0:(s.return&&s.return(),a.return&&a.return(),u.return&&u.return(),!1)}function mS(n,e,t,s){return(t&1<<s)!==0}function dD(n,e,t,s){return(t&1<<s)>>s}function pv(n,e,t){const s=t.byteLength+7&-8;if(n>0||t.byteLength<s){const a=new Uint8Array(s);return a.set(n%8===0?t.subarray(n>>3):Wh(new Ep(t,n,e,null,mS)).subarray(0,s)),a}return t}function Wh(n){const e=[];let t=0,s=0,a=0;for(const d of n)d&&(a|=1<<s),++s===8&&(e[t++]=a,a=s=0);(t===0||s>0)&&(e[t++]=a);const u=new Uint8Array(e.length+7&-8);return u.set(e),u}class Ep{constructor(e,t,s,a,u){this.bytes=e,this.length=s,this.context=a,this.get=u,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function Qh(n,e,t){if(t-e<=0)return 0;if(t-e<8){let u=0;for(const d of new Ep(n,e,t-e,n,dD))u+=d;return u}const s=t>>3<<3,a=e+(e%8===0?0:8-e%8);return Qh(n,e,a)+Qh(n,s,t)+fD(n,a>>3,s-a>>3)}function fD(n,e,t){let s=0,a=Math.trunc(e);const u=new DataView(n.buffer,n.byteOffset,n.byteLength),d=t===void 0?n.byteLength:a+t;for(;d-a>=4;)s+=yh(u.getUint32(a)),a+=4;for(;d-a>=2;)s+=yh(u.getUint16(a)),a+=2;for(;d-a>=1;)s+=yh(u.getUint8(a)),a+=1;return s}function yh(n){let e=Math.trunc(n);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const hD=-1;let St=class Kh{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:e}=this;return de.isSparseUnion(e)?this.children.some(t=>t.nullable):de.isDenseUnion(e)?this.children.some(t=>t.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0;const{valueOffsets:t,values:s,nullBitmap:a,typeIds:u}=this;return t&&(e+=t.byteLength),s&&(e+=s.byteLength),a&&(e+=a.byteLength),u&&(e+=u.byteLength),this.children.reduce((d,f)=>d+f.byteLength,e)}get nullCount(){if(de.isUnion(this.type))return this.children.reduce((s,a)=>s+a.nullCount,0);let e=this._nullCount,t;return e<=hD&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-Qh(t,this.offset,this.offset+this.length)),e}constructor(e,t,s,a,u,d=[],f){this.type=e,this.children=d,this.dictionary=f,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(s||0,0)),this._nullCount=Math.floor(Math.max(a||0,-1));let p;u instanceof Kh?(this.stride=u.stride,this.values=u.values,this.typeIds=u.typeIds,this.nullBitmap=u.nullBitmap,this.valueOffsets=u.valueOffsets):(this.stride=hi(e),u&&((p=u[0])&&(this.valueOffsets=p),(p=u[1])&&(this.values=p),(p=u[2])&&(this.nullBitmap=p),(p=u[3])&&(this.typeIds=p)))}getValid(e){const{type:t}=this;if(de.isUnion(t)){const s=t,a=this.children[s.typeIdToChildIndex[this.typeIds[e]]],u=s.mode===Pn.Dense?this.valueOffsets[e]:e;return a.getValid(u)}if(this.nullable&&this.nullCount>0){const s=this.offset+e;return(this.nullBitmap[s>>3]&1<<s%8)!==0}return!0}setValid(e,t){let s;const{type:a}=this;if(de.isUnion(a)){const u=a,d=this.children[u.typeIdToChildIndex[this.typeIds[e]]],f=u.mode===Pn.Dense?this.valueOffsets[e]:e;s=d.getValid(f),d.setValid(f,t)}else{let{nullBitmap:u}=this;const{offset:d,length:f}=this,p=d+e,m=1<<p%8,g=p>>3;(!u||u.byteLength<=g)&&(u=new Uint8Array((d+f+63&-64)>>3).fill(255),this.nullCount>0?(u.set(pv(d,f,this.nullBitmap),0),Object.assign(this,{nullBitmap:u})):Object.assign(this,{nullBitmap:u,_nullCount:0}));const v=u[g];s=(v&m)!==0,u[g]=t?v|m:v&~m}return s!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(e=this.type,t=this.offset,s=this.length,a=this._nullCount,u=this,d=this.children){return new Kh(e,t,s,a,u,d,this.dictionary)}slice(e,t){const{stride:s,typeId:a,children:u}=this,d=+(this._nullCount===0)-1,f=a===16?s:1,p=this._sliceBuffers(e,t,s,a);return this.clone(this.type,this.offset+e,t,d,p,u.length===0||this.valueOffsets?u:this._sliceChildren(u,f*e,f*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===C.Null)return this.clone(this.type,0,e,0);const{length:t,nullCount:s}=this,a=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);a[t>>3]=(1<<t-(t&-8))-1,s>0&&a.set(pv(this.offset,t,this.nullBitmap),0);const u=this.buffers;return u[fi.VALIDITY]=a,this.clone(this.type,0,e,s+(e-t),u)}_sliceBuffers(e,t,s,a){let u;const{buffers:d}=this;return(u=d[fi.TYPE])&&(d[fi.TYPE]=u.subarray(e,e+t)),(u=d[fi.OFFSET])&&(d[fi.OFFSET]=u.subarray(e,e+t+1))||(u=d[fi.DATA])&&(d[fi.DATA]=a===6?u:u.subarray(s*e,s*(e+t))),d}_sliceChildren(e,t,s){return e.map(a=>a.slice(t,s))}};St.prototype.children=Object.freeze([]);class Fl extends He{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{["type"]:t,["offset"]:s=0,["length"]:a=0}=e;return new St(t,s,a,a)}visitBool(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length>>3,["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitInt(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length,["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitFloat(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length,["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitUtf8(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.data),u=Ge(e.nullBitmap),d=yl(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,a,u])}visitLargeUtf8(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.data),u=Ge(e.nullBitmap),d=ev(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,a,u])}visitBinary(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.data),u=Ge(e.nullBitmap),d=yl(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,a,u])}visitLargeBinary(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.data),u=Ge(e.nullBitmap),d=ev(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,a,u])}visitFixedSizeBinary(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitDate(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitTimestamp(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitTime(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitDecimal(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitList(e){const{["type"]:t,["offset"]:s=0,["child"]:a}=e,u=Ge(e.nullBitmap),d=yl(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,void 0,u],[a])}visitStruct(e){const{["type"]:t,["offset"]:s=0,["children"]:a=[]}=e,u=Ge(e.nullBitmap),{length:d=a.reduce((p,{length:m})=>Math.max(p,m),0),nullCount:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,void 0,u],a)}visitUnion(e){const{["type"]:t,["offset"]:s=0,["children"]:a=[]}=e,u=ut(t.ArrayType,e.typeIds),{["length"]:d=u.length,["nullCount"]:f=-1}=e;if(de.isSparseUnion(t))return new St(t,s,d,f,[void 0,void 0,void 0,u],a);const p=yl(e.valueOffsets);return new St(t,s,d,f,[p,void 0,void 0,u],a)}visitDictionary(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.indices.ArrayType,e.data),{["dictionary"]:d=new ht([new Fl().visit({type:t.dictionary})])}=e,{["length"]:f=u.length,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[void 0,u,a],[],d)}visitInterval(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitDuration(e){const{["type"]:t,["offset"]:s=0}=e,a=Ge(e.nullBitmap),u=ut(t.ArrayType,e.data),{["length"]:d=u.length,["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,u,a])}visitFixedSizeList(e){const{["type"]:t,["offset"]:s=0,["child"]:a=new Fl().visit({type:t.valueType})}=e,u=Ge(e.nullBitmap),{["length"]:d=a.length/hi(t),["nullCount"]:f=e.nullBitmap?-1:0}=e;return new St(t,s,d,f,[void 0,void 0,u],[a])}visitMap(e){const{["type"]:t,["offset"]:s=0,["child"]:a=new Fl().visit({type:t.childType})}=e,u=Ge(e.nullBitmap),d=yl(e.valueOffsets),{["length"]:f=d.length-1,["nullCount"]:p=e.nullBitmap?-1:0}=e;return new St(t,s,f,p,[d,void 0,u],[a])}}const pD=new Fl;function Ve(n){return pD.visit(n)}class mv{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function mD(n){return n.some(e=>e.nullable)}function yS(n){return n.reduce((e,t)=>e+t.nullCount,0)}function gS(n){return n.reduce((e,t,s)=>(e[s+1]=e[s]+t.length,e),new Uint32Array(n.length+1))}function vS(n,e,t,s){const a=[];for(let u=-1,d=n.length;++u<d;){const f=n[u],p=e[u],{length:m}=f;if(p>=s)break;if(t>=p+m)continue;if(p>=t&&p+m<=s){a.push(f);continue}const g=Math.max(0,t-p),v=Math.min(s-p,m);a.push(f.slice(g,v-g))}return a.length===0&&a.push(n[0].slice(0,0)),a}function xp(n,e,t,s){let a=0,u=0,d=e.length-1;do{if(a>=d-1)return t<e[d]?s(n,a,t-e[a]):null;u=a+Math.trunc((d-a)*.5),t<e[u]?d=u:a=u}while(a<d)}function Dp(n,e){return n.getValid(e)}function td(n){function e(t,s,a){return n(t[s],a)}return function(t){const s=this.data;return xp(s,this._offsets,t,e)}}function wS(n){let e;function t(s,a,u){return n(s[a],u,e)}return function(s,a){const u=this.data;e=a;const d=xp(u,this._offsets,s,t);return e=void 0,d}}function SS(n){let e;function t(s,a,u){let d=u,f=0,p=0;for(let m=a-1,g=s.length;++m<g;){const v=s[m];if(~(f=n(v,e,d)))return p+f;d=0,p+=v.length}return-1}return function(s,a){e=s;const u=this.data,d=typeof a!="number"?t(u,0,0):xp(u,this._offsets,a,t);return e=void 0,d}}class Se extends He{}function yD(n,e){return e===null&&n.length>0?0:-1}function gD(n,e){const{nullBitmap:t}=n;if(!t||n.nullCount<=0)return-1;let s=0;for(const a of new Ep(t,n.offset+(e||0),n.length,t,mS)){if(!a)return s;++s}return-1}function Me(n,e,t){if(e===void 0)return-1;if(e===null)switch(n.typeId){case C.Union:break;case C.Dictionary:break;default:return gD(n,t)}const s=Tn.getVisitFn(n),a=ba(e);for(let u=(t||0)-1,d=n.length;++u<d;)if(a(s(n,u)))return u;return-1}function _S(n,e,t){const s=Tn.getVisitFn(n),a=ba(e);for(let u=(t||0)-1,d=n.length;++u<d;)if(a(s(n,u)))return u;return-1}Se.prototype.visitNull=yD;Se.prototype.visitBool=Me;Se.prototype.visitInt=Me;Se.prototype.visitInt8=Me;Se.prototype.visitInt16=Me;Se.prototype.visitInt32=Me;Se.prototype.visitInt64=Me;Se.prototype.visitUint8=Me;Se.prototype.visitUint16=Me;Se.prototype.visitUint32=Me;Se.prototype.visitUint64=Me;Se.prototype.visitFloat=Me;Se.prototype.visitFloat16=Me;Se.prototype.visitFloat32=Me;Se.prototype.visitFloat64=Me;Se.prototype.visitUtf8=Me;Se.prototype.visitLargeUtf8=Me;Se.prototype.visitBinary=Me;Se.prototype.visitLargeBinary=Me;Se.prototype.visitFixedSizeBinary=Me;Se.prototype.visitDate=Me;Se.prototype.visitDateDay=Me;Se.prototype.visitDateMillisecond=Me;Se.prototype.visitTimestamp=Me;Se.prototype.visitTimestampSecond=Me;Se.prototype.visitTimestampMillisecond=Me;Se.prototype.visitTimestampMicrosecond=Me;Se.prototype.visitTimestampNanosecond=Me;Se.prototype.visitTime=Me;Se.prototype.visitTimeSecond=Me;Se.prototype.visitTimeMillisecond=Me;Se.prototype.visitTimeMicrosecond=Me;Se.prototype.visitTimeNanosecond=Me;Se.prototype.visitDecimal=Me;Se.prototype.visitList=Me;Se.prototype.visitStruct=Me;Se.prototype.visitUnion=Me;Se.prototype.visitDenseUnion=_S;Se.prototype.visitSparseUnion=_S;Se.prototype.visitDictionary=Me;Se.prototype.visitInterval=Me;Se.prototype.visitIntervalDayTime=Me;Se.prototype.visitIntervalYearMonth=Me;Se.prototype.visitDuration=Me;Se.prototype.visitDurationSecond=Me;Se.prototype.visitDurationMillisecond=Me;Se.prototype.visitDurationMicrosecond=Me;Se.prototype.visitDurationNanosecond=Me;Se.prototype.visitFixedSizeList=Me;Se.prototype.visitMap=Me;const nd=new Se;class _e extends He{}function De(n){const{type:e}=n;if(n.nullCount===0&&n.stride===1&&(de.isInt(e)&&e.bitWidth!==64||de.isTime(e)&&e.bitWidth!==64||de.isFloat(e)&&e.precision!==an.HALF))return new mv(n.data.length,s=>{const a=n.data[s];return a.values.subarray(0,a.length)[Symbol.iterator]()});let t=0;return new mv(n.data.length,s=>{const u=n.data[s].length,d=n.slice(t,t+u);return t+=u,new vD(d)})}class vD{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}_e.prototype.visitNull=De;_e.prototype.visitBool=De;_e.prototype.visitInt=De;_e.prototype.visitInt8=De;_e.prototype.visitInt16=De;_e.prototype.visitInt32=De;_e.prototype.visitInt64=De;_e.prototype.visitUint8=De;_e.prototype.visitUint16=De;_e.prototype.visitUint32=De;_e.prototype.visitUint64=De;_e.prototype.visitFloat=De;_e.prototype.visitFloat16=De;_e.prototype.visitFloat32=De;_e.prototype.visitFloat64=De;_e.prototype.visitUtf8=De;_e.prototype.visitLargeUtf8=De;_e.prototype.visitBinary=De;_e.prototype.visitLargeBinary=De;_e.prototype.visitFixedSizeBinary=De;_e.prototype.visitDate=De;_e.prototype.visitDateDay=De;_e.prototype.visitDateMillisecond=De;_e.prototype.visitTimestamp=De;_e.prototype.visitTimestampSecond=De;_e.prototype.visitTimestampMillisecond=De;_e.prototype.visitTimestampMicrosecond=De;_e.prototype.visitTimestampNanosecond=De;_e.prototype.visitTime=De;_e.prototype.visitTimeSecond=De;_e.prototype.visitTimeMillisecond=De;_e.prototype.visitTimeMicrosecond=De;_e.prototype.visitTimeNanosecond=De;_e.prototype.visitDecimal=De;_e.prototype.visitList=De;_e.prototype.visitStruct=De;_e.prototype.visitUnion=De;_e.prototype.visitDenseUnion=De;_e.prototype.visitSparseUnion=De;_e.prototype.visitDictionary=De;_e.prototype.visitInterval=De;_e.prototype.visitIntervalDayTime=De;_e.prototype.visitIntervalYearMonth=De;_e.prototype.visitDuration=De;_e.prototype.visitDurationSecond=De;_e.prototype.visitDurationMillisecond=De;_e.prototype.visitDurationMicrosecond=De;_e.prototype.visitDurationNanosecond=De;_e.prototype.visitFixedSizeList=De;_e.prototype.visitMap=De;const Cp=new _e;var bS;const IS={},ES={};class ht{constructor(e){var t,s,a;const u=e[0]instanceof ht?e.flatMap(f=>f.data):e;if(u.length===0||u.some(f=>!(f instanceof St)))throw new TypeError("Vector constructor expects an Array of Data instances.");const d=(t=u[0])===null||t===void 0?void 0:t.type;switch(u.length){case 0:this._offsets=[0];break;case 1:{const{get:f,set:p,indexOf:m}=IS[d.typeId],g=u[0];this.isValid=v=>Dp(g,v),this.get=v=>f(g,v),this.set=(v,w)=>p(g,v,w),this.indexOf=v=>m(g,v),this._offsets=[0,g.length];break}default:Object.setPrototypeOf(this,ES[d.typeId]),this._offsets=gS(u);break}this.data=u,this.type=d,this.stride=hi(d),this.numChildren=(a=(s=d.children)===null||s===void 0?void 0:s.length)!==null&&a!==void 0?a:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return mD(this.data)}get nullCount(){return yS(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${C[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(Ip(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return Cp.visit(this)}concat(...e){return new ht(this.data.concat(e.flatMap(t=>t.data).flat(Number.POSITIVE_INFINITY)))}slice(e,t){return new ht(pS(this,e,t,({data:s,_offsets:a},u,d)=>vS(s,a,u,d)))}toJSON(){return[...this]}toArray(){const{type:e,data:t,length:s,stride:a,ArrayType:u}=this;switch(e.typeId){case C.Int:case C.Float:case C.Decimal:case C.Time:case C.Timestamp:switch(t.length){case 0:return new u;case 1:return t[0].values.subarray(0,s*a);default:return t.reduce((d,{values:f,length:p})=>(d.array.set(f.subarray(0,p*a),d.offset),d.offset+=p*a,d),{array:new u(s*a),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)===null||t===void 0?void 0:t.findIndex(s=>s.name===e))}getChildAt(e){return e>-1&&e<this.numChildren?new ht(this.data.map(({children:t})=>t[e])):null}get isMemoized(){return de.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(de.isDictionary(this.type)){const e=new rd(this.data[0].dictionary),t=this.data.map(s=>{const a=s.clone();return a.dictionary=e,a});return new ht(t)}return new rd(this)}unmemoize(){if(de.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),t=this.data.map(s=>{const a=s.clone();return a.dictionary=e,a});return new ht(t)}return this}}bS=Symbol.toStringTag;ht[bS]=(n=>{n.type=de.prototype,n.data=[],n.length=0,n.stride=1,n.numChildren=0,n._offsets=new Uint32Array([0]),n[Symbol.isConcatSpreadable]=!0;const e=Object.keys(C).map(t=>C[t]).filter(t=>typeof t=="number"&&t!==C.NONE);for(const t of e){const s=Tn.getVisitFnByTypeId(t),a=or.getVisitFnByTypeId(t),u=nd.getVisitFnByTypeId(t);IS[t]={get:s,set:a,indexOf:u},ES[t]=Object.create(n,{isValid:{value:td(Dp)},get:{value:td(Tn.getVisitFnByTypeId(t))},set:{value:wS(or.getVisitFnByTypeId(t))},indexOf:{value:SS(nd.getVisitFnByTypeId(t))}})}return"Vector"})(ht.prototype);class rd extends ht{constructor(e){super(e.data);const t=this.get,s=this.set,a=this.slice,u=new Array(this.length);Object.defineProperty(this,"get",{value(d){const f=u[d];if(f!==void 0)return f;const p=t.call(this,d);return u[d]=p,p}}),Object.defineProperty(this,"set",{value(d,f){s.call(this,d,f),u[d]=f}}),Object.defineProperty(this,"slice",{value:(d,f)=>new rd(a.call(this,d,f))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new ht(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class qh{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,s,a){return e.prep(8,24),e.writeInt64(BigInt(a??0)),e.pad(4),e.writeInt32(s),e.writeInt64(BigInt(t??0)),e.offset()}}let Pr=class Yh{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new Yh).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+st),(t||new Yh).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ut.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new Br).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const s=this.bb.__offset(this.bb_pos,8);return s?(t||new qh).__init(this.bb.__vector(this.bb_pos+s)+e*24,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const s=this.bb.__offset(this.bb_pos,10);return s?(t||new qh).__init(this.bb.__vector(this.bb_pos+s)+e*24,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const s=this.bb.__offset(this.bb_pos,12);return s?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Ut.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}};class rt{constructor(e=[],t,s,a=Ut.V5){this.fields=e||[],this.metadata=t||new Map,s||(s=Gh(this.fields)),this.dictionaries=s,this.metadataVersion=a}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(e){const t=new Set(e),s=this.fields.filter(a=>t.has(a.name));return new rt(s,this.metadata)}selectAt(e){const t=e.map(s=>this.fields[s]).filter(Boolean);return new rt(t,this.metadata)}assign(...e){const t=e[0]instanceof rt?e[0]:Array.isArray(e[0])?new rt(e[0]):new rt(e),s=[...this.fields],a=hc(hc(new Map,this.metadata),t.metadata),u=t.fields.filter(f=>{const p=s.findIndex(m=>m.name===f.name);return~p?(s[p]=f.clone({metadata:hc(hc(new Map,s[p].metadata),f.metadata)}))&&!1:!0}),d=Gh(u,new Map);return new rt([...s,...u],a,new Map([...this.dictionaries,...d]))}}rt.prototype.fields=null;rt.prototype.metadata=null;rt.prototype.dictionaries=null;class xt{static new(...e){let[t,s,a,u]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],s===void 0&&(s=e[0].type),a===void 0&&(a=e[0].nullable),u===void 0&&(u=e[0].metadata)),new xt(`${t}`,s,a,u)}constructor(e,t,s=!1,a){this.name=e,this.type=t,this.nullable=s,this.metadata=a||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,s,a,u]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,s=this.type,a=this.nullable,u=this.metadata]=e:{name:t=this.name,type:s=this.type,nullable:a=this.nullable,metadata:u=this.metadata}=e[0],xt.new(t,s,a,u)}}xt.prototype.type=null;xt.prototype.name=null;xt.prototype.nullable=null;xt.prototype.metadata=null;function hc(n,e){return new Map([...n||new Map,...e||new Map])}function Gh(n,e=new Map){for(let t=-1,s=n.length;++t<s;){const u=n[t].type;if(de.isDictionary(u)){if(!e.has(u.id))e.set(u.id,u.dictionary);else if(e.get(u.id)!==u.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}u.children&&u.children.length>0&&Gh(u.children,e)}return e}var wD=q0,SD=ma;class Op{static decode(e){e=new SD(Ge(e));const t=Pr.getRootAsFooter(e),s=rt.decode(t.schema(),new Map,t.version());return new _D(s,t)}static encode(e){const t=new wD,s=rt.encode(t,e.schema);Pr.startRecordBatchesVector(t,e.numRecordBatches);for(const d of[...e.recordBatches()].slice().reverse())va.encode(t,d);const a=t.endVector();Pr.startDictionariesVector(t,e.numDictionaries);for(const d of[...e.dictionaryBatches()].slice().reverse())va.encode(t,d);const u=t.endVector();return Pr.startFooter(t),Pr.addSchema(t,s),Pr.addVersion(t,Ut.V5),Pr.addRecordBatches(t,a),Pr.addDictionaries(t,u),Pr.finishFooterBuffer(t,Pr.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=Ut.V5,s,a){this.schema=e,this.version=t,s&&(this._recordBatches=s),a&&(this._dictionaryBatches=a)}*recordBatches(){for(let e,t=-1,s=this.numRecordBatches;++t<s;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,s=this.numDictionaries;++t<s;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}}class _D extends Op{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(e,t){super(e,t.version()),this._footer=t}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){const t=this._footer.recordBatches(e);if(t)return va.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){const t=this._footer.dictionaries(e);if(t)return va.decode(t)}return null}}class va{static decode(e){return new va(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){const{metaDataLength:s}=t,a=BigInt(t.offset),u=BigInt(t.bodyLength);return qh.createBlock(e,a,s,u)}constructor(e,t,s){this.metaDataLength=e,this.offset=Et(s),this.bodyLength=Et(t)}}const Ft=Object.freeze({done:!0,value:void 0});class yv{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class xS{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class bD extends xS{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return ke(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Ft);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return er.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return er.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return ke(this,void 0,void 0,function*(){return yield this.abort(e),Ft})}return(e){return ke(this,void 0,void 0,function*(){return yield this.close(),Ft})}read(e){return ke(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ke(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,s)=>{this.resolvers.push({resolve:t,reject:s})}):Promise.resolve(Ft)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class ID extends bD{write(e){if((e=Ge(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Bh(this.toUint8Array(!0)):this.toUint8Array(!1).then(Bh)}toUint8Array(e=!1){return e?Yr(this._values)[0]:ke(this,void 0,void 0,function*(){var t,s,a,u;const d=[];let f=0;try{for(var p=!0,m=Jo(this),g;g=yield m.next(),t=g.done,!t;p=!0){u=g.value,p=!1;const v=u;d.push(v),f+=v.byteLength}}catch(v){s={error:v}}finally{try{!p&&!t&&(a=m.return)&&(yield a.call(m))}finally{if(s)throw s.error}}return Yr(d,f)[0]})}}class id{constructor(e){e&&(this.source=new ED(er.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class wa{constructor(e){e instanceof wa?this.source=e.source:e instanceof ID?this.source=new js(er.fromAsyncIterable(e)):W0(e)?this.source=new js(er.fromNodeStream(e)):gp(e)?this.source=new js(er.fromDOMStream(e)):V0(e)?this.source=new js(er.fromDOMStream(e.body)):pd(e)?this.source=new js(er.fromIterable(e)):kl(e)?this.source=new js(er.fromAsyncIterable(e)):yp(e)&&(this.source=new js(er.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class ED{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Ft)}return(e){return Object.create(this.source.return&&this.source.return(e)||Ft)}}class js{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return ke(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return ke(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return ke(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return ke(this,arguments,void 0,function*(t,s="read"){return yield this.source.next({cmd:s,size:t})})}throw(e){return ke(this,void 0,void 0,function*(){const t=this.source.throw&&(yield this.source.throw(e))||Ft;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return ke(this,void 0,void 0,function*(){const t=this.source.return&&(yield this.source.return(e))||Ft;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}class gv extends id{constructor(e,t){super(),this.position=0,this.buffer=Ge(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:s}=this.readAt(e,4);return new DataView(t,s).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){const{buffer:t,size:s,position:a}=this;return t&&a<s?(typeof e!="number"&&(e=Number.POSITIVE_INFINITY),this.position=Math.min(s,a+Math.min(s-a,e)),t.subarray(a,this.position)):null}readAt(e,t){const s=this.buffer,a=Math.min(this.size,e+t);return s?s.subarray(e,a):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}}class sd extends wa{constructor(e,t){super(),this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=ke(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending})}readInt32(e){return ke(this,void 0,void 0,function*(){const{buffer:t,byteOffset:s}=yield this.readAt(e,4);return new DataView(t,s).getInt32(0,!0)})}seek(e){return ke(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return ke(this,void 0,void 0,function*(){this._pending&&(yield this._pending);const{_handle:t,size:s,position:a}=this;if(t&&a<s){typeof e!="number"&&(e=Number.POSITIVE_INFINITY);let u=a,d=0,f=0;const p=Math.min(s,u+Math.min(s-u,e)),m=new Uint8Array(Math.max(0,(this.position=p)-u));for(;(u+=f)<p&&(d+=f)<m.byteLength;)({bytesRead:f}=yield t.read(m,d,m.byteLength-d,u));return m}return null})}readAt(e,t){return ke(this,void 0,void 0,function*(){this._pending&&(yield this._pending);const{_handle:s,size:a}=this;if(s&&e+t<a){const u=Math.min(a,e+t),d=new Uint8Array(u-e);return(yield s.read(d,0,t,e)).buffer}return new Uint8Array(t)})}close(){return ke(this,void 0,void 0,function*(){const e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return ke(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return ke(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}}const xD=65536;function Yo(n){return n<0&&(n=4294967295+n+1),`0x${n.toString(16)}`}const Sa=8,Rp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class DS{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){const t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),s=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]);let a=t[3]*s[3];this.buffer[0]=a&65535;let u=a>>>16;return a=t[2]*s[3],u+=a,a=t[3]*s[2]>>>0,u+=a,this.buffer[0]+=u<<16,this.buffer[1]=u>>>0<a?xD:0,this.buffer[1]+=u>>>16,this.buffer[1]+=t[1]*s[3]+t[2]*s[2]+t[3]*s[1],this.buffer[1]+=t[0]*s[3]+t[1]*s[2]+t[2]*s[1]+t[3]*s[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${Yo(this.buffer[1])} ${Yo(this.buffer[0])}`}}class lt extends DS{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return lt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return lt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const s=e.length,a=new lt(t);for(let u=0;u<s;){const d=Sa<s-u?Sa:s-u,f=new lt(new Uint32Array([Number.parseInt(e.slice(u,u+d),10),0])),p=new lt(new Uint32Array([Rp[d],0]));a.times(p),a.plus(f),u+=d}return a}static convertArray(e){const t=new Uint32Array(e.length*2);for(let s=-1,a=e.length;++s<a;)lt.from(e[s],new Uint32Array(t.buffer,t.byteOffset+2*s*4,2));return t}static multiply(e,t){return new lt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new lt(new Uint32Array(e.buffer)).plus(t)}}class An extends DS{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){const t=this.buffer[1]<<0,s=e.buffer[1]<<0;return t<s||t===s&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return An.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return An.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){const s=e.startsWith("-"),a=e.length,u=new An(t);for(let d=s?1:0;d<a;){const f=Sa<a-d?Sa:a-d,p=new An(new Uint32Array([Number.parseInt(e.slice(d,d+f),10),0])),m=new An(new Uint32Array([Rp[f],0]));u.times(m),u.plus(p),d+=f}return s?u.negate():u}static convertArray(e){const t=new Uint32Array(e.length*2);for(let s=-1,a=e.length;++s<a;)An.from(e[s],new Uint32Array(t.buffer,t.byteOffset+2*s*4,2));return t}static multiply(e,t){return new An(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new An(new Uint32Array(e.buffer)).plus(t)}}class Ur{constructor(e){this.buffer=e}high(){return new An(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new An(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){const t=new lt(new Uint32Array([this.buffer[3],0])),s=new lt(new Uint32Array([this.buffer[2],0])),a=new lt(new Uint32Array([this.buffer[1],0])),u=new lt(new Uint32Array([this.buffer[0],0])),d=new lt(new Uint32Array([e.buffer[3],0])),f=new lt(new Uint32Array([e.buffer[2],0])),p=new lt(new Uint32Array([e.buffer[1],0])),m=new lt(new Uint32Array([e.buffer[0],0]));let g=lt.multiply(u,m);this.buffer[0]=g.low();const v=new lt(new Uint32Array([g.high(),0]));return g=lt.multiply(a,m),v.plus(g),g=lt.multiply(u,p),v.plus(g),this.buffer[1]=v.low(),this.buffer[3]=v.lessThan(g)?1:0,this.buffer[2]=v.high(),new lt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(lt.multiply(s,m)).plus(lt.multiply(a,p)).plus(lt.multiply(u,f)),this.buffer[3]+=lt.multiply(t,m).plus(lt.multiply(s,p)).plus(lt.multiply(a,f)).plus(lt.multiply(u,d)).low(),this}plus(e){const t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${Yo(this.buffer[3])} ${Yo(this.buffer[2])} ${Yo(this.buffer[1])} ${Yo(this.buffer[0])}`}static multiply(e,t){return new Ur(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Ur(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Ur.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Ur.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const s=e.startsWith("-"),a=e.length,u=new Ur(t);for(let d=s?1:0;d<a;){const f=Sa<a-d?Sa:a-d,p=new Ur(new Uint32Array([Number.parseInt(e.slice(d,d+f),10),0,0,0])),m=new Ur(new Uint32Array([Rp[f],0,0,0]));u.times(m),u.plus(p),d+=f}return s?u.negate():u}static convertArray(e){const t=new Uint32Array(e.length*4);for(let s=-1,a=e.length;++s<a;)Ur.from(e[s],new Uint32Array(t.buffer,t.byteOffset+4*4*s,4));return t}}class CS extends He{constructor(e,t,s,a,u=Ut.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=s,this.dictionaries=a,this.metadataVersion=u}visit(e){return super.visit(e instanceof xt?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ve({type:e,length:t})}visitBool(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitInt(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitFloat(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitUtf8(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeUtf8(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitLargeBinary(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitDate(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitTimestamp(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitTime(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitDecimal(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitList(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),children:this.visitMany(e.children)})}visitUnion(e,{length:t,nullCount:s}=this.nextFieldNode()){return this.metadataVersion<Ut.V5&&this.readNullBitmap(e,s),e.mode===Pn.Sparse?this.visitSparseUnion(e,{length:t,nullCount:s}):this.visitDenseUnion(e,{length:t,nullCount:s})}visitDenseUnion(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitDuration(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),data:this.readData(e)})}visitFixedSizeList(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),child:this.visit(e.children[0])})}visitMap(e,{length:t,nullCount:s}=this.nextFieldNode()){return Ve({type:e,length:t,nullCount:s,nullBitmap:this.readNullBitmap(e,s),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,s=this.nextBufferRange()){return t>0&&this.readData(e,s)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:s}=this.nextBufferRange()){return this.bytes.subarray(s,s+t)}readDictionary(e){return this.dictionaries.get(e.id)}}class DD extends CS{constructor(e,t,s,a,u){super(new Uint8Array(0),t,s,a,u),this.sources=e}readNullBitmap(e,t,{offset:s}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Wh(this.sources[s])}readOffsets(e,{offset:t}=this.nextBufferRange()){return ut(Uint8Array,ut(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return ut(Uint8Array,ut(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:s}=this;return de.isTimestamp(e)||(de.isInt(e)||de.isTime(e))&&e.bitWidth===64||de.isDuration(e)||de.isDate(e)&&e.unit===sr.MILLISECOND?ut(Uint8Array,An.convertArray(s[t])):de.isDecimal(e)?ut(Uint8Array,Ur.convertArray(s[t])):de.isBinary(e)||de.isLargeBinary(e)||de.isFixedSizeBinary(e)?CD(s[t]):de.isBool(e)?Wh(s[t]):de.isUtf8(e)||de.isLargeUtf8(e)?mp(s[t].join("")):ut(Uint8Array,ut(e.ArrayType,s[t].map(a=>+a)))}}function CD(n){const e=n.join(""),t=new Uint8Array(e.length/2);for(let s=0;s<e.length;s+=2)t[s>>1]=Number.parseInt(e.slice(s,s+2),16);return t}class be extends He{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((s,a)=>this.compareFields(s,t[a]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function wn(n,e){return e instanceof n.constructor}function so(n,e){return n===e||wn(n,e)}function Ei(n,e){return n===e||wn(n,e)&&n.bitWidth===e.bitWidth&&n.isSigned===e.isSigned}function yd(n,e){return n===e||wn(n,e)&&n.precision===e.precision}function OD(n,e){return n===e||wn(n,e)&&n.byteWidth===e.byteWidth}function Fp(n,e){return n===e||wn(n,e)&&n.unit===e.unit}function Ql(n,e){return n===e||wn(n,e)&&n.unit===e.unit&&n.timezone===e.timezone}function Kl(n,e){return n===e||wn(n,e)&&n.unit===e.unit&&n.bitWidth===e.bitWidth}function RD(n,e){return n===e||wn(n,e)&&n.children.length===e.children.length&&gs.compareManyFields(n.children,e.children)}function FD(n,e){return n===e||wn(n,e)&&n.children.length===e.children.length&&gs.compareManyFields(n.children,e.children)}function Mp(n,e){return n===e||wn(n,e)&&n.mode===e.mode&&n.typeIds.every((t,s)=>t===e.typeIds[s])&&gs.compareManyFields(n.children,e.children)}function MD(n,e){return n===e||wn(n,e)&&n.id===e.id&&n.isOrdered===e.isOrdered&&gs.visit(n.indices,e.indices)&&gs.visit(n.dictionary,e.dictionary)}function Lp(n,e){return n===e||wn(n,e)&&n.unit===e.unit}function ql(n,e){return n===e||wn(n,e)&&n.unit===e.unit}function LD(n,e){return n===e||wn(n,e)&&n.listSize===e.listSize&&n.children.length===e.children.length&&gs.compareManyFields(n.children,e.children)}function AD(n,e){return n===e||wn(n,e)&&n.keysSorted===e.keysSorted&&n.children.length===e.children.length&&gs.compareManyFields(n.children,e.children)}be.prototype.visitNull=so;be.prototype.visitBool=so;be.prototype.visitInt=Ei;be.prototype.visitInt8=Ei;be.prototype.visitInt16=Ei;be.prototype.visitInt32=Ei;be.prototype.visitInt64=Ei;be.prototype.visitUint8=Ei;be.prototype.visitUint16=Ei;be.prototype.visitUint32=Ei;be.prototype.visitUint64=Ei;be.prototype.visitFloat=yd;be.prototype.visitFloat16=yd;be.prototype.visitFloat32=yd;be.prototype.visitFloat64=yd;be.prototype.visitUtf8=so;be.prototype.visitLargeUtf8=so;be.prototype.visitBinary=so;be.prototype.visitLargeBinary=so;be.prototype.visitFixedSizeBinary=OD;be.prototype.visitDate=Fp;be.prototype.visitDateDay=Fp;be.prototype.visitDateMillisecond=Fp;be.prototype.visitTimestamp=Ql;be.prototype.visitTimestampSecond=Ql;be.prototype.visitTimestampMillisecond=Ql;be.prototype.visitTimestampMicrosecond=Ql;be.prototype.visitTimestampNanosecond=Ql;be.prototype.visitTime=Kl;be.prototype.visitTimeSecond=Kl;be.prototype.visitTimeMillisecond=Kl;be.prototype.visitTimeMicrosecond=Kl;be.prototype.visitTimeNanosecond=Kl;be.prototype.visitDecimal=so;be.prototype.visitList=RD;be.prototype.visitStruct=FD;be.prototype.visitUnion=Mp;be.prototype.visitDenseUnion=Mp;be.prototype.visitSparseUnion=Mp;be.prototype.visitDictionary=MD;be.prototype.visitInterval=Lp;be.prototype.visitIntervalDayTime=Lp;be.prototype.visitIntervalYearMonth=Lp;be.prototype.visitDuration=ql;be.prototype.visitDurationSecond=ql;be.prototype.visitDurationMillisecond=ql;be.prototype.visitDurationMicrosecond=ql;be.prototype.visitDurationNanosecond=ql;be.prototype.visitFixedSizeList=LD;be.prototype.visitMap=AD;const gs=new be;function kD(n,e){return gs.compareSchemas(n,e)}function gh(n,e){return PD(n,e.map(t=>t.data.concat()))}function PD(n,e){const t=[...n.fields],s=[],a={numBatches:e.reduce((v,w)=>Math.max(v,w.length),0)};let u=0,d=0,f=-1;const p=e.length;let m,g=[];for(;a.numBatches-- >0;){for(d=Number.POSITIVE_INFINITY,f=-1;++f<p;)g[f]=m=e[f].shift(),d=Math.min(d,m?m.length:d);Number.isFinite(d)&&(g=TD(t,d,g,e,a),d>0&&(s[u++]=Ve({type:new gn(t),length:d,nullCount:0,children:g.slice()})))}return[n=n.assign(t),s.map(v=>new Er(n,v))]}function TD(n,e,t,s,a){var u;const d=(e+63&-64)>>3;for(let f=-1,p=s.length;++f<p;){const m=t[f],g=m==null?void 0:m.length;if(g>=e)g===e?t[f]=m:(t[f]=m.slice(0,e),a.numBatches=Math.max(a.numBatches,s[f].unshift(m.slice(e,g-e))));else{const v=n[f];n[f]=v.clone({nullable:!0}),t[f]=(u=m==null?void 0:m._changeLengthAndBackfillNullBitmap(e))!==null&&u!==void 0?u:Ve({type:v.type,length:e,nullCount:e,nullBitmap:new Uint8Array(d)})}}return t}var OS;class rr{constructor(...e){var t,s;if(e.length===0)return this.batches=[],this.schema=new rt([]),this._offsets=[0],this;let a,u;e[0]instanceof rt&&(a=e.shift()),e.at(-1)instanceof Uint32Array&&(u=e.pop());const d=p=>{if(p){if(p instanceof Er)return[p];if(p instanceof rr)return p.batches;if(p instanceof St){if(p.type instanceof gn)return[new Er(new rt(p.type.children),p)]}else{if(Array.isArray(p))return p.flatMap(m=>d(m));if(typeof p[Symbol.iterator]=="function")return[...p].flatMap(m=>d(m));if(typeof p=="object"){const m=Object.keys(p),g=m.map(_=>new ht([p[_]])),v=a??new rt(m.map((_,x)=>new xt(String(_),g[x].type,g[x].nullable))),[,w]=gh(v,g);return w.length===0?[new Er(p)]:w}}}return[]},f=e.flatMap(p=>d(p));if(a=(s=a??((t=f[0])===null||t===void 0?void 0:t.schema))!==null&&s!==void 0?s:new rt([]),!(a instanceof rt))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const p of f){if(!(p instanceof Er))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!kD(a,p.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=a,this.batches=f,this._offsets=u??gS(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=yS(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(Ip(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?Cp.visit(new ht(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[
|
|
56
56
|
${this.toArray().join(`,
|
|
57
57
|
`)}
|
|
58
|
-
]`}concat(...e){const t=this.schema,s=this.data.concat(e.flatMap(({data:a})=>a));return new rr(t,s.map(a=>new Er(t,a)))}slice(e,t){const s=this.schema;[e,t]=pS({length:this.numRows},e,t);const a=vS(this.data,this._offsets,e,t);return new rr(s,a.map(u=>new Er(s,u)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){const t=this.data.map(s=>s.children[e]);if(t.length===0){const{type:s}=this.schema.fields[e],a=Ve({type:s,length:0,nullCount:0});t.push(a._changeLengthAndBackfillNullBitmap(this.numRows))}return new ht(t)}return null}setChild(e,t){var s;return this.setChildAt((s=this.schema.fields)===null||s===void 0?void 0:s.findIndex(a=>a.name===e),t)}setChildAt(e,t){let s=this.schema,a=[...this.batches];if(e>-1&&e<this.numCols){t||(t=new ht([Ve({type:new ys,length:this.numRows})]));const u=s.fields.slice(),d=u[e].clone({type:t.type}),f=this.schema.fields.map((p,m)=>this.getChildAt(m));[u[e],f[e]]=[d,t],[s,a]=gh(s,f)}return new rr(s,a)}select(e){const t=this.schema.fields.reduce((s,a,u)=>s.set(a.name,u),new Map);return this.selectAt(e.map(s=>t.get(s)).filter(s=>s>-1))}selectAt(e){const t=this.schema.selectAt(e),s=this.batches.map(a=>a.selectAt(e));return new rr(t,s)}assign(e){const t=this.schema.fields,[s,a]=e.schema.fields.reduce((f,p,m)=>{const[g,v]=f,w=t.findIndex(_=>_.name===p.name);return~w?v[w]=m:g.push(m),f},[[],[]]),u=this.schema.assign(e.schema),d=[...t.map((f,p)=>[p,a[p]]).map(([f,p])=>p===void 0?this.getChildAt(f):e.getChildAt(p)),...s.map(f=>e.getChildAt(f))].filter(Boolean);return new rr(...gh(u,d))}}OS=Symbol.toStringTag;rr[OS]=(n=>(n.schema=null,n.batches=[],n._offsets=new Uint32Array([0]),n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,n.isValid=td(Dp),n.get=td(Tn.getVisitFn(C.Struct)),n.set=wS(or.getVisitFn(C.Struct)),n.indexOf=SS(nd.getVisitFn(C.Struct)),"Table"))(rr.prototype);var RS;let Er=class Ol{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof rt))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Ve({nullCount:0,type:new gn(this.schema.fields),children:this.schema.fields.map(t=>Ve({type:t.type,nullCount:0}))})]=e,!(this.data instanceof St))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=vv(this.schema,this.data.children);break}case 1:{const[t]=e,{fields:s,children:a,length:u}=Object.keys(t).reduce((p,m,g)=>(p.children[g]=t[m],p.length=Math.max(p.length,t[m].length),p.fields[g]=xt.new({name:m,type:t[m].type,nullable:!0}),p),{length:0,fields:new Array,children:new Array}),d=new rt(s),f=Ve({type:new gn(s),length:u,children:a,nullCount:0});[this.schema,this.data]=vv(d,f.children,u);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=FS(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return Tn.visit(this.data,e)}at(e){return this.get(Ip(e,this.numRows))}set(e,t){return or.visit(this.data,e,t)}indexOf(e,t){return nd.visit(this.data,e,t)}[Symbol.iterator](){return Cp.visit(new ht([this.data]))}toArray(){return[...this]}concat(...e){return new rr(this.schema,[this,...e])}slice(e,t){const[s]=new ht([this.data]).slice(e,t).data;return new Ol(this.schema,s)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)===null||t===void 0?void 0:t.findIndex(s=>s.name===e))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new ht([this.data.children[e]]):null}setChild(e,t){var s;return this.setChildAt((s=this.schema.fields)===null||s===void 0?void 0:s.findIndex(a=>a.name===e),t)}setChildAt(e,t){let s=this.schema,a=this.data;if(e>-1&&e<this.numCols){t||(t=new ht([Ve({type:new ys,length:this.numRows})]));const u=s.fields.slice(),d=a.children.slice(),f=u[e].clone({type:t.type});[u[e],d[e]]=[f,t.data[0]],s=new rt(u,new Map(this.schema.metadata)),a=Ve({type:new gn(u),children:d})}return new Ol(s,a)}select(e){const t=this.schema.select(e),s=new gn(t.fields),a=[];for(const u of e){const d=this.schema.fields.findIndex(f=>f.name===u);~d&&(a[d]=this.data.children[d])}return new Ol(t,Ve({type:s,length:this.numRows,children:a}))}selectAt(e){const t=this.schema.selectAt(e),s=e.map(u=>this.data.children[u]).filter(Boolean),a=Ve({type:new gn(t.fields),length:this.numRows,children:s});return new Ol(t,a)}};RS=Symbol.toStringTag;Er[RS]=(n=>(n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Er.prototype);function vv(n,e,t=e.reduce((s,a)=>Math.max(s,a.length),0)){var s;const a=[...n.fields],u=[...e],d=(t+63&-64)>>3;for(const[f,p]of n.fields.entries()){const m=e[f];(!m||m.length!==t)&&(a[f]=p.clone({nullable:!0}),u[f]=(s=m==null?void 0:m._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:Ve({type:p.type,length:t,nullCount:t,nullBitmap:new Uint8Array(d)}))}return[n.assign(a),Ve({type:new gn(a),length:t,children:u})]}function FS(n,e,t=new Map){var s,a;if(((s=n==null?void 0:n.length)!==null&&s!==void 0?s:0)>0&&(n==null?void 0:n.length)===(e==null?void 0:e.length))for(let u=-1,d=n.length;++u<d;){const{type:f}=n[u],p=e[u];for(const m of[p,...((a=p==null?void 0:p.dictionary)===null||a===void 0?void 0:a.data)||[]])FS(f.children,m==null?void 0:m.children,t);if(de.isDictionary(f)){const{id:m}=f;if(!t.has(m))p!=null&&p.dictionary&&t.set(m,p.dictionary);else if(t.get(m)!==p.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}}return t}class MS extends Er{constructor(e){const t=e.fields.map(a=>Ve({type:a.type})),s=Ve({type:new gn(e.fields),nullCount:0,children:t});super(e,s)}}let Gi=class Tr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new Tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+st),(t||new Tr).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ut.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):nt.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,t){const s=this.bb.__offset(this.bb_pos,12);return s?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Ut.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,nt.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt("0"))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,s,a,u,d){return Tr.startMessage(e),Tr.addVersion(e,t),Tr.addHeaderType(e,s),Tr.addHeader(e,a),Tr.addBodyLength(e,u),Tr.addCustomMetadata(e,d),Tr.endMessage(e)}};class ND extends He{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return lv.startNull(t),lv.endNull(t)}visitInt(e,t){return Hn.startInt(t),Hn.addBitWidth(t,e.bitWidth),Hn.addIsSigned(t,e.isSigned),Hn.endInt(t)}visitFloat(e,t){return Hr.startFloatingPoint(t),Hr.addPrecision(t,e.precision),Hr.endFloatingPoint(t)}visitBinary(e,t){return rv.startBinary(t),rv.endBinary(t)}visitLargeBinary(e,t){return sv.startLargeBinary(t),sv.endLargeBinary(t)}visitBool(e,t){return iv.startBool(t),iv.endBool(t)}visitUtf8(e,t){return uv.startUtf8(t),uv.endUtf8(t)}visitLargeUtf8(e,t){return ov.startLargeUtf8(t),ov.endLargeUtf8(t)}visitDecimal(e,t){return zo.startDecimal(t),zo.addScale(t,e.scale),zo.addPrecision(t,e.precision),zo.addBitWidth(t,e.bitWidth),zo.endDecimal(t)}visitDate(e,t){return _c.startDate(t),_c.addUnit(t,e.unit),_c.endDate(t)}visitTime(e,t){return tr.startTime(t),tr.addUnit(t,e.unit),tr.addBitWidth(t,e.bitWidth),tr.endTime(t)}visitTimestamp(e,t){const s=e.timezone&&t.createString(e.timezone)||void 0;return nr.startTimestamp(t),nr.addUnit(t,e.unit),s!==void 0&&nr.addTimezone(t,s),nr.endTimestamp(t)}visitInterval(e,t){return Wr.startInterval(t),Wr.addUnit(t,e.unit),Wr.endInterval(t)}visitDuration(e,t){return bc.startDuration(t),bc.addUnit(t,e.unit),bc.endDuration(t)}visitList(e,t){return av.startList(t),av.endList(t)}visitStruct(e,t){return Hs.startStruct_(t),Hs.endStruct_(t)}visitUnion(e,t){kn.startTypeIdsVector(t,e.typeIds.length);const s=kn.createTypeIdsVector(t,e.typeIds);return kn.startUnion(t),kn.addMode(t,e.mode),kn.addTypeIds(t,s),kn.endUnion(t)}visitDictionary(e,t){const s=this.visit(e.indices,t);return gi.startDictionaryEncoding(t),gi.addId(t,BigInt(e.id)),gi.addIsOrdered(t,e.isOrdered),s!==void 0&&gi.addIndexType(t,s),gi.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Ic.startFixedSizeBinary(t),Ic.addByteWidth(t,e.byteWidth),Ic.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Ec.startFixedSizeList(t),Ec.addListSize(t,e.listSize),Ec.endFixedSizeList(t)}visitMap(e,t){return xc.startMap(t),xc.addKeysSorted(t,e.keysSorted),xc.endMap(t)}}const vh=new ND;function BD(n,e=new Map){return new rt(jD(n,e),Cc(n.metadata),e)}function LS(n){return new Cr(n.count,AS(n.columns),kS(n.columns))}function UD(n){return new bi(LS(n.data),n.id,n.isDelta)}function jD(n,e){return(n.fields||[]).filter(Boolean).map(t=>xt.fromJSON(t,e))}function wv(n,e){return(n.children||[]).filter(Boolean).map(t=>xt.fromJSON(t,e))}function AS(n){return(n||[]).reduce((e,t)=>[...e,new Ia(t.count,zD(t.VALIDITY)),...AS(t.children)],[])}function kS(n,e=[]){for(let t=-1,s=(n||[]).length;++t<s;){const a=n[t];a.VALIDITY&&e.push(new wi(e.length,a.VALIDITY.length)),a.TYPE_ID&&e.push(new wi(e.length,a.TYPE_ID.length)),a.OFFSET&&e.push(new wi(e.length,a.OFFSET.length)),a.DATA&&e.push(new wi(e.length,a.DATA.length)),e=kS(a.children,e)}return e}function zD(n){return(n||[]).reduce((e,t)=>e+ +(t===0),0)}function $D(n,e){let t,s,a,u,d,f;return!e||!(u=n.dictionary)?(d=_v(n,wv(n,e)),a=new xt(n.name,d,n.nullable,Cc(n.metadata))):e.has(t=u.id)?(s=(s=u.indexType)?Sv(s):new Bl,f=new ga(e.get(t),s,t,u.isOrdered),a=new xt(n.name,f,n.nullable,Cc(n.metadata))):(s=(s=u.indexType)?Sv(s):new Bl,e.set(t,d=_v(n,wv(n,e))),f=new ga(d,s,t,u.isOrdered),a=new xt(n.name,f,n.nullable,Cc(n.metadata))),a||null}function Cc(n=[]){return new Map(n.map(({key:e,value:t})=>[e,t]))}function Sv(n){return new no(n.isSigned,n.bitWidth)}function _v(n,e){const t=n.type.name;switch(t){case"NONE":return new ys;case"null":return new ys;case"binary":return new Uc;case"largebinary":return new jc;case"utf8":return new zc;case"largeutf8":return new $c;case"bool":return new Vc;case"list":return new Gc((e||[])[0]);case"struct":return new gn(e||[]);case"struct_":return new gn(e||[])}switch(t){case"int":{const s=n.type;return new no(s.isSigned,s.bitWidth)}case"floatingpoint":{const s=n.type;return new Bc(an[s.precision])}case"decimal":{const s=n.type;return new Hc(s.scale,s.precision,s.bitWidth)}case"date":{const s=n.type;return new Wc(sr[s.unit])}case"time":{const s=n.type;return new Qc(Ie[s.unit],s.bitWidth)}case"timestamp":{const s=n.type;return new Kc(Ie[s.unit],s.timezone)}case"interval":{const s=n.type;return new qc(Gr[s.unit])}case"duration":{const s=n.type;return new Yc(Ie[s.unit])}case"union":{const s=n.type,[a,...u]=(s.mode+"").toLowerCase(),d=a.toUpperCase()+u.join("");return new Jc(Pn[d],s.typeIds||[],e||[])}case"fixedsizebinary":{const s=n.type;return new Xc(s.byteWidth)}case"fixedsizelist":{const s=n.type;return new Zc(s.listSize,(e||[])[0])}case"map":{const s=n.type;return new ed((e||[])[0],s.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}var VD=q0,HD=ma;class xr{static fromJSON(e,t){const s=new xr(0,Ut.V5,t);return s._createHeader=WD(e,t),s}static decode(e){e=new HD(Ge(e));const t=Gi.getRootAsMessage(e),s=t.bodyLength(),a=t.version(),u=t.headerType(),d=new xr(s,a,u);return d._createHeader=QD(t,u),d}static encode(e){const t=new VD;let s=-1;return e.isSchema()?s=rt.encode(t,e.header()):e.isRecordBatch()?s=Cr.encode(t,e.header()):e.isDictionaryBatch()&&(s=bi.encode(t,e.header())),Gi.startMessage(t),Gi.addVersion(t,Ut.V5),Gi.addHeader(t,s),Gi.addHeaderType(t,e.headerType),Gi.addBodyLength(t,BigInt(e.bodyLength)),Gi.finishMessageBuffer(t,Gi.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof rt)return new xr(0,Ut.V5,nt.Schema,e);if(e instanceof Cr)return new xr(t,Ut.V5,nt.RecordBatch,e);if(e instanceof bi)return new xr(t,Ut.V5,nt.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===nt.Schema}isRecordBatch(){return this.headerType===nt.RecordBatch}isDictionaryBatch(){return this.headerType===nt.DictionaryBatch}constructor(e,t,s,a){this._version=t,this._headerType=s,this.body=new Uint8Array(0),a&&(this._createHeader=()=>a),this._bodyLength=Et(e)}}class Cr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,s){this._nodes=t,this._buffers=s,this._length=Et(e)}}class bi{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,s=!1){this._data=e,this._isDelta=s,this._id=Et(t)}}class wi{constructor(e,t){this.offset=Et(e),this.length=Et(t)}}class Ia{constructor(e,t){this.length=Et(e),this.nullCount=Et(t)}}function WD(n,e){return()=>{switch(e){case nt.Schema:return rt.fromJSON(n);case nt.RecordBatch:return Cr.fromJSON(n);case nt.DictionaryBatch:return bi.fromJSON(n)}throw new Error(`Unrecognized Message type: { name: ${nt[e]}, type: ${e} }`)}}function QD(n,e){return()=>{switch(e){case nt.Schema:return rt.decode(n.header(new Br),new Map,n.version());case nt.RecordBatch:return Cr.decode(n.header(new di),n.version());case nt.DictionaryBatch:return bi.decode(n.header(new Uo),n.version())}throw new Error(`Unrecognized Message type: { name: ${nt[e]}, type: ${e} }`)}}xt.encode=rC;xt.decode=tC;xt.fromJSON=$D;rt.encode=nC;rt.decode=KD;rt.fromJSON=BD;Cr.encode=iC;Cr.decode=qD;Cr.fromJSON=LS;bi.encode=sC;bi.decode=YD;bi.fromJSON=UD;Ia.encode=oC;Ia.decode=JD;wi.encode=aC;wi.decode=GD;function KD(n,e=new Map,t=Ut.V5){const s=eC(n,e);return new rt(s,Oc(n),e,t)}function qD(n,e=Ut.V5){if(n.compression()!==null)throw new Error("Record batch compression not implemented");return new Cr(n.length(),XD(n),ZD(n,e))}function YD(n,e=Ut.V5){return new bi(Cr.decode(n.data(),e),n.id(),n.isDelta())}function GD(n){return new wi(n.offset(),n.length())}function JD(n){return new Ia(n.length(),n.nullCount())}function XD(n){const e=[];for(let t,s=-1,a=-1,u=n.nodesLength();++s<u;)(t=n.nodes(s))&&(e[++a]=Ia.decode(t));return e}function ZD(n,e){const t=[];for(let s,a=-1,u=-1,d=n.buffersLength();++a<d;)(s=n.buffers(a))&&(e<Ut.V4&&(s.bb_pos+=8*(a+1)),t[++u]=wi.decode(s));return t}function eC(n,e){const t=[];for(let s,a=-1,u=-1,d=n.fieldsLength();++a<d;)(s=n.fields(a))&&(t[++u]=xt.decode(s,e));return t}function bv(n,e){const t=[];for(let s,a=-1,u=-1,d=n.childrenLength();++a<d;)(s=n.children(a))&&(t[++u]=xt.decode(s,e));return t}function tC(n,e){let t,s,a,u,d,f;return!e||!(f=n.dictionary())?(a=Ev(n,bv(n,e)),s=new xt(n.name(),a,n.nullable(),Oc(n))):e.has(t=Et(f.id()))?(u=(u=f.indexType())?Iv(u):new Bl,d=new ga(e.get(t),u,t,f.isOrdered()),s=new xt(n.name(),d,n.nullable(),Oc(n))):(u=(u=f.indexType())?Iv(u):new Bl,e.set(t,a=Ev(n,bv(n,e))),d=new ga(a,u,t,f.isOrdered()),s=new xt(n.name(),d,n.nullable(),Oc(n))),s||null}function Oc(n){const e=new Map;if(n)for(let t,s,a=-1,u=Math.trunc(n.customMetadataLength());++a<u;)(t=n.customMetadata(a))&&(s=t.key())!=null&&e.set(s,t.value());return e}function Iv(n){return new no(n.isSigned(),n.bitWidth())}function Ev(n,e){const t=n.typeType();switch(t){case wt.NONE:return new ys;case wt.Null:return new ys;case wt.Binary:return new Uc;case wt.LargeBinary:return new jc;case wt.Utf8:return new zc;case wt.LargeUtf8:return new $c;case wt.Bool:return new Vc;case wt.List:return new Gc((e||[])[0]);case wt.Struct_:return new gn(e||[])}switch(t){case wt.Int:{const s=n.type(new Hn);return new no(s.isSigned(),s.bitWidth())}case wt.FloatingPoint:{const s=n.type(new Hr);return new Bc(s.precision())}case wt.Decimal:{const s=n.type(new zo);return new Hc(s.scale(),s.precision(),s.bitWidth())}case wt.Date:{const s=n.type(new _c);return new Wc(s.unit())}case wt.Time:{const s=n.type(new tr);return new Qc(s.unit(),s.bitWidth())}case wt.Timestamp:{const s=n.type(new nr);return new Kc(s.unit(),s.timezone())}case wt.Interval:{const s=n.type(new Wr);return new qc(s.unit())}case wt.Duration:{const s=n.type(new bc);return new Yc(s.unit())}case wt.Union:{const s=n.type(new kn);return new Jc(s.mode(),s.typeIdsArray()||[],e||[])}case wt.FixedSizeBinary:{const s=n.type(new Ic);return new Xc(s.byteWidth())}case wt.FixedSizeList:{const s=n.type(new Ec);return new Zc(s.listSize(),(e||[])[0])}case wt.Map:{const s=n.type(new xc);return new ed((e||[])[0],s.keysSorted())}}throw new Error(`Unrecognized type: "${wt[t]}" (${t})`)}function nC(n,e){const t=e.fields.map(u=>xt.encode(n,u));Br.startFieldsVector(n,t.length);const s=Br.createFieldsVector(n,t),a=e.metadata&&e.metadata.size>0?Br.createCustomMetadataVector(n,[...e.metadata].map(([u,d])=>{const f=n.createString(`${u}`),p=n.createString(`${d}`);return Wt.startKeyValue(n),Wt.addKey(n,f),Wt.addValue(n,p),Wt.endKeyValue(n)})):-1;return Br.startSchema(n),Br.addFields(n,s),Br.addEndianness(n,lC?ya.Little:ya.Big),a!==-1&&Br.addCustomMetadata(n,a),Br.endSchema(n)}function rC(n,e){let t=-1,s=-1,a=-1;const u=e.type;let d=e.typeId;de.isDictionary(u)?(d=u.dictionary.typeId,a=vh.visit(u,n),s=vh.visit(u.dictionary,n)):s=vh.visit(u,n);const f=(u.children||[]).map(g=>xt.encode(n,g)),p=Jn.createChildrenVector(n,f),m=e.metadata&&e.metadata.size>0?Jn.createCustomMetadataVector(n,[...e.metadata].map(([g,v])=>{const w=n.createString(`${g}`),_=n.createString(`${v}`);return Wt.startKeyValue(n),Wt.addKey(n,w),Wt.addValue(n,_),Wt.endKeyValue(n)})):-1;return e.name&&(t=n.createString(e.name)),Jn.startField(n),Jn.addType(n,s),Jn.addTypeType(n,d),Jn.addChildren(n,p),Jn.addNullable(n,!!e.nullable),t!==-1&&Jn.addName(n,t),a!==-1&&Jn.addDictionary(n,a),m!==-1&&Jn.addCustomMetadata(n,m),Jn.endField(n)}function iC(n,e){const t=e.nodes||[],s=e.buffers||[];di.startNodesVector(n,t.length);for(const d of t.slice().reverse())Ia.encode(n,d);const a=n.endVector();di.startBuffersVector(n,s.length);for(const d of s.slice().reverse())wi.encode(n,d);const u=n.endVector();return di.startRecordBatch(n),di.addLength(n,BigInt(e.length)),di.addNodes(n,a),di.addBuffers(n,u),di.endRecordBatch(n)}function sC(n,e){const t=Cr.encode(n,e.data);return Uo.startDictionaryBatch(n),Uo.addId(n,BigInt(e.id)),Uo.addIsDelta(n,e.isDelta),Uo.addData(n,t),Uo.endDictionaryBatch(n)}function oC(n,e){return J0.createFieldNode(n,BigInt(e.length),BigInt(e.nullCount))}function aC(n,e){return G0.createBuffer(n,BigInt(e.offset),BigInt(e.length))}const lC=(()=>{const n=new ArrayBuffer(2);return new DataView(n).setInt16(0,256,!0),new Int16Array(n)[0]===256})(),Ap=n=>`Expected ${nt[n]} Message in stream, but was null or length 0.`,kp=n=>`Header pointer of flatbuffer-encoded ${nt[n]} Message is null or length 0.`,PS=(n,e)=>`Expected to read ${n} metadata bytes, but only read ${e}.`,TS=(n,e)=>`Expected to read ${n} bytes for message body, but only read ${e}.`;class NS{constructor(e){this.source=e instanceof id?e:new id(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Ft:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=Ge(this.source.read(e));if(t.byteLength<e)throw new Error(TS(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){const t=nt.Schema,s=this.readMessage(t),a=s==null?void 0:s.header();if(e&&!a)throw new Error(kp(t));return a}readMetadataLength(){const e=this.source.read(gd),t=e&&new ma(e),s=(t==null?void 0:t.readInt32(0))||0;return{done:s===0,value:s}}readMetadata(e){const t=this.source.read(e);if(!t)return Ft;if(t.byteLength<e)throw new Error(PS(e,t.byteLength));return{done:!1,value:xr.decode(t)}}}class uC{constructor(e,t){this.source=e instanceof wa?e:$0(e)?new sd(e,t):new wa(e)}[Symbol.asyncIterator](){return this}next(){return ke(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Ft:e})}throw(e){return ke(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return ke(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return ke(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value})}readMessageBody(e){return ke(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);const t=Ge(yield this.source.read(e));if(t.byteLength<e)throw new Error(TS(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(){return ke(this,arguments,void 0,function*(e=!1){const t=nt.Schema,s=yield this.readMessage(t),a=s==null?void 0:s.header();if(e&&!a)throw new Error(kp(t));return a})}readMetadataLength(){return ke(this,void 0,void 0,function*(){const e=yield this.source.read(gd),t=e&&new ma(e),s=(t==null?void 0:t.readInt32(0))||0;return{done:s===0,value:s}})}readMetadata(e){return ke(this,void 0,void 0,function*(){const t=yield this.source.read(e);if(!t)return Ft;if(t.byteLength<e)throw new Error(PS(e,t.byteLength));return{done:!1,value:xr.decode(t)}})}}class cC extends NS{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof yv?e:new yv(e)}next(){const{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:xr.fromJSON(e.schema,nt.Schema)};if(this._dictionaryIndex<e.dictionaries.length){const t=e.dictionaries[this._dictionaryIndex++];return this._body=t.data.columns,{done:!1,value:xr.fromJSON(t,nt.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const t=e.batches[this._batchIndex++];return this._body=t.columns,{done:!1,value:xr.fromJSON(t,nt.RecordBatch)}}return this._body=[],Ft}readMessageBody(e){return t(this._body);function t(s){return(s||[]).reduce((a,u)=>[...a,...u.VALIDITY&&[u.VALIDITY]||[],...u.TYPE_ID&&[u.TYPE_ID]||[],...u.OFFSET&&[u.OFFSET]||[],...u.DATA&&[u.DATA]||[],...t(u.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value}readSchema(){const e=nt.Schema,t=this.readMessage(e),s=t==null?void 0:t.header();if(!t||!s)throw new Error(kp(e));return s}}const gd=4,Jh="ARROW1",od=new Uint8Array(Jh.length);for(let n=0;n<Jh.length;n+=1)od[n]=Jh.codePointAt(n);function Pp(n,e=0){for(let t=-1,s=od.length;++t<s;)if(od[t]!==n[e+t])return!1;return!0}const Yl=od.length,BS=Yl+gd,dC=Yl*2+gd;class Si extends xS{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return kl(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return er.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return er.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof Si?e:Uh(e)?mC(e):$0(e)?vC(e):kl(e)?ke(this,void 0,void 0,function*(){return yield Si.from(yield e)}):V0(e)||gp(e)||W0(e)||yp(e)?gC(new wa(e)):yC(new id(e))}static readAll(e){return e instanceof Si?e.isSync()?xv(e):Dv(e):Uh(e)||ArrayBuffer.isView(e)||pd(e)||z0(e)?xv(e):Dv(e)}}class ad extends Si{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Qr(this,arguments,function*(){yield Ne(yield*Sc(Jo(this[Symbol.iterator]())))})}}class ld extends Si{constructor(e){super(e),this._impl=e}readAll(){return ke(this,void 0,void 0,function*(){var e,t,s,a;const u=new Array;try{for(var d=!0,f=Jo(this),p;p=yield f.next(),e=p.done,!e;d=!0){a=p.value,d=!1;const m=a;u.push(m)}}catch(m){t={error:m}}finally{try{!d&&!e&&(s=f.return)&&(yield s.call(f))}finally{if(t)throw t.error}}return u})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class US extends ad{constructor(e){super(e),this._impl=e}}class fC extends ld{constructor(e){super(e),this._impl=e}}class jS{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const s=this._loadVectors(e,t,this.schema.fields),a=Ve({type:new gn(this.schema.fields),length:e.length,children:s});return new Er(this.schema,a)}_loadDictionaryBatch(e,t){const{id:s,isDelta:a}=e,{dictionaries:u,schema:d}=this,f=u.get(s),p=d.dictionaries.get(s),m=this._loadVectors(e.data,t,[p]);return(f&&a?f.concat(new ht(m)):new ht(m)).memoize()}_loadVectors(e,t,s){return new CS(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(s)}}class ud extends jS{constructor(e,t){super(t),this._reader=Uh(e)?new cC(this._handle=e):new NS(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=$S(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Ft}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Ft}next(){if(this.closed)return Ft;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const s=e.header(),a=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(s,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const s=e.header(),a=t.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(s,a);this.dictionaries.set(s.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MS(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class cd extends jS{constructor(e,t){super(t),this._reader=new uC(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return ke(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return ke(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=$S(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return ke(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Ft})}return(e){return ke(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Ft})}next(){return ke(this,void 0,void 0,function*(){if(this.closed)return Ft;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const s=e.header(),a=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(s,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const s=e.header(),a=yield t.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(s,a);this.dictionaries.set(s.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MS(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return ke(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}}class zS extends ud{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof gv?e:new gv(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(s&&this._handle.seek(s.offset)){const a=this._reader.readMessage(nt.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),d=this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,d)}}return null}_readDictionaryBatch(e){var t;const s=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(s&&this._handle.seek(s.offset)){const a=this._reader.readMessage(nt.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),d=this._reader.readMessageBody(a.bodyLength),f=this._loadDictionaryBatch(u,d);this.dictionaries.set(u.id,f)}}}_readFooter(){const{_handle:e}=this,t=e.size-BS,s=e.readInt32(t),a=e.readAt(t-s,s);return Op.decode(a)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(this._recordBatchIndex);if(s&&this._handle.seek(s.offset))return this._reader.readMessage(e)}return null}}class hC extends cd{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,...t){const s=typeof t[0]!="number"?t.shift():void 0,a=t[0]instanceof Map?t.shift():void 0;super(e instanceof sd?e:new sd(e,s),a)}isFile(){return!0}isAsync(){return!0}open(e){const t=Object.create(null,{open:{get:()=>super.open}});return ke(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const s of this._footer.dictionaryBatches())s&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return ke(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(s&&(yield this._handle.seek(s.offset))){const a=yield this._reader.readMessage(nt.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),d=yield this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,d)}}return null})}_readDictionaryBatch(e){return ke(this,void 0,void 0,function*(){var t;const s=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(s&&(yield this._handle.seek(s.offset))){const a=yield this._reader.readMessage(nt.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),d=yield this._reader.readMessageBody(a.bodyLength),f=this._loadDictionaryBatch(u,d);this.dictionaries.set(u.id,f)}}})}_readFooter(){return ke(this,void 0,void 0,function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-BS,s=yield e.readInt32(t),a=yield e.readAt(t-s,s);return Op.decode(a)})}_readNextMessageAndValidate(e){return ke(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}}class pC extends ud{constructor(e,t){super(e,t)}_loadVectors(e,t,s){return new DD(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(s)}}function $S(n,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:n.autoDestroy}function*xv(n){const e=Si.from(n);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Dv(n){return Qr(this,arguments,function*(){const t=yield Ne(Si.from(n));try{if(!(yield Ne(t.open({autoDestroy:!1}))).closed)do yield yield Ne(t);while(!(yield Ne(t.reset().open())).closed)}finally{yield Ne(t.cancel())}})}function mC(n){return new ad(new pC(n))}function yC(n){const e=n.peek(Yl+7&-8);return e&&e.byteLength>=4?Pp(e)?new US(new zS(n.read())):new ad(new ud(n)):new ad(new ud(function*(){}()))}function gC(n){return ke(this,void 0,void 0,function*(){const e=yield n.peek(Yl+7&-8);return e&&e.byteLength>=4?Pp(e)?new US(new zS(yield n.read())):new ld(new cd(n)):new ld(new cd(function(){return Qr(this,arguments,function*(){})}()))})}function vC(n){return ke(this,void 0,void 0,function*(){const{size:e}=yield n.stat(),t=new sd(n,e);return e>=dC&&Pp(yield t.readAt(0,Yl+7&-8))?new fC(new hC(t)):new ld(new cd(t))})}function VS(n){const e=Si.from(n);return kl(e)?e.then(t=>VS(t)):e.isAsync()?e.readAll().then(t=>new rr(t)):new rr(e.readAll())}async function Nt(n,e){const{url:t,method:s,params:a,data:u,headers:d,credentials:f,mode:p,cache:m}=n,g=Object.keys({...a}).length>0,v=t.replace(/([^:]\/)\/+/g,"$1"),w=new URL(HS(v),window.location.origin);if(g){const _=Object.entries({...a}).reduce((x,[L,N])=>(N!=null&&(x[L]=String(N)),x),{});w.search=new URLSearchParams(_).toString()}return await new Promise((_,x)=>{fetch(w,{method:s,credentials:f,mode:p,cache:m,headers:wC(d),body:SC(u),signal:e==null?void 0:e.signal}).then(async L=>{if(L.status===204)return{ok:!0};const N=L.headers.get("Content-Type");if(Zt(N))return{ok:!1,message:"Empty response"};if(L.status>=400)try{const q=await L.json();throw q.status=q.status??L.status,q}catch(q){throw{message:L.statusText,...q}}const k=N.includes("text/event-stream"),J=N.includes("application/json"),z=N.includes("application/vnd.apache.arrow.stream");if(J)return await L.json();if(z)return await VS(L);if(k){const ee=(await L.text()).trim().replace("data: ","").trim();return JSON.parse(ee)}}).then(_).catch(x)})}function wC(n){return{"Content-Type":"application/json",...n??{}}}function SC(n){try{return JSON.stringify(n)}catch{return""}}function HS(n="/"){let e=`${Rl(window.__BASE_URL__)?"/":window.__BASE_URL__}/${n}`;for(;e.includes("//");)e=e.replaceAll("//","/");return e}const pc={python:"python",sql:"sql",seed:"seed",external:"external",source:"source"},Nr={editor:"editor",files:"files","data-catalog":"data-catalog",plans:"plans",tests:"tests",audits:"audits",errors:"errors",data:"data",lineage:"lineage"},kO={NUMBER_1:1,NUMBER_2:2,NUMBER_3:3},PO={init:"init",success:"success",fail:"fail"},_C=(n,e)=>Nt({url:"/api/commands/apply",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),bC=(n,e)=>Nt({url:"/api/commands/evaluate",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),IC=(n,e)=>Nt({url:"/api/commands/fetchdf",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),EC=(n,e)=>Nt({url:"/api/commands/render",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),xC=n=>Nt({url:"/api/files",method:"GET"},n),DC=(n,e)=>Nt({url:`/api/files/${n}`,method:"GET"},e),CC=(n,e,t)=>Nt({url:`/api/files/${n}`,method:"POST",headers:{"Content-Type":"application/json"},data:e},t),TO=(n,e)=>Nt({url:`/api/files/${n}`,method:"DELETE"},e),NO=(n,e,t)=>Nt({url:`/api/directories/${n}`,method:"POST",headers:{"Content-Type":"application/json"},data:e},t),BO=(n,e)=>Nt({url:`/api/directories/${n}`,method:"DELETE"},e),OC=(n,e)=>Nt({url:"/api/plan",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),RC=n=>Nt({url:"/api/plan/cancel",method:"POST"},n),FC=n=>Nt({url:"/api/environments",method:"GET"},n),UO=(n,e)=>Nt({url:`/api/environments/${n}`,method:"DELETE"},e),MC=(n,e,t,s)=>Nt({url:`/api/lineage/${n}/${e}`,method:"GET",params:t},s),LC=(n,e)=>Nt({url:`/api/lineage/${n}`,method:"GET"},e),AC=n=>Nt({url:"/api/models",method:"GET"},n),kC=(n,e)=>Nt({url:`/api/models/${n}`,method:"GET"},e),PC=n=>Nt({url:"/api/meta",method:"GET"},n),TC=n=>Nt({url:"/api/modules",method:"GET"},n),NC=(n,e)=>Nt({url:"/api/table_diff",method:"GET",params:n},e),li=R.lazy(()=>vn(()=>import("./Root-B9zs-snk.js"),[])),BC=R.lazy(()=>vn(()=>import("./Editor-ncrD1ZO_.js"),[])),UC=R.lazy(()=>vn(()=>import("./Plan-DIc3XAIr.js"),[])),jC=R.lazy(()=>vn(()=>import("./Content-DdhorPW0.js"),[])),zC=R.lazy(()=>vn(()=>import("./DataCatalog-_7fRHUeM.js"),[])),$C=R.lazy(()=>vn(()=>import("./Tests-A4Bnjxwk.js"),[])),VC=R.lazy(()=>vn(()=>import("./Audits-yd9300pl.js"),[])),HC=R.lazy(()=>vn(()=>import("./Data-HtiT4UV2.js"),[])),wh=R.lazy(()=>vn(()=>import("./Models-2zScbq9i.js"),[])),WC=R.lazy(()=>vn(()=>import("./Lineage-BbURajUV.js"),[])),QC=R.lazy(()=>vn(()=>import("./Errors-BosrEbuf.js"),[])),KC=R.lazy(()=>vn(()=>import("./Content-DQHjja2B.js"),[])),wr=R.lazy(()=>vn(()=>import("./Welcome-DbSZJpJE.js"),[])),dt={Home:"/",Editor:"/editor",DataCatalog:"/data-catalog",DataCatalogModels:"/data-catalog/models",Data:"/data",Lineage:"/lineage",LineageModels:"/lineage/models",Tests:"/tests",Audits:"/audits",Errors:"/errors",Plan:"/plan",NotFound:"/not-found"},Cv={plan:[Nr.plans]};function qC(n){const e=[{path:"*",element:dd(n.list)?U.jsx(Fn,{link:dt.Home,message:"Back To Main"}):U.jsx(Fn,{headline:"Empty"})},{path:dt.Home,element:U.jsx(li,{})},...[{path:dt.Editor,element:U.jsx(li,{content:U.jsx(BC,{})})},{path:dt.DataCatalog,element:U.jsx(li,{content:U.jsx(wh,{route:dt.DataCatalog})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data Catalog",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.DataCatalog,message:"Back To Data Catalog"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data Catalog",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.DataCatalog,message:"Back To Data Catalog"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(zC,{})})}]}]},{path:dt.Data,element:U.jsx(li,{content:U.jsx(wh,{route:dt.Data})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Data,message:"Back To Data"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Data,message:"Back To Data"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(HC,{})})}]}]},{path:dt.Lineage,element:U.jsx(li,{content:U.jsx(wh,{route:dt.Lineage})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Lineage",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Lineage,message:"Back To Lineage"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Lineage",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Lineage,message:"Back To Lineage"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(WC,{})})}]}]},{path:dt.Errors,element:U.jsx(li,{content:U.jsx(QC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to errors report",tagline:"Here you can see all the errors that occurred."})},{path:"*",element:U.jsx(Fn,{link:dt.Errors,message:"Back To Errors"})},{path:":id",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(KC,{})})}]},{path:dt.Plan,element:U.jsx(li,{content:U.jsx(UC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to plan",tagline:"Here you can run the plan and apply the changes."})},{path:"*",element:U.jsx(Fn,{link:dt.Plan,message:"Back To Plan"})},{path:"environments",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to plan",tagline:"Here you can run the plan and apply the changes."})},{path:"*",element:U.jsx(Fn,{link:dt.Plan,message:"Back To Plan"})},{path:":environmentName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(jC,{})})}]}]},{path:dt.Tests,element:U.jsx(li,{content:U.jsx($C,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to tests report",tagline:"Here you can run tests and see the results."})},{path:"*",element:U.jsx(Fn,{link:dt.Tests,message:"Back To Tests"})}]},{path:dt.Audits,element:U.jsx(li,{content:U.jsx(VC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to audits report",tagline:"Here you can run audits and see the results."})},{path:"*",element:U.jsx(Fn,{link:dt.Audits,message:"Back To Audits"})}]}].filter(t=>{var a;const s=t.path.replace("/","");return Zt(Cv[s])?n.list.includes(s):(a=Cv[s])==null?void 0:a.some(u=>n.list.includes(u))})].filter(Boolean);return DE(e,{basename:HS()})}const Qt={API:"api",General:"general",RunPlan:"run-plan",ApplyPlan:"apply-plan",CancelPlan:"cancel-plan",Environments:"environments",Models:"models",Fetchdf:"fetchdf",EvaluateModel:"evaluate-model",RenderQuery:"render-query",ColumnLineage:"column-lineage",ModelLineage:"model-lineage",Meta:"meta",Modules:"modules",FileExplorer:"file-explorer",Table:"table",TableDiff:"table-diff",SaveFile:"save-file"},WS=R.createContext({errors:new Set,addError:()=>({removeError:()=>{},error:{}}),removeError:()=>{},clearErrors:()=>{}});function YC({children:n}){const[e,t]=R.useState(new Set);function s(d,f){const p={id:Sh(),key:d,status:f.status,timestamp:f.timestamp??Date.now(),message:f.message,description:f.description,type:f.type,origin:f.origin,trigger:f.trigger,stack:f.stack,traceback:f.traceback};return t(m=>new Set(m.add(p))),{removeError:()=>a(p),error:p}}function a(d){t(f=>(f.forEach(p=>{(p===d||p.key===d)&&f.delete(p)}),new Set(f)))}function u(){t(new Set)}return U.jsx(WS.Provider,{value:{errors:e,addError:s,removeError:a,clearErrors:u},children:n})}function Tp(){return R.useContext(WS)}const QS=60*1e3,GC=5*QS,vd=10*QS;function JC(n){return ln({queryKey:["/api/modules"],queryFn:TC,enabled:!0},{...n,errorKey:Qt.Modules,trigger:"API -> useApiModules"})}function jO(n){return ln({queryKey:["/api/meta"],queryFn:PC,enabled:!0},{...n,errorKey:Qt.Meta,trigger:"API -> useApiMeta"})}function zO(n){return ln({queryKey:["/api/models"],queryFn:AC},{...n,errorKey:Qt.Models,trigger:"API -> useApiModels"})}function $O(n,e){return ln({queryKey:["/api/models",n],queryFn:async({signal:t})=>await kC(n,{signal:t})},{...e,errorKey:Qt.Models,trigger:"API -> useApiModel"})}function VO(n){return ln({queryKey:["/api/files"],queryFn:xC},{...n,errorKey:Qt.FileExplorer,trigger:"API -> useApiFiles"})}function HO(n,e){return ln({queryKey:["/api/files",n],queryFn:async({signal:t})=>await DC(n,{signal:t})},{...e,errorKey:Qt.FileExplorer,trigger:"API -> useApiFileByPath"})}function WO(n,e){return ln({queryKey:["/api/lineage",n],queryFn:async({signal:t})=>await LC(n,{signal:t})},{...e,errorKey:Qt.ModelLineage,trigger:"API -> useApiModelLineage"})}function QO(n,e,t,s){return ln({queryKey:["/api/lineage",n,e],queryFn:async({signal:a})=>await MC(n,e,s,{signal:a})},{...t,errorKey:Qt.ColumnLineage,trigger:"API -> useApiColumnLineage"})}function KO(n){return ln({queryKey:["/api/environments"],queryFn:FC},{...n,errorKey:Qt.Environments,trigger:"API -> useApiEnvironments"})}function qO(n){return ln({queryKey:["/api/commands/apply"],queryFn:RC},{...n,errorKey:Qt.CancelPlan,trigger:"API -> useApiCancelPlan"})}function YO(n,e,t){return ln({queryKey:["/api/plan",n],async queryFn({signal:s}){return await OC({environment:n,plan_dates:e==null?void 0:e.planDates,plan_options:e==null?void 0:e.planOptions,categories:e==null?void 0:e.categories},{signal:s})}},{...t,errorKey:Qt.RunPlan,trigger:"API -> useApiPlanRun"})}function GO(n,e,t){return ln({queryKey:["/api/commands/apply",n],async queryFn({signal:s}){return await _C({environment:n,plan_dates:e==null?void 0:e.planDates,plan_options:e==null?void 0:e.planOptions,categories:e==null?void 0:e.categories},{signal:s})}},{...t,errorKey:Qt.ApplyPlan,trigger:"API -> useApiPlanApply"})}function JO(n,e){return ln({queryKey:["/api/commands/fetchd"],queryFn:async({signal:t})=>await IC(n,{signal:t})},{...e,errorKey:Qt.Fetchdf,trigger:"API -> useApiFetchdf",delay:vd})}function XO(n,e){return ln({queryKey:["/api/commands/render"],queryFn:async({signal:t})=>await EC(n,{signal:t})},{...e,errorKey:Qt.RenderQuery,trigger:"API -> useApiRender",delay:vd})}function ZO(n,e){return ln({queryKey:["/api/commands/table_diff"],queryFn:async({signal:t})=>await NC(n,{signal:t})},{...e,errorKey:Qt.TableDiff,trigger:"API -> useApiTableDiff",delay:vd})}function eR(n,e){return ln({queryKey:["/api/commands/evaluate"],queryFn:async({signal:t})=>await bC(n,{signal:t})},{...e,errorKey:Qt.EvaluateModel,trigger:"API -> useApiEvaluate",delay:vd})}function tR(n){const{addError:e}=Tp();return Ob({mutationFn:async({path:t,body:s})=>await CC(t,s),onError(t){e(Qt.SaveFile,t)},async onMutate({path:t}){await n.cancelQueries({queryKey:["/api/files",t]})}})}function ln(n,{delay:e=GC,removeTimeoutErrorAfter:t,errorKey:s=Qt.API,trigger:a}){const u=n.queryKey.join(" -> "),d=rp(),{addError:f}=Tp(),[p,m]=R.useState(!1);let g,v=function(){console.log(`[REQUEST TIMEOUT] ${u} id: ${String(g)} timed out after ${e}ms`);const{removeError:q}=f(s,{message:"Request timed out",description:`Request ${u} with timeoutId: ${String(g)} timed out after ${e}ms`,timestamp:Date.now(),origin:"useQueryTimeout",trigger:a});m(!0),x(),yn(t)&&setTimeout(()=>q(),t)};function w(){console.log(`[CLEAR TIMEOUT] ${u} id: ${String(g)} at ${Date.now()}`),clearTimeout(g),g=void 0,v=void 0}function _(){g=setTimeout(()=>{v==null||v()},e),console.log(`[START TIMEOUT] ${u} id: ${String(g)} at ${Date.now()}`)}function x(){w(),d.cancelQueries({queryKey:n.queryKey}),console.log(`[REQUEST CANCELED] ${u} at ${Date.now()}`)}function L(z){w(),mc(z)||z.name==="AbortError"?console.log(`[REQUEST ABORTED] ${u} aborted by React Query at ${Date.now()}`):(console.log(`[REQUEST FAILED] ${u} failed at ${Date.now()}`),f(s,z))}function N(){w(),console.log(`[REQUEST COMPLETED] ${u} completed at ${Date.now()}`)}async function k(...z){return _(),n.queryFn(...z)}const J=Cb({gcTime:0,enabled:!1,queryKey:n.queryKey,queryFn:k,meta:{...n.meta,onError:L,onSuccess:N}});return{...J,refetch:async(...z)=>new Promise(q=>{J.refetch(...z,{throwOnError:!0}).then(q).catch(ee=>ee)}),cancel:x,isTimeout:p}}class KS{constructor(e){Ct(this,"_initial");Ct(this,"isModel",!0);Zt(e)?this._initial=Object.assign({id:Sh()}):this._initial=yn(e==null?void 0:e.id)?e:new Proxy(Object.assign(e??{},{id:Sh()}),{set(){throw new Error("Cannot change initial file")}})}get initial(){return this._initial}get id(){return this.initial.id}}class Ov extends KS{constructor(t=[]){super();Ct(this,"modules",new Set);this.modules=new Set(t)}get list(){return Array.from(this.modules)}get isEmpty(){return this.modules.size===0}get hasErrors(){return this.modules.has(Nr.errors)}get hasEditor(){return this.modules.has(Nr.editor)}get hasFiles(){return this.modules.has(Nr.files)}get hasProjectEditor(){return this.hasEditor&&this.hasFiles}get hasOnlyProjectEditor(){return this.modules.size===2&&this.hasProjectEditor}get hasOnlyDataCatalog(){return this.modules.size===1&&this.hasDataCatalog}get hasProjectEditorAndModule(){return this.modules.size===3&&this.hasProjectEditor&&hs(this.hasErrors)}get hasDataCatalog(){return this.modules.has(Nr["data-catalog"])}get hasPlans(){return this.modules.has(Nr.plans)}get hasOnlyPlans(){return this.modules.size===1&&this.hasPlans}get hasOnlyPlansAndErrors(){return this.modules.size===2&&this.hasPlans&&this.hasErrors}get hasTests(){return this.modules.has(Nr.tests)}get hasAudits(){return this.modules.has(Nr.audits)}get hasData(){return this.modules.has(Nr.data)}get hasLineage(){return this.modules.has(Nr.lineage)}get hasModuleAndErrors(){return this.hasErrors&&(this.modules.size===2||this.modules.size===3&&this.hasProjectEditor)}get hasSingleModule(){return this.modules.size===1}get showModuleNavigation(){return this.isEmpty||this.hasSingleModule||this.hasOnlyProjectEditor||this.hasModuleAndErrors||this.hasOnlyDataCatalog?!1:this.hasProjectEditorAndModule?!0:hs(this.isEmpty)}get showHistoryNavigation(){return this.hasOnlyProjectEditor||this.hasModuleAndErrors||this.hasOnlyDataCatalog?!1:this.hasProjectEditorAndModule||this.hasDataCatalog?!0:hs(this.isEmpty)}get showNavigation(){return this.hasErrors||this.hasPlans||this.showHistoryNavigation}update(t=[]){this.modules=new Set(t)}defaultNavigationRoute(){return this.hasEditor?dt.Editor:this.hasPlans?dt.Plan:this.hasDataCatalog?dt.DataCatalog:dt.NotFound}}class XC extends KS{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,dialect:(t==null?void 0:t.dialect)??"Default",columns:(t==null?void 0:t.columns)??[],details:(t==null?void 0:t.details)??{}});Ct(this,"_details",{});Ct(this,"_detailsIndex","");Ct(this,"name");Ct(this,"fqn");Ct(this,"path");Ct(this,"full_path");Ct(this,"dialect");Ct(this,"type");Ct(this,"columns");Ct(this,"default_catalog");Ct(this,"description");Ct(this,"sql");Ct(this,"definition");Ct(this,"hash");this.name=encodeURI(this.initial.name),this.fqn=encodeURI(this.initial.fqn),this.default_catalog=this.initial.default_catalog,this.path=this.initial.path,this.full_path=this.initial.full_path,this.dialect=this.initial.dialect,this.description=this.initial.description,this.sql=this.initial.sql,this.definition=this.initial.definition,this.columns=this.initial.columns??[],this.type=this.initial.type,this.hash=this.initial.hash,this.details=this.initial.details??{}}get defaultCatalog(){return this.default_catalog}get details(){return this._details}set details(t){const s=[];for(const a of Object.values(t))dd(a)?a.forEach(u=>{s.push(...Object.values(u))}):s.push(a);this._details=t,this._detailsIndex=s.join(" ")}get index(){return[this.displayName,this.path,this.type,...this.columns.map(t=>Object.values(t)).flat(),this._detailsIndex,this.dialect,this.description].filter(Boolean).join(" ").toLowerCase()}get isModelPython(){return this.type===pc.python}get isModelSQL(){return this.type===pc.sql}get isModelSeed(){return this.type===pc.seed}get isModelExternal(){return this.type===pc.external}get displayName(){return decodeURI(this.name)}update(t={}){for(const[s,a]of Object.entries(t))s==="columns"?this.columns=a:s==="details"?this.details=a:s==="name"?this.name=encodeURI(a):s==="fqn"?this.fqn=encodeURI(a):s==="type"?this.type=a:s==="default_catalog"?this.default_catalog=a:s==="description"?this.description=a:s in this&&(this[s]=a)}}const Rv=n=>{let e;const t=new Set,s=(m,g)=>{const v=typeof m=="function"?m(e):m;if(!Object.is(v,e)){const w=e;e=g??(typeof v!="object"||v===null)?v:Object.assign({},e,v),t.forEach(_=>_(e,w))}},a=()=>e,f={setState:s,getState:a,getInitialState:()=>p,subscribe:m=>(t.add(m),()=>t.delete(m))},p=e=n(s,a,f);return f},ZC=n=>n?Rv(n):Rv,eO=n=>n;function tO(n,e=eO){const t=Zs.useSyncExternalStore(n.subscribe,()=>e(n.getState()),()=>e(n.getInitialState()));return Zs.useDebugValue(t),t}const Fv=n=>{const e=ZC(n),t=s=>tO(e,s);return Object.assign(t,e),t},nO=n=>n?Fv(n):Fv,gl={Empty:"",Prod:"prod"},vi={Local:"local",Remote:"remote"},[Mv,rO]=Xv("profile");class on{constructor(e,t,s=gl.Prod,a=!1,u=!1){Ct(this,"_initial");Ct(this,"_type");Ct(this,"_createFrom");Ct(this,"_isPinned",!1);Ct(this,"_isDefault",!1);Ct(this,"isModel",!0);this._initial=e,this._type=t??vi.Local,this._createFrom=this._isDefault?gl.Empty:s,this._isPinned=a,this._isDefault=u}get id(){return this._initial.plan_id??""}get name(){return this._initial.name??gl.Empty}get type(){return this._type}get createFrom(){return this._createFrom}get isProd(){return this.name===gl.Prod}get isDefault(){return this._isDefault}set isDefault(e){this._isDefault=e}get isPinned(){return this._isPinned||this.isDefault||this.isProd}set isPinned(e){this._isPinned=e}get isInitial(){var e;return Rl((e=this._initial)==null?void 0:e.plan_id)}get isLocal(){return this._type===vi.Local}get isRemote(){return this._type===vi.Remote}get isSyncronized(){return this.isRemote&&hs(this.isInitial)}get isInitialProd(){return this.isInitial&&this.isProd}setType(e){this._type=e}setCreatedFrom(e){this._createFrom=e}update(e){this._initial=e}static save({environment:e,environments:t}){const s={};yn(e)&&(s.environment={name:e.name,plan_id:e.id,type:e.type,createFrom:e.createFrom,isPinned:e.isPinned,isDefault:e.isDefault}),yn(t)&&(s.environments=on.getOnlyLocal(t).map(a=>({name:a.name,plan_id:a.id,type:a.type,createFrom:a.createFrom,isPinned:a.isPinned,isDefault:a.isDefault}))),rO(s)}static getOnlyLocal(e=[]){return e.filter(t=>hs(Rl(t.name))&&t.isLocal)}static getOnlyRemote(e=[]){return e.filter(t=>hs(Rl(t.name))&&t.isRemote)}static getEnvironment(){const{environment:e}=Mv()??{};if(Zt(e))return;const{name:t,plan_id:s,type:a,createFrom:u,isPinned:d,isDefault:f}=e;return new on({name:t,plan_id:s},a,u,d,f)}static getEnvironments(){const e=Mv(),t=new Map;yn(e)&&yn(e.environment)&&t.set(e.environment.name,e.environment),yn(e)&&yn(e.environments)&&e.environments.forEach(a=>t.set(a.name,a));const s=[];return Array.from(t.entries()).forEach(([a,u])=>{s.push(new on({name:a,plan_id:u.plan_id},u.type,u.createFrom,u.isPinned,u.isDefault))}),Gv(s)&&s.push(new on({name:gl.Prod},vi.Local)),s}static sort(e){return e.sort(t=>t.isRemote?-1:1),e}}const Lv="prod",qS=new Set(on.getEnvironments()),Av=on.getEnvironment()??qS.values().next().value,kv=nO((n,e)=>({version:void 0,modules:new Ov,splitPaneSizes:[20,80],showConfirmation:!1,confirmations:[],environment:Av,environments:qS,initialStartDate:void 0,initialEndDate:void 0,models:new Map,lastSelectedModel:void 0,setLastSelectedModel(t){n(()=>({lastSelectedModel:t}))},setModules(t){n(()=>({modules:new Ov(t.list)}))},isModel(t){return e().models.has(t)},setSplitPaneSizes(t){n(()=>({splitPaneSizes:t}))},setVersion(t){n(()=>({version:t}))},setShowConfirmation(t){n(()=>({showConfirmation:t}))},addConfirmation(t){n(s=>(s.confirmations.push(t),{confirmations:Array.from(s.confirmations)}))},removeConfirmation(){const t=e();t.confirmations.shift(),n(()=>({confirmations:Array.from(t.confirmations)}))},setModels(t=[]){const s=e();n(()=>({models:t.reduce((a,u)=>{const d=new XC(u);let f=s.models.get(d.path)??s.models.get(d.name)??s.models.get(d.fqn);return Zt(f)?f=d:f.update(u),a.set(f.name,f),a.set(f.fqn,f),a.set(f.path,f),a},new Map)}))},getNextEnvironment(){return e().environments.values().next().value??Av},isExistingEnvironment(t){const s=e();if(t.isModel)return s.environments.has(t);let a=!1;return s.environments.forEach(u=>{u.name===t&&(a=!0)}),a},setEnvironment(t){n(()=>(on.save({environment:t}),{environment:t}))},addLocalEnvironment(t,s=Lv){n(a=>{if(Rl(t))return a;const u=new on({name:t},vi.Local,s);return a.environments.add(u),a.setEnvironment(u),on.save({environments:Array.from(a.environments)}),{environments:new Set(a.environments)}})},removeLocalEnvironment(t){n(s=>(s.environments.delete(t),on.save({environments:Array.from(s.environments)}),{environments:new Set(s.environments)}))},addRemoteEnvironments(t=[],s,a=[]){n(u=>{const d=Array.from(u.environments);t.forEach(_=>{let x=d.find(({name:L})=>_.name===L);Zt(x)?(x=new on(_,vi.Remote),d.push(x)):(x.update(_),x.setType(vi.Remote)),u.environment.name===_.name&&u.environment.update(_),x.isInitial&&x.isDefault&&u.setEnvironment(x)}),a.forEach(_=>{const x=d.find(({name:L})=>_===L);Zt(x)?d.push(new on({name:_},vi.Local,void 0,!0)):x.isPinned=!0});const f=on.getEnvironment();let p,m,g;d.forEach(_=>{switch(_.name){case Lv:p=_;break;case(f==null?void 0:f.name):m=_;break;case s:_.isDefault=!0,g=_}});const v=u.environment??m??g,w=B1(p==null?void 0:p.isInitial)?p:v;return on.save({environments:d,environment:w}),on.sort(d),{environment:w,environments:new Set(d)}})},hasRemoteEnvironments(){const t=e();return Array.from(t.environments).some(({type:s})=>s===vi.Remote)}}));function Pv({children:n,className:e}){return U.jsx("div",{className:qr("flex justify-center items-center w-full h-full",e),children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:n})]})})}const YS=!!(window.__IS_HEADLESS__??!1),Tv=YS?void 0:R.lazy(()=>vn(()=>import("./Header-DQF-wN9R.js"),[])),Nv=YS?void 0:R.lazy(()=>vn(()=>import("./Footer-C9MHPzk1.js"),[]));function iO(){const{addError:n}=Tp(),e=kv(f=>f.modules),t=kv(f=>f.setModules),{refetch:s,cancel:a,isFetching:u}=JC();R.useEffect(()=>(s().then(({data:f})=>{e.update(f),t(e)}).catch(f=>n(Qt.Modules,f)),()=>{a()}),[]);const d=qC(e);return U.jsxs(U.Fragment,{children:[yn(Tv)&&U.jsxs(U.Fragment,{children:[U.jsx(Tv,{}),U.jsx(Gg,{})]}),U.jsx("main",{className:"h-full overflow-hidden relative",children:u?U.jsx(Pv,{className:"absolute w-full h-full bg-theme z-10",children:"Building Modules..."}):U.jsx(R.Suspense,{fallback:U.jsx(Pv,{children:"Loading Page..."}),children:dd(e.list)?U.jsx(ZI,{router:d}):U.jsx(Fn,{description:"No Modules Found"})})}),yn(Nv)&&U.jsxs(U.Fragment,{children:[U.jsx(Gg,{}),U.jsx(Nv,{})]})]})}const sO=new cb({queryCache:new u0({onError(n,e){e.meta.onError(n)},onSuccess(n,e){e.meta.onSuccess()}}),defaultOptions:{queries:{networkMode:"always",refetchOnWindowFocus:!1,retry:!1,staleTime:1/0}}});Y1.createRoot(oO()).render(U.jsx(Zs.StrictMode,{children:U.jsx(mb,{client:sO,children:U.jsx($1,{children:U.jsx(YC,{children:U.jsx(iO,{})})})})}));function oO(){const n="root";let e=document.getElementById(n);if(yn(e))return e;const t=document.body,s=t.children[0];return e=document.createElement("div"),e.id=n,e.className="h-full w-full flex flex-col justify-start",s instanceof HTMLElement?t.insertBefore(e,s):t.appendChild(e),e}export{KS as $,PO as A,FO as B,cO as C,Gv as D,To as E,Qt as F,U0 as G,Gg as H,Rl as I,kO as J,vO as K,Bo as L,on as M,RE as N,DO as O,yO as P,xO as Q,Zs as R,$s as S,WE as T,Fn as U,bO as V,fO as W,j0 as X,RO as Y,UO as Z,vn as _,kv as a,nO as a0,qv as a1,Yv as a2,$O as a3,mO as a4,XO as a5,eR as a6,Pv as a7,_O as a8,dO as a9,OO as aA,WO as aB,U1 as aa,NO as ab,CC as ac,TO as ad,BO as ae,ZO as af,JO as ag,IC as ah,lO as ai,Xh as aj,SO as ak,CO as al,rp as am,HO as an,tR as ao,wO as ap,hO as aq,QO as ar,pc as as,uO as at,Jg as au,MO as av,LO as aw,Q1 as ax,Xv as ay,Sh as az,hs as b,qr as c,Tp as d,dt as e,B1 as f,dd as g,KO as h,yn as i,U as j,YO as k,Tt as l,ft as m,pO as n,GO as o,qO as p,gO as q,R as r,kI as s,zO as t,IO as u,Zt as v,HS as w,io as x,jO as y,VO as z};
|
|
58
|
+
]`}concat(...e){const t=this.schema,s=this.data.concat(e.flatMap(({data:a})=>a));return new rr(t,s.map(a=>new Er(t,a)))}slice(e,t){const s=this.schema;[e,t]=pS({length:this.numRows},e,t);const a=vS(this.data,this._offsets,e,t);return new rr(s,a.map(u=>new Er(s,u)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){const t=this.data.map(s=>s.children[e]);if(t.length===0){const{type:s}=this.schema.fields[e],a=Ve({type:s,length:0,nullCount:0});t.push(a._changeLengthAndBackfillNullBitmap(this.numRows))}return new ht(t)}return null}setChild(e,t){var s;return this.setChildAt((s=this.schema.fields)===null||s===void 0?void 0:s.findIndex(a=>a.name===e),t)}setChildAt(e,t){let s=this.schema,a=[...this.batches];if(e>-1&&e<this.numCols){t||(t=new ht([Ve({type:new ys,length:this.numRows})]));const u=s.fields.slice(),d=u[e].clone({type:t.type}),f=this.schema.fields.map((p,m)=>this.getChildAt(m));[u[e],f[e]]=[d,t],[s,a]=gh(s,f)}return new rr(s,a)}select(e){const t=this.schema.fields.reduce((s,a,u)=>s.set(a.name,u),new Map);return this.selectAt(e.map(s=>t.get(s)).filter(s=>s>-1))}selectAt(e){const t=this.schema.selectAt(e),s=this.batches.map(a=>a.selectAt(e));return new rr(t,s)}assign(e){const t=this.schema.fields,[s,a]=e.schema.fields.reduce((f,p,m)=>{const[g,v]=f,w=t.findIndex(_=>_.name===p.name);return~w?v[w]=m:g.push(m),f},[[],[]]),u=this.schema.assign(e.schema),d=[...t.map((f,p)=>[p,a[p]]).map(([f,p])=>p===void 0?this.getChildAt(f):e.getChildAt(p)),...s.map(f=>e.getChildAt(f))].filter(Boolean);return new rr(...gh(u,d))}}OS=Symbol.toStringTag;rr[OS]=(n=>(n.schema=null,n.batches=[],n._offsets=new Uint32Array([0]),n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,n.isValid=td(Dp),n.get=td(Tn.getVisitFn(C.Struct)),n.set=wS(or.getVisitFn(C.Struct)),n.indexOf=SS(nd.getVisitFn(C.Struct)),"Table"))(rr.prototype);var RS;let Er=class Ol{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof rt))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Ve({nullCount:0,type:new gn(this.schema.fields),children:this.schema.fields.map(t=>Ve({type:t.type,nullCount:0}))})]=e,!(this.data instanceof St))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=vv(this.schema,this.data.children);break}case 1:{const[t]=e,{fields:s,children:a,length:u}=Object.keys(t).reduce((p,m,g)=>(p.children[g]=t[m],p.length=Math.max(p.length,t[m].length),p.fields[g]=xt.new({name:m,type:t[m].type,nullable:!0}),p),{length:0,fields:new Array,children:new Array}),d=new rt(s),f=Ve({type:new gn(s),length:u,children:a,nullCount:0});[this.schema,this.data]=vv(d,f.children,u);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=FS(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return Tn.visit(this.data,e)}at(e){return this.get(Ip(e,this.numRows))}set(e,t){return or.visit(this.data,e,t)}indexOf(e,t){return nd.visit(this.data,e,t)}[Symbol.iterator](){return Cp.visit(new ht([this.data]))}toArray(){return[...this]}concat(...e){return new rr(this.schema,[this,...e])}slice(e,t){const[s]=new ht([this.data]).slice(e,t).data;return new Ol(this.schema,s)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)===null||t===void 0?void 0:t.findIndex(s=>s.name===e))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new ht([this.data.children[e]]):null}setChild(e,t){var s;return this.setChildAt((s=this.schema.fields)===null||s===void 0?void 0:s.findIndex(a=>a.name===e),t)}setChildAt(e,t){let s=this.schema,a=this.data;if(e>-1&&e<this.numCols){t||(t=new ht([Ve({type:new ys,length:this.numRows})]));const u=s.fields.slice(),d=a.children.slice(),f=u[e].clone({type:t.type});[u[e],d[e]]=[f,t.data[0]],s=new rt(u,new Map(this.schema.metadata)),a=Ve({type:new gn(u),children:d})}return new Ol(s,a)}select(e){const t=this.schema.select(e),s=new gn(t.fields),a=[];for(const u of e){const d=this.schema.fields.findIndex(f=>f.name===u);~d&&(a[d]=this.data.children[d])}return new Ol(t,Ve({type:s,length:this.numRows,children:a}))}selectAt(e){const t=this.schema.selectAt(e),s=e.map(u=>this.data.children[u]).filter(Boolean),a=Ve({type:new gn(t.fields),length:this.numRows,children:s});return new Ol(t,a)}};RS=Symbol.toStringTag;Er[RS]=(n=>(n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Er.prototype);function vv(n,e,t=e.reduce((s,a)=>Math.max(s,a.length),0)){var s;const a=[...n.fields],u=[...e],d=(t+63&-64)>>3;for(const[f,p]of n.fields.entries()){const m=e[f];(!m||m.length!==t)&&(a[f]=p.clone({nullable:!0}),u[f]=(s=m==null?void 0:m._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:Ve({type:p.type,length:t,nullCount:t,nullBitmap:new Uint8Array(d)}))}return[n.assign(a),Ve({type:new gn(a),length:t,children:u})]}function FS(n,e,t=new Map){var s,a;if(((s=n==null?void 0:n.length)!==null&&s!==void 0?s:0)>0&&(n==null?void 0:n.length)===(e==null?void 0:e.length))for(let u=-1,d=n.length;++u<d;){const{type:f}=n[u],p=e[u];for(const m of[p,...((a=p==null?void 0:p.dictionary)===null||a===void 0?void 0:a.data)||[]])FS(f.children,m==null?void 0:m.children,t);if(de.isDictionary(f)){const{id:m}=f;if(!t.has(m))p!=null&&p.dictionary&&t.set(m,p.dictionary);else if(t.get(m)!==p.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}}return t}class MS extends Er{constructor(e){const t=e.fields.map(a=>Ve({type:a.type})),s=Ve({type:new gn(e.fields),nullCount:0,children:t});super(e,s)}}let Gi=class Tr{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new Tr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+st),(t||new Tr).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ut.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):nt.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,t){const s=this.bb.__offset(this.bb_pos,12);return s?(t||new Wt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+s)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Ut.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,nt.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt("0"))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let s=t.length-1;s>=0;s--)e.addOffset(t[s]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,s,a,u,d){return Tr.startMessage(e),Tr.addVersion(e,t),Tr.addHeaderType(e,s),Tr.addHeader(e,a),Tr.addBodyLength(e,u),Tr.addCustomMetadata(e,d),Tr.endMessage(e)}};class ND extends He{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return lv.startNull(t),lv.endNull(t)}visitInt(e,t){return Hn.startInt(t),Hn.addBitWidth(t,e.bitWidth),Hn.addIsSigned(t,e.isSigned),Hn.endInt(t)}visitFloat(e,t){return Hr.startFloatingPoint(t),Hr.addPrecision(t,e.precision),Hr.endFloatingPoint(t)}visitBinary(e,t){return rv.startBinary(t),rv.endBinary(t)}visitLargeBinary(e,t){return sv.startLargeBinary(t),sv.endLargeBinary(t)}visitBool(e,t){return iv.startBool(t),iv.endBool(t)}visitUtf8(e,t){return uv.startUtf8(t),uv.endUtf8(t)}visitLargeUtf8(e,t){return ov.startLargeUtf8(t),ov.endLargeUtf8(t)}visitDecimal(e,t){return zo.startDecimal(t),zo.addScale(t,e.scale),zo.addPrecision(t,e.precision),zo.addBitWidth(t,e.bitWidth),zo.endDecimal(t)}visitDate(e,t){return _c.startDate(t),_c.addUnit(t,e.unit),_c.endDate(t)}visitTime(e,t){return tr.startTime(t),tr.addUnit(t,e.unit),tr.addBitWidth(t,e.bitWidth),tr.endTime(t)}visitTimestamp(e,t){const s=e.timezone&&t.createString(e.timezone)||void 0;return nr.startTimestamp(t),nr.addUnit(t,e.unit),s!==void 0&&nr.addTimezone(t,s),nr.endTimestamp(t)}visitInterval(e,t){return Wr.startInterval(t),Wr.addUnit(t,e.unit),Wr.endInterval(t)}visitDuration(e,t){return bc.startDuration(t),bc.addUnit(t,e.unit),bc.endDuration(t)}visitList(e,t){return av.startList(t),av.endList(t)}visitStruct(e,t){return Hs.startStruct_(t),Hs.endStruct_(t)}visitUnion(e,t){kn.startTypeIdsVector(t,e.typeIds.length);const s=kn.createTypeIdsVector(t,e.typeIds);return kn.startUnion(t),kn.addMode(t,e.mode),kn.addTypeIds(t,s),kn.endUnion(t)}visitDictionary(e,t){const s=this.visit(e.indices,t);return gi.startDictionaryEncoding(t),gi.addId(t,BigInt(e.id)),gi.addIsOrdered(t,e.isOrdered),s!==void 0&&gi.addIndexType(t,s),gi.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Ic.startFixedSizeBinary(t),Ic.addByteWidth(t,e.byteWidth),Ic.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Ec.startFixedSizeList(t),Ec.addListSize(t,e.listSize),Ec.endFixedSizeList(t)}visitMap(e,t){return xc.startMap(t),xc.addKeysSorted(t,e.keysSorted),xc.endMap(t)}}const vh=new ND;function BD(n,e=new Map){return new rt(jD(n,e),Cc(n.metadata),e)}function LS(n){return new Cr(n.count,AS(n.columns),kS(n.columns))}function UD(n){return new bi(LS(n.data),n.id,n.isDelta)}function jD(n,e){return(n.fields||[]).filter(Boolean).map(t=>xt.fromJSON(t,e))}function wv(n,e){return(n.children||[]).filter(Boolean).map(t=>xt.fromJSON(t,e))}function AS(n){return(n||[]).reduce((e,t)=>[...e,new Ia(t.count,zD(t.VALIDITY)),...AS(t.children)],[])}function kS(n,e=[]){for(let t=-1,s=(n||[]).length;++t<s;){const a=n[t];a.VALIDITY&&e.push(new wi(e.length,a.VALIDITY.length)),a.TYPE_ID&&e.push(new wi(e.length,a.TYPE_ID.length)),a.OFFSET&&e.push(new wi(e.length,a.OFFSET.length)),a.DATA&&e.push(new wi(e.length,a.DATA.length)),e=kS(a.children,e)}return e}function zD(n){return(n||[]).reduce((e,t)=>e+ +(t===0),0)}function $D(n,e){let t,s,a,u,d,f;return!e||!(u=n.dictionary)?(d=_v(n,wv(n,e)),a=new xt(n.name,d,n.nullable,Cc(n.metadata))):e.has(t=u.id)?(s=(s=u.indexType)?Sv(s):new Bl,f=new ga(e.get(t),s,t,u.isOrdered),a=new xt(n.name,f,n.nullable,Cc(n.metadata))):(s=(s=u.indexType)?Sv(s):new Bl,e.set(t,d=_v(n,wv(n,e))),f=new ga(d,s,t,u.isOrdered),a=new xt(n.name,f,n.nullable,Cc(n.metadata))),a||null}function Cc(n=[]){return new Map(n.map(({key:e,value:t})=>[e,t]))}function Sv(n){return new no(n.isSigned,n.bitWidth)}function _v(n,e){const t=n.type.name;switch(t){case"NONE":return new ys;case"null":return new ys;case"binary":return new Uc;case"largebinary":return new jc;case"utf8":return new zc;case"largeutf8":return new $c;case"bool":return new Vc;case"list":return new Gc((e||[])[0]);case"struct":return new gn(e||[]);case"struct_":return new gn(e||[])}switch(t){case"int":{const s=n.type;return new no(s.isSigned,s.bitWidth)}case"floatingpoint":{const s=n.type;return new Bc(an[s.precision])}case"decimal":{const s=n.type;return new Hc(s.scale,s.precision,s.bitWidth)}case"date":{const s=n.type;return new Wc(sr[s.unit])}case"time":{const s=n.type;return new Qc(Ie[s.unit],s.bitWidth)}case"timestamp":{const s=n.type;return new Kc(Ie[s.unit],s.timezone)}case"interval":{const s=n.type;return new qc(Gr[s.unit])}case"duration":{const s=n.type;return new Yc(Ie[s.unit])}case"union":{const s=n.type,[a,...u]=(s.mode+"").toLowerCase(),d=a.toUpperCase()+u.join("");return new Jc(Pn[d],s.typeIds||[],e||[])}case"fixedsizebinary":{const s=n.type;return new Xc(s.byteWidth)}case"fixedsizelist":{const s=n.type;return new Zc(s.listSize,(e||[])[0])}case"map":{const s=n.type;return new ed((e||[])[0],s.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}var VD=q0,HD=ma;class xr{static fromJSON(e,t){const s=new xr(0,Ut.V5,t);return s._createHeader=WD(e,t),s}static decode(e){e=new HD(Ge(e));const t=Gi.getRootAsMessage(e),s=t.bodyLength(),a=t.version(),u=t.headerType(),d=new xr(s,a,u);return d._createHeader=QD(t,u),d}static encode(e){const t=new VD;let s=-1;return e.isSchema()?s=rt.encode(t,e.header()):e.isRecordBatch()?s=Cr.encode(t,e.header()):e.isDictionaryBatch()&&(s=bi.encode(t,e.header())),Gi.startMessage(t),Gi.addVersion(t,Ut.V5),Gi.addHeader(t,s),Gi.addHeaderType(t,e.headerType),Gi.addBodyLength(t,BigInt(e.bodyLength)),Gi.finishMessageBuffer(t,Gi.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof rt)return new xr(0,Ut.V5,nt.Schema,e);if(e instanceof Cr)return new xr(t,Ut.V5,nt.RecordBatch,e);if(e instanceof bi)return new xr(t,Ut.V5,nt.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===nt.Schema}isRecordBatch(){return this.headerType===nt.RecordBatch}isDictionaryBatch(){return this.headerType===nt.DictionaryBatch}constructor(e,t,s,a){this._version=t,this._headerType=s,this.body=new Uint8Array(0),a&&(this._createHeader=()=>a),this._bodyLength=Et(e)}}class Cr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,s){this._nodes=t,this._buffers=s,this._length=Et(e)}}class bi{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,s=!1){this._data=e,this._isDelta=s,this._id=Et(t)}}class wi{constructor(e,t){this.offset=Et(e),this.length=Et(t)}}class Ia{constructor(e,t){this.length=Et(e),this.nullCount=Et(t)}}function WD(n,e){return()=>{switch(e){case nt.Schema:return rt.fromJSON(n);case nt.RecordBatch:return Cr.fromJSON(n);case nt.DictionaryBatch:return bi.fromJSON(n)}throw new Error(`Unrecognized Message type: { name: ${nt[e]}, type: ${e} }`)}}function QD(n,e){return()=>{switch(e){case nt.Schema:return rt.decode(n.header(new Br),new Map,n.version());case nt.RecordBatch:return Cr.decode(n.header(new di),n.version());case nt.DictionaryBatch:return bi.decode(n.header(new Uo),n.version())}throw new Error(`Unrecognized Message type: { name: ${nt[e]}, type: ${e} }`)}}xt.encode=rC;xt.decode=tC;xt.fromJSON=$D;rt.encode=nC;rt.decode=KD;rt.fromJSON=BD;Cr.encode=iC;Cr.decode=qD;Cr.fromJSON=LS;bi.encode=sC;bi.decode=YD;bi.fromJSON=UD;Ia.encode=oC;Ia.decode=JD;wi.encode=aC;wi.decode=GD;function KD(n,e=new Map,t=Ut.V5){const s=eC(n,e);return new rt(s,Oc(n),e,t)}function qD(n,e=Ut.V5){if(n.compression()!==null)throw new Error("Record batch compression not implemented");return new Cr(n.length(),XD(n),ZD(n,e))}function YD(n,e=Ut.V5){return new bi(Cr.decode(n.data(),e),n.id(),n.isDelta())}function GD(n){return new wi(n.offset(),n.length())}function JD(n){return new Ia(n.length(),n.nullCount())}function XD(n){const e=[];for(let t,s=-1,a=-1,u=n.nodesLength();++s<u;)(t=n.nodes(s))&&(e[++a]=Ia.decode(t));return e}function ZD(n,e){const t=[];for(let s,a=-1,u=-1,d=n.buffersLength();++a<d;)(s=n.buffers(a))&&(e<Ut.V4&&(s.bb_pos+=8*(a+1)),t[++u]=wi.decode(s));return t}function eC(n,e){const t=[];for(let s,a=-1,u=-1,d=n.fieldsLength();++a<d;)(s=n.fields(a))&&(t[++u]=xt.decode(s,e));return t}function bv(n,e){const t=[];for(let s,a=-1,u=-1,d=n.childrenLength();++a<d;)(s=n.children(a))&&(t[++u]=xt.decode(s,e));return t}function tC(n,e){let t,s,a,u,d,f;return!e||!(f=n.dictionary())?(a=Ev(n,bv(n,e)),s=new xt(n.name(),a,n.nullable(),Oc(n))):e.has(t=Et(f.id()))?(u=(u=f.indexType())?Iv(u):new Bl,d=new ga(e.get(t),u,t,f.isOrdered()),s=new xt(n.name(),d,n.nullable(),Oc(n))):(u=(u=f.indexType())?Iv(u):new Bl,e.set(t,a=Ev(n,bv(n,e))),d=new ga(a,u,t,f.isOrdered()),s=new xt(n.name(),d,n.nullable(),Oc(n))),s||null}function Oc(n){const e=new Map;if(n)for(let t,s,a=-1,u=Math.trunc(n.customMetadataLength());++a<u;)(t=n.customMetadata(a))&&(s=t.key())!=null&&e.set(s,t.value());return e}function Iv(n){return new no(n.isSigned(),n.bitWidth())}function Ev(n,e){const t=n.typeType();switch(t){case wt.NONE:return new ys;case wt.Null:return new ys;case wt.Binary:return new Uc;case wt.LargeBinary:return new jc;case wt.Utf8:return new zc;case wt.LargeUtf8:return new $c;case wt.Bool:return new Vc;case wt.List:return new Gc((e||[])[0]);case wt.Struct_:return new gn(e||[])}switch(t){case wt.Int:{const s=n.type(new Hn);return new no(s.isSigned(),s.bitWidth())}case wt.FloatingPoint:{const s=n.type(new Hr);return new Bc(s.precision())}case wt.Decimal:{const s=n.type(new zo);return new Hc(s.scale(),s.precision(),s.bitWidth())}case wt.Date:{const s=n.type(new _c);return new Wc(s.unit())}case wt.Time:{const s=n.type(new tr);return new Qc(s.unit(),s.bitWidth())}case wt.Timestamp:{const s=n.type(new nr);return new Kc(s.unit(),s.timezone())}case wt.Interval:{const s=n.type(new Wr);return new qc(s.unit())}case wt.Duration:{const s=n.type(new bc);return new Yc(s.unit())}case wt.Union:{const s=n.type(new kn);return new Jc(s.mode(),s.typeIdsArray()||[],e||[])}case wt.FixedSizeBinary:{const s=n.type(new Ic);return new Xc(s.byteWidth())}case wt.FixedSizeList:{const s=n.type(new Ec);return new Zc(s.listSize(),(e||[])[0])}case wt.Map:{const s=n.type(new xc);return new ed((e||[])[0],s.keysSorted())}}throw new Error(`Unrecognized type: "${wt[t]}" (${t})`)}function nC(n,e){const t=e.fields.map(u=>xt.encode(n,u));Br.startFieldsVector(n,t.length);const s=Br.createFieldsVector(n,t),a=e.metadata&&e.metadata.size>0?Br.createCustomMetadataVector(n,[...e.metadata].map(([u,d])=>{const f=n.createString(`${u}`),p=n.createString(`${d}`);return Wt.startKeyValue(n),Wt.addKey(n,f),Wt.addValue(n,p),Wt.endKeyValue(n)})):-1;return Br.startSchema(n),Br.addFields(n,s),Br.addEndianness(n,lC?ya.Little:ya.Big),a!==-1&&Br.addCustomMetadata(n,a),Br.endSchema(n)}function rC(n,e){let t=-1,s=-1,a=-1;const u=e.type;let d=e.typeId;de.isDictionary(u)?(d=u.dictionary.typeId,a=vh.visit(u,n),s=vh.visit(u.dictionary,n)):s=vh.visit(u,n);const f=(u.children||[]).map(g=>xt.encode(n,g)),p=Jn.createChildrenVector(n,f),m=e.metadata&&e.metadata.size>0?Jn.createCustomMetadataVector(n,[...e.metadata].map(([g,v])=>{const w=n.createString(`${g}`),_=n.createString(`${v}`);return Wt.startKeyValue(n),Wt.addKey(n,w),Wt.addValue(n,_),Wt.endKeyValue(n)})):-1;return e.name&&(t=n.createString(e.name)),Jn.startField(n),Jn.addType(n,s),Jn.addTypeType(n,d),Jn.addChildren(n,p),Jn.addNullable(n,!!e.nullable),t!==-1&&Jn.addName(n,t),a!==-1&&Jn.addDictionary(n,a),m!==-1&&Jn.addCustomMetadata(n,m),Jn.endField(n)}function iC(n,e){const t=e.nodes||[],s=e.buffers||[];di.startNodesVector(n,t.length);for(const d of t.slice().reverse())Ia.encode(n,d);const a=n.endVector();di.startBuffersVector(n,s.length);for(const d of s.slice().reverse())wi.encode(n,d);const u=n.endVector();return di.startRecordBatch(n),di.addLength(n,BigInt(e.length)),di.addNodes(n,a),di.addBuffers(n,u),di.endRecordBatch(n)}function sC(n,e){const t=Cr.encode(n,e.data);return Uo.startDictionaryBatch(n),Uo.addId(n,BigInt(e.id)),Uo.addIsDelta(n,e.isDelta),Uo.addData(n,t),Uo.endDictionaryBatch(n)}function oC(n,e){return J0.createFieldNode(n,BigInt(e.length),BigInt(e.nullCount))}function aC(n,e){return G0.createBuffer(n,BigInt(e.offset),BigInt(e.length))}const lC=(()=>{const n=new ArrayBuffer(2);return new DataView(n).setInt16(0,256,!0),new Int16Array(n)[0]===256})(),Ap=n=>`Expected ${nt[n]} Message in stream, but was null or length 0.`,kp=n=>`Header pointer of flatbuffer-encoded ${nt[n]} Message is null or length 0.`,PS=(n,e)=>`Expected to read ${n} metadata bytes, but only read ${e}.`,TS=(n,e)=>`Expected to read ${n} bytes for message body, but only read ${e}.`;class NS{constructor(e){this.source=e instanceof id?e:new id(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Ft:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=Ge(this.source.read(e));if(t.byteLength<e)throw new Error(TS(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){const t=nt.Schema,s=this.readMessage(t),a=s==null?void 0:s.header();if(e&&!a)throw new Error(kp(t));return a}readMetadataLength(){const e=this.source.read(gd),t=e&&new ma(e),s=(t==null?void 0:t.readInt32(0))||0;return{done:s===0,value:s}}readMetadata(e){const t=this.source.read(e);if(!t)return Ft;if(t.byteLength<e)throw new Error(PS(e,t.byteLength));return{done:!1,value:xr.decode(t)}}}class uC{constructor(e,t){this.source=e instanceof wa?e:$0(e)?new sd(e,t):new wa(e)}[Symbol.asyncIterator](){return this}next(){return ke(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Ft:e})}throw(e){return ke(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return ke(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return ke(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value})}readMessageBody(e){return ke(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);const t=Ge(yield this.source.read(e));if(t.byteLength<e)throw new Error(TS(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(){return ke(this,arguments,void 0,function*(e=!1){const t=nt.Schema,s=yield this.readMessage(t),a=s==null?void 0:s.header();if(e&&!a)throw new Error(kp(t));return a})}readMetadataLength(){return ke(this,void 0,void 0,function*(){const e=yield this.source.read(gd),t=e&&new ma(e),s=(t==null?void 0:t.readInt32(0))||0;return{done:s===0,value:s}})}readMetadata(e){return ke(this,void 0,void 0,function*(){const t=yield this.source.read(e);if(!t)return Ft;if(t.byteLength<e)throw new Error(PS(e,t.byteLength));return{done:!1,value:xr.decode(t)}})}}class cC extends NS{constructor(e){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof yv?e:new yv(e)}next(){const{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:xr.fromJSON(e.schema,nt.Schema)};if(this._dictionaryIndex<e.dictionaries.length){const t=e.dictionaries[this._dictionaryIndex++];return this._body=t.data.columns,{done:!1,value:xr.fromJSON(t,nt.DictionaryBatch)}}if(this._batchIndex<e.batches.length){const t=e.batches[this._batchIndex++];return this._body=t.columns,{done:!1,value:xr.fromJSON(t,nt.RecordBatch)}}return this._body=[],Ft}readMessageBody(e){return t(this._body);function t(s){return(s||[]).reduce((a,u)=>[...a,...u.VALIDITY&&[u.VALIDITY]||[],...u.TYPE_ID&&[u.TYPE_ID]||[],...u.OFFSET&&[u.OFFSET]||[],...u.DATA&&[u.DATA]||[],...t(u.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Ap(e));return t.value}readSchema(){const e=nt.Schema,t=this.readMessage(e),s=t==null?void 0:t.header();if(!t||!s)throw new Error(kp(e));return s}}const gd=4,Jh="ARROW1",od=new Uint8Array(Jh.length);for(let n=0;n<Jh.length;n+=1)od[n]=Jh.codePointAt(n);function Pp(n,e=0){for(let t=-1,s=od.length;++t<s;)if(od[t]!==n[e+t])return!1;return!0}const Yl=od.length,BS=Yl+gd,dC=Yl*2+gd;class Si extends xS{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){const t=this._impl.open(e);return kl(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return er.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return er.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof Si?e:Uh(e)?mC(e):$0(e)?vC(e):kl(e)?ke(this,void 0,void 0,function*(){return yield Si.from(yield e)}):V0(e)||gp(e)||W0(e)||yp(e)?gC(new wa(e)):yC(new id(e))}static readAll(e){return e instanceof Si?e.isSync()?xv(e):Dv(e):Uh(e)||ArrayBuffer.isView(e)||pd(e)||z0(e)?xv(e):Dv(e)}}class ad extends Si{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Qr(this,arguments,function*(){yield Ne(yield*Sc(Jo(this[Symbol.iterator]())))})}}class ld extends Si{constructor(e){super(e),this._impl=e}readAll(){return ke(this,void 0,void 0,function*(){var e,t,s,a;const u=new Array;try{for(var d=!0,f=Jo(this),p;p=yield f.next(),e=p.done,!e;d=!0){a=p.value,d=!1;const m=a;u.push(m)}}catch(m){t={error:m}}finally{try{!d&&!e&&(s=f.return)&&(yield s.call(f))}finally{if(t)throw t.error}}return u})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class US extends ad{constructor(e){super(e),this._impl=e}}class fC extends ld{constructor(e){super(e),this._impl=e}}class jS{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const s=this._loadVectors(e,t,this.schema.fields),a=Ve({type:new gn(this.schema.fields),length:e.length,children:s});return new Er(this.schema,a)}_loadDictionaryBatch(e,t){const{id:s,isDelta:a}=e,{dictionaries:u,schema:d}=this,f=u.get(s),p=d.dictionaries.get(s),m=this._loadVectors(e.data,t,[p]);return(f&&a?f.concat(new ht(m)):new ht(m)).memoize()}_loadVectors(e,t,s){return new CS(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(s)}}class ud extends jS{constructor(e,t){super(t),this._reader=Uh(e)?new cC(this._handle=e):new NS(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=$S(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Ft}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Ft}next(){if(this.closed)return Ft;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const s=e.header(),a=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(s,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const s=e.header(),a=t.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(s,a);this.dictionaries.set(s.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MS(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class cd extends jS{constructor(e,t){super(t),this._reader=new uC(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return ke(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return ke(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=$S(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return ke(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Ft})}return(e){return ke(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Ft})}next(){return ke(this,void 0,void 0,function*(){if(this.closed)return Ft;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const s=e.header(),a=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(s,a)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const s=e.header(),a=yield t.readMessageBody(e.bodyLength),u=this._loadDictionaryBatch(s,a);this.dictionaries.set(s.id,u)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new MS(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return ke(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}}class zS extends ud{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof gv?e:new gv(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(s&&this._handle.seek(s.offset)){const a=this._reader.readMessage(nt.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),d=this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,d)}}return null}_readDictionaryBatch(e){var t;const s=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(s&&this._handle.seek(s.offset)){const a=this._reader.readMessage(nt.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),d=this._reader.readMessageBody(a.bodyLength),f=this._loadDictionaryBatch(u,d);this.dictionaries.set(u.id,f)}}}_readFooter(){const{_handle:e}=this,t=e.size-BS,s=e.readInt32(t),a=e.readAt(t-s,s);return Op.decode(a)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(this._recordBatchIndex);if(s&&this._handle.seek(s.offset))return this._reader.readMessage(e)}return null}}class hC extends cd{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,...t){const s=typeof t[0]!="number"?t.shift():void 0,a=t[0]instanceof Map?t.shift():void 0;super(e instanceof sd?e:new sd(e,s),a)}isFile(){return!0}isAsync(){return!0}open(e){const t=Object.create(null,{open:{get:()=>super.open}});return ke(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const s of this._footer.dictionaryBatches())s&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return ke(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());const s=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(s&&(yield this._handle.seek(s.offset))){const a=yield this._reader.readMessage(nt.RecordBatch);if(a!=null&&a.isRecordBatch()){const u=a.header(),d=yield this._reader.readMessageBody(a.bodyLength);return this._loadRecordBatch(u,d)}}return null})}_readDictionaryBatch(e){return ke(this,void 0,void 0,function*(){var t;const s=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(s&&(yield this._handle.seek(s.offset))){const a=yield this._reader.readMessage(nt.DictionaryBatch);if(a!=null&&a.isDictionaryBatch()){const u=a.header(),d=yield this._reader.readMessageBody(a.bodyLength),f=this._loadDictionaryBatch(u,d);this.dictionaries.set(u.id,f)}}})}_readFooter(){return ke(this,void 0,void 0,function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-BS,s=yield e.readInt32(t),a=yield e.readAt(t-s,s);return Op.decode(a)})}_readNextMessageAndValidate(e){return ke(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}}class pC extends ud{constructor(e,t){super(e,t)}_loadVectors(e,t,s){return new DD(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(s)}}function $S(n,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:n.autoDestroy}function*xv(n){const e=Si.from(n);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function Dv(n){return Qr(this,arguments,function*(){const t=yield Ne(Si.from(n));try{if(!(yield Ne(t.open({autoDestroy:!1}))).closed)do yield yield Ne(t);while(!(yield Ne(t.reset().open())).closed)}finally{yield Ne(t.cancel())}})}function mC(n){return new ad(new pC(n))}function yC(n){const e=n.peek(Yl+7&-8);return e&&e.byteLength>=4?Pp(e)?new US(new zS(n.read())):new ad(new ud(n)):new ad(new ud(function*(){}()))}function gC(n){return ke(this,void 0,void 0,function*(){const e=yield n.peek(Yl+7&-8);return e&&e.byteLength>=4?Pp(e)?new US(new zS(yield n.read())):new ld(new cd(n)):new ld(new cd(function(){return Qr(this,arguments,function*(){})}()))})}function vC(n){return ke(this,void 0,void 0,function*(){const{size:e}=yield n.stat(),t=new sd(n,e);return e>=dC&&Pp(yield t.readAt(0,Yl+7&-8))?new fC(new hC(t)):new ld(new cd(t))})}function VS(n){const e=Si.from(n);return kl(e)?e.then(t=>VS(t)):e.isAsync()?e.readAll().then(t=>new rr(t)):new rr(e.readAll())}async function Nt(n,e){const{url:t,method:s,params:a,data:u,headers:d,credentials:f,mode:p,cache:m}=n,g=Object.keys({...a}).length>0,v=t.replace(/([^:]\/)\/+/g,"$1"),w=new URL(HS(v),window.location.origin);if(g){const _=Object.entries({...a}).reduce((x,[L,N])=>(N!=null&&(x[L]=String(N)),x),{});w.search=new URLSearchParams(_).toString()}return await new Promise((_,x)=>{fetch(w,{method:s,credentials:f,mode:p,cache:m,headers:wC(d),body:SC(u),signal:e==null?void 0:e.signal}).then(async L=>{if(L.status===204)return{ok:!0};const N=L.headers.get("Content-Type");if(Zt(N))return{ok:!1,message:"Empty response"};if(L.status>=400)try{const q=await L.json();throw q.status=q.status??L.status,q}catch(q){throw{message:L.statusText,...q}}const k=N.includes("text/event-stream"),J=N.includes("application/json"),z=N.includes("application/vnd.apache.arrow.stream");if(J)return await L.json();if(z)return await VS(L);if(k){const ee=(await L.text()).trim().replace("data: ","").trim();return JSON.parse(ee)}}).then(_).catch(x)})}function wC(n){return{"Content-Type":"application/json",...n??{}}}function SC(n){try{return JSON.stringify(n)}catch{return""}}function HS(n="/"){let e=`${Rl(window.__BASE_URL__)?"/":window.__BASE_URL__}/${n}`;for(;e.includes("//");)e=e.replaceAll("//","/");return e}const pc={python:"python",sql:"sql",seed:"seed",external:"external",source:"source"},Nr={editor:"editor",files:"files","data-catalog":"data-catalog",plans:"plans",tests:"tests",audits:"audits",errors:"errors",data:"data",lineage:"lineage"},kO={NUMBER_1:1,NUMBER_2:2,NUMBER_3:3},PO={init:"init",success:"success",fail:"fail"},_C=(n,e)=>Nt({url:"/api/commands/apply",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),bC=(n,e)=>Nt({url:"/api/commands/evaluate",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),IC=(n,e)=>Nt({url:"/api/commands/fetchdf",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),EC=(n,e)=>Nt({url:"/api/commands/render",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),xC=n=>Nt({url:"/api/files",method:"GET"},n),DC=(n,e)=>Nt({url:`/api/files/${n}`,method:"GET"},e),CC=(n,e,t)=>Nt({url:`/api/files/${n}`,method:"POST",headers:{"Content-Type":"application/json"},data:e},t),TO=(n,e)=>Nt({url:`/api/files/${n}`,method:"DELETE"},e),NO=(n,e,t)=>Nt({url:`/api/directories/${n}`,method:"POST",headers:{"Content-Type":"application/json"},data:e},t),BO=(n,e)=>Nt({url:`/api/directories/${n}`,method:"DELETE"},e),OC=(n,e)=>Nt({url:"/api/plan",method:"POST",headers:{"Content-Type":"application/json"},data:n},e),RC=n=>Nt({url:"/api/plan/cancel",method:"POST"},n),FC=n=>Nt({url:"/api/environments",method:"GET"},n),UO=(n,e)=>Nt({url:`/api/environments/${n}`,method:"DELETE"},e),MC=(n,e,t,s)=>Nt({url:`/api/lineage/${n}/${e}`,method:"GET",params:t},s),LC=(n,e)=>Nt({url:`/api/lineage/${n}`,method:"GET"},e),AC=n=>Nt({url:"/api/models",method:"GET"},n),kC=(n,e)=>Nt({url:`/api/models/${n}`,method:"GET"},e),PC=n=>Nt({url:"/api/meta",method:"GET"},n),TC=n=>Nt({url:"/api/modules",method:"GET"},n),NC=(n,e)=>Nt({url:"/api/table_diff",method:"GET",params:n},e),li=R.lazy(()=>vn(()=>import("./Root-Cipvpumn.js"),[])),BC=R.lazy(()=>vn(()=>import("./Editor-ttqMNvFU.js"),[])),UC=R.lazy(()=>vn(()=>import("./Plan-CqEwcJdE.js"),[])),jC=R.lazy(()=>vn(()=>import("./Content-BK6ZvWH8.js"),[])),zC=R.lazy(()=>vn(()=>import("./DataCatalog-CVnpiGcp.js"),[])),$C=R.lazy(()=>vn(()=>import("./Tests-DVP2w57x.js"),[])),VC=R.lazy(()=>vn(()=>import("./Audits-CNkn30Bu.js"),[])),HC=R.lazy(()=>vn(()=>import("./Data-BdY6H-uU.js"),[])),wh=R.lazy(()=>vn(()=>import("./Models-BuOgiRPs.js"),[])),WC=R.lazy(()=>vn(()=>import("./Lineage-B58aSBmy.js"),[])),QC=R.lazy(()=>vn(()=>import("./Errors-1Z9mnHDd.js"),[])),KC=R.lazy(()=>vn(()=>import("./Content-BuovvkUB.js"),[])),wr=R.lazy(()=>vn(()=>import("./Welcome-BU8aaKb1.js"),[])),dt={Home:"/",Editor:"/editor",DataCatalog:"/data-catalog",DataCatalogModels:"/data-catalog/models",Data:"/data",Lineage:"/lineage",LineageModels:"/lineage/models",Tests:"/tests",Audits:"/audits",Errors:"/errors",Plan:"/plan",NotFound:"/not-found"},Cv={plan:[Nr.plans]};function qC(n){const e=[{path:"*",element:dd(n.list)?U.jsx(Fn,{link:dt.Home,message:"Back To Main"}):U.jsx(Fn,{headline:"Empty"})},{path:dt.Home,element:U.jsx(li,{})},...[{path:dt.Editor,element:U.jsx(li,{content:U.jsx(BC,{})})},{path:dt.DataCatalog,element:U.jsx(li,{content:U.jsx(wh,{route:dt.DataCatalog})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data Catalog",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.DataCatalog,message:"Back To Data Catalog"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data Catalog",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.DataCatalog,message:"Back To Data Catalog"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(zC,{})})}]}]},{path:dt.Data,element:U.jsx(li,{content:U.jsx(wh,{route:dt.Data})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Data,message:"Back To Data"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Data",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Data,message:"Back To Data"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(HC,{})})}]}]},{path:dt.Lineage,element:U.jsx(li,{content:U.jsx(wh,{route:dt.Lineage})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Lineage",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Lineage,message:"Back To Lineage"})},{path:"models",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to the Lineage",tagline:"Here you can find all the information about the models and their fields."})},{path:"*",element:U.jsx(Fn,{link:dt.Lineage,message:"Back To Lineage"})},{path:":modelName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(WC,{})})}]}]},{path:dt.Errors,element:U.jsx(li,{content:U.jsx(QC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to errors report",tagline:"Here you can see all the errors that occurred."})},{path:"*",element:U.jsx(Fn,{link:dt.Errors,message:"Back To Errors"})},{path:":id",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(KC,{})})}]},{path:dt.Plan,element:U.jsx(li,{content:U.jsx(UC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to plan",tagline:"Here you can run the plan and apply the changes."})},{path:"*",element:U.jsx(Fn,{link:dt.Plan,message:"Back To Plan"})},{path:"environments",children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to plan",tagline:"Here you can run the plan and apply the changes."})},{path:"*",element:U.jsx(Fn,{link:dt.Plan,message:"Back To Plan"})},{path:":environmentName",element:U.jsx(R.Suspense,{fallback:U.jsx("div",{className:"flex justify-center items-center w-full h-full",children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:"Loading Content..."})]})}),children:U.jsx(jC,{})})}]}]},{path:dt.Tests,element:U.jsx(li,{content:U.jsx($C,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to tests report",tagline:"Here you can run tests and see the results."})},{path:"*",element:U.jsx(Fn,{link:dt.Tests,message:"Back To Tests"})}]},{path:dt.Audits,element:U.jsx(li,{content:U.jsx(VC,{})}),children:[{index:!0,element:U.jsx(wr,{headline:"Welcome to audits report",tagline:"Here you can run audits and see the results."})},{path:"*",element:U.jsx(Fn,{link:dt.Audits,message:"Back To Audits"})}]}].filter(t=>{var a;const s=t.path.replace("/","");return Zt(Cv[s])?n.list.includes(s):(a=Cv[s])==null?void 0:a.some(u=>n.list.includes(u))})].filter(Boolean);return DE(e,{basename:HS()})}const Qt={API:"api",General:"general",RunPlan:"run-plan",ApplyPlan:"apply-plan",CancelPlan:"cancel-plan",Environments:"environments",Models:"models",Fetchdf:"fetchdf",EvaluateModel:"evaluate-model",RenderQuery:"render-query",ColumnLineage:"column-lineage",ModelLineage:"model-lineage",Meta:"meta",Modules:"modules",FileExplorer:"file-explorer",Table:"table",TableDiff:"table-diff",SaveFile:"save-file"},WS=R.createContext({errors:new Set,addError:()=>({removeError:()=>{},error:{}}),removeError:()=>{},clearErrors:()=>{}});function YC({children:n}){const[e,t]=R.useState(new Set);function s(d,f){const p={id:Sh(),key:d,status:f.status,timestamp:f.timestamp??Date.now(),message:f.message,description:f.description,type:f.type,origin:f.origin,trigger:f.trigger,stack:f.stack,traceback:f.traceback};return t(m=>new Set(m.add(p))),{removeError:()=>a(p),error:p}}function a(d){t(f=>(f.forEach(p=>{(p===d||p.key===d)&&f.delete(p)}),new Set(f)))}function u(){t(new Set)}return U.jsx(WS.Provider,{value:{errors:e,addError:s,removeError:a,clearErrors:u},children:n})}function Tp(){return R.useContext(WS)}const QS=60*1e3,GC=5*QS,vd=10*QS;function JC(n){return ln({queryKey:["/api/modules"],queryFn:TC,enabled:!0},{...n,errorKey:Qt.Modules,trigger:"API -> useApiModules"})}function jO(n){return ln({queryKey:["/api/meta"],queryFn:PC,enabled:!0},{...n,errorKey:Qt.Meta,trigger:"API -> useApiMeta"})}function zO(n){return ln({queryKey:["/api/models"],queryFn:AC},{...n,errorKey:Qt.Models,trigger:"API -> useApiModels"})}function $O(n,e){return ln({queryKey:["/api/models",n],queryFn:async({signal:t})=>await kC(n,{signal:t})},{...e,errorKey:Qt.Models,trigger:"API -> useApiModel"})}function VO(n){return ln({queryKey:["/api/files"],queryFn:xC},{...n,errorKey:Qt.FileExplorer,trigger:"API -> useApiFiles"})}function HO(n,e){return ln({queryKey:["/api/files",n],queryFn:async({signal:t})=>await DC(n,{signal:t})},{...e,errorKey:Qt.FileExplorer,trigger:"API -> useApiFileByPath"})}function WO(n,e){return ln({queryKey:["/api/lineage",n],queryFn:async({signal:t})=>await LC(n,{signal:t})},{...e,errorKey:Qt.ModelLineage,trigger:"API -> useApiModelLineage"})}function QO(n,e,t,s){return ln({queryKey:["/api/lineage",n,e],queryFn:async({signal:a})=>await MC(n,e,s,{signal:a})},{...t,errorKey:Qt.ColumnLineage,trigger:"API -> useApiColumnLineage"})}function KO(n){return ln({queryKey:["/api/environments"],queryFn:FC},{...n,errorKey:Qt.Environments,trigger:"API -> useApiEnvironments"})}function qO(n){return ln({queryKey:["/api/commands/apply"],queryFn:RC},{...n,errorKey:Qt.CancelPlan,trigger:"API -> useApiCancelPlan"})}function YO(n,e,t){return ln({queryKey:["/api/plan",n],async queryFn({signal:s}){return await OC({environment:n,plan_dates:e==null?void 0:e.planDates,plan_options:e==null?void 0:e.planOptions,categories:e==null?void 0:e.categories},{signal:s})}},{...t,errorKey:Qt.RunPlan,trigger:"API -> useApiPlanRun"})}function GO(n,e,t){return ln({queryKey:["/api/commands/apply",n],async queryFn({signal:s}){return await _C({environment:n,plan_dates:e==null?void 0:e.planDates,plan_options:e==null?void 0:e.planOptions,categories:e==null?void 0:e.categories},{signal:s})}},{...t,errorKey:Qt.ApplyPlan,trigger:"API -> useApiPlanApply"})}function JO(n,e){return ln({queryKey:["/api/commands/fetchd"],queryFn:async({signal:t})=>await IC(n,{signal:t})},{...e,errorKey:Qt.Fetchdf,trigger:"API -> useApiFetchdf",delay:vd})}function XO(n,e){return ln({queryKey:["/api/commands/render"],queryFn:async({signal:t})=>await EC(n,{signal:t})},{...e,errorKey:Qt.RenderQuery,trigger:"API -> useApiRender",delay:vd})}function ZO(n,e){return ln({queryKey:["/api/commands/table_diff"],queryFn:async({signal:t})=>await NC(n,{signal:t})},{...e,errorKey:Qt.TableDiff,trigger:"API -> useApiTableDiff",delay:vd})}function eR(n,e){return ln({queryKey:["/api/commands/evaluate"],queryFn:async({signal:t})=>await bC(n,{signal:t})},{...e,errorKey:Qt.EvaluateModel,trigger:"API -> useApiEvaluate",delay:vd})}function tR(n){const{addError:e}=Tp();return Ob({mutationFn:async({path:t,body:s})=>await CC(t,s),onError(t){e(Qt.SaveFile,t)},async onMutate({path:t}){await n.cancelQueries({queryKey:["/api/files",t]})}})}function ln(n,{delay:e=GC,removeTimeoutErrorAfter:t,errorKey:s=Qt.API,trigger:a}){const u=n.queryKey.join(" -> "),d=rp(),{addError:f}=Tp(),[p,m]=R.useState(!1);let g,v=function(){console.log(`[REQUEST TIMEOUT] ${u} id: ${String(g)} timed out after ${e}ms`);const{removeError:q}=f(s,{message:"Request timed out",description:`Request ${u} with timeoutId: ${String(g)} timed out after ${e}ms`,timestamp:Date.now(),origin:"useQueryTimeout",trigger:a});m(!0),x(),yn(t)&&setTimeout(()=>q(),t)};function w(){console.log(`[CLEAR TIMEOUT] ${u} id: ${String(g)} at ${Date.now()}`),clearTimeout(g),g=void 0,v=void 0}function _(){g=setTimeout(()=>{v==null||v()},e),console.log(`[START TIMEOUT] ${u} id: ${String(g)} at ${Date.now()}`)}function x(){w(),d.cancelQueries({queryKey:n.queryKey}),console.log(`[REQUEST CANCELED] ${u} at ${Date.now()}`)}function L(z){w(),mc(z)||z.name==="AbortError"?console.log(`[REQUEST ABORTED] ${u} aborted by React Query at ${Date.now()}`):(console.log(`[REQUEST FAILED] ${u} failed at ${Date.now()}`),f(s,z))}function N(){w(),console.log(`[REQUEST COMPLETED] ${u} completed at ${Date.now()}`)}async function k(...z){return _(),n.queryFn(...z)}const J=Cb({gcTime:0,enabled:!1,queryKey:n.queryKey,queryFn:k,meta:{...n.meta,onError:L,onSuccess:N}});return{...J,refetch:async(...z)=>new Promise(q=>{J.refetch(...z,{throwOnError:!0}).then(q).catch(ee=>ee)}),cancel:x,isTimeout:p}}class KS{constructor(e){Ct(this,"_initial");Ct(this,"isModel",!0);Zt(e)?this._initial=Object.assign({id:Sh()}):this._initial=yn(e==null?void 0:e.id)?e:new Proxy(Object.assign(e??{},{id:Sh()}),{set(){throw new Error("Cannot change initial file")}})}get initial(){return this._initial}get id(){return this.initial.id}}class Ov extends KS{constructor(t=[]){super();Ct(this,"modules",new Set);this.modules=new Set(t)}get list(){return Array.from(this.modules)}get isEmpty(){return this.modules.size===0}get hasErrors(){return this.modules.has(Nr.errors)}get hasEditor(){return this.modules.has(Nr.editor)}get hasFiles(){return this.modules.has(Nr.files)}get hasProjectEditor(){return this.hasEditor&&this.hasFiles}get hasOnlyProjectEditor(){return this.modules.size===2&&this.hasProjectEditor}get hasOnlyDataCatalog(){return this.modules.size===1&&this.hasDataCatalog}get hasProjectEditorAndModule(){return this.modules.size===3&&this.hasProjectEditor&&hs(this.hasErrors)}get hasDataCatalog(){return this.modules.has(Nr["data-catalog"])}get hasPlans(){return this.modules.has(Nr.plans)}get hasOnlyPlans(){return this.modules.size===1&&this.hasPlans}get hasOnlyPlansAndErrors(){return this.modules.size===2&&this.hasPlans&&this.hasErrors}get hasTests(){return this.modules.has(Nr.tests)}get hasAudits(){return this.modules.has(Nr.audits)}get hasData(){return this.modules.has(Nr.data)}get hasLineage(){return this.modules.has(Nr.lineage)}get hasModuleAndErrors(){return this.hasErrors&&(this.modules.size===2||this.modules.size===3&&this.hasProjectEditor)}get hasSingleModule(){return this.modules.size===1}get showModuleNavigation(){return this.isEmpty||this.hasSingleModule||this.hasOnlyProjectEditor||this.hasModuleAndErrors||this.hasOnlyDataCatalog?!1:this.hasProjectEditorAndModule?!0:hs(this.isEmpty)}get showHistoryNavigation(){return this.hasOnlyProjectEditor||this.hasModuleAndErrors||this.hasOnlyDataCatalog?!1:this.hasProjectEditorAndModule||this.hasDataCatalog?!0:hs(this.isEmpty)}get showNavigation(){return this.hasErrors||this.hasPlans||this.showHistoryNavigation}update(t=[]){this.modules=new Set(t)}defaultNavigationRoute(){return this.hasEditor?dt.Editor:this.hasPlans?dt.Plan:this.hasDataCatalog?dt.DataCatalog:dt.NotFound}}class XC extends KS{constructor(t){super(t!=null&&t.isModel?t.initial:{...t,dialect:(t==null?void 0:t.dialect)??"Default",columns:(t==null?void 0:t.columns)??[],details:(t==null?void 0:t.details)??{}});Ct(this,"_details",{});Ct(this,"_detailsIndex","");Ct(this,"name");Ct(this,"fqn");Ct(this,"path");Ct(this,"full_path");Ct(this,"dialect");Ct(this,"type");Ct(this,"columns");Ct(this,"default_catalog");Ct(this,"description");Ct(this,"sql");Ct(this,"definition");Ct(this,"hash");this.name=encodeURI(this.initial.name),this.fqn=encodeURI(this.initial.fqn),this.default_catalog=this.initial.default_catalog,this.path=this.initial.path,this.full_path=this.initial.full_path,this.dialect=this.initial.dialect,this.description=this.initial.description,this.sql=this.initial.sql,this.definition=this.initial.definition,this.columns=this.initial.columns??[],this.type=this.initial.type,this.hash=this.initial.hash,this.details=this.initial.details??{}}get defaultCatalog(){return this.default_catalog}get details(){return this._details}set details(t){const s=[];for(const a of Object.values(t))dd(a)?a.forEach(u=>{s.push(...Object.values(u))}):s.push(a);this._details=t,this._detailsIndex=s.join(" ")}get index(){return[this.displayName,this.path,this.type,...this.columns.map(t=>Object.values(t)).flat(),this._detailsIndex,this.dialect,this.description].filter(Boolean).join(" ").toLowerCase()}get isModelPython(){return this.type===pc.python}get isModelSQL(){return this.type===pc.sql}get isModelSeed(){return this.type===pc.seed}get isModelExternal(){return this.type===pc.external}get displayName(){return decodeURI(this.name)}update(t={}){for(const[s,a]of Object.entries(t))s==="columns"?this.columns=a:s==="details"?this.details=a:s==="name"?this.name=encodeURI(a):s==="fqn"?this.fqn=encodeURI(a):s==="type"?this.type=a:s==="default_catalog"?this.default_catalog=a:s==="description"?this.description=a:s in this&&(this[s]=a)}}const Rv=n=>{let e;const t=new Set,s=(m,g)=>{const v=typeof m=="function"?m(e):m;if(!Object.is(v,e)){const w=e;e=g??(typeof v!="object"||v===null)?v:Object.assign({},e,v),t.forEach(_=>_(e,w))}},a=()=>e,f={setState:s,getState:a,getInitialState:()=>p,subscribe:m=>(t.add(m),()=>t.delete(m))},p=e=n(s,a,f);return f},ZC=n=>n?Rv(n):Rv,eO=n=>n;function tO(n,e=eO){const t=Zs.useSyncExternalStore(n.subscribe,()=>e(n.getState()),()=>e(n.getInitialState()));return Zs.useDebugValue(t),t}const Fv=n=>{const e=ZC(n),t=s=>tO(e,s);return Object.assign(t,e),t},nO=n=>n?Fv(n):Fv,gl={Empty:"",Prod:"prod"},vi={Local:"local",Remote:"remote"},[Mv,rO]=Xv("profile");class on{constructor(e,t,s=gl.Prod,a=!1,u=!1){Ct(this,"_initial");Ct(this,"_type");Ct(this,"_createFrom");Ct(this,"_isPinned",!1);Ct(this,"_isDefault",!1);Ct(this,"isModel",!0);this._initial=e,this._type=t??vi.Local,this._createFrom=this._isDefault?gl.Empty:s,this._isPinned=a,this._isDefault=u}get id(){return this._initial.plan_id??""}get name(){return this._initial.name??gl.Empty}get type(){return this._type}get createFrom(){return this._createFrom}get isProd(){return this.name===gl.Prod}get isDefault(){return this._isDefault}set isDefault(e){this._isDefault=e}get isPinned(){return this._isPinned||this.isDefault||this.isProd}set isPinned(e){this._isPinned=e}get isInitial(){var e;return Rl((e=this._initial)==null?void 0:e.plan_id)}get isLocal(){return this._type===vi.Local}get isRemote(){return this._type===vi.Remote}get isSyncronized(){return this.isRemote&&hs(this.isInitial)}get isInitialProd(){return this.isInitial&&this.isProd}setType(e){this._type=e}setCreatedFrom(e){this._createFrom=e}update(e){this._initial=e}static save({environment:e,environments:t}){const s={};yn(e)&&(s.environment={name:e.name,plan_id:e.id,type:e.type,createFrom:e.createFrom,isPinned:e.isPinned,isDefault:e.isDefault}),yn(t)&&(s.environments=on.getOnlyLocal(t).map(a=>({name:a.name,plan_id:a.id,type:a.type,createFrom:a.createFrom,isPinned:a.isPinned,isDefault:a.isDefault}))),rO(s)}static getOnlyLocal(e=[]){return e.filter(t=>hs(Rl(t.name))&&t.isLocal)}static getOnlyRemote(e=[]){return e.filter(t=>hs(Rl(t.name))&&t.isRemote)}static getEnvironment(){const{environment:e}=Mv()??{};if(Zt(e))return;const{name:t,plan_id:s,type:a,createFrom:u,isPinned:d,isDefault:f}=e;return new on({name:t,plan_id:s},a,u,d,f)}static getEnvironments(){const e=Mv(),t=new Map;yn(e)&&yn(e.environment)&&t.set(e.environment.name,e.environment),yn(e)&&yn(e.environments)&&e.environments.forEach(a=>t.set(a.name,a));const s=[];return Array.from(t.entries()).forEach(([a,u])=>{s.push(new on({name:a,plan_id:u.plan_id},u.type,u.createFrom,u.isPinned,u.isDefault))}),Gv(s)&&s.push(new on({name:gl.Prod},vi.Local)),s}static sort(e){return e.sort(t=>t.isRemote?-1:1),e}}const Lv="prod",qS=new Set(on.getEnvironments()),Av=on.getEnvironment()??qS.values().next().value,kv=nO((n,e)=>({version:void 0,modules:new Ov,splitPaneSizes:[20,80],showConfirmation:!1,confirmations:[],environment:Av,environments:qS,initialStartDate:void 0,initialEndDate:void 0,models:new Map,lastSelectedModel:void 0,setLastSelectedModel(t){n(()=>({lastSelectedModel:t}))},setModules(t){n(()=>({modules:new Ov(t.list)}))},isModel(t){return e().models.has(t)},setSplitPaneSizes(t){n(()=>({splitPaneSizes:t}))},setVersion(t){n(()=>({version:t}))},setShowConfirmation(t){n(()=>({showConfirmation:t}))},addConfirmation(t){n(s=>(s.confirmations.push(t),{confirmations:Array.from(s.confirmations)}))},removeConfirmation(){const t=e();t.confirmations.shift(),n(()=>({confirmations:Array.from(t.confirmations)}))},setModels(t=[]){const s=e();n(()=>({models:t.reduce((a,u)=>{const d=new XC(u);let f=s.models.get(d.path)??s.models.get(d.name)??s.models.get(d.fqn);return Zt(f)?f=d:f.update(u),a.set(f.name,f),a.set(f.fqn,f),a.set(f.path,f),a},new Map)}))},getNextEnvironment(){return e().environments.values().next().value??Av},isExistingEnvironment(t){const s=e();if(t.isModel)return s.environments.has(t);let a=!1;return s.environments.forEach(u=>{u.name===t&&(a=!0)}),a},setEnvironment(t){n(()=>(on.save({environment:t}),{environment:t}))},addLocalEnvironment(t,s=Lv){n(a=>{if(Rl(t))return a;const u=new on({name:t},vi.Local,s);return a.environments.add(u),a.setEnvironment(u),on.save({environments:Array.from(a.environments)}),{environments:new Set(a.environments)}})},removeLocalEnvironment(t){n(s=>(s.environments.delete(t),on.save({environments:Array.from(s.environments)}),{environments:new Set(s.environments)}))},addRemoteEnvironments(t=[],s,a=[]){n(u=>{const d=Array.from(u.environments);t.forEach(_=>{let x=d.find(({name:L})=>_.name===L);Zt(x)?(x=new on(_,vi.Remote),d.push(x)):(x.update(_),x.setType(vi.Remote)),u.environment.name===_.name&&u.environment.update(_),x.isInitial&&x.isDefault&&u.setEnvironment(x)}),a.forEach(_=>{const x=d.find(({name:L})=>_===L);Zt(x)?d.push(new on({name:_},vi.Local,void 0,!0)):x.isPinned=!0});const f=on.getEnvironment();let p,m,g;d.forEach(_=>{switch(_.name){case Lv:p=_;break;case(f==null?void 0:f.name):m=_;break;case s:_.isDefault=!0,g=_}});const v=u.environment??m??g,w=B1(p==null?void 0:p.isInitial)?p:v;return on.save({environments:d,environment:w}),on.sort(d),{environment:w,environments:new Set(d)}})},hasRemoteEnvironments(){const t=e();return Array.from(t.environments).some(({type:s})=>s===vi.Remote)}}));function Pv({children:n,className:e}){return U.jsx("div",{className:qr("flex justify-center items-center w-full h-full",e),children:U.jsxs(Bo,{className:"inline-block",children:[U.jsx($s,{className:"w-3 h-3 border border-neutral-10 mr-4"}),U.jsx("h3",{className:"text-md",children:n})]})})}const YS=!!(window.__IS_HEADLESS__??!1),Tv=YS?void 0:R.lazy(()=>vn(()=>import("./Header-BmTHO2La.js"),[])),Nv=YS?void 0:R.lazy(()=>vn(()=>import("./Footer-C2z0sLXN.js"),[]));function iO(){const{addError:n}=Tp(),e=kv(f=>f.modules),t=kv(f=>f.setModules),{refetch:s,cancel:a,isFetching:u}=JC();R.useEffect(()=>(s().then(({data:f})=>{e.update(f),t(e)}).catch(f=>n(Qt.Modules,f)),()=>{a()}),[]);const d=qC(e);return U.jsxs(U.Fragment,{children:[yn(Tv)&&U.jsxs(U.Fragment,{children:[U.jsx(Tv,{}),U.jsx(Gg,{})]}),U.jsx("main",{className:"h-full overflow-hidden relative",children:u?U.jsx(Pv,{className:"absolute w-full h-full bg-theme z-10",children:"Building Modules..."}):U.jsx(R.Suspense,{fallback:U.jsx(Pv,{children:"Loading Page..."}),children:dd(e.list)?U.jsx(ZI,{router:d}):U.jsx(Fn,{description:"No Modules Found"})})}),yn(Nv)&&U.jsxs(U.Fragment,{children:[U.jsx(Gg,{}),U.jsx(Nv,{})]})]})}const sO=new cb({queryCache:new u0({onError(n,e){e.meta.onError(n)},onSuccess(n,e){e.meta.onSuccess()}}),defaultOptions:{queries:{networkMode:"always",refetchOnWindowFocus:!1,retry:!1,staleTime:1/0}}});Y1.createRoot(oO()).render(U.jsx(Zs.StrictMode,{children:U.jsx(mb,{client:sO,children:U.jsx($1,{children:U.jsx(YC,{children:U.jsx(iO,{})})})})}));function oO(){const n="root";let e=document.getElementById(n);if(yn(e))return e;const t=document.body,s=t.children[0];return e=document.createElement("div"),e.id=n,e.className="h-full w-full flex flex-col justify-start",s instanceof HTMLElement?t.insertBefore(e,s):t.appendChild(e),e}export{KS as $,PO as A,FO as B,cO as C,Gv as D,To as E,Qt as F,U0 as G,Gg as H,Rl as I,kO as J,vO as K,Bo as L,on as M,RE as N,DO as O,yO as P,xO as Q,Zs as R,$s as S,WE as T,Fn as U,bO as V,fO as W,j0 as X,RO as Y,UO as Z,vn as _,kv as a,nO as a0,qv as a1,Yv as a2,$O as a3,mO as a4,XO as a5,eR as a6,Pv as a7,_O as a8,dO as a9,OO as aA,WO as aB,U1 as aa,NO as ab,CC as ac,TO as ad,BO as ae,ZO as af,JO as ag,IC as ah,lO as ai,Xh as aj,SO as ak,CO as al,rp as am,HO as an,tR as ao,wO as ap,hO as aq,QO as ar,pc as as,uO as at,Jg as au,MO as av,LO as aw,Q1 as ax,Xv as ay,Sh as az,hs as b,qr as c,Tp as d,dt as e,B1 as f,dd as g,KO as h,yn as i,U as j,YO as k,Tt as l,ft as m,pO as n,GO as o,qO as p,gO as q,R as r,kI as s,zO as t,IO as u,Zt as v,HS as w,io as x,jO as y,VO as z};
|