PageSourceSearch

https://underdogpodcasts.com/static/js/main.47a272b4.js

js underdogpodcasts.com collected 2026-10-02 06:32:13 UTC 947,941 bytes, 3 lines download raw bytes

1/*! For license information please see main.47a272b4.js.LICENSE.txt */
2(()=>{"use strict";var e={4(e,t,n){var a=n(853),s=n(43),r=n(950);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}var l=Symbol.for("react.element"),c=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=Symbol.for("react.consumer"),g=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var j=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var k=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function S(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=N&&e[N]||e["@@iterator"])?e:null}var A=Symbol.for("react.client.reference");function _(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===A?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case u:return"Fragment";case d:return"Portal";case m:return"Profiler";case h:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case g:return(e.displayName||"Context")+".Provider";case f:return(e._context.displayName||"Context")+".Consumer";case x:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:_(e.type)||"Memo";case w:t=e._payload,e=e._init;try{return _(e(t))}catch(ya){}}return null}var C,E,P=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.assign;function R(e){if(void 0===C)try{throw Error()}catch(ya){var t=ya.stack.trim().match(/\n( *(at )?)/);C=t&&t[1]||"",E=-1<ya.stack.indexOf("\n    at")?" (<anonymous>)":-1<ya.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+C+e+E}var O=!1;function z(e,t){if(!e||O)return"";O=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(ya){var a=ya}Reflect.construct(e,[],n)}
vendor: 9,226 bytes, line 2
2else{try{n.call()}catch(s){a=s}e.call(n.prototype)}}else{try{throw Error()}catch(r){a=r}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(o){if(o&&a&&"string"===typeof o.stack)return[o.stack,a.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),o=r[0],i=r[1];if(o&&i){var l=o.split("\n"),c=i.split("\n");for(s=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;s<c.length&&!c[s].includes("DetermineComponentFrameRoot");)s++;if(a===l.length||s===c.length)for(a=l.length-1,s=c.length-1;1<=a&&0<=s&&l[a]!==c[s];)s--;for(;1<=a&&0<=s;a--,s--)if(l[a]!==c[s]){if(1!==a||1!==s)do{if(a--,0>--s||l[a]!==c[s]){var d="\n"+l[a].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}}while(1<=a&&0<=s);break}}}finally{O=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?R(n):""}function T(e){switch(e.tag){case 26:case 27:case 5:return R(e.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 1:return e=z(e.type,!0);default:return""}}function D(e){try{var t="";do{t+=T(e),e=e.return}while(e);return t}catch(ya){return"\nError generating stack: "+ya.message+"\n"+ya.stack}}function L(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function F(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function I(e){if(L(e)!==e)throw Error(o(188))}function U(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=U(e)))return t;e=e.sibling}return null}var B=Array.isArray,W=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},H=[],V=-1;function Y(e){return{current:e}}function $(e){0>V||(e.current=H[V],H[V]=null,V--)}function Q(e,t){V++,H[V]=e.current,e.current=t}var K=Y(null),G=Y(null),X=Y(null),J=Y(null);function Z(e,t){switch(Q(X,t),Q(G,e),Q(K,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?Xd(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=Jd(e=Xd(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}$(K),Q(K,t)}function ee(){$(K),$(G),$(X)}function te(e){null!==e.memoizedState&&Q(J,e);var t=K.current,n=Jd(t,e.type);t!==n&&(Q(G,e),Q(K,n))}function ne(e){G.current===e&&($(K),$(G)),J.current===e&&($(J),Lu._currentValue=q)}var ae=Object.prototype.hasOwnProperty,se=a.unstable_scheduleCallback,re=a.unstable_cancelCallback,oe=a.unstable_shouldYield,ie=a.unstable_requestPaint,le=a.unstable_now,ce=a.unstable_getCurrentPriorityLevel,de=a.unstable_ImmediatePriority,ue=a.unstable_UserBlockingPriority,he=a.unstable_NormalPriority,me=a.unstable_LowPriority,pe=a.unstable_IdlePriority,fe=a.log,ge=a.unstable_setDisableYieldValue,xe=null,ve=null;function be(e){if("function"===typeof fe&&ge(e),ve&&"function"===typeof ve.setStrictMode)try{ve.setStrictMode(xe,e)}catch(t){}}var ye=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(we(e)/je|0)|0},we=Math.log,je=Math.LN2;var ke=128,Ne=4194304;function Se(e){var t=42&e;if(0!==t)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: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 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ae(e,t){var n=e.pendingLanes;if(0===n)return 0;var a=0,s=e.suspendedLanes,r=e.pingedLanes,o=e.warmLanes;e=0!==e.finishedLanes;var i=134217727&n;return 0!==i?0!==(n=i&~s)?a=Se(n):0!==(r&=i)?a=Se(r):e||0!==(o=i&~o)&&(a=Se(o)):0!==(i=n&~s)?a=Se(i):0!==r?a=Se(r):e||0!==(o=n&~o)&&(a=Se(o)),0===a?0:0!==t&&t!==a&&0===(t&s)&&((s=a&-a)>=(o=t&-t)||32===s&&0!==(4194176&o))?t:a}function _e(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ce(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;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 t+5e3;default:return-1}}function Ee(){var e=ke;return 0===(4194176&(ke<<=1))&&(ke=128),e}function Pe(){var e=Ne;return 0===(62914560&(Ne<<=1))&&(Ne=4194304),e}function Me(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Re(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ye(t);e.entangledLanes|=t,e.entanglements[a]=1073741824|e.entanglements[a]|4194218&n}function ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-ye(n),s=1<<a;s&t|e[a]&t&&(e[a]|=t),n&=~s}}function Te(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function De(){var e=W.p;return 0!==e?e:void 0===(e=window.event)?32:Ju(e.type)}var Le=Math.random().toString(36).slice(2),Fe="__reactFiber$"+Le,Ie="__reactProps$"+Le,Ue="__reactContainer$"+Le,Be="__reactEvents$"+Le,We="__reactListeners$"+Le,qe="__reactHandles$"+Le,He="__reactResources$"+Le,Ve="__reactMarker$"+Le;function Ye(e){delete e[Fe],delete e[Ie],delete e[Be],delete e[We],delete e[qe]}function $e(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ue]||n[Fe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=cu(e);null!==e;){if(n=e[Fe])return n;e=cu(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[Fe]||e[Ue]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function Ke(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(o(33))}function Ge(e){var t=e[He];return t||(t=e[He]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[Ve]=!0}var Je=new Set,Ze={};function et(e,t){tt(e,t),tt(e+"Capture",t)}function tt(e,t){for(Ze[e]=t,e=0;e<t.length;e++)Je.add(t[e])}var nt=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),at=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),st={},rt={};function ot(e,t,n){if(s=t,ae.call(rt,s)||!ae.call(st,s)&&(at.test(s)?rt[s]=!0:(st[s]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var a=t.toLowerCase().slice(0,5);if("data-"!==a&&"aria-"!==a)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var s}function it(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function lt(e,t,n,a){if(null===a)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+a)}}function ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function dt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ut(e){e._valueTracker||(e._valueTracker=function(e){var t=dt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(e){a=""+e,r.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(e){a=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=dt(e)?e.checked?"true":"false":e.value),(e=a)!==n&&(t.setValue(e),!0)}function mt(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var pt=/[\n"\\]/g;function ft(e){return e.replace(pt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}
2function gt(e,t,n,a,s,r,o,i){e.name="",null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ct(t)):e.value!==""+ct(t)&&(e.value=""+ct(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?vt(e,o,ct(t)):null!=n?vt(e,o,ct(n)):null!=a&&e.removeAttribute("value"),null==s&&null!=r&&(e.defaultChecked=!!r),null!=s&&(e.checked=s&&"function"!==typeof s&&"symbol"!==typeof s),null!=i&&"function"!==typeof i&&"symbol"!==typeof i&&"boolean"!==typeof i?e.name=""+ct(i):e.removeAttribute("name")}function xt(e,t,n,a,s,r,o,i){if(null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&"boolean"!==typeof r&&(e.type=r),null!=t||null!=n){if(!("submit"!==r&&"reset"!==r||void 0!==t&&null!==t))return;n=null!=n?""+ct(n):"",t=null!=t?""+ct(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}a="function"!==typeof(a=null!=a?a:s)&&"symbol"!==typeof a&&!!a,e.checked=i?e.checked:!!a,e.defaultChecked=!!a,null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o&&(e.name=o)}function vt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function bt(e,t,n,a){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&a&&(e[n].defaultSelected=!0)}else{for(n=""+ct(n),t=null,s=0;s<e.length;s++){if(e[s].value===n)return e[s].selected=!0,void(a&&(e[s].defaultSelected=!0));null!==t||e[s].disabled||(t=e[s])}null!==t&&(t.selected=!0)}}function yt(e,t,n){null==t||((t=""+ct(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ct(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function wt(e,t,n,a){if(null==t){if(null!=a){if(null!=n)throw Error(o(92));if(B(a)){if(1<a.length)throw Error(o(93));a=a[0]}n=a}null==n&&(n=""),t=n}n=ct(t),e.defaultValue=n,(a=e.textContent)===n&&""!==a&&null!==a&&(e.value=a)}function jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var kt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Nt(e,t,n){var a=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?a?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":a?e.setProperty(t,n):"number"!==typeof n||0===n||kt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(o(62));if(e=e.style,null!=n){for(var a in n)!n.hasOwnProperty(a)||null!=t&&t.hasOwnProperty(a)||(0===a.indexOf("--")?e.setProperty(a,""):"float"===a?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&n[s]!==a&&Nt(e,s,a)}else for(var r in t)t.hasOwnProperty(r)&&Nt(e,r,t[r])}function At(e){if(-1===e.indexOf("-"))return!1;switch(e){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 _t=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
2dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ct=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Et(e){return Ct.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Pt=null;function Mt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.n
vendor: 4,823 bytes, line 2
2odeType?e.parentNode:e}var Rt=null,Ot=null;function zt(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[Ie]||null;e:switch(e=t.stateNode,t.type){case"input":if(gt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+ft(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var s=a[Ie]||null;if(!s)throw Error(o(90));gt(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)(a=n[t]).form===e.form&&ht(a)}break e;case"textarea":yt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&bt(e,!!n.multiple,t,!1)}}}var Tt=!1;function Dt(e,t,n){if(Tt)return e(t,n);Tt=!0;try{return e(t)}finally{if(Tt=!1,(null!==Rt||null!==Ot)&&(Ic(),Rt&&(t=Rt,e=Ot,Ot=Rt=null,zt(t),e)))for(t=0;t<e.length;t++)zt(e[t])}}function Lt(e,t){var n=e.stateNode;if(null===n)return null;var a=n[Ie]||null;if(null===a)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(a=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!a;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ft=!1;if(nt)try{var It={};Object.defineProperty(It,"passive",{get:function(){Ft=!0}}),window.addEventListener("test",It,It),window.removeEventListener("test",It,It)}catch(jh){Ft=!1}var Ut=null,Bt=null,Wt=null;function qt(){if(Wt)return Wt;var e,t,n=Bt,a=n.length,s="value"in Ut?Ut.value:Ut.textContent,r=s.length;for(e=0;e<a&&n[e]===s[e];e++);var o=a-e;for(t=1;t<=o&&n[a-t]===s[r-t];t++);return Wt=s.slice(e,1<t?1-t:void 0)}function Ht(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Vt(){return!0}function Yt(){return!1}function $t(e){function t(t,n,a,s,r){for(var o in this._reactName=t,this._targetInst=a,this.type=n,this.nativeEvent=s,this.target=r,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(s):s[o]);return this.isDefaultPrevented=(null!=s.defaultPrevented?s.defaultPrevented:!1===s.returnValue)?Vt:Yt,this.isPropagationStopped=Yt,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Vt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Vt)},persist:function(){},isPersistent:Vt}),t}var Qt,Kt,Gt,Xt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jt=$t(Xt),Zt=M({},Xt,{view:0,detail:0}),en=$t(Zt),tn=M({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gt&&(Gt&&"mousemove"===e.type?(Qt=e.screenX-Gt.screenX,Kt=e.screenY-Gt.screenY):Kt=Qt=0,Gt=e),Qt)},movementY:function(e){return"movementY"in e?e.movementY:Kt}}),nn=$t(tn),an=$t(M({},tn,{dataTransfer:0})),sn=$t(M({},Zt,{relatedTarget:0})),rn=$t(M({},Xt,{animationName:0,elapsedTime:0,pseudoElement:0})),on=$t(M({},Xt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),ln=$t(M({},Xt,{data:0})),cn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dn={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"},un={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=un[e])&&!!t[e]}function mn(){return hn}var pn=$t(M({},Zt,{key:function(e){if(e.key){var t=cn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Ht(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"ke
2yup"===e.type?dn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mn,charCode:function(e){return"keypress"===e.type?Ht(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Ht(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),fn=$t(M({},tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),gn=$t(M({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mn})),xn=$t(M({},Xt,{propertyName:0,elapsedTime:0,pseudoElement:0})),vn=$t(M({},tn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),bn=$t(M({},Xt,{newState:0,oldState:0})),yn=[9,13,27,32],wn=nt&&"CompositionEvent"in window,jn=null;nt&&"documentMode"in document&&(jn=document.documentMode);var kn=nt&&"TextEvent"in window&&!jn,Nn=nt&&(!wn||jn&&8<jn&&11>=jn),Sn=String.fromCharCode(32),An=!1;function _n(e,t){switch(e){case"keyup":return-1!==yn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var En=!1;var Pn={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 Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Pn[e.type]:"textarea"===t}function Rn(e,t,n,a){Rt?Ot?Ot.push(a):Ot=[a]:Rt=a,0<(t=Ld(t,"onChange")).length&&(n=new Jt("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var On=null,zn=null;function Tn(e){Ed(e,0)}function Dn(e){if(ht(Ke(e)))return e}function Ln(e,t){if("change"===e)return t}var Fn=!1;if(nt){var In;if(nt){var Un="oninput"in document;if(!Un){var Bn=document.createElement("div");Bn.setAttribute("oninput","return;"),Un="function"===typeof Bn.oninput}In=Un}else In=!1;Fn=In&&(!document.documentMode||9<document.documentMode)}function Wn(){On&&(On.detachEvent("onpropertychange",qn),zn=On=null)}function qn(e){if("value"===e.propertyName&&Dn(zn)){var t=[];Rn(t,zn,e,Mt(e)),Dt(Tn,t)}}function Hn(e,t,n){"focusin"===e?(Wn(),zn=n,(On=t).attachEvent("onpropertychange",qn)):"focusout"===e&&Wn()}function Vn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Dn(zn)}function Yn(e,t){if("click"===e)return Dn(t)}function $n(e,t){if("input"===e||"change"===e)return Dn(t)}var Qn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function Kn(e,t){if(Qn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var s=n[a];if(!ae.call(t,s)||!Qn(e[s],t[s]))return!1}return!0}function Gn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xn(e,t){var n,a=Gn(e);for(e=0;a;){if(3===a.nodeType){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Gn(a)}}function Jn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Jn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Zn(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(a){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function ea(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ta(e,t){var n=Zn(t);t=e.focusedElem;var a=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Jn(t.ownerDocument.documentElement,t)){if(null!==a&&ea(t))if(e=a.start,void 0===(n=a.end)&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if((n=(e=t.ownerDocument||document)&&e.defaultView||window).getSelection){n=n.getSelection();var s=t.textContent.length,r=Math.min(a.start,s);a=void 0===a.end?r:Math.min(a.end,s),!n.extend&&r>a&&(s=a,a=r,r=s),s=Xn(t,r);var o=Xn(t,a);s&&o&&(1!==n.rangeCount||n.anchorNode!==s.node||n.anchorOffset!==s.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&((e=e.createRange()).setStart(s.node,s.offset),n.removeAllRanges(),r>a?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}for(e=[],n=t;n=n.parentNode;)1===n.nodeType&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});
vendor: 5,735 bytes, line 2
2for("function"===typeof t.focus&&t.focus(),t=0;t<e.length;t++)(n=e[t]).element.scrollLeft=n.left,n.element.scrollTop=n.top}}var na=nt&&"documentMode"in document&&11>=document.documentMode,aa=null,sa=null,ra=null,oa=!1;function ia(e,t,n){var a=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;oa||null==aa||aa!==mt(a)||("selectionStart"in(a=aa)&&ea(a)?a={start:a.selectionStart,end:a.selectionEnd}:a={anchorNode:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset},ra&&Kn(ra,a)||(ra=a,0<(a=Ld(sa,"onSelect")).length&&(t=new Jt("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=aa)))}function la(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ca={animationend:la("Animation","AnimationEnd"),animationiteration:la("Animation","AnimationIteration"),animationstart:la("Animation","AnimationStart"),transitionrun:la("Transition","TransitionRun"),transitionstart:la("Transition","TransitionStart"),transitioncancel:la("Transition","TransitionCancel"),transitionend:la("Transition","TransitionEnd")},da={},ua={};function ha(e){if(da[e])return da[e];if(!ca[e])return e;var t,n=ca[e];for(t in n)if(n.hasOwnProperty(t)&&t in ua)return da[e]=n[t];return e}nt&&(ua=document.createElement("div").style,"AnimationEvent"in window||(delete ca.animationend.animation,delete ca.animationiteration.animation,delete ca.animationstart.animation),"TransitionEvent"in window||delete ca.transitionend.transition);var ma=ha("animationend"),pa=ha("animationiteration"),fa=ha("animationstart"),ga=ha("transitionrun"),xa=ha("transitionstart"),va=ha("transitioncancel"),ba=ha("transitionend"),wa=new Map,ja="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function ka(e,t){wa.set(e,t),et(t,[e])}var Na=[],Sa=0,Aa=0;function _a(){for(var e=Sa,t=Aa=Sa=0;t<e;){var n=Na[t];Na[t++]=null;var a=Na[t];Na[t++]=null;var s=Na[t];Na[t++]=null;var r=Na[t];if(Na[t++]=null,null!==a&&null!==s){var o=a.pending;null===o?s.next=s:(s.next=o.next,o.next=s),a.pending=s}0!==r&&Ma(n,s,r)}}function Ca(e,t,n,a){Na[Sa++]=e,Na[Sa++]=t,Na[Sa++]=n,Na[Sa++]=a,Aa|=a,e.lanes|=a,null!==(e=e.alternate)&&(e.lanes|=a)}function Ea(e,t,n,a){return Ca(e,t,n,a),Ra(e)}function Pa(e,t){return Ca(e,null,null,t),Ra(e)}function Ma(e,t,n){e.lanes|=n;var a=e.alternate;null!==a&&(a.lanes|=n);for(var s=!1,r=e.return;null!==r;)r.childLanes|=n,null!==(a=r.alternate)&&(a.childLanes|=n),22===r.tag&&(null===(e=r.stateNode)||1&e._visibility||(s=!0)),e=r,r=r.return;s&&null!==t&&3===e.tag&&(r=e.stateNode,s=31-ye(n),null===(e=(r=r.hiddenUpdates)[s])?r[s]=[t]:e.push(t),t.lane=536870912|n)}function Ra(e){if(50<Ec)throw Ec=0,Pc=null,Error(o(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Oa={},za=new WeakMap;function Ta(e,t){if("object"===typeof e&&null!==e){var n=za.get(e);return void 0!==n?n:(t={value:e,source:t,stack:D(t)},za.set(e,t),t)}return{value:e,source:t,stack:D(t)}}var Da=[],La=0,Fa=null,Ia=0,Ua=[],Ba=0,Wa=null,qa=1,Ha="";function Va(e,t){Da[La++]=Ia,Da[La++]=Fa,Fa=e,Ia=t}function Ya(e,t,n){Ua[Ba++]=qa,Ua[Ba++]=Ha,Ua[Ba++]=Wa,Wa=e;var a=qa;e=Ha;var s=32-ye(a)-1;a&=~(1<<s),n+=1;var r=32-ye(t)+s;if(30<r){var o=s-s%5;r=(a&(1<<o)-1).toString(32),a>>=o,s-=o,qa=1<<32-ye(t)+s|n<<s|a,Ha=r+e}else qa=1<<r|n<<s|a,Ha=e}function $a(e){null!==e.return&&(Va(e,1),Ya(e,1,0))}function Qa(e){for(;e===Fa;)Fa=Da[--La],Da[La]=null,Ia=Da[--La],Da[La]=null;for(;e===Wa;)Wa=Ua[--Ba],Ua[Ba]=null,Ha=Ua[--Ba],Ua[Ba]=null,qa=Ua[--Ba],Ua[Ba]=null}var Ka=null,Ga=null,Xa=!1,Ja=null,Za=!1,es=Error(o(519));function ts(e){throw os(Ta(Error(o(418,"")),e)),es}function ns(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[Ie]=a,n){case"dialog":Pd("cancel",t),Pd("close",t);break;case"iframe":case"object":case"embed":Pd("load",t);break;case"video":case"audio":for(n=0;n<_d.length;n++)Pd(_d[n],t);break;case"source":Pd("error",t);break;case"img":case"image":case"link":Pd("error",t),Pd("load",t);break;case"details":Pd("toggle",t);break;case"input":Pd("invalid",t),xt(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),ut(t);break;case"select":Pd("invalid",t);break;case"textarea":Pd("invalid",t),wt(t,a.value,a.defaultValue,a.children),ut(t)}"string"!==typeof(n=a.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===a.suppressHydrationWarning||qd(t.textContent,n)?(null!=a.popover&&(Pd("beforetoggle",t),Pd("toggle",t)),null!=a.onScroll&&Pd("scroll",t),null!=a.onScrollEnd&&Pd("scrollend",t),null!=a.onClick&&(t.onclick=Hd),t=!0):t=!1,t||ts(e)}function as(e){for(Ka=e.return;Ka;)switch(Ka.tag){case 3:case 27:return void(Za=!0);case 5:case 13:return void(Za=!1);default:Ka=Ka.return}}function ss(e){if(e!==Ka)return!1;if(!Xa)return as(e),Xa=!0,!1;var t,n=!1;if((t=3!==e.tag&&27!==e.tag)&&((t=5===e.tag)&&(t=!("form"!==(t=e.type)&&"button"!==t)||Zd(e.type,e.memoizedProps)),t=!t),t&&(n=!0),n&&Ga&&ts(e),as(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;
2){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){Ga=lu(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}Ga=null}}else Ga=Ka?lu(e.stateNode.nextSibling):null;return!0}function rs(){Ga=Ka=null,Xa=!1}function os(e){null===Ja?Ja=[e]:Ja.push(e)}var is=Error(o(460)),ls=Error(o(474)),cs={then:function(){}};function ds(e){return"fulfilled"===(e=e.status)||"rejected"===e}function us(){}function hs(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(us,us),t=n),t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===is)throw Error(o(483));throw e;default:if("string"===typeof t.status)t.then(us,us);else{if(null!==(e=nc)&&100<e.shellSuspendCounter)throw Error(o(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":if((e=t.reason)===is)throw Error(o(483));throw e}throw ms=t,is}}var ms=null;function ps(){if(null===ms)throw Error(o(459));var e=ms;return ms=null,e}var fs=null,gs=0;function xs(e){var t=gs;return gs+=1,null===fs&&(fs=[]),hs(fs,e,t)}function vs(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function bs(e,t){if(t.$$typeof===l)throw Error(o(525));throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ys(e){return(0,e._init)(e._payload)}function ws(e){function t(t,n){if(e){var a=t.deletions;null===a?(t.deletions=[n],t.flags|=16):a.push(n)}}function n(n,a){if(!e)return null;for(;null!==a;)t(n,a),a=a.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(e,t){return(e=Fl(e,t)).index=0,e.sibling=null,e}function r(t,n,a){return t.index=a,e?null!==(a=t.alternate)?(a=a.index)<n?(t.flags|=33554434,n):a:(t.flags|=33554434,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=33554434),t}function l(e,t,n,a){return null===t||6!==t.tag?((t=ql(n,e.mode,a)).return=e,t):((t=s(t,n)).return=e,t)}function h(e,t,n,a){var r=n.type;return r===u?p(e,t,n.props.children,a,n.key):null!==t&&(t.elementType===r||"object"===typeof r&&null!==r&&r.$$typeof===w&&ys(r)===t.type)?(vs(t=s(t,n.props),n),t.return=e,t):(vs(t=Ul(n.type,n.key,n.props,null,e.mode,a),n),t.return=e,t)}function m(e,t,n,a){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hl(n,e.mode,a)).return=e,t):((t=s(t,n.children||[])).return=e,t)}function p(e,t,n,a,r){return null===t||7!==t.tag?((t=Bl(n,e.mode,a,r)).return=e,t):((t=s(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=ql(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case c:return vs(n=Ul(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case d:return(t=Hl(t,e.mode,n)).return=e,t;case w:return f(e,t=(0,t._init)(t._payload),n)}if(B(t)||S(t))return(t=Bl(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return f(e,xs(t),n);if(t.$$typeof===g)return f(e,_i(e,t),n);bs(e,t)}return null}function x(e,t,n,a){var s=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==s?null:l(e,t,""+n,a);if("object"===typeof n&&null!==n){switch(n.$$typeof){case c:return n.key===s?h(e,t,n,a):null;case d:return n.key===s?m(e,t,n,a):null;case w:return x(e,t,n=(s=n._init)(n._payload),a)}if(B(n)||S(n))return null!==s?null:p(e,t,n,a,null);if("function"===typeof n.then)return x(e,t,xs(n),a);if(n.$$typeof===g)return x(e,t,_i(e,n),a);bs(e,n)}return null}function v(e,t,n,a,s){if("string"===typeof a&&""!==a||"number"===typeof a||"bigint"===typeof a)return l(t,e=e.get(n)||null,""+a,s);if("object"===typeof a&&null!==a){switch(a.$$typeof){case c:return h(t,e=e.get(null===a.key?n:a.key)||null,a,s);case d:return m(t,e=e.get(null===a.key?n:a.key)||null,a,s);case w:return v(e,t,n,a=(0,a._init)(a._payload),s)}
vendor: 5,199 bytes, line 2
2if(B(a)||S(a))return p(t,e=e.get(n)||null,a,s,null);if("function"===typeof a.then)return v(e,t,n,xs(a),s);if(a.$$typeof===g)return v(e,t,n,_i(t,a),s);bs(t,a)}return null}function b(l,h,m,p){if("object"===typeof m&&null!==m&&m.type===u&&null===m.key&&(m=m.props.children),"object"===typeof m&&null!==m){switch(m.$$typeof){case c:e:{for(var y=m.key;null!==h;){if(h.key===y){if((y=m.type)===u){if(7===h.tag){n(l,h.sibling),(p=s(h,m.props.children)).return=l,l=p;break e}}else if(h.elementType===y||"object"===typeof y&&null!==y&&y.$$typeof===w&&ys(y)===h.type){n(l,h.sibling),vs(p=s(h,m.props),m),p.return=l,l=p;break e}n(l,h);break}t(l,h),h=h.sibling}m.type===u?((p=Bl(m.props.children,l.mode,p,m.key)).return=l,l=p):(vs(p=Ul(m.type,m.key,m.props,null,l.mode,p),m),p.return=l,l=p)}return i(l);case d:e:{for(y=m.key;null!==h;){if(h.key===y){if(4===h.tag&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(l,h.sibling),(p=s(h,m.children||[])).return=l,l=p;break e}n(l,h);break}t(l,h),h=h.sibling}(p=Hl(m,l.mode,p)).return=l,l=p}return i(l);case w:return b(l,h,m=(y=m._init)(m._payload),p)}if(B(m))return function(s,o,i,l){for(var c=null,d=null,u=o,h=o=0,m=null;null!==u&&h<i.length;h++){u.index>h?(m=u,u=null):m=u.sibling;var p=x(s,u,i[h],l);if(null===p){null===u&&(u=m);break}e&&u&&null===p.alternate&&t(s,u),o=r(p,o,h),null===d?c=p:d.sibling=p,d=p,u=m}if(h===i.length)return n(s,u),Xa&&Va(s,h),c;if(null===u){for(;h<i.length;h++)null!==(u=f(s,i[h],l))&&(o=r(u,o,h),null===d?c=u:d.sibling=u,d=u);return Xa&&Va(s,h),c}for(u=a(u);h<i.length;h++)null!==(m=v(u,s,h,i[h],l))&&(e&&null!==m.alternate&&u.delete(null===m.key?h:m.key),o=r(m,o,h),null===d?c=m:d.sibling=m,d=m);return e&&u.forEach(function(e){return t(s,e)}),Xa&&Va(s,h),c}(l,h,m,p);if(S(m)){if("function"!==typeof(y=S(m)))throw Error(o(150));return function(s,i,l,c){if(null==l)throw Error(o(151));for(var d=null,u=null,h=i,m=i=0,p=null,g=l.next();null!==h&&!g.done;m++,g=l.next()){h.index>m?(p=h,h=null):p=h.sibling;var b=x(s,h,g.value,c);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(s,h),i=r(b,i,m),null===u?d=b:u.sibling=b,u=b,h=p}if(g.done)return n(s,h),Xa&&Va(s,m),d;if(null===h){for(;!g.done;m++,g=l.next())null!==(g=f(s,g.value,c))&&(i=r(g,i,m),null===u?d=g:u.sibling=g,u=g);return Xa&&Va(s,m),d}for(h=a(h);!g.done;m++,g=l.next())null!==(g=v(h,s,m,g.value,c))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),i=r(g,i,m),null===u?d=g:u.sibling=g,u=g);return e&&h.forEach(function(e){return t(s,e)}),Xa&&Va(s,m),d}(l,h,m=y.call(m),p)}if("function"===typeof m.then)return b(l,h,xs(m),p);if(m.$$typeof===g)return b(l,h,_i(l,m),p);bs(l,m)}return"string"===typeof m&&""!==m||"number"===typeof m||"bigint"===typeof m?(m=""+m,null!==h&&6===h.tag?(n(l,h.sibling),(p=s(h,m)).return=l,l=p):(n(l,h),(p=ql(m,l.mode,p)).return=l,l=p),i(l)):n(l,h)}return function(e,t,n,a){try{gs=0;var s=b(e,t,n,a);return fs=null,s}catch(ya){if(ya===is)throw ya;var r=Dl(29,ya,null,e.mode);return r.lanes=a,r.return=e,r}}}var js=ws(!0),ks=ws(!1),Ns=Y(null),Ss=Y(0);function As(e,t){Q(Ss,e=dc),Q(Ns,t),dc=e|t.baseLanes}function _s(){Q(Ss,dc),Q(Ns,Ns.current)}function Cs(){dc=Ss.current,$(Ns),$(Ss)}var Es=Y(null),Ps=null;function Ms(e){var t=e.alternate;Q(Ts,1&Ts.current),Q(Es,e),null===Ps&&(null===t||null!==Ns.current||null!==t.memoizedState)&&(Ps=e)}function Rs(e){if(22===e.tag){if(Q(Ts,Ts.current),Q(Es,e),null===Ps){var t=e.alternate;null!==t&&null!==t.memoizedState&&(Ps=e)}}else Os()}function Os(){Q(Ts,Ts.current),Q(Es,Es.current)}function zs(e){$(Es),Ps===e&&(Ps=null),$(Ts)}var Ts=Y(0);function Ds(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ls="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Fs=a.unstable_scheduleCallback,Is=a.unstable_NormalPriority,Us={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bs(){return{controller:new Ls,data:new Map,refCount:0}}function Ws(e){e.refCount--,0===e.refCount&&Fs(Is,function(){e.controller.abort()})}var qs=null,Hs=0,Vs=0,Ys=null;function $s(){if(0===--Hs&&null!==qs){null!==Ys&&(Ys.status="fulfilled");var e=qs;qs=null,Vs=0,Ys=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Qs=P.S;P.S=function(e,t){"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===qs){var n=qs=[];Hs=0,Vs=jd(),Ys={status:"pending",value:void 0,then:function(e){n.push(e)}}}Hs++,t.then($s,$s)}(0,t),null!==Qs&&Qs(e,t)};var Ks=Y(null);function Gs(){var e=Ks.current;return null!==e?e:nc.pooledCache}function Xs(e,t){Q(Ks,null===t?Ks.current:t.pool)}function Js(){var e=Gs();return null===e?null:{parent:Us._currentValue,pool:e}}
vendor: 12,453 bytes, line 2
2var Zs=0,er=null,tr=null,nr=null,ar=!1,sr=!1,rr=!1,or=0,ir=0,lr=null,cr=0;function dr(){throw Error(o(321))}function ur(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function hr(e,t,n,a,s,r){return Zs=r,er=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=null===e||null===e.memoizedState?_o:Co,rr=!1,r=n(a,s),rr=!1,sr&&(r=pr(t,n,a,s)),mr(e),r}function mr(e){P.H=Ao;var t=null!==tr&&null!==tr.next;if(Zs=0,nr=tr=er=null,ar=!1,ir=0,lr=null,t)throw Error(o(300));null===e||Vo||null!==(e=e.dependencies)&&Ni(e)&&(Vo=!0)}function pr(e,t,n,a){er=e;var s=0;do{if(sr&&(lr=null),ir=0,sr=!1,25<=s)throw Error(o(301));if(s+=1,nr=tr=null,null!=e.updateQueue){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,null!=r.memoCache&&(r.memoCache.index=0)}P.H=Eo,r=t(n,a)}while(sr);return r}function fr(){var e=P.H,t=e.useState()[0];return t="function"===typeof t.then?wr(t):t,e=e.useState()[0],(null!==tr?tr.memoizedState:null)!==e&&(er.flags|=1024),t}function gr(){var e=0!==or;return or=0,e}function xr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function vr(e){if(ar){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}ar=!1}Zs=0,nr=tr=er=null,sr=!1,ir=or=0,lr=null}function br(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===nr?er.memoizedState=nr=e:nr=nr.next=e,nr}function yr(){if(null===tr){var e=er.alternate;e=null!==e?e.memoizedState:null}else e=tr.next;var t=null===nr?er.memoizedState:nr.next;if(null!==t)nr=t,tr=e;else{if(null===e){if(null===er.alternate)throw Error(o(467));throw Error(o(310))}e={memoizedState:(tr=e).memoizedState,baseState:tr.baseState,baseQueue:tr.baseQueue,queue:tr.queue,next:null},null===nr?er.memoizedState=nr=e:nr=nr.next=e}return nr}function wr(e){var t=ir;return ir+=1,null===lr&&(lr=[]),e=hs(lr,e,t),t=er,null===(null===nr?t.memoizedState:nr.next)&&(t=t.alternate,P.H=null===t||null===t.memoizedState?_o:Co),e}function jr(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return wr(e);if(e.$$typeof===g)return Ai(e)}throw Error(o(438,String(e)))}function kr(e){var t=null,n=er.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var a=er.alternate;null!==a&&(null!==(a=a.updateQueue)&&(null!=(a=a.memoCache)&&(t={data:a.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},er.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=k;return t.index++,n}function Nr(e,t){return"function"===typeof t?t(e):t}function Sr(e){return Ar(yr(),tr,e)}function Ar(e,t,n){var a=e.queue;if(null===a)throw Error(o(311));a.lastRenderedReducer=n;var s=e.baseQueue,r=a.pending;if(null!==r){if(null!==s){var i=s.next;s.next=r.next,r.next=i}t.baseQueue=s=r,a.pending=null}if(r=e.baseState,null===s)e.memoizedState=r;else{var l=i=null,c=null,d=t=s.next,u=!1;do{var h=-536870913&d.lane;if(h!==d.lane?(sc&h)===h:(Zs&h)===h){var m=d.revertLane;if(0===m)null!==c&&(c=c.next={lane:0,revertLane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),h===Vs&&(u=!0);else{if((Zs&m)===m){d=d.next,m===Vs&&(u=!0);continue}h={lane:0,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},null===c?(l=c=h,i=r):c=c.next=h,er.lanes|=m,hc|=m}h=d.action,rr&&n(r,h),r=d.hasEagerState?d.eagerState:n(r,h)}else m={lane:h,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},null===c?(l=c=m,i=r):c=c.next=m,er.lanes|=h,hc|=h;d=d.next}while(null!==d&&d!==t);if(null===c?i=r:c.next=l,!Qn(r,e.memoizedState)&&(Vo=!0,u&&null!==(n=Ys)))throw n;e.memoizedState=r,e.baseState=i,e.baseQueue=c,a.lastRenderedState=r}return null===s&&(a.lanes=0),[e.memoizedState,a.dispatch]}function _r(e){var t=yr(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var a=n.dispatch,s=n.pending,r=t.memoizedState;if(null!==s){n.pending=null;var i=s=s.next;do{r=e(r,i.action),i=i.next}while(i!==s);Qn(r,t.memoizedState)||(Vo=!0),t.memoizedState=r,null===t.baseQueue&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function Cr(e,t,n){var a=er,s=yr(),r=Xa;if(r){if(void 0===n)throw Error(o(407));n=n()}else n=t();var i=!Qn((tr||s).memoizedState,n);if(i&&(s.memoizedState=n,Vo=!0),s=s.queue,Zr(Mr.bind(null,a,s,e),[e]),s.getSnapshot!==t||i||null!==nr&&1&nr.memoizedState.tag){if(a.flags|=2048,Qr(9,Pr.bind(null,a,s,n,t),{destroy:void 0},null),null===nc)throw Error(o(349));r||0!==(60&Zs)||Er(a,t,n)}return n}function Er(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=er.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},er.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Pr(e,t,n,a){t.value=n,t.getSnapshot=a,Rr(t)&&Or(e)}function Mr(e,t,n){return n(function(){Rr(t)&&Or(e)})}function Rr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(a){return!0}}function Or(e){var t=Pa(e,2);null!==t&&Oc(t,e,2)}function zr(e){var t=br();if("function"===typeof e){var n=e;if(e=n(),rr){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nr,lastRenderedState:e},t}function Tr(e,t,n,a){return e.baseState=n,Ar(e,tr,"function"===typeof a?a:Nr)}function Dr(e,t,n,a,s){if(ko(e))throw Error(o(485));if(null!==(e=t.action)){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){r.listeners.push(e)}};null!==P.T?n(!0):r.isTransition=!1,a(r),null===(n=t.pending)?(r.next=t.pending=r,Lr(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Lr(e,t){var n=t.action,a=t.payload,s=e.state;if(t.isTransition){var r=P.T,o={};P.T=o;try{var i=n(s,a),l=P.S;null!==l&&l(o,i),Fr(e,t,i)}catch(c){Ur(e,t,c)}finally{P.T=r}}else try{Fr(e,t,r=n(s,a))}catch(d){Ur(e,t,d)}}function Fr(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){Ir(e,t,n)},function(n){return Ur(e,t,n)}):Ir(e,t,n)}function Ir(e,t,n){t.status="fulfilled",t.value=n,Br(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Lr(e,n)))}function Ur(e,t,n){var a=e.pending;if(e.pending=null,null!==a){a=a.next;do{t.status="rejected",t.reason=n,Br(t),t=t.next}while(t!==a)}e.action=null}function Br(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wr(e,t){return t}function qr(e,t){if(Xa){var n=nc.formState;if(null!==n){e:{var a=er;if(Xa){if(Ga){t:{for(var s=Ga,r=Za;8!==s.nodeType;){if(!r){s=null;break t}if(null===(s=lu(s.nextSibling))){s=null;break t}}s="F!"===(r=s.data)||"F"===r?s:null}if(s){Ga=lu(s.nextSibling),a="F!"===s.data;break e}}ts(a)}a=!1}a&&(t=n[0])}}return(n=br()).memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:t},n.queue=a,n=yo.bind(null,er,a),a.dispatch=n,a=zr(!1),r=jo.bind(null,er,!1,a.queue),s={state:t,dispatch:null,action:e,pending:null},(a=br()).queue=s,n=Dr.bind(null,er,s,r,n),s.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hr(e){return Vr(yr(),tr,e)}function Vr(e,t,n){t=Ar(e,t,Wr)[0],e=Sr(Nr)[0],t="object"===typeof t&&null!==t&&"function"===typeof t.then?wr(t):t;var a=yr(),s=a.queue,r=s.dispatch;return n!==a.memoizedState&&(er.flags|=2048,Qr(9,Yr.bind(null,s,n),{destroy:void 0},null)),[t,r,e]}function Yr(e,t){e.action=t}function $r(e){var t=yr(),n=tr;if(null!==n)return Vr(t,n,e);yr(),t=t.memoizedState;var a=(n=yr()).queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Qr(e,t,n,a){return e={tag:e,create:t,inst:n,deps:a,next:null},null===(t=er.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},er.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Kr(){return yr().memoizedState}function Gr(e,t,n,a){var s=br();er.flags|=e,s.memoizedState=Qr(1|t,n,{destroy:void 0},void 0===a?null:a)}function Xr(e,t,n,a){var s=yr();a=void 0===a?null:a;var r=s.memoizedState.inst;null!==tr&&null!==a&&ur(a,tr.memoizedState.deps)?s.memoizedState=Qr(t,n,r,a):(er.flags|=e,s.memoizedState=Qr(1|t,n,r,a))}function Jr(e,t){Gr(8390656,8,e,t)}function Zr(e,t){Xr(2048,8,e,t)}function eo(e,t){return Xr(4,2,e,t)}function to(e,t){return Xr(4,4,e,t)}function no(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function ao(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Xr(4,4,no.bind(null,t,e),n)}function so(){}function ro(e,t){var n=yr();t=void 0===t?null:t;var a=n.memoizedState;return null!==t&&ur(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function oo(e,t){var n=yr();t=void 0===t?null:t;var a=n.memoizedState;if(null!==t&&ur(t,a[1]))return a[0];if(a=e(),rr){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[a,t],a}function io(e,t,n){return void 0===n||0!==(1073741824&Zs)?e.memoizedState=t:(e.memoizedState=n,e=Rc(),er.lanes|=e,hc|=e,n)}function lo(e,t,n,a){return Qn(n,t)?n:null!==Ns.current?(e=io(e,n,a),Qn(e,t)||(Vo=!0),e):0===(42&Zs)?(Vo=!0,e.memoizedState=n):(e=Rc(),er.lanes|=e,hc|=e,t)}function co(e,t,n,a,s){var r=W.p;W.p=0!==r&&8>r?r:8;var o=P.T,i={};P.T=i,jo(e,!1,t,n);try{var l=s(),c=P.S;if(null!==c&&c(i,l),null!==l&&"object"===typeof l&&"function"===typeof l.then)wo(e,t,function(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(a.status="rejected",a.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),a}(l,a),Mc());else wo(e,t,a,Mc())}catch(d){wo(e,t,{then:function(){},status:"rejected",reason:d},Mc())}finally{W.p=r,P.T=o}}function uo(){}function ho(e,t,n,a){if(5!==e.tag)throw Error(o(476));var s=mo(e).queue;co(e,s,t,q,null===n?uo:function(){return po(e),n(a)})}function mo(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nr,lastRenderedState:q},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nr,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function po(e){wo(e,mo(e).next.queue,{},Mc())}function fo(){return Ai(Lu)}function go(){return yr().memoizedState}function xo(){return yr().memoizedState}function vo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Mc(),a=Oi(t,e=Ri(n),n);return null!==a&&(Oc(a,t,n),zi(a,t,n)),t={cache:Bs()},void(e.payload=t)}t=t.return}}function bo(e,t,n){var a=Mc();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},ko(e)?No(t,n):null!==(n=Ea(e,t,n,a))&&(Oc(n,e,a),So(n,t,a))}function yo(e,t,n){wo(e,t,n,Mc())}function wo(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(ko(e))No(t,s);else{var r=e.alternate;if(0===e.lanes&&(null===r||0===r.lanes)&&null!==(r=t.lastRenderedReducer))try{var o=t.lastRenderedState,i=r(o,n);if(s.hasEagerState=!0,s.eagerState=i,Qn(i,o))return Ca(e,t,s,0),null===nc&&_a(),!1}catch(l){}if(null!==(n=Ea(e,t,s,a)))return Oc(n,e,a),So(n,t,a),!0}return!1}function jo(e,t,n,a){if(a={lane:2,revertLane:jd(),action:a,hasEagerState:!1,eagerState:null,next:null},ko(e)){if(t)throw Error(o(479))}else null!==(t=Ea(e,n,a,2))&&Oc(t,e,2)}function ko(e){var t=e.alternate;return e===er||null!==t&&t===er}function No(e,t){sr=ar=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function So(e,t,n){if(0!==(4194176&n)){var a=t.lanes;n|=a&=e.pendingLanes,t.lanes=n,ze(e,n)}}var Ao={readContext:Ai,use:jr,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useLayoutEffect:dr,useInsertionEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useSyncExternalStore:dr,useId:dr};Ao.useCacheRefresh=dr,Ao.useMemoCache=dr,Ao.useHostTransitionStatus=dr,Ao.useFormState=dr,Ao.useActionState=dr,Ao.useOptimistic=dr;var _o={readContext:Ai,use:jr,useCallback:function(e,t){return br().memoizedState=[e,void 0===t?null:t],e},useContext:Ai,useEffect:Jr,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Gr(4194308,4,n
2o.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gr(4194308,4,e,t)},useInsertionEffect:function(e,t){Gr(4,2,e,t)},useMemo:function(e,t){var n=br();t=void 0===t?null:t;var a=e();if(rr){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=br();if(void 0!==n){var s=n(t);if(rr){be(!0);try{n(t)}finally{be(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=bo.bind(null,er,e),[a.memoizedState,e]},useRef:function(e){return e={current:e},br().memoizedState=e},useState:function(e){var t=(e=zr(e)).queue,n=yo.bind(null,er,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:so,useDeferredValue:function(e,t){return io(br(),e,t)},useTransition:function(){var e=zr(!1);return e=co.bind(null,er,e.queue,!0,!1),br().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=er,s=br();if(Xa){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===nc)throw Error(o(349));0!==(60&sc)||Er(a,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,Jr(Mr.bind(null,a,r,e),[e]),a.flags|=2048,Qr(9,Pr.bind(null,a,r,n,t),{destroy:void 0},null),n},useId:function(){var e=br(),t=nc.identifierPrefix;if(Xa){var n=Ha;t=":"+t+"R"+(n=(qa&~(1<<32-ye(qa)-1)).toString(32)+n),0<(n=or++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=cr++).toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return br().memoizedState=vo.bind(null,er)}};_o.useMemoCache=kr,_o.useHostTransitionStatus=fo,_o.useFormState=qr,_o.useActionState=qr,_o.useOptimistic=function(e){var t=br();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=jo.bind(null,er,!0,n),n.dispatch=t,[e,t]};var Co={readContext:Ai,use:jr,useCallback:ro,useContext:Ai,useEffect:Zr,useImperativeHandle:ao,useInsertionEffect:eo,useLayoutEffect:to,useMemo:oo,useReducer:Sr,useRef:Kr,useState:function(){return Sr(Nr)},useDebugValue:so,useDeferredValue:function(e,t){return lo(yr(),tr.memoizedState,e,t)},useTransition:function(){var e=Sr(Nr)[0],t=yr().memoizedState;return["boolean"===typeof e?e:wr(e),t]},useSyncExternalStore:Cr,useId:go};Co.useCacheRefresh=xo,Co.useMemoCache=kr,Co.useHostTransitionStatus=fo,Co.useFormState=Hr,Co.useActionState=Hr,Co.useOptimistic=function(e,t){return Tr(yr(),0,e,t)};var Eo={readContext:Ai,use:jr,useCallback:ro,useContext:Ai,useEffect:Zr,useImperativeHandle:ao,useInsertionEffect:eo,useLayoutEffect:to,useMemo:oo,useReducer:_r,useRef:Kr,useState:function(){return _r(Nr)},useDebugValue:so,useDeferredValue:function(e,t){var n=yr();return null===tr?io(n,e,t):lo(n,tr.memoizedState,e,t)},useTransition:function(){var e=_r(Nr)[0],t=yr().memoizedState;return["boolean"===typeof e?e:wr(e),t]},useSyncExternalStore:Cr,useId:go};function Po(e,t,n,a){n=null===(n=n(a,t=e.memoizedState))||void 0===n?t:M({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}Eo.useCacheRefresh=xo,Eo.useMemoCache=kr,Eo.useHostTransitionStatus=fo,Eo.useFormState=$r,Eo.useActionState=$r,Eo.useOptimistic=function(e,t){var n=yr();return null!==tr?Tr(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])};var Mo={isMounted:function(e){return!!(e=e._reactInternals)&&L(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Mc(),s=Ri(a);s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Oi(e,s,a))&&(Oc(t,e,a),zi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Mc(),s=Ri(a);s.tag=1,s.payload=t,void 0!==n&&null!==n&&(s.callback=n),null!==(t=Oi(e,s,a))&&(Oc(t,e,a),zi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Mc(),a=Ri(n);a.tag=2,void 0!==t&&null!==t&&(a.callback=t),null!==(t=Oi(e,a,n))&&(Oc(t,e,n),zi(t,e,n))}};function Ro(e,t,n,a,s,r,o){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(a,r,o):!t.prototype||!t.prototype.isPureReactComponent||(!Kn(n,a)||!Kn(s,r))}function Oo(e,t,n,a){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,a),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Mo.enqueueReplaceState(t,t.state,null)}function zo(e,t){var n=t;if("ref"in t)for(var a in n={},t)"ref"!==a&&(n[a]=t[a]);if(e=e.defaultProps)for(var s in n===t&&(n=M({},n)),e)void 0===n[s]&&(n[s]=e[s]);return n}var To="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Do(e){To(e)}function Lo(e){console.error(e)}function Fo(e){To(e)}function Io(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Uo(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}
2function Bo(e,t,n){return(n=Ri(n)).tag=3,n.payload={element:null},n.callback=function(){Io(e,t)},n}function Wo(e){return(e=Ri(e)).tag=3,e}function qo(e,t,n,a){var s=n.type.getDerivedStateFromError;if("function"===typeof s){var r=a.value;e.payload=function(){return s(r)},e.callback=function(){Uo(t,n,a)}}var o=n.stateNode;null!==o&&"function"===typeof o.componentDidCatch&&(e.callback=function(){Uo(t,n,a),"function"!==typeof s&&(null===kc?kc=new Set([this]):kc.add(this));var e=a.stack;this.componentDidCatch(a.value,{componentStack:null!==e?e:""})})}var Ho=Error(o(461)),Vo=!1;function Yo(e,t,n,a){t.child=null===e?ks(t,null,n,a):js(t,e.child,n,a)}function $o(e,t,n,a,s){n=n.render;var r=t.ref;if("ref"in a){var o={};for(var i in a)"ref"!==i&&(o[i]=a[i])}else o=a;return Si(t),a=hr(e,t,n,o,r,s),i=gr(),null===e||Vo?(Xa&&i&&$a(t),t.flags|=1,Yo(e,t,a,s),t.child):(xr(e,t,s),mi(e,t,s))}function Qo(e,t,n,a,s){if(null===e){var r=n.type;return"function"!==typeof r||Ll(r)||void 0!==r.defaultProps||null!==n.compare?((e=Ul(n.type,null,a,t,t.mode,s)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=r,Ko(e,t,r,a,s))}if(r=e.child,!pi(e,s)){var o=r.memoizedProps;if((n=null!==(n=n.compare)?n:Kn)(o,a)&&e.ref===t.ref)return mi(e,t,s)}return t.flags|=1,(e=Fl(r,a)).ref=t.ref,e.return=t,t.child=e}function Ko(e,t,n,a,s){if(null!==e){var r=e.memoizedProps;if(Kn(r,a)&&e.ref===t.ref){if(Vo=!1,t.pendingProps=a=r,!pi(e,s))return t.lanes=e.lanes,mi(e,t,s);0!==(131072&e.flags)&&(Vo=!0)}}return Zo(e,t,n,a,s)}function Go(e,t,n){var a=t.pendingProps,s=a.children,r=0!==(2&t.stateNode._pendingVisibility),o=null!==e?e.memoizedState:null;if(Jo(e,t),"hidden"===a.mode||r){if(0!==(128&t.flags)){if(a=null!==o?o.baseLanes|n:n,null!==e){for(s=t.child=e.child,r=0;null!==s;)r=r|s.lanes|s.childLanes,s=s.sibling;t.childLanes=r&~a}else t.childLanes=0,t.child=null;return Xo(e,t,a,n)}if(0===(536870912&n))return t.lanes=t.childLanes=536870912,Xo(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xs(0,null!==o?o.cachePool:null),null!==o?As(t,o):_s(),Rs(t)}else null!==o?(Xs(0,o.cachePool),As(t,o),Os(),t.memoizedState=null):(null!==e&&Xs(0,null),_s(),Os());return Yo(e,t,s,n),t.child}function Xo(e,t,n,a){var s=Gs();return s=null===s?null:{parent:Us._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},null!==e&&Xs(0,null),_s(),Rs(t),null!==e&&ki(e,t,a,!0),null}function Jo(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=2097664);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(o(284));null!==e&&e.ref===n||(t.flags|=2097664)}}function Zo(e,t,n,a,s){return Si(t),n=hr(e,t,n,a,void 0,s),a=gr(),null===e||Vo?(Xa&&a&&$a(t),t.flags|=1,Yo(e,t,n,s),t.child):(xr(e,t,s),mi(e,t,s))}function ei(e,t,n,a,s,r){return Si(t),t.updateQueue=null,n=pr(t,a,n,s),mr(e),a=gr(),null===e||Vo?(Xa&&a&&$a(t),t.flags|=1,Yo(e,t,n,r),t.child):(xr(e,t,r),mi(e,t,r))}function ti(e,t,n,a,s){if(Si(t),null===t.stateNode){var r=Oa,o=n.contextType;"object"===typeof o&&null!==o&&(r=Ai(o)),r=new n(a,r),t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,r.updater=Mo,t.stateNode=r,r._reactInternals=t,(r=t.stateNode).props=a,r.state=t.memoizedState,r.refs={},Pi(t),o=n.contextType,r.context="object"===typeof o&&null!==o?Ai(o):Oa,r.state=t.memoizedState,"function"===typeof(o=n.getDerivedStateFromProps)&&(Po(t,n,o,a),r.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(o=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),o!==r.state&&Mo.enqueueReplaceState(r,r.state,null),Fi(t,a,r,s),Li(),r.state=t.memoizedState),"function"===typeof r.componentDidMount&&(t.flags|=4194308),a=!0}else if(null===e){r=t.stateNode;var i=t.memoizedProps,l=zo(n,i);r.props=l;var c=r.context,d=n.contextType;o=Oa,"object"===typeof d&&null!==d&&(o=Ai(d));var u=n.getDerivedStateFromProps;d="function"===typeof u||"function"===typeof r.getSnapshotBeforeUpdate,i=t.pendingProps!==i,d||"function"!==typeof r.UNSAFE_componentWillReceiveProps&&"function"!==typeof r.componentWillReceiveProps||(i||c!==o)&&Oo(t,r,a,o),Ei=!1;var h=t.memoizedState;r.state=h,Fi(t,a,r,s),Li(),c=t.memoizedState,i||h!==c||Ei?("function"===typeof u&&(Po(t,n,u,a),c=t.memoizedState),(l=Ei||Ro(t,n,l,a,h,c,o))?(d||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||("function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"===typeof r.componentDidMount&&(t.flags|=4194308)):("function"===typeof r.componentDidMount&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),r.props=a,r.state=c,r.context=o,a=l):("function"===typeof r.componentDidMount&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,Mi(e,t),d=zo(n,o=t.memoizedProps),r.props=d,u=t.pendingProps,h=r.context,c=n.contextType,l=Oa,"object"===typeof c&&null!==c&&(l=Ai(c)),(c="function"===typeof(i=n.getDerivedStateFromProps)||"function"===typeof r.getSnapshotBeforeUpdate)||"function"!==typeof r.UNSAFE_componentWillReceiveProps&&"function"!==typeof r.componentWillReceiveProps||(o!==u||h!==l)&&Oo(t,r,a,l),Ei=!1,h=t.memoizedState,r.state=h,Fi(t,a,r,s),Li();var m=t.memoizedState;o!==u||h!==m||Ei||null!==e&&null!==e.dependencies&&Ni(e.dependencies)?("function"===typeof i&&(Po(t,n,i,a),m=t.memoizedState),(d=Ei||Ro(t,n,d,a,h,m,l)||null!==e&&null!==e.dependencies&&Ni(e.dependencies))?(c||"function"!==typeof r.UNSAFE_componentWillUpdate&&"function"!==typeof r.componentWillUpdate||("function"===typeof r.componentWillUpdate&&r.componentWillUpdate(a,m,l),"function"===typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(a,m,l)),"function"===typeof r.componentDidUpdate&&(t.flags|=4),"function"===typeof r.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof r.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof r.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=m),r.props=a,r.state=m,r.context=l,a=d):("function"!==typeof r.componentDidUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof r.getSnapshotBeforeUpdate||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,Jo(e,t),a=0!==(128&t.flags),r||a?(r=t.stateNode,n=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render(),t.flags|=1,null!==e&&a?(t.child=js(t,e.child,null,s),t.child=js(t,null,n,s)):Yo(e,t,n,s),t.memoizedState=r.state,e=t.child):e=mi(e,t,s),e}function ni(e,t,n,a){return rs(),t.flags|=256,Yo(e,t,n,a),t.child}var ai={dehydrated:null,treeContext:null,retryLane:0};function si(e){return{baseLanes:e,cachePool:Js()}}
vendor: 4,600 bytes, line 2
2function ri(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=fc),e}function oi(e,t,n){var a,s=t.pendingProps,r=!1,i=0!==(128&t.flags);if((a=i)||(a=(null===e||null!==e.memoizedState)&&0!==(2&Ts.current)),a&&(r=!0,t.flags&=-129),a=0!==(32&t.flags),t.flags&=-33,null===e){if(Xa){if(r?Ms(t):Os(),Xa){var l,c=Ga;if(l=c){e:{for(l=c,c=Za;8!==l.nodeType;){if(!c){c=null;break e}if(null===(l=lu(l.nextSibling))){c=null;break e}}c=l}null!==c?(t.memoizedState={dehydrated:c,treeContext:null!==Wa?{id:qa,overflow:Ha}:null,retryLane:536870912},(l=Dl(18,null,null,0)).stateNode=c,l.return=t,t.child=l,Ka=t,Ga=null,l=!0):l=!1}l||ts(t)}if(null!==(c=t.memoizedState)&&null!==(c=c.dehydrated))return"$!"===c.data?t.lanes=16:t.lanes=536870912,null;zs(t)}return c=s.children,s=s.fallback,r?(Os(),c=li({mode:"hidden",children:c},r=t.mode),s=Bl(s,r,n,null),c.return=t,s.return=t,c.sibling=s,t.child=c,(r=t.child).memoizedState=si(n),r.childLanes=ri(e,a,n),t.memoizedState=ai,s):(Ms(t),ii(t,c))}if(null!==(l=e.memoizedState)&&null!==(c=l.dehydrated)){if(i)256&t.flags?(Ms(t),t.flags&=-257,t=ci(e,t,n)):null!==t.memoizedState?(Os(),t.child=e.child,t.flags|=128,t=null):(Os(),r=s.fallback,c=t.mode,s=li({mode:"visible",children:s.children},c),(r=Bl(r,c,n,null)).flags|=2,s.return=t,r.return=t,s.sibling=r,t.child=s,js(t,e.child,null,n),(s=t.child).memoizedState=si(n),s.childLanes=ri(e,a,n),t.memoizedState=ai,t=r);else if(Ms(t),"$!"===c.data){if(a=c.nextSibling&&c.nextSibling.dataset)var d=a.dgst;a=d,(s=Error(o(419))).stack="",s.digest=a,os({value:s,source:null,stack:null}),t=ci(e,t,n)}else if(Vo||ki(e,t,n,!1),a=0!==(n&e.childLanes),Vo||a){if(null!==(a=nc)){if(0!==(42&(s=n&-n)))s=1;else switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:s=64;break;case 268435456:s=134217728;break;default:s=0}if(0!==(s=0!==(s&(a.suspendedLanes|n))?0:s)&&s!==l.retryLane)throw l.retryLane=s,Pa(e,s),Oc(a,e,s),Ho}"$?"===c.data||Vc(),t=ci(e,t,n)}else"$?"===c.data?(t.flags|=128,t.child=e.child,t=ld.bind(null,e),c._reactRetry=t,t=null):(e=l.treeContext,Ga=lu(c.nextSibling),Ka=t,Xa=!0,Ja=null,Za=!1,null!==e&&(Ua[Ba++]=qa,Ua[Ba++]=Ha,Ua[Ba++]=Wa,qa=e.id,Ha=e.overflow,Wa=t),(t=ii(t,s.children)).flags|=4096);return t}return r?(Os(),r=s.fallback,c=t.mode,d=(l=e.child).sibling,(s=Fl(l,{mode:"hidden",children:s.children})).subtreeFlags=31457280&l.subtreeFlags,null!==d?r=Fl(d,r):(r=Bl(r,c,n,null)).flags|=2,r.return=t,s.return=t,s.sibling=r,t.child=s,s=r,r=t.child,null===(c=e.child.memoizedState)?c=si(n):(null!==(l=c.cachePool)?(d=Us._currentValue,l=l.parent!==d?{parent:d,pool:d}:l):l=Js(),c={baseLanes:c.baseLanes|n,cachePool:l}),r.memoizedState=c,r.childLanes=ri(e,a,n),t.memoizedState=ai,s):(Ms(t),e=(n=e.child).sibling,(n=Fl(n,{mode:"visible",children:s.children})).return=t,n.sibling=null,null!==e&&(null===(a=t.deletions)?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function ii(e,t){return(t=li({mode:"visible",children:t},e.mode)).return=e,e.child=t}function li(e,t){return Wl(e,t,0,null)}function ci(e,t,n){return js(t,e.child,null,n),(e=ii(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function di(e,t,n){e.lanes|=t;var a=e.alternate;null!==a&&(a.lanes|=t),wi(e.return,t,n)}function ui(e,t,n,a,s){var r=e.memoizedState;null===r?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=n,r.tailMode=s)}function hi(e,t,n){var a=t.pendingProps,s=a.revealOrder,r=a.tail;if(Yo(e,t,a.children,n),0!==(2&(a=Ts.current)))a=1&a|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&di(e,n,t);else if(19===e.tag)di(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(Q(Ts,a),s){case"forwards":for(n=t.child,s=null;null!==n;)null!==(e=n.alternate)&&null===Ds(e)&&(s=n),n=n.sibling;null===(n=s)?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ui(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;null!==s;){if(null!==(e=s.alternate)&&null===Ds(e)){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ui(t,!0,n,null,r);break;case"together":ui(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}
2function mi(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),hc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(ki(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Fl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Fl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function pi(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ni(e))}function fi(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Vo=!0;else{if(!pi(e,n)&&0===(128&t.flags))return Vo=!1,function(e,t,n){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),bi(t,Us,e.memoizedState.cache),rs();break;case 27:case 5:te(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:bi(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(null!==a)return null!==a.dehydrated?(Ms(t),t.flags|=128,null):0!==(n&t.child.childLanes)?oi(e,t,n):(Ms(t),null!==(e=mi(e,t,n))?e.sibling:null);Ms(t);break;case 19:var s=0!==(128&e.flags);if((a=0!==(n&t.childLanes))||(ki(e,t,n,!1),a=0!==(n&t.childLanes)),s){if(a)return hi(e,t,n);t.flags|=128}if(null!==(s=t.memoizedState)&&(s.rendering=null,s.tail=null,s.lastEffect=null),Q(Ts,Ts.current),a)break;return null;case 22:case 23:return t.lanes=0,Go(e,t,n);case 24:bi(t,Us,e.memoizedState.cache)}return mi(e,t,n)}(e,t,n);Vo=0!==(131072&e.flags)}else Vo=!1,Xa&&0!==(1048576&t.flags)&&Ya(t,Ia,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,s=a._init;if(a=s(a._payload),t.type=a,"function"!==typeof a){if(void 0!==a&&null!==a){if((s=a.$$typeof)===x){t.tag=11,t=$o(null,t,a,e,n);break e}if(s===y){t.tag=14,t=Qo(null,t,a,e,n);break e}}throw t=_(a)||a,Error(o(306,t,""))}Ll(a)?(e=zo(a,e),t.tag=1,t=ti(null,t,a,e,n)):(t.tag=0,t=Zo(null,t,a,e,n))}return t;case 0:return Zo(e,t,t.type,t.pendingProps,n);case 1:return ti(e,t,a=t.type,s=zo(a,t.pendingProps),n);case 3:e:{if(Z(t,t.stateNode.containerInfo),null===e)throw Error(o(387));var r=t.pendingProps;a=(s=t.memoizedState).element,Mi(e,t),Fi(t,r,null,n);var i=t.memoizedState;if(r=i.cache,bi(t,Us,r),r!==s.cache&&ji(t,[Us],n,!0),Li(),r=i.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=ni(e,t,r,n);break e}if(r!==a){os(a=Ta(Error(o(424)),t)),t=ni(e,t,r,n);break e}for(Ga=lu(t.stateNode.containerInfo.firstChild),Ka=t,Xa=!0,Ja=null,Za=!0,n=ks(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(rs(),r===a){t=mi(e,t,n);break e}Yo(e,t,r,n)}t=t.child}return t;case 26:return Jo(e,t),null===e?(n=xu(t.type,null,t.pendingProps,null))?t.memoizedState=n:Xa||(n=t.type,e=t.pendingProps,(a=Gd(X.current).createElement(n))[Fe]=t,a[Ie]=e,$d(a,n,e),Xe(a),t.stateNode=a):t.memoizedState=xu(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),null===e&&Xa&&(a=t.stateNode=du(t.type,t.pendingProps,X.current),Ka=t,Za=!0,Ga=lu(a.firstChild)),a=t.pendingProps.children,null!==e||Xa?Yo(e,t,a,n):t.child=js(t,null,a,n),Jo(e,t),t.child;case 5:return null===e&&Xa&&((s=a=Ga)&&(null!==(a=function(e,t,n,a){for(;1===e.nodeType;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(a){if(!e[Ve])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(r=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(null==s.href?null:s.href)||e.getAttribute("crossorigin")!==(null==s.crossOrigin?null:s.crossOrigin)||e.getAttribute("title")!==(null==s.title?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((r=e.getAttribute("src"))!==(null==s.src?null:s.src)||e.getAttribute("type")!==(null==s.type?null:s.type)||e.getAttribute("crossorigin")!==(null==s.crossOrigin?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var r=null==s.name?null:""+s.name;if("hidden"===s.type&&e.getAttribute("name")===r)return e}if(null===(e=lu(e.nextSibling)))break}return null}(a,t.type,t.pendingProps,Za))?(t.stateNode=a,Ka=t,Ga=lu(a.firstChild),Za=!1,s=!0):s=!1),s||ts(t)),te(t),s=t.type,r=t.pen
vendor: 25,909 bytes, line 2
2dingProps,i=null!==e?e.memoizedProps:null,a=r.children,Zd(s,r)?a=null:null!==i&&Zd(s,i)&&(t.flags|=32),null!==t.memoizedState&&(s=hr(e,t,fr,null,null,n),Lu._currentValue=s),Jo(e,t),Yo(e,t,a,n),t.child;case 6:return null===e&&Xa&&((e=n=Ga)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=lu(e.nextSibling)))return null}return e}(n,t.pendingProps,Za))?(t.stateNode=n,Ka=t,Ga=null,e=!0):e=!1),e||ts(t)),null;case 13:return oi(e,t,n);case 4:return Z(t,t.stateNode.containerInfo),a=t.pendingProps,null===e?t.child=js(t,null,a,n):Yo(e,t,a,n),t.child;case 11:return $o(e,t,t.type,t.pendingProps,n);case 7:return Yo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Yo(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,bi(t,t.type,a.value),Yo(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Si(t),a=a(s=Ai(s)),t.flags|=1,Yo(e,t,a,n),t.child;case 14:return Qo(e,t,t.type,t.pendingProps,n);case 15:return Ko(e,t,t.type,t.pendingProps,n);case 19:return hi(e,t,n);case 22:return Go(e,t,n);case 24:return Si(t),a=Ai(Us),null===e?(null===(s=Gs())&&(s=nc,r=Bs(),s.pooledCache=r,r.refCount++,null!==r&&(s.pooledCacheLanes|=n),s=r),t.memoizedState={parent:a,cache:s},Pi(t),bi(t,Us,s)):(0!==(e.lanes&n)&&(Mi(e,t),Fi(t,null,null,n),Li()),s=e.memoizedState,r=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=s),bi(t,Us,a)):(a=r.cache,bi(t,Us,a),a!==s.cache&&ji(t,[Us],n,!0))),Yo(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}var gi=Y(null),xi=null,vi=null;function bi(e,t,n){Q(gi,t._currentValue),t._currentValue=n}function yi(e){e._currentValue=gi.current,$(gi)}function wi(e,t,n){for(;null!==e;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==a&&(a.childLanes|=t)):null!==a&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function ji(e,t,n,a){var s=e.child;for(null!==s&&(s.return=e);null!==s;){var r=s.dependencies;if(null!==r){var i=s.child;r=r.firstContext;e:for(;null!==r;){var l=r;r=s;for(var c=0;c<t.length;c++)if(l.context===t[c]){r.lanes|=n,null!==(l=r.alternate)&&(l.lanes|=n),wi(r.return,n,e),a||(i=null);break e}r=l.next}}else if(18===s.tag){if(null===(i=s.return))throw Error(o(341));i.lanes|=n,null!==(r=i.alternate)&&(r.lanes|=n),wi(i,n,e),i=null}else i=s.child;if(null!==i)i.return=s;else for(i=s;null!==i;){if(i===e){i=null;break}if(null!==(s=i.sibling)){s.return=i.return,i=s;break}i=i.return}s=i}}function ki(e,t,n,a){e=null;for(var s=t,r=!1;null!==s;){if(!r)if(0!==(524288&s.flags))r=!0;else if(0!==(262144&s.flags))break;if(10===s.tag){var i=s.alternate;if(null===i)throw Error(o(387));if(null!==(i=i.memoizedProps)){var l=s.type;Qn(s.pendingProps.value,i.value)||(null!==e?e.push(l):e=[l])}}else if(s===J.current){if(null===(i=s.alternate))throw Error(o(387));i.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(null!==e?e.push(Lu):e=[Lu])}s=s.return}null!==e&&ji(t,e,n,a),t.flags|=262144}function Ni(e){for(e=e.firstContext;null!==e;){if(!Qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Si(e){xi=e,vi=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ai(e){return Ci(xi,e)}function _i(e,t){return null===xi&&Si(e),Ci(e,t)}function Ci(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===vi){if(null===e)throw Error(o(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return n}var Ei=!1;function Pi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mi(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 Ri(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Oi(e,t,n){var a=e.updateQueue;if(null===a)return null;if(a=a.shared,0!==(2&tc)){var s=a.pending;return null===s?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Ra(e),Ma(e,null,n),t}return Ca(e,a,t,n),Ra(e)}function zi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194176&n))){var a=t.lanes;n|=a&=e.pendingLanes,t.lanes=n,ze(e,n)}}function Ti(e,t){var n=e.updateQueue,a=e.alternate;if(null!==a&&n===(a=a.updateQueue)){var s=null,r=null;if(null!==(n=n.firstBaseUpdate)){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===r?s=r=o:r=r.next=o,n=n.next}while(null!==n);null===r?s=r=t:r=r.next=t}else s=r=t;return n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Di=!1;function Li(){if(Di){if(null!==Ys)throw Ys}}function Fi(e,t,n,a){Di=!1;var s=e.updateQueue;Ei=!1;var r=s.firstBaseUpdate,o=s.lastBaseUpdate,i=s.shared.pending;if(null!==i){s.shared.pending=null;var l=i,c=l.next;l.next=null,null===o?r=c:o.next=c,o=l;var d=e.alternate;null!==d&&((i=(d=d.updateQueue).lastBaseUpdate)!==o&&(null===i?d.firstBaseUpdate=c:i.next=c,d.lastBaseUpdate=l))}if(null!==r){var u=s.baseState;for(o=0,d=c=l=null,i=r;;){var h=-536870913&i.lane,m=h!==i.lane;if(m?(sc&h)===h:(a&h)===h){0!==h&&h===Vs&&(Di=!0),null!==d&&(d=d.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var p=e,f=i;h=t;var g=n;switch(f.tag){case 1:if("function"===typeof(p=f.payload)){u=p.call(g,u,h);break e}u=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null===(h="function"===typeof(p=f.payload)?p.call(g,u,h):p)||void 0===h)break e;u=M({},u,h);break e;case 2:Ei=!0}}null!==(h=i.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=s.callbacks)?s.callbacks=[h]:m.push(h))}else m={lane:h,tag:i.tag,payload:i.payload,callback:i.callback,next:null},null===d?(c=d=m,l=u):d=d.next=m,o|=h;if(null===(i=i.next)){if(null===(i=s.shared.pending))break;i=(m=i).next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}null===d&&(l=u),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,null===r&&(s.shared.lanes=0),hc|=o,e.lanes=o,e.memoizedState=u}}function Ii(e,t){if("function"!==typeof e)throw Error(o(191,e));e.call(t)}function Ui(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Ii(n[e],t)}function Bi(e,t){try{var n=t.updateQueue,a=null!==n?n.lastEffect:null;if(null!==a){var s=a.next;n=s;do{if((n.tag&e)===e){a=void 0;var r=n.create,o=n.inst;a=r(),o.destroy=a}n=n.next}while(n!==s)}}catch(i){sd(t,t.return,i)}}function Wi(e,t,n){try{var a=t.updateQueue,s=null!==a?a.lastEffect:null;if(null!==s){var r=s.next;a=r;do{if((a.tag&e)===e){var o=a.inst,i=o.destroy;if(void 0!==i){o.destroy=void 0,s=t;var l=n;try{i()}catch(c){sd(s,l,c)}}}a=a.next}while(a!==r)}}catch(c){sd(t,t.return,c)}}function qi(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Ui(t,n)}catch(a){sd(e,e.return,a)}}}function Hi(e,t,n){n.props=zo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){sd(e,t,a)}}function Vi(e,t){try{var n=e.ref;if(null!==n){var a=e.stateNode;switch(e.tag){case 26:case 27:case 5:var s=a;break;default:s=a}"function"===typeof n?e.refCleanup=n(s):n.current=s}}catch(r){sd(e,t,r)}}function Yi(e,t){var n=e.ref,a=e.refCleanup;if(null!==n)if("function"===typeof a)try{a()}catch(s){sd(e,t,s)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(r){sd(e,t,r)}else n.current=null}function $i(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){sd(e,e.return,s)}}function Qi(e,t,n){try{var a=e.stateNode;!function(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,i=null,l=null,c=null,d=null,u=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":c=h;default:a.hasOwnProperty(p)||Vd(e,t,p,null,a,h)}}for(var m in a){var p=a[m];if(h=n[m],a.hasOwnProperty(m)&&(null!=p||null!=h))switch(m){case"type":r=p;break;case"name":s=p;break;case"checked":d=p;break;case"defaultChecked":u=p;break;case"value":i=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(o(137,t));break;default:p!==h&&Vd(e,t,m,p,a,h)}}return void gt(e,i,l,c,d,u,r,s);case"select":for(r in p=i=l=m=null,n)if(c=n[r],n.hasOwnProperty(r)&&null!=c)switch(r){case"value":break;case"multiple":p=c;default:a.hasOwnProperty(r)||Vd(e,t,r,null,a,c)}for(s in a)if(r=a[s],c=n[s],a.hasOwnProperty(s)&&(null!=r||null!=c))switch(s){case"value":m=r;break;case"defaultValue":l=r;break;case"multiple":i=r;default:r!==c&&Vd(e,t,s,r,a,c)}return t=l,n=i,a=p,void(null!=m?bt(e,!!n,m,!1):!!a!==!!n&&(null!=t?bt(e,!!n,t,!0):bt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=m=null,n)if(s=n[l],n.hasOwnProperty(l)&&null!=s&&!a.hasOwnProperty(l))switch(l){case"value":case"children":break;default:Vd(e,t,l,null,a,s)}for(i in a)if(s=a[i],r=n[i],a.hasOwnProperty(i)&&(null!=s||null!=r))switch(i){case"value":m=s;break;case"defaultValue":p=s;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=s)throw Error(o(91));break;default:s!==r&&Vd(e,t,i,s,a,r)}return void yt(e,m,p);case"option":for(var f in n)if(m=n[f],n.hasOwnProperty(f)&&null!=m&&!a.hasOwnProperty(f))if("selected"===f)e.selected=!1;else Vd(e,t,f,null,a,m);for(c in a)if(m=a[c],p=n[c],a.hasOwnProperty(c)&&m!==p&&(null!=m||null!=p))if("selected"===c)e.selected=m&&"function"!==typeof m&&"symbol"!==typeof m;else Vd(e,t,c,m,a,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)m=n[g],n.hasOwnProperty(g)&&null!=m&&!a.hasOwnProperty(g)&&Vd(e,t,g,null,a,m);for(d in a)if(m=a[d],p=n[d],a.hasOwnProperty(d)&&m!==p&&(null!=m||null!=p))switch(d){case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(o(137,t));break;default:Vd(e,t,d,m,a,p)}return;default:if(At(t)){for(var x in n)m=n[x],n.hasOwnProperty(x)&&void 0!==m&&!a.hasOwnProperty(x)&&Yd(e,t,x,void 0,a,m);for(u in a)m=a[u],p=n[u],!a.hasOwnProperty(u)||m===p||void 0===m&&void 0===p||Yd(e,t,u,m,a,p);return}}for(var v in n)m=n[v],n.hasOwnProperty(v)&&null!=m&&!a.hasOwnProperty(v)&&Vd(e,t,v,null,a,m);for(h in a)m=a[h],p=n[h],!a.hasOwnProperty(h)||m===p||null==m&&null==p||Vd(e,t,h,m,a,p)}(a,e.type,n,t),a[Ie]=t}catch(s){sd(e,e.return,s)}}function Ki(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag||4===e.tag}function Gi(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Ki(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&27!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Xi(e,t,n){var a=e.tag;if(5===a||6===a)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Hd));else if(4!==a&&27!==a&&null!==(e=e.child))for(Xi(e,t,n),e=e.sibling;null!==e;)Xi(e,t,n),e=e.sibling}function Ji(e,t,n){var a=e.tag;if(5===a||6===a)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==a&&27!==a&&null!==(e=e.child))for(Ji(e,t,n),e=e.sibling;null!==e;)Ji(e,t,n),e=e.sibling}var Zi=!1,el=!1,tl=!1,nl="function"===typeof WeakSet?WeakSet:Set,al=null,sl=!1;function rl(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),4&a&&Bi(5,n);break;case 1:if(vl(e,n),4&a)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){sd(n,n.return,i)}else{var s=zo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){sd(n,n.return,l)}}64&a&&qi(n),512&a&&Vi(n,n.return);break;case 3:if(vl(e,n),64&a&&null!==(a=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:e=n.child.stateNode}try{Ui(a,e)}catch(i){sd(n,n.return,i)}}break;case 26:vl(e,n),512&a&&Vi(n,n.return);break;case 27:case 5:vl(e,n),null===t&&4&a&&$i(n),512&a&&Vi(n,n.return);break;case 12:default:vl(e,n);break;case 13:vl(e,n),4&a&&ul(e,n);break;case 22:if(!(s=null!==n.memoizedState||Zi)){t=null!==t&&null!==t.memoizedState||el;var r=Zi,o=el;Zi=s,(el=t)&&!o?yl(e,n,0!==(8772&n.subtreeFlags)):vl(e,n),Zi=r,el=o}512&a&&("manual"===n.memoizedProps.mode?Vi(n,n.return):Yi(n,n.return))}}function ol(e){var t=e.alternate;null!==t&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,ll=!1;function cl(e,t,n){for(n=n.child;null!==n;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(ve&&"function"===typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(xe,n)}catch(o){}switch(n.tag){case 26:el||Yi(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:el||Yi(n,t);var a=il,s=ll;for(il=n.stateNode,cl(e,t,n),t=(n=n.stateNode).attributes;t.length;)n.removeAttributeNode(t[0]);Ye(n),il=a,ll=s;break;case 5:el||Yi(n,t);case 6:s=il;var r=ll;if(il=null,cl(e,t,n),ll=r,null!==(il=s))if(ll)try{e=il,a=n.stateNode,8===e.nodeType?e.parentNode.removeChild(a):e.removeChild(a)}catch(i){sd(n,t,i)}else try{il.removeChild(n.stateNode)}catch(i){sd(n,t,i)}break;case 18:null!==il&&(ll?(t=il,n=n.stateNode,8===t.nodeType?ou(t.parentNode,n):1===t.nodeType&&ou(t,n),gh(t)):ou(il,n.stateNode));break;case 4:a=il,s=ll,il=n.stateNode.containerInfo,ll=!0,cl(e,t,n),il=a,ll=s;break;case 0:case 11:case 14:case 15:el||Wi(2,n,t),el||Wi(4,n,t),cl(e,t,n);break;case 1:el||(Yi(n,t),"function"===typeof(a=n.stateNode).componentWillUnmount&&Hi(n,t,a)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:el||Yi(n,t),el=(a=el)||null!==n.memoizedState,cl(e,t,n),el=a;break;default:cl(e,t,n)}}function ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{gh(e)}catch(n){sd(t,t.return,n)}}function hl(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new nl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new nl),t;default:throw Error(o(435,e.tag))}}(e);t.forEach(function(t){var a=cd.bind(null,e,t);n.has(t)||(n.add(t),t.then(a,a))})}function ml(e,t){var n=t.deletions;if(null!==n)for(var a=0;a<n.length;a++){var s=n[a],r=e,i=t,l=i;e:for(;null!==l;){switch(l.tag){case 27:case 5:il=l.stateNode,ll=!1;break e;case 3:case 4:il=l.stateNode.containerInfo,ll=!0;break e}l=l.return}if(null===il)throw Error(o(160));dl(r,i,s),il=null,ll=!1,null!==(r=s.alternate)&&(r.return=null),s.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}var pl=null;function fl(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ml(t,e),gl(e),4&a&&(Wi(3,e,e.return),Bi(3,e),Wi(5,e,e.return));break;case 1:ml(t,e),gl(e),512&a&&(el||null===n||Yi(n,n.return)),64&a&&Zi&&(null!==(e=e.updateQueue)&&(null!==(a=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?a:n.concat(a))));break;case 26:var s=pl;if(ml(t,e),gl(e),512&a&&(el||null===n||Yi(n,n.return)),4&a){var r=null!==n?n.memoizedState:null;if(a=e.memoizedState,null===n)if(null===a)if(null===e.stateNode){e:{a=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":(!(r=s.getElementsByTagName("title")[0])||r[Ve]||r[Fe]||"http://www.w3.org/2000/svg"===r.namespaceURI||r.hasAttribute("itemprop"))&&(r=s.createElement(a),s.head.insertBefore(r,s.querySelector("head > title"))),$d(r,a,n),r[Fe]=e,Xe(r),a=r;break e;case"link":var i=Cu("link","href",s).get(a+(n.href||""));if(i)for(var l=0;l<i.length;l++)if((r=i[l]).getAttribute("href")===(null==n.href?null:n.href)&&r.getAttribute("rel")===(null==n.rel?null:n.rel)&&r.getAttribute("title")===(null==n.title?null:n.title)&&r.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){i.splice(l,1);break t}$d(r=s.createElement(a),a,n),s.head.appendChild(r);break;case"meta":if(i=Cu("meta","content",s).get(a+(n.content||"")))for(l=0;l<i.length;l++)if((r=i[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&r.getAttribute("name")===(null==n.name?null:n.name)&&r.getAttribute("property")===(null==n.property?null:n.property)&&r.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&r.getAttribute("charset")===(null==n.charSet?null:n.charSet)){i.splice(l,1);break t}$d(r=s.createElement(a),a,n),s.head.appendChild(r);break;default:throw Error(o(468,a))}r[Fe]=e,Xe(r),a=r}e.stateNode=a}else Eu(s,e.type,e.stateNode);else e.stateNode=ku(s,a,e.memoizedProps);else r!==a?(null===r?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):r.count--,null===a?Eu(s,e.type,e.stateNode):ku(s,a,e.memoizedProps)):null===a&&null!==e.stateNode&&Qi(e,e.memoizedProps,n.memoizedProps)}break;case 27:if(4&a&&null===e.alternate){s=e.stateNode,r=e.memoizedProps;try{for(var c=s.firstChild;c;){var d=c.nextSibling,u=c.nodeName;c[Ve]||"HEAD"===u||"BODY"===u||"SCRIPT"===u||"STYLE"===u||"LINK"===u&&"stylesheet"===c.rel.toLowerCase()||s.removeChild(c),c=d}for(var h=e.type,m=s.attributes;m.length;)s.removeAttributeNode(m[0]);$d(s,h,r),s[Fe]=e,s[Ie]=r}catch(f){sd(e,e.return,f)}}case 5:if(ml(t,e),gl(e),512&a&&(el||null===n||Yi(n,n.return)),32&e.flags){s=e.stateNode;try{jt(s,"")}catch(f){sd(e,e.return,f)}}4&a&&null!=e.stateNode&&Qi(e,s=e.memoizedProps,null!==n?n.memoizedProps:s),1024&a&&(tl=!0);break;case 6:if(ml(t,e),gl(e),4&a){if(null===e.stateNode)throw Error(o(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(f){sd(e,e.return,f)}}break;case 3:if(_u=null,s=pl,pl=mu(t.containerInfo),ml(t,e),pl=s,gl(e),4&a&&null!==n&&n.memoizedState.isDehydrated)try{gh(t.containerInfo)}catch(f){sd(e,e.return,f)}tl&&(tl=!1,xl(e));break;case 4:a=pl,pl=mu(e.stateNode.containerInfo),ml(t,e),gl(e),pl=a;break;case 12:ml(t,e),gl(e);break;case 13:ml(t,e),gl(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(yc=le()),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,hl(e,a)));break;case 22:if(512&a&&(el||null===n||Yi(n,n.return)),c=null!==e.memoizedState,d=null!==n&&null!==n.memoizedState,Zi=(u=Zi)||c,el=(h=el)||d,ml(t,e),el=h,Zi=u,gl(e),(t=e.stateNode)._current=e,t._visibility&=-3,t._visibility|=2&t._pendingVisibility,8192&a&&(t._visibility=c?-2&t._visibility:1|t._visibility,c&&(t=Zi||el,null===n||d||t||bl(e)),null===e.memoizedProps||"manual"!==e.memoizedProps.mode))e:for(n=null,t=e;;){if(5===t.tag||26===t.tag||27===t.tag){if(null===n){d=n=t;try{if(s=d.stateNode,c)"function"===typeof(r=s.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{i=d.stateNode;var p=void 0!==(l=d.memoizedProps.style)&&null!==l&&l.hasOwnProperty("display")?l.display:null;i.style.display=null==p||"boolean"===typeof p?"":(""+p).trim()}}catch(f){sd(d,d.return,f)}}}else if(6===t.tag){if(null===n){d=t;try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(f){sd(d,d.return,f)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&a&&(null!==(a=e.updateQueue)&&(null!==(n=a.retryQueue)&&(a.retryQueue=null,hl(e,n))));break;case 19:ml(t,e),gl(e),4&a&&(null!==(a=e.updateQueue)&&(e.updateQueue=null,hl(e,a)));break;case 21:break;default:ml(t,e),gl(e)}}function gl(e){var t=e.flags;if(2&t){try{if(27!==e.tag){e:{for(var n=e.return;null!==n;){if(Ki(n)){var a=n;break e}n=n.return}throw Error(o(160))}switch(a.tag){case 27:var s=a.stateNode;Ji(e,Gi(e),s);break;case 5:var r=a.stateNode;32&a.flags&&(jt(r,""),a.flags&=-33),Ji(e,Gi(e),r);break;case 3:case 4:var i=a.stateNode.containerInfo;Xi(e,Gi(e),i);break;default:throw Error(o(161))}}}catch(l){sd(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function xl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;xl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)rl(e,t.alternate,t),t=t.sibling}function bl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wi(4,t,t.return),bl(t);break;case 1:Yi(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&Hi(t,t.return,n),bl(t);break;case 26:case 27:case 5:Yi(t,t.return),bl(t);break;case 22:Yi(t,t.return),null===t.memoizedState&&bl(t);break;default:bl(t)}e=e.sibling}}function yl(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var a=t.alternate,s=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:yl(s,r,n),Bi(4,r);break;case 1:if(yl(s,r,n),"function"===typeof(s=(a=r).stateNode).componentDidMount)try{s.componentDidMount()}catch(c){sd(a,a.return,c)}if(null!==(s=(a=r).updateQueue)){var i=a.stateNode;try{var l=s.shared.hiddenCallbacks;if(null!==l)for(s.shared.hiddenCallbacks=null,s=0;s<l.length;s++)Ii(l[s],i)}catch(c){sd(a,a.return,c)}}n&&64&o&&qi(r),Vi(r,r.return);break;case 26:case 27:case 5:yl(s,r,n),n&&null===a&&4&o&&$i(r),Vi(r,r.return);break;case 12:default:yl(s,r,n);break;case 13:yl(s,r,n),n&&4&o&&ul(s,r);break;case 22:null===r.memoizedState&&yl(s,r,n),Vi(r,r.return)}t=t.sibling}}function wl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ws(n))}function jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ws(e))}function kl(e,t,n,a){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Nl(e,t,n,a),t=t.sibling}function Nl(e,t,n,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,a),2048&s&&Bi(9,t);break;case 3:kl(e,t,n,a),2048&s&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ws(e)));break;case 12:if(2048&s){kl(e,t,n,a),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,i=r.onPostCommit;"function"===typeof i&&i(o,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){sd(t,t.return,l)}}else kl(e,t,n,a);break;case 23:break;case 22:r=t.stateNode,null!==t.memoizedState?4&r._visibility?kl(e,t,n,a):Al(e,t):4&r._visibility?kl(e,t,n,a):(r._visibility|=4,Sl(e,t,n,a,0!==(10256&t.subtreeFlags))),2048&s&&wl(t.alternate,t);break;case 24:kl(e,t,n,a),2048&s&&jl(t.alternate,t);break;default:kl(e,t,n,a)}}function Sl(e,t,n,a,s){for(s=s&&0!==(10256&t.subtreeFlags),t=t.child;null!==t;){var r=e,o=t,i=n,l=a,c=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(r,o,i,l,s),Bi(8,o);break;case 23:break;case 22:var d=o.stateNode;null!==o.memoizedState?4&d._visibility?Sl(r,o,i,l,s):Al(r,o):(d._visibility|=4,Sl(r,o,i,l,s)),s&&2048&c&&wl(o.alternate,o);break;case 24:Sl(r,o,i,l,s),s&&2048&c&&jl(o.alternate,o);break;default:Sl(r,o,i,l,s)}t=t.sibling}}function Al(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,a=t,s=a.flags;switch(a.tag){case 22:Al(n,a),2048&s&&wl(a.alternate,a);break;case 24:Al(n,a),2048&s&&jl(a.alternate,a);break;default:Al(n,a)}t=t.sibling}}var _l=8192;function Cl(e){if(e.subtreeFlags&_l)for(e=e.child;null!==e;)El(e),e=e.sibling}function El(e){switch(e.tag){case 26:Cl(e),e.flags&_l&&null!==e.memoizedState&&function(e,t,n){if(null===Mu)throw Error(o(475));var a=Mu;if("stylesheet"===t.type&&("string"!==typeof n.media||!1!==matchMedia(n.media).matches)&&0===(4&t.state.loading)){if(null===t.instance){var s=vu(n.href),r=e.querySelector(bu(s));if(r)return null!==(e=r._p)&&"object"===typeof e&&"function"===typeof e.then&&(a.count++,a=Ou.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=r,void Xe(r);r=e.ownerDocument||e,n=yu(n),(s=uu.get(s))&&Su(n,s),Xe(r=r.createElement("link"));var i=r;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),$d(r,"link",n),t.instance=r}null===a.stylesheets&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&0===(3&t.state.loading)&&(a.count++,t=Ou.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}(pl,e.memoizedState,e.memoizedProps);break;case 5:default:Cl(e);break;case 3:case 4:var t=pl;pl=mu(e.stateNode.containerInfo),Cl(e),pl=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=_l,_l=16777216,Cl(e),_l=t):Cl(e))}}function Pl(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Ml(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var a=t[n];al=a,zl(a,e)}Pl(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ml(e),2048&e.flags&&Wi(9,e,e.return);break;case 3:case 12:default:Ml(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&4&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-5,Ol(e)):Ml(e)}}function Ol(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var a=t[n];al=a,zl(a,e)}Pl(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:Wi(8,t,t.return),Ol(t);break;case 22:4&(n=t.stateNode)._visibility&&(n._visibility&=-5,Ol(t));break;default:Ol(t)}
2e=e.sibling}}function zl(e,t){for(;null!==al;){var n=al;switch(n.tag){case 0:case 11:case 15:Wi(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var a=n.memoizedState.cachePool.pool;null!=a&&a.refCount++}break;case 24:Ws(n.memoizedState.cache)}if(null!==(a=n.child))a.return=n,al=a;else e:for(n=e;null!==al;){var s=(a=al).sibling,r=a.return;if(ol(a),a===n){al=null;break e}if(null!==s){s.return=r,al=s;break e}al=r}}}function Tl(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dl(e,t,n,a){return new Tl(e,t,n,a)}function Ll(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Fl(e,t){var n=e.alternate;return null===n?((n=Dl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=31457280&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Il(e,t){e.flags&=31457282;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ul(e,t,n,a,s,r){var i=0;if(a=e,"function"===typeof e)Ll(e)&&(i=1);else if("string"===typeof e)i=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,K.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case u:return Bl(n.children,s,r,t);case h:i=8,s|=24;break;case m:return(e=Dl(12,n,t,2|s)).elementType=m,e.lanes=r,e;case v:return(e=Dl(13,n,t,s)).elementType=v,e.lanes=r,e;case b:return(e=Dl(19,n,t,s)).elementType=b,e.lanes=r,e;case j:return Wl(n,s,r,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case p:case g:i=10;break e;case f:i=9;break e;case x:i=11;break e;case y:i=14;break e;case w:i=16,a=null;break e}i=29,n=Error(o(130,null===e?"null":typeof e,"")),a=null}return(t=Dl(i,n,t,s)).elementType=e,t.type=a,t.lanes=r,t}function Bl(e,t,n,a){return(e=Dl(7,e,a,t)).lanes=n,e}function Wl(e,t,n,a){(e=Dl(22,e,a,t)).elementType=j,e.lanes=n;var s={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=s._current;if(null===e)throw Error(o(456));if(0===(2&s._pendingVisibility)){var t=Pa(e,2);null!==t&&(s._pendingVisibility|=2,Oc(t,e,2))}},attach:function(){var e=s._current;if(null===e)throw Error(o(456));if(0!==(2&s._pendingVisibility)){var t=Pa(e,2);null!==t&&(s._pendingVisibility&=-3,Oc(t,e,2))}}};return e.stateNode=s,e}function ql(e,t,n){return(e=Dl(6,e,null,t)).lanes=n,e}function Hl(e,t,n){return(t=Dl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vl(e){e.flags|=4}function Yl(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!Pu(t)){if(null!==(t=Es.current)&&((4194176&sc)===sc?null!==Ps:(62914560&sc)!==sc&&0===(536870912&sc)||t!==Ps))throw ms=cs,ls;e.flags|=8192}}function $l(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Pe():536870912,e.lanes|=t,gc|=t)}function Ql(e,t){if(!Xa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;null!==n;)null!==n.alternate&&(a=n),n=n.sibling;null===a?t||null===e.tail?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Kl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,a=0;if(t)for(var s=e.child;null!==s;
vendor: 14,244 bytes, line 2
2)n|=s.lanes|s.childLanes,a|=31457280&s.subtreeFlags,a|=31457280&s.flags,s.return=e,s=s.sibling;else for(s=e.child;null!==s;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Gl(e,t,n){var a=t.pendingProps;switch(Qa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return Kl(t),null;case 3:return n=t.stateNode,a=null,null!==e&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),yi(Us),ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ss(t)?Vl(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==Ja&&(Tc(Ja),Ja=null))),Kl(t),null;case 26:return n=t.memoizedState,null===e?(Vl(t),null!==n?(Kl(t),Yl(t,n)):(Kl(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Vl(t),Kl(t),Yl(t,n)):(Kl(t),t.flags&=-16777217):(e.memoizedProps!==a&&Vl(t),Kl(t),t.flags&=-16777217),null;case 27:ne(t),n=X.current;var s=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==a&&Vl(t);else{if(!a){if(null===t.stateNode)throw Error(o(166));return Kl(t),null}e=K.current,ss(t)?ns(t):(e=du(s,a,n),t.stateNode=e,Vl(t))}return Kl(t),null;case 5:if(ne(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==a&&Vl(t);else{if(!a){if(null===t.stateNode)throw Error(o(166));return Kl(t),null}if(e=K.current,ss(t))ns(t);else{switch(s=Gd(X.current),e){case 1:e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof a.is?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e="string"===typeof a.is?s.createElement(n,{is:a.is}):s.createElement(n)}}e[Fe]=t,e[Ie]=a;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch($d(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Vl(t)}}return Kl(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==a&&Vl(t);else{if("string"!==typeof a&&null===t.stateNode)throw Error(o(166));if(e=X.current,ss(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,null!==(s=Ka))switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Fe]=t,(e=!!(e.nodeValue===n||null!==a&&!0===a.suppressHydrationWarning||qd(e.nodeValue,n)))||ts(t)}else(e=Gd(e).createTextNode(a))[Fe]=t,t.stateNode=e}return Kl(t),null;case 13:if(a=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(s=ss(t),null!==a&&null!==a.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[Fe]=t}else rs(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Kl(t),s=!1}else null!==Ja&&(Tc(Ja),Ja=null),s=!0;if(!s)return 256&t.flags?(zs(t),t):(zs(t),null)}if(zs(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==a,e=null!==e&&null!==e.memoizedState,n){s=null,null!==(a=t.child).alternate&&null!==a.alternate.memoizedState&&null!==a.alternate.memoizedState.cachePool&&(s=a.alternate.memoizedState.cachePool.pool);var r=null;null!==a.memoizedState&&null!==a.memoizedState.cachePool&&(r=a.memoizedState.cachePool.pool),r!==s&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),$l(t,t.updateQueue),Kl(t),null;case 4:return ee(),null===e&&Od(t.stateNode.containerInfo),Kl(t),null;case 10:return yi(t.type),Kl(t),null;case 19:if($(Ts),null===(s=t.memoizedState))return Kl(t),null;if(a=0!==(128&t.flags),null===(r=s.rendering))if(a)Ql(s,!1);else{if(0!==uc||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(r=Ds(e))){for(t.flags|=128,Ql(s,!1),e=r.updateQueue,t.updateQueue=e,$l(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Il(n,e),n=n.sibling;return Q(Ts,1&Ts.current|2),t.child}e=e.sibling}null!==s.tail&&le()>wc&&(t.flags|=128,a=!0,Ql(s,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Ds(r))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,$l(t,e),Ql(s,!0),null===s.tail&&"hidden"===s.tailMode&&!r.alternate&&!Xa)return Kl(t),null}else 2*le()-s.renderingStartTime>wc&&536870912!==n&&(t.flags|=128,a=!0,Ql(s,!1),t.lanes=4194304);s.isBackwards?(r.sibling=t.child,t.child=r):(null!==(e=s.last)?e.sibling=r:t.child=r,s.last=r)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=le(),t.sibling=null,e=Ts.current,Q(Ts,a?1&e|2:1&e),t):(Kl(t),null);case 22:case 23:return zs(t),Cs(),a=null!==t.memoizedState,null!==e?null!==e.memoizedState!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?0!==(536870912&n)&&0===(128&t.flags)&&(Kl(t),6&t.subtreeFlags&&(t.flags|=8192)):Kl(t),null!==(n=t.updateQueue)&&$l(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),a=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),null!==e&&$(Ks),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),yi(Us),Kl(t),null;case 25:return null}throw Error(o(156,t.tag))}function Xl(e,t){switch(Qa(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return yi(Us),ee(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return ne(t),null;case 13:if(zs(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));rs()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return $(Ts),null;case 4:return ee(),null;case 10:return yi(t.type),null;case 22:case 23:return zs(t),Cs(),null!==e&&$(Ks),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return yi(Us),null;default:return null}}function Jl(e,t){switch(Qa(t),t.tag){case 3:yi(Us),ee();break;case 26:case 27:case 5:ne(t);break;case 4:ee();break;case 13:zs(t);break;case 19:$(Ts);break;case 10:yi(t.type);break;case 22:case 23:zs(t),Cs(),null!==e&&$(Ks);break;case 24:yi(Us)}}var Zl={getCacheForType:function(e){var t=Ai(Us),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},ec="function"===typeof WeakMap?WeakMap:Map,tc=0,nc=null,ac=null,sc=0,rc=0,oc=null,ic=!1,lc=!1,cc=!1,dc=0,uc=0,hc=0,mc=0,pc=0,fc=0,gc=0,xc=null,vc=null,bc=!1,yc=0,wc=1/0,jc=null,kc=null,Nc=!1,Sc=null,Ac=0,_c=0,Cc=null,Ec=0,Pc=null;function Mc(){if(0!==(2&tc)&&0!==sc)return sc&-sc;if(null!==P.T){return 0!==Vs?Vs:jd()}return De()}function Rc(){0===fc&&(fc=0===(536870912&sc)||Xa?Ee():536870912);var e=Es.current;return null!==e&&(e.flags|=32),fc}function Oc(e,t,n){(e===nc&&2===rc||null!==e.cancelPendingCommit)&&(Bc(e,0),Fc(e,sc,fc,!1)),Re(e,n),0!==(2&tc)&&e===nc||(e===nc&&(0===(2&tc)&&(mc|=n),4===uc&&Fc(e,sc,fc,!1)),gd(e))}function zc(e,t,n){if(0!==(6&tc))throw Error(o(327));for(var a=!n&&0===(60&t)&&0===(t&e.expiredLanes)||_e(e,t),s=a?function(e,t){var n=tc;tc|=2;var a=qc(),s=Hc();nc!==e||sc!==t?(jc=null,wc=le()+500,Bc(e,t)):lc=_e(e,t);e:for(;;)try{if(0!==rc&&null!==ac){t=ac;var r=oc;t:switch(rc){case 1:rc=0,oc=null,Xc(e,t,r,1);break;case 2:if(ds(r)){rc=0,oc=null,Gc(t);break}t=function(){2===rc&&nc===e&&(rc=7),gd(e)},r.then(t,t);break e;case 3:rc=7;break e;case 4:rc=5;break e;case 7:ds(r)?(rc=0,oc=null,Gc(t)):(rc=0,oc=null,Xc(e,t,r,7));break;case 5:var i=null;switch(ac.tag){case 26:i=ac.memoizedState;case 5:case 27:var l=ac;if(!i||Pu(i)){rc=0,oc=null;var c=l.sibling;if(null!==c)ac=c;else{var d=l.return;null!==d?(ac=d,Jc(d)):ac=null}break t}}rc=0,oc=null,Xc(e,t,r,5);break;case 6:rc=0,oc=null,Xc(e,t,r,6);break;case 8:Uc(),uc=6;break e;default:throw Error(o(462))}}Qc();break}catch(u){Wc(e,u)}return vi=xi=null,P.H=a,P.A=s,tc=n,null!==ac?0:(nc=null,sc=0,_a(),uc)}(e,t):Yc(e,t,!0),r=a;;){if(0===s){lc&&!a&&Fc(e,t,0,!1);break}if(6===s)Fc(e,t,0,!ic);else{if(n=e.current.alternate,r&&!Lc(n)){s=Yc(e,t,!1),r=!1;continue}if(2===s){if(r=t,e.errorRecoveryDisabledLanes&r)var i=0;else i=0!==(i=-536870913&e.pendingLanes)?i:536870912&i?536870912:0;if(0!==i){t=i;e:{var l=e;s=xc;var c=l.current.memoizedState.isDehydrated;if(c&&(Bc(l,i).flags|=256),2!==(i=Yc(l,i,!1))){if(cc&&!c){l.errorRecoveryDisabledLanes|=r,mc|=r,s=4;break e}r=vc,vc=s,null!==r&&Tc(r)}s=i}if(r=!1,2!==s)continue}}if(1===s){Bc(e,0),Fc(e,t,0,!0);break}e:{switch(a=e,s){case 0:case 1:throw Error(o(345));case 4:if((4194176&t)===t){Fc(a,t,fc,!ic);break e}break;case 2:vc=null;break;case 3:case 5:break;default:throw Error(o(329))}if(a.finishedWork=n,a.finishedLanes=t,(62914560&t)===t&&10<(r=yc+300-le())){if(Fc(a,t,fc,!ic),0!==Ae(a,0))break e;a.timeoutHandle=tu(Dc.bind(null,a,n,vc,jc,bc,t,fc,mc,gc,ic,2,-0,0),r)}else Dc(a,n,vc,jc,bc,t,fc,mc,gc,ic,0,-0,0)}}break}gd(e)}function Tc(e){null===vc?vc=e:vc.push.apply(vc,e)}function Dc(e,t,n,a,s,r,i,l,c,d,u,h,m){var p=t.subtreeFlags;if((8192&p||16785408===(16785408&p))&&(Mu={stylesheets:null,count:0,unsuspend:Ru},El(t),null!==(t=function(){if(null===Mu)throw Error(o(475));var e=Mu;return e.stylesheets&&0===e.count&&Tu(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=t(ed.bind(null,e,n,a,s,i,l,c,1,h,m)),void Fc(e,r,i,!d);ed(e,n,a,s,i,l,c,u,h,m)}function Lc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var a=0;a<n.length;a++){var s=n[a],r=s.getSnapshot;s=s.value;try{if(!Qn(r(),s))return!1}catch(o){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fc(e,t,n,a){t&=~pc,t&=~mc,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var r=31-ye(s),o=1<<r;a[r]=-1,s&=~o}0!==n&&Oe(e,n,t)}function Ic(){return 0!==(6&tc)||(xd(0,!1),!1)}function Uc(){if(null!==ac){if(0===rc)var e=ac.return;else vi=xi=null,vr(e=ac),fs=null,gs=0,e=ac;for(;null!==e;)Jl(e.alternate,e),e=e.return;ac=null}}function Bc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,nu(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Uc(),nc=e,ac=n=Fl(e.current,null),sc=t,rc=0,oc=null,ic=!1,lc=_e(e,t),cc=!1,gc=fc=pc=mc=hc=uc=0,vc=xc=null,bc=!1,0!==(8&t)&&(t|=32&t);var a=e.entangledLanes;if(0!==a)for(e=e.entanglements,a&=t;0<a;){var s=31-ye(a),r=1<<s;t|=e[s],a&=~r}return dc=t,_a(),n}function Wc(e,t){er=null,P.H=Ao,t===is?(t=ps(),rc=3):t===ls?(t=ps(),rc=4):rc=t===Ho?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,oc=t,null===ac&&(uc=1,Io(e,Ta(t,e.current)))}function qc(){var e=P.H;return P.H=Ao,null===e?Ao:e}function Hc(){var e=P.A;return P.A=Zl,e}function Vc(){uc=4,ic||(4194176&sc)!==sc&&null!==Es.current||(lc=!0),0===(134217727&hc)&&0===(134217727&mc)||null===nc||Fc(nc,sc,fc,!1)}function Yc(e,t,n){var a=tc;tc|=2;var s=qc(),r=Hc();nc===e&&sc===t||(jc=null,Bc(e,t)),t=!1;var o=uc;e:for(;;)try{if(0!==rc&&null!==ac){var i=ac,l=oc;switch(rc){case 8:Uc(),o=6;break e;case 3:case 2:case 6:null===Es.current&&(t=!0);var c=rc;if(rc=0,oc=null,Xc(e,i,l,c),n&&lc){o=0;break e}break;default:c=rc,rc=0,oc=null,Xc(e,i,l,c)}}$c(),o=uc;break}catch(d){Wc(e,d)}return t&&e.shellSuspendCounter++,vi=xi=null,tc=a,P.H=s,P.A=r,null===ac&&(nc=null,sc=0,_a()),o}function $c(){for(;null!==ac;)Kc(ac)}function Qc(){for(;null!==ac&&!oe();)Kc(ac)}function Kc(e){var t=fi(e.alternate,e,dc);e.memoizedProps=e.pendingProps,null===t?Jc(e):ac=t}function Gc(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ei(n,t,t.pendingProps,t.type,void 0,sc);break;case 11:t=ei(n,t,t.pendingProps,t.type.render,t.ref,sc);break;case 5:vr(t);default:Jl(n,t),t=fi(n,t=ac=Il(t,dc),dc)}e.memoizedProps=e.pendingProps,null===t?Jc(e):ac=t}function Xc(e,t,n,a){vi=xi=null,vr(t),fs=null,gs=0;var s=t.return;try{if(function(e,t,n,a,s){if(n.flags|=32768,null!==a&&"object"===typeof a&&"function"===typeof a.then){if(null!==(t=n.alternate)&&ki(t,n,s,!0),null!==(n=Es.current)){switch(n.tag){case 13:return null===Ps?Vc():null===n.alternate&&0===uc&&(uc=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===cs?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([a]):t.add(a),rd(e,a,s)),!1;case 22:return n.flags|=65536,a===cs?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([a]):n.add(a),rd(e,a,s)),!1}throw Error(o(435,n.tag))}return rd(e,a,s),Vc(),!1}if(Xa)return null!==(t=Es.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==es&&os(Ta(e=Error(o(422),{cause:a}),n))):(a!==es&&os(Ta(t=Error(o(423),{cause:a}),n)),(e=e.current.alternate).flags|=65536,s&=-s,e.lanes|=s,a=Ta(a,n),Ti(e,s=Bo(e.stateNode,a,s)),4!==uc&&(uc=2)),!1;var r=Error(o(520),{cause:a});if(r=Ta(r,n),null===xc?xc=[r]:xc.push(r),4!==uc&&(uc=2),null===t)return!0;a=Ta(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,Ti(n,e=Bo(n.stateNode,a,e)),!1;case 1:if(t=n.type,r=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==r&&"function"===typeof r.componentDidCatch&&(null===kc||!kc.has(r))))return n.flags|=65536,s&=-s,n.lanes|=s,qo(s=Wo(s),e,n,a),Ti(n,s),!1}n=n.return}while(null!==n);return!1}(e,s,t,n,sc))return uc=1,Io(e,Ta(n,e.current)),void(ac=null)}catch(r){if(null!==s)throw ac=s,r;return uc=1,Io(e,Ta(n,e.current)),void(ac=null)}32768&t.flags?(Xa||1===a?e=!0:lc||0!==(536870912&sc)?e=!1:(ic=e=!0,(2===a||3===a||6===a)&&(null!==(a=Es.current)&&13===a.tag&&(a.flags|=16384))),Zc(t,e)):Jc(t)}
2function Jc(e){var t=e;do{if(0!==(32768&t.flags))return void Zc(t,ic);e=t.return;var n=Gl(t.alternate,t,dc);if(null!==n)return void(ac=n);if(null!==(t=t.sibling))return void(ac=t);ac=t=e}while(null!==t);0===uc&&(uc=5)}function Zc(e,t){do{var n=Xl(e.alternate,e);if(null!==n)return n.flags&=32767,void(ac=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(ac=e);ac=e=n}while(null!==e);uc=6,ac=null}function ed(e,t,n,a,s,r,i,l,c,d){var u=P.T,h=W.p;try{W.p=2,P.T=null,function(e,t,n,a,s,r,i,l){do{nd()}while(null!==Sc);if(0!==(6&tc))throw Error(o(327));var c=e.finishedWork;if(a=e.finishedLanes,null===c)return null;if(e.finishedWork=null,e.finishedLanes=0,c===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var d=c.lanes|c.childLanes;if(function(e,t,n,a,s,r){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 i=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=o&~n;0<n;){var d=31-ye(n),u=1<<d;i[d]=0,l[d]=-1;var h=c[d];if(null!==h)for(c[d]=null,d=0;d<h.length;d++){var m=h[d];null!==m&&(m.lane&=-536870913)}n&=~u}0!==a&&Oe(e,a,0),0!==r&&0===s&&0!==e.tag&&(e.suspendedLanes|=r&~(o&~t))}(e,a,d|=Aa,r,i,l),e===nc&&(ac=nc=null,sc=0),0===(10256&c.subtreeFlags)&&0===(10256&c.flags)||Nc||(Nc=!0,_c=d,Cc=n,function(e,t){se(e,t)}(he,function(){return nd(),null})),n=0!==(15990&c.flags),0!==(15990&c.subtreeFlags)||n?(n=P.T,P.T=null,r=W.p,W.p=2,i=tc,tc|=4,function(e,t){if(e=e.containerInfo,Qd=Vu,ea(e=Zn(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var a=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(a&&0!==a.rangeCount){n=a.anchorNode;var s=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{n.nodeType,r.nodeType}catch(g){n=null;break e}var i=0,l=-1,c=-1,d=0,u=0,h=e,m=null;t:for(;;){for(var p;h!==n||0!==s&&3!==h.nodeType||(l=i+s),h!==r||0!==a&&3!==h.nodeType||(c=i+a),3===h.nodeType&&(i+=h.nodeValue.length),null!==(p=h.firstChild);)m=h,h=p;for(;;){if(h===e)break t;if(m===n&&++d===s&&(l=i),m===r&&++u===a&&(c=i),null!==(p=h.nextSibling))break;m=(h=m).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kd={focusedElem:e,selectionRange:n},Vu=!1,al=t;null!==al;)if(e=(t=al).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,al=e;else for(;null!==al;){switch(r=(t=al).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==r){e=void 0,n=t,s=r.memoizedProps,r=r.memoizedState,a=n.stateNode;try{var f=zo(n.type,s,(n.elementType,n.type));e=a.getSnapshotBeforeUpdate(f,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(x){sd(n,n.return,x)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))iu(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":iu(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(o(163))}if(null!==(e=t.sibling)){e.return=t.return,al=e;break}al=t.return}f=sl,sl=!1}(e,c),fl(c,e),ta(Kd,e.containerInfo),Vu=!!Qd,Kd=Qd=null,e.current=c,rl(e,c.alternate,c),ie(),tc=i,W.p=r,P.T=n):e.current=c,Nc?(Nc=!1,Sc=e,Ac=a):td(e,d),d=e.pendingLanes,0===d&&(kc=null),function(e){if(ve&&"function"===typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(xe,e,void 0,128===(128&e.current.flags))}catch(t){}}(c.stateNode),gd(e),null!==t)for(s=e.onRecoverableError,c=0;c<t.length;c++)d=t[c],s(d.value,{componentStack:d.stack});0!==(3&Ac)&&nd(),d=e.pendingLanes,0!==(4194218&a)&&0!==(42&d)?e===Pc?Ec++:(Ec=0,Pc=e):Ec=0,xd(0,!1)}(e,t,n,a,h,s,r,i)}finally{P.T=u,W.p=h}}function td(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ws(t)))}function nd(){if(null!==Sc){var e=Sc,t=_c;_c=0;var n=Te(Ac),a=P.T,s=W.p;try{if(W.p=32>n?32:n,P.T=null,null===Sc)var r=!1;else{n=Cc,Cc=null;var i=Sc,l=Ac;if(Sc=null,Ac=0,0!==(6&tc))throw Error(o(331));var c=tc;if(tc|=4,Rl(i.current),Nl(i,i.current,l,n),tc=c,xd(0,!1),ve&&"function"===typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(xe,i)}catch(d){}r=!0}return r}finally{W.p=s,P.T=a,td(e,t)}}return!1}
2function ad(e,t,n){t=Ta(n,t),null!==(e=Oi(e,t=Bo(e.stateNode,t,2),2))&&(Re(e,2),gd(e))}function sd(e,t,n){if(3===e.tag)ad(e,e,n);else for(;null!==t;){if(3===t.tag){ad(t,e,n);break}if(1===t.tag){var a=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof a.componentDidCatch&&(null===kc||!kc.has(a))){e=Ta(n,e),null!==(a=Oi(t,n=Wo(2),2))&&(qo(n,a,t,e),Re(a,2),gd(a));break}}t=t.return}}function rd(e,t,n){var a=e.pingCache;if(null===a){a=e.pingCache=new ec;var s=new Set;a.set(t,s)}else void 0===(s=a.get(t))&&(s=new Set,a.set(t,s));s.has(n)||(cc=!0,s.add(n),e=od.bind(null,e,t,n),t.then(e,e))}function od(e,t,n){var a=e.pingCache;null!==a&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,nc===e&&(sc&n)===n&&(4===uc||3===uc&&(62914560&sc)===sc&&300>le()-yc?0===(2&tc)&&Bc(e,0):pc|=n,gc===sc&&(gc=0)),gd(e)}function id(e,t){0===t&&(t=Pe()),null!==(e=Pa(e,t))&&(Re(e,t),gd(e))}function ld(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),id(e,n)}function cd(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,s=e.memoizedState;null!==s&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}null!==a&&a.delete(t),id(e,n)}var dd=null,ud=null,hd=!1,md=!1,pd=!1,fd=0;function gd(e){var t;e!==ud&&null===e.next&&(null===ud?dd=ud=e:ud=ud.next=e),md=!0,hd||(hd=!0,t=vd,su(function(){0!==(6&tc)?se(de,t):t()}))}function xd(e,t){if(!pd&&md){pd=!0;do{for(var n=!1,a=dd;null!==a;){if(!t)if(0!==e){var s=a.pendingLanes;if(0===s)var r=0;else{var o=a.suspendedLanes,i=a.pingedLanes;r=(1<<31-ye(42|e)+1)-1,r=201326677&(r&=s&~(o&~i))?201326677&r|1:r?2|r:0}0!==r&&(n=!0,wd(a,r))}else r=sc,0===(3&(r=Ae(a,a===nc?r:0)))||_e(a,r)||(n=!0,wd(a,r));a=a.next}}while(n);pd=!1}}function vd(){md=hd=!1;var e=0;0!==fd&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==eu&&(eu=e,!0);return eu=null,!1}()&&(e=fd),fd=0);for(var t=le(),n=null,a=dd;null!==a;){var s=a.next,r=bd(a,t);0===r?(a.next=null,null===n?dd=s:n.next=s,null===s&&(ud=n)):(n=a,(0!==e||0!==(3&r))&&(md=!0)),a=s}xd(e,!1)}function bd(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,r=-62914561&e.pendingLanes;0<r;){var o=31-ye(r),i=1<<o,l=s[o];-1===l?0!==(i&n)&&0===(i&a)||(s[o]=Ce(i,t)):l<=t&&(e.expiredLanes|=i),r&=~i}if(n=sc,n=Ae(e,e===(t=nc)?n:0),a=e.callbackNode,0===n||e===t&&2===rc||null!==e.cancelPendingCommit)return null!==a&&null!==a&&re(a),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||_e(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==a&&re(a),Te(n)){case 2:case 8:n=ue;break;case 32:default:n=he;break;case 268435456:n=pe}return a=yd.bind(null,e),n=se(n,a),e.callbackPriority=t,e.callbackNode=n,t}return null!==a&&null!==a&&re(a),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){var n=e.callbackNode;if(nd()&&e.callbackNode!==n)return null;var a=sc;return 0===(a=Ae(e,e===nc?a:0))?null:(zc(e,a,t),bd(e,le()),null!=e.callbackNode&&e.callbackNode===n?yd.bind(null,e):null)}function wd(e,t){if(nd())return null;zc(e,t,!0)}function jd(){return 0===fd&&(fd=Ee()),fd}function kd(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:Et(""+e)}function Nd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Sd=0;Sd<ja.length;Sd++){var Ad=ja[Sd];ka(Ad.toLowerCase(),"on"+(Ad[0].toUpperCase()+Ad.slice(1)))}ka(ma,"onAnimationEnd"),ka(pa,"onAnimationIteration"),ka(fa,"onAnimationStart"),ka("dblclick","onDoubleClick"),ka("focusin","onFocus"),ka("focusout","onBlur"),ka(ga,"onTransitionRun"),ka(xa,"onTransitionStart"),ka(va,"onTransitionCancel"),ka(ba,"onTransitionEnd"),tt("onMouseEnter",["mouseout","mouseover"]),tt("onMouseLeave",["mouseout","mouseover"]),tt("onPointerEnter",["pointerout","pointerover"]),tt("onPointerLeave",["pointerout","pointerover"]),et("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),et("onSelect","focusout contextmenu dragend focu
2sin keydown keyup mousedown mouseup selectionchange".split(" ")),et("onBeforeInput",["compositionend","keypress","textInput","paste"]),et("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),et("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _d="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(" "),Cd=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_d));function Ed(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var a=e[n],s=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var i=a[o],l=i.instance,c=i.currentTarget;if(i=i.listener,l!==r&&s.isPropagationStopped())break e;r=i,s.currentTarget=c;try{r(s)}catch(d){To(d)}s.currentTarget=null,r=l}else for(o=0;o<a.length;o++){if(l=(i=a[o]).instance,c=i.currentTarget,i=i.listener,l!==r&&s.isPropagationStopped())break e;r=i,s.currentTarget=c;try{r(s)}catch(d){To(d)}s.currentTarget=null,r=l}}}}function Pd(e,t){var n=t[Be];void 0===n&&(n=t[Be]=new Set);var a=e+"__bubble";n.has(a)||(zd(t,e,2,!1),n.add(a))}function Md(e,t,n){var a=0;t&&(a|=4),zd(n,e,a,t)}var Rd="_reactListening"+Math.random().toString(36).slice(2);function Od(e){if(!e[Rd]){e[Rd]=!0,Je.forEach(function(t){"selectionchange"!==t&&(Cd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Rd]||(t[Rd]=!0,Md("selectionchange",!1,t))}}function zd(e,t,n,a){switch(Ju(t)){case 2:var s=Yu;break;case 8:s=$u;break;default:s=Qu}n=s.bind(null,t,n,e),s=void 0,!Ft||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(s=!0),a?void 0!==s?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):void 0!==s?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Td(e,t,n,a,s){var r=a;if(0===(1&t)&&0===(2&t)&&null!==a)e:for(;;){if(null===a)return;var o=a.tag;if(3===o||4===o){var i=a.stateNode.containerInfo;if(i===s||8===i.nodeType&&i.parentNode===s)break;if(4===o)for(o=a.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===s||8===l.nodeType&&l.parentNode===s))return;o=o.return}for(;null!==i;){if(null===(o=$e(i)))return;if(5===(l=o.tag)||6===l||26===l||27===l){a=r=o;continue e}i=i.parentNode}}a=a.return}Dt(function(){var a=r,s=Mt(n),o=[];e:{var i=wa.get(e);if(void 0!==i){var l=Jt,c=e;switch(e){case"keypress":if(0===Ht(n))break e;case"keydown":case"keyup":l=pn;break;case"focusin":c="focus",l=sn;break;case"focusout":c="blur",l=sn;break;case"beforeblur":case"afterblur":l=sn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=nn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=an;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=gn;break;case ma:case pa:case fa:l=rn;break;case ba:l=xn;break;case"scroll":case"scrollend":l=en;break;case"wheel":l=vn;break;case"copy":case"cut":case"paste":l=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=fn;break;case"toggle":case"beforetoggle":l=bn}var d=0!==(4&t),u=!d&&("scroll"===e||"scrollend"===e),h=d?null!==i?i+"Capture":null:i;d=[];for(var m,p=a;null!==p;){var f=p;if(m=f.stateNode,5!==(f=f.tag)&&26!==f&&27!==f||null===m||null===h||null!=(f=Lt(p,h))&&d.push(Dd(p,f,m)),u)break;p=p.return}0<d.length&&(i=new l(i,c,null,n,s),o.push({event:i,listeners:d}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(i="mouseover"===e||"pointerover"===e)||n===Pt||!(c=n.relatedTarget||n.fromElement)||!$e(c)&&!c[Ue])&&(l||i)&&(i=s.window===s?s:(i=s.ownerDocument)?i.defaultView||i.parentWindow:window,l?(l=a,null!==(c=(c=n.relatedTarget||n.toElement)?$e(c):null)&&(u=L(c),d=c.tag,c!==u||5!==d&&27!==d&&6!==d)&&(c=null)):(l=null,c=a),l!==c)){if(d=nn,f="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(d=fn,f="onPointerLeave",h="onPointerEnter",p="pointer"),u=null==l?i:Ke(l),m=null==c?i:Ke(c),(i=new d(f,p+"leave",l,n,s)).target=u,i.relatedTarget=m,f=null,$e(s)===a&&((d=new d(h,p+"enter",c,n,s)
vendor: 5,310 bytes, line 2
2).target=m,d.relatedTarget=u,f=d),u=f,l&&c)e:{for(h=c,p=0,m=d=l;m;m=Fd(m))p++;for(m=0,f=h;f;f=Fd(f))m++;for(;0<p-m;)d=Fd(d),p--;for(;0<m-p;)h=Fd(h),m--;for(;p--;){if(d===h||null!==h&&d===h.alternate)break e;d=Fd(d),h=Fd(h)}d=null}else d=null;null!==l&&Id(o,i,l,d,!1),null!==c&&null!==u&&Id(o,u,c,d,!0)}if("select"===(l=(i=a?Ke(a):window).nodeName&&i.nodeName.toLowerCase())||"input"===l&&"file"===i.type)var g=Ln;else if(Mn(i))if(Fn)g=$n;else{g=Vn;var x=Hn}else!(l=i.nodeName)||"input"!==l.toLowerCase()||"checkbox"!==i.type&&"radio"!==i.type?a&&At(a.elementType)&&(g=Ln):g=Yn;switch(g&&(g=g(e,a))?Rn(o,g,n,s):(x&&x(e,i,a),"focusout"===e&&a&&"number"===i.type&&null!=a.memoizedProps.value&&vt(i,"number",i.value)),x=a?Ke(a):window,e){case"focusin":(Mn(x)||"true"===x.contentEditable)&&(aa=x,sa=a,ra=null);break;case"focusout":ra=sa=aa=null;break;case"mousedown":oa=!0;break;case"contextmenu":case"mouseup":case"dragend":oa=!1,ia(o,n,s);break;case"selectionchange":if(na)break;case"keydown":case"keyup":ia(o,n,s)}var v;if(wn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else En?_n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Nn&&"ko"!==n.locale&&(En||"onCompositionStart"!==b?"onCompositionEnd"===b&&En&&(v=qt()):(Bt="value"in(Ut=s)?Ut.value:Ut.textContent,En=!0)),0<(x=Ld(a,b)).length&&(b=new ln(b,e,null,n,s),o.push({event:b,listeners:x}),v?b.data=v:null!==(v=Cn(n))&&(b.data=v))),(v=kn?function(e,t){switch(e){case"compositionend":return Cn(t);case"keypress":return 32!==t.which?null:(An=!0,Sn);case"textInput":return(e=t.data)===Sn&&An?null:e;default:return null}}(e,n):function(e,t){if(En)return"compositionend"===e||!wn&&_n(e,t)?(e=qt(),Wt=Bt=Ut=null,En=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(b=Ld(a,"onBeforeInput")).length&&(x=new ln("onBeforeInput","beforeinput",null,n,s),o.push({event:x,listeners:b}),x.data=v)),function(e,t,n,a,s){if("submit"===t&&n&&n.stateNode===s){var r=kd((s[Ie]||null).action),o=a.submitter;o&&null!==(t=(t=o[Ie]||null)?kd(t.formAction):o.getAttribute("formAction"))&&(r=t,o=null);var i=new Jt("action","action",null,a,s);e.push({event:i,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(0!==fd){var e=o?Nd(s,o):new FormData(s);ho(n,{pending:!0,data:e,method:s.method,action:r},null,e)}}else"function"===typeof r&&(i.preventDefault(),e=o?Nd(s,o):new FormData(s),ho(n,{pending:!0,data:e,method:s.method,action:r},r,e))},currentTarget:s}]})}}(o,e,a,n,s)}Ed(o,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ld(e,t){for(var n=t+"Capture",a=[];null!==e;){var s=e,r=s.stateNode;5!==(s=s.tag)&&26!==s&&27!==s||null===r||(null!=(s=Lt(e,n))&&a.unshift(Dd(e,s,r)),null!=(s=Lt(e,t))&&a.push(Dd(e,s,r))),e=e.return}return a}function Fd(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function Id(e,t,n,a,s){for(var r=t._reactName,o=[];null!==n&&n!==a;){var i=n,l=i.alternate,c=i.stateNode;if(i=i.tag,null!==l&&l===a)break;5!==i&&26!==i&&27!==i||null===c||(l=c,s?null!=(c=Lt(n,r))&&o.unshift(Dd(n,c,l)):s||null!=(c=Lt(n,r))&&o.push(Dd(n,c,l))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Ud=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Wd(e){return("string"===typeof e?e:""+e).replace(Ud,"\n").replace(Bd,"")}function qd(e,t){return t=Wd(t),Wd(e)===t}function Hd(){}function Vd(e,t,n,a,s,r){switch(n){case"children":"string"===typeof a?"body"===t||"textarea"===t&&""===a||jt(e,a):("number"===typeof a||"bigint"===typeof a)&&"body"!==t&&jt(e,""+a);break;case"className":it(e,"class",a);break;case"tabIndex":it(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":it(e,n,a);break;case"style":St(e,a,r);break;case"data":if("object"!==t){it(e,"data",a);break}case"src":case"href":if(""===a&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==a||"function"===typeof a||"symbol"===typeof a||"boolean"===typeof a){e.removeAttribute(n);break}a=Et(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if("function"===typeof a){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"===typeof r&&("formAction"===n?("input"!==t&&Vd(e,t,"name",s.name,s,null),Vd(e,t,"formEncType",s.formEncType,s,null),Vd(e,t,"formMethod",s.formMethod,s,null),Vd(e,t,"formTarget",s.formTarget,s,null)):(Vd(e,t,"encType",s.encType,s,null),Vd(e,t,"method",s.method,s,null),Vd(e,t,"target",s.target,s,null))),null==a||"symbol"===typeof a||"boolean"===typeof a){e.removeAttribute(n);break}a=Et(""+a),e.setAttribute(n,a);break;case"onClick":null!=a&&(e.onclick=Hd);break;case"onScroll":null!=a&&Pd("scroll",e);break;case"onScrollEnd":null!=a&&Pd("scrollend",e);break;
2case"dangerouslySetInnerHTML":if(null!=a){if("object"!==typeof a||!("__html"in a))throw Error(o(61));if(null!=(n=a.__html)){if(null!=s.children)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&"function"!==typeof a&&"symbol"!==typeof a;break;case"muted":e.muted=a&&"function"!==typeof a&&"symbol"!==typeof a;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==a||"function"===typeof a||"boolean"===typeof a||"symbol"===typeof a){e.removeAttribute("xlink:href");break}n=Et(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=a&&"function"!==typeof a&&"symbol"!==typeof a?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&"function"!==typeof a&&"symbol"!==typeof a?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===a?e.setAttribute(n,""):!1!==a&&null!=a&&"function"!==typeof a&&"symbol"!==typeof a?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":null==a||"function"===typeof a||"symbol"===typeof a||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Pd("beforetoggle",e),Pd("toggle",e),ot(e,"popover",a);break;case"xlinkActuate":lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":lt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":lt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":lt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":lt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ot(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&ot(e,n=_t.get(n)||n,a)}}function Yd(e,t,n,a,s,r){switch(n){case"style":St(e,a,r);break;case"dangerouslySetInnerHTML":if(null!=a){if("object"!==typeof a||!("__html"in a))throw Error(o(61));if(null!=(n=a.__html)){if(null!=s.children)throw Error(o(60));e.innerHTML=n}}break;case"children":"string"===typeof a?jt(e,a):("number"===typeof a||"bigint"===typeof a)&&jt(e,""+a);break;case"onScroll":null!=a&&Pd("scroll",e);break;case"onScrollEnd":null!=a&&Pd("scrollend",e);break;case"onClick":null!=a&&(e.onclick=Hd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ze.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),"function"===typeof(r=null!=(r=e[Ie]||null)?r[n]:null)&&e.removeEventListener(t,r,s),"function"!==typeof a)?n in e?e[n]=a:!0===a?e.setAttribute(n,""):ot(e,n,a):("function"!==typeof r&&null!==r&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,s)))}}function $d(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pd("error",e),Pd("load",e);var a,s=!1,r=!1;for(a in n)if(n.hasOwnProperty(a)){var i=n[a];if(null!=i)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Vd(e,t,a,i,n,null)}}return r&&Vd(e,t,"srcSet",n.srcSet,n,null),void(s&&Vd(e,t,"src",n.src,n,null));case"input":Pd("invalid",e);var l=a=i=r=null,c=null,d=null;for(s in n)if(n.hasOwnProperty(s)){var u=n[s];if(null!=u)switch(s){case"name":r=u;break;case"type":i=u;break;case"checked":c=u;break;case"defaultChecked":d=u;break;case"value":a=u;break;case"defaultValue":l=u;break;case"children":case"dangerouslySetInnerHTML":if(null!=u)throw Error(o(137,t));break;
vendor: 6,389 bytes, line 2
2default:Vd(e,t,s,u,n,null)}}return xt(e,a,l,c,d,i,r,!1),void ut(e);case"select":for(r in Pd("invalid",e),s=i=a=null,n)if(n.hasOwnProperty(r)&&null!=(l=n[r]))switch(r){case"value":a=l;break;case"defaultValue":i=l;break;case"multiple":s=l;default:Vd(e,t,r,l,n,null)}return t=a,n=i,e.multiple=!!s,void(null!=t?bt(e,!!s,t,!1):null!=n&&bt(e,!!s,n,!0));case"textarea":for(i in Pd("invalid",e),a=r=s=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":s=l;break;case"defaultValue":r=l;break;case"children":a=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(o(91));break;default:Vd(e,t,i,l,n,null)}return wt(e,s,r,a),void ut(e);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(s=n[c]))if("selected"===c)e.selected=s&&"function"!==typeof s&&"symbol"!==typeof s;else Vd(e,t,c,s,n,null);return;case"dialog":Pd("cancel",e),Pd("close",e);break;case"iframe":case"object":Pd("load",e);break;case"video":case"audio":for(s=0;s<_d.length;s++)Pd(_d[s],e);break;case"image":Pd("error",e),Pd("load",e);break;case"details":Pd("toggle",e);break;case"embed":case"source":case"link":Pd("error",e),Pd("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(d in n)if(n.hasOwnProperty(d)&&null!=(s=n[d]))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Vd(e,t,d,s,n,null)}return;default:if(At(t)){for(u in n)n.hasOwnProperty(u)&&(void 0!==(s=n[u])&&Yd(e,t,u,s,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(s=n[l])&&Vd(e,t,l,s,n,null))}var Qd=null,Kd=null;function Gd(e){return 9===e.nodeType?e:e.ownerDocument}function Xd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function Zd(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var eu=null;var tu="function"===typeof setTimeout?setTimeout:void 0,nu="function"===typeof clearTimeout?clearTimeout:void 0,au="function"===typeof Promise?Promise:void 0,su="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof au?function(e){return au.resolve(null).then(e).catch(ru)}:tu;function ru(e){setTimeout(function(){throw e})}function ou(e,t){var n=t,a=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&8===s.nodeType)if("/$"===(n=s.data)){if(0===a)return e.removeChild(s),void gh(t);a--}else"$"!==n&&"$?"!==n&&"$!"!==n||a++;n=s}while(n);gh(t)}function iu(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":iu(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function lu(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}function cu(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function du(e,t,n){switch(t=Gd(n),e){case"html":if(!(e=t.documentElement))throw Error(o(452));return e;case"head":if(!(e=t.head))throw Error(o(453));return e;case"body":if(!(e=t.body))throw Error(o(454));return e;default:throw Error(o(451))}}var uu=new Map,hu=new Set;function mu(e){return"function"===typeof e.getRootNode?e.getRootNode():e.ownerDocument}var pu=W.d;W.d={f:function(){var e=pu.f(),t=Ic();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?po(t):pu.r(e)},D:function(e){pu.D(e),gu("dns-prefetch",e,null)},C:function(e,t){pu.C(e,t),gu("preconnect",e,t)},L:function(e,t,n){pu.L(e,t,n);var a=fu;if(a&&e&&t){var s='link[rel="preload"][as="'+ft(t)+'"]';"image"===t&&n&&n.imageSrcSet?(s+='[imagesrcset="'+ft(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(s+='[imagesizes="'+ft(n.imageSizes)+'"]')):s+='[href="'+ft(e)+'"]';var r=s;switch(t){case"style":r=vu(e);break;case"script":r=wu(e)}uu.has(r)||(e=M({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),uu.set(r,e),null!==a.querySelector(s)||"style"===t&&a.querySelector(bu(r))||"script"===t&&a.querySelector(ju(r))||($d(t=a.createElement("link"),"link",e),Xe(t),a.head.appendChild(t)))}},m:function(e,t){pu.m(e,t);var n=fu;if(n&&e){var a=t&&"string"===typeof t.as?t.as:"script",s='link[rel="modulepreload"][as="'+ft(a)+'"][href="'+ft(e)+'"]',r=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=wu(e)}if(!uu.has(r)&&(e=M({rel:"modulepreload",href:e},t),uu.set(r,e),null===n.querySelector(s))){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ju(r)))return}$d(a=n.createElement("link"),"link",e),Xe(a),n.head.appendChild(a)}}},X:function(e,t){pu.X(e,t);var n=fu;if(n&&e){var a=Ge(n).hoistableScripts,s=wu(e),r=a.get(s);r||((r=n.querySelector(ju(s)))||(e=M({src:e,async:!0},t),(t=uu.get(s))&&Au(e,t),Xe(r=n.createElement("script")),$d(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}},S:function(e,t,n){pu.S(e,t,n);var a=fu;if(a&&e){var s=Ge(a).hoistableStyles,r=vu(e);t=t||"default";var o=s.get(r);if(!o){var i={loading:0,preload:null};if(o=a.querySelector(bu(r)))i.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},n),(n=uu.get(r))&&Su(e,n);var l=o=a.createElement("link");Xe(l),$d(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){i.loading|=1}),l.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Nu(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:i},s.set(r,o)}}},M:function(e,t){pu.M(e,t);var n=fu;if(n&&e){var a=Ge(n).hoistableScripts,s=wu(e),r=a.get(s);r||((r=n.querySelector(ju(s)))||(e=M({src:e,async:!0,type:"module"},t),(t=uu.get(s))&&Au(e,t),Xe(r=n.createElement("script")),$d(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}};
vendor: 4,831 bytes, line 2
2var fu="undefined"===typeof document?null:document;function gu(e,t,n){var a=fu;if(a&&"string"===typeof t&&t){var s=ft(t);s='link[rel="'+e+'"][href="'+s+'"]',"string"===typeof n&&(s+='[crossorigin="'+n+'"]'),hu.has(s)||(hu.add(s),e={rel:e,crossOrigin:n,href:t},null===a.querySelector(s)&&($d(t=a.createElement("link"),"link",e),Xe(t),a.head.appendChild(t)))}}function xu(e,t,n,a){var s,r,i,l,c=(c=X.current)?mu(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=vu(n.href),(a=(n=Ge(c).hoistableStyles).get(t))||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=vu(n.href);var d=Ge(c).hoistableStyles,u=d.get(e);if(u||(c=c.ownerDocument||c,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,u),(d=c.querySelector(bu(e)))&&!d._p&&(u.instance=d,u.state.loading=5),uu.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},uu.set(e,n),d||(s=c,r=e,i=n,l=u.state,s.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=s.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),$d(r,"link",i),Xe(r),s.head.appendChild(r))))),t&&null===a)throw Error(o(528,""));return u}if(t&&null!==a)throw Error(o(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=wu(n),(a=(n=Ge(c).hoistableScripts).get(t))||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function vu(e){return'href="'+ft(e)+'"'}function bu(e){return'link[rel="stylesheet"]['+e+"]"}function yu(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function wu(e){return'[src="'+ft(e)+'"]'}function ju(e){return"script[async]"+e}function ku(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+ft(n.href)+'"]');if(a)return t.instance=a,Xe(a),a;var s=M({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Xe(a=(e.ownerDocument||e).createElement("style")),$d(a,"style",s),Nu(a,n.precedence,e),t.instance=a;case"stylesheet":s=vu(n.href);var r=e.querySelector(bu(s));if(r)return t.state.loading|=4,t.instance=r,Xe(r),r;a=yu(n),(s=uu.get(s))&&Su(a,s),Xe(r=(e.ownerDocument||e).createElement("link"));var i=r;return i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),$d(r,"link",a),t.state.loading|=4,Nu(r,n.precedence,e),t.instance=r;case"script":return r=wu(n.src),(s=e.querySelector(ju(r)))?(t.instance=s,Xe(s),s):(a=n,(s=uu.get(r))&&Au(a=M({},n),s),Xe(s=(e=e.ownerDocument||e).createElement("script")),$d(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(o(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(a=t.instance,t.state.loading|=4,Nu(a,n.precedence,e));return t.instance}function Nu(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,r=s,o=0;o<a.length;o++){var i=a[o];if(i.dataset.precedence===t)r=i;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Su(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Au(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var _u=null;function Cu(e,t,n){if(null===_u){var a=new Map,s=_u=new Map;s.set(n,a)}else(a=(s=_u).get(n))||(a=new Map,s.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var r=n[s];if(!(r[Ve]||r[Fe]||"link"===e&&"stylesheet"===r.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==r.namespaceURI){var o=r.getAttribute(t)||"";o=e+o;var i=a.get(o);i?i.push(r):a.set(o,[r])}}return a}function Eu(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Pu(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var Mu=null;function Ru(){}function Ou(){if(this.count--,0===this.count)if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var zu=null;function Tu(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,zu=ne
vendor: 5,967 bytes, line 2
2w Map,t.forEach(Du,e),zu=null,Ou.call(e))}function Du(e,t){if(!(4&t.state.loading)){var n=zu.get(e);if(n)var a=n.get(null);else{n=new Map,zu.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var o=s[r];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}o=(s=t.instance).getAttribute("data-precedence"),(r=n.get(o)||a)===a&&n.set(null,s),n.set(o,s),this.count++,a=Ou.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),r?r.parentNode.insertBefore(s,r.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(s,e.firstChild),t.state.loading|=4}}var Lu={$$typeof:g,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function Fu(e,t,n,a,s,r,o,i){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Me(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Me(0),this.hiddenUpdates=Me(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.incompleteTransitions=new Map}function Iu(e,t,n,a,s,r,o,i,l,c,d,u){return e=new Fu(e,t,n,o,i,l,c,u),t=1,!0===r&&(t|=24),r=Dl(3,null,null,t),e.current=r,r.stateNode=e,(t=Bs()).refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},Pi(r),e}function Uu(e){return e?e=Oa:Oa}function Bu(e,t,n,a,s,r){s=Uu(s),null===a.context?a.context=s:a.pendingContext=s,(a=Ri(t)).payload={element:n},null!==(r=void 0===r?null:r)&&(a.callback=r),null!==(n=Oi(e,a,t))&&(Oc(n,0,t),zi(n,e,t))}function Wu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function qu(e,t){Wu(e,t),(e=e.alternate)&&Wu(e,t)}function Hu(e){if(13===e.tag){var t=Pa(e,67108864);null!==t&&Oc(t,0,67108864),qu(e,67108864)}}var Vu=!0;function Yu(e,t,n,a){var s=P.T;P.T=null;var r=W.p;try{W.p=2,Qu(e,t,n,a)}finally{W.p=r,P.T=s}}function $u(e,t,n,a){var s=P.T;P.T=null;var r=W.p;try{W.p=8,Qu(e,t,n,a)}finally{W.p=r,P.T=s}}function Qu(e,t,n,a){if(Vu){var s=Ku(a);if(null===s)Td(e,t,a,Gu,n),ih(e,a);else if(function(e,t,n,a,s){switch(t){case"focusin":return eh=lh(eh,e,t,n,a,s),!0;case"dragenter":return th=lh(th,e,t,n,a,s),!0;case"mouseover":return nh=lh(nh,e,t,n,a,s),!0;case"pointerover":var r=s.pointerId;return ah.set(r,lh(ah.get(r)||null,e,t,n,a,s)),!0;case"gotpointercapture":return r=s.pointerId,sh.set(r,lh(sh.get(r)||null,e,t,n,a,s)),!0}return!1}(s,e,t,n,a))a.stopPropagation();else if(ih(e,a),4&t&&-1<oh.indexOf(e)){for(;null!==s;){var r=Qe(s);if(null!==r)switch(r.tag){case 3:if((r=r.stateNode).current.memoizedState.isDehydrated){var o=Se(r.pendingLanes);if(0!==o){var i=r;for(i.pendingLanes|=2,i.entangledLanes|=2;o;){var l=1<<31-ye(o);i.entanglements[1]|=l,o&=~l}gd(r),0===(6&tc)&&(wc=le()+500,xd(0,!1))}}break;case 13:null!==(i=Pa(r,2))&&Oc(i,0,2),Ic(),qu(r,2)}if(null===(r=Ku(a))&&Td(e,t,a,Gu,n),r===s)break;s=r}null!==s&&a.stopPropagation()}else Td(e,t,a,null,n)}}function Ku(e){return Xu(e=Mt(e))}var Gu=null;function Xu(e){if(Gu=null,null!==(e=$e(e))){var t=L(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=F(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Gu=e,null}function Ju(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case de:return 2;case ue:return 8;case he:case me:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Zu=!1,eh=null,th=null,nh=null,ah=new Map,sh=new Map,rh=[],oh="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".split(" ");function ih(e,t){switch(e){case"focusin":case"focusout":eh=null;break;case"dragenter":case"dragleave":th=null;break;case"mouseover":case"mouseout":nh=null;break;case"pointerover":case"pointerout":ah.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sh.delete(t.pointerId)}}function lh(e,t,n,a,s,r){return null===e||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:r,targetContainers:[s]},null!==t&&(null!==(t=Qe(t))&&Hu(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,null!==s&&-1===t.indexOf(s)&&t.push(s),e)}function ch(e){var t=$e(e.target);if(null!==t){var n=L(t);
vendor: 4,322 bytes, line 2
2if(null!==n)if(13===(t=n.tag)){if(null!==(t=F(n)))return e.blockedOn=t,void function(e,t){var n=W.p;try{return W.p=e,t()}finally{W.p=n}}(e.priority,function(){if(13===n.tag){var e=Mc(),t=Pa(n,e);null!==t&&Oc(t,0,e),qu(n,e)}})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function dh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ku(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&Hu(t),e.blockedOn=n,!1;var a=new(n=e.nativeEvent).constructor(n.type,n);Pt=a,n.target.dispatchEvent(a),Pt=null,t.shift()}return!0}function uh(e,t,n){dh(e)&&n.delete(t)}function hh(){Zu=!1,null!==eh&&dh(eh)&&(eh=null),null!==th&&dh(th)&&(th=null),null!==nh&&dh(nh)&&(nh=null),ah.forEach(uh),sh.forEach(uh)}function mh(e,t){e.blockedOn===t&&(e.blockedOn=null,Zu||(Zu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,hh)))}var ph=null;function fh(e){ph!==e&&(ph=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){ph===e&&(ph=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],s=e[t+2];if("function"!==typeof a){if(null===Xu(a||n))continue;break}var r=Qe(n);null!==r&&(e.splice(t,3),t-=3,ho(r,{pending:!0,data:s,method:n.method,action:a},a,s))}}))}function gh(e){function t(t){return mh(t,e)}null!==eh&&mh(eh,e),null!==th&&mh(th,e),null!==nh&&mh(nh,e),ah.forEach(t),sh.forEach(t);for(var n=0;n<rh.length;n++){var a=rh[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<rh.length&&null===(n=rh[0]).blockedOn;)ch(n),null===n.blockedOn&&rh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(a=0;a<n.length;a+=3){var s=n[a],r=n[a+1],o=s[Ie]||null;if("function"===typeof r)o||fh(n);else if(o){var i=null;if(r&&r.hasAttribute("formAction")){if(s=r,o=r[Ie]||null)i=o.formAction;else if(null!==Xu(s))continue}else i=o.action;"function"===typeof i?n[a+1]=i:(n.splice(a,3),a-=3),fh(n)}}}function xh(e){this._internalRoot=e}function vh(e){this._internalRoot=e}vh.prototype.render=xh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Bu(t.current,Mc(),e,t,null,null)},vh.prototype.unmount=xh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;0===e.tag&&nd(),Bu(e.current,2,null,e,null,null),Ic(),t[Ue]=null}},vh.prototype.unstable_scheduleHydration=function(e){if(e){var t=De();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rh.length&&0!==t&&t<rh[n].priority;n++);rh.splice(n,0,e),0===n&&ch(e)}};var bh=s.version;if("19.0.0"!==bh)throw Error(o(527,bh,"19.0.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=L(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(null===s)break;var r=s.alternate;if(null===r){if(null!==(a=s.return)){n=a;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===n)return I(s),e;if(r===a)return I(s),t;r=r.sibling}throw Error(o(188))}if(n.return!==a.return)n=s,a=r;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,a=r;break}if(l===a){i=!0,a=s,n=r;break}l=l.sibling}if(!i){for(l=r.child;l;){if(l===n){i=!0,n=r,a=s;break}if(l===a){i=!0,a=r,n=s;break}l=l.sibling}if(!i)throw Error(o(189))}}if(n.alternate!==a)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?U(e):null)?null:e.stateNode};var yh={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:P,findFiberByHostInstance:$e,reconcilerVersion:"19.0.0"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var wh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wh.isDisabled&&wh.supportsFiber)try{xe=wh.inject(yh),ve=wh}catch(kh){}}t.createRoot=function(e,t){if(!i(e))throw Error(o(299));var n=!1,a="",s=Do,r=Lo,l=Fo;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(a=t.identifierPrefix),void 0!==t.onUncaughtError&&(s=t.onUncaughtError),void 0!==t.onCaughtError&&(r=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=Iu(e,1,!1,null,0,n,a,s,r,l,0,null),e[
2Ue]=t.current,Od(8===e.nodeType?e.parentNode:e),new xh(t)},t.hydrateRoot=function(e,t,n){if(!i(e))throw Error(o(299));var a=!1,s="",r=Do,l=Lo,c=Fo,d=null;return null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(a=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onUncaughtError&&(r=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(d=n.formState)),(t=Iu(e,1,!0,t,0,a,s,r,l,c,0,d)).context=Uu(null),n=t.current,(s=Ri(a=Mc())).callback=null,Oi(n,s,a),t.current.lanes=a,Re(t,a),gd(t),e[Ue]=t.current,Od(e),new vh(t)},t.version="19.0.0"},672(e,t,n){var a=n(43);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");var l=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(s(299));return function(e,t,n){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:i,key:null==a?null:""+a,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=o.p;try{if(l.T=null,o.p=2,e)return e()}finally{l.T=t,o.p=n,o.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,o.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&o.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,a=c(n,t.crossOrigin),s="string"===typeof t.integrity?t.integrity:void 0,r="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?o.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:a,integrity:s,fetchPriority:r}):"script"===n&&o.d.X(e,{crossOrigin:a,integrity:s,fetchPriority:r,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);o.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&o.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,a=c(n,t.crossOrigin);o.d.L(e,n,{crossOrigin:a,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=c(t.as,t.crossOrigin);o.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else o.d.m(e)},t.requestFormReset=function(e){o.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.0.0"},391(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4)},950(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(672)},799(e,t){var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(e,t,a){var s=null;if(void 0!==a&&(s=""+a),void 0!==t.key&&(s=""+t.key),"key"in t)for(var r in a={},t)"key"!==r&&(a[r]=t[r]);else a=t;return t=a.ref,{$$typeof:n,type:e,key:s,ref:void 0!==t?t:null,props:a}}t.Fragment=a,t.jsx=s,t.jsxs=s},288(e,t){var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function x(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}x.prototype.isReactComponent={},x.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)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")},x.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=x.prototype;var y=b.prototype=new v;y.constructor=b,f(y,x.prototype),y.isPureReactComponent=!0;var w=Array.isArray,j={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function N(e,t,a,s,r,o){return a=o.ref,{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:o}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var A=/\/+/g;function _(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function C(){}function E(e,t,s,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var l,c,d=!1;if(null===e)d=!0;else switch(i){case"bigint":case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case n:case a:d=!0;break;case h:return E((d=e._init)(e._payload),t,s,r,o)}}if(d)return o=o(e),d=""===r?"."+_(e,0):r,w(o)?(s="",null!=d&&(s=d.replace(A,"$&/")+"/"),E(o,t,s,"",function(e){return e})):null!=o&&(S(o)&&(l=o,c=s+(null==o.key||e&&e.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+d,o=N(l.type,c,void 0,0,0,l.props)),t.push(o)),1;d=0;var u,p=""===r?".":r+":";if(w(e))for(var f=0;f<e.length;f++)d+=E(r=e[f],t,s,i=p+_(r,f),o);else if("function"===typeof(f=null===(u=e)||"object"!==typeof u?null:"function"===typeof(u=m&&u[m]||u["@@iterator"])?u:null))for(e=f.call(e),f=0;!(r=e.next()).done;)d+=E(r=r.value,t,s,i=p+_(r,f++),o);else if("object"===i){if("function"===typeof e.then)return E(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(C,C):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,s,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return d}function P(e,t,n){if(null==e)return e;var a=[],s=0;return E(e,a,"","",function(e){return t.call(n,e,s++)}),a}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function O(){}t.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=x,t.Fragment=s,t.Profiler=o,t.PureComponent=b,t.StrictMode=r,t.Suspense=
vendor: 6,816 bytes, line 2
2d,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,t.act=function(){throw Error("act(...) is not supported in production builds of React.")},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var a=f({},e.props),s=e.key;if(null!=t)for(r in void 0!==t.ref&&void 0,void 0!==t.key&&(s=""+t.key),t)!k.call(t,r)||"key"===r||"__self"===r||"__source"===r||"ref"===r&&void 0===t.ref||(a[r]=t[r]);var r=arguments.length-2;if(1===r)a.children=n;else if(1<r){for(var o=Array(r),i=0;i<r;i++)o[i]=arguments[i+2];a.children=o}return N(e.type,s,void 0,0,0,a)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},t.createElement=function(e,t,n){var a,s={},r=null;if(null!=t)for(a in void 0!==t.key&&(r=""+t.key),t)k.call(t,a)&&"key"!==a&&"__self"!==a&&"__source"!==a&&(s[a]=t[a]);var o=arguments.length-2;if(1===o)s.children=n;else if(1<o){for(var i=Array(o),l=0;l<o;l++)i[l]=arguments[l+2];s.children=i}if(e&&e.defaultProps)for(a in o=e.defaultProps)void 0===s[a]&&(s[a]=o[a]);return N(e,r,void 0,0,0,s)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:M}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=j.T,n={};j.T=n;try{var a=e(),s=j.S;null!==s&&s(n,a),"object"===typeof a&&null!==a&&"function"===typeof a.then&&a.then(O,R)}catch(r){R(r)}finally{j.T=t}},t.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},t.use=function(e){return j.H.use(e)},t.useActionState=function(e,t,n){return j.H.useActionState(e,t,n)},t.useCallback=function(e,t){return j.H.useCallback(e,t)},t.useContext=function(e){return j.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return j.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return j.H.useEffect(e,t)},t.useId=function(){return j.H.useId()},t.useImperativeHandle=function(e,t,n){return j.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return j.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return j.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return j.H.useMemo(e,t)},t.useOptimistic=function(e,t){return j.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return j.H.useReducer(e,t,n)},t.useRef=function(e){return j.H.useRef(e)},t.useState=function(e){return j.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return j.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return j.H.useTransition()},t.version="19.0.0"},43(e,t,n){e.exports=n(288)},579(e,t,n){e.exports=n(799)},896(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,s=e[a];if(!(0<r(s,t)))break e;e[a]=t,e[n]=s,n=a}}function a(e){return 0===e.length?null:e[0]}function s(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,s=e.length,o=s>>>1;a<o;){var i=2*(a+1)-1,l=e[i],c=i+1,d=e[c];if(0>r(l,n))c<s&&0>r(d,l)?(e[a]=d,e[c]=n,a=c):(e[a]=l,e[i]=n,a=i);else{if(!(c<s&&0>r(d,n)))break e;e[a]=d,e[c]=n,a=c}}}return t}function r(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();t.unstable_now=function(){return i.now()-l}}var c=[],d=[],u=1,h=null,m=3,p=!1,f=!1,g=!1,x="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function y(e){for(var t=a(d);null!==t;){if(null===t.callback)s(d);else{if(!(t.startTime<=e))break;s(d),t.sortIndex=t.expirationTime,n(c,t)}t=a(d)}}function w(e){if(g=!1,y(e),!f)if(null!==a(c))f=!0,M();else{var t=a(d);null!==t&&R(w,t.startTime-e)}}var j,k=!1,N=-1,S=5,A=-1;function _(){return!(t.unstable_now()-A<S)}function C(){if(k){var e=t.unstable_now();A=e;var n=!0;try{e:{f=!1,g&&(g=!1,v(N),N=-1),p=!0;var r=m;try{t:{for(y(e),h=a(c);null!==h&&!(h.expirationTime>e&&_());){var o=h.callback;if("function"===typeof o){h.callback=null,m=h.priorityLevel;var i=o(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof i){h.callback=i,y(e),n=!0;break t}h===a(c)&&s(c),y(e)}else s(c);h=a(c)}if(null!==h)n=!0;else{var l=a(d);null!==l&&R(w,l.startTime-e),n=!1}}break e}finally{h=null,m=r,p=!1}n=void 0}}finally{n?j():k=!1}}}if("function"===typeof b)j=function(){b(C)};else if("undefined"!==typeof MessageChannel){var E=new MessageChannel,P=E.port2;E.port1.onmessage=C,j=function(){P.postMessage(null)}}else j=function(){x(C,0)};function M(){k||(k=!0,j())}function R(e,n){N=x(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||p||(f=!0,M())},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return a(c)},t.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var n=m;m=t;try{return e()}finally{m=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=m;m=e;try{return t()}finally{m=n}},t.unstable_scheduleCallback=function(e,s,r){var o=t.unstable_now();switch("object"===typeof r&&null!==r?r="number"===typeof(r=r.delay)&&0<r?o+r:o:r=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return e={id:u++,callback:s,priorityLevel:e,startTime:r,expirationTime:i=r+i,sortIndex:-1},r>o?(e.sortIndex=r,n(d,e),null===a(c)&&e===a(d)&&(g?(v(N),N=-1):g=!0,R(w,r-o))):(e.sortIndex=i,n(c,e),f||p||(f=!0,M())),e},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},853(e,t,n){e.exports=n(896)},145(e,t,n){function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}n.d(t,{A:()=>a})},369(e,t,n){function a(e){if(Array.isArray(e))return e}n.d(t,{A:()=>a})},562(e,t,n){function a(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>a})},555(e,t,n){function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t||"default");if("object"!=a(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}function r(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}n.d(t,{A:()=>i})},986(e,t,n){function a(e,t){if(null==e)return{};var n,a,s=function(e,t){if(null==e)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}n.d(t,{A:()=>a})},544(e,t,n){n.d(t,{A:()=>o});var a=n(369);var s=n(800),r=n(562);function o(e,t){return(0,a.A)(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,s,r,o,i=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw s}}return i}}(e,t)||(0,s.A)(e,t)||(0,r.A)()}},800(e,t,n){n.d(t,{A:()=>s});var a=n(145);function s(e,t){if(e){if("string"==typeof e)return(0,a.A)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,a.A)(e,t):void 0}}}},t={};function n(a){var s=t[a];if(void 0!==s)return s.exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,n),r.exports}n.m=e,(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(a,s){if(1&s&&(a=this(a)),8&s)return a;if("object"===typeof a&&a){if(4&s&&a.__esModule)return a;
2if(16&s&&"function"===typeof a.then)return a}var r=Object.create(null);n.r(r);var o={};e=e||[null,t({}),t([]),t(t)];for(var i=2&s&&a;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>o[e]=()=>a[e]);return o.default=()=>a,n.d(r,o),r}})(),n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,a)=>(n.f[a](e,t),t),[])),n.u=e=>"static/js/"+e+".52d2e2bf.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend:";n.l=(a,s,r,o)=>{if(e[a])e[a].push(s);else{var i,l;if(void 0!==r)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==a||u.getAttribute("data-webpack")==t+r){i=u;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+r),i.src=a),e[a]=[s];var h=(t,n)=>{i.onerror=i.onload=null,clearTimeout(m);var s=e[a];if(delete e[a],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach(e=>e(n)),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),l&&document.head.appendChild(i)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,a)=>{var s=n.o(e,t)?e[t]:void 0;if(0!==s)if(s)a.push(s[2]);else{var r=new Promise((n,a)=>s=e[t]=[n,a]);a.push(s[2]=r);var o=n.p+n.u(t),i=new Error;n.l(o,a=>{if(n.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var r=a&&("load"===a.type?"missing":a.type),o=a&&a.target&&a.target.src;i.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,s[1](i)}},"chunk-"+t,t)}};var t=(t,a)=>{var s,r,[o,i,l]=a,c=0;if(o.some(t=>0!==e[t])){for(s in i)n.o(i,s)&&(n.m[s]=i[s]);if(l)l(n)}for(t&&t(a);c<o.length;c++)r=o[c],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0},a=self.webpackChunkfrontend=self.webpackChunkfrontend||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),n.nc=void 0;var a={};n.r(a),n.d(a,{hasBrowserEnv:()=>ur,hasStandardBrowserEnv:()=>mr,hasStandardBrowserWebWorkerEnv:()=>pr,navigator:()=>hr,origin:()=>fr});var s=n(43),r=n.t(s,2),o=n(391),i=n(555);function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,n){l(e,t),t.set(e,n)}function d(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function u(e,t){return e.get(d(e,t))}function h(e,t,n){return e.set(d(e,t),n),n}var m="undefined"===typeof window||"Deno"in globalThis;function p(){}function f(e,t){return"function"===typeof e?e(t):e}function g(e,t){const n=e.type,a=void 0===n?"all":n,s=e.exact,r=e.fetchStatus,o=e.predicate,i=e.queryKey,l=e.stale;if(i)if(s){if(t.queryHash!==v(i,t.options))return!1}else if(!y(t.queryKey,i))return!1;if("all"!==a){const e=t.isActive();if("active"===a&&!e)return!1;if("inactive"===a&&e)return!1}return("boolean"!==typeof l||t.isStale()===l)&&((!r||r===t.state.fetchStatus)&&!(o&&!o(t)))}function x(e,t){const n=e.exact,a=e.status,s=e.predicate,r=e.mutationKey;if(r){if(!t.options.mutationKey)return!1;if(n){if(b(t.options.mutationKey)!==b(r))return!1}else if(!y(t.options.mutationKey,r))return!1}return(!a||t.state.status===a)&&!(s&&!s(t))}function v(e,t){return((null===t||void 0===t?void 0:t.queryKeyHashFn)||b)(e)}function b(e){return JSON.stringify(e,(e,t)=>k(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function y(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&!Object.keys(t).some(n=>!y(e[n],t[n])))}function w(e,t){if(e===t)return e;const n=j(e)&&j(t);if(n||k(e)&&k(t)){const a=n?e:Object.keys(e),s=a.length,r=n?t:Object.keys(t),o=r.length,i=n?[]:{};let l=0;for(let c=0;c<o;c++){const s=n?c:r[c];(!n&&a.includes(s)||n)&&void 0===e[s]&&void 0===t[s]?(i[s]=void 0,l++):(i[s]=w(e[s],t[s]),i[s]===e[s]&&void 0!==e[s]&&l++)}return s===o&&l===s?e:i}return t}function j(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e){if(!N(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!N(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function N(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e,t,n){return"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?w(e,t):t}function A(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const a=[...e,t];return n&&a.length>n?a.slice(1):a}function _(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var C=Symbol();function E(e,t){return!e.queryFn&&null!==t&&void 0!==t&&t.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==C?e.queryFn:()=>Promise.reject(new Error("Missing queryFn: '".concat(e.queryHash,"'")))}function P(e,t){l(e,t),t.add(e)}var M,R,O,z,T,D,L=function(){let e=[],t=0,n=e=>{e()},a=e=>{e()},s=e=>setTimeout(e,0);const r=a=>{t?e.push(a):s(()=>{n(a)})};return{batch:r=>{let o;t++;try{o=r()}finally{t--,t||(()=>{const t=e;e=[],t.length&&s(()=>{a(()=>
2{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];r(()=>{e(...n)})},schedule:r,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{a=e},setScheduler:e=>{s=e}}}(),F=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I=new(M=new WeakMap,R=new WeakMap,O=new WeakMap,class extends F{constructor(){super(),c(this,M,void 0),c(this,R,void 0),c(this,O,void 0),h(O,this,e=>{if(!m&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){u(R,this)||this.setEventListener(u(O,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=u(R,this))||void 0===e||e.call(this),h(R,this,void 0))}setEventListener(e){var t;h(O,this,e),null===(t=u(R,this))||void 0===t||t.call(this),h(R,this,e(e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){u(M,this)!==e&&(h(M,this,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"===typeof u(M,this)?u(M,this):"hidden"!==(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)}}),U=new(z=new WeakMap,T=new WeakMap,D=new WeakMap,class extends F{constructor(){super(),c(this,z,!0),c(this,T,void 0),c(this,D,void 0),h(D,this,e=>{if(!m&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){u(T,this)||this.setEventListener(u(D,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=u(T,this))||void 0===e||e.call(this),h(T,this,void 0))}setEventListener(e){var t;h(D,this,e),null===(t=u(T,this))||void 0===t||t.call(this),h(T,this,e(this.setOnline.bind(this)))}setOnline(e){u(z,this)!==e&&(h(z,this,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return u(z,this)}});function B(e){return Math.min(1e3*2**e,3e4)}function W(e){return"online"!==(null!==e&&void 0!==e?e:"online")||U.isOnline()}var q,H=class extends Error{constructor(e){super("CancelledError"),this.revert=null===e||void 0===e?void 0:e.revert,this.silent=null===e||void 0===e?void 0:e.silent}};function V(e){return e instanceof H}function Y(e){let t,n,a,s=!1,r=0,o=!1;const i=new Promise((e,t)=>{n=e,a=t}),l=()=>I.isFocused()&&("always"===e.networkMode||U.isOnline())&&e.canRun(),c=()=>W(e.networkMode)&&e.canRun(),d=a=>{var s,r;o||(o=!0,null===(s=e.onSuccess)||void 0===s||s.call(e,a),null===(r=t)||void 0===r||r(),n(a))},u=n=>{var s,r;o||(o=!0,null===(s=e.onError)||void 0===s||s.call(e,n),null===(r=t)||void 0===r||r(),a(n))},h=()=>new Promise(n=>{var a;t=e=>{(o||l())&&n(e)},null===(a=e.onPause)||void 0===a||a.call(e)}).then(()=>{var n;(t=void 0,o)||(null===(n=e.onContinue)||void 0===n||n.call(e))}),p=()=>{if(o)return;let t;const n=0===r?e.initialPromise:void 0;try{t=null!==n&&void 0!==n?n:e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(d).catch(t=>{var n,a,i;if(o)return;const c=null!==(n=e.retry)&&void 0!==n?n:m?0:3,d=null!==(a=e.retryDelay)&&void 0!==a?a:B,f="function"===typeof d?d(r,t):d,g=!0===c||"number"===typeof c&&r<c||"function"===typeof c&&c(r,t);var x;!s&&g?(r++,null===(i=e.onFail)||void 0===i||i.call(e,r,t),(x=f,new Promise(e=>{setTimeout(e,x)})).then(()=>l()?void 0:h()).then(()=>{s?u(t):p()})):u(t)})};return{promise:i,cancel:t=>{var n;o||(u(new H(t)),null===(n=e.abort)||void 0===n||n.call(e))},continue:()=>{var e;return null===(e=t)||void 0===e||e(),i},cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:c,start:()=>(c()?p():h().then(p),i)}}var $,Q,K,G,X,J,Z,ee,te=(q=new WeakMap,class{constructor(){c(this,q,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"===typeof(e=this.gcTime)&&e>=0&&e!==1/0&&h(q,this,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!==e&&void 0!==e?e:m?1/0:3e5)}clearGcTimeout(){u(q,this)&&(clearTimeout(u(q,this)),h(q,this,void 0))}}),ne=($=new WeakMap,Q=new WeakMap,K=new WeakMap,G=new WeakMap,X=new WeakMap,J=new WeakMap,Z=new WeakSet,class extends te{constructor(e){var t;super(),P(this,Z),c(this,$,void 0),c(this,Q,void 0),c(this,K,void 0),c(this,G,void 0),c(this,X,void 0),c(this,J,void 0),h(J,this,!1),h(X,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(K,this,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h($,this,function(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,a=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!==a&&void 0!==a?a:Date.now():0,error:null,errorUpdate
2Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=null!==(t=e.state)&&void 0!==t?t:u($,this),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null===(e=u(G,this))||void 0===e?void 0:e.promise}setOptions(e){this.options=(0,i.A)((0,i.A)({},u(X,this)),e),this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||u(K,this).remove(this)}setData(e,t){const n=S(this.state.data,e,this.options);return d(Z,this,ae).call(this,{data:n,type:"success",dataUpdatedAt:null===t||void 0===t?void 0:t.updatedAt,manual:null===t||void 0===t?void 0:t.manual}),n}setState(e,t){d(Z,this,ae).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const a=null===(t=u(G,this))||void 0===t?void 0:t.promise;return null===(n=u(G,this))||void 0===n||n.cancel(e),a?a.then(p).catch(p):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(u($,this))}isActive(){return this.observers.some(e=>{return!1!==(t=e.options.enabled,n=this,"function"===typeof t?t(n):t);var t,n})}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||void 0===this.state.data||!function(e,t){return Math.max(e+(t||0)-Date.now(),0)}(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=u(G,this))||void 0===e||e.continue()}onOnline(){var e;const t=this.observers.find(e=>e.shouldFetchOnReconnect());null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=u(G,this))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),u(K,this).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(u(G,this)&&(u(J,this)?u(G,this).cancel({revert:!0}):u(G,this).cancelRetry()),this.scheduleGc()),u(K,this).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||d(Z,this,ae).call(this,{type:"invalidate"})}fetch(e,t){var n,a;if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&null!==t&&void 0!==t&&t.cancelRefetch)this.cancel({silent:!0});else if(u(G,this))return u(G,this).continueRetry(),u(G,this).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const s=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(h(J,this,!0),s.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=E(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return r(n),h(J,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)}};var i;(r(o),null===(n=this.options.behavior)||void 0===n||n.onFetch(o,this),h(Q,this,this.state),"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(a=o.fetchOptions)||void 0===a?void 0:a.meta))&&d(Z,this,ae).call(this,{type:"fetch",meta:null===(i=o.fetchOptions)||void 0===i?void 0:i.meta});const l=e=>{var t,n,a,s;(V(e)&&e.silent||d(Z,this,ae).call(this,{type:"error",error:e}),V(e))||(null===(t=(n=u(K,this).config).onError)||void 0===t||t.call(n,e,this),null===(a=(s=u(K,this).config).onSettled)||void 0===a||a.call(s,this.state.data,e,this));this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return h(G,this,Y({initialPromise:null===t||void 0===t?void 0:t.initialPromise,fn:o.fetchFn,abort:s.abort.bind(s),onSuccess:e=>{var t,n,a,s;if(void 0!==e){try{this.setData(e)}catch(r){return void l(r)}null===(t=(n=u(K,this).config).onSuccess)||void 0===t||t.call(n,e,this),null===(a=(s=u(K,this).config).onSettled)||void 0===a||a.call(s,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1}else l(new Error("".concat(this.queryHash," data is undefined")))},onError:l,onFail:(e,t)=>{d(Z,this,ae).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{d(Z,this,ae).call(this,{type:"pause"})},onContinue:()=>{d(Z,this,ae).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),u(G,this).start()}});function ae(e){this.state=(t=>{var n,a;switch(e.type){case"failed":return(0,i.A)((0,i.A)({},t),{},{fetchFailureCount:e.failureCount,fetchFailureReason:e.error});case"pause":return(0,i.A)((0,i.A)({},t),{},{fetchStatus:"paused"});case"continue":return(0,i.A)((0,i.A)({},t),{},{fetchStatus:"fetching"});case"fetch":return(0,i.A)((0,i.A)((0,i.A)({},t),function(e,t){return(0,i.A)({fetchFailureCount:0,fetchFailureReason:null,fetchStatus:W(t.networkMode)?"fetching":"paused"},void 0===e&&{error:null,status:"pending"})}(t.data,this.options)),{},{fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null});case"success":return(0,i.A)((0,i.A)({},t),{},{data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(a=e.dataUpdatedAt)&&void 0!==a?a:Date.now(),error:null,isInvalidated:!1,status:"success"},!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const s=e.error;return V(s)&&s.revert&&u(Q,this)?(0,i.A)((0,i.A)({},u(Q,this)),{},{fetchStatus:"idle"}):(0,i.A)((0,i.A)({},t),{}
2,{error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"});case"invalidate":return(0,i.A)((0,i.A)({},t),{},{isInvalidated:!0});case"setState":return(0,i.A)((0,i.A)({},t),e.state)}})(this.state),L.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),u(K,this).notify({query:this,type:"updated",action:e})})}var se,re,oe,ie,le,ce,de=(ee=new WeakMap,class extends F{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),c(this,ee,void 0),this.config=e,h(ee,this,new Map)}build(e,t,n){var a;const s=t.queryKey,r=null!==(a=t.queryHash)&&void 0!==a?a:v(s,t);let o=this.get(r);return o||(o=new ne({cache:this,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){u(ee,this).has(e.queryHash)||(u(ee,this).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=u(ee,this).get(e.queryHash);t&&(e.destroy(),t===e&&u(ee,this).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){L.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return u(ee,this).get(e)}getAll(){return[...u(ee,this).values()]}find(e){const t=(0,i.A)({exact:!0},e);return this.getAll().find(e=>g(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>g(e,t)):t}notify(e){L.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){L.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){L.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}),ue=(se=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakSet,class extends te{constructor(e){super(),P(this,ie),c(this,se,void 0),c(this,re,void 0),c(this,oe,void 0),this.mutationId=e.mutationId,h(re,this,e.mutationCache),h(se,this,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){u(se,this).includes(e)||(u(se,this).push(e),this.clearGcTimeout(),u(re,this).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){h(se,this,u(se,this).filter(t=>t!==e)),this.scheduleGc(),u(re,this).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){u(se,this).length||("pending"===this.state.status?this.scheduleGc():u(re,this).remove(this))}continue(){var e,t;return null!==(e=null===(t=u(oe,this))||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){var t;h(oe,this,Y({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{d(ie,this,he).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{d(ie,this,he).call(this,{type:"pause"})},onContinue:()=>{d(ie,this,he).call(this,{type:"continue"})},retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(re,this).canRun(this)}));const n="pending"===this.state.status,a=!u(oe,this).canStart();try{var s,r,o,i,l,c,m,p;if(!n){var f,g,x,v;d(ie,this,he).call(this,{type:"pending",variables:e,isPaused:a}),await(null===(f=(g=u(re,this).config).onMutate)||void 0===f?void 0:f.call(g,e,this));const t=await(null===(x=(v=this.options).onMutate)||void 0===x?void 0:x.call(v,e));t!==this.state.context&&d(ie,this,he).call(this,{type:"pending",context:t,variables:e,isPaused:a})}const t=await u(oe,this).start();return await(null===(s=(r=u(re,this).config).onSuccess)||void 0===s?void 0:s.call(r,t,e,this.state.context,this)),await(null===(o=(i=this.options).onSuccess)||void 0===o?void 0:o.call(i,t,e,this.state.context)),await(null===(l=(c=u(re,this).config).onSettled)||void 0===l?void 0:l.call(c,t,null,this.state.variables,this.state.context,this)),await(null===(m=(p=this.options).onSettled)||void 0===m?void 0:m.call(p,t,null,e,this.state.context)),d(ie,this,he).call(this,{type:"success",data:t}),t}catch(_){try{var b,y,w,j,k,N,S,A;throw await(null===(b=(y=u(re,this).config).onError)||void 0===b?void 0:b.call(y,_,e,this.state.context,this)),await(null===(w=(j=this.options).onError)||void 0===w?void 0:w.call(j,_,e,this.state.context)),await(null===(k=(N=u(re,this).config).onSettled)||void 0===k?void 0:k.call(N,void 0,_,this.state.variables,this.state.context,this)),await(null===(S=(A=this.options).onSettled)||void 0===S?void 0:S.call(A,void 0,_,e,this.state.context)),_}finally{d(ie,this,he).call(this,{type:"error",error:_})}}finally{u(re,this).runNext(this)}}});function he(e){this.state=(t=>{switch(e.type){case"failed":return(0,i.A)((0,i.A)({},t),{},{failureCount:e.failureCount,failureReason:e.error});case"pause":return(0,i.A)((0,i.A)({},t),{},{isPaused:!0});case"continue":return(0,i.A)((0,i.A)({},t),{},{isPaused:!1});
2case"pending":return(0,i.A)((0,i.A)({},t),{},{context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()});case"success":return(0,i.A)((0,i.A)({},t),{},{data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return(0,i.A)((0,i.A)({},t),{},{data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"})}})(this.state),L.batch(()=>{u(se,this).forEach(t=>{t.onMutationUpdate(e)}),u(re,this).notify({mutation:this,type:"updated",action:e})})}var me,pe,fe,ge,xe,ve,be,ye,we=(le=new WeakMap,ce=new WeakMap,class extends F{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),c(this,le,void 0),c(this,ce,void 0),this.config=e,h(le,this,new Map),h(ce,this,Date.now())}build(e,t,n){var a;const s=new ue({mutationCache:this,mutationId:h(ce,this,(a=u(ce,this),++a)),options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){var t;const n=je(e),a=null!==(t=u(le,this).get(n))&&void 0!==t?t:[];a.push(e),u(le,this).set(n,a),this.notify({type:"added",mutation:e})}remove(e){const t=je(e);if(u(le,this).has(t)){var n;const a=null===(n=u(le,this).get(t))||void 0===n?void 0:n.filter(t=>t!==e);a&&(0===a.length?u(le,this).delete(t):u(le,this).set(t,a))}this.notify({type:"removed",mutation:e})}canRun(e){var t;const n=null===(t=u(le,this).get(je(e)))||void 0===t?void 0:t.find(e=>"pending"===e.state.status);return!n||n===e}runNext(e){var t,n;const a=null===(t=u(le,this).get(je(e)))||void 0===t?void 0:t.find(t=>
2t!==e&&t.state.isPaused);return null!==(n=null===a||void 0===a?void 0:a.continue())&&void 0!==n?n:Promise.resolve()}clear(){L.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...u(le,this).values()].flat()}find(e){const t=(0,i.A)({exact:!0},e);return this.getAll().find(e=>x(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(t=>x(e,t))}notify(e){L.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return L.batch(()=>Promise.all(e.map(e=>e.continue().catch(p))))}});function je(e){var t,n;return null!==(t=null===(n=e.options.scope)||void 0===n?void 0:n.id)&&void 0!==t?t:String(e.mutationId)}function ke(e){return{onFetch:(t,n)=>{var a,s,r;const o=t.options,i=null===(a=t.fetchOptions)||void 0===a||null===(a=a.meta)||void 0===a||null===(a=a.fetchMore)||void 0===a?void 0:a.direction,l=(null===(s=t.state.data)||void 0===s?void 0:s.pages)||[],c=(null===(r=t.state.data)||void 0===r?void 0:r.pageParams)||[];let d={pages:[],pageParams:[]},u=0;const h=async()=>{let n=!1;const a=E(t.options,t.fetchOptions),s=async(e,s,r)=>{if(n)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);const o={queryKey:t.queryKey,pageParam:s,direction:r?"backward":"forward",meta:t.options.meta};var i;i=o,Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener("abort",()=>{n=!0}),t.signal)});const l=await a(o),c=t.options.maxPages,d=r?_:A;return{pages:d(e.pages,l,c),pageParams:d(e.pageParams,s,c)}};if(i&&l.length){const e="backward"===i,t={pages:l,pageParams:c},n=(e?Se:Ne)(o,t);d=await s(t,n,e)}else{const t=null!==e&&void 0!==e?e:l.length;do{var r;const e=0===u?null!==(r=c[0])&&void 0!==r?r:o.initialPageParam:Ne(o,d);if(u>0&&null==e)break;d=await s(d,e),u++}while(u<t)}return d};t.options.persister?t.fetchFn=()=>{var e,a;return null===(e=(a=t.options).persister)||void 0===e?void 0:e.call(a,h,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function Ne(e,t){let n=t.pages,a=t.pageParams;const s=n.length-1;return n.length>0?e.getNextPageParam(n[s],n,a[s],a):void 0}function Se(e,t){var n;let a=t.pages,s=t.pageParams;return a.length>0?null===(n=e.getPreviousPageParam)||void 0===n?void 0:n.call(e,a[0],a,s[0],s):void 0}var Ae=(me=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap,xe=new WeakMap,ve=new WeakMap,be=new WeakMap,ye=new WeakMap,class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,me,void 0),c(this,pe,void 0),c(this,fe,void 0),c(this,ge,void 0),c(this,xe,void 0),c(this,ve,void 0),c(this,be,void 0),c(this,ye,void 0),h(me,this,e.queryCache||new de),h(pe,this,e.mutationCache||new we),h(fe,this,e.defaultOptions||{}),h(ge,this,new Map),h(xe,this,new Map),h(ve,this,0)}mount(){var e;h(ve,this,(e=u(ve,this),e++,e)),1===u(ve,this)&&(h(be,this,I.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(me,this).onFocus())})),h(ye,this,U.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(me,this).onOnline())})))}unmount(){var e,t,n;h(ve,this,(e=u(ve,this),e--,e)),0===u(ve,this)&&(null===(t=u(be,this))||void 0===t||t.call(this),h(be,this,void 0),null===(n=u(ye,this))||void 0===n||n.call(this),h(ye,this,void 0))}isFetching(e){return u(me,this).findAll((0,i.A)((0,i.A)({},e),{},{fetchStatus:"fetching"})).length}isMutating(e){return u(pe,this).findAll((0,i.A)((0,i.A)({},e),{},{status:"pending"})).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=u(me,this).get(n.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),a=u(me,this).build(this,n);return e.revalidateIfStale&&a.isStaleByTime(f(n.staleTime,a))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return u(me,this).findAll(e).map(e=>[e.queryKey,e.state.data])}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=u(me,this).get(a.queryHash),r=function(e,t){return"function"===typeof e?e(t):e}(t,null===s||void 0===s?void 0:s.state.data);if(void 0!==r)return u(me,this).build(this,a).setData(r,(0,i.A)((0,i.A)({},n),{},{manual:!0}))}
2setQueriesData(e,t,n){return L.batch(()=>u(me,this).findAll(e).map(e=>{let a=e.queryKey;return[a,this.setQueryData(a,t,n)]}))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=u(me,this).get(n.queryHash))||void 0===t?void 0:t.state}removeQueries(e){const t=u(me,this);L.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=u(me,this),a=(0,i.A)({type:"active"},e);return L.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries(a,t)))}cancelQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,i.A)({revert:!0},t),a=L.batch(()=>u(me,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(a).then(p).catch(p)}invalidateQueries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return L.batch(()=>{var n,a;if(u(me,this).findAll(e).forEach(e=>{e.invalidate()}),"none"===e.refetchType)return Promise.resolve();const s=(0,i.A)((0,i.A)({},e),{},{type:null!==(n=null!==(a=e.refetchType)&&void 0!==a?a:e.type)&&void 0!==n?n:"active"});return this.refetchQueries(s,t)})}refetchQueries(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;const a=(0,i.A)((0,i.A)({},n),{},{cancelRefetch:null===(e=null===n||void 0===n?void 0:n.cancelRefetch)||void 0===e||e}),s=L.batch(()=>u(me,this).findAll(t).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,a);return a.throwOnError||(t=t.catch(p)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(s).then(p)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=u(me,this).build(this,t);return n.isStaleByTime(f(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(p).catch(p)}fetchInfiniteQuery(e){return e.behavior=ke(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(p).catch(p)}ensureInfiniteQueryData(e){return e.behavior=ke(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return U.isOnline()?u(pe,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(me,this)}getMutationCache(){return u(pe,this)}getDefaultOptions(){return u(fe,this)}setDefaultOptions(e){h(fe,this,e)}setQueryDefaults(e,t){u(ge,this).set(b(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...u(ge,this).values()];let n={};return t.forEach(t=>{y(e,t.queryKey)&&(n=(0,i.A)((0,i.A)({},n),t.defaultOptions))}),n}setMutationDefaults(e,t){u(xe,this).set(b(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...u(xe,this).values()];let n={};return t.forEach(t=>{y(e,t.mutationKey)&&(n=(0,i.A)((0,i.A)({},n),t.defaultOptions))}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t=(0,i.A)((0,i.A)((0,i.A)((0,i.A)({},u(fe,this).queries),this.getQueryDefaults(e.queryKey)),e),{},{_defaulted:!0});return t.queryHash||(t.queryHash=v(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===C&&(t.enabled=!1),t}defaultMutationOptions(e){return null!==e&&void 0!==e&&e._defaulted?e:(0,i.A)((0,i.A)((0,i.A)((0,i.A)({},u(fe,this).mutations),(null===e||void 0===e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey)),e),{},{_defaulted:!0})}clear(){u(me,this).clear(),u(pe,this).clear()}}),_e=n(579),Ce=s.createContext(void 0),Ee=e=>{let t=e.client,n=e.children;return s.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,_e.jsx)(Ce.Provider,{value:t,children:n})};var Pe=n(986),Me=n(145),Re=n(369);var Oe=n(800),ze=n(562);function Te(e){return(0,Re.A)(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,Oe.A)(e)||(0,ze.A)()}var De=n(544);const Le=["sri"],Fe=["page"],Ie=["page","matches"],Ue=["page","matches"],Be=["onClick","discover","prefetch","relative","reloadDocument","replace","mask","state","target","to","preventScrollReset","viewTransition","defaultShouldRevalidate"],We=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],qe=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition","defaultShouldRevalidate"];var He="popstate";function Ve(e){return"object"===typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Ye(){return Ze(function(e,t){var n;let a=null===(n=t.state)||void 0===n?void 0:n.masked,s=a||e.location;return Ge("",{pathname:s.pathname,search:s.search,hash:s.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default",a?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"===typeof t?t:Xe(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function $e(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function Qe(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function Ke(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ge(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;return(0,i.A)((0,i.A)({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?Je(t):t),{},{state:n,key:t&&t.key||a||Math.random().toString(36).substring(2,10),mask:s})}function Xe(e){let t=e.pathname,n=void 0===t?"/":t,a=e.search,s=void 0===a?"":a,r=e.hash,o=void 0===r?"":r;return s&&"?"!==s&&(n+="?"===s.charAt(0)?s:"?"+s),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function Je(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Ze(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=a.window,r=void 0===s?document.defaultView:s,o=a.v5Compat,l=void 0!==o&&o,c=r.history,d="POP",u=null,h=m();function m(){return(c.state||{idx:null}).idx}function p(){d="POP";let e=m(),t=null==e?null:e-h;h=e,u&&u({action:d,location:g.location,delta:t})}function f(e){return et(e)}null==h&&(h=0,c.replaceState((0,i.A)((0,i.A)({},c.state),{},{idx:h}),""));let g={get action(){return d},get location(){return e(r,c)},listen(e){if(u)throw new Error("A history only accepts one active listener");return r.addEventListener(He,p),u=e,()=>{r.removeEventListener(He,p),u=null}},createHref:e=>t(r,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){d="PUSH";let a=Ve(e)?e:Ge(g.location,e,t);n&&n(a,e),h=m()+1;let s=Ke(a,h),o=g.createHref(a.mask||a);try{c.pushState(s,"",o)}catch(i){if(i instanceof DOMException&&"DataCloneError"===i.name)throw i;r.location.assign(o)}l&&u&&u({action:d,location:g.location,delta:1})},replace:function(e,t){d="REPLACE";let a=Ve(e)?e:Ge(g.location,e,t);n&&n(a,e),h=m();let s=Ke(a,h),r=g.createHref(a.mask||a);c.replaceState(s,"",r),l&&u&&u({action:d,location:g.location,delta:0})},go:e=>c.go(e)};return g}function et(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),$e(n,"No window.location.(origin|href) available to create URL");let a="string"===typeof e?e:Xe(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}new WeakMap;function tt(e,t){return nt(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function nt(e,t,n,a,s){let r=vt(("string"===typeof t?Je(t):t).pathname||"/",n);if(null==r)return null;let o=null!==s&&void 0!==s?s:at(e),i=null,l=xt(r);for(let c=0;null==i&&c<o.length;++c)i=pt(o[c],l,a);return i}function at(e){let t=st(e);return function(e){e.sort((e,t)=>
2e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function st(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=function(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,i=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(a)&&o)return;$e(l.relativePath.startsWith(a),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(a,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(a.length)}let c=At([a,l.relativePath]),d=n.concat(l);e.children&&e.children.length>0&&($e(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),st(e.children,t,d,c,o)),(null!=e.path||e.index)&&t.push({path:c,score:mt(c,e.index),routesMeta:d})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let a of rt(e.path))r(e,t,!0,a);else r(e,t)}),t}function rt(e){let t=e.split("/");if(0===t.length)return[];let n=Te(t),a=n[0],s=(0,Me.A)(n).slice(1),r=a.endsWith("?"),o=a.replace(/\?$/,"");if(0===s.length)return r?[o,""]:[o];let i=rt(s.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),r&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var ot=/^:[\w-]+$/,it=3,lt=2,ct=1,dt=10,ut=-2,ht=e=>"*"===e;function mt(e,t){let n=e.split("/"),a=n.length;return n.some(ht)&&(a+=ut),t&&(a+=lt),n.filter(e=>!ht(e)).reduce((e,t)=>e+(ot.test(t)?it:""===t?ct:dt),a)}function pt(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.routesMeta,s={},r="/",o=[];for(let i=0;i<a.length;++i){let e=a[i],l=i===a.length-1,c="/"===r?t:t.slice(r.length)||"/",d=ft({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),u=e.route;if(!d&&l&&n&&!a[a.length-1].route.index&&(d=ft({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!d)return null;
2Object.assign(s,d.params),o.push({params:s,pathname:At([r,d.pathname]),pathnameBase:Ct(At([r,d.pathnameBase])),route:u}),"/"!==d.pathnameBase&&(r=At([r,d.pathnameBase]))}return o}function ft(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let n=gt(e.path,e.caseSensitive,e.end),a=(0,De.A)(n,2),s=a[0],r=a[1],o=t.match(s);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),c=o.slice(1),d=r.reduce((e,t,n)=>{let a=t.paramName,s=t.isOptional;if("*"===a){let e=c[n]||"";l=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const r=c[n];return e[a]=s&&!r?void 0:(r||"").replace(/%2F/g,"/"),e},{});return{params:d,pathname:i,pathnameBase:l,pattern:e}}function gt(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Qe("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,s,r)=>{if(a.push({paramName:t,isOptional:null!=n}),n){let t=r.charAt(s+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":""!==e&&"/"!==e&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function xt(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return Qe(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function vt(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}
2var bt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yt(e,t){let n=_t(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function wt(e,t,n,a){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(a),"].  Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function jt(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function kt(e){let t=jt(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Nt(e,t,n){let a,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?a=Je(e):(a=(0,i.A)({},e),$e(!a.pathname||!a.pathname.includes("?"),wt("?","pathname","search",a)),$e(!a.pathname||!a.pathname.includes("#"),wt("#","pathname","hash",a)),$e(!a.search||!a.search.includes("#"),wt("#","search","hash",a)));let r,o=""===e||""===a.pathname,l=o?"/":a.pathname;if(null==l)r=n;else{let e=t.length-1;if(!s&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}r=e>=0?t[e]:"/"}let c=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",a="string"===typeof e?Je(e):e,s=a.pathname,r=a.search,o=void 0===r?"":r,i=a.hash,l=void 0===i?"":i;return s?(s=St(s),t=s.startsWith("/")?yt(s.substring(1),"/"):yt(s,n)):t=n,{pathname:t,search:Et(o),hash:Pt(l)}}(a,r),d=l&&"/"!==l&&l.endsWith("/"),u=(o||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!u||(c.pathname+="/"),c}var St=e=>e.replace(/\/\/+/g,"/"),At=e=>St(e.join("/")),_t=e=>e.replace(/\/+$/,""),Ct=e=>_t(e).replace(/^\/*/,"/"),Et=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Pt=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Mt=class{constructor(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Rt(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function Ot(e){let t=e.map(e=>e.route.path).filter(Boolean);return At(t)||"/"}var zt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function Tt(e,t){let n=e;if("string"!==typeof n||!bt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(zt)try{let e=new URL(window.location.href),a=n.startsWith("//")?new URL(e.protocol+n):new URL(n),r=vt(a.pathname,t);a.origin===e.origin&&null!=r?n=r+a.search+a.hash:s=!0}catch(r){Qe(!1,'<Link to="'.concat(n,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:a,isExternal:s,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Dt=["POST","PUT","PATCH","DELETE"],Lt=(new Set(Dt),["GET",...Dt]);new Set(Lt),Symbol("ResetLoaderData");new WeakMap,new WeakMap,new WeakMap,new WeakMap;var Ft=s.createContext(null);Ft.displayName="DataRouter";var It=s.createContext(null);It.displayName="DataRouterState";var Ut=s.createContext(!1);function Bt(){return s.useContext(Ut)}var Wt=s.createContext({isTransitioning:!1});Wt.displayName="ViewTransition";var qt=s.createContext(new Map);qt.displayName="Fetchers";var Ht=s.createContext(null);Ht.displayName="Await";var Vt=s.createContext(null);Vt.displayName="Navigation";var Yt=s.createContext(null);Yt.displayName="Location";var $t=s.createContext({outlet:null,matches:[],isDataRoute:!1});$t.displayName="Route";var Qt=s.createContext(null);Qt.displayName="RouteError";var Kt="REACT_ROUTER_ERROR";function Gt(){return null!=s.useContext(Yt)}function Xt(){return $e(Gt(),"useLocation() may be used only in the context of a <Router> component."),s.useContext(Yt).location}var Jt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zt(e){s.useContext(Vt).static||s.useLayoutEffect(e)}function en(){return s.useContext($t).isDataRoute?function(){let e=pn("useNavigate").router,t=gn("useNavigate"),n=s.useRef(!1);Zt(()=>{n.current=!0});let a=s.useCallback(async function(a){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Qe(n.current,Jt),n.current&&("number"===typeof a?await e.navigate(a):await e.navigate(a,(0,i.A)({fromRouteId:t},s)))},[e,t]);return a}():function(){$e(Gt(),"useNavigate() may be used only in the context of a <Router> component.");let e=s.useContext(Ft),t=s.useContext(Vt),n=t.basename,a=t.navigator,r=s.useContext($t).matches,o=Xt().pathname,i=JSON.stringify(kt(r)),l=s.useRef(!1);Zt(()=>{l.current=!0});let c=s.useCallback(function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Qe(l.current,Jt),!l.current)return;if("number"===typeof t)return void a.go(t);let r=Nt(t,JSON.parse(i),o,"path"===s.relative);null==e&&"/"!==n&&(r.pathname="/"===r.pathname?n:At([n,r.pathname])),(s.replace?a.replace:a.push)(r,s.state,s)},[n,a,i,o,e]);return c}()}var tn=s.createContext(null);function nn(){var e;let t=s.useContext($t).matches,n=t[t.length-1];return null!==(e=null===n||void 0===n?void 0:n.params)&&void 0!==e?e:{}}function an(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative,n=s.useContext($t).matches,a=Xt().pathname,r=JSON.stringify(kt(n));return s.useMemo(()=>Nt(e,JSON.parse(r),a,"path"===t),[e,r,a,t])}function sn(e,t,n){$e(Gt(),"useRoutes() may be used only in the context of a <Router> component.");let a=s.useContext(Vt).navigator,r=s.useContext($t).matches,o=r[r.length-1],l=o?o.params:{},c=o?o.pathname:"/",d=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";bn(c,!u||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(c,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let h,m=Xt();if(t){var p;let e="string"===typeof t?Je(t):t;$e("/"===d||(null===(p=e.pathname)||void 0===p?void 0:p.startsWith(d)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(d,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),h=e}else h=m;let f=h.pathname||"/",g=f;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):tt(e,{pathname:g});Qe(u||null!=x,'No routes matched location "'.concat(h.pathname).concat(h.search).concat(h.hash,'" ')),Qe(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,'Matched leaf route at location "'.concat(h.pathname).concat(h.search).concat(h.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.'));let v=hn(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:At([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:At([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),r,n);return t&&v?s.createElement(Yt.Provider,{value:{location:(0,i.A)({pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0},h),navigationType:"POP"}},v):v}function rn(){let e=xn(),t=Rt(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=s.createElement(s.Fragment,null,s.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:o},"ErrorBoundary")," or"," ",s.createElement("code",{style:o},"errorElement")," prop on your route.")),s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application 
2Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),n?s.createElement("pre",{style:r},n):null,i)}var on=s.createElement(rn,null),ln=class extends s.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith("".concat(Kt,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new Mt(t.status,t.statusText,t.data)}catch(t){}}(e.digest);t&&(e=t)}let t=void 0!==e?s.createElement($t.Provider,{value:this.props.routeContext},s.createElement(Qt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?s.createElement(dn,{error:e},t):t}};ln.contextType=Ut;var cn=new WeakMap;function dn(e){let t=e.children,n=e.error,a=s.useContext(Vt).basename;if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith("".concat(Kt,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch(t){}}(n.digest);if(e){let t=cn.get(n);if(t)throw t;let r=Tt(e.location,a);if(zt&&!cn.get(n)){if(!r.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:e.replace}));throw cn.set(n,t),t}window.location.href=r.absoluteURL||r.to}return s.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(r.absoluteURL||r.to)})}}return t}function un(e){let t=e.routeContext,n=e.match,a=e.children,r=s.useContext(Ft);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),s.createElement($t.Provider,{value:t},a)}function hn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=null===n||void 0===n?void 0:n.state;if(null==e){if(!a)return null;if(a.errors)e=a.matches;else{if(0!==t.length||a.initialized||!(a.matches.length>0))return null;e=a.matches}}let r=e,o=null===a||void 0===a?void 0:a.errors;if(null!=o){let e=r.findIndex(e=>e.route.id&&void 0!==(null===o||void 0===o?void 0:o[e.route.id]));$e(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(o).join(","))),r=r.slice(0,Math.min(r.length,e+1))}let i=!1,l=-1;if(n&&a){i=a.renderFallback;for(let e=0;e<r.length;e++){let t=r[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let e=a.loaderData,s=a.errors,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!s||void 0===s[t.route.id]);if(t.route.lazy||o){n.isStatic&&(i=!0),r=l>=0?r.slice(0,l+1):[r[0]];break}}}}let c=null===n||void 0===n?void 0:n.onError,d=a&&c?(e,t)=>{var n,s;c(e,{location:a.location,params:null!==(n=null===(s=a.matches)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.params)&&void 0!==n?n:{},pattern:Ot(a.matches),errorInfo:t})}:void 0;return r.reduceRight((e,n,c)=>{let u,h=!1,m=null,p=null;a&&(u=o&&n.route.id?o[n.route.id]:void 0,m=n.route.errorElement||on,i&&(l<0&&0===c?(bn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):l===c&&(h=!0,p=n.route.hydrateFallbackElement||null)));let f=t.concat(r.slice(0,c+1)),g=()=>{let t;return t=u?m:h?p:n.route.Component?s.createElement(n.route.Component,null):n.route.element?n.route.element:e,s.createElement(un,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=a},children:t})};return a&&(n.route.ErrorBoundary||n.route.errorElement||0===c)?s.createElement(ln,{location:a.location,revalidation:a.revalidation,component:m,error:u,children:g(),routeC
2ontext:{outlet:null,matches:f,isDataRoute:!0},onError:d}):g()},null)}function mn(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function pn(e){let t=s.useContext(Ft);return $e(t,mn(e)),t}function fn(e){let t=s.useContext(It);return $e(t,mn(e)),t}function gn(e){let t=function(e){let t=s.useContext($t);return $e(t,mn(e)),t}(e),n=t.matches[t.matches.length-1];return $e(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function xn(){var e;let t=s.useContext(Qt),n=fn("useRouteError"),a=gn("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[a]}var vn={};function bn(e,t,n){t||vn[e]||(vn[e]=!0,Qe(!1,n))}var yn={};function wn(e,t){e||yn[t]||(yn[t]=!0,console.warn(t))}r.useOptimistic;s.memo(jn);function jn(e){let t=e.routes,n=e.manifest,a=e.future;return sn(t,void 0,{manifest:n,state:e.state,isStatic:e.isStatic,onError:e.onError,future:a})}function kn(e){let t=e.to,n=e.replace,a=e.state,r=e.relative;$e(Gt(),"<Navigate> may be used only in the context of a <Router> component."),Qe(!s.useContext(Vt).static,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let o=s.useContext($t).matches,i=Xt().pathname,l=en(),c=Nt(t,kt(o),i,"path"===r),d=JSON.stringify(c);return s.useEffect(()=>{l(JSON.parse(d),{replace:n,state:a,relative:r})},[l,d,r,n,a]),null}function Nn(e){return function(e){let t=s.useContext($t).outlet;return s.useMemo(()=>t&&s.createElement(tn.Provider,{value:e},t),[t,e])}(e.context)}function Sn(e){$e(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function An(e){let t=e.basename,n=void 0===t?"/":t,a=e.children,r=void 0===a?null:a,o=e.location,i=e.navigationType,l=void 0===i?"POP":i,c=e.navigator,d=e.static,u=void 0!==d&&d,h=e.useTransitions;$e(!Gt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),p=s.useMemo(()=>({basename:m,navigator:c,static:u,useTransitions:h,future:{}}),[m,c,u,h]);"string"===typeof o&&(o=Je(o));let f=o,g=f.pathname,x=void 0===g?"/":g,v=f.search,b=void 0===v?"":v,y=f.hash,w=void 0===y?"":y,j=f.state,k=void 0===j?null:j,N=f.key,S=void 0===N?"default":N,A=f.mask,_=s.useMemo(()=>{let e=vt(x,m);return null==e?null:{location:{pathname:e,search:b,hash:w,state:k,key:S,mask:A},navigationType:l}},[m,x,b,w,k,S,l,A]);return Qe(null!=_,'<Router basename="'.concat(m,'"> is not able to match the URL "').concat(x).concat(b).concat(w,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==_?null:s.createElement(Vt.Provider,{value:p},s.createElement(Yt.Provider,{children:r,value:_}))}function _n(e){let t=e.children,n=e.location;return sn(Cn(t),n)}s.Component;function Cn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return s.Children.forEach(e,(e,a)=>{if(!s.isValidElement(e))return;let r=[...t,a];if(e.type===s.Fragment)return void n.push.apply(n,Cn(e.props.children,r));$e(e.type===Sn,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),$e(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||r.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Cn(e.props.children,r)),n.push(o)}),n}
2var En="get",Pn="application/x-www-form-urlencoded";function Mn(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}function Rn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(e=>[n,e]):[[n,a]])},[]))}var On=null;var zn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Tn(e){return null==e||zn.has(e)?e:(Qe(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Pn,'"')),null)}function Dn(e,t){let n,a,s,r,o;if(Mn(i=e)&&"form"===i.tagName.toLowerCase()){let o=e.getAttribute("action");a=o?vt(o,t):null,n=e.getAttribute("method")||En,s=Tn(e.getAttribute("enctype"))||Pn,r=new FormData(e)}else if(function(e){return Mn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Mn(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let o=e.form;if(null==o)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||o.getAttribute("action");if(a=i?vt(i,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||En,s=Tn(e.getAttribute("formenctype"))||Tn(o.getAttribute("enctype"))||Pn,r=new FormData(o,e),!function(){if(null===On)try{new FormData(document.createElement("form"),0),On=!1}catch(e){On=!0}return On}()){let t=e.name,n=e.type,a=e.value;if("image"===n){let e=t?"".concat(t,"."):"";r.append("".concat(e,"x"),"0"),r.append("".concat(e,"y"),"0")}else t&&r.append(t,a)}}else{if(Mn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=En,a=null,s=Pn,o=e}var i;return r&&"text/plain"===s&&(o=r,r=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:r,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ln(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}Symbol("SingleFetchRedirect");function Fn(e,t,n,a){let s="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname="".concat(s.pathname,"_.").concat(a):s.pathname="".concat(s.pathname,".").concat(a):"/"===s.pathname?s.pathname="_root.".concat(a):t&&"/"===vt(s.pathname,t)?s.pathname="".concat(_t(t),"/_root.").concat(a):s.pathname="".concat(_t(s.pathname),".").concat(a),s}async function In(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Un(e){return null!=e&&"string"===typeof e.page}function Bn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function Wn(e,t,n,a,s,r){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,i=(e,t)=>{var a;return n[t].pathname!==e.pathname||(null===(a=n[t].route.path)||void 0===a?void 0:a.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===r?t.filter((e,t)=>o(e,t)||i(e,t)):"data"===r?t.filter((t,r)=>{let l=a.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(o(t,r)||i(t,r))return!0;if(t.route.shouldRevalidate){var c;let a=t.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof a)return a}return!0}):[]}function qn(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).includeHydrateFallback;return a=e.map(e=>{let a=t.routes[e.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}
2).flat(1),[...new Set(a)];var a}function Hn(e,t){let n=new Set,a=new Set(t);return e.reduce((e,s)=>{if(t&&!Un(s)&&"script"===s.as&&s.href&&a.has(s.href))return e;let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}(s));return n.has(r)||(n.add(r),e.push({key:r,link:s})),e},[])}function Vn(e,t){return"lazy"===e.mode&&!0===t}function Yn(){let e=s.useContext(Ft);return Ln(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function $n(){let e=s.useContext(It);return Ln(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qn=s.createContext(void 0);function Kn(){let e=s.useContext(Qn);return Ln(e,"You must render this element inside a <HydratedRouter> element"),e}function Gn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Xn(e,t,n){if(n&&!na)return[e[0]];if(t){let n=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,n+1)}return e}Qn.displayName="FrameworkContext";function Jn(e){let t=e.page,n=(0,Pe.A)(e,Fe),a=Bt(),r=Yn().router,o=s.useMemo(()=>tt(r.routes,t,r.basename),[r.routes,t,r.basename]);return o?a?s.createElement(ea,(0,i.A)({page:t,matches:o},n)):s.createElement(ta,(0,i.A)({page:t,matches:o},n)):null}function Zn(e){let t=Kn(),n=t.manifest,a=t.routeModules,r=s.useState([]),o=(0,De.A)(r,2),l=o[0],c=o[1];return s.useEffect(()=>{let t=!1;return async function(e,t,n){let a=await Promise.all(e.map(async e=>{let a=t.routes[e.route.id];if(a){let e=await In(a,n);return e.links?e.links():[]}return[]}));return Hn(a.flat(1).filter(Bn).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?(0,i.A)((0,i.A)({},e),{},{rel:"prefetch",as:"style"}):(0,i.A)((0,i.A)({},e),{},{rel:"prefetch"})))}(e,n,a).then(e=>{t||c(e)}),()=>{t=!0}},[e,n,a]),l}function ea(e){let t=e.page,n=e.matches,a=(0,Pe.A)(e,Ie),r=Xt(),o=Kn().future,l=Yn().basename,c=s.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=Fn(t,l,o.unstable_trailingSlashAwareDataRequests,"rsc"),a=!1,s=[];for(let t of n)"function"===typeof t.route.shouldRevalidate?a=!0:s.push(t.route.id);return a&&s.length>0&&e.searchParams.set("_routes",s.join(",")),[e.pathname+e.search]},[l,o.unstable_trailingSlashAwareDataRequests,t,r,n]);return s.createElement(s.Fragment,null,c.map(e=>s.createElement("link",(0,i.A)({key:e,rel:"prefetch",as:"fetch",href:e},a))))}function ta(e){let t=e.page,n=e.matches,a=(0,Pe.A)(e,Ue),r=Xt(),o=Kn(),l=o.future,c=o.manifest,d=o.routeModules,u=Yn().basename,h=$n(),m=h.loaderData,p=h.matches,f=s.useMemo(()=>Wn(t,n,p,c,r,"data"),[t,n,p,c,r]),g=s.useMemo(()=>Wn(t,n,p,c,r,"assets"),[t,n,p,c,r]),x=s.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=new Set,a=!1;if(n.forEach(t=>{var n;let s=c.routes[t.route.id];s&&s.hasLoader&&(!f.some(e=>e.route.id===t.route.id)&&t.route.id in m&&null!==(n=d[t.route.id])&&void 0!==n&&n.shouldRevalidate||s.hasClientLoader?a=!0:e.add(t.route.id))}),0===e.size)return[];let s=Fn(t,u,l.unstable_trailingSlashAwareDataRequests,"data");return a&&e.size>0&&s.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[s.pathname+s.search]},[u,l.unstable_trailingSlashAwareDataRequests,m,r,c,f,n,t,d]),v=s.useMemo(()=>qn(g,c),[g,c]),b=Zn(g);return s.createElement(s.Fragment,null,x.map(e=>s.createElement("link",(0,i.A)({key:e,rel:"prefetch",as:"fetch",href:e},a))),v.map(e=>s.createElement("link",(0,i.A)({key:e,rel:"modulepreload",href:e},a))),b.map(e=>{var t;let n=e.key,r=e.link;return s.createElement("link",(0,i.A)((0,i.A)({key:n,nonce:a.nonce},r),{},{crossOrigin:null!==(t=r.crossOrigin)&&void 0!==t?t:a.crossOrigin}))}))}var na=!1;function aa(e){let t=Kn(),n=t.manifest,a=t.serverHandoffString,r=t.isSpaMode,o=t.renderMeta,l=t.routeDiscovery,c=t.ssr,d=Yn(),u=d.router,h=d.static,m=d.staticContext,p=$n().matches,f=Bt(),g=Vn(l,c);o&&(o.didRenderScripts=!0);let x=Xn(p,null,r);s.useEffect(()=>{na=!0},[]);let v=s.useMemo(()=>{var t;if(f)return null;let r=m?"window.__reactRouterContext = ".concat(a,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
2).pipeThrough(new TextEncoderStream());"):" ",o=h?"".concat(null!==(t=n.hmr)&&void 0!==t&&t.runtime?"import ".concat(JSON.stringify(n.hmr.runtime),";"):"").concat(g?"":"import ".concat(JSON.stringify(n.url)),";\n").concat(x.map((e,t)=>{let a="route".concat(t),s=n.routes[e.route.id];Ln(s,"Route ".concat(e.route.id," not found in manifest"));let r=s.clientActionModule,o=s.clientLoaderModule,i=s.clientMiddlewareModule,l=s.hydrateFallbackModule,c=s.module,d=[...r?[{module:r,varName:"".concat(a,"_clientAction")}]:[],...o?[{module:o,varName:"".concat(a,"_clientLoader")}]:[],...i?[{module:i,varName:"".concat(a,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(a,"_HydrateFallback")}]:[],{module:c,varName:"".concat(a,"_main")}];return 1===d.length?"import * as ".concat(a," from ").concat(JSON.stringify(c),";"):[d.map(e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";')).join("\n"),"const ".concat(a," = {").concat(d.map(e=>"...".concat(e.varName)).join(","),"};")].join("\n")}).join("\n"),"\n  ").concat(g?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let n=e.sri,a=(0,Pe.A)(e,Le),s=new Set(t.state.matches.map(e=>e.route.id)),r=t.state.location.pathname.split("/").filter(Boolean),o=["/"];for(r.pop();r.length>0;)o.push("/".concat(r.join("/"))),r.pop();o.forEach(e=>{let n=nt(t.routes,e,t.basename||"/",!1,t.branches);n&&n.forEach(e=>s.add(e.route.id))});let l=[...s].reduce((e,t)=>Object.assign(e,{[t]:a.routes[t]}),{});return(0,i.A)((0,i.A)({},a),{},{routes:l,sri:!!n||void 0})}(n,u),null,2),";"):"","\n  window.__reactRouterRouteModules = {").concat(x.map((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t)).join(","),"};\n\nimport(").concat(JSON.stringify(n.entry.module),");"):" ";return s.createElement(s.Fragment,null,s.createElement("script",(0,i.A)((0,i.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0})),s.createElement("script",(0,i.A)((0,i.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0})))},[]),b=na||f?[]:[...new Set(n.entry.imports.concat(qn(x,n,{includeHydrateFallback:!0})))],y="object"===typeof n.sri?n.sri:{};return wn(!f,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),na||f?null:s.createElement(s.Fragment,null,"object"===typeof n.sri?s.createElement("script",(0,i.A)((0,i.A)({},e),{},{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:y})}})):null,g?null:s.createElement("link",{rel:"modulepreload",href:n.url,crossOrigin:e.crossOrigin,integrity:y[n.url],nonce:e.nonce,suppressHydrationWarning:!0}),s.createElement("link",{rel:"modulepreload",href:n.entry.module,crossOrigin:e.crossOrigin,integrity:y[n.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),b.map(t=>s.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:y[t],nonce:e.nonce,suppressHydrationWarning:!0})),v)}function sa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)})}}s.Component;function ra(e){let t=e.error,n=e.isOutsideRemixApp;console.error(t);let a,r=s.createElement("script",{dangerouslySetInnerHTML:{__html:'\n        console.log(\n          "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n        );\n      '}});if(Rt(t))return s.createElement(oa,{title:"Unhandled Thrown Response!"},s.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),r);if(t instanceof Error)a=t;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);a=new Error(e)}return s.createElement(oa,{title:"Application Error!",isOutsideRemixApp:n},s.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),s.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function oa(e){var t;let n=e.title,a=e.renderScripts,r=e.isOutsideRemixApp,o=e.children;return null!==(t=Kn().routeModules.root)&&void 0!==t&&t.Layout&&!r?o:s.createElement("html",{lang:"en"},s.createElement("head",null,s.createElement("meta",{charSet:"utf-8"}),s.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),s.createElement("title",null,n)),s.createElement("body",null,s.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},o,a?s.createElement(aa,null):null)))}var ia="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{ia&&(window.__reactRouterVersion="7.15.1")}catch(lS){}function la(e){let t=e.basename,n=e.children,a=e.useTransitions,r=e.window,o=s.useRef();null==o.current&&(o.current=Ye({window:r,v5Compat:!0}));let i=o.current,l=s.useState({action:i.action,location:i.location}),c=(0,De.A)(l,2),d=c[0],u=c[1],h=s.useCallback(e=>{!1===a?u(e):s.startTransition(()=>u(e))},[a]);return s.useLayoutEffect(()=>i.listen(h),[i,h]),s.createElement(An,{basename:t,children:n,location:d.location,navigationType:d.action,navigator:i,useTransitions:a})}var ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,da=s.forwardRef(function(e,t){let n=e.onClick,a=e.discover,r=void 0===a?"render":a,o=e.prefetch,l=void 0===o?"none":o,c=e.relative,d=e.reloadDocument,u=e.replace,h=e.mask,m=e.state,p=e.target,f=e.to,g=e.preventScrollReset,x=e.viewTransition,v=e.defaultShouldRevalidate,b=(0,Pe.A)(e,Be),y=s.useContext(Vt),w=y.basename,j=y.navigator,k=y.useTransitions,N="string"===typeof f&&ca.test(f),S=Tt(f,w);f=S.to;let A=function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).relative;$e(Gt(),"useHref() may be used only in the context of a <Router> component.");let n=s.useContext(Vt),a=n.basename,r=n.navigator,o=an(e,{relative:t}),i=o.hash,l=o.pathname,c=o.search,d=l;return"/"!==a&&(d="/"===l?a:At([a,l])),r.createHref({pathname:d,search:c,hash:i})}(f,{relative:c}
2),_=Xt(),C=null;if(h){let e=Nt(h,[],_.mask?_.mask.pathname:"/",!0);"/"!==w&&(e.pathname="/"===e.pathname?w:At([w,e.pathname])),C=j.createHref(e)}let E=function(e,t){let n=s.useContext(Qn),a=s.useState(!1),r=(0,De.A)(a,2),o=r[0],i=r[1],l=s.useState(!1),c=(0,De.A)(l,2),d=c[0],u=c[1],h=t.onFocus,m=t.onBlur,p=t.onMouseEnter,f=t.onMouseLeave,g=t.onTouchStart,x=s.useRef(null);s.useEffect(()=>{if("render"===e&&u(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{u(e.isIntersecting)})},{threshold:.5});return x.current&&e.observe(x.current),()=>{e.disconnect()}}},[e]),s.useEffect(()=>{if(o){let e=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(e)}}},[o]);let v=()=>{i(!0)},b=()=>{i(!1),u(!1)};return n?"intent"!==e?[d,x,{}]:[d,x,{onFocus:Gn(h,v),onBlur:Gn(m,b),onMouseEnter:Gn(p,v),onMouseLeave:Gn(f,b),onTouchStart:Gn(g,v)}]:[!1,x,{}]}(l,b),P=(0,De.A)(E,3),M=P[0],R=P[1],O=P[2],z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.target,a=t.replace,r=t.mask,o=t.state,i=t.preventScrollReset,l=t.relative,c=t.viewTransition,d=t.defaultShouldRevalidate,u=t.useTransitions,h=en(),m=Xt(),p=an(e,{relative:l});return s.useCallback(t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==a?a:Xe(m)===Xe(p),f=()=>h(e,{replace:n,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:c,defaultShouldRevalidate:d});u?s.startTransition(()=>f()):f()}},[m,h,p,a,r,o,n,e,i,l,c,d,u])}(f,{replace:u,mask:h,state:m,target:p,preventScrollReset:g,relative:c,viewTransition:x,defaultShouldRevalidate:v,useTransitions:k});let T=!(S.isExternal||d),D=s.createElement("a",(0,i.A)((0,i.A)((0,i.A)({},b),O),{},{href:(T?C:void 0)||S.absoluteURL||A,onClick:T?function(e){n&&n(e),e.defaultPrevented||z(e)}:n,ref:sa(t,R),target:p,"data-discover":N||"render"!==r?void 0:"true"}));return M&&!N?s.createElement(s.Fragment,null,D,s.createElement(Jn,{page:A})):D});da.displayName="Link";var ua=s.forwardRef(function(e,t){let n=e["aria-current"],a=void 0===n?"page":n,r=e.caseSensitive,o=void 0!==r&&r,l=e.className,c=void 0===l?"":l,d=e.end,u=void 0!==d&&d,h=e.style,m=e.to,p=e.viewTransition,f=e.children,g=(0,Pe.A)(e,We),x=an(m,{relative:g.relative}),v=Xt(),b=s.useContext(It),y=s.useContext(Vt),w=y.navigator,j=y.basename,k=null!=b&&function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.relative,a=s.useContext(Wt);$e(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let r=pa("useViewTransitionState").basename,o=an(e,{relative:n});if(!a.isTransitioning)return!1;let i=vt(a.currentLocation.pathname,r)||a.currentLocation.pathname,l=vt(a.nextLocation.pathname,r)||a.nextLocation.pathname;return null!=ft(o.pathname,l)||null!=ft(o.pathname,i)}(x)&&!0===p,N=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,S=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;o||(S=S.toLowerCase(),A=A?A.toLowerCase():null,N=N.toLowerCase()),A&&j&&(A=vt(A,j)||A);const _="/"!==N&&N.endsWith("/")?N.length-1:N.length;let C,E=S===N||!u&&S.startsWith(N)&&"/"===S.charAt(_),P=null!=A&&(A===N||!u&&A.startsWith(N)&&"/"===A.charAt(N.length)),M={isActive:E,isPending:P,isTransitioning:k},R=E?a:void 0;C="function"===typeof c?c(M):[c,E?"active":null,P?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let O="function"===typeof h?h(M):h;return s.createElement(da,(0,i.A)((0,i.A)({},g),{},{"aria-current":R,className:C,ref:t,style:O,to:m,viewTransition:p}),"function"===typeof f?f(M):f)});ua.displayName="NavLink";var ha=s.forwardRef((e,t)=>{let n=e.discover,a=void 0===n?"render":n,r=e.fetcherKey,o=e.navigate,l=e.reloadDocument,c=e.replace,d=e.state,u=e.method,h=void 0===u?En:u,m=e.action,p=e.onSubmit,f=e.relative,g=e.preventScrollReset,x=e.viewTransition,v=e.defaultShouldRevalidate,b=(0,Pe.A)(e,qe),y=s.useContext(Vt).useTransitions,w=va(),j=function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
2).relative,n=s.useContext(Vt).basename,a=s.useContext($t);$e(a,"useFormAction must be used inside a RouteContext");let r=a.matches.slice(-1),o=(0,De.A)(r,1)[0],l=(0,i.A)({},an(e||".",{relative:t})),c=Xt();if(null==e){l.search=c.search;let e=new URLSearchParams(l.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();l.search=n?"?".concat(n):""}}e&&"."!==e||!o.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(l.pathname="/"===l.pathname?n:At([n,l.pathname]));return Xe(l)}(m,{relative:f}),k="get"===h.toLowerCase()?"get":"post",N="string"===typeof m&&ca.test(m);return s.createElement("form",(0,i.A)((0,i.A)({ref:t,method:k,action:j,onSubmit:l?p:e=>{if(p&&p(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||h,a=()=>w(t||e.currentTarget,{fetcherKey:r,method:n,navigate:o,replace:c,state:d,relative:f,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:v});y&&!1!==o?s.startTransition(()=>a()):a()}},b),{},{"data-discover":N||"render"!==a?void 0:"true"}))});function ma(e){return"".concat(e," must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.")}function pa(e){let t=s.useContext(Ft);return $e(t,ma(e)),t}function fa(e){Qe("undefined"!==typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=s.useRef(Rn(e)),n=s.useRef(!1),a=Xt(),r=s.useMemo(()=>function(e,t){let n=Rn(e);return t&&t.forEach((e,a)=>{n.has(a)||t.getAll(a).forEach(e=>{n.append(a,e)})}),n}(a.search,n.current?null:t.current),[a.search]),o=en(),i=s.useCallback((e,t)=>{const a=Rn("function"===typeof e?e(new URLSearchParams(r)):e);n.current=!0,o("?"+a,t)},[o,r]);return[r,i]}ha.displayName="Form";var ga=0,xa=()=>"__".concat(String(++ga),"__");function va(){let e=pa("useSubmit").router,t=s.useContext(Vt).basename,n=gn("useRouteId"),a=e.fetch,r=e.navigate;return s.useCallback(async function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Dn(e,t),i=o.action,l=o.method,c=o.encType,d=o.formData,u=o.body;if(!1===s.navigate){let e=s.fetcherKey||xa();await a(e,n,s.action||i,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:u,formMethod:s.method||l,formEncType:s.encType||c,flushSync:s.flushSync})}else await r(s.action||i,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:d,body:u,formMethod:s.method||l,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[a,r,t,n])}var ba=(e,t,n,a,s,r,o,i)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,a=n&&r?s.map(e=>r[e]||e):s;n?(l.classList.remove(...a),l.classList.add(r&&r[t]?r[t]:t)):l.setAttribute(e,t)}),function(e){i&&c.includes(e)&&(l.style.colorScheme=e)}(t)}if(a)d(a);else try{let e=localStorage.getItem(t)||n;d(o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(u){}},ya=s.createContext(void 0),wa={setTheme:e=>{},themes:[]},ja=(s.memo(e=>{let t=e.forcedTheme,n=e.storageKey,a=e.attribute,r=e.enableSystem,o=e.enableColorScheme,l=e.defaultTheme,c=e.value,d=e.themes,u=e.nonce,h=e.scriptProps,m=JSON.stringify([a,n,l,t,d,c,r,o]).slice(1,-1);return s.createElement("script",(0,i.A)((0,i.A)({},h),{},{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(ba.toString(),")(").concat(m,")")}}))}),n(950));const ka=["message"];const Na=Array(12).fill(0),Sa=e=>{let t=e.visible,n=e.className;return s.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},s.createElement("div",{className:"sonner-spinner"},Na.map((e,t)=>s.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)}))))},Aa=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),_a=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
2currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ca=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ea=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},s.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Pa=s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},s.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let Ma=1;const Ra=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const n=e.message,a=(0,Pe.A)(e,ka),s="number"===typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Ma++,r=this.toasts.find(e=>e.id===s),o=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),r?this.toasts=this.toasts.map(t=>t.id===s?(this.publish((0,i.A)((0,i.A)((0,i.A)({},t),e),{},{id:s,title:n})),(0,i.A)((0,i.A)((0,i.A)({},t),e),{},{id:s,dismissible:o,title:n})):t):this.addToast((0,i.A)((0,i.A)({title:n},a),{},{dismissible:o,id:s})),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create((0,i.A)((0,i.A)({},t),{},{message:e})),this.error=(e,t)=>this.create((0,i.A)((0,i.A)({},t),{},{message:e,type:"error"})),this.success=(e,t)=>this.create((0,i.A)((0,i.A)({},t),{},{type:"success",message:e})),this.info=(e,t)=>this.create((0,i.A)((0,i.A)({},t),{},{type:"info",message:e})),this.warning=(e,t)=>this.create((0,i.A)((0,i.A)({},t),{},{type:"warning",message:e})),this.loading=(e,t)=>
2this.create((0,i.A)((0,i.A)({},t),{},{type:"loading",message:e})),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create((0,i.A)((0,i.A)({},t),{},{promise:e,type:"loading",message:t.loading,description:"function"!==typeof t.description?t.description:void 0})));const a=Promise.resolve(e instanceof Function?e():e);let r,o=void 0!==n;const l=a.then(async e=>{r=["resolve",e];if(s.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(Oa(e)&&!e.ok){o=!1;const a="function"===typeof t.error?await t.error("HTTP error! status: ".concat(e.status)):t.error,r="function"===typeof t.description?await t.description("HTTP error! status: ".concat(e.status)):t.description,l="object"===typeof a&&!s.isValidElement(a)?a:{message:a};this.create((0,i.A)({id:n,type:"error",description:r},l))}else if(e instanceof Error){o=!1;const a="function"===typeof t.error?await t.error(e):t.error,r="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!s.isValidElement(a)?a:{message:a};this.create((0,i.A)({id:n,type:"error",description:r},l))}else if(void 0!==t.success){o=!1;const a="function"===typeof t.success?await t.success(e):t.success,r="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!s.isValidElement(a)?a:{message:a};this.create((0,i.A)({id:n,type:"success",description:r},l))}}).catch(async e=>{if(r=["reject",e],void 0!==t.error){o=!1;const a="function"===typeof t.error?await t.error(e):t.error,r="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!s.isValidElement(a)?a:{message:a};this.create((0,i.A)({id:n,type:"error",description:r},l))}}).finally(()=>{o&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),c=()=>new Promise((e,t)=>l.then(()=>"reject"===r[0]?t(r[1]):e(r[1])).catch(t));return"string"!==typeof n&&"number"!==typeof n?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||Ma++;return this.create((0,i.A)({jsx:e(n),id:n},t)),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Oa=e=>e&&"object"===typeof e&&"ok"in e&&"boolean"===typeof e.ok&&"status"in e&&"number"===typeof e.status,za=(e,t)=>{const n=(null==t?void 0:t.id)||Ma++;return Ra.addToast((0,i.A)((0,i.A)({title:e},t),{},{id:n})),n},Ta=Object.assign(za,{success:Ra.success,info:Ra.info,warning:Ra.warning,error:Ra.error,custom:Ra.custom,message:Ra.message,promise:Ra.promise,dismiss:Ra.dismiss,loading:Ra.loading},{getHistory:()=>Ra.toasts,getToasts:()=>Ra.getActiveToasts()});function Da(e){return void 0!==e.label}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)
vendor: 13,513 bytes, line 2
2}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
2La(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}const Fa=e=>{var t,n,a,r,o,l,c,d,u;const h=e.invert,m=e.toast,p=e.unstyled,f=e.interacting,g=e.setHeights,x=e.visibleToasts,v=e.heights,b=e.index,y=e.toasts,w=e.expanded,j=e.removeToast,k=e.defaultRichColors,N=e.closeButton,S=e.style,A=e.cancelButtonStyle,_=e.actionButtonStyle,C=e.className,E=void 0===C?"":C,P=e.descriptionClassName,M=void 0===P?"":P,R=e.duration,O=e.position,z=e.gap,T=e.expandByDefault,D=e.classNames,L=e.icons,F=e.closeButtonAriaLabel,I=void 0===F?"Close toast":F,U=s.useState(null),B=(0,De.A)(U,2),W=B[0],q=B[1],H=s.useState(null),V=(0,De.A)(H,2),Y=V[0],$=V[1],Q=s.useState(!1),K=(0,De.A)(Q,2),G=K[0],X=K[1],J=s.useState(!1),Z=(0,De.A)(J,2),ee=Z[0],te=Z[1],ne=s.useState(!1),ae=(0,De.A)(ne,2),se=ae[0],re=ae[1],oe=s.useState(!1),ie=(0,De.A)(oe,2),le=ie[0],ce=ie[1],de=s.useState(!1),ue=(0,De.A)(de,2),he=ue[0],me=ue[1],pe=s.useState(0),fe=(0,De.A)(pe,2),ge=fe[0],xe=fe[1],ve=s.useState(0),be=(0,De.A)(ve,2),ye=be[0],we=be[1],je=s.useRef(m.duration||R||4e3),ke=s.useRef(null),Ne=s.useRef(null),Se=0===b,Ae=b+1<=x,_e=m.type,Ce=!1!==m.dismissible,Ee=m.className||"",Pe=m.descriptionClassName||"",Me=s.useMemo(()=>v.findIndex(e=>e.toastId===m.id)||0,[v,m.id]),Re=s.useMemo(()=>{var e;return null!=(e=m.closeButton)?e:N},[m.closeButton,N]),Oe=s.useMemo(()=>m.duration||R||4e3,[m.duration,R]),ze=s.useRef(0),Te=s.useRef(0),Le=s.useRef(0),Fe=s.useRef(null),Ie=O.split("-"),Ue=(0,De.A)(Ie,2),Be=Ue[0],We=Ue[1],qe=s.useMemo(()=>v.reduce((e,t,n)=>n>=Me?e:e+t.height,0),[v,Me]),He=(()=>{const e=s.useState(document.hidden),t=(0,De.A)(e,2),n=t[0],a=t[1];return s.useEffect(()=>{const e=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),n})(),Ve=m.invert||h,Ye="loading"===_e;Te.current=s.useMemo(()=>Me*z+qe,[Me,qe]),s.useEffect(()=>{je.current=Oe},[Oe]),s.useEffect(()=>{X(!0)},[]),s.useEffect(()=>{const e=Ne.current;if(e){const t=e.getBoundingClientRect().height;return we(t),g(e=>[{toastId:m.id,height:t,position:m.position},...e]),()=>g(e=>e.filter(e=>e.toastId!==m.id))}},[g,m.id]),s.useLayoutEffect(()=>{if(!G)return;const e=Ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,we(n),g(e=>e.find(e=>e.toastId===m.id)?e.map(e=>e.toastId===m.id?(0,i.A)((0,i.A)({},e),{},{height:n}):e):[{toastId:m.id,height:n,position:m.position},...e])},[G,m.title,m.description,g,m.id]);const $e=s.useCallback(()=>{te(!0),xe(Te.current),g(e=>e.filter(e=>e.toastId!==m.id)),setTimeout(()=>{j(m)},200)},[m,j,g,Te]);s.useEffect(()=>{if(m.promise&&"loading"===_e||m.duration===1/0||"loading"===m.type)return;let e;return w||f||He?(()=>{if(Le.current<ze.current){const e=(new Date).getTime()-ze.current;je.current=je.current-e}Le.current=(new Date).getTime()})():je.current!==1/0&&(ze.current=(new Date).getTime(),e=setTimeout(()=>{null==m.onAutoClose||m.onAutoClose.call(m,m),$e()},je.current)),()=>clearTimeout(e)},[w,f,m,_e,He,$e]),s.useEffect(()=>{m.delete&&$e()},[$e,m.delete]);const Qe=m.icon||(null==L?void 0:L[_e])||(e=>{switch(e){case"success":return Aa;case"info":return Ca;case"warning":return _a;case"error":return Ea;default:return null}})(_e);var Ke,Ge;return s.createElement("li",{tabIndex:0,ref:Ne,className:La(E,Ee,null==D?void 0:D.toast,null==m||null==(t=m.classNames)?void 0:t.toast,null==D?void 0:D.default,null==D?void 0:D[_e],null==m||null==(n=m.classNames)?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":null!=(Ke=m.richColors)?Ke:k,"data-styled":!Boolean(m.jsx||m.unstyled||p),"data-mounted":G,"data-promise":Boolean(m.promise),"data-swiped":he,"data-removed":ee,"data-visible":Ae,"data-y-position":Be,"data-x-position":We,"data-index":b,"data-front":Se,"data-swiping":se,"data-dismissible":Ce,"data-type":_e,"data-invert":Ve,"data-swipe-out":le,"data-swipe-direction":Y,"data-expanded":Boolean(w||T&&G),style:(0,i.A)((0,i.A)({"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":"".concat(ee?ge:Te.current,"px"),"--initial-height":T?"auto":"".concat(ye,"px")},S),m.style),onDragEnd:()=>{re(!1),q(null),Fe.current=null},onPointerDown:e=>
2{!Ye&&Ce&&(ke.current=new Date,xe(Te.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(re(!0),Fe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(le||!Ce)return;Fe.current=null;const a=Number((null==(e=Ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),s=Number((null==(t=Ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),r=(new Date).getTime()-(null==(n=ke.current)?void 0:n.getTime()),o="x"===W?a:s,i=Math.abs(o)/r;if(Math.abs(o)>=45||i>.11)return xe(Te.current),null==m.onDismiss||m.onDismiss.call(m,m),$("x"===W?a>0?"right":"left":s>0?"down":"up"),$e(),void ce(!0);var l,c;null==(l=Ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=Ne.current)||c.style.setProperty("--swipe-amount-y","0px"),me(!1),re(!1),q(null)},onPointerMove:t=>{var n,a,s;if(!Fe.current||!Ce)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const r=t.clientY-Fe.current.y,o=t.clientX-Fe.current.x;var i;const l=null!=(i=e.swipeDirections)?i:function(e){const t=e.split("-"),n=(0,De.A)(t,2),a=n[0],s=n[1],r=[];return a&&r.push(a),s&&r.push(s),r}(O);!W&&(Math.abs(o)>1||Math.abs(r)>1)&&q(Math.abs(o)>Math.abs(r)?"x":"y");let c={x:0,y:0};const d=e=>1/(1.5+Math.abs(e)/20);if("y"===W){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&r<0||l.includes("bottom")&&r>0)c.y=r;else{const e=r*d(r);c.y=Math.abs(e)<Math.abs(r)?e:r}}else if("x"===W&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&o<0||l.includes("right")&&o>0)c.x=o;else{const e=o*d(o);c.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&me(!0),null==(a=Ne.current)||a.style.setProperty("--swipe-amount-x","".concat(c.x,"px")),null==(s=Ne.current)||s.style.setProperty("--swipe-amount-y","".concat(c.y,"px"))}},Re&&!m.jsx&&"loading"!==_e?s.createElement("button",{"aria-label":I,"data-disabled":Ye,"data-close-button":!0,onClick:Ye||!Ce?()=>{}:()=>{$e(),null==m.onDismiss||m.onDismiss.call(m,m)},className:La(null==D?void 0:D.closeButton,null==m||null==(a=m.classNames)?void 0:a.closeButton)},null!=(Ge=null==L?void 0:L.close)?Ge:Pa):null,(_e||m.icon||m.promise)&&null!==m.icon&&(null!==(null==L?void 0:L[_e])||m.icon)?s.createElement("div",{"data-icon":"",className:La(null==D?void 0:D.icon,null==m||null==(r=m.classNames)?void 0:r.icon)},m.promise||"loading"===m.type&&!m.icon?m.icon||function(){var e,t;return(null==L?void 0:L.loading)?s.createElement("div",{className:La(null==D?void 0:D.loader,null==m||null==(t=m.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===_e},L.loading):s.createElement(Sa,{className:La(null==D?void 0:D.loader,null==m||null==(e=m.classNames)?void 0:e.loader),visible:"loading"===_e})}():null,"loading"!==m.type?Qe:null):null,s.createElement("div",{"data-content":"",className:La(null==D?void 0:D.content,null==m||null==(o=m.classNames)?void 0:o.content)},s.createElement("div",{"data-title":"",className:La(null==D?void 0:D.title,null==m||null==(l=m.classNames)?void 0:l.title)},m.jsx?m.jsx:"function"===typeof m.title?m.title():m.title),m.description?s.createElement("div",{"data-description":"",className:La(M,Pe,null==D?void 0:D.description,null==m||null==(c=m.classNames)?void 0:c.description)},"function"===typeof m.description?m.description():m.description):null),s.isValidElement(m.cancel)?m.cancel:m.cancel&&Da(m.cancel)?s.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||A,onClick:e=>{Da(m.cancel)&&Ce&&(null==m.cancel.onClick||m.cancel.onClick.call(m.cancel,e),$e())},className:La(null==D?void 0:D.cancelButton,null==m||null==(d=m.classNames)?void 0:d.cancelButton)},m.cancel.label):null,s.isValidElement(m.action)?m.action:m.action&&Da(m.action)?s.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||_,onClick:e=>{Da(m.action)&&(null==m.action.onClick||m.action.onClick.call(m.action,e),e.defaultPrevented||$e())},className:La(null==D?void 0:D.actionButton,null==m||null==(u=m.classNames)?void 0:u.actionButton)},m.action.label):null)};function Ia(){if("undefined"===typeof window)return"ltr";if("undefined"===typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function Ua(e,t){const n={};return[e,t].forEach((e,t)=>{const a=1===t,s=a?"--mobile-offset":"--offset",r=a?"16px":"24px";function o(e){["top","right","bottom","left"].forEach(t=>{n["".concat(s,"-").concat(t)]="number"===typeof e?"".concat(e,"px"):e})}"number"===typeof e||"string"===typeof e?o(e):"object"===typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n["".concat(s,"-").concat(t)]=r:n["".concat(s,"-").concat(t)]="number"===typeof e[t]?"".concat(e[t],"px"):e[t]}):o(r)}),n}const Ba=s.forwardRef(function(e,t){const n=e.invert,a=e.position,r=void 0===a?"bottom-right":a,o=e.hotkey,l=void 0===o?["altKey","KeyT"]:o,c=e.expand,d=e.closeButton,u=e.className,h=e.offset,m=e.mobileOffset,p=e.theme,f=void 0===p?"light":p,g=e.richColors,x=e.duration,v=e.style,b=e.visibleToasts,y=void 0===b?3:b,w=e.toastOptions,j=e.dir,k=void 0===j?Ia():j,N=e.gap,S=void 0===N?14:N,A=e.icons,_=e.containerAriaLabel,C=void 0===_?"Notifications":_,E=s.useState([]),P=(0,De.A)(E,2),M=P[0],R=P[1],O=s.useMemo(()=>Array.from(new Set([r].concat(M.filter(e=>e.position).map(e=>e.position)))),[M,r]),z=s.useState([]),T=(0,De.A)(z,2),D=T[0],L=T[1],F=s.useState(!1),I=(0,De.A)(F,2),U=I[0],B=I[1],W=s.useState(!1),q=(0,De.A)(W,2),H=q[0],V=q[1],Y=s.useState("system"!==f?f:"undefined"!==typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
2k":"light"),$=(0,De.A)(Y,2),Q=$[0],K=$[1],G=s.useRef(null),X=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),J=s.useRef(null),Z=s.useRef(!1),ee=s.useCallback(e=>{R(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||Ra.dismiss(e.id),t.filter(t=>t.id!==e.id)})},[]);return s.useEffect(()=>Ra.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{R(t=>t.map(t=>t.id===e.id?(0,i.A)((0,i.A)({},t),{},{delete:!0}):t))}):setTimeout(()=>{ja.flushSync(()=>{R(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),(0,i.A)((0,i.A)({},t[n]),e),...t.slice(n+1)]:[e,...t]})})})}),[M]),s.useEffect(()=>{if("system"!==f)return void K(f);if("system"===f&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),"undefined"===typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",e=>{let t=e.matches;K(t?"dark":"light")})}catch(t){e.addListener(e=>{let t=e.matches;try{K(t?"dark":"light")}catch(lS){console.error(lS)}})}},[f]),s.useEffect(()=>{M.length<=1&&B(!1)},[M]),s.useEffect(()=>{const e=e=>{var t;var n;l.every(t=>e[t]||e.code===t)&&(B(!0),null==(n=G.current)||n.focus());"Escape"!==e.code||document.activeElement!==G.current&&!(null==(t=G.current)?void 0:t.contains(document.activeElement))||B(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l]),s.useEffect(()=>{if(G.current)return()=>{J.current&&(J.current.focus({preventScroll:!0}),J.current=null,Z.current=!1)}},[G.current]),s.createElement("section",{ref:t,"aria-label":"".concat(C," ").concat(X),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((t,a)=>{var r;const o=t.split("-"),l=(0,De.A)(o,2),p=l[0],f=l[1];return M.length?s.createElement("ol",{key:t,dir:"auto"===k?Ia():k,tabIndex:-1,ref:G,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":p,"data-lifted":U&&M.length>1&&!c,"data-x-position":f,style:(0,i.A)((0,i.A)({"--front-toast-height":"".concat((null==(r=D[0])?void 0:r.height)||0,"px"),"--width":"".concat(356,"px"),"--gap":"".concat(S,"px")},v),Ua(h,m)),onBlur:e=>{Z.current&&!e.currentTarget.contains(e.relatedTarget)&&(Z.current=!1,J.current&&(J.current.focus({preventScroll:!0}),J.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||Z.current||(Z.current=!0,J.current=e.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{H||B(!1)},onDragEnd:()=>B(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||V(!0)},onPointerUp:()=>V(!1)},M.filter(e=>!e.position&&0===a||e.position===t).map((a,r)=>{var o,i;return s.createElement(Fa,{key:a.id,icons:A,index:r,toast:a,defaultRichColors:g,duration:null!=(o=null==w?void 0:w.duration)?o:x,className:null==w?void 0:w.className,descriptionClassName:null==w?void 0:w.descriptionClassName,invert:n,visibleToasts:y,closeButton:null!=(i=null==w?void 0:w.closeButton)?i:d,interacting:H,position:t,style:null==w?void 0:w.style,unstyled:null==w?void 0:w.unstyled,classNames:null==w?void 0:w.classNames,cancelButtonStyle:null==w?void 0:w.cancelButtonStyle,actionButtonStyle:null==w?void 0:w.actionButtonStyle,closeButtonAriaLabel:null==w?void 0:w.closeButtonAriaLabel,removeToast:ee,toasts:M.filter(e=>e.position==a.position),heights:D.filter(e=>e.position==a.position),setHeights:L,expandByDefault:c,gap:S,expanded:U,swipeDirections:e.swipeDirections})})):null}))}),Wa=e=>{let t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));const n=(()=>{var e;return null!=(e=s.useContext(ya))?e:wa})().theme,a=void 0===n?"system":n;return(0,_e.jsx)(Ba,(0,i.A)({theme:a,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},t))};function qa(e,t){return function(){return e.apply(t,arguments)}}const Ha=Object.prototype.toString,Va=Object.getPrototypeOf,Ya=Symbol.iterator,$a=Symbol.toStringTag,Qa=(()=>{let e=Object.prototype.hasOwnProperty;return(t,n)=>e.call(t,n)})(),Ka=(e,t)=>{let n=e;const a=[];for(;null!=n&&n!==Object.prototype;){if(-1!==a.indexOf(n))return!1;if(a.push(n),Qa(n,t))return!0;n=Va(n)}return!1},Ga=(e=>t=>{const n=Ha.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Xa=e=>(e=e.toLowerCase(),t=>Ga(t)===e),Ja=e=>t=>typeof t===e,Za=Array.isArray,es=Ja("undefined");function ts(e){return null!==e&&!es(e)&&null!==e.constructor&&!es(e.constructor)&&ss(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ns=Xa("ArrayBuffer");const as=Ja("string"),ss=Ja("function"),rs=Ja("number"),os=e=>null!==e&&"object"===typeof e,is=e=>{if(!os(e))return!1;const t=Va(e);return(null===t||t===Object.prototype||null===Va(t))&&!Ka(e,$a)&&!Ka(e,Ya)},ls=Xa("Date"),cs=Xa("File"),ds=Xa("Blob"),us=Xa("FileList");const hs="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{},ms="undefined"!==typeof hs.FormData?hs.FormData:void 0,ps=Xa("URLSearchParams"),fs=["ReadableStream","Request","Response","Headers"].map(Xa),gs=(0,De.A)(fs,4),xs=gs[0],vs=gs[1],bs=gs[2],ys=gs[3];function ws(e,t){let n,a,s=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,r=void 0!==s&&s;if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),Za(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(ts(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(n=0;n<s;n++)o=a[n],t.call(null,e[o],o,e)}}function js(e,t){if(ts(e))return null;t=t.toLowerCase();const n=Object.keys(e);let a,s=n.length;for(;s-- >0;)if(a=n[s],t===a.toLowerCase())return a;return null}const ks="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:n.g,Ns=e=>!es(e)&&e!==ks;
2const Ss=(As="undefined"!==typeof Uint8Array&&Va(Uint8Array),e=>As&&e instanceof As);var As;const _s=Xa("HTMLFormElement"),Cs=Object.prototype.propertyIsEnumerable,Es=Xa("RegExp"),Ps=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};ws(n,(n,s)=>{let r;!1!==(r=t(n,s,e))&&(a[s]=r||n)}),Object.defineProperties(e,a)};const Ms=Xa("AsyncFunction"),Rs=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),a=[],ks.addEventListener("message",e=>{let t=e.source,s=e.data;t===ks&&s===n&&a.length&&a.shift()()},!1),e=>{a.push(e),ks.postMessage(n,"*")}):e=>setTimeout(e);var n,a})("function"===typeof setImmediate,ss(ks.postMessage)),Os="undefined"!==typeof queueMicrotask?queueMicrotask.bind(ks):"undefined"!==typeof process&&process.nextTick||Rs,zs=e=>null!=e&&ss(e[Ya]),Ts={isArray:Za,isArrayBuffer:ns,isBuffer:ts,isFormData:e=>{if(!e)return!1;if(ms&&e instanceof ms)return!0;const t=Va(e);if(!t||t===Object.prototype)return!1;if(!ss(e.append))return!1;const n=Ga(e);return"formdata"===n||"object"===n&&ss(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&ns(e.buffer),t},isString:as,isNumber:rs,isBoolean:e=>!0===e||!1===e,isObject:os,isPlainObject:is,isEmptyObject:e=>{if(!os(e)||ts(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(lS){return!1}},isReadableStream:xs,isRequest:vs,isResponse:bs,isHeaders:ys,isUndefined:es,isDate:ls,isFile:cs,isReactNativeBlob:e=>!(!e||"undefined"===typeof e.uri),isReactNative:e=>e&&"undefined"!==typeof e.getParts,isBlob:ds,isRegExp:Es,isFunction:ss,isStream:e=>os(e)&&ss(e.pipe),isURLSearchParams:ps,isTypedArray:Ss,isFileList:us,forEach:ws,merge:function e(){const t=Ns(this)&&this||{},n=t.caseless,a=t.skipUndefined,s={},r=(t,r)=>{if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=n&&"string"===typeof r&&js(s,r)||r,i=Qa(s,o)?s[o]:void 0;is(i)&&is(t)?s[o]=e(i,t):is(t)?s[o]=e({},t):Za(t)?s[o]=t.slice():a&&es(t)||(s[o]=t)};for(let o=0,i=arguments.length;o<i;o++){const e=o<0||arguments.length<=o?void 0:arguments[o];if(!e||ts(e))continue;if(ws(e,r),"object"!==typeof e||Za(e))continue;const t=Object.getOwnPropertySymbols(e);for(let n=0;n<t.length;n++){const a=t[n];Cs.call(e,a)&&r(e[a],a)}}return s},extend:function(e,t,n){return ws(t,(t,a)=>{n&&ss(t)?Object.defineProperty(e,a,{__proto__:null,value:qa(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,a)=>{let s,r,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)o=s[r],a&&!a(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&Va(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Ga,kindOfTest:Xa,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return-1!==a&&a===n},toArray:e=>{if(!e)return null;if(Za(e))return e;let t=e.length;if(!rs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Ya]).call(e);let a;for(;(a=n.next())&&!a.done;){const n=a.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const a=[];for(;null!==(n=e.exec(t));)a.push(n);return a},isHTMLForm:_s,hasOwnProperty:Qa,hasOwnProp:Qa,hasOwnInPrototypeChain:Ka,getSafeProp:(e,t)=>null!=e&&Ka(e,t)?e[t]:void 0,reduceDescriptors:Ps,freezeMethods:e=>{Ps(e,(t,n)=>{if(ss(e)&&["arguments","caller","callee"].includes(n))return!1;const a=e[n];ss(a)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},a=e=>
vendor: 4,616 bytes, line 2
2{e.forEach(e=>{n[e]=!0})};return Za(e)?a(e):a(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:js,global:ks,isContextDefined:Ns,isSpecCompliantForm:function(e){return!!(e&&ss(e.append)&&"FormData"===e[$a]&&e[Ya])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(os(e)){if(t.has(e))return;if(ts(e))return e;if(!("toJSON"in e)){t.add(e);const a=Za(e)?[]:{};return ws(e,(e,t)=>{const s=n(e);!es(s)&&(a[t]=s)}),t.delete(e),a}}return e};return n(e)},isAsyncFn:Ms,isThenable:e=>e&&(os(e)||ss(e))&&ss(e.then)&&ss(e.catch),setImmediate:Rs,asap:Os,isIterable:zs,isSafeIterable:e=>null!=e&&Ka(e,Ya)&&zs(e)},Ds=Ts.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ls=e=>{const t={};let n,a,s;return e&&e.split("\n").forEach(function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),a=e.substring(s+1).trim(),!n||t[n]&&Ds[n]||("set-cookie"===n?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t};n.dn(Ls);const Fs=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Is=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Us(e,t){return Ts.isArray(e)?e.map(e=>Us(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Bs(e){const t=Object.create(null);return Ts.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>Us(e,Is))(e)}),t}const Ws=Symbol("internals");function qs(e){return e&&String(e).trim().toLowerCase()}function Hs(e){return!1===e||null==e?e:Ts.isArray(e)?e.map(Hs):(e=>Us(e,Fs))(String(e))}function Vs(e,t,n,a,s){return Ts.isFunction(a)?a.call(this,t,n):(s&&(t=n),Ts.isString(t)?Ts.isString(a)?-1!==t.indexOf(a):Ts.isRegExp(a)?a.test(t):void 0:void 0)}class Ys{constructor(e){e&&this.set(e)}set(e,t,n){const a=this;function s(e,t,n){const s=qs(t);if(!s)return;const r=Ts.findKey(a,s);(!r||void 0===a[r]||!0===n||void 0===n&&!1!==a[r])&&(a[r||t]=Hs(e))}const r=(e,t)=>Ts.forEach(e,(e,n)=>s(e,n,t));if(Ts.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(Ts.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))r(Ls(e),t);else if(Ts.isObject(e)&&Ts.isSafeIterable(e)){let n,a,s=Object.create(null);for(const t of e){if(!Ts.isArray(t))throw new TypeError("Object iterator must return a key-value pair");a=t[0],Ts.hasOwnProp(s,a)?(n=s[a],s[a]=Ts.isArray(n)?[...n,t[1]]:[n,t[1]]):s[a]=t[1]}r(s,t)}else null!=e&&s(t,e,n);return this}get(e,t){if(e=qs(e)){const n=Ts.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}(e);if(Ts.isFunction(t))return t.call(this,e,n);if(Ts.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=qs(e)){const n=Ts.findKey(this,e);return!(!n||void 0===this[n]||t&&!Vs(0,this[n],n,t))}return!1}delete(e,t){const n=this;let a=!1;function s(e){if(e=qs(e)){const s=Ts.findKey(n,e);!s||t&&!Vs(0,n[s],s,t)||(delete n[s],a=!0)}}return Ts.isArray(e)?e.forEach(s):s(e),a}clear(e){const t=Object.keys(this);let n=t.length,a=!1;for(;n--;){const s=t[n];e&&!Vs(0,this[s],s,e,!0)||(delete this[s],a=!0)}return a}normalize(e){const t=this,n={};return Ts.forEach(this,(a,s)=>{const r=Ts.findKey(n,s);if(r)return t[r]=Hs(a),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(s):String(s).trim();o!==s&&delete t[s],t[o]=Hs(a),n[o]=!0}),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return Ts.forEach(this,(n,a)=>{null!=n&&!1!==n&&(t[a]=e&&Ts.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let t=(0,De.A)(e,2);return t[0]+": "+t[1]}).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];
2return a.forEach(e=>t.set(e)),t}static accessor(e){const t=(this[Ws]=this[Ws]={accessors:{}}).accessors,n=this.prototype;function a(e){const a=qs(e);t[a]||(!function(e,t){const n=Ts.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{__proto__:null,value:function(e,n,s){return this[a].call(this,t,e,n,s)},configurable:!0})})}(n,e),t[a]=!0)}return Ts.isArray(e)?e.forEach(a):a(e),this}}Ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ts.reduceDescriptors(Ys.prototype,(e,t)=>{let n=e.value,a=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[a]=e}}}),Ts.freezeMethods(Ys);const $s=Ys;function Qs(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),a=[],s=e=>{if(null===e||"object"!==typeof e)return e;if(Ts.isBuffer(e))return e;if(-1!==a.indexOf(e))return;let t;if(e instanceof $s&&(e=e.toJSON()),a.push(e),Ts.isArray(e))t=[],e.forEach((e,n)=>{const a=s(e);Ts.isUndefined(a)||(t[n]=a)});else{if(!Ts.isPlainObject(e)&&function(e){if(Ts.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Ts.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return a.pop(),e;t=Object.create(null);for(const a of Object.entries(e)){var r=(0,De.A)(a,2);const e=r[0],o=r[1],i=n.has(e.toLowerCase())?"[REDACTED ****]":s(o);Ts.isUndefined(i)||(t[e]=i)}}return a.pop(),t};return s(e)}
vendor: 1,575 bytes, line 2
2class Ks extends Error{static from(e,t,n,a,s,r){const o=new Ks(e.message,t||e.code,n,a,s);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),r&&Object.assign(o,r),o}constructor(e,t,n,a,s){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),s&&(this.response=s,this.status=s.status)}toJSON(){const e=this.config,t=e&&Ts.hasOwnProp(e,"redact")?e.redact:void 0,n=Ts.isArray(t)&&t.length>0?Qs(e,t):Ts.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}Ks.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ks.ERR_BAD_OPTION="ERR_BAD_OPTION",Ks.ECONNABORTED="ECONNABORTED",Ks.ETIMEDOUT="ETIMEDOUT",Ks.ECONNREFUSED="ECONNREFUSED",Ks.ERR_NETWORK="ERR_NETWORK",Ks.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ks.ERR_DEPRECATED="ERR_DEPRECATED",Ks.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ks.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ks.ERR_CANCELED="ERR_CANCELED",Ks.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ks.ERR_INVALID_URL="ERR_INVALID_URL",Ks.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Gs=Ks;function Xs(e){return Ts.isPlainObject(e)||Ts.isArray(e)}function Js(e){return Ts.endsWith(e,"[]")?e.slice(0,-2):e}function Zs(e,t,n){return e?e.concat(t).map(function(e,t){return e=Js(e),
2!n&&t?"["+e+"]":e}).join(n?".":""):t}const er=Ts.toFlatObject(Ts,{},null,function(e){return/^is[A-Z]/.test(e)});const tr=function(e,t,n){if(!Ts.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const a=(n=Ts.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Ts.isUndefined(t[e])})).metaTokens,s=n.visitor||m,r=n.dots,o=n.indexes,i=n.Blob||"undefined"!==typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=i&&Ts.isSpecCompliantForm(t),d=[];if(!Ts.isFunction(s))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(Ts.isDate(e))return e.toISOString();if(Ts.isBoolean(e))return e.toString();if(!c&&Ts.isBlob(e))throw new Gs("Blob is not supported. Use a Buffer instead.");return Ts.isArrayBuffer(e)||Ts.isTypedArray(e)?c&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function h(e){if(e>l)throw new Gs("Object is too deeply nested ("+e+" levels). Max depth: "+l,Gs.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,n,s){let i=e;if(Ts.isReactNative(t)&&Ts.isReactNativeBlob(e))return t.append(Zs(s,n,r),u(e)),!1;if(e&&!s&&"object"===typeof e)if(Ts.endsWith(n,"{}"))n=a?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,a){if(!Ts.isObject(a))return a;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(a),h(t+n.length-1),a})}(e,1);else if(Ts.isArray(e)&&function(e){return Ts.isArray(e)&&!e.some(Xs)}(e)||(Ts.isFileList(e)||Ts.endsWith(n,"[]"))&&(i=Ts.toArray(e)))return n=Js(n),i.forEach(function(e,a){!Ts.isUndefined(e)&&null!==e&&t.append(!0===o?Zs([n],a,r):null===o?n:n+"[]",u(e))}),!1;return!!Xs(e)||(t.append(Zs(s,n,r),u(e)),!1)}const p=Object.assign(er,{defaultVisitor:m,convertValue:u,isVisitable:Xs});if(!Ts.isObject(e))throw new TypeError("data must be an object");return function e(n,a){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!Ts.isUndefined(n)){if(h(r),-1!==d.indexOf(n))throw new Error("Circular reference detected in "+a.join("."));d.push(n),Ts.forEach(n,function(n,o){!0===(!(Ts.isUndefined(n)||null===n)&&s.call(t,n,Ts.isString(o)?o.trim():o,a,p))&&e(n,a?a.concat(o):[o],r+1)}),d.pop()}}(e),t};function nr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function ar(e,t){this._pairs=[],e&&tr(e,this,t)}const sr=ar.prototype;sr.append=function(e,t){this._pairs.push([e,t])},sr.toString=function(e){const t=e?function(t){return e.call(this,t,nr)}:nr;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const rr=ar;function or(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ir(e,t,n){if(!t)return e;const a=Ts.isFunction(n)?{serialize:n}:n,s=Ts.getSafeProp(a,"encode")||or,r=Ts.getSafeProp(a,"serialize");let o;if(o=r?r(t,a):Ts.isURLSearchParams(t)?t.toString():new rr(t,a).toString(s),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const lr=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ts.forEach(this.handlers,function(t){null!==t&&e(t)})}},cr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},dr={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:rr,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ur="undefined"!==typeof window&&"undefined"!==typeof document,hr="object"===typeof navigator&&navigator||void 0,mr=ur&&(!hr||["ReactNative","NativeScript","NS"].indexOf(hr.product)<0),pr="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,fr=ur&&window.location.href||"http://localhost",gr=(0,i.A)((0,i.A)({},a),dr);function xr(e){if(e>100)throw new Gs("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Gs.ERR_FORM_DATA_DEPTH_EXCEEDED)}const vr=function(e){function t(e,n,a,s){xr(s);
vendor: 1,268 bytes, line 2
2let r=e[s++];if("__proto__"===r)return!0;const o=Number.isFinite(+r),i=s>=e.length;if(r=!r&&Ts.isArray(a)?a.length:r,i)return Ts.hasOwnProp(a,r)?a[r]=Ts.isArray(a[r])?a[r].concat(n):[a[r],n]:a[r]=n,!o;Ts.hasOwnProp(a,r)&&Ts.isObject(a[r])||(a[r]=[]);return t(e,n,a[r],s)&&Ts.isArray(a[r])&&(a[r]=function(e){const t={},n=Object.keys(e);let a;const s=n.length;let r;for(a=0;a<s;a++)r=n[a],t[r]=e[r];return t}(a[r])),!o}if(Ts.isFormData(e)&&Ts.isFunction(e.entries)){const n={};return Ts.forEachEntry(e,(e,a)=>{t(function(e){const t=[],n=/\w+|\[(\w*)]/g;let a;for(;null!==(a=n.exec(e));)xr(t.length),t.push("[]"===a[0]?"":a[1]||a[0]);return t}(e),a,n,0)}),n}return null},br=(e,t)=>null!=e&&Ts.hasOwnProp(e,t)?e[t]:void 0;const yr={transitional:cr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",a=n.indexOf("application/json")>-1,s=Ts.isObject(e);s&&Ts.isHTMLForm(e)&&(e=new FormData(e));if(Ts.isFormData(e))return a?JSON.stringify(vr(e)):e;if(Ts.isArrayBuffer(e)||Ts.isBuffer(e)||Ts.isStream(e)||Ts.isFile(e)||Ts.isBlob(e)||Ts.isReadableStream(e))return e;if(Ts.isArrayBufferView(e))return e.buffer;if(Ts.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;
2if(s){const t=br(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return tr(e,new gr.classes.URLSearchParams,(0,i.A)({visitor:function(e,t,n,a){return gr.isNode&&Ts.isBuffer(e)?(this.append(t,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}(e,t).toString();if((r=Ts.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=br(this,"env"),a=n&&n.FormData;return tr(r?{"files[]":e}:e,a&&new a,t)}}return s||a?(t.setContentType("application/json",!1),function(e,t,n){if(Ts.isString(e))try{return(t||JSON.parse)(e),Ts.trim(e)}catch(lS){if("SyntaxError"!==lS.name)throw lS}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=br(this,"transitional")||yr.transitional,n=t&&t.forcedJSONParsing,a=br(this,"responseType"),s="json"===a;if(Ts.isResponse(e)||Ts.isReadableStream(e))return e;if(e&&Ts.isString(e)&&(n&&!a||s)){const n=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,br(this,"parseReviver"))}catch(lS){if(n){if("SyntaxError"===lS.name)throw Gs.from(lS,Gs.ERR_BAD_RESPONSE,this,null,br(this,"response"));throw lS}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gr.classes.FormData,Blob:gr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ts.forEach(["delete","get","head","post","put","patch","query"],e=>{yr.headers[e]={}});const wr=yr;function jr(e,t){const n=this||wr,a=t||n,s=$s.from(a.headers);let r=a.data;return Ts.forEach(e,function(e){r=e.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function kr(e){return!(!e||!e.__CANCEL__)}const Nr=class extends Gs{constructor(e,t,n){super(null==e?"canceled":e,Gs.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Sr(e,t,n){const a=n.config.validateStatus;n.status&&a&&!a(n.status)?t(new Gs("Request failed with status code "+n.status,n.status>=400&&n.status<500?Gs.ERR_BAD_REQUEST:Gs.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Ar=function(e,t){e=e||10;const n=new Array(e),a=new Array(e);let s,r=0,o=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=a[o];s||(s=l),n[r]=i,a[r]=l;let d=o,u=0;for(;d!==r;)u+=n[d++],d%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-s<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}};const _r=function(e,t){let n,a,s=0,r=1e3/t;const o=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();s=r,n=null,a&&(clearTimeout(a),a=null),e(...t)};return[function(){const e=Date.now(),t=e-s;for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];t>=r?o(l,e):(n=l,a||(a=setTimeout(()=>{a=null,o(n)},r-t)))},()=>n&&o(n)]},Cr=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=0;const s=Ar(50,250);return _r(n=>{if(!n||"number"!==typeof n.loaded)return;const r=n.loaded,o=n.lengthComputable?n.total:void 0,i=null!=o?Math.min(r,o):r,l=Math.max(0,i-a),c=s(l);a=Math.max(a,i);e({loaded:i,total:o,progress:o?i/o:void 0,bytes:l,rate:c||void 0,estimated:c&&o?(o-i)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})},n)},Er=(e,t)=>
2{const n=null!=e;return[a=>t[0]({lengthComputable:n,total:e,loaded:a}),t[1]]},Pr=e=>function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return Ts.asap(()=>e(...n))},Mr=gr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gr.origin),gr.navigator&&/(msie|trident)/i.test(gr.navigator.userAgent)):()=>!0,Rr=gr.hasStandardBrowserEnv?{write(e,t,n,a,s,r,o){if("undefined"===typeof document)return;const i=["".concat(e,"=").concat(encodeURIComponent(t))];Ts.isNumber(n)&&i.push("expires=".concat(new Date(n).toUTCString())),Ts.isString(a)&&i.push("path=".concat(a)),Ts.isString(s)&&i.push("domain=".concat(s)),!0===r&&i.push("secure"),Ts.isString(o)&&i.push("SameSite=".concat(o)),document.cookie=i.join("; ")},read(e){if("undefined"===typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const a=t[n].replace(/^\s+/,""),s=a.indexOf("=");if(-1!==s&&a.slice(0,s)===e)return decodeURIComponent(a.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const Or=/^https?:(?!\/\/)/i,zr=/[\t\n\r]/g;function Tr(e,t){if("string"===typeof e&&Or.test(function(e){return function(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}(e).replace(zr,"")}(e)))throw new Gs('Invalid URL: missing "//" after protocol',Gs.ERR_INVALID_URL,t)}function Dr(e,t,n,a){Tr(t,a);let s=!("string"===typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(s||!1===n)?(Tr(e,a),function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t)):t}const Lr=e=>e instanceof $s?(0,i.A)({},e):e;function Fr(e,t){t=t||{};const n=Object.create(null);function a(e,t,n,a){return Ts.isPlainObject(e)&&Ts.isPlainObject(t)?Ts.merge.call({caseless:a},e,t):Ts.isPlainObject(t)?Ts.merge({},t):Ts.isArray(t)?t.slice():t}function s(e,t,n,s){return Ts.isUndefined(t)?Ts.isUndefined(e)?void 0:a(void 0,e,0,s):a(e,t,0,s)}function r(e,t){if(!Ts.isUndefined(t))return a(void 0,t)}function o(e,t){return Ts.isUndefined(t)?Ts.isUndefined(e)?void 0:a(void 0,e):a(void 0,t)}function l(n,s,r){return Ts.hasOwnProp(t,r)?a(n,s):Ts.hasOwnProp(e,r)?a(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:l,headers:(e,t,n)=>s(Lr(e),Lr(t),0,!0)};return Ts.forEach(Object.keys((0,i.A)((0,i.A)({},e),t)),function(a){if("__proto__"===a||"constructor"===a||"prototype"===a)return;const r=Ts.hasOwnProp(c,a)?c[a]:s,o=r(Ts.hasOwnProp(e,a)?e[a]:void 0,Ts.hasOwnProp(t,a)?t[a]:void 0,a);Ts.isUndefined(o)&&r!==l||(n[a]=o)}),Ts.hasOwnProp(t,"validateStatus")&&Ts.isUndefined(t.validateStatus)&&!1===function(n){const a=Ts.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Ts.isUndefined(a)){if(!Ts.isPlainObject(a))return;if(Ts.hasOwnProp(a,n))return a[n]}const s=Ts.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Ts.isPlainObject(s)&&Ts.hasOwnProp(s,n))return s[n]}("validateStatusUndefinedResolves")&&(Ts.hasOwnProp(e,"validateStatus")?n.validateStatus=a(void 0,e.validateStatus):delete n.val
2idateStatus),n}const Ir=["content-type","content-length"];const Ur=function(e){const t=Fr({},e),n=e=>Ts.hasOwnProp(t,e)?t[e]:void 0,a=n("data");let s=n("withXSRFToken");const r=n("xsrfHeaderName"),o=n("xsrfCookieName");let i=n("headers");const l=n("auth"),c=n("baseURL"),d=n("allowAbsoluteUrls"),u=n("url");if(t.headers=i=$s.from(i),t.url=ir(Dr(c,u,d,t),n("params"),n("paramsSerializer")),l){const e=Ts.getSafeProp(l,"username")||"",t=Ts.getSafeProp(l,"password")||"";i.set("Authorization","Basic "+btoa(e+":"+(t?encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}if(Ts.isFormData(a)&&(gr.hasStandardBrowserEnv||gr.hasStandardBrowserWebWorkerEnv||Ts.isReactNative(a)?i.setContentType(void 0):Ts.isFunction(a.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(t=>{let n=(0,De.A)(t,2),a=n[0],s=n[1];Ir.includes(a.toLowerCase())&&e.set(a,s)}):e.set(t)}(i,a.getHeaders(),n("formDataHeaderPolicy"))),gr.hasStandardBrowserEnv){Ts.isFunction(s)&&(s=s(t));if(!0===s||null==s&&Mr(t.url)){const e=r&&o&&Rr.read(o);e&&i.set(r,e)}}return t},Br="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const a=Ur(e);let s=a.data;const r=$s.from(a.headers).normalize();let o,i,l,c,d,u=a.responseType,h=a.onUploadProgress,m=a.onDownloadProgress;function p(){c&&c(),d&&d(),a.cancelToken&&a.cancelToken.unsubscribe(o),a.signal&&a.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function g(){if(!f)return;const a=$s.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Sr(function(e){t(e),p()},function(e){n(e),p()},{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:a,config:e,request:f}),f=null}if(f.open(a.method.toUpperCase(),a.url,!0),f.timeout=a.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&f.responseURL.startsWith("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new Gs("Request aborted",Gs.ECONNABORTED,e,f)),p(),f=null)},f.onerror=function(t){const a=t&&t.message?t.message:"Network Error",s=new Gs(a,Gs.ERR_NETWORK,e,f);s.event=t||null,n(s),p(),f=null},f.ontimeout=function(){let t=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const s=a.transitional||cr;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),n(new Gs(t,s.clarifyTimeoutError?Gs.ETIMEDOUT:Gs.ECONNABORTED,e,f)),p(),f=null},void 0===s&&r.setContentType(null),"setRequestHeader"in f&&Ts.forEach(Bs(r),function(e,t){f.setRequestHeader(t,e)}),Ts.isUndefined(a.withCredentials)||(f.withCredentials=!!a.withCredentials),u&&"json"!==u&&(f.responseType=a.responseType),m){var x=Cr(m,!0),v=(0,De.A)(x,2);l=v[0],d=v[1],f.addEventListener("progress",l)}if(h&&f.upload){var b=Cr(h),y=(0,De.A)(b,2);i=y[0],c=y[1],f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",c)}(a.cancelToken||a.signal)&&(o=t=>{f&&(n(!t||t.type?new Nr(null,e,f):t),f.abort(),p(),f=null)},a.cancelToken&&a.cancelToken.subscribe(o),a.signal&&(a.signal.aborted?o():a.signal.addEventListener("abort",o))
2);const w=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(a.url);!w||gr.protocols.includes(w)?f.send(s||null):n(new Gs("Unsupported protocol "+w+":",Gs.ERR_BAD_REQUEST,e))})},Wr=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let a=!1;const s=function(e){if(!a){a=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Gs?t:new Nr(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,s(new Gs("timeout of ".concat(t,"ms exceeded"),Gs.ETIMEDOUT))},t);const o=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}),e=null)};e.forEach(e=>e.addEventListener("abort",s));const i=n.signal;return i.unsubscribe=()=>Ts.asap(o),i};function qr(e,t){this.v=e,this.k=t}function Hr(e){return function(){return new Vr(e.apply(this,arguments))}}function Vr(e){var t,n;function a(t,n){try{var r=e[t](n),o=r.value,i=o instanceof qr;Promise.resolve(i?o.v:o).then(function(n){if(i){var l="return"===t&&o.k?t:"next";if(!o.k||n.done)return a(l,n);n=e[l](n).value}s(!!r.done,n)},function(e){a("throw",e)})}catch(e){s(2,e)}}function s(e,s){2===e?t.reject(s):t.resolve({value:s,done:e}),(t=t.next)?a(t.key,t.arg):n=null}this._invoke=function(e,s){return new Promise(function(r,o){var i={key:e,arg:s,resolve:r,reject:o,next:null};n?n=n.next=i:(t=n=i,a(e,s))})},"function"!=typeof e.return&&(this.return=void 0)}function Yr(e){return new qr(e,0)}function $r(e){var t={},n=!1;function a(t,a){return n=!0,a=new Promise(function(n){n(e[t](a))}),{done:!1,value:new qr(a,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):a("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return a("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):a("return",e)}),t}function Qr(e){var t,n,a,s=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,a=Symbol.iterator);s--;){if(n&&null!=(t=e[n]))return t.call(e);if(a&&null!=(t=e[a]))return new Kr(t.call(e));n="@@asyncIterator",a="@@iterator"}throw new TypeError("Object is not async iterable")}function Kr(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Kr=function(e){this.s=e,this.n=e.next},Kr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Kr(e)}Vr.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Vr.prototype.next=function(e){return this._invoke("next",e)},Vr.prototype.throw=function(e){return this._invoke("throw",e)},Vr.prototype.return=function(e){return this._invoke("return",e)};const Gr=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let a,s=0;for(;s<n;)a=s+t,yield e.slice(s,a),s=a},Xr=function(){var e=Hr(function*(e,t){var n,a=!1,s=!1;try{for(var r,o=Qr(Jr(e));a=!(r=yield Yr(o.next())).done;a=!1){const e=r.value;yield*$r(Qr(Gr(e,t)))}}catch(i){s=!0,n=i}finally{try{a&&null!=o.return&&(yield Yr(o.return()))}finally{if(s)throw n}}});return function(t,n){return e.apply(this,arguments)}}(),Jr=function(){var e=Hr(function*(e){if(e[Symbol.asyncIterator])return void(yield*$r(Qr(e)));const t=e.getReader();try{for(;;){const e=yield Yr(t.read()),n=e.done,a=e.value;if(n)break;yield a}}finally{yield Yr(t.cancel())}});return function(t){return e.apply(this,arguments)}}(),Zr=(e,t,n,a)=>{const s=Xr(e,t);let r,o=0,i=e=>{r||(r=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const t=await s.next(),a=t.done,r=t.value;if(a)return i(),void e.close();let l=r.byteLength;if(n){let e=o+=l;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw i(t),t}},cancel:e=>(i(e),s.return())},{highWaterMark:2})},eo=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,to=(e,t,n)=>t+2<n&&eo(e.charCodeAt(t+1))&&eo(e.charCodeAt(t+2));const no="1.18.0",ao=Ts.isFunction,so=e=>{if(!Ts.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},ro=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return!!e(...n)}catch(lS){return!1}},oo=e=>{const t=void 0!==Ts.global&&null!==Ts.global?Ts.global:globalThis,n=t.ReadableStream,a=t.TextEncoder,s=e=Ts.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e),r=s.fetch,o=s.Request,l=s.Response,c=r?ao(r):"function"===typeof fetch,d=ao(o),u=ao(l);if(!c)return!1;const h=c&&ao(n),m=c&&("function"===typeof a?(p=new a,e=>p.encode(e)):async e=>new Uint8Array(await new o(e).arrayBuffer()));var p;const f=d&&h&&ro(()=>{let e=!1;const t=new o(gr.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),a=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!a}),g=u&&h&&ro(()=>Ts.isReadableStream(new l("").body)),x={stream:g&&(e=>e.body)};
vendor: 4,274 bytes, line 2
2c&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!x[e]&&(x[e]=(t,n)=>{let a=t&&t[e];if(a)return a.call(t);throw new Gs("Response type '".concat(e,"' is not supported"),Gs.ERR_NOT_SUPPORT,n)})});const v=async e=>{if(null==e)return 0;if(Ts.isBlob(e))return e.size;if(Ts.isSpecCompliantForm(e)){const t=new o(gr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Ts.isArrayBufferView(e)||Ts.isArrayBuffer(e)?e.byteLength:(Ts.isURLSearchParams(e)&&(e+=""),Ts.isString(e)?(await m(e)).byteLength:void 0)};return async e=>{let t=Ur(e),n=t.url,s=t.method,c=t.data,u=t.signal,m=t.cancelToken,p=t.timeout,b=t.onDownloadProgress,y=t.onUploadProgress,w=t.responseType,j=t.headers,k=t.withCredentials,N=void 0===k?"same-origin":k,S=t.fetchOptions,A=t.maxContentLength,_=t.maxBodyLength;const C=Ts.isNumber(A)&&A>-1,E=Ts.isNumber(_)&&_>-1;let P=r||fetch;w=w?(w+"").toLowerCase():"text";let M=Wr([u,m&&m.toAbortSignal()],p),R=null;const O=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let z,T=null;const D=()=>new Gs("Request body larger than maxBodyLength limit",Gs.ERR_BAD_REQUEST,e,R);try{let t;const r=(F="auth",Ts.hasOwnProp(e,F)?e[F]:void 0);if(r){const e=Ts.getSafeProp(r,"username")||"";t={username:e,password:Ts.getSafeProp(r,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(n)){const e=new URL(n,gr.origin);if(!t&&(e.username||e.password)){const n=so(e.username);t={username:n,password:so(e.password)}}(e.username||e.password)&&(e.username="",e.password="",n=e.href)}if(t&&(j.delete("authorization"),j.set("Authorization","Basic "+btoa((L=(t.username||"")+":"+(t.password||""),encodeURIComponent(L).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),C&&"string"===typeof n&&n.startsWith("data:")){const t=function(e){if(!e||"string"!==typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),a=e.slice(t+1);if(/;base64/i.test(n)){let e=a.length;const t=a.length;for(let i=0;i<t;i++)if(37===a.charCodeAt(i)&&i+2<t){const t=a.charCodeAt(i+1),n=a.charCodeAt(i+2);eo(t)&&eo(n)&&(e-=2,i+=2)}let n=0,s=t-1;const r=e=>e>=2&&37===a.charCodeAt(e-2)&&51===a.charCodeAt(e-1)&&(68===a.charCodeAt(e)||100===a.charCodeAt(e));s>=0&&(61===a.charCodeAt(s)?(n++,s--):r(s)&&(n++,s-=3)),1===n&&s>=0&&(61===a.charCodeAt(s)||r(s))&&n++;const o=3*Math.floor(e/4)-(n||0);return o>0?o:0}let s=0;for(let r=0,o=a.length;r<o;r++){const e=a.charCodeAt(r);if(37===e&&to(a,r,o))s+=1,r+=2;else if(e<128)s+=1;else if(e<2048)s+=2;else if(e>=55296&&e<=56319&&r+1<o){const e=a.charCodeAt(r+1);e>=56320&&e<=57343?(s+=4,r++):s+=3}else s+=3}return s}(n);if(t>A)throw new Gs("maxContentLength size of "+A+" exceeded",Gs.ERR_BAD_RESPONSE,e,R)}if(E&&"get"!==s&&"head"!==s){const e=await v(c);if("number"===typeof e&&isFinite(e)&&(z=e,e>_))throw D()}const u=E&&(Ts.isReadableStream(c)||Ts.isStream(c)),m=(e,t,n)=>Zr(e,65536,e=>{if(E&&e>_)throw T=D();t&&t(e)},n);if(f&&"get"!==s&&"head"!==s&&(y||u)){if(z=null==z?await(async(e,t)=>{const n=Ts.toFiniteNumber(e.getContentLength());return null==n?v(t):n})(j,c):z,0!==z||u){let e,t=new o(n,{method:"POST",body:c,duplex:"half"});if(Ts.isFormData(c)&&(e=t.headers.get("content-type"))&&j.setContentType(e),t.body){const e=y&&Er(z,Cr(Pr(y)))||[],n=(0,De.A)(e,2),a=n[0],s=n[1];c=m(t.body,a,s)}}}else if(u&&!d&&h&&"get"!==s&&"head"!==s)c=m(c);else if(u&&d&&!f&&"get"!==s&&"head"!==s)throw new Gs("Stream request bodies are not supported by the current fetch implementation",Gs.ERR_NOT_SUPPORT,e,R);Ts.isString(N)||(N=N?"include":"omit");const p=d&&"credentials"in o.prototype;if(Ts.isFormData(c)){const e=j.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&j.delete("content-type")}j.set("User-Agent","axios/"+no,!1);const k=(0,i.A)((0,i.A)({},S),{},{signal:M,method:s.toUpperCase(),headers:Bs(j.normalize()),body:c,duplex:"half",credentials:p?N:void 0});R=d&&new o(n,k);let I=await(d?P(R,S):P(n,k));const U=$s.from(I.headers);if(C){const t=Ts.toFiniteNumber(U.getContentLength());if(null!=t&&t>A)throw new Gs("maxContentLength size of "+A+" exceeded",Gs.ERR_BAD_RESPONSE,e,R)}const B=g&&("stream"===w||"response"===w);if(g&&I.body&&(b||C||B&&O)){const t={};
2["status","statusText","headers"].forEach(e=>{t[e]=I[e]});const n=Ts.toFiniteNumber(U.getContentLength()),a=b&&Er(n,Cr(Pr(b),!0))||[],s=(0,De.A)(a,2),r=s[0],o=s[1];let i=0;const c=t=>{if(C&&(i=t,i>A))throw new Gs("maxContentLength size of "+A+" exceeded",Gs.ERR_BAD_RESPONSE,e,R);r&&r(t)};I=new l(Zr(I.body,65536,c,()=>{o&&o(),O&&O()}),t)}w=w||"text";let W=await x[Ts.findKey(x,w)||"text"](I,e);if(C&&!g&&!B){let t;if(null!=W&&("number"===typeof W.byteLength?t=W.byteLength:"number"===typeof W.size?t=W.size:"string"===typeof W&&(t="function"===typeof a?(new a).encode(W).byteLength:W.length)),"number"===typeof t&&t>A)throw new Gs("maxContentLength size of "+A+" exceeded",Gs.ERR_BAD_RESPONSE,e,R)}return!B&&O&&O(),await new Promise((t,n)=>{Sr(t,n,{data:W,headers:$s.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:R})})}catch(I){if(O&&O(),M&&M.aborted&&M.reason instanceof Gs){const t=M.reason;throw t.config=e,R&&(t.request=R),I!==t&&(t.cause=I),t}if(T)throw R&&!T.request&&(T.request=R),T;if(I instanceof Gs)throw R&&!I.request&&(I.request=R),I;if(I&&"TypeError"===I.name&&/Load failed|fetch/i.test(I.message))throw Object.assign(new Gs("Network Error",Gs.ERR_NETWORK,e,R,I&&I.response),{cause:I.cause||I});throw Gs.from(I,I&&I.code,e,R,I&&I.response)}var L,F}},io=new Map,lo=e=>{let t=e&&e.env||{};const n=t.fetch,a=[t.Request,t.Response,n];let s,r,o=a.length,i=io;for(;o--;)s=a[o],r=i.get(s),void 0===r&&i.set(s,r=o?new Map:oo(t)),i=r;return r},co=(lo(),{http:null,xhr:Br,fetch:{get:lo}});Ts.forEach(co,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(lS){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const uo=e=>"- ".concat(e),ho=e=>Ts.isFunction(e)||null===e||!1===e;const mo={getAdapter:function(e,t){const n=(e=Ts.isArray(e)?e:[e]).length;let a,s;const r={};for(let o=0;o<n;o++){let n;if(a=e[o],s=a,!ho(a)&&(s=co[(n=String(a)).toLowerCase()],void 0===s))throw new Gs("Unknown adapter '".concat(n,"'"));if(s&&(Ts.isFunction(s)||(s=s.get(t))))break;r[n||"#"+o]=s}if(!s){const e=Object.entries(r).map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return"adapter ".concat(n," ")+(!1===a?"is not supported by the environment":"is not available in the build")});let t=n?e.length>1?"since :\n"+e.map(uo).join("\n"):" "+uo(e[0]):"as no adapter specified";throw new Gs("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return s},adapters:co};function po(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nr(null,e)}function fo(e){po(e),e.headers=$s.from(e.headers),e.data=jr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return mo.getAdapter(e.adapter||wr.adapter,e)(e).then(function(t){po(e),e.response=t;try{t.data=jr.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=$s.from(t.headers),t},function(t){if(!kr(t)&&(po(e),t&&t.response)){e.response=t.response;try{t.response.data=jr.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=$s.from(t.response.headers)}return Promise.reject(t)})}const go={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{go[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const xo={};go.transitional=function(e,t,n){function a(e,t){return"[Axios v"+no+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,r)=>{if(!1===e)throw new Gs(a(s," has been removed"+(t?" in "+t:"")),Gs.ERR_DEPRECATED);return t&&!xo[s]&&(xo[s]=!0,console.warn(a(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,r)}},go.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const vo={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Gs("options must be an object",G
vendor: 4,433 bytes, line 2
2s.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let s=a.length;for(;s-- >0;){const r=a[s],o=Object.prototype.hasOwnProperty.call(t,r)?t[r]:void 0;if(o){const t=e[r],n=void 0===t||o(t,r,e);if(!0!==n)throw new Gs("option "+r+" must be "+n,Gs.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Gs("Unknown option "+r,Gs.ERR_BAD_OPTION)}},validators:go},bo=vo.validators;class yo{constructor(e){this.defaults=e||{},this.interceptors={request:new lr,response:new lr}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),a=-1===e?-1:t.indexOf("\n",e+1),s=-1===a?"":t.slice(a+1);String(n.stack).endsWith(s)||(n.stack+="\n"+t)}}else n.stack=t}catch(lS){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{};const n=t=Fr(this.defaults,t),a=n.transitional,s=n.paramsSerializer,r=n.headers;void 0!==a&&vo.assertOptions(a,{silentJSONParsing:bo.transitional(bo.boolean),forcedJSONParsing:bo.transitional(bo.boolean),clarifyTimeoutError:bo.transitional(bo.boolean),legacyInterceptorReqResOrdering:bo.transitional(bo.boolean),advertiseZstdAcceptEncoding:bo.transitional(bo.boolean),validateStatusUndefinedResolves:bo.transitional(bo.boolean)},!1),null!=s&&(Ts.isFunction(s)?t.paramsSerializer={serialize:s}:vo.assertOptions(s,{encode:bo.function,serialize:bo.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),vo.assertOptions(t,{baseUrl:bo.spelling("baseURL"),withXsrfToken:bo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&Ts.merge(r.common,r[t.method]);r&&Ts.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete r[e]}),t.headers=$s.concat(o,r);const i=[];let l=!0;this.interceptors.request.forEach(function(e){if("function"===typeof e.runWhen&&!1===e.runWhen(t))return;l=l&&e.synchronous;const n=t.transitional||cr;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const c=[];let d;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,h=0;if(!l){const e=[fo.bind(this),void 0];for(e.unshift(...i),e.push(...c),u=e.length,d=Promise.resolve(t);h<u;)d=d.then(e[h++],e[h++]);return d}u=i.length;let m=t;for(;h<u;){const e=i[h++],t=i[h++];try{m=e(m)}catch(p){t.call(this,p);break}}try{d=fo.call(this,m)}catch(p){return Promise.reject(p)}for(h=0,u=c.length;h<u;)d=d.then(c[h++],c[h++]);return d}getUri(e){return ir(Dr((e=Fr(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}Ts.forEach(["delete","get","head","options"],function(e){yo.prototype[e]=function(t,n){return this.request(Fr(n||{},{method:e,url:t,data:n&&Ts.hasOwnProp(n,"data")?n.data:void 0}))}}),Ts.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,a,s){return this.request(Fr(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:a}))}}yo.prototype[e]=t(),"query"!==e&&(yo.prototype[e+"Form"]=t(!0))});const wo=yo;class jo{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const a=new Promise(e=>{n.subscribe(e),t=e}).then(e);return a.cancel=function(){n.unsubscribe(t)},a},e(function(e,a,s){n.reason||(n.reason=new Nr(e,a,s),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new jo(function(t){e=t}),cancel:e}}}const ko=jo;const No={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
2setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(No).forEach(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];No[a]=n});const So=No;const Ao=function e(t){const n=new wo(t),a=qa(wo.prototype.request,n);return Ts.extend(a,wo.prototype,n,{allOwnKeys:!0}),Ts.extend(a,n,null,{allOwnKeys:!0}),a.create=function(n){return e(Fr(t,n))},a}(wr);Ao.Axios=wo,Ao.CanceledError=Nr,Ao.CancelToken=ko,Ao.isCancel=kr,Ao.VERSION=no,Ao.toFormData=tr,Ao.AxiosError=Gs,Ao.Cancel=Ao.CanceledError,Ao.all=function(e){return Promise.all(e)},Ao.spread=function(e){return function(t){return e.apply(null,t)}},Ao.isAxiosError=function(e){return Ts.isObject(e)&&!0===e.isAxiosError},Ao.mergeConfig=Fr,Ao.AxiosHeaders=$s,Ao.formToJSON=e=>vr(Ts.isHTMLForm(e)?new FormData(e):e),Ao.getAdapter=mo.getAdapter,Ao.HttpStatusCode=So,Ao.default=Ao;const _o=Ao,Co="".concat("https://underdogpodcasts.com","/api"),Eo=_o.create({baseURL:Co,withCredentials:!0}),Po=e=>e&&e.startsWith("/api/")?"".concat("https://underdogpodcasts.com").concat(e):e;function Mo(e){var t,n;const a=null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail;return a?"string"===typeof a?a:Array.isArray(a)?a.map(e=>(null===e||void 0===e?void 0:e.msg)||JSON.stringify(e)).join(" "):(null===a||void 0===a?void 0:a.msg)||String(a):(null===e||void 0===e?void 0:e.message)||"Something went wrong"}function Ro(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function Oo(e){if(!e)return"";const t=(Date.now()-new Date(e).getTime())/1e3,n=[["yr",31536e3],["mo",2592e3],["wk",604800],["day",86400],["hr",3600],["min",60]];for(const s of n){var a=(0,De.A)(s,2);const e=a[0],n=a[1],r=Math.floor(t/n);if(r>=1)return"".concat(r," ").concat(e).concat(r>1&&"hr"!==e&&"min"!==e?"s":""," ago")}return"just now"}function zo(e){if(!e||isNaN(e))return"0:00";const t=Math.floor(e/3600),n=Math.floor(e%3600/60),a=Math.floor(e%60);return t?"".concat(t,":").concat(String(n).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(n,":").concat(String(a).padStart(2,"0"))}const To=(0,s.createContext)(null);function Do(e){let t=e.children;const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1];(0,s.useEffect)(()=>{Eo.get("/auth/me").then(e=>o(e.data)).catch(()=>o(!1))},[]);return(0,_e.jsx)(To.Provider,{value:{user:r,login:async(e,t)=>{const n=(await Eo.post("/auth/login",{email:e,password:t})).data;return o(n.user),n.user},logout:async()=>{await Eo.post("/auth/logout").catch(()=>{}),localStorage.removeItem("ud_token"),o(!1)}},children:t})}const Lo=()=>(0,s.useContext)(To),Fo=(0,s.createContext)(null);function Io(e){let t=e.children;const n=(0,s.useRef)(null),a=(0,s.useState)(null),r=(0,De.A)(a,2),o=r[0],i=r[1],l=(0,s.useState)(null),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(0),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useState)(0),w=(0,De.A)(y,2),j=w[0],k=w[1];(0,s.useEffect)(()=>{const e=new Audio;return e.preload="metadata",e.addEventListener("timeupdate",()=>b(e.currentTime)),e.addEventListener("loadedmetadata",()=>k(e.duration)),e.addEventListener("ended",()=>f(!1)),e.addEventListener("pause",()=>f(!1)),e.addEventListener("play",()=>f(!0)),n.current=e,()=>e.pause()},[]);const N=e=>{const t=n.current;if(e.video_id&&!e.audio_url)return t.pause(),void u(e);(null===o||void 0===o?void 0:o.id)!==e.id?(t.src=e.audio_url,i(e),b(0),t.play().catch(()=>{})):p?t.pause():t.play()},S=e=>{n.current.currentTime=e,b(e)};return(0,_e.jsx)(Fo.Provider,{value:{current:o,video:d,playing:p,progress:v,duration:j,play:N,toggle:()=>
2o&&N(o),seek:S,skip:e=>S(Math.max(0,Math.min(j||0,v+e))),close:()=>{n.current.pause(),i(null)},closeVideo:()=>u(null),isPlaying:e=>p&&(null===o||void 0===o?void 0:o.id)===e||(null===d||void 0===d?void 0:d.id)===e},children:t})}const Uo=()=>(0,s.useContext)(Fo),Bo=(0,s.createContext)({settings:null,homepage:{},pages:{},refresh:()=>{}});function Wo(e){let t=e.children;const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],i=()=>Eo.get("/settings").then(e=>o(e.data)).catch(()=>{});return(0,s.useEffect)(()=>{i()},[]),(0,_e.jsx)(Bo.Provider,{value:{settings:r,homepage:(null===r||void 0===r?void 0:r.homepage)||{},pages:(null===r||void 0===r?void 0:r.pages)||{},refresh:i},children:t})}const qo=()=>(0,s.useContext)(Bo),Ho=(0,s.createContext)({theme:"dark",toggle:()=>{}});function Vo(e){let t=e.children;const n=(0,s.useState)(()=>localStorage.getItem("ud_theme")||"dark"),a=(0,De.A)(n,2),r=a[0],o=a[1],i=Xt().pathname;(0,s.useEffect)(()=>{const e="light"===r&&!i.startsWith("/admin");document.documentElement.classList.toggle("light",e),localStorage.setItem("ud_theme",r)},[r,i]);return(0,_e.jsx)(Ho.Provider,{value:{theme:r,toggle:()=>o(e=>"light"===e?"dark":"light")},children:t})}const Yo=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},$o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var Qo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ko=["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"],Go=(0,s.forwardRef)((e,t)=>{let n=e.color,a=void 0===n?"currentColor":n,r=e.size,o=void 0===r?24:r,l=e.strokeWidth,c=void 0===l?2:l,d=e.absoluteStrokeWidth,u=e.className,h=void 0===u?"":u,m=e.children,p=e.iconNode,f=(0,Pe.A)(e,Ko);return(0,s.createElement)("svg",(0,i.A)((0,i.A)((0,i.A)({ref:t},Qo),{},{width:o,height:o,stroke:a,strokeWidth:d?24*Number(c)/Number(o):c,className:$o("lucide",h)},!m&&!(e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(f)&&{"aria-hidden":"true"}),f),[...p.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,s.createElement)(n,a)}),...Array.isArray(m)?m:[m]])}),Xo=["className"],Jo=(e,t)=>{const n=(0,s.forwardRef)((n,a)=>{let r=n.className,o=(0,Pe.A)(n,Xo);return(0,s.createElement)(Go,(0,i.A)({ref:a,iconNode:t,className:$o("lucide-".concat((l=Yo(e),l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())),"lucide-".concat(e),r)},o));var l});return n.displayName=Yo(e),n},Zo=Jo("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),ei=Jo("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]),ti=Jo("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]),ni=Jo("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]),ai=Jo("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),si=()=>{var e,t;const n=Uo(),a=n.current,s=n.playing,r=n.progress,o=n.duration,i=n.toggle,l=n.seek,c=n.skip,d=n.close;return a?(0,_e.jsx)("div",{className:"fixed bottom-0 inset-x-0 z-[60] glass border-t border-sky-400/30 reveal","data-testid":"global-player",children:(0,_e.jsxs)("div",{className:"max-w-[1400px] mx-auto px-4 sm:px-8 py-3 flex items-center gap-4",children:[(0,_e.jsx)("img",{src:a.image_url||(null===(e=a.show)||void 0===e?void 0:e.cover_url),alt:"",className:"h-12 w-12 rounded-lg object-cover hidden sm:block"}),(0,_e.jsxs)("div",{className:"min-w-0 w-44 sm:w-60 shrink-0",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate","data-testid":"global-player-title",children:a.title}),(0,_e.jsx)("p",{className:"text-xs text-slate-400 truncate",children:(null===(t=a.show)||void 0===t?void 0:t.name)||""})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)("button",{onClick:()=>c(-15),className:"p-2 text-slate-300 hover:text-white","data-testid":"global-player-back","aria-label":"Back 15s",children:(0,_e.jsx)(Zo,{size:18})}),(0,_e.jsx)("button",{onClick:i,className:"h-11 w-11 rounded-full bg-sky-4
200 text-[#070F1E] flex items-center justify-center hover:scale-105 transition-transform","data-testid":"global-player-toggle","aria-label":s?"Pause":"Play",children:s?(0,_e.jsx)(ei,{size:20,fill:"currentColor"}):(0,_e.jsx)(ti,{size:20,fill:"currentColor",className:"ml-0.5"})}),(0,_e.jsx)("button",{onClick:()=>c(30),className:"p-2 text-slate-300 hover:text-white","data-testid":"global-player-forward","aria-label":"Forward 30s",children:(0,_e.jsx)(ni,{size:18})})]}),(0,_e.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[(0,_e.jsx)("span",{className:"font-mono text-xs text-slate-400 w-12 text-right","data-testid":"global-player-progress",children:zo(r)}),(0,_e.jsx)("input",{type:"range",min:0,max:o||0,step:1,value:r,onChange:e=>l(Number(e.target.value)),className:"flex-1 h-1.5 cursor-pointer","data-testid":"global-player-seek"}),(0,_e.jsx)("span",{className:"font-mono text-xs text-slate-400 w-12",children:zo(o)})]}),(0,_e.jsx)("button",{onClick:d,className:"p-2 text-slate-400 hover:text-white","data-testid":"global-player-close","aria-label":"Close player",children:(0,_e.jsx)(ai,{size:18})})]})}):null},ri=Jo("music-2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]),oi=Jo("youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]),ii=()=>{var e,t;const n=Uo(),a=n.video,r=n.closeVideo;if((0,s.useEffect)(()=>{if(!a)return;const e=e=>"Escape"===e.key&&r();return document.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[a,r]),!a)return null;const o="tiktok"===a.source,i=o?"https://www.tiktok.com/@".concat((null===(e=a.show)||void 0===e?void 0:e.tiktok_handle)||"underdogpodcasts","/video/").concat(a.video_id):"https://www.youtube.com/watch?v=".concat(a.video_id);return(0,_e.jsx)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-4 sm:p-8 bg-black/85 backdrop-blur-sm on-dark",onClick:r,"data-testid":"video-modal",children:(0,_e.jsxs)("div",{className:"relative w-full ".concat(o?"max-w-md":"max-w-5xl"," card-surface rounded-3xl overflow-hidden shadow-2xl reveal"),onClick:e=>e.stopPropagation(),style:{animationDuration:".25s"},children:[(0,_e.jsx)("button",{onClick:r,className:"absolute top-3 right-3 z-10 h-10 w-10 rounded-full bg-black/60 text-white flex items-center justify-center hover:bg-black/80","aria-label":"Close video","data-testid":"video-modal-close",children:(0,_e.jsx)(ai,{size:18})}),(0,_e.jsx)("div",{className:"".concat(o?"aspect-[9/16] max-h-[70vh] mx-auto":"aspect-video"," bg-black"),children:o?(0,_e.jsx)("iframe",{src:"https://www.tiktok.com/embed/v2/".concat(a.video_id),title:a.title,className:"h-full w-full",allow:"autoplay; encrypted-media; picture-in-picture",allowFullScreen:!0,"data-testid":"video-modal-iframe"},a.video_id):(0,_e.jsx)("iframe",{src:"https://www.youtube.com/embed/".concat(a.video_id,"?autoplay=1&rel=0"),title:a.title,className:"h-full w-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-testid":"video-modal-iframe"},a.video_id)}),(0,_e.jsxs)("div",{className:"p-5 sm:p-6 flex flex-wrap items-start justify-between gap-4",children:[(0,_e.jsxs)("div",{className:"min-w-0",children:[(null===(t=a.show)||void 0===t?void 0:t.name)&&(0,_e.jsx)("p",{className:"eyebrow mb-1",children:a.show.name}),(0,_e.jsx)("h3",{className:"font-display text-lg sm:text-2xl font-bold leading-snug","data-testid":"video-modal-title",children:a.title}),(0,_e.jsx)("p",{className:"mt-2 font-mono text-[11px] text-slate-400",children:Oo(a.published_at)})]}),(0,_e.jsx)("a",{href:i,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 rounded-full bg-white/10 px-4 py-2 text-sm font-semibold text-white hover:bg-white/20","data-testid":"video-modal-youtube-link",children:o?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ri,{size:16,className:"text-cyan-300"})," Open on TikTok"]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(oi,{size:16,className:"text-rose-500"})," Watch on YouTube"]})})]})]})})},li=Jo("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
2y:"oel41y"}]]),ci=Jo("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),di=Jo("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ui=Jo("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]),hi=e=>{let t=e.size,n=void 0===t?44:t,a=e.className,s=void 0===a?"":a;const r=qo().settings;return(0,_e.jsx)("img",{src:Po(null===r||void 0===r?void 0:r.logo_url)||"/logo.png",alt:"Underdog Podcasts",width:n,height:n,className:"rounded-full object-contain select-none ring-1 ring-white/20 shadow-[0_0_18px_rgba(56,189,248,0.25)] ".concat(s),style:{width:n,height:n},draggable:!1,"data-testid":"site-logo"})},mi=Jo("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),pi=Jo("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),fi=e=>{let t=e.show,n=e.onPick,a=e.testId;return(0,_e.jsxs)("button",{onClick:()=>n(t.slug),className:"group/item flex items-center gap-3 w-full rounded-lg px-2 py-1.5 text-left hover:bg-white/[0.06] transition-colors","data-testid":a,children:[t.cover_url?(0,_e.jsx)("img",{src:t.cover_url,alt:"",className:"h-8 w-8 rounded-md object-cover ring-1 ring-white/10 shrink-0",loading:"lazy"}):(0,_e.jsx)("span",{className:"h-8 w-8 rounded-md bg-[#053671] shrink-0"}),(0,_e.jsx)("span",{className:"text-sm text-slate-200 group-hover/item:text-white truncate",children:t.name}),("video"===t.kind||"tiktok"===t.kind)&&(0,_e.jsx)("span",{className:"ml-auto shrink-0 rounded-full bg-rose-500/15 px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-rose-400",children:"Video"})]})},gi=()=>{const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(null),o=(0,De.A)(r,2),i=o[0],l=o[1],c=en(),d=(0,s.useRef)(null);(0,s.useEffect)(()=>{Eo.get("/menu").then(e=>a(e.data)).catch(()=>{})},[]);const u=e=>{l(null),c("/shows/".concat(e))},h=e=>{clearTimeout(d.current),l(e)},m=n.find(e=>e.name===i),p=e=>e.shows.length+e.subgroups.reduce((e,t)=>e+t.shows.length,0);return(0,_e.jsxs)("div",{className:"relative hidden md:block border-b border-white/10 bg-[#053671]/25 backdrop-blur-xl z-40",onMouseLeave:()=>{d.current=setTimeout(()=>l(null),160)},"data-testid":"mega-menu",children:[(0,_e.jsx)("div",{className:"max-w-[1400px] mx-auto px-5 sm:px-8 flex items-center justify-center gap-1 h-12 overflow-x-auto",children:n.map(e=>(0,_e.jsxs)("button",{onMouseEnter:()=>h(e.name),onClick:()=>l(i===e.name?null:e.name),className:"relative flex items-center gap-1 rounded-full px-3.5 py-1.5 text-base font-semibold whitespace-nowrap transition-colors ".concat(i===e.name?"bg-white/10 text-white":"text-slate-200 hover:text-white hover:bg-white/5"),"data-testid":"mega-menu-tab-".concat(e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")),children:[e.name,(0,_e.jsx)(mi,{size:14,className:"text-sky-400 transition-transform duration-200 ".concat(i===e.name?"rotate-180":"")}),i===e.name&&(0,_e.jsx)("span",{className:"absolute -bottom-[7px] left-1/2 -translate-x-1/2 h-1 w-8 rounded-full bg-sky-400"})]},e.name))}),m&&(0,_e.jsx)("div",{className:"absolute inset-x-0 top-full",onMouseEnter:()=>h(m.name),"data-testid":"mega-menu-panel",children:(0,_e.jsx)("div",{className:"max-w-[1400px] mx-auto px-5 sm:px-8 pb-4",children:(0,_e.jsxs)("div",{className:"relative overflow-hidden rounded-2xl card-surface grain shadow-2xl shadow-black/60 reveal",style:{animationDuration:".25s"},children:[(0,_e.jsx)("div",{className:"absolute -top-24 -right-24 h-72 w-72 rounded-full bg-[#053671] blur-3xl opacity-40 pointer-events-none"}),(0,_e.jsxs)("div",{className:"relative p-6",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,_e.jsxs)(da,{to:"/browse/".concat(m.slug),onClick:()=>l(null),className:"group/head","data-testid":"mega-menu-category-link",children:[(0,_e.jsx)("h3",{className:"font-display text-2xl font-extrabold tracking-tight group-hover/head:text-sky-400 transition-colors",children:m.name}),(0,_e.jsxs)("p",{className:"text-xs font-mono text-slate-400 mt-0.5",children:[p(m)," show",1===p(m)?"":"s"," \xb7 view category"]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,_e.jsxs)(da,{to:"/browse/".concat(m.slug),onClick:()=>l(null),className:"inline-flex items-center gap-1 rounded-full bg-sky-4
200 px-3.5 py-1.5 text-xs font-bold text-[#070F1E] hover:bg-sky-300 transition-colors","data-testid":"mega-menu-explore-button",children:["Explore ",m.name," ",(0,_e.jsx)(pi,{size:14})]}),(0,_e.jsxs)(da,{to:"/shows",onClick:()=>l(null),className:"inline-flex items-center gap-1 text-xs font-semibold text-sky-400 hover:text-sky-300","data-testid":"mega-menu-all-shows",children:["All shows ",(0,_e.jsx)(pi,{size:14})]})]})]}),0===p(m)?(0,_e.jsx)("p",{className:"text-sm text-slate-400 py-6","data-testid":"mega-menu-empty",children:"New shows coming soon."}):m.subgroups.length?(0,_e.jsxs)("div",{className:"grid gap-x-6 gap-y-5",style:{gridTemplateColumns:"repeat(".concat(Math.min(m.subgroups.filter(e=>e.shows.length).length+(m.shows.length?1:0),4),", minmax(0, 1fr))")},children:[m.subgroups.filter(e=>e.shows.length).map(e=>(0,_e.jsxs)("div",{"data-testid":"mega-menu-subgroup-".concat(e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")),children:[(0,_e.jsx)("p",{className:"eyebrow mb-2 pl-2",children:e.name}),(0,_e.jsx)("div",{className:"space-y-0.5",children:e.shows.map(e=>(0,_e.jsx)(fi,{show:e,onPick:u,testId:"mega-menu-show-".concat(e.slug)}
2,e.id))})]},e.name)),m.shows.length>0&&(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2 pl-2",children:"More"}),(0,_e.jsx)("div",{className:"space-y-0.5",children:m.shows.map(e=>(0,_e.jsx)(fi,{show:e,onPick:u,testId:"mega-menu-show-".concat(e.slug)},e.id))})]})]}):(0,_e.jsx)("div",{className:"grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-0.5",children:m.shows.map(e=>(0,_e.jsx)(fi,{show:e,onPick:u,testId:"mega-menu-show-".concat(e.slug)},e.id))})]})]})})})]})},xi=Jo("instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]),vi=Jo("facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]]),bi=[["tiktok_url","TikTok",e=>{let t=e.size,n=void 0===t?18:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-5.2 1.74 2.89 2.89 0 0 1 2.31-4.64 2.93 2.93 0 0 1 .88.13V9.4a6.84 6.84 0 0 0-1-.05A6.33 6.33 0 0 0 5 20.1a6.34 6.34 0 0 0 10.86-4.43v-7a8.16 8.16 0 0 0 4.77 1.52v-3.4a4.85 4.85 0 0 1-1-.1z"})})},"hover:text-cyan-300"],["youtube_channel","YouTube",oi,"hover:text-rose-500"],["instagram_url","Instagram",xi,"hover:text-pink-400"],["twitter_url","X / Twitter",e=>{let t=e.size,n=void 0===t?18:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},"hover:text-white"],["facebook_url","Facebook",vi,"hover:text-blue-400"],["spotify_url","Spotify",e=>{let t=e.size,n=void 0===t?18:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm5.5 17.3a.75.75 0 0 1-1.03.25c-2.82-1.72-6.37-2.11-10.55-1.16a.75.75 0 1 1-.33-1.46c4.57-1.04 8.5-.6 11.66 1.34.35.22.46.68.25 1.03zm1.47-3.27a.94.94 0 0 1-1.29.31c-3.23-1.98-8.15-2.56-11.97-1.4a.94.94 0 1 1-.54-1.8c4.36-1.32 9.78-.68 13.49 1.6.44.27.58.85.31 1.29zm.13-3.4C15.24 8.33 8.87 8.12 5.17 9.24a1.13 1.13 0 1 1-.65-2.16c4.25-1.29 11.31-1.04 15.76 1.6a1.13 1.13 0 0 1-1.18 1.95z"})})},"hover:text-green-400"],["apple_podcasts_url","Apple Podcasts",e=>{let t=e.size,n=void 0===t?18:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M12 2a10 10 0 0 0-3.5 19.37v-2.16A8 8 0 1 1 15.5 19.2v2.17A10 10 0 0 0 12 2zm0 4a6 6 0 0 0-2.5 11.46v-2.3A4 4 0 1 1 14.5 15.2v2.28A6 6 0 0 0 12 6zm0 4.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm0 4.5c-1.1 0-2 .6-2 1.35V21c0 .55.9 1 2 1s2-.45 2-1v-4.65c0-.75-.9-1.35-2-1.35z"})})},"hover:text-purple-400"]],yi=e=>{let t=e.settings,n=void 0===t?{}:t,a=e.size,s=void 0===a?18:a,r=e.className,o=void 0===r?"":r;const i=bi.filter(e=>{let t=(0,De.A)(e,1)[0];return n[t]});return i.length?(0,_e.jsx)("div",{className:"flex items-center gap-1 ".concat(o),"data-testid":"social-links",children:i.map(e=>{let t=(0,De.A)(e,4),a=t[0],r=t[1],o=t[2],i=t[3];return(0,_e.jsx)("a",{href:n[a],target:"_blank",rel:"noreferrer",title:r,"aria-label":r,className:"p-2 rounded-full text-slate-400 transition-colors duration-200 hover:bg-white/5 ".concat(i),"data-testid":"social-link-".concat(a.replace("_url","").replace("_channel","")),children:(0,_e.jsx)(o,{size:s})},a)})}):null},wi=Jo("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),ji=e=>{let t=e.className,n=void 0===t?"":t,a=e.autoFocus,r=void 0!==a&&a,o=e.testId,i=void 0===o?"search-input":o;const l=fa(),c=(0,De.A)(l,1)[0],d=(0,s.useState)(c.get("q")||""),u=(0,De.A)(d,2),h=u[0],m=u[1],p=en();return(0,_e.jsxs)("form",{onSubmit:e=>{e.preventDefault(),h.trim().length>=2&&p("/search?q=".concat(encodeURIComponent(h.trim())))},className:"relative ".concat(n),role:"search","data-testid":"search-form",children:[(0,_e.jsx)(wi,{size:16,className:"absolute left-3.5 to
2p-1/2 -translate-y-1/2 text-slate-400 pointer-events-none"}),(0,_e.jsx)("input",{value:h,onChange:e=>m(e.target.value),autoFocus:r,placeholder:"Search episodes\u2026",className:"w-full h-10 rounded-full bg-white/5 border border-white/10 pl-10 pr-4 text-sm text-white placeholder:text-slate-500 outline-none focus:border-sky-400/60 focus:bg-white/10 transition-colors","data-testid":i})]})},ki=e=>{let t=e.link,n=e.className,a=e.onClick,s=e.testId;const r="".concat(n," ").concat(t.highlight?"text-sky-400 hover:text-sky-300":"");return t.url.startsWith("/")&&!t.url.startsWith("/#")?(0,_e.jsx)(da,{to:t.url,className:r,onClick:a,"data-testid":s,children:t.label}):(0,_e.jsx)("a",(0,i.A)((0,i.A)({href:t.url,className:r,onClick:a,"data-testid":s},/^https?:/.test(t.url)?{target:"_blank",rel:"noreferrer"}:{}),{},{children:t.label}))},Ni=()=>{const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)([]),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(!1),d=(0,De.A)(c,2),u=d[0],h=d[1],m=Lo().user,p=(0,s.useContext)(Ho),f=p.theme,g=p.toggle,x=qo().settings||{},v=x.nav_links||[];(0,s.useEffect)(()=>{Eo.get("/shows").then(e=>a(e.data)).catch(()=>{}),Eo.get("/menu").then(e=>l(e.data)).catch(()=>{})},[]);const b="text-base font-semibold text-slate-300 hover:text-white transition-colors duration-200 whitespace-nowrap";return(0,_e.jsxs)("header",{className:"sticky top-0 z-50 glass border-b border-white/10","data-testid":"site-header",children:[(0,_e.jsxs)("div",{className:"max-w-[1400px] mx-auto px-5 sm:px-8 h-[72px] flex items-center justify-between gap-6",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3 group shrink-0","data-testid":"nav-logo-link",children:[(0,_e.jsx)(hi,{size:48,className:"transition-transform duration-300 group-hover:rotate-6"}),(0,_e.jsx)("span",{className:"wordmark font-display font-black text-[34px] uppercase tracking-tight hidden sm:block leading-none text-white whitespace-nowrap","data-testid":"nav-wordmark",children:"Underdog Podcasts"})]}),(0,_e.jsx)("nav",{className:"hidden md:flex items-center gap-6 shrink-0","data-testid":"nav-links",children:v.map((e,t)=>(0,_e.jsx)(ki,{link:e,className:b,testId:"nav-link-".concat(t)},"".concat(e.label,"-").concat(t)))}),(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsxs)("div",{className:"hidden sm:flex items-center gap-1",children:[(0,_e.jsx)(yi,{settings:x,size:16,className:"hidden xl:flex"}),(0,_e.jsx)(da,{to:m?"/admin":"/admin/login",title:m?"Dashboard":"Admin","aria-label":m?"Dashboard":"Admin",className:"p-2 rounded-full text-slate-400 transition-colors duration-200 hover:bg-white/5 hover:text-sky-300","data-testid":"nav-admin-link",children:(0,_e.jsx)(li,{size:16})}),(0,_e.jsx)("button",{onClick:g,title:"light"===f?"Switch to dark mode":"Switch to light mode","aria-label":"Toggle light/dark mode",className:"p-2 rounded-full text-slate-400 transition-colors duration-200 hover:bg-white/5 hover:text-sky-300","data-testid":"theme-toggle",children:"light"===f?(0,_e.jsx)(ci,{size:16}):(0,_e.jsx)(di,{size:16})})]}),(0,_e.jsx)("button",{className:"md:hidden p-2 text-slate-200",onClick:()=>h(!u),"data-testid":"nav-mobile-toggle","aria-label":"Menu",children:u?(0,_e.jsx)(ai,{size:22}):(0,_e.jsx)(ui,{size:22})})]})]}),u&&(0,_e.jsxs)("div",{className:"md:hidden border-t border-white/10 glass px-5 py-4 space-y-3 max-h-[70vh] overflow-y-auto","data-testid":"nav-mobile-menu",children:[(0,_e.jsx)(ji,{testId:"mobile-search-input"}),(0,_e.jsx)("p",{className:"eyebrow",children:"Our Shows"}),(0,_e.jsx)("div",{className:"flex flex-wrap gap-2 pb-2","data-testid":"mobile-category-links",children:i.map(e=>(0,_e.jsx)(da,{to:"/browse/".concat(e.slug),onClick:()=>h(!1),className:"rounded-full border border-white/15 px-3 py-1 text-xs font-semibold text-slate-200","data-testid":"mobile-category-".concat(e.slug),children:e.name},e.slug))}),(0,_e.jsx)("div",{className:"grid grid-cols-1 gap-1",children:n.map(e=>(0,_e.jsx)(da,{to:"/shows/".concat(e.slug),onClick:()=>h(!1),className:"text-sm py-1.5 text-slate-200","data-testid":"mobile-show-link-".concat(e.slug),children:e.name},e.id))}),(0,_e.jsxs)("div",{className:"flex flex-wrap gap-5 pt-2 border-t border-white/10","data-testid":"mobile-nav-links",children:[v.map((e,t)=>(0,_e.jsx)(ki,{link:e,className:b,onClick:()=>h(!1),testId:"mobile-nav-link-".concat(t)},"".concat(e.label,"-").concat(t))),(0,_e.jsx)(da,{to:"/admin/login",className:b,onClick:()=>h(!1),children:"Admin"}),(0,_e.jsx)("button",{onClick:g,className:"".concat(b," inline-flex items-center gap-1.5"),"data-testid":"mobile-theme-toggle",children:"light"===f?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ci,{size:14})," Dark"]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(di,{size:14})," Light"]})})]}),(0,_e.jsx)(yi,{settings:x,className:"pt-2 border-t border-white/10"})]}),(0,_e.jsx)(gi,{})]})},Si="hover:text-white transition-colors",Ai=()=>{const e=qo().settings;return(0,_e.jsx)("footer",{className:"border-t border-white/10 bg-[#050B17]","data-testid":"site-footer",children:(0,_e.jsxs)("div",{className:"max-w-[1400px] mx-auto px-5 sm:px-8 pt-6 pb-5 space-y-4",children:[(0,_e.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1.5",children:"Looking for something?"}),(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"Search every episode across the network."})]}),(0,_e.jsx)(ji,{className:"w-full md:w-[420px]",testId:"footer-search-input"})]}),(0,_e.jsxs)("div",{className:"border-t border-white/10 pt-4 flex flex-col md:flex-row items-center justify-between gap-4",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-2.5 shrink-0","data-testid":"footer-logo-link",children:[(0,_e.jsx)(hi,{size:28}),(0,_e.jsx)("span",{className:"font-display font-black text-base uppercase tracking-tight text-white",children:"Underdog Podcasts"})]}),(0,_e.jsxs)("nav",{className:"flex flex-wrap items-center justify-center gap-x-5 gap-y-1.5 text-sm text-slate-400","data-testid":"footer-links",children:[(0,_e.jsx)(da,{to:"/shows",className:Si,"data-testid":"footer-shows-link",children:"All Shows"}),(0,_e.jsx)("a",{href:"/#videos",className:Si,children:"Videos"}),(0,_e.jsx)(da,{to:"/hosts",className:Si,"data-testid":"footer-hosts-link",children:"Hosts"}),(0,_e.jsx)(da,{to:"/search",className:Si,"data-testid":"footer-search-link",children:"Search"}),(0,_e.jsx)(da,{to:"/join",className:"".concat(Si," text-sky-400"),"data-testid":"footer-join-link",children:"Join The Underdog"}),(0,_e.jsx)(da,{to:"/advertise",className:Si,"data-testid":"footer-advertise-link",children:"Advertise"}),(0,_e.jsx)(da,{to:"/contact",className:Si,"data-testid":"footer-contact-link",children:"Contact"}),(0,_e.jsx)(da,{to:"/privacy",className:Si,"data-testid":"footer-privacy-link",children:"Privacy"}),(0,_e.jsx)(da,{to:"/admin/login",className:Si,"data-testid":"footer-admin-link",children:"Admin"})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-4 shrink-0",children:[(0,_e.jsx)(yi,{settings:e||{},size:15,className:"flex"}),(0,_e.jsxs)("p",{className:"font-mono text-[11px] text-slate-500 
2whitespace-nowrap","data-testid":"footer-copyright",children:["\xa9 ",(new Date).getFullYear()," Underdog Podcasts"]})]})]})]})})},_i=Jo("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Ci=e=>{let t=e.episode,n=e.size,a=void 0===n?"md":n,s=e.variant,r=void 0===s?"round":s,o=e.testId;const i=Uo(),l=i.play,c=(0,i.isPlaying)(t.id),d=!!t.video_id&&!t.audio_url,u=e=>{e.preventDefault(),e.stopPropagation(),l(t)};if("wide"===r)return(0,_e.jsxs)("button",{onClick:u,disabled:!t.audio_url&&!t.video_id,className:"w-full h-6 rounded-md flex items-center justify-center gap-1.5 text-[11px] font-semibold tracking-wide transition-colors duration-200 disabled:opacity-40 border ".concat(c?"bg-sky-400/15 border-sky-400/40 text-sky-300":"bg-white/[0.04] border-white/10 text-slate-300 hover:bg-white/10 hover:text-white hover:border-white/20"),"data-testid":o,"aria-label":c?"Pause episode":"Play episode",children:[c?(0,_e.jsx)(ei,{size:11,fill:"currentColor"}):(0,_e.jsx)(ti,{size:11,fill:"currentColor"}),c?"Pause":d?"Watch":"Play"]});const h="lg"===a?"h-14 w-14":"sm"===a?"h-9 w-9":"h-11 w-11",m="lg"===a?24:"sm"===a?14:18;return(0,_e.jsx)("button",{onClick:u,disabled:!t.audio_url&&!t.video_id,className:"".concat(h," rounded-full flex items-center justify-center shrink-0 transition-transform duration-200 hover:scale-110 disabled:opacity-40 ").concat(c?"bg-amber-400 text-[#070F1E]":"bg-sky-400 text-[#070F1E]"),"data-testid":o,"aria-label":c?"Pause episode":"Play episode",children:c?(0,_e.jsx)(ei,{size:m,fill:"currentColor"}):(0,_e.jsx)(ti,{size:m,fill:"currentColor",className:"ml-0.5"})})},Ei=Jo("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),Pi=Jo("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),Mi=Jo("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ri=Jo("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),Oi=e=>{let t=e.size,n=void 0===t?16:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},zi=e=>{var t;let n=e.episode,a=e.size,r=void 0===a?"md":a,o=e.className,i=void 0===o?"":o,l=e.testId,c=void 0===l?"share-button":l;const d=(0,s.useState)(!1),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(!1),f=(0,De.A)(p,2),g=f[0],x=f[1],v=(0,s.useState)({top:0,left:0,up:!1}),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useRef)(null),k=(0,s.useRef)(null),N=(0,s.useRef)(null),S=(e=>"".concat("https://underdogpodcasts.com","/api/share/episodes/").concat(e.id))(n),A="".concat(n.title).concat(null!==(t=n.show)&&void 0!==t&&t.name?" \u2014 ".concat(n.show.name):"");(0,s.useEffect)(()=>{if(!h)return;const e=e=>{var t,n;null!==(t=j.current)&&void 0!==t&&t.contains(e.target)||null!==(n=N.current)&&void 0!==n&&n.contains(e.target)||m(!1)},t=()=>m(!1);return document.addEventListener("mousedown",e),window.addEventListener("scroll",t,{passive:!0}),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("scroll",t)}},[h]);const _=encodeURIComponent,C=[["X / Twitter",Oi,"https://twitter.com/intent/tweet?text=".concat(_(A),"&url=").concat(_(S))],["Facebook",vi,"https://www.facebook.com/sharer/sharer.php?u=".concat(_(S))],["Email",Ei,"mailto:?subject=".concat(_(A),"&body=").concat(_("".concat(A,"\n\n").concat(S)))]],E="lg"===r?"h-14 px-5 gap-2 text-sm":"h-9 px-3 gap-1.5 text-xs";return(0,_e.jsxs)("div",{className:"relative inline-block",ref:j,onClick:e=>e.stopPropagation(),children:[(0,_e.jsxs)("button",{ref:k,onClick:async e=>{if(e.preventDefault(),e.stopPropagation(),navigator.share&&/Mobi|Android/i.test(navigator.userAgent))try{return void await navigator.share({title:n.title,text:A,url:S})}catch(t){}
2h?m(!1):(()=>{const e=k.current.getBoundingClientRect(),t=window.innerHeight-e.bottom<220;w({top:t?e.top-8:e.bottom+8,left:Math.min(e.left,window.innerWidth-240),up:t}),m(!0)})()},className:"".concat(E," inline-flex items-center rounded-full border border-white/15 bg-white/5 font-semibold text-slate-200 hover:bg-white/10 hover:text-white transition-colors ").concat(i),"aria-label":"Share episode","data-testid":c,children:[(0,_e.jsx)(Pi,{size:"lg"===r?18:14})," Share"]}),h&&(0,ja.createPortal)((0,_e.jsxs)("div",{ref:N,className:"fixed z-[80] w-56 rounded-xl border border-white/10 bg-[#0F1C33] shadow-2xl p-1.5 on-dark",style:{top:y.up?void 0:y.top,bottom:y.up?window.innerHeight-y.top:void 0,left:y.left},"data-testid":"".concat(c,"-menu"),children:[(0,_e.jsxs)("button",{onClick:async()=>{try{var e;if(null!==(e=navigator.clipboard)&&void 0!==e&&e.writeText)await navigator.clipboard.writeText(S);else{const e=document.createElement("textarea");e.value=S,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();const t=document.execCommand("copy");if(document.body.removeChild(e),!t)throw new Error("copy failed")}x(!0),Ta.success("Link copied"),setTimeout(()=>x(!1),1500)}catch(t){window.prompt("Copy this link:",S)}},className:"w-full flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm text-slate-200 hover:bg-white/10 hover:text-white","data-testid":"".concat(c,"-copy"),children:[g?(0,_e.jsx)(Mi,{size:15,className:"text-emerald-400"}):(0,_e.jsx)(Ri,{size:15})," Copy link"]}),C.map(e=>{let t=(0,De.A)(e,3),n=t[0],a=t[1],s=t[2];return(0,_e.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",onClick:()=>m(!1),className:"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm text-slate-200 hover:bg-white/10 hover:text-white","data-testid":"".concat(c,"-").concat(n.split(" ")[0].toLowerCase()),children:[(0,_e.jsx)(a,{size:15})," ",n]},n)})]}),document.body)]})},Ti=e=>{let t=e.size,n=void 0===t?16:t;return(0,_e.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm5.5 17.3a.75.75 0 0 1-1.03.25c-2.82-1.72-6.37-2.11-10.55-1.16a.75.75 0 1 1-.33-1.46c4.57-1.05 8.5-.6 11.66 1.33.35.22.46.68.25 1.04zm1.47-3.27a.94.94 0 0 1-1.29.31c-3.23-1.98-8.15-2.56-11.97-1.4a.94.94 0 1 1-.54-1.8c4.36-1.32 9.79-.68 13.5 1.6.44.27.58.85.3 1.29zm.13-3.4C15.24 8.33 8.9 8.12 5.2 9.24a1.13 1.13 0 1 1-.65-2.16c4.24-1.29 11.3-1.04 15.75 1.6a1.13 1.13 0 0 1-1.15 1.94z"})})},Di=new Map,Li=e=>{var t;return"https://open.spotify.com/search/".concat(encodeURIComponent("".concat(e.title," ").concat((null===(t=e.show)||void 0===t?void 0:t.name)||"").trim().slice(0,150)),"/episodes")},Fi=e=>{let t=e.episode,n=e.size,a=void 0===n?"md":n,r=e.testId,o=void 0===r?"spotify-button":r;const i=(0,s.useState)(()=>Di.get(t.id)||{url:t.spotify_url||Li(t),exact:!!t.spotify_url}),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useRef)(!1),h=(0,s.useRef)(null);if((0,s.useEffect)(()=>{if(c.exact||Di.has(t.id)||t.video_id)return;const e=h.current;if(!e)return;const n=new IntersectionObserver(e=>{(0,De.A)(e,1)[0].isIntersecting&&!u.current&&(u.current=!0,Eo.get("/episodes/".concat(t.id,"/spotify")).then(e=>{const n={url:e.data.spotify_url||e.data.fallback_url,exact:e.data.exact};Di.set(t.id,n),d(n)}).catch(()=>{}))},{rootMargin:"200px"});return n.observe(e),()=>n.disconnect()},[t.id,t.video_id,c.exact]),t.video_id&&!t.audio_url)return null;const m="lg"===a?"h-14 px-5 gap-2 text-sm":"h-9 px-3 gap-1.5 text-xs";return(0,_e.jsxs)("a",{ref:h,href:c.url,target:"_blank",rel:"noreferrer",onClick:e=>e.stopPropagation(),title:c.exact?"Listen on Spotify":"Find this episode on Spotify",className:"".concat(m," inline-flex items-center rounded-full border border-[#1DB954]/40 bg-[#1DB954]/10 font-semibold text-[#1ed760] hover:bg-[#1DB954] hover:text-[#071a0e] transition-colors"),"aria-label":"Listen on Spotify","data-testid":o,"data-exact":c.exact,children:[(0,_e.jsx)(Ti,{size:"lg"===a?18:14})," Spotify"]})};function Ii(e,t){let n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).checkForDefaultPrevented,a=void 0===n||n;return function(n){if(null===e||void 0===e||e(n),!1===a||!n.defaultPrevented)return null===t||void 0===t?void 0:t(n)}}function Ui(e,t){if("function"===typeof e)return e(t);null!==e&&void 0!==e&&(e.current=t)}function Bi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1;const a=t.map(t=>{const a=Ui(t,e);return n||"function"!=typeof a||(n=!0),a});if(n)return()=>{for(let e=0;e<a.length;e++){const n=a[e];"function"==typeof n?n():Ui(t[e],null)}}}}function Wi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.useCallback(Bi(...t),t)}const qi=["children"],Hi=["scope","children"];function Vi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];const a=()=>{const t=n.map(e=>s.createContext(e));return function(n){const a=(null===n||void 0===n?void 0:n[e])||t;return s.useMemo(()=>
2({["__scope".concat(e)]:(0,i.A)((0,i.A)({},n),{},{[e]:a})}),[n,a])}};return a.scopeName=e,[function(t,a){const r=s.createContext(a),o=n.length;n=[...n,a];const i=t=>{var n;const a=t.scope,i=t.children,l=(0,Pe.A)(t,Hi),c=(null===a||void 0===a||null===(n=a[e])||void 0===n?void 0:n[o])||r,d=s.useMemo(()=>l,Object.values(l));return(0,_e.jsx)(c.Provider,{value:d,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var l;const c=(null===i||void 0===i||null===(l=i[e])||void 0===l?void 0:l[o])||r,d=s.useContext(c);if(d)return d;if(void 0!==a)return a;throw new Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},Yi(a,...t)]}function Yi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const a=t[0];if(1===t.length)return a;const r=()=>{const e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const n=e.reduce((e,n)=>{let a=n.useScope,s=n.scopeName;const r=a(t)["__scope".concat(s)];return(0,i.A)((0,i.A)({},e),r)},{});return s.useMemo(()=>({["__scope".concat(a.scopeName)]:n}),[n])}};return r.scopeName=a.scopeName,r}var $i=null!==globalThis&&void 0!==globalThis&&globalThis.document?s.useLayoutEffect:()=>{},Qi=r[" useId ".trim().toString()]||(()=>{}),Ki=0;function Gi(e){const t=s.useState(Qi()),n=(0,De.A)(t,2),a=n[0],r=n[1];return $i(()=>{e||r(e=>null!==e&&void 0!==e?e:String(Ki++))},[e]),e||(a?"radix-".concat(a):"")}var Xi=r[" useInsertionEffect ".trim().toString()]||$i;function Ji(e){let t=e.prop,n=e.defaultProp,a=e.onChange,r=void 0===a?()=>{}:a,o=e.caller;const i=function(e){let t=e.defaultProp,n=e.onChange;const a=s.useState(t),r=(0,De.A)(a,2),o=r[0],i=r[1],l=s.useRef(o),c=s.useRef(n);return Xi(()=>{c.current=n},[n]),s.useEffect(()=>{var e;l.current!==o&&(null===(e=c.current)||void 0===e||e.call(c,o),l.current=o)},[o,l]),[o,i,c]}({defaultProp:n,onChange:r}),l=(0,De.A)(i,3),c=l[0],d=l[1],u=l[2],h=void 0!==t,m=h?t:c;{const e=s.useRef(void 0!==t);s.useEffect(()=>{const t=e.current;if(t!==h){const e=t?"controlled":"uncontrolled",n=h?"controlled":"uncontrolled";console.warn("".concat(o," is changing from ").concat(e," to ").concat(n,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=h},[h,o])}const p=s.useCallback(e=>{if(h){const a=function(e){return"function"===typeof e}(e)?e(t):e;var n;if(a!==t)null===(n=u.current)||void 0===n||n.call(u,a)}else d(e)},[h,t,d,u]);return[m,p]}Symbol("RADIX:SYNC_STATE");const Zi=["children"],el=["children"];function tl(e){const t=al(e),n=s.forwardRef((e,n)=>{const a=e.children,r=(0,Pe.A)(e,Zi),o=s.Children.toArray(a),l=o.find(ol);if(l){const e=l.props.children,a=o.map(t=>t===l?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return(0,_e.jsx)(t,(0,i.A)((0,i.A)({},r),{},{ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,a):null}))}return(0,_e.jsx)(t,(0,i.A)((0,i.A)({},r),{},{ref:n,children:a}))});return n.displayName="".concat(e,".Slot"),n}var nl=tl("Slot");function al(e){const t=s.forwardRef((e,t)=>{const n=e.children,a=(0,Pe.A)(e,el);if(s.isValidElement(n)){const e=function(e){var t,n;let a=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,s=a&&"isReactWarning"in a&&a.isReactWarning;if(s)return e.ref;if(a=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,s=a&&"isReactWarning"in a&&a.isReactWarning,s)return e.props.ref;return e.props.ref||e.ref}(n),r=function(e,t){const n=(0,i.A)({},t);for(const a in t){const s=e[a],r=t[a];/^on[A-Z]/.test(a)?s&&r?n[a]=function(){r(...arguments),s(...arguments)}:s&&(n[a]=s):"style"===a?n[a]=(0,i.A)((0,i.A)({},s),r):"className"===a&&(n[a]=[s,r].filter(Boolean).join(" "))}return(0,i.A)((0,i.A)({},e),n)}(a,n.props);return n.type!==s.Fragment&&(r.ref=t?Bi(t,e):e),s.cloneElement(n,r)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var sl=Symbol("radix.slottable");function rl(e){const t=e=>{let t=e.children;return(0,_e.jsx)(_e.Fragment,{children:t})};return t.displayName="".concat(e,".Slottable"),t.__radixId=sl,t}function ol(e){return s.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===sl}const il=["asChild"];var ll=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>
2{const n=tl("Primitive.".concat(t)),a=s.forwardRef((e,a)=>{const s=e.asChild,r=(0,Pe.A)(e,il),o=s?n:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,_e.jsx)(o,(0,i.A)((0,i.A)({},r),{},{ref:a}))});return a.displayName="Primitive.".concat(t),(0,i.A)((0,i.A)({},e),{},{[t]:a})},{});function cl(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>function(){for(var e,n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return null===(e=t.current)||void 0===e?void 0:e.call(t,...a)},[])}const dl=["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"];var ul,hl="dismissableLayer.update",ml="dismissableLayer.pointerDownOutside",pl="dismissableLayer.focusOutside",fl=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gl=s.forwardRef((e,t)=>{var n;const a=e.disableOutsidePointerEvents,r=void 0!==a&&a,o=e.onEscapeKeyDown,l=e.onPointerDownOutside,c=e.onFocusOutside,d=e.onInteractOutside,u=e.onDismiss,h=(0,Pe.A)(e,dl),m=s.useContext(fl),p=s.useState(null),f=(0,De.A)(p,2),g=f[0],x=f[1],v=null!==(n=null===g||void 0===g?void 0:g.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,b=s.useState({}),y=(0,De.A)(b,2)[1],w=Wi(t,e=>x(e)),j=Array.from(m.layers),k=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=(0,De.A)(k,1)[0],S=j.indexOf(N),A=g?j.indexOf(g):-1,_=m.layersWithOutsidePointerEventsDisabled.size>0,C=A>=S,E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=cl(e),a=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const e=e=>{if(e.target&&!a.current){let a=function(){bl(ml,n,s,{discrete:!0})};const s={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",r.current),r.current=a,t.addEventListener("click",r.current,{once:!0})):a()}else t.removeEventListener("click",r.current);a.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",e),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}(e=>{const t=e.target,n=[...m.branches].some(e=>e.contains(t));C&&!n&&(null===l||void 0===l||l(e),null===d||void 0===d||d(e),e.defaultPrevented||null===u||void 0===u||u())},v),P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=cl(e),a=s.useRef(!1);return s.useEffect(()=>{const e=e=>{if(e.target&&!a.current){bl(pl,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}(e=>{const t=e.target;[...m.branches].some(e=>e.contains(t))||(null===c||void 0===c||c(e),null===d||void 0===d||d(e),e.defaultPrevented||null===u||void 0===u||u())},v);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=cl(e);s.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{A===m.layers.size-1&&(null===o||void 0===o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},v),s.useEffect(()=>{if(g)return r&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(ul=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),vl(),()=>{r&&1===m.layersWithOutsidePointerEventsDisabled.size&&(v.body.style.pointerEvents=ul)}},[g,v,r,m]),s.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),vl())},[g,m]),s.useEffect(()=>{const e=()=>y({});return document.addEventListener(hl,e),()=>document.removeEventListener(hl,e)},[]),(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({},h),{},{ref:w,style:(0,i.A)({pointerEvents:_?C?"auto":"none":void 0},e.style),onFocusCapture:Ii(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Ii(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ii(e.onPointerDownCapture,E.onPointerDownCapture)}))});gl.displayName="DismissableLayer";var xl=s.forwardRef((e,t)=>
2{const n=s.useContext(fl),a=s.useRef(null),r=Wi(t,a);return s.useEffect(()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({},e),{},{ref:r}))});function vl(){const e=new CustomEvent(hl);document.dispatchEvent(e)}function bl(e,t,n,a){let s=a.discrete;const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),s?function(e,t){e&&ja.flushSync(()=>e.dispatchEvent(t))}(r,o):r.dispatchEvent(o)}xl.displayName="DismissableLayerBranch";const yl=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"];var wl="focusScope.autoFocusOnMount",jl="focusScope.autoFocusOnUnmount",kl={bubbles:!1,cancelable:!0},Nl=s.forwardRef((e,t)=>{const n=e.loop,a=void 0!==n&&n,r=e.trapped,o=void 0!==r&&r,l=e.onMountAutoFocus,c=e.onUnmountAutoFocus,d=(0,Pe.A)(e,yl),u=s.useState(null),h=(0,De.A)(u,2),m=h[0],p=h[1],f=cl(l),g=cl(c),x=s.useRef(null),v=Wi(t,e=>p(e)),b=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let e=function(e){if(b.paused||!m)return;const t=e.target;m.contains(t)?x.current=t:Cl(x.current,{select:!0})},t=function(e){if(b.paused||!m)return;const t=e.relatedTarget;null!==t&&(m.contains(t)||Cl(x.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Cl(m)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const a=new MutationObserver(n);return m&&a.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),a.disconnect()}}},[o,m,b.paused]),s.useEffect(()=>{if(m){El.add(b);const t=document.activeElement;if(!m.contains(t)){const n=new CustomEvent(wl,kl);m.addEventListener(wl,f),m.dispatchEvent(n),n.defaultPrevented||(!function(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).select,n=void 0!==t&&t;const a=document.activeElement;for(const s of e)if(Cl(s,{select:n}),document.activeElement!==a)return}((e=Sl(m),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Cl(m))}return()=>{m.removeEventListener(wl,f),setTimeout(()=>{const e=new CustomEvent(jl,kl);m.addEventListener(jl,g),m.dispatchEvent(e),e.defaultPrevented||Cl(null!==t&&void 0!==t?t:document.body,{select:!0}),m.removeEventListener(jl,g),El.remove(b)},0)}}var e},[m,f,g,b]);const y=s.useCallback(e=>{if(!a&&!o)return;if(b.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,s=function(e){const t=Sl(e),n=Al(t,e),a=Al(t.reverse(),e);return[n,a]}(t),r=(0,De.A)(s,2),o=r[0],i=r[1];o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),a&&Cl(i,{select:!0})):(e.preventDefault(),a&&Cl(o,{select:!0})):n===t&&e.preventDefault()}},[a,o,b.paused]);return(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({tabIndex:-1},d),{},{ref:v,onKeyDown:y}))});function Sl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Al(e,t){for(const n of e)if(!_l(n,{upTo:t}))return n}function _l(e,t){let n=t.upTo;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Cl(e){let t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).select,n=void 0!==t&&t;if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&n&&e.select()}}Nl.displayName="FocusScope";var El=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null===n||void 0===n||n.pause()),e=Pl(e,t),e.unshift(t)},remove(t){var n;e=Pl(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Pl(e,t){const n=[...e],a=n.indexOf(t);return-1!==a&&n.splice(a,1),n}const Ml=["container"];var Rl=s.forwardRef((e,t)=>
2{var n;const a=e.container,r=(0,Pe.A)(e,Ml),o=s.useState(!1),l=(0,De.A)(o,2),c=l[0],d=l[1];$i(()=>d(!0),[]);const u=a||c&&(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body);return u?ja.createPortal((0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({},r),{},{ref:t})),u):null});Rl.displayName="Portal";var Ol=e=>{const t=e.present,n=e.children,a=function(e){const t=s.useState(),n=(0,De.A)(t,2),a=n[0],r=n[1],o=s.useRef(null),i=s.useRef(e),l=s.useRef("none"),c=e?"mounted":"unmounted",d=function(e,t){return s.useReducer((e,n)=>{const a=t[e][n];return null!==a&&void 0!==a?a:e},e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=(0,De.A)(d,2),h=u[0],m=u[1];return s.useEffect(()=>{const e=zl(o.current);l.current="mounted"===h?e:"none"},[h]),$i(()=>{const t=o.current,n=i.current;if(n!==e){const a=l.current,s=zl(t);if(e)m("MOUNT");else if("none"===s||"none"===(null===t||void 0===t?void 0:t.display))m("UNMOUNT");else{m(n&&a!==s?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,m]),$i(()=>{if(a){var e;let t;const n=null!==(e=a.ownerDocument.defaultView)&&void 0!==e?e:window,s=e=>{const s=zl(o.current).includes(e.animationName);if(e.target===a&&s&&(m("ANIMATION_END"),!i.current)){const e=a.style.animationFillMode;a.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===a.style.animationFillMode&&(a.style.animationFillMode=e)})}},r=e=>{e.target===a&&(l.current=zl(o.current))};return a.addEventListener("animationstart",r),a.addEventListener("animationcancel",s),a.addEventListener("animationend",s),()=>{n.clearTimeout(t),a.removeEventListener("animationstart",r),a.removeEventListener("animationcancel",s),a.removeEventListener("animationend",s)}}m("ANIMATION_END")},[a,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:s.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(t),r="function"===typeof n?n({present:a.isPresent}):s.Children.only(n),o=Wi(a.ref,function(e){var t,n;let a=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,s=a&&"isReactWarning"in a&&a.isReactWarning;if(s)return e.ref;if(a=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,s=a&&"isReactWarning"in a&&a.isReactWarning,s)return e.props.ref;return e.props.ref||e.ref}(r));return"function"===typeof n||a.isPresent?s.cloneElement(r,{ref:o}):null};function zl(e){return(null===e||void 0===e?void 0:e.animationName)||"none"}Ol.displayName="Presence";var Tl=0;function Dl(){s.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:Ll()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:Ll()),Tl++,()=>{1===Tl&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Tl--}},[])}function Ll(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Fl=function(){return Fl=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Fl.apply(this,arguments)};function Il(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(n[a[s]]=e[a[s]])}return n}Object.create;function Ul(e,t,n){if(n||2===arguments.length)for(var a,s=0,r=t.length;s<r;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))}Object.create;var Bl="right-scroll-bar-position",Wl="width-before-scroll-bar";function ql(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}var Hl="undefined"!==typeof window?s.useLayoutEffect:s.useEffect,Vl=new WeakMap;
vendor: 4,479 bytes, line 2
2function Yl(e,t){var n=function(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(t||null,function(t){return e.forEach(function(e){return ql(e,t)})});return Hl(function(){var t=Vl.get(n);if(t){var a=new Set(t),s=new Set(e),r=n.current;a.forEach(function(e){s.has(e)||ql(e,null)}),s.forEach(function(e){a.has(e)||ql(e,r)})}Vl.set(n,e)},[e]),n}function $l(e){return e}function Ql(e,t){void 0===t&&(t=$l);var n=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var s=t(e,a);return n.push(s),function(){n=n.filter(function(e){return e!==s})}},assignSyncMedium:function(e){for(a=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){a=!0;var t=[];if(n.length){var s=n;n=[],s.forEach(e),t=n}var r=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(r)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}};return s}var Kl=function(e){void 0===e&&(e={});var t=Ql(null);return t.options=Fl({async:!0,ssr:!1},e),t}(),Gl=function(){},Xl=s.forwardRef(function(e,t){var n=s.useRef(null),a=s.useState({onScrollCapture:Gl,onWheelCapture:Gl,onTouchMoveCapture:Gl}),r=a[0],o=a[1],i=e.forwardProps,l=e.children,c=e.className,d=e.removeScrollBar,u=e.enabled,h=e.shards,m=e.sideCar,p=e.noRelative,f=e.noIsolation,g=e.inert,x=e.allowPinchZoom,v=e.as,b=void 0===v?"div":v,y=e.gapMode,w=Il(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=m,k=Yl([n,t]),N=Fl(Fl({},w),r);return s.createElement(s.Fragment,null,u&&s.createElement(j,{sideCar:Kl,removeScrollBar:d,shards:h,noRelative:p,noIsolation:f,inert:g,setCallbacks:o,allowPinchZoom:!!x,lockRef:n,gapMode:y}),i?s.cloneElement(s.Children.only(l),Fl(Fl({},N),{ref:k})):s.createElement(b,Fl({},N,{className:c,ref:k}),l))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xl.classNames={fullWidth:Wl,zeroRight:Bl};var Jl,Zl=function(e){var t=e.sideCar,n=Il(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return s.createElement(a,Fl({},n))};Zl.isSideCarExport=!0;function ec(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jl||n.nc;return t&&e.setAttribute("nonce",t),e}var tc=function(){var e=0,t=null;return{add:function(n){var a,s;0==e&&(t=ec())&&(s=n,(a=t).styleSheet?a.styleSheet.cssText=s:a.appendChild(document.createTextNode(s)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nc=function(){var e=function(){var e=tc();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}}();return function(t){var n=t.styles,a=t.dynamic;return e(n,a),null}},ac={left:0,top:0,right:0,gap:0},sc=function(e){return parseInt(e||"",10)||0},rc=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return ac;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],a=t["padding"===e?"paddingTop":"marginTop"],s=t["padding"===e?"paddingRight":"marginRight"];return[sc(n),sc(a),sc(s)]}(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},oc=nc(),ic="data-scroll-locked",lc=function(e,t,n,a){var s=e.left,r=e.top,o=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(a,";\n   padding-right: ").concat(i,"px ").concat(a,";\n  }\n  body[").concat(ic,"] {\n    overflow: hidden ").concat(a,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(a,";"),"margin"===n&&"\n    padding-left: ".concat(s,"px;\n    padding-top: ").concat(r,"px;\n    padding-right: ").concat(o,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(i,"px ").concat(a,";\n    "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(a,";
2")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(Bl," {\n    right: ").concat(i,"px ").concat(a,";\n  }\n  \n  .").concat(Wl," {\n    margin-right: ").concat(i,"px ").concat(a,";\n  }\n  \n  .").concat(Bl," .").concat(Bl," {\n    right: 0 ").concat(a,";\n  }\n  \n  .").concat(Wl," .").concat(Wl," {\n    margin-right: 0 ").concat(a,";\n  }\n  \n  body[").concat(ic,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n  }\n")},cc=function(){var e=parseInt(document.body.getAttribute(ic)||"0",10);return isFinite(e)?e:0},dc=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,r=void 0===a?"margin":a;s.useEffect(function(){return document.body.setAttribute(ic,(cc()+1).toString()),function(){var e=cc()-1;e<=0?document.body.removeAttribute(ic):document.body.setAttribute(ic,e.toString())}},[]);var o=s.useMemo(function(){return rc(r)},[r]);return s.createElement(oc,{styles:lc(o,!t,r,n?"":"!important")})},uc=!1;if("undefined"!==typeof window)try{var hc=Object.defineProperty({},"passive",{get:function(){return uc=!0,!0}});window.addEventListener("test",hc,hc),window.removeEventListener("test",hc,hc)}catch(cS){uc=!1}var mc=!!uc&&{passive:!1},pc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},fc=function(e,t){var n=t.ownerDocument,a=t;do{if("undefined"!==typeof ShadowRoot&&a instanceof ShadowRoot&&(a=a.host),gc(e,a)){var s=xc(e,a);if(s[1]>s[2])return!0}a=a.parentNode}while(a&&a!==n.body);return!1},gc=function(e,t){return"v"===e?function(e){return pc(e,"overflowY")}(t):function(e){return pc(e,"overflowX")}(t)},xc=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},vc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bc=function(e){return[e.deltaX,e.deltaY]},yc=function(e){return e&&"current"in e?e.current:e},wc=function(e){return"\n  .block-interactivity-".concat(e," {pointer-events: none;}\n  .allow-interactivity-").concat(e," {pointer-events: all;}\n")},jc=0,kc=[];function Nc(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Sc=(Ac=function(e){var t=s.useRef([]),n=s.useRef([0,0]),a=s.useRef(),r=s.useState(jc++)[0],o=s.useState(nc)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var t=Ul([e.lockRef.current],(e.shards||[]).map(yc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var s,r=vc(e),o=n.current,l="deltaX"in e?e.deltaX:o[0]-r[0],c="deltaY"in e?e.deltaY:o[1]-r[1],d=e.target,u=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var h=window.getSelection(),m=h&&h.anchorNode;if(m&&(m===d||m.contains(d)))return!1;var p=fc(u,d);if(!p)return!0;if(p?s=u:(s="v"===u?"h":"v",p=fc(u,d)),!p)return!1;if(!a.current&&"changedTouches"in e&&(l||c)&&(a.current=s),!s)return!0;var f=a.current||s;return function(e,t,n,a,s){var r=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=r*a,i=n.target,l=t.contains(i),c=!1,d=o>0,u=0,h=0;do{if(!i)break;var m=xc(e,i),p=m[0],f=m[1]-m[2]-r*p;(p||f)&&gc(e,i)&&(u+=f,h+=p);var g=i.parentNode;i=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(d&&(s&&Math.abs(u)<1||!s&&o>u)||!d&&(s&&Math.abs(h)<1||!s&&-o>h))&&(c=!0),c}(f,t,e,"h"===f?l:c,!0)},[]),c=s.useCallback(function(e){var n=e;if(kc.length&&kc[kc.length-1]===o){var a="deltaY"in n?bc(n):vc(n),s=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,a)})[0];if(s&&s.should)n.cancelable&&n.preventDefault();
2else if(!s){var r=(i.current.shards||[]).map(yc).filter(Boolean).filter(function(e){return e.contains(n.target)});(r.length>0?l(n,r[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),d=s.useCallback(function(e,n,a,s){var r={name:e,delta:n,target:a,should:s,shadowParent:Nc(a)};t.current.push(r),setTimeout(function(){t.current=t.current.filter(function(e){return e!==r})},1)},[]),u=s.useCallback(function(e){n.current=vc(e),a.current=void 0},[]),h=s.useCallback(function(t){d(t.type,bc(t),t.target,l(t,e.lockRef.current))},[]),m=s.useCallback(function(t){d(t.type,vc(t),t.target,l(t,e.lockRef.current))},[]);s.useEffect(function(){return kc.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,mc),document.addEventListener("touchmove",c,mc),document.addEventListener("touchstart",u,mc),function(){kc=kc.filter(function(e){return e!==o}),document.removeEventListener("wheel",c,mc),document.removeEventListener("touchmove",c,mc),document.removeEventListener("touchstart",u,mc)}},[]);var p=e.removeScrollBar,f=e.inert;return s.createElement(s.Fragment,null,f?s.createElement(o,{styles:wc(r)}):null,p?s.createElement(dc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Kl.useMedium(Ac),Zl);var Ac,_c=s.forwardRef(function(e,t){return s.createElement(Xl,Fl({},e,{ref:t,sideCar:Sc}))});_c.classNames=Xl.classNames;const Cc=_c;var Ec=function(e){return"undefined"===typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Pc=new WeakMap,Mc=new WeakMap,Rc={},Oc=0,zc=function(e){return e&&(e.host||zc(e.parentNode))},Tc=function(e,t,n,a){var s=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=zc(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Rc[n]||(Rc[n]=new WeakMap);var r=Rc[n],o=[],i=new Set,l=new Set(s),c=function(e){e&&!i.has(e)&&(i.add(e),c(e.parentNode))};s.forEach(c);var d=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(i.has(e))d(e);else try{var t=e.getAttribute(a),s=null!==t&&"false"!==t,l=(Pc.get(e)||0)+1,c=(r.get(e)||0)+1;Pc.set(e,l),r.set(e,c),o.push(e),1===l&&s&&Mc.set(e,!0),1===c&&e.setAttribute(n,"true"),s||e.setAttribute(a,"true")}catch(lS){console.error("aria-hidden: cannot operate on ",e,lS)}})};return d(t),i.clear(),Oc++,function(){o.forEach(function(e){var t=Pc.get(e)-1,s=r.get(e)-1;Pc.set(e,t),r.set(e,s),t||(Mc.has(e)||e.removeAttribute(a),Mc.delete(e)),s||e.removeAttribute(n)}),--Oc||(Pc=new WeakMap,Pc=new WeakMap,Mc=new WeakMap,Rc={})}},Dc=function(e,t,n){void 0===n&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=t||Ec(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),Tc(a,s,n,"aria-hidden")):function(){return null}};const Lc=["__scopeDialog"],Fc=["forceMount"],Ic=["__scopeDialog"],Uc=["forceMount"],Bc=["__scopeDialog","trapFocus","onOpenAutoFocus","onCloseAutoFocus"],Wc=["__scopeDialog"],qc=["__scopeDialog"],Hc=["__scopeDialog"];var Vc="Dialog",Yc=Vi(Vc),$c=(0,De.A)(Yc,2),Qc=$c[0],Kc=$c[1],Gc=Qc(Vc),Xc=(0,De.A)(Gc,2),Jc=Xc[0],Zc=Xc[1],ed=e=>{const t=e.__scopeDialog,n=e.children,a=e.open,r=e.defaultOpen,o=e.onOpenChange,i=e.modal,l=void 0===i||i,c=s.useRef(null),d=s.useRef(null),u=Ji({prop:a,defaultProp:null!==r&&void 0!==r&&r,onChange:o,caller:Vc}),h=(0,De.A)(u,2),m=h[0],p=h[1];return(0,_e.jsx)(Jc,{scope:t,triggerRef:c,contentRef:d,contentId:Gi(),titleId:Gi(),descriptionId:Gi(),open:m,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(e=>!e),[p]),modal:l,children:n})};ed.displayName=Vc;var td="DialogTrigger",nd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=(0,Pe.A)(e,Lc),s=Zc(td,n),r=Wi(t,s.triggerRef);return(0,_e.jsx)(ll.button,(0,i.A)((0,i.A)({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Nd(s.open)},a),{},{ref:r,onClick:Ii(e.onClick,s.onOpenToggle)}))});nd.displayName=td;var ad="DialogPortal",sd=Qc(ad,{forceMount:void 0}),rd=(0,De.A)(sd,2),od=rd[0],id=rd[1],ld=e=>{const t=e.__scopeDialog,n=e.forceMount,a=e.children,r=e.container,o=Zc(ad,t);return(0,_e.jsx)(od,{scope:t,forceMount:n,children:s.Children.map(a,e=>(0,_e.jsx)(Ol,{present:n||o.open,children:(0,_e.jsx)(Rl,{asChild:!0,container:r,children:e})}))})};ld.displayName=ad;var cd="DialogOverlay",dd=s.forwardRef((e,t)=>
2{const n=id(cd,e.__scopeDialog),a=e.forceMount,s=void 0===a?n.forceMount:a,r=(0,Pe.A)(e,Fc),o=Zc(cd,e.__scopeDialog);return o.modal?(0,_e.jsx)(Ol,{present:s||o.open,children:(0,_e.jsx)(hd,(0,i.A)((0,i.A)({},r),{},{ref:t}))}):null});dd.displayName=cd;var ud=tl("DialogOverlay.RemoveScroll"),hd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=(0,Pe.A)(e,Ic),s=Zc(cd,n);return(0,_e.jsx)(Cc,{as:ud,allowPinchZoom:!0,shards:[s.contentRef],children:(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({"data-state":Nd(s.open)},a),{},{ref:t,style:(0,i.A)({pointerEvents:"auto"},a.style)}))})}),md="DialogContent",pd=s.forwardRef((e,t)=>{const n=id(md,e.__scopeDialog),a=e.forceMount,s=void 0===a?n.forceMount:a,r=(0,Pe.A)(e,Uc),o=Zc(md,e.__scopeDialog);return(0,_e.jsx)(Ol,{present:s||o.open,children:o.modal?(0,_e.jsx)(fd,(0,i.A)((0,i.A)({},r),{},{ref:t})):(0,_e.jsx)(gd,(0,i.A)((0,i.A)({},r),{},{ref:t}))})});pd.displayName=md;var fd=s.forwardRef((e,t)=>{const n=Zc(md,e.__scopeDialog),a=s.useRef(null),r=Wi(t,n.contentRef,a);return s.useEffect(()=>{const e=a.current;if(e)return Dc(e)},[]),(0,_e.jsx)(xd,(0,i.A)((0,i.A)({},e),{},{ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ii(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:Ii(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Ii(e.onFocusOutside,e=>e.preventDefault())}))}),gd=s.forwardRef((e,t)=>{const n=Zc(md,e.__scopeDialog),a=s.useRef(!1),r=s.useRef(!1);return(0,_e.jsx)(xd,(0,i.A)((0,i.A)({},e),{},{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var s,o;(null===(s=e.onCloseAutoFocus)||void 0===s||s.call(e,t),t.defaultPrevented)||(a.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault());a.current=!1,r.current=!1},onInteractOutside:t=>{var s,o;null===(s=e.onInteractOutside)||void 0===s||s.call(e,t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const i=t.target;(null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}}))}),xd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=e.trapFocus,r=e.onOpenAutoFocus,o=e.onCloseAutoFocus,l=(0,Pe.A)(e,Bc),c=Zc(md,n),d=s.useRef(null),u=Wi(t,d);return Dl(),(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(Nl,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:o,children:(0,_e.jsx)(gl,(0,i.A)((0,i.A)({role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Nd(c.open)},l),{},{ref:u,onDismiss:()=>c.onOpenChange(!1)}))}),(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(Pd,{titleId:c.titleId}),(0,_e.jsx)(Md,{contentRef:d,descriptionId:c.descriptionId})]})]})}),vd="DialogTitle",bd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=(0,Pe.A)(e,Wc),s=Zc(vd,n);return(0,_e.jsx)(ll.h2,(0,i.A)((0,i.A)({id:s.titleId},a),{},{ref:t}))});bd.displayName=vd;var yd="DialogDescription",wd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=(0,Pe.A)(e,qc),s=Zc(yd,n);return(0,_e.jsx)(ll.p,(0,i.A)((0,i.A)({id:s.descriptionId},a),{},{ref:t}))});wd.displayName=yd;var jd="DialogClose",kd=s.forwardRef((e,t)=>{const n=e.__scopeDialog,a=(0,Pe.A)(e,Hc),s=Zc(jd,n);return(0,_e.jsx)(ll.button,(0,i.A)((0,i.A)({type:"button"},a),{},{ref:t,onClick:Ii(e.onClick,()=>s.onOpenChange(!1))}))});function Nd(e){return e?"open":"closed"}kd.displayName=jd;var Sd="DialogTitleWarning",Ad=function(e,t){const n=s.createContext(t),a=e=>{const t=e.children,a=(0,Pe.A)(e,qi),r=s.useMemo(()=>a,Object.values(a));return(0,_e.jsx)(n.Provider,{value:r,children:t})};return a.displayName=e+"Provider",[a,function(a){const r=s.useContext(n);if(r)return r;if(void 0!==t)return t;throw new Error("`".concat(a,"` must be used within `").concat(e,"`"))}]}(Sd,{contentName:md,titleName:vd,docsSlug:"dialog"}),_d=(0,De.A)(Ad,2),Cd=_d[0],Ed=_d[1],Pd=e=>{let t=e.titleId;const n=Ed(Sd),a="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return s.useEffect(()=>{if(t){document.getElementById(t)||console.error(a)}},[a,t]),null},Md=e=>{let t=e.contentRef,n=e.descriptionId;const a=Ed("DialogDescriptionWarning"),r="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(a.contentName,"}.");return s.useEffect(()=>{var e;const a=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");if(n&&a){document.getElementById(n)||console.warn(r)}},[r,t,n]),null},Rd=ed,Od=nd,zd=ld,Td=dd,Dd=pd,Ld=bd,Fd=wd,Id=kd;function Ud(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;
2t++)e[t]&&(n=Ud(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Bd(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Ud(e))&&(a&&(a+=" "),a+=t);return a}const Wd=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const a=e[0],s=t.nextPart.get(a),r=s?Wd(e.slice(1),s):void 0;if(r)return r;if(0===t.validators.length)return;const o=e.join("-");return null===(n=t.validators.find(e=>(0,e.validator)(o)))||void 0===n?void 0:n.classGroupId},qd=/^\[(.+)\]$/,Hd=e=>{if(qd.test(e)){const t=qd.exec(e)[1],n=null===t||void 0===t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Vd=e=>{const t=e.theme,n=e.classGroups,a={nextPart:new Map,validators:[]};for(const s in n)Yd(n[s],a,s,t);return a},Yd=(e,t,n,a)=>{e.forEach(e=>{if("string"===typeof e){return void((""===e?t:$d(t,e)).classGroupId=n)}if("function"===typeof e)return Qd(e)?void Yd(e(a),t,n,a):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(e=>{let s=(0,De.A)(e,2),r=s[0],o=s[1];Yd(o,$d(t,r),n,a)})})},$d=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Qd=e=>e.isThemeGetter,Kd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const s=(s,r)=>{n.set(s,r),t++,t>e&&(t=0,a=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=a.get(e))?(s(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):s(e,t)}}},Gd=e=>{const t=e.prefix,n=e.experimentalParseClassName;let a=e=>{const t=[];let n,a=0,s=0,r=0;for(let l=0;l<e.length;l++){let o=e[l];if(0===a&&0===s){if(":"===o){t.push(e.slice(r,l)),r=l+1;continue}if("/"===o){n=l;continue}}"["===o?a++:"]"===o?a--:"("===o?s++:")"===o&&s--}const o=0===t.length?e:e.substring(r),i=Xd(o);return{modifiers:t,hasImportantModifier:i!==o,baseClassName:i,maybePostfixModifierPosition:n&&n>r?n-r:void 0}};if(t){const e=t+":",n=a;a=t=>t.startsWith(e)?n(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(n){const e=a;a=t=>n({className:t,parseClassName:e})}return a},Xd=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,Jd=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;const n=[];let a=[];return e.forEach(e=>{"["===e[0]||t[e]?(n.push(...a.sort(),e),a=[]):a.push(e)}),n.push(...a.sort()),n}},Zd=e=>(0,i.A)({cache:Kd(e.cacheSize),parseClassName:Gd(e),sortModifiers:Jd(e)},(e=>{const t=Vd(e),n=e.conflictingClassGroups,a=e.conflictingClassGroupModifiers;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),Wd(n,t)||Hd(e)},getConflictingClassGroupIds:(e,t)=>{const s=n[e]||[];return t&&a[e]?[...s,...a[e]]:s}}})(e)),eu=/\s+/;function tu(){let e,t,n=0,a="";for(;n<arguments.length;)(e=arguments[n++])&&(t=nu(e))&&(a&&(a+=" "),a+=t);return a}const nu=e=>{if("string"===typeof e)return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=nu(e[a]))&&(n&&(n+=" "),n+=t);return n};function au(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];let s,r,o,i=function(t){const a=n.reduce((e,t)=>t(e),e());return s=Zd(a),r=s.cache.get,o=s.cache.set,i=l,l(t)};function l(e){const t=r(e);if(t)return t;const n=((e,t)=>{const n=t.parseClassName,a=t.getClassGroupId,s=t.getConflictingClassGroupIds,r=t.sortModifiers,o=[],i=e.trim().split(eu);let l="";for(let c=i.length-1;c>=0;c-=1){const e=i[c],t=n(e),d=t.isExternal,u=t.modifiers,h=t.hasImportantModifier,m=t.baseClassName,p=t.maybePostfixModifierPosition;if(d){l=e+(l.length>0?" "+l:l);continue}let f=!!p,g=a(f?m.substring(0,p):m);if(!g){if(!f){l=e+(l.length>0?" "+l:l);continue}if(g=a(m),!g){l=e+(l.length>0?" "+l:l);continue}f=!1}const x=r(u).join(":"),v=h?x+"!":x,b=v+g;if(o.includes(b))continue;o.push(b);const y=s(g,f);for(let n=0;n<y.length;++n){const e=y[n];o.push(v+e)}l=e+(l.length>0?" "+l:l)}return l})(e,s);return o(e,n),n}return function(){return i(tu.apply(null,arguments))}}const su=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},ru=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ou=/^\((?:(\w[\w-]*):)?(.+)\)$/i,iu=/^\d+\/\d+$/,lu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cu=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,du=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mu=e=>iu.test(e),pu=e=>!!e&&!Number.isNaN(Number(e)),fu=e=>!!e&&Number.isInteger(Number(e)),gu=e=>e.endsWith("%")&&pu(e.slice(0,-1)),xu=e=>lu.test(e),vu=()=>!0,bu=e=>cu.test(e)&&!du.test(e),yu=()=>!1,wu=e=>uu.test(e),ju=e=>hu.test(e),ku=e=>!Su(e)&&!Mu(e),Nu=e=>Fu(e,Wu,yu),Su=e=>ru.test(e),Au=e=>Fu(e,qu,bu),_u=e=>Fu(e,Hu,pu),Cu=e=>Fu(e,Uu,yu),Eu=e=>Fu(e,Bu,ju),Pu=e=>
vendor: 4,524 bytes, line 2
2Fu(e,Yu,wu),Mu=e=>ou.test(e),Ru=e=>Iu(e,qu),Ou=e=>Iu(e,Vu),zu=e=>Iu(e,Uu),Tu=e=>Iu(e,Wu),Du=e=>Iu(e,Bu),Lu=e=>Iu(e,Yu,!0),Fu=(e,t,n)=>{const a=ru.exec(e);return!!a&&(a[1]?t(a[1]):n(a[2]))},Iu=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const a=ou.exec(e);return!!a&&(a[1]?t(a[1]):n)},Uu=e=>"position"===e||"percentage"===e,Bu=e=>"image"===e||"url"===e,Wu=e=>"length"===e||"size"===e||"bg-size"===e,qu=e=>"length"===e,Hu=e=>"number"===e,Vu=e=>"family-name"===e,Yu=e=>"shadow"===e,$u=(Symbol.toStringTag,()=>{const e=su("color"),t=su("font"),n=su("text"),a=su("font-weight"),s=su("tracking"),r=su("leading"),o=su("breakpoint"),i=su("container"),l=su("spacing"),c=su("radius"),d=su("shadow"),u=su("inset-shadow"),h=su("text-shadow"),m=su("drop-shadow"),p=su("blur"),f=su("perspective"),g=su("aspect"),x=su("ease"),v=su("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Mu,Su],y=()=>[Mu,Su,l],w=()=>[mu,"full","auto",...y()],j=()=>[fu,"none","subgrid",Mu,Su],k=()=>["auto",{span:["full",fu,Mu,Su]},fu,Mu,Su],N=()=>[fu,"auto",Mu,Su],S=()=>["auto","min","max","fr",Mu,Su],A=()=>["auto",...y()],_=()=>[mu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],C=()=>[e,Mu,Su],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",zu,Cu,{position:[Mu,Su]}],P=()=>["auto","cover","contain",Tu,Nu,{size:[Mu,Su]}],M=()=>[gu,Ru,Au],R=()=>["","none","full",c,Mu,Su],O=()=>["",pu,Ru,Au],z=()=>[pu,gu,zu,Cu],T=()=>["","none",p,Mu,Su],D=()=>["none",pu,Mu,Su],L=()=>["none",pu,Mu,Su],F=()=>[pu,Mu,Su],I=()=>[mu,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xu],breakpoint:[xu],color:[vu],container:[xu],"drop-shadow":[xu],ease:["in","out","in-out"],font:[ku],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xu],shadow:[xu],spacing:["px",pu],text:[xu],"text-shadow":[xu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mu,Su,Mu,g]}],container:["container"],columns:[{columns:[pu,Su,Mu,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[fu,"auto",Mu,Su]}],basis:[{basis:[mu,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pu,mu,"auto","initial","none",Su]}],grow:[{grow:["",pu,Mu,Su]}],shrink:[{shrink:["",pu,Mu,Su]}],order:[{order:[fu,"first","last","none",Mu,Su]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":N()}
vendor: 11,760 bytes, line 2
2],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[i,"screen",..._()]}],"min-w":[{"min-w":[i,"screen","none",..._()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},..._()]}],h:[{h:["screen",..._()]}],"min-h":[{"min-h":["screen","none",..._()]}],"max-h":[{"max-h":["screen",..._()]}],"font-size":[{text:["base",n,Ru,Au]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Mu,_u]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gu,Su]}],"font-family":[{font:[Ou,Su,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Mu,Su]}],"line-clamp":[{"line-clamp":[pu,"none",Mu,_u]}],leading:[{leading:[r,...y()]}],"list-image":[{"list-image":["none",Mu,Su]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Mu,Su]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[pu,"from-font","auto",Mu,Au]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[pu,"auto",Mu,Su]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Mu,Su]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Mu,Su]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:E()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fu,Mu,Su],radial:["",Mu,Su],conic:[fu,Mu,Su]},Du,Eu]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":O()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[pu,Mu,Su]}],"outline-w":[{outline:["",pu,Ru,Au]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",d,Lu,Pu]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",u,Lu,Pu]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[pu,Au]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,Lu,Pu]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[pu,Mu,Su]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pu]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Mu,Su]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[pu]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:E()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Mu,Su]}],filter:[{filter:["","none",Mu,Su]}],blur:[{blur:T()}],brightness:[{brightness:[pu,Mu,Su]}],contrast:[{contrast:[pu,Mu,Su]}],"drop-shadow":[{"drop-shadow":["","none",m,Lu,Pu]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",pu,Mu,Su]}],"hue-rotate":[{"hue-rotate":[pu,Mu,Su]}],invert:[{invert:["",pu,Mu,Su]}],saturate:[{saturate:[pu,Mu,Su]}],sepia:[{sepia:["",pu,Mu,Su]}],"backdrop-filter":[{"backdrop-filter":["","none",Mu,Su]}],"backdrop-blur":[{"backdrop-blur":T()}],"backdrop-brightness":[{"backdrop-brightness":[pu,Mu,Su]}],"backdrop-contrast":[{"backdrop-contrast":[pu,Mu,Su]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pu,Mu,Su]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pu,Mu,Su]}],"backdrop-invert":[{"backdrop-invert":["",pu,Mu,Su]}],"backdrop-opacity":[{"backdrop-opacity":[pu,Mu,Su]}],"backdrop-saturate":[{"backdrop-saturate":[pu,Mu,Su]}],"backdrop-sepia":[{"backdrop-sepia":["",pu,Mu,Su]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Mu,Su]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pu,"initial",Mu,Su]}],ease:[{ease:["linear","initial",x,Mu,Su]}],delay:[{delay:[pu,Mu,Su]}],animate:[{animate:["none",v,Mu,Su]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,Mu,Su]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:D()}],"rotate-x":[{"rotate-x":D()}],"rotate-y":[{"rotate-y":D()}],"rotate-z":[{"rotate-z":D()}],scale:[{scale:L()}],"scale-x":[{"scale-x":L()}],"scale-y":[{"scale-y":L()}],"scale-z":[{"scale-z":L()}
vendor: 5,168 bytes, line 2
2],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Mu,Su,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:I()}],"translate-x":[{"translate-x":I()}],"translate-y":[{"translate-y":I()}],"translate-z":[{"translate-z":I()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Mu,Su]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Mu,Su]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[pu,Ru,Au,_u]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),Qu=au($u);function Ku(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qu(Bd(t))}const Gu=["className"],Xu=["className","children"],Ju=["className"],Zu=["className"],eh=["className"],th=Rd,nh=zd,ah=s.forwardRef((e,t)=>
2{let n=e.className,a=(0,Pe.A)(e,Gu);return(0,_e.jsx)(Td,(0,i.A)({ref:t,className:Ku("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},a))});ah.displayName=Td.displayName;const sh=s.forwardRef((e,t)=>{let n=e.className,a=e.children,s=(0,Pe.A)(e,Xu);return(0,_e.jsxs)(nh,{children:[(0,_e.jsx)(ah,{}),(0,_e.jsxs)(Dd,(0,i.A)((0,i.A)({ref:t,className:Ku("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n)},s),{},{children:[a,(0,_e.jsxs)(Id,{className:"absolute right-4 top-4 roun
2ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,_e.jsx)(ai,{className:"h-4 w-4"}),(0,_e.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})});sh.displayName=Dd.displayName;const rh=e=>{let t=e.className,n=(0,Pe.A)(e,Ju);return(0,_e.jsx)("div",(0,i.A)({className:Ku("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))};rh.displayName="DialogHeader";const oh=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,Zu);return(0,_e.jsx)(Ld,(0,i.A)({ref:t,className:Ku("text-lg font-semibold leading-none tracking-tight",n)},a))});oh.displayName=Ld.displayName;const ih=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,eh);return(0,_e.jsx)(Fd,(0,i.A)({ref:t,className:Ku("text-sm text-muted-foreground",n)},a))});ih.displayName=Fd.displayName;const lh=e=>{let t=e.open,n=e.onOpenChange,a=e.title,s=e.eyebrow,r=e.text,o=e.testId,i=void 0===o?"notes":o;return(0,_e.jsx)(th,{open:t,onOpenChange:n,children:(0,_e.jsxs)(sh,{className:"card-surface max-w-2xl max-h-[85vh] flex flex-col",onClick:e=>e.stopPropagation(),"data-testid":"".concat(i,"-dialog"),children:[(0,_e.jsxs)(rh,{className:"text-left",children:[s&&(0,_e.jsx)("p",{className:"eyebrow",children:s}),(0,_e.jsx)(oh,{className:"font-display text-2xl font-extrabold leading-snug pr-6","data-testid":"".concat(i,"-dialog-title"),children:a||"Show notes"}),(0,_e.jsx)(ih,{className:"sr-only",children:"Full episode description"})]}),(0,_e.jsx)("div",{className:"overflow-y-auto min-h-0 pr-1 -mr-1",children:(0,_e.jsx)("p",{className:"whitespace-pre-line leading-relaxed text-slate-300","data-testid":"".concat(i,"-dialog-body"),children:r})})]})})},ch=e=>{let t=e.text,n=e.full,a=e.lines,r=void 0===a?2:a,o=e.className,i=void 0===o?"":o,l=e.testId,c=void 0===l?"expandable-text":l,d=e.title,u=e.eyebrow,h=e.onOpen;const m=(0,s.useState)(!1),p=(0,De.A)(m,2),f=p[0],g=p[1],x=t||"",v=n||x;if(!v)return null;const b=v.length>x.length||v.length>140;return(0,_e.jsxs)("div",{className:i,"data-testid":c,children:[(0,_e.jsx)("p",{className:"whitespace-pre-line leading-relaxed line-clamp-".concat(r),"data-testid":"".concat(c,"-body"),children:x}),b&&(0,_e.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),h?h():g(!0)},className:"mt-1 text-xs font-semibold text-sky-400 hover:text-sky-300 transition-colors","data-testid":"".concat(c,"-toggle"),children:"Read more"}),!h&&(0,_e.jsx)(lh,{open:f,onOpenChange:g,title:d,eyebrow:u,text:v,testId:c})]})},dh=e=>"tiktok"===e.source?{aspect:"aspect-[9/16]",hero:"md:grid-cols-[minmax(0,240px)_1fr] lg:grid-cols-[minmax(0,280px)_1fr]"}:e.video_id&&!e.audio_url?{aspect:"aspect-video",hero:"md:grid-cols-[minmax(0,380px)_1fr] lg:grid-cols-[minmax(0,480px)_1fr]"}:{aspect:"aspect-square",hero:"md:grid-cols-[minmax(0,300px)_1fr] lg:grid-cols-[minmax(0,360px)_1fr]"},uh=e=>{var t,n,a,s,r,o;let i=e.episode,l=e.eyebrow,c=void 0===l?"Newest on the network":l,d=e.showBadge,u=void 0===d||d,h=e.testId,m=void 0===h?"hero-episode":h,p=e.index,f=void 0===p?0:p,g=e.linkTitle,x=void 0===g||g;const v=(0,Uo().isPlaying)(i.id),b=Po(i.image_url||(null===(t=i.show)||void 0===t?void 0:t.cover_url)),y=dh(i),w=(0,_e.jsx)("h2",{className:"".concat(u?"mt-4":""," font-display text-3xl sm:text-4xl lg:text-5xl font-black tracking-tight leading-[1.05]"),"data-testid":"".concat(m,"-title"),children:i.title});return(0,_e.jsxs)("article",{className:"relative overflow-hidden rounded-3xl card-surface grain reveal ".concat(v?"now-playing":""),style:{animationDelay:"".concat(50*f,"ms")},"data-testid":"".concat(m,"-card"),"data-playing":v,children:[(0,_e.jsx)("div",{className:"absolute inset-0 opacity-30 blur-3xl scale-125",style:{backgroundImage:"url(".concat(b,")"),backgroundSize:"cover",backgroundPosition:"center"}}),(0,_e.jsxs)("div",{className:"relative grid ".concat(y.hero," gap-8 p-6 sm:p-8 lg:p-10 items-center"),children:[(0,_e.jsx)(da,{to:x?"/episodes/".concat(i.id):"/shows/".concat(null===(n=i.show)||void 0===n?void 0:n.slug),className:"block ".concat(y.aspect," rounded-2xl overflow-hidden shadow-2xl shadow-black/50 ring-1 ring-white/10"),"data-testid":"".concat(m,"-artwork"),children:(0,_e.jsx)("img",{src:b,alt:null===(a=i.show)||void 0===a?void 0:a.name,className:"h-full w-full object-cover transition-transform duration-500 hover:scale-105",loading:f?"lazy":"eager"})}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,_e.jsx)("span",{className:"eyebrow",children:c}),v&&(0,_e.jsxs)("span",{className:"bars flex items-end h-5","aria-hidden":!0,
2children:[(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{})]})]}),u&&(0,_e.jsx)(da,{to:"/shows/".concat(null===(s=i.show)||void 0===s?void 0:s.slug),className:"inline-flex items-center gap-2 rounded-full bg-[#053671] px-3 py-1 text-xs font-bold tracking-wide text-white hover:bg-[#0B4A8F] transition-colors","data-testid":"".concat(m,"-show-badge"),children:null===(r=i.show)||void 0===r?void 0:r.name}),x?(0,_e.jsx)(da,{to:"/episodes/".concat(i.id),className:"block hover:text-sky-300 transition-colors","data-testid":"".concat(m,"-title-link"),children:w}):w,(0,_e.jsx)(ch,{text:i.summary,full:i.description,lines:3,className:"mt-4 text-slate-300 max-w-2xl",testId:"".concat(m,"-summary"),title:i.title,eyebrow:null===(o=i.show)||void 0===o?void 0:o.name}),(0,_e.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-4",children:[(0,_e.jsx)(Ci,{episode:i,size:"lg",testId:"".concat(m,"-play-button")}),(0,_e.jsx)(Fi,{episode:i,testId:"".concat(m,"-spotify")}),(0,_e.jsx)(zi,{episode:i,testId:"".concat(m,"-share")}),(0,_e.jsxs)("div",{className:"font-mono text-xs text-slate-400 flex items-center gap-4",children:[(0,_e.jsx)("span",{title:Ro(i.published_at),children:Oo(i.published_at)}),i.duration&&(0,_e.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_e.jsx)(_i,{size:12})," ",i.duration]})]})]})]})]})]})},hh=e=>{var t,n;let a=e.episode,s=e.index,r=e.showLink,o=void 0===r||r,i=e.onSelect,l=e.onReadMore;const c=(0,Uo().isPlaying)(a.id),d=Po(a.image_url||(null===(t=a.show)||void 0===t?void 0:t.cover_url)),u=dh(a).aspect,h="aspect-video"===u?"w-36 sm:w-44":"aspect-[9/16]"===u?"w-20 sm:w-24":"w-24 sm:w-28",m=e=>{let t=e.className,n=e.children,s=e.testId;return i?(0,_e.jsx)("button",{type:"button",onClick:()=>i(a),className:"".concat(t," text-left"),title:"Feature this episode","data-testid":s,children:n}):(0,_e.jsx)(da,{to:"/episodes/".concat(a.id),className:t,"data-testid":s,children:n})};return(0,_e.jsxs)("article",{onClick:i?()=>i(a):void 0,className:"card-surface card-surface-hover rounded-2xl p-4 flex gap-4 reveal ".concat(c?"now-playing":""," ").concat(i?"cursor-pointer":""),style:{animationDelay:"".concat(60*Math.min(s,11),"ms")},"data-testid":"episode-card-".concat(s),"data-playing":c,children:[(0,_e.jsxs)("div",{className:"shrink-0 flex flex-col gap-2 ".concat(h),children:[(0,_e.jsx)(m,{className:"".concat(u," w-full rounded-xl overflow-hidden ring-1 ring-white/10 block"),testId:"episode-card-artwork-".concat(s),children:(0,_e.jsx)("img",{src:d,alt:"",className:"h-full w-full object-cover",loading:"lazy"})}),(0,_e.jsx)("div",{onClickCapture:i?()=>i(a):void 0,children:(0,_e.jsx)(Ci,{episode:a,variant:"wide",testId:"episode-play-button-".concat(s)})})]}),(0,_e.jsxs)("div",{className:"min-w-0 flex flex-col",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[o&&a.show&&(0,_e.jsx)(da,{to:"/shows/".concat(a.show.slug),className:"text-xs font-bold text-sky-400 uppercase tracking-wider truncate hover:underline","data-testid":"episode-card-show-".concat(s),children:a.show.name}),c&&(0,_e.jsxs)("span",{className:"bars flex items-end h-4 shrink-0","aria-label":"Now playing","data-testid":"episode-card-now-playing-".concat(s),children:[(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{}),(0,_e.jsx)("span",{})]})]}),(0,_e.jsx)(m,{className:"mt-1 block hover:text-sky-300 transition-colors",testId:"episode-card-title-link-".concat(s),children:(0,_e.jsx)("h3",{className:"font-display font-bold text-base leading-snug line-clamp-2","data-testid":"episode-card-title-".concat(s),children:a.title})}),(0,_e.jsx)(ch,{text:a.summary,full:a.description,lines:2,className:"mt-1.5 text-sm text-slate-400",testId:"episode-card-summary-".concat(s),title:a.title,eyebrow:null===(n=a.show)||void 0===n?void 0:n.name,onOpen:l?()=>l(a):void 0}),(0,_e.jsxs)("p",{className:"mt-auto pt-2 font-mono text-[11px] text-slate-500",children:[Oo(a.published_at),a.duration?" \xb7 ".concat(a.duration):""]})]})]})},mh=["className"];function ph(e){let t=e.className,n=(0,Pe.A)(e,mh);return(0,_e.jsx)("div",(0,i.A)({className:Ku("animate-pulse rounded-md bg-primary/10",t)},n))}const fh=()=>{var e;
2const t=(0,s.useState)(null),n=(0,De.A)(t,2),a=n[0],r=n[1],o=qo(),i=o.settings,l=o.homepage;(0,s.useEffect)(()=>{i&&Eo.get("/episodes/latest",{params:{limit:l.latest_count||9}}).then(e=>r(e.data)).catch(()=>r([]))},[i,l.latest_count]);const c=(0,s.useState)(null),d=(0,De.A)(c,2),u=d[0],h=d[1],m=e=>{var t;r(t=>{const n=t.findIndex(t=>t.id===e.id);if(n<=0)return t;const a=[...t];var s=[a[n],a[0]];return a[0]=s[0],a[n]=s[1],a}),null===(t=document.getElementById("latest"))||void 0===t||t.scrollIntoView({behavior:"smooth",block:"start"})},p=e=>{m(e),h(e)};return(0,_e.jsxs)("section",{id:"latest",className:"max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 sm:pt-10","data-testid":"latest-episodes-section",children:[(0,_e.jsxs)("div",{className:"mb-6",children:[""!==l.latest_section_eyebrow&&(0,_e.jsx)("p",{className:"eyebrow mb-2","data-testid":"latest-episodes-eyebrow",children:l.latest_section_eyebrow||"Listen"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-extrabold tracking-tight","data-testid":"latest-episodes-title",children:l.latest_title||"Latest Episodes"})]}),a?0===a.length?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"latest-episodes-empty",children:"No episodes yet. Add a show in the admin dashboard to get started."}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(uh,{episode:a[0],eyebrow:l.latest_eyebrow||"Newest on the network"},a[0].id),(0,_e.jsx)("div",{className:"mt-6 grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4","data-testid":"latest-episodes-grid",children:a.slice(1).map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t+1,onSelect:m,onReadMore:p},e.id))}),(0,_e.jsx)(lh,{open:!!u,onOpenChange:e=>!e&&h(null),title:null===u||void 0===u?void 0:u.title,eyebrow:null===u||void 0===u||null===(e=u.show)||void 0===e?void 0:e.name,text:(null===u||void 0===u?void 0:u.description)||(null===u||void 0===u?void 0:u.summary),testId:"latest-notes"})]}):(0,_e.jsxs)("div",{className:"space-y-6",children:[(0,_e.jsx)(ph,{className:"h-[380px] rounded-3xl bg-white/5"}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[...Array(8)].map((e,t)=>(0,_e.jsx)(ph,{className:"h-36 rounded-2xl bg-white/5"},t))})]})]})},gh=()=>{const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(null),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(!1),d=(0,De.A)(c,2),u=d[0],h=d[1],m=qo(),p=m.settings,f=m.homepage,g=(null===p||void 0===p?void 0:p.youtube_channel)||"",x=e=>"https://i.ytimg.com/vi/".concat(e.video_id,"/maxresdefault.jpg");(0,s.useEffect)(()=>{p&&Eo.get("/youtube/videos",{params:{limit:f.videos_count||6}}).then(async e=>{const t=e.data[0];t&&await Promise.race([new Promise(e=>{const n=new Image;n.onload=n.onerror=e,n.src=x(t)}),new Promise(e=>setTimeout(e,3e3))]),a(e.data),l(t||null)}).catch(()=>a([]))},[p,f.videos_count]);return(0,_e.jsxs)("section",{id:"videos",className:"max-w-[1400px] mx-auto px-5 sm:px-8 pt-14","data-testid":"videos-section",children:[(0,_e.jsxs)("div",{className:"flex items-end justify-between mb-6",children:[(0,_e.jsxs)("div",{children:[f.videos_eyebrow&&(0,_e.jsx)("p",{className:"eyebrow mb-2",children:f.videos_eyebrow}),(0,_e.jsx)("h2",{className:"font-display text-3xl sm:text-4xl font-extrabold tracking-tight",children:f.videos_title||"Latest on YouTube"})]}),g&&(0,_e.jsxs)("a",{href:g,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-sm font-semibold text-slate-300 hover:text-white","data-testid":"youtube-channel-link",children:[(0,_e.jsx)(oi,{size:18,className:"text-rose-500"})," Subscribe"]})]}),n?0===n.length?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"videos-empty",children:"Connect your YouTube channel in Admin \u2192 Settings to show videos here."}):(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_380px] gap-5 lg:items-stretch",children:[(0,_e.jsxs)("div",{className:"card-surface rounded-3xl overflow-hidden reveal","data-testid":"youtube-video-hero",children:[(0,_e.jsx)("div",{className:"aspect-video bg-black relative",children:u?(0,_e.jsx)("iframe",{src:"https://www.youtube.com/embed/".concat(i.video_id,"?rel=0&autoplay=1"),title:i.title,className:"h-full w-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,"data-testid":"youtube-video-iframe"},i.video_id):(0,_e.jsxs)("button",{type:"button",onClick:()=>h(!0),className:"group absolute inset-0 w-full h-full","aria-label":"Play ".concat(i.title),"data-testid":"youtube-video-poster",children:[(0,_e.jsx)("img",{src:x(i),onError:e=>{e.currentTarget.src!==i.thumbnail&&(e.currentTarget.src=i.thumbnail)},alt:i.title,className:"h-full w-full object-cover",loading:"eager",fetchPriority:"high"}),(0,_e.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/20 transition-colors group-hover:bg-black/30",children:(0,_e.jsx)("span",{className:"flex h-20 w-20 items-center justify-center rounded-full bg-sky-4
200 text-[#070F1E] shadow-2xl transition-transform duration-300 group-hover:scale-110",children:(0,_e.jsx)(ti,{size:34,fill:"currentColor",className:"ml-1"})})})]})}),(0,_e.jsxs)("div",{className:"p-5 sm:p-6",children:[(0,_e.jsx)("h3",{className:"font-display text-xl sm:text-2xl font-bold leading-snug","data-testid":"youtube-video-hero-title",children:i.title}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400 line-clamp-2",children:i.description}),(0,_e.jsx)("p",{className:"mt-3 font-mono text-[11px] text-slate-500",children:Oo(i.published_at)})]})]}),(0,_e.jsx)("div",{className:"grid grid-rows-5 gap-3 lg:h-full lg:min-h-0","data-testid":"youtube-video-list",children:n.filter(e=>e.video_id!==i.video_id).slice(0,5).map((e,t)=>(0,_e.jsxs)("button",{onClick:()=>(e=>{l(e),h(!0)})(e),className:"card-surface card-surface-hover rounded-2xl p-3 flex gap-3 items-center text-left reveal min-h-0",style:{animationDelay:"".concat(70*t,"ms")},"data-testid":"youtube-video-card-".concat(t),children:[(0,_e.jsxs)("div",{className:"relative w-36 shrink-0 aspect-video rounded-lg overflow-hidden max-h-full",children:[(0,_e.jsx)("img",{src:e.thumbnail,alt:"",className:"h-full w-full object-cover",loading:"lazy"}),(0,_e.jsx)("span",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:(0,_e.jsx)(ti,{size:18,fill:"white",className:"text-white"})})]}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsx)("p",{className:"font-semibold text-sm leading-snug line-clamp-2",children:e.title}),(0,_e.jsx)("p",{className:"mt-1.5 font-mono text-[11px] text-slate-500",children:Oo(e.published_at)})]})]},e.video_id))})]}):(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_360px] gap-5",children:[(0,_e.jsx)(ph,{className:"aspect-video rounded-3xl bg-white/5"}),(0,_e.jsx)("div",{className:"space-y-3",children:[...Array(5)].map((e,t)=>(0,_e.jsx)(ph,{className:"h-24 rounded-2xl bg-white/5"},t))})]})]})},xh=Jo("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),vh=()=>{const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=Uo().play,o=qo().homepage;(0,s.useEffect)(()=>{Eo.get("/team/random").then(e=>a(e.data)).catch(()=>a([]))},[]);const i=(0,s.useState)(0),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useState)(!1),h=(0,De.A)(u,2),m=h[0],p=h[1],f=()=>d(e=>e+1);(0,s.useEffect)(()=>{if(!n)return;const e=setTimeout(()=>p(!0),8e3);return()=>clearTimeout(e)},[n]);const g=n?n.filter(e=>e.image_url).length:0,x=!!n&&(c>=g||m);return(0,_e.jsxs)("section",{id:"team",className:"max-w-[1400px] mx-auto px-5 sm:px-8 pt-14 pb-14","data-testid":"team-section",children:[(0,_e.jsxs)("div",{className:"flex items-end justify-between gap-4 mb-6",children:[(0,_e.jsxs)("div",{children:[o.team_eyebrow&&(0,_e.jsx)("p",{className:"eyebrow mb-2",children:o.team_eyebrow}),(0,_e.jsx)("h2",{className:"font-display text-3xl sm:text-4xl font-extrabold tracking-tight",children:o.team_title||"Our Team"}),o.team_subtitle&&(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:o.team_subtitle})]}),(0,_e.jsxs)(da,{to:"/hosts",className:"inline-flex items-center gap-2 text-sm font-semibold text-slate-300 hover:text-white whitespace-nowrap","data-testid":"team-roster-link",children:[(0,_e.jsx)(xh,{size:18,className:"text-sky-400"})," Full roster"]})]}),n&&0===n.length?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"team-empty",children:"Add podcasters in the admin dashboard."}):(0,_e.jsxs)(_e.Fragment,{children:[!x&&(0,_e.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","data-testid":"team-skeleton",children:[...Array(8)].map((e,t)=>(0,_e.jsx)(ph,{className:"aspect-[3/4] rounded-2xl bg-white/5"},t))}),n&&(0,_e.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 ".concat(x?"":"invisible h-0 overflow-hidden"),"data-testid":"team-grid",children:n.map((e,t)=>(0,_e.jsxs)("article",{className:"on-dark group relative aspect-[3/4] rounded-2xl overflow-hidden card-surface ".concat(x?"reveal":""),style:{animationDelay:"".concat(60*t,"ms")},"data-testid":"team-member-card-".concat(t),children:[(0,_e.jsxs)(da,{to:"/hosts/".concat(e.slug),className:"absolute inset-0","aria-label":"View ".concat(e.name,"'s profile"),"data-testid":"team-member-link-".concat(t),children:[e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:e.name,onLoad:f,onError:f,className:"absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"eager"}):(0,_e.jsx)("div",{className:"absolute inset-0 bg-[#053671]"}),(0,_e.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-[#070F1E] via-[#070F1E]/60 to-transparent"})]}),(0,_e.jsxs)("div",{className:"absolute inset-x-0 bottom-0 p-4",children:[(0,_e.jsx)("p",{className:"text-[11px] font-mono uppercase tracking-widest text-sky-400",children:e.role}),(0,_e.jsx)(da,{to:"/hosts/".concat(e.slug),className:"block font-display font-bold text-lg leading-tight hover:text-sky-300 transition-colors","data-testid":"team-member-name-".concat(t),children:e.name}),e.show&&(0,_e.jsx)(da,{to:"/shows/".concat(e.show.slug),className:"text-xs text-slate-300 hover:text-white",children:e.show.name}),e.latest_episode&&(0,_e.jsxs)("button",{onClick:()=>r(e.latest_episode),className:"mt-3 w-full flex items-center gap-2 rounded-lg bg-white/10 hover:bg-sky-400 hover:text-[#070F1E] px-2.5 py-2 text-left transition-colors","data-testid":"team-member-latest-".concat(t),children:[(0,_e.jsx)(ti,{size:12,fill:"currentColor",className:"shrink-0"}),(0,_e.jsx)("span",{className:"text-xs font-semibold truncate",children:e.latest_episode.title})]})]})]},e.id))})]})]})},bh=Jo("mic-vocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]),yh=Jo("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),wh=e=>{let t=e.size,n=void 0===t?120:t,a=e.className,s=void 0===a?"":a,r=e.id,o=void 0===r?"cd":r,i=e.solid;return(0,_e.jsxs)("svg",{width:n,height:1.25*n,viewBox:"0 0 100 125",className:s,"aria-hidden":"true",children:[(0,_e.jsx)("defs",{children:(0,_e.jsxs)("linearGradient",{id:"".concat(o,"-fill"),x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,_e.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF"}),(0,_e.jsx)("stop",{offset:"100%",stopColor:"#FBCFE8"})]})}),(0,_e.jsx)("text",{x:"50",y:"98",textAnchor:"middle",fontFamily:"'Arial Black', 'Helvetica Neue', Impact, sans-serif",fontWeight:"900",fontSize:"120",fill:i||"url(#".concat(o,"-fill)"),stroke:i||"#2A0A21",strokeWidth:"8",strokeLinejoin:"round",paintOrder:"stroke fill",children:"$"})]})},jh=e=>{let t=e.to,n=e.testId,a=e.accent,s=e.children;return(0,_e.jsx)(da,{to:t,className:"on-dark group relative flex flex-col overflow-hidden rounded-3xl border grain transition-transform duration-300 hover:-translate-y-1 ".concat(a),"data-testid":n,children:s})},kh=()=>{var e,t,n,a;const s=qo().homepage,r=s.survey_prize||"$100";return(0,_e.jsx)("section",{className:"max-w-[1400px] mx-auto px-5 sm:px-8 pb-14","data-testid":"join-cta-section",children:(0,_e.jsxs)("div",{className:"grid md:grid-cols-2 gap-6",children:[(0,_e.jsxs)(jh,{to:"/join",testId:"join-cta-button",accent:"border-sky-400/20 bg-[#053671] hover:border-sky-400/50",children:[(0,_e.jsx)("div",{className:"absolute -top-32 -right-20 h-72 w-72 rounded-full bg-sky-4
200/25 blur-3xl pointer-events-none transition-transform duration-500 group-hover:scale-125"}),(0,_e.jsx)(hi,{size:220,className:"absolute -right-12 -bottom-16 opacity-[0.08] rotate-12 pointer-events-none hidden md:block !ring-0 !shadow-none"}),(0,_e.jsxs)("div",{className:"relative flex flex-1 flex-col p-8 sm:p-10",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3 !text-sky-200",children:null!==(e=s.cta_eyebrow)&&void 0!==e?e:"Podcasters wanted"}),(0,_e.jsx)("h2",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight leading-[1.05]","data-testid":"join-cta-title",children:s.cta_title||"Join Underdog Podcasts"}),(0,_e.jsx)("p",{className:"mt-4 text-slate-200 leading-relaxed","data-testid":"join-cta-text",children:null!==(t=s.cta_text)&&void 0!==t?t:"Bring your podcast to a network built for independent voices. Keep your show, your feed and your voice \u2014 we'll add distribution across 50+ shows, cross-promotion on YouTube and social, and a community of hosts who have your back."}),(0,_e.jsxs)("span",{className:"mt-8 inline-flex items-center gap-3 self-start rounded-full bg-white text-[#053671] px-6 py-3.5 font-display font-extrabold text-base shadow-xl shadow-black/30 transition-colors duration-200 group-hover:bg-sky-300 whitespace-nowrap","data-testid":"join-cta-pill",children:[(0,_e.jsx)(bh,{size:20})," ",s.cta_button||"Pitch your show"," ",(0,_e.jsx)(yh,{size:18,className:"transition-transform duration-200 group-hover:translate-x-1"})]})]})]}),!1!==s.survey_enabled&&(0,_e.jsxs)(jh,{to:"/survey",testId:"survey-cta-button",accent:"border-rose-400/25 bg-[#3B0E2E] hover:border-rose-400/60",children:[(0,_e.jsx)("div",{className:"absolute -top-28 -left-16 h-72 w-72 rounded-full bg-rose-500/30 blur-3xl pointer-events-none transition-transform duration-500 group-hover:scale-125"}),(0,_e.jsx)("div",{className:"absolute -bottom-24 -right-10 h-60 w-60 rounded-full bg-amber-400/20 blur-3xl pointer-events-none"}),(0,_e.jsxs)("div",{className:"absolute right-4 bottom-2 hidden md:flex items-end pointer-events-none select-none opacity-[0.22] transition-all duration-500 group-hover:opacity-40 group-hover:scale-105","data-testid":"survey-cta-dollars",children:[(0,_e.jsx)(wh,{id:"cd1",size:62,className:"-rotate-[18deg] translate-y-3"}),(0,_e.jsx)(wh,{id:"cd2",size:96,className:"-mx-3 -rotate-6 -translate-y-4"}),(0,_e.jsx)(wh,{id:"cd3",size:72,className:"rotate-[14deg] translate-y-2"})]}),(0,_e.jsxs)("div",{className:"relative flex flex-1 flex-col p-8 sm:p-10",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3 !text-rose-200",children:null!==(n=s.survey_card_eyebrow)&&void 0!==n?n:"Listeners \xb7 win ".concat(r)}),(0,_e.jsx)("h2",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight leading-[1.05]","data-testid":"survey-cta-title",children:s.survey_card_title||"Take our listener survey"}),(0,_e.jsx)("p",{className:"mt-4 text-slate-200 leading-relaxed","data-testid":"survey-cta-text",children:null!==(a=s.survey_card_text)&&void 0!==a?a:"Tell us what you love, what you'd change and what you want more of. It takes about five minutes, and every completed survey is entered to win ".concat(r,".")}),(0,_e.jsxs)("span",{className:"mt-8 inline-flex items-center gap-3 self-start rounded-full bg-white text-[#3B0E2E] px-6 py-3.5 font-display font-extrabold text-base shadow-xl shadow-black/30 transition-colors duration-200 group-hover:bg-rose-200 whitespace-nowrap","data-testid":"survey-cta-pill",children:[(0,_e.jsx)(wh,{id:"cd-btn",size:18,solid:"#3B0E2E"})," ",s.survey_card_button||"Take the survey"," ",(0,_e.jsx)(yh,{size:18,className:"transition-transform duration-200 group-hover:translate-x-1"})]})]})]})]})})},Nh=Jo("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]),Sh=()=>{const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!0),o=(0,De.A)(r,2),i=o[0],l=o[1],c=qo().homepage,d=()=>{l(!0),Eo.get("/episodes/picks").then(e=>a(e.data)).catch(()=>a([])).finally(()=>l(!1))};return(0,s.useEffect)(()=>{d()},[]),!1!==c.pick_enabled&&(i||null!==n&&void 0!==n&&n.length)?(0,_e.jsxs)("section",{id:"pick",className:"max-w-[1400px] mx-auto px-5 sm:px-8 pb-16","data-testid":"random-pick-section",children:[(0,_e.jsxs)("div",{className:"flex items-end justify-between gap-4 mb-6",children:[(0,_e.jsxs)("div",{children:[c.pick_eyebrow&&(0,_e.jsx)("p",{className:"eyebrow mb-2",children:c.pick_eyebrow}),(0,_e.jsx)("h2",{className:"font-display text-3xl sm:text-4xl font-extrabold tracking-tight","data-testid":"random-pick-title",children:c.pick_title||"Try These First"})]}),(0,_e.jsxs)("button",{onClick:d,disabled:i,className:"inline-flex items-center gap-2 rounded-full border border-white/15 bg-white/5 px-4 py-2 text-sm font-semibold text-slate-200 hover:bg-white/10 hover:text-white transition-colors disabled:opacity-50","data-testid":"random-pick-shuffle",children:[(0,_e.jsx)(Nh,{size:15,className:i?"animate-spin":""})," Other Great Options"]})]}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4","data-testid":"random-pick-grid",children:i&&!n?[...Array(3)].map((e,t)=>(0,_e.jsx)(ph,{className:"h-36 rounded-2xl bg-white/5"},t)):n.map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t+1},e.id))})]}):null};function Ah(){return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"home-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1",children:[(0,_e.jsx)(fh,{}),(0,_e.jsx)(gh,{}),(0,_e.jsx)(vh,{}),(0,_e.jsx)(kh,{}),(0,_e.jsx)(Sh,{})]}),(0,_e.jsx)(Ai,{})]})}const _h=Jo("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Ch=Jo("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Eh=Jo("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ph=["class","className"],Mh=e=>"boolean"===typeof e?"".concat(e):0===e?"0":e,Rh=Bd,Oh=(e,t)=>n=>{var a;
2if(null==(null===t||void 0===t?void 0:t.variants))return Rh(e,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className);const s=t.variants,r=t.defaultVariants,o=Object.keys(s).map(e=>{const t=null===n||void 0===n?void 0:n[e],a=null===r||void 0===r?void 0:r[e];if(null===t)return null;const o=Mh(t)||Mh(a);return s[e][o]}),l=n&&Object.entries(n).reduce((e,t)=>{let n=(0,De.A)(t,2),a=n[0],s=n[1];return void 0===s||(e[a]=s),e},{}),c=null===t||void 0===t||null===(a=t.compoundVariants)||void 0===a?void 0:a.reduce((e,t)=>{let n=t.class,a=t.className,s=(0,Pe.A)(t,Ph);return Object.entries(s).every(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return Array.isArray(a)?a.includes((0,i.A)((0,i.A)({},r),l)[n]):(0,i.A)((0,i.A)({},r),l)[n]===a})?[...e,n,a]:e},[]);return Rh(e,o,c,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className)},zh=["className","variant","size","asChild"],Th=Oh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Dh=s.forwardRef((e,t)=>{let n=e.className,a=e.variant,s=e.size,r=e.asChild,o=void 0!==r&&r,l=(0,Pe.A)(e,zh);const c=o?nl:"button";return(0,_e.jsx)(c,(0,i.A)({className:Ku(Th({variant:a,size:s,className:n})),ref:t},l))});Dh.displayName="Button";const Lh=Jo("earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Fh=Jo("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),Ih=Jo("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]),Uh=Jo("skip-forward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]),Bh=Jo("plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]),Wh=Jo("footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]),qh=Jo("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),Hh=Jo("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]),Vh=Jo("trophy",[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]]),Yh=Jo("landmark",[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]]),$h=Jo("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]),Qh=Jo("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Kh=["className","type"],Gh=s.forwardRef((e,t)=>
2{let n=e.className,a=e.type,s=(0,Pe.A)(e,Kh);return(0,_e.jsx)("input",(0,i.A)({type:a,className:Ku("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:t},s))});Gh.displayName="Input";var Xh=s.forwardRef((e,t)=>(0,_e.jsx)(ll.label,(0,i.A)((0,i.A)({},e),{},{ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));Xh.displayName="Label";var Jh=Xh;const Zh=["className"],em=Oh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),tm=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,Zh);return(0,_e.jsx)(Jh,(0,i.A)({ref:t,className:Ku(em(),n)},a))});tm.displayName=Jh.displayName;const nm=["className"],am=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,nm);return(0,_e.jsx)("textarea",(0,i.A)({className:Ku("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:t},a))});am.displayName="Textarea";const sm={club:"",why:"",name:"",email:"",links:""},rm=e=>{let t=e.show;const n=(0,s.useState)(!1),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(sm),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(e,t)=>u(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t}));return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)(Dh,{type:"button",onClick:()=>o(!0),className:"rounded-full bg-amber-400 text-[#070F1E] font-bold hover:bg-amber-300 px-5","data-testid":"suggest-club-button",children:[(0,_e.jsx)($h,{size:16,className:"mr-2"})," Suggest a Club"]}),(0,_e.jsx)(th,{open:r,onOpenChange:o,children:(0,_e.jsxs)(sh,{className:"sm:max-w-lg bg-[#0B1A33] border-white/10 text-white","data-testid":"suggest-club-dialog",children:[(0,_e.jsxs)(rh,{children:[(0,_e.jsx)(oh,{className:"font-display text-2xl font-extrabold",children:"Suggest a club"}),(0,_e.jsxs)(ih,{className:"text-slate-400",children:["Know a club with a story worth telling? Tell us which one and why \u2014 it might be the next episode of ",t.name,"."]})]}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),f(!0);try{await Eo.post("/join",{kind:"club",name:d.name,email:d.email,show_name:d.club,subject:t.name,pitch:d.why,links:d.links}),Ta.success("Thanks \u2014 ".concat(d.club," is on the list!")),u(sm),o(!1)}catch(cS){Ta.error(Mo(cS))}finally{f(!1)}},className:"space-y-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Club *"}),(0,_e.jsx)(Gh,{required:!0,maxLength:200,value:d.club,onChange:e=>g("club",e.target.value),placeholder:"e.g. Union Berlin",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"suggest-club-name"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Why this club? *"}),(0,_e.jsx)(am,{required:!0,minLength:10,maxLength:2e3,rows:4,value:d.why,onChange:e=>g("why",e.target.value),placeholder:"What makes them special \u2014 the fans, the history, the ground, a moment\u2026",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"suggest-club-why"})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Your name *"}),(0,_e.jsx)(Gh,{required:!0,minLength:2,maxLength:120,value:d.name,onChange:e=>g("name",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"suggest-club-your-name"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Email *"}),(0,_e.jsx)(Gh,{required:!0,type:"email",maxLength:200,value:d.email,onChange:e=>g("email",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"suggest-club-email"})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Links ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(optional)"})]}),(0,_e.jsx)(Gh,{maxLength:1e3,value:d.links,onChange:e=>g("links",e.target.value),placeholder:"Club site, article, video\u2026",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"suggest-club-links"})]}),(0,_e.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,_e.jsx)(Dh,{type:"button",variant:"ghost",onClick:()=>o(!1),className:"rounded-full hover:bg-white/10",children:"Cancel"}),(0,_e.jsxs)(Dh,{type:"submit",disabled:p,className:"rounded-full bg-amber-400 text-[#070F1E] font-bold hover:bg-amber-300 px-5","data-testid":"suggest-club-submit",children:[(0,_e.jsx)(Qh,{size:15,className:"mr-2"})," ",p?"Sending\u2026":"Send suggestion"]})]})]})]})})]})},om=(0,s.lazy)(()=>n.e(583).then(n.bind(n,583))),im=900,lm=2600,cm=e=>{let t=e.show;
2const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(null),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(""),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)({w:600,h:520}),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useRef)(null),w=(0,s.useRef)(null),j=(0,s.useRef)(null),k=Uo(),N=k.current,S=k.playing,A=k.play,_=fa(),C=(0,De.A)(_,2),E=C[0],P=C[1],M=(0,s.useState)(!1),R=(0,De.A)(M,2),O=R[0],z=R[1],T=(0,s.useState)(null),D=(0,De.A)(T,2),L=D[0],F=D[1],I=(0,s.useState)(!1),U=(0,De.A)(I,2),B=U[0],W=U[1],q=(0,s.useState)(null),H=(0,De.A)(q,2),V=H[0],Y=H[1],$=(0,s.useRef)({id:null,until:0}),Q=(0,s.useRef)(!1),K=(0,s.useState)(null),G=(0,De.A)(K,2),X=G[0],J=G[1],Z=(0,s.useRef)(null===N||void 0===N?void 0:N.id);(0,s.useEffect)(()=>{Eo.get("/shows/".concat(t.slug,"/club-map")).then(e=>o(e.data)).catch(()=>o({pins:[]}))},[t.slug]),(0,s.useEffect)(()=>{const e=y.current;if(!e)return;const t=new ResizeObserver(()=>b({w:e.clientWidth,h:Math.max(460,Math.min(680,Math.round(.78*e.clientWidth)))}));return t.observe(e),()=>t.disconnect()},[r]),(0,s.useEffect)(()=>{const e=w.current;e&&O&&(e.controls().autoRotate=!d,e.controls().autoRotateSpeed=.6,e.controls().enableZoom=!0,e.controls().zoomSpeed=1.4,d&&$.current.id!==d.id&&($.current={id:null,until:0},F(null),W(!1),e.pointOfView({lat:d.latitude,lng:d.longitude,altitude:Q.current?.18:.3},Q.current?1800:1100)))},[d,O]);const ee=e=>{const t=w.current;if(!t||!O)return;const n="stadium"===e.geo_precision;if($.current={id:e.id,until:Date.now()+im+lm+400},J(null),u(e),W(!1),t.controls().autoRotate=!1,t.pointOfView({lat:e.latitude,lng:e.longitude,altitude:.7},im),setTimeout(()=>{w.current&&$.current.id===e.id&&(w.current.pointOfView({lat:e.latitude,lng:e.longitude,altitude:n?6e-4:.015},lm),F({pin:e,close:n}))},950),n&&null!==r&&void 0!==r&&r.street_view_key){const t=Eo.get("/club-map/street-view",{params:{lat:e.latitude,lng:e.longitude}}).then(e=>e.data).catch(()=>({available:null}));Y({id:e.id,available:null,pano_id:null}),t.then(t=>{$.current.id===e.id&&Y((0,i.A)({id:e.id},t))}),setTimeout(async()=>{const n=await t;$.current.id===e.id&&!1!==n.available&&W(!0)},3800)}},te=(0,s.useMemo)(()=>((null===r||void 0===r?void 0:r.pins)||[]).filter(e=>null!=e.latitude&&null!=e.longitude),[r]);(0,s.useEffect)(()=>{var e;if(!S||!N||!O||N.id===Z.current)return;const t=te.find(e=>{var t;return(null===(t=e.episode)||void 0===t?void 0:t.id)===N.id});t&&$.current.id!==t.id&&(ee(t),null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}))},[null===N||void 0===N?void 0:N.id,S,O,te]),(0,s.useEffect)(()=>{const e=E.get("club");if(!e||!te.length)return;const t=te.find(t=>t.id===e);t&&(u(t),setTimeout(()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.scrollIntoView({behavior:"smooth",block:"start"})},300)),P({},{replace:!0})},[te]);const ne=(0,s.useMemo)(()=>{const e=p.trim().toLowerCase();return e?te.filter(t=>[t.club_name,t.city,t.country,t.current_league].join(" ").toLowerCase().includes(e)):[]},[te,p]),ae=(0,s.useMemo)(()=>{const e=[...te],t=[];let n=e.shift();for(;n;){t.push(n);let a=-1,s=1/0;e.forEach((e,t)=>{const r=Math.hypot(e.latitude-n.latitude,(e.longitude-n.longitude+540)%360-180);r<s&&(s=r,a=t)}),n=a>=0?e.splice(a,1)[0]:null}return t},[te]),se=null!=X;Q.current=se;const re=()=>J(null);(0,s.useEffect)(()=>{if(null==X||!ae.length)return;$.current={id:null,until:0},F(null),W(!1),u(ae[X%ae.length]);const e=setTimeout(()=>J(e=>null==e?null:e+1),7e3);return()=>clearTimeout(e)},[X,ae]);const oe=e=>{re(),u(e)};if(!r)return(0,_e.jsx)("div",{className:"mt-14 h-[420px] rounded-3xl bg-white/5 animate-pulse","data-testid":"club-globe-loading"});if(0===te.length)return(0,_e.jsxs)("section",{className:"mt-14 card-surface rounded-3xl p-8 flex items-center gap-4","data-testid":"club-globe-pending",children:[(0,_e.jsx)(Lh,{size:28,className:"text-sky-400 shrink-0 animate-pulse"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-display text-lg font-bold",children:"The club atlas is being drawn"}),(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"We're pinning every club from the archive onto the globe \u2014 check back in a few minutes."})]})]});const ie=e=>e.episode&&(null===N||void 0===N?void 0:N.id)===e.episode.id;return(0,_e.jsxs)("section",{ref:j,className:"mt-14 scroll-mt-24","data-testid":"club-globe-section",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4 mb-5",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-2",children:[(0,_e.jsx)(Lh,{size:12})," The club atlas"]}),(0,_e.jsxs)("h2",{className:"mt-1 font-display text-2xl sm:text-3xl font-extrabold","data-testid":"club-globe-title",children:[te.length," clubs and counting"]}),(0,_e.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Every club we've covered, pinned where it plays. Drag to spin, scroll to zoom, tap a pin to hear its story."})]}),(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,_e.jsx)("button",{type:"button",onClick:()=>se?re():J(0),className:"inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-bold transition-colors ".concat(se?"bg-rose-500 text-white hover:bg-rose-400":"border border-sky-400/40 text-sky-300 hover:bg-sky-400/10"),"data-testid":"club-globe-tour-toggle",children:se?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(Fh,{size:13,fill:"
2currentColor"})," Stop tour"]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(Ih,{size:15})," Tour the clubs"]})}),(0,_e.jsx)(rm,{show:t})]})]}),(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_360px] gap-5 items-start",children:[(0,_e.jsxs)("div",{ref:y,className:"relative rounded-3xl overflow-hidden ring-1 ring-white/10 bg-[#03070F]",style:{height:v.h},"data-testid":"club-globe-canvas",children:[(0,_e.jsx)("div",{className:"absolute inset-0",onPointerDownCapture:()=>se&&re(),children:(0,_e.jsx)(s.Suspense,{fallback:(0,_e.jsx)("div",{className:"absolute inset-0 grid place-items-center text-sm text-slate-400",children:"Loading globe\u2026"}),children:(0,_e.jsx)(om,{ref:w,width:v.w,height:v.h,backgroundColor:"rgba(0,0,0,0)",globeImageUrl:"//unpkg.com/three-globe/example/img/earth-blue-marble.jpg",globeTileEngineUrl:(e,t,n)=>"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/".concat(n,"/").concat(t,"/").concat(e),globeTileEngineMaxLevel:19,onGlobeReady:()=>{var e;z(!0),null===(e=w.current)||void 0===e||e.pointOfView({lat:25,lng:0,altitude:1.9},0)},onZoom:e=>{let t=e.altitude;$.current.id&&t>.25&&Date.now()>$.current.until&&($.current={id:null,until:0},F(null),W(!1))},showAtmosphere:!0,atmosphereColor:"#38bdf8",atmosphereAltitude:.16,htmlElementsData:te,htmlLat:"latitude",htmlLng:"longitude",htmlAltitude:0,htmlTransitionDuration:0,htmlElement:e=>dm(e,(null===d||void 0===d?void 0:d.id)===e.id,ie(e),()=>oe(e)),ringsData:d?[d]:[],ringLat:"latitude",ringLng:"longitude",ringAltitude:.003,ringColor:()=>e=>"rgba(251,191,36,".concat(.9-e,")"),ringMaxRadius:2.5,ringPropagationSpeed:1.5,ringRepeatPeriod:1e3})})}),(0,_e.jsxs)("p",{className:"absolute bottom-2 right-3 text-[10px] text-slate-500 pointer-events-none transition-opacity ".concat("opacity-100"),children:["Imagery \xa9 ",(0,_e.jsx)("a",{href:"https://www.esri.com/",className:"pointer-events-auto hover:text-slate-300",target:"_blank",rel:"noreferrer",children:"Esri"}),", Maxar, Earthstar Geographics"]}),se&&(0,_e.jsxs)("div",{className:"absolute left-3 bottom-3 z-20 flex items-center gap-2 rounded-full bg-[#0B1A33]/90 backdrop-blur border border-sky-400/30 pl-3 pr-1.5 py-1.5 text-xs reveal","data-testid":"club-globe-tour-hud",children:[(0,_e.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,_e.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-sky-400 opacity-75"}),(0,_e.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-sky-400"})]}),(0,_e.jsxs)("span",{className:"text-slate-200",children:[(0,_e.jsx)("span",{className:"font-semibold",children:"Touring"})," \xb7 ",(0,_e.jsxs)("span",{"data-testid":"club-globe-tour-progress",children:[X%ae.length+1," of ",ae.length]})]}),(0,_e.jsxs)("button",{type:"button",onClick:()=>J(e=>e+1),className:"inline-flex items-center gap-1 rounded-full bg-white/10 px-2.5 py-1 font-semibold hover:bg-white/20","data-testid":"club-globe-tour-next",children:[(0,_e.jsx)(Uh,{size:12})," Next"]}),(0,_e.jsx)("button",{type:"button",onClick:re,className:"rounded-full bg-white/10 px-2.5 py-1 font-semibold hover:bg-white/20","data-testid":"club-globe-tour-stop",children:"Stop"})]}),L&&(0,_e.jsxs)("div",{className:"absolute left-3 bottom-3 z-20 flex items-center gap-2 rounded-full bg-[#0B1A33]/90 backdrop-blur border border-amber-400/30 pl-3 pr-1.5 py-1.5 text-xs reveal","data-testid":"club-globe-landing",children:[(0,_e.jsx)(Bh,{size:13,className:"text-amber-400 shrink-0"}),(0,_e.jsxs)("span",{className:"text-slate-200 truncate max-w-[220px]",children:[(0,_e.jsx)("span",{className:"font-semibold",children:L.close?L.pin.stadium||L.pin.club_name:L.pin.city||L.pin.club_name}),L.close?B?" \xb7 street view":" \xb7 satellite view":" \xb7 city view"]}),L.close&&r.street_view_key&&((null===V||void 0===V?void 0:V.id)===L.pin.id&&!1===V.available?(0,_e.jsx)("span",{className:"rounded-full bg-white/5 px-2.5 py-1 text-slate-400","data-testid":"club-globe-street-view-none",children:"No Street View here"}):(0,_e.jsxs)("button",{type:"button",onClick:()=>W(e=>!e),className:"inline-flex items-center gap-1 rounded-full px-2.5 py-1 font-semibold ".concat(B?"bg-amber-400 text-[#070F1E] hover:bg-amber-300":"bg-white/10 hover:bg-white/20"),"data-testid":"club-globe-street-view-toggle",children:[(0,_e.jsx)(Wh,{size:12})," ",B?"Satellite":"Street View"]})),(0,_e.jsx)("button",{type:"button",onClick:()=>{var e;const t=d;$.current={id:null,until:0},F(null),W(!1),t&&(null===(e=w.current)||void 0===e||e.pointOfVie
2w({lat:t.latitude,lng:t.longitude,altitude:.3},1500))},className:"rounded-full bg-white/10 px-2.5 py-1 font-semibold hover:bg-white/20","data-testid":"club-globe-fly-out",children:"Fly back out"})]}),B&&L&&(0,_e.jsxs)("div",{className:"absolute inset-0 z-10 bg-[#03070F] reveal","data-testid":"club-globe-street-view",children:[(0,_e.jsx)("iframe",{title:"Street View \xb7 ".concat(L.pin.stadium||L.pin.club_name),src:"https://www.google.com/maps/embed/v1/streetview?".concat(new URLSearchParams((0,i.A)((0,i.A)({key:r.street_view_key},(null===V||void 0===V?void 0:V.id)===L.pin.id&&V.pano_id?{pano:V.pano_id}:{location:"".concat(L.pin.latitude,",").concat(L.pin.longitude)}),{},{fov:"90",pitch:"5"}))),className:"h-full w-full border-0",allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade","data-testid":"club-globe-street-view-frame"}),(0,_e.jsxs)("div",{className:"absolute left-3 top-3 flex items-center gap-2",children:[(0,_e.jsxs)("span",{className:"rounded-full bg-[#0B1A33]/90 backdrop-blur border border-white/10 px-3 py-1.5 text-xs text-slate-200",children:[(0,_e.jsx)("span",{className:"font-semibold",children:L.pin.stadium||L.pin.club_name})," \xb7 Street View"]}),(0,_e.jsx)("a",{href:"https://www.google.com/maps?layer=c&cbll=".concat(L.pin.latitude,",").concat(L.pin.longitude),target:"_blank",rel:"noreferrer",className:"rounded-full bg-[#0B1A33]/90 backdrop-blur border border-white/10 px-3 py-1.5 text-xs text-slate-300 hover:text-white","data-testid":"club-globe-street-view-external",children:"Open in Google Maps"})]}),(0,_e.jsxs)("button",{type:"button",onClick:()=>W(!1),className:"absolute right-3 top-3 inline-flex items-center gap-1.5 rounded-full bg-[#0B1A33]/90 backdrop-blur border border-white/10 px-3 py-1.5 text-xs font-semibold text-slate-200 hover:bg-white/10","data-testid":"club-globe-street-view-close",children:[(0,_e.jsx)(ai,{size:13})," Back to satellite"]})]}),(0,_e.jsxs)("div",{className:"absolute left-3 top-3 right-3 sm:right-auto sm:w-72",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2 rounded-full bg-[#0B1A33]/90 backdrop-blur border border-white/10 px-3 py-1.5",children:[(0,_e.jsx)(wi,{size:14,className:"text-slate-400 shrink-0"}),(0,_e.jsx)("input",{value:p,onChange:e=>f(e.target.value),placeholder:"Find a club, city or league\u2026",className:"bg-transparent text-sm outline-none flex-1 min-w-0 placeholder:text-slate-500","data-testid":"club-globe-search"}),p&&(0,_e.jsx)("button",{type:"button",onClick:()=>f(""),className:"text-slate-400 hover:text-white",children:(0,_e.jsx)(ai,{size:14})})]}),ne.length>0&&(0,_e.jsx)("ul",{className:"mt-1.5 max-h-56 overflow-auto rounded-2xl bg-[#0B1A33]/95 backdrop-blur border border-white/10 p-1 text-sm","data-testid":"club-globe-results",children:ne.slice(0,8).map(e=>(0,_e.jsx)("li",{children:(0,_e.jsxs)("button",{type:"button",onClick:()=>{oe(e),f("")},className:"w-full text-left rounded-xl px-3 py-2 hover:bg-white/10",children:[(0,_e.jsx)("span",{className:"font-semibold",children:e.club_name})," ",(0,_e.jsxs)("span",{className:"text-slate-400",children:["\xb7 ",[e.city,e.country].filter(Boolean).join(", ")]})]})},e.id))})]})]}),(0,_e.jsx)(pm,{pin:d,show:t,count:te.length,onClose:()=>{re(),$.current={id:null,until:0},F(null),W(!1),u(null)},playing:d&&ie(d)&&S,onPlay:()=>{null!==d&&void 0!==d&&d.episode&&(ie(d)&&S||ee(d),A((0,i.A)((0,i.A)({},d.episode),{},{show:{name:t.name,slug:t.slug,cover_url:t.cover_url}})))}})]})]})},dm=(e,t,n,a)=>{const s=document.createElement("div");s.className="club-anchor";const r=document.createElement("button");return r.type="button",r.className="club-marker"+(t?" is-active":"")+(n?" is-playing":""),r.setAttribute("aria-label",e.club_name),r.setAttribute("data-testid","club-marker-".concat(e.id)),r.innerHTML=e.logo_url?'<span class="club-marker-crest"><img src="'.concat(Po(e.logo_url),'" alt="" loading="lazy" onerror="this.parentNode.classList.add(\'no-img\')"/></span><span class="club-marker-tip"></span>'):'<span class="club-marker-dot"></span><span class="club-marker-tip"></span>',r.title="".concat(e.club_name).concat(e.city?" \xb7 "+e.city:""),r.oncl
2ick=e=>{e.stopPropagation(),a()},s.appendChild(r),s},um=e=>{let t=e.icon,n=e.label,a=e.value,s=e.testId;return a?(0,_e.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,_e.jsx)(t,{size:15,className:"mt-0.5 shrink-0 text-sky-400"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:n}),(0,_e.jsx)("p",{className:"text-sm text-slate-200","data-testid":s,children:a})]})]}):null},hm=(e,t)=>"We covered ".concat(e.club_name," on ").concat(t.name," \ud83c\udf99\ufe0f"),mm=e=>{let t=e.pin,n=e.show;const a=(0,s.useState)(!1),r=(0,De.A)(a,2),o=r[0],i=r[1],l=(e=>"".concat("https://underdogpodcasts.com","/api/share/clubs/").concat(e.id))(t),c=async()=>{try{await navigator.clipboard.writeText(l),i(!0),Ta.success("Link copied \u2014 paste it anywhere"),setTimeout(()=>i(!1),2e3)}catch(e){window.prompt("Copy this link",l)}},d="https://twitter.com/intent/tweet?".concat(new URLSearchParams({text:hm(t,n),url:l})),u="https://www.facebook.com/sharer/sharer.php?".concat(new URLSearchParams({u:l}));return(0,_e.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2","data-testid":"club-card-share",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500 mr-1",children:"Share this pin"}),(0,_e.jsxs)("button",{type:"button",onClick:c,className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 px-3 py-1.5 text-xs font-semibold hover:bg-white/10","data-testid":"club-card-copy-link",children:[o?(0,_e.jsx)(Mi,{size:13,className:"text-emerald-400"}):(0,_e.jsx)(Ri,{size:13})," ",o?"Copied":"Copy link"]}),(0,_e.jsxs)("a",{href:d,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 px-3 py-1.5 text-xs font-semibold hover:bg-white/10","data-testid":"club-card-share-x",children:[(0,_e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M18.9 2H22l-7.5 8.6L23 22h-6.8l-5.3-6.9L4.8 22H1.7l8-9.2L.5 2h7l4.8 6.3L18.9 2zm-1.2 18h1.9L7.4 3.9H5.4L17.7 20z"})})," Post on X"]}),(0,_e.jsxs)("a",{href:u,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 px-3 py-1.5 text-xs font-semibold hover:bg-white/10","data-testid":"club-card-share-facebook",children:[(0,_e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:(0,_e.jsx)("path",{d:"M22 12a10 10 0 1 0-11.6 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7A10 10 0 0 0 22 12z"})})," Facebook"]}),(0,_e.jsxs)("button",{type:"button",onClick:async()=>{if(navigator.share)try{await navigator.share({title:"".concat(t.club_name," \xb7 ").concat(n.name),text:hm(t,n),url:l})}catch(e){}else c()},className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 px-3 py-1.5 text-xs font-semibold hover:bg-white/10 sm:hidden","data-testid":"club-card-share-native",children:[(0,_e.jsx)(Pi,{size:13})," More"]})]})},pm=e=>{let t=e.pin,n=e.show,a=e.count,s=e.onClose,r=e.playing,o=e.onPlay;return t?(0,_e.jsxs)("aside",{className:"card-surface rounded-3xl p-6 lg:min-h-[420px] flex flex-col reveal","data-testid":"club-card",children:[(0,_e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,_e.jsxs)("div",{className:"min-w-0 flex items-start gap-4",children:[t.logo_url?(0,_e.jsx)("img",{src:Po(t.logo_url),alt:"".concat(t.club_name," crest"),className:"h-20 w-20 shrink-0 object-contain drop-shadow-[0_6px_16px_rgba(0,0,0,.5)]","data-testid":"club-card-logo"}):(0,_e.jsx)("div",{className:"h-20 w-20 shrink-0 rounded-2xl bg-[#053671] grid place-items-center font-display text-xl font-black text-sky-200","data-testid":"club-card-logo-fallback",children:t.club_name.split(" ").filter(Boolean).slice(0,2).map(e=>e[0]).join("")}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsx)("p",{className:"eyebrow",children:"defunct"===t.status?"Defunct club":"Club"}),(0,_e.jsx)("h3",{className:"mt-1 font-display text-2xl font-extrabold leading-tight","data-testid":"club-card-name",children:t.club_name}),t.nickname&&(0,_e.jsxs)("p",{className:"text-sm text-slate-400 italic",children:["\u201c",t.nickname,"\u201d"]})]})]}),(0,_e.jsx)("button",{type:"button",onClick:s,className:"rounded-full p-1.5 text-slate-400 hover:bg-white/10 hover:text-white","aria-label":"Close","data-testid":"club-card-close",children:(0,_e.jsx)(ai,{size:16})})]}),(0,_e.jsxs)("div",{className:"mt-5 grid grid-cols-2 gap-x-4 gap-y-3.5",children:[(0,_e.jsx)(um,{icon:Hh,label:"Founded",value:t.founded,testId:"club-card-founded"}),(0,_e.jsx)(um,{icon:Vh,label:"Current league",value:t.current_league,testId:"club-card-league"}),(0,_e.jsx)(um,{icon:Yh,label:"Stadium",value:t.stadium,testId:"club-card-stadium"}),(0,_e.jsx)(um,{icon:qh,label:"Location",value:[t.city,t.country].filter(
2Boolean).join(", "),testId:"club-card-location"})]}),t.blurb&&(0,_e.jsx)("p",{className:"mt-5 text-sm text-slate-300 leading-relaxed","data-testid":"club-card-blurb",children:t.blurb}),(0,_e.jsx)(mm,{pin:t,show:n}),t.episode&&(0,_e.jsxs)("div",{className:"mt-auto pt-5",children:[(0,_e.jsxs)("p",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:["Episode \xb7 ",Ro(t.episode.published_at)]}),(0,_e.jsx)("p",{className:"mt-1 text-sm font-semibold leading-snug","data-testid":"club-card-episode-title",children:t.episode.title}),(0,_e.jsxs)("button",{type:"button",onClick:o,className:"mt-3 inline-flex items-center gap-2 rounded-full bg-sky-400 px-5 py-2.5 text-sm font-bold text-[#070F1E] hover:bg-sky-300 transition-colors","data-testid":"club-card-play",children:[r?(0,_e.jsx)(ei,{size:15}):(0,_e.jsx)(ti,{size:15})," ",r?"Pause episode":"Play episode"]})]})]},t.id):(0,_e.jsxs)("aside",{className:"card-surface rounded-3xl p-6 lg:min-h-[420px] flex flex-col justify-center text-center","data-testid":"club-card-empty",children:[(0,_e.jsx)(qh,{size:28,className:"mx-auto text-sky-400"}),(0,_e.jsx)("p",{className:"mt-3 font-display text-lg font-bold",children:"Pick a pin"}),(0,_e.jsxs)("p",{className:"mt-1 text-sm text-slate-400",children:["Tap any glowing point on the globe to see the club's story and play its episode \u2014 ",a," to explore."]})]})};function fm(){var e,t,n;const a=nn().slug,r=(0,s.useState)(null),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)(!1),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(10),f=(0,De.A)(p,2),g=f[0],x=f[1];return(0,s.useEffect)(()=>{c(null),m(!1),x(10),Eo.get("/shows/".concat(a),{params:{limit:5e3}}).then(e=>c(e.data)).catch(()=>m(!0))},[a]),(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"show-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 pb-32",children:[(0,_e.jsxs)(da,{to:"/",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"show-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),h?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"show-not-found",children:"Show not found."}):l?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[3fr_1fr] gap-8 items-start",children:[(0,_e.jsxs)("div",{className:"grid ".concat("video"===l.kind?"md:grid-cols-[320px_1fr]":"md:grid-cols-[220px_1fr]"," gap-8 items-start"),children:[(0,_e.jsx)("img",{src:Po(l.cover_url),alt:l.name,className:"aspect-square w-full rounded-2xl object-cover ring-1 ring-white/10 shadow-2xl","data-testid":"show-cover"}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow mb-2",children:["video"===l.kind&&(0,_e.jsx)("span",{className:"mr-2 rounded-full bg-rose-500/15 px-2 py-0.5 text-rose-400",children:"Video series"}),"tiktok"===l.kind&&(0,_e.jsx)("span",{className:"mr-2 rounded-full bg-cyan-400/15 px-2 py-0.5 text-cyan-300",children:"TikTok"}),null!==(e=l.placements)&&void 0!==e&&e.length?l.placements.map(e=>[e.group,e.subgroup].filter(Boolean).join(" \xb7 ")).join("  /  "):l.category]}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"show-title",children:l.name}),l.host&&(0,_e.jsxs)("p",{className:"mt-3 text-slate-300 font-semibold",children:["Hosted by ",l.host]}),(0,_e.jsx)("p",{className:"mt-4 text-slate-400 leading-relaxed max-w-2xl","data-testid":"show-description",children:l.description}),(0,_e.jsxs)("div",{className:"mt-5 flex flex-wrap gap-3 text-sm",children:[(0,_e.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 font-mono text-xs text-slate-300","data-testid":"show-episode-count",children:[l.episode_count," ","audio"===l.kind?"episodes":"videos"]}),"tiktok"===l.kind&&l.tiktok_url&&(0,_e.jsxs)("a",{href:l.tiktok_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-full bg-white/5 px-3 py-1 text-xs text-slate-300 hover:text-white","data-testid":"show-tiktok-link",children:[(0,_e.jsx)(ri,{size:12,className:"text-cyan-300"})," @",l.tiktok_url.split("@")[1]||"tiktok"]}),"video"===l.kind&&l.youtube_playlist_id&&(0,_e.jsxs)("a",{href:"https://www.youtube.com/playlist?list=".concat(l.youtube_playlist_id),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-full bg-white/5 px-3 py-1 text-xs text-slate-300 hover:text-white","data-testid":"show-playlist-link",children:[(0,_e.jsx)(oi,{size:12,className:"text-rose-500"})," Playlist"]}),l.website&&(0,_e.jsxs)("a",{href:l.website,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1.5 rounded-full bg-white/5 px-3 py-1 text-xs text-slate-300 hover:text-white",children:[(0,_e.jsx)(Ch,{size:12})," Website"]})]})]})]}),(0,_e.jsxs)("aside",{className:"card-surface grain relative overflow-hidden rounded-3xl p-5","data-testid":"show-hosts-panel",children:[(0,_e.jsx)("p",{className:"eyebrow mb-4",children:(null===(t=l.hosts)||void 0===t?void 0:t.length)>1?"Your hosts":"Your host"}),null!==(n=l.hosts)&&void 0!==n&&n.length?(0,_e.jsx)("div",{className:"space-y-5",children:l.hosts.map((e,t)=>(0,_e.jsxs)(da,{to:"/hosts/".concat(e.slug),className:"group flex flex-col items-center text-center","data-testid":"show-host-".concat(t),children:[(0,_e.jsxs)("div",{className:"relative",children:[(0,_e.jsx)("div",{className:"absolute inset-0 rounded-full bg-sky-4
200/30 blur-xl"}),e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:e.name,className:"relative h-28 w-28 rounded-full object-cover ring-2 ring-sky-400/40 transition-transform duration-300 group-hover:scale-105"}):(0,_e.jsx)("div",{className:"relative h-28 w-28 rounded-full bg-[#053671] ring-2 ring-sky-400/40 flex items-center justify-center",children:(0,_e.jsx)(Eh,{size:36,className:"text-sky-200"})})]}),(0,_e.jsx)("p",{className:"mt-3 font-display font-bold text-lg leading-tight group-hover:text-sky-300 transition-colors","data-testid":"show-host-name-".concat(t),children:e.name}),(0,_e.jsx)("p",{className:"text-xs font-mono uppercase tracking-widest text-sky-400 mt-0.5",children:e.role}),e.bio&&(0,_e.jsx)("p",{className:"mt-2 text-xs text-slate-400 leading-relaxed",children:e.bio}),(0,_e.jsx)("span",{className:"mt-2 text-xs text-slate-500 group-hover:text-sky-300",children:"View profile \u2192"})]},e.id))}):(0,_e.jsxs)("div",{className:"flex flex-col items-center text-center","data-testid":"show-host-fallback",children:[(0,_e.jsx)("div",{className:"h-28 w-28 rounded-full bg-[#053671] ring-2 ring-white/10 flex items-center justify-center",children:(0,_e.jsx)(Eh,{size:36,className:"text-sky-200"})}),(0,_e.jsx)("p",{className:"mt-3 font-display font-bold text-lg leading-tight",children:l.host||"Host coming soon"}),(0,_e.jsx)("p",{className:"text-xs font-mono uppercase tracking-widest text-sky-400 mt-0.5",children:"Host"})]})]})]}),l.club_map&&(0,_e.jsx)(cm,{show:l}),(0,_e.jsx)("h2",{className:"mt-14 mb-5 font-display text-2xl font-extrabold",children:"Episodes"}),(0,_e.jsxs)("div",{className:"space-y-5","data-testid":"show-episode-list",children:[0===l.episodes.length&&(0,_e.jsx)("p",{className:"text-slate-400","data-testid":"show-no-episodes",children:"tiktok"===l.kind?"No TikToks yet \u2014 new clips appear here as they're added.":"No episodes yet \u2014 check back soon."}),l.episodes.slice(0,g).map((e,t)=>(0,_e.jsx)(uh,{episode:(0,i.A)((0,i.A)({},e),{},{show:l}),eyebrow:0===t?"Latest episode":Ro(e.published_at),showBadge:!1,testId:"show-episode-".concat(t),index:Math.min(t,6)},e.id))]}),g<l.episodes.length&&(0,_e.jsx)("div",{className:"mt-8 flex justify-center",children:(0,_e.jsx)(Dh,{onClick:()=>x(e=>e+10),variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 px-8","data-testid":"show-load-more",children:"Load more episodes"})})]}):(0,_e.jsx)(ph,{className:"h-72 rounded-3xl bg-white/5"})]}),(0,_e.jsx)(Ai,{})]})}const gm=(e,t)=>{let n=document.querySelector('meta[property="'.concat(e,'"]'));n||(n=document.createElement("meta"),n.setAttribute("property",e),document.head.appendChild(n)),n.setAttribute("content",t||"")};function xm(){var e;const t=nn().id,n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],i=(0,s.useState)(!1),l=(0,De.A)(i,2),c=l[0],d=l[1];return(0,s.useEffect)(()=>{o(null),d(!1),Eo.get("/episodes/".concat(t)).then(e=>o(e.data)).catch(()=>d(!0))},[t]),(0,s.useEffect)(()=>{var e,t;if(r)return document.title="".concat(r.title," \xb7 ").concat((null===(e=r.show)||void 0===e?void 0:e.name)||"Underdog Podcasts"),gm("og:title",r.title),gm("og:description",r.summary),gm("og:image",r.image_url||(null===(t=r.show)||void 0===t?void 0:t.cover_url)),gm("og:url",window.location.href),()=>{document.title="Underdog Podcasts"}},[r]),(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"episode-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 pb-32",children:[null!==r&&void 0!==r&&r.show?(0,_e.jsxs)(da,{to:"/shows/".concat(r.show.slug),className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"episode-back-link",children:[(0,_e.jsx)(_h,{size:16})," All ","audio"===r.show.kind?"episodes":"videos"," of ",r.show.name]}):(0,_e.jsxs)(da,{to:"/",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"episode-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),c?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"episode-not-found",children:"Episode not found."}):r?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(uh,{episode:r,eyebrow:Ro(r.published_at),testId:"episode",linkTitle:!1}),r.description&&r.description.length>(r.summary||"").length&&(0,_e.jsxs)("section",{className:"mt-10 grid lg:grid-cols-[1fr_320px] gap-8","data-testid":"episode-notes-section",children:[(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-6 sm:p-8",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:"Show notes"}),(0,_e.jsx)("p",{className:"whitespace-pre-line text-slate-300 leading-relaxed","data-testid":"episode-notes",children:r.description})]}),(0,_e.jsxs)("aside",{className:"card-surface rounded-3xl p-6 self-start",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:"Spread the word"}),(0,_e.jsxs)("p",{className:"text-sm text-slate-400 mb-4",children:["Share this ",r.video_id?"video":"episode"," with your audience \u2014 every listener counts."]}),(0,_e.jsx)(zi,{episode:r,size:"lg",testId:"episode-sidebar-share"})]})]}),(null===(e=r.more)||void 0===e?void 0:e.length)>0&&(0,_e.jsxs)("section",{className:"mt-14","data-testid":"episode-more-section",children:[(0,_e.jsxs)("h2",{className:"font-display text-2xl sm:text-3xl font-extrabold tracking-tight mb-6",children:["More from ",r.show.name]}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:r.more.map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t+1,showLink:!1},e.id))})]})]}):(0,_e.jsx)(ph,{className:"h-96 rounded-3xl bg-white/5"})]}),(0,_e.jsx)(Ai,{})]})}const vm=[["Who we are",'Underdog Podcasts ("we", "us") operates this website and the podcast network it represents. This policy explains what information we collect when you use the site, how we use it, and the choices you have.'],["Information we collect",'We collect information you give us directly \u2014 for example your name, email address and pitch details when you submit the "Join The Underdog" form. We also collect limited technical data automatically, such as your browser type, device, pages visited and approximate location derived from your IP address, to keep the site running and understand what content resonates.'],["How we use it","We use your information to respond to show pitches and enquiries, to operate, secure and improve the website, to remember your preferences (like light or dark mode), and to measure which episodes and videos are popular. We do not sell your personal information."],["Audio, video & embedded content","Episodes are streamed from our hosting partners' servers, and videos are embedded from YouTube and TikTok. When you play that content, those providers may receive your IP address and set their own cookies under their own privacy policies. We encourage you to review Google's and TikTok's policies."],["Cookies & local storage","We use a small number of first-party cookies and browser storage to keep admins signed in and to remember your display preferences. Embedded players may set third-party cookies as described above. You can clear or block cookies in your browser settings;
2 some features may stop working as a result."],["Sharing","We share information only with service providers that help us run the site (hosting, email delivery, media storage), when required by law, or to protect our rights and the safety of our community. Pitch submissions are shared with the Underdog Podcasts team responsible for programming."],["Retention","We keep pitch submissions and correspondence for as long as needed to evaluate and respond to them, and technical logs for a limited period for security and troubleshooting."],["Your choices & rights","You may ask us to access, correct or delete personal information you've provided by emailing us at the address below. Depending on where you live, you may have additional rights under local privacy laws, and we will honour them."],["Children","The site is not directed at children under 13 and we do not knowingly collect their personal information. If you believe a child has provided us data, contact us and we will delete it."],["Changes","We may update this policy from time to time. The date at the top reflects the latest revision; material changes will be highlighted on this page."]];function bm(){var e;const t=qo(),n=t.settings,a=t.pages,s=(null===n||void 0===n?void 0:n.notification_email)||"[email protected]",r=null!==(e=a.privacy_sections)&&void 0!==e&&e.length?a.privacy_sections:vm.map(e=>{let t=(0,De.A)(e,2);return{title:t[0],text:t[1]}});return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"privacy-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-3xl mx-auto px-5 sm:px-8 pt-8 pb-32",children:[(0,_e.jsxs)(da,{to:"/",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"privacy-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Legal"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"privacy-title",children:"Privacy Policy"}),(0,_e.jsxs)("p",{className:"mt-4 font-mono text-xs text-slate-500","data-testid":"privacy-updated",children:["Last updated ",a.privacy_updated||"June 2026"]}),(0,_e.jsxs)("div",{className:"mt-10 space-y-8",children:[r.map((e,t)=>{let n=e.title,a=e.text;return(0,_e.jsxs)("section",{className:"reveal",style:{animationDelay:"".concat(40*t,"ms")},"data-testid":"privacy-section-".concat(t),children:[(0,_e.jsx)("h2",{className:"font-display text-lg md:text-xl font-bold mb-2",children:n}),(0,_e.jsx)("p",{className:"text-slate-300 leading-relaxed whitespace-pre-line",children:a})]},t)}),(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"privacy-contact",children:[(0,_e.jsx)("h2",{className:"font-display text-lg md:text-xl font-bold mb-2",children:"Contact"}),(0,_e.jsxs)("p",{className:"text-slate-300 leading-relaxed",children:["Questions about this policy or your data? Email ",(0,_e.jsx)("a",{href:"mailto:".concat(s),className:"text-sky-400 hover:text-sky-300 font-semibold","data-testid":"privacy-email",children:s}),"."]})]})]})]}),(0,_e.jsx)(Ai,{})]})}const ym=Jo("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),wm="mt-1.5 bg-white/5 border-white/10",jm=e=>{let t=e.kind,n=e.title,a=e.fields,r=e.messageLabel,o=void 0===r?"Message":r,l=e.messagePlaceholder,c=e.submitLabel,d=void 0===c?"Send message":c,u=e.successText,h=e.testId,m=void 0===h?"inquiry":h;const p=(0,s.useState)(()=>Object.fromEntries([["name",""],["email",""],["pitch",""],...a.map(e=>[e.id,""])])),f=(0,De.A)(p,2),g=f[0],x=f[1],v=(0,s.useState)(!1),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useState)(!1),k=(0,De.A)(j,2),N=k[0],S=k[1],A=(e,t)=>x(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t}));return N?(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-10 text-center","data-testid":"".concat(m,"-success"),children:[(0,_e.jsx)(ym,{size:44,className:"mx-auto text-emerald-400"}),(0,_e.jsx)("h2",{className:"mt-4 font-display text-2xl font-extrabold",children:"Got it \u2014 thank you!"}),(0,_e.jsx)("p",{className:"mt-2 text-slate-400",children:u})]}):(0,_e.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),g.pitch.trim().length<10)return Ta.error("".concat(o," needs at least 10 characters"));w(!0);try{await Eo.post("/join",(0,i.A)((0,i.A)({},g),{},{kind:t})),S(!0)}catch(cS){Ta.error(Mo(cS))}finally{w(!1)}},className:"card-surface rounded-3xl p-6 sm:p-8 space-y-5","data-testid":"".concat(m,"-form"),children:[(0,_e.jsx)("h2",{className:"font-display text-2xl font-extrabold",children:n}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Your name *"}),(0,_e.jsx)(Gh,{required:!0,minLength:2,value:g.name,onChange:e=>A("name",e.target.value),className:wm,"data-testid":"".concat(m,"-name-input")})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Email *"}),(0,_e.jsx)(Gh,{required:!0,type:"email",value:g.email,onChange:e=>A("email",e.target.value),className:wm,"data-testid":"".concat(m,"-email-input")})]}),a.map(e=>(0,_e.jsxs)("div",{className:e.full?"sm:col-span-2":"",children:[(0,_e.jsxs)(tm,{children:[e.label,e.required?" *":""]}),e.options?(0,_e.jsxs)("select",{required:e.required,value:g[e.id],onChange:t=>A(e.id,t.target.value),className:"mt-1.5 w-full h-10 rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"".concat(m,"-").concat(e.id,"-input"),children:[(0,_e.jsx)("option",{value:"",children:"Select\u2026"}),e.options.map(e=>(0,_e.jsx)("option",{value:e,children:e},e))]}):(0,_e.jsx)(Gh,{required:e.required,value:g[e.id],onChange:t=>A(e.id,t.target.value),placeholder:e.placeholder,className:wm,"data-testid":"".concat(m,"-").concat(e.id,"-input")})]},e.id))]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:[o," *"]}),(0,_e.jsx)(am,{required:!0,rows:6,value:g.pitch,onChange:e=>A("pitch",e.target.value),placeholder:l,className:wm,"data-testid":"".concat(m,"-message-input")})]}),(0,_e.jsxs)(Dh,{type:"submit",disabled:y,className:"rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300 px-6","data-testid":"".concat(m,"-submit-button"),children:[(0,_e.jsx)(Qh,{size:16,className:"mr-2"})," ",y?"Sending\u2026":d]})]})};function km(){const e=qo(),t=e.pages,n=e.settings,a=(null===n||void 0===n?void 0:n.notification_email)||"[email protected]";return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"contact-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsx)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-10 pb-32",children:(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_1.2fr] gap-10 items-start",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:t.contact_eyebrow||"Say hello"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"contact-title",children:t.contact_title||"Contact us"}),(0,_e.jsx)("p",{className:"mt-6 text-slate-300 leading-relaxed max-w-xl","data-testid":"contact-intro",children:t.contact_intro}),(0,_e.jsxs)("div",{className:"mt-8 space-y-3 text-sm",children:[(0,_e.jsxs)("a",{href:"mailto:".concat(a),className:"flex items-center gap-3 card-surface rounded-2xl px-4 py-3 hover:text-sky-300 transition-colors","data-testid":"contact-email-link",children:[(0,_e.jsx)(Ei,{size:16,className:"text-sky-400"})," ",a]}),(0,_e.jsxs)("div",{className:"flex items-center gap-3 card-surface rounded-2xl px-4 py-3 text-slate-300",children:[(0,_e.jsx)(_i,{size:16,className:"text-sky-400"})," We usually reply within two business days"]}),(0,_e.jsxs)("div",{className:"flex items-center gap-3 card-surface rounded-2xl px-4 py-3 text-slate-300",children:[(0,_e.jsx)(qh,{size:16,className:"text-sky-400"})," Recording from studios and spare bedrooms everywhere"]})]}),(0,_e.jsx)("div",{className:"mt-6",children:(0,_e.jsx)(yi,{settings:n||{},size:18,className:"flex"})})]}),(0,_e.jsx)(jm,{kind:"contact",title:t.contact_form_title||"Send a message",testId:"contact",fields:[{id:"subject",label:"Subject",required:!0,full:!0,placeholder:"What's this about?"}],messagePlaceholder:"Tell us what's on your mind\u2026",successText:"Your message is in our inbox \u2014 we'll reply by email soon."})]})}),(0,_e.jsx)(Ai,{})]})}const Nm=Jo("megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]),Sm=Jo("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),Am=[Nm,Sm,Jo("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),Jo("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])],_m=["Under $1,000","$1,000 \u2013 $5,000","$5,000 \u2013 $20,000","$20,000+","Not sure yet"];function Cm(){const e=qo().pages,t=e.advertise_perks||[];return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"advertise-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsx)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-10 pb-32",children:(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_1.2fr] gap-10 items-start",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:e.advertise_eyebrow||"Partner with the pack"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"advertise-title",children:e.advertise_title||"Advertise with us"}),(0,_e.jsx)("p",{className:"mt-6 text-slate-300 leading-relaxed max-w-xl","data-testid":"advertise-intro",children:e.advertise_intro}),(0,_e.jsx)("div",{className:"mt-8 grid sm:grid-cols-2 gap-4",children:t.map((e,t)=>{let n=e.title,a=e.text;const s=Am[t%Am.length];return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-5 reveal",style:{animationDelay:"".concat(70*t,"ms")},"data-testid":"advertise-perk-".concat(t),children:[(0,_e.jsx)("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#053671] text-sky-300",children:(0,_e.jsx)(s,{size:18})}),(0,_e.jsx)("h3",{className:"mt-3 font-display font-bold",children:n}),(0,_e.jsx)("p",{className:"mt-1 text-sm text-slate-400 leading-relaxed",children:a})]},n+t)})})]}),(0,_e.jsx)(jm,{kind:"advertise",title:e.advertise_form_title||"Tell us about your campaign",testId:"advertise",fields:[{id:"company",label:"Company / brand",required:!0},{id:"budget",label:"Approximate budget",options:_m},{id:"links",label:"Website",full:!0,placeholder:"https://"}],messageLabel:"Campaign details",messagePlaceholder:"Goals, timing, shows or genres you're interested in\u2026",submitLabel:"Submit",successText:"Our partnerships team will be in touch with rates and availability."})]})}),(0,_e.jsx)(Ai,{})]})}const Em=Jo("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),Pm=Jo("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}
2]]),Mm=Jo("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Rm=Jo("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Om="mt-1.5 bg-white/5 border-white/10",zm=(e,t,n)=>{const a=t+n;if(a<0||a>=e.length)return e;const s=[...e];var r=[s[a],s[t]];return s[t]=r[0],s[a]=r[1],s},Tm=[{key:"contact",title:"Contact page",href:"/contact",fields:[["contact_eyebrow","Eyebrow"],["contact_title","Title"],["contact_intro","Intro paragraph","textarea"],["contact_form_title","Form title"]]},{key:"advertise",title:"Advertise page",href:"/advertise",fields:[["advertise_eyebrow","Eyebrow"],["advertise_title","Title"],["advertise_intro","Intro paragraph","textarea"],["advertise_form_title","Form title"]]}],Dm=e=>{let t=e.items,n=e.onChange,a=e.titleKey,s=void 0===a?"title":a,r=e.textKey,o=void 0===r?"text":r,l=e.testPrefix,c=e.addLabel,d=e.rows,u=void 0===d?4:d;const h=(e,a,s)=>n(t.map((t,n)=>n===e?(0,i.A)((0,i.A)({},t),{},{[a]:s}):t));return(0,_e.jsxs)("div",{className:"space-y-3",children:[t.map((e,a)=>(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4","data-testid":"".concat(l,"-").concat(a),children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)(Gh,{value:e[s],onChange:e=>h(a,s,e.target.value),placeholder:"Heading",className:"bg-white/5 border-white/10 font-semibold","data-testid":"".concat(l,"-title-").concat(a)}),(0,_e.jsx)("button",{type:"button",onClick:()=>n(zm(t,a,-1)),disabled:0===a,className:"p-1.5 text-slate-400 hover:text-white disabled:opacity-25","data-testid":"".concat(l,"-up-").concat(a),children:(0,_e.jsx)(Em,{size:14})}),(0,_e.jsx)("button",{type:"button",onClick:()=>n(zm(t,a,1)),disabled:a===t.length-1,className:"p-1.5 text-slate-400 hover:text-white disabled:opacity-25","data-testid":"".concat(l,"-down-").concat(a),children:(0,_e.jsx)(Pm,{size:14})}),(0,_e.jsx)("button",{type:"button",onClick:()=>n(t.filter((e,t)=>t!==a)),className:"p-1.5 text-slate-400 hover:text-rose-400","data-testid":"".concat(l,"-delete-").concat(a),children:(0,_e.jsx)(Mm,{size:14})})]}),(0,_e.jsx)(am,{value:e[o],onChange:e=>h(a,o,e.target.value),rows:u,className:"mt-2 bg-white/5 border-white/10 text-sm","data-testid":"".concat(l,"-text-").concat(a)})]},a)),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:()=>n([...t,{[s]:"",[o]:""}]),className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"".concat(l,"-add"),children:[(0,_e.jsx)(Rm,{size:14,className:"mr-1"})," ",c]})]})};function Lm(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!1),o=(0,De.A)(r,2),l=o[0],c=o[1],d=qo().refresh;(0,s.useEffect)(()=>{Eo.get("/admin/settings").then(e=>a(e.data)).catch(()=>{})},[]);const u=(null===n||void 0===n?void 0:n.pages)||{},h=(e,t)=>a(n=>(0,i.A)((0,i.A)({},n),{},{pages:(0,i.A)((0,i.A)({},n.pages),{},{[e]:t})}));return n?(0,_e.jsxs)("div",{"data-testid":"admin-pages",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Content"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Pages"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400 mb-8",children:"Privacy Policy wording plus the copy on the Contact and Advertise pages."}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),c(!0);try{const e=(await Eo.put("/admin/settings",n)).data;a(e),d(),Ta.success("Pages saved")}catch(cS){Ta.error(Mo(cS))}finally{c(!1)}},className:"space-y-6 max-w-3xl",children:[(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"pages-section-privacy",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Privacy Policy"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"Each block 
2is a heading and its paragraph. Contact email comes from the notification email on the Homepage page."})]}),(0,_e.jsxs)(da,{to:"/privacy",target:"_blank",className:"text-xs text-sky-400 hover:text-sky-300 inline-flex items-center gap-1 shrink-0","data-testid":"pages-privacy-preview",children:["Preview ",(0,_e.jsx)(Ch,{size:12})]})]}),(0,_e.jsxs)("div",{className:"sm:w-1/2 mb-4",children:[(0,_e.jsx)(tm,{children:"\u201cLast updated\u201d label"}),(0,_e.jsx)(Gh,{value:u.privacy_updated||"",onChange:e=>h("privacy_updated",e.target.value),className:Om,"data-testid":"pages-privacy-updated-input"})]}),(0,_e.jsx)(Dm,{items:u.privacy_sections||[],onChange:e=>h("privacy_sections",e),testPrefix:"pages-privacy-section",addLabel:"Add section"})]}),Tm.map(e=>(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"pages-section-".concat(e.key),children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,_e.jsx)("p",{className:"eyebrow",children:e.title}),(0,_e.jsxs)(da,{to:e.href,target:"_blank",className:"text-xs text-sky-400 hover:text-sky-300 inline-flex items-center gap-1","data-testid":"pages-".concat(e.key,"-preview"),children:["Preview ",(0,_e.jsx)(Ch,{size:12})]})]}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 gap-4",children:e.fields.map(e=>{let t=(0,De.A)(e,3),n=t[0],a=t[1],s=t[2];return(0,_e.jsxs)("div",{className:"textarea"===s?"sm:col-span-2":"",children:[(0,_e.jsx)(tm,{children:a}),"textarea"===s?(0,_e.jsx)(am,{value:u[n]||"",onChange:e=>h(n,e.target.value),rows:3,className:Om,"data-testid":"pages-".concat(n,"-input")}):(0,_e.jsx)(Gh,{value:u[n]||"",onChange:e=>h(n,e.target.value),className:Om,"data-testid":"pages-".concat(n,"-input")})]},n)})}),"advertise"===e.key&&(0,_e.jsxs)("div",{className:"mt-5",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:"Advertise perks"}),(0,_e.jsx)(Dm,{items:u.advertise_perks||[],onChange:e=>h("advertise_perks",e),testPrefix:"pages-advertise-perk",addLabel:"Add perk",rows:2})]})]},e.key)),(0,_e.jsx)(Dh,{type:"submit",disabled:l,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"pages-save-button",children:l?"Saving\u2026":"Save pages"})]})]}):null}const Fm=[{key:"alpha",label:"A \u2013 Z",icon:Jo("arrow-down-a-z",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]])},{key:"latest",label:"Latest update",icon:_i}];function Im(){const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)("alpha"),o=(0,De.A)(r,2),i=o[0],l=o[1];(0,s.useEffect)(()=>{Eo.get("/shows").then(e=>a(e.data)).catch(()=>{})},[]);const c=(0,s.useMemo)(()=>{const e=[...n];return"latest"===i?e.sort((e,t)=>(t.latest_episode_at||"").localeCompare(e.latest_episode_at||"")):e.sort((e,t)=>e.name.replace(/^the\s+/i,"").localeCompare(t.name.replace(/^the\s+/i,""),void 0,{sensitivity:"base"})),e},[n,i]);return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"shows-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-10 pb-32",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4 mb-10",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"The lineup"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none",children:"All Shows"}),(0,_e.jsxs)("p",{className:"mt-3 text-sm text-slate-400","data-testid":"shows-count",children:[n.length," shows"]})]}),(0,_e.jsx)("div",{className:"inline-flex rounded-full border border-white/10 bg-white/[0.03] p-1",role:"group","aria-label":"Sort shows","data-testid":"shows-sort-toggle",children:Fm.map(e=>{let t=e.key,n=e.label,a=e.icon;return(0,_e.jsxs)("button",{onClick:()=>l(t),"aria-pressed":i===t,className:"inline-flex items-center gap-2 rounded-full px-4 py-2 text-xs font-semibold transition-colors ".concat(i===t?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"shows-sort-".concat(t),children:[(0,_e.jsx)(a,{size:14})," ",n]},t)})})]}),(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-5","data-testid":"shows-grid",children:c.map((e,t)=>(0,_e.jsxs)(da,{to:"/shows/".concat(e.slug),className:"group card-surface card-surface-hover rounded-2xl p-3 reveal",style:{animationDelay:"".concat(40*Math.min(t,12),"ms")},"data-testid":"show-card-".concat(e.slug),children:[(0,_e.jsx)("div",{className:"aspect-square rounded-xl overflow-hidden",children:e.cover_url?(0,_e.jsx)("img",{src:e.cover_url,alt:e.name,className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}):(0,_e.jsx)("div",{className:"h-full w-full bg-[#053671]"})}),(0,_e.jsx)("p",{className:"mt-3 text-[11px] font-mono uppercase tracking-widest text-sky-400 truncate",children:e.subgroup||e.group||e.category}),(0,_e.jsx)("h3",{className:"font-display font-bold leading-snug",children:e.name}),(0,_e.jsx)("p",{className:"text-xs text-slate-400 truncate",children:e.latest_episode_at?"Updated ".concat(Oo(e.latest_episode_at)):"No episodes yet"})]},e.id))})]}),(0,_e.jsx)(Ai,{})]})}function Um(){const e=fa(),t=(0,De.A)(e,1)[0].get("q")||"",n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1];return(0,s.useEffect)(()=>{t.trim().length<2?o([]):(o(null),Eo.get("/episodes/search",{params:{q:t}}).then(e=>o(e.data)).catch(()=>o([])))},[t]),(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"search-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-10 pb-32",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Search"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl font-black tracking-tight leading-none",children:t?(0,_e.jsxs)(_e.Fragment,{children:["Results for ",(0,_e.jsxs)("span",{className:"text-sky-400","data-testid":"search-query",children:["\u201c",t,"\u201d"]})]}):"Search episodes"}),(0,_e.jsx)(ji,{className:"mt-6 max-w-xl",autoFocus:!0,testId:"search-page-input"}),(0,_e.jsx)("div",{className:"mt-10",children:r?0===r.length?(0,_e.jsx)("p",{className:"text-slate-400","data-testid":"search-empty",children:t.trim().length<2?"Type at least two characters to search across every show.":"No episodes matched. Try a different keyword."}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("p",{className:"text-sm text-slate-400 mb-4","data-testid":"search-count",children:[r.length," episode",1===r.length?"":"s"]}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4","data-testid":"search-results",children:r.map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t},e.id))})]}):(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[...Array(8)].map((e,t)=>(0,_e.jsx)(ph,{className:"h-40 rounded-2xl bg-white/5"},t))})})]}),(0,_e.jsx)(Ai,{})]})}const Bm=e=>{let t=e.show,n=e.index;return(0,_e.jsxs)(da,{to:"/shows/".concat(t.slug),className:"group card-surface card-surface-hover rounded-2xl p-3 reveal",style:{animationDelay:"".concat(40*n,"ms")},"data-testid":"category-show-".concat(t.slug),children:[(0,_e.jsx)("div",{className:"aspect-square rounded-xl overflow-hidden",children:t.cover_url?(0,_e.jsx)("img",{src:t.cover_url,alt:t.name,className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}):(0,_e.jsx)("div",{className:"h-full w-full bg-[#053671]"})}),(0,_e.jsx)("h3",{className:"mt-3 font-display font-bold leading-snug text-sm",children:t.name}),t.host&&(0,_e.jsx)("p",{className:"text-xs text-slate-400 truncate",children:t.host})]})};function Wm(){const e=nn().slug,t=(0,s.useState)(null),n=(0,De.A)(t,2),a=n[0],r=n[1],o=(0,s.useState)(!1),i=(0,De.A)(o,2),l=i[0],c=i[1];(0,s.useEffect)(()=>{r(null),c(!1),Eo.get("/categories/".concat(e)).then(e=>r(e.data)).catch(()=>c(!0))},[e]);const d=(null===a||void 0===a?void 0:a.latest_episodes)||[];return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"category-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 pb-32",children:[(0,_e.jsxs)(da,{to:"/",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"category-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),l?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"category-not-found",children:"Category not found."}):a?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Category"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"category-title",children:a.name}),(0,_e.jsxs)("p",{className:"mt-3 text-slate-400","data-testid":"category-show-count",children:[a.show_count," show",1===a.show_count?"":"s",a.subgroups.length?" across ".concat(a.subgroups.length," sub-categories"):""]}),d.length>0&&(0,_e.jsxs)("section",{className:"mt-12","data-testid":"category-latest-section",children:[(0,_e.jsxs)("h2",{className:"font-display text-2xl sm:text-3xl font-extrabold tracking-tight mb-6",children:["Newest in ",a.name]}),(0,_e.jsx)(uh,{episode:d[0],eyebrow:"Newest in ".concat(a.name),testId:"category-hero"}),d.length>1&&(0,_e.jsx)("div",{className:"mt-6 grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4","data-testid":"category-episodes-grid",children:d.slice(1).map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t+1},e.id))})]}),(0,_e.jsxs)("section",{className:"mt-16","data-testid":"category-shows-section",children:[(0,_e.jsxs)("h2",{className:"font-display text-2xl sm:text-3xl font-extrabold tracking-tight mb-6",children:["All ",a.name," shows"]}),0===a.show_count&&(0,_e.jsx)("p",{className:"text-slate-400","data-testid":"category-empty",children:"New shows coming soon."}),a.subgroups.map(e=>(0,_e.jsxs)("div",{className:"mb-10","data-testid":"category-subgroup-".concat(e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")),children:[(0,_e.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,_e.jsx)("p",{className:"eyebrow",children:e.name}),(0,_e.jsx)("span",{className:"h-px flex-1 bg-white/10"}),(0,_e.jsx)("span",{className:"font-mono text-xs text-slate-500",children:e.shows.length})]}),(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 ga
2p-4",children:e.shows.map((e,t)=>(0,_e.jsx)(Bm,{show:e,index:t},e.id))})]},e.name)),a.shows.length>0&&(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4",children:a.shows.map((e,t)=>(0,_e.jsx)(Bm,{show:e,index:t},e.id))})]})]}):(0,_e.jsxs)("div",{className:"space-y-6",children:[(0,_e.jsx)(ph,{className:"h-24 rounded-2xl bg-white/5"}),(0,_e.jsx)(ph,{className:"h-[380px] rounded-3xl bg-white/5"})]})]}),(0,_e.jsx)(Ai,{})]})}const qm=[Sm,Jo("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),xh,bh],Hm={name:"",email:"",show_name:"",category:"",pitch:"",links:""};function Vm(){const e=qo().homepage,t=e.join_perks||[],n=(0,s.useState)(Hm),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(!1),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(e,t)=>o(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t})),x="mt-1.5 bg-white/5 border-white/10";return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"join-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsx)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-12 pb-32",children:(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_520px] gap-12 items-stretch",children:[(0,_e.jsxs)("div",{className:"relative flex flex-col",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:e.join_eyebrow||"Join The Underdog"}),(0,_e.jsxs)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-[1.02]",children:[e.join_title||"Got a show?",(0,_e.jsx)("br",{}),(0,_e.jsx)("span",{className:"text-sky-400",children:e.join_title_accent||"Run with our pack."})]}),(0,_e.jsx)("p",{className:"mt-6 text-slate-300 leading-relaxed max-w-xl",children:e.join_intro}),(0,_e.jsx)("div",{className:"mt-10 grid sm:grid-cols-2 gap-4 flex-1",children:t.map((e,t)=>{let n=e.title,a=e.text;const s=qm[t%qm.length];return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-5 reveal",style:{animationDelay:"".concat(70*t,"ms")},"data-testid":"join-perk-".concat(t),children:[(0,_e.jsx)("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-[#053671] text-sky-300",children:(0,_e.jsx)(s,{size:18})}),(0,_e.jsx)("h3",{className:"mt-3 font-display font-bold",children:n}),(0,_e.jsx)("p",{className:"mt-1 text-sm text-slate-400 leading-relaxed",children:a})]},n)})})]}),(0,_e.jsxs)("div",{className:"card-surface grain relative overflow-hidden rounded-3xl p-6 sm:p-8 flex flex-col","data-testid":"join-form-card",children:[(0,_e.jsx)("div",{className:"absolute -top-24 -right-24 h-64 w-64 rounded-full bg-[#053671] blur-3xl opacity-50 pointer-events-none"}),p?(0,_e.jsxs)("div",{className:"relative flex-1 flex flex-col items-center justify-center text-center py-10","data-testid":"join-success",children:[(0,_e.jsx)(ym,{size:48,className:"mx-auto text-sky-400"}),(0,_e.jsx)("h2",{className:"mt-4 font-display text-2xl font-extrabold",children:"Application received"}),(0,_e.jsxs)("p",{className:"mt-2 text-sm text-slate-400",children:["Thanks, ",r.name.split(" ")[0],". The Underdog team will review your pitch and reach out at ",r.email,"."]}),(0,_e.jsx)(Dh,{onClick:()=>{o(Hm),f(!1)},variant:"outline",className:"mt-6 rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"join-another-button",children:"Submit another show"})]}):(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),u(!0);try{await Eo.post("/join",r),f(!0)}catch(cS){Ta.error(Mo(cS))}finally{u(!1)}},className:"relative flex-1 flex flex-col gap-4",children:[(0,_e.jsx)("h2",{className:"font-display text-2xl font-extrabold",children:e.join_form_title||"Pitch your show"}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Your name *"}),(0,_e.jsx)(Gh,{required:!0,value:r.name,onChange:e=>g("name",e.target.value),className:x,"data-testid":"join-name-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Email *"}),(0,_e.jsx)(Gh,{required:!0,type:"email",value:r.email,onChange:e=>g("email",e.target.value),className:x,"data-testid":"join-email-input"})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Show name"}),(0,_e.jsx)(Gh,{value:r.show_name,onChange:e=>g("show_name",e.target.value),className:x,"data-testid":"join-show-input"})]}),(0,_e.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,_e.jsx)(tm,{children:"Tell us about the show *"}),(0,_e.jsx)(am,{required:!0,minLength:20,rows:5,value:r.pitch,onChange:e=>g("pitch",e.target.value),placeholder:"What's it about, who's it for, how often do you publish, what makes it an underdog story?",className:"".concat(x," flex-1 min-h-[140px] resize-none"),"data-testid":"join-pitch-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Links"}),(0,_e.jsx)(Gh,{value:r.links,onChange:e=>g("links",e.target.value),placeholder:"RSS feed, Spotify, Apple, YouTube, socials\u2026",className:x,"data-testid":"join-links-input"})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:d,className:"w-full rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"join-submit-button",children:d?"Sending\u2026":"Send my pitch"})]})]})]})}),(0,_e.jsx)(Ai,{})]})}function Ym(){const e=nn().slug,t=(0,s.useState)(null),n=(0,De.A)(t,2),a=n[0],r=n[1],o=(0,s.useState)(!1),i=(0,De.A)(o,2),l=i[0],c=i[1],d=(0,s.useState)(12),u=(0,De.A)(d,2),h=u[0],m=u[1];(0,s.useEffect)(()=>{r(null),c(!1),m(12),Eo.get("/hosts/".concat(e),{params:{limit:5e3}}).then(e=>r(e.data)).catch(()=>c(!0))},[e]);const p=(null===a||void 0===a?void 0:a.episodes)||[];return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"host-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 pb-32",children:[(0,_e.jsxs)(da,{to:"/#team",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"host-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),l?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"host-not-found",children:"Host not found."}):a?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("section",{className:"card-surface grain relative overflow-hidden rounded-3xl p-6 sm:p-10","data-testid":"host-header",children:[(0,_e.jsx)("div",{className:"absolute -top-32 -right-32 h-80 w-80 rounded-full bg-[#053671] blur-3xl opacity-60 pointer-events-none"}),(0,_e.jsxs)("div",{className:"relative grid md:grid-cols-[200px_1fr] gap-8 items-center",children:[(0,_e.jsxs)("div",{className:"relative mx-auto md:mx-0",children:[(0,_e.jsx)("div",{className:"absolute inset-0 rounded-full bg-sky-400/30 blur-2xl"}),a.image_url?(0,_e.jsx)("img",{src:Po(a.image_url),alt:a.name,className:"relative h-44 w-44 sm:h-48 sm:w-48 rounded-full object-cover ring-4 ring-sky-400/40","data-testid":"host-image"}):(0,_e.jsx)("div",{className:"relative h-44 w-44 sm:h-48 sm:w-48 rounded-full bg-[#053671] ring-4 ring-sky-400/40 flex items-center justify-center",children:(0,_e.jsx)(Eh,{size:56,className:"text-sky-200"})})]}),(0,_e.jsxs)("div",{className:"text-center md:text-left",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:a.role}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"host-name",children:a.name}),a.bio&&(0,_e.jsx)("p",{className:"mt-5 text-slate-300 leading-relaxed max-w-2xl","data-testid":"host-bio",children:a.bio}),(0,_e.jsxs)("div",{className:"mt-5 flex flex-wrap justify-center md:justify-start gap-3 text-sm",children:[(0,_e.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 font-mono text-xs text-slate-300","data-testid":"host-show-count",children:[a.shows.length," show",1===a.shows.length?"":"s"]}),(0,_e.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 font-mono text-xs text-slate-300","data-testid":"host-episode-count",children:[a.episode_count," episodes"]})]})]})]})]}),(0,_e.jsxs)("section",{className:"mt-14","data-testid":"host-shows-section",children:[(0,_e.jsx)("h2",{className:"font-display text-2xl sm:text-3xl font-extrabold tracking-tight mb-6",children:"Shows"}),0===a.shows.length?(0,_e.jsx)("p",{className:"text-slate-400","data-testid":"host-no-shows",children:"No shows assigned yet."}):(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4",children:a.shows.map((e,t)=>(0,_e.jsxs)(da,{to:"/shows/".concat(e.slug),className:"group card-surface card-surface-hover rounded-2xl p-3 reveal",style:{animationDelay:"".concat(40*t,"ms")},"data-testid":"host-show-".concat(e.slug),children:[(0,_e.jsx)("div",{className:"aspect-square rounded-xl overflow-hidden",children:e.cover_url?(0,_e.jsx)("img",{src:e.cover_url,alt:e.name,className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}):(0,_e.jsx)("div",{className:"h-full w-full bg-[#053671]"})}),(0,_e.jsxs)("div",{className:"mt-3 flex items-start gap-2",children:[(0,_e.jsx)("h3",{className:"font-display font-bold leading-snug text-sm",children:e.name}),("video"===e.kind||"tiktok"===e.kind)&&(0,_e.jsx)("span",{className:"ml-auto mt-0.5 shrink-0 rounded-full bg-rose-500/15 px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-rose-400","data-testid":"host-show-video-badge-".concat(e.slug),children:"Video"})]})]},e.id))})]}),(0,_e.jsxs)("section",{className:"mt-16","data-testid":"host-episodes-section",children:[(0,_e.jsx)("h2",{className:"font-display text-2xl sm:text-3xl font-extrabold tracking-tight mb-6",children:"Episodes"}),0===p.length?(0,_e.jsx)("p",{className:"text-slate-400","data-testid":"host-no-episodes",children:"No episodes yet \u2014 check back soon."}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("div",{"data-testid":"host-hero",children:(0,_e.jsx)(uh,{episode:p[0],eyebrow:"Latest \xb7 ".concat(Ro(p[0].published_at)),testId:"host-hero"})}),p.length>1&&(0,_e.jsx)("div",{className:"mt-6 grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4","data-testid":"host-episodes-grid",children:p.slice(1,h).map((e,t)=>(0,_e.jsx)(hh,{episode:e,index:t+1},e.id))}),h<p.length&&(0,_e.jsx)("div",{className:"mt-8 flex justify-center",children:(0,_e.jsx)(Dh,{onClick:()=>m(e=>e+12),variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 px-8","data-testid":"host-load-more",children:"Load more episodes"})})]})]})]}):(0,_e.jsx)(ph,{className:"h-72 rounded-3xl bg-white/5"})]}),(0,_e.jsx)(Ai,{})]})}
2function $m(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(""),o=(0,De.A)(r,2),i=o[0],l=o[1];(0,s.useEffect)(()=>{Eo.get("/team").then(e=>a(e.data)).catch(()=>a([]))},[]);const c=(0,s.useMemo)(()=>{const e=n||[],t=i.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||(e.show_names||[]).some(e=>e.toLowerCase().includes(t))):e},[n,i]);return(0,_e.jsxs)("div",{className:"min-h-screen flex flex-col","data-testid":"hosts-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsxs)("main",{className:"flex-1 w-full max-w-[1400px] mx-auto px-5 sm:px-8 pt-8 pb-32",children:[(0,_e.jsxs)(da,{to:"/#team",className:"inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white mb-8","data-testid":"hosts-back-link",children:[(0,_e.jsx)(_h,{size:16})," Back to home"]}),(0,_e.jsxs)("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 mb-10",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"The pack"}),(0,_e.jsx)("h1",{className:"font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-none","data-testid":"hosts-title",children:"Our Hosts"}),n&&(0,_e.jsxs)("p",{className:"mt-3 text-sm text-slate-400","data-testid":"hosts-count",children:[n.length," podcasters across the Underdog network"]})]}),(0,_e.jsxs)("div",{className:"relative w-full md:w-72",children:[(0,_e.jsx)(wi,{size:15,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),(0,_e.jsx)(Gh,{value:i,onChange:e=>l(e.target.value),placeholder:"Find a host or show\u2026",className:"pl-9 bg-white/5 border-white/10","data-testid":"hosts-filter-input"})]})]}),n?0===c.length?(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-12 text-center text-slate-400","data-testid":"hosts-empty",children:i?"No hosts match \u201c".concat(i,"\u201d."):"No hosts yet."}):(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4","data-testid":"hosts-grid",children:c.map((e,t)=>{var n;return(0,_e.jsxs)(da,{to:"/hosts/".concat(e.slug),className:"on-dark group relative aspect-[3/4] rounded-2xl overflow-hidden card-surface reveal",style:{animationDelay:"".concat(40*Math.min(t,12),"ms")},"data-testid":"hosts-card-".concat(e.slug),children:[e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:e.name,className:"absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:t<10?"eager":"lazy"}):(0,_e.jsx)("div",{className:"absolute inset-0 bg-[#053671] flex items-center justify-center",children:(0,_e.jsx)(Eh,{size:48,className:"text-sky-200"})}),(0,_e.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-[#070F1E] via-[#070F1E]/40 to-transparent"}),(0,_e.jsxs)("div",{className:"absolute inset-x-0 bottom-0 p-4",children:[(0,_e.jsx)("p",{className:"font-display font-bold text-lg leading-tight text-white","data-testid":"hosts-card-name-".concat(e.slug),children:e.name}),(0,_e.jsx)("p",{className:"text-[11px] font-mono uppercase tracking-widest text-sky-400 mt-0.5",children:e.role}),(null===(n=e.show_names)||void 0===n?void 0:n.length)>0&&(0,_e.jsx)("p",{className:"mt-1.5 text-xs text-slate-300 line-clamp-2",children:e.show_names.join(" \xb7 ")})]})]},e.id)})}):(0,_e.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4",children:[...Array(10)].map((e,t)=>(0,_e.jsx)(ph,{className:"aspect-[3/4] rounded-2xl bg-white/5"},t))})]}),(0,_e.jsx)(Ai,{})]})}const Qm=["new","reviewing","accepted","declined"],Km={new:"bg-sky-400/15 text-sky-300",reviewing:"bg-amber-400/15 text-amber-300",accepted:"bg-emerald-400/15 text-emerald-300",declined:"bg-rose-400/15 text-rose-300"},Gm={pitch:"Pitch",contact:"Contact",advertise:"Advertising",club:"Club suggestion"},Xm={pitch:"bg-[#053671] text-sky-200",contact:"bg-violet-400/15 text-violet-300",advertise:"bg-emerald-400/15 text-emerald-300",club:"bg-amber-400/15 text-amber-300"};function Jm(){const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)("all"),o=(0,De.A)(r,2),i=o[0],l=o[1],c="all"===i?n:n.filter(e=>(e.kind||"pitch")===i),d=()=>Eo.get("/admin/applications").then(e=>a(e.data)).catch(()=>{});(0,s.useEffect)(()=>{d()},[]);return(0,_e.jsxs)("div",{"data-testid":"admin-applications",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Inbox"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight mb-2",children:"Applications & messages"}),(0,_e.jsx)("div",{className:"flex flex-wrap gap-2 mb-8","data-testid":"applications-filter",children:[["all","All"],["pitch","Show pitches"],["contact","Contact"],["advertise","Advert
2ising"],["club","Club suggestions"]].map(e=>{let t=(0,De.A)(e,2),a=t[0],s=t[1];return(0,_e.jsxs)("button",{onClick:()=>l(a),className:"rounded-full px-3 py-1 text-xs font-semibold border transition-colors ".concat(i===a?"bg-sky-400 text-[#070F1E] border-sky-400":"border-white/15 text-slate-300 hover:bg-white/10"),"data-testid":"applications-filter-".concat(a),children:[s," ",(0,_e.jsx)("span",{className:"font-mono opacity-70",children:"all"===a?n.length:n.filter(e=>(e.kind||"pitch")===a).length})]},a)})}),0===c.length&&(0,_e.jsx)("p",{className:"text-slate-400 text-sm","data-testid":"applications-empty",children:"Nothing here yet. Pitches, contact messages and advertising enquiries submitted on the site will appear here."}),(0,_e.jsx)("div",{className:"space-y-3","data-testid":"applications-list",children:c.map((e,t)=>(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-5","data-testid":"application-row-".concat(t),children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-mono uppercase ".concat(Xm[e.kind||"pitch"]),"data-testid":"application-kind-".concat(t),children:Gm[e.kind||"pitch"]}),(0,_e.jsx)("p",{className:"font-display font-bold text-lg truncate",children:"contact"===e.kind?e.subject||"No subject":"advertise"===e.kind?e.company||e.name:e.show_name||"Untitled show"}),(0,_e.jsx)("span",{className:"rounded-full px-2 py-0.5 text-[10px] font-mono uppercase ".concat(Km[e.status]),"data-testid":"application-status-".concat(t),children:e.status})]}),(0,_e.jsxs)("p",{className:"text-sm text-slate-400",children:[e.name," \xb7 ",(0,_e.jsxs)("a",{href:"mailto:".concat(e.email),className:"text-sky-400 hover:underline inline-flex items-center gap-1",children:[(0,_e.jsx)(Ei,{size:12}),e.email]}),e.category?" \xb7 ".concat(e.category):"",e.budget?" \xb7 Budget: ".concat(e.budget):""," \xb7 ",Ro(e.created_at)]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)("select",{value:e.status,onChange:t=>(async(e,n)=>{try{await Eo.put("/admin/applications/".concat(e.id),{status:n}),d()}catch(t){Ta.error(Mo(t))}})(e,t.target.value),className:"h-9 rounded-full bg-white/5 border border-white/10 px-3 text-xs","data-testid":"application-status-select-".concat(t),children:Qm.map(e=>(0,_e.jsx)("option",{value:e,children:e},e))}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm("Delete application from ".concat(e.name,"?")))try{await Eo.delete("/admin/applications/".concat(e.id)),Ta.success("Deleted"),d()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400","data-testid":"delete-application-".concat(t),children:(0,_e.jsx)(Mm,{size:16})})]})]}),(0,_e.jsx)("p",{className:"mt-3 text-sm text-slate-300 whitespace-pre-line leading-relaxed",children:e.pitch}),e.links&&(0,_e.jsxs)("p",{className:"mt-2 text-xs text-slate-400 break-all",children:["Links: ",e.links]})]},e.id))})]})}function Zm(e){const t=s.useState(void 0),n=(0,De.A)(t,2),a=n[0],r=n[1];return $i(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let a,s;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,s=t.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),a}const ep=["__scopeSwitch","name","checked","defaultChecked","required","disabled","value","onCheckedChange","form"],tp=["__scopeSwitch"],np=["__scopeSwitch","control","checked","bubbles"];var ap="Switch",sp=Vi(ap),rp=(0,De.A)(sp,2),op=rp[0],ip=(rp[1],op(ap)),lp=(0,De.A)(ip,2),cp=lp[0],dp=lp[1],up=s.forwardRef((e,t)=>{const n=e.__scopeSwitch,a=e.name,r=e.checked,o=e.defaultChecked,l=e.required,c=e.disabled,d=e.value,u=void 0===d?"on":d,h=e.onCheckedChange,m=e.form,p=(0,Pe.A)(e,ep),f=s.useState(null),g=(0,De.A)(f,2),x=g[0],v=g[1],b=Wi(t,e=>v(e)),y=s.useRef(!1),w=!x||(m||!!x.closest("form")),j=Ji({prop:r,defaultProp:null!==o&&void 0!==o&&o,onChange:h,caller:ap}),k=(0,De.A)(j,2),N=k[0],S=k[1];
2return(0,_e.jsxs)(cp,{scope:n,checked:N,disabled:c,children:[(0,_e.jsx)(ll.button,(0,i.A)((0,i.A)({type:"button",role:"switch","aria-checked":N,"aria-required":l,"data-state":fp(N),"data-disabled":c?"":void 0,disabled:c,value:u},p),{},{ref:b,onClick:Ii(e.onClick,e=>{S(e=>!e),w&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})})),w&&(0,_e.jsx)(pp,{control:x,bubbles:!y.current,name:a,value:u,checked:N,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});up.displayName=ap;var hp="SwitchThumb",mp=s.forwardRef((e,t)=>{const n=e.__scopeSwitch,a=(0,Pe.A)(e,tp),s=dp(hp,n);return(0,_e.jsx)(ll.span,(0,i.A)((0,i.A)({"data-state":fp(s.checked),"data-disabled":s.disabled?"":void 0},a),{},{ref:t}))});mp.displayName=hp;var pp=s.forwardRef((e,t)=>{e.__scopeSwitch;let n=e.control,a=e.checked,r=e.bubbles,o=void 0===r||r,l=(0,Pe.A)(e,np);const c=s.useRef(null),d=Wi(c,t),u=function(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(a),h=Zm(n);return s.useEffect(()=>{const e=c.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==a&&n){const t=new Event("click",{bubbles:o});n.call(e,a),e.dispatchEvent(t)}},[u,a,o]),(0,_e.jsx)("input",(0,i.A)((0,i.A)({type:"checkbox","aria-hidden":!0,defaultChecked:a},l),{},{tabIndex:-1,ref:d,style:(0,i.A)((0,i.A)((0,i.A)({},l.style),h),{},{position:"absolute",pointerEvents:"none",opacity:0,margin:0})}))});function fp(e){return e?"checked":"unchecked"}pp.displayName="SwitchBubbleInput";var gp=up,xp=mp;const vp=["className"],bp=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,vp);return(0,_e.jsx)(gp,(0,i.A)((0,i.A)({className:Ku("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n)},a),{},{ref:t,children:(0,_e.jsx)(xp,{className:Ku("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}))});bp.displayName=gp.displayName;const yp="mt-1.5 bg-white/5 border-white/10",wp=[{title:"Latest Episodes",note:"Top of the homepage. Count includes the hero (1 hero + N\u22121 cards, max 1 episode per show).",fields:[["latest_section_eyebrow","Eyebrow (above title)"],["latest_title","Section title"],["latest_eyebrow","Hero card label"],["latest_count","Episodes to show","number"]]},{title:"YouTube",note:"Videos pulled from the channel set in Settings. Count includes the main player.",fields:[["videos_eyebrow","Eyebrow"],["videos_title","Section title"],["videos_count","Videos to show","number"]]},{title:"Our Team",note:"Random podcasters shown on each visit.",fields:[["team_eyebrow","Eyebrow"],["team_title","Section title"],["team_subtitle","Subtitle","textarea"],["team_count","Members to show","number"]]},{title:"Join banner",note:"Navy call-to-action above the footer.",fields:[["cta_eyebrow","Eyebrow"],["cta_title","Title"],["cta_text","Text","textarea"],["cta_button","Button label"]]},{title:"Listener survey popup",note:"A small card appears in the corner a couple of seconds after a visitor lands on the public site (not on admin/host pages). Visitors can snooze it for a week or choose to never see it again. Responses are under Survey.",fields:[["survey_enabled","Show the popup & homepage card","switch"],["survey_headline","Popup headline"],["survey_prize","Prize (e.g. $100)"],["survey_card_eyebrow","Homepage card eyebrow"],["survey_card_title","Homepage card title"],["survey_card_text","Homepage card blurb","textarea"],["survey_card_button","Homepage card button"]]},{title:"New Here? Try These First",note:"Three shows are drawn at random from the list you tick below on every visit; for each, one of its three most recent episodes is shown. Sits between the Join banner and the footer.",fields:[["pick_eyebrow","Eyebrow"],["pick_title","Section title"],["pick_enabled","Show this section","switch"],["pick_show_ids","Shows in the pool","shows"]]},{title:"Join page",note:"Copy on the /join contact page.",fields:[["join_eyebrow","Eyebrow"],["join_title","Title (line 1)"],["join_title_accent","Title accent (line 2, blue)"],["join_intro","Intro paragraph","textarea"],["join_form_title","Form title"]]}],jp=e=>
2{let t=e.id,n=e.label,a=e.value,s=e.onChange,r=e.shows;const o=new Set(a||[]);return(0,_e.jsxs)("div",{className:"sm:col-span-2",children:[(0,_e.jsxs)(tm,{children:[n," ",(0,_e.jsxs)("span",{className:"text-slate-500 font-normal",children:["\xb7 ",o.size," selected",0===o.size?" (all audio shows eligible)":""]})]}),(0,_e.jsx)("div",{className:"mt-1.5 grid sm:grid-cols-2 gap-1.5 max-h-72 overflow-y-auto rounded-md border border-white/10 bg-white/[0.03] p-2","data-testid":"homepage-".concat(t,"-input"),children:r.map(e=>(0,_e.jsxs)("label",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-white/5 cursor-pointer",children:[(0,_e.jsx)("input",{type:"checkbox",checked:o.has(e.id),onChange:()=>(e=>{const t=new Set(o);t.has(e)?t.delete(e):t.add(e),s([...t])})(e.id),className:"accent-sky-400","data-testid":"homepage-pick-show-".concat(e.slug)}),(0,_e.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})},kp=e=>{let t=e.id,n=e.label,a=e.type,s=e.value,r=e.onChange,o=e.shows;return(0,_e.jsx)("div",{className:"textarea"===a||"shows"===a?"sm:col-span-2":"",children:"shows"===a?(0,_e.jsx)(jp,{id:t,label:n,value:s,onChange:r,shows:o}):"switch"===a?(0,_e.jsxs)("label",{className:"flex items-center gap-3 mt-6",children:[(0,_e.jsx)(bp,{checked:!1!==s,onCheckedChange:r,"data-testid":"homepage-".concat(t,"-input")}),(0,_e.jsx)("span",{className:"text-sm font-medium",children:n})]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(tm,{children:n}),"textarea"===a?(0,_e.jsx)(am,{value:s,onChange:e=>r(e.target.value),rows:3,className:yp,"data-testid":"homepage-".concat(t,"-input")}):(0,_e.jsx)(Gh,{type:a||"text",min:"number"===a?1:void 0,max:"number"===a?24:void 0,value:s,onChange:e=>r("number"===a?Number(e.target.value):e.target.value),className:yp,"data-testid":"homepage-".concat(t,"-input")})]})})};function Np(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)([]),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)(!1),u=(0,De.A)(d,2),h=u[0],m=u[1],p=qo().refresh;(0,s.useEffect)(()=>{Eo.get("/admin/settings").then(e=>a(e.data)).catch(()=>{}),Eo.get("/shows").then(e=>c(e.data.filter(e=>!["video","tiktok"].includes(e.kind)).sort((e,t)=>e.name.replace(/^the\s+/i,"").localeCompare(t.name.replace(/^the\s+/i,""))))).catch(()=>{})},[]);const f=(null===n||void 0===n?void 0:n.homepage)||{},g=(e,t)=>a(n=>(0,i.A)((0,i.A)({},n),{},{homepage:(0,i.A)((0,i.A)({},n.homepage),{},{[e]:t})})),x=(e,t,n)=>g("join_perks",f.join_perks.map((a,s)=>s===e?(0,i.A)((0,i.A)({},a),{},{[t]:n}):a));return n?(0,_e.jsxs)("div",{"data-testid":"admin-homepage",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Content"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Homepage & Join page"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400 mb-8",children:"Every headline, label and count on the public homepage and Join page. Changes go live as soon as you save."}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),m(!0);try{const e=(await Eo.put("/admin/settings",n)).data;a(e),p(),Ta.success("Homepage saved")}catch(cS){Ta.error(Mo(cS))}finally{m(!1)}},className:"space-y-6 max-w-3xl",children:[wp.map(e=>(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"homepage-section-".concat(e.title.toLowerCase().replace(/[^a-z0-9]+/g,"-")),children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:e.title}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mb-4",children:e.note}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 gap-4",children:e.fields.map(e=>{var t;let n=(0,De.A)(e,3),a=n[0],s=n[1],r=n[2];return(0,_e.jsx)(kp,{id:a,label:s,type:r,value:null!==(t=f[a])&&void 0!==t?t:"shows"===r?[]:"",onChange:e=>g(a,e),shows:l},a)})})]},e.title)),(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"homepage-section-perks",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Join page perks"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"The four benefit cards under the Join headline."})]}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:()=>g("join_perks",[...f.join_perks||[],{title:"",text:""}]),className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"homepage-ad
2d-perk",children:[(0,_e.jsx)(Rm,{size:14,className:"mr-1"})," Add perk"]})]}),(0,_e.jsx)("div",{className:"space-y-3",children:(f.join_perks||[]).map((e,t)=>(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4 grid sm:grid-cols-[1fr_2fr_auto] gap-3 items-start","data-testid":"homepage-perk-".concat(t),children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Title"}),(0,_e.jsx)(Gh,{value:e.title,onChange:e=>x(t,"title",e.target.value),className:yp,"data-testid":"homepage-perk-title-".concat(t)})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Text"}),(0,_e.jsx)(am,{value:e.text,onChange:e=>x(t,"text",e.target.value),rows:2,className:yp,"data-testid":"homepage-perk-text-".concat(t)})]}),(0,_e.jsx)("button",{type:"button",onClick:()=>g("join_perks",f.join_perks.filter((e,n)=>n!==t)),className:"mt-7 p-2 text-slate-400 hover:text-rose-400","data-testid":"homepage-perk-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:16})})]},t))})]}),(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"homepage-section-notifications",children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Application emails"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mb-4",children:"New pitches from the Join page are emailed here. Requires a Resend API key on the server; until then, pitches are still saved under Applications."}),(0,_e.jsxs)("div",{className:"sm:w-1/2",children:[(0,_e.jsx)(tm,{children:"Notification email"}),(0,_e.jsx)(Gh,{type:"email",value:n.notification_email,onChange:e=>a(t=>(0,i.A)((0,i.A)({},t),{},{notification_email:e.target.value})),className:yp,"data-testid":"homepage-notification-email-input"})]})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:h,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"homepage-save-button",children:h?"Saving\u2026":"Save homepage"})]})]}):null}const Sp=Jo("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]),Ap="bg-white/5 border-white/10 h-9",_p=(e,t,n)=>{const a=t+n;if(a<0||a>=e.length)return e;const s=[...e];var r=[s[a],s[t]];return s[t]=r[0],s[a]=r[1],s},Cp=e=>{let t=e.onClick,n=e.title,a=e.danger,s=e.disabled,r=e.children,o=e.testId;return(0,_e.jsx)("button",{type:"button",onClick:t,title:n,disabled:s,className:"p-1.5 rounded-md text-slate-400 disabled:opacity-25 ".concat(a?"hover:text-rose-400":"hover:text-white hover:bg-white/5"),"data-testid":o,children:r})};function Ep(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!1),o=(0,De.A)(r,2),l=o[0],c=o[1],d=qo().refresh;(0,s.useEffect)(()=>{Eo.get("/admin/settings").then(e=>a(e.data)).catch(()=>{})},[]);const u=(null===n||void 0===n?void 0:n.nav_links)||[],h=(null===n||void 0===n?void 0:n.menu_structure)||[],m=e=>a(t=>(0,i.A)((0,i.A)({},t),{},{nav_links:e})),p=e=>a(t=>(0,i.A)((0,i.A)({},t),{},{menu_structure:e})),f=(e,t,n)=>m(u.map((a,s)=>s===e?(0,i.A)((0,i.A)({},a),{},{[t]:n}):a)),g=(e,t)=>p(h.map((n,a)=>a===e?(0,i.A)((0,i.A)({},n),t):n));return n?(0,_e.jsxs)("div",{"data-testid":"admin-menus",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Navigation"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Menu bars"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400 mb-8",children:"Control the links in the top header and the categories in the Browse bar underneath it."}),(0,_e.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),u.some(e=>!e.label.trim()||!e.url.trim()))return Ta.error("Every top menu link needs a label and a URL");if(h.some(e=>!e.name.trim()))return Ta.error("Every Browse menu group needs a name");c(!0);try{const e=(await Eo.put("/admin/settings",(0,i.A)((0,i.A)({},n),{},{menu_structure:h.map(e=>(0,i.A)((0,i.A)({},e),{},{subgroups:e.subgroups.filter(e=>e.trim())}))}))).data;a(e),d(),Ta.success("Menus saved")}catch(cS){Ta.error(Mo(cS))}finally{c(!1)}},className:"space-y-6 max-w-3xl",children:[(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"menus-top-section",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Top menu"}),(0,_e.jsxs)("p",{className:"text-xs text-slate-500",children:["Links beside the logo. Use ",(0,_e.jsx)("span",{className:"font-mono",children:"/#latest"}),", ",(0,_e.jsx)("span",{className:"font-mono",children:"/#videos"}),", ",(0,_e.jsx)("span",{className:"font-mono",children:"/#team"})," to jump to homepage sections, ",(0,_e.jsx)("span",{className:"font-mono",children:"/join"})," or ",(0,_e.jsx)("span",{className:"font-mono",children:"/shows"})," for pages, or a full https:// URL."]})]}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:()=>m([...u,{label:"",url:"/",highlight:!1}]),className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"menus-add-link",children:[(0,_e.jsx)(Rm,{size:14,className:"mr-1"})," Add link"]})]}),(0,_e.jsxs)("div",{className:"space-y-2",children:[u.map((e,t)=>(0,_e.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-center rounded-xl bg-white/[0.03] border border-white/10 p-2.5","data-testid":"menus-link-".concat(t),children:[(0,_e.jsx)(Gh,{value:e.label,onChange:e=>f(t,"label",e.target.value),placeholder:"Label",className:Ap,"data-testid":"menus-link-label-".concat(t)}),(0,_e.jsx)(Gh,{value:e.url,onChange:e=>f(t,"url",e.target.value),placeholder:"/#latest",className:"".concat(Ap," font-mono text-xs"),"data-testid":"menus-link-url-".concat(t)}),(0,_e.jsxs)("div",{className:"flex items-center gap-1 pl-1",children:[(0,_e.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] font-mono uppercase tracking-wider text-slate-400 mr-1",title:"Show in blue accent",children:[(0,_e.jsx)(bp,{checked:!!e.highlight,onCheckedChange:e=>f(t,"highlight",e),className:"scale-75","data-testid":"menus-link-highlight-".concat(t)}),"Accent"]}),(0,_e.jsx)(Cp,{onClick:()=>m(_p(u,t,-1)),disabled:0===t,title:"Move up",testId:"menus-link-up-".concat(t),children:(0,_e.jsx)(Em,{size:14})}),(0,_e.jsx)(Cp,{onClick:()=>m(_p(u,t,1)),disabled:t===u.length-1,title:"Move down",testId:"menus-link-down-".concat(t),children:(0,_e.jsx)(Pm,{size:14})}),(0,_e.jsx)(Cp,{onClick:()=>
2m(u.filter((e,n)=>n!==t)),danger:!0,title:"Remove",testId:"menus-link-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:14})})]})]},t)),0===u.length&&(0,_e.jsx)("p",{className:"text-xs text-slate-500","data-testid":"menus-links-empty",children:"No links \u2014 the top menu will be empty."})]})]}),(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-6","data-testid":"menus-browse-section",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Browse menu"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"Category tabs on the navy bar. Each group can have sub-groups. Assign shows to a group from the Shows page \u2014 renaming a group here will unlink shows assigned to the old name."})]}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:()=>p([...h,{name:"",subgroups:[]}]),className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"menus-add-group",children:[(0,_e.jsx)(Rm,{size:14,className:"mr-1"})," Add group"]})]}),(0,_e.jsxs)("div",{className:"space-y-3",children:[h.map((e,t)=>(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-3","data-testid":"menus-group-".concat(t),children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)(Gh,{value:e.name,onChange:e=>g(t,{name:e.target.value}),placeholder:"Group name (e.g. Sports)",className:"".concat(Ap," font-semibold"),"data-testid":"menus-group-name-".concat(t)}),(0,_e.jsx)(Cp,{onClick:()=>g(t,{subgroups:[...e.subgroups,""]}),title:"Add sub-group",testId:"menus-group-add-sub-".concat(t),children:(0,_e.jsx)(Sp,{size:14})}),(0,_e.jsx)(Cp,{onClick:()=>p(_p(h,t,-1)),disabled:0===t,title:"Move up",testId:"menus-group-up-".concat(t),children:(0,_e.jsx)(Em,{size:14})}),(0,_e.jsx)(Cp,{onClick:()=>p(_p(h,t,1)),disabled:t===h.length-1,title:"Move down",testId:"menus-group-down-".concat(t),children:(0,_e.jsx)(Pm,{size:14})}),(0,_e.jsx)(Cp,{onClick:()=>window.confirm('Remove "'.concat(e.name||"this group",'" from the Browse menu?'))&&p(h.filter((e,n)=>n!==t)),danger:!0,title:"Remove group",testId:"menus-group-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:14})})]}),e.subgroups.length>0&&(0,_e.jsx)("div",{className:"mt-2 ml-6 space-y-1.5 border-l border-white/10 pl-3",children:e.subgroups.map((n,a)=>(0,_e.jsxs)("div",{className:"flex items-center gap-2","data-testid":"menus-subgroup-".concat(t,"-").concat(a),children:[(0,_e.jsx)(Gh,{value:n,onChange:n=>g(t,{subgroups:e.subgroups.map((e,t)=>t===a?n.target.value:e)}),placeholder:"Sub-group name (e.g. NFL)",className:"".concat(Ap," h-8 text-sm"),"data-testid":"menus-subgroup-name-".concat(t,"-").concat(a)}),(0,_e.jsx)(Cp,{onClick:()=>g(t,{subgroups:_p(e.subgroups,a,-1)}),disabled:0===a,title:"Move up",testId:"menus-subgroup-up-".concat(t,"-").concat(a),children:(0,_e.jsx)(Em,{size:12})}),(0,_e.jsx)(Cp,{onClick:()=>g(t,{subgroups:_p(e.subgroups,a,1)}),disabled:a===e.subgroups.length-1,title:"Move down",testId:"menus-subgroup-down-".concat(t,"-").concat(a),children:(0,_e.jsx)(Pm,{size:12})}),(0,_e.jsx)(Cp,{onClick:()=>g(t,{subgroups:e.subgroups.filter((e,t)=>t!==a)}),danger:!0,title:"Remove",testId:"menus-subgroup-delete-".concat(t,"-").concat(a),children:(0,_e.jsx)(Mm,{size:12})})]},a))})]},t)),0===h.length&&(0,_e.jsx)("p",{className:"text-xs text-slate-500","data-testid":"menus-groups-empty",children:"No groups \u2014 the Browse bar will be hidden."})]})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:l,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"menus-save-button",children:l?"Saving\u2026":"Save menus"})]})]}):null}const Pp=Jo("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Mp=Jo("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Rp=["className","testId"],Op=e=>{let t=e.className,n=void 0===t?"":t,a=e.testId,r=(0,Pe.A)(e,Rp);
2const o=(0,s.useState)(!1),l=(0,De.A)(o,2),c=l[0],d=l[1];return(0,_e.jsxs)("div",{className:"relative",children:[(0,_e.jsx)(Gh,(0,i.A)((0,i.A)({},r),{},{type:c?"text":"password",className:"pr-10 ".concat(n),"data-testid":a})),(0,_e.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-slate-400 hover:text-white","data-testid":"".concat(a,"-toggle"),children:c?(0,_e.jsx)(Pp,{size:16}):(0,_e.jsx)(Mp,{size:16})})]})};function zp(){const e=Lo(),t=e.user,n=e.login,a=en(),r=(0,s.useState)(""),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(""),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useState)(""),p=(0,De.A)(m,2),f=p[0],g=p[1],x=(0,s.useState)(!1),v=(0,De.A)(x,2),b=v[0],y=v[1];if(t)return(0,_e.jsx)(kn,{to:"podcaster"===t.role?"/publish":"/admin",replace:!0});return(0,_e.jsxs)("div",{className:"min-h-screen flex items-center justify-center px-5 relative grain","data-testid":"login-page",children:[(0,_e.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top,#053671_0%,transparent_60%)] opacity-60"}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),g(""),y(!0);try{const e=await n(i,u);a("podcaster"===e.role?"/publish":"/admin")}catch(cS){g(Mo(cS))}finally{y(!1)}},className:"relative w-full max-w-md card-surface rounded-3xl p-8 sm:p-10 reveal",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3 mb-8","data-testid":"login-logo-link",children:[(0,_e.jsx)(hi,{size:48}),(0,_e.jsx)("span",{className:"font-display font-extrabold text-xl",children:"Admin Portal"})]}),(0,_e.jsx)("h1",{className:"font-display text-3xl font-black tracking-tight",children:"Welcome back"}),(0,_e.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Admins manage the network; hosts sign in to publish episodes."}),(0,_e.jsxs)("div",{className:"mt-8 space-y-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{htmlFor:"email",children:"Email"}),(0,_e.jsx)(Gh,{id:"email",type:"email",value:i,onChange:e=>l(e.target.value),required:!0,className:"mt-1.5 bg-white/5 border-white/10","data-testid":"login-email-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{htmlFor:"password",children:"Password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{id:"password",value:u,onChange:e=>h(e.target.value),required:!0,className:"bg-white/5 border-white/10",testId:"login-password-input"})})]})]}),f&&(0,_e.jsx)("p",{className:"mt-4 text-sm text-rose-400","data-testid":"login-error",children:f}),(0,_e.jsx)(Dh,{type:"submit",disabled:b,className:"mt-6 w-full rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"login-submit-button",children:b?"Signing in\u2026":"Sign in"}),(0,_e.jsx)(da,{to:"/forgot-password",className:"mt-5 block text-center text-sm text-slate-400 hover:text-white","data-testid":"login-forgot-link",children:"Forgot your password?"})]})]})}const Tp=Jo("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),Dp=Jo("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]),Lp=Jo("panel-top",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]),Fp=Jo("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Ip=Jo("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),Up=Jo("radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}
2],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]),Bp=Jo("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]),Wp=Jo("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),qp=Jo("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Hp=Jo("file-chart-column",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-1",key:"zg0ygc"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"M16 18v-3",key:"j5jt4h"}]]),Vp=Jo("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),Yp=[{to:"/admin",label:"Dashboard",icon:Tp,end:!0,id:"dashboard"},{to:"/admin/homepage",label:"Homepage",icon:Dp,id:"homepage"},{to:"/admin/menus",label:"Menus",icon:Lp,id:"menus"},{to:"/admin/pages",label:"Pages",icon:Fp,id:"pages"},{to:"/admin/shows",label:"Shows",icon:Sm,id:"shows"},{to:"/admin/episodes",label:"Episodes",icon:bh,id:"episodes"},{to:"/admin/team",label:"Team",icon:xh,id:"team"},{to:"/admin/publishing",label:"Publishing",icon:Ip,id:"publishing"},{to:"/admin/club-map",label:"Club map",icon:Lh,id:"club-map"},{to:"/admin/timecodes",label:"Timecodes",icon:Up,id:"timecodes"},{to:"/admin/survey",label:"Survey",icon:Bp,id:"survey"},{to:"/admin/applications",label:"Inbox",icon:Wp,id:"applications"},{to:"/admin/settings",label:"Settings",icon:qp,id:"settings"}];function $p(){const e=Lo(),t=e.user,n=e.logout;return(0,s.useEffect)(()=>{let e=document.querySelector('meta[name="robots"]');return e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e)),e.content="noindex, nofollow, noarchive",()=>{e.content="index, follow"}},[]),null===t?(0,_e.jsx)("div",{className:"min-h-screen flex items-center justify-center text-slate-400",children:"Loading\u2026"}):!1===t?(0,_e.jsx)(kn,{to:"/admin/login",replace:!0}):"admin"!==t.role?(0,_e.jsx)(kn,{to:"/publish",replace:!0}):(0,_e.jsxs)("div",{className:"min-h-screen md:grid md:grid-cols-[240px_1fr]","data-testid":"admin-layout",children:[(0,_e.jsxs)("aside",{className:"border-b md:border-b-0 md:border-r border-white/10 bg-[#050B17] p-5 flex md:flex-col gap-6 md:sticky md:top-0 md:h-screen",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3","data-testid":"admin-logo-link",children:[(0,_e.jsx)(hi,{size:36}),(0,_e.jsx)("span",{className:"font-display font-bold hidden md:block",children:"Underdog CMS"})]}),(0,_e.jsx)("nav",{className:"flex md:flex-col gap-1 flex-1 overflow-x-auto",children:[...Yp,...t.reports_owner?[{to:"/admin/reports",label:"Reporting",icon:Hp,id:"reports"}]:[]].sort((e,t)=>e.label.localeCompare(t.label)).map(e=>{let t=e.to,n=e.label,a=e.icon,s=e.end,r=e.id;return(0,_e.jsxs)(ua,{to:t,end:s,className:e=>{let t=e.isActive;return"flex items-center gap-3 rounded-xl px-3 py-2 text-sm font-semibold whitespace-nowrap transition-colors ".concat(t?"bg-[#053671] text-white":"text-slate-400 hover:text-white hover:bg-white/5")},"data-testid":"admin-nav-".concat(r),children:[(0,_e.jsx)(a,{size:18})," ",(0,_e.jsx)("span",{className:"hidden md:inline",children:n})]},t)})}),(null===t||void 0===t?void 0:t.team_id)&&(0,_e.jsxs)(ua,{to:"/publish",className:"mt-1 flex items-center justify-center gap-2 rounded-xl px-3 py-2.5 text-sm font-bold whitespace-nowrap text-white bg-[#4CBB17] hover:bg-[#43a614] shadow-[0_4px_14px_rgba(76,187,23,0.35)] transition-colors","data-testid":"admin-nav-publish-as",children:[(0,_e.jsx)(bh,{size:16})," ",(0,_e.jsxs)("span",{className:"hidden md:inline",children:["Publish as ",t.name.split(" ")[0]]})]}),(0,_e.jsxs)("div",{className:"md:space-y-2 flex md:flex-col gap-2",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-2 text-xs text-slate-400 hover:text-white px-3","data-testid":"admin-view-site-link",children:[(0,_e.jsx)(Ch,{size:14})," ",(0,_e.jsx)("span",{className:"hidden md:inline",children:"View site"})]}),(0,_e.jsxs)("button",{onClick:n,className:"flex items-center gap-2 text-xs text-slate-400 hover:text-rose-400 px-3","data-testid":"admin-logout-button",children:[(0,_e.jsx)(Vp,{size:14})," ",(0,_e.jsx)("span",{className:"hidden md:inline",children:"Sign out"})]})]})]}),(0,_e.jsx)("main",{className:"p-5 sm:p-8 lg:p-10 max-w-6xl w-full",children:(0,_e.jsx)(Nn,{})})]})}const Qp=Jo("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Kp=Jo("mail-warning",[["path",{d:"M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5",key:"e61zoh"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M20 14v4",key:"1hm744"}],["path",{d:"M20 22v.01",key:"12bgn6"}]]),Gp=Jo("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),Xp=Jo("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}
2]]),Jp={show:[Sm,"bg-sky-400/15 text-sky-300"],episode:[bh,"bg-amber-400/15 text-amber-300"],host:[xh,"bg-emerald-400/15 text-emerald-300"],submission:[Ip,"bg-fuchsia-400/15 text-fuchsia-300"],site:[Xp,"bg-indigo-400/15 text-indigo-300"],sync:[Qp,"bg-slate-400/15 text-slate-300"],inbox:[Wp,"bg-rose-400/15 text-rose-300"]},Zp=e=>{let t=e.item,n=e.index,a=e.showDate;const s=Jp[t.kind]||Jp.site,r=(0,De.A)(s,2),o=r[0],i=r[1],l=t.link&&!t.link.startsWith("/admin"),c=(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("span",{className:"h-8 w-8 shrink-0 rounded-full flex items-center justify-center ".concat(i),children:(0,_e.jsx)(o,{size:14})}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsx)("p",{className:"text-sm text-slate-100 leading-snug","data-testid":"activity-message-".concat(n),children:t.message}),(0,_e.jsxs)("p",{className:"text-[11px] text-slate-500 mt-0.5",children:[(0,_e.jsx)("span",{className:"text-slate-400",children:t.actor}),t.role&&"system"!==t.role?" \xb7 ".concat("podcaster"===t.role?"host":t.role):""," \xb7 ",a?new Date(t.created_at).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):Oo(t.created_at)]})]}),t.link&&(0,_e.jsx)(Ch,{size:12,className:"text-slate-600 shrink-0 mt-1 opacity-0 group-hover:opacity-100 transition-opacity"})]}),d="group flex items-start gap-3 rounded-xl px-3 py-2.5 transition-colors hover:bg-white/5";return t.link?(0,_e.jsx)("li",{"data-testid":"activity-item-".concat(n),children:l?(0,_e.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",className:d,children:c}):(0,_e.jsx)(da,{to:t.link,className:d,children:c})}):(0,_e.jsx)("li",{className:d,"data-testid":"activity-item-".concat(n),children:c})};function ef(){var e;const t=(0,s.useState)(null),n=(0,De.A)(t,2),a=n[0],r=n[1];(0,s.useEffect)(()=>{Eo.get("/admin/activity",{params:{limit:10}}).then(e=>r(e.data)).catch(()=>r([]))},[]);const o=(0,s.useState)(null),l=(0,De.A)(o,2),c=l[0],d=l[1],u=(0,s.useState)(!1),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(!1),g=(0,De.A)(f,2),x=g[0],v=g[1],b=()=>Eo.get("/admin/stats").then(e=>d(e.data)).catch(()=>{});(0,s.useEffect)(()=>{b()},[]);const y=c?[["Shows",c.shows,"shows"],["Episodes",c.episodes,"episodes"],["Team members",c.team,"team"],["New applications",null!==(e=c.applications)&&void 0!==e?e:0,"applications"]]:[];return(0,_e.jsxs)("div",{"data-testid":"admin-dashboard",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Overview"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Dashboard"}),(0,_e.jsx)("div",{className:"mt-8 grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map(e=>{let t=(0,De.A)(e,3),n=t[0],a=t[1],s=t[2];return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-5","data-testid":"stat-".concat(s),children:[(0,_e.jsx)("p",{className:"text-xs uppercase tracking-widest text-slate-400 font-mono",children:n}),(0,_e.jsx)("p",{className:"mt-2 font-display text-4xl font-black",children:a})]},n)})}),(0,_e.jsxs)("div",{className:"mt-8 card-surface rounded-2xl p-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-semibold",children:"RSS feeds"}),(0,_e.jsxs)("p",{className:"text-sm text-slate-400",children:["Audio feeds auto-sync every ",(null===c||void 0===c?void 0:c.sync_interval_minutes)||60," minutes; YouTube playlists & TikTok every ",((null===c||void 0===c?void 0:c.video_sync_interval_minutes)||240)/60," hours. Last sync ",null!==c&&void 0!==c&&c.last_sync?Oo(c.last_sync):"never","."]})]}),(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:[(0,_e.jsx)("select",{value:(null===c||void 0===c?void 0:c.sync_interval_minutes)||60,onChange:e=>(async t=>{v(!0);try{await Eo.put("/admin/sync-interval",{minutes:t}),d(e=>(0,i.A)((0,i.A)({},e),{},{sync_interval_minutes:t})),Ta.success("Audio feeds will now sync every ".concat(120===t?"2 hours":"".concat(t," minutes")))}catch(e){Ta.error(Mo(e))}finally{v(!1)}})(Number(e.target.value)),disabled:!c||x,className:"h-10 rounded-full bg-white/5 border border-white/15 px-4 text-sm font-medium disabled:opacity-50","aria-label":"Audio feed sync interval","data-testid":"sync-interval-select",children:[[30,"Every 30 min"],[60,"Every 60 min"],[120,"Every 2 hours"]].map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("option",{value:n,className:"bg-[#0B1A33]",children:a},n)})}),(0,_e.jsxs)(Dh,{onClick:async()=>{p(!0);try{const e=(await Eo.post("/admin/sync-all")).data;Ta.success("Synced ".concat(e.shows_synced," feeds \xb7 ").concat(e.episodes_added," new episodes")),b()}catch(lS){Ta.error(Mo(lS))}finally{p(!1)}},disabled:m,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"sync-all-button",children:[(0,_e.jsx)(Qp,{size:16,className:"mr-2 ".concat(m?"animate-spin":"")})," ",m?"Syncing\u2026":"Sync all feeds now"]})]})]}),c&&!c.email_configured&&(0,_e.jsxs)("div",{className:"mt-4 rounded-2xl border border-amber-400/30 bg-amber-400/10 p-4 flex items-start gap-3 text-sm","data-testid":"email-not-configured-notice",children:[(0,_e.jsx)(Kp,{size:18,className:"text-amber-300 shrink-0 mt-0.5"}),(0,_e.jsxs)("p",{className:"text-amber-100",children:["Application email alerts are not active yet \u2014 add a ",(0,_e.jsx)("span",{className:"font-mono",children:"RESEND_API_KEY"})," to the server to receive pitches by email. Pitches are still saved under ",(0,_e.jsx)(da,{to:"/admin/applications",className:"underline",children:"Applications"}),"."]})]}),(0,_e.jsxs)("div",{className:"mt-6 grid sm:grid-cols-2 gap-4",children:[(0,_e.jsxs)(da,{to:"/admin/shows?new=1",className:"card-surface card-surface-hover rounded-2xl p-6 flex items-center gap-4","data-testid":"quick-add-show",children:[(0,_e.jsx)("span",{className:"h-11 w-11 rounded-full bg-sky-4
200 text-[#070F1E] flex items-center justify-center",children:(0,_e.jsx)(Rm,{})}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-semibold",children:"Submit a new show"}),(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"Paste an RSS feed and it appears on the front page."})]})]}),(0,_e.jsxs)(da,{to:"/admin/episodes?new=1",className:"card-surface card-surface-hover rounded-2xl p-6 flex items-center gap-4","data-testid":"quick-add-episode",children:[(0,_e.jsx)("span",{className:"h-11 w-11 rounded-full bg-amber-400 text-[#070F1E] flex items-center justify-center",children:(0,_e.jsx)(Rm,{})}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-semibold",children:"Post an episode manually"}),(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"For shows without a feed, or one-off specials."})]})]})]}),(0,_e.jsxs)("section",{className:"mt-6 card-surface rounded-2xl p-5","data-testid":"recent-activity",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 px-1",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow mb-0.5 flex items-center gap-1.5",children:[(0,_e.jsx)(Gp,{size:12})," Recent updates"]}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"The 10 latest changes across shows, episodes, hosts, submissions and the site."})]}),(0,_e.jsxs)(da,{to:"/admin/activity",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 px-3.5 py-1.5 text-xs font-bold text-slate-200 hover:bg-white/10 shrink-0","data-testid":"activity-view-all",children:["Past 7 days ",(0,_e.jsx)(yh,{size:12})]})]}),(0,_e.jsxs)("ul",{className:"mt-3 space-y-0.5","data-testid":"recent-activity-list",children:[null===a&&(0,_e.jsx)("li",{className:"px-3 py-2 text-sm text-slate-500",children:"Loading\u2026"}),null!==a&&0===a.length&&(0,_e.jsx)("li",{className:"px-3 py-2 text-sm text-slate-500","data-testid":"recent-activity-empty",children:"No updates logged yet \u2014 changes you and your hosts make will show up here."}),(a||[]).map((e,t)=>(0,_e.jsx)(Zp,{item:e,index:t},e.id))]})]})]})}const tf=Jo("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),nf=Jo("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),af=Jo("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),sf=Jo("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),rf=e=>{let t=e.value,n=e.onChange,a=e.shape,r=void 0===a?"circle":a,o=e.testId,i=void 0===o?"image-upload":o,l=e.endpoint,c=void 0===l?"/admin/upload":l,d=e.allowUrl,u=void 0===d||d,h=e.hint,m=void 0===h||h,p=e.fit,f=void 0===p?"cover":p;const g=(0,s.useRef)(null),x=(0,s.useState)(null),v=(0,De.A)(x,2),b=v[0],y=v[1],w=(0,s.useState)(!1),j=(0,De.A)(w,2),k=j[0],N=j[1],S=(0,s.useState)(!1),A=(0,De.A)(S,2),_=A[0],C=A[1],E=async e=>{if(!e)return;if(!e.type.startsWith("image/"))return Ta.error("Please choose an image file");if(e.size>8388608)return Ta.error("Image must be under 8 MB");const t=new FormData;t.append("file",e),y(0);try{const a=(await Eo.post(c,t,{onUploadProgress:t=>y(Math.round(t.loaded/(t.total||e.size)*100))})).data;n(a.url),Ta.success("Photo uploaded")}catch(lS){Ta.error(Mo(lS))}finally{y(null)}},P="circle"===r?"rounded-full":"rounded-xl";return(0,_e.jsxs)("div",{className:"flex flex-col items-center gap-3","data-testid":i,children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.click()},onDragOver:e=>{e.preventDefault(),N(!0)},onDragLeave:()=>N(!1),onDrop:e=>{var t;e.preventDefault(),N(!1),E(null===(t=e.dataTransfer.files)||void 0===t?void 0:t[0])},className:"group relative h-32 w-32 ".concat(P," overflow-hidden ring-2 transition-colors ").concat(k?"ring-sky-400 bg-sky-4
200/10":"ring-white/10 bg-[#053671] hover:ring-sky-400/60"),"data-testid":"".concat(i,"-dropzone"),"aria-label":"Upload photo",children:[t?(0,_e.jsx)("img",{src:Po(t),alt:"",className:"h-full w-full ".concat("contain"===f?"object-contain p-2 bg-white":"object-cover"),"data-testid":"".concat(i,"-preview")}):(0,_e.jsx)("span",{className:"absolute inset-0 flex items-center justify-center text-sky-200",children:(0,_e.jsx)(af,{size:28})}),(0,_e.jsxs)("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1 bg-[#070F1E]/80 text-xs font-semibold text-white transition-opacity ".concat(t?"opacity-0 group-hover:opacity-100":"opacity-0"),children:[(0,_e.jsx)(af,{size:16})," Replace"]}),null!==b&&(0,_e.jsxs)("span",{className:"absolute inset-0 flex flex-col items-center justify-center gap-1 bg-[#070F1E]/85 text-xs font-mono text-sky-300","data-testid":"".concat(i,"-progress"),children:[(0,_e.jsx)(sf,{size:18,className:"animate-spin"}),b,"%"]})]}),(0,_e.jsx)("input",{ref:g,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",onChange:e=>{var t;E(null===(t=e.target.files)||void 0===t?void 0:t[0]),e.target.value=""},"data-testid":"".concat(i,"-input")}),(0,_e.jsxs)("div",{className:"flex items-center gap-3 text-xs",children:[(0,_e.jsx)("button",{type:"button",onClick:()=>{var e;return null===(e=g.current)||void 0===e?void 0:e.click()},className:"font-semibold text-sky-400 hover:text-sky-300","data-testid":"".concat(i,"-choose"),children:t?"Change photo":"Upload photo"}),u&&(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("span",{className:"text-slate-600",children:"\xb7"}),(0,_e.jsxs)("button",{type:"button",onClick:()=>C(e=>!e),className:"inline-flex items-center gap-1 text-slate-400 hover:text-white","data-testid":"".concat(i,"-toggle-url"),children:[(0,_e.jsx)(Ri,{size:12})," Use URL"]})]}),t&&(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("span",{className:"text-slate-600",children:"\xb7"}),(0,_e.jsxs)("button",{type:"button",onClick:()=>n(""),className:"inline-flex items-center gap-1 text-slate-400 hover:text-rose-400","data-testid":"".concat(i,"-remove"),children:[(0,_e.jsx)(ai,{size:12})," Remove"]})]})]}),m&&(0,_e.jsx)("p",{className:"text-[10px] font-mono uppercase tracking-widest text-slate-500",children:"Drag & drop \xb7 JPG, PNG, WebP \xb7 up to 8 MB"}),u&&_&&(0,_e.jsx)(Gh,{value:t||"",onChange:e=>n(e.target.value),placeholder:"https://\u2026/photo.jpg",className:"bg-white/5 border-white/10 w-full","data-testid":"".concat(i,"-url-input")})]})},of=["id"],lf={name:"",description:"",host:"",cover_url:"",rss_url:"",kind:"audio",club_map:!1,youtube_playlist_id:"",tiktok_url:"",acast_show_id:"",category:"General",group:"",subgroup:"",placements:[],website:"",active:!0,order:0,host_ids:[]},cf=e=>{let t=e.menu,n=e.value,a=e.onChange;const s=e=>{var n;return(null===(n=t.find(t=>t.name===e))||void 0===n?void 0:n.subgroups)||[]},r=(e,t)=>a(n.map((n,a)=>a===e?(0,i.A)((0,i.A)({},n),t):n));return(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4","data-testid":"show-placements",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Menu placement"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:"A show can live in more than one Browse category. Edit the categories themselves under Menus."})]}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:()=>{var e;return a([...n,{group:(null===(e=t[0])||void 0===e?void 0:e.name)||"",subgroup:""}])},className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 shrink-0 h-8 text-xs","data-testid":"show-add-placement",children:[(0,_e.jsx)(Rm,{size:12,className:"mr-1"})," Add category"]})]}),0===n.length&&(0,_e.jsx)("p",{className:"text-xs text-slate-500","data-testid":"show-placements-empty",children:"Not in the Browse menu yet."}),(0,_e.jsx)("div",{className:"space-y-2",children:n.map((e,o)=>(0,_e.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-center","data-testid":"show-placement-".concat(o),children:[(0,_e.jsx)("select",{value:e.group,onChange:e=>r(o,{group:e.target.value,subgroup:""}),className:"h-9 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"show-placement-group-".concat(o),children:t.map(e=>(0,_e.jsx)("option",{value:e.name,children:e.name},e.name))}),(0,_e.jsxs)("select",{value:e.subgroup,onChange:e=>r(o,{subgroup:e.target.value}),disabled:!s(e.group).length,className:"h-9 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm disabled:opacity-40","data-testid":"show-placement-subgroup-".concat(o),children:[(0,_e.jsx)("option",{value:"",children:s(e.group).length?"Directly under category":"No sub-categories"}),s(e.group).map(e=>(0,_e.jsx)("option",{value:e,children:e},e))]}),(0,_e.jsx)("button",{type:"button",onClick:()=>a(n.filter((e,t)=>
2t!==o)),className:"p-2 text-slate-400 hover:text-rose-400",title:"Remove","data-testid":"show-placement-delete-".concat(o),children:(0,_e.jsx)(Mm,{size:14})})]},o))})]})},df=e=>{let t=e.team,n=e.value,a=e.onChange;const r=(0,s.useState)(!1),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(""),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!i)return;const e=e=>{m.current&&!m.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);const p=t.filter(e=>n.includes(e.id)),f=e=>a(n.includes(e)?n.filter(t=>t!==e):[...n,e]);return(0,_e.jsxs)("div",{className:"relative",ref:m,"data-testid":"show-host-picker",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"mt-1.5 w-full min-h-10 rounded-md bg-white/5 border border-white/10 px-2 py-1.5 flex flex-wrap items-center gap-1.5 text-left text-sm","data-testid":"show-host-picker-toggle",children:[0===p.length&&(0,_e.jsx)("span",{className:"text-slate-500 px-1",children:"Select host(s)\u2026"}),p.map(e=>(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-[#053671] pl-1 pr-2 py-0.5 text-xs font-semibold","data-testid":"show-host-chip-".concat(e.slug),children:[e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:"",className:"h-5 w-5 rounded-full object-cover"}):(0,_e.jsx)("span",{className:"h-5 w-5 rounded-full bg-sky-400/30"}),e.name,(0,_e.jsx)("span",{role:"button",onClick:t=>{t.stopPropagation(),f(e.id)},className:"text-slate-300 hover:text-white","data-testid":"show-host-chip-remove-".concat(e.slug),children:(0,_e.jsx)(ai,{size:12})})]},e.id)),(0,_e.jsx)(mi,{size:14,className:"ml-auto text-slate-400 transition-transform ".concat(i?"rotate-180":"")})]}),i&&(0,_e.jsxs)("div",{className:"absolute z-20 mt-1 w-full rounded-xl border border-white/10 bg-[#0F1C33] shadow-2xl p-2","data-testid":"show-host-dropdown",children:[(0,_e.jsx)(Gh,{autoFocus:!0,value:u,onChange:e=>h(e.target.value),placeholder:"Search hosts\u2026",className:"h-8 bg-white/5 border-white/10 mb-2","data-testid":"show-host-filter"}),(0,_e.jsxs)("div",{className:"max-h-52 overflow-y-auto space-y-0.5",children:[t.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())).map(e=>{const t=n.includes(e.id);return(0,_e.jsxs)("label",{className:"flex items-center gap-2.5 rounded-lg px-2 py-1.5 cursor-pointer text-sm transition-colors ".concat(t?"bg-sky-400/15 text-white":"hover:bg-white/5 text-slate-300"),"data-testid":"show-host-option-".concat(e.slug),children:[(0,_e.jsx)("input",{type:"checkbox",checked:t,onChange:()=>f(e.id),className:"accent-sky-400"}),e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:"",className:"h-6 w-6 rounded-full object-cover"}):(0,_e.jsx)("span",{className:"h-6 w-6 rounded-full bg-[#053671]"}),(0,_e.jsx)("span",{className:"truncate",children:e.name}),(0,_e.jsx)("span",{className:"ml-auto text-[10px] font-mono uppercase text-slate-500",children:e.role})]},e.id)}),0===t.length&&(0,_e.jsx)("p",{className:"px-2 py-3 text-xs text-slate-500","data-testid":"show-host-empty",children:"No hosts yet."})]}),(0,_e.jsxs)(da,{to:"/admin/team",className:"mt-2 flex items-center gap-1.5 px-2 py-1.5 text-xs font-semibold text-sky-400 hover:text-sky-300","data-testid":"show-host-add-link",children:[(0,_e.jsx)(Rm,{size:12})," Add a new host in Team"]})]})]})};function uf(){const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=fa(),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)(l.get("new")?(0,i.A)({},lf):null),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(!1),f=(0,De.A)(p,2),g=f[0],x=f[1],v=(0,s.useState)(!1),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useState)([]),k=(0,De.A)(j,2),N=k[0],S=k[1],A=(0,s.useState)([]),_=(0,De.A)(A,2),C=_[0],E=_[1],P=()=>Eo.get("/shows",{params:{include_inactive:!0}}).then(e=>a(e.data)).catch(()=>{});(0,s.useEffect)(()=>{P(),Eo.get("/admin/settings").then(e=>S(e.data.menu_structure||[])).catch(()=>{}),Eo.get("/team").then(e=>E(e.data)).catch(()=>{})},[]);const M=()=>{m(null),l.get("new")&&c({})},R=(e,t)=>m(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t}));return(0,_e.jsxs)("div",{"data-testid":"admin-shows",children:[(0,_e.jsxs)("div",{className:"flex items-end justify-between gap-4 mb-8",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Content"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Shows"})]}),(0,_e.jsxs)(Dh,{onClick:()=>m((0,i.A)({}
2,lf)),className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"add-show-button",children:[(0,_e.jsx)(Rm,{size:16,className:"mr-1"})," Submit show"]})]}),(0,_e.jsx)("div",{className:"space-y-2","data-testid":"admin-shows-list",children:n.map(e=>(0,_e.jsxs)("div",{className:"card-surface rounded-xl p-3 flex items-center gap-4","data-testid":"admin-show-row-".concat(e.slug),children:[e.cover_url?(0,_e.jsx)("img",{src:Po(e.cover_url),alt:"",className:"h-12 w-12 rounded-lg object-cover"}):(0,_e.jsx)("div",{className:"h-12 w-12 rounded-lg bg-[#053671]"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsxs)("p",{className:"font-semibold truncate",children:[e.name," ","video"===e.kind&&(0,_e.jsx)("span",{className:"ml-1 rounded-full bg-rose-500/15 px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-rose-400",children:"Video"}),"tiktok"===e.kind&&(0,_e.jsx)("span",{className:"ml-1 rounded-full bg-cyan-400/15 px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-cyan-300",children:"TikTok"})," ",!e.active&&(0,_e.jsx)("span",{className:"ml-2 text-[10px] font-mono uppercase text-amber-400",children:"hidden"})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[(e.placements||[]).map(e=>[e.group,e.subgroup].filter(Boolean).join(" \u203a ")).join(", ")||e.category," \xb7 ","tiktok"===e.kind?"TikTok \xb7 scanned ".concat(e.last_synced_at?Oo(e.last_synced_at):"never"):"video"===e.kind?"YouTube playlist \xb7 synced ".concat(e.last_synced_at?Oo(e.last_synced_at):"never"):e.rss_url?"RSS \xb7 synced ".concat(e.last_synced_at?Oo(e.last_synced_at):"never"):"Manual episodes"]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-1",children:[(e.rss_url||e.youtube_playlist_id||"tiktok"===e.kind)&&(0,_e.jsx)("button",{onClick:()=>(async e=>{try{const t=(await Eo.post("/admin/shows/".concat(e.id,"/sync"))).data;Ta.success("".concat(e.name,": ").concat(t.episodes_added," new episodes")),P()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-sky-400",title:"Sync feed","data-testid":"sync-show-".concat(e.slug),children:(0,_e.jsx)(Qp,{size:16})}),(0,_e.jsx)("button",{onClick:()=>m((0,i.A)((0,i.A)({},e),{},{host_ids:e.host_ids||[],placements:e.placements||[]})),className:"p-2 text-slate-400 hover:text-white",title:"Edit","data-testid":"edit-show-".concat(e.slug),children:(0,_e.jsx)(tf,{size:16})}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm('Delete "'.concat(e.name,'" and all its episodes?')))try{await Eo.delete("/admin/shows/".concat(e.id)),Ta.success("Show deleted"),P()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400",title:"Delete","data-testid":"delete-show-".concat(e.slug),children:(0,_e.jsx)(Mm,{size:16})})]})]},e.id))}),(0,_e.jsx)(th,{open:!!h,onOpenChange:e=>!e&&M(),children:(0,_e.jsxs)(sh,{className:"card-surface max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"show-form-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsx)(oh,{className:"font-display text-2xl",children:null!==h&&void 0!==h&&h.id?"Edit show":"Submit a new show"})}),h&&(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),x(!0);try{const e=h.id,t=(0,Pe.A)(h,of),n=Object.fromEntries(Object.entries(t).filter(e=>(0,De.A)(e,1)[0]in lf));e?await Eo.put("/admin/shows/".concat(e),n):await Eo.post("/admin/shows",n),Ta.success(e?"Show updated":"Show published to the front page"),M(),P()}catch(cS){Ta.error(Mo(cS))}finally{x(!1)}},className:"space-y-4 mt-2",children:[(0,_e.jsx)("div",{className:"flex rounded-full bg-white/5 border border-white/10 p-1 w-fit","data-testid":"show-kind-toggle",children:[["audio","Audio podcast",bh],["video","YouTube video series",oi],["tiktok","TikTok clips",ri]].map(e=>{let t=(0,De.A)(e,3),n=t[0],a=t[1],s=t[2];return(0,_e.jsxs)("button",{type:"button",onClick:()=>R("kind",n),className:"inline-flex items-center gap-1.5 rounded-full px-4 py-1.5 text-xs font-bold transition-colors ".concat(h.kind===n?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"show-kind-".concat(n),children:[(0,_e.jsx)(s,{size:13})," ",a]},n)})}),"tiktok"===h.kind?(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"TikTok profile URL"}),(0,_e.jsx)(Gh,{value:h.tiktok_url,onChange:e=>R("tiktok_url",e.target.value),placeholder:"https://www.tiktok.com/@underdogpodcasts",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"show-tiktok-input"}),(0,_e.jsx)("p",{className:"mt-1.5 text-xs text-slate-500",children:"TikTok has no public feed, so the profile is scanned every 4 hours on a best-effort basis. To guarantee clips appear, paste video links under Episodes \u2192 \u201cAdd TikToks\u201d."})]}):"video"===h.kind?(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["YouTube playlist URL ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(videos sync from it hourly)"})]}),(0,_e.jsxs)("div",{className:"flex gap-2 mt-1.5",children:[(0,_e.jsx)(Gh,{value:h.youtube_playlist_id,onChange:e=>R("youtube_playlist_id",e.target.value),placeholder:"https://www.youtube.com/playlist?list=PL\u2026",className:"bg-white/5 border-white/10","data-testid":"show-playlist-input"}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{if(!h.youtube_playlist_id)return Ta.error("Paste a YouTube playlist URL first");w(!0);try{const e=(await Eo.post("/admin/shows/preview-playlist",{playlist_url:h.youtube_playlist_id})).data;m(t=>(0,i.A)((0,i.A)({},t),{},{youtube_playlist_id:e.playlist_id,name:t.name||e.name,cover_url:t.cover_url||e.cover_url,website:t.website||e.website,category:"General"===t.category?"Video":t.category})),Ta.success('Found "'.concat(e.name,'" with ').concat(e.episode_
2count," recent videos"))}catch(lS){Ta.error(Mo(lS))}finally{w(!1)}},disabled:y,variant:"outline",className:"rounded-lg border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"show-playlist-fetch-button",children:[(0,_e.jsx)(nf,{size:14,className:"mr-1"})," ",y?"Fetching\u2026":"Auto-fill"]})]})]}):(0,_e.jsxs)("div",{className:"space-y-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["RSS feed URL ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(optional \u2014 auto-fills everything)"})]}),(0,_e.jsxs)("div",{className:"flex gap-2 mt-1.5",children:[(0,_e.jsx)(Gh,{value:h.rss_url,onChange:e=>R("rss_url",e.target.value),placeholder:"https://feeds.example.com/show.rss",className:"bg-white/5 border-white/10","data-testid":"show-rss-input"}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{if(!h.rss_url)return Ta.error("Paste an RSS feed URL first");w(!0);try{const e=(await Eo.post("/admin/shows/preview-rss",{rss_url:h.rss_url})).data;m(t=>(0,i.A)((0,i.A)({},t),{},{name:t.name||e.name,description:t.description||e.description,host:t.host||e.host,cover_url:t.cover_url||e.cover_url,website:t.website||e.website,category:"General"===t.category?e.category||"General":t.category})),Ta.success('Found "'.concat(e.name,'" with ').concat(e.episode_
2count," episodes"))}catch(lS){Ta.error(Mo(lS))}finally{w(!1)}},disabled:y,variant:"outline",className:"rounded-lg border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"show-rss-fetch-button",children:[(0,_e.jsx)(nf,{size:14,className:"mr-1"})," ",y?"Fetching\u2026":"Auto-fill"]})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Acast show ID ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(for host publishing \u2014 from Acast \u2192 Show settings)"})]}),(0,_e.jsx)(Gh,{value:h.acast_show_id||"",onChange:e=>R("acast_show_id",e.target.value),placeholder:"e.g. 5f1e\u2026",className:"mt-1.5 bg-white/5 border-white/10 font-mono text-xs","data-testid":"show-acast-id-input"})]})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-[auto_1fr] gap-6 items-start",children:[(0,_e.jsxs)("div",{className:"sm:w-56 mx-auto",children:[(0,_e.jsx)(tm,{className:"block text-center mb-2",children:"Cover artwork"}),(0,_e.jsx)(rf,{value:h.cover_url,onChange:e=>R("cover_url",e),shape:"square",testId:"show-cover"})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Show name *"}),(0,_e.jsx)(Gh,{required:!0,value:h.name,onChange:e=>R("name",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"show-name-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Category"}),(0,_e.jsx)(Gh,{value:h.category,onChange:e=>R("category",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"show-category-input"})]}),(0,_e.jsxs)("div",{className:"sm:col-span-2",children:[(0,_e.jsx)(tm,{children:"Website"}),(0,_e.jsx)(Gh,{value:h.website,onChange:e=>R("website",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"show-website-input"})]})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Host(s) ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(from Team \u2014 pick as many as apply)"})]}),(0,_e.jsx)(df,{team:C,value:h.host_ids||[],onChange:e=>R("host_ids",e)}),h.host&&!(h.host_ids||[]).length&&(0,_e.jsxs)("p",{className:"mt-1 text-[11px] text-slate-500",children:['Feed lists "',h.host,'" \u2014 pick them from Team to link a profile.']})]}),(0,_e.jsx)(cf,{menu:N,value:h.placements||[],onChange:e=>R("placements",e)}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Description"}),(0,_e.jsx)(am,{value:h.description,onChange:e=>R("description",e.target.value),rows:3,className:"mt-1.5 bg-white/5 border-white/10","data-testid":"show-description-input"})]}),(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)(bp,{checked:h.active,onCheckedChange:e=>R("active",e),"data-testid":"show-active-switch"}),(0,_e.jsx)(tm,{children:"Visible on site"})]}),"audio"===h.kind&&(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)(bp,{checked:!!h.club_map,onCheckedChange:e=>R("club_map",e),"data-testid":"show-club-map-switch"}),(0,_e.jsxs)(tm,{children:["Club map ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(3D globe of every club covered \u2014 one club per episode)"})]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsx)(tm,{children:"Menu order"}),(0,_e.jsx)(Gh,{type:"number",value:h.order,onChange:e=>R("order",Number(e.target.value)),className:"w-20 bg-white/5 border-white/10","data-testid":"show-order-input"})]})]}),(0,_e.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,_e.jsx)(Dh,{type:"button",variant:"ghost",onClick:M,"data-testid":"show-form-cancel",children:"Cancel"}),(0,_e.jsx)(Dh,{type:"submit",disabled:g,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"show-form-submit",children:g?"Saving\u2026":h.id?"Save changes":"Publish show"})]})]})]})})]})}const hf=Jo("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),mf={video:"YouTube",tiktok:"TikTok"},pf=e=>{let t=e.show,n=e.index,a=e.version,r=e.onEdit,o=e.onChanged;const l=(0,s.useState)(!1),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.use
2State)(null),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(null),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useState)(""),w=(0,De.A)(y,2),j=w[0],k=w[1],N=()=>Eo.get("/admin/episodes",{params:{show_id:t.id,limit:5e3}}).then(e=>f(e.data)).catch(()=>f([]));(0,s.useEffect)(()=>{d&&N()},[a]);return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl overflow-hidden","data-testid":"show-group-".concat(n),children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>{d||null!==p||N(),u(e=>!e)},className:"w-full flex items-center gap-4 p-3 text-left hover:bg-white/[0.04] transition-colors","aria-expanded":d,"data-testid":"show-group-toggle-".concat(n),children:[(0,_e.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-slate-200",children:d?(0,_e.jsx)(hf,{size:16}):(0,_e.jsx)(Rm,{size:16})}),t.cover_url?(0,_e.jsx)("img",{src:Po(t.cover_url),alt:"",className:"h-12 w-12 rounded-lg object-cover bg-[#053671]"}):(0,_e.jsx)("div",{className:"h-12 w-12 rounded-lg bg-[#053671]"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsxs)("p",{className:"font-semibold truncate flex items-center gap-2",children:[t.name,mf[t.kind]&&(0,_e.jsx)("span",{className:"rounded-full bg-rose-500/15 px-1.5 py-0.5 text-[9px] font-mono uppercase tracking-wider text-rose-400",children:mf[t.kind]})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate","data-testid":"show-group-meta-".concat(n),children:[t.episode_
2count," episode",1===t.episode_count?"":"s",t.latest_at?" \xb7 updated ".concat(Oo(t.latest_at)):" \xb7 no episodes yet"]})]})]}),d&&(0,_e.jsxs)("div",{className:"border-t border-white/10 divide-y divide-white/5","data-testid":"show-group-episodes-".concat(n),children:[null===p&&(0,_e.jsx)("p",{className:"p-4 text-sm text-slate-400",children:"Loading\u2026"}),0===(null===p||void 0===p?void 0:p.length)&&(0,_e.jsx)("p",{className:"p-4 text-sm text-slate-400",children:"No episodes yet."}),null===p||void 0===p?void 0:p.map((e,a)=>(0,_e.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 pl-14","data-testid":"show-group-".concat(n,"-episode-").concat(a),children:[(0,_e.jsx)("img",{src:Po(e.image_url||t.cover_url),alt:"",className:"h-9 w-9 rounded-md object-cover bg-[#053671]"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[v===e.id?(0,_e.jsxs)("form",{onSubmit:t=>{t.preventDefault(),(async e=>{const t=j.trim();if(!t||t===e.title)return b(null);try{await Eo.put("/admin/episodes/".concat(e.id),{title:t}),f(n=>n.map(n=>n.id===e.id?(0,i.A)((0,i.A)({},n),{},{title:t}):n)),Ta.success("Title updated")}catch(cS){Ta.error(Mo(cS))}b(null)})(e)},className:"flex items-center gap-2",children:[(0,_e.jsx)(Gh,{autoFocus:!0,value:j,onChange:e=>k(e.target.value),onKeyDown:e=>"Escape"===e.key&&b(null),className:"h-8 bg-white/5 border-white/10 text-sm","data-testid":"episode-title-inline-input-".concat(n,"-").concat(a)}),(0,_e.jsx)("button",{type:"submit",className:"p-1.5 text-emerald-400 hover:text-emerald-300","data-testid":"episode-title-inline-save-".concat(n,"-").concat(a),children:(0,_e.jsx)(Mi,{size:16})}),(0,_e.jsx)("button",{type:"button",onClick:()=>b(null),className:"p-1.5 text-slate-400 hover:text-white","data-testid":"episode-title-inline-cancel-".concat(n,"-").concat(a),children:(0,_e.jsx)(ai,{size:16})})]}):(0,_e.jsx)("button",{type:"button",onClick:()=>(e=>{b(e.id),k(e.title)})(e),title:"Click to edit title",className:"block w-full text-left text-sm font-medium truncate hover:text-sky-300 transition-colors","data-testid":"episode-title-".concat(n,"-").concat(a),children:e.title}),(0,_e.jsxs)("p",{className:"text-xs text-slate-500",children:[Ro(e.published_at)," \xb7 ",(0,_e.jsx)("span",{className:"manual"===e.source?"text-amber-400":"text-sky-400",children:e.source})]})]}),(0,_e.jsx)("button",{onClick:()=>r(e),className:"p-2 text-slate-400 hover:text-white",title:"Full edit","data-testid":"edit-episode-".concat(n,"-").concat(a),children:(0,_e.jsx)(tf,{size:15})}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm('Delete "'.concat(e.title,'"?')))try{await Eo.delete("/admin/episodes/".concat(e.id)),f(t=>t.filter(t=>t.id!==e.id)),Ta.success("Episode deleted"),o()}catch(cS){Ta.error(Mo(cS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400","data-testid":"delete-episode-".concat(n,"-").concat(a),children:(0,_e.jsx)(Mm,{size:15})})]},e.id))]})]})},ff=["id"],gf={show_id:"",title:"",summary:"",audio_url:"",image_url:"",published_at:"",duration:""},xf="mt-1.5 w-full h-10 rounded-md bg-white/5 border border-white/10 px-3 text-sm";function vf(){const e=(0,s.useState)([]),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(""),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)([]),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(0),f=(0,De.A)(p,2),g=f[0],x=f[1],v=fa(),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useState)(y.get("new")?(0,i.A)({},gf):null),k=(0,De.A)(j,2),N=k[0],S=k[1],A=(0,s.useState)(!1),_=(0,De.A)(A,2),C=_[0],E=_[1],P=(0,s.useState)(null),M=(0,De.A)(P,2),R=M[0],O=M[1];(0,s.useEffect)(()=>{Eo.get("/shows",{params:{include_inactive:!0}}).then(e=>a(e.data)).catch(()=>{})},[]);const z=()=>Eo.get("/admin/shows/activity").then(e=>{m(e.data),x(e=>e+1)}).catch(()=>{});(0,s.useEffect)(()=>{z()},[]);const T=l?h.filter(e=>e.id===l):h,D=()=>{S(null),y.get("new")&&w({})},L=(e,t)=>S(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t})),F=e=>S((0,i.A)((0,i.A)({},e),{},{published_at:e.published_at?e.published_at.slice(0,16):""}));return(0,_e.jsxs)("div",{"data-testid":"admin-episodes",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4 mb-8",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Content"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Episodes"})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsxs)("select",{value:l,onCh
2ange:e=>c(e.target.value),className:"h-10 rounded-full bg-white/5 border border-white/10 px-4 text-sm","data-testid":"episodes-show-filter",children:[(0,_e.jsx)("option",{value:"",children:"All shows"}),n.map(e=>(0,_e.jsx)("option",{value:e.id,children:e.name},e.id))]}),n.some(e=>"tiktok"===e.kind)&&(0,_e.jsxs)(Dh,{onClick:()=>{var e;return O({show_id:(null===(e=n.find(e=>"tiktok"===e.kind))||void 0===e?void 0:e.id)||"",urls:""})},variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"add-tiktoks-button",children:[(0,_e.jsx)(ri,{size:16,className:"mr-1 text-cyan-300"})," Add TikToks"]}),(0,_e.jsxs)(Dh,{onClick:()=>S((0,i.A)((0,i.A)({},gf),{},{show_id:l})),className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"add-episode-button",children:[(0,_e.jsx)(Rm,{size:16,className:"mr-1"})," New episode"]})]})]}),(0,_e.jsx)(th,{open:!!R,onOpenChange:e=>!e&&O(null),children:(0,_e.jsxs)(sh,{className:"card-surface max-w-xl","data-testid":"tiktok-form-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsx)(oh,{className:"font-display text-2xl",children:"Add TikToks"})}),R&&(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),E(!0);try{const e=(await Eo.post("/admin/episodes/tiktok",R)).data;Ta.success("".concat(e.added," clip").concat(1===e.added?"":"s"," added").concat(e.failed.length?" \xb7 ".concat(e.failed.length," link(s) failed"):"")),O(null),z()}catch(cS){Ta.error(Mo(cS))}finally{E(!1)}},className:"space-y-4 mt-2",children:[(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"Paste one TikTok video link per line. Title and thumbnail are pulled automatically; clips are listed newest first."}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Show"}),(0,_e.jsx)("select",{required:!0,value:R.show_id,onChange:e=>O(t=>(0,i.A)((0,i.A)({},t),{},{show_id:e.target.value})),className:xf,"data-testid":"tiktok-show-select",children:n.filter(e=>"tiktok"===e.kind).map(e=>(0,_e.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Video links"}),(0,_e.jsx)(am,{required:!0,rows:6,value:R.urls,onChange:e=>O(t=>(0,i.A)((0,i.A)({},t),{},{urls:e.target.value})),placeholder:"https://www.tiktok.com/@underdogpodcasts/video/7300000000000000000\nhttps://www.tiktok.com/@underdogpodcasts/video/\u2026",className:"mt-1.5 bg-white/5 border-white/10 font-mono text-xs","data-testid":"tiktok-urls-input"})]}),(0,_e.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,_e.jsx)(Dh,{type:"button",variant:"ghost",onClick:()=>O(null),"data-testid":"tiktok-form-cancel",children:"Cancel"}),(0,_e.jsx)(Dh,{type:"submit",disabled:C,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"tiktok-form-submit",children:C?"Fetching\u2026":"Add clips"})]})]})]})}),(0,_e.jsxs)("p",{className:"text-xs text-slate-500 mb-3","data-testid":"episodes-help",children:["Shows are ordered by most recently updated. Click ",(0,_e.jsx)("span",{className:"font-mono",children:"+"})," to open a show's episodes, then click any title to edit it inline."]}),(0,_e.jsxs)("div",{className:"space-y-2","data-testid":"admin-episodes-list",children:[T.map((e,t)=>(0,_e.jsx)(pf,{show:e,index:t,version:g,onEdit:F,onChanged:z},e.id)),h.length>0&&0===T.length&&(0,_e.jsx)("p",{className:"text-slate-400 text-sm",children:"No matching show."}),0===h.length&&(0,_e.jsx)("p",{className:"text-slate-400 text-sm",children:"No shows yet."})]}),(0,_e.jsx)(th,{open:!!N,onOpenChange:e=>!e&&D(),children:(0,_e.jsxs)(sh,{className:"card-surface max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"episode-form-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsx)(oh,{className:"font-display text-2xl",children:null!==N&&void 0!==N&&N.id?"Edit episode":"Post a new episode"})}),N&&(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),E(!0);try{const e=N.id,t=(0,Pe.A)(N,ff),n=Object.fromEntries(Object.entries(t).filter(e=>(0,De.A)(e,1)[0]in gf));n.published_at?n.published_at=new Date(n.published_at).toISOString():delete n.published_at,e?(delete n.show_id,await Eo.put("/admin/episodes/".concat(e),n)):await Eo.post("/admin/episodes",n),Ta.success(e?"Episode updated":"Episode published"),D(),z()}catch(cS){Ta.error(Mo(cS))}finally{E(!1)}}
2,className:"space-y-4 mt-2",children:[!N.id&&(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Show *"}),(0,_e.jsxs)("select",{required:!0,value:N.show_id,onChange:e=>L("show_id",e.target.value),className:xf,"data-testid":"episode-show-select",children:[(0,_e.jsx)("option",{value:"",children:"Select a show\u2026"}),n.map(e=>(0,_e.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Episode title *"}),(0,_e.jsx)(Gh,{required:!0,value:N.title,onChange:e=>L("title",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-title-input"})]}),N.video_id?(0,_e.jsxs)("p",{className:"text-xs text-slate-500","data-testid":"episode-video-note",children:["tiktok"===N.source?"TikTok":"YouTube"," clip \xb7 video ID ",(0,_e.jsx)("span",{className:"font-mono",children:N.video_id}),". Your title and description edits are kept on future syncs."]}):(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Audio URL (MP3) *"}),(0,_e.jsx)(Gh,{required:!0,value:N.audio_url,onChange:e=>L("audio_url",e.target.value),placeholder:"https://\u2026/episode.mp3",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-audio-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Episode description"}),(0,_e.jsx)(am,{value:N.summary,onChange:e=>L("summary",e.target.value),rows:5,placeholder:"Full show notes \u2014 the first few lines appear on cards, the rest behind \u201cRead more\u201d",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-summary-input"})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-3 gap-4",children:[(0,_e.jsxs)("div",{className:"sm:col-span-1",children:[(0,_e.jsx)(tm,{children:"Artwork URL"}),(0,_e.jsx)(Gh,{value:N.image_url,onChange:e=>L("image_url",e.target.value),placeholder:"Defaults to show cover",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-image-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Publish date"}),(0,_e.jsx)(Gh,{type:"datetime-local",value:N.published_at,onChange:e=>L("published_at",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-date-input"})]}),!N.video_id&&(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Duration"}),(0,_e.jsx)(Gh,{value:N.duration,onChange:e=>L("duration",e.target.value),placeholder:"45:00",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"episode-duration-input"})]})]}),(0,_e.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,_e.jsx)(Dh,{type:"button",variant:"ghost",onClick:D,"data-testid":"episode-form-cancel",children:"Cancel"}),(0,_e.jsx)(Dh,{type:"submit",disabled:C,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"episode-form-submit",children:C?"Saving\u2026":N.id?"Save changes":"Publish episode"})]})]})]})})]})}const bf=Jo("clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]),yf=Jo("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),wf=e=>{let t=e.member,n=e.account,a=e.onChanged;const r=(0,s.useState)((null===n||void 0===n?void 0:n.email)||""),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(""),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useState)(!n||n.can_publish),p=(0,De.A)(m,2),f=p[0],g=p[1],x=(0,s.useState)(!1),v=(0,De.A)(x,2),b=v[0],y=v[1];return(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4 space-y-3","data-testid":"host-account-panel",children:[(0,_e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-1.5",children:[(0,_e.jsx)(yf,{size:12})," Publishing login"]}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:n?"Signed in ".concat(n.last_login_at?"recently":"never"," \xb7 hosts land on the Publish page and only see their assigned shows."):"Give this host a login so they can publish episodes to their assigned shows from /admin/login."})]}),(0,_e.jsxs)("label",{className:"flex items-center gap-2 shrink-0 text-xs font-semibold",children:[(0,_e.jsx)(bp,{checked:f,onCheckedChange:g,"data-testid":"host-account-can-publish"})," Can publish"]})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Login email"}),(0,_e.jsx)(Gh,{type:"email",value:i,onChange:e=>l(e.target.value),placeholder:"[email protected]",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"host-account-email"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:n?"New password (leave blank to keep)":"Password"}),(0,_e.jsx)(Gh,{type:"text",value:u,onChange:e=>h(e.target.value),placeholder:"At least 8 characters",className:"mt-1.5 bg-white/5 border-white/10 font-mono","data-testid":"host-account-password"})]})]}),(0,_e.jsxs)("div",{className:"flex justify-end gap-2",children:[n&&(0,_e.jsxs)(Dh,{type:"button",variant:"ghost",onClick:async()=>
2{if(window.confirm("Remove ".concat(t.name,"'s login? They will no longer be able to sign in."))){y(!0);try{await Eo.delete("/admin/team/".concat(t.id,"/account")),Ta.success("Login removed"),l(""),h(""),a()}catch(lS){Ta.error(Mo(lS))}finally{y(!1)}}},disabled:b,className:"text-rose-400 hover:text-rose-300","data-testid":"host-account-remove",children:[(0,_e.jsx)(Mm,{size:14,className:"mr-1"})," Remove login"]}),(0,_e.jsx)(Dh,{type:"button",onClick:async()=>{if(!i)return Ta.error("Enter the host's login email");if(!n&&u.length<8)return Ta.error("Password must be at least 8 characters");if(u&&u.length<8)return Ta.error("Password must be at least 8 characters");y(!0);try{await Eo.post("/admin/team/".concat(t.id,"/account"),{email:i,password:u||null,can_publish:f}),Ta.success(n?"Login updated":"Login created \u2014 share the email and password with the host"),h(""),a()}catch(lS){Ta.error(Mo(lS))}finally{y(!1)}},disabled:b,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"host-account-save",children:b?"Saving\u2026":n?"Update login":"Create login"})]})]})},jf=["id"],kf={name:"",role:"Host",image_url:"",show_ids:[],producer_show_ids:[],bio:""};function Nf(){var e;const t=(0,s.useState)([]),n=(0,De.A)(t,2),a=n[0],r=n[1],o=(0,s.useState)({}),l=(0,De.A)(o,2),c=l[0],d=l[1],u=(0,s.useState)([]),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(null),g=(0,De.A)(f,2),x=g[0],v=g[1],b=(0,s.useState)(!1),y=(0,De.A)(b,2),w=y[0],j=y[1],k=(0,s.use
2State)(""),N=(0,De.A)(k,2),S=N[0],A=N[1],_=(0,s.useState)(!1),C=(0,De.A)(_,2),E=C[0],P=C[1],M=(0,s.useState)(""),R=(0,De.A)(M,2),O=R[0],z=R[1],T=()=>Eo.get("/admin/team/accounts").then(e=>d(Object.fromEntries(e.data.map(e=>[e.team_id,e])))).catch(()=>{}),D=()=>{Eo.get("/team").then(e=>r(e.data)).catch(()=>{}),T()};(0,s.useEffect)(()=>{D(),Eo.get("/shows",{params:{include_inactive:!0}}).then(e=>p(e.data)).catch(()=>{})},[]);const L=(e,t)=>v(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t})),F=e=>{var t;return null===(t=m.find(t=>t.id===e))||void 0===t?void 0:t.name};return(0,_e.jsxs)("div",{"data-testid":"admin-team",children:[(0,_e.jsxs)("div",{className:"flex items-end justify-between gap-4 mb-8",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"People"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Hosts & Team"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Each host gets a public profile page listing every show and episode they appear on."})]}),(0,_e.jsxs)(Dh,{onClick:()=>v((0,i.A)({},kf)),className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"add-member-button",children:[(0,_e.jsx)(Rm,{size:16,className:"mr-1"})," Add host"]})]}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-3","data-testid":"admin-team-list",children:a.map((e,t)=>{var n,a,s;return(0,_e.jsxs)("div",{className:"card-surface rounded-xl p-3 flex items-center gap-3","data-testid":"team-row-".concat(e.slug),children:[e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:"",className:"h-12 w-12 rounded-full object-cover"}):(0,_e.jsx)("div",{className:"h-12 w-12 rounded-full bg-[#053671]"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsxs)("p",{className:"font-semibold truncate flex items-center gap-1.5",children:[e.name,(null===(n=c[e.id])||void 0===n?void 0:n.can_publish)&&(0,_e.jsx)(ym,{size:15,className:"text-emerald-400 shrink-0",title:"Has publishing access","aria-label":"Has publishing access","data-testid":"team-publisher-badge-".concat(e.slug)})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[e.role,null!==(a=e.show_ids)&&void 0!==a&&a.length?" \xb7 ".concat(e.show_ids.map(F).filter(Boolean).join(", ")):" \xb7 No shows assigned"]}),null!==(s=e.producer_show_ids)&&void 0!==s&&s.length?(0,_e.jsxs)("p",{className:"text-[11px] text-amber-300/80 truncate","data-testid":"member-produces-".concat(t),children:["Produces ",e.producer_show_ids.length," show",1===e.producer_show_ids.length?"":"s",": ",e.producer_show_ids.map(F).filter(Boolean).join(", ")]}):null]}),(0,_e.jsx)("a",{href:"/hosts/".concat(e.slug),target:"_blank",rel:"noreferrer",className:"p-2 text-slate-400 hover:text-sky-400",title:"View profile","data-testid":"view-member-".concat(t),children:(0,_e.jsx)(Ch,{size:16})}),(0,_e.jsx)("button",{onClick:()=>{A(""),z(""),P(!1),v((0,i.A)((0,i.A)({},e),{},{show_ids:e.show_ids||[],producer_show_ids:e.producer_show_ids||[]}))},className:"p-2 text-slate-400 hover:text-white","data-testid":"edit-member-".concat(t),children:(0,_e.jsx)(tf,{size:16})}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm("Remove ".concat(e.name," from the team?")))try{await Eo.delete("/admin/team/".concat(e.id)),Ta.success("Removed"),D()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400","data-testid":"delete-member-".concat(t),children:(0,_e.jsx)(Mm,{size:16})})]},e.id)})}),(0,_e.jsx)(th,{open:!!x,onOpenChange:e=>!e&&v(null),children:(0,_e.jsxs)(sh,{className:"card-surface max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"member-form-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsx)(oh,{className:"font-display text-2xl",children:null!==x&&void 0!==x&&x.id?"Edit host":"Add host"})}),x&&(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),j(!0);try{const e=x.id,t=(0,Pe.A)(x,jf),n=Object.fromEntries(Object.entries(t).filter(e=>(0,De.A)(e,1)[0]in kf));e?await Eo.put("/admin/team/".concat(e),n):await Eo.post("/admin/team",n),Ta.success(e?"Host updated":"Host added"),v(null),D()}catch(cS){Ta.error(Mo(cS))}finally{j(!1)}}
2,className:"space-y-4 mt-2",children:[(0,_e.jsxs)("div",{className:"grid sm:grid-cols-[1fr_auto] gap-6 items-start",children:[(0,_e.jsxs)("div",{className:"space-y-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Name *"}),(0,_e.jsx)(Gh,{required:!0,value:x.name,onChange:e=>L("name",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"member-name-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Role / title"}),(0,_e.jsx)(Gh,{value:x.role,onChange:e=>L("role",e.target.value),placeholder:"Host, Co-host, Producer\u2026",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"member-role-input"})]})]}),(0,_e.jsxs)("div",{className:"pt-1 sm:w-56",children:[(0,_e.jsx)(tm,{className:"block text-center mb-2",children:"Photo"}),(0,_e.jsx)(rf,{value:x.image_url,onChange:e=>L("image_url",e),testId:"member-image"})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Bio"}),(0,_e.jsx)(am,{value:x.bio,onChange:e=>L("bio",e.target.value),rows:3,placeholder:"Shown on the host's profile page and show pages",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"member-bio-input"})]}),(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Shows"}),(0,_e.jsxs)("p",{className:"text-xs text-slate-500 mt-1",children:[x.show_ids.length," assigned \u2014 appears on those show pages and their episodes on the profile."]})]}),(0,_e.jsx)(Gh,{value:S,onChange:e=>A(e.target.value),placeholder:"Filter shows\u2026",className:"h-9 w-44 bg-white/5 border-white/10","data-testid":"member-show-filter"})]}),(0,_e.jsx)("div",{className:"max-h-56 overflow-y-auto grid sm:grid-cols-2 gap-1 pr-1","data-testid":"member-show-list",children:m.filter(e=>e.name.toLowerCase().includes(S.toLowerCase())).map(e=>{const t=x.show_ids.includes(e.id);return(0,_e.jsxs)("label",{className:"flex items-center gap-2.5 rounded-lg px-2 py-1.5 cursor-pointer text-sm transition-colors ".concat(t?"bg-sky-400/15 text-white":"hover:bg-white/5 text-slate-300"),"data-testid":"member-show-option-".concat(e.slug),children:[(0,_e.jsx)("input",{type:"checkbox",checked:t,onChange:()=>(e=>v(t=>(0,i.A)((0,i.A)({},t),{},{show_ids:t.show_ids.includes(e)?t.show_ids.filter(t=>t!==e):[...t.show_ids,e]})))(e.id),className:"accent-sky-400"}),e.cover_url?(0,_e.jsx)("img",{src:e.cover_url,alt:"",className:"h-6 w-6 rounded object-cover"}):(0,_e.jsx)("span",{className:"h-6 w-6 rounded bg-[#053671]"}),(0,_e.jsx)("span",{className:"truncate",children:e.name})]},e.id)})})]}),(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-4","data-testid":"member-producer-panel",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>P(e=>!e),className:"w-full flex items-center justify-between gap-3 text-left","aria-expanded":E,"data-testid":"member-producer-toggle",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-2",children:[(0,_e.jsx)(bf,{size:13})," Producer ",(0,_e.jsxs)("span",{className:"text-slate-500 normal-case tracking-normal font-sans",children:["(",x.producer_show_ids.length,")"]})]}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:"Lets this host submit episodes for extra audio shows. Not shown anywhere publicly \u2014 they won't appear as a host on those shows."})]}),(0,_e.jsx)(mi,{size:16,className:"text-slate-400 shrink-0 transition-transform ".concat(E?"rotate-180":"")})]}),E&&(0,_e.jsxs)("div",{className:"mt-3",children:[(0,_e.jsx)(Gh,{value:O,onChange:e=>z(e.target.value),placeholder:"Filter shows\u2026",className:"h-9 w-44 bg-white/5 border-white/10 mb-3","data-testid":"member-producer-filter"}),(0,_e.jsx)("div",{className:"max-h-56 overflow-y-auto grid sm:grid-cols-2 gap-1 pr-1","data-testid":"member-producer-list",children:m.filter(e=>!["video","tiktok"].includes(e.kind)&&e.name.toLowerCase().includes(O.toLowerCase())).map(e=>{const t=x.producer_show_ids.includes(e.id),n=x.show_ids.includes(e.id);return(0,_e.jsxs)("label",{className:"flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-sm transition-colors ".concat(n?"opacity-40 cursor-not-allowed":"cursor-pointer"," ").concat(t?"bg-amber-400/15 text-white":"hover:bg-white/5 text-slate-300"),title:n?"Already a host on this show":void 0,"data-testid":"member-producer-option-".concat(e.slug),children:[(0,_e.jsx)("input",{type:"checkbox",checked:t,disabled:n,onChange:()=>(e=>v(t=>(0,i.A)((0,i.A)({},t),{},{producer_show_ids:t.producer_show_ids.includes(e)?t.producer_show_ids.filter(t=>t!==e):[...t.producer_show_ids,e]})))(e.id),className:"accent-amber-400"}),e.cover_url?(0,_e.jsx)("img",{src:e.cover_url,alt:"",className:"h-6 w-6 rounded object-cover"}):(0,_e.jsx)("span",{className:"h-6 w-6 rounded bg-[#053671]"}),(0,_e.jsx)("span",{className:"truncate",children:e.name})]},e.id)})})]})]}),x.id&&(0,_e.jsx)(wf,{member:x,account:c[x.id],onChanged:T},"".concat(x.id,"-").concat((null===(e=c[x.id])||void 0===e?void 0:e.email)||"")),(0,_e.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,_e.jsx)(Dh,{type:"button",variant:"ghost",onClick:()=>v(null),"data-testid":"member-form-cancel",children:"Cancel"}),(0,_e.jsx)(Dh,{type:"submit",disabled:w,className:"rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"member-form-submit",children:w?"Saving\u2026":"Save"})]})]})]})})]})}const Sf=e=>{let t=e.label,n=e.hint,a=e.value,r=void 0===a?[]:a,o=e.onChange,i=e.defaults,l=e.testId,c=e.tone,d=void 0===c?"rose":c;const u=(0,s.useState)(""),h=(0,De.A)(u,2),m=h[0],p=h[1],f=()=>{const e=m.split(/[,\n]+/).map(e=>e.trim().toLowerCase()).filter(Boolean);e.length&&(o([...new Set([...r,...e])]),p(""))},g="rose"===d?"bg-rose-500/10 border-rose-500/30 text-rose-100":"bg-amber-400/10 border-amber-400/30 text-amber-100";return(0,_e.jsxs)("div",{"data-testid":l,children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"text-sm font-medium leading-none",children:[t," ",(0,_e.jsxs)("span",{className:"text-slate-500 font-normal",children:["(",r.length,")"]})]}),n&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-500",children:n})]}),i&&(0,_e.jsxs)("button",{type:"button",onClick:()=>o([...i]),className:"inline-flex items-center gap-1 text-[11px] text-slate-400 hover:text-white shrink-0","data-testid":"".concat(l,"-reset"),children:[(0,_e.jsx)(Zo,{size:11})," Reset to defaults"]})]}),(0,_e.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,_e.jsx)(Gh,{value:m,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),f())},placeholder:"Add a term \u2014 comma-separate to add several",className:"bg-white/5 border-white/10","data-testid":"".concat(l,"-input")}),(0,_e.jsxs)(Dh,{type:"button",onClick:f,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"".concat(l,"-add"),children:[(0,_e.jsx)(Rm,{size:14,className:"mr-1"})," Add"]})]}),(0,_e.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5 max-h-40 overflow-y-auto pr-1","data-testid":"".concat(l,"-list"),children:[0===r.length&&(0,_e.jsx)("span",{className:"text-xs text-slate-500",children:"Nothing blocked."}),r.map(e=>(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs ".concat(g),"data-testid":"".concat(l,"-term-").concat(e.replace(/[^a-z0-9]+/g,"-")),children:[e,(0,_e.jsx)("button",{type:"button",onClick:()=>o(r.filter(t=>t!==e)),className:"opacity-70 hover:opacity-100","aria-label":"Remove ".concat(e),"data-testid":"".concat(l,"-remove-").concat(e.replace(/[^a-z0-9]+/g,"-")),children:(0,_e.jsx)(ai,{size:11})})]},e))]})]})},Af=Jo("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),_f="America/New_York",Cf=e=>{const t=new Intl.DateTimeFormat("en-US",{timeZone:_f,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(e),n=e=>Number(t.find(t=>t.type===e).value);return{y:n("year"),mo:n("month"),d:n("day"),h:n("hour")%24,mi:n("minute"),s:n("second")}},Ef=e=>{const t=Cf(e);return Date.UTC(t.y,t.mo-1,t.d,t.h,t.mi,t.s)-1e3*Math.floor(e.getTime()/1e3)},Pf=e=>{if(!e)return null;const t=new Date("".concat(e,":00Z")),n=new Date(t.getTime()-Ef(t));return new Date(t.getTime()-Ef(n)).toISOString()},Mf=e=>e?new Intl.DateTimeFormat("en-US",{timeZone:_f,weekday:"long",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(new Date(e)):"",Rf=e=>{let t=e.settings,n=e.set;const a=!!t.launch_gate_enabled,s=t.launch_at&&new Date(t.launch_at)<=new Date;return(0,_e.jsxs)("div",{className:"space-y-4","data-testid":"launch-gate-settings",children:[(0,_e.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow mb-1 flex items-center gap-1.5",children:[(0,_e.jsx)(Af,{size:12})," Launch gate"]}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:'While on, visitors see a "Launching soon" countdown instead of the site until the go-live time, then it unlocks itself. Team members who are signed in still see the full site. The survey, admin and publish pages stay reachable.'})]}),(0,_e.jsx)(bp,{checked:a,onCheckedChange:e=>n("launch_gate_enabled",e),"data-testid":"launch-gate-toggle"})]}),a&&(0,_e.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/5 p-4 space-y-3",children:[(0,_e.jsxs)(tm,{children:["Go-live time ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(Eastern Time \u2014 New York)"})]}),(0,_e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,_e.jsx)("input",{type:"datetime-local",value:(r=t.launch_at,r?new Date(new Date(r).getTime()+Ef(new Date(r))).toISOString().slice(0,16):""),onChange:e=>n("launch_at",Pf(e.target.value)),className:"h-10 rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"launch-at-input"}),(0,_e.jsx)("button",{type:"button",onClick:()=>n("launch_at",Pf((()=>{const e=Cf(new Date),t=new Date(Date.UTC(e.y,e.mo-1,e.d+1));return"".concat(t.toISOString().slice(0,10),"T00:01")})())),className:"h-10 rounded-full border border-white/15 px-4 text-xs font-bold hover:bg-white/10","data-testid":"launch-at-tomorrow-button",children:"Tomorrow 12:01 AM ET"})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400","data-testid":"launch-at-summary",children:[!t.launch_at&&"No time set \u2014 the gate stays up until you pick one or switch it off.",t.launch_at&&(s?"That time has passed \u2014 the site is live.":(0,_e.jsxs)(_e.Fragment,{children:["Site unlocks ",Mf(t.launch_at),"."]}))]})]})]});var r};
2function Of(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!1),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)(!1),u=(0,De.A)(d,2),h=u[0],m=u[1],p=qo().refresh,f=(0,s.useState)(null),g=(0,De.A)(f,2),x=g[0],v=g[1];(0,s.useEffect)(()=>{Eo.get("/admin/settings").then(e=>a(e.data)).catch(()=>{}),Eo.get("/admin/banned-defaults").then(e=>v(e.data)).catch(()=>{})},[]);const b=(e,t)=>a(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t}));return n?(0,_e.jsxs)("div",{"data-testid":"admin-settings",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Configuration"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight mb-8",children:"Site Settings"}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),c(!0);try{const e=(await Eo.put("/admin/settings",n)).data;a(e),p(),Ta.success("Settings saved")}catch(cS){Ta.error(Mo(cS))}finally{c(!1)}},className:"card-surface rounded-2xl p-6 space-y-5 max-w-2xl",children:[(0,_e.jsx)(Rf,{settings:n,set:b}),(0,_e.jsxs)("div",{className:"pt-4 border-t border-white/10",children:[(0,_e.jsx)(tm,{children:"YouTube channel (URL, @handle or channel ID)"}),(0,_e.jsx)(Gh,{value:n.youtube_channel,onChange:e=>b("youtube_channel",e.target.value),placeholder:"https://www.youtube.com/@YourChannel",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"settings-youtube-input"}),(0,_e.jsxs)("p",{className:"mt-1.5 text-xs text-slate-500",children:["Videos are pulled from the channel's public feed and refresh automatically every 10 minutes.",n.youtube_channel_id&&(0,_e.jsxs)(_e.Fragment,{children:[" Resolved ID: ",(0,_e.jsx)("span",{className:"font-mono text-sky-400","data-testid":"settings-youtube-channel-id",children:n.youtube_channel_id})]})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Site tagline"}),(0,_e.jsx)(Gh,{value:n.site_tagline,onChange:e=>b("site_tagline",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"settings-tagline-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Audio feed sync interval"}),(0,_e.jsxs)("div",{className:"mt-1.5 flex gap-2",children:[(0,_e.jsx)("select",{value:n.sync_interval_minutes||60,onChange:e=>b("sync_interval_minutes",Number(e.target.value)),className:"h-10 flex-1 rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"settings-sync-interval-select",children:[[30,"Every 30 minutes"],[60,"Every 60 minutes"],[120,"Every 2 hours"]].map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("option",{value:n,className:"bg-[#0B1A33]",children:a},n)})}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",disabled:h,onClick:async()=>{m(!0);try{const e=(await Eo.post("/admin/sync-all")).data;Ta.success("Synced ".concat(e.shows_synced," feeds \xb7 ").concat(e.episodes_added," new episode").concat(1===e.episodes_added?"":"s"))}catch(cS){Ta.error(Mo(cS))}finally{m(!1)}},className:"h-10 rounded-md border-white/15 bg-transparent hover:bg-white/10 shrink-0","data-testid":"settings-sync-now-button",children:[(0,_e.jsx)(Qp,{size:14,className:"mr-2 ".concat(h?"animate-spin":"")}),h?"Syncing\u2026":"Sync feeds now"]})]}),(0,_e.jsx)("p",{className:"mt-1.5 text-xs text-slate-500",children:"How often RSS feeds are checked for new episodes. YouTube & TikTok always refresh every 4 hours. Takes effect after the current wait finishes."})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Site logo ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(remove to use the built-in badge)"})]}),(0,_e.jsx)("div",{className:"mt-2 flex justify-start",children:(0,_e.jsx)(rf,{value:n.logo_url,onChange:e=>b("logo_url",e),testId:"settings-logo"})})]}),(0,_e.jsxs)("div",{className:"pt-4 border-t border-white/10",children:[(0,_e.jsx)("p",{className:"eyebrow mb-3",children:"Social & listening links"}),(0,_e.jsx)("div",{className:"grid sm:grid-cols-2 gap-4",children:[["instagram_url","Instagram"],["twitter_url","X / Twitter"],["facebook_url","Facebook"],["tiktok_url","TikTok"],["spotify_url","Spotify"],["apple_podcasts_url","Apple Podcasts"]].map(e=>{let t=(0,De.A)(e,2),a=t[0],s=t[1];return(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:s}),(0,_e.jsx)(Gh,{value:n[a]||"",onChange:e=>b(a,e.target.value),placeholder:"https://\u2026",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"settings-".concat(a.replace("_url",""),"-input")})]},a)})}),(0,_e.jsx)("p",{className:"mt-2 text-xs text-slate-500",children:"Links appear in the header and footer. Leave blank to hide."})]}),(0,_e.jsxs)("div",{className:"pt-4 border-t border-white/10 space-y-5",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Host publishing rules"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"Hosts can't publish an episode whose title or summary contains any of these terms, and the Summary Tool avoids them when drafting. Matching is case-insensitive on whole words."})]}),(0,_e.jsx)(Sf,{label:"Blocked sportsbook names",hint:"Brands that must never appear in a summary.",value:n.banned_sportsbooks||[],onChange:e=>b("banned_sportsbooks",e),defaults:null===x||void 0===x?void 0:x.sportsbooks,testId:"settings-sportsbooks",tone:"amber"}),(0,_e.jsx)(Sf,{label:"Blocked profanity",hint:"Hard curse words and slurs that block publishing.",value:n.banned_profanity||[],onChange:e=>b("banned_profanity",e),defaults:null===x||void 0===x?void 0:x.profanity,testId:"settings-profanity",tone:"rose"})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:l,className:"rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"settings-save-button",children:l?"Saving\u2026":"Save settings"})]}),(0,_e.jsx)(zf,{})]}):null}function zf(){const e=(0,s.useState)({current_password:"",new_password:"",confirm:""}),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!1),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(e,t)=>a(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t}));return(0,_e.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),n.new_password.length<8)return Ta.error("New password must be at least 8 characters");if(n.new_password!==n.confirm)return Ta.error("New passwords don't match");c(!0);try{await Eo.post("/auth/change-password",{current_password:n.current_password,new_password:n.new_password}),Ta.success("Password updated \u2014 use it next time you sign in"),a({current_password:"",new_password:"",confirm:""})}catch(cS){Ta.error(Mo(cS))}finally{c(!1)}},className:"card-surface rounded-2xl p-6 space-y-4 max-w-2xl mt-6","data-testid":"change-password-form",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-1",children:"Security"}),(0,_e.jsx)("h2",{className:"font-display text-xl font-bold",children:"Change admin password"}),(0,_e.jsx)("p",{className:"text-xs text-slate-500 mt-1",children:"Minimum 8 characters. You'll stay signed in on this device."})]}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-3 gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Current password"}),(0,_e.jsx)(Gh,{type:"password",required:!0,autoComplete:"current-password",value:n.current_password,onChange:e=>d("current_password",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"password-current-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"New password"}),(0,_e.jsx)(Gh,{type:"password",required:!0,minLength:8,autoComplete:"new-password",value:n.new_password,onChange:e=>d("new_password",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"password-new-input"})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Confirm new password"}),(0,_e.jsx)(Gh,{type:"password",required:!0,autoComplete:"new-password",value:n.confirm,onChange:e=>d("confirm",e.target.value),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"password-confirm-input"})]})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:l,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"password-submit-button",children:l?"Updating\u2026":"Update password"})]})}const Tf=[["","Everything"],["show","Shows"],["episode","Episodes"],["host","Hosts"],["submission","Submissions"],["site","Website"],["sync","Feed syncs"],["inbox","Inbox"]];function Df(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(""),o=(0,De.A)(r,2),i=o[0],l=o[1];(0,s.useEffect)(()=>{Eo.get("/admin/activity",{params:{limit:500,days:7}}).then(e=>a(e.data)).catch(()=>a([]))},[]);const c=(n||[]).filter(e=>!i||e.kind===i),d=c.reduce((e,t)=>{const n=new Date(t.created_at).toLocaleDateString([],{weekday:"long",month:"short",day:"numeric"});return(e[n]||(e[n]=[])).push(t),e},{});return(0,_e.jsxs)("div",{"data-testid":"activity-admin",children:[(0,_e.jsxs)(da,{to:"/admin",className:"inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white","data-testid":"activity-back",children:[(0,_e.jsx)(_h,{size:14})," Dashboard"]}),(0,_e.jsxs)("div",{className:"mt-3 flex flex-wrap items-end justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow mb-1 flex items-center gap-1.5",children:[(0,_e.jsx)(Gp,{size:12})," Activity"]}),(0,_e.jsx)("h1",{className:"font-display text-3xl font-extrabold",children:"Updates from the past 7 days"}),(0,_e.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:"Every change to shows, episodes, hosts, submissions and the website \u2014 by you, your hosts, or the feed sync."})]}),(0,_e.jsx)("div",{className:"inline-flex flex-wrap gap-1 rounded-full bg-white/5 p-1","data-testid":"activity-filters",children:Tf.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("button",{type:"button",onClick:()=>l(n),className:"rounded-full px-3 py-1.5 text-xs font-bold transition-colors ".concat(i===n?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"activity-filter-".concat(n||"all"),children:a},n)})})]}),(0,_e.jsxs)("div",{className:"mt-6 space-y-6",children:[null===n&&(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"Loading\u2026"}),null!==n&&0===c.length&&(0,_e.jsxs)("p",{className:"text-sm text-slate-400 card-surface rounded-2xl p-6","data-testid":"activity-empty",children:["No updates in the past week",i?" for this filter":"","."]}),Object.entries(d).map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsxs)("section",{className:"card-surface rounded-2xl p-4","data-testid":"activity-day",children:[(0,_e.jsxs)("p",{className:"eyebrow mb-2 px-3",children:[n," ",(0,_e.jsxs)("span",{className:"text-slate-500 normal-case tracking-normal font-sans",children:["\xb7 ",a.length]})]}),(0,_e.jsx)("ul",{className:"space-y-0.5",children:a.map((e,t)=>(0,_e.jsx)(Zp,{item:e,index:t,showDate:!0},e.id))})]},n)})]})]})}const Lf=Jo("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Ff=Jo("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),If=Jo("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Uf=Jo("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),Bf=Jo("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]),Wf=Jo("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),qf=Jo("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),Hf=e=>{var t;let n=e.title,a=e.description,r=e.onUse,o=e.tone;const i=(0,s.useState)(null),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useState)(!1),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(!1),g=(0,De.A)(f,2),x=g[0],v=g[1];return(0,_e.jsxs)("div",{className:"rounded-2xl border border-sky-400/20 bg-sky-400/5 p-4","data-testid":"rewrite-panel",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsxs)("p",{className:"eyebrow !text-sky-300 flex items-center gap-2",children:[(0,_e.jsx)(nf,{size:13})," Suggested rewrite"]}),(0,_e.jsx)("p",{className:"text-xs text-slate-400 mt-1",children:"Drafts an improved version in short 2\u20133 sentence chunks using only what you've written. Timestamps and links below your summary are kept as-is. Check any [bracketed] placeholders before posting."})]}),(0,_e.jsxs)(Dh,{type:"button",size:"sm",onClick:async()=>{p(!0);try{const e=(await Eo.post("/portal/summary-rewrite",{title:n,description:a})).data;d(e)}catch(lS){Ta.error(Mo(lS))}finally{p(!1)}},disabled:m,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"rewrite-button",children:[m?(0,_e.jsx)(sf,{size:14,className:"mr-1.5 animate-spin"}):(0,_e.jsx)(nf,{size:14,className:"mr-1.5"}),m?"Drafting\u2026":c?"Try another":"Suggest a rewrite"]})]}),c&&(0,_e.jsxs)("div",{className:"mt-3 space-y-3","data-testid":"rewrite-result",children:[(0,_e.jsx)("textarea",{readOnly:!0,value:c.rewrite,rows:7,className:"w-full rounded-xl bg-white/5 border border-white/10 p-3 text-sm leading-relaxed text-slate-100 resize-y","data-testid":"rewrite-text"}),(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-bold ".concat(o(c.grade.score)),"data-testid":"rewrite-grade",children:["Would grade ",(0,_e.jsx)("span",{className:"font-display text-sm leading-none",children:c.grade.grade})]}),(0,_e.jsxs)("span",{className:"text-[11px] ".concat(c.length<600?"text-amber-300":"text-slate-500"),"data-testid":"rewrite-length",children:[c.length," characters",c.extras_preserved?" (summary only \u2014 your timestamps/links are kept below it)":"",c.length<600?" \u2014 add a detail or tw
2o to reach the 600 minimum":""]}),(0,_e.jsxs)("div",{className:"ml-auto flex gap-2",children:[(0,_e.jsxs)(Dh,{type:"button",size:"sm",variant:"outline",onClick:async()=>{try{await navigator.clipboard.writeText(c.rewrite),v(!0),setTimeout(()=>v(!1),1500)}catch(e){Ta.error("Couldn't copy \u2014 select the text and copy manually")}},className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"rewrite-copy-button",children:[x?(0,_e.jsx)(Mi,{size:14,className:"mr-1.5 text-emerald-400"}):(0,_e.jsx)(Wf,{size:14,className:"mr-1.5"}),x?"Copied":"Copy"]}),r&&(0,_e.jsxs)(Dh,{type:"button",size:"sm",onClick:()=>r(c.rewrite),className:"rounded-full bg-emerald-400 text-[#06251A] font-bold hover:bg-emerald-300","data-testid":"rewrite-use-button",children:[(0,_e.jsx)(qf,{size:14,className:"mr-1.5"})," Use this rewrite"]})]})]}),(null===(t=c.notes)||void 0===t?void 0:t.length)>0&&(0,_e.jsx)("ul",{className:"text-xs text-slate-400 space-y-1","data-testid":"rewrite-notes",children:c.notes.map((e,t)=>(0,_e.jsxs)("li",{className:"flex gap-2",children:[(0,_e.jsx)("span",{className:"text-sky-300",children:"\u2022"}),(0,_e.jsx)("span",{children:e})]},t))})]})]})},Vf=e=>e>=90?"bg-emerald-400/15 text-emerald-300 border-emerald-400/40":e>=80?"bg-sky-400/15 text-sky-300 border-sky-400/40":e>=70?"bg-amber-400/15 text-amber-300 border-amber-400/40":"bg-rose-500/15 text-rose-300 border-rose-500/40",Yf={pass:[ym,"text-emerald-400"],warn:[Lf,"text-amber-300"],fail:[Uf,"text-rose-400"]},$f=e=>{let t=e.c;e.i;const n=Yf[t.status]||Yf.warn,a=(0,De.A)(n,2),s=a[0],r=a[1];return(0,_e.jsxs)("li",{className:"flex items-start gap-3 rounded-xl bg-white/[0.03] border border-white/10 px-3 py-2.5","data-testid":"grade-check-".concat(t.id),children:[(0,_e.jsx)(s,{size:16,className:"".concat(r," mt-0.5 shrink-0")}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold",children:t.label}),(0,_e.jsxs)("span",{className:"font-mono text-[11px] text-slate-400",children:[t.earned,"/",t.points]})]}),(0,_e.jsx)("p",{className:"text-xs text-slate-400 leading-relaxed",children:t.note})]})]})},Qf=e=>{var t,n;let a=e.grade,s=e.open,r=e.onOpenChange,o=e.rewrite;return a?(0,_e.jsx)(th,{open:s,onOpenChange:r,children:(0,_e.jsxs)(sh,{className:"max-w-2xl max-h-[85vh] overflow-y-auto bg-[#0B1526] border-white/10 text-white","data-testid":"grade-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,_e.jsx)("span",{className:"inline-flex h-16 w-16 items-center justify-center rounded-2xl border font-display text-3xl font-black ".concat(Vf(a.score)),"data-testid":"grade-dialog-letter",children:a.grade}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(oh,{className:"font-display text-xl font-extrabold",children:["Summary Grade \xb7 ",a.score,"/100"]}),(0,_e.jsx)(ih,{className:"text-slate-400 mt-1","data-testid":"grade-dialog-verdict",children:a.verdict})]})]})}),o&&(0,_e.jsx)(Hf,{title:o.title,description:o.description,onUse:o.onUse,tone:Vf}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4 mt-2",children:[(0,_e.jsxs)("div",{className:"rounded-2xl border border-emerald-400/20 bg-emerald-400/5 p-4","data-testid":"grade-strengths",children:[(0,_e.jsxs)("p",{className:"eyebrow !text-emerald-300 flex items-center gap-2",children:[(0,_e.jsx)(Bf,{size:13})," What's working"]}),(0,_e.jsxs)("ul",{className:"mt-2 space-y-1.5 text-sm text-slate-200",children:[(a.strengths||[]).map(e=>(0,_e.jsxs)("li",{className:"flex gap-2",children:[(0,_e.jsx)("span",{className:"text-emerald-400",children:"\u2022"}),(0,_e.jsx)("span",{children:e})]},e)),!(null!==(t=a.strengths)&&void 0!==t&&t.length)&&(0,_e.jsx)("li",{className:"text-slate-500",children:"Nothing yet \u2014 keep going."})]})]}),(0,_e.jsxs)("div",{className:"rounded-2xl border border-amber-400/20 bg-amber-400/5 p-4","data-testid":"grade-improvements",children:[(0,_e.jsxs)("p",{className:"eyebrow !text-amber-300 flex items-center gap-2",children:[(0,_e.jsx)($h,{size:13})," How to improve"]}),(0,_e.jsxs)("ul",{className:"mt-2 space-y-1.5 text-sm text-slate-200",children:[(a.improvements||[]).map(e=>(0,_e.jsxs)("li",{className:"flex gap-2",children:[(0,_e.jsx)("span",{className:"text-amber-300",children:"\u2022"}),(0,_e.jsx)("span",{children:e})]},e)),!(null!==(n=a.improvements)&&void 0!==n&&n.length)&&(0,_e.jsx)("li",{className:"text-slate-500",children:"Nothing major \u2014 nice work."})]})]})]}),(0,_e.jsxs)("div",{className:"mt-2",children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-2",children:[(0,_e.jsx)(Ff,{size:13})," Scorecard"]}),(0,_e.jsx)("ul",{className:"mt-2 grid sm:grid-cols-2 gap-2",children:a.checks.map((e,t)=>(0,_e.jsx)($f,{c:e,i:t},e.id))})]}),(0,_e.jsxs)("p",{className:"text-[11px] text-slate-500 mt-1",children:["Graded against the Underdog SEO summary rules: 400\u20131,000 characters (550\u2013850 ideal) for the summary itself \u2014 timestamps, links and footers below it aren't counted",a.has_extras?" (".concat(a.length," of ").concat(a.total_length," characters graded)"):"",". Subject and angle in the first 250 characters, no filler openings, natural keywords, short 2\u20133 sentence paragraphs.",!a.ai&&" AI editorial review was unavailable for this pass."]})]})}):null},Kf=e=>{let t=e.grade,n=e.loading,a=e.error,s=e.onRetry,r=e.onClick;return n&&!t?(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 px-2.5 py-0.5 text-[11px] text-slate-400","data-testid":"grade-loading",children:[(0,_e.jsx)(sf,{size:11,className:"animate-spin"})," Grading\u2026"]}):!t&&a?(0,_e.jsxs)("button",{type:"button",onClick:s,className:"inline-flex items-center gap-1.5 rounded-full border border-rose-500/40 bg-rose-500/10 px-2.5 py-0.5 text-[11px] text-rose-200 hover:bg-rose-500/20","data-testid":"grade-error",children:[(0,_e.jsx)(Lf,{size:11})," ",String(a).slice(0,80)," \xb7 retry"]}):t?(0,_e.jsxs)("button",{type:"button",onClick:r,className:"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-bold transition-transform hover:scale-105 ".concat(Vf(t.score)," ").concat(n?"opacity-60":""),title:"See why \u2014 click for the full breakdown","data-testid":"grade-pill",children:[n?(0,_e.jsx)(sf,{size:11,className:"animate-spin"}):(0,_e.jsx)(Ff,{size:11})," Summary Grade: ",(0,_e.jsx)("span",{className:"font-display text-sm leading-none","data-testid":"grade-pill-letter",children:t.grade})]}):null},Gf={pending_acast:{label:"Queued for Acast",cls:"bg-amber-400/15 text-amber-300",Icon:_i}
2,scheduled:{label:"Scheduled on Acast",cls:"bg-sky-400/15 text-sky-300",Icon:_i},published:{label:"Published",cls:"bg-emerald-400/15 text-emerald-300",Icon:ym},failed:{label:"Failed",cls:"bg-rose-500/15 text-rose-400",Icon:Lf},rejected:{label:"Rejected",cls:"bg-white/10 text-slate-400",Icon:Mm}},Xf=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:"America/New_York",timeZoneName:"short"}),Jf=e=>e.publish_at?"".concat(new Date(e.publish_at)>new Date?"Publishes":"Published"," ").concat(Xf(e.publish_at)):e.published_at?"Published ".concat(Xf(e.published_at)):"Publish immediately \xb7 submitted ".concat(Ro(e.created_at));function Zf(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(""),o=(0,De.A)(r,2),l=o[0],c=o[1],d=(0,s.useState)(""),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(!1),f=(0,De.A)(p,2),g=f[0],x=f[1],v=(0,s.useState)(null),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useState)(null),k=(0,De.A)(j,2),N=k[0],S=k[1],A=(0,s.useState)("newest"),_=(0,De.A)(A,2),C=_[0],E=_[1],P=(0,s.useState)(!1),M=(0,De.A)(P,2),R=M[0],O=M[1],z=e=>e.summary_grade?e.summary_grade.score:101,T=((null===n||void 0===n?void 0:n.items)||[]).filter(e=>!R||e.summary_grade&&e.summary_grade.score<70),D="lowest"===C?[...T].sort((e,t)=>z(e)-z(t)):T,L=((null===n||void 0===n?void 0:n.items)||[]).filter(e=>e.summary_grade&&e.summary_grade.score<70).length,F=()=>Eo.get("/admin/submissions").then(e=>a(e.data)).catch(()=>a({acast_configured:!1,items:[]}));(0,s.useEffect)(()=>{F()},[]);return n?(0,_e.jsxs)("div",{"data-testid":"admin-publishing",children:[(0,_e.jsxs)("div",{className:"mb-8",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Hosts"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Publishing"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Episodes submitted by hosts from the Publish page. Give a host a login under Team \u2192 edit host."})]}),n.acast_configured?(0,_e.jsxs)("div",{className:"mb-6 rounded-2xl border border-emerald-400/20 bg-emerald-400/5 p-4 text-sm flex flex-wrap items-center gap-3","data-testid":"acast-connected",children:[(0,_e.jsx)(ym,{size:18,className:"text-emerald-400 shrink-0"}),(0,_e.jsx)("p",{className:"text-emerald-100 flex-1 min-w-[16rem]",children:"Acast is connected. New submissions go straight to Acast when the show has an Acast show ID (right away, or scheduled). Shows without one wait here for you."}),(0,_e.jsxs)(Dh,{onClick:async()=>{x(!0);try{const e=(await Eo.post("/admin/acast/match-shows")).data;w(e),Ta.success("Linked ".concat(e.matched.length," shows to Acast"))}catch(lS){Ta.error(Mo(lS))}finally{x(!1)}},disabled:g,size:"sm",variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"acast-match-button",children:[g?(0,_e.jsx)(sf,{size:14,className:"mr-1.5 animate-spin"}):(0,_e.jsx)(Ri,{size:14,className:"mr-1.5"})," Match shows to Acast"]}),y&&(0,_e.jsxs)("p",{className:"w-full text-xs text-slate-400","data-testid":"acast-match-result",children:["Linked ",y.matched.length," of ",y.matched.length+y.unmatched.length," audio shows.",y.unmatched.length>0&&(0,_e.jsxs)(_e.Fragment,{children:[" Not on Acast (set an ID manually under Shows if needed): ",y.unmatched.join(", "),"."]})]})]}):(0,_e.jsxs)("div",{className:"mb-6 rounded-2xl border border-amber-400/30 bg-amber-400/10 p-4 text-sm text-amber-200 flex gap-3","data-testid":"acast-not-configured",children:[(0,_e.jsx)(Lf,{size:18,className:"shrink-0 mt-0.5"}),(0,_e.jsxs)("p",{children:["Acast API key not configured yet. Submissions are stored here with their audio; once the key is added to the server they can be pushed to Acast with one click. Also set each show's ",(0,_e.jsx)("span",{className:"font-semibold",children:"Acast show ID"})," under Shows."]})]}),n.items.length>0&&(0,_e.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-3","data-testid":"submissions-toolbar",children:[(0,_e.jsx)("div",{className:"inline-flex rounded-full bg-white/5 p-1","data-testid":"submissions-sort",children:[["newest","Newest first"],["lowest","Lowest grade first"]].map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("button",{type:"button",onClick:()=>E(n),className:"rounded-full px-4 py-1.5 text-xs font-bold transition-colors ".concat(C===n?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"submissions-sort-".concat(n),children:a},n)})}),(0,_e.jsxs)("button",{type:"button",onClick:()=>O(e=>!e),className:"inline-flex items-center gap-2 rounded-full border px-4 py-1.5 text-xs font-bold transition-colors ".concat(R?"border-rose-400/50 bg-rose-500/15 text-rose-300":"border-white/10 text-slate-300 hover:text-white hover:border-white/30"),"aria-pressed":R,"data-testid":"submissions-weak-only",children:[(0,_e.jsx)(Lf,{size:13})," Weak summaries only (D+ or lower) ",(0,_e.jsx)("span",{className:"font-mono opacity-70",children:L})]})]}),(0,_e.jsxs)("div",{className:"space-y-2","data-testid":"submissions-list",children:[0===n.items.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400","data-testid":"submissions-empty",children:"No submissions yet."}),n.items.length>0&&0===D.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400","data-testid":"submissions-filter-empty",children:"No weak summaries \u2014 every graded submission is C- or better."}),D.map((e,t)=>{const s=Gf[e.status]||Gf.pending_acast;return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-4 flex flex-wrap items-center gap-4","data-testid":"submission-row-".concat(t),children:[e.show_cover_url?(0,_e.jsx)("img",{src:Po(e.show_cover_url),alt:"",className:"h-14 w-14 shrink-0 rounded-xl object-cover","data-testid":"submission-cover-".concat(t)}):(0,_e.jsx)("div",{className:"h-14 w-14 shrink-0 rounded-xl bg-white/5"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[e.audio_url?(0,_e.jsxs)("a",{href:e.audio_url,target:"_blank",rel:"noreferrer",className:"font-semibold truncate inline-flex items-center gap-1.5 text-sky-300 hover:text-sky-200 hover:underline max-w-full",title:"Open episode audio on Acast","data-testid":"submission-title-".concat(t),children:[(0,_e.jsx)("span",{className:"truncate",children:e.title}),(0,_e.jsx)(Ch,{size:13,className:"shrink-0 opacity-70"})]}):(0,_e.jsx)("p",{className:"font-semibold truncate","data-testid":"submission-title-".concat(t),children:e.title}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[e.show_name," \xb7 by ",e.host_name," \xb7 submitted ",Oo(e.created_at)," \xb7 ",e.audio_filename," (",(r=e.audio_size,"".concat((r/1048576).toFixed(1)," MB")),")"]}),(0,_e.jsxs)("p",{className:"mt-1 inline-flex items-center gap-1.5 text-xs font-medium text-slate-200","data-testid":"submission-publish-date-".concat(t),children:[(0,_e.jsx)(Hh,{size:12,className:"text-sky-400"})," ",Jf(e)]}),e.description&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-500 line-clamp-2",children:e.description}),e.ad_mentions&&(0,_e.jsxs)("p",{className:"mt-1 text-xs font-mono text-amber-200","data-testid":"submission-ad-mentions-".concat(t),children:["Ad mentions: ",e.ad_mentions," (",e.ad_mention_count,")"]}),e.error&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-rose-400","data-testid":"submission-error-".concat(t),children:e.error})]}),(0,_e.jsxs)("div",{className:"flex flex-col items-end gap-1.5",children:[(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-mono uppercase tracking-wider ".concat(s.cls),"data-testid":"submission-status-".concat(t),children:[(0,_e.jsx)(s.Icon,{size:12})," ",s.label]}),e.summary_grade?(0,_e.jsxs)("button",{onClick:()=>S(e.summary_grade),className:"inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-bold transition-transform hover:scale-105 ".concat(Vf(e.summary_grade.score)),title:"Summary grade \u2014 click for the breakdown","data-testid":"submission-grade-".concat(t),children:[(0,_e.jsx)(Ff,{size:11})," Summary ",(0,_e.jsx)("span",{className:"font-display text-sm leading-none",children:e.summary_grade.grade})]}):(0,_e.jsxs)("button",{onClick:()=>(async e=>{m(e.id);try{const t=(await Eo.post("/admin/submissions/".concat(e.id,"/grade"))).data;a(n=>(0,i.A)((0,i.A)({},n),{},{items:n.items.map(n=>n.id===e.id?(0,i.A)((0,i.A)({},n),{},{summary_grade:t}):n)})),S(t)}catch(lS){Ta.error(Mo(lS))}finally{m("")}})(e),disabled:h===e.id,className:"inline-flex items-center gap-1 rounded-full border border-white/10 px-2.5 py-0.5 text-[11px] text-slate-400 hover:text-white hover:border-white/30","data-testid":"submission-grade-run-".concat(t),children:[h===e.id?(0,_e.jsx)(sf,{size:11,className:"animate-spin"}):(0,_e.jsx)(Ff,{size:11})," ",h===e.id?"Grading\u2026":"Grade summary"]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_e.jsx)("a",{href:"".concat("https://underdogpodcasts.com","/api/files/").concat(e.audio_path),target:"_blank",rel:"noreferrer",className:"p-2 text-slate-400 hover:text-white",title:"Download audio","data-testid":"submission-download-".concat(t),children:(0,_e.jsx)(If,{size:16})}),!["published","scheduled"].includes(e.status)&&(0,_e.jsxs)(Dh,{onClick:()=>(async e=>{c(e.id);try{await Eo.post("/admin/submissions/".concat(e.id,"/publish")),Ta.success("Sent to Acast"),F()}catch(lS){Ta.error(Mo(lS)),F()}finally{c("")}})(e),disabled:!n.acast_configured||l===e.id,size:"sm",className:"rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"submission-publish-".concat(t),children:[(0,_e.jsx)(Qh,{size:14,className:"mr-1"})," ",l===e.id?"Sending\u2026":"Publish to Acast"]}),"pending_acast"===e.status&&(0,_e.jsx)("button",{onClick:()=>(async(e,t)=>{try{await Eo.put("/admin/submissions/".concat(e.id),{status:t}),F()}catch(lS){Ta.error(Mo(lS))}})(e,"rejected"),className:"p-2 text-slate-400 hover:text-amber-400",title:"Reject","data-testid":"submission-reject-".concat(t),children:(0,_e.jsx)(Lf,{size:16})}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm('Delete the submission "'.concat(e.title,'"?')))try{await Eo.delete("/admin/submissions/".concat(e.id)),Ta.success("Deleted"),F()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400",title:"Delete","data-testid":"submission-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:16})})]})]},e.id);var r})]}),(0,_e.jsx)(Qf,{grade:N,open:!!N,onOpenChange:e=>{e||S(null)}})]}):null}const eg=Jo("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),tg=[["club_name","Club"],["nickname","Nickname"],["founded","Founded"],["current_league","League"],["stadium","Stadium"],["city","City"],["country","Country"],["latitude","Lat"],["longitude","Lng"],["blurb","Blurb"]],ng=[...tg.map(e=>(0,De.A)(e,1)[0]),"logo_url"];function ag(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)({}),o=(0,De.A)(r,2),l=o[0],c=o[1],d=()=>Eo.get("/admin/club-map").then(e=>a(e.data)).catch(e=>Ta.error(Mo(e)));(0,s.useEffect)(()=>{d()},[]);return n?(0,_e.jsxs)("div",{"data-testid":"club-map-admin",children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Shows"}),(0,_e.jsx)("h1",{className:"font-display text-4xl font-black tracking-tight",children:"Club map"}),(0,_e.jsx)("p",{className:"mt-2 text-slate-400 text-sm",children:"Pins are extracted from each episode with AI and geocoded via OpenStreetMap. New episodes are plotted automatically every Monday, Wednesday and Friday at 5:00 AM ET. Fix anything that looks off below \u2014 edits are kept on future runs."}),0===n.length&&(0,_e.jsx)("p",{className:"mt-8 text-slate-400",children:"No show has the club map switched on. Enable it under Shows \u2192 edit show."}),n.map(e=>(0,_e.jsx)(sg,{data:e,running:l[e.show.id],onPlot:()=>(async e=>{try{await Eo.post("/admin/club-map/".concat(e,"/plot")),c(t=>(0,i.A)((0,i.A)({},t),{},{[e]:!0})),Ta.success("Plotting new episodes in the background\u2026");const t=setInterval(async()=>{const n=(await Eo.get("/admin/club-map/".concat(e,"/plot"))).data;var a,s,r,o;n.running||(clearInterval(t),c(t=>(0,i.A)((0,i.A)({},t),{},{[e]:!1})),d(),Ta.success("Done \u2014 ".concat((null===(a=n.result)||void 0===a?void 0:a.added)||0," new pin").concat(1===(null===(s=n.result)||void 0===s?void 0:s.added)?"":"s").concat(null!==(r=n.result)&&void 0!==r&&null!==(o=r.failed)&&void 0!==o&&o.length?", ".concat(n.result.failed.length," failed"):"")))},4e3)}catch(lS){Ta.error(Mo(lS))}})(e.show.id),onChanged:d},e.show.id))]}):(0,_e.jsx)("p",{className:"text-slate-400",children:"Loading\u2026"})}const sg=e=>{let t=e.data,n=e.running,a=e.onPlot,s=e.onChanged;const r=t.show,o=t.pins,i=t.episode_count,l=i-o.length;return(0,_e.jsxs)("section",{className:"mt-8","data-testid":"club-map-show-".concat(r.slug),children:[(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-5 flex flex-wrap items-center justify-between gap-4",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)(Lh,{size:20,className:"text-sky-400"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-semibold",children:r.name}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400","data-testid":"club-map-counts",children:[o.length," of ",i," episodes pinned",l>0?" \xb7 ".concat(l," waiting"):""]})]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_e.jsxs)("a",{href:"/shows/".concat(r.slug),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs text-slate-400 hover:text-white",children:["View map ",(0,_e.jsx)(Ch,{size:12})]}),(0,_e.jsxs)(Dh,{onClick:a,disabled:n,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"club-map-plot-button",children:[(0,_e.jsx)(Qp,{size:15,className:"mr-2 ".concat(n?"animate-spin":"")})," ",n?"Plotting\u2026":"Plot new episodes now"]})]})]}),(0,_e.jsx)("div",{className:"mt-3 space-y-2",children:o.map((e,t)=>(0,_e.jsx)(rg,{pin:e,index:t,onChanged:s},e.id))})]})},rg=e=>{var t,n,a,r;
2let o=e.pin,l=e.index,c=e.onChanged;const d=(0,s.useState)(!1),u=(0,De.A)(d,2),h=u[0],m=u[1],p=(0,s.useState)(o),f=(0,De.A)(p,2),g=f[0],x=f[1],v=(0,s.useState)(!1),b=(0,De.A)(v,2),y=b[0],w=b[1];(0,s.useEffect)(()=>x(o),[o]);return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-4","data-testid":"club-pin-".concat(l),children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,_e.jsxs)("div",{className:"min-w-0 flex items-start gap-3",children:[o.logo_url?(0,_e.jsx)("img",{src:Po(o.logo_url),alt:"",className:"h-10 w-10 shrink-0 rounded-lg bg-white object-contain p-1","data-testid":"club-pin-crest-thumb-".concat(l)}):(0,_e.jsx)("div",{className:"h-10 w-10 shrink-0 rounded-lg bg-white/5 grid place-items-center text-slate-500",title:"No crest yet","data-testid":"club-pin-crest-missing-".concat(l),children:(0,_e.jsx)(eg,{size:14})}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsxs)("p",{className:"font-semibold truncate","data-testid":"club-pin-name-".concat(l),children:[o.club_name," ","defunct"===o.status&&(0,_e.jsx)("span",{className:"ml-1 rounded-full bg-white/10 px-2 py-0.5 text-[10px] font-mono uppercase text-slate-300",children:"defunct"})]}),(0,_e.jsx)("p",{className:"text-xs text-slate-400 truncate",children:[o.founded&&"est. ".concat(o.founded),o.current_league,o.stadium,[o.city,o.country].filter(Boolean).join(", ")].filter(Boolean).join(" \xb7 ")}),(0,_e.jsxs)("p",{className:"text-[11px] text-slate-500 truncate",children:["Episode: ",(null===(t=o.episode)||void 0===t?void 0:t.title)||"\u2014",null!==(n=o.episode)&&void 0!==n&&n.published_at?" (".concat(Ro(o.episode.published_at),")"):""," \xb7 ",null===(a=o.latitude)||void 0===a?void 0:a.toFixed(4),", ",null===(r=o.longitude)||void 0===r?void 0:r.toFixed(4)," \xb7 ",o.geo_source]})]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,_e.jsx)("button",{type:"button",onClick:()=>m(e=>!e),className:"rounded-full p-2 text-slate-400 hover:bg-white/10 hover:text-white",title:"Edit","data-testid":"club-pin-edit-".concat(l),children:(0,_e.jsx)(tf,{size:15})}),(0,_e.jsx)("button",{type:"button",onClick:async()=>{if(window.confirm('Re-run the AI lookup for "'.concat(o.club_name,'"? Your manual edits on this pin will be replaced.'))){w(!0);try{await Eo.post("/admin/club-map/pins/".concat(o.id,"/redo")),Ta.success("Pin refreshed"),c()}catch(lS){Ta.error(Mo(lS))}finally{w(!1)}}},disabled:y,className:"rounded-full p-2 text-slate-400 hover:bg-white/10 hover:text-white",title:"Re-run AI lookup","data-testid":"club-pin-redo-".concat(l),children:(0,_e.jsx)(Ff,{size:15})}),(0,_e.jsx)("button",{type:"button",onClick:async()=>{if(window.confirm('Remove the pin for "'.concat(o.club_name,'"? It will be re-created on the next auto-plot unless the episode is gone.')))try{await Eo.delete("/admin/club-map/pins/".concat(o.id)),c()}catch(lS){Ta.error(Mo(lS))}},className:"rounded-full p-2 text-slate-400 hover:bg-rose-500/20 hover:text-rose-300",title:"Remove pin","data-testid":"club-pin-delete-".concat(l),children:(0,_e.jsx)(Mm,{size:15})})]})]}),h&&(0,_e.jsxs)("div",{className:"mt-4 grid sm:grid-cols-2 lg:grid-cols-3 gap-3","data-testid":"club-pin-form-".concat(l),children:[(0,_e.jsxs)("div",{className:"sm:col-span-2 lg:col-span-3 flex flex-wrap items-center gap-5 rounded-xl bg-white/[0.03] p-3","data-testid":"club-pin-crest-".concat(l),children:[(0,_e.jsx)(rf,{value:g.logo_url,onChange:e=>x(t=>(0,i.A)((0,i.A)({},t),{},{logo_url:e})),shape:"square",fit:"contain",hint:!1,testId:"club-pin-crest-upload-".concat(l)}),(0,_e.jsxs)("div",{className:"text-xs text-slate-400 max-w-xs",children:[(0,_e.jsx)("p",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Crest"}),(0,_e.jsx)("p",{className:"mt-1",children:"Drop a PNG/SVG-style crest with a transparent background for best results. It shows on the globe pin and the club card."})]})]}),tg.map(e=>{var t;let n=(0,De.A)(e,2),a=n[0],s=n[1];return(0,_e.jsxs)("label",{className:"blurb"===a?"sm:col-span-2 lg:col-span-3":"",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:s}),(0,_e.jsx)("input",{value:null!==(t=g[a])&&void 0!==t?t:"",onChange:e=>x(t=>(0,i.A)((0,i.A)({},t),{},{[a]:e.target.value})),className:"mt-1 h-9 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"club-pin-input-".concat(a,"-").concat(l)})]},a)}),(0,_e.jsxs)("label",{children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Status"}),(0,_e.jsxs)("select",{value:g.status||"active",onChange:e=>x(t=>(0,i.A)((0,i.A)({},t),{},{status:e.target.value})),className:"mt-1 h-9 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm",children:[(0,_e.jsx)("option",{value:"active",className:"bg-[#0B1A33]",children:"Active"}),(0,_e.jsx)("option",{value:"defunct",className:"bg-[#0B1A33]",children:"Defunct"})]})]}),(0,_e.jsxs)("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-3 justify-end",children:[(0,_e.jsxs)(Dh,{type:"button",variant:"ghost",onClick:()=>{m(!1),x(o)},className:"rounded-full hover:bg-white/10",children:[(0,_e.jsx)(ai,{size:14,className:"mr-1"})," Cancel"]}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{w(!0);try{const e=Object.fromEntries(ng.map(e=>{var t;return[e,"latitude"===e||"longitude"===e?""===g[e]||null==g[e]?null:Number(g[e]):null!==(t=g[e])&&void 0!==t?t:""]}));await Eo.put("/admin/club-map/pins/".concat(o.id),e),Ta.success("Pin updated"),m(!1),c()}catch(lS){Ta.error(Mo(lS))}finally{w(!1)}}
2,disabled:y,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"club-pin-save-".concat(l),children:[(0,_e.jsx)(Mi,{size:14,className:"mr-1"})," ",y?"Saving\u2026":"Save pin"]})]})]})]})},og=Jo("clock-fading",[["path",{d:"M12 2a10 10 0 0 1 7.38 16.75",key:"175t95"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["path",{d:"M2.5 8.875a10 10 0 0 0-.5 3",key:"1vce0s"}],["path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4",key:"o3fkw4"}],["path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857",key:"1szpfk"}],["path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38",key:"9yhvd4"}]]),ig=Jo("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),lg=Jo("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),cg=Jo("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),dg=Jo("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),ug=[["qualified","Qualified downloads",1],["unique_pct","Unique %",.01],["h24_pct","24hrs %",1],["played_pct","Played %",1]],hg=e=>{let t=e.refreshKey;const n=(0,s.useState)(!1),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(null),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)([]),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(null),x=(0,De.A)(g,2),v=(x[0],x[1]),b=(0,s.useState)({}
2),y=(0,De.A)(b,2),w=y[0],j=y[1],k=(0,s.useState)(!1),N=(0,De.A)(k,2),S=N[0],A=N[1],_=()=>Eo.get("/admin/reports/delivery/masters").then(e=>{u(e.data.items),f(e.data.profiles),v(e.data.month),j({})}).catch(e=>Ta.error(Mo(e)));(0,s.useEffect)(()=>{_()},[t]);const C=(e,t,n)=>{u(a=>a.map(a=>a.show_id===e?(0,i.A)((0,i.A)({},a),{},{[t]:n}):a)),j(t=>(0,i.A)((0,i.A)({},t),{},{[e]:!0}))},E=Object.keys(w).length;return(0,_e.jsxs)("section",{className:"card-surface rounded-3xl","data-testid":"reports-masters",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"w-full flex items-center justify-between gap-3 p-5 text-left","data-testid":"reports-masters-toggle",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)(cg,{size:18,className:"text-amber-300"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-display font-bold",children:"Live master numbers"}),(0,_e.jsx)("p",{className:"text-xs text-slate-400",children:"The current official figure for every show. \"Import show data\" drifts from these \u2014 skewed up while a show's sport is in season, down when it isn't \u2014 and saving or publishing a report makes its figures the new masters."})]})]}),r?(0,_e.jsx)(dg,{size:16,className:"text-slate-400"}):(0,_e.jsx)(mi,{size:16,className:"text-slate-400"})]}),r&&(0,_e.jsxs)("div",{className:"px-5 pb-5",children:[(0,_e.jsx)("div",{className:"overflow-x-auto rounded-2xl border border-white/10",children:(0,_e.jsxs)("table",{className:"w-full text-sm","data-testid":"reports-masters-table",children:[(0,_e.jsx)("thead",{className:"bg-white/[0.04] text-[10px] font-mono uppercase tracking-wider text-slate-500",children:(0,_e.jsxs)("tr",{children:[(0,_e.jsx)("th",{className:"px-3 py-2 text-left",children:"Show"}),(0,_e.jsx)("th",{className:"px-3 py-2 text-left",children:"Season profile"}),ug.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("th",{className:"px-3 py-2 text-right",children:a},n)}),(0,_e.jsx)("th",{className:"px-3 py-2 text-right",children:"Updated"})]})}),(0,_e.jsxs)("tbody",{children:[null===d&&(0,_e.jsx)("tr",{children:(0,_e.jsx)("td",{colSpan:7,className:"px-3 py-4 text-slate-400",children:"Loading\u2026"})}),null===d||void 0===d?void 0:d.map((e,t)=>{var n;return(0,_e.jsxs)("tr",{className:"border-t border-white/5 ".concat(w[e.show_id]?"bg-amber-400/5":""),"data-testid":"reports-master-".concat(t),children:[(0,_e.jsx)("td",{className:"px-3 py-1.5",children:(0,_e.jsxs)("div",{className:"flex items-center gap-2 min-w-[160px] max-w-[260px]",children:[e.cover_url&&(0,_e.jsx)("img",{src:Po(e.cover_url),alt:"",className:"h-7 w-7 rounded-md object-cover"}),(0,_e.jsx)("span",{className:"font-semibold truncate",children:e.show_name})]})}),(0,_e.jsx)("td",{className:"px-2 py-1.5",children:(0,_e.jsx)("select",{value:e.profile||"",onChange:t=>C(e.show_id,"profile",t.target.value),className:"h-8 w-40 rounded-md bg-white/5 border border-white/10 px-2 text-xs","data-testid":"reports-master-profile-".concat(t),children:p.map(e=>(0,_e.jsx)("option",{value:e.id,className:"bg-[#0B1A33]",children:e.label},e.id))})}),ug.map(n=>{var a;let s=(0,De.A)(n,3),r=s[0],o=s[2];return(0,_e.jsx)("td",{className:"px-2 py-1.5",children:(0,_e.jsx)("input",{type:"number",step:o,value:null!==(a=e[r])&&void 0!==a?a:"",onChange:t=>C(e.show_id,r,t.target.value),className:"h-8 w-[88px] rounded-md bg-white/5 border border-white/10 px-2 text-right font-mono text-xs","data-testid":"reports-master-".concat(r,"-").concat(t)})},r)}),(0,_e.jsxs)("td",{className:"px-3 py-1.5 text-right text-[11px] text-slate-500 whitespace-nowrap",children:[e.updated_at?Ro(e.updated_at):"\u2014",null!==(n=e.source)&&void 0!==n&&n.startsWith("report:")?" \xb7 published":"seed"===e.source?" \xb7 starter":""]})]},e.show_id)})]})]})}),(0,_e.jsx)("div",{className:"mt-3 flex justify-end",children:(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{const e=d.filter(e=>w[e.show_id]).map(e=>({show_id:e.show_id,profile:e.profile||"",qualified:Number(e.qualified)||0,unique_pct:Number(e.unique_pct)||0,h24_pct:Number(e.h24_pct)||0,played_pct:Number(e.played_pct)||0}));if(!e.length)return Ta.message("Nothing changed");A(!0);try{await Eo.put("/admin/reports/delivery/masters",{items:e}),Ta.success("Master numbers saved for ".concat(e.length," show").concat(1===e.length?"":"s")),_()}catch(lS){Ta.error(Mo(lS))}finally{A(!1)}},disabled:S||!E,className:"rounded-full bg-amber-400 text-[#070F1E] font-bold hover:bg-amber-300","data-testid":"reports-masters-save",children:[S?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(lg,{size:15,className:"mr-2"})," Save master numbers",E?" (".concat(E,")"):""]})})]})]})},mg=Jo("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
2y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),pg="/admin/reports/delivery/otp",fg=e=>{let t=e.children;const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(""),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(!1),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useState)(!1),w=(0,De.A)(y,2),j=w[0],k=w[1],N=()=>Eo.get("".concat(pg,"/status")).then(e=>o(e.data)).catch(e=>{var t;o({error:(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)||500})});(0,s.useEffect)(()=>{N()},[]),(0,s.useEffect)(()=>{if(null===r||void 0===r||!r.verified_until)return;const e=new Date(r.verified_until)-Date.now(),t=setTimeout(N,Math.max(1e3,e+500));return()=>clearTimeout(t)},[r]);const S=(0,s.useRef)(Date.now()),A=(0,s.useRef)(Date.now()),_=!(null===r||void 0===r||!r.verified);(0,s.useEffect)(()=>{if(!_)return;const e=()=>{S.current=Date.now()},t=["mousemove","mousedown","keydown","scroll","touchstart","focus"];t.forEach(t=>window.addEventListener(t,e,{passive:!0})),S.current=Date.now(),A.current=Date.now();const n=setInterval(async()=>{if(Date.now()-S.current>=3e5){try{await Eo.post("".concat(pg,"/lock"))}catch(e){}return o(e=>(0,i.A)((0,i.A)({},e),{},{verified:!1,verified_until:null})),void Ta.message("Reporting locked after 5 minutes of inactivity")}if(Date.now()-A.current>=6e4&&S.current>A.current){A.current=Date.now();try{const e=(await Eo.post("".concat(pg,"/touch"))).data;o(t=>(0,i.A)((0,i.A)({},t),{},{verified_until:e.verified_until}))}catch(t){N()}}},5e3);return()=>{clearInterval(n),t.forEach(t=>window.removeEventListener(t,e))}},[_]);return r?r.error?(0,_e.jsx)("div",{className:"card-surface rounded-2xl p-8 text-slate-400","data-testid":"reports-not-found",children:"This page isn't available."}):r.verified?t({verifiedUntil:r.verified_until,lock:async()=>{await Eo.post("".concat(pg,"/lock")),N()}}):(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-8 max-w-lg","data-testid":"reports-otp-gate",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)("span",{className:"grid h-11 w-11 place-items-center rounded-2xl bg-amber-400/15 text-amber-300",children:(0,_e.jsx)(mg,{size:22})}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Extra security"}),(0,_e.jsx)("h2",{className:"font-display text-xl font-bold",children:"Confirm it's you"})]})]}),(0,_e.jsx)("p",{className:"mt-4 text-sm text-slate-400",children:"Reporting is locked behind a one-time code. We'll email a 12-digit code to the designated email address; it works once and expires in 10 minutes. Reporting relocks after 5 minutes of inactivity."}),(0,_e.jsx)("div",{className:"mt-5 flex flex-wrap items-center justify-center gap-3",children:(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{f(!0);try{(await Eo.post("".concat(pg,"/send"))).data;b(!0),Ta.success("Code sent to the designated email address")}catch(lS){Ta.error(Mo(lS))}finally{f(!1)}},disabled:p,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"reports-otp-send",children:[p?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(Ei,{size:15,className:"mr-2"})," ",v?"Send a new code":"Email me a code"]})}),(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),k(!0);try{await Eo.post("".concat(pg,"/verify"),{code:d}),u(""),await N(),Ta.success("Verified \u2014 Reporting unlocked for 15 minutes")}catch(cS){Ta.error(Mo(cS))}finally{k(!1)}},className:"mt-5 flex flex-col items-center gap-[26px]","data-testid":"reports-otp-form",children:[(0,_e.jsxs)("label",{className:"block text-center",children:[(0,_e.jsx)("span",{className:"block text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"12-digit code"}),(0,_e.jsx)("input",{value:d,onChange:e=>u(e.target.value.replace(/\D/g,"").slice(0,12)),inputMode:"numeric",autoComplete:"one-time-code",placeholder:"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022",className:"mt-1 h-11 w-72 rounded-xl bg-white/5 border border-white/10 px-4 font-mono text-lg tracking-[0.25em] text-center outline-none focus:border-sky-400","data-testid":"reports-otp-input"})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:j||12!==d.length,className:"h-11 rounded-full bg-emerald-500 text-white font-bold hover:bg-emerald-400","data-testid":"reports-otp-verify",children:j?"Checking\u2026":"Unlock Reporting"})]})]}):(0,_e.jsx)("p",{className:"text-slate-400",children:"Checking access\u2026"})},gg=Jo("calendar-range",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]]),xg=Jo("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acy
2p4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),vg=[["total_downloads","Total downloads",1],["downloads_120","Downloads > 120",1],["unique_pct","Unique %",.01],["h24_pct","24hrs %",1],["played_pct","Played %",1]],bg=(e,t)=>({show_id:e.show_id,show_name:e.show_name,cover_url:e.cover_url,episode_id:t.id,episode_title:t.title,audio_url:t.audio_url,link_source:t.link_source||"",timestamps:t.timestamps||"",timestamps_source:t.timestamps_source||"",total_downloads:"",downloads_120:"",unique_pct:"",h24_pct:"",played_pct:""}),yg={submission:"Auto-filled from the host's published-episode log",scan:"Auto-filled from the Timecodes scan"},wg=e=>{let t=e.show,n=e.row,a=e.index,s=e.onChange;const r=!!n,o=(e,t)=>s((0,i.A)((0,i.A)({},n),{},{[e]:t},"timestamps"===e?{timestamps_source:""}:{})),l=((null===n||void 0===n?void 0:n.timestamps)||"").split(/[,\n;]+/).map(e=>e.trim()).filter(Boolean).length;return(0,_e.jsxs)("div",{className:"rounded-2xl border p-4 transition-colors ".concat(r?"border-sky-400/30 bg-white/[0.04]":"border-white/5 bg-transparent opacity-70"),"data-testid":"report-show-".concat(a),children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,_e.jsx)("input",{type:"checkbox",checked:r,onChange:e=>s(e.target.checked?bg(t,t.episodes[0]):null),className:"h-4 w-4 accent-sky-400","data-testid":"report-show-include-".concat(a)}),t.cover_url&&(0,_e.jsx)("img",{src:Po(t.cover_url),alt:"",className:"h-10 w-10 rounded-lg object-cover"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsx)("p",{className:"font-semibold truncate","data-testid":"report-show-name-".concat(a),children:t.show_name}),r?(0,_e.jsxs)("div",{className:"mt-1 space-y-1.5 max-w-xl",children:[t.episodes.length>1&&(0,_e.jsx)("select",{value:n.episode_id,onChange:e=>(e=>{const a=t.episodes.find(t=>t.id===e);a&&s((0,i.A)((0,i.A)({},n),{},{episode_id:a.id,episode_title:a.title,audio_url:a.audio_url,link_source:a.link_source||"",timestamps:a.timestamps||n.timestamps,timestamps_source:a.timestamps?a.timestamps_source:""}))})(e.target.value),className:"h-8 w-full rounded-md bg-white/5 border border-white/10 px-2 text-xs text-slate-300","data-testid":"report-show-episode-".concat(a),children:t.episodes.map(e=>(0,_e.jsx)("option",{value:e.id,className:"bg-[#0B1A33]",children:e.title},e.id))}),(0,_e.jsx)("input",{value:n.episode_title,onChange:e=>o("episode_title",e.target.value),placeholder:"Episode title as it should appear on the report",title:"Edit how the episode title reads on the PDF",className:"h-8 w-full rounded-md bg-white/5 border border-white/10 px-2 text-xs","data-testid":"report-show-episode-title-".concat(a)})]}):(0,_e.jsxs)("p",{className:"text-xs text-slate-500",children:[t.episodes.length," episode",1===t.episodes.length?"":"s"," this week \u2014 tick to include"]})]})]}),r&&(0,_e.jsxs)("div",{className:"mt-3 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2",children:[vg.map(e=>{var t;let s=(0,De.A)(e,3),r=s[0],i=s[1],l=s[2];return(0,_e.jsxs)("label",{className:"block",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:i}),(0,_e.jsx)("input",{type:"number",step:l,value:null!==(t=n[r])&&void 0!==t?t:"",onChange:e=>o(r,""===e.target.value?"":Number(e.target.value)),placeholder:"\u2014",className:"mt-1 h-9 w-full rounded-md border px-2 text-sm font-mono ".concat(""===n[r]||null==n[r]?"bg-amber-400/5 border-amber-400/20":"bg-white/5 border-white/10"),"data-testid":"report-show-".concat(r,"-").concat(a)})]},r)}),(0,_e.jsxs)("label",{className:"block col-span-2 sm:col-span-3 lg:col-span-6",children:[(0,_e.jsxs)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:["Ad timestamps ",(0,_e.jsxs)("span",{className:"text-slate-400",children:["\xb7 [TOTAL = ",l,"]"]}),n.timestamps_source&&yg[n.timestamps_source]&&(0,_e.jsxs)("span",{className:"ml-2 normal-case tracking-normal text-emerald-300","data-testid":"report-show-ts-source-".concat(a),children:["\u2713 ",yg[n.timestamps_source]]}),!n.timestamps&&(0,_e.jsx)("span",{className:"ml-2 normal-case tracking-normal text-slate-500",children:"\xb7 no ad mentions logged for this episode yet"})]}),(0,_e.jsx)("input",{value:n.timestamps,onChange:e=>o("timestamps",e.target.value),placeholder:"0:43, 5:37, 24:17",className:"mt-1 h-9 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm font-mono","data-testid":"report-show-timestamps-".concat(a)})]}),n.audio_url?(0,_e.jsxs)("a",{href:n.audio_url,target:"_blank",rel:"noreferrer",className:"col-span-2 sm:col-span-3 lg:col-span-6 text-[11px] text-sky-300 hover:text-sky-200 truncate","data-testid":"report-show-audio-".concat(a),children:["acast"===n.link_source?"Acast audio link (from the published episodes
2): ":"Episode link: ",n.audio_url]}):(0,_e.jsx)("p",{className:"col-span-2 sm:col-span-3 lg:col-span-6 text-[11px] text-amber-300",children:"No audio link found \u2014 the title won't be clickable in the PDF."})]})]})},jg=e=>{let t=e.week,n=e.index,a=e.onChange,r=e.onRemove;const o=(0,s.useState)(null),l=(0,De.A)(o,2),c=l[0],d=l[1];(0,s.useEffect)(()=>{Eo.get("/admin/reports/delivery/week",{params:{start:t.start}}).then(e=>d(e.data)).catch(e=>Ta.error(Mo(e)))},[t.start]);const u=t.rows||[],h=u.reduce((e,t)=>e+(Number(t.downloads_120)||0),0),m=(0,s.useState)(!1),p=(0,De.A)(m,2),f=p[0],g=p[1],x=c?c.shows.filter(e=>e.episodes.some(e=>e.mention_count>0)).length:0,v=(0,s.useState)(!1),b=(0,De.A)(v,2),y=b[0],w=b[1],j=u.filter(e=>!Number(e.downloads_120)).length;return(0,_e.jsxs)("section",{className:"card-surface rounded-3xl p-5","data-testid":"report-week-".concat(n),children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_e.jsx)(gg,{size:18,className:"text-sky-400"}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"font-display font-bold","data-testid":"report-week-label-".concat(n),children:(null===c||void 0===c?void 0:c.label)||"Week of ".concat(t.start)}),(0,_e.jsx)("p",{className:"text-xs text-slate-400",children:c?"".concat(c.start," \u2192 ").concat(c.end," \xb7 ").concat(c.shows.length," show").concat(1===c.shows.length?"":"s"," published \xb7 ").concat(u.length," included \xb7 ").concat(h.toLocaleString()," qualified \xb7 ad mentions logged for ").concat(x):"Loading shows\u2026"})]})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>c&&a((0,i.A)((0,i.A)({},t),{},{rows:c.shows.map(e=>u.find(t=>t.show_id===e.show_id)||bg(e,e.episodes[0]))})),className:"inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-slate-300 hover:bg-white/10","data-testid":"report-week-all-".concat(n),children:[(0,_e.jsx)(xg,{size:13})," All"]}),(0,_e.jsxs)("button",{type:"button",onClick:()=>a((0,i.A)((0,i.A)({},t),{},{rows:[]})),className:"inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-slate-300 hover:bg-white/10","data-testid":"report-week-none-".concat(n),children:[(0,_e.jsx)(Fh,{size:13})," None"]}),(0,_e.jsxs)("button",{type:"button",onClick:async()=>{w(!0);try{const e=await Eo.post("/admin/reports/delivery/import",{show_ids:u.map(e=>e.show_id),week_start:t.start}),n=e.data,s=u.map(e=>n.items[e.show_id]?(0,i.A)((0,i.A)({},e),Object.fromEntries(Object.entries(n.items[e.show_id]).filter(e=>"outlier"!==(0,De.A)(e,1)[0]))):e);a((0,i.A)((0,i.A)({},t),{},{rows:s}));const r=Object.keys(n.items).length;Ta.success("Show data imported for ".concat(r," show").concat(1===r?"":"s")),n.missing.length&&Ta.warning("No master numbers yet for: ".concat(n.missing.join(", ")))}catch(lS){Ta.error(Mo(lS))}finally{w(!1)}},disabled:y||!u.length,className:"inline-flex items-center gap-1 rounded-full bg-sky-400 px-3 py-1.5 font-bold text-[#070F1E] hover:bg-sky-300 disabled:opacity-50","data-testid":"report-week-import-".concat(n),children:[(0,_e.jsx)(If,{size:13,className:y?"animate-bounce":""})," Import show data",j&&u.length?" (".concat(j," empty)"):""]}),(0,_e.jsxs)("button",{type:"button",onClick:async()=>{g(!0);try{const e=(await Eo.get("/admin/reports/delivery/week",{params:{start:t.start}})).data;d(e);let n=0;const s=u.map(t=>{var a;const s=null===(a=e.shows.find(e=>e.show_id===t.show_id))||void 0===a?void 0:a.episodes.find(e=>e.id===t.episode_id);return null!==s&&void 0!==s&&s.timestamps&&s.timestamps!==t.timestamps?(n+=1,(0,i.A)((0,i.A)({},t),{},{timestamps:s.timestamps,timestamps_source:s.timestamps_source,audio_url:s.audio_url||t.audio_url})):t});a((0,i.A)((0,i.A)({},t),{},{rows:s})),Ta[n?"success":"message"](n?"Ad mentions updated on ".concat(n," show").concat(1===n?"":"s"):"No new ad mentions in the log for these episodes")}catch(lS){Ta.error(Mo(lS))}finally{g(!1)}},disabled:f||!u.length,className:"inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-emerald-300 hover:bg-emerald-500/15 disabled:opacity-50","data-testid":"report-week-recheck-".concat(n),children:[(0,_e.jsx)(Qp,{size:13,className:f?"animate-spin":""})," Re-check ad mentions"]}),(0,_e.jsxs)("button",{type:"button",onClick:r,className:"inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-rose-300 hover:bg-rose-500/15","data-testid":"report-week-remove-".concat(n),children:[(0,_e.jsx)(Mm,{size:13})," Remove week"]})]})]}),u.length>8&&(0,_e.jsxs)("p",{className:"mt-3 rounded-xl border border-amber-400/30 bg-amber-400/10 px-3 py-2 text-xs text-amber-200","data-testid":"report-week-over8-".concat(n),children:[u.length," shows included \u2014 the PDF is designed for up to 8 shows per week; extra rows will run onto a second page."]}),(0,_e.jsxs)("div",{className:"mt-4 space-y-2",children:[0===(null===c||void 0===c?void 0:c.shows.length)&&(0,_e.jsx)("p",{className:"text-sm text-slate-400",children:"No audio shows published this week."}),null===c||void 0===c?void 0:c.shows.map((e,s)=>
2(0,_e.jsx)(wg,{show:e,row:u.find(t=>t.show_id===e.show_id)||null,index:"".concat(n,"-").concat(s),onChange:n=>((e,n)=>a((0,i.A)((0,i.A)({},t),{},{rows:n?u.some(t=>t.show_id===e)?u.map(t=>t.show_id===e?n:t):[...u,n]:u.filter(t=>t.show_id!==e)})))(e.show_id,n)},e.show_id))]})]})},kg="/admin/reports/delivery",Ng={"Lucky Rebel":"RBL"},Sg=(e,t)=>{var n;const a=Ng[e]||e||"(X)",s=null===(n=t[t.length-1])||void 0===n?void 0:n.start;return"".concat(a," Campaign").concat(s?": Week of ".concat((e=>{const t=e.split("-"),n=(0,De.A)(t,3),a=n[0],s=n[1],r=n[2];return"".concat(s,"/").concat(r,"/").concat(a)})(s)):"")},Ag=["Amazon","BetterHelp","Disney","Factor","Google","Helix Sleep","Indeed","Lucky Rebel","Mint Mobile","NordVPN","OpenAI/ChatGPT","Progressive","Quince","Rocket Money","Shopify","SimpliSafe","Squarespace","State Farm","T-Mobile","Toyota","Wayfair"];function _g(){return(0,s.useEffect)(()=>{document.title="Reporting \u2014 Underdog CMS"},[]),(0,_e.jsxs)("div",{"data-testid":"reports-admin",children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Owner only"}),(0,_e.jsx)("h1",{className:"font-display text-4xl font-black tracking-tight",children:"Reporting"}),(0,_e.jsx)("p",{className:"mt-2 text-slate-400 text-sm max-w-2xl",children:"Build weekly delivery reports for campaign partners. Pick the weeks, tick the shows that published, adjust the figures, and export a PDF with clickable episode links."}),(0,_e.jsx)("div",{className:"mt-8",children:(0,_e.jsx)(fg,{children:e=>{let t=e.lock;return(0,_e.jsx)(Cg,{lock:t})}})})]})}const Cg=e=>{let t=e.lock;const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)([]),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)({id:null,campaign:"(X) Campaign",advertiser:"",targeted:"",weeks:[],campaignAuto:!0}),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(!1),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useState)(!1),w=(0,De.A)(y,2),j=w[0],k=w[1],N=(0,s.useState)(""),S=(0,De.A)(N,2),A=S[0],_=S[1],C=(0,s.use
2State)(0),E=(0,De.A)(C,2),P=E[0],M=E[1],R=()=>Eo.get(kg).then(e=>o(e.data)).catch(e=>Ta.error(Mo(e)));(0,s.useEffect)(()=>{R(),Eo.get("".concat(kg,"/weeks")).then(e=>u(e.data)).catch(()=>{})},[]);const O=()=>({campaign:p.campaign||"",advertiser:p.advertiser||"",targeted:Number(p.targeted)||0,weeks:p.weeks.map(e=>({start:e.start,rows:e.rows.map(e=>(0,i.A)((0,i.A)({},e),{},{total_downloads:Number(e.total_downloads)||0,downloads_120:Number(e.downloads_120)||0,unique_pct:Number(e.unique_pct)||0,h24_pct:Number(e.h24_pct)||0,played_pct:Number(e.played_pct)||0}))}))}),z=async()=>{if(!p.weeks.length)return Ta.error("Add at least one week first");b(!0);try{const e=(p.id?await Eo.put("".concat(kg,"/").concat(p.id),O()):await Eo.post(kg,O())).data;return f(e),R(),M(e=>e+1),Ta.success(e.promoted?"Report saved \u2014 live master numbers updated for ".concat(e.promoted," show").concat(1===e.promoted?"":"s"):"Report saved"),e}catch(lS){return Ta.error(Mo(lS)),null}finally{b(!1)}},T=async e=>{k(!0);try{var t;const n=await Eo.get("".concat(kg,"/").concat(e,"/pdf"),{responseType:"blob"}),a=(null===(t=(n.headers["content-disposition"]||"").match(/filename="([^"]+)"/))||void 0===t?void 0:t[1])||"delivery-report.pdf",s=URL.createObjectURL(n.data),r=Object.assign(document.createElement("a"),{href:s,download:a});document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(s)}catch(lS){Ta.error(Mo(lS))}finally{k(!1)}},D=d.filter(e=>!p.weeks.some(t=>t.start===e.start));return(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[260px_1fr] gap-6 items-start","data-testid":"reports-workspace",children:[(0,_e.jsxs)("aside",{className:"space-y-3",children:[(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-4 flex items-center justify-between gap-2 text-xs","data-testid":"reports-session",children:[(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-emerald-300",title:"Relocks after 5 minutes without activity",children:[(0,_e.jsx)(og,{size:13})," Unlocked \xb7 relocks after 5 idle min"]}),(0,_e.jsxs)("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 text-slate-400 hover:text-white","data-testid":"reports-lock",children:[(0,_e.jsx)(ig,{size:12})," Lock"]})]}),(0,_e.jsxs)(Dh,{type:"button",onClick:()=>f({id:null,campaign:"(X) Campaign",advertiser:"",targeted:"",weeks:[],campaignAuto:!0}),variant:"outline",className:"w-full rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"reports-new",children:[(0,_e.jsx)(Rm,{size:15,className:"mr-2"})," New report"]}),(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-3","data-testid":"reports-list",children:[(0,_e.jsx)("p",{className:"px-2 pb-2 text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Saved reports"}),null===r&&(0,_e.jsx)("p",{className:"px-2 text-sm text-slate-400",children:"Loading\u2026"}),0===(null===r||void 0===r?void 0:r.length)&&(0,_e.jsx)("p",{className:"px-2 pb-1 text-sm text-slate-400",children:"Nothing saved yet."}),null===r||void 0===r?void 0:r.map(e=>{var t;return(0,_e.jsxs)("div",{className:"group flex items-start gap-2 rounded-xl px-2 py-2 ".concat(p.id===e.id?"bg-[#053671]":"hover:bg-white/5"),"data-testid":"reports-item-".concat(e.id),children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>(async e=>{try{const t=(await Eo.get("".concat(kg,"/").concat(e))).data;f(t)}catch(lS){Ta.error(Mo(lS))}})(e.id),className:"min-w-0 flex-1 text-left",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate",children:e.campaign||"Untitled campaign"}),(0,_e.jsxs)("p",{className:"text-[11px] text-slate-400",children:[e.weeks.length," week",1===e.weeks.length?"":"s"," \xb7 ",(null===(t=e.weeks[0])||void 0===t?void 0:t.start)||"\u2014",e.weeks.length>1?" \u2192 ".concat(e.weeks[e.weeks.length-1].start):""," \xb7 ",Ro(e.updated_at)]})]}),(0,_e.jsx)("button",{type:"button",onClick:()=>(async e=>{if(window.confirm("Delete this saved report?"))try{await Eo.delete("".concat(kg,"/").concat(e)),p.id===e&&f({id:null,campaign:"(X) Campaign",advertiser:"",targeted:"",weeks:[],campaignAuto:!0}),R()}catch(lS){Ta.error(Mo(lS))}})(e.id),className:"rounded-full p-1.5 text-slate-500 opacity-0 group-hover:opacity-100 hover:bg-rose-500/20 hover:text-rose-300","aria-label":"Delete","data-testid":"reports-delete-".concat(e.id),children:(0,_e.jsx)(Mm,{size:13})})]},e.id)})]})]}),(0,_e.jsxs)("div",{className:"space-y-5 min-w-0",children:[(0,_e.jsxs)("section",{className:"card-surface rounded-3xl p-5","data-testid":"reports-setup",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2 text-sky-400",children:[(0,_e.jsx)(Hp,{size:18}),(0,_e.jsx)("p",{className:"font-display font-bold text-white",children:p.id?"Edit report":"New report"})]}),(0,_e.jsxs)("div",{className:"mt-4 grid sm:grid-cols-[1fr_170px_minmax(220px,280px)] gap-3 items-end",children:[(0,_e.jsxs)("div",{className:"space-y-2",children:[(0,_e.jsxs)("label",{className:"block",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Campaign name"}),(0,_e.jsx)("input",{value:p.campaign,onChange:e=>f(t=>(0,i.A)((0,i.A)({},t),{},{campaign:e.target.value,campaignAuto:!1})),placeholder:"(X) Campaign: Week of MM/DD/YYYY",className:"mt-1 h-10 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"reports-campaign"})]}),(0,_e.jsxs)("label",{className:"block",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Advertiser"}),(0,_e.jsxs)("select",{value:p.advertiser,onChange:e=>{const t=e.target.value;f(e=>(0,i.A)((0,i.A)({},e),{},{advertiser:t,campaign:t?Sg(t,e.weeks):e.campaign,campaignAuto:!!t||e.campaignAuto}))},className:"mt-1 h-10 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"reports-advertiser",children:[(0,_e.jsx)("option",{value:"",className:"bg-[#0B1A33]",children:"Choose an advertiser\u2026"}),Ag.map(e=>(0,_e.jsx)("option",{value:e,className:"bg-[#0B1A33]",children:e},e))]})]})]}),(0,_e.jsxs)("label",{className:"block self-start",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Targeted downloads"}),(0,_e.jsx)("input",{type:"number",value:p.targeted,onChange:e=>f(t=>(0,i.A)((0,i.A)({},t),{},{targeted:e.target.value})),className:"mt-1 h-10 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm font-mono","data-testid":"reports-targeted"})]}),(0,_e.jsxs)("label",{className:"block self-start",children:[(0,_e.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-wider text-slate-500",children:"Add a week"}),(0,_e.jsxs)("select",{value:A,onChange:e=>{var t;(t=e.target.value)&&!p.weeks.some(e=>e.start===t)&&(f(e=>{const n=[...e.weeks,{start:t,rows:[]}];return(0,i.A)((0,i.A)({},e),{},{weeks:n.sort((e,t)=>
2e.start.localeCompare(t.start)),campaign:e.campaignAuto?Sg(e.advertiser,[{start:t}]):e.campaign})}),_(""))},className:"mt-1 h-10 w-full rounded-md bg-white/5 border border-white/10 px-3 text-sm","data-testid":"reports-add-week",children:[(0,_e.jsx)("option",{value:"",className:"bg-[#0B1A33]",children:"Choose a week\u2026"}),D.map(e=>(0,_e.jsxs)("option",{value:e.start,className:"bg-[#0B1A33]",children:[e.label,e.current?" (current)":""," \xb7 ",e.show_count," show",1===e.show_count?"":"s"]},e.start))]})]})]})]}),0===p.weeks.length&&(0,_e.jsxs)("div",{className:"rounded-3xl border border-dashed border-white/10 p-10 text-center text-sm text-slate-400","data-testid":"reports-empty",children:["Add a week to see every show that published in it. Tick the shows, then hit ",(0,_e.jsx)("span",{className:"text-sky-300 font-semibold",children:"Import show data"})," to fill the figures from the live master numbers."]}),p.weeks.map((e,t)=>(0,_e.jsx)(jg,{week:e,index:t,onChange:e=>((e,t)=>f(n=>(0,i.A)((0,i.A)({},n),{},{weeks:n.weeks.map((n,a)=>a===e?t:n)})))(t,e),onRemove:()=>f(e=>(0,i.A)((0,i.A)({},e),{},{weeks:e.weeks.filter((e,n)=>n!==t)}))},e.start)),(0,_e.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-3 pt-2",children:[(0,_e.jsxs)(Dh,{type:"button",onClick:z,disabled:v,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"reports-save",children:[v?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(lg,{size:15,className:"mr-2"})," Save"]}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{const e=await z();if(e){k(!0);try{var t;const n=await Eo.get("".concat(kg,"/").concat(e.id,"/pdf"),{responseType:"blob"}),a=(null===(t=(n.headers["content-disposition"]||"").match(/filename="([^"]+)"/))||void 0===t?void 0:t[1])||"delivery-report.pdf",s=URL.createObjectURL(n.data),r=Object.assign(document.createElement("a"),{href:s,download:a});document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(s),Ta.success("PDF downloaded")}catch(lS){Ta.error(Mo(lS))}finally{k(!1)}}},disabled:v||j||!p.weeks.length,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"reports-export",children:[j?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(If,{size:15,className:"mr-2"})," Preview PDF"]}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{if(!p.weeks.length)return Ta.error("Add at least one week first");const e=p.weeks.reduce((e,t)=>e+t.rows.filter(e=>!Number(e.downloads_120)).length,0);if(e&&!window.confirm("".concat(e," included show").concat(1===e?" has":"s have"," no figures yet \u2014 publish anyway? (Those shows won't update the master numbers.)")))return;if(!window.confirm("Publish this report? It will be saved, its figures become the live master numbers, and the PDF will download."))return;let t=p.id?p:await z();if(t){b(!0);try{const e=(await Eo.post("".concat(kg,"/").concat(t.id,"/publish"),O())).data;f(e),R(),M(e=>e+1),Ta.success("Published \u2014 master numbers updated for ".concat(e.promoted," show").concat(1===e.promoted?"":"s")),await T(e.id)}catch(lS){Ta.error(Mo(lS))}finally{b(!1)}}},disabled:v||j||!p.weeks.length,className:"rounded-full bg-emerald-500 text-white font-bold hover:bg-emerald-400","data-testid":"reports-publish",children:[v?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(Af,{size:15,className:"mr-2"})," Publish & export PDF"]})]}),p.published_at&&(0,_e.jsxs)("p",{className:"text-right text-xs text-emerald-300","data-testid":"reports-published-at",children:["Published ",Ro(p.published_at)," \u2014 its figures are the current master numbers."]})]}),(0,_e.jsx)("div",{className:"lg:col-span-2 min-w-0",children:(0,_e.jsx)(hg,{refreshKey:P})})]})},Eg=e=>(e||"").split(/[,\n;]+/).map(e=>e.trim()).filter(Boolean),Pg=()=>{const e=Math.max(0,Math.round((window.screen.width-1100)/2)),t=Math.max(0,Math.round((window.screen.height-800)/2));window.open("https://keyword.underdogtools.com/","underdog-keyword-tool","popup=yes,width=".concat(1100,",height=").concat(800,",left=").concat(e,",top=").concat(t,",resizable=yes,scrollbars=yes"))},Mg=e=>
2{let t=e.value,n=e.onChange;const a=Eg(t);return(0,_e.jsxs)("div",{"data-testid":"ad-mentions-field",children:[(0,_e.jsxs)("label",{className:"text-sm font-medium leading-none",children:["Ad mention timecodes ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(not published \u2014 for the Underdog team)"})]}),(0,_e.jsx)("textarea",{value:t,onChange:e=>n(e.target.value),rows:2,placeholder:"0:00, 2:12, 3:23, 5:01, 7:45",className:"mt-1.5 w-full rounded-md bg-white/5 border border-white/10 px-3 py-2 text-sm font-mono","data-testid":"ad-mentions-input"}),(0,_e.jsxs)("p",{className:"mt-1 text-right text-[11px] ".concat(a.length&&a.length<5?"text-amber-300":a.length>=5?"text-emerald-400":"text-slate-500"),"data-testid":"ad-mentions-count",children:[a.length," mention",1===a.length?"":"s",a.length?" \xb7 ".concat(a.join(", ")):"",a.length&&a.length<5?" \xb7 add ".concat(5-a.length," more (").concat(5," required when filled in)"):""]})]})},Rg=e=>{let t=e.onImport;const n=(0,s.useState)(!1),a=(0,De.A)(n,2),r=a[0],o=a[1],i=(0,s.useState)(null),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useState)(""),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(""),g=(0,De.A)(f,2),x=g[0],v=g[1],b=(c||[]).filter(e=>e.title.toLowerCase().includes(m.toLowerCase()));return(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-5 pb-7","data-testid":"keyword-tool-card",children:[(0,_e.jsxs)("p",{className:"eyebrow mb-1 flex items-center gap-1.5",children:[(0,_e.jsx)(Up,{size:12})," Keyword tool"]}),(0,_e.jsx)("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:"Run your audio through the Underdog keyword tool, then import the finished episode's timecodes straight into the form."}),(0,_e.jsxs)(Dh,{type:"button",onClick:Pg,variant:"outline",size:"sm",className:"mt-4 w-full rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"ad-mentions-tool-button",children:["Find \u201cLucky Rebel\u201d mentions ",(0,_e.jsx)(Ch,{size:12,className:"ml-1.5 opacity-70"})]}),(0,_e.jsxs)(Dh,{type:"button",onClick:()=>{o(!0),d(null),v(""),Eo.get("/portal/podflow/episodes").then(e=>d(e.data)).catch(e=>{d([]),v(Mo(e))})},size:"sm",className:"mt-2.5 w-full rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"podflow-import-button",children:[(0,_e.jsx)(If,{size:14,className:"mr-1.5"})," Import from PodFlow"]}),(0,_e.jsx)("p",{className:"mt-3 text-[10px] text-slate-500 text-center","data-testid":"keyword-tool-hint",children:"Imported timecodes land in the Ad mention field on the left."}),(0,_e.jsx)(th,{open:r,onOpenChange:o,children:(0,_e.jsxs)(sh,{className:"card-surface border-white/10 max-w-lg","data-testid":"podflow-import-dialog",children:[(0,_e.jsx)(rh,{children:(0,_e.jsx)(oh,{className:"font-display",children:"Import timecodes from PodFlow"})}),(0,_e.jsx)(Gh,{value:m,onChange:e=>p(e.target.value),placeholder:"Search by episode title\u2026",className:"bg-white/5 border-white/10","data-testid":"podflow-search-input"}),(0,_e.jsxs)("div",{className:"max-h-80 overflow-y-auto space-y-1.5 pr-1","data-testid":"podflow-episode-list",children:[null===c&&(0,_e.jsx)("p",{className:"text-sm text-slate-400 p-2",children:"Loading finished episodes\u2026"}),x&&(0,_e.jsx)("p",{className:"text-sm text-rose-400 p-2","data-testid":"podflow-error",children:x}),c&&!x&&0===b.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400 p-2",children:"No finished episodes match."}),b.map((e,n)=>(0,_e.jsxs)("button",{type:"button",onClick:()=>(e=>{t(e.timecodes.join(", ")),o(!1),Ta.success("Imported ".concat(e.count," mention").concat(1===e.count?"":"s"," from \u201c").concat(e.title,"\u201d"))})(e),className:"w-full text-left rounded-xl border border-white/10 bg-white/[0.03] hover:bg-white/10 p-3 transition-colors","data-testid":"podflow-episode-".concat(n),children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate",children:e.title}),(0,_e.jsxs)("span",{className:"shrink-0 rounded-full bg-emerald-400/15 px-2 py-0.5 text-[10px] font-mono text-emerald-300",children:[e.count," mention",1===e.count?"":"s"]})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400",children:[Ro(e.created_at),e.count?" \xb7 ".concat(e.timeco
2des.slice(0,6).join(", ")).concat(e.count>6?"\u2026":""):""]})]},e.id))]})]})})]})};function Og(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(new Set),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)("Lucky Rebel"),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(e=>{const t=(0,s.useState)(null),n=(0,De.A)(t,2),a=n[0],r=n[1],o=(0,s.useRef)(null),i=()=>{o.current&&clearInterval(o.current),o.current=null};return(0,s.useEffect)(()=>i,[]),{job:a,setJob:r,track:(t,n)=>{i(),o.current=setInterval(async()=>{try{const a=(await Eo.get("".concat(e,"/").concat(t))).data;r(a),"done"===a.status&&(i(),null===n||void 0===n||n(a))}catch(a){i()}},4e3)},running:"running"===(null===a||void 0===a?void 0:a.status)}})("/admin/timecodes"),p=m.job,f=m.setJob,g=m.track,x=m.running,v=()=>Eo.get("/admin/timecodes/submissions").then(e=>{a(e.data),l(new Set(e.data.map(e=>e.id)))}).catch(()=>a([]));(0,s.useEffect)(()=>{v()},[]);const b=(null===n||void 0===n?void 0:n.length)&&i.size===n.length;return n?(0,_e.jsxs)("div",{"data-testid":"admin-timecodes",children:[(0,_e.jsxs)("div",{className:"mb-8",children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Campaigns"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Timecodes"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Every episode submitted in the past 3 weeks. Tick the ones to include, then scan their audio for a sponsor term. Results are saved on each submission."})]}),(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-4 mb-6 flex flex-wrap items-end gap-4","data-testid":"timecodes-controls",children:[(0,_e.jsxs)("div",{className:"min-w-[220px] flex-1",children:[(0,_e.jsx)(tm,{children:"Term to find"}),(0,_e.jsx)(Gh,{value:u,onChange:e=>h(e.target.value),placeholder:"Lucky Rebel",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"timecodes-term-input"})]}),(0,_e.jsxs)("button",{type:"button",onClick:()=>l(b?new Set:new Set(n.map(e=>e.id))),className:"inline-flex items-center gap-2 text-sm text-slate-300 hover:text-white pb-2.5","data-testid":"timecodes-toggle-all",children:[b?(0,_e.jsx)(xg,{size:16}):(0,_e.jsx)(Fh,{size:16})," ",b?"Uncheck all":"Check all"]}),(0,_e.jsxs)(Dh,{onClick:async()=>{if(!i.size)return Ta.error("Tick at least one episode");try{const e=(await Eo.post("/admin/timecodes/scan",{submission_ids:[...i],term:u.trim()||"Lucky Rebel"})).data;f(e),Ta.info("Scanning ".concat(i.size," episode").concat(1===i.size?"":"s"," for \u201c").concat(u,"\u201d \u2014 a few minutes per hour of audio")),g(e._id,()=>{Ta.success("Scan complete"),v()})}catch(lS){Ta.error(Mo(lS))}},disabled:x||!n.length,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"timecodes-scan-button",children:[x?(0,_e.jsx)(sf,{size:15,className:"mr-2 animate-spin"}):(0,_e.jsx)(Up,{size:15,className:"mr-2"})," ",x?"Scanning\u2026":"Scan ".concat(i.size," episode").concat(1===i.size?"":"s")]})]}),(0,_e.jsxs)("div",{className:"space-y-2","data-testid":"timecodes-list",children:[0===n.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400","data-testid":"timecodes-empty",children:"No submissions in the past 3 weeks."}),n.map((e,t)=>{const n=(e=>{var t;return null===p||void 0===p||null===(t=p.items)||void 0===t?void 0:t.find(t=>t.submission_id===e)})(e.id),a=e.scan;return(0,_e.jsxs)("label",{className:"card-surface rounded-2xl p-4 flex items-start gap-4 cursor-pointer ".concat(i.has(e.id)?"":"opacity-60"),"data-testid":"timecodes-row-".concat(t),children:[(0,_e.jsx)("input",{type:"checkbox",checked:i.has(e.id),onChange:()=>(e=>l(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))(e.id),className:"mt-1 accent-sky-400","data-testid":"timecodes-check-".concat(t)}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsx)("p",{className:"font-semibold truncate",children:e.title}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[e.show_name," \xb7 by ",e.host_name," \xb7 submitted ",Oo(e.created_at),e.ad_mentions?" \xb7 host noted: ".concat(e.ad_mentions," (").concat(e.ad_mention_count,")"):""]}),"pending"===(null===n||void 0===n?void 0:n.status)&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-500",children:"Waiting\u2026"}),"failed"===(null===n||void 0===n?void 0:n.status)&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-rose-400",children:n.error}),("done"===(null===n||void 0===n?void 0:n.status)||!n&&a)&&(0,_e.jsxs)("p",{className:"mt-1 text-xs font-mono text-emerald-300","data-testid":"timecodes-result-".concat(t),children:["\u201c",n?p.term:a.term,"\u201d: ",(n?n.timecodes:a.timecodes).join(", ")||"no mentions foun
2d"," (",n?n.count:a.count,")",!n&&a?(0,_e.jsxs)("span",{className:"text-slate-500",children:[" \xb7 scanned ",Oo(a.scanned_at)]}):null]})]}),x&&"pending"===(null===n||void 0===n?void 0:n.status)&&(0,_e.jsx)(sf,{size:16,className:"animate-spin text-sky-300 mt-1"})]},e.id)})]})]}):null}const zg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},Tg=[{id:"habits",title:"Listening habits",questions:[{id:"shows_listened",label:"Which Underdog Podcasts shows have you listened to in the past six months?",help:"Select all that apply.",type:"multi",source:"shows",required:!0},{id:"show_most",label:"Which Underdog Podcasts show do you listen to most often?",help:"Select one.",type:"single",source:"shows",required:!0},{id:"frequency",label:"How frequently do you listen to that show?",type:"single",options:zg("Every episode","Most episodes","Occasionally","Rarely","I used to listen but stopped")},{id:"tenure",label:"How long have you been listening to shows on Underdog Podcasts?",type:"single",options:zg("Less than 3 months","3\u20136 months","6\u201312 months","1\u20133 years","More than 3 years")},{id:"discovery",label:"How did you originally discover one of our shows?",type:"single",options:zg("Another Underdog podcast","Podcast-app recommendation","YouTube","Social media","Search engine","Guest appearance","Friend or family member","Another podcast","Article or website","Advertisement","Other"),other:!0},{id:"reasons",label:"What are the biggest reasons you listen to our podcasts?",help:"Choose up to three.",type:"multi",max:3,options:zg("Hosts and personalities","Analysis and expertise","Entertainment","News and updates","Interviews","Betting information","Storytelling","Community and fandom","Coverage I cannot find elsewhere","Background listening","Other"),other:!0},{id:"satisfaction",label:"Overall, how satisfied are you with the Underdog podcast you listen to most?",help:"1 = not at all, 10 = extremely satisfied.",type:"scale",min:1,max:10,required:!0},{id:"nps",label:"How likely are you to recommend that show to another person?",help:"0 = not at all, 10 = extremely likely.",type:"scale",min:0,max:10,required:!0}]},{id:"content",title:"Content and format",questions:[{id:"more_of",label:"Which types of episodes would you like more of?",help:"Select all that apply.",type:"multi",options:zg("News and reaction","Interviews","Deep-dive analysis","Historical stories","Debates and roundtables","Predictions","Rankings and drafts","Betting-focused episodes","Listener questions","Behind-the-scenes content","Short daily episodes","Longer weekly episodes","Other"),other:!0},{id:"length",label:"How do you feel about the typical episode length of your favorite show?",type:"single",options:zg("Much too short","Slightly too short","About right","Slightly too long","Much too long")},{id:"release_freq",label:"How do you feel about the current release frequency?",type:"single",options:zg("I would like more episodes","The current frequency is about right","There are too many episodes","No preference")},{id:"platforms",label:"Where do you usually consume our content?",help:"Select all that apply.",type:"multi",options:zg("Apple Podcasts","Spotify","YouTube","YouTube Music","Amazon Music or Audible","Underdog Podcasts website","Other"),other:!0},{id:"formats",label:"Which content formats do you currently use or want from us?",help:"Select all that apply.",type:"multi",options:zg("Traditional audio podcasts","Full video episodes","Short video clips","Written articles or newsletters","Live streams","Live events","Community chat or Discord","I only want traditional podcasts","Other"),other:!0},{id:"coverage_wish",label:"Which subjects, sports, leagues, teams or types of guests would you most like us to cover?",type:"text"}]},{id:"network",title:"Network awareness and growth",questions:[{id:"awareness",label:"Before taking this survey, how many Underdog Podcasts shows were you aware of?",type:"single",options:zg("One","Two or three","Four or more")},{id:"try_another",label:"What would make you most likely to try another show from our network?",type:"single",options:zg("A recommendation from a host","A trailer played during my current show","A crossover episode","A recognizable guest","A personalized recommendation","Short highlight clips","A clearer description of what the show offers","Nothing in particular","Other"),other:!0},{id:"stopped_why",label:"Is there an Underdog podcast you previously listened to but no longer follow? If so, why did you stop listening?",help:"Select all that apply.",type:"multi",options:zg("I still listen to all the shows I previously followed","Lost interest in the subject","Too many episodes","Episodes were too long","Did not have enough time","Preferred another show","Host or format changes","Too many advertisements","Technical or audio-quality issues","Other"),other:!0}]},{id:"ads",title:"Advertising and listener support",questions:[{id:"ad_response",label:"How do you usually respond to advertisements you hear on podcasts?",type:"single",options:zg("I frequently investigate or purchase advertised products","I occasionally investigate or purchase advertised products","I remember the brands but rarely take action","I generally skip advertisements","I pay little attention to advertisements")},{id:"ad_action",label:"Have you ever taken action after hearing an advertisement on one of our shows?",help:"Select all that apply.",type:"multi",options:zg("Purchased the product or service","Visited the advertiser\u2019s website","Used a promotional code","Searched for the brand","Considered purchasing","Have not taken any action")},{id:"support",label:"Which optional ways of supporting our shows would you consider?",help:"Select all that apply.",type:"multi",options:zg("Paid ad-free episodes","Bonus episodes","Membership or Patreon","Merchandise","Live events","Direct donations","None","Other"),other:!0}]},{id:"demo",title:"About you",help:"Everything in this section is optional.",questions:[{id:"age",label:"Age range",type:"single",inline:!0,options:zg("Under 18","18\u201324","25\u201334","35\u201344","45\u201354","5
25\u201364","65+")},{id:"gender",label:"Gender identity",type:"single",inline:!0,options:zg("Man","Woman","Non-binary","Prefer to self-describe","Prefer not to say")},{id:"country",label:"Country",type:"short"},{id:"region",label:"State or region",type:"short"},{id:"employment",label:"Employment status",type:"single",inline:!0,options:zg("Employed full-time","Employed part-time","Self-employed","Student","Retired","Not currently employed","Prefer not to say")},{id:"industry",label:"Industry or occupation",type:"short"},{id:"education",label:"Education level",type:"single",inline:!0,options:zg("High school or less","Some college","Associate degree","Bachelor\u2019s degree","Graduate degree","Prefer not to say")},{id:"income",label:"Household income range",type:"single",inline:!0,options:zg("Under $25k","$25k\u2013$50k","$50k\u2013$75k","$75k\u2013$100k","$100k\u2013$150k","$150k+","Prefer not to say")},{id:"children",label:"Do you have children?",type:"single",inline:!0,options:zg("Yes","No","Prefer not to say")},{id:"sports_habits",label:"Sports-viewing and event-attendance habits",help:"Select all that apply.",type:"multi",options:zg("Watch sports weekly","Watch sports occasionally","Attend live games a few times a year","Attend live games regularly","Rarely watch or attend")},{id:"fantasy",label:"Fantasy-sports participation",type:"single",inline:!0,options:zg("Yes, regularly","Yes, occasionally","No")},{id:"betting",label:"Sports-betting participation",type:"single",inline:!0,options:zg("Yes, regularly","Yes, occasionally","No","Prefer not to say")}]}],Dg=new Set(["multi","single","scale"]),Lg=e=>{let t=e.label,n=e.count,a=e.max,s=e.total;return(0,_e.jsxs)("div",{className:"flex items-center gap-3 text-xs","data-testid":"survey-chart-bar",children:[(0,_e.jsx)("span",{className:"w-44 shrink-0 truncate text-slate-300",title:t,children:t}),(0,_e.jsx)("div",{className:"flex-1 h-5 rounded-full bg-white/5 overflow-hidden",children:(0,_e.jsx)("div",{className:"h-full rounded-full bg-sky-400/80 transition-[width] duration-500",style:{width:"".concat(a?n/a*100:0,"%")}})}),(0,_e.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-slate-400",children:[n," \xb7 ",s?Math.round(n/s*100):0,"%"]})]})},Fg=e=>{let t=e.q,n=e.rows,a=e.shows;const r=(0,s.useMemo)(()=>{const e=new Map;("scale"===t.type?Array.from({length:t.max-t.min+1},(e,n)=>String(t.min+n)):"shows"===t.source?a:t.options||[]).forEach(t=>e.set(t,0));let s=0;n.forEach(n=>{const a=n.answers[t.id];void 0===a||null===a||""===a||Array.isArray(a)&&!a.length||(s++,(Array.isArray(a)?a:[a]).forEach(t=>e.set(String(t),(e.get(String(t))||0)+1)))});let r=[...e.entries()];return"scale"!==t.type&&(r=r.filter(e=>(0,De.A)(e,2)[1]>0||(t.options||[]).length<=12).sort((e,t)=>t[1]-e[1])),{entries:r.slice(0,25),answered:s,max:Math.max(0,...r.map(e=>(0,De.A)(e,2)[1]))}},[t,n,a]),o="scale"===t.type?(()=>{const e=n.map(e=>e.answers[t.id]).filter(e=>void 0!==e&&null!==e&&""!==e).map(Number).filter(e=>!Number.isNaN(e));return e.length?(e.reduce((e,t)=>e+t,0)/e.length).toFixed(1):null})():null;return(0,_e.jsxs)("div",{className:"card-surface rounded-2xl p-4","data-testid":"survey-chart-".concat(t.id),children:[(0,_e.jsx)("p",{className:"text-sm font-semibold leading-snug",children:t.label}),(0,_e.jsxs)("p",{className:"mt-0.5 mb-3 text-[11px] text-slate-500",children:[r.answered," answered",o?" \xb7 average ".concat(o):"","multi"===t.type?" \xb7 multiple answers allowed":""]}),(0,_e.jsx)("div",{className:"space-y-1.5",children:r.entries.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)(Lg,{label:n,count:a,max:r.max,total:r.answered},n)})})]})},Ig=e=>{let t=e.rows;const n=(0,s.useState)(!0),a=(0,De.A)(n,2),r=a[0],o=a[1],i=(0,s.useMemo)(()=>[...new Set(t.flatMap(e=>[...e.answers.shows_listened||[],e.answers.show_most].filter(Boolean)))].sort(),[t]);return t.length?(0,_e.jsxs)("div",{className:"mb-8","data-testid":"survey-charts",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"flex w-full items-center justify-between text-left mb-3","data-testid":"survey-charts-toggle",children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Results at a glance"}),(0,_e.jsx)(mi,{size:16,className:"text-slate-400 transition-transform ".concat(r?"rotate-180":"")})]}),r&&Tg.map(e=>(0,_e.jsxs)("div",{className:"mb-6",children:[(0,_e.jsx)("h2",{className:"font-display text-lg font-extrabold mb-3",children:e.title}),(0,_e.jsx)("div",{className:"grid lg:grid-cols-2 gap-3",children:e.questions.filter(e=>Dg.has(e.type)).map(e=>(0,_e.jsx)(Fg,{q:e,rows:t,shows:i},e.id))})]},e.id))]}):null},Ug=Tg.flatMap(e=>e.questions),Bg=e=>{var t;return(null===(t=Ug.find(t=>
2t.id===e))||void 0===t?void 0:t.label)||e.replace(/_/g," ")},Wg=e=>Array.isArray(e)?e.join("; "):void 0===e||null===e?"":String(e);function qg(){const e=(0,s.useState)(null),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(null),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(null),d=(0,De.A)(c,2),u=d[0],h=d[1],m=()=>Eo.get("/admin/survey").then(e=>a(e.data)).catch(()=>a([]));(0,s.useEffect)(()=>{m()},[]);const p=e=>{const t=n.map(t=>Number(t.answers[e])).filter(e=>!Number.isNaN(e));return t.length?(t.reduce((e,t)=>e+t,0)/t.length).toFixed(1):"\u2014"};return n?(0,_e.jsxs)("div",{"data-testid":"admin-survey",children:[(0,_e.jsxs)("div",{className:"mb-8 flex flex-wrap items-end justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow mb-2",children:"Listeners"}),(0,_e.jsx)("h1",{className:"font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Survey responses"}),(0,_e.jsxs)("p",{className:"mt-2 text-sm text-slate-400",children:[n.length," response",1===n.length?"":"s"," \xb7 avg satisfaction ",p("satisfaction"),"/10 \xb7 avg recommend ",p("nps"),"/10. Toggle the popup under Homepage."]})]}),(0,_e.jsxs)("div",{className:"flex gap-2",children:[(0,_e.jsxs)(Dh,{onClick:()=>h(n[Math.floor(Math.random()*n.length)]),disabled:!n.length,variant:"outline",className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"survey-draw-winner",children:[(0,_e.jsx)(Nh,{size:15,className:"mr-2"})," Draw a winner"]}),(0,_e.jsxs)(Dh,{onClick:()=>{const e=[...new Set([...Ug.map(e=>e.id),...n.flatMap(e=>Object.keys(e.answers))])],t=e=>'"'.concat(Wg(e).replace(/"/g,'""'),'"'),a=[["submitted_at","email",...e].map(t).join(","),...n.map(n=>[n.created_at,n.email,...e.map(e=>n.answers[e])].map(t).join(","))],s=URL.createObjectURL(new Blob([a.join("\n")],{type:"text/csv"}));Object.assign(document.createElement("a"),{href:s,download:"listener-survey-".concat((new Date).toISOString().slice(0,10),".csv")}).click(),URL.revokeObjectURL(s)},disabled:!n.length,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"survey-export-csv",children:[(0,_e.jsx)(If,{size:15,className:"mr-2"})," Export CSV"]})]})]}),u&&(0,_e.jsxs)("div",{className:"mb-6 rounded-2xl border border-emerald-400/30 bg-emerald-400/10 p-4 text-sm","data-testid":"survey-winner",children:["Random draw: ",(0,_e.jsx)("strong",{children:u.email})," (submitted ",Ro(u.created_at),")"]}),(0,_e.jsx)(Ig,{rows:n}),(0,_e.jsx)("p",{className:"eyebrow mb-3",children:"Individual responses"}),(0,_e.jsxs)("div",{className:"space-y-2","data-testid":"survey-list",children:[0===n.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400","data-testid":"survey-empty",children:"No responses yet."}),n.map((e,t)=>(0,_e.jsxs)("div",{className:"card-surface rounded-2xl","data-testid":"survey-row-".concat(t),children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,_e.jsxs)("button",{onClick:()=>l(i===e.id?null:e.id),className:"flex min-w-0 flex-1 items-center gap-3 text-left","data-testid":"survey-row-toggle-".concat(t),children:[(0,_e.jsx)(mi,{size:16,className:"shrink-0 text-slate-400 transition-transform ".concat(i===e.id?"rotate-180":"")}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsx)("p",{className:"font-semibold truncate",children:e.email}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[Ro(e.created_at)," \xb7 most listened: ",Wg(e.answers.show_most)||"\u2014"," \xb7 satisfaction ",Wg(e.answers.satisfaction)||"\u2014"," \xb7 recommend ",Wg(e.answers.nps)||"\u2014"]})]})]}),(0,_e.jsx)("button",{onClick:()=>(async e=>{if(window.confirm("Delete the response from ".concat(e.email,"?")))try{await Eo.delete("/admin/survey/".concat(e.id)),Ta.success("Deleted"),m()}catch(lS){Ta.error(Mo(lS))}})(e),className:"p-2 text-slate-400 hover:text-rose-400","data-testid":"survey-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:16})})]}),i===e.id&&(0,_e.jsx)("dl",{className:"border-t border-white/10 px-4 py-3 grid sm:grid-cols-2 gap-x-6 gap-y-2 text-sm","data-testid":"survey-row-detail-".concat(t),children:Object.entries(e.answers
2).map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsxs)("div",{children:[(0,_e.jsx)("dt",{className:"text-xs text-slate-500",children:Bg(n)}),(0,_e.jsx)("dd",{className:"text-slate-200",children:Wg(a)||"\u2014"})]},n)})})]},e.id))]})]}):null}const Hg=Jo("gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]),Vg=e=>"rounded-full border px-3.5 py-1.5 text-sm text-left transition-colors ".concat(e?"border-sky-400 bg-sky-400/15 text-white":"border-white/15 bg-white/[0.03] text-slate-300 hover:bg-white/10"),Yg=e=>{let t=e.q,n=e.answers,a=e.onChange,s=e.shows,r=e.error;const o=n[t.id],i="shows"===t.source?s.map(e=>e.name):t.options||[],l="".concat(t.id,"_other"),c=t.other&&(Array.isArray(o)?o.includes("Other"):"Other"===o);return(0,_e.jsxs)("div",{className:"py-5 border-b border-white/10 last:border-0","data-testid":"survey-q-".concat(t.id),children:[(0,_e.jsxs)("p",{className:"font-semibold text-base",children:[t.label,t.required&&(0,_e.jsx)("span",{className:"text-sky-400",children:" *"})]}),t.help&&(0,_e.jsxs)("p",{className:"mt-1 text-xs text-slate-400",children:[t.help,t.max&&Array.isArray(o)&&o.length?" (".concat(o.length,"/").concat(t.max,")"):""]}),(0,_e.jsxs)("div",{className:"mt-3 ".concat("scale"===t.type||t.inline||i.length<=6?"flex flex-wrap gap-2":"grid sm:grid-cols-2 gap-2"),children:["multi"===t.type&&i.map(e=>(0,_e.jsx)("button",{type:"button",onClick:()=>(e=>{const n=Array.isArray(o)?o:[];if(n.includes(e))return a(t.id,n.filter(t=>t!==e));t.max&&n.length>=t.max||a(t.id,[...n,e])})(e),className:Vg((o||[]).includes(e)),"data-testid":"survey-opt-".concat(t.id,"-").concat(e),children:e},e)),"single"===t.type&&i.map(e=>(0,_e.jsx)("button",{type:"button",onClick:()=>a(t.id,e),className:Vg(o===e),"data-testid":"survey-opt-".concat(t.id,"-").concat(e),children:e},e)),"scale"===t.type&&Array.from({length:t.max-t.min+1},(e,n)=>t.min+n).map(e=>(0,_e.jsx)("button",{type:"button",onClick:()=>a(t.id,e),className:"h-10 w-10 rounded-full border text-sm font-bold transition-colors ".concat(o===e?"border-sky-400 bg-sky-4
200 text-[#070F1E]":"border-white/15 bg-white/[0.03] text-slate-300 hover:bg-white/10"),"data-testid":"survey-opt-".concat(t.id,"-").concat(e),children:e},e)),"text"===t.type&&(0,_e.jsx)(am,{rows:4,value:o||"",onChange:e=>a(t.id,e.target.value),className:"bg-white/5 border-white/10","data-testid":"survey-input-".concat(t.id)}),"short"===t.type&&(0,_e.jsx)(Gh,{value:o||"",onChange:e=>a(t.id,e.target.value),className:"bg-white/5 border-white/10 sm:max-w-sm","data-testid":"survey-input-".concat(t.id)})]}),c&&(0,_e.jsx)(Gh,{value:n[l]||"",placeholder:"Please specify\u2026",onChange:e=>a(l,e.target.value),className:"mt-3 bg-white/5 border-white/10 sm:max-w-sm","data-testid":"survey-input-".concat(l)}),r&&(0,_e.jsx)("p",{className:"mt-2 text-xs text-rose-400","data-testid":"survey-error-".concat(t.id),children:r})]})};function $g(){const e=qo().homepage,t=en(),n=(0,s.useState)([]),a=(0,De.A)(n,2),r=a[0],o=a[1],l=(0,s.useState)(0),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)({}),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(0,s.useState)(""),x=(0,De.A)(g,2),v=x[0],b=x[1],y=(0,s.useState)({}),w=(0,De.A)(y,2),j=w[0],k=w[1],N=(0,s.useState)(!1),S=(0,De.A)(N,2),A=S[0],_=S[1],C=(0,s.use
2State)(!1),E=(0,De.A)(C,2),P=E[0],M=E[1];(0,s.useEffect)(()=>{Eo.get("/shows").then(e=>{const t=new Set;o(e.data.filter(e=>!1!==e.active&&"tiktok"!==e.kind&&!t.has(e.name)&&t.add(e.name)).sort((e,t)=>e.name.replace(/^the\s+/i,"").localeCompare(t.name.replace(/^the\s+/i,""))))}).catch(()=>{}),window.scrollTo(0,0)},[]),(0,s.useEffect)(()=>{window.scrollTo({top:0,behavior:"smooth"})},[d]);const R=(0,s.useMemo)(()=>[...Tg,{id:"email",title:"Enter the drawing"}],[]),O=R[d],z=(e,t)=>{f(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t})),k(t=>(0,i.A)((0,i.A)({},t),{},{[e]:void 0}))},T=e.survey_prize||"$100";return(0,_e.jsxs)("div",{className:"min-h-screen","data-testid":"survey-page",children:[(0,_e.jsx)(Ni,{}),(0,_e.jsx)("main",{className:"max-w-3xl mx-auto px-5 sm:px-8 py-12",children:P?(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-10 text-center reveal","data-testid":"survey-done",children:[(0,_e.jsx)("span",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full bg-emerald-400/15 text-emerald-300",children:(0,_e.jsx)(Mi,{size:30})}),(0,_e.jsx)("h1",{className:"mt-6 font-display text-3xl sm:text-4xl font-black tracking-tight",children:"You're entered!"}),(0,_e.jsxs)("p",{className:"mt-3 text-slate-400",children:["Thanks for helping shape Underdog Podcasts. If your name is drawn for the ",T," prize we'll reach out at the email you provided \u2014 and that's the only time you'll hear from us."]}),(0,_e.jsx)(Dh,{onClick:()=>t("/"),className:"mt-8 rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"survey-done-home",children:"Back to the shows"})]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3 text-sky-300",children:[(0,_e.jsx)(Hg,{size:18}),(0,_e.jsxs)("p",{className:"eyebrow",children:["Listener survey \xb7 win ",T]})]}),(0,_e.jsx)("h1",{className:"mt-2 font-display text-3xl sm:text-5xl font-black tracking-tight","data-testid":"survey-title",children:"Help us make better shows."}),(0,_e.jsxs)("p",{className:"mt-3 text-slate-400",children:["About 5 minutes. Complete it and you're entered to win ",T,"."]}),(0,_e.jsx)("div",{className:"mt-8 flex items-center gap-2","data-testid":"survey-progress",children:R.map((e,t)=>(0,_e.jsx)("span",{className:"h-1.5 flex-1 rounded-full transition-colors ".concat(t<=d?"bg-sky-400":"bg-white/10")},e.id))}),(0,_e.jsxs)("p",{className:"mt-2 text-xs text-slate-500",children:["Step ",d+1," of ",R.length," \xb7 ",(0,_e.jsx)("span",{className:"text-slate-300",children:O.title})]}),(0,_e.jsxs)("div",{className:"mt-6 card-surface rounded-3xl p-6 sm:p-8","data-testid":"survey-step-".concat(O.id),children:[O.help&&(0,_e.jsx)("p",{className:"text-sm text-slate-400 mb-2",children:O.help}),"email"===O.id?(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),_(!0);try{await Eo.post("/survey",{email:v,answers:p}),localStorage.setItem("ud-survey","done"),M(!0)}catch(cS){Ta.error(Mo(cS))}finally{_(!1)}},"data-testid":"survey-email-form",children:[(0,_e.jsx)("h2",{className:"font-display text-xl font-extrabold",children:"Last step \u2014 where should we reach you if you win?"}),(0,_e.jsxs)("div",{className:"mt-5",children:[(0,_e.jsx)(tm,{htmlFor:"survey-email",children:"Email address *"}),(0,_e.jsx)(Gh,{id:"survey-email",type:"email",required:!0,value:v,onChange:e=>b(e.target.value),placeholder:"[email protected]",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"survey-email-input"})]}),(0,_e.jsxs)("p",{className:"mt-3 rounded-xl bg-white/[0.04] border border-white/10 p-3 text-xs text-slate-300","data-testid":"survey-email-note",children:[(0,_e.jsx)("strong",{className:"text-white",children:"You are not joining a mailing list."})," Your email is used only to contact you if you're chosen at random as the winner \u2014 that's the only time you'll ever hear from us."]}),(0,_e.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3",children:[(0,_e.jsxs)(Dh,{type:"button",variant:"ghost",onClick:()=>u(e=>e-1),"data-testid":"survey-back",children:[(0,_e.jsx)(_h,{size:15,className:"mr-1"})," Back"]}),(0,_e.jsx)(Dh,{type:"submit",disabled:A,className:"rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300 px-6","data-testid":"survey-submit",children:A?"Submitting\u2026":"Submit & enter the drawing"})]})]}):(0,_e.jsxs)(_e.Fragment,{children:[O.questions.map(e=>(0,_e.jsx)(Yg,{q:e,answers:p,onChange:z,shows:r,error:j[e.id]},e.id)),(0,_e.jsxs)("div",{className:"mt-6 flex items-center justify-between gap-3",children:[d>0?(0,_e.jsxs)(Dh,{type:"button",variant:"ghost",onClick:()=>u(e=>e-1),"data-testid":"survey-back",children:[(0,_e.jsx)(_h,{size:15,className:"mr-1"})," Back"]}):(0,_e.jsx)(da,{to:"/",className:"text-sm text-slate-400 hover:text-white","data-testid":"survey-cancel",children:"Maybe later"}),(0,_e.jsxs)(Dh,{type:"button",onClick:()=>{(()=>{const e={};return(O.questions||[]).forEach(t=>{const n=p[t.id];t.required&&(void 0===n||""===n||Array.isArray(n)&&!n.length)&&(e[t.id]="Please answer this question.")}),k(e),!Object.keys(e).length})()&&u(e=>e+1)},className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300 px-6","data-testid":"survey-next",children:["Continue ",(0,_e.jsx)(yh,{size:15,className:"ml-1"})]})]})]})]})]})}),(0,_e.jsx)(Ai,{})]})}const Qg="ud-survey",Kg="ud-survey-snooze",Gg=()=>
2{const e=qo().homepage,t=Xt().pathname,n=(0,s.useState)(!1),a=(0,De.A)(n,2),r=a[0],o=a[1];(0,s.useEffect)(()=>{if(!1===e.survey_enabled)return;if(t.startsWith("/admin")||t.startsWith("/publish")||t.startsWith("/survey")||t.startsWith("/reset-password")||t.startsWith("/forgot-password"))return;const n=localStorage.getItem(Qg);if("done"===n||"never"===n)return;if(Number(localStorage.getItem(Kg)||0)>Date.now())return;const a=setTimeout(()=>o(!0),2500);return()=>clearTimeout(a)},[e.survey_enabled,t]);const i=()=>{localStorage.setItem(Kg,String(Date.now()+6048e5)),o(!1)};if(!r)return null;const l=e.survey_prize||"$100";return(0,_e.jsx)("div",{className:"fixed bottom-5 right-5 left-5 sm:left-auto sm:w-[380px] z-[60] reveal",role:"dialog","aria-label":"Listener survey","data-testid":"survey-popup",children:(0,_e.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-sky-400/30 bg-[#071A38] shadow-2xl shadow-black/50",children:[(0,_e.jsx)("div",{className:"absolute -top-16 -right-16 h-48 w-48 rounded-full bg-sky-400/25 blur-3xl"}),(0,_e.jsx)("div",{className:"absolute -bottom-20 -left-10 h-40 w-40 rounded-full bg-rose-500/20 blur-3xl"}),(0,_e.jsx)("button",{onClick:i,className:"absolute top-3 right-3 z-10 rounded-full p-1.5 text-slate-300 hover:bg-white/10 hover:text-white","aria-label":"Close","data-testid":"survey-popup-close",children:(0,_e.jsx)(ai,{size:16})}),(0,_e.jsxs)("div",{className:"relative p-6",children:[(0,_e.jsxs)("div",{className:"flex items-start gap-4",children:[(0,_e.jsxs)("div",{className:"relative shrink-0",children:[(0,_e.jsx)("span",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-sky-400 to-sky-600 text-[#070F1E] shadow-lg shadow-sky-500/30 rotate-[-6deg]",children:(0,_e.jsx)(Hg,{size:30,strokeWidth:2.2})}),(0,_e.jsxs)("span",{className:"absolute -bottom-2 -right-3 rounded-full bg-rose-500 px-2 py-0.5 font-display text-xs font-black text-white shadow","data-testid":"survey-popup-prize",children:["WIN ",l]})]}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-1.5 text-sky-300",children:[(0,_e.jsx)(Ff,{size:12})," Listener survey"]}),(0,_e.jsx)("h3",{className:"mt-1 font-display text-lg font-extrabold leading-snug","data-testid":"survey-popup-headline",children:e.survey_headline||"Take our listener survey for the chance to win ".concat(l)}),(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"About 5 minutes. Help shape the shows you love."})]})]}),(0,_e.jsx)(da,{to:"/survey",onClick:()=>o(!1),className:"mt-5 flex w-full items-center justify-center rounded-full bg-sky-400 py-2.5 text-sm font-bold text-[#070F1E] hover:bg-sky-300 transition-colors","data-testid":"survey-popup-cta",children:"Take the survey"}),(0,_e.jsxs)("div",{className:"mt-3 flex items-center justify-between text-xs",children:[(0,_e.jsx)("button",{onClick:i,className:"text-slate-400 hover:text-white","data-testid":"survey-popup-later",children:"Maybe later"}),(0,_e.jsx)("button",{onClick:()=>{localStorage.setItem(Qg,"never"),o(!1)},className:"text-slate-500 hover:text-slate-300 underline-offset-2 hover:underline","data-testid":"survey-popup-never",children:"Never show me this again"})]})]})]})})},Xg=["/admin","/publish","/survey","/forgot-password","/reset-password","/privacy"];function Jg(e){let t=e.children;const n=Lo().user,a=Xt().pathname,r=(0,s.useState)(null),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(0),d=(0,De.A)(c,2),u=d[0],h=d[1],m=()=>Eo.get("/launch").then(e=>{l(e.data),h(new Date(e.data.now).getTime()-Date.now())}).catch(()=>l({gated:!1}));(0,s.useEffect)(()=>{m()},[]);const p=Xg.some(e=>a===e||a.startsWith("".concat(e,"/")));return i?i.gated?p?t:null===n?null:n?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(Zg,{launchAt:i.launch_at}),t]}):(0,_e.jsx)(tx,{launchAt:i.launch_at,offset:u,onReached:m}):t:p?t:null}const Zg=e=>{let t=e.launchAt;return(0,_e.jsxs)("div",{className:"sticky top-0 z-[60] bg-amber-400 text-[#070F1E] text-xs sm:text-sm font-semibold text-center px-4 py-2","data-testid":"launch-preview-banner",children:[(0,_e.jsx)(ig,{size:13,className:"inline -mt-0.5 mr-1.5"}),"Launch gate is on \u2014 you're previewing as a team member. Visitors see the countdown",t?" until ".concat(Mf(t)):"",". ",(0,_e.jsx)(da,{to:"/admin/settings",className:"underline ml-1",children:"Change"})]})},ex=e=>String(Math.max(0,e)).padStart(2,"0");function tx(e){let t=e.launchAt,n=e.offset,a=e.onReached;
2const r=(0,s.useState)(()=>nx(t,n)),o=(0,De.A)(r,2),i=o[0],l=o[1];(0,s.useEffect)(()=>{const e=setInterval(()=>{const s=nx(t,n);l(s),t&&s.total<=0&&(clearInterval(e),a())},1e3);return()=>clearInterval(e)},[t,n,a]);const c=[["Days",i.d],["Hours",i.h],["Minutes",i.m],["Seconds",i.s]];return(0,_e.jsxs)("div",{className:"min-h-screen bg-[#050B17] text-white flex flex-col grain relative overflow-hidden","data-testid":"launch-gate",children:[(0,_e.jsx)("div",{className:"absolute inset-0 pointer-events-none",style:{background:"radial-gradient(ellipse at 20% 0%, rgba(56,189,248,0.18), transparent 55%), radial-gradient(ellipse at 90% 100%, rgba(5,54,113,0.6), transparent 60%)"}}),(0,_e.jsx)("main",{className:"relative flex-1 flex items-center",children:(0,_e.jsxs)("div",{className:"max-w-[1400px] w-full mx-auto px-6 sm:px-10 py-16 grid lg:grid-cols-[1.1fr_1fr] gap-14 items-center",children:[(0,_e.jsxs)("div",{className:"reveal",children:[(0,_e.jsx)(hi,{size:72}),(0,_e.jsxs)("p",{className:"eyebrow mt-10 flex items-center gap-2",children:[(0,_e.jsx)(Ff,{size:12})," Launching soon"]}),(0,_e.jsxs)("h1",{className:"mt-4 font-display text-4xl sm:text-5xl lg:text-6xl font-black tracking-tight leading-[1.02]","data-testid":"launch-gate-title",children:["Underdog Podcasts",(0,_e.jsx)("br",{}),"launches at ",(0,_e.jsx)("span",{className:"text-sky-400",children:t?Mf(t):"a time to be announced"})]}),(0,_e.jsx)("p",{className:"mt-6 text-base md:text-lg text-slate-300 max-w-xl",children:"The home of the Underdog Podcast Network \u2014 every show, every host, every episode in one place. We're putting the finishing touches on it now."}),(0,_e.jsxs)("div",{className:"mt-10 flex flex-wrap items-center gap-4",children:[(0,_e.jsxs)(da,{to:"/survey",className:"inline-flex items-center gap-2 rounded-full bg-sky-400 px-6 py-3 text-sm font-bold text-[#070F1E] hover:bg-sky-300 transition-colors","data-testid":"launch-gate-survey-link",children:[(0,_e.jsx)(Bp,{size:16})," Take the listener survey"]}),(0,_e.jsx)("span",{className:"text-xs text-slate-400",children:"About 5 minutes \xb7 chance to win $100"})]})]}),(0,_e.jsx)("div",{className:"reveal",style:{animationDelay:"120ms"},children:(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-8 sm:p-10 shadow-2xl shadow-black/50",children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Countdown"}),(0,_e.jsx)("div",{className:"mt-6 grid grid-cols-4 gap-3 sm:gap-4","data-testid":"launch-gate-countdown",children:c.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsxs)("div",{className:"rounded-2xl bg-white/5 border border-white/10 py-5 text-center",children:[(0,_e.jsx)("p",{className:"font-display text-3xl sm:text-5xl font-black tabular-nums","data-testid":"launch-gate-".concat(n.toLowerCase()),children:ex(a)}),(0,_e.jsx)("p",{className:"mt-1 text-[10px] sm:text-xs font-mono uppercase tracking-widest text-slate-400",children:n})]},n)})}),(0,_e.jsx)("p",{className:"mt-6 text-xs text-slate-500",children:t?"Doors open automatically \u2014 no refresh needed.":"Check back soon."})]})})]})}),(0,_e.jsxs)("footer",{className:"relative px-6 sm:px-10 py-6 flex items-center justify-between text-xs text-slate-500",children:[(0,_e.jsxs)("span",{children:["\xa9 ",(new Date).getFullYear()," Underdog Podcasts"]}),(0,_e.jsx)(da,{to:"/admin/login",className:"hover:text-slate-300","data-testid":"launch-gate-team-login",children:"Team sign in"})]})]})}function nx(e,t){const n=e?new Date(e).getTime()-(Date.now()+t):0,a=Math.max(0,Math.floor(n/1e3));return{total:n,d:Math.floor(a/86400),h:Math.floor(a%86400/3600),m:Math.floor(a%3600/60),s:a%60}}const ax=Jo("file-audio",[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]]),sx=5242880,rx=e=>new Promise(t=>setTimeout(t,e)),ox=e=>!(null!==e&&void 0!==e&&e.response)||e.response.status>=500;async function ix(e,t){for(let n=1;;n++)try{return await e()}catch(lS){if(n>4||!ox(lS))throw lS;null===t||void 0===t||t(n),await rx(Math.min(8e3,1e3*2**(n-1)))}}const lx=e=>{const t=Math.round(e||0),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n?"".concat(n,":").concat(String(a).padStart(2,"0"),":").concat(String(s).padStart(2,"0")):"".concat(a,":").concat(String(s).padStart(2,"0"))},cx=e=>
2{let t=e.value,n=e.onChange,a=e.testId,r=void 0===a?"audio-upload":a;const o=(0,s.useRef)(null),i=(0,s.useState)(null),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useState)(null),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(!1),g=(0,De.A)(f,2),x=g[0],v=g[1],b=async e=>{if(!e)return;if(!(/\.(mp3|m4a|wav)$/i.test(e.name)||e.type.startsWith("audio/")))return Ta.error("Please choose an audio file (MP3 recommended)");if(e.size>157286400)return Ta.error("Audio must be under 150 MB \u2014 Acast's limit. Try exporting at 128 kbps.");d(0);try{const t=(e=>new Promise(t=>{const n=URL.createObjectURL(e),a=document.createElement("audio");a.preload="metadata";const s=e=>{URL.revokeObjectURL(n),t(e)};a.onloadedmetadata=()=>s(Number.isFinite(a.duration)?a.duration:null),a.onerror=()=>s(null),a.src=n}))(e),a=(await Eo.post("/portal/uploads/init",{filename:e.name,size:e.size,content_type:e.type||"audio/mpeg"})).data,s=Math.ceil(e.size/sx);for(let n=0;n<s;n++)await ix(()=>{const t=new FormData;return t.append("index",n),t.append("chunk",e.slice(n*sx,Math.min(e.size,(n+1)*sx))),Eo.post("/portal/uploads/".concat(a.upload_id,"/chunk"),t,{timeout:12e4,onUploadProgress:t=>d(Math.min(99,Math.round((n*sx+t.loaded)/e.size*100)))})},e=>p({part:n+1,total:s,attempt:e})),p(null);const r=(await ix(()=>Eo.post("/portal/uploads/".concat(a.upload_id,"/complete"),null,{timeout:3e5}),e=>p({part:s,total:s,attempt:e,finishing:!0}))).data,o=await t||r.duration||null;n({upload_id:a.upload_id,filename:e.name,size:e.size,duration:o}),Ta.success("Audio uploaded")}catch(lS){Ta.error("".concat(Mo(lS)," \u2014 the upload was retried ").concat(4," times. Check your connection and try again."))}finally{d(null),p(null)}};return t?(0,_e.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-emerald-400/30 bg-emerald-400/10 p-3","data-testid":"".concat(r,"-done"),children:[(0,_e.jsx)(ax,{size:20,className:"text-emerald-300 shrink-0"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate",children:t.filename}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400",children:[(y=t.size,"".concat((y/1048576).toFixed(1)," MB")),t.duration?(0,_e.jsxs)(_e.Fragment,{children:[" \xb7 ",(0,_e.jsx)("span",{"data-testid":"".concat(r,"-duration"),children:lx(t.duration)})]}):""," \xb7 uploaded"]})]}),(0,_e.jsx)("button",{type:"button",onClick:()=>n(null),className:"p-1.5 text-slate-400 hover:text-rose-400","aria-label":"Remove audio","data-testid":"".concat(r,"-remove"),children:(0,_e.jsx)(ai,{size:16})})]}):(0,_e.jsxs)("div",{"data-testid":r,children:[(0,_e.jsx)("button",{type:"button",onClick:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.click()},disabled:null!==c,onDragOver:e=>{e.preventDefault(),v(!0)},onDragLeave:()=>v(!1),onDrop:e=>{var t;e.preventDefault(),v(!1),b(null===(t=e.dataTransfer.files)||void 0===t?void 0:t[0])},className:"w-full rounded-xl border-2 border-dashed p-6 text-center transition-colors ".concat(x?"border-sky-400 bg-sky-4
200/10":"border-white/15 bg-white/[0.03] hover:border-sky-400/60"),"data-testid":"".concat(r,"-dropzone"),children:null===c?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(af,{size:22,className:"mx-auto text-sky-300"}),(0,_e.jsx)("p",{className:"mt-2 text-sm font-semibold",children:"Drop your MP3 here or click to choose"}),(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-500",children:"MP3 at ~128 kbps \xb7 up to 150 MB"})]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)("p",{className:"text-sm font-semibold",children:m?m.finishing?"Finishing up \u2014 retrying (attempt ".concat(m.attempt+1," of ").concat(5,")\u2026"):"Connection hiccup \u2014 retrying part ".concat(m.part," of ").concat(m.total," (attempt ").concat(m.attempt+1," of ").concat(5,")\u2026"):"Uploading\u2026 ".concat(c,"%")}),(0,_e.jsx)("div",{className:"mt-3 h-2 w-full rounded-full bg-white/10 overflow-hidden",children:(0,_e.jsx)("div",{className:"h-full transition-[width] ".concat(m?"bg-amber-400":"bg-sky-400"),style:{width:"".concat(c,"%")},"data-testid":"".concat(r,"-progress")})}),m&&(0,_e.jsx)("p",{className:"mt-2 text-xs text-amber-300","data-testid":"".concat(r,"-retrying"),children:"Hang tight \u2014 we'll keep trying for a bit before giving up."})]})}),(0,_e.jsx)("input",{ref:o,type:"file",accept:"audio/*,.mp3,.m4a,.wav",className:"hidden",onChange:e=>{var t;b(null===(t=e.target.files)||void 0===t?void 0:t[0]),e.target.value=""},"data-testid":"".concat(r,"-input")})]});var y},dx=Jo("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]),ux=e=>{let t=e.member,n=e.onSaved;const a=(0,s.useState)((null===t||void 0===t?void 0:t.bio)||""),r=(0,De.A)(a,2),o=r[0],i=r[1],l=(0,s.useState)((null===t||void 0===t?void 0:t.image_url)||""),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1];if((0,s.useEffect)(()=>{i((null===t||void 0===t?void 0:t.bio)||""),u((null===t||void 0===t?void 0:t.image_url)||"")},[t]),!t)return null;const g=o!==(t.bio||"")||d!==(t.image_url||"");return(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-5","data-testid":"host-profile-card",children:[(0,_e.jsxs)("p",{className:"eyebrow mb-3 flex items-center gap-1.5",children:[(0,_e.jsx)(dx,{size:12})," Your profile"]}),(0,_e.jsxs)("div",{className:"flex flex-col items-center",children:[(0,_e.jsx)(rf,{value:d,onChange:e=>u(e||""),endpoint:"/portal/upload-photo",testId:"host-profile-photo",allowUrl:!1,hint:!1}),(0,_e.jsx)("p",{className:"mt-3 font-display font-bold","data-testid":"host-profile-name",children:t.name}),(0,_e.jsx)("p",{className:"text-xs text-slate-400",children:t.role})]}),(0,_e.jsxs)("div",{className:"mt-4",children:[(0,_e.jsx)(tm,{children:"Bio"}),(0,_e.jsx)(am,{value:o,onChange:e=>i(e.target.value),rows:5,maxLength:2e3,placeholder:"Tell listeners who you are \u2014 shown on your host page.",className:"mt-1.5 bg-white/5 border-white/10 text-sm","data-testid":"host-profile-bio"}),(0,_e.jsxs)("p",{className:"mt-1 text-right text-[11px] text-slate-500",children:[o.length,"/2000"]})]}),(0,_e.jsx)(Dh,{type:"button",onClick:async()=>{f(!0);try{const e=(await Eo.put("/portal/profile",{bio:o,image_url:d})).data;Ta.success("Profile updated"),n(e)}catch(lS){Ta.error(Mo(lS))}finally{f(!1)}},disabled:!g||p,className:"mt-2 w-full rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"host-profile-save",children:p?"Saving\u2026":"Save profile"})]})},hx=()=>{const e=(0,s.useState)(""),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(""),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(""),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useState)(!1),p=(0,De.A)(m,2),f=p[0],g=p[1],x=(0,s.useState)(!1),v=(0,De.A)(x,2),b=v[0],y=v[1];return(0,_e.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),i.length<8)return Ta.error("New password must be at least 8 characters");if(i!==u)return Ta.error("Passwords don't match");g(!0);try{await Eo.post("/auth/change-password",{current_password:n,new_password:i}),Ta.success("Password changed"),a(""),l(""),h("")}catch(cS){Ta.error(Mo(cS))}finally{g(!1)}},className:"card-surface rounded-3xl p-5 space-y-3","data-testid":"change-password-card",children:[(0,_e.jsxs)("button",{type:"button",onClick:()=>y(e=>!e),className:"w-full flex items-center justify-between gap-2 text-left","aria-expanded":b,"data-testid":"change-password-toggle",children:[(0,_e.jsxs)("span",{className:"eyebrow flex items-center gap-1.5",children:[(0,_e.jsx)(yf,{size:12})," Change password"]}),(0,_e.jsx)(mi,{size:16,className:"text-slate-400 transition-transform ".concat(b?"rotate-180":"")})]}),b&&(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Current password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{required:!0,value:n,onChange:e=>a(e.target.value),className:"bg-white/5 border-white/10",testId:"password-current-input"})})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"New password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{required:!0,minLength:8,value:i,onChange:e=>l(e.target.value),className:"bg-white/5 border-white/10",testId:"password-new-input"})})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Confirm new password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{required:!0,value:u,onChange:e=>h(e.target.value),className:"bg-white/5 border-white/10",testId:"password-confirm-input"})})]}),(0,_e.jsx)(Dh,{type:"submit",disabled:f,variant:"outline",className:"w-full rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"password-save-button",children:f?"
2Saving\u2026":"Update password"})]})]})},mx=(Math.pow(10,8),6048e5),px=Symbol.for("constructDateFrom");function fx(e,t){return"function"===typeof e?e(t):e&&"object"===typeof e&&px in e?e[px](t):e instanceof Date?new e.constructor(t):new Date(t)}function gx(e,t){return fx(t||e,e)}function xx(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in);return a.setMinutes(t),a}function vx(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in);return a.setHours(t),a}function bx(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in);return n.setHours(0,0,0,0),n}const yx={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function wx(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const jx={date:wx({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:wx({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:wx({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},kx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Nx(e){return(t,n)=>{let a;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):t;a=e.formattingValues[s]||e.formattingValues[t]}else{const t=e.defaultWidth,s=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;a=e.values[s]||e.values[t]}return a[e.argumentCallback?e.argumentCallback(t):t]}}const Sx={ordinalNumber:(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Nx({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Nx({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Nx({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Nx({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Nx({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Ax(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=n.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],r=t.match(s);if(!r)return null;const o=r[0],i=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(i,e=>e.test(o)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(i,e=>e.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(o.length)}}}const _x={ordinalNumber:(Cx={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.match(Cx.matchPattern);if(!n)return null;const a=n[0],s=e.match(Cx.parsePattern);if(!s)return null;let r=Cx.valueCallback?Cx.valueCallback(s[0]):s[0];return r=t.valueCallback?t.valueCallback(r):r,{value:r,rest:e.slice(a.length)}}),era:Ax({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ax({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ax({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ax({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ax({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Cx;const Ex={code:"en-US",formatDistance:(e,t,n)=>{let a;const s=yx[e];
2return a="string"===typeof s?s:1===t?s.one:s.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},formatLong:jx,formatRelative:(e,t,n,a)=>kx[e],localize:Sx,match:_x,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Px={};function Mx(){return Px}function Rx(e){const t=gx(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Ox(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];const s=fx.bind(null,e||n.find(e=>"object"===typeof e));return n.map(s)}function zx(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1],i=bx(r),l=bx(o),c=+i-Rx(i),d=+l-Rx(l);return Math.round((c-d)/864e5)}function Tx(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Dx(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in);return zx(n,Tx(n))+1}function Lx(e,t){var n,a,s,r,o,i;const l=Mx(),c=null!==(n=null!==(a=null!==(s=null!==(r=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==r?r:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.weekStartsOn)&&void 0!==s?s:l.weekStartsOn)&&void 0!==a?a:null===(i=l.locale)||void 0===i||null===(i=i.options)||void 0===i?void 0:i.weekStartsOn)&&void 0!==n?n:0,d=gx(e,null===t||void 0===t?void 0:t.in),u=d.getDay(),h=(u<c?7:0)+u-c;return d.setDate(d.getDate()-h),d.setHours(0,0,0,0),d}function Fx(e,t){return Lx(e,(0,i.A)((0,i.A)({},t),{},{weekStartsOn:1}))}function Ix(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=n.getFullYear(),s=fx(n,0);s.setFullYear(a+1,0,4),s.setHours(0,0,0,0);const r=Fx(s),o=fx(n,0);o.setFullYear(a,0,4),o.setHours(0,0,0,0);const i=Fx(o);return n.getTime()>=r.getTime()?a+1:n.getTime()>=i.getTime()?a:a-1}function Ux(e,t){const n=Ix(e,t),a=fx((null===t||void 0===t?void 0:t.in)||e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),Fx(a)}function Bx(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=+Fx(n)-+Ux(n);return Math.round(a/mx)+1}function Wx(e,t){var n,a,s,r,o,i;const l=gx(e,null===t||void 0===t?void 0:t.in),c=l.getFullYear(),d=Mx(),u=null!==(n=null!==(a=null!==(s=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==a?a:null===(i=d.locale)||void 0===i||null===(i=i.options)||void 0===i?void 0:i.firstWeekContainsDate)&&void 0!==n?n:1,h=fx((null===t||void 0===t?void 0:t.in)||e,0);h.setFullYear(c+1,0,u),h.setHours(0,0,0,0);const m=Lx(h,t),p=fx((null===t||void 0===t?void 0:t.in)||e,0);p.setFullYear(c,0,u),p.setHours(0,0,0,0);const f=Lx(p,t);return+l>=+m?c+1:+l>=+f?c:c-1}function qx(e,t){var n,a,s,r,o,i;const l=Mx(),c=null!==(n=null!==(a=null!==(s=null!==(r=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==r?r:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==s?s:l.firstWeekContainsDate)&&void 0!==a?a:null===(i=l.locale)||void 0===i||null===(i=i.options)||void 0===i?void 0:i.firstWeekContainsDate)&&void 0!==n?n:1,d=Wx(e,t),u=fx((null===t||void 0===t?void 0:t.in)||e,0);u.setFullYear(d,0,c),u.setHours(0,0,0,0);return Lx(u,t)}function Hx(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=+Lx(n,t)-+qx(n,t);return Math.round(a/mx)+1}function Vx(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Yx={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Vx("yy"===t?a%100:a,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Vx(n+1,2)},d:(e,t)=>Vx(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Vx(e.getHours()%12||12,t.length),H:(e,t)=>Vx(e.getHours(),t.length),m:(e,t)=>
vendor: 4,737 bytes, line 2
2Vx(e.getMinutes(),t.length),s:(e,t)=>Vx(e.getSeconds(),t.length),S(e,t){const n=t.length,a=e.getMilliseconds();return Vx(Math.trunc(a*Math.pow(10,n-3)),t.length)}},$x="midnight",Qx="noon",Kx="morning",Gx="afternoon",Xx="evening",Jx="night",Zx={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),a=t>0?t:1-t;return n.ordinalNumber(a,{unit:"year"})}return Yx.y(e,t)},Y:function(e,t,n,a){const s=Wx(e,a),r=s>0?s:1-s;if("YY"===t){return Vx(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):Vx(r,t.length)},R:function(e,t){return Vx(Ix(e),t.length)},u:function(e,t){return Vx(e.getFullYear(),t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Vx(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Vx(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return Yx.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return Vx(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const s=Hx(e,a);return"wo"===t?n.ordinalNumber(s,{unit:"week"}):Vx(s,t.length)},I:function(e,t,n){const a=Bx(e);return"Io"===t?n.ordinalNumber(a,{unit:"week"}):Vx(a,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Yx.d(e,t)},D:function(e,t,n){const a=Dx(e);return"Do"===t?n.ordinalNumber(a,{unit:"dayOfYear"}):Vx(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const s=e.getDay(),r=(s-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return Vx(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const s=e.getDay(),r=(s-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return Vx(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),s=0===a?7:a;switch(t){case"i":return String(s);case"ii":return Vx(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let s;switch(s=12===a?Qx:0===a?$x:a/12>
2=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let s;switch(s=a>=17?Xx:a>=12?Gx:a>=4?Kx:Jx,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Yx.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Yx.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return"Ko"===t?n.ordinalNumber(a,{unit:"hour"}):Vx(a,t.length)},k:function(e,t,n){let a=e.getHours();return 0===a&&(a=24),"ko"===t?n.ordinalNumber(a,{unit:"hour"}):Vx(a,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Yx.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Yx.s(e,t)},S:function(e,t){return Yx.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return tv(a);case"XXXX":case"XX":return nv(a);default:return nv(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return tv(a);case"xxxx":case"xx":return nv(a);default:return nv(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ev(a,":");default:return"GMT"+nv(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ev(a,":");default:return"GMT"+nv(a,":")}},t:function(e,t,n){return Vx(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Vx(+e,t.length)}};function ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",a=Math.abs(e),s=Math.trunc(a/60),r=a%60;return 0===r?n+String(s):n+String(s)+t+Vx(r,2)}function tv(e,t){if(e%60===0){return(e>0?"-":"+")+Vx(Math.abs(e)/60,2)}return nv(e,t)}function nv(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",a=Math.abs(e);return n+Vx(Math.trunc(a/60),2)+t+Vx(a%60,2)}const av=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},sv=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},rv={p:sv,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],s=n[2];if(!s)return av(e,t);let r;switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",av(a,t)).replace("{{time}}",sv(s,t))}},ov=/^D+$/,iv=/^Y+$/,lv=["D","DD","YY","YYYY"];function cv(e){return e instanceof Date||"object"===typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function dv(e){return!(!cv(e)&&"number"!==typeof e||isNaN(+gx(e)))}const uv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mv=/^'([^]*?)'?$/,pv=/''/g,fv=/[a-zA-Z]/;function gv(e,t,n){var a,s,r,o,i,l,c,d,u,h,m,p,f,g;const x=Mx(),v=null!==(a=null!==(s=null===n||void 0===n?void 0:n.locale)&&void 0!==s?s:x.locale)&&void 0!==a?a:Ex,b=null!==(r=null!==(o=null!==(i=null!==(l=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null===n||void 0===n||null===(c=n.locale)||void 0===c||null===(c=c.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:x.firstWeekContainsDate)&&void 0!==o?o:null===(d=x.locale)||void 0===d||null===(d=d.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:1,y=null!==(u=null!==(h=null!==(m=null!==(p=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==p?p:null===n||void 0===n||null===(f=n.locale)||void 0===f||null===(f=f.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==m?m:
2x.weekStartsOn)&&void 0!==h?h:null===(g=x.locale)||void 0===g||null===(g=g.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==u?u:0,w=gx(e,null===n||void 0===n?void 0:n.in);if(!dv(w))throw new RangeError("Invalid time value");let j=t.match(hv).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,rv[t])(e,v.formatLong)}return e}).join("").match(uv).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:xv(e)};if(Zx[t])return{isToken:!0,value:e};if(t.match(fv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});v.localize.preprocessor&&(j=v.localize.preprocessor(w,j));const k={firstWeekContainsDate:b,weekStartsOn:y,locale:v};return j.map(a=>{if(!a.isToken)return a.value;const s=a.value;(null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!function(e){return iv.test(e)}(s))&&(null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!function(e){return ov.test(e)}(s))||function(e,t,n){const a=function(e,t,n){const a="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(a," to the input `").
2concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,n);if(console.warn(a),lv.includes(e))throw new RangeError(a)}(s,t,String(e));return(0,Zx[s[0]])(w,s,v.localize,k)}).join("")}function xv(e){const t=e.match(mv);return t?t[1].replace(pv,"'"):e}function vv(e,t){return+gx(e)<+gx(t)}const bv=Jo("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),yv=Jo("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);function wv(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function jv(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(23,59,59,999),n}function kv(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1];return r.getFullYear()===o.getFullYear()}function Nv(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=n.getFullYear(),s=n.getMonth(),r=fx(n,0);return r.setFullYear(a,s+1,0),r.setHours(0,0,0,0),r.getDate()}function Sv(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in),s=a.getFullYear(),r=a.getDate(),o=fx((null===n||void 0===n?void 0:n.in)||e,0);o.setFullYear(s,t,15),o.setHours(0,0,0,0);const i=Nv(o);return a.setMonth(t,Math.min(r,i)),a}function Av(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in);return isNaN(+a)?fx((null===n||void 0===n?void 0:n.in)||e,NaN):(a.setFullYear(t),a)}function _v(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1];return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function Cv(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in);if(isNaN(t))return fx((null===n||void 0===n?void 0:n.in)||e,NaN);if(!t)return a;const s=a.getDate(),r=fx((null===n||void 0===n?void 0:n.in)||e,a.getTime());r.setMonth(a.getMonth()+t+1,0);return s>=r.getDate()?r:(a.setFullYear(r.getFullYear(),r.getMonth(),s),a)}function Ev(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1];return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Pv(e,t,n){const a=gx(e,null===n||void 0===n?void 0:n.in);return isNaN(t)?fx((null===n||void 0===n?void 0:n.in)||e,NaN):t?(a.setDate(a.getDate()+t),a):a}function Mv(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1];return+bx(r)===+bx(o)}function Rv(e,t){return+gx(e)>+gx(t)}function Ov(e,t,n){return Pv(e,-t,n)}function zv(e,t,n){return Pv(e,7*t,n)}function Tv(e,t,n){return Cv(e,12*t,n)}function Dv(e,t){var n,a,s,r,o,i;const l=Mx(),c=null!==(n=null!==(a=null!==(s=null!==(r=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==r?r:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.weekStartsOn)&&void 0!==s?s:l.weekStartsOn)&&void 0!==a?a:null===(i=l.locale)||void 0===i||null===(i=i.options)||void 0===i?void 0:i.weekStartsOn)&&void 0!==n?n:0,d=gx(e,null===t||void 0===t?void 0:t.in),u=d.getDay(),h=6+(u<c?-7:0)-(u-c);return d.setDate(d.getDate()+h),d.setHours(23,59,59,999),d}function Lv(e,t){return Dv(e,(0,i.A)((0,i.A)({},t),{},{weekStartsOn:1}))}function Fv(e,t){let n,a=null===t||void 0===t?void 0:t.in;return e.forEach(e=>{a||"object"!==typeof e||(a=fx.bind(null,e));const t=gx(e,a);(!n||n<t||isNaN(+t))&&(n=t)}),fx(a,n||NaN)}function Iv(e,t){let n,a=null===t||void 0===t?void 0:t.in;return e.forEach(e=>{a||"object"!==typeof e||(a=fx.bind(null,e));const t=gx(e,a);(!n||n>t||isNaN(+t))&&(n=t)}),fx(a,n||NaN)}function Uv(e){return Math.trunc(+gx(e)/1e3)}function Bv(e,t,n){const a=Ox(null===n||void 0===n?void 0:n.in,e,t),s=(0,De.A)(a,2),r=s[0],o=s[1],i=Lx(r,n),l=Lx(o,n),c=+i-Rx(i),d=+l-Rx(l);return Math.round((c-d)/mx)}function Wv(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(0,0,0,0),gx(n,null===t||void 0===t?void 0:t.in)}function qv(e,t){const n=gx(e,null===t||void 0===t?void 0:t.in);return Bv(Wv(n,t),wv(n,t),t)+1}var Hv=function(){return Hv=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Hv.apply(this,arguments)};function Vv(e,t,n){if(n||2===arguments.length)for(var a,s=0,r=t.length;s<r;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))}function Yv(e){return"multiple"===e.mode}function $v(e){return"range"===e.mode}function Qv(e){return"single"===e.mode}"function"===typeof SuppressedError&&SuppressedError;var Kv={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rd
2p-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var Gv=Object.freeze({__proto__:null,formatCaption:function(e,t){return gv(e,"LLLL y",t)},formatDay:function(e,t){return gv(e,"d",t)},formatMonthCaption:function(e,t){return gv(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return gv(e,"cccccc",t)},formatYearCaption:function(e,t){return gv(e,"yyyy",t)}}),Xv=Object.freeze({__proto__:null,labelDay:function(e,t,n){return gv(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return gv(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});function Jv(e){var t=e.fromYear,n=e.toYear,a=e.fromMonth,s=e.toMonth,r=e.fromDate,o=e.toDate;return a?r=wv(a):t&&(r=new Date(t,0,1)),s?o=jv(s):n&&(o=new Date(n,11,31)),{fromDate:r?bx(r):void 0,toDate:o?bx(o):void 0}}var Zv=(0,s.createContext)(void 0);function eb(e){var t,n,a=e.initialProps,s=function(){var e=Kv,t=Ex,n=new Date;return{captionLayout:"buttons",classNames:e,formatters:Gv,labels:Xv,locale:t,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:n,mode:"default"}}(),r=Jv(a),o=r.fromDate,i=r.toDate,l=null!==(t=a.captionLayout)&&void 0!==t?t:s.captionLayout;"buttons"===l||o&&i||(l="buttons"),(Qv(a)||Yv(a)||$v(a))&&(n=a.onSelect);var c=Hv(Hv(Hv({},s),a),{captionLayout:l,classNames:Hv(Hv({},s.classNames),a.classNames),components:Hv({},a.components),formatters:Hv(Hv({},s.formatters),a.formatters),fromDate:o,labels:Hv(Hv({},s.labels),a.labels),mode:a.mode||s.mode,modifiers:Hv(Hv({},s.modifiers),a.modifiers),modifiersClassNames:Hv(Hv({},s.modifiersClassNames),a.modifiersClassNames),onSelect:n,styles:Hv(Hv({},s.styles),a.styles),toDate:i});return(0,_e.jsx)(Zv.Provider,{value:c,children:e.children})}function tb(){var e=(0,s.useContext)(Zv);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function nb(e){var t=tb(),n=t.locale,a=t.classNames,s=t.styles,r=t.formatters.formatCaption;return(0,_e.jsx)("div",{className:a.caption_label,style:s.caption_label,"aria-live":"polite",role:"presentation",id:e.id,children:r(e.displayMonth,{locale:n})})}function ab(e){return(0,_e.jsx)("svg",Hv({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e,{children:(0,_e.jsx)("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function sb(e){var t,n,a=e.onChange,s=e.value,r=e.children,o=e.caption,i=e.className,l=e.style,c=tb(),d=null!==(n=null===(t=c.components)||void 0===t?void 0:t.IconDropdown)&&void 0!==n?n:ab;return(0,_e.jsxs)("div",{className:i,style:l,children:[(0,_e.jsx)("span",{className:c.classNames.vhidden,children:e["aria-label"]}),(0,_e.jsx)("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:s,onChange:a,children:r}),(0,_e.jsxs)("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[o,(0,_e.jsx)(d,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function rb(e){var t,n=tb(),a=n.fromDate,s=n.toDate,r=n.styles,o=n.locale,i=n.formatters.formatMonthCaption,l=n.classNames,c=n.components,d=n.labels.labelMonthDropdown;if(!a)return(0,_e.jsx)(_e.Fragment,{});if(!s)return(0,_e.jsx)(_e.Fragment,{});var u=[];
vendor: 2,974 bytes, line 2
2if(kv(a,s))for(var h=wv(a),m=a.getMonth();m<=s.getMonth();m++)u.push(Sv(h,m));else for(h=wv(new Date),m=0;m<=11;m++)u.push(Sv(h,m));var p=null!==(t=null===c||void 0===c?void 0:c.Dropdown)&&void 0!==t?t:sb;return(0,_e.jsx)(p,{name:"months","aria-label":d(),className:l.dropdown_month,style:r.dropdown_month,onChange:function(t){var n=Number(t.target.value),a=Sv(wv(e.displayMonth),n);e.onChange(a)},value:e.displayMonth.getMonth(),caption:i(e.displayMonth,{locale:o}),children:u.map(function(e){return(0,_e.jsx)("option",{value:e.getMonth(),children:i(e,{locale:o})},e.getMonth())})})}function ob(e){var t,n=e.displayMonth,a=tb(),s=a.fromDate,r=a.toDate,o=a.locale,i=a.styles,l=a.classNames,c=a.components,d=a.formatters.formatYearCaption,u=a.labels.labelYearDropdown,h=[];if(!s)return(0,_e.jsx)(_e.Fragment,{});if(!r)return(0,_e.jsx)(_e.Fragment,{});for(var m=s.getFullYear(),p=r.getFullYear(),f=m;f<=p;f++)h.push(Av(Tx(new Date),f));var g=null!==(t=null===c||void 0===c?void 0:c.Dropdown)&&void 0!==t?t:sb;return(0,_e.jsx)(g,{name:"years","aria-label":u(),className:l.dropdown_year,style:i.dropdown_year,onChange:function(t){var a=Av(wv(n),Number(t.target.value));e.onChange(a)},value:n.getFullYear(),caption:d(n,{locale:o}),children:h.map(function(e){return(0,_e.jsx)("option",{value:e.getFullYear(),children:d(e,{locale:o})},e.getFullYear())})})}function ib(){var e=tb(),t=function(e){var t=e.month,n=e.defaultMonth,a=e.today,s=t||n||a||new Date,r=e.toDate,o=e.fromDate,i=e.numberOfMonths,l=void 0===i?1:i;return r&&_v(r,s)<0&&(s=Cv(r,-1*(l-1))),o&&_v(s,o)<0&&(s=o),wv(s)}(e),n=function(e,t){var n=(0,s.useState)(e),a=n[0];return[void 0===t?a:t,n[1]]}(t,e.month),a=n[0],r=n[1];return[a,function(t){var n;if(!e.disableNavigation){var a=wv(t);r(a),null===(n=e.onMonthChange)||void 0===n||n.call(e,a)}}]}var lb=(0,s.createContext)(void 0);function cb(e){var t=tb(),n=ib(),a=n[0],s=n[1],r=function(e,t){for(var n=t.reverseMonths,a=t.numberOfMonths,s=wv(e),r=_v(wv(Cv(s,a)),s),o=[],i=0;i<r;i++){var l=Cv(s,i);o.push(l)}return n&&(o=o.reverse()),o}(a,t),o=function(e,t){if(!t.disableNavigation){var n=t.toDate,a=t.pagedNavigation,s=t.numberOfMonths,r=void 0===s?1:s,o=a?r:1,i=wv(e);if(!n)return Cv(i,o);if(!(_v(n,e)<r))return Cv(i,o)}}(a,t),i=function(e,t){if(!t.disableNavigation){var n=t.fromDate,a=t.pagedNavigation,s=t.numberOfMonths,r=a?void 0===s?1:s:1,o=wv(e);if(!n)return Cv(o,-r);if(!(_v(o,n)<=0))return Cv(o,-r)}}(a,t),l=function(e){return r.some(function(t){return Ev(e,t)})},c={currentMonth:a,displayMonths:r,goToMonth:s,goToDate:function(e,n){l(e)||(n&&vv(e,n)?s(Cv(e,1+-1*t.numberOfMonths)):s(e))},previousMonth:i,nextMonth:o,isDateDisplayed:l};return(0,_e.jsx)(lb.Provider,{value:c,children:e.children})}function db(){var e=(0,s.useContext)(lb);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function ub(e){var t,n=tb(),a=n.classNames,s=n.styles,r=n.components,o=db().goToMonth,i=function(t){o(Cv(t,e.displayIndex?-e.dis
2playIndex:0))},l=null!==(t=null===r||void 0===r?void 0:r.CaptionLabel)&&void 0!==t?t:nb,c=(0,_e.jsx)(l,{id:e.id,displayMonth:e.displayMonth});return(0,_e.jsxs)("div",{className:a.caption_dropdowns,style:s.caption_dropdowns,children:[(0,_e.jsx)("div",{className:a.vhidden,children:c}),(0,_e.jsx)(rb,{onChange:i,displayMonth:e.displayMonth}),(0,_e.jsx)(ob,{onChange:i,displayMonth:e.displayMonth})]})}function hb(e){return(0,_e.jsx)("svg",Hv({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,_e.jsx)("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function mb(e){return(0,_e.jsx)("svg",Hv({width:"16px",height:"16px",viewBox:"0 0 120 120"},e,{children:(0,_e.jsx)("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var pb=(0,s.forwardRef)(function(e,t){var n=tb(),a=n.classNames,s=n.styles,r=[a.button_reset,a.button];e.className&&r.push(e.className);var o=r.join(" "),i=Hv(Hv({},s.button_reset),s.button);return e.style&&Object.assign(i,e.style),(0,_e.jsx)("button",Hv({},e,{ref:t,type:"button",className:o,style:i}))});function fb(e){var t,n,a=tb(),s=a.dir,r=a.locale,o=a.classNames,i=a.styles,l=a.labels,c=l.labelPrevious,d=l.labelNext,u=a.components;if(!e.nextMonth&&!e.previousMonth)return(0,_e.jsx)(_e.Fragment,{});var h=c(e.previousMonth,{locale:r}),m=[o.nav_button,o.nav_button_previous].join(" "),p=d(e.nextMonth,{locale:r}),f=[o.nav_button,o.nav_button_next].join(" "),g=null!==(t=null===u||void 0===u?void 0:u.IconRight)&&void 0!==t?t:mb,x=null!==(n=null===u||void 0===u?void 0:u.IconLeft)&&void 0!==n?n:hb;return(0,_e.jsxs)("div",{className:o.nav,style:i.nav,children:[!e.hidePrevious&&(0,_e.jsx)(pb,{name:"previous-month","aria-label":h,className:m,style:i.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick,children:"rtl"===s?(0,_e.jsx)(g,{className:o.nav_icon,style:i.nav_icon}):(0,_e.jsx)(x,{className:o.nav_icon,style:i.nav_icon})}),!e.hideNext&&(0,_e.jsx)(pb,{name:"next-month","aria-label":p,className:f,style:i.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick,children:"rtl"===s?(0,_e.jsx)(x,{className:o.nav_icon,style:i.nav_icon}):(0,_e.jsx)(g,{className:o.nav_icon,style:i.nav_icon})})]})}function gb(e){var t=tb().numberOfMonths,n=db(),a=n.previousMonth,s=n.nextMonth,r=n.goToMonth,o=n.displayMonths,i=o.findIndex(function(t){return Ev(e.displayMonth,t)}),l=0===i,c=i===o.length-1,d=t>1&&(l||!c),u=t>1&&(c||!l);return(0,_e.jsx)(fb,{displayMonth:e.displayMonth,hideNext:d,hidePrevious:u,nextMonth:s,previousMonth:a,onPreviousClick:function(){a&&r(a)},onNextClick:function(){s&&r(s)}})}function xb(e){var t,n,a=tb(),s=a.classNames,r=a.disableNavigation,o=a.styles,i=a.captionLayout,l=a.components,c=null!==(t=null===l||void 0===l?void 0:l.CaptionLabel)&&void 0!==t?t:nb;return n=r?(0,_e.jsx)(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===i?(0,_e.jsx)(ub,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===i?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ub,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),(0,_e.jsx)(gb,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(c,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,_e.jsx)(gb,{displayMonth:e.displayMonth,id:e.id})]}),(0,_e.jsx)("div",{className:s.caption,style:o.caption,children:n})}function vb(e){var t=tb(),n=t.footer,a=t.styles,s=t.classNames.tfoot;return n?(0,_e.jsx)("tfoot",{className:s,style:a.tfoot,children:(0,_e.jsx)("tr",{children:(0,_e.jsx)("td",{colSpan:8,children:n})})}):(0,_e.jsx)(_e.Fragment,{})}function bb(){var e=tb(),t=e.classNames,n=e.styles,a=e.showWeekNumber,s=e.locale,r=e.weekStartsOn,o=e.ISOWeek,i=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,c=function(e,t,n){for(var a=n?Fx(new Date):Lx(new Date,{locale:e,weekStartsOn:t}),s=[],r=0;r<7;r++){var o=Pv(a,r);s.push(o)}return s}(s,r,o);return(0,_e.jsxs)("tr",{style:n.head_row,className:t.head_row,children:[a&&(0,_e.jsx)("td",{style:n.head_cell,className:t.head_cell}),c.map(function(e,a){return(0,_e.jsx)("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(e,{locale:s}),children:i(e,{locale:s})},a)})]})}function yb(){var e,t=tb(),n=t.classNames,a=t.styles,s=t.components,r=null!==(e=null===s||void 0===s?void 0:s.HeadRow)&&void 0!==e?e:bb;return(0,_e.jsx)("thead",{style:a.head,className:n.head,children:(0,_e.jsx)(r,{})})}function wb(e){var t=tb(),n=t.locale,a=t.formatters.formatDay;return(0,_e.jsx)(_e.Fragment,{children:a(e.date,{locale:n})})}var jb=(0,s.createContext)(void 0);function kb(e){if(!Yv(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return(0,_e.jsx)(jb.Provider,{value:t,children:e.children})}return(0,_e.jsx)(Nb,{initialProps:e.initialProps,children:e.children})}function Nb(e){var t=e.initialProps,n=e.children,a=t.selected,s=t.min,r=t.max,o={disabled:[]};a&&o.disabled.push(function(e){var t=r&&a.length>r-1,n=a.some(function(t){return Mv(t,e)});return Boolean(t&&!n)});
2var i={selected:a,onDayClick:function(e,n,o){var i,l;if((null===(i=t.onDayClick)||void 0===i||i.call(t,e,n,o),!Boolean(n.selected&&s&&(null===a||void 0===a?void 0:a.length)===s))&&!Boolean(!n.selected&&r&&(null===a||void 0===a?void 0:a.length)===r)){var c=a?Vv([],a,!0):[];if(n.selected){var d=c.findIndex(function(t){return Mv(e,t)});c.splice(d,1)}else c.push(e);null===(l=t.onSelect)||void 0===l||l.call(t,c,e,n,o)}},modifiers:o};return(0,_e.jsx)(jb.Provider,{value:i,children:n})}function Sb(){var e=(0,s.useContext)(jb);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}var Ab,_b=(0,s.createContext)(void 0);function Cb(e){if(!$v(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return(0,_e.jsx)(_b.Provider,{value:t,children:e.children})}return(0,_e.jsx)(Eb,{initialProps:e.initialProps,children:e.children})}function Eb(e){var t=e.initialProps,n=e.children,a=t.selected,s=a||{},r=s.from,o=s.to,i=t.min,l=t.max,c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(r?(c.range_start=[r],o?(c.range_end=[o],Mv(r,o)||(c.range_middle=[{after:r,before:o}])):c.range_end=[r]):o&&(c.range_start=[o],c.range_end=[o]),i&&(r&&!o&&c.disabled.push({after:Ov(r,i-1),before:Pv(r,i-1)}),r&&o&&c.disabled.push({after:r,before:Pv(r,i-1)}),!r&&o&&c.disabled.push({after:Ov(o,i-1),before:Pv(o,i-1)})),l){if(r&&!o&&(c.disabled.push({before:Pv(r,1-l)}),c.disabled.push({after:Pv(r,l-1)})),r&&o){var d=l-(zx(o,r)+1);c.disabled.push({before:Ov(r,d)}),c.disabled.push({after:Pv(o,d)})}!r&&o&&(c.disabled.push({before:Pv(o,1-l)}),c.disabled.push({after:Pv(o,l-1)}))}return(0,_e.jsx)(_b.Provider,{value:{selected:a,onDayClick:function(e,n,s){var r,o;null===(r=t.onDayClick)||void 0===r||r.call(t,e,n,s);var i=function(e,t){var n=t||{},a=n.from,s=n.to;if(a&&s){if(Mv(s,e)&&Mv(a,e))return;if(Mv(s,e))return{from:s,to:void 0};if(Mv(a,e))return;return Rv(a,e)?{from:e,to:s}:{from:a,to:e}}return s?Rv(e,s)?{from:s,to:e}:{from:e,to:s}:a?vv(e,a)?{from:e,to:a}:{from:a,to:e}:{from:e,to:void 0}}(e,a);null===(o=t.onSelect)||void 0===o||o.call(t,i,e,n,s)},modifiers:c},children:n})}function Pb(){var e=(0,s.useContext)(_b);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Mb(e){return Array.isArray(e)?Vv([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(Ab||(Ab={}));var Rb=Ab.Selected,Ob=Ab.Disabled,zb=Ab.Hidden,Tb=Ab.Today,Db=Ab.RangeEnd,Lb=Ab.RangeMiddle,Fb=Ab.RangeStart,Ib=Ab.Outside;var Ub=(0,s.createContext)(void 0);function Bb(e){var t=tb(),n=function(e,t,n){var a,s=((a={})[Rb]=Mb(e.selected),a[Ob]=Mb(e.disabled),a[zb]=Mb(e.hidden),a[Tb]=[e.today],a[Db]=[],a[Lb]=[],a[Fb]=[],a[Ib]=[],a);return e.fromDate&&s[Ob].push({before:e.fromDate}),e.toDate&&s[Ob].push({after:e.toDate}),Yv(e)?s[Ob]=s[Ob].concat(t.modifiers[Ob]):$v(e)&&(s[Ob]=s[Ob].concat(n.modifiers[Ob]),s[Fb]=n.modifiers[Fb],s[Lb]=n.modifiers[Lb],s[Db]=n.modifiers[Db]),s}(t,Sb(),Pb()),a=function(e){var t={};return Object.entries(e).forEach(function(e){var n=e[0],a=e[1];t[n]=Mb(a)}),t}(t.modifiers),s=Hv(Hv({},n),a);return(0,_e.jsx)(Ub.Provider,{value:s,children:e.children})}function Wb(){var e=(0,s.useContext)(Ub);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function qb(e,t){return t.some(function(t){if("boolean"===typeof t)return t;if(cv(t))return Mv(e,t);if(function(e){return Array.isArray(e)&&e.every(cv)}(t))return t.includes(e);if(function(e){return Boolean(e&&"object"===typeof e&&"from"in e)}(t))return function(e,t){var n,a=t.from,s=t.to;return a&&s?(zx(s,a)<0&&(a=(n=[s,a])[0],s=n[1]),zx(e,a)>=0&&zx(s,e)>=0):s?Mv(s,e):!!a&&Mv(a,e)}(e,t);if(function(e){return Boolean(e&&"object"===typeof e&&"dayOfWeek"in e)}(t))return t.dayOfWeek.includes(e.getDay());if(function(e){return Boolean(e&&"object"===typeof e&&"before"in e&&"after"in e)}(t)){var n=zx(t.before,e)>0,a=zx(t.after,e)<0;return Rv(t.before,t.after)?a&&n:n||a}return function(e){return Boolean(e&&"object"===typeof e&&"after"in e)}(t)?zx(e,t.after)>0:function(e){return Boolean(e&&"object"===typeof e&&"before"in e)}(t)?zx(t.before,e)>0:"function"===typeof t&&t(e)})}function Hb(e,t,n){var a=Object.keys(t).reduce(function(n,a){var s=t[a];return qb(e,s)&&n.push(a),n},[]),s={};return a.forEach(function(e){return s[e]=!0}),n&&!Ev(e,n)&&(s.outside=!0),s}function Vb(e,t){var n=t.moveBy,a=t.direction,s=t.context,r=t.modifiers,o=t.retry,i=void 0===o?{count:0,lastFocused:e}:o,l=s.weekStartsOn,c=s.fromDate,d=s.toDate,u=s.locale,h={day:Pv,week:zv,month:Cv,year:Tv,startOfWeek:function(e){return s.ISOWeek?Fx(e):Lx(e,{locale:u,weekStartsOn:l})},endOfWeek:function(e){return s.ISOWeek?Lv(e):Dv(e,{locale:u,weekStartsOn:l})}}[n](e,"after"===a?1:-1);
2"before"===a&&c?h=Fv([c,h]):"after"===a&&d&&(h=Iv([d,h]));var m=!0;if(r){var p=Hb(h,r);m=!p.disabled&&!p.hidden}return m?h:i.count>365?i.lastFocused:Vb(h,{moveBy:n,direction:a,context:s,modifiers:r,retry:Hv(Hv({},i),{count:i.count+1})})}var Yb=(0,s.createContext)(void 0);function $b(e){var t=db(),n=Wb(),a=(0,s.useState)(),r=a[0],o=a[1],i=(0,s.useState)(),l=i[0],c=i[1],d=function(e,t){for(var n,a,s=wv(e[0]),r=jv(e[e.length-1]),o=s;o<=r;){var i=Hb(o,t);if(i.disabled||i.hidden)o=Pv(o,1);else{if(i.selected)return o;i.today&&!a&&(a=o),n||(n=o),o=Pv(o,1)}}return a||n}(t.displayMonths,n),u=(null!==r&&void 0!==r?r:l&&t.isDateDisplayed(l))?l:d,h=function(e){o(e)},m=tb(),p=function(e,a){if(r){var s=Vb(r,{moveBy:e,direction:a,context:m,modifiers:n});Mv(r,s)||(t.goToDate(s,r),h(s))}},f={focusedDay:r,focusTarget:u,blur:function(){c(r),o(void 0)},focus:h,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return(0,_e.jsx)(Yb.Provider,{value:f,children:e.children})}function Qb(){var e=(0,s.useContext)(Yb);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}var Kb=(0,s.createContext)(void 0);function Gb(e){if(!Qv(e.initialProps)){var t={selected:void 0};return(0,_e.jsx)(Kb.Provider,{value:t,children:e.children})}return(0,_e.jsx)(Xb,{initialProps:e.initialProps,children:e.children})}function Xb(e){var t=e.initialProps,n=e.children,a={selected:t.selected,onDayClick:function(e,n,a){var s,r,o;null===(s=t.onDayClick)||void 0===s||s.call(t,e,n,a),!n.selected||t.required?null===(o=t.onSelect)||void 0===o||o.call(t,e,e,n,a):null===(r=t.onSelect)||void 0===r||r.call(t,void 0,e,n,a)}};return(0,_e.jsx)(Kb.Provider,{value:a,children:n})}function Jb(){var e=(0,s.useContext)(Kb);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function Zb(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(t){var a=e.modifiersClassNames[t];if(a)n.push(a);else if(function(e){return Object.values(Ab).includes(e)}(t)){var s=e.classNames["day_".concat(t)];s&&n.push(s)}}),n}function ey(e,t,n){var a,r,o,i=tb(),l=Qb(),c=function(e,t){return Hb(e,Wb(),t)}(e,t),d=function(e,t){var n=tb(),a=Jb(),s=Sb(),r=Pb(),o=Qb(),i=o.focusDayAfter,l=o.focusDayBefore,c=o.focusWeekAfter,d=o.focusWeekBefore,u=o.blur,h=o.focus,m=o.focusMonthBefore,p=o.focusMonthAfter,f=o.focusYearBefore,g=o.focusYearAfter,x=o.focusStartOfWeek,v=o.focusEndOfWeek,b={onClick:function(o){var i,l,c,d;Qv(n)?null===(i=a.onDayClick)||void 0===i||i.call(a,e,t,o):Yv(n)?null===(l=s.onDayClick)||void 0===l||l.call(s,e,t,o):$v(n)?null===(c=r.onDayClick)||void 0===c||c.call(r,e,t,o):null===(d=n.onDayClick)||void 0===d||d.call(n,e,t,o)},onFocus:function(a){var s;h(e),null===(s=n.onDayFocus)||void 0===s||s.call(n,e,t,a)},onBlur:function(a){var s;u(),null===(s=n.onDayBlur)||void 0===s||s.call(n,e,t,a)},onKeyDown:function(a){var s;switch(a.key){case"ArrowLeft":a.preventDefault(),a.stopPropagation(),"rtl"===n.dir?i():l();break;case"ArrowRight":a.preventDefault(),a.stopPropagation(),"rtl"===n.dir?l():i();break;case"ArrowDown":a.preventDefault(),a.stopPropagation(),c();break;case"ArrowUp":a.preventDefault(),a.stopPropagation(),d();break;case"PageUp":a.preventDefault(),a.stopPropagation(),a.shiftKey?f():m();break;case"PageDown":a.preventDefault(),a.stopPropagation(),a.shiftKey?g():p();break;case"Home":a.preventDefault(),a.stopPropagation(),x();break;case"End":a.preventDefault(),a.stopPropagation(),v()}null===(s=n.onDayKeyDown)||void 0===s||s.call(n,e,t,a)},onKeyUp:function(a){var s;null===(s=n.onDayKeyUp)||void 0===s||s.call(n,e,t,a)},onMouseEnter:function(a){var s;null===(s=n.onDayMouseEnter)||void 0===s||s.call(n,e,t,a)},onMouseLeave:function(a){var s;null===(s=n.onDayMouseLeave)||void 0===s||s.call(n,e,t,a)},onPointerEnter:function(a){var s;null===(s=n.onDayPointerEnter)||void 0===s||s.call(n,e,t,a)},onPointerLeave:function(a){var s;null===(s=n.onDayPointerLeave)||void 0===s||s.call(n,e,t,a)},onTouchCancel:function(a){var s;null===(s=n.onDayTouchCancel)||void 0===s||s.call(n,e,t,a)},onTouchEnd:function(a){var s;null===(s=n.onDayTouchEnd)||void 0===s||s.call(n,e,t,a)},onTouchMove:function(a){var s;null===(s=n.onDayTouchMove)||void 0===s||s.call(n,e,t,a)},onTouchStart:function(a){var s;null===(s=n.onDayTouchStart)||void 0===s||s.call(n,e,t,a)}};return b}(e,c),u=function(){var e=tb(),t=Jb(),n=Sb(),a=Pb();return Qv(e)?t.selected:Yv(e)?n.selected:$v(e)?a.selected:void 0}
2(),h=Boolean(i.onDayClick||"default"!==i.mode);(0,s.useEffect)(function(){var t;c.outside||l.focusedDay&&h&&Mv(l.focusedDay,e)&&(null===(t=n.current)||void 0===t||t.focus())},[l.focusedDay,e,n,h,c.outside]);var m=Zb(i,c).join(" "),p=function(e,t){var n=Hv({},e.styles.day);return Object.keys(t).forEach(function(t){var a;n=Hv(Hv({},n),null===(a=e.modifiersStyles)||void 0===a?void 0:a[t])}),n}(i,c),f=Boolean(c.outside&&!i.showOutsideDays||c.hidden),g=null!==(o=null===(r=i.components)||void 0===r?void 0:r.DayContent)&&void 0!==o?o:wb,x={style:p,className:m,children:(0,_e.jsx)(g,{date:e,displayMonth:t,activeModifiers:c}),role:"gridcell"},v=l.focusTarget&&Mv(l.focusTarget,e)&&!c.outside,b=l.focusedDay&&Mv(l.focusedDay,e),y=Hv(Hv(Hv({},x),((a={disabled:c.disabled,role:"gridcell"})["aria-selected"]=c.selected,a.tabIndex=b||v?0:-1,a)),d);return{isButton:h,isHidden:f,activeModifiers:c,selectedDays:u,buttonProps:y,divProps:x}}function ty(e){var t=(0,s.useRef)(null),n=ey(e.date,e.displayMonth,t);return n.isHidden?(0,_e.jsx)("div",{role:"gridcell"}):n.isButton?(0,_e.jsx)(pb,Hv({name:"day",ref:t},n.buttonProps)):(0,_e.jsx)("div",Hv({},n.divProps))}function ny(e){var t=e.number,n=e.dates,a=tb(),s=a.onWeekNumberClick,r=a.styles,o=a.classNames,i=a.locale,l=a.labels.labelWeekNumber,c=(0,a.formatters.formatWeekNumber)(Number(t),{locale:i});if(!s)return(0,_e.jsx)("span",{className:o.weeknumber,style:r.weeknumber,children:c});var d=l(Number(t),{locale:i});return(0,_e.jsx)(pb,{name:"week-number","aria-label":d,className:o.weeknumber,style:r.weeknumber,onClick:function(e){s(t,n,e)},children:c})}function ay(e){var t,n,a,s=tb(),r=s.styles,o=s.classNames,i=s.showWeekNumber,l=s.components,c=null!==(t=null===l||void 0===l?void 0:l.Day)&&void 0!==t?t:ty,d=null!==(n=null===l||void 0===l?void 0:l.WeekNumber)&&void 0!==n?n:ny;return i&&(a=(0,_e.jsx)("td",{className:o.cell,style:r.cell,children:(0,_e.jsx)(d,{number:e.weekNumber,dates:e.dates})})),(0,_e.jsxs)("tr",{className:o.row,style:r.row,children:[a,e.dates.map(function(t){return(0,_e.jsx)("td",{className:o.cell,style:r.cell,role:"presentation",children:(0,_e.jsx)(c,{displayMonth:e.displayMonth,date:t})},Uv(t))})]})}function sy(e,t,n){for(var a=(null===n||void 0===n?void 0:n.ISOWeek)?Lv(t):Dv(t,n),s=(null===n||void 0===n?void 0:n.ISOWeek)?Fx(e):Lx(e,n),r=zx(a,s),o=[],i=0;i<=r;i++)o.push(Pv(s,i));return o.reduce(function(e,t){var a=(null===n||void 0===n?void 0:n.ISOWeek)?Bx(t):Hx(t,n),s=e.find(function(e){return e.weekNumber===a});return s?(s.dates.push(t),e):(e.push({weekNumber:a,dates:[t]}),e)},[])}function ry(e){var t,n,a,s=tb(),r=s.locale,o=s.classNames,i=s.styles,l=s.hideHead,c=s.fixedWeeks,d=s.components,u=s.weekStartsOn,h=s.firstWeekContainsDate,m=s.ISOWeek,p=function(e,t){var n=sy(wv(e),jv(e),t);if(null===t||void 0===t?void 0:t.useFixedWeeks){var a=qv(e,t);if(a<6){var s=n[n.length-1],r=s.dates[s.dates.length-1],o=zv(r,6-a),i=sy(zv(r,1),o,t);n.push.apply(n,i)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:m,locale:r,weekStartsOn:u,firstWeekContainsDate:h}),f=null!==(t=null===d||void 0===d?void 0:d.Head)&&void 0!==t?t:yb,g=null!==(n=null===d||void 0===d?void 0:d.Row)&&void 0!==n?n:ay,x=null!==(a=null===d||void 0===d?void 0:d.Footer)&&void 0!==a?a:vb;return(0,_e.jsxs)("table",{id:e.id,className:o.table,style:i.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&(0,_e.jsx)(f,{}),(0,_e.jsx)("tbody",{className:o.tbody,style:i.tbody,children:p.map(function(t){return(0,_e.jsx)(g,{displayMonth:e.displayMonth,dates:t.dates,weekNumber:t.weekNumber},t.weekNumber)})}),(0,_e.jsx)(x,{displayMonth:e.displayMonth})]})}var oy="undefined"!==typeof window&&window.document&&window.document.createElement?s.useLayoutEffect:s.useEffect,iy=!1,ly=0;function cy(){return"react-day-picker-".concat(++ly)}
2function dy(e){var t,n,a=tb(),r=a.dir,o=a.classNames,i=a.styles,l=a.components,c=db().displayMonths,d=function(e){var t,n=null!==e&&void 0!==e?e:iy?cy():null,a=(0,s.useState)(n),r=a[0],o=a[1];return oy(function(){null===r&&o(cy())},[]),(0,s.useEffect)(function(){!1===iy&&(iy=!0)},[]),null!==(t=null!==e&&void 0!==e?e:r)&&void 0!==t?t:void 0}(a.id?"".concat(a.id,"-").concat(e.displayIndex):void 0),u=a.id?"".concat(a.id,"-grid-").concat(e.displayIndex):void 0,h=[o.month],m=i.month,p=0===e.displayIndex,f=e.displayIndex===c.length-1,g=!p&&!f;"rtl"===r&&(f=(t=[p,f])[0],p=t[1]),p&&(h.push(o.caption_start),m=Hv(Hv({},m),i.caption_start)),f&&(h.push(o.caption_end),m=Hv(Hv({},m),i.caption_end)),g&&(h.push(o.caption_between),m=Hv(Hv({},m),i.caption_between));var x=null!==(n=null===l||void 0===l?void 0:l.Caption)&&void 0!==n?n:xb;return(0,_e.jsxs)("div",{className:h.join(" "),style:m,children:[(0,_e.jsx)(x,{id:d,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),(0,_e.jsx)(ry,{id:u,"aria-labelledby":d,displayMonth:e.displayMonth})]},e.displayIndex)}function uy(e){var t=tb(),n=t.classNames,a=t.styles;return(0,_e.jsx)("div",{className:n.months,style:a.months,children:e.children})}function hy(e){var t,n,a=e.initialProps,r=tb(),o=Qb(),i=db(),l=(0,s.useState)(!1),c=l[0],d=l[1];(0,s.useEffect)(function(){r.initialFocus&&o.focusTarget&&(c||(o.focus(o.focusTarget),d(!0)))},[r.initialFocus,c,o.focus,o.focusTarget,o]);var u=[r.classNames.root,r.className];r.numberOfMonths>1&&u.push(r.classNames.multiple_months),r.showWeekNumber&&u.push(r.classNames.with_weeknumber);var h=Hv(Hv({},r.styles.root),r.style),m=Object.keys(a).filter(function(e){return e.startsWith("data-")}).reduce(function(e,t){var n;return Hv(Hv({},e),((n={})[t]=a[t],n))},{}),p=null!==(n=null===(t=a.components)||void 0===t?void 0:t.Months)&&void 0!==n?n:uy;return(0,_e.jsx)("div",Hv({className:u.join(" "),style:h,dir:r.dir,id:r.id,nonce:a.nonce,title:a.title,lang:a.lang},m,{children:(0,_e.jsx)(p,{children:i.displayMonths.map(function(e,t){return(0,_e.jsx)(dy,{displayIndex:t,displayMonth:e},t)})})}))}function my(e){var t=e.children,n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(n[a[s]]=e[a[s]])}return n}(e,["children"]);return(0,_e.jsx)(eb,{initialProps:n,children:(0,_e.jsx)(cb,{children:(0,_e.jsx)(Gb,{initialProps:n,children:(0,_e.jsx)(kb,{initialProps:n,children:(0,_e.jsx)(Cb,{initialProps:n,children:(0,_e.jsx)(Bb,{children:(0,_e.jsx)($b,{children:t})})})})})})})}function py(e){return(0,_e.jsx)(my,Hv({},e,{children:(0,_e.jsx)(hy,{initialProps:e})}))}const fy=["className","classNames","showOutsideDays"],gy=["className"],xy=["className"];function vy(e){let t=e.className,n=e.classNames,a=e.showOutsideDays,s=void 0===a||a,r=(0,Pe.A)(e,fy);return(0,_e.jsx)(py,(0,i.A)({showOutsideDays:s,className:Ku("p-3",t),classNames:(0,i.A)({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:Ku(Th({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Ku("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md","range"===r.mode?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Ku(Th({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},n),components:{IconLeft:e=>{let t=e.className,n=(0,Pe.A)(e,gy);return(0,_e.jsx)(bv,(0,i.A)({className:Ku("h-4 w-4",t)},n))},IconRight:e=>{let t=e.className,n=(0,Pe.A)(e,xy);return(0,_e.jsx)(yv,(0,i.A)({className:Ku("h-4 w-4",t)},n))}}},r))}
2vy.displayName="Calendar";const by=["top","right","bottom","left"],yy=Math.min,wy=Math.max,jy=Math.round,ky=Math.floor,Ny=e=>({x:e,y:e}),Sy={left:"right",right:"left",bottom:"top",top:"bottom"};function Ay(e,t,n){return wy(e,yy(t,n))}function _y(e,t){return"function"===typeof e?e(t):e}function Cy(e){return e.split("-")[0]}function Ey(e){return e.split("-")[1]}function Py(e){return"x"===e?"y":"x"}function My(e){return"y"===e?"height":"width"}function Ry(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Oy(e){return Py(Ry(e))}function zy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ty=["left","right"],Dy=["right","left"],Ly=["top","bottom"],Fy=["bottom","top"];function Iy(e,t,n,a){const s=Ey(e);let r=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Dy:Ty:t?Ty:Dy;case"left":case"right":return t?Ly:Fy;default:return[]}}(Cy(e),"start"===n,a);return s&&(r=r.map(e=>e+"-"+s),t&&(r=r.concat(r.map(zy)))),r}function Uy(e){const t=Cy(e);return Sy[t]+e.slice(t.length)}function By(e){return"number"!==typeof e?function(e){return(0,i.A)({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function Wy(e){const t=e.x,n=e.y,a=e.width,s=e.height;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}const qy=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Hy=["strategy"],Vy=["mainAxis","crossAxis","limiter"],Yy=["apply"];function $y(e,t,n){let a=e.reference,s=e.floating;const r=Ry(t),o=Oy(t),i=My(o),l=Cy(t),c="y"===r,d=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,h=a[i]/2-s[i]/2;let m;switch(l){case"top":m={x:d,y:a.y-s.height};break;case"bottom":m={x:d,y:a.y+a.height};break;case"right":m={x:a.x+a.width,y:u};break;case"left":m={x:a.x-s.width,y:u};break;default:m={x:a.x,y:a.y}}switch(Ey(t)){case"start":m[o]-=h*(n&&c?-1:1);break;case"end":m[o]+=h*(n&&c?-1:1)}return m}async function Qy(e,t){var n;void 0===t&&(t={});const a=e.x,s=e.y,r=e.platform,o=e.rects,i=e.elements,l=e.strategy,c=_y(t,e),d=c.boundary,u=void 0===d?"clippingAncestors":d,h=c.rootBoundary,m=void 0===h?"viewport":h,p=c.elementContext,f=void 0===p?"floating":p,g=c.altBoundary,x=void 0!==g&&g,v=c.padding,b=By(void 0===v?0:v),y=i[x?"floating"===f?"reference":"floating":f],w=Wy(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(y)))||n?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),j="floating"===f?{x:a,y:s,width:o.floating.width,height:o.floating.height}:o.reference,k=await(null==r.getOffsetParent?void 0:r.getOffsetParent(i.floating)),N=await(null==r.isElement?void 0:r.isElement(k))&&await(null==r.getScale?void 0:r.getScale(k))||{x:1,y:1},S=Wy(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:j,offsetParent:k,strategy:l}):j);return{top:(w.top-S.top+b.top)/N.y,bottom:(S.bottom-w.bottom+b.bottom)/N.y,left:(w.left-S.left+b.left)/N.x,right:(S.right-w.right+b.right)/N.x}}function Ky(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gy(e){return by.some(t=>e[t]>=0)}const Xy=new Set(["left","top"]);function Jy(){return"undefined"!==typeof window}function Zy(e){return nw(e)?(e.nodeName||"").toLowerCase():"#document"}function ew(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tw(e){var t;return null==(t=(nw(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function nw(e){return!!Jy()&&(e instanceof Node||e instanceof ew(e).Node)}function aw(e){return!!Jy()&&(e instanceof Element||e instanceof ew(e).Element)}function sw(e){return!!Jy()&&(e instanceof HTMLElement||e instanceof ew(e).HTMLElement)}function rw(e){return!(!Jy()||"undefined"===typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ew(e).ShadowRoot)}function ow(e){const t=gw(e),n=t.overflow,a=t.overflowX,s=t.overflowY,r=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+s+a)&&"inline"!==r&&"contents"!==r}function iw(e){return/^(table|td|th)$/.test(Zy(e))}function lw(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const cw=/transform|translate|scale|rotate|perspective|filter/,dw=/paint|layout|strict|content/,uw=e=>!!e&&"none"!==e;let hw;function mw(e){const t=aw(e)?gw(e):e;return uw(t.transform)||uw(t.translate)||uw(t.scale)||uw(t.rotate)||uw(t.perspective)||!pw()&&(uw(t.backdropFilter)||uw(t.filter))||cw.test(t.willChange||"")||dw.test(t.contain||"")}function pw(){return null==hw&&(hw="undefined"!==typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hw}function fw(e){return/^(html|body|#document)$/.test(Zy(e))}function gw(e){return ew(e).getComputedStyle(e)}function xw(e){return aw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vw(e){if("html"===Zy(e))return e;const t=e.assignedSlot||e.parentNode||rw(e)&&e.host||tw(e);return rw(t)?t.host:t}function bw(e){const t=vw(e);return fw(t)?e.ownerDocument?e.ownerDocument.body:e.body:sw(t)&&ow(t)?t:bw(t)}function yw(e,t,n){var a;void 0===t&&(t=[]),void 0===n&&(n=!0);const s=bw(e),r=s===(null==(a=e.ownerDocument)?void 0:a.body),o=ew(s);if(r){const e=ww(o);
vendor: 4,099 bytes, line 2
2return t.concat(o,o.visualViewport||[],ow(s)?s:[],e&&n?yw(e):[])}return t.concat(s,yw(s,[],n))}function ww(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jw(e){const t=gw(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=sw(e),r=s?e.offsetWidth:n,o=s?e.offsetHeight:a,i=jy(n)!==r||jy(a)!==o;return i&&(n=r,a=o),{width:n,height:a,$:i}}function kw(e){return aw(e)?e:e.contextElement}function Nw(e){const t=kw(e);if(!sw(t))return Ny(1);const n=t.getBoundingClientRect(),a=jw(t),s=a.width,r=a.height,o=a.$;let i=(o?jy(n.width):n.width)/s,l=(o?jy(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Sw=Ny(0);function Aw(e){const t=ew(e);return pw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Sw}function _w(e,t,n,a){void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect(),r=kw(e);let o=Ny(1);t&&(a?aw(a)&&(o=Nw(a)):o=Nw(e));const i=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ew(e))&&t}(r,n,a)?Aw(r):Ny(0);let l=(s.left+i.x)/o.x,c=(s.top+i.y)/o.y,d=s.width/o.x,u=s.height/o.y;if(r){const e=ew(r),t=a&&aw(a)?ew(a):a;let n=e,s=ww(n);for(;s&&a&&t!==n;){const e=Nw(s),t=s.getBoundingClientRect(),a=gw(s),r=t.left+(s.clientLeft+parseFloat(a.paddingLeft))*e.x,o=t.top+(s.clientTop+parseFloat(a.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=r,c+=o,n=ew(s),s=ww(n)}}return Wy({width:d,height:u,x:l,y:c})}function Cw(e,t){const n=xw(e).scrollLeft;return t?t.left+n:_w(tw(e)).left+n}function Ew(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Cw(e,n),y:n.top+t.scrollTop}}function Pw(e,t,n){let a;if("viewport"===t)a=function(e,t){const n=ew(e),a=tw(e),s=n.visualViewport;let r=a.clientWidth,o=a.clientHeight,i=0,l=0;if(s){r=s.width,o=s.height;const e=pw();(!e||e&&"fixed"===t)&&(i=s.offsetLeft,l=s.offsetTop)}const c=Cw(a);if(c<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),s="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-s);o<=25&&(r-=o)}else c<=25&&(r+=c);return{width:r,height:o,x:i,y:l}}(e,n);else if("document"===t)a=function(e){const t=tw(e),n=xw(e),a=e.ownerDocument.body,s=wy(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=wy(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+Cw(e);const i=-n.scrollTop;return"rtl"===gw(a).direction&&(o+=wy(t.clientWidth,a.clientWidth)-s),{width:s,height:r,x:o,y:i}}(tw(e));else if(aw(t))a=function(e,t){const n=_w(e,!0,"fixed"===t),a=n.top+e.clientTop,s=n.left+e.clientLeft,r=sw(e)?Nw(e):Ny(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:s*r.x,y:a*r.y}}(t,n);else{const n=Aw(e);a={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Wy(a)}function Mw(e,t){const n=vw(e);return!(n===t||!aw(n)||fw(n))&&("fixed"===gw(n).position||Mw(n,t))}function Rw(e,t,n){const a=sw(t),s=tw(t),r="fixed"===n,o=_w(e,!0,r,t);let i={scrollLeft:0,scrollTop:0};const l=Ny(0);function c(){l.x=Cw(s)}if(a||!a&&!r)if(("body"!==Zy(t)||ow(s))&&(i=xw(t)),a){const e=_w(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else s&&c();r&&!a&&s&&c();const d=!s||a||r?Ny(0):Ew(s,i);return{x:o.left+i.scrollLeft-l.x-d.x,y:o.top+i.scrollTop-l.y-d.y,width:o.width,height:o.height}}function Ow(e){return"static"===gw(e).position}function zw(e,t){if(!sw(e)||"fixed"===gw(e).position)return null;if(t)return t(e);let n=e.offsetParent;return tw(e)===n&&(n=n.ownerDocument.body),n}function Tw(e,t){const n=ew(e);if(lw(e))return n;if(!sw(e)){let t=vw(e);for(;t&&!fw(t);){if(aw(t)&&!Ow(t))return t;t=vw(t)}return n}let a=zw(e,t);for(;a&&iw(a)&&Ow(a);)a=zw(a,t);return a&&fw(a)&&Ow(a)&&!mw(a)?n:a||function(e){let t=vw(e);for(;sw(t)&&!fw(t);){if(mw(t))return t;if(lw(t))return null;t=vw(t)}return null}(e)||n}const Dw={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let t=e.elements,n=e.rect,a=e.offsetParent;const s="fixed"===e.strategy,r=tw(a),o=!!t&&lw(t.floating);if(a===r||o&&s)return n;let i={scrollLeft:0,scrollTop:0},l=Ny(1);const c=Ny(0),d=sw(a);
2if((d||!d&&!s)&&(("body"!==Zy(a)||ow(r))&&(i=xw(a)),d)){const e=_w(a);l=Nw(a),c.x=e.x+a.clientLeft,c.y=e.y+a.clientTop}const u=!r||d||s?Ny(0):Ew(r,i);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-i.scrollLeft*l.x+c.x+u.x,y:n.y*l.y-i.scrollTop*l.y+c.y+u.y}},getDocumentElement:tw,getClippingRect:function(e){let t=e.element,n=e.boundary,a=e.rootBoundary,s=e.strategy;const r="clippingAncestors"===n?lw(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let a=yw(e,[],!1).filter(e=>aw(e)&&"body"!==Zy(e)),s=null;const r="fixed"===gw(e).position;let o=r?vw(e):e;for(;aw(o)&&!fw(o);){const t=gw(o),n=mw(o);n||"fixed"!==t.position||(s=null),(r?!n&&!s:!n&&"static"===t.position&&s&&("absolute"===s.position||"fixed"===s.position)||ow(o)&&!n&&Mw(e,o))?a=a.filter(e=>e!==o):s=t,o=vw(o)}return t.set(e,a),a}(t,this._c):[].concat(n),o=[...r,a],i=Pw(t,o[0],s);let l=i.top,c=i.right,d=i.bottom,u=i.left;for(let h=1;h<o.length;h++){const e=Pw(t,o[h],s);l=wy(e.top,l),c=yy(e.right,c),d=yy(e.bottom,d),u=wy(e.left,u)}return{width:c-u,height:d-l,x:u,y:l}},getOffsetParent:Tw,getElementRects:async function(e){const t=this.getOffsetParent||Tw,n=this.getDimensions,a=await n(e.floating);return{reference:Rw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const t=jw(e);return{width:t.width,height:t.height}},getScale:Nw,isElement:aw,isRTL:function(e){return"rtl"===gw(e).direction}};function Lw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fw(e,t,n,a){void 0===a&&(a={});const s=a,r=s.ancestorScroll,o=void 0===r||r,l=s.ancestorResize,c=void 0===l||l,d=s.elementResize,u=void 0===d?"function"===typeof ResizeObserver:d,h=s.layoutShift,m=void 0===h?"function"===typeof IntersectionObserver:h,p=s.animationFrame,f=void 0!==p&&p,g=kw(e),x=o||c?[...g?yw(g):[],...t?yw(t):[]]:[];x.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)});const v=g&&m?function(e,t){let n,a=null;const s=tw(e);function r(){var e;clearTimeout(n),null==(e=a)||e.disconnect(),a=null}return function o(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),r();const d=e.getBoundingClientRect(),u=d.left,h=d.top,m=d.width,p=d.height;if(l||t(),!m||!p)return;const f={rootMargin:-ky(h)+"px "+-ky(s.clientWidth-(u+m))+"px "+-ky(s.clientHeight-(h+p))+"px "+-ky(u)+"px",threshold:wy(0,yy(1,c))||1};let g=!0;function x(t){const a=t[0].intersectionRatio;if(a!==c){if(!g)return o();a?o(!1,a):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==a||Lw(d,e.getBoundingClientRect())||o(),g=!1}try{a=new IntersectionObserver(x,(0,i.A)((0,i.A)({},f),{},{root:s.ownerDocument}))}catch(v){a=new IntersectionObserver(x,f)}a.observe(e)}(!0),r}(g,n):null;let b,y=-1,w=null;u&&(w=new ResizeObserver(e=>{let a=(0,De.A)(e,1)[0];a&&a.target===g&&w&&t&&(w.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var e;null==(e=w)||e.observe(t)})),n()}),g&&!f&&w.observe(g),t&&w.observe(t));let j=f?_w(e):null;return f&&function t(){const a=_w(e);j&&!Lw(j,a)&&n();j=a,b=requestAnimationFrame(t)}(),n(),()=>{var e;x.forEach(e=>{o&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)}),null==v||v(),null==(e=w)||e.disconnect(),w=null,f&&cancelAnimationFrame(b)}}const Iw=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const s=t.x,r=t.y,o=t.placement,l=t.middlewareData,c=await async function(e,t){const n=e.placement,a=e.platform,s=e.elements,r=await(null==a.isRTL?void 0:a.isRTL(s.floating)),o=Cy(n),i=Ey(n),l="y"===Ry(n),c=Xy.has(o)?-1:1,d=r&&l?-1:1,u=_y(t,e);let h="number"===typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis},m=h.mainAxis,p=h.crossAxis,f=h.alignmentAxis;return i&&"number"===typeof f&&(p="end"===i?-1*f:f),l?{x:p*d,y:m*c}:{x:m*c,y:p*d}}(t,e);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(a=l.arrow)&&a.alignmentOffset?{}:{x:s+c.x,y:r+c.y,data:(0,i.A)((0,i.A)({},c),{},{placement:o})}}}},Uw=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const n=t.x,a=t.y,s=t.placement,r=t.platform,o=_y(e,t),l=o.mainAxis,c=void 0===l||l,d=o.crossAxis,u=void 0!==d&&d,h=o.limiter,m=void 0===h?{fn:e=>({x:e.x,y:e.y})}:h,p=(0,Pe.A)(o,Vy),f={x:n,y:a},g=await r.detectOverflow(t,p),x=Ry(Cy(s)),v=Py(x);let b=f[v],y=f[x];if(c){const e="y"===v?"bottom":"right";b=Ay(b+g["y"===v?"top":"left"],b,b-g[e])}if(u){const e="y"===x?"bottom":"right";y=Ay(y+g["y"===x?"top":"left"],y,y-g[e])}const w=m.fn((0,i.A)((0,i.A)({},t),{},{[v]:b,[x]:y}));return(0,i.A)((0,i.A)({},w),{},{data:{x:w.x-n,y:w.y-a,enabled:{[v]:c,[x]:u}}})}}},Bw=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const s=t.placement,r=t.middlewareData,o=t.rects,i=t.initialPlacement,l=t.platform,c=t.elements,d=_y(e,t),u=d.mainAxis,h=void 0===u||u,m=d.crossAxis,p=void 0===m||m,f=d.fallbackPlacements,g=d.fallbackStrategy,x=void 0===g?"bestFit":g,v=d.fallbackAxisSideDirection,b=void 0===v?"none":v,
2y=d.flipAlignment,w=void 0===y||y,j=(0,Pe.A)(d,qy);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const k=Cy(s),N=Ry(i),S=Cy(i)===i,A=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=f||(S||!w?[Uy(i)]:function(e){const t=Uy(e);return[zy(e),t,zy(t)]}(i)),C="none"!==b;!f&&C&&_.push(...Iy(i,w,b,A));const E=[i,..._],P=await l.detectOverflow(t,j),M=[];let R=(null==(a=r.flip)?void 0:a.overflows)||[];if(h&&M.push(P[k]),p){const e=function(e,t,n){void 0===n&&(n=!1);const a=Ey(e),s=Oy(e),r=My(s);let o="x"===s?a===(n?"end":"start")?"right":"left":"start"===a?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=Uy(o)),[o,Uy(o)]}(s,o,A);M.push(P[e[0]],P[e[1]])}if(R=[...R,{placement:s,overflows:M}],!M.every(e=>e<=0)){var O,z;const e=((null==(O=r.flip)?void 0:O.index)||0)+1,t=E[e];if(t){if(!("alignment"===p&&N!==Ry(t))||R.every(e=>Ry(e.placement)!==N||e.overflows[0]>0))return{data:{index:e,overflows:R},reset:{placement:t}}}let n=null==(z=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:z.placement;if(!n)switch(x){case"bestFit":{var T;const e=null==(T=R.filter(e=>{if(C){const t=Ry(e.placement);return t===N||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=i}if(s!==n)return{reset:{placement:n}}}return{}}}},Ww=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,a;const s=t.placement,r=t.rects,o=t.platform,l=t.elements,c=_y(e,t),d=c.apply,u=void 0===d?()=>{}:d,h=(0,Pe.A)(c,Yy),m=await o.detectOverflow(t,h),p=Cy(s),f=Ey(s),g="y"===Ry(s),x=r.floating,v=x.width,b=x.height;let y,w;"top"===p||"bottom"===p?(y=p,w=f===(await(null==o.isRTL?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=p,y="end"===f?"top":"bottom");const j=b-m.top-m.bottom,k=v-m.left-m.right,N=yy(b-m[y],j),S=yy(v-m[w],k),A=!t.middlewareData.shift;let _=N,C=S;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=k),null!=(a=t.middlewareData.shift)&&a.enabled.y&&(_=j),A&&!f){const e=wy(m.left,0),t=wy(m.right,0),n=wy(m.top,0),a=wy(m.bottom,0);g?C=v-2*(0!==e||0!==t?e+t:wy(m.left,m.right)):_=b-2*(0!==n||0!==a?n+a:wy(m.top,m.bottom))}await u((0,i.A)((0,i.A)({},t),{},{availableWidth:C,availableHeight:_}));const E=await o.getDimensions(l.floating);return v!==E.width||b!==E.height?{reset:{rects:!0}}:{}}}},qw=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const n=t.rects,a=t.platform,s=_y(e,t),r=s.strategy,o=void 0===r?"referenceHidden":r,l=(0,Pe.A)(s,Hy);switch(o){case"referenceHidden":{const e=Ky(await a.detectOverflow(t,(0,i.A)((0,i.A)({},l),{},{elementContext:"reference"})),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Gy(e)}}}case"escaped":{const e=Ky(await a.detectOverflow(t,(0,i.A)((0,i.A)({},l),{},{altBoundary:!0})),n.floating);return{data:{escapedOffsets:e,escaped:Gy(e)}}}default:return{}}}}},Hw=e=>({name:"arrow",options:e,async fn(t){const n=t.x,a=t.y,s=t.placement,r=t.rects,o=t.platform,l=t.elements,c=t.middlewareData,d=_y(e,t)||{},u=d.element,h=d.padding;if(null==u)return{};const m=By(void 0===h?0:h),p={x:n,y:a},f=Oy(s),g=My(f),x=await o.getDimensions(u),v="y"===f,b=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",j=r.reference[g]+r.reference[f]-p[f]-r.floating[g],k=p[f]-r.reference[f],N=await(null==o.getOffsetParent?void 0:o.getOffsetParent(u));let S=N?N[w]:0;S&&await(null==o.isElement?void 0:o.isElement(N))||(S=l.floating[w]||r.floating[g]);const A=j/2-k/2,_=S/2-x[g]/2-1,C=yy(m[b],_),E=yy(m[y],_),P=C,M=S-x[g]-E,R=S/2-x[g]/2+A,O=Ay(P,R,M),z=!c.arrow&&null!=Ey(s)&&R!==O&&r.reference[g]/2-(R<P?C:E)-x[g]/2<0,T=z?R<P?R-P:R-M:0;return{[f]:p[f]+T,data:(0,i.A)({[f]:O,centerOffset:R-O-T},z&&{alignmentOffset:T}),reset:z}}}),Vw=function(e){return void 0===e&&(e={}),{options:e,fn(t){const n=t.x,a=t.y,s=t.placement,r=t.rects,o=t.middlewareData,l=_y(e,t),c=l.offset,d=void 0===c?0:c,u=l.mainAxis,h=void 0===u||u,m=l.crossAxis,p=void 0===m||m,f={x:n,y:a},g=Ry(s),x=Py(g);let v=f[x],b=f[g];const y=_y(d,t),w="number"===typeof y?{mainAxis:y,crossAxis:0}:(0,i.A)({mainAxis:0,crossAxis:0},y);if(h){const e="y"===x?"height":"width",t=r.reference[x]-r.floating[e]+w.mainAxis,n=r.reference[x]+r.reference[e]-w.mainAxis;v<t?v=t:v>n&&(v=n)}if(p){var j,k;const e="y"===x?"width":"height",t=Xy.has(Cy(s)),n=r.reference[g]-r.floating[e]+(t&&(null==(j=o.offset)?void 0:j[g])||0)+(t?0:w.crossAxis),a=r.reference[g]+r.reference[e]+(t?0:(null==(k=o.offset)?void 0:k[g])||0)-(t?w.crossAxis:0);b<n?b=n:b>a&&(b=a)}return{[x]:v,[g]:b}}}},Yw=(e,t,n)=>{const a=new Map,s=(0,i.A)({platform:Dw},n),r=(0,i.A)((0,i.A)({},s.platform),{},{_c:a});return(async(e,t,n)=>{const a=n.placement,s=void 0===a?"bottom":a,r=n.strategy,o=void 0===r?"absolute":r,l=n.middleware,c=void 0===l?[]:l,d=n.platform,u=d.detectOverflow?d:(0,i.A)((0,i.A)({},d),{},{detectOverflow:Qy}),h=await(null==d.isRTL?void 0:d.isRTL(t));let m=await d.getElementRects({reference:e,floating:t,strategy:o}),p=$y(m,s,h),f=p.x,g=p.y,x=s,v=0;const b={};for(let w=0;w<c.length;w++){const n=c[w];if(!n)continue;const a=n.name,r=n.fn,l=await r({x:f,y:g,initialPlacement:s,placement:x,strategy:o,middlewareData:b,re
2cts:m,platform:u,elements:{reference:e,floating:t}}),p=l.x,j=l.y,k=l.data,N=l.reset;if(f=null!=p?p:f,g=null!=j?j:g,b[a]=(0,i.A)((0,i.A)({},b[a]),k),N&&v<50){if(v++,"object"===typeof N){N.placement&&(x=N.placement),N.rects&&(m=!0===N.rects?await d.getElementRects({reference:e,floating:t,strategy:o}):N.rects);var y=$y(m,x,h);f=y.x,g=y.y}w=-1}}return{x:f,y:g,placement:x,strategy:o,middlewareData:b}})(e,t,(0,i.A)((0,i.A)({},s),{},{platform:r}))};var $w="undefined"!==typeof document?s.useLayoutEffect:function(){};function Qw(e,t){if(e===t)return!0;if(typeof e!==typeof t)return!1;if("function"===typeof e&&e.toString()===t.toString())return!0;let n,a,s;if(e&&t&&"object"===typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;0!==a--;)if(!Qw(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;0!==a--;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;0!==a--;){const n=s[a];if(("_owner"!==n||!e.$$typeof)&&!Qw(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Kw(e){if("undefined"===typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gw(e,t){const n=Kw(e);return Math.round(t*n)/n}function Xw(e){const t=s.useRef(e);return $w(()=>{t.current=e}),t}const Jw=(e,t)=>{const n=Iw(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zw=(e,t)=>{const n=Uw(e);return{name:n.name,fn:n.fn,options:[e,t]}},ej=(e,t)=>({fn:Vw(e).fn,options:[e,t]}),tj=(e,t)=>{const n=Bw(e);return{name:n.name,fn:n.fn,options:[e,t]}},nj=(e,t)=>{const n=Ww(e);return{name:n.name,fn:n.fn,options:[e,t]}},aj=(e,t)=>{const n=qw(e);return{name:n.name,fn:n.fn,options:[e,t]}},sj=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const n="function"===typeof e?e(t):e,a=n.element,s=n.padding;return a&&(r=a,{}.hasOwnProperty.call(r,"current"))?null!=a.current?Hw({element:a.current,padding:s}).fn(t):{}:a?Hw({element:a,padding:s}).fn(t):{};var r}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},rj=["children","width","height"];var oj=s.forwardRef((e,t)=>{const n=e.children,a=e.width,s=void 0===a?10:a,r=e.height,o=void 0===r?5:r,l=(0,Pe.A)(e,rj);return(0,_e.jsx)(ll.svg,(0,i.A)((0,i.A)({},l),{},{ref:t,width:s,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,_e.jsx)("polygon",{points:"0,0 30,0 15,10"})}))});oj.displayName="Arrow";var ij=oj;const lj=["__scopePopper","virtualRef"],cj=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"],dj=["__scopePopper"];var uj="Popper",hj=Vi(uj),mj=(0,De.A)(hj,2),pj=mj[0],fj=mj[1],gj=pj(uj),xj=(0,De.A)(gj,2),vj=xj[0],bj=xj[1],yj=e=>{const t=e.__scopePopper,n=e.children,a=s.useState(null),r=(0,De.A)(a,2),o=r[0],i=r[1];return(0,_e.jsx)(vj,{scope:t,anchor:o,onAnchorChange:i,children:n})};yj.displayName=uj;var wj="PopperAnchor",jj=s.forwardRef((e,t)=>{const n=e.__scopePopper,a=e.virtualRef,r=(0,Pe.A)(e,lj),o=bj(wj,n),l=s.useRef(null),c=Wi(t,l);return s.useEffect(()=>{o.onAnchorChange((null===a||void 0===a?void 0:a.current)||l.current)}),a?null:(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({},r),{},{ref:c}))});jj.displayName=wj;var kj="PopperContent",Nj=pj(kj),Sj=(0,De.A)(Nj,2),Aj=Sj[0],_j=Sj[1],Cj=s.forwardRef((e,t)=>{var n,a,r,o,l,c,d,u;const h=e.__scopePopper,m=e.side,p=void 0===m?"bottom":m,f=e.sideOffset,g=void 0===f?0:f,x=e.align,v=void 0===x?"center":x,b=e.alignOffset,y=void 0===b?0:b,w=e.arrowPadding,j=void 0===w?0:w,k=e.avoidCollisions,N=void 0===k||k,S=e.collisionBoundary,A=void 0===S?[]:S,_=e.collisionPadding,C=void 0===_?0:_,E=e.sticky,P=void 0===E?"partial":E,M=e.hideWhenDetached,R=void 0!==M&&M,O=e.updatePositionStrategy,z=void 0===O?"optimized":O,T=e.onPlaced,D=(0,Pe.A)(e,cj),L=bj(kj,h),F=s.useState(null),I=(0,De.A)(F,2),U=I[0],B=I[1],W=Wi(t,e=>B(e)),q=s.useState(null),H=(0,De.A)(q,2),V=H[0],Y=H[1],$=Zm(V),Q=null!==(n=null===$||void 0===$?void 0:$.width)&&void 0!==n?n:0,K=null!==(a=null===$||void 0===$?void 0:$.height)&&void 0!==a?a:0,G=p+("center"!==v?"-"+v:""),X="number"===typeof C?C:(0,i.A)({top:0,right:0,bottom:0,left:0},C),J=Array.isArray(A)?A:[A],Z=J.length>0,ee={padding:X,boundary:J.filter(Rj),altBoundary:Z},te=function(e){void 0===e&&(e={});const t=e,n=t.placement,a=void 0===n?"bottom":n,r=t.strategy,o=void 0===r?"absolute":r,l=t.middleware,c=void 0===l?[]:l,d=t.platform,u=t.elements,h=void 0===u?{}:u,m=h.reference,p=h.floating,f=t.transform,g=void 0===f||f,x=t.whileElementsMounted,v=t.open,b=s.useState({x:0,y:0,strategy:o,placement:a,middlewareData:{},isPositioned:!1}),y=(0,De.A)(b,2),w=y[0],j=y[1],k=s.useState(c),N=(0,De.A)(k,2),S=N[0],A=N[1];Qw(S,c)||A(c);const _=s.useState(null),C=(0,De.A)(_,2),E=C[0],P=C[1],M=s.useState(null),R=(0,De.A)(M,2),O=R[0],z=R[1],T=s.useCallback(e=>
2{e!==I.current&&(I.current=e,P(e))},[]),D=s.useCallback(e=>{e!==U.current&&(U.current=e,z(e))},[]),L=m||E,F=p||O,I=s.useRef(null),U=s.useRef(null),B=s.useRef(w),W=null!=x,q=Xw(x),H=Xw(d),V=Xw(v),Y=s.useCallback(()=>{if(!I.current||!U.current)return;const e={placement:a,strategy:o,middleware:S};H.current&&(e.platform=H.current),Yw(I.current,U.current,e).then(e=>{const t=(0,i.A)((0,i.A)({},e),{},{isPositioned:!1!==V.current});$.current&&!Qw(B.current,t)&&(B.current=t,ja.flushSync(()=>{j(t)}))})},[S,a,o,H,V]);$w(()=>{!1===v&&B.current.isPositioned&&(B.current.isPositioned=!1,j(e=>(0,i.A)((0,i.A)({},e),{},{isPositioned:!1})))},[v]);const $=s.useRef(!1);$w(()=>($.current=!0,()=>{$.current=!1}),[]),$w(()=>{if(L&&(I.current=L),F&&(U.current=F),L&&F){if(q.current)return q.current(L,F,Y);Y()}},[L,F,Y,q,W]);const Q=s.useMemo(()=>({reference:I,floating:U,setReference:T,setFloating:D}),[T,D]),K=s.useMemo(()=>({reference:L,floating:F}),[L,F]),G=s.useMemo(()=>{const e={position:o,left:0,top:0};if(!K.floating)return e;const t=Gw(K.floating,w.x),n=Gw(K.floating,w.y);return g?(0,i.A)((0,i.A)({},e),{},{transform:"translate("+t+"px, "+n+"px)"},Kw(K.floating)>=1.5&&{willChange:"transform"}):{position:o,left:t,top:n}},[o,g,K.floating,w.x,w.y]);return s.useMemo(()=>(0,i.A)((0,i.A)({},w),{},{update:Y,refs:Q,elements:K,floatingStyles:G}),[w,Y,Q,K,G])}({strategy:"fixed",placement:G,whileElementsMounted:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Fw(...t,{animationFrame:"always"===z})},elements:{reference:L.anchor},middleware:[Jw({mainAxis:g+K,alignmentAxis:y}),N&&Zw((0,i.A)({mainAxis:!0,crossAxis:!1,limiter:"partial"===P?ej():void 0},ee)),N&&tj((0,i.A)({},ee)),nj((0,i.A)((0,i.A)({},ee),{},{apply:e=>{let t=e.elements,n=e.rects,a=e.availableWidth,s=e.availableHeight;const r=n.reference,o=r.width,i=r.height,l=t.floating.style;l.setProperty("--radix-popper-available-width","".concat(a,"px")),l.setProperty("--radix-popper-available-height","".concat(s,"px")),l.setProperty("--radix-popper-anchor-width","".concat(o,"px")),l.setProperty("--radix-popper-anchor-height","".concat(i,"px"))}})),V&&sj({element:V,padding:j}),Oj({arrowWidth:Q,arrowHeight:K}),R&&aj((0,i.A)({strategy:"referenceHidden"},ee))]}),ne=te.refs,ae=te.floatingStyles,se=te.placement,re=te.isPositioned,oe=te.middlewareData,ie=zj(se),le=(0,De.A)(ie,2),ce=le[0],de=le[1],ue=cl(T);$i(()=>{re&&(null===ue||void 0===ue||ue())},[re,ue]);const he=null===(r=oe.arrow)||void 0===r?void 0:r.x,me=null===(o=oe.arrow)||void 0===o?void 0:o.y,pe=0!==(null===(l=oe.arrow)||void 0===l?void 0:l.centerOffset),fe=s.useState(),ge=(0,De.A)(fe,2),xe=ge[0],ve=ge[1];return $i(()=>{U&&ve(window.getComputedStyle(U).zIndex)},[U]),(0,_e.jsx)("div",{ref:ne.setFloating,"data-radix-popper-content-wrapper":"",style:(0,i.A)((0,i.A)({},ae),{},{transform:re?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[null===(c=oe.transformOrigin)||void 0===c?void 0:c.x,null===(d=oe.transformOrigin)||void 0===d?void 0:d.y].join(" ")},(null===(u=oe.hide)||void 0===u?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}),dir:e.dir,children:(0,_e.jsx)(Aj,{scope:h,placedSide:ce,onArrowChange:Y,arrowX:he,arrowY:me,shouldHideArrow:pe,children:(0,_e.jsx)(ll.div,(0,i.A)((0,i.A)({"data-side":ce,"data-align":de},D),{},{ref:W,style:(0,i.A)((0,i.A)({},D.style),{},{animation:re?void 0:"none"})}))})})});Cj.displayName=kj;var Ej="PopperArrow",Pj={top:"bottom",right:"left",bottom:"top",left:"right"},Mj=s.forwardRef(function(e,t){const n=e.__scopePopper,a=(0,Pe.A)(e,dj),s=_j(Ej,n),r=Pj[s.placedSide];return(0,_e.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[r]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,_e.jsx)(ij,(0,i.A)((0,i.A)({},a),{},{ref:t,style:(0,i.A)((0,i.A)({},a.style),{},{display:"block"})}))})});function Rj(e){return null!==e}Mj.displayName=Ej;var Oj=e=>({name:"transformOrigin",options:e,fn(t){var n,a,s,r,o;const i=t.placement,l=t.rects,c=t.middlewareData,d=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),u=d?0:e.arrowWidth,h=d?0:e.arrowHeight,m=zj(i),p=(0,De.A)(m,2),f=p[0],g={start:"0%",center:"50%",end:"100%"}[p[1]],x=(null!==(a=null===(s=c.arrow)||void 0===s?void 0:s.x)&&void 0!==a?a:0)+u/2,v=(null!==(r=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==r?r:0)+
2h/2;let b="",y="";return"bottom"===f?(b=d?g:"".concat(x,"px"),y="".concat(-h,"px")):"top"===f?(b=d?g:"".concat(x,"px"),y="".concat(l.floating.height+h,"px")):"right"===f?(b="".concat(-h,"px"),y=d?g:"".concat(v,"px")):"left"===f&&(b="".concat(l.floating.width+h,"px"),y=d?g:"".concat(v,"px")),{data:{x:b,y:y}}}});function zj(e){const t=e.split("-"),n=(0,De.A)(t,2),a=n[0],s=n[1];return[a,void 0===s?"center":s]}var Tj=yj,Dj=jj,Lj=Cj,Fj=Mj;const Ij=["__scopePopover"],Uj=["__scopePopover"],Bj=["forceMount"],Wj=["__scopePopover","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],qj=["__scopePopover"],Hj=["__scopePopover"];var Vj="Popover",Yj=Vi(Vj,[fj]),$j=(0,De.A)(Yj,2),Qj=$j[0],Kj=($j[1],fj()),Gj=Qj(Vj),Xj=(0,De.A)(Gj,2),Jj=Xj[0],Zj=Xj[1],ek=e=>{const t=e.__scopePopover,n=e.children,a=e.open,r=e.defaultOpen,o=e.onOpenChange,l=e.modal,c=void 0!==l&&l,d=Kj(t),u=s.useRef(null),h=s.useState(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=Ji({prop:a,defaultProp:null!==r&&void 0!==r&&r,onChange:o,caller:Vj}),x=(0,De.A)(g,2),v=x[0],b=x[1];return(0,_e.jsx)(Tj,(0,i.A)((0,i.A)({},d),{},{children:(0,_e.jsx)(Jj,{scope:t,contentId:Gi(),triggerRef:u,open:v,onOpenChange:b,onOpenToggle:s.useCallback(()=>b(e=>!e),[b]),hasCustomAnchor:p,onCustomAnchorAdd:s.useCallback(()=>f(!0),[]),onCustomAnchorRemove:s.useCallback(()=>f(!1),[]),modal:c,children:n})}))};ek.displayName=Vj;var tk="PopoverAnchor",nk=s.forwardRef((e,t)=>{const n=e.__scopePopover,a=(0,Pe.A)(e,Ij),r=Zj(tk,n),o=Kj(n),l=r.onCustomAnchorAdd,c=r.onCustomAnchorRemove;return s.useEffect(()=>(l(),()=>c()),[l,c]),(0,_e.jsx)(Dj,(0,i.A)((0,i.A)((0,i.A)({},o),a),{},{ref:t}))});nk.displayName=tk;var ak="PopoverTrigger",sk=s.forwardRef((e,t)=>{const n=e.__scopePopover,a=(0,Pe.A)(e,Uj),s=Zj(ak,n),r=Kj(n),o=Wi(t,s.triggerRef),l=(0,_e.jsx)(ll.button,(0,i.A)((0,i.A)({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":yk(s.open)},a),{},{ref:o,onClick:Ii(e.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?l:(0,_e.jsx)(Dj,(0,i.A)((0,i.A)({asChild:!0},r),{},{children:l}))});sk.displayName=ak;var rk="PopoverPortal",ok=Qj(rk,{forceMount:void 0}),ik=(0,De.A)(ok,2),lk=ik[0],ck=ik[1],dk=e=>{const t=e.__scopePopover,n=e.forceMount,a=e.children,s=e.container,r=Zj(rk,t);return(0,_e.jsx)(lk,{scope:t,forceMount:n,children:(0,_e.jsx)(Ol,{present:n||r.open,children:(0,_e.jsx)(Rl,{asChild:!0,container:s,children:a})})})};dk.displayName=rk;var uk="PopoverContent",hk=s.forwardRef((e,t)=>{const n=ck(uk,e.__scopePopover),a=e.forceMount,s=void 0===a?n.forceMount:a,r=(0,Pe.A)(e,Bj),o=Zj(uk,e.__scopePopover);return(0,_e.jsx)(Ol,{present:s||o.open,children:o.modal?(0,_e.jsx)(pk,(0,i.A)((0,i.A)({},r),{},{ref:t})):(0,_e.jsx)(fk,(0,i.A)((0,i.A)({},r),{},{ref:t}))})});hk.displayName=uk;var mk=tl("PopoverContent.RemoveScroll"),pk=s.forwardRef((e,t)=>{const n=Zj(uk,e.__scopePopover),a=s.useRef(null),r=Wi(t,a),o=s.useRef(!1);return s.useEffect(()=>{const e=a.current;if(e)return Dc(e)},[]),(0,_e.jsx)(Cc,{as:mk,allowPinchZoom:!0,children:(0,_e.jsx)(gk,(0,i.A)((0,i.A)({},e),{},{ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ii(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:Ii(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,a=2===t.button||n;o.current=a},{checkForDefaultPrevented:!1}),onFocusOutside:Ii(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})}))})}),fk=s.forwardRef((e,t)=>{const n=Zj(uk,e.__scopePopover),a=s.useRef(!1),r=s.useRef(!1);return(0,_e.jsx)(gk,(0,i.A)((0,i.A)({},e),{},{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var s,o;(null===(s=e.onCloseAutoFocus)||void 0===s||s.call(e,t),t.defaultPrevented)||(a.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault());a.current=!1,r.current=!1},onInteractOutside:t=>{var s,o;null===(s=e.onInteractOutside)||void 0===s||s.call(e,t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const i=t.target;(null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}}))}),gk=s.forwardRef((e,t)=>
2{const n=e.__scopePopover,a=e.trapFocus,s=e.onOpenAutoFocus,r=e.onCloseAutoFocus,o=e.disableOutsidePointerEvents,l=e.onEscapeKeyDown,c=e.onPointerDownOutside,d=e.onFocusOutside,u=e.onInteractOutside,h=(0,Pe.A)(e,Wj),m=Zj(uk,n),p=Kj(n);return Dl(),(0,_e.jsx)(Nl,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:r,children:(0,_e.jsx)(gl,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>m.onOpenChange(!1),children:(0,_e.jsx)(Lj,(0,i.A)((0,i.A)((0,i.A)({"data-state":yk(m.open),role:"dialog",id:m.contentId},p),h),{},{ref:t,style:(0,i.A)((0,i.A)({},h.style),{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"})}))})})}),xk="PopoverClose",vk=s.forwardRef((e,t)=>{const n=e.__scopePopover,a=(0,Pe.A)(e,qj),s=Zj(xk,n);return(0,_e.jsx)(ll.button,(0,i.A)((0,i.A)({type:"button"},a),{},{ref:t,onClick:Ii(e.onClick,()=>s.onOpenChange(!1))}))});vk.displayName=xk;var bk=s.forwardRef((e,t)=>{const n=e.__scopePopover,a=(0,Pe.A)(e,Hj),s=Kj(n);return(0,_e.jsx)(Fj,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});function yk(e){return e?"open":"closed"}bk.displayName="PopoverArrow";var wk=dk,jk=hk;const kk=["className","align","sideOffset"],Nk=ek,Sk=sk,Ak=s.forwardRef((e,t)=>{let n=e.className,a=e.align,s=void 0===a?"center":a,r=e.sideOffset,o=void 0===r?4:r,l=(0,Pe.A)(e,kk);return(0,_e.jsx)(wk,{children:(0,_e.jsx)(jk,(0,i.A)({ref:t,align:s,sideOffset:o,className:Ku("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",n)},l))})});var _k;Ak.displayName=jk.displayName;const Ck=Array.from({length:12},(e,t)=>t+1),Ek=[0,15,30,45],Pk=(null===(_k=Intl.DateTimeFormat().resolvedOptions().timeZone)||void 0===_k?void 0:_k.replace(/_/g," "))||"local time",Mk=e=>{let t=e.value,n=e.onChange,a=e.testId,r=void 0===a?"datetime":a;const o=(0,s.useState)(!1),i=(0,De.A)(o,2),l=i[0],c=i[1],d=t||null,u=d?d.getHours():6,h=u%12===0?12:u%12,m=u>=12?"PM":"AM",p=d?Ek.reduce((e,t)=>Math.abs(t-d.getMinutes())<Math.abs(e-d.getMinutes())?t:e):0,f=function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;const a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:h)%12+("PM"===(arguments.length>3&&void 0!==arguments[3]?arguments[3]:m)?12:0);n(xx(vx(bx(e||d||new Date),a),t))};return(0,_e.jsxs)(Nk,{open:l,onOpenChange:c,children:[(0,_e.jsx)(Sk,{asChild:!0,children:(0,_e.jsxs)("button",{type:"button",className:"mt-3 flex w-full sm:w-auto items-center gap-3 rounded-xl border border-white/15 bg-white/5 px-4 py-3 text-left hover:border-sky-400/60 transition-colors","data-testid":"".concat(r,"-trigger"),children:[(0,_e.jsx)(Hh,{size:18,className:"text-sky-300 shrink-0"}),(0,_e.jsxs)("span",{className:"min-w-0",children:[(0,_e.jsx)("span",{className:"block text-sm font-semibold","data-testid":"".concat(r,"-display"),children:d?gv(d,"EEEE, MMMM d, yyyy"):"Pick a date"}),(0,_e.jsx)("span",{className:"block text-xs text-slate-400",children:d?"".concat(gv(d,"h:mm a")," \xb7 ").concat(Pk):"and a time"})]})]})}),(0,_e.jsx)(Ak,{align:"start",className:"w-auto p-0 card-surface border-white/10","data-testid":"".concat(r,"-popover"),children:(0,_e.jsxs)("div",{className:"flex flex-col sm:flex-row",children:[(0,_e.jsx)(vy,{mode:"single",selected:d||void 0,onSelect:e=>e&&f(e),disabled:e=>vv(e,bx(new Date)),initialFocus:!0}),(0,_e.jsxs)("div",{className:"border-t sm:border-t-0 sm:border-l border-white/10 p-4 sm:w-52 space-y-3",children:[(0,_e.jsxs)("p",{className:"eyebrow flex items-center gap-1.5",children:[(0,_e.jsx)(_i,{size:12})," Time"]}),(0,_e.jsxs)("div",{className:"grid grid-cols-3 gap-1.5",children:[(0,_e.jsx)("select",{value:h,onChange:e=>f(d,Number(e.target.value)),className:"h-9 rounded-md bg-white/5 border border-white/10 px-2 text-sm","aria-label":"Hour","data-testid":"".concat(r,"-hour"),children:Ck.map(e=>(0,_e.jsx)("option",{value:e,children:e},e))}),(0,_e.jsx)("select",{value:p,onChange:e=>f(d,h,Number(e.target.value)),className:"h-9 rounded-md bg-white/5 border border-white/10 px-2 text-sm","aria-label":"Minutes","data-testid":"".concat(r,"-minute"),children:Ek.map(e=>(0,_e.jsx)("option",{value:e,children:String(e).padStart(2,"0")},e))}),(0,_e.jsx)("div",{className:"inline-flex rounded-md bg-white/5 border border-white/10 p-0.5","data-testid":"".concat(r,"-ampm"),children:["AM","PM"].map(e=>(0,_e.jsx)("button",{type:"button",onClick:()=>f(d,h,p,e),className:"flex-1 rounded px-1 text-xs font-bold ".concat(m===e?"bg-sky-4
200 text-[#070F1E]":"text-slate-300"),"data-testid":"".concat(r,"-").concat(e.toLowerCase()),children:e},e))})]}),(0,_e.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[["6:00 AM",6,0],["12:00 PM",12,0],["5:00 PM",17,0]].map(e=>{let t=(0,De.A)(e,3),a=t[0],s=t[1],o=t[2];return(0,_e.jsx)("button",{type:"button",onClick:()=>n(xx(vx(bx(d||new Date),s),o)),className:"rounded-full bg-white/5 px-2.5 py-1 text-[11px] font-semibold text-slate-300 hover:bg-white/10 hover:text-white","data-testid":"".concat(r,"-preset-").concat(s),children:a},a)})}),(0,_e.jsxs)("p",{className:"text-[11px] text-slate-500",children:["Times are in your local timezone (",Pk,")."]}),(0,_e.jsx)("button",{type:"button",onClick:()=>c(!1),className:"w-full rounded-full bg-sky-400 py-1.5 text-xs font-bold text-[#070F1E] hover:bg-sky-300","data-testid":"".concat(r,"-done"),children:"Done"})]})]})})]})},Rk=e=>{let t=e.drafts,n=e.activeId,a=e.showName,s=e.onResume,r=e.onDelete;return t.length?(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-5","data-testid":"drafts-card",children:[(0,_e.jsxs)("p",{className:"eyebrow mb-3 flex items-center gap-1.5",children:[(0,_e.jsx)(Fp,{size:12})," Drafts"]}),(0,_e.jsx)("div",{className:"space-y-2",children:t.map((e,t)=>(0,_e.jsxs)("div",{className:"rounded-xl border p-3 ".concat(e.id===n?"border-sky-400/60 bg-sky-400/10":"border-white/10 bg-white/[0.03]"),"data-testid":"draft-".concat(t),children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate","data-testid":"draft-title-".concat(t),children:e.title||"Untitled episode"}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[a(e.show_id)||"No show yet"," \xb7 saved ",Oo(e.updated_at),e.audio?" \xb7 audio attached":" \xb7 no audio yet"]}),(0,_e.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[e.id!==n&&(0,_e.jsxs)("button",{type:"button",onClick:()=>s(e),className:"inline-flex items-center gap-1 rounded-full bg-white/10 px-2.5 py-1 text-[11px] font-bold text-white hover:bg-white/20","data-testid":"draft-resume-".concat(t),children:[(0,_e.jsx)(ti,{size:11})," Resume"]}),e.id===n&&(0,_e.jsx)("span",{className:"rounded-full bg-sky-400 px-2.5 py-1 text-[11px] font-bold text-[#070F1E]",children:"Editing"}),(0,_e.jsx)("button",{type:"button",onClick:()=>r(e),className:"ml-auto p-1.5 text-slate-400 hover:text-rose-400","aria-label":"Delete draft","data-testid":"draft-delete-".concat(t),children:(0,_e.jsx)(Mm,{size:14})})]})]},e.id))})]}):null},Ok=["__scopeAlertDialog"],zk=["__scopeAlertDialog"],Tk=["__scopeAlertDialog"],Dk=["__scopeAlertDialog"],Lk=["__scopeAlertDialog","children"],Fk=["__scopeAlertDialog"],Ik=["__scopeAlertDialog"],Uk=["__scopeAlertDialog"],Bk=["__scopeAlertDialog"];var Wk="AlertDialog",qk=Vi(Wk,[Kc]),Hk=(0,De.A)(qk,2),Vk=Hk[0],Yk=(Hk[1],Kc()),$k=e=>{const t=e.__scopeAlertDialog,n=(0,Pe.A)(e,Ok),a=Yk(t);return(0,_e.jsx)(Rd,(0,i.A)((0,i.A)((0,i.A)({},a),n),{},{modal:!0}))};$k.displayName=Wk;var Qk=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,zk),s=Yk(n);return(0,_e.jsx)(Od,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});Qk.displayName="AlertDialogTrigger";var Kk=e=>{const t=e.__scopeAlertDialog,n=(0,Pe.A)(e,Tk),a=Yk(t);return(0,_e.jsx)(zd,(0,i.A)((0,i.A)({},a),n))};Kk.displayName="AlertDialogPortal";var Gk=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,Dk),s=Yk(n);return(0,_e.jsx)(Td,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});Gk.displayName="AlertDialogOverlay";var Xk="AlertDialogContent",Jk=Vk(Xk),Zk=(0,De.A)(Jk,2),eN=Zk[0],tN=Zk[1],nN=rl("AlertDialogContent"),aN=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=e.children,r=(0,Pe.A)(e,Lk),o=Yk(n),l=s.useRef(null),c=Wi(t,l),d=s.useRef(null);return(0,_e.jsx)(Cd,{contentName:Xk,titleName:sN,docsSlug:"alert-dialog",children:(0,_e.jsx)(eN,{scope:n,cancelRef:d,children:(0,_e.jsxs)(Dd,(0,i.A)((0,i.A)((0,i.A)({role:"alertdialog"},o),r),{},{ref:c,onOpenAutoFocus:Ii(r.onOpenAutoFocus,e=>{var t;e.preventDefault(),null===(t=d.current)||void 0===t||t.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,_e.jsx)(nN,{children:a}),(0,_e.jsx)(uN,{contentRef:l})]}))})})});aN.displayName=Xk;var sN="AlertDialogTitle",rN=s.forwardRef((e,t)=>
2{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,Fk),s=Yk(n);return(0,_e.jsx)(Ld,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});rN.displayName=sN;var oN="AlertDialogDescription",iN=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,Ik),s=Yk(n);return(0,_e.jsx)(Fd,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});iN.displayName=oN;var lN=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,Uk),s=Yk(n);return(0,_e.jsx)(Id,(0,i.A)((0,i.A)((0,i.A)({},s),a),{},{ref:t}))});lN.displayName="AlertDialogAction";var cN="AlertDialogCancel",dN=s.forwardRef((e,t)=>{const n=e.__scopeAlertDialog,a=(0,Pe.A)(e,Bk),s=tN(cN,n).cancelRef,r=Yk(n),o=Wi(t,s);return(0,_e.jsx)(Id,(0,i.A)((0,i.A)((0,i.A)({},r),a),{},{ref:o}))});dN.displayName=cN;var uN=e=>{let t=e.contentRef;const n="`".concat(Xk,"` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the `").concat(Xk,"` by passing a `").concat(oN,"` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an `id` and passing the same value to the `aria-describedby` prop in `").concat(Xk,"`. If the description is confusing or duplicative for sighted users, you can use the `@radix-ui/react-visually-hidden` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog");return s.useEffect(()=>{var e;document.getElementById(null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby"))||console.warn(n)},[n,t]),null},hN=Gk,mN=aN,pN=lN,fN=dN,gN=rN,xN=iN;const vN=["className"],bN=["className"],yN=["className"],wN=["className"],jN=["className"],kN=["className"],NN=["className"],SN=["className"],AN=$k,_N=Kk,CN=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,vN);return(0,_e.jsx)(hN,(0,i.A)((0,i.A)({className:Ku("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},a),{},{ref:t}))});CN.displayName=hN.displayName;const EN=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,bN);return(0,_e.jsxs)(_N,{children:[(0,_e.jsx)(CN,{}),(0,_e.jsx)(mN,(0,i.A)({ref:t,className:Ku("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n)},a))]})});EN.displayName=mN.displayName;const PN=e=>{let t=e.className,n=(0,Pe.A)(e,yN);return(0,_e.jsx)("div",(0,i.A)({className:Ku("flex flex-col space-y-2 text-center sm:text-left",t)},n))};PN.displayName="AlertDialogHeader";const MN=e=>{let t=e.className,n=(0,Pe.A)(e,wN);return(0,_e.jsx)("div",(0,i.A)({className:Ku("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t)},n))};MN.displayName="AlertDialogFooter";const RN=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,jN);return(0,_e.jsx)(gN,(0,i.A)({ref:t,className:Ku("text-lg font-semibold",n)},a))});RN.displayName=gN.displayName;const ON=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,kN);return(0,_e.jsx)(xN,(0,i.A)({ref:t,className:Ku("text-sm text-muted-foreground",n)},a))});ON.displayName=xN.displayName;const zN=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,NN);return(0,_e.jsx)(pN,(0,i.A)({ref:t,className:Ku(Th(),n)},a))});zN.displayName=pN.displayName;const TN=s.forwardRef((e,t)=>{let n=e.className,a=(0,Pe.A)(e,SN);return(0,_e.jsx)(fN,(0,i.A)({ref:t,className:Ku(Th({variant:"outline"}),"mt-2 sm:mt-0",n)},a))});TN.displayName=fN.displayName;const DN=e=>{var t;let n=e.grade,a=e.open,s=e.onOpenChange,r=e.onConfirm,o=e.onReview;return(0,_e.jsx)(AN,{open:a,onOpenChange:s,children:(0,_e.jsxs)(EN,{className:"bg-[#0B1526] border-white/10 text-white","data-testid":"low-grade-confirm",children:[(0,_e.jsxs)(PN,{children:[(0,_e.jsxs)("div",{className:"flex items-center gap-3",children:[n&&(0,_e.jsx)("span",{className:"inline-flex h-12 w-12 items-center justify-center rounded-xl border font-display text-2xl font-black ".concat(Vf(n.score)),children:n.grade}),(0,_e.jsxs)(RN,{className:"font-display text-lg font-extrabold",children:["Publish with a ",null===n||void 0===n?void 0:n.grade," summary?"]})]}),(0,_e.jsxs)(ON,{className:"text-slate-400 pt-2",children:["Your summary scored ",null===n||void 0===n?void 0:n.score,"/100. Summaries graded D+ or lower are less likely to surface in Spotify, Apple Podcasts and Google search. A couple of minutes of edits usually lifts it a full grade."]})]}),(null===n||void 0===n||null===(t=n.improvements)||void 0===t?void 0:t.length)>0&&(0,_e.jsx)("ul",{className:"text-sm text-slate-200 space-y-1.5 rounded-xl bg-amber-400/5 border border-amber-400/20 p-3","data-testid":"low-grade-tips",children:n.improvements.slice(0,3).map((e,t)=>(0,_e.jsxs)("li",{className:"flex gap-2",children:[(0,_e.jsx)("span",{className:"text-amber-300",children:"\u2022"}),(0,_e.jsx)("span",{children:e})]},t))}),(0,_e.jsxs)(MN,{children:[(0,_e.jsx)(TN,{onClick:o,className:"rounded-full border-white/15 bg-transparent text-white hover:bg-white/10","data-testid":"low-grade-improve-button",children:"Improve the summary"}),(0,_e.jsx)(zN,{onClick:r,className:"rounded-full bg-rose-500 text-white hover:bg-rose-400","data-testid":"low-grade-submit-anyway-button",children:"Submit anyway"})]})]})})},LN=Jo("arrow-left-to-line",[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]]),FN=/^(\d{1,2}:)?\d{1,2}:\d{2}$/,IN=e=>{const t=e.split(":").map(Number);return 3===t.length?3600*t[0]+60*t[1]+t[2]:60*t[0]+t[1]},UN=e=>
2{let t=e.chapters,n=e.onChange;const a=(e,a,s)=>n(t.map((t,n)=>n===e?(0,i.A)((0,i.A)({},t),{},{[a]:s}):t));return(0,_e.jsxs)("div",{className:"rounded-xl bg-white/[0.03] border border-white/10 p-2.5","data-testid":"chapter-editor",children:[(0,_e.jsxs)("p",{className:"text-[10px] uppercase tracking-wider text-slate-400 font-mono flex items-center gap-1.5 mb-1.5",children:[(0,_e.jsx)(_i,{size:10})," Chapters ",(0,_e.jsx)("span",{className:"normal-case tracking-normal text-slate-500",children:"\xb7 edit times and titles"})]}),0===t.length&&(0,_e.jsx)("p",{className:"text-[11px] text-slate-500 mb-1.5","data-testid":"chapter-editor-empty",children:"No chapters yet \u2014 add one below."}),(0,_e.jsx)("ul",{className:"space-y-1",children:t.map((e,s)=>{const r=e.time.trim()&&!FN.test(e.time.trim());return(0,_e.jsxs)("li",{className:"flex items-center gap-1.5","data-testid":"chapter-row-".concat(s),children:[(0,_e.jsx)("input",{value:e.time,onChange:e=>a(s,"time",e.target.value),placeholder:"00:00",className:"w-16 shrink-0 rounded-md border bg-white/5 px-1.5 py-1 font-mono text-[11px] text-white outline-none focus:border-sky-400 ".concat(r?"border-rose-500/60":"border-white/10"),title:r?"Use MM:SS or H:MM:SS":void 0,"data-testid":"chapter-time-".concat(s)}),(0,_e.jsx)("input",{value:e.title,onChange:e=>a(s,"title",e.target.value),placeholder:"Chapter title",maxLength:60,className:"min-w-0 flex-1 rounded-md border bg-white/5 px-2 py-1 text-[11px] text-white outline-none focus:border-sky-400 ".concat(e.title.length>40?"border-amber-400/50":"border-white/10"),title:e.title.length>40?"Spotify recommends under 40 characters":void 0,"data-testid":"chapter-title-".concat(s)}),(0,_e.jsx)("button",{type:"button",onClick:()=>(e=>n(t.filter((t,n)=>n!==e)))(s),className:"p-1 text-slate-500 hover:text-rose-400","aria-label":"Remove chapter","data-testid":"chapter-remove-".concat(s),children:(0,_e.jsx)(Mm,{size:12})})]},s)})}),(0,_e.jsxs)("button",{type:"button",onClick:()=>n([...t,{time:"",title:""}]),className:"mt-1.5 inline-flex items-center gap-1 text-[11px] font-semibold text-sky-300 hover:text-sky-200","data-testid":"chapter-add",children:[(0,_e.jsx)(Rm,{size:11})," Add chapter"]}),t.length>0&&t.length<3&&(0,_e.jsx)("p",{className:"mt-1 text-[10px] text-amber-300/80","data-testid":"chapter-min-hint",children:"Spotify needs at least 3 chapters to recognise them."})]})},BN=e=>{var t;let n=e.title,a=e.audio,r=e.onUse,o=e.onDuration;const l=(0,s.useState)(""),c=(0,De.A)(l,2),d=c[0],u=c[1],h=(0,s.useState)(!1),m=(0,De.A)(h,2),p=m[0],f=m[1],g=(null===a||void 0===a?void 0:a.duration)||(e=>{const t=e.trim().split(":").map(e=>parseInt(e,10));return t.some(e=>Number.isNaN(e))?null:3===t.length?3600*t[0]+60*t[1]+t[2]:2===t.length?60*t[0]+t[1]:1===t.length?60*t[0]:null})(d)||null,x=(0,s.useRef)(o);x.current=o,(0,s.useEffect)(()=>{null!==a&&void 0!==a&&a.upload_id&&!a.duration&&(f(!0),Eo.get("/portal/uploads/".concat(a.upload_id,"/duration")).then(e=>{var t;e.data.duration&&(null===(t=x.current)||void 0===t||t.call(x,e.data.duration))}).catch(()=>{}).finally(()=>f(!1)))},[null===a||void 0===a?void 0:a.upload_id,null===a||void 0===a?void 0:a.duration]);const v=(0,s.useState)(""),b=(0,De.A)(v,2),y=b[0],w=b[1],j=(0,s.useState)(""),k=(0,De.A)(j,2),N=k[0],S=k[1],A=(0,s.useState)(!1),_=(0,De.A)(A,2),C=_[0],E=_[1],P=(0,s.useState)(null),M=(0,De.A)(P,2),R=M[0],O=M[1],z=(0,s.useState)(""),T=(0,De.A)(z,2),D=T[0],L=T[1],F=(0,s.useState)([]),I=(0,De.A)(F,2),U=I[0],B=I[1],W=(0,s.useState)(!1),q=(0,De.A)(W,2),H=q[0],V=q[1],Y=R?((e,t)=>{const n=t.filter(e=>FN.test(e.time.trim())&&e.title.trim()).sort((e,t)=>IN(e.time)-IN(t.time));return n.length?"".concat(e.trim(),"\n\nTimestamps:\n").concat(n.map(e=>"".concat(e.time.trim()," - ").concat(e.title.trim())).join("\n")):e.trim()})(D,U):"",$=(0,s.useState)(!1),Q=(0,De.A)($,2),K=Q[0],G=Q[1],X=(0,s.useRef)(null),J=e=>{if(!e)return;if(e.size>2097152)return Ta.error("Transcript files must be under 2 MB");const t=new FileReader;t.onload=()=>{w(String(t.result||"")),S(e.name),O(null)},t.onerror=()=>Ta.error("Couldn't read that file"),t.readAsText(e)},Z=[!(null!==n&&void 0!==n&&n.trim())&&"the episode title",!g&&(a?"the episode length":"the episode audio"),y.trim().length<500&&"a transcript of at least 500 characters"].filter(
2Boolean);return(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-5","data-testid":"summary-tool-card",children:[(0,_e.jsxs)("p",{className:"eyebrow mb-1 flex items-center gap-1.5",children:[(0,_e.jsx)(Fp,{size:12})," Summary tool"]}),(0,_e.jsx)("p",{className:"text-[11px] text-slate-500",children:"Upload your episode transcript and we'll draft an SEO-ready summary with timestamps, revised until it grades at least a B against the Underdog rules."}),(0,_e.jsxs)("div",{className:"mt-3 flex items-center gap-2 rounded-xl border px-3 py-2 text-[11px] ".concat(g?"border-emerald-400/30 bg-emerald-400/10 text-emerald-200":"border-amber-400/30 bg-amber-400/10 text-amber-200"),"data-testid":"summary-tool-audio-status",children:[g?(0,_e.jsx)(ax,{size:13,className:"shrink-0"}):(0,_e.jsx)(Lf,{size:13,className:"shrink-0"}),g?(0,_e.jsxs)("span",{children:["Episode length ",(0,_e.jsx)("span",{className:"font-mono font-bold","data-testid":"summary-tool-duration",children:lx(g)}),null!==a&&void 0!==a&&a.duration?" from your audio":" (entered manually)"," \u2014 used to place chapters."]}):a?(0,_e.jsxs)("span",{children:[p?"Reading the length of your audio\u2026":"Couldn't read the length of your audio."," ",!p&&"Enter it below so chapters can be placed."]}):(0,_e.jsx)("span",{children:"Upload the episode audio first (left) \u2014 its length is required to place the chapters."})]}),a&&!a.duration&&!p&&(0,_e.jsxs)("div",{className:"mt-2 flex items-center gap-2","data-testid":"summary-tool-manual-length",children:[(0,_e.jsx)("label",{className:"text-[11px] text-slate-400 shrink-0",children:"Episode length"}),(0,_e.jsx)("input",{value:d,onChange:e=>u(e.target.value),placeholder:"e.g. 48:20 or 1:02:15",className:"h-8 w-40 rounded-md border border-white/10 bg-white/5 px-2 font-mono text-xs text-white outline-none focus:border-sky-400","data-testid":"summary-tool-manual-length-input"})]}),!(null!==n&&void 0!==n&&n.trim())&&(0,_e.jsx)("p",{className:"mt-1.5 text-[11px] text-amber-300/90","data-testid":"summary-tool-title-hint",children:"Also enter the episode title on the left \u2014 the summary is written to build on it."}),Z.length>0&&(0,_e.jsxs)("p",{className:"mt-1.5 text-[11px] text-slate-500","data-testid":"summary-tool-missing",children:["Still needed: ",Z.join(", "),"."]}),(0,_e.jsxs)("label",{onDragOver:e=>{e.preventDefault(),G(!0)},onDragLeave:()=>G(!1),onDrop:e=>{var t;e.preventDefault(),G(!1),J(null===(t=e.dataTransfer.files)||void 0===t?void 0:t[0])},className:"mt-3 flex cursor-pointer flex-col items-center justify-center gap-1 rounded-2xl border border-dashed px-4 py-5 text-center transition-colors ".concat(K?"border-sky-400 bg-sky-4
200/10":"border-white/15 hover:bg-white/5"),"data-testid":"summary-tool-dropzone",children:[(0,_e.jsx)("input",{ref:X,type:"file",accept:".txt,.srt,.vtt,.md,.json,text/plain",className:"hidden",onChange:e=>{var t;return J(null===(t=e.target.files)||void 0===t?void 0:t[0])},"data-testid":"summary-tool-file-input"}),(0,_e.jsx)(af,{size:18,className:"text-slate-400"}),N?(0,_e.jsx)("span",{className:"text-xs font-semibold text-white truncate max-w-full","data-testid":"summary-tool-filename",children:N}):(0,_e.jsx)("span",{className:"text-xs font-semibold",children:"Drop a transcript or click to choose"}),(0,_e.jsx)("span",{className:"text-[10px] text-slate-500",children:".txt, .srt or .vtt \xb7 timestamps in the file become chapters"})]}),(0,_e.jsx)(am,{value:y,onChange:e=>{w(e.target.value),O(null)},rows:3,placeholder:"\u2026or paste the transcript here",className:"mt-2 bg-white/5 border-white/10 text-xs","data-testid":"summary-tool-text"}),(0,_e.jsxs)("div",{className:"mt-1 flex items-center justify-between text-[10px] text-slate-500",children:[(0,_e.jsx)("span",{"data-testid":"summary-tool-count",children:y.trim()?"".concat(y.trim().split(/\s+/).length.toLocaleString()," words"):""}),y&&(0,_e.jsxs)("button",{type:"button",onClick:()=>{w(""),S(""),O(null),X.current&&(X.current.value="")},className:"inline-flex items-center gap-1 hover:text-white","data-testid":"summary-tool-clear",children:[(0,_e.jsx)(ai,{size:10})," Clear"]})]}),(0,_e.jsxs)(Dh,{type:"button",onClick:async()=>{if(Z.length)return Ta.error("Before generating, add ".concat(Z.join(", ").replace(/, ([^,]*)$/," and $1"),"."));E(!0),O(null);try{const e=(await Eo.post("/portal/summary-from-transcript",{title:n,transcript:y,duration:g})).data;O(e),L(e.summary),B(e.chapters.map(e=>(0,i.A)({},e)))}catch(lS){Ta.error(Mo(lS))}finally{E(!1)}},disabled:C,"aria-disabled":Z.length>0,size:"sm",className:"mt-2 w-full rounded-full font-bold ".concat(Z.length?"bg-white/10 text-slate-300 hover:bg-white/15":"bg-sky-400 text-[#070F1E] hover:bg-sky-300"),"data-testid":"summary-tool-generate",children:[C?(0,_e.jsx)(sf,{size:14,className:"mr-1.5 animate-spin"}):(0,_e.jsx)(Ff,{size:14,className:"mr-1.5"}),C?"Reading the transcript\u2026":R?"Generate again":"Generate summary"]}),R&&(0,_e.jsxs)("div",{className:"mt-3 space-y-2","data-testid":"summary-tool-result",children:[(0,_e.jsx)("textarea",{value:D,onChange:e=>L(e.target.value),rows:8,className:"w-full rounded-xl bg-white/5 border border-white/10 p-3 text-xs leading-relaxed text-slate-100 resize-y focus:border-sky-400 outline-none","aria-label":"Generated summary (editable)","data-testid":"summary-tool-output"}),(0,_e.jsx)(UN,{chapters:U,onChange:B}),(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-slate-500",children:[(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-bold ".concat(Vf(R.grade.score)),"data-testid":"summary-tool-grade",children:["Grade ",(0,_e.jsx)("span",{className:"font-display text-xs leading-none",children:R.grade.grade})]}),(0,_e.jsxs)("span",{className:D.trim().length<600?"text-amber-300":"","data-testid":"summary-tool-length",children:[D.trim().length," chars",D.trim().length<600?" \u2014 add a line to reach 600":""]}),(0,_e.jsx)("span",{"data-testid":"summary-tool-chapters",children:U.length?"".concat(U.length," chapter").concat(1===U.length?"":"s").concat(R.approximate?" \xb7 times approximate":""):"no chapters found"})]}),(null===(t=R.notes)||void 0===t?void 0:t.length)>0&&(0,_e.jsx)("ul",{className:"text-[11px] text-amber-200/90 space-y-0.5","data-testid":"summary-tool-notes",children:R.notes.map(e=>(0,_e.jsxs)("li",{className:"flex gap-1.5",children:[(0,_e.jsx)("span",{children:"\u2022"}),(0,_e.jsx)("span",{children:e})]},e))}),R.approximate&&U.length>0&&(0,_e.jsxs)("p",{className:"text-[11px] text-amber-200/90 flex gap-1.5","data-testid":"summary-tool-approx",children:[(0,_e.jsx)(Lf,{size:12,className:"shrink-0 mt-0.5"}),(0,_e.jsx)("span",{children:"Your transcript had no timestamps, so chapter times are estimated from the episode length. Check them against the audio and adjust below before publishing."})]}),!R.target_met&&(0,_e.jsx)("p",{className:"text-[11px] text-rose-300","data-testid":"summary-tool-target-miss",children:"Couldn't get this one above a B after several passes \u2014 the transcript may be thin on specifics. Add a detail or tw
2o before publishing."}),(0,_e.jsxs)("div",{className:"flex gap-2",children:[(0,_e.jsxs)(Dh,{type:"button",size:"sm",variant:"outline",onClick:async()=>{try{await navigator.clipboard.writeText(Y),V(!0),setTimeout(()=>V(!1),1500)}catch(e){Ta.error("Couldn't copy \u2014 select the text and copy manually")}},className:"flex-1 rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"summary-tool-copy",children:[H?(0,_e.jsx)(Mi,{size:13,className:"mr-1.5 text-emerald-400"}):(0,_e.jsx)(Wf,{size:13,className:"mr-1.5"}),H?"Copied":"Copy"]}),(0,_e.jsxs)(Dh,{type:"button",size:"sm",onClick:()=>r(Y),className:"flex-1 rounded-full bg-emerald-400 text-[#06251A] font-bold hover:bg-emerald-300","data-testid":"summary-tool-use",children:[(0,_e.jsx)(LN,{size:13,className:"mr-1.5"})," Use as summary"]})]})]})]})},WN=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),qN=e=>e.length?new RegExp("\\b(".concat(e.map(WN).join("|"),")\\b"),"gi"):null,HN=(e,t)=>{if(!e)return[];const n=new Map;for(const a of t)for(const t of(a||"").matchAll(e))n.set(t[0].toLowerCase(),t[0]);return[...n.values()]},VN={pending_acast:{label:"Queued",cls:"bg-amber-400/15 text-amber-300",Icon:_i},scheduled:{label:"Scheduled",cls:"bg-sky-400/15 text-sky-300",Icon:_i},published:{label:"Published",cls:"bg-emerald-400/15 text-emerald-300",Icon:ym},failed:{label:"Needs attention",cls:"bg-rose-500/15 text-rose-400",Icon:Lf},rejected:{label:"Not published",cls:"bg-white/10 text-slate-400",Icon:Lf}},YN=600,$N=/\[[^\]\n]{3,}\]/g,QN=e=>e.match($N)||[],KN=()=>xx(vx(bx(Pv(new Date,1)),6),0),GN=()=>({show_id:"",title:"",description:"",when:"later",publish_at:KN(),image_url:"",audio:null,ad_mentions:""});function XN(){var e,t;const n=Lo(),a=n.user,r=n.logout,o=(0,s.useState)(null),l=(0,De.A)(o,2),c=l[0],d=l[1],u=(0,s.useState)([]),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(GN),g=(0,De.A)(f,2),x=g[0],v=g[1],b=(0,s.useState)(!1),y=(0,De.A)(b,2),w=y[0],j=y[1],k=(0,s.use
2State)([]),N=(0,De.A)(k,2),S=N[0],A=N[1],_=(0,s.useState)(null),C=(0,De.A)(_,2),E=C[0],P=C[1],M=(0,s.useState)(null),R=(0,De.A)(M,2),O=R[0],z=R[1],T=(0,s.useState)(!1),D=(0,De.A)(T,2),L=D[0],F=D[1],I=fa(),U=(0,De.A)(I,2),B=U[0],W=U[1],q=(0,s.useState)(!1),H=(0,De.A)(q,2),V=H[0],Y=H[1],$=(0,s.useState)(!1),Q=(0,De.A)($,2),K=Q[0],G=Q[1],X=((e,t)=>{const n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],i=(0,s.useState)(!1),l=(0,De.A)(i,2),c=l[0],d=l[1],u=(0,s.useState)(""),h=(0,De.A)(u,2),m=h[0],p=h[1],f=(0,s.useState)(0),g=(0,De.A)(f,2),x=g[0],v=g[1],b=(0,s.useRef)(0);return(0,s.useEffect)(()=>{const n=t.trim();if(n.length<100)return o(null),d(!1),void p("");d(!0),p("");const a=++b.current,s=setTimeout(()=>{Eo.post("/portal/summary-grade",{title:e,description:n}).then(e=>{b.current===a&&o(e.data)}).catch(e=>{var t,n;b.current===a&&(o(null),p((null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Grading is unavailable right now"))}).finally(()=>{b.current===a&&d(!1)})},1500);return()=>clearTimeout(s)},[e,t,x]),{grade:r,loading:c,error:m,retry:()=>v(e=>e+1)}})(x.title,x.description),J=X.grade,Z=X.loading,ee=X.error,te=X.retry,ne=function(){const e=(0,s.useState)({sportsbooks:[],profanity:[]}),t=(0,De.A)(e,2),n=t[0],a=t[1];(0,s.useEffect)(()=>{Eo.get("/portal/banned-terms").then(e=>a({sportsbooks:e.data.sportsbooks||[],profanity:e.data.profanity||[]})).catch(()=>{})},[]);const r=(0,s.useMemo)(()=>qN(n.sportsbooks),[n.sportsbooks]),o=(0,s.useMemo)(()=>qN(n.profanity),[n.profanity]);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];const d=l.join("\n");return(0,s.useMemo)(()=>({sportsbooks:HN(r,[d]),profanity:HN(o,[d])}),[r,o,d])}(x.description,x.title),ae=ne.sportsbooks,se=ne.profanity,re=(0,s.useRef)(null),oe=(0,s.useRef)(null),ie=(0,s.useRef)(null);(0,s.useEffect)(()=>{const e=()=>{const e=ie.current,t=re.current,n=oe.current;if(!e||!t||!n)return;if(window.innerWidth<1024)return void(e.style.height="");const a=n.getBoundingClientRect().bottom-t.getBoundingClientRect().bottom;e.style.height="".concat(Math.max(180,e.getBoundingClientRect().height+a),"px")},t=new ResizeObserver(()=>requestAnimationFrame(e));return oe.current&&t.observe(oe.current),re.current&&t.observe(re.current),window.addEventListener("resize",e),e(),()=>{t.disconnect(),window.removeEventListener("resize",e)}},[c,S,m,O]);const le=(e,t)=>v(n=>(0,i.A)((0,i.A)({},n),{},{[e]:t})),ce=()=>Eo.get("/portal/drafts").then(e=>A(e.data)).catch(()=>{}),de=()=>
2({show_id:x.show_id,title:x.title,description:x.description,publish_at:"later"===x.when&&x.publish_at?x.publish_at.toISOString():null,image_url:x.image_url,audio:x.audio,ad_mentions:x.ad_mentions}),ue=()=>Eo.get("/portal/submissions").then(e=>p(e.data)).catch(()=>{}),he=e=>{if("rejected"===e.status)return Ta.error("This submission wasn't published, so it can't be edited");z(e),P(null),v({show_id:e.show_id,title:e.title,description:e.description,when:e.publish_at?"later":"now",publish_at:e.publish_at?new Date(e.publish_at):KN(),image_url:e.image_url||"",audio:{upload_id:"existing",filename:e.audio_filename,size:e.audio_size,locked:!0},ad_mentions:e.ad_mentions||""}),window.scrollTo({top:0,behavior:"smooth"})},me=()=>{z(null),v((0,i.A)((0,i.A)({},GN()),{},{show_id:1===(null===c||void 0===c?void 0:c.shows.length)?c.shows[0].id:""}))},pe=m.filter(e=>"published"===e.status).slice(0,3);if((0,s.useEffect)(()=>{const e=B.get("edit");if(!e||!m.length)return;const t=m.find(t=>t.id===e);t&&he(t),W({},{replace:!0})},[m,B]),(0,s.useEffect)(()=>{("podcaster"===(null===a||void 0===a?void 0:a.role)||"admin"===(null===a||void 0===a?void 0:a.role)&&null!==a&&void 0!==a&&a.team_id)&&(Eo.get("/portal/me").then(e=>{d(e.data),1===e.data.shows.length&&v(t=>(0,i.A)((0,i.A)({},t),{},{show_id:e.data.shows[0].id,image_url:t.image_url||e.data.shows[0].cover_url||""}))}).catch(()=>d({shows:[]})),ue(),ce())},[a]),null===a)return(0,_e.jsx)("div",{className:"min-h-screen flex items-center justify-center text-slate-400",children:"Loading\u2026"});if(!1===a)return(0,_e.jsx)(kn,{to:"/admin/login",replace:!0});if(!("podcaster"===a.role||"admin"===a.role&&a.team_id))return(0,_e.jsx)(kn,{to:"/admin",replace:!0});const fe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===e||void 0===e||e.preventDefault(),!x.show_id)return Ta.error("Pick a show");if(x.description.trim().length<YN)return Ta.error("Summary needs at least ".concat(YN," characters (").concat(x.description.trim().length," so far)"));const n=QN(x.description);if(n.length)return Ta.error("Replace the ".concat(1===n.length?"placeholder":"".concat(n.length," placeholders")," in your summary first: ").concat(n[0]));if(ae.length)return Ta.error("Remove the sportsbook name".concat(1===ae.length?"":"s"," before publishing: ").concat(ae.join(", ")));if(se.length)return Ta.error("Remove the profanity before publishing: ".concat(se.join(", ")));if(!x.image_url)return Ta.error("Upload the episode artwork");if(!x.audio)return Ta.error("Upload the episode audio first");if("later"===x.when&&!x.publish_at)return Ta.error("Choose a publish date and time");if("later"===x.when&&x.publish_at<new Date&&"published"!==(null===O||void 0===O?void 0:O.status))return Ta.error("The scheduled time is in the past");const a=Eg(x.ad_mentions);if(a.length&&a.length<5)return Ta.error("Ad mention timecodes need at least ".concat(5," entries (").concat(a.length," so far) \u2014 or clear the box if there are none"));if(!t&&null!==J&&void 0!==J&&J.needs_confirm)return G(!0);j(!0);try{if(O){const e=(await Eo.put("/portal/submissions/".concat(O.id),{title:x.title,de
2scription:x.description,publish_at:"later"===x.when?x.publish_at.toISOString():null,image_url:x.image_url,ad_mentions:x.ad_mentions})).data;return Ta.success(e.acast_synced?"Changes saved and updated on Acast":"Changes saved",{icon:(0,_e.jsx)(ym,{className:"h-6 w-6 text-emerald-400"}),duration:6e3,classNames:{toast:"!text-lg !py-4 !gap-3",title:"!text-lg !font-semibold"},"data-testid":"episode-updated-toast"}),me(),void ue()}await Eo.post("/portal/submissions",{show_id:x.show_id,title:x.title,description:x.description,publish_at:"later"===x.when?x.publish_at.toISOString():null,upload_id:x.audio.upload_id,image_url:x.image_url,draft_id:E,ad_mentions:x.ad_mentions}),Ta.success("Your episode has been submitted",{icon:(0,_e.jsx)(ym,{className:"h-6 w-6 text-emerald-400"}),duration:6e3,classNames:{toast:"!text-lg !py-4 !gap-3",title:"!text-lg !font-semibold"},"data-testid":"episode-submitted-toast"}),v((0,i.A)((0,i.A)({},GN()),{},{show_id:1===c.shows.length?c.shows[0].id:""})),P(null),ue(),ce()}catch(cS){Ta.error(Mo(cS))}finally{j(!1)}},ge=a.can_publish;return(0,_e.jsxs)("div",{className:"min-h-screen","data-testid":"publish-page",children:[(0,_e.jsx)("header",{className:"border-b border-white/10 bg-[#050B17]",children:(0,_e.jsxs)("div",{className:"max-w-6xl mx-auto px-5 sm:px-8 h-16 flex items-center justify-between gap-4",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3","data-testid":"publish-logo-link",children:[(0,_e.jsx)(hi,{size:36}),(0,_e.jsx)("span",{className:"font-display font-bold text-lg","data-testid":"publish-title",children:"Publish New Episode"})]}),(0,_e.jsxs)("div",{className:"flex items-center gap-4 text-sm",children:[(null===c||void 0===c?void 0:c.member)&&(0,_e.jsxs)(da,{to:"/hosts/".concat(c.member.slug),className:"hidden sm:inline-flex items-center gap-2 text-slate-300 hover:text-white","data-testid":"publish-profile-link",children:[c.member.image_url&&(0,_e.jsx)("img",{src:Po(c.member.image_url),alt:"",className:"h-7 w-7 rounded-full object-cover"}),a.name," ",(0,_e.jsx)(Ch,{size:13})]}),"admin"===a.role&&(0,_e.jsxs)(da,{to:"/admin",className:"inline-flex items-center gap-2 text-slate-400 hover:text-white","data-testid":"publish-back-to-admin",children:[(0,_e.jsx)(Tp,{size:15})," Admin panel"]}),(0,_e.jsxs)("button",{onClick:r,className:"inline-flex items-center gap-2 text-slate-400 hover:text-rose-400","data-testid":"publish-logout-button",children:[(0,_e.jsx)(Vp,{size:15})," Sign out"]})]})]})}),(0,_e.jsx)("main",{className:"max-w-6xl mx-auto px-5 sm:px-8 py-10",children:(0,_e.jsxs)("div",{className:"grid lg:grid-cols-[1fr_360px] gap-8 items-start",children:[(0,_e.jsxs)("section",{children:[ge?c?0===c.shows.length?(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-8","data-testid":"publish-no-shows",children:[(0,_e.jsx)("h2",{className:"font-display text-xl font-extrabold",children:"No shows assigned"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"You don't have any audio shows assigned yet. Ask the Underdog team to add you to your show."})]}):(0,_e.jsxs)("form",{ref:re,onSubmit:fe,className:"card-surface rounded-3xl p-6 sm:p-8 space-y-3.5","data-testid":"publish-form",children:[O&&(0,_e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-sky-400/30 bg-sky-400/10 px-4 py-3","data-testid":"publish-editing-banner",children:[(0,_e.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,_e.jsx)(tf,{size:15,className:"text-sky-300 shrink-0"}),(0,_e.jsxs)("span",{children:[(0,_e.jsxs)("span",{className:"font-semibold",children:["Editing \u201c",O.title,"\u201d"]})," ",(0,_e.jsxs)("span",{className:"text-slate-400",children:["\xb7 ",(VN[O.status]||VN.pending_acast).label,O.acast_episode_id?" \xb7 changes sync to Acast":"","published"===O.status?" \xb7 release time is locked":""]})]})]}),(0,_e.jsxs)("button",{type:"button",onClick:me,className:"inline-flex items-center gap-1 text-xs font-semibold text-slate-300 hover:text-white","data-testid":"publish-cancel-edit",children:[(0,_e.jsx)(ai,{size:13})," Cancel"]})]}),(0,_e.jsxs)("div",{className:O?"opacity-60 pointer-events-none":"",children:[(0,_e.jsx)(tm,{children:"Show *"}),(0,_e.jsx)("div",{className:"mt-1.5 grid sm:grid-cols-2 gap-2","data-testid":"publish-show-options",children:((null===c||void 0===c?void 0:c.shows)||[]).map(e=>(0,_e.jsxs)("label",{className:"flex items-center gap-3 rounded-xl border p-2.5 cursor-pointer transition-colors ".concat(x.show_id===e.id?"border-sky-400 bg-sky-4
200/10":"border-white/10 hover:bg-white/5"),"data-testid":"publish-show-".concat(e.slug),children:[(0,_e.jsx)("input",{type:"radio",name:"show",checked:x.show_id===e.id,onChange:()=>v(t=>(0,i.A)((0,i.A)({},t),{},{show_id:e.id,image_url:!t.image_url||((null===c||void 0===c?void 0:c.shows)||[]).some(e=>e.cover_url&&e.cover_url===t.image_url)?e.cover_url||"":t.image_url})),className:"accent-sky-400"}),e.cover_url?(0,_e.jsx)("img",{src:Po(e.cover_url),alt:"",className:"h-9 w-9 rounded-lg object-cover"}):(0,_e.jsx)("span",{className:"h-9 w-9 rounded-lg bg-[#053671]"}),(0,_e.jsx)("span",{className:"text-sm font-semibold truncate flex-1 min-w-0",children:e.name}),(null===c||void 0===c?void 0:c.acast_configured)&&!e.acast_show_id&&(0,_e.jsx)("span",{className:"shrink-0 rounded-full border border-amber-400/40 bg-amber-400/10 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-amber-300",title:"Not linked to Acast \u2014 submissions are reviewed manually","data-testid":"publish-show-unlinked-".concat(e.slug),children:"Manual"})]},e.id))}),(null===c||void 0===c?void 0:c.acast_configured)&&x.show_id&&!(null!==(e=c.shows.find(e=>e.id===x.show_id))&&void 0!==e&&e.acast_show_id)&&(0,_e.jsxs)("p",{className:"mt-2 inline-flex items-start gap-2 rounded-xl border border-amber-400/30 bg-amber-400/10 px-3 py-2 text-xs text-amber-100","data-testid":"publish-unlinked-warning",children:[(0,_e.jsx)(Lf,{size:14,className:"shrink-0 mt-0.5 text-amber-300"}),(0,_e.jsxs)("span",{children:[(0,_e.jsx)("span",{className:"font-semibold",children:null===(t=c.shows.find(e=>e.id===x.show_id))||void 0===t?void 0:t.name})," isn't connected to Acast yet, so this episode won't post automatically. Your upload is saved and the Underdog team will review and publish it by hand \u2014 you'll get an email either way."]})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Episode title * ",(0,_e.jsx)("span",{className:"text-slate-500",children:"(max 60 characters)"})]}),(0,_e.jsx)(Gh,{required:!0,minLength:2,maxLength:60,value:x.title,onChange:e=>le("title",e.target.value.slice(0,60)),className:"mt-1.5 bg-white/5 border-white/10","data-testid":"publish-title-input"}),(0,_e.jsxs)("p",{className:"mt-1 text-right text-[11px] ".concat(x.title.length>=60?"text-amber-400":"text-slate-500"),"data-testid":"publish-title-count",children:[x.title.length," / 60"]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsxs)(tm,{children:["Summary * ",(0,_e.jsxs)("span",{className:"text-slate-500",children:["(at least ",YN," characters)"]})]}),(0,_e.jsx)(am,{ref:ie,rows:8,required:!0,value:x.description,onChange:e=>le("description",e.target.value),placeholder:"What's in this episode? Guests, topics, key moments, links\u2026 Aim for a few solid paragraphs \u2014 this is what listeners read in their podcast app.",className:"mt-1.5 bg-white/5 border-white/10","data-testid":"publish-description-input"}),(0,_e.jsxs)("div",{className:"mt-1 flex items-center justify-between gap-3",children:[(0,_e.jsx)(Kf,{grade:J,loading:Z,error:ee,onRetry:te,onClick:()=>Y(!0)}),(0,_e.jsxs)("p",{className:"ml-auto text-right text-[11px] ".concat(x.description.trim().length>=YN?"text-emerald-400":"text-slate-500"),"data-testid":"publish-summary-count",children:[x.description.trim().length," / ",YN," minimum"]})]}),ae.length>0&&(0,_e.jsxs)("p",{className:"mt-1.5 inline-flex items-center gap-1.5 rounded-lg bg-rose-500/10 border border-rose-500/30 px-2.5 py-1.5 text-xs text-rose-200","data-testid":"publish-sportsbook-warning",children:[(0,_e.jsx)(Lf,{size:13,className:"shrink-0"})," Sportsbook names can't appear in a summary \u2014 remove ",1===ae.length?"this":"these"," before publishing: ",(0,_e.jsx)("span",{className:"font-semibold",children:ae.join(", ")})]}),se.length>0&&(0,_e.jsxs)("p",{className:"mt-1.5 inline-flex items-center gap-1.5 rounded-lg bg-rose-500/10 border border-rose-500/30 px-2.5 py-1.5 text-xs text-rose-200","data-testid":"publish-profanity-warning",children:[(0,_e.jsx)(Lf,{size:13,className:"shrink-0"})," Profanity can't appear in a summary \u2014 remove ",1===se.length?"this":"these"," before publishing: ",(0,_e.jsx)("span",{className:"font-semibold",children:se.j
2oin(", ")})]}),QN(x.description).length>0&&(0,_e.jsxs)("p",{className:"mt-1.5 inline-flex items-center gap-1.5 rounded-lg bg-amber-400/10 border border-amber-400/30 px-2.5 py-1.5 text-xs text-amber-200","data-testid":"publish-placeholder-warning",children:[(0,_e.jsx)(Lf,{size:13,className:"shrink-0"})," Replace the ",1===QN(x.description).length?"placeholder":"".concat(QN(x.description).length," placeholders")," before publishing: ",(0,_e.jsx)("span",{className:"font-mono",children:QN(x.description)[0]})]})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Audio *"}),(0,_e.jsx)("div",{className:"mt-1.5",children:O?(0,_e.jsxs)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] p-4 flex items-center gap-3 text-sm","data-testid":"publish-audio-locked",children:[(0,_e.jsx)(ig,{size:15,className:"text-slate-400 shrink-0"}),(0,_e.jsxs)("div",{className:"min-w-0",children:[(0,_e.jsx)("p",{className:"font-semibold truncate",children:O.audio_filename}),(0,_e.jsx)("p",{className:"text-xs text-slate-500",children:"Audio can't be swapped after submitting \u2014 publish a new episode instead if the file needs replacing."})]})]}):(0,_e.jsx)(cx,{value:x.audio,onChange:e=>le("audio",e),testId:"publish-audio"})})]}),(0,_e.jsx)(Mg,{value:x.ad_mentions,onChange:e=>le("ad_mentions",e)}),(0,_e.jsxs)("div",{className:"grid sm:grid-cols-[1fr_auto] gap-6 items-start",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{children:"Publish"}),(0,_e.jsx)("div",{className:"mt-1.5 inline-flex rounded-full bg-white/5 p-1 ".concat("published"===(null===O||void 0===O?void 0:O.status)?"opacity-50 pointer-events-none":""),"data-testid":"publish-when",children:[["later","Schedule"],["now","Right away"]].map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("button",{type:"button",onClick:()=>le("when",n),className:"rounded-full px-4 py-1.5 text-xs font-bold transition-colors ".concat(x.when===n?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"publish-when-".concat(n),children:a},n)})}),(0,_e.jsx)("div",{className:"mt-[1.6rem] flex justify-center pl-14 ".concat("published"===(null===O||void 0===O?void 0:O.status)?"opacity-50 pointer-events-none":""),children:"later"===x.when?(0,_e.jsx)(Mk,{value:x.publish_at,onChange:e=>le("publish_at",e),testId:"publish-date"}):(0,_e.jsx)("p",{className:"mt-3 text-xs text-slate-500",children:"published"===(null===O||void 0===O?void 0:O.status)?"This episode is already live.":"The episode goes out as soon as it's published."})}),(0,_e.jsx)("div",{className:"mt-[2.35rem]",children:(0,_e.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:O?(0,_e.jsxs)(Dh,{type:"submit",disabled:w,className:"rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300 px-6","data-testid":"publish-save-changes-button",children:[(0,_e.jsx)(lg,{size:16,className:"mr-2"})," ",w?"Saving\u2026":"Save changes"]}):(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)(Dh,{type:"submit",disabled:w,className:"rounded-full bg-emerald-500 text-white font-bold hover:bg-emerald-400 px-6","data-testid":"publish-submit-button",children:[(0,_e.jsx)(Qh,{size:16,className:"mr-2"})," ",w?"Submitting\u2026":"Publish episode"]}),(0,_e.jsxs)(Dh,{type:"button",variant:"outline",onClick:async()=>{if(!x.title.trim()&&!x.description.trim()&&!x.audio)return Ta.error("Add a title, summary or audio before saving a draft");F(!0);try{const e=(E?await Eo.put("/portal/drafts/".concat(E),de()):await Eo.post("/portal/drafts",de())).data;P(e.id),Ta.success("Draft saved \u2014 come back any time to finish it"),ce()}catch(lS){Ta.error(Mo(lS))}finally{F(!1)}},disabled:L,className:"rounded-full border-white/15 bg-transparent hover:bg-white/10","data-testid":"publish-save-draft-button",children:[(0,_e.jsx)(lg,{size:15,className:"mr-2"})," ",L?"Saving\u2026":E?"Update draft":"Save as draft"]}),E&&(0,_e.jsx)("span",{className:"text-xs text-slate-500","data-testid":"publish-editing-draft",children:"Editing a saved draft"})]})})})]}),(0,_e.jsxs)("div",{className:"sm:w-40",children:[(0,_e.jsx)(tm,{className:"block text-center mb-2",children:"Episode artwork *"}),(0,_e.jsx)("p",{className:"text-center text-[11px] text-slate-500 -mt-1 mb-2",children:"Defaults to the show logo \u2014 replace it for a custom cover."}),(0,_e.jsx)(rf,{value:x.image_url,onChange:e=>le("image_url",e),shape:"square",endpoint:"/portal/upload-image",testId:"publish-artwork",allowUrl:!1,hint:!1})]})]})]}):(0,_e.jsx)("div",{className:"card-surface rounded-3xl p-8 text-sm text-slate-400","data-testid":"publish-loading",children:"Loading your shows\u2026"}):(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-8","data-testid":"publish-disabled",children:[(0,_e.jsx)(Lf,{size:28,className:"text-amber-300"}),(0,_e.jsx)("h2",{className:"mt-3 font-display text-xl font-extrabold",children:"Publishing isn't enabled for your account yet"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Ask the Underdog team to switch on publishing for you."})]}),(0,_e.jsx)(Qf,{grade:J,open:V,onOpenChange:Y,rewrite:{title:x.title,de
2scription:x.description,onUse:e=>{le("description",e),Y(!1),Ta.success("Rewrite added to your summary \u2014 give it a read before publishing")}}}),(0,_e.jsx)(DN,{grade:J,open:K,onOpenChange:G,onConfirm:()=>{G(!1),fe(null,!0)},onReview:()=>{G(!1),Y(!0)}})]}),(0,_e.jsxs)("aside",{ref:oe,className:"flex flex-col gap-4",children:[(0,_e.jsx)(Rk,{drafts:S,activeId:E,showName:e=>{var t;return null===c||void 0===c||null===(t=c.shows.find(t=>t.id===e))||void 0===t?void 0:t.name},onResume:e=>{P(e.id),v({show_id:e.show_id||"",title:e.title||"",description:e.description||"",when:e.publish_at?"later":"now",publish_at:e.publish_at?new Date(e.publish_at):KN(),image_url:e.image_url||"",audio:e.audio||null,ad_mentions:e.ad_mentions||""}),window.scrollTo({top:0,behavior:"smooth"})},onDelete:async e=>{if(window.confirm('Delete the draft "'.concat(e.title||"Untitled episode",'"?')))try{await Eo.delete("/portal/drafts/".concat(e.id)),e.id===E&&(P(null),v(GN())),ce()}catch(lS){Ta.error(Mo(lS))}}}),(0,_e.jsx)(ux,{member:null===c||void 0===c?void 0:c.member,onSaved:e=>d(t=>(0,i.A)((0,i.A)({},t),{},{member:e}))}),ge&&(0,_e.jsx)(BN,{title:x.title,audio:O?null:x.audio,onDuration:e=>v(t=>t.audio?(0,i.A)((0,i.A)({},t),{},{audio:(0,i.A)((0,i.A)({},t.audio),{},{duration:e})}):t),onUse:e=>{x.description.trim()&&!window.confirm("Replace your current summary with the generated one?")||(le("description",e),Ta.success("Summary added \u2014 give it a read before publishing"),window.scrollTo({top:0,behavior:"smooth"}))}}),ge&&(0,_e.jsx)(Rg,{onImport:e=>le("ad_mentions",e)}),(0,_e.jsxs)("div",{className:"card-surface rounded-3xl p-5","data-testid":"publish-history",children:[(0,_e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,_e.jsxs)("span",{className:"eyebrow",children:["Your submissions ",(0,_e.jsxs)("span",{className:"text-slate-500 normal-case tracking-normal font-sans",children:["(",m.length,")"]})]}),(0,_e.jsxs)(da,{to:"/publish/submissions",className:"inline-flex items-center gap-1 text-xs font-semibold text-sky-300 hover:text-sky-200","data-testid":"publish-history-view-all",children:["View all ",(0,_e.jsx)(yh,{size:13})]})]}),(0,_e.jsxs)("div",{className:"mt-3",children:[0===m.length&&(0,_e.jsx)("p",{className:"text-sm text-slate-400","data-testid":"publish-history-empty",children:"Nothing submitted yet."}),m.length>0&&0===pe.length&&(0,_e.jsxs)("p",{className:"text-sm text-slate-400","data-testid":"publish-history-none-published",children:["Nothing published yet \u2014 ",(0,_e.jsx)(da,{to:"/publish/submissions",className:"text-sky-300 hover:underline",children:"see your queued episodes"}),"."]}),pe.length>0&&(0,_e.jsx)("p",{className:"mb-2 text-[11px] uppercase tracking-wider font-mono text-slate-500",children:"Recently published \xb7 click to edit"}),(0,_e.jsx)("div",{className:"space-y-2",children:pe.map((e,t)=>{const n=VN[e.status]||VN.pending_acast;return(0,_e.jsxs)("button",{type:"button",onClick:()=>he(e),className:"w-full text-left rounded-xl border p-3 transition-colors ".concat((null===O||void 0===O?void 0:O.id)===e.id?"border-sky-400 bg-sky-4
200/10":"bg-white/[0.03] border-white/10 hover:border-sky-400/50 hover:bg-white/[0.06]"),title:"Click to edit this episode","data-testid":"publish-history-".concat(t),children:[(0,_e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,_e.jsx)("p",{className:"text-sm font-semibold truncate",children:e.title}),(0,_e.jsx)(tf,{size:13,className:"shrink-0 mt-0.5 text-slate-500"})]}),(0,_e.jsxs)("p",{className:"text-xs text-slate-400 truncate",children:[e.show_name," \xb7 ",Ro(e.publish_at||e.published_at||e.created_at)]}),(0,_e.jsxs)("span",{className:"mt-2 inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-mono uppercase tracking-wider ".concat(n.cls),"data-testid":"publish-history-status-".concat(t),children:[(0,_e.jsx)(n.Icon,{size:11})," ",n.label]})]},e.id)})}),m.length>pe.length&&(0,_e.jsxs)(da,{to:"/publish/submissions",className:"mt-3 inline-flex items-center gap-1 text-xs text-slate-400 hover:text-white","data-testid":"publish-history-more",children:[m.length-pe.length," more submission",m.length-pe.length===1?"":"s"," \u2014 view and edit all ",(0,_e.jsx)(yh,{size:12})]})]})]}),(0,_e.jsx)(hx,{})]})]})})]})}const JN={pending_acast:{label:"Queued",cls:"bg-amber-400/15 text-amber-300",Icon:_i},scheduled:{label:"Scheduled",cls:"bg-sky-400/15 text-sky-300",Icon:_i},published:{label:"Published",cls:"bg-emerald-400/15 text-emerald-300",Icon:ym},failed:{label:"Needs attention",cls:"bg-rose-500/15 text-rose-400",Icon:Lf},rejected:{label:"Not published",cls:"bg-white/10 text-slate-400",Icon:Lf}},ZN=[["all","All"],["published","Published"],["scheduled","Scheduled"],["pending_acast","Queued"],["failed","Needs attention"]],eS=e=>new Date(e).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:"America/New_York",timeZoneName:"short"});function tS(){const e=Lo().user,t=en(),n=(0,s.useState)(null),a=(0,De.A)(n,2),r=a[0],o=a[1],i=(0,s.useState)("all"),l=(0,De.A)(i,2),c=l[0],d=l[1];if((0,s.useEffect)(()=>{e&&Eo.get("/portal/submissions").then(e=>o(e.data)).catch(()=>o([]))},[e]),null===e)return(0,_e.jsx)("div",{className:"min-h-screen flex items-center justify-center text-slate-400",children:"Loading\u2026"});if(!1===e)return(0,_e.jsx)(kn,{to:"/admin/login",replace:!0});if(!("podcaster"===e.role||"admin"===e.role&&e.team_id))return(0,_e.jsx)(kn,{to:"/admin",replace:!0});const u=(r||[]).filter(e=>"all"===c||e.status===c);return(0,_e.jsxs)("div",{className:"min-h-screen","data-testid":"my-submissions-page",children:[(0,_e.jsx)("header",{className:"border-b border-white/10 bg-[#050B17]",children:(0,_e.jsxs)("div",{className:"max-w-6xl mx-auto px-5 sm:px-8 h-16 flex items-center justify-between gap-4",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3",children:[(0,_e.jsx)(hi,{size:36}),(0,_e.jsx)("span",{className:"font-display font-bold text-lg",children:"Your submissions"})]}),(0,_e.jsxs)(da,{to:"/publish",className:"inline-flex items-center gap-2 text-sm text-slate-300 hover:text-white","data-testid":"my-submissions-back",children:[(0,_e.jsx)(_h,{size:15})," Back to publishing"]})]})}),(0,_e.jsxs)("main",{className:"max-w-6xl mx-auto px-5 sm:px-8 py-10",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)("p",{className:"eyebrow",children:"Episode history"}),(0,_e.jsx)("h1",{className:"mt-2 font-display text-3xl sm:text-4xl font-black tracking-tight",children:"Everything you've submitted"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Click any episode to edit its title, summary, artwork or schedule. Changes sync to Acast automatically."})]}),(0,_e.jsx)("div",{className:"inline-flex flex-wrap rounded-full bg-white/5 p-1","data-testid":"my-submissions-filter",children:ZN.map(e=>{let t=(0,De.A)(e,2),n=t[0],a=t[1];return(0,_e.jsx)("button",{type:"button",onClick:()=>d(n),className:"rounded-full px-3.5 py-1.5 text-xs font-bold transition-colors ".concat(c===n?"bg-sky-4
200 text-[#070F1E]":"text-slate-300 hover:text-white"),"data-testid":"my-submissions-filter-".concat(n),children:a},n)})})]}),null===r&&(0,_e.jsx)("p",{className:"mt-10 text-sm text-slate-400",children:"Loading\u2026"}),r&&0===u.length&&(0,_e.jsx)("p",{className:"mt-10 text-sm text-slate-400","data-testid":"my-submissions-empty",children:"Nothing here yet."}),(0,_e.jsx)("div",{className:"mt-8 space-y-3",children:u.map((e,n)=>{const a=JN[e.status]||JN.pending_acast,s="rejected"!==e.status;return(0,_e.jsxs)("article",{className:"card-surface rounded-2xl p-4 sm:p-5 flex gap-4 items-start","data-testid":"my-submission-".concat(n),children:[e.image_url?(0,_e.jsx)("img",{src:Po(e.image_url),alt:"",className:"h-16 w-16 rounded-xl object-cover shrink-0"}):(0,_e.jsx)("div",{className:"h-16 w-16 rounded-xl bg-[#053671] shrink-0"}),(0,_e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,_e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,_e.jsx)("h2",{className:"font-semibold text-base truncate","data-testid":"my-submission-title-".concat(n),children:e.title}),(0,_e.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-mono uppercase tracking-wider ".concat(a.cls),"data-testid":"my-submission-status-".concat(n),children:[(0,_e.jsx)(a.Icon,{size:11})," ",a.label]})]}),(0,_e.jsxs)("p",{className:"mt-0.5 text-xs text-slate-400 truncate",children:[e.show_name," \xb7 submitted ",Oo(e.created_at)," \xb7 ",e.audio_filename]}),(0,_e.jsx)("p",{className:"mt-1 text-xs text-slate-300",children:e.publish_at?"".concat(new Date(e.publish_at)>new Date?"Publishes":"Published"," ").concat(eS(e.publish_at)):e.published_at?"Published ".concat(eS(e.published_at)):"Submitted ".concat(Ro(e.created_at))}),e.error&&(0,_e.jsx)("p",{className:"mt-1 text-xs text-rose-300",children:e.error}),(0,_e.jsx)("p",{className:"mt-2 text-xs text-slate-500 line-clamp-2",children:e.description})]}),(0,_e.jsx)("div",{className:"flex flex-col items-end gap-2 shrink-0",children:s&&(0,_e.jsxs)("button",{type:"button",onClick:()=>t("/publish?edit=".concat(e.id)),className:"inline-flex items-center gap-1.5 rounded-full bg-sky-400 px-4 py-2 text-xs font-bold text-[#070F1E] hover:bg-sky-300","data-testid":"my-submission-edit-".concat(n),children:[(0,_e.jsx)(tf,{size:13})," Edit"]})})]},e.id)})})]})]})}const nS=Jo("mail-check",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]),aS=e=>{let t=e.children,n=e.testId;return(0,_e.jsxs)("div",{className:"min-h-screen flex items-center justify-center px-5 relative grain","data-testid":n,children:[(0,_e.jsx)("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top,#053671_0%,transparent_60%)] opacity-60"}),(0,_e.jsxs)("div",{className:"relative w-full max-w-md card-surface rounded-3xl p-8 sm:p-10 reveal",children:[(0,_e.jsxs)(da,{to:"/",className:"flex items-center gap-3 mb-8","data-testid":"".concat(n,"-logo-link"),children:[(0,_e.jsx)(hi,{size:48}),(0,_e.jsx)("span",{className:"font-display font-extrabold text-xl",children:"Admin Portal"})]}),t]})]})};function sS(){const e=(0,s.useState)(""),t=(0,De.A)(e,2),n=t[0],a=t[1],r=(0,s.useState)(!1),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(!1),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useState)(""),p=(0,De.A)(m,2),f=p[0],g=p[1];return(0,_e.jsx)(aS,{testId:"forgot-password-page",children:i?(0,_e.jsxs)("div",{"data-testid":"forgot-password-sent",children:[(0,_e.jsx)(nS,{size:40,className:"text-emerald-400"}),(0,_e.jsx)("h1",{className:"mt-4 font-display text-2xl font-black tracking-tight",children:"Check your inbox"}),(0,_e.jsxs)("p",{className:"mt-2 text-sm text-slate-400",children:["If ",(0,_e.jsx)("span",{className:"text-white",children:n})," has an account, a reset link is on its way. It works for one hour."]}),(0,_e.jsxs)(da,{to:"/admin/login",className:"mt-6 inline-flex items-center gap-2 text-sm text-sky-400 hover:text-sky-300","data-testid":"forgot-password-back",children:[(0,_e.jsx)(_h,{size:14})," Back to sign in"]})]}):(0,_e.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),g(""),h(!0);try{await Eo.post("/auth/forgot-password",{email:n}),l(!0)}catch(cS){g(Mo(cS))}finally{h(!1)}},children:[(0,_e.jsx)("h1",{className:"font-display text-3xl font-black tracking-tight",children:"Forgot your password?"}),(0,_e.jsx)("p",{className:"mt-1 text-sm text-slate-400",children:"Enter your login email and we'll send you a link to choose a new one."}),(0,_e.jsxs)("div",{className:"mt-8",children:[(0,_e.jsx)(tm,{htmlFor:"email",children:"Email"}),(0,_e.jsx)(Gh,{id:"email",type:"email",value:n,onChange:e=>a(e.target.value),required:!0,className:"mt-1.5 bg-white/5 border-white/10","data-testid":"forgot-password-email-input"})]}),f&&(0,_e.jsx)("p",{className:"mt-4 text-sm text-rose-400","data-testid":"forgot-password-error",children:f}),(0,_e.jsx)(Dh,{type:"submit",disabled:u,className:"mt-6 w-full rounded-full bg-sky-4
200 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"forgot-password-submit",children:u?"Sending\u2026":"Send reset link"}),(0,_e.jsxs)(da,{to:"/admin/login",className:"mt-5 inline-flex items-center gap-2 text-sm text-slate-400 hover:text-white","data-testid":"forgot-password-back",children:[(0,_e.jsx)(_h,{size:14})," Back to sign in"]})]})})}function rS(){const e=fa(),t=(0,De.A)(e,1)[0],n=en(),a=t.get("token")||"",r=(0,s.useState)(""),o=(0,De.A)(r,2),i=o[0],l=o[1],c=(0,s.useState)(""),d=(0,De.A)(c,2),u=d[0],h=d[1],m=(0,s.useState)(""),p=(0,De.A)(m,2),f=p[0],g=p[1],x=(0,s.useState)(!1),v=(0,De.A)(x,2),b=v[0],y=v[1],w=(0,s.useState)(!1),j=(0,De.A)(w,2),k=j[0],N=j[1];return(0,_e.jsx)(aS,{testId:"reset-password-page",children:k?(0,_e.jsxs)("div",{"data-testid":"reset-password-done",children:[(0,_e.jsx)(ym,{size:40,className:"text-emerald-400"}),(0,_e.jsx)("h1",{className:"mt-4 font-display text-2xl font-black tracking-tight",children:"Password updated"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"Taking you to sign in\u2026"}),(0,_e.jsx)(da,{to:"/admin/login",className:"mt-6 inline-flex items-center gap-2 text-sm text-sky-400 hover:text-sky-300","data-testid":"reset-password-login-link",children:"Sign in now"})]}):a?(0,_e.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),i.length<8)return g("Password must be at least 8 characters");if(i!==u)return g("Passwords don't match");g(""),y(!0);try{await Eo.post("/auth/reset-password",{token:a,password:i}),N(!0),setTimeout(()=>n("/admin/login"),2500)}catch(cS){g(Mo(cS))}finally{y(!1)}},children:[(0,_e.jsx)("h1",{className:"font-display text-3xl font-black tracking-tight",children:"Choose a new password"}),(0,_e.jsxs)("div",{className:"mt-8 space-y-4",children:[(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{htmlFor:"password",children:"New password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{id:"password",minLength:8,value:i,onChange:e=>l(e.target.value),required:!0,className:"bg-white/5 border-white/10",testId:"reset-password-input"})})]}),(0,_e.jsxs)("div",{children:[(0,_e.jsx)(tm,{htmlFor:"confirm",children:"Confirm password"}),(0,_e.jsx)("div",{className:"mt-1.5",children:(0,_e.jsx)(Op,{id:"confirm",value:u,onChange:e=>h(e.target.value),required:!0,className:"bg-white/5 border-white/10",testId:"reset-password-confirm-input"})})]})]}),f&&(0,_e.jsx)("p",{className:"mt-4 text-sm text-rose-400","data-testid":"reset-password-error",children:f}),(0,_e.jsx)(Dh,{type:"submit",disabled:b,className:"mt-6 w-full rounded-full bg-sky-400 text-[#070F1E] font-bold hover:bg-sky-300","data-testid":"reset-password-submit",children:b?"Saving\u2026":"Set new password"})]}):(0,_e.jsxs)("div",{"data-testid":"reset-password-missing",children:[(0,_e.jsx)("h1",{className:"font-display text-2xl font-black tracking-tight",children:"Invalid link"}),(0,_e.jsx)("p",{className:"mt-2 text-sm text-slate-400",children:"This reset link is missing its token."}),(0,_e.jsx)(da,{to:"/forgot-password",className:"mt-6 inline-block text-sm text-sky-400 hover:text-sky-300",children:"Request a new link"})]})})}const oS=function(){return(0,_e.jsx)("div",{className:"App",children:(0,_e.jsx)(Do,{children:(0,_e.jsx)(Wo,{children:(0,_e.jsxs)(Io,{children:[(0,_e.jsx)(la,{children:(0,_e.jsx)(Vo,{children:(0,_e.jsxs)(Jg,{children:[(0,_e.jsxs)(_n,{children:[(0,_e.jsx)(Sn,{path:"/",element:(0,_e.jsx)(Ah,{})}),(0,_e.jsx)(Sn,{path:"/shows",element:(0,_e.jsx)(Im,{})}),(0,_e.jsx)(Sn,{path:"/search",element:(0,_e.jsx)(Um,{})}),(0,_e.jsx)(Sn,{path:"/browse/:slug",element:(0,_e.jsx)(Wm,{})}),(0,_e.jsx)(Sn,{path:"/join",element:(0,_e.jsx)(Vm,{})}),(0,_e.jsx)(Sn,{path:"/hosts",element:(0,_e.jsx)($m,{})}),(0,_e.jsx)(Sn,{path:"/hosts/:slug",element:(0,_e.jsx)(Ym,{})}),(0,_e.jsx)(Sn,{path:"/shows/:slug",element:(0,_e.jsx)(fm,{})}),(0,_e.jsx)(Sn,{path:"/episodes/:id",element:(0,_e.jsx)(xm,{})}),(0,_e.jsx)(Sn,{path:"/privacy",element:(0,_e.jsx)(bm,{})}),(0,_e.jsx)(Sn,{path:"/contact",element:(0,_e.jsx)(km,{})}),(0,_e.jsx)(Sn,{path:"/advertise",element:(0,_e.jsx)(Cm,{})}),(0,_e.jsx)(Sn,{path:"/admin/login",element:(0,_e.jsx)(zp,{})}),(0,_e.jsx)(Sn,{path:"/publish",element:(0,_e.jsx)(XN,{})}),(0,_e.jsx)(Sn,{path:"/publish/submissions",element:(0,_e.jsx)(tS,{})}),(0,_e.jsx)(Sn,{path:"/survey",element:(0,_e.jsx)($g,{})}),(0,_e.jsx)(Sn,{path:"/forgot-password",element:(0,_e.jsx)(sS,{})}),(0,_e.jsx)(Sn,{path:"/reset-password",element:(0,_e.jsx)(rS,{})}),(0,_e.jsxs)(Sn,{path:"/admin",element:(0,_e.jsx)($p,{}),children:[(0,_e.jsx)(Sn,{index:!0,element:(0,_e.jsx)(ef,{})}),(0,_e.jsx)(Sn,{path:"shows",element:(0,_e.jsx)(uf,{})}),(0,_e.jsx)(Sn,{path:"episodes",element:(0,_e.jsx)(vf,{})}),(0,_e.jsx)(Sn,{path:"team",element:(0,_e.jsx)(Nf,{})}),(0,_e.jsx)(Sn,{path:"applications",element:(0,_e.jsx)(Jm,{})}),(0,_e.jsx)(Sn,{path:"publishing",element:(0,_e.jsx)(Zf,{})}),(0,_e.jsx)(Sn,{path:"club-map",element:(0,_e.jsx)(ag,{})}),(0,_e.jsx)(Sn,{path:"reports",element:(0,_e.jsx)(_g,{})}),(0,_e.jsx)(Sn,{path:"timecodes",element:(0,_e.jsx)(Og,{})}),(0,_e.jsx)(Sn,{path:"survey",element:(0,_e.jsx)(qg,{})}),(0,_e.jsx)(Sn,{path:"homepage",element:(0,_e.jsx)(Np,{})}),(0,_e.jsx)(Sn,{path:"menus",element:(0,_e.jsx)(Ep,{})}),(0,_e.jsx)(Sn,{path:"pages",element:(0,_e.jsx)(Lm,{})}),(0,_e.jsx)(Sn,{path:"settings",element:(0,_e.jsx)(Of,{})}),(0,_e.jsx)(Sn,{path:"activity",element:(0,_e.jsx)(Df,{})})]})]}),(0,_e.jsx)(si,{}),(0,_e.jsx)(ii,{}),(0,_e.jsx)(Gg,{})]})})}),(0,_e.jsx)(Wa,{theme:"dark",position:"bottom-right"})]})})})})},iS=new Ae({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}});o.createRoot(document.getElementById("root")).render((0,_e.jsx)(s.StrictMode,{children:(0,_e.jsx)(Ee,{client:iS,children:(0,_e.jsx)(oS,{})})}))})();
3//# sourceMappingURL=main.47a272b4.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.