var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var ee=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ae(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?ae(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u{n.exports=t()})),r=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var ee=!1,S=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-tet&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():ee=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(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)}}n(),t.exports=a()})),s=e((e=>{var t=i(),r=n(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1me||(e.current=pe[me],pe[me]=null,me--)}function D(e,t){me++,pe[me]=e.current,e.current=t}var ge=he(null),_e=he(null),ve=he(null),ye=he(null);function be(e,t){switch(D(ve,t),D(_e,e),D(ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}E(ge),D(ge,e)}function xe(){E(ge),E(_e),E(ve)}function Se(e){e.memoizedState!==null&&D(ye,e);var t=ge.current,n=Hd(t,e.type);t!==n&&(D(_e,e),D(ge,n))}function Ce(e){_e.current===e&&(E(ge),E(_e)),ye.current===e&&(E(ye),Qf._currentValue=fe)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1)`:-1i||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{De=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),bn=!1;if(yn)try{var xn={};Object.defineProperty(xn,`passive`,{get:function(){bn=!0}}),window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=null,Cn=null,wn=null;function Tn(){if(wn)return wn;var e,t=Cn,n=t.length,r,i=`value`in Sn?Sn.value:Sn.textContent,a=i.length;for(e=0;e=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=Tn(),wn=Cn=Sn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kt(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=yn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Kt(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Nr(Hr,r)||(Hr=r,r=Dd(Vr,`onSelect`),0>=o,i-=o,Ii=1<<32-Je(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),A&&Ri(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),A&&Ri(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return A&&Ri(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),A&&Ri(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Ia(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ua(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=Ci(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=Si(a.type,a.key,a.props,null,e.mode,c),Ua(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ei(a,e.mode,c),c.return=e,e=c}return o(e);case ie:return a=Ia(a),b(e,r,a,c)}if(de(a))return h(e,r,a,c);if(ce(a)){if(l=ce(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Ha(a),c);if(a.$$typeof===S)return b(e,r,da(e,a),c);Wa(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=wi(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{Va=0;var i=b(e,t,n,r);return Ba=null,i}catch(t){if(t===Aa||t===Ma)throw t;var a=vi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ka=Ga(!0),qa=Ga(!1),Ja=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=hi(e),mi(e,null,n),t}return di(e,r,t,n),hi(e)}function $a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function eo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var to=!1;function no(){if(to){var e=xa;if(e!==null)throw e}}function ro(e,t,n,r){to=!1;var i=e.updateQueue;Ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(K&f)===f:(r&f)===f){f!==0&&f===ba&&(to=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ja=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function io(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function ao(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=w.T,s={};w.T=s,Bs(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,wa(c,r),mu(e)):zs(e,t,r,mu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{T.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=js(e).queue;Os(e,i,t,fe,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},mu())}function Ns(){return ua(Qf)}function Ps(){return L().memoizedState}function Fs(){return L().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Za(n);var r=Qa(t,e,n);r!==null&&(gu(r,t,n),$a(r,t,n)),t={cache:ga()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=fi(e,t,n,r),n!==null&&(gu(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,mu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return di(e,t,i,0),W===null&&ui(),!1}catch{}if(n=fi(e,t,i,r),n!==null)return gu(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(s(479))}else t=fi(e,n,r,2),t!==null&&gu(t,e,2)}function Vs(e){var t=e.alternate;return e===N||t!==null&&t===N}function Hs(e,t){So=xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Ws={readContext:ua,use:zo,useCallback:I,useContext:I,useEffect:I,useImperativeHandle:I,useLayoutEffect:I,useInsertionEffect:I,useMemo:I,useReducer:I,useRef:I,useState:I,useDebugValue:I,useDeferredValue:I,useTransition:I,useSyncExternalStore:I,useId:I,useHostTransitionStatus:I,useFormState:I,useActionState:I,useOptimistic:I,useMemoCache:I,useCacheRefresh:I};Ws.useEffectEvent=I;var Gs={readContext:ua,use:zo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:ua,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(Co){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(Co){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,N,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,N,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Io(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,N,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=N,i=Io();if(A){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),W===null)throw Error(s(349));K&127||Ko(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,hs(Jo.bind(null,r,a,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,a,n,t),null),n},useId:function(){var e=Io(),t=W.identifierPrefix;if(A){var n=Li,r=Ii;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=wo++,0<\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[_t]=t,a[vt]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch($(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return z(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ve.current,Xi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ui,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||qi(t,!0)}else e=Bd(e).createTextNode(r),e[_t]=t,t.stateNode=e}return z(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Xi(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;z(t),e=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vo(t),t):(vo(t),null);if(t.flags&128)throw Error(s(558))}return z(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;z(t),i=!1}else i=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(vo(t),t):(vo(t),null)}return vo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),z(t),null);case 4:return xe(),e===null&&Cd(t.stateNode.containerInfo),z(t),null;case 10:return ia(t.type),z(t),null;case 19:if(E(M),r=t.memoizedState,r===null)return z(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Hc(r,!1);else{if(J!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=yo(e),a!==null){for(t.flags|=128,Hc(r,!1),e=a.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xi(n,e),n=n.sibling;return D(M,M.current&1|2),A&&Ri(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>ru&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304)}else{if(!i)if(e=yo(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!A)return z(t),null}else 2*Ie()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(z(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=M.current,D(M,i?n&1|2:n&1),A&&Ri(t,r.treeForkCount),e);case 22:case 23:return vo(t),uo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(z(t),t.subtreeFlags&6&&(t.flags|=8192)):z(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&E(Ea),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ia(j),z(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Wc(e,t){switch(Vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(j),xe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 31:if(t.memoizedState!==null){if(vo(t),t.alternate===null)throw Error(s(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return E(M),null;case 4:return xe(),null;case 10:return ia(t.type),null;case 22:case 23:return vo(t),uo(),e!==null&&E(Ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(j),null;case 25:return null;default:return null}}function Gc(e,t){switch(Vi(t),t.tag){case 3:ia(j),xe();break;case 26:case 27:case 5:Ce(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&vo(t);break;case 13:vo(t);break;case 19:E(M);break;case 10:ia(t.type);break;case 22:case 23:vo(t),uo(),e!==null&&E(Ea);break;case 24:ia(j)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){X(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){X(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){X(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ao(t,n)}catch(t){X(e,e.return,t)}}}function Yc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){X(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){X(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){X(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){X(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){X(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[vt]=t}catch(t){X(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);$(t,r,n),t[_t]=e,t[vt]=n}catch(t){X(e,e.return,t)}}var al=!1,B=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,V=null;function cl(e,t){if(e=e.containerInfo,Rd=sp,e=Lr(e),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,V=t;V!==null;)if(t=V,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,V=e;else for(;V!==null;){switch(t=V,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),$(a,r,n),a[_t]=e,O(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;cg&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,w.T=null,n=uu,uu=null;var a=ou,o=cu;if(Y=0,su=ou=null,cu=0,U&6)throw Error(s(331));var c=U;if(U|=4,Ll(a.current),kl(a,a.current,o,n),U=c,ad(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,a)}catch{}return!0}finally{T.p=i,w.T=r,Hu(e,t)}}function Gu(e,t,n){t=Oi(n,t),t=ic(e.stateNode,t,2),e=Qa(e,t,2),e!==null&&(st(e,2),id(e))}function X(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=Oi(n,e),n=ac(2),r=Qa(t,n,2),r!==null&&(oc(n,r,t,e),st(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Vl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,W===e&&(K&n)===n&&(J===4||J===3&&(K&62914560)===K&&300>Ie()-tu?!(U&2)&&Cu(e,0):Yl|=n,Zl===K&&(Zl=0)),id(e)}function Ju(e,t){t===0&&(t=at()),e=pi(e,t),e!==null&&(st(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return Me(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=K,a=nt(r,r===W?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Gd()&&(e=rd);for(var t=Ie(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}Y!==0&&Y!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),$(t,`link`,e),O(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),$(t,`link`,e),O(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),$(r,`link`,e),O(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=kt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);O(c),$(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=kt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),O(a),$(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=kt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),O(a),$(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ve.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=kt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=kt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=kt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+Jt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),$(t,`link`,n),O(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Jt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,O(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),O(r),$(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,O(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),O(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),$(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,O(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),O(i),$(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,O(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),O(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),$(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{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)}}n(),t.exports=s()})),l=n(),u=c(),d=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=e(((e,t)=>{t.exports=d()}))();function p(){return(0,f.jsxs)(`div`,{className:`sticky top-0 z-50`,children:[(0,f.jsx)(`header`,{className:`bg-surface border-b border-border px-6 h-[60px] flex items-center`,children:(0,f.jsxs)(`div`,{className:`max-w-[1280px] mx-auto w-full flex items-center gap-3`,children:[(0,f.jsx)(`img`,{src:`/logo.png`,alt:`APIlot Logo`,className:`w-9 h-9 rounded-[9px] object-cover shrink-0`}),(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h1`,{className:`font-display text-[15px] font-bold leading-tight tracking-[-0.01em]`,children:`APIlot: Read Less, Build More`}),(0,f.jsx)(`p`,{className:`text-[12px] text-text-muted font-normal`,children:`AI-Powered API Navigator. Paste any API doc URL to instantly extract endpoints and available fields.`})]})]})}),(0,f.jsxs)(`div`,{className:`border-b px-6 py-[6px] flex items-center justify-center gap-2`,style:{backgroundColor:`#fffbeb`,borderColor:`#fde68a`},children:[(0,f.jsx)(`svg`,{viewBox:`0 0 20 20`,fill:`currentColor`,className:`w-[14px] h-[14px] shrink-0`,style:{color:`#f59e0b`},children:(0,f.jsx)(`path`,{fillRule:`evenodd`,d:`M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.168 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})}),(0,f.jsxs)(`p`,{className:`text-[11.5px] font-medium`,style:{color:`#b45309`},children:[(0,f.jsx)(`span`,{className:`font-semibold`,children:`Demo Notice:`}),` Results may vary and may be truncated compared to the video demo due to different LLM infrastructure.`]})]})]})}function m({onScan:e,isLoading:t,error:n,loadingMessage:r}){let[i,a]=(0,l.useState)(``);return(0,f.jsxs)(`div`,{className:`bg-surface border border-border rounded p-[18px] shadow-[0_1px_3px_rgba(0,0,0,0.04)]`,children:[(0,f.jsx)(`label`,{htmlFor:`url-input`,className:`block text-[13px] font-medium text-text mb-[10px]`,children:`API Documentation URL`}),(0,f.jsxs)(`form`,{className:`flex gap-2`,onSubmit:t=>{t&&t.preventDefault(),e(i)},children:[(0,f.jsxs)(`div`,{className:`relative flex-1`,children:[(0,f.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`absolute left-[11px] top-1/2 -translate-y-1/2 w-[15px] h-[15px] text-text-muted pointer-events-none`,children:[(0,f.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,f.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,f.jsx)(`input`,{id:`url-input`,type:`url`,className:`w-full py-[9px] px-[12px] pl-[34px] border border-border-strong rounded-sm bg-[#f9f9f8] font-sans text-[13.5px] text-text outline-none transition-all duration-150 placeholder:text-[#aaa] focus:border-accent focus:shadow-[0_0_0_3px_rgba(79,70,229,0.12)] focus:bg-white`,placeholder:`https://api.example.com/docs`,autoComplete:`off`,spellCheck:`false`,value:i,onChange:e=>a(e.target.value)})]}),(0,f.jsx)(`button`,{type:`submit`,disabled:t,className:`px-[18px] py-[9px] rounded-sm bg-accent text-white border-none cursor-pointer font-display text-[13.5px] font-semibold whitespace-nowrap transition-all duration-150 flex items-center gap-[6px] hover:bg-accent-hover active:scale-98 disabled:opacity-60 disabled:cursor-not-allowed disabled:transform-none`,children:t?(0,f.jsx)(`div`,{className:`w-[13px] h-[13px] border-2 border-white/30 border-t-white rounded-full animate-spin-slow`}):(0,f.jsx)(`span`,{children:`Scan Docs`})})]}),t&&r&&!n&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mt-3 p-[10px_14px] rounded-sm bg-accent-light border border-accent/20 text-accent text-[13px] animate-fade-in font-medium flex items-center gap-2`,children:[(0,f.jsx)(`div`,{className:`w-3 h-3 border-2 border-accent/30 border-t-accent rounded-full animate-spin-slow`}),r]}),(0,f.jsx)(`p`,{className:`mt-2 text-[12px] text-text-muted text-center animate-fade-in`,style:{opacity:.7},children:`⏳ Please wait, result may take up to 2 minutes to show`})]}),n&&(0,f.jsx)(`div`,{className:`mt-3 p-[10px_14px] rounded-sm bg-[#fef2f2] border border-[#fecaca] text-[#dc2626] text-[13px] animate-fade-in`,children:n})]})}function h({baseUrl:e,endpoints:t,selectedIndex:n,onSelect:r}){let[i,a]=(0,l.useState)(!1);if(!t||t.length===0)return null;let o={GET:`bg-emerald-100 text-emerald-700`,POST:`bg-blue-100 text-blue-700`,PUT:`bg-amber-100 text-amber-700`,DELETE:`bg-rose-100 text-rose-700`,PATCH:`bg-purple-100 text-purple-700`};return(0,f.jsxs)(`div`,{className:`bg-surface border border-border rounded shadow-[0_1px_3px_rgba(0,0,0,0.04)] overflow-hidden`,children:[(0,f.jsxs)(`div`,{className:`p-[14px_18px] border-b border-border flex flex-col gap-1`,children:[(0,f.jsxs)(`h2`,{className:`font-display text-[13.5px] font-semibold flex items-center gap-2`,children:[(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-[15px] h-[15px] text-accent`,children:(0,f.jsx)(`polyline`,{points:`22 12 18 12 15 21 9 3 6 12 2 12`})}),`Select Endpoint`]}),e&&(0,f.jsxs)(`div`,{className:`text-[11.5px] text-text-muted font-mono flex items-center gap-1.5 opacity-80 mt-0.5`,children:[(0,f.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-[12px] h-[12px]`,children:[(0,f.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,f.jsx)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,f.jsx)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})]}),e]})]}),(0,f.jsx)(`div`,{className:`p-[10px]`,children:(i?t.map((e,t)=>({ep:e,idx:t})):[{ep:t[n],idx:n}]).map(({ep:e,idx:t})=>{if(!e)return null;let s=t===n,c=o[e.method]||`bg-gray-100 text-gray-700`;return(0,f.jsxs)(`button`,{onClick:()=>{s?a(!i):(r(t),a(!1))},className:`w-full text-left px-[14px] py-[10px] rounded-[6px] mb-1 last:mb-0 transition-all flex items-center justify-between gap-3 ${s?`bg-accent/5 ring-1 ring-accent/20`:`hover:bg-gray-50`}`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,f.jsx)(`span`,{className:`text-[10px] font-bold px-2 py-0.5 rounded-[4px] font-mono ${c}`,children:e.method}),(0,f.jsxs)(`div`,{className:`flex flex-col`,children:[(0,f.jsx)(`span`,{className:`text-[13.5px] font-medium ${s?`text-accent`:`text-text`}`,children:e.name}),(0,f.jsx)(`span`,{className:`text-[11px] text-text-muted font-mono mt-[2px]`,children:e.path})]})]}),(0,f.jsx)(`div`,{className:`text-text-muted flex shrink-0`,children:s?i?(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-4 h-4`,children:(0,f.jsx)(`polyline`,{points:`18 15 12 9 6 15`})}):(0,f.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-4 h-4`,children:(0,f.jsx)(`polyline`,{points:`6 9 12 15 18 9`})}):null})]},t)})})]})}function g({endpoint:e,payload:t,onPayloadChange:n,isLoading:r,hasScanned:i}){let a=e=>e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase()),o=(e,t,r)=>{n(e,t,r)},s=()=>(0,f.jsxs)(`div`,{className:`min-h-[300px] flex flex-col items-center justify-center text-center p-[40px_20px]`,children:[(0,f.jsx)(`div`,{className:`w-[52px] h-[52px] rounded-full bg-[#f0f0ee] flex items-center justify-center mb-4`,children:(0,f.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-[22px] h-[22px] text-[#aaa]`,children:[(0,f.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,f.jsx)(`polyline`,{points:`14 2 14 8 20 8`})]})}),(0,f.jsx)(`p`,{className:`font-medium text-text mb-1.5 text-[14px]`,children:`Awaiting API Schema...`}),(0,f.jsx)(`p`,{className:`text-[13px] text-text-muted max-w-[240px] leading-relaxed`,children:`Enter a documentation URL above and click Scan Docs to generate form fields.`})]}),c=()=>(0,f.jsx)(`div`,{className:`p-[18px]`,children:[1,2,3,4].map(e=>(0,f.jsxs)(`div`,{className:`flex flex-col mb-[14px]`,children:[(0,f.jsx)(`div`,{className:`skeleton-bg rounded-md h-[12px] w-[35%] mb-[5px] animate-shimmer`}),(0,f.jsx)(`div`,{className:`skeleton-bg rounded-md h-[36px] w-full animate-shimmer`})]},e))}),l=(e,n)=>{let r=t[e]?.[n.name],i=`w-full py-2 px-[11px] border border-border-strong rounded-sm bg-[#f9f9f8] font-sans text-[13.5px] text-text outline-none transition-all duration-150 focus:border-accent focus:shadow-[0_0_0_3px_rgba(79,70,229,0.1)] focus:bg-white`;return n.type===`boolean`?(0,f.jsxs)(`div`,{className:`flex items-center gap-[10px] flex-row mt-1`,children:[(0,f.jsx)(`input`,{id:`field-${e}-${n.name}`,type:`checkbox`,className:`w-4 h-4 cursor-pointer accent-accent`,checked:!!r,onChange:t=>o(e,n.name,t.target.checked)}),(0,f.jsx)(`label`,{htmlFor:`field-${e}-${n.name}`,className:`font-normal text-text-muted text-[13px] cursor-pointer`,children:n.description||a(n.name)})]}):n.type===`enum`&&n.enum?(0,f.jsxs)(`select`,{id:`field-${e}-${n.name}`,className:i,value:r||``,onChange:t=>o(e,n.name,t.target.value||void 0),children:[(0,f.jsxs)(`option`,{value:``,children:[`Select `,a(n.name),`...`]}),n.enum.map(e=>(0,f.jsx)(`option`,{value:e,children:e},e))]}):n.type===`textarea`?(0,f.jsx)(`textarea`,{id:`field-${e}-${n.name}`,className:`${i} resize-y min-h-[72px]`,placeholder:n.description||``,value:r||``,onChange:t=>o(e,n.name,t.target.value||void 0)}):(0,f.jsx)(`input`,{id:`field-${e}-${n.name}`,type:{number:`number`,date:`date`}[n.type]||`text`,className:i,placeholder:n.description||a(n.name),value:r||``,onChange:t=>{let r=n.type===`number`?t.target.value?Number(t.target.value):void 0:t.target.value||void 0;o(e,n.name,r)}})},u=(e,t,n)=>!t||t.length===0?null:(0,f.jsxs)(`div`,{className:`mb-6 last:mb-0`,children:[(0,f.jsx)(`h3`,{className:`font-display text-[12px] uppercase tracking-wider text-text-muted font-bold mb-3 border-b border-border pb-1`,children:e}),(0,f.jsx)(`div`,{className:`flex flex-col gap-[14px]`,children:t.map(e=>(0,f.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[e.type!==`boolean`&&(0,f.jsxs)(`label`,{htmlFor:`field-${n}-${e.name}`,className:`text-[12.5px] font-medium text-text flex items-center gap-[5px]`,children:[(0,f.jsx)(`span`,{children:a(e.name)}),e.required&&(0,f.jsx)(`span`,{className:`text-[10px] py-[1px] px-[5px] rounded-[4px] bg-[#fee2e2] text-[#dc2626] font-semibold`,children:`required`}),(0,f.jsx)(`span`,{className:`text-[10px] py-[1px] px-[5px] rounded-[4px] bg-accent-light text-accent font-medium font-mono`,children:e.type})]}),l(n,e)]},e.name))})]}),d=e?(e.headers?.length||0)+(e.pathParams?.length||0)+(e.queryParams?.length||0)+(e.bodyFields?.length||0):0;return(0,f.jsxs)(`div`,{className:`bg-surface border border-border rounded flex-1 overflow-hidden shadow-[0_1px_3px_rgba(0,0,0,0.04)] flex flex-col`,children:[(0,f.jsxs)(`div`,{className:`p-[14px_18px] border-b border-border flex items-center justify-between bg-[#fafafa]`,children:[(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`w-[15px] h-[15px] text-accent`,children:[(0,f.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,f.jsx)(`polyline`,{points:`14 2 14 8 20 8`}),(0,f.jsx)(`line`,{x1:`16`,y1:`13`,x2:`8`,y2:`13`}),(0,f.jsx)(`line`,{x1:`16`,y1:`17`,x2:`8`,y2:`17`}),(0,f.jsx)(`polyline`,{points:`10 9 9 9 8 9`})]}),(0,f.jsx)(`h2`,{className:`font-display text-[13.5px] font-semibold`,children:e?`Parameters: ${e.name}`:`Generated Form Fields`})]}),(0,f.jsxs)(`span`,{className:`text-[11.5px] py-[2px] px-[8px] rounded-full bg-[#f0f0ee] text-text-muted font-medium`,children:[d,` field`,d===1?``:`s`]})]}),(0,f.jsx)(`div`,{className:`flex-1 overflow-auto`,children:r?c():i?e?(0,f.jsxs)(`div`,{className:`p-[18px] animate-fade-in`,children:[u(`Headers`,e.headers,`headers`),u(`Path Parameters`,e.pathParams,`pathParams`),u(`Query Parameters`,e.queryParams,`queryParams`),u(`Body Payload`,e.bodyFields,`body`)]}):(0,f.jsx)(`div`,{className:`p-[18px] text-center text-text-muted text-[13px]`,children:`Please select an endpoint.`}):s()})]})}function _({baseUrl:e,endpoint:t,payload:n}){let[r,i]=(0,l.useState)(!1),[a,o]=(0,l.useState)(``),[s,c]=(0,l.useState)([]),[u,d]=(0,l.useState)(``);return(0,l.useEffect)(()=>{if(!t){o(`Awaiting endpoint selection...`),c([1]),d(``);return}let r=t.path,i=t.path;if(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=r.startsWith(`/`)?r:`/${r}`;r=`${t}${n}`,i=`${t}${n}`}if(n.pathParams&&Object.entries(n.pathParams).forEach(([e,t])=>{r=r.replace(`{${e}}`,t),i=i.replace(`{${e}}`,`\uE000${t}\uE001`)}),n.queryParams&&Object.keys(n.queryParams).length>0){let e=[],t=[];Object.entries(n.queryParams).forEach(([n,r])=>{r!==void 0&&r!==``&&(e.push(`${n}=${r}`),t.push(`${n}=\uE000${r}\uE001`))}),e.length>0&&(r+=`?${e.join(`&`)}`,i+=`?${t.join(`&`)}`)}let a=`${t.method} ${r}\n`,s=`${t.method} ${i}\n`;if(n.headers&&Object.keys(n.headers).length>0&&Object.entries(n.headers).forEach(([e,t])=>{t!==void 0&&t!==``&&(a+=`${e}: ${t}\n`,s+=`${e}: \uE000${t}\uE001\n`)}),t.bodyFields&&t.bodyFields.length>0&&[`POST`,`PUT`,`PATCH`].includes(t.method)){a+=` `,s+=` `;let e=JSON.stringify(n.body,null,2);a+=e,s+=e}d(a),c(a.split(` `).map((e,t)=>t+1));let l=s.replace(/&/g,`&`).replace(//g,`>`);l=l.replace(/^(GET|POST|PUT|DELETE|PATCH) (.*)$/m,(e,t,n)=>`${t} ${n}`),l=l.replace(/^([\w-]+):\s*(.*)$/gm,`$1: $2`),l=l.replace(/\uE000(.*?)\uE001/g,`$1`),l=l.replace(/"([^"]+)":/g,`"$1":`).replace(/: "([^"]*)"/g,`: "$1"`).replace(/: (true|false)/g,`: $1`).replace(/: null/g,`: null`).replace(/: (-?\d+\.?\d*)/g,`: $1`),o(l)},[t,n]),(0,f.jsxs)(`div`,{className:`bg-terminal-bg rounded border border-terminal-border overflow-hidden flex flex-col h-full max-h-full`,children:[(0,f.jsxs)(`div`,{className:`p-[11px_16px] bg-[#0a0c12] border-b border-terminal-border flex items-center gap-[12px]`,children:[(0,f.jsxs)(`div`,{className:`flex gap-[6px]`,children:[(0,f.jsx)(`div`,{className:`w-[11px] h-[11px] rounded-full bg-terminal-red`}),(0,f.jsx)(`div`,{className:`w-[11px] h-[11px] rounded-full bg-terminal-yellow`}),(0,f.jsx)(`div`,{className:`w-[11px] h-[11px] rounded-full bg-terminal-green`})]}),(0,f.jsx)(`div`,{className:`flex-1 text-center font-mono text-[12px] text-terminal-dim`,children:`http-request.txt`}),(0,f.jsx)(`button`,{onClick:()=>{u&&navigator.clipboard.writeText(u).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},className:`p-[4px_10px] rounded-[5px] bg-white/5 border text-terminal-dim font-mono text-[11px] cursor-pointer transition-all duration-150 flex items-center gap-[5px] hover:bg-white/10 hover:text-terminal-text ${r?`text-terminal-green border-terminal-green`:`border-white/10`}`,children:r?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,f.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),`Copied!`]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,f.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,f.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),`Copy`]})})]}),(0,f.jsxs)(`div`,{className:`flex-1 p-[18px] overflow-y-auto overflow-x-auto flex gap-0`,children:[(0,f.jsx)(`div`,{className:`select-none text-terminal-dim font-mono text-[13px] leading-[1.7] text-right pr-[16px] border-r border-terminal-border mr-[16px] min-w-[28px]`,children:s.map(e=>(0,f.jsx)(`div`,{children:e},e))}),(0,f.jsx)(`div`,{className:`font-mono text-[13px] leading-[1.7] text-terminal-text whitespace-pre flex-1`,dangerouslySetInnerHTML:{__html:a}})]}),(0,f.jsxs)(`div`,{className:`p-[8px_16px] bg-[#0a0c12] border-t border-terminal-border flex items-center justify-between font-mono text-[11px] text-terminal-dim`,children:[(0,f.jsx)(`span`,{className:`w-[100px]`,children:`UTF-8 · HTTP`}),(0,f.jsx)(`span`,{className:`flex-1 text-center text-white/40 hidden sm:block`,children:`APIlot is an AI and can make mistakes. Please double-check.`}),(0,f.jsx)(`span`,{className:`w-[100px] justify-end flex items-center gap-[5px] before:content-[''] before:inline-block before:w-[6px] before:h-[6px] before:rounded-full before:bg-terminal-green`,children:t?`Ready`:`Waiting`})]})]})}var v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ee=`https://spawny.app.n8n.cloud/webhook/5171fc1d-3fb6-4bfb-beff-55d620c55007`;function S(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)([]),[i,a]=(0,l.useState)(0),[o,s]=(0,l.useState)({headers:{},pathParams:{},queryParams:{},body:{}}),[c,u]=(0,l.useState)(!1),[d,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(``),S=e=>{let t={headers:{},pathParams:{},queryParams:{},body:{}},n=(e,t)=>{e&&e.forEach(e=>{e.type===`boolean`?t[e.name]=!1:e.type===`enum`&&(t[e.name]=``)})};n(e.headers,t.headers),n(e.pathParams,t.pathParams),n(e.queryParams,t.queryParams),n(e.bodyFields,t.body),s(t)},C=async e=>{if(v(null),!e.trim()){v(`Please enter a URL first.`);return}try{new URL(e)}catch{v(`Please enter a valid URL (include https://).`);return}u(!0),t(``),r([]),s({headers:{},pathParams:{},queryParams:{},body:{}});let n=[`Reading the docs so you don't have to...`,`Finding all the endpoints (there's a lot bestie)...`,`Figuring out what's required vs optional...`,`Almost done, just double checking for you...`];b(n[0]);let i=0,o=setInterval(()=>{i=(i+1)%n.length,b(n[i])},3e3);try{let n=new AbortController,i=setTimeout(()=>n.abort(),6e5),s=await fetch(ee,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e}),signal:n.signal});if(clearTimeout(i),!s.ok)throw Error(`Server responded with ${s.status}`);let c=await s.text(),l,d=!1,f=c.match(/```(?:json)?\s*([\s\S]*?)(?:```|$)/);f&&f[1]&&(c=f[1].trim());let p=c.indexOf(`{`),m=c.indexOf(`[`),h=Math.min(p===-1?1/0:p,m===-1?1/0:m);h!==1/0&&(c=c.substring(h));try{l=JSON.parse(c)}catch{try{console.log(`Standard JSON parse failed, attempting jsonrepair...`);let{jsonrepair:e}=await x(async()=>{let{jsonrepair:e}=await import(`./esm-BjjkU68f.js`);return{jsonrepair:e}},[]),t=e(c);l=JSON.parse(t),d=!0,console.log(`Successfully repaired JSON:`,l)}catch(e){throw console.error(`jsonrepair failed:`,e),Error(`Something went wrong, please try again`)}}let g=e=>{if(!e||typeof e!=`object`)return null;if(e.error&&typeof e.raw==`string`)return e;if(Array.isArray(e))for(let t of e){let e=g(t);if(e)return e}return e.data?g(e.data):e.body?g(e.body):e.json?g(e.json):null},_=g(l);if(_){console.log(`n8n passed an error object with raw text. Attempting to repair...`);try{let e=_.raw,t=e.match(/```(?:json)?\s*([\s\S]*?)(?:```|$)/);t&&t[1]&&(e=t[1].trim());let n=e.indexOf(`{`),r=e.indexOf(`[`),i=Math.min(n===-1?1/0:n,r===-1?1/0:r);i!==1/0&&(e=e.substring(i));let{jsonrepair:a}=await x(async()=>{let{jsonrepair:e}=await import(`./esm-BjjkU68f.js`);return{jsonrepair:e}},[]),o=a(e);l=JSON.parse(o),d=!0,console.log(`Successfully repaired n8n raw error text`)}catch(e){throw console.error(`jsonrepair failed on n8n raw data:`,e),Error(`n8n failed to parse: ${_.error} (Repair also failed: ${e.message})`)}}let y=e=>{if(!e||typeof e!=`object`)return null;if(Array.isArray(e.endpoints))return e;if(Array.isArray(e))for(let t of e){let e=y(t);if(e)return e}return e.data?y(e.data):e.body?y(e.body):e.json?y(e.json):null};if(l=y(l)||l,!l||!l.endpoints||!Array.isArray(l.endpoints)){console.error(`Final parsed data object:`,l);let e=typeof l==`object`&&l?Object.keys(l).join(`, `):typeof l;throw Error(`Unexpected response format from n8n. Received keys: ${e}`)}t(l.baseUrl||``),r(l.endpoints),a(0),l.endpoints[0]&&S(l.endpoints[0]),clearInterval(o),b(`Okay we're cooked. Here you go! 🎉`),d&&v(`Partial results shown due to LLM truncated response.`),setTimeout(()=>{u(!1),b(``)},2e3)}catch(e){clearInterval(o),e.name===`AbortError`?v(`we have so many request at the moment. please try again`):v(e.message.includes(`Something went wrong`)?e.message:`Failed to scan: `+e.message),t(``),r([]),u(!1),b(``)}},te=e=>{a(e),n[e]&&S(n[e])},ne=(e,t,n)=>{s(r=>{let i={...r[e]};return n===void 0||n===``?delete i[t]:i[t]=n,{...r,[e]:i}})},re=n[i]||null;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p,{}),(0,f.jsx)(`main`,{className:`max-w-[1280px] mx-auto p-[28px_24px]`,children:(0,f.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-[20px]`,children:[(0,f.jsxs)(`div`,{className:`flex flex-col gap-[16px]`,children:[(0,f.jsx)(m,{onScan:C,isLoading:c,error:d,loadingMessage:y}),(0,f.jsx)(h,{baseUrl:e,endpoints:n,selectedIndex:i,onSelect:te}),(0,f.jsx)(g,{endpoint:re,payload:o,onPayloadChange:ne,isLoading:c,hasScanned:n.length>0})]}),(0,f.jsx)(`div`,{className:`sticky top-[80px] h-[calc(100vh-100px)]`,children:(0,f.jsx)(_,{baseUrl:e,endpoint:re,payload:o})})]})}),(0,f.jsx)(`footer`,{style:{textAlign:`center`,padding:`24px 16px`,color:`rgba(0, 0, 0, 0.35)`,fontSize:`13px`,letterSpacing:`0.5px`,borderTop:`1px solid rgba(0, 0, 0, 0.08)`,marginTop:`0`},children:`APIlot by Spawny-Jelly (ranfarrr)`})]})}(0,u.createRoot)(document.getElementById(`root`)).render((0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(S,{})}));