vendor: 6,818 bytes, lines 1-9
1var bR=Object.defineProperty;var zx=t=>{throw TypeError(t)};var wR=(t,e,n)=>e in t?bR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var hs=(t,e,n)=>wR(t,typeof e!="symbol"?e+"":e,n),Bm=(t,e,n)=>e.has(t)||zx("Cannot "+n);var z=(t,e,n)=>(Bm(t,e,"read from private field"),n?n.call(t):e.get(t)),Ue=(t,e,n)=>e.has(t)?zx("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),_e=(t,e,n,r)=>(Bm(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Gt=(t,e,n)=>(Bm(t,e,"access private method"),n);var Ad=(t,e,n,r)=>({set _(s){_e(t,e,s,n)},get _(){return z(t,e,r)}});function xR(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function kR(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var WE={exports:{}},Op={},qE={exports:{}},Re={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var rd=Symbol.for("react.element"),SR=Symbol.for("react.portal"),CR=Symbol.for("react.fragment"),ER=Symbol.for("react.strict_mode"),AR=Symbol.for("react.profiler"),TR=Symbol.for("react.provider"),_R=Symbol.for("react.context"),NR=Symbol.for("react.forward_ref"),IR=Symbol.for("react.suspense"),OR=Symbol.for("react.memo"),PR=Symbol.for("react.lazy"),Ux=Symbol.iterator;function jR(t){return t===null||typeof t!="object"?null:(t=Ux&&t[Ux]||t["@@iterator"],typeof t=="function"?t:null)}var GE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},KE=Object.assign,ZE={};function Zl(t,e,n){this.props=t,this.context=e,this.refs=ZE,this.updater=n||GE}Zl.prototype.isReactComponent={};Zl.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Zl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function YE(){}YE.prototype=Zl.prototype;function V0(t,e,n){this.props=t,this.context=e,this.refs=ZE,this.updater=n||GE}var H0=V0.prototype=new YE;H0.constructor=V0;KE(H0,Zl.prototype);H0.isPureReactComponent=!0;var Bx=Array.isArray,JE=Object.prototype.hasOwnProperty,W0={current:null},QE={key:!0,ref:!0,__self:!0,__source:!0};function XE(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)JE.call(e,r)&&!QE.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:rd,type:t,key:i,ref:o,props:s,_owner:W0.current}}function MR(t,e){return{$$typeof:rd,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function q0(t){return typeof t=="object"&&t!==null&&t.$$typeof===rd}function RR(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Vx=/\/+/g;function Vm(t,e){return typeof t=="object"&&t!==null&&t.key!=null?RR(""+t.key):e.toString(36)}function gh(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case rd:case SR:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+Vm(o,0):r,Bx(s)?(n="",t!=null&&(n=t.replace(Vx,"$&/")+"/"),gh(s,e,n,"",function(c){return c})):s!=null&&(q0(s)&&(s=MR(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Vx,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",Bx(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+Vm(i,a);o+=gh(i,e,n,l,s)}else if(l=jR(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+Vm(i,a++),o+=gh(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Td(t,e,n){if(t==null)return t;var r=[],s=0;return gh(t,r,"","",function(i){return e.call(n,i,s++)}),r}function DR(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var hn={current:null},yh={transition:null},LR={ReactCurrentDispatcher:hn,ReactCurrentBatchConfig:yh,ReactCurrentOwner:W0};function eA(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Td,forEach:function(t,e,n){Td(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Td(t,function(){e++}),e},toArray:function(t){return Td(t,function(e){return e})||[]},only:function(t){if(!q0(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Re.Component=Zl;Re.Fragment=CR;Re.Profiler=AR;Re.PureComponent=V0;
vendor: 5,108 bytes, lines 9-25
9Re.StrictMode=ER;Re.Suspense=IR;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LR;Re.act=eA;Re.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=KE({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=W0.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)JE.call(e,l)&&!QE.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:rd,type:t.type,key:s,ref:i,props:r,_owner:o}};Re.createContext=function(t){return t={$$typeof:_R,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:TR,_context:t},t.Consumer=t};Re.createElement=XE;Re.createFactory=function(t){var e=XE.bind(null,t);return e.type=t,e};Re.createRef=function(){return{current:null}};Re.forwardRef=function(t){return{$$typeof:NR,render:t}};Re.isValidElement=q0;Re.lazy=function(t){return{$$typeof:PR,_payload:{_status:-1,_result:t},_init:DR}};Re.memo=function(t,e){return{$$typeof:OR,type:t,compare:e===void 0?null:e}};Re.startTransition=function(t){var e=yh.transition;yh.transition={};try{t()}finally{yh.transition=e}};Re.unstable_act=eA;Re.useCallback=function(t,e){return hn.current.useCallback(t,e)};Re.useContext=function(t){return hn.current.useContext(t)};Re.useDebugValue=function(){};Re.useDeferredValue=function(t){return hn.current.useDeferredValue(t)};Re.useEffect=function(t,e){return hn.current.useEffect(t,e)};Re.useId=function(){return hn.current.useId()};Re.useImperativeHandle=function(t,e,n){return hn.current.useImperativeHandle(t,e,n)};Re.useInsertionEffect=function(t,e){return hn.current.useInsertionEffect(t,e)};Re.useLayoutEffect=function(t,e){return hn.current.useLayoutEffect(t,e)};Re.useMemo=function(t,e){return hn.current.useMemo(t,e)};Re.useReducer=function(t,e,n){return hn.current.useReducer(t,e,n)};Re.useRef=function(t){return hn.current.useRef(t)};Re.useState=function(t){return hn.current.useState(t)};Re.useSyncExternalStore=function(t,e,n){return hn.current.useSyncExternalStore(t,e,n)};Re.useTransition=function(){return hn.current.useTransition()};Re.version="18.3.1";qE.exports=Re;var v=qE.exports;const U=nd(v),G0=xR({__proto__:null,default:U},[v]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var $R=v,FR=Symbol.for("react.element"),zR=Symbol.for("react.fragment"),UR=Object.prototype.hasOwnProperty,BR=$R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VR={key:!0,ref:!0,__self:!0,__source:!0};function tA(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)UR.call(e,r)&&!VR.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:FR,type:t,key:i,ref:o,props:s,_owner:BR.current}}Op.Fragment=zR;Op.jsx=tA;Op.jsxs=tA;WE.exports=Op;var h=WE.exports,nA={exports:{}},Dn={},rA={exports:{}},sA={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(t){function e(O,R){var K=O.length;O.push(R);e:for(;0<K;){var de=K-1>>>1,se=O[de];if(0<s(se,R))O[de]=R,O[K]=se,K=de;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var R=O[0],K=O.pop();if(K!==R){O[0]=K;e:for(var de=0,se=O.length,ae=se>>>1;de<ae;){var he=2*(de+1)-1,Y=O[he],re=he+1,D=O[re];if(0>s(Y,K))re<se&&0>s(D,Y)?(O[de]=D,O[re]=K,de=re):(O[de]=Y,O[he]=K,de=he);else if(re<se&&0>s(D,K))O[de]=D,O[re]=K,de=re;else break e}}return R}function s(O,R){var K=O.sortIndex-R.sortIndex;return K!==0?K:O.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,f=3,p=!1,g=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(O){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=O)r(c),R.sortIndex=R.expirationTime,e(l,R);else break;R=n(c)}}function k(O){if(m=!1,x(O),!g)if(n(l)!==null)g=!0,B(S);else{var R=n(c);R!==null&&$(k,R.startTime-O)}}function S(O,R){g=!1,m&&(m=!1,b(A),A=-1),p=!0;var K=f;try{for(x(R),d=n(l);d!==null&&(!(d.expirationTime>R)||O&&!F());){var de=d.callback;
vendor: 9,178 bytes, lines 25-34
25if(typeof de=="function"){d.callback=null,f=d.priorityLevel;var se=de(d.expirationTime<=R);R=t.unstable_now(),typeof se=="function"?d.callback=se:d===n(l)&&r(l),x(R)}else r(l);d=n(l)}if(d!==null)var ae=!0;else{var he=n(c);he!==null&&$(k,he.startTime-R),ae=!1}return ae}finally{d=null,f=K,p=!1}}var E=!1,C=null,A=-1,N=5,M=-1;function F(){return!(t.unstable_now()-M<N)}function P(){if(C!==null){var O=t.unstable_now();M=O;var R=!0;try{R=C(!0,O)}finally{R?V():(E=!1,C=null)}}else E=!1}var V;if(typeof w=="function")V=function(){w(P)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,H=_.port2;_.port1.onmessage=P,V=function(){H.postMessage(null)}}else V=function(){y(P,0)};function B(O){C=O,E||(E=!0,V())}function $(O,R){A=y(function(){O(t.unstable_now())},R)}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(O){O.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,B(S))},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(O){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var K=f;f=R;try{return O()}finally{f=K}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(O,R){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var K=f;f=O;try{return R()}finally{f=K}},t.unstable_scheduleCallback=function(O,R,K){var de=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?de+K:de):K=de,O){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=K+se,O={id:u++,callback:R,priorityLevel:O,startTime:K,expirationTime:se,sortIndex:-1},K>de?(O.sortIndex=K,e(c,O),n(l)===null&&O===n(c)&&(m?(b(A),A=-1):m=!0,$(k,K-de))):(O.sortIndex=se,e(l,O),g||p||(g=!0,B(S))),O},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(O){var R=f;return function(){var K=f;f=R;try{return O.apply(this,arguments)}finally{f=K}}}})(sA);rA.exports=sA;var HR=rA.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var WR=v,Mn=HR;function G(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var iA=new Set,gu={};function la(t,e){Al(t,e),Al(t+"Capture",e)}function Al(t,e){for(gu[t]=e,t=0;t<e.length;t++)iA.add(e[t])}var Ps=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xy=Object.prototype.hasOwnProperty,qR=/^[: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]*$/,Hx={},Wx={};function GR(t){return xy.call(Wx,t)?!0:xy.call(Hx,t)?!1:qR.test(t)?Wx[t]=!0:(Hx[t]=!0,!1)}function KR(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function ZR(t,e,n,r){if(e===null||typeof e>"u"||KR(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function fn(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Wt[t]=new fn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Wt[e]=new fn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Wt[t]=new fn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Wt[t]=new fn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Wt[t]=new fn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Wt[t]=new fn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Wt[t]=new fn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Wt[t]=new fn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Wt[t]=new fn(t,5,!1,t.toLowerCase(),null,!1,!1)});var K0=/[\-:]([a-z])/g;function Z0(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(K0,Z0);Wt[e]=new fn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(K0,Z0);Wt[e]=new fn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(K0,Z0);Wt[e]=new fn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Wt[t]=new fn(t,1,!1,t.toLowerCase(),null,!1,!1)});Wt.xlinkHref=new fn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Wt[t]=new fn(t,1,!1,t.toLowerCase(),null,!0,!0)});function Y0(t,e,n,r){var s=Wt.hasOwnProperty(e)?Wt[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(ZR(e,n,s,r)&&(n=null),r||s===null?GR(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var zs=WR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_d=Symbol.for("react.element"),Ua=Symbol.for("react.portal"),Ba=Symbol.for("react.fragment"),J0=Symbol.for("react.strict_mode"),ky=Symbol.for("react.profiler"),oA=Symbol.for("react.provider"),aA=Symbol.for("react.context"),Q0=Symbol.for("react.forward_ref"),Sy=Symbol.for("react.suspense"),Cy=Symbol.for("react.suspense_list"),X0=Symbol.for("react.memo"),ri=Symbol.for("react.lazy"),lA=Symbol.for("react.offscreen"),qx=Symbol.iterator;function cc(t){return t===null||typeof t!="object"?null:(t=qx&&t[qx]||t["@@iterator"],typeof t=="function"?t:null)}var lt=Object.assign,Hm;function Nc(t){if(Hm===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Hm=e&&e[1]||""}return` 34`+Hm+t}var Wm=!1;function qm(t,e){if(!t||Wm)return"";Wm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 16,621 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Wm=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Nc(t):""}function YR(t){switch(t.tag){case 5:return Nc(t.type);case 16:return Nc("Lazy");case 13:return Nc("Suspense");case 19:return Nc("SuspenseList");case 0:case 2:case 15:return t=qm(t.type,!1),t;case 11:return t=qm(t.type.render,!1),t;case 1:return t=qm(t.type,!0),t;default:return""}}function Ey(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ba:return"Fragment";case Ua:return"Portal";case ky:return"Profiler";case J0:return"StrictMode";case Sy:return"Suspense";case Cy:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case aA:return(t.displayName||"Context")+".Consumer";case oA:return(t._context.displayName||"Context")+".Provider";case Q0:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case X0:return e=t.displayName||null,e!==null?e:Ey(t.type)||"Memo";case ri:e=t._payload,t=t._init;try{return Ey(t(e))}catch{}}return null}function JR(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ey(e);case 8:return e===J0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Hi(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function cA(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function QR(t){var e=cA(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Nd(t){t._valueTracker||(t._valueTracker=QR(t))}function uA(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=cA(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function qh(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Ay(t,e){var n=e.checked;return lt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Gx(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Hi(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function dA(t,e){e=e.checked,e!=null&&Y0(t,"checked",e,!1)}function Ty(t,e){dA(t,e);var n=Hi(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?_y(t,e.type,n):e.hasOwnProperty("defaultValue")&&_y(t,e.type,Hi(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Kx(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function _y(t,e,n){(e!=="number"||qh(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ic=Array.isArray;function rl(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Hi(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function Ny(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(G(91));return lt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Zx(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(G(92));if(Ic(n)){if(1<n.length)throw Error(G(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Hi(n)}}function hA(t,e){var n=Hi(e.value),r=Hi(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Yx(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function fA(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Iy(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?fA(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Id,pA=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Id=Id||document.createElement("div"),Id.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Id.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function yu(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var zc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},XR=["Webkit","ms","Moz","O"];Object.keys(zc).forEach(function(t){XR.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),zc[e]=zc[t]})});function mA(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||zc.hasOwnProperty(t)&&zc[t]?(""+e).trim():e+"px"}function gA(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=mA(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var eD=lt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oy(t,e){if(e){if(eD[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(G(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(G(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(G(61))}if(e.style!=null&&typeof e.style!="object")throw Error(G(62))}}function Py(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 jy=null;function eb(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var My=null,sl=null,il=null;function Jx(t){if(t=od(t)){if(typeof My!="function")throw Error(G(280));var e=t.stateNode;e&&(e=Dp(e),My(t.stateNode,t.type,e))}}function yA(t){sl?il?il.push(t):il=[t]:sl=t}function vA(){if(sl){var t=sl,e=il;if(il=sl=null,Jx(t),e)for(t=0;t<e.length;t++)Jx(e[t])}}function bA(t,e){return t(e)}function wA(){}var Gm=!1;function xA(t,e,n){if(Gm)return t(e,n);Gm=!0;try{return bA(t,e,n)}finally{Gm=!1,(sl!==null||il!==null)&&(wA(),vA())}}function vu(t,e){var n=t.stateNode;if(n===null)return null;var r=Dp(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(G(231,e,typeof n));return n}var Ry=!1;if(Ps)try{var uc={};Object.defineProperty(uc,"passive",{get:function(){Ry=!0}}),window.addEventListener("test",uc,uc),window.removeEventListener("test",uc,uc)}catch{Ry=!1}function tD(t,e,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Uc=!1,Gh=null,Kh=!1,Dy=null,nD={onError:function(t){Uc=!0,Gh=t}};function rD(t,e,n,r,s,i,o,a,l){Uc=!1,Gh=null,tD.apply(nD,arguments)}function sD(t,e,n,r,s,i,o,a,l){if(rD.apply(this,arguments),Uc){if(Uc){var c=Gh;Uc=!1,Gh=null}else throw Error(G(198));Kh||(Kh=!0,Dy=c)}}function ca(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function kA(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Qx(t){if(ca(t)!==t)throw Error(G(188))}function iD(t){var e=t.alternate;if(!e){if(e=ca(t),e===null)throw Error(G(188));return e!==t?null:t}for(var n=t,r=e;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Qx(s),t;if(i===r)return Qx(s),e;i=i.sibling}throw Error(G(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?t:e}function SA(t){return t=iD(t),t!==null?CA(t):null}function CA(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=CA(t);if(e!==null)return e;t=t.sibling}return null}var EA=Mn.unstable_scheduleCallback,Xx=Mn.unstable_cancelCallback,oD=Mn.unstable_shouldYield,aD=Mn.unstable_requestPaint,yt=Mn.unstable_now,lD=Mn.unstable_getCurrentPriorityLevel,tb=Mn.unstable_ImmediatePriority,AA=Mn.unstable_UserBlockingPriority,Zh=Mn.unstable_NormalPriority,cD=Mn.unstable_LowPriority,TA=Mn.unstable_IdlePriority,Pp=null,Qr=null;function uD(t){if(Qr&&typeof Qr.onCommitFiberRoot=="function")try{Qr.onCommitFiberRoot(Pp,t,void 0,(t.current.flags&128)===128)}catch{}}var Er=Math.clz32?Math.clz32:fD,dD=Math.log,hD=Math.LN2;function fD(t){return t>>>=0,t===0?32:31-(dD(t)/hD|0)|0}var Od=64,Pd=4194304;function Oc(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Yh(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Oc(a):(i&=o,i!==0&&(r=Oc(i)))}else o=n&~s,o!==0?r=Oc(o):i!==0&&(r=Oc(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Er(e),s=1<<n,r|=t[n],e&=~s;return r}function pD(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mD(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-Er(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=pD(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Ly(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function _A(){var t=Od;return Od<<=1,!(Od&4194240)&&(Od=64),t}function Km(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function sd(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Er(e),t[e]=n}function gD(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-Er(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function nb(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Er(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var We=0;function NA(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var IA,rb,OA,PA,jA,$y=!1,jd=[],_i=null,Ni=null,Ii=null,bu=new Map,wu=new Map,ci=[],yD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function e1(t,e){switch(t){case"focusin":case"focusout":_i=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":bu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":wu.delete(e.pointerId)}}function dc(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=od(e),e!==null&&rb(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function vD(t,e,n,r,s){switch(e){case"focusin":return _i=dc(_i,t,e,n,r,s),!0;case"dragenter":return Ni=dc(Ni,t,e,n,r,s),!0;case"mouseover":return Ii=dc(Ii,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return bu.set(i,dc(bu.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,wu.set(i,dc(wu.get(i)||null,t,e,n,r,s)),!0}return!1}function MA(t){var e=ko(t.target);if(e!==null){var n=ca(e);if(n!==null){if(e=n.tag,e===13){if(e=kA(n),e!==null){t.blockedOn=e,jA(t.priority,function(){OA(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function vh(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Fy(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);jy=r,n.target.dispatchEvent(r),jy=null}else return e=od(n),e!==null&&rb(e),t.blockedOn=n,!1;e.shift()}return!0}function t1(t,e,n){vh(t)&&n.delete(e)}
vendor: 13,734 bytes, line 37
37function bD(){$y=!1,_i!==null&&vh(_i)&&(_i=null),Ni!==null&&vh(Ni)&&(Ni=null),Ii!==null&&vh(Ii)&&(Ii=null),bu.forEach(t1),wu.forEach(t1)}function hc(t,e){t.blockedOn===e&&(t.blockedOn=null,$y||($y=!0,Mn.unstable_scheduleCallback(Mn.unstable_NormalPriority,bD)))}function xu(t){function e(s){return hc(s,t)}if(0<jd.length){hc(jd[0],t);for(var n=1;n<jd.length;n++){var r=jd[n];r.blockedOn===t&&(r.blockedOn=null)}}for(_i!==null&&hc(_i,t),Ni!==null&&hc(Ni,t),Ii!==null&&hc(Ii,t),bu.forEach(e),wu.forEach(e),n=0;n<ci.length;n++)r=ci[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<ci.length&&(n=ci[0],n.blockedOn===null);)MA(n),n.blockedOn===null&&ci.shift()}var ol=zs.ReactCurrentBatchConfig,Jh=!0;function wD(t,e,n,r){var s=We,i=ol.transition;ol.transition=null;try{We=1,sb(t,e,n,r)}finally{We=s,ol.transition=i}}function xD(t,e,n,r){var s=We,i=ol.transition;ol.transition=null;try{We=4,sb(t,e,n,r)}finally{We=s,ol.transition=i}}function sb(t,e,n,r){if(Jh){var s=Fy(t,e,n,r);if(s===null)sg(t,e,r,Qh,n),e1(t,r);else if(vD(s,t,e,n,r))r.stopPropagation();else if(e1(t,r),e&4&&-1<yD.indexOf(t)){for(;s!==null;){var i=od(s);if(i!==null&&IA(i),i=Fy(t,e,n,r),i===null&&sg(t,e,r,Qh,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else sg(t,e,r,null,n)}}var Qh=null;function Fy(t,e,n,r){if(Qh=null,t=eb(r),t=ko(t),t!==null)if(e=ca(t),e===null)t=null;else if(n=e.tag,n===13){if(t=kA(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Qh=t,null}function RA(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(lD()){case tb:return 1;case AA:return 4;case Zh:case cD:return 16;case TA:return 536870912;default:return 16}default:return 16}}var xi=null,ib=null,bh=null;function DA(){if(bh)return bh;var t,e=ib,n=e.length,r,s="value"in xi?xi.value:xi.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return bh=s.slice(t,1<r?1-r:void 0)}function wh(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Md(){return!0}function n1(){return!1}function Ln(t){function e(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Md:n1,this.isPropagationStopped=n1,this}return lt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Md)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Md)},persist:function(){},isPersistent:Md}),e}var Yl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ob=Ln(Yl),id=lt({},Yl,{view:0,detail:0}),kD=Ln(id),Zm,Ym,fc,jp=lt({},id,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ab,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==fc&&(fc&&t.type==="mousemove"?(Zm=t.screenX-fc.screenX,Ym=t.screenY-fc.screenY):Ym=Zm=0,fc=t),Zm)},movementY:function(t){return"movementY"in t?t.movementY:Ym}}),r1=Ln(jp),SD=lt({},jp,{dataTransfer:0}),CD=Ln(SD),ED=lt({},id,{relatedTarget:0}),Jm=Ln(ED),AD=lt({},Yl,{animationName:0,elapsedTime:0,pseudoElement:0}),TD=Ln(AD),_D=lt({},Yl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ND=Ln(_D),ID=lt({},Yl,{data:0}),s1=Ln(ID),OD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PD={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"},jD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function MD(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=jD[t])?!!e[t]:!1}function ab(){return MD}var RD=lt({},id,{key:function(t){if(t.key){var e=OD[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=wh(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PD[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ab,charCode:function(t){return t.type==="keypress"?wh(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?wh(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DD=Ln(RD),LD=lt({},jp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),i1=Ln(LD),$D=lt({},id,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ab}),FD=Ln($D),zD=lt({},Yl,{propertyName:0,elapsedTime:0,pseudoElement:0}),UD=Ln(zD),BD=lt({},jp,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),VD=Ln(BD),HD=[9,13,27,32],lb=Ps&&"CompositionEvent"in window,Bc=null;Ps&&"documentMode"in document&&(Bc=document.documentMode);var WD=Ps&&"TextEvent"in window&&!Bc,LA=Ps&&(!lb||Bc&&8<Bc&&11>=Bc),o1=" ",a1=!1;function $A(t,e){switch(t){case"keyup":return HD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FA(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Va=!1;function qD(t,e){switch(t){case"compositionend":return FA(e);case"keypress":return e.which!==32?null:(a1=!0,o1);case"textInput":return t=e.data,t===o1&&a1?null:t;default:return null}}function GD(t,e){if(Va)return t==="compositionend"||!lb&&$A(t,e)?(t=DA(),bh=ib=xi=null,Va=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return LA&&e.locale!=="ko"?null:e.data;default:return null}}var KD={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 l1(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!KD[t.type]:e==="textarea"}function zA(t,e,n,r){yA(r),e=Xh(e,"onChange"),0<e.length&&(n=new ob("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Vc=null,ku=null;function ZD(t){JA(t,0)}function Mp(t){var e=qa(t);if(uA(e))return t}function YD(t,e){if(t==="change")return e}var UA=!1;if(Ps){var Qm;if(Ps){var Xm="oninput"in document;if(!Xm){var c1=document.createElement("div");c1.setAttribute("oninput","return;"),Xm=typeof c1.oninput=="function"}Qm=Xm}else Qm=!1;UA=Qm&&(!document.documentMode||9<document.documentMode)}function u1(){Vc&&(Vc.detachEvent("onpropertychange",BA),ku=Vc=null)}function BA(t){if(t.propertyName==="value"&&Mp(ku)){var e=[];zA(e,ku,t,eb(t)),xA(ZD,e)}}function JD(t,e,n){t==="focusin"?(u1(),Vc=e,ku=n,Vc.attachEvent("onpropertychange",BA)):t==="focusout"&&u1()}function QD(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Mp(ku)}function XD(t,e){if(t==="click")return Mp(e)}function eL(t,e){if(t==="input"||t==="change")return Mp(e)}function tL(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Tr=typeof Object.is=="function"?Object.is:tL;function Su(t,e){if(Tr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!xy.call(e,s)||!Tr(t[s],e[s]))return!1}return!0}function d1(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function h1(t,e){var n=d1(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=d1(n)}}function VA(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?VA(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function HA(){for(var t=window,e=qh();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=qh(t.document)}return e}function cb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function nL(t){var e=HA(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&VA(n.ownerDocument.documentElement,n)){if(r!==null&&cb(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=h1(n,i);var o=h1(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var rL=Ps&&"documentMode"in document&&11>=document.documentMode,Ha=null,zy=null,Hc=null,Uy=!1;function f1(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Uy||Ha==null||Ha!==qh(r)||(r=Ha,"selectionStart"in r&&cb(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hc&&Su(Hc,r)||(Hc=r,r=Xh(zy,"onSelect"),0<r.length&&(e=new ob("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Ha)))}function Rd(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Wa={animationend:Rd("Animation","AnimationEnd"),animationiteration:Rd("Animation","AnimationIteration"),animationstart:Rd("Animation","AnimationStart"),transitionend:Rd("Transition","TransitionEnd")},eg={},WA={};Ps&&(WA=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function Rp(t){if(eg[t])return eg[t];if(!Wa[t])return t;var e=Wa[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in WA)return eg[t]=e[n];return t}var qA=Rp("animationend"),GA=Rp("animationiteration"),KA=Rp("animationstart"),ZA=Rp("transitionend"),YA=new Map,p1="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qi(t,e){YA.set(t,e),la(e,[t])}for(var tg=0;tg<p1.length;tg++){var ng=p1[tg],sL=ng.toLowerCase(),iL=ng[0].toUpperCase()+ng.slice(1);
vendor: 5,251 bytes, line 37
37Qi(sL,"on"+iL)}Qi(qA,"onAnimationEnd");Qi(GA,"onAnimationIteration");Qi(KA,"onAnimationStart");Qi("dblclick","onDoubleClick");Qi("focusin","onFocus");Qi("focusout","onBlur");Qi(ZA,"onTransitionEnd");Al("onMouseEnter",["mouseout","mouseover"]);Al("onMouseLeave",["mouseout","mouseover"]);Al("onPointerEnter",["pointerout","pointerover"]);Al("onPointerLeave",["pointerout","pointerover"]);la("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));la("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));la("onBeforeInput",["compositionend","keypress","textInput","paste"]);la("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));la("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));la("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pc="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(" "),oL=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pc));function m1(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,sD(r,e,void 0,t),t.currentTarget=null}function JA(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;m1(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;m1(s,a,c),i=l}}}if(Kh)throw t=Dy,Kh=!1,Dy=null,t}function Xe(t,e){var n=e[qy];n===void 0&&(n=e[qy]=new Set);var r=t+"__bubble";n.has(r)||(QA(e,t,2,!1),n.add(r))}function rg(t,e,n){var r=0;e&&(r|=4),QA(n,t,r,e)}var Dd="_reactListening"+Math.random().toString(36).slice(2);function Cu(t){if(!t[Dd]){t[Dd]=!0,iA.forEach(function(n){n!=="selectionchange"&&(oL.has(n)||rg(n,!1,t),rg(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Dd]||(e[Dd]=!0,rg("selectionchange",!1,e))}}function QA(t,e,n,r){switch(RA(e)){case 1:var s=wD;break;case 4:s=xD;break;default:s=sb}n=s.bind(null,e,n,t),s=void 0,!Ry||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function sg(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=ko(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}xA(function(){var c=i,u=eb(n),d=[];e:{var f=YA.get(t);if(f!==void 0){var p=ob,g=t;switch(t){case"keypress":if(wh(n)===0)break e;case"keydown":case"keyup":p=DD;break;case"focusin":g="focus",p=Jm;break;case"focusout":g="blur",p=Jm;break;case"beforeblur":case"afterblur":p=Jm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=r1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=CD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=FD;break;case qA:case GA:case KA:p=TD;break;case ZA:p=UD;break;case"scroll":p=kD;break;case"wheel":p=VD;break;case"copy":case"cut":case"paste":p=ND;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=i1}var m=(e&4)!==0,y=!m&&t==="scroll",b=m?f!==null?f+"Capture":null:f;m=[];for(var w=c,x;w!==null;){x=w;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,b!==null&&(k=vu(w,b),k!=null&&m.push(Eu(w,k,x)))),y)break;w=w.return}0<m.length&&(f=new p(f,g,null,n,u),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",f&&n!==jy&&(g=n.relatedTarget||n.fromElement)&&(ko(g)||g[js]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?ko(g):null,g!==null&&(y=ca(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(m=r1,k="onMouseLeave",b="onMouseEnter",w="mouse",(t==="pointerout"||t==="pointerover")&&(m=i1,k="onPointerLeave",b="onPointerEnter",w="pointer"),y=p==null?f:qa(p),x=g==null?f:qa(g),f=new m(k,w+"leave",p,n,u),f.target=y,f.relatedTarget=x,k=null,ko(u)===c&&(m=new m(b,w+"enter",g,n,u),m.target=x,m.relatedTarget=y,k=m),y=k,p&&g)t:{for(m=p,b=g,w=0,x=m;x;x=va(x))w++;for(x=0,k=b;k;k=va(k))x++;for(;0<w-x;)m=va(m),w--;for(;0<x-w;)b=va(b),x--;for(;w--;){if(m===b||b!==null&&m===b.alternate)break t;m=va(m),b=va(b)}m=null}else m=null;p!==null&&g1(d,f,p,m,!1),g!==null&&y!==null&&g1(d,y,g,m,!0)}}
vendor: 5,247 bytes, lines 37-38
37e:{if(f=c?qa(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=YD;else if(l1(f))if(UA)S=eL;else{S=QD;var E=JD}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=XD);if(S&&(S=S(t,c))){zA(d,S,n,u);break e}E&&E(t,f,c),t==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&_y(f,"number",f.value)}switch(E=c?qa(c):window,t){case"focusin":(l1(E)||E.contentEditable==="true")&&(Ha=E,zy=c,Hc=null);break;case"focusout":Hc=zy=Ha=null;break;case"mousedown":Uy=!0;break;case"contextmenu":case"mouseup":case"dragend":Uy=!1,f1(d,n,u);break;case"selectionchange":if(rL)break;case"keydown":case"keyup":f1(d,n,u)}var C;if(lb)e:{switch(t){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Va?$A(t,n)&&(A="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(LA&&n.locale!=="ko"&&(Va||A!=="onCompositionStart"?A==="onCompositionEnd"&&Va&&(C=DA()):(xi=u,ib="value"in xi?xi.value:xi.textContent,Va=!0)),E=Xh(c,A),0<E.length&&(A=new s1(A,t,null,n,u),d.push({event:A,listeners:E}),C?A.data=C:(C=FA(n),C!==null&&(A.data=C)))),(C=WD?qD(t,n):GD(t,n))&&(c=Xh(c,"onBeforeInput"),0<c.length&&(u=new s1("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}JA(d,e)})}function Eu(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Xh(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=vu(t,n),i!=null&&r.unshift(Eu(t,i,s)),i=vu(t,e),i!=null&&r.push(Eu(t,i,s))),t=t.return}return r}function va(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function g1(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=vu(n,i),l!=null&&o.unshift(Eu(n,l,a))):s||(l=vu(n,i),l!=null&&o.push(Eu(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var aL=/\r\n?/g,lL=/\u0000|\uFFFD/g;function y1(t){return(typeof t=="string"?t:""+t).replace(aL,` 38`).replace(lL,"")}function Ld(t,e,n){if(e=y1(e),y1(t)!==e&&n)throw Error(G(425))}function ef(){}var By=null,Vy=null;function Hy(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Wy=typeof setTimeout=="function"?setTimeout:void 0,cL=typeof clearTimeout=="function"?clearTimeout:void 0,v1=typeof Promise=="function"?Promise:void 0,uL=typeof queueMicrotask=="function"?queueMicrotask:typeof v1<"u"?function(t){return v1.resolve(null).then(t).catch(dL)}:Wy;function dL(t){setTimeout(function(){throw t})}function ig(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),xu(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);xu(e)}function Oi(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function b1(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Jl=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Jl,Au="__reactProps$"+Jl,js="__reactContainer$"+Jl,qy="__reactEvents$"+Jl,hL="__reactListeners$"+Jl,fL="__reactHandles$"+Jl;function ko(t){var e=t[Gr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[js]||n[Gr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=b1(t);t!==null;){if(n=t[Gr])return n;t=b1(t)}return e}t=n,n=t.parentNode}return null}function od(t){return t=t[Gr]||t[js],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function qa(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(G(33))}function Dp(t){return t[Au]||null}var Gy=[],Ga=-1;function Xi(t){return{current:t}}function tt(t){0>Ga||(t.current=Gy[Ga],Gy[Ga]=null,Ga--)}function Je(t,e){Ga++,Gy[Ga]=t.current,t.current=e}var Wi={},Xt=Xi(Wi),kn=Xi(!1),Wo=Wi;function Tl(t,e){var n=t.type.contextTypes;if(!n)return Wi;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Sn(t){return t=t.childContextTypes,t!=null}function tf(){tt(kn),tt(Xt)}function w1(t,e,n){if(Xt.current!==Wi)throw Error(G(168));Je(Xt,e),Je(kn,n)}function XA(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(G(108,JR(t)||"Unknown",s));return lt({},n,r)}function nf(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Wi,Wo=Xt.current,Je(Xt,t),Je(kn,kn.current),!0}function x1(t,e,n){var r=t.stateNode;if(!r)throw Error(G(169));n?(t=XA(t,e,Wo),r.__reactInternalMemoizedMergedChildContext=t,tt(kn),tt(Xt),Je(Xt,t)):tt(kn),Je(kn,n)}
vendor: 5,094 bytes, line 38
38var Cs=null,Lp=!1,og=!1;function eT(t){Cs===null?Cs=[t]:Cs.push(t)}function pL(t){Lp=!0,eT(t)}function eo(){if(!og&&Cs!==null){og=!0;var t=0,e=We;try{var n=Cs;for(We=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Cs=null,Lp=!1}catch(s){throw Cs!==null&&(Cs=Cs.slice(t+1)),EA(tb,eo),s}finally{We=e,og=!1}}return null}var Ka=[],Za=0,rf=null,sf=0,Wn=[],qn=0,qo=null,As=1,Ts="";function mo(t,e){Ka[Za++]=sf,Ka[Za++]=rf,rf=t,sf=e}function tT(t,e,n){Wn[qn++]=As,Wn[qn++]=Ts,Wn[qn++]=qo,qo=t;var r=As;t=Ts;var s=32-Er(r)-1;r&=~(1<<s),n+=1;var i=32-Er(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,As=1<<32-Er(e)+s|n<<s|r,Ts=i+t}else As=1<<i|n<<s|r,Ts=t}function ub(t){t.return!==null&&(mo(t,1),tT(t,1,0))}function db(t){for(;t===rf;)rf=Ka[--Za],Ka[Za]=null,sf=Ka[--Za],Ka[Za]=null;for(;t===qo;)qo=Wn[--qn],Wn[qn]=null,Ts=Wn[--qn],Wn[qn]=null,As=Wn[--qn],Wn[qn]=null}var Pn=null,On=null,st=!1,br=null;function nT(t,e){var n=Zn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function k1(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Pn=t,On=Oi(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Pn=t,On=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=qo!==null?{id:As,overflow:Ts}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Zn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Pn=t,On=null,!0):!1;default:return!1}}function Ky(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Zy(t){if(st){var e=On;if(e){var n=e;if(!k1(t,e)){if(Ky(t))throw Error(G(418));e=Oi(n.nextSibling);var r=Pn;e&&k1(t,e)?nT(r,n):(t.flags=t.flags&-4097|2,st=!1,Pn=t)}}else{if(Ky(t))throw Error(G(418));t.flags=t.flags&-4097|2,st=!1,Pn=t}}}function S1(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Pn=t}function $d(t){if(t!==Pn)return!1;if(!st)return S1(t),st=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Hy(t.type,t.memoizedProps)),e&&(e=On)){if(Ky(t))throw rT(),Error(G(418));for(;e;)nT(t,e),e=Oi(e.nextSibling)}if(S1(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(G(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){On=Oi(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}On=null}}else On=Pn?Oi(t.stateNode.nextSibling):null;return!0}function rT(){for(var t=On;t;)t=Oi(t.nextSibling)}function _l(){On=Pn=null,st=!1}function hb(t){br===null?br=[t]:br.push(t)}var mL=zs.ReactCurrentBatchConfig;function pc(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(G(309));var r=n.stateNode}if(!r)throw Error(G(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,t))}return t}function Fd(t,e){throw t=Object.prototype.toString.call(e),Error(G(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function C1(t){var e=t._init;return e(t._payload)}function sT(t){function e(b,w){if(t){var x=b.deletions;x===null?(b.deletions=[w],b.flags|=16):x.push(w)}}function n(b,w){if(!t)return null;for(;w!==null;)e(b,w),w=w.sibling;return null}function r(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function s(b,w){return b=Ri(b,w),b.index=0,b.sibling=null,b}function i(b,w,x){return b.index=x,t?(x=b.alternate,x!==null?(x=x.index,x<w?(b.flags|=2,w):x):(b.flags|=2,w)):(b.flags|=1048576,w)}function o(b){return t&&b.alternate===null&&(b.flags|=2),b}function a(b,w,x,k){return w===null||w.tag!==6?(w=fg(x,b.mode,k),w.return=b,w):(w=s(w,x),w.return=b,w)}function l(b,w,x,k){var S=x.type;return S===Ba?u(b,w,x.props.children,k,x.key):w!==null&&(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ri&&C1(S)===w.type)?(k=s(w,x.props),k.ref=pc(b,w,x),k.return=b,k):(k=Th(x.type,x.key,x.props,null,b.mode,k),k.ref=pc(b,w,x),k.return=b,k)}function c(b,w,x,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=pg(x,b.mode,k),w.return=b,w):(w=s(w,x.children||[]),w.return=b,w)}function u(b,w,x,k,S){return w===null||w.tag!==7?(w=$o(x,b.mode,k,S),w.return=b,w):(w=s(w,x),w.return=b,w)}function d(b,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=fg(""+w,b.mode,x),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _d:return x=Th(w.type,w.key,w.props,null,b.mode,x),x.ref=pc(b,null,w),x.return=b,x;case Ua:return w=pg(w,b.mode,x),w.return=b,w;case ri:var k=w._init;return d(b,k(w._payload),x)}if(Ic(w)||cc(w))return w=$o(w,b.mode,x,null),w.return=b,w;Fd(b,w)}return null}function f(b,w,x,k){var S=w!==null?w.key:null;
vendor: 4,164 bytes, line 38
38if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(b,w,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case _d:return x.key===S?l(b,w,x,k):null;case Ua:return x.key===S?c(b,w,x,k):null;case ri:return S=x._init,f(b,w,S(x._payload),k)}if(Ic(x)||cc(x))return S!==null?null:u(b,w,x,k,null);Fd(b,x)}return null}function p(b,w,x,k,S){if(typeof k=="string"&&k!==""||typeof k=="number")return b=b.get(x)||null,a(w,b,""+k,S);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case _d:return b=b.get(k.key===null?x:k.key)||null,l(w,b,k,S);case Ua:return b=b.get(k.key===null?x:k.key)||null,c(w,b,k,S);case ri:var E=k._init;return p(b,w,x,E(k._payload),S)}if(Ic(k)||cc(k))return b=b.get(x)||null,u(w,b,k,S,null);Fd(w,k)}return null}function g(b,w,x,k){for(var S=null,E=null,C=w,A=w=0,N=null;C!==null&&A<x.length;A++){C.index>A?(N=C,C=null):N=C.sibling;var M=f(b,C,x[A],k);if(M===null){C===null&&(C=N);break}t&&C&&M.alternate===null&&e(b,C),w=i(M,w,A),E===null?S=M:E.sibling=M,E=M,C=N}if(A===x.length)return n(b,C),st&&mo(b,A),S;if(C===null){for(;A<x.length;A++)C=d(b,x[A],k),C!==null&&(w=i(C,w,A),E===null?S=C:E.sibling=C,E=C);return st&&mo(b,A),S}for(C=r(b,C);A<x.length;A++)N=p(C,b,A,x[A],k),N!==null&&(t&&N.alternate!==null&&C.delete(N.key===null?A:N.key),w=i(N,w,A),E===null?S=N:E.sibling=N,E=N);return t&&C.forEach(function(F){return e(b,F)}),st&&mo(b,A),S}function m(b,w,x,k){var S=cc(x);if(typeof S!="function")throw Error(G(150));if(x=S.call(x),x==null)throw Error(G(151));for(var E=S=null,C=w,A=w=0,N=null,M=x.next();C!==null&&!M.done;A++,M=x.next()){C.index>A?(N=C,C=null):N=C.sibling;var F=f(b,C,M.value,k);if(F===null){C===null&&(C=N);break}t&&C&&F.alternate===null&&e(b,C),w=i(F,w,A),E===null?S=F:E.sibling=F,E=F,C=N}if(M.done)return n(b,C),st&&mo(b,A),S;if(C===null){for(;!M.done;A++,M=x.next())M=d(b,M.value,k),M!==null&&(w=i(M,w,A),E===null?S=M:E.sibling=M,E=M);return st&&mo(b,A),S}for(C=r(b,C);!M.done;A++,M=x.next())M=p(C,b,A,M.value,k),M!==null&&(t&&M.alternate!==null&&C.delete(M.key===null?A:M.key),w=i(M,w,A),E===null?S=M:E.sibling=M,E=M);return t&&C.forEach(function(P){return e(b,P)}),st&&mo(b,A),S}function y(b,w,x,k){if(typeof x=="object"&&x!==null&&x.type===Ba&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case _d:e:{for(var S=x.key,E=w;E!==null;){if(E.key===S){if(S=x.type,S===Ba){if(E.tag===7){n(b,E.sibling),w=s(E,x.props.children),w.return=b,b=w;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ri&&C1(S)===E.type){n(b,E.sibling),w=s(E,x.props),w.ref=pc(b,E,x),w.return=b,b=w;break e}n(b,E);break}else e(b,E);E=E.sibling}x.type===Ba?(w=$o(x.props.children,b.mode,k,x.key),w.return=b,b=w):(k=Th(x.type,x.key,x.props,null,b.mode,k),k.ref=pc(b,w,x),k.return=b,b=k)}return o(b);case Ua:e:{for(E=x.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(b,w.sibling),w=s(w,x.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else e(b,w);w=w.sibling}w=pg(x,b.mode,k),w.return=b,b=w}return o(b);case ri:return E=x._init,y(b,w,E(x._payload),k)}if(Ic(x))return g(b,w,x,k);if(cc(x))return m(b,w,x,k);Fd(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(b,w.sibling),w=s(w,x),w.return=b,b=w):(n(b,w),w=fg(x,b.mode,k),w.return=b,b=w),o(b)):n(b,w)}return y}var Nl=sT(!0),iT=sT(!1),of=Xi(null),af=null,Ya=null,fb=null;function pb(){fb=Ya=af=null}function mb(t){var e=of.current;tt(of),t._currentValue=e}function Yy(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function al(t,e){af=t,fb=Ya=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(xn=!0),t.firstContext=null)}function tr(t){var e=t._currentValue;if(fb!==t)if(t={context:t,memoizedValue:e,next:null},Ya===null){if(af===null)throw Error(G(308));Ya=t,af.dependencies={lanes:0,firstContext:t}}else Ya=Ya.next=t;return e}var So=null;function gb(t){So===null?So=[t]:So.push(t)}function oT(t,e,n,r){var s=e.interleaved;
vendor: 18,704 bytes, lines 38-40
38return s===null?(n.next=n,gb(e)):(n.next=s.next,s.next=n),e.interleaved=n,Ms(t,r)}function Ms(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var si=!1;function yb(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aT(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ns(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Pi(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Fe&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Ms(t,n)}return s=r.interleaved,s===null?(e.next=e,gb(r)):(e.next=s.next,s.next=e),r.interleaved=e,Ms(t,n)}function xh(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,nb(t,n)}}function E1(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function lf(t,e,n,r){var s=t.updateQueue;si=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(f=e,p=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=lt({},d,f);break e;case 2:si=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Ko|=o,t.lanes=o,t.memoizedState=d}}function A1(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(G(191,s));s.call(r)}}}var ad={},Xr=Xi(ad),Tu=Xi(ad),_u=Xi(ad);function Co(t){if(t===ad)throw Error(G(174));return t}function vb(t,e){switch(Je(_u,e),Je(Tu,t),Je(Xr,ad),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Iy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Iy(e,t)}tt(Xr),Je(Xr,e)}function Il(){tt(Xr),tt(Tu),tt(_u)}function lT(t){Co(_u.current);var e=Co(Xr.current),n=Iy(e,t.type);e!==n&&(Je(Tu,t),Je(Xr,n))}function bb(t){Tu.current===t&&(tt(Xr),tt(Tu))}var it=Xi(0);function cf(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ag=[];function wb(){for(var t=0;t<ag.length;t++)ag[t]._workInProgressVersionPrimary=null;ag.length=0}var kh=zs.ReactCurrentDispatcher,lg=zs.ReactCurrentBatchConfig,Go=0,at=null,_t=null,Mt=null,uf=!1,Wc=!1,Nu=0,gL=0;function Kt(){throw Error(G(321))}function xb(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Tr(t[n],e[n]))return!1;return!0}function kb(t,e,n,r,s,i){if(Go=i,at=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,kh.current=t===null||t.memoizedState===null?wL:xL,t=n(r,s),Wc){i=0;do{if(Wc=!1,Nu=0,25<=i)throw Error(G(301));i+=1,Mt=_t=null,e.updateQueue=null,kh.current=kL,t=n(r,s)}while(Wc)}if(kh.current=df,e=_t!==null&&_t.next!==null,Go=0,Mt=_t=at=null,uf=!1,e)throw Error(G(300));return t}function Sb(){var t=Nu!==0;return Nu=0,t}function $r(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?at.memoizedState=Mt=t:Mt=Mt.next=t,Mt}function nr(){if(_t===null){var t=at.alternate;t=t!==null?t.memoizedState:null}else t=_t.next;var e=Mt===null?at.memoizedState:Mt.next;if(e!==null)Mt=e,_t=t;else{if(t===null)throw Error(G(310));_t=t,t={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},Mt===null?at.memoizedState=Mt=t:Mt=Mt.next=t}return Mt}function Iu(t,e){return typeof e=="function"?e(t):e}function cg(t){var e=nr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=_t,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Go&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,at.lanes|=u,Ko|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,Tr(r,e.memoizedState)||(xn=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,at.lanes|=i,Ko|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function ug(t){var e=nr(),n=e.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);Tr(i,e.memoizedState)||(xn=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function cT(){}function uT(t,e){var n=at,r=nr(),s=e(),i=!Tr(r.memoizedState,s);if(i&&(r.memoizedState=s,xn=!0),r=r.queue,Cb(fT.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||Mt!==null&&Mt.memoizedState.tag&1){if(n.flags|=2048,Ou(9,hT.bind(null,n,r,s,e),void 0,null),Lt===null)throw Error(G(349));Go&30||dT(n,e,s)}return s}function dT(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=at.updateQueue,e===null?(e={lastEffect:null,stores:null},at.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function hT(t,e,n,r){e.value=n,e.getSnapshot=r,pT(e)&&mT(t)}function fT(t,e,n){return n(function(){pT(e)&&mT(t)})}function pT(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Tr(t,n)}catch{return!0}}function mT(t){var e=Ms(t,1);e!==null&&Ar(e,t,1,-1)}function T1(t){var e=$r();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Iu,lastRenderedState:t},e.queue=t,t=t.dispatch=bL.bind(null,at,t),[e.memoizedState,t]}function Ou(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=at.updateQueue,e===null?(e={lastEffect:null,stores:null},at.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function gT(){return nr().memoizedState}function Sh(t,e,n,r){var s=$r();at.flags|=t,s.memoizedState=Ou(1|e,n,void 0,r===void 0?null:r)}function $p(t,e,n,r){var s=nr();r=r===void 0?null:r;var i=void 0;if(_t!==null){var o=_t.memoizedState;if(i=o.destroy,r!==null&&xb(r,o.deps)){s.memoizedState=Ou(e,n,i,r);return}}at.flags|=t,s.memoizedState=Ou(1|e,n,i,r)}function _1(t,e){return Sh(8390656,8,t,e)}function Cb(t,e){return $p(2048,8,t,e)}function yT(t,e){return $p(4,2,t,e)}function vT(t,e){return $p(4,4,t,e)}function bT(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function wT(t,e,n){return n=n!=null?n.concat([t]):null,$p(4,4,bT.bind(null,e,t),n)}function Eb(){}function xT(t,e){var n=nr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&xb(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function kT(t,e){var n=nr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&xb(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ST(t,e,n){return Go&21?(Tr(n,e)||(n=_A(),at.lanes|=n,Ko|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,xn=!0),t.memoizedState=n)}function yL(t,e){var n=We;We=n!==0&&4>n?n:4,t(!0);var r=lg.transition;lg.transition={};try{t(!1),e()}finally{We=n,lg.transition=r}}function CT(){return nr().memoizedState}function vL(t,e,n){var r=Mi(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ET(t))AT(e,n);else if(n=oT(t,e,n,r),n!==null){var s=cn();Ar(n,t,r,s),TT(n,e,r)}}function bL(t,e,n){var r=Mi(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ET(t))AT(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Tr(a,o)){var l=e.interleaved;l===null?(s.next=s,gb(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=oT(t,e,s,r),n!==null&&(s=cn(),Ar(n,t,r,s),TT(n,e,r))}}function ET(t){var e=t.alternate;return t===at||e!==null&&e===at}function AT(t,e){Wc=uf=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function TT(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,nb(t,n)}}var df={readContext:tr,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},wL={readContext:tr,useCallback:function(t,e){return $r().memoizedState=[t,e===void 0?null:e],t},useContext:tr,useEffect:_1,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Sh(4194308,4,bT.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Sh(4194308,4,t,e)},useInsertionEffect:function(t,e){return Sh(4,2,t,e)},useMemo:function(t,e){var n=$r();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=$r();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=vL.bind(null,at,t),[r.memoizedState,t]},useRef:function(t){var e=$r();return t={current:t},e.memoizedState=t},useState:T1,useDebugValue:Eb,useDeferredValue:function(t){return $r().memoizedState=t},useTransition:function(){var t=T1(!1),e=t[0];return t=yL.bind(null,t[1]),$r().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=at,s=$r();if(st){if(n===void 0)throw Error(G(407));n=n()}else{if(n=e(),Lt===null)throw Error(G(349));Go&30||dT(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,_1(fT.bind(null,r,i,t),[t]),r.flags|=2048,Ou(9,hT.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=$r(),e=Lt.identifierPrefix;if(st){var n=Ts,r=As;n=(r&~(1<<32-Er(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Nu++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=gL++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},xL={readContext:tr,useCallback:xT,useContext:tr,useEffect:Cb,useImperativeHandle:wT,useInsertionEffect:yT,useLayoutEffect:vT,useMemo:kT,useReducer:cg,useRef:gT,useState:function(){return cg(Iu)},useDebugValue:Eb,useDeferredValue:function(t){var e=nr();return ST(e,_t.memoizedState,t)},useTransition:function(){var t=cg(Iu)[0],e=nr().memoizedState;return[t,e]},useMutableSource:cT,useSyncExternalStore:uT,useId:CT,unstable_isNewReconciler:!1},kL={readContext:tr,useCallback:xT,useContext:tr,useEffect:Cb,useImperativeHandle:wT,useInsertionEffect:yT,useLayoutEffect:vT,useMemo:kT,useReducer:ug,useRef:gT,useState:function(){return ug(Iu)},useDebugValue:Eb,useDeferredValue:function(t){var e=nr();return _t===null?e.memoizedState=t:ST(e,_t.memoizedState,t)},useTransition:function(){var t=ug(Iu)[0],e=nr().memoizedState;return[t,e]},useMutableSource:cT,useSyncExternalStore:uT,useId:CT,unstable_isNewReconciler:!1};function fr(t,e){if(t&&t.defaultProps){e=lt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Jy(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:lt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Fp={isMounted:function(t){return(t=t._reactInternals)?ca(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=cn(),s=Mi(t),i=Ns(r,s);i.payload=e,n!=null&&(i.callback=n),e=Pi(t,i,s),e!==null&&(Ar(e,t,s,r),xh(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=cn(),s=Mi(t),i=Ns(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Pi(t,i,s),e!==null&&(Ar(e,t,s,r),xh(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=cn(),r=Mi(t),s=Ns(n,r);s.tag=2,e!=null&&(s.callback=e),e=Pi(t,s,r),e!==null&&(Ar(e,t,r,n),xh(e,t,r))}};function N1(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!Su(n,r)||!Su(s,i):!0}function _T(t,e,n){var r=!1,s=Wi,i=e.contextType;return typeof i=="object"&&i!==null?i=tr(i):(s=Sn(e)?Wo:Xt.current,r=e.contextTypes,i=(r=r!=null)?Tl(t,s):Wi),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Fp,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function I1(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Fp.enqueueReplaceState(e,e.state,null)}function Qy(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},yb(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=tr(i):(i=Sn(e)?Wo:Xt.current,s.context=Tl(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Jy(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Fp.enqueueReplaceState(s,s.state,null),lf(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Ol(t,e){try{var n="",r=e;do n+=YR(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function dg(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Xy(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var SL=typeof WeakMap=="function"?WeakMap:Map;function NT(t,e,n){n=Ns(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ff||(ff=!0,cv=r),Xy(t,e)},n}function IT(t,e,n){n=Ns(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){Xy(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Xy(t,e),typeof r!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function O1(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new SL;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=LL.bind(null,t,e,n),e.then(t,t))}function P1(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function j1(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ns(-1,1),e.tag=2,Pi(n,e,1))),n.lanes|=1),t)}var CL=zs.ReactCurrentOwner,xn=!1;function sn(t,e,n,r){e.child=t===null?iT(e,null,n,r):Nl(e,t.child,n,r)}function M1(t,e,n,r,s){n=n.render;var i=e.ref;return al(e,s),r=kb(t,e,n,r,i,s),n=Sb(),t!==null&&!xn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Rs(t,e,s)):(st&&n&&ub(e),e.flags|=1,sn(t,e,r,s),e.child)}function R1(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!jb(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,OT(t,e,i,r,s)):(t=Th(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Su,n(o,r)&&t.ref===e.ref)return Rs(t,e,s)}return e.flags|=1,t=Ri(i,r),t.ref=e.ref,t.return=e,e.child=t}function OT(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(Su(i,r)&&t.ref===e.ref)if(xn=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(xn=!0);else return e.lanes=t.lanes,Rs(t,e,s)}return ev(t,e,n,r,s)}function PT(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(Qa,_n),_n|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Je(Qa,_n),_n|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Je(Qa,_n),_n|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,Je(Qa,_n),_n|=r;return sn(t,e,s,n),e.child}function jT(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 4,702 bytes, line 40
40function ev(t,e,n,r,s){var i=Sn(n)?Wo:Xt.current;return i=Tl(e,i),al(e,s),n=kb(t,e,n,r,i,s),r=Sb(),t!==null&&!xn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Rs(t,e,s)):(st&&r&&ub(e),e.flags|=1,sn(t,e,n,s),e.child)}function D1(t,e,n,r,s){if(Sn(n)){var i=!0;nf(e)}else i=!1;if(al(e,s),e.stateNode===null)Ch(t,e),_T(e,n,r),Qy(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=tr(c):(c=Sn(n)?Wo:Xt.current,c=Tl(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&I1(e,o,r,c),si=!1;var f=e.memoizedState;o.state=f,lf(e,r,o,s),l=e.memoizedState,a!==r||f!==l||kn.current||si?(typeof u=="function"&&(Jy(e,n,u,r),l=e.memoizedState),(a=si||N1(e,n,a,r,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,aT(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:fr(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=tr(l):(l=Sn(n)?Wo:Xt.current,l=Tl(e,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&I1(e,o,r,l),si=!1,f=e.memoizedState,o.state=f,lf(e,r,o,s);var g=e.memoizedState;a!==d||f!==g||kn.current||si?(typeof p=="function"&&(Jy(e,n,p,r),g=e.memoizedState),(c=si||N1(e,n,c,r,f,g,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return tv(t,e,n,r,i,s)}function tv(t,e,n,r,s,i){jT(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&x1(e,n,!1),Rs(t,e,i);r=e.stateNode,CL.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Nl(e,t.child,null,i),e.child=Nl(e,null,a,i)):sn(t,e,a,i),e.memoizedState=r.state,s&&x1(e,n,!0),e.child}function MT(t){var e=t.stateNode;e.pendingContext?w1(t,e.pendingContext,e.pendingContext!==e.context):e.context&&w1(t,e.context,!1),vb(t,e.containerInfo)}function L1(t,e,n,r,s){return _l(),hb(s),e.flags|=256,sn(t,e,n,r),e.child}var nv={dehydrated:null,treeContext:null,retryLane:0};function rv(t){return{baseLanes:t,cachePool:null,transitions:null}}function RT(t,e,n){var r=e.pendingProps,s=it.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),Je(it,s&1),t===null)return Zy(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Bp(o,r,0,null),t=$o(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=rv(n),e.memoizedState=nv,t):Ab(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return EL(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Ri(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Ri(a,i):(i=$o(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?rv
vendor: 8,222 bytes, line 40
40(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=nv,r}return i=t.child,t=i.sibling,r=Ri(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Ab(t,e){return e=Bp({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function zd(t,e,n,r){return r!==null&&hb(r),Nl(e,t.child,null,n),t=Ab(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function EL(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=dg(Error(G(422))),zd(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Bp({mode:"visible",children:r.children},s,0,null),i=$o(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Nl(e,t.child,null,o),e.child.memoizedState=rv(o),e.memoizedState=nv,i);if(!(e.mode&1))return zd(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(G(419)),r=dg(i,r,void 0),zd(t,e,o,r)}if(a=(o&t.childLanes)!==0,xn||a){if(r=Lt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Ms(t,s),Ar(r,t,s,-1))}return Pb(),r=dg(Error(G(421))),zd(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=$L.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,On=Oi(s.nextSibling),Pn=e,st=!0,br=null,t!==null&&(Wn[qn++]=As,Wn[qn++]=Ts,Wn[qn++]=qo,As=t.id,Ts=t.overflow,qo=e),e=Ab(e,r.children),e.flags|=4096,e)}function $1(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Yy(t.return,e,n)}function hg(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function DT(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(sn(t,e,r.children,n),r=it.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&$1(t,n,e);else if(t.tag===19)$1(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Je(it,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&cf(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),hg(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&cf(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}hg(e,!0,n,null,i);break;case"together":hg(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ch(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Rs(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ko|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(G(153));if(e.child!==null){for(t=e.child,n=Ri(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ri(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function AL(t,e,n){switch(e.tag){case 3:MT(e),_l();break;case 5:lT(e);break;case 1:Sn(e.type)&&nf(e);break;case 4:vb(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;Je(of,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Je(it,it.current&1),e.flags|=128,null):n&e.child.childLanes?RT(t,e,n):(Je(it,it.current&1),t=Rs(t,e,n),t!==null?t.sibling:null);Je(it,it.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return DT(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Je(it,it.current),r)break;return null;case 22:case 23:return e.lanes=0,PT(t,e,n)}return Rs(t,e,n)}var LT,sv,$T,FT;LT=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};sv=function(){};$T=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Co(Xr.current);var i=null;switch(n){case"input":s=Ay(t,s),r=Ay(t,r),i=[];break;case"select":s=lt({},s,{value:void 0}),r=lt({},r,{value:void 0}),i=[];break;case"textarea":s=Ny(t,s),r=Ny(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ef)}Oy(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(gu.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(gu.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Xe("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};FT=function(t,e,n,r){n!==r&&(e.flags|=4)};function mc(t,e){if(!st)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Zt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function TL(t,e,n){var r=e.pendingProps;switch(db(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(e),null;case 1:return Sn(e.type)&&tf(),Zt(e),null;case 3:return r=e.stateNode,Il(),tt(kn),tt(Xt),wb(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&($d(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,br!==null&&(hv(br),br=null))),sv(t,e),Zt(e),null;case 5:bb(e);var s=Co(_u.current);if(n=e.type,t!==null&&e.stateNode!=null)$T(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(G(166));return Zt(e),null}if(t=Co(Xr.current),$d(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[Gr]=e,r[Au]=i,t=(e.mode&1)!==0,n){case"dialog":Xe("cancel",r),Xe("close",r);break;case"iframe":case"object":case"embed":Xe("load",r);break;case"video":case"audio":for(s=0;s<Pc.length;s++)Xe(Pc[s],r);break;case"source":Xe("error",r);break;case"img":case"image":case"link":Xe("error",r),Xe("load",r);break;case"details":Xe("toggle",r);break;case"input":Gx(r,i),Xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Xe("invalid",r);break;case"textarea":Zx(r,i),Xe("invalid",r)}Oy(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 31,345 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Ld(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Ld(r.textContent,a,t),s=["children",""+a]):gu.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Xe("scroll",r)}switch(n){case"input":Nd(r),Kx(r,i,!0);break;case"textarea":Nd(r),Yx(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ef)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=fA(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Gr]=e,t[Au]=r,LT(t,e,!1,!1),e.stateNode=t;e:{switch(o=Py(n,r),n){case"dialog":Xe("cancel",t),Xe("close",t),s=r;break;case"iframe":case"object":case"embed":Xe("load",t),s=r;break;case"video":case"audio":for(s=0;s<Pc.length;s++)Xe(Pc[s],t);s=r;break;case"source":Xe("error",t),s=r;break;case"img":case"image":case"link":Xe("error",t),Xe("load",t),s=r;break;case"details":Xe("toggle",t),s=r;break;case"input":Gx(t,r),s=Ay(t,r),Xe("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=lt({},r,{value:void 0}),Xe("invalid",t);break;case"textarea":Zx(t,r),s=Ny(t,r),Xe("invalid",t);break;default:s=r}Oy(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?gA(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pA(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&yu(t,l):typeof l=="number"&&yu(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(gu.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Xe("scroll",t):l!=null&&Y0(t,i,l,o))}switch(n){case"input":Nd(t),Kx(t,r,!1);break;case"textarea":Nd(t),Yx(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Hi(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?rl(t,!!r.multiple,i,!1):r.defaultValue!=null&&rl(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=ef)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Zt(e),null;case 6:if(t&&e.stateNode!=null)FT(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(G(166));if(n=Co(_u.current),Co(Xr.current),$d(e)){if(r=e.stateNode,n=e.memoizedProps,r[Gr]=e,(i=r.nodeValue!==n)&&(t=Pn,t!==null))switch(t.tag){case 3:Ld(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Ld(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gr]=e,e.stateNode=r}return Zt(e),null;case 13:if(tt(it),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(st&&On!==null&&e.mode&1&&!(e.flags&128))rT(),_l(),e.flags|=98560,i=!1;else if(i=$d(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(G(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(G(317));i[Gr]=e}else _l(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Zt(e),i=!1}else br!==null&&(hv(br),br=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||it.current&1?It===0&&(It=3):Pb())),e.updateQueue!==null&&(e.flags|=4),Zt(e),null);case 4:return Il(),sv(t,e),t===null&&Cu(e.stateNode.containerInfo),Zt(e),null;case 10:return mb(e.type._context),Zt(e),null;case 17:return Sn(e.type)&&tf(),Zt(e),null;case 19:if(tt(it),i=e.memoizedState,i===null)return Zt(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)mc(i,!1);else{if(It!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=cf(t),o!==null){for(e.flags|=128,mc(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Je(it,it.current&1|2),e.child}t=t.sibling}i.tail!==null&&yt()>Pl&&(e.flags|=128,r=!0,mc(i,!1),e.lanes=4194304)}else{if(!r)if(t=cf(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),mc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!st)return Zt(e),null}else 2*yt()-i.renderingStartTime>Pl&&n!==1073741824&&(e.flags|=128,r=!0,mc(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=yt(),e.sibling=null,n=it.current,Je(it,r?n&1|2:n&1),e):(Zt(e),null);case 22:case 23:return Ob(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?_n&1073741824&&(Zt(e),e.subtreeFlags&6&&(e.flags|=8192)):Zt(e),null;case 24:return null;case 25:return null}throw Error(G(156,e.tag))}function _L(t,e){switch(db(e),e.tag){case 1:return Sn(e.type)&&tf(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Il(),tt(kn),tt(Xt),wb(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bb(e),null;case 13:if(tt(it),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(G(340));_l()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return tt(it),null;case 4:return Il(),null;case 10:return mb(e.type._context),null;case 22:case 23:return Ob(),null;case 24:return null;default:return null}}var Ud=!1,Qt=!1,NL=typeof WeakSet=="function"?WeakSet:Set,le=null;function Ja(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ft(t,e,r)}else n.current=null}function iv(t,e,n){try{n()}catch(r){ft(t,e,r)}}var F1=!1;function IL(t,e){if(By=Jh,t=HA(),cb(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===t)break t;if(f===n&&++c===s&&(a=o),f===i&&++u===r&&(l=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vy={focusedElem:t,selectionRange:n},Jh=!1,le=e;le!==null;)if(e=le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,le=t;else for(;le!==null;){e=le;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,y=g.memoizedState,b=e.stateNode,w=b.getSnapshotBeforeUpdate(e.elementType===e.type?m:fr(e.type,m),y);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=e.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(k){ft(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,le=t;break}le=e.return}return g=F1,F1=!1,g}function qc(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&iv(e,n,i)}s=s.next}while(s!==r)}}function zp(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function ov(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function zT(t){var e=t.alternate;e!==null&&(t.alternate=null,zT(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Gr],delete e[Au],delete e[qy],delete e[hL],delete e[fL])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function UT(t){return t.tag===5||t.tag===3||t.tag===4}function z1(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||UT(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function av(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ef));else if(r!==4&&(t=t.child,t!==null))for(av(t,e,n),t=t.sibling;t!==null;)av(t,e,n),t=t.sibling}function lv(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(lv(t,e,n),t=t.sibling;t!==null;)lv(t,e,n),t=t.sibling}var zt=null,yr=!1;function Gs(t,e,n){for(n=n.child;n!==null;)BT(t,e,n),n=n.sibling}function BT(t,e,n){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Pp,n)}catch{}switch(n.tag){case 5:Qt||Ja(n,e);case 6:var r=zt,s=yr;zt=null,Gs(t,e,n),zt=r,yr=s,zt!==null&&(yr?(t=zt,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):zt.removeChild(n.stateNode));break;case 18:zt!==null&&(yr?(t=zt,n=n.stateNode,t.nodeType===8?ig(t.parentNode,n):t.nodeType===1&&ig(t,n),xu(t)):ig(zt,n.stateNode));break;case 4:r=zt,s=yr,zt=n.stateNode.containerInfo,yr=!0,Gs(t,e,n),zt=r,yr=s;break;case 0:case 11:case 14:case 15:if(!Qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&iv(n,e,o),s=s.next}while(s!==r)}Gs(t,e,n);break;case 1:if(!Qt&&(Ja(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ft(n,e,a)}Gs(t,e,n);break;case 21:Gs(t,e,n);break;case 22:n.mode&1?(Qt=(r=Qt)||n.memoizedState!==null,Gs(t,e,n),Qt=r):Gs(t,e,n);break;default:Gs(t,e,n)}}function U1(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new NL),e.forEach(function(r){var s=FL.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function cr(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:zt=a.stateNode,yr=!1;break e;case 3:zt=a.stateNode.containerInfo,yr=!0;break e;case 4:zt=a.stateNode.containerInfo,yr=!0;break e}a=a.return}if(zt===null)throw Error(G(160));BT(i,o,s),zt=null,yr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){ft(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)VT(e,t),e=e.sibling}function VT(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(cr(e,t),Lr(t),r&4){try{qc(3,t,t.return),zp(3,t)}catch(m){ft(t,t.return,m)}try{qc(5,t,t.return)}catch(m){ft(t,t.return,m)}}break;case 1:cr(e,t),Lr(t),r&512&&n!==null&&Ja(n,n.return);break;case 5:if(cr(e,t),Lr(t),r&512&&n!==null&&Ja(n,n.return),t.flags&32){var s=t.stateNode;try{yu(s,"")}catch(m){ft(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&dA(s,i),Py(a,o);var c=Py(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?gA(s,d):u==="dangerouslySetInnerHTML"?pA(s,d):u==="children"?yu(s,d):Y0(s,u,d,c)}switch(a){case"input":Ty(s,i);break;case"textarea":hA(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?rl(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?rl(s,!!i.multiple,i.defaultValue,!0):rl(s,!!i.multiple,i.multiple?[]:"",!1))}s[Au]=i}catch(m){ft(t,t.return,m)}}break;case 6:if(cr(e,t),Lr(t),r&4){if(t.stateNode===null)throw Error(G(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){ft(t,t.return,m)}}break;case 3:if(cr(e,t),Lr(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{xu(e.containerInfo)}catch(m){ft(t,t.return,m)}break;case 4:cr(e,t),Lr(t);break;case 13:cr(e,t),Lr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Nb=yt())),r&4&&U1(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Qt=(c=Qt)||u,cr(e,t),Qt=c):cr(e,t),Lr(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(le=t,u=t.child;u!==null;){for(d=le=u;le!==null;){switch(f=le,p=f.child,f.tag){case 0:case 11:case 14:case 15:qc(4,f,f.return);break;case 1:Ja(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){ft(r,n,m)}}break;case 5:Ja(f,f.return);break;case 22:if(f.memoizedState!==null){V1(d);continue}}p!==null?(p.return=f,le=p):V1(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=mA("display",o))}catch(m){ft(t,t.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){ft(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:cr(e,t),Lr(t),r&4&&U1(t);break;case 21:break;default:cr(e,t),Lr(t)}}function Lr(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(UT(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(yu(s,""),r.flags&=-33);var i=z1(t);lv(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=z1(t);av(t,a,o);break;default:throw Error(G(161))}}catch(l){ft(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function OL(t,e,n){le=t,HT(t)}function HT(t,e,n){for(var r=(t.mode&1)!==0;le!==null;){var s=le,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ud;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Qt;a=Ud;var c=Qt;if(Ud=o,(Qt=l)&&!c)for(le=s;le!==null;)o=le,l=o.child,o.tag===22&&o.memoizedState!==null?H1(s):l!==null?(l.return=o,le=l):H1(s);for(;i!==null;)le=i,HT(i),i=i.sibling;le=s,Ud=a,Qt=c}B1(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,le=i):B1(t)}}function B1(t){for(;le!==null;){var e=le;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Qt||zp(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Qt)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:fr(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&A1(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}A1(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&xu(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Qt||e.flags&512&&ov(e)}catch(f){ft(e,e.return,f)}}if(e===t){le=null;break}if(n=e.sibling,n!==null){n.return=e.return,le=n;break}le=e.return}}function V1(t){for(;le!==null;){var e=le;if(e===t){le=null;break}var n=e.sibling;if(n!==null){n.return=e.return,le=n;break}le=e.return}}function H1(t){for(;le!==null;){var e=le;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{zp(4,e)}catch(l){ft(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){ft(e,s,l)}}var i=e.return;try{ov(e)}catch(l){ft(e,i,l)}break;case 5:var o=e.return;try{ov(e)}catch(l){ft(e,o,l)}}}catch(l){ft(e,e.return,l)}if(e===t){le=null;break}var a=e.sibling;if(a!==null){a.return=e.return,le=a;break}le=e.return}}var PL=Math.ceil,hf=zs.ReactCurrentDispatcher,Tb=zs.ReactCurrentOwner,Yn=zs.ReactCurrentBatchConfig,Fe=0,Lt=null,St=null,Ht=0,_n=0,Qa=Xi(0),It=0,Pu=null,Ko=0,Up=0,_b=0,Gc=null,vn=null,Nb=0,Pl=1/0,xs=null,ff=!1,cv=null,ji=null,Bd=!1,ki=null,pf=0,Kc=0,uv=null,Eh=-1,Ah=0;function cn(){return Fe&6?yt():Eh!==-1?Eh:Eh=yt()}function Mi(t){return t.mode&1?Fe&2&&Ht!==0?Ht&-Ht:mL.transition!==null?(Ah===0&&(Ah=_A()),Ah):(t=We,t!==0||(t=window.event,t=t===void 0?16:RA(t.type)),t):1}function Ar(t,e,n,r){if(50<Kc)throw Kc=0,uv=null,Error(G(185));sd(t,n,r),(!(Fe&2)||t!==Lt)&&(t===Lt&&(!(Fe&2)&&(Up|=n),It===4&&ui(t,Ht)),Cn(t,r),n===1&&Fe===0&&!(e.mode&1)&&(Pl=yt()+500,Lp&&eo()))}function Cn(t,e){var n=t.callbackNode;mD(t,e);var r=Yh(t,t===Lt?Ht:0);if(r===0)n!==null&&Xx(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Xx(n),e===1)t.tag===0?pL(W1.bind(null,t)):eT(W1.bind(null,t)),uL(function(){!(Fe&6)&&eo()}),n=null;else{switch(NA(r)){case 1:n=tb;break;case 4:n=AA;break;case 16:n=Zh;break;case 536870912:n=TA;break;default:n=Zh}n=QT(n,WT.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function WT(t,e){if(Eh=-1,Ah=0,Fe&6)throw Error(G(327));var n=t.callbackNode;if(ll()&&t.callbackNode!==n)return null;var r=Yh(t,t===Lt?Ht:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=mf(t,r);else{e=r;var s=Fe;Fe|=2;var i=GT();(Lt!==t||Ht!==e)&&(xs=null,Pl=yt()+500,Lo(t,e));do try{RL();break}catch(a){qT(t,a)}while(!0);pb(),hf.current=i,Fe=s,St!==null?e=0:(Lt=null,Ht=0,e=It)}if(e!==0){if(e===2&&(s=Ly(t),s!==0&&(r=s,e=dv(t,s))),e===1)throw n=Pu,Lo(t,0),ui(t,r),Cn(t,yt()),n;if(e===6)ui(t,r);else{if(s=t.current.alternate,!(r&30)&&!jL(s)&&(e=mf(t,r),e===2&&(i=Ly(t),i!==0&&(r=i,e=dv(t,i))),e===1))throw n=Pu,Lo(t,0),ui(t,r),Cn(t,yt()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(G(345));case 2:go(t,vn,xs);break;case 3:if(ui(t,r),(r&130023424)===r&&(e=Nb+500-yt(),10<e)){if(Yh(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){cn(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Wy(go.bind(null,t,vn,xs),e);break}go(t,vn,xs);break;case 4:if(ui(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-Er(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=yt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*PL(r/1960))-r,10<r){t.timeoutHandle=Wy(go.bind(null,t,vn,xs),r);break}go(t,vn,xs);break;case 5:go(t,vn,xs);break;default:throw Error(G(329))}}}return Cn(t,yt()),t.callbackNode===n?WT.bind(null,t):null}function dv(t,e){var n=Gc;return t.current.memoizedState.isDehydrated&&(Lo(t,e).flags|=256),t=mf(t,e),t!==2&&(e=vn,vn=n,e!==null&&hv(e)),t}function hv(t){vn===null?vn=t:vn.push.apply(vn,t)}function jL(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Tr(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ui(t,e){for(e&=~_b,e&=~Up,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Er(e),r=1<<n;t[n]=-1,e&=~r}}function W1(t){if(Fe&6)throw Error(G(327));ll();var e=Yh(t,0);if(!(e&1))return Cn(t,yt()),null;var n=mf(t,e);if(t.tag!==0&&n===2){var r=Ly(t);r!==0&&(e=r,n=dv(t,r))}if(n===1)throw n=Pu,Lo(t,0),ui(t,e),Cn(t,yt()),n;if(n===6)throw Error(G(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,go(t,vn,xs),Cn(t,yt()),null}function Ib(t,e){var n=Fe;Fe|=1;try{return t(e)}finally{Fe=n,Fe===0&&(Pl=yt()+500,Lp&&eo())}}function Zo(t){ki!==null&&ki.tag===0&&!(Fe&6)&&ll();var e=Fe;Fe|=1;var n=Yn.transition,r=We;try{if(Yn.transition=null,We=1,t)return t()}finally{We=r,Yn.transition=n,Fe=e,!(Fe&6)&&eo()}}function Ob(){_n=Qa.current,tt(Qa)}function Lo(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,cL(n)),St!==null)for(n=St.return;n!==null;){var r=n;switch(db(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&tf();break;case 3:Il(),tt(kn),tt(Xt),wb();break;case 5:bb(r);break;case 4:Il();break;case 13:tt(it);break;case 19:tt(it);break;case 10:mb(r.type._context);break;case 22:case 23:Ob()}n=n.return}if(Lt=t,St=t=Ri(t.current,null),Ht=_n=e,It=0,Pu=null,_b=Up=Ko=0,vn=Gc=null,So!==null){for(e=0;e<So.length;e++)if(n=So[e],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}So=null}return t}function qT(t,e){do{var n=St;try{if(pb(),kh.current=df,uf){for(var r=at.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}uf=!1}if(Go=0,Mt=_t=at=null,Wc=!1,Nu=0,Tb.current=null,n===null||n.return===null){It=1,Pu=e,St=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Ht,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=P1(o);if(p!==null){p.flags&=-257,j1(p,o,a,i,e),p.mode&1&&O1(i,c,e),e=p,l=c;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){O1(i,c,e),Pb();break e}l=Error(G(426))}}else if(st&&a.mode&1){var y=P1(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),j1(y,o,a,i,e),hb(Ol(l,a));break e}}i=l=Ol(l,a),It!==4&&(It=2),Gc===null?Gc=[i]:Gc.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var b=NT(i,l,e);E1(i,b);break e;case 1:a=l;var w=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ji===null||!ji.has(x)))){i.flags|=65536,e&=-e,i.lanes|=e;var k=IT(i,a,e);E1(i,k);break e}}i=i.return}while(i!==null)}ZT(n)}catch(S){e=S,St===n&&n!==null&&(St=n=n.return);continue}break}while(!0)}function GT(){var t=hf.current;return hf.current=df,t===null?df:t}function Pb(){(It===0||It===3||It===2)&&(It=4),Lt===null||!(Ko&268435455)&&!(Up&268435455)||ui(Lt,Ht)}function mf(t,e){var n=Fe;Fe|=2;var r=GT();(Lt!==t||Ht!==e)&&(xs=null,Lo(t,e));do try{ML();break}catch(s){qT(t,s)}while(!0);if(pb(),Fe=n,hf.current=r,St!==null)throw Error(G(261));return Lt=null,Ht=0,It}function ML(){for(;St!==null;)KT(St)}function RL(){for(;St!==null&&!oD();)KT(St)}function KT(t){var e=JT(t.alternate,t,_n);t.memoizedProps=t.pendingProps,e===null?ZT(t):St=e,Tb.current=null}function ZT(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=_L(n,e),n!==null){n.flags&=32767,St=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{It=6,St=null;return}}else if(n=TL(n,e,_n),n!==null){St=n;return}if(e=e.sibling,e!==null){St=e;return}St=e=t}while(e!==null);It===0&&(It=5)}function go(t,e,n){var r=We,s=Yn.transition;try{Yn.transition=null,We=1,DL(t,e,n,r)}finally{Yn.transition=s,We=r}return null}function DL(t,e,n,r){do ll();while(ki!==null);if(Fe&6)throw Error(G(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(G(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(gD(t,i),t===Lt&&(St=Lt=null,Ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Bd||(Bd=!0,QT(Zh,function(){return ll(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Yn.transition,Yn.transition=null;var o=We;We=1;var a=Fe;Fe|=4,Tb.current=null,IL(t,n),VT(n,t),nL(Vy),Jh=!!By,Vy=By=null,t.current=n,OL(n),aD(),Fe=a,We=o,Yn.transition=i}else t.current=n;if(Bd&&(Bd=!1,ki=t,pf=s),i=t.pendingLanes,i===0&&(ji=null),uD(n.stateNode),Cn(t,yt()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ff)throw ff=!1,t=cv,cv=null,t;return pf&1&&t.tag!==0&&ll(),i=t.pendingLanes,i&1?t===uv?Kc++:(Kc=0,uv=t):Kc=0,eo(),null}function ll(){if(ki!==null){var t=NA(pf),e=Yn.transition,n=We;try{if(Yn.transition=null,We=16>t?16:t,ki===null)var r=!1;else{if(t=ki,ki=null,pf=0,Fe&6)throw Error(G(331));var s=Fe;for(Fe|=4,le=t.current;le!==null;){var i=le,o=i.child;if(le.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(le=c;le!==null;){var u=le;switch(u.tag){case 0:case 11:case 15:qc(8,u,i)}var d=u.child;if(d!==null)d.return=u,le=d;else for(;le!==null;){u=le;var f=u.sibling,p=u.return;if(zT(u),u===c){le=null;break}if(f!==null){f.return=p,le=f;break}le=p}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}le=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,le=o;else e:for(;le!==null;){if(i=le,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qc(9,i,i.return)}var b=i.sibling;if(b!==null){b.return=i.return,le=b;break e}le=i.return}}var w=t.current;for(le=w;le!==null;){o=le;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,le=x;else e:for(o=w;le!==null;){if(a=le,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:zp(9,a)}}catch(S){ft(a,a.return,S)}if(a===o){le=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,le=k;break e}le=a.return}}if(Fe=s,eo(),Qr&&typeof Qr.onPostCommitFiberRoot=="function")try{Qr.onPostCommitFiberRoot(Pp,t)}catch{}r=!0}return r}finally{We=n,Yn.transition=e}}return!1}function q1(t,e,n){e=Ol(n,e),e=NT(t,e,1),t=Pi(t,e,1),e=cn(),t!==null&&(sd(t,1,e),Cn(t,e))}function ft(t,e,n){if(t.tag===3)q1(t,t,n);else for(;e!==null;){if(e.tag===3){q1(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ji===null||!ji.has(r))){t=Ol(n,t),t=IT(e,t,1),e=Pi(e,t,1),t=cn(),e!==null&&(sd(e,1,t),Cn(e,t));break}}e=e.return}}function LL(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=cn(),t.pingedLanes|=t.suspendedLanes&n,Lt===t&&(Ht&n)===n&&(It===4||It===3&&(Ht&130023424)===Ht&&500>yt()-Nb?Lo(t,0):_b|=n),Cn(t,e)}function YT(t,e){e===0&&(t.mode&1?(e=Pd,Pd<<=1,!(Pd&130023424)&&(Pd=4194304)):e=1);var n=cn();t=Ms(t,e),t!==null&&(sd(t,e,n),Cn(t,n))}function $L(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),YT(t,n)}function FL(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(e),YT(t,n)}var JT;JT=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||kn.current)xn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return xn=!1,AL(t,e,n);xn=!!(t.flags&131072)}else xn=!1,st&&e.flags&1048576&&tT(e,sf,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ch(t,e),t=e.pendingProps;var s=Tl(e,Xt.current);al(e,n),s=kb(null,e,r,t,s,n);var i=Sb();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Sn(r)?(i=!0,nf(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,yb(e),s.updater=Fp,e.stateNode=s,s._reactInternals=e,Qy(e,r,t,n),e=tv(null,e,r,!0,i,n)):(e.tag=0,st&&i&&ub(e),sn(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ch(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=UL(r),t=fr(r,t),s){case 0:e=ev(null,e,r,t,n);break e;case 1:e=D1(null,e,r,t,n);break e;case 11:e=M1(null,e,r,t,n);break e;case 14:e=R1(null,e,r,fr(r.type,t),n);break e}throw Error(G(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:fr(r,s),ev(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:fr(r,s),D1(t,e,r,s,n);case 3:e:{if(MT(e),t===null)throw Error(G(387));r=e.pendingProps,i=e.memoizedState,s=i.element,aT(t,e),lf(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Ol(Error(G(423)),e),e=L1(t,e,r,n,s);break e}else if(r!==s){s=Ol(Error(G(424)),e),e=L1(t,e,r,n,s);break e}else for(On=Oi(e.stateNode.containerInfo.firstChild),Pn=e,st=!0,br=null,n=iT(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_l(),r===s){e=Rs(t,e,n);break e}sn(t,e,r,n)}e=e.child}return e;case 5:return lT(e),t===null&&Zy(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Hy(r,s)?o=null:i!==null&&Hy(r,i)&&(e.flags|=32),jT(t,e),sn(t,e,o,n),e.child;case 6:return t===null&&Zy(e),null;case 13:return RT(t,e,n);case 4:return vb(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Nl(e,null,r,n):sn(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:fr(r,s),M1(t,e,r,s,n);case 7:return sn(t,e,e.pendingProps,n),e.child;case 8:return sn(t,e,e.pendingProps.children,n),e.child;case 12:return sn(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,Je(of,r._currentValue),r._currentValue=o,i!==null)if(Tr(i.value,o)){if(i.children===s.children&&!kn.current){e=Rs(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ns(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Yy(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(G(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Yy(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}sn(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,al(e,n),s=tr(s),r=r(s),e.flags|=1,sn(t,e,r,n),e.child;case 14:return r=e.type,s=fr(r,e.pendingProps),s=fr(r.type,s),R1(t,e,r,s,n);
vendor: 4,832 bytes, line 40
40case 15:return OT(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:fr(r,s),Ch(t,e),e.tag=1,Sn(r)?(t=!0,nf(e)):t=!1,al(e,n),_T(e,r,s),Qy(e,r,s,n),tv(null,e,r,!0,t,n);case 19:return DT(t,e,n);case 22:return PT(t,e,n)}throw Error(G(156,e.tag))};function QT(t,e){return EA(t,e)}function zL(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(t,e,n,r){return new zL(t,e,n,r)}function jb(t){return t=t.prototype,!(!t||!t.isReactComponent)}function UL(t){if(typeof t=="function")return jb(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Q0)return 11;if(t===X0)return 14}return 2}function Ri(t,e){var n=t.alternate;return n===null?(n=Zn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Th(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")jb(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ba:return $o(n.children,s,i,e);case J0:o=8,s|=8;break;case ky:return t=Zn(12,n,e,s|2),t.elementType=ky,t.lanes=i,t;case Sy:return t=Zn(13,n,e,s),t.elementType=Sy,t.lanes=i,t;case Cy:return t=Zn(19,n,e,s),t.elementType=Cy,t.lanes=i,t;case lA:return Bp(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case oA:o=10;break e;case aA:o=9;break e;case Q0:o=11;break e;case X0:o=14;break e;case ri:o=16,r=null;break e}throw Error(G(130,t==null?t:typeof t,""))}return e=Zn(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function $o(t,e,n,r){return t=Zn(7,t,r,e),t.lanes=n,t}function Bp(t,e,n,r){return t=Zn(22,t,r,e),t.elementType=lA,t.lanes=n,t.stateNode={isHidden:!1},t}function fg(t,e,n){return t=Zn(6,t,null,e),t.lanes=n,t}function pg(t,e,n){return e=Zn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function BL(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Km(0),this.expirationTimes=Km(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Km(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Mb(t,e,n,r,s,i,o,a,l){return t=new BL(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Zn(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yb(i),t}function VL(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ua,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function XT(t){if(!t)return Wi;t=t._reactInternals;e:{if(ca(t)!==t||t.tag!==1)throw Error(G(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Sn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(G(171))}if(t.tag===1){var n=t.type;if(Sn(n))return XA(t,n,e)}return e}function e_(t,e,n,r,s,i,o,a,l){return t=Mb(n,r,!0,t,s,i,o,a,l),t.context=XT(null),n=t.current,r=cn(),s=Mi(n),i=Ns(r,s),i.callback=e??null,Pi(n,i,s),t.current.lanes=s,sd(t,s,r),Cn(t,r),t}function Vp(t,e,n,r){var s=e.current,i=cn(),o=Mi(s);return n=XT(n),e.context===null?e.context=n:e.pendingContext=n,e=Ns(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Pi(s,e,o),t!==null&&(Ar(t,s,o,i),xh(t,s,o)),o}function gf(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function G1(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Rb(t,e){G1(t,e),(t=t.alternate)&&G1(t,e)}function HL(){return null}var t_=typeof reportError=="function"?reportError:function(t){console.error(t)};function Db(t){this._internalRoot=t}Hp.prototype.render=Db.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(G(409));Vp(t,e,null,null)};
vendor: 4,219 bytes, line 40
40Hp.prototype.unmount=Db.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Zo(function(){Vp(null,t,null,null)}),e[js]=null}};function Hp(t){this._internalRoot=t}Hp.prototype.unstable_scheduleHydration=function(t){if(t){var e=PA();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ci.length&&e!==0&&e<ci[n].priority;n++);ci.splice(n,0,t),n===0&&MA(t)}};function Lb(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Wp(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function K1(){}function WL(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=gf(o);i.call(c)}}var o=e_(e,r,t,0,null,!1,!1,"",K1);return t._reactRootContainer=o,t[js]=o.current,Cu(t.nodeType===8?t.parentNode:t),Zo(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=gf(l);a.call(c)}}var l=Mb(t,0,!1,null,null,!1,!1,"",K1);return t._reactRootContainer=l,t[js]=l.current,Cu(t.nodeType===8?t.parentNode:t),Zo(function(){Vp(e,l,n,r)}),l}function qp(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=gf(o);a.call(l)}}Vp(e,o,t,s)}else o=WL(n,e,t,s,r);return gf(o)}IA=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Oc(e.pendingLanes);n!==0&&(nb(e,n|1),Cn(e,yt()),!(Fe&6)&&(Pl=yt()+500,eo()))}break;case 13:Zo(function(){var r=Ms(t,1);if(r!==null){var s=cn();Ar(r,t,1,s)}}),Rb(t,1)}};rb=function(t){if(t.tag===13){var e=Ms(t,134217728);if(e!==null){var n=cn();Ar(e,t,134217728,n)}Rb(t,134217728)}};OA=function(t){if(t.tag===13){var e=Mi(t),n=Ms(t,e);if(n!==null){var r=cn();Ar(n,t,e,r)}Rb(t,e)}};PA=function(){return We};jA=function(t,e){var n=We;try{return We=t,e()}finally{We=n}};My=function(t,e,n){switch(e){case"input":if(Ty(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=Dp(r);if(!s)throw Error(G(90));uA(r),Ty(r,s)}}}break;case"textarea":hA(t,n);break;case"select":e=n.value,e!=null&&rl(t,!!n.multiple,e,!1)}};bA=Ib;wA=Zo;var qL={usingClientEntryPoint:!1,Events:[od,qa,Dp,yA,vA,Ib]},gc={findFiberByHostInstance:ko,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GL={bundleType:gc.bundleType,version:gc.version,rendererPackageName:gc.rendererPackageName,rendererConfig:gc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:zs.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=SA(t),t===null?null:t.stateNode},findFiberByHostInstance:gc.findFiberByHostInstance||HL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vd.isDisabled&&Vd.supportsFiber)try{Pp=Vd.inject(GL),Qr=Vd}catch{}}Dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qL;Dn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lb(e))throw Error(G(200));return VL(t,e,null,n)};Dn.createRoot=function(t,e){if(!Lb(t))throw Error(G(299));var n=!1,r="",s=t_;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Mb(t,1,!1,null,null,n,!1,r,s),t[js]=e.current,Cu(t.nodeType===8?t.parentNode:t),new Db(e)};Dn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(G(188)):(t=Object.keys(t).join(","),Error(G(268,t)));return t=SA(e),t=t===null?null:t.stateNode,t};Dn.flushSync=function(t){return Zo(t)};Dn.hydrate=function(t,e,n){if(!Wp(e))throw Error(G(200));return qp(null,t,e,!0,n)};
40Dn.hydrateRoot=function(t,e,n){if(!Lb(t))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=t_;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=e_(e,null,t,1,n??null,s,!1,i,o),t[js]=e.current,Cu(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Hp(e)};Dn.render=function(t,e,n){if(!Wp(e))throw Error(G(200));return qp(null,t,e,!1,n)};Dn.unmountComponentAtNode=function(t){if(!Wp(t))throw Error(G(40));return t._reactRootContainer?(Zo(function(){qp(null,null,t,!1,function(){t._reactRootContainer=null,t[js]=null})}),!0):!1};Dn.unstable_batchedUpdates=Ib;Dn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Wp(n))throw Error(G(200));if(t==null||t._reactInternals===void 0)throw Error(G(38));return qp(t,e,n,!1,r)};Dn.version="18.3.1-next-f1338f8080-20240426";function n_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n_)}catch(t){console.error(t)}}n_(),nA.exports=Dn;var ua=nA.exports;const $b=nd(ua);var r_,Z1=ua;r_=Z1.createRoot,Z1.hydrateRoot;var KL=typeof Element<"u",ZL=typeof Map=="function",YL=typeof Set=="function",JL=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function _h(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,s;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!_h(t[r],e[r]))return!1;return!0}var i;if(ZL&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;for(i=t.entries();!(r=i.next()).done;)if(!_h(r.value[1],e.get(r.value[0])))return!1;return!0}if(YL&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i=t.entries();!(r=i.next()).done;)if(!e.has(r.value[0]))return!1;return!0}if(JL&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf&&typeof t.valueOf=="function"&&typeof e.valueOf=="function")return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString&&typeof t.toString=="function"&&typeof e.toString=="function")return t.toString()===e.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[r]))return!1;if(KL&&t instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&t.$$typeof)&&!_h(t[s[r]],e[s[r]]))return!1;return!0}return t!==t&&e!==e}var QL=function(e,n){try{return _h(e,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const XL=nd(QL);var e4=function(t,e,n,r,s,i,o,a){if(!t){var l;if(e===void 0)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;l=new Error(e.replace(/%s/g,function(){return c[u++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}},t4=e4;const Y1=nd(t4);var n4=function(e,n,r,s){var i=r?r.call(s,e,n):void 0;if(i!==void 0)return!!i;if(e===n)return!0;if(typeof e!="object"||!e||typeof n!="object"||!n)return!1;var o=Object.keys(e),a=Object.keys(n);if(o.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var u=o[c];if(!l(u))return!1;var d=e[u],f=n[u];if(i=r?r.call(s,d,f,u):void 0,i===!1||i===void 0&&d!==f)return!1}return!0};const r4=nd(n4);var s_=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(s_||{}),mg={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]}
40,meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},J1=Object.values(s_),Fb={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},s4=Object.entries(Fb).reduce((t,[e,n])=>(t[n]=e,t),{}),Sr="data-rh",cl={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},ul=(t,e)=>{for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(Object.prototype.hasOwnProperty.call(r,e))return r[e]}return null},i4=t=>{let e=ul(t,"title");const n=ul(t,cl.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),n&&e)return n.replace(/%s/g,()=>e);const r=ul(t,cl.DEFAULT_TITLE);return e||r||void 0},o4=t=>ul(t,cl.ON_CHANGE_CLIENT_STATE)||(()=>{}),gg=(t,e)=>e.filter(n=>typeof n[t]<"u").map(n=>n[t]).reduce((n,r)=>({...n,...r}),{}),a4=(t,e)=>e.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const a=s[i].toLowerCase();if(t.indexOf(a)!==-1&&r[a])return n.concat(r)}}return n},[]),l4=t=>console&&typeof console.warn=="function"&&console.warn(t),yc=(t,e,n)=>{const r={};return n.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&l4(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,i)=>{const o={};i.filter(l=>{let c;const u=Object.keys(l);for(let f=0;f<u.length;f+=1){const p=u[f],g=p.toLowerCase();e.indexOf(g)!==-1&&!(c==="rel"&&l[c].toLowerCase()==="canonical")&&!(g==="rel"&&l[g].toLowerCase()==="stylesheet")&&(c=g),e.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(c=p)}if(!c||!l[c])return!1;const d=l[c].toLowerCase();return r[c]||(r[c]={}),o[c]||(o[c]={}),r[c][d]?!1:(o[c][d]=!0,!0)}).reverse().forEach(l=>s.push(l));const a=Object.keys(o);for(let l=0;l<a.length;l+=1){const c=a[l],u={...r[c],...o[c]};r[c]=u}return s},[]).reverse()},c4=(t,e)=>{if(Array.isArray(t)&&t.length){for(let n=0;n<t.length;n+=1)if(t[n][e])return!0}return!1},u4=t=>({baseTag:a4(["href"],t),bodyAttributes:gg("bodyAttributes",t),defer:ul(t,cl.DEFER),encode:ul(t,cl.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:gg("htmlAttributes",t),linkTags:yc("link",["rel","href"],t),metaTags:yc("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:yc("noscript",["innerHTML"],t),onChangeClientState:o4(t),scriptTags:yc("script",["src","innerHTML"],t),styleTags:yc("style",["cssText"],t),title:i4(t),titleAttributes:gg("titleAttributes",t),prioritizeSeoTags:c4(t,cl.PRIORITIZE_SEO_TAGS)}),i_=t=>Array.isArray(t)?t.join(""):t,d4=(t,e)=>{const n=Object.keys(t);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&e[n[r]].includes(t[n[r]]))return!0;return!1},yg=(t,e)=>Array.isArray(t)?t.reduce((n,r)=>(d4(r,e)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:t,priority:[]},Q1=(t,e)=>({...t,[e]:void 0}),h4=["noscript","script","style"],fv=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),o_=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]<"u"?`${n}="${t[n]}"`:`${n}`;return e?`${e} ${r}`:r},""),f4=(t,e,n,r)=>{const s=o_(n),i=i_(e);return s?`<${t} ${Sr}="true" ${s}>${fv(i,r)}</${t}>`:`<${t} ${Sr}="true">${fv(i,r)}</${t}>`},p4=(t,e,n=!0)=>e.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(c=>!(c==="innerHTML"||c==="cssText")).reduce((c,u)=>{const d=typeof i[u]>"u"?u:`${u}="${fv(i[u],n)}"`;return c?`${c} ${d}`:d},""),a=i.innerHTML||i.cssText||"",l=h4.indexOf(t)===-1;return`${r}<${t} ${Sr}="true" ${o}${l?"/>":`>${a}</${t}>`}`},""),a_=(t,e={})=>Object.keys(t).reduce((n,r)=>{const s=Fb[r];return n[s||r]=t[r],n},e),m4=(t,e,n)=>{const r={key:e,[Sr]:!0},s=a_(n,r);return[U.createElement("title",s,e)]},Nh=(t,e)=>e.map((n,r)=>{const s={key:r,[Sr]:!0};
40return Object.keys(n).forEach(i=>{const a=Fb[i]||i;if(a==="innerHTML"||a==="cssText"){const l=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:l}}else s[a]=n[i]}),U.createElement(t,s)}),Un=(t,e,n=!0)=>{switch(t){case"title":return{toComponent:()=>m4(t,e.title,e.titleAttributes),toString:()=>f4(t,e.title,e.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>a_(e),toString:()=>o_(e)};default:return{toComponent:()=>Nh(t,e),toString:()=>p4(t,e,n)}}},g4=({metaTags:t,linkTags:e,scriptTags:n,encode:r})=>{const s=yg(t,mg.meta),i=yg(e,mg.link),o=yg(n,mg.script);return{priorityMethods:{toComponent:()=>[...Nh("meta",s.priority),...Nh("link",i.priority),...Nh("script",o.priority)],toString:()=>`${Un("meta",s.priority,r)} ${Un("link",i.priority,r)} ${Un("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},y4=t=>{const{baseTag:e,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:a="",titleAttributes:l,prioritizeSeoTags:c}=t;let{linkTags:u,metaTags:d,scriptTags:f}=t,p={toComponent:()=>{},toString:()=>""};return c&&({priorityMethods:p,linkTags:u,metaTags:d,scriptTags:f}=g4(t)),{priority:p,base:Un("base",e,r),bodyAttributes:Un("bodyAttributes",n,r),htmlAttributes:Un("htmlAttributes",s,r),link:Un("link",u,r),meta:Un("meta",d,r),noscript:Un("noscript",i,r),script:Un("script",f,r),style:Un("style",o,r),title:Un("title",{title:a,titleAttributes:l},r)}},pv=y4,Hd=[],l_=!!(typeof window<"u"&&window.document&&window.document.createElement),mv=class{constructor(t,e){hs(this,"instances",[]);hs(this,"canUseDOM",l_);hs(this,"context");hs(this,"value",{setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?Hd:this.instances,add:t=>{(this.canUseDOM?Hd:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?Hd:this.instances).indexOf(t);(this.canUseDOM?Hd:this.instances).splice(e,1)}}});this.context=t,this.canUseDOM=e||!1,e||(t.helmet=pv({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},v4={},c_=U.createContext(v4),Io,u_=(Io=class extends v.Component{constructor(n){super(n);hs(this,"helmetData");this.helmetData=new mv(this.props.context||{},Io.canUseDOM)}render(){return U.createElement(c_.Provider,{value:this.helmetData.value},this.props.children)}},hs(Io,"canUseDOM",l_),Io),ba=(t,e)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${t}[${Sr}]`),s=[].slice.call(r),i=[];let o;return e&&e.length&&e.forEach(a=>{const l=document.createElement(t);for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c))if(c==="innerHTML")l.innerHTML=a.innerHTML;else if(c==="cssText")l.styleSheet?l.styleSheet.cssText=a.cssText:l.appendChild(document.createTextNode(a.cssText));else{const u=c,d=typeof a[u]>
40"u"?"":a[u];l.setAttribute(c,d)}l.setAttribute(Sr,"true"),s.some((c,u)=>(o=u,l.isEqualNode(c)))?s.splice(o,1):i.push(l)}),s.forEach(a=>{var l;return(l=a.parentNode)==null?void 0:l.removeChild(a)}),i.forEach(a=>n.appendChild(a)),{oldTags:s,newTags:i}},gv=(t,e)=>{const n=document.getElementsByTagName(t)[0];if(!n)return;const r=n.getAttribute(Sr),s=r?r.split(","):[],i=[...s],o=Object.keys(e);for(const a of o){const l=e[a]||"";n.getAttribute(a)!==l&&n.setAttribute(a,l),s.indexOf(a)===-1&&s.push(a);const c=i.indexOf(a);c!==-1&&i.splice(c,1)}for(let a=i.length-1;a>=0;a-=1)n.removeAttribute(i[a]);s.length===i.length?n.removeAttribute(Sr):n.getAttribute(Sr)!==o.join(",")&&n.setAttribute(Sr,o.join(","))},b4=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=i_(t)),gv("title",e)},X1=(t,e)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:f}=t;gv("body",r),gv("html",s),b4(d,f);const p={baseTag:ba("base",n),linkTags:ba("link",i),metaTags:ba("meta",o),noscriptTags:ba("noscript",a),scriptTags:ba("script",c),styleTags:ba("style",u)},g={},m={};Object.keys(p).forEach(y=>{const{newTags:b,oldTags:w}=p[y];b.length&&(g[y]=b),w.length&&(m[y]=p[y].oldTags)}),e&&e(),l(t,g,m)},vc=null,w4=t=>{vc&&cancelAnimationFrame(vc),t.defer?vc=requestAnimationFrame(()=>{X1(t,()=>{vc=null})}):(X1(t),vc=null)},x4=w4,ek=class extends v.Component{constructor(){super(...arguments);hs(this,"rendered",!1)}shouldComponentUpdate(e){return!r4(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:n}=this.props.context;let r=null;const s=u4(e.get().map(i=>{const o={...i.props};return delete o.context,o}));u_.canUseDOM?x4(s):pv&&(r=pv(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},wy,zb=(wy=class extends v.Component{shouldComponentUpdate(t){return!XL(Q1(this.props,"helmetData"),Q1(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,n,r){return{...e,[t.type]:[...e[t.type]||[],{...n,...this.mapNestedChildrenToProps(t,r)}]}}mapObjectTypeChildren(t,e,n,r){switch(t.type){case"title":return{...e,[t.type]:r,titleAttributes:{...n}};case"body":return{...e,bodyAttributes:{...n}};case"html":return{...e,htmlAttributes:{...n}};default:return{...e,[t.type]:{...n}}}}mapArrayTypeChildrenToProps(t,e){let n={...e};return Object.keys(t).forEach(r=>{n={...n,[r]:t[r]}}),n}warnOnInvalidChildren(t,e){return Y1(J1.some(n=>t.type===n),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${J1.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),Y1(!e||typeof e=="string"||Array.isArray(e)&&!e.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let n={};return U.Children.forEach(t,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((l,c)=>(l[s4[c]||c]=i[c],l),{});let{type:a}=r;
40switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,s),a){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:e=this.mapObjectTypeChildren(r,e,o,s);break}}),this.mapArrayTypeChildrenToProps(n,e)}render(){const{children:t,...e}=this.props;let n={...e},{helmetData:r}=e;if(t&&(n=this.mapChildrenToProps(t,n)),r&&!(r instanceof mv)){const s=r;r=new mv(s.context,!0),delete n.helmetData}return r?U.createElement(ek,{...n,context:r.value}):U.createElement(c_.Consumer,null,s=>U.createElement(ek,{...n,context:s}))}},hs(wy,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),wy);const k4=1,S4=1e6;let vg=0;function C4(){return vg=(vg+1)%Number.MAX_SAFE_INTEGER,vg.toString()}const bg=new Map,tk=t=>{if(bg.has(t))return;const e=setTimeout(()=>{bg.delete(t),Zc({type:"REMOVE_TOAST",toastId:t})},S4);bg.set(t,e)},E4=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,k4)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?tk(n):t.toasts.forEach(r=>{tk(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Ih=[];let Oh={toasts:[]};function Zc(t){Oh=E4(Oh,t),Ih.forEach(e=>{e(Oh)})}function A4({...t}){const e=C4(),n=s=>Zc({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>Zc({type:"DISMISS_TOAST",toastId:e});return Zc({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function Ir(){const[t,e]=v.useState(Oh);return v.useEffect(()=>(Ih.push(e),()=>{const n=Ih.indexOf(e);n>-1&&Ih.splice(n,1)}),[t]),{...t,toast:A4,dismiss:n=>Zc({type:"DISMISS_TOAST",toastId:n})}}function ge(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function nk(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function d_(...t){return e=>{let n=!1;const r=t.map(s=>{const i=nk(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():nk(t[s],null)}}}}function $e(...t){return v.useCallback(d_(...t),t)}function T4(t,e){const n=v.createContext(e),r=i=>{const{children:o,...a}=i,l=v.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function s(i){const o=v.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function sr(t,e=[]){let n=[];function r(i,o){const a=v.createContext(o),l=n.length;n=[...n,o];const c=d=>{var b;const{scope:f,children:p,...g}=d,m=((b=f==null?void 0:f[t])==null?void 0:b[l])||a,y=v.useMemo(()=>g,Object.values(g));return h.jsx(m.Provider,{value:y,children:p})};c.displayName=i+"Provider";function u(d,f){var m;const p=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,g=v.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>v.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return v.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,_4(s,...e)]}function _4(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Yo(t){const e=I4(t),n=v.forwardRef((r,s)=>{const{children:i,...o}=r,a=v.Children.toArray(i),l=a.find(O4);if(l){const c=l.props.children,u=a.map(d=>d===l?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:d);return h.jsx(e,{...o,ref:s,children:v.isValidElement(c)?v.cloneElement(c,void 0,u):null})}return h.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var N4=Yo("Slot");function I4(t){const e=v.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 10,585 bytes, line 40
40if(v.isValidElement(s)){const o=j4(s),a=P4(i,s.props);return s.type!==v.Fragment&&(a.ref=r?d_(r,o):o),v.cloneElement(s,a)}return v.Children.count(s)>1?v.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var h_=Symbol("radix.slottable");function f_(t){const e=({children:n})=>h.jsx(h.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=h_,e}function O4(t){return v.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===h_}function P4(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function j4(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Ub(t){const e=t+"CollectionProvider",[n,r]=sr(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:b}=m,w=U.useRef(null),x=U.useRef(new Map).current;return h.jsx(s,{scope:y,itemMap:x,collectionRef:w,children:b})};o.displayName=e;const a=t+"CollectionSlot",l=Yo(a),c=U.forwardRef((m,y)=>{const{scope:b,children:w}=m,x=i(a,b),k=$e(y,x.collectionRef);return h.jsx(l,{ref:k,children:w})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=Yo(u),p=U.forwardRef((m,y)=>{const{scope:b,children:w,...x}=m,k=U.useRef(null),S=$e(y,k),E=i(u,b);return U.useEffect(()=>(E.itemMap.set(k,{ref:k,...x}),()=>void E.itemMap.delete(k))),h.jsx(f,{[d]:"",ref:S,children:w})});p.displayName=u;function g(m){const y=i(t+"CollectionConsumer",m);return U.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((E,C)=>x.indexOf(E.ref.current)-x.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},g,r]}var M4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=M4.reduce((t,e)=>{const n=Yo(`Primitive.${e}`),r=v.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function p_(t,e){t&&ua.flushSync(()=>t.dispatchEvent(e))}function rr(t){const e=v.useRef(t);return v.useEffect(()=>{e.current=t}),v.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function R4(t,e=globalThis==null?void 0:globalThis.document){const n=rr(t);v.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var D4="DismissableLayer",yv="dismissableLayer.update",L4="dismissableLayer.pointerDownOutside",$4="dismissableLayer.focusOutside",rk,m_=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ql=v.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=v.useContext(m_),[u,d]=v.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=v.useState({}),g=$e(e,C=>d(C)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(y),w=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,k=w>=b,S=z4(C=>{const A=C.target,N=[...c.branches].some(M=>M.contains(A));!k||N||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},f),E=U4(C=>{const A=C.target;[...c.branches].some(M=>M.contains(A))||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},f);return R4(C=>{w===c.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),v.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(rk=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),sk(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=rk)}},[u,f,n,c]),v.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),sk())},[u,c]),v.useEffect(()=>{const C=()=>p({});return document.addEventListener(yv,C),()=>document.removeEventListener(yv,C)},[]),h.jsx(ke.div,{...l,ref:g,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:ge(t.onFocusCapture,E.onFocusCapture),onBlurCapture:ge(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ge(t.onPointerDownCapture,S.onPointerDownCapture)})});Ql.displayName=D4;var F4="DismissableLayerBranch",g_=v.forwardRef((t,e)=>{const n=v.useContext(m_),r=v.useRef(null),s=$e(e,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),h.jsx(ke.div,{...t,ref:s})});g_.displayName=F4;function z4(t,e=globalThis==null?void 0:globalThis.document){const n=rr(t),r=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){y_(L4,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function U4(t,e=globalThis==null?void 0:globalThis.document){const n=rr(t),r=v.useRef(!1);return v.useEffect(()=>{const s=i=>{i.target&&!r.current&&y_($4,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sk(){const t=new CustomEvent(yv);document.dispatchEvent(t)}function y_(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?p_(s,i):s.dispatchEvent(i)}var B4=Ql,V4=g_,qt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},H4="Portal",ld=v.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=v.useState(!1);qt(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?$b.createPortal(h.jsx(ke.div,{...r,ref:e}),o):null});ld.displayName=H4;function W4(t,e){return v.useReducer((n,r)=>e[n][r]??n,t)}var is=t=>{const{present:e,children:n}=t,r=q4(e),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=$e(r.ref,G4(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:i}):null};is.displayName="Presence";function q4(t){const[e,n]=v.useState(),r=v.useRef(null),s=v.useRef(t),i=v.useRef("none"),o=t?"mounted":"unmounted",[a,l]=W4(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=Wd(r.current);i.current=a==="mounted"?c:"none"},[a]),qt(()=>{const c=r.current,u=s.current;if(u!==t){const f=i.current,p=Wd(c);t?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),qt(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=p=>{const m=Wd(r.current).includes(p.animationName);if(p.target===e&&m&&(l("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},f=p=>{p.target===e&&(i.current=Wd(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Wd(t){return(t==null?void 0:t.animationName)||"none"}function G4(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var K4=G0[" useInsertionEffect ".trim().toString()]||qt;function Ds({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=Z4({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const u=v.useRef(t!==void 0);v.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. 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.`),u.current=a},[a,r])}const c=v.useCallback(u=>{var d;if(a){const f=Y4(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else i(u)},[a,t,i,o]);return[l,c]}function Z4({defaultProp:t,onChange:e}){const[n,r]=v.useState(t),s=v.useRef(n),i=v.useRef(e);return K4(()=>{i.current=e},[e]),v.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function Y4(t){return typeof t=="function"}var v_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),J4="VisuallyHidden",Gp=v.forwardRef((t,e)=>h.jsx(ke.span,{...t,ref:e,style:{...v_,...t.style}}));Gp.displayName=J4;var Q4=Gp,Bb="ToastProvider",[Vb,X4,e5]=Ub("Toast"),[b_,dee]=sr("Toast",[e5]),[t5,Kp]=b_(Bb),w_=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=v.useState(null),[c,u]=v.useState(0),d=v.useRef(!1),f=v.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Bb}\`. Expected non-empty \`string\`.`),h.jsx(Vb.Provider,{scope:e,children:h.jsx(t5,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:
40a,onViewportChange:l,onToastAdd:v.useCallback(()=>u(p=>p+1),[]),onToastRemove:v.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};w_.displayName=Bb;var x_="ToastViewport",n5=["F8"],vv="toast.viewportPause",bv="toast.viewportResume",k_=v.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=n5,label:s="Notifications ({hotkey})",...i}=t,o=Kp(x_,n),a=X4(n),l=v.useRef(null),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=$e(e,d,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;v.useEffect(()=>{const y=b=>{var x;r.length!==0&&r.every(k=>b[k]||b.code===k)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),v.useEffect(()=>{const y=l.current,b=d.current;if(g&&y&&b){const w=()=>{if(!o.isClosePausedRef.current){const E=new CustomEvent(vv);b.dispatchEvent(E),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const E=new CustomEvent(bv);b.dispatchEvent(E),o.isClosePausedRef.current=!1}},k=E=>{!y.contains(E.relatedTarget)&&x()},S=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",w),y.addEventListener("focusout",k),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",S),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",k),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[g,o.isClosePausedRef]);const m=v.useCallback(({tabbingDirection:y})=>{const w=a().map(x=>{const k=x.ref.current,S=[k,...m5(k)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?w.reverse():w).flat()},[a]);return v.useEffect(()=>{const y=d.current;if(y){const b=w=>{var S,E,C;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const A=document.activeElement,N=w.shiftKey;if(w.target===y&&N){(S=c.current)==null||S.focus();return}const P=m({tabbingDirection:N?"backwards":"forwards"}),V=P.findIndex(_=>_===A);wg(P.slice(V+1))?w.preventDefault():N?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[a,m]),h.jsxs(V4,{ref:l,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&h.jsx(wv,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});wg(y)}}),h.jsx(Vb.Slot,{scope:n,children:h.jsx(ke.ol,{tabIndex:-1,...i,ref:f})}),g&&h.jsx(wv,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});wg(y)}})]})});k_.displayName=x_;var S_="ToastFocusProxy",wv=v.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Kp(S_,n);return h.jsx(Gp,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});wv.displayName=S_;var cd="Toast",r5="toast.swipeStart",s5="toast.swipeMove",i5="toast.swipeCancel",o5="toast.swipeEnd",C_=v.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=Ds({prop:r,defaultProp:s??!0,onChange:i,caller:cd});return h.jsx(is,{present:n||a,children:h.jsx(c5,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:rr(t.onPause),onResume:rr(t.onResume),onSwipeStart:ge(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ge(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ge(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ge(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});C_.displayName=cd;var[a5,l5]=b_(cd,{onClose(){}}),c5=v.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...g}=t,m=Kp(cd,n),[y,b]=v.useState(null),w=$e(e,_=>b(_)),x=v.useRef(null),k=v.useRef(null),S=s||m.duration,E=v.useRef(0),C=v.useRef(S),A=v.useRef(0),{onToastAdd:N,onToastRemove:M}=m,F=rr(()=>{var H;(y==null?void 0:y.contains(document.activeElement))&&((H=m.viewport)==null||H.focus()),o()}),P=v.useCallback(_=>
40{!_||_===1/0||(window.clearTimeout(A.current),E.current=new Date().getTime(),A.current=window.setTimeout(F,_))},[F]);v.useEffect(()=>{const _=m.viewport;if(_){const H=()=>{P(C.current),c==null||c()},B=()=>{const $=new Date().getTime()-E.current;C.current=C.current-$,window.clearTimeout(A.current),l==null||l()};return _.addEventListener(vv,B),_.addEventListener(bv,H),()=>{_.removeEventListener(vv,B),_.removeEventListener(bv,H)}}},[m.viewport,S,l,c,P]),v.useEffect(()=>{i&&!m.isClosePausedRef.current&&P(S)},[i,S,m.isClosePausedRef,P]),v.useEffect(()=>(N(),()=>M()),[N,M]);const V=v.useMemo(()=>y?O_(y):null,[y]);return m.viewport?h.jsxs(h.Fragment,{children:[V&&h.jsx(u5,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),h.jsx(a5,{scope:n,onClose:F,children:ua.createPortal(h.jsx(Vb.ItemSlot,{scope:n,children:h.jsx(B4,{asChild:!0,onEscapeKeyDown:ge(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||F(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:h.jsx(ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:w,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ge(t.onKeyDown,_=>{_.key==="Escape"&&(a==null||a(_.nativeEvent),_.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:ge(t.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:ge(t.onPointerMove,_=>{if(!x.current)return;const H=_.clientX-x.current.x,B=_.clientY-x.current.y,$=!!k.current,O=["left","right"].includes(m.swipeDirection),R=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,K=O?R(0,H):0,de=O?0:R(0,B),se=_.pointerType==="touch"?10:2,ae={x:K,y:de},he={originalEvent:_,delta:ae};$?(k.current=ae,qd(s5,d,he,{discrete:!1})):ik(ae,m.swipeDirection,se)?(k.current=ae,qd(r5,u,he,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(H)>se||Math.abs(B)>se)&&(x.current=null)}),onPointerUp:ge(t.onPointerUp,_=>{const H=k.current,B=_.target;if(B.hasPointerCapture(_.pointerId)&&B.releasePointerCapture(_.pointerId),k.current=null,x.current=null,H){const $=_.currentTarget,O={originalEvent:_,delta:H};ik(H,m.swipeDirection,m.swipeThreshold)?qd(o5,p,O,{discrete:!0}):qd(i5,f,O,{discrete:!0}),$.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),u5=t=>{const{__scopeToast:e,children:n,...r}=t,s=Kp(cd,e),[i,o]=v.useState(!1),[a,l]=v.useState(!1);return f5(()=>o(!0)),v.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:h.jsx(ld,{asChild:!0,children:h.jsx(Gp,{...r,children:i&&h.jsxs(h.Fragment,{children:[s.label," ",n]})})})},d5="ToastTitle",E_=v.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return h.jsx(ke.div,{...r,ref:e})});E_.displayName=d5;var h5="ToastDescription",A_=v.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return h.jsx(ke.div,{...r,ref:e})});A_.displayName=h5;var T_="ToastAction",__=v.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?h.jsx(I_,{altText:n,asChild:!0,children:h.jsx(Hb,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${T_}\`. Expected non-empty \`string\`.`),null)});__.displayName=T_;var N_="ToastClose",Hb=v.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=l5(N_,n);return h.jsx(I_,{asChild:!0,children:h.jsx(ke.button,{type:"button",...r,ref:e,onClick:ge(t.onClick,s.onClose)})})});Hb.displayName=N_;var I_=v.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return h.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function O_(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),p5(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...O_(r))}}),e}function qd(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?p_(s,i):s.dispatchEvent(i)}var ik=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function f5(t=()=>{}){const e=rr(t);qt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function p5(t){return t.nodeType===t.ELEMENT_NODE}function m5(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function wg(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var g5=w_,P_=k_,j_=C_,M_=E_,R_=A_,D_=__,L_=Hb;function $_(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=$_(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function F_(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=$_(t))&&(r&&(r+=" "),r+=e);return r}const ok=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ak=F_,ud=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return ak(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=ok(u)||ok(d);return s[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...c,d,f]:c},[]);return ak(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const y5=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),z_=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var v5={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const b5=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>v.createElement("svg",{ref:l,...v5,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:z_("lucide",s),...a},[...o.map(([c,u])=>v.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ve=(t,e)=>{const n=v.forwardRef(({className:r,...s},i)=>v.createElement(b5,{ref:i,iconNode:e,className:z_(`lucide-${y5(t)}`,r),...s}));return n.displayName=`${t}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Xa=ve("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const lk=ve("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const w5=ve("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const x5=ve("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const xv=ve("Calendar",[["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"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const dd=ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const U_=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const k5=ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const S5=ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const C5=ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const E5=ve("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const xg=ve("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const ck=ve("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree.
130 */const uk=ve("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"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const A5=ve("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const T5=ve("ExternalLink",[["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"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const dk=ve("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const _5=ve("FilePlus",[["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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const B_=ve("FileText",[["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"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const N5=ve("Heading1",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const I5=ve("Heading2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const O5=ve("Heading3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const kv=ve("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const P5=ve("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree.
185 */const j5=ve("Link2",[["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"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const M5=ve("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const R5=ve("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const D5=ve("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const L5=ve("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const el=ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const $5=ve("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const F5=ve("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const z5=ve("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const U5=ve("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const B5=ve("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const V5=ve("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"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const Wb=ve("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
245a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const V_=ve("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const H5=ve("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const W5=ve("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const q5=ve("RefreshCw",[["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"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const G5=ve("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"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const qb=ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const K5=ve("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"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const Z5=ve("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"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const Sv=ve("Share2",[["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"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const Y5=ve("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/** 296 * @license lucide-react v0.462.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const hk=ve("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"}]]);/** 301 * @license lucide-react v0.462.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const H_=ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 9,718 bytes, lines 305-330
305],["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"}]]);/** 306 * @license lucide-react v0.462.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const J5=ve("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/** 311 * @license lucide-react v0.462.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const Q5=ve("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/** 316 * @license lucide-react v0.462.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const X5=ve("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"}]]);/** 321 * @license lucide-react v0.462.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const Zp=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 326 * @license lucide-react v0.462.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const e3=ve("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"}]]),Gb="-",t3=t=>{const e=r3(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(Gb);return a[0]===""&&a.length!==1&&a.shift(),W_(a,e)||n3(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},W_=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?W_(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(Gb);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},fk=/^\[(.+)\]$/,n3=t=>{if(fk.test(t)){const e=fk.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},r3=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return i3(Object.entries(t.classGroups),n).forEach(([i,o])=>{Cv(o,r,i,e)}),r},Cv=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:pk(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(s3(s)){Cv(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Cv(o,pk(e,i),n,r)})})},pk=(t,e)=>{let n=t;return e.split(Gb).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},s3=t=>t.isThemeGetter,i3=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,o3=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},q_="!",a3=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let y=0;y<a.length;y++){let b=a[y];if(c===0){if(b===s&&(r||a.slice(y,y+i)===e)){l.push(a.slice(u,y)),u=y+i;continue}if(b==="/"){d=y;continue}}b==="["?c++:b==="]"&&c--}const f=l.length===0?a:a.substring(u),p=f.startsWith(q_),g=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},l3=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},c3=t=>({cache:o3(t.cacheSize),parseClassName:a3(t),...t3(t)}),u3=/\s+/,d3=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(u3);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(c);let g=!!p,m=r(g?f.substring(0,p):f);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const y=l3(u).join(":"),b=d?y+q_:y,w=b+m;if(i.includes(w))continue;i.push(w);const x=s(m,g);for(let k=0;k<x.length;++k){const S=x[k];i.push(b+S)}a=c+(a.length>0?" "+a:a)}return a};function h3(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=G_(e))&&(r&&(r+=" "),r+=n);return r}const G_=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=G_(t[r]))&&(n&&(n+=" "),n+=e);return n};function f3(t,...e){let n,r,s,i=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return n=c3(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=d3(l,n);return s(l,u),u}return function(){return i(h3.apply(null,arguments))}}const Qe=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},K_=/^\[(?:([a-z-]+):)?(.+)\]$/i,p3=/^\d+\/\d+$/,m3=new Set(["px","full","screen"]),g3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y3=/\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$/,v3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,b3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,w3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fs=t=>dl(t)||m3.has(t)||p3.test(t),Ks=t=>Xl(t,"length",_3),dl=t=>!!t&&!Number.isNaN(Number(t)),kg=t=>Xl(t,"number",dl),bc=t=>!!t&&Number.isInteger(Number(t)),x3=t=>t.endsWith("%")&&dl(t.slice(0,-1)),Ie=t=>K_.test(t),Zs=t=>g3.test(t),k3=new Set(["length","size","percentage"]),S3=t=>Xl(t,k3,Z_),C3=t=>Xl(t,"position",Z_),E3=new Set(["image","url"]),A3=t=>Xl(t,E3,I3),T3=t=>Xl(t,"",N3),wc=()=>!0,Xl=(t,e,n)=>{const r=K_.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},_3=t=>y3.test(t)&&!v3.test(t),Z_=()=>!1,N3=t=>b3.test(t),I3=t=>w3.test(t),O3=()=>{const t=Qe("colors"),e=Qe("spacing"),n=Qe("blur"),r=Qe("brightness"),s=Qe("borderColor"),i=Qe("borderRadius"),o=Qe("borderSpacing"),a=Qe("borderWidth"),l=Qe("contrast"),c=Qe("grayscale"),u=Qe("hueRotate"),d=Qe("invert"),f=Qe("gap"),p=Qe("gradientColorStops"),g=Qe("gradientColorStopPositions"),m=Qe("inset"),y=Qe("margin"),b=Qe("opacity"),w=Qe("padding"),x=Qe("saturate"),k=Qe("scale"),S=Qe("sepia"),E=Qe("skew"),C=Qe("space"),A=Qe("translate"),N=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Ie,e],P=()=>[Ie,e],V=()=>["",fs,Ks],_=()=>["auto",dl,Ie],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Ie],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],de=()=>[dl,Ie];return{cacheSize:500,separator:":",theme:{colors:[wc],spacing:[fs,Ks],blur:["none","",Zs,Ie],brightness:de(),borderColor:[t],borderRadius:["none","","full",Zs,Ie],borderSpacing:P(),borderWidth:V(),contrast:de(),grayscale:R(),hueRotate:de(),invert:R(),gap:P(),gradientColorStops:[t],gradientColorStopPositions:[x3,Ks],inset:F(),margin:F(),opacity:de(),padding:P(),saturate:de(),scale:de(),sepia:R(),skew:de(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[Zs]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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"],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:[...H(),Ie]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bc,Ie]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",bc,Ie]}
vendor: 9,545 bytes, line 330
330],"grid-cols":[{"grid-cols":[wc]}],"col-start-end":[{col:["auto",{span:["full",bc,Ie]},Ie]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[wc]}],"row-start-end":[{row:["auto",{span:[bc,Ie]},Ie]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,e]}],"min-w":[{"min-w":[Ie,e,"min","max","fit"]}],"max-w":[{"max-w":[Ie,e,"none","full","min","max","fit","prose",{screen:[Zs]},Zs]}],h:[{h:[Ie,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Zs,Ks]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kg]}],"font-family":[{font:[wc]}],"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:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",dl,kg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fs,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fs,Ks]}],"underline-offset":[{"underline-offset":["auto",fs,Ie]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),C3]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",S3]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},A3]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[fs,Ie]}],"outline-w":[{outline:[fs,Ks]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[fs,Ks]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Zs,T3]}],"shadow-color":[{shadow:[wc]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Zs,Ie]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:de()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:de()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[bc,Ie]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",Ie]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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"]}
vendor: 4,647 bytes, line 330
330],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",Ie]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[fs,Ks,kg]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},P3=f3(O3);function ee(...t){return P3(F_(t))}const j3=g5,Y_=v.forwardRef(({className:t,...e},n)=>h.jsx(P_,{ref:n,className:ee("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Y_.displayName=P_.displayName;const M3=ud("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),J_=v.forwardRef(({className:t,variant:e,...n},r)=>h.jsx(j_,{ref:r,className:ee(M3({variant:e}),t),...n}));J_.displayName=j_.displayName;const R3=v.forwardRef(({className:t,...e},n)=>h.jsx(D_,{ref:n,className:ee("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));R3.displayName=D_.displayName;const Q_=v.forwardRef(({className:t,...e},n)=>h.jsx(L_,{ref:n,className:ee("absolute right-2 top-2 rounded-md p-1 text-foreground
330/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:h.jsx(Zp,{className:"h-4 w-4"})}));Q_.displayName=L_.displayName;const X_=v.forwardRef(({className:t,...e},n)=>h.jsx(M_,{ref:n,className:ee("text-sm font-semibold",t),...e}));X_.displayName=M_.displayName;const e2=v.forwardRef(({className:t,...e},n)=>h.jsx(R_,{ref:n,className:ee("text-sm opacity-90",t),...e}));e2.displayName=R_.displayName;function D3(){const{toasts:t}=Ir();return h.jsxs(j3,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return h.jsxs(J_,{...i,children:[h.jsxs("div",{className:"grid gap-1",children:[n&&h.jsx(X_,{children:n}),r&&h.jsx(e2,{children:r})]}),s,h.jsx(Q_,{})]},e)}),h.jsx(Y_,{})]})}var yf=["light","dark"],Kb="(prefers-color-scheme: dark)",L3=typeof window>"u",Zb=v.createContext(void 0),$3={setTheme:t=>{},themes:[]},t2=()=>{var t;return(t=v.useContext(Zb))!=null?t:$3},F3=t=>v.useContext(Zb)?t.children:v.createElement(U3,{...t}),z3=["light","dark"],U3=({forcedTheme:t,disableTransitionOnChange:e=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:s="theme",themes:i=z3,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:l,children:c,nonce:u})=>{let[d,f]=v.useState(()=>mk(s,o)),[p,g]=v.useState(()=>mk(s)),m=l?Object.values(l):i,y=v.useCallback(k=>{let S=k;if(!S)return;k==="system"&&n&&(S=gk());let E=l?l[S]:S,C=e?V3():null,A=document.documentElement;if(a==="class"?(A.classList.remove(...m),E&&A.classList.add(E)):E?A.setAttribute(a,E):A.removeAttribute(a),r){let N=yf.includes(o)?o:null,M=yf.includes(S)?S:N;A.style.colorScheme=M}C==null||C()},[]),b=v.useCallback(k=>{let S=typeof k=="function"?k(k):k;f(S);try{localStorage.setItem(s,S)}catch{}},[t]),w=v.useCallback(k=>{let S=gk(k);g(S),d==="system"&&n&&!t&&y("system")},[d,t]);v.useEffect(()=>{let k=window.matchMedia(Kb);return k.addListener(w),w(k),()=>k.removeListener(w)},[w]),v.useEffect(()=>{let k=S=>{if(S.key!==s)return;let E=S.newValue||o;b(E)};return window.addEventListener("storage",k),()=>window.removeEventListener("storage",k)},[b]),v.useEffect(()=>{y(t??d)},[t,d]);let x=v.useMemo(()=>({theme:d,setTheme:b,forcedTheme:t,resolvedTheme:d==="system"?p:d,themes:n?[...i,"system"]:i,systemTheme:n?p:void 0}),[d,b,t,p,n,i]);return v.createElement(Zb.Provider,{value:x},v.createElement(B3,{forcedTheme:t,disableTransitionOnChange:e,enableSystem:n,enableColorScheme:r,storageKey:s,themes:i,defaultTheme:o,attribute:a,value:l,children:c,attrs:m,nonce:u}),c)},B3=v.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?yf.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(g,m=!1,y=!0)=>{let b=o?o[g]:g,w=m?g+"|| ''":`'${b}'`,x="";return s&&y&&!m&&yf.includes(g)&&(x+=`d.style.colorScheme = '${g}';`),n==="class"?m||b?x+=`c.add(${w})`:x+="null":b&&(x+=`d[s](n,${w})`),x},p=t?`!function(){${u}${f(t)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${Kb}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:p}})}),mk=(t,e)=>{if(L3)return;let n;try{n=localStorage.getItem(t)||void 0}catch{}return n||e},V3=()=>{let t=document.createElement("style");return t.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},gk=t=>
330(t||(t=window.matchMedia(Kb)),t.matches?"dark":"light"),H3=t=>{switch(t){case"success":return G3;case"info":return Z3;case"warning":return K3;case"error":return Y3;default:return null}},W3=Array(12).fill(0),q3=({visible:t,className:e})=>U.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},U.createElement("div",{className:"sonner-spinner"},W3.map((n,r)=>U.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),G3=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),K3=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},U.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"})),Z3=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),Y3=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),J3=U.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"},U.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),U.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Q3=()=>{let[t,e]=U.useState(document.hidden);return U.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},Ev=1,X3=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Ev++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],U.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(t$(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:c,description:u})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>o.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));
330return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||Ev++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},yn=new X3,e$=(t,e)=>{let n=(e==null?void 0:e.id)||Ev++;return yn.addToast({title:t,...e,id:n}),n},t$=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",n$=e$,r$=()=>yn.toasts,s$=()=>yn.getActiveToasts();Object.assign(n$,{success:yn.success,info:yn.info,warning:yn.warning,error:yn.error,custom:yn.custom,message:yn.message,promise:yn.promise,dismiss:yn.dismiss,loading:yn.loading},{getHistory:r$,getToasts:s$});function i$(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}i$(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
330left: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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
330:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
330--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)} 331`);function Gd(t){return t.label!==void 0}var o$=3,a$="32px",l$="16px",yk=4e3,c$=356,u$=14,d$=20,h$=200;function ur(...t){return t.filter(Boolean).join(" ")}function f$(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var p$=t=>{var e,n,r,s,i,o,a,l,c,u,d;let{invert:f,toast:p,unstyled:g,interacting:m,setHeights:y,visibleToasts:b,heights:w,index:x,toasts:k,expanded:S,removeToast:E,defaultRichColors:C,closeButton:A,style:N,cancelButtonStyle:M,actionButtonStyle:F,className:P="",descriptionClassName:V="",duration:_,position:H,gap:B,loadingIcon:$,expandByDefault:O,classNames:R,icons:K,closeButtonAriaLabel:de="Close toast",pauseWhenPageIsHidden:se}=t,[ae,he]=U.useState(null),[Y,re]=U.useState(null),[D,be]=U.useState(!1),[De,pe]=U.useState(!1),[fe,Ce]=U.useState(!1),[nt,Pt]=U.useState(!1),[jr,Mr]=U.useState(!1),[ls,ya]=U.useState(0),[cs,T]=U.useState(0),I=U.useRef(p.duration||_||yk),L=U.useRef(null),X=U.useRef(null),Q=x===0,J=x+1<=b,ie=p.type,Le=p.dismissible!==!1,qe=p.className||"",mn=p.descriptionClassName||"",us=U.useMemo(()=>w.findIndex(Te=>Te.toastId===p.id)||0,[w,p.id]),Rr=U.useMemo(()=>{var Te;return(Te=p.closeButton)!=null?Te:A},[p.closeButton,A]),Sd=U.useMemo(()=>p.duration||_||yk,[p.duration,_]),co=U.useRef(0),Dr=U.useRef(0),Cd=U.useRef(0),ds=U.useRef(null),[zm,Ed]=H.split("-"),$x=U.useMemo(()=>w.reduce((Te,Ge,rt)=>rt>=us?Te:Te+Ge.height,0),[w,us]),Fx=Q3(),yR=p.invert||f,Um=ie==="loading";Dr.current=U.useMemo(()=>us*B+$x,[us,$x]),U.useEffect(()=>{I.current=Sd},[Sd]),U.useEffect(()=>{be(!0)},[]),U.useEffect(()=>{let Te=X.current;if(Te){let Ge=Te.getBoundingClientRect().height;return T(Ge),y(rt=>[{toastId:p.id,height:Ge,position:p.position},...rt]),()=>y(rt=>rt.filter(or=>or.toastId!==p.id))}},[y,p.id]),U.useLayoutEffect(()=>{if(!D)return;let Te=X.current,Ge=Te.style.height;Te.style.height="auto";let rt=Te.getBoundingClientRect().height;Te.style.height=Ge,T(rt),y(or=>or.find(ar=>ar.toastId===p.id)?or.map(ar=>ar.toastId===p.id?{...ar,height:rt}:ar):[{toastId:p.id,height:rt,position:p.position},...or])},[D,p.title,p.description,y,p.id]);let Hs=U.useCallback(()=>{pe(!0),ya(Dr.current),y(Te=>Te.filter(Ge=>Ge.toastId!==p.id)),setTimeout(()=>{E(p)},h$)},[p,E,y,Dr]);U.useEffect(()=>{if(p.promise&&ie==="loading"||p.duration===1/0||p.type==="loading")return;let Te;return S||m||se&&Fx?(()=>{if(Cd.current<co.current){let Ge=new Date().getTime()-co.current;I.current=I.current-Ge}
331Cd.current=new Date().getTime()})():I.current!==1/0&&(co.current=new Date().getTime(),Te=setTimeout(()=>{var Ge;(Ge=p.onAutoClose)==null||Ge.call(p,p),Hs()},I.current)),()=>clearTimeout(Te)},[S,m,p,ie,se,Fx,Hs]),U.useEffect(()=>{p.delete&&Hs()},[Hs,p.delete]);function vR(){var Te,Ge,rt;return K!=null&&K.loading?U.createElement("div",{className:ur(R==null?void 0:R.loader,(Te=p==null?void 0:p.classNames)==null?void 0:Te.loader,"sonner-loader"),"data-visible":ie==="loading"},K.loading):$?U.createElement("div",{className:ur(R==null?void 0:R.loader,(Ge=p==null?void 0:p.classNames)==null?void 0:Ge.loader,"sonner-loader"),"data-visible":ie==="loading"},$):U.createElement(q3,{className:ur(R==null?void 0:R.loader,(rt=p==null?void 0:p.classNames)==null?void 0:rt.loader),visible:ie==="loading"})}return U.createElement("li",{tabIndex:0,ref:X,className:ur(P,qe,R==null?void 0:R.toast,(e=p==null?void 0:p.classNames)==null?void 0:e.toast,R==null?void 0:R.default,R==null?void 0:R[ie],(n=p==null?void 0:p.classNames)==null?void 0:n[ie]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":D,"data-promise":!!p.promise,"data-swiped":jr,"data-removed":De,"data-visible":J,"data-y-position":zm,"data-x-position":Ed,"data-index":x,"data-front":Q,"data-swiping":fe,"data-dismissible":Le,"data-type":ie,"data-invert":yR,"data-swipe-out":nt,"data-swipe-direction":Y,"data-expanded":!!(S||O&&D),style:{"--index":x,"--toasts-before":x,"--z-index":k.length-x,"--offset":`${De?ls:Dr.current}px`,"--initial-height":O?"auto":`${cs}px`,...N,...p.style},onDragEnd:()=>{Ce(!1),he(null),ds.current=null},onPointerDown:Te=>{Um||!Le||(L.current=new Date,ya(Dr.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(Ce(!0),ds.current={x:Te.clientX,y:Te.clientY}))},onPointerUp:()=>{var Te,Ge,rt,or;if(nt||!Le)return;ds.current=null;let ar=Number(((Te=X.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ws=Number(((Ge=X.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),uo=new Date().getTime()-((rt=L.current)==null?void 0:rt.getTime()),lr=ae==="x"?ar:Ws,qs=Math.abs(lr)/uo;if(Math.abs(lr)>=d$||qs>.11){ya(Dr.current),(or=p.onDismiss)==null||or.call(p,p),re(ae==="x"?ar>0?"right":"left":Ws>0?"down":"up"),Hs(),Pt(!0),Mr(!1);return}Ce(!1),he(null)},onPointerMove:Te=>{var Ge,rt,or,ar;if(!ds.current||!Le||((Ge=window.getSelection())==null?void 0:Ge.toString().length)>0)return;let Ws=Te.clientY-ds.current.y,uo=Te.clientX-ds.current.x,lr=(rt=t.swipeDirections)!=null?rt:f$(H);!ae&&(Math.abs(uo)>1||Math.abs(Ws)>1)&&he(Math.abs(uo)>Math.abs(Ws)?"x":"y");let qs={x:0,y:0};ae==="y"?(lr.includes("top")||lr.includes("bottom"))&&(lr.includes("top")&&Ws<0||lr.includes("bottom")&&Ws>0)&&(qs.y=Ws):ae==="x"&&(lr.includes("left")||lr.includes("right"))&&(lr.includes("left")&&uo<0||lr.includes("right")&&uo>0)&&(qs.x=uo),(Math.abs(qs.x)>0||Math.abs(qs.y)>0)&&Mr(!0),(or=X.current)==null||or.style.setProperty("--swipe-amount-x",`${qs.x}px`),(ar=X.current)==null||ar.style.setProperty("--swipe-amount-y",`${qs.y}px`)}},Rr&&!p.jsx?U.createElement("button",{"aria-label":de,"data-disabled":Um,"data-close-button":!0,onClick:Um||!Le?()=>{}:()=>{var Te;Hs(),(Te=p.onDismiss)==null||Te.call(p,p)},className:ur(R==null?void 0:R.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=K==null?void 0:K.close)!=null?i:J3):null,p.jsx||v.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:U.createElement(U.Fragment,null,ie||p.icon||p.promise?U.createElement("div",{"data-icon":"",className:ur(R==null?void 0:R.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||vR():null,p.type!=="loading"?p.icon||(K==null?void 0:K[ie])||H3(ie):null):null,U.createElement("div",{"data-content":"",className:ur(R==null?void 0:R.content,(a=p==null?void 0:p.classNames)==null?void 0:a.content)},U.createElement("div",{"data-title":"",className:ur(R==null?void 0:R.title,(l=p==null?void 0:p.classNames)==null?void 0:l.title)},typeof p.title=="function"?p.title():p.title),p.description?U.createElement("div",{"data-description":"",className:ur(V,mn,R==null?void 0:R.description,(c=p==null?void 0:p.classNames)==null?void 0:c.description)},typeof p.description=="function"?p.description():p.description):null),v.isValidElement(p.cancel)?p.cancel:p.cancel&&Gd(p.cancel)?U.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||M,onClick:Te=>{var Ge,rt;Gd(p.cancel)&&Le&&((rt=(Ge=p.cancel).onClick)==null||rt.call(Ge,Te),Hs())},className:ur(R==null?void 0:R.cancelButton,(u=p==null?void 0:p.classNames)==null?void 0:u.cancelButton)},p.cancel.label):null,v.isValidElement(p.action)?p.action:p.action&&Gd(p.action)?U.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:Te=>{var Ge,rt;Gd(p.action)&&((rt=(Ge=p.action).onClick)==null||rt.call(Ge,Te),!Te.defaultPrevented&&Hs())},className:ur(R==null?void 0:R.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function vk(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function m$(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?l$:a$;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${o}-${c}`]=a:n[`${o}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var g$=v.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:p,visibleToasts:g=o$,toastOptions:m,dir:y=vk(),gap:b=u$,loadingIcon:w,icons:x,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:S}=t,[E,C]=U.useState([]),A=U.useMemo(()=>Array.from(new Set([r].concat(E.filter(se=>se.position).map(se=>se.position)))),[E,r]),[N,M]=U.useState([]),[F,P]=U.useState(!1),[V,_]=U.useState(!1),[H,B]=U.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
331k":"light"),$=U.useRef(null),O=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=U.useRef(null),K=U.useRef(!1),de=U.useCallback(se=>{C(ae=>{var he;return(he=ae.find(Y=>Y.id===se.id))!=null&&he.delete||yn.dismiss(se.id),ae.filter(({id:Y})=>Y!==se.id)})},[]);return U.useEffect(()=>yn.subscribe(se=>{if(se.dismiss){C(ae=>ae.map(he=>he.id===se.id?{...he,delete:!0}:he));return}setTimeout(()=>{$b.flushSync(()=>{C(ae=>{let he=ae.findIndex(Y=>Y.id===se.id);return he!==-1?[...ae.slice(0,he),{...ae[he],...se},...ae.slice(he+1)]:[se,...ae]})})})}),[]),U.useEffect(()=>{if(u!=="system"){B(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let se=window.matchMedia("(prefers-color-scheme: dark)");try{se.addEventListener("change",({matches:ae})=>{B(ae?"dark":"light")})}catch{se.addListener(({matches:he})=>{try{B(he?"dark":"light")}catch(Y){console.error(Y)}})}},[u]),U.useEffect(()=>{E.length<=1&&P(!1)},[E]),U.useEffect(()=>{let se=ae=>{var he,Y;s.every(re=>ae[re]||ae.code===re)&&(P(!0),(he=$.current)==null||he.focus()),ae.code==="Escape"&&(document.activeElement===$.current||(Y=$.current)!=null&&Y.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[s]),U.useEffect(()=>{if($.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,K.current=!1)}},[$.current]),U.createElement("section",{ref:e,"aria-label":`${k} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((se,ae)=>
vendor: 2,267 bytes, line 331
331{var he;let[Y,re]=se.split("-");return E.length?U.createElement("ol",{key:se,dir:y==="auto"?vk():y,tabIndex:-1,ref:$,className:a,"data-sonner-toaster":!0,"data-theme":H,"data-y-position":Y,"data-lifted":F&&E.length>1&&!i,"data-x-position":re,style:{"--front-toast-height":`${((he=N[0])==null?void 0:he.height)||0}px`,"--width":`${c$}px`,"--gap":`${b}px`,...p,...m$(l,c)},onBlur:D=>{K.current&&!D.currentTarget.contains(D.relatedTarget)&&(K.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||K.current||(K.current=!0,R.current=D.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{V||P(!1)},onDragEnd:()=>P(!1),onPointerDown:D=>{D.target instanceof HTMLElement&&D.target.dataset.dismissible==="false"||_(!0)},onPointerUp:()=>_(!1)},E.filter(D=>!D.position&&ae===0||D.position===se).map((D,be)=>{var De,pe;return U.createElement(p$,{key:D.id,icons:x,index:be,toast:D,defaultRichColors:d,duration:(De=m==null?void 0:m.duration)!=null?De:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(pe=m==null?void 0:m.closeButton)!=null?pe:o,interacting:V,position:se,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:de,toasts:E.filter(fe=>fe.position==D.position),heights:N.filter(fe=>fe.position==D.position),setHeights:M,expandByDefault:i,gap:b,loadingIcon:w,expanded:F,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const y$=({...t})=>{const{theme:e="system"}=t2();return h.jsx(g$,{theme:e,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})};var v$=G0[" useId ".trim().toString()]||(()=>{}),b$=0;
vendor: 19,538 bytes, line 331
331function Is(t){const[e,n]=v.useState(v$());return qt(()=>{t||n(r=>r??String(b$++))},[t]),t||(e?`radix-${e}`:"")}const w$=["top","right","bottom","left"],qi=Math.min,Nn=Math.max,vf=Math.round,Kd=Math.floor,es=t=>({x:t,y:t}),x$={left:"right",right:"left",bottom:"top",top:"bottom"},k$={start:"end",end:"start"};function Av(t,e,n){return Nn(t,qi(e,n))}function Ls(t,e){return typeof t=="function"?t(e):t}function $s(t){return t.split("-")[0]}function ec(t){return t.split("-")[1]}function Yb(t){return t==="x"?"y":"x"}function Jb(t){return t==="y"?"height":"width"}const S$=new Set(["top","bottom"]);function Zr(t){return S$.has($s(t))?"y":"x"}function Qb(t){return Yb(Zr(t))}function C$(t,e,n){n===void 0&&(n=!1);const r=ec(t),s=Qb(t),i=Jb(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=bf(o)),[o,bf(o)]}function E$(t){const e=bf(t);return[Tv(t),e,Tv(e)]}function Tv(t){return t.replace(/start|end/g,e=>k$[e])}const bk=["left","right"],wk=["right","left"],A$=["top","bottom"],T$=["bottom","top"];function _$(t,e,n){switch(t){case"top":case"bottom":return n?e?wk:bk:e?bk:wk;case"left":case"right":return e?A$:T$;default:return[]}}function N$(t,e,n,r){const s=ec(t);let i=_$($s(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Tv)))),i}function bf(t){return t.replace(/left|right|bottom|top/g,e=>x$[e])}function I$(t){return{top:0,right:0,bottom:0,left:0,...t}}function n2(t){return typeof t!="number"?I$(t):{top:t,right:t,bottom:t,left:t}}function wf(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function xk(t,e,n){let{reference:r,floating:s}=t;const i=Zr(e),o=Qb(e),a=Jb(o),l=$s(e),c=i==="y",u=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-s.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-s.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ec(e)){case"start":p[o]-=f*(n&&c?-1:1);break;case"end":p[o]+=f*(n&&c?-1:1);break}return p}const O$=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=xk(c,r,l),f=r,p={},g=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:w,y:x,data:k,reset:S}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=w??u,d=x??d,p={...p,[y]:{...p[y],...k}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:d}=xk(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:p}};async function ju(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ls(e,t),g=n2(p),y=a[f?d==="floating"?"reference":"floating":d],b=wf(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},S=wf(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-S.top+g.top)/k.y,bottom:(S.bottom-b.bottom+g.bottom)/k.y,left:(b.left-S.left+g.left)/k.x,right:(S.right-b.right+g.right)/k.x}}const P$=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ls(t,e)||{};if(c==null)return{};const d=n2(u),f={x:n,y:r},p=Qb(s),g=Jb(p),m=await o.getDimensions(c),y=p==="y",b=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[p]-f[p]-i.floating[g],S=f[p]-i.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=E?E[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(E)))&&(C=a.floating[x]||i.floating[g]);const A=k/2-S/2,N=C/2-m[g]/2-1,M=qi(d[b],N),F=qi(d[w],N),P=M,V=C-m[g]-F,_=C/2-m[g]/2+A,H=Av(P,_,V),B=!l.arrow&&ec(s)!=null&&_!==H&&i.reference[g]/2-(_<P?M:F)-m[g]/2<0,$=B?_<P?_-P:_-V:0;return{[p]:f[p]+$,data:{[p]:H,centerOffset:_-H-$,...B&&{alignmentOffset:$}},reset:B}}}),j$=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=Ls(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=$s(s),w=Zr(a),x=$s(a)===a,k=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(x||!m?[bf(a)]:E$(a)),E=g!=="none";!f&&E&&S.push(...N$(a,m,g,k));const C=[a,...S],A=await ju(e,y),N=[];let M=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&N.push(A[b]),d){const _=C$(s,o,k);N.push(A[_[0]],A[_[1]])}if(M=[...M,{placement:s,overflows:N}],!N.every(_=>_<=0)){var F,P;const _=(((F=i.flip)==null?void 0:F.index)||0)+1,H=C[_];if(H&&(!(d==="alignment"?w!==Zr(H):!1)||M.every(O=>O.overflows[0]>0&&Zr(O.placement)===w)))return{data:{index:_,overflows:M},reset:{placement:H}};let B=(P=M.filter($=>$.overflows[0]<=0).sort(($,O)=>$.overflows[1]-O.overflows[1])[0])==null?void 0:P.placement;if(!B)switch(p){case"bestFit":{var V;const $=(V=M.filter(O=>{if(E){const R=Zr(O.placement);return R===w||R==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((O,R)=>O[1]-R[1])[0])==null?void 0:V[0];$&&(B=$);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function kk(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Sk(t){return w$.some(e=>t[e]>=0)}const M$=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Ls(t,e);switch(r){case"referenceHidden":{const i=await ju(e,{...s,elementContext:"reference"}),o=kk(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Sk(o)}}}case"escaped":{const i=await ju(e,{...s,altBoundary:!0}),o=kk(i,n.floating);return{data:{escapedOffsets:o,escaped:Sk(o)}}}default:return{}}}}},r2=new Set(["left","top"]);async function R$(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=$s(n),a=ec(n),l=Zr(n)==="y",c=r2.has(o)?-1:1,u=i&&l?-1:1,d=Ls(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const D$=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await R$(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},L$=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...l}=Ls(t,e),c={x:n,y:r},u=await ju(e,l),d=Zr($s(s)),f=Yb(d);let p=c[f],g=c[d];if(i){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=p+u[y],x=p-u[b];p=Av(w,p,x)}if(o){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=g+u[y],x=g-u[b];g=Av(w,g,x)}const m=a.fn({...e,[f]:p,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:o}}}}}},$$=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ls(t,e),u={x:n,y:r},d=Zr(s),f=Yb(d);let p=u[f],g=u[d];const m=Ls(a,e),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=f==="y"?"height":"width",k=i.reference[f]-i.floating[x]+y.mainAxis,S=i.reference[f]+i.reference[x]-y.mainAxis;p<k?p=k:p>S&&(p=S)}if(c){var b,w;const x=f==="y"?"width":"height",k=r2.has($s(s)),S=i.reference[d]-i.floating[x]+(k&&((b=o.offset)==null?void 0:b[d])||0)+(k?0:y.crossAxis),E=i.reference[d]+i.reference[x]+(k?0:((w=o.offset)==null?void 0:w[d])||0)-(k?y.crossAxis:0);g<S?g=S:g>E&&(g=E)}return{[f]:p,[d]:g}}}},F$=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Ls(t,e),u=await ju(e,c),d=$s(s),f=ec(s),p=Zr(s)==="y",{width:g,height:m}=i.floating;let y,b;d==="top"||d==="bottom"?(y=d,b=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,y=f==="end"?"top":"bottom");const w=m-u.top-u.bottom,x=g-u.left-u.right,k=qi(m-u[y],w),S=qi(g-u[b],x),E=!e.middlewareData.shift;let C=k,A=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(A=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(C=w),E&&!f){const M=Nn(u.left,0),F=Nn(u.right,0),P=Nn(u.top,0),V=Nn(u.bottom,0);p?A=g-2*(M!==0||F!==0?M+F:Nn(u.left,u.right)):C=m-2*(P!==0||V!==0?P+V:Nn(u.top,u.bottom))}await l({...e,availableWidth:A,availableHeight:C});const N=await o.getDimensions(a.floating);return g!==N.width||m!==N.height?{reset:{rects:!0}}:{}}}};function Yp(){return typeof window<"u"}function tc(t){return s2(t)?(t.nodeName||"").toLowerCase():"#document"}function jn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function as(t){var e;return(e=(s2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function s2(t){return Yp()?t instanceof Node||t instanceof jn(t).Node:!1}function _r(t){return Yp()?t instanceof Element||t instanceof jn(t).Element:!1}function ns(t){return Yp()?t instanceof HTMLElement||t instanceof jn(t).HTMLElement:!1}function Ck(t){return!Yp()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof jn(t).ShadowRoot}const z$=new Set(["inline","contents"]);function hd(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Nr(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!z$.has(s)}const U$=new Set(["table","td","th"]);function B$(t){return U$.has(tc(t))}const V$=[":popover-open",":modal"];function Jp(t){return V$.some(e=>{try{return t.matches(e)}catch{return!1}})}const H$=["transform","translate","scale","rotate","perspective"],W$=["transform","translate","scale","rotate","perspective","filter"],q$=["paint","layout","strict","content"];function Xb(t){const e=ew(),n=_r(t)?Nr(t):t;return H$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||W$.some(r=>(n.willChange||"").includes(r))||q$.some(r=>(n.contain||"").includes(r))}function G$(t){let e=Gi(t);for(;ns(e)&&!jl(e);){if(Xb(e))return e;if(Jp(e))return null;e=Gi(e)}return null}function ew(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const K$=new Set(["html","body","#document"]);function jl(t){return K$.has(tc(t))}function Nr(t){return jn(t).getComputedStyle(t)}function Qp(t){return _r(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Gi(t){if(tc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ck(t)&&t.host||as(t);return Ck(e)?e.host:e}function i2(t){const e=Gi(t);return jl(e)?t.ownerDocument?t.ownerDocument.body:t.body:ns(e)&&hd(e)?e:i2(e)}function Mu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=i2(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=jn(s);if(i){const a=_v(o);return e.concat(o,o.visualViewport||[],hd(s)?s:[],a&&n?Mu(a):[])}return e.concat(s,Mu(s,[],n))}function _v(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function o2(t){const e=Nr(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=ns(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=vf(n)!==i||vf(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function tw(t){return _r(t)?t:t.contextElement}function hl(t){const e=tw(t);if(!ns(e))return es(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=o2(e);let o=(i?vf(n.width):n.width)/r,a=(i?vf(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Z$=es(0);function a2(t){const e=jn(t);return!ew()||!e.visualViewport?Z$:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Y$(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==jn(t)?!1:e}function Jo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=tw(t);let o=es(1);e&&(r?_r(r)&&(o=hl(r)):o=hl(t));const a=Y$(i,n,r)?a2(i):es(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const f=jn(i),p=r&&_r(r)?jn(r):r;let g=f,m=_v(g);for(;m&&r&&p!==g;){const y=hl(m),b=m.getBoundingClientRect(),w=Nr(m),x=b.left+(m.clientLeft+parseFloat(w.paddingLeft))*y.x,k=b.top+(m.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=k,g=jn(m),m=_v(g)}}return wf({width:u,height:d,x:l,y:c})}function nw(t,e){const n=Qp(t).scrollLeft;return e?e.left+n:Jo(as(t)).left+n}function l2(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:nw(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function J$(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=as(r),a=e?Jp(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=es(1);const u=es(0),d=ns(r);if((d||!d&&!i)&&((tc(r)!=="body"||hd(o))&&(l=Qp(r)),ns(r))){const p=Jo(r);c=hl(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=o&&!d&&!i?l2(o,l,!0):es(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Q$(t){return Array.from(t.getClientRects())}function X$(t){const e=as(t),n=Qp(t),r=t.ownerDocument.body,s=Nn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Nn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+nw(t);const a=-n.scrollTop;return Nr(r).direction==="rtl"&&(o+=Nn(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function eF(t,e){const n=jn(t),r=as(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=ew();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const tF=new Set(["absolute","fixed"]);function nF(t,e){const n=Jo(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=ns(t)?hl(t):es(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Ek(t,e,n){let r;if(e==="viewport")r=eF(t,n);else if(e==="document")r=X$(as(t));else if(_r(e))r=nF(e,n);else{const s=a2(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return wf(r)}function c2(t,e){const n=Gi(t);return n===e||!_r(n)||jl(n)?!1:Nr(n).position==="fixed"||c2(n,e)}function rF(t,e){const n=e.get(t);if(n)return n;let r=Mu(t,[],!1).filter(a=>_r(a)&&tc(a)!=="body"),s=null;const i=Nr(t).position==="fixed";let o=i?Gi(t):t;for(;_r(o)&&!jl(o);){const a=Nr(o),l=Xb(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&tF.has(s.position)||hd(o)&&!l&&c2(t,o))?r=r.filter(u=>u!==o):s=a,o=Gi(o)}return e.set(t,r),r}function sF(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Jp(e)?[]:rF(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const d=Ek(e,u,s);return c.top=Nn(d.top,c.top),c.right=qi(d.right,c.right),c.bottom=qi(d.bottom,c.bottom),c.left=Nn(d.left,c.left),c},Ek(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function iF(t){const{width:e,height:n}=o2(t);return{width:e,height:n}}function oF(t,e,n){const r=ns(e),s=as(e),i=n==="fixed",o=Jo(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=es(0);function c(){l.x=nw(s)}if(r||!r&&!i)if((tc(e)!=="body"||hd(s))&&(a=Qp(e)),r){const p=Jo(e,!0,i,e);l.x=p.x+e.clientLeft,l.y=p.y+e.clientTop}else s&&c();i&&!r&&s&&c();const u=s&&!r&&!i?l2(s,a):es(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function Sg(t){return Nr(t).position==="static"}function Ak(t,e){if(!ns(t)||Nr(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return as(t)===n&&(n=n.ownerDocument.body),n}function u2(t,e){const n=jn(t);if(Jp(t))return n;if(!ns(t)){let s=Gi(t);for(;s&&!jl(s);){if(_r(s)&&!Sg(s))return s;s=Gi(s)}return n}let r=Ak(t,e);for(;r&&B$(r)&&Sg(r);)r=Ak(r,e);return r&&jl(r)&&Sg(r)&&!Xb(r)?n:r||G$(t)||n}const aF=async function(t){const e=this.getOffsetParent||u2,n=this.getDimensions,r=await n(t.floating);return{reference:oF(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lF(t){return Nr(t).direction==="rtl"}const cF={convertOffsetParentRelativeRectToViewportRelativeRect:J$,getDocumentElement:as,getClippingRect:sF,getOffsetParent:u2,getElementRects:aF,getClientRects:Q$,getDimensions:iF,getScale:hl,isElement:_r,isRTL:lF};function d2(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function uF(t,e){let n=null,r;const s=as(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||e(),!f||!p)return;const g=Kd(d),m=Kd(s.clientWidth-(u+f)),y=Kd(s.clientHeight-(d+p)),b=Kd(u),x={rootMargin:-g+"px "+-m+"px "+-y+"px "+-b+"px",threshold:Nn(0,qi(1,l))||1};let k=!0;function S(E){const C=E[0].intersectionRatio;if(C!==l){if(!k)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!d2(c,t.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(S,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(t)}return o(!0),i}function dF(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=tw(t),u=s||i?[...c?Mu(c):[],...Mu(e)]:[];u.forEach(b=>{s&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const d=c&&a?uF(c,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let g,m=l?Jo(t):null;l&&y();function y(){const b=Jo(t);m&&!d2(m,b)&&n(),m=b,g=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach(w=>{s&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(b=p)==null||b.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const hF=D$,fF=L$,pF=j$,mF=F$,gF=M$,Tk=P$,yF=$$,vF=(t,e,n)=>{const r=new Map,s={platform:cF,...n},i={...s.platform,_c:r};return O$(t,e,{...s,platform:i})};var bF=typeof document<"u",wF=function(){},Ph=bF?v.useLayoutEffect:wF;function xf(t,e){if(t===e)return!0;
vendor: 13,830 bytes, line 331
331if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!xf(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!xf(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function h2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function _k(t,e){const n=h2(t);return Math.round(e*n)/n}function Cg(t){const e=v.useRef(t);return Ph(()=>{e.current=t}),e}function xF(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=v.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);xf(f,r)||p(r);const[g,m]=v.useState(null),[y,b]=v.useState(null),w=v.useCallback(O=>{O!==E.current&&(E.current=O,m(O))},[]),x=v.useCallback(O=>{O!==C.current&&(C.current=O,b(O))},[]),k=i||g,S=o||y,E=v.useRef(null),C=v.useRef(null),A=v.useRef(u),N=l!=null,M=Cg(l),F=Cg(s),P=Cg(c),V=v.useCallback(()=>{if(!E.current||!C.current)return;const O={placement:e,strategy:n,middleware:f};F.current&&(O.platform=F.current),vF(E.current,C.current,O).then(R=>{const K={...R,isPositioned:P.current!==!1};_.current&&!xf(A.current,K)&&(A.current=K,ua.flushSync(()=>{d(K)}))})},[f,e,n,F,P]);Ph(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[c]);const _=v.useRef(!1);Ph(()=>(_.current=!0,()=>{_.current=!1}),[]),Ph(()=>{if(k&&(E.current=k),S&&(C.current=S),k&&S){if(M.current)return M.current(k,S,V);V()}},[k,S,V,M,N]);const H=v.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:x}),[w,x]),B=v.useMemo(()=>({reference:k,floating:S}),[k,S]),$=v.useMemo(()=>{const O={position:n,left:0,top:0};if(!B.floating)return O;const R=_k(B.floating,u.x),K=_k(B.floating,u.y);return a?{...O,transform:"translate("+R+"px, "+K+"px)",...h2(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:K}},[n,a,B.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:V,refs:H,elements:B,floatingStyles:$}),[u,V,H,B,$])}const kF=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Tk({element:r.current,padding:s}).fn(n):{}:r?Tk({element:r,padding:s}).fn(n):{}}}},SF=(t,e)=>({...hF(t),options:[t,e]}),CF=(t,e)=>({...fF(t),options:[t,e]}),EF=(t,e)=>({...yF(t),options:[t,e]}),AF=(t,e)=>({...pF(t),options:[t,e]}),TF=(t,e)=>({...mF(t),options:[t,e]}),_F=(t,e)=>({...gF(t),options:[t,e]}),NF=(t,e)=>({...kF(t),options:[t,e]});var IF="Arrow",f2=v.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return h.jsx(ke.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});f2.displayName=IF;var OF=f2;function rw(t){const[e,n]=v.useState(void 0);return qt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var sw="Popper",[p2,nc]=sr(sw),[PF,m2]=p2(sw),g2=t=>{const{__scopePopper:e,children:n}=t,[r,s]=v.useState(null);return h.jsx(PF,{scope:e,anchor:r,onAnchorChange:s,children:n})};g2.displayName=sw;var y2="PopperAnchor",v2=v.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=m2(y2,n),o=v.useRef(null),a=$e(e,o);return v.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:h.jsx(ke.div,{...s,ref:a})});v2.displayName=y2;var iw="PopperContent",[jF,MF]=p2(iw),b2=v.forwardRef((t,e)=>{var D,be,De,pe,fe,Ce;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=t,y=m2(iw,n),[b,w]=v.useState(null),x=$e(e,nt=>w(nt)),[k,S]=v.useState(null),E=rw(k),C=(E==null?void 0:E.width)??0,A=(E==null?void 0:E.height)??0,N=r+(i!=="center"?"-"+i:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},F=Array.isArray(c)?c:[c],P=F.length>0,V={padding:M,boundary:F.filter(DF),altBoundary:P},{refs:_,floatingStyles:H,placement:B,isPositioned:$,middlewareData:O}=xF({strategy:"fixed",placement:N,whileElementsMounted:(...nt)=>dF(...nt,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[SF({mainAxis:s+A,alignmentAxis:o}),l&&CF({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?EF():void 0,...V}),l&&AF({...V}),TF({...V,apply:({elements:nt,rects:Pt,availableWidth:jr,availableHeight:Mr})=>{const{width:ls,height:ya}=Pt.reference,cs=nt.floating.style;cs.setProperty("--radix-popper-available-width",`${jr}px`),cs.setProperty("--radix-popper-available-height",`${Mr}px`),cs.setProperty("--radix-popper-anchor-width",`${ls}px`),cs.setProperty("--radix-popper-anchor-height",`${ya}px`)}}),k&&NF({element:k,padding:a}),LF({arrowWidth:C,arrowHeight:A}),f&&_F({strategy:"referenceHidden",...V})]}),[R,K]=k2(B),de=rr(g);qt(()=>{$&&(de==null||de())},[$,de]);const se=(D=O.arrow)==null?void 0:D.x,ae=(be=O.arrow)==null?void 0:be.y,he=((De=O.arrow)==null?void 0:De.centerOffset)!==0,[Y,re]=v.useState();return qt(()=>{b&&re(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(pe=O.transformOrigin)==null?void 0:pe.x,(fe=O.transformOrigin)==null?void 0:fe.y].join(" "),...((Ce=O.hide)==null?void 0:Ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(jF,{scope:n,placedSide:R,onArrowChange:S,arrowX:se,arrowY:ae,shouldHideArrow:he,children:h.jsx(ke.div,{"data-side":R,"data-align":K,...m,ref:x,style:{...m.style,animation:$?void 0:"none"}})})})});b2.displayName=iw;var w2="PopperArrow",RF={top:"bottom",right:"left",bottom:"top",left:"right"},x2=v.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=MF(w2,r),o=RF[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsx(OF,{...s,ref:n,style:{...s.style,display:"block"}})})});x2.displayName=w2;function DF(t){return t!==null}var LF=t=>({name:"transformOrigin",options:t,fn(e){var y,b,w;const{placement:n,rects:r,middlewareData:s}=e,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=k2(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((b=s.arrow)==null?void 0:b.x)??0)+a/2,p=(((w=s.arrow)==null?void 0:w.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=o?d:`${f}px`,m=`${-l}px`):c==="top"?(g=o?d:`${f}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=o?d:`${p}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=o?d:`${p}px`),{data:{x:g,y:m}}}});function k2(t){const[e,n="center"]=t.split("-");return[e,n]}var S2=g2,Xp=v2,ow=b2,aw=x2,[em,hee]=sr("Tooltip",[nc]),lw=nc(),C2="TooltipProvider",$F=700,Nk="tooltip.open",[FF,E2]=em(C2),A2=t=>{const{__scopeTooltip:e,delayDuration:n=$F,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),h.jsx(FF,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};A2.displayName=C2;var T2="Tooltip",[fee,tm]=em(T2),Nv="TooltipTrigger",zF=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=tm(Nv,n),i=E2(Nv,n),o=lw(n),a=v.useRef(null),l=$e(e,a,s.onTriggerChange),c=v.useRef(!1),u=v.useRef(!1),d=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(Xp,{asChild:!0,...o,children:h.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ge(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ge(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ge(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ge(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:ge(t.onBlur,s.onClose),onClick:ge(t.onClick,s.onClose)})})});zF.displayName=Nv;var UF="TooltipPortal",[pee,BF]=em(UF,{forceMount:void 0}),Ml="TooltipContent",_2=v.forwardRef((t,e)=>{const n=BF(Ml,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=tm(Ml,t.__scopeTooltip);return h.jsx(is,{present:r||o.open,children:o.disableHoverableContent?h.jsx(N2,{side:s,...i,ref:e}):h.jsx(VF,{side:s,...i,ref:e})})}),VF=v.forwardRef((t,e)=>{const n=tm(Ml,t.__scopeTooltip),r=E2(Ml,t.__scopeTooltip),s=v.useRef(null),i=$e(e,s),[o,a]=v.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:d}=r,f=v.useCallback(()=>{a(null),d(!1)},[d]),p=v.useCallback((g,m)=>{const y=g.currentTarget,b={x:g.clientX,y:g.clientY},w=KF(b,y.getBoundingClientRect()),x=ZF(b,w),k=YF(m.getBoundingClientRect()),S=QF([...x,...k]);a(S),d(!0)},[d]);return v.useEffect(()=>()=>f(),[f]),v.useEffect(()=>{if(l&&u){const g=y=>p(y,u),m=y=>p(y,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,p,f]),v.useEffect(()=>{if(o){const g=m=>{const y=m.target,b={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(y))||(u==null?void 0:u.contains(y)),x=!JF(b,o);w?f():x&&(f(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,o,c,f]),h.jsx(N2,{...t,ref:i})}),[HF,WF]=em(T2,{isInside:!1}),qF=f_("TooltipContent"),N2=v.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=tm(Ml,n),c=lw(n),{onClose:u}=l;return v.useEffect(()=>(document.addEventListener(Nk,u),()=>document.removeEventListener(Nk,u)),[u]),v.useEffect(()=>{if(l.trigger){const d=f=>{const p=f.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),h.jsx(Ql,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:h.jsxs(ow,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(qF,{children:r}),h.jsx(HF,{scope:n,isInside:!0,children:h.jsx(Q4,{id:l.contentId,role:"tooltip",children:s||r})})]})})});_2.displayName=Ml;var I2="TooltipArrow",GF=v.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=lw(n);return WF(I2,n).isInside?null:h.jsx(aw,{...s,...r,ref:e})});GF.displayName=I2;function KF(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ZF(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function YF(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function JF(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>r!=f>r&&n<(d-c)*(r-u)/(f-u)+c&&(s=!s)}return s}function QF(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XF(e)}function XF(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var e6=A2,O2=_2;const t6=e6,n6=v.forwardRef(({className:t,sideOffset:e=4,...n},r)=>
vendor: 23,560 bytes, line 331
331h.jsx(O2,{ref:r,sideOffset:e,className:ee("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",t),...n}));n6.displayName=O2.displayName;var nm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},rm=typeof window>"u"||"Deno"in globalThis;function pr(){}function r6(t,e){return typeof t=="function"?t(e):t}function s6(t){return typeof t=="number"&&t>=0&&t!==1/0}function i6(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Iv(t,e){return typeof t=="function"?t(e):t}function o6(t,e){return typeof t=="function"?t(e):t}function Ik(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==cw(o,e.options))return!1}else if(!Du(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Ok(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Ru(e.options.mutationKey)!==Ru(i))return!1}else if(!Du(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function cw(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ru)(t)}function Ru(t){return JSON.stringify(t,(e,n)=>Ov(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Du(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Du(t[n],e[n])):!1}function P2(t,e){if(t===e)return t;const n=Pk(t)&&Pk(e);if(n||Ov(t)&&Ov(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const d=n?u:i[u];(!n&&l.has(d)||n)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=P2(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function Pk(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ov(t){if(!jk(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!jk(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function jk(t){return Object.prototype.toString.call(t)==="[object Object]"}function a6(t){return new Promise(e=>{setTimeout(e,t)})}function l6(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?P2(t,e):e}function c6(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function u6(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var uw=Symbol();function j2(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===uw?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Oo,gi,vl,LE,d6=(LE=class extends nm{constructor(){super();Ue(this,Oo);Ue(this,gi);Ue(this,vl);_e(this,vl,e=>{if(!rm&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,gi)||this.setEventListener(z(this,vl))}onUnsubscribe(){var e;this.hasListeners()||((e=z(this,gi))==null||e.call(this),_e(this,gi,void 0))}setEventListener(e){var n;_e(this,vl,e),(n=z(this,gi))==null||n.call(this),_e(this,gi,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){z(this,Oo)!==e&&(_e(this,Oo,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof z(this,Oo)=="boolean"?z(this,Oo):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Oo=new WeakMap,gi=new WeakMap,vl=new WeakMap,LE),M2=new d6,bl,yi,wl,$E,h6=($E=class extends nm{constructor(){super();Ue(this,bl,!0);Ue(this,yi);Ue(this,wl);_e(this,wl,e=>{if(!rm&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){z(this,yi)||this.setEventListener(z(this,wl))}onUnsubscribe(){var e;this.hasListeners()||((e=z(this,yi))==null||e.call(this),_e(this,yi,void 0))}setEventListener(e){var n;_e(this,wl,e),(n=z(this,yi))==null||n.call(this),_e(this,yi,e(this.setOnline.bind(this)))}setOnline(e){z(this,bl)!==e&&(_e(this,bl,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return z(this,bl)}},bl=new WeakMap,yi=new WeakMap,wl=new WeakMap,$E),kf=new h6;function f6(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function p6(t){return Math.min(1e3*2**t,3e4)}function R2(t){return(t??"online")==="online"?kf.isOnline():!0}var D2=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Eg(t){return t instanceof D2}function L2(t){let e=!1,n=0,r=!1,s;const i=f6(),o=m=>{var y;r||(f(new D2(m)),(y=t.abort)==null||y.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>M2.isFocused()&&(t.networkMode==="always"||kf.isOnline())&&t.canRun(),u=()=>R2(t.networkMode)&&t.canRun(),d=m=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,m),s==null||s(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var y;s=b=>{(r||c())&&m(b)},(y=t.onPause)==null||y.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),g=()=>{if(r)return;let m;const y=n===0?t.initialPromise:void 0;try{m=y??t.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{var E;if(r)return;const w=t.retry??(rm?0:3),x=t.retryDelay??p6,k=typeof x=="function"?x(n,b):x,S=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(e||!S){f(b);return}n++,(E=t.onFail)==null||E.call(t,n,b),a6(k).then(()=>c()?void 0:p()).then(()=>{e?f(b):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():p().then(g),i)}}var m6=t=>setTimeout(t,0);function g6(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=m6;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var an=g6(),Po,FE,$2=(FE=class{constructor(){Ue(this,Po)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),s6(this.gcTime)&&_e(this,Po,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(rm?1/0:5*60*1e3))}clearGcTimeout(){z(this,Po)&&(clearTimeout(z(this,Po)),_e(this,Po,void 0))}},Po=new WeakMap,FE),xl,jo,Bn,Mo,Yt,ed,Ro,mr,vs,zE,y6=(zE=class extends $2{constructor(e){super();Ue(this,mr);Ue(this,xl);Ue(this,jo);Ue(this,Bn);Ue(this,Mo);Ue(this,Yt);Ue(this,ed);Ue(this,Ro);_e(this,Ro,!1),_e(this,ed,e.defaultOptions),this.setOptions(e.options),this.observers=[],_e(this,Mo,e.client),_e(this,Bn,z(this,Mo).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,_e(this,xl,b6(this.options)),this.state=e.state??z(this,xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=z(this,Yt))==null?void 0:e.promise}setOptions(e){this.options={...z(this,ed),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Bn).remove(this)}setData(e,n){const r=l6(this.state.data,e,this.options);return Gt(this,mr,vs).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Gt(this,mr,vs).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=z(this,Yt))==null?void 0:r.promise;return(s=z(this,Yt))==null||s.cancel(e),n?n.then(pr).catch(pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,xl))}isActive(){return this.observers.some(e=>o6(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Iv(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!i6(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=z(this,Yt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=z(this,Yt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),z(this,Bn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(z(this,Yt)&&(z(this,Ro)?z(this,Yt).cancel({revert:!0}):z(this,Yt).cancelRetry()),this.scheduleGc()),z(this,Bn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Gt(this,mr,vs).call(this,{type:"invalidate"})}fetch(e,n){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,Yt))return z(this,Yt).continueRetry(),z(this,Yt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(_e(this,Ro,!0),r.signal)})},i=()=>{const f=j2(this.options,n),g=(()=>{const m={client:z(this,Mo),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return _e(this,Ro,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,Mo),state:this.state,fetchFn:i};return s(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),_e(this,jo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&Gt(this,mr,vs).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var p,g,m,y;Eg(f)&&f.silent||Gt(this,mr,vs).call(this,{type:"error",error:f}),Eg(f)||((g=(p=z(this,Bn).config).onError)==null||g.call(p,f,this),(y=(m=z(this,Bn).config).onSettled)==null||y.call(m,this.state.data,f,this)),this.scheduleGc()};return _e(this,Yt,L2({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,g,m,y;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){l(b);return}(g=(p=z(this,Bn).config).onSuccess)==null||g.call(p,f,this),(y=(m=z(this,Bn).config).onSettled)==null||y.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,p)=>{Gt(this,mr,vs).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{Gt(this,mr,vs).call(this,{type:"pause"})},onContinue:()=>{Gt(this,mr,vs).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),z(this,Yt).start()}},xl=new WeakMap,jo=new WeakMap,Bn=new WeakMap,Mo=new WeakMap,Yt=new WeakMap,ed=new WeakMap,Ro=new WeakMap,mr=new WeakSet,vs=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...v6(r.data,this.options),fetchMeta:e.meta??null};case"success":return _e(this,jo,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return Eg(s)&&s.revert&&z(this,jo)?{...z(this,jo),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),an.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),z(this,Bn).notify({query:this,type:"updated",action:e})})},zE);function v6(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:R2(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function b6(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Hr,UE,w6=(UE=class extends nm{constructor(e={}){super();Ue(this,Hr);this.config=e,_e(this,Hr,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??cw(s,n);let o=this.get(i);return o||(o=new y6({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){z(this,Hr).has(e.queryHash)||(z(this,Hr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=z(this,Hr).get(e.queryHash);n&&(e.destroy(),n===e&&z(this,Hr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){an.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return z(this,Hr).get(e)}getAll(){return[...z(this,Hr).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ik(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Ik(e,r)):n}notify(e){an.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){an.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){an.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Hr=new WeakMap,UE),Wr,rn,Do,qr,Xs,BE,x6=(BE=class extends $2{constructor(e){super();Ue(this,qr);Ue(this,Wr);Ue(this,rn);Ue(this,Do);this.mutationId=e.mutationId,_e(this,rn,e.mutationCache),_e(this,Wr,[]),this.state=e.state||k6(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){z(this,Wr).includes(e)||(z(this,Wr).push(e),this.clearGcTimeout(),z(this,rn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){_e(this,Wr,z(this,Wr).filter(n=>n!==e)),this.scheduleGc(),z(this,rn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){z(this,Wr).length||(this.state.status==="pending"?this.scheduleGc():z(this,rn).remove(this))}continue(){var e;return((e=z(this,Do))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,d,f,p,g,m,y,b,w,x,k,S,E,C,A;const n=()=>{Gt(this,qr,Xs).call(this,{type:"continue"})};_e(this,Do,L2({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(N,M)=>{Gt(this,qr,Xs).call(this,{type:"failed",failureCount:N,error:M})},onPause:()=>{Gt(this,qr,Xs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,rn).canRun(this)}));const r=this.state.status==="pending",s=!z(this,Do).canStart();try{if(r)n();else{Gt(this,qr,Xs).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=z(this,rn).config).onMutate)==null?void 0:o.call(i,e,this));const M=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));M!==this.state.context&&Gt(this,qr,Xs).call(this,{type:"pending",context:M,variables:e,isPaused:s})}const N=await z(this,Do).start();return await((u=(c=z(this,rn).config).onSuccess)==null?void 0:u.call(c,N,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,N,e,this.state.context)),await((g=(p=z(this,rn).config).onSettled)==null?void 0:g.call(p,N,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,N,null,e,this.state.context)),Gt(this,qr,Xs).call(this,{type:"success",data:N}),N}catch(N){try{throw await((w=(b=z(this,rn).config).onError)==null?void 0:w.call(b,N,e,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,N,e,this.state.context)),await((E=(S=z(this,rn).config).onSettled)==null?void 0:E.call(S,void 0,N,this.state.variables,this.state.context,this)),await((A=(C=this.options).onSettled)==null?void 0:A.call(C,void 0,N,e,this.state.context)),N}finally{Gt(this,qr,Xs).call(this,{type:"error",error:N})}}finally{z(this,rn).runNext(this)}}},Wr=new WeakMap,rn=new WeakMap,Do=new WeakMap,qr=new WeakSet,Xs=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),an.batch(()=>{z(this,Wr).forEach(r=>{r.onMutationUpdate(e)}),z(this,rn).notify({mutation:this,type:"updated",action:e})})},BE);function k6(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Es,gr,td,VE,S6=(VE=class extends nm{constructor(e={}){super();Ue(this,Es);Ue(this,gr);Ue(this,td);this.config=e,_e(this,Es,new Set),_e(this,gr,new Map),_e(this,td,0)}build(e,n,r){const s=new x6({mutationCache:this,mutationId:++Ad(this,td)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){z(this,Es).add(e);const n=Zd(e);if(typeof n=="string"){const r=z(this,gr).get(n);r?r.push(e):z(this,gr).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(z(this,Es).delete(e)){const n=Zd(e);if(typeof n=="string"){const r=z(this,gr).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&z(this,gr).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Zd(e);if(typeof n=="string"){const r=z(this,gr).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Zd(e);if(typeof n=="string"){const s=(r=z(this,gr).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){an.batch(()=>{z(this,Es).forEach(e=>{this.notify({type:"removed",mutation:e})}),z(this,Es).clear(),z(this,gr).clear()})}getAll(){return Array.from(z(this,Es))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ok(n,r))}findAll(e={}){return this.getAll().filter(n=>Ok(e,n))}notify(e){an.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return an.batch(()=>Promise.all(e.map(n=>n.continue().catch(pr))))}},Es=new WeakMap,gr=new WeakMap,td=new WeakMap,VE);function Zd(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Mk(t){return{onFetch:(e,n)=>{var u,d,f,p,g;const r=e.options,s=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=e.state.data)==null?void 0:p.pages)||[],o=((g=e.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},b=j2(e.options,e.fetchOptions),w=async(x,k,S)=>{if(m)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const C=(()=>{const F={client:e.client,queryKey:e.queryKey,pageParam:k,direction:S?"backward":"forward",meta:e.options.meta};return y(F),F})(),A=await b(C),{maxPages:N}=e.options,M=S?u6:c6;return{pages:M(x.pages,A,N),pageParams:M(x.pageParams,k,N)}};if(s&&i.length){const x=s==="backward",k=x?C6:Rk,S={pages:i,pageParams:o},E=k(r,S);a=await w(S,E,x)}else{const x=t??i.length;do{const k=l===0?o[0]??r.initialPageParam:Rk(r,a);if(l>0&&k==null)break;a=await w(a,k),l++}while(l<x)}return a};e.options.persister?e.fetchFn=()=>{var m,y;return(y=(m=e.options).persister)==null?void 0:y.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function Rk(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function C6(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var dt,vi,bi,kl,Sl,wi,Cl,El,HE,E6=(HE=class{constructor(t={}){Ue(this,dt);Ue(this,vi);Ue(this,bi);Ue(this,kl);Ue(this,Sl);Ue(this,wi);Ue(this,Cl);Ue(this,El);_e(this,dt,t.queryCache||new w6),_e(this,vi,t.mutationCache||new S6),_e(this,bi,t.defaultOptions||{}),_e(this,kl,new Map),_e(this,Sl,new Map),_e(this,wi,0)}mount(){Ad(this,wi)._++,z(this,wi)===1&&(_e(this,Cl,M2.subscribe(async t=>{t&&(await this.resumePausedMutations(),z(this,dt).onFocus())})),_e(this,El,kf.subscribe(async t=>{t&&(await this.resumePausedMutations(),z(this,dt).onOnline())})))}unmount(){var t,e;Ad(this,wi)._--,z(this,wi)===0&&((t=z(this,Cl))==null||t.call(this),_e(this,Cl,void 0),(e=z(this,El))==null||e.call(this),_e(this,El,void 0))}isFetching(t){return z(this,dt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return z(this,vi).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=z(this,dt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=z(this,dt).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Iv(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return z(this,dt).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=z(this,dt).get(r.queryHash),i=s==null?void 0:s.state.data,o=r6(e,i);if(o!==void 0)return z(this,dt).build(this,r).setData(o,{...n,manual:!0})}
331setQueriesData(t,e,n){return an.batch(()=>z(this,dt).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=z(this,dt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=z(this,dt);an.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=z(this,dt);return an.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=an.batch(()=>z(this,dt).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(pr).catch(pr)}invalidateQueries(t,e={}){return an.batch(()=>(z(this,dt).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=an.batch(()=>z(this,dt).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(pr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(pr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=z(this,dt).build(this,e);return n.isStaleByTime(Iv(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(pr).catch(pr)}fetchInfiniteQuery(t){return t.behavior=Mk(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(pr).catch(pr)}ensureInfiniteQueryData(t){return t.behavior=Mk(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return kf.isOnline()?z(this,vi).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,dt)}getMutationCache(){return z(this,vi)}getDefaultOptions(){return z(this,bi)}setDefaultOptions(t){_e(this,bi,t)}setQueryDefaults(t,e){z(this,kl).set(Ru(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...z(this,kl).values()],n={};return e.forEach(r=>{Du(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){z(this,Sl).set(Ru(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...z(this,Sl).values()],n={};return e.forEach(r=>{Du(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...z(this,bi).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=cw(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===uw&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...z(this,bi).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){z(this,dt).clear(),z(this,vi).clear()}},dt=new WeakMap,vi=new WeakMap,bi=new WeakMap,kl=new WeakMap,Sl=new WeakMap,wi=new WeakMap,Cl=new WeakMap,El=new WeakMap,HE),A6=v.createContext(void 0),T6=({client:t,children:e})=>(v.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),h.jsx(A6.Provider,{value:t,children:e}));/** 332 * @remix-run/router v1.23.0 333 * 334 * Copyright (c) Remix Software Inc. 335 * 336 * This source code is licensed under the MIT license found in the 337 * LICENSE.md file in the root directory of this source tree. 338 * 339 * @license MIT 340 */function Lu(){return Lu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lu.apply(this,arguments)}var Si;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Si||(Si={}));const Dk="popstate";function _6(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return Pv("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Sf(s)}return I6(e,n,null,t)}function vt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function F2(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function N6(){return Math.random().toString(36).substr(2,8)}function Lk(t,e){return{usr:t.state,key:t.key,idx:e}}function Pv(t,e,n,r){return n===void 0&&(n=null),Lu({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?rc(e):e,{state:n,key:e&&e.key||r||N6()})}function Sf(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function rc(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function I6(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Si.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Lu({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Si.Pop;let y=u(),b=y==null?null:y-c;c=y,l&&l({action:a,location:m.location,delta:b})}function f(y,b){a=Si.Push;let w=Pv(m.location,y,b);c=u()+1;let x=Lk(w,c),k=m.createHref(w);try{o.pushState(x,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(k)}i&&l&&l({action:a,location:m.location,delta:1})}function p(y,b){a=Si.Replace;let w=Pv(m.location,y,b);c=u();let x=Lk(w,c),k=m.createHref(w);o.replaceState(x,"",k),i&&l&&l({action:a,location:m.location,delta:0})}function g(y){let b=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof y=="string"?y:Sf(y);return w=w.replace(/ $/,"%20"),vt(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let m={get action(){return a},get location(){return t(s,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");
vendor: 2,650 bytes, line 340
340return s.addEventListener(Dk,d),l=y,()=>{s.removeEventListener(Dk,d),l=null}},createHref(y){return e(s,y)},createURL:g,encodeLocation(y){let b=g(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(y){return o.go(y)}};return m}var $k;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})($k||($k={}));function O6(t,e,n){return n===void 0&&(n="/"),P6(t,e,n,!1)}function P6(t,e,n,r){let s=typeof e=="string"?rc(e):e,i=dw(s.pathname||"/",n);if(i==null)return null;let o=z2(t);j6(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=H6(i);a=B6(o[l],c,r)}return a}function z2(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(vt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Di([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(vt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),z2(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:z6(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of U2(i.path))s(i,o,l)}),e}function U2(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=U2(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function j6(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:U6(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const M6=/^:[\w-]+$/,R6=3,D6=2,L6=1,$6=10,F6=-2,Fk=t=>t==="*";function z6(t,e){let n=t.split("/"),r=n.length;return n.some(Fk)&&(r+=F6),e&&(r+=D6),n.filter(s=>!Fk(s)).reduce((s,i)=>s+(M6.test(i)?R6:i===""?L6:$6),r)}function U6(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function B6(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=zk({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=zk({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 6,917 bytes, lines 340-349
340Object.assign(s,d.params),o.push({params:s,pathname:Di([i,d.pathname]),pathnameBase:K6(Di([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Di([i,d.pathnameBase]))}return o}function zk(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=V6(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:f,isOptional:p}=u;if(f==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[d];return p&&!g?c[f]=void 0:c[f]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function V6(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),F2(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function H6(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return F2(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function dw(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function W6(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?rc(t):t;return{pathname:n?n.startsWith("/")?n:q6(n,e):e,search:Z6(r),hash:Y6(s)}}function q6(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Ag(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function G6(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function hw(t,e){let n=G6(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function fw(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=rc(t):(s=Lu({},t),vt(!s.pathname||!s.pathname.includes("?"),Ag("?","pathname","search",s)),vt(!s.pathname||!s.pathname.includes("#"),Ag("#","pathname","hash",s)),vt(!s.search||!s.search.includes("#"),Ag("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=W6(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Di=t=>t.join("/").replace(/\/\/+/g,"/"),K6=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Z6=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Y6=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function J6(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const B2=["post","put","patch","delete"];new Set(B2);const Q6=["get",...B2];new Set(Q6);/** 341 * React Router v6.30.1 342 * 343 * Copyright (c) Remix Software Inc. 344 * 345 * This source code is licensed under the MIT license found in the 346 * LICENSE.md file in the root directory of this source tree. 347 * 348 * @license MIT 349 */function $u(){return $u=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$u.apply(this,arguments)}const pw=v.createContext(null),X6=v.createContext(null),to=v.createContext(null),sm=v.createContext(null),Us=v.createContext({outlet:null,matches:[],isDataRoute:!1}),V2=v.createContext(null);function ez(t,e){let{relative:n}=e===void 0?{}:e;sc()||vt(!1);let{basename:r,navigator:s}=v.useContext(to),{hash:i,pathname:o,search:a}=q2(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Di([r,o])),s.createHref({pathname:l,search:a,hash:i})}function sc(){return v.useContext(sm)!=null}function da(){return sc()||vt(!1),v.useContext(sm).location}function H2(t){v.useContext(to).static||v.useLayoutEffect(t)}function ha(){let{isDataRoute:t}=v.useContext(Us);return t?fz():tz()}function tz(){sc()||vt(!1);let t=v.useContext(pw),{basename:e,future:n,navigator:r}=v.useContext(to),{matches:s}=v.useContext(Us),{pathname:i}=da(),o=JSON.stringify(hw(s,n.v7_relativeSplatPath)),a=v.useRef(!1);return H2(()=>{a.current=!0}),v.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=fw(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Di([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,o,i,t])}function W2(){let{matches:t}=v.useContext(Us),e=t[t.length-1];return e?e.params:{}}function q2(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=v.useContext(to),{matches:s}=v.useContext(Us),{pathname:i}=da(),o=JSON.stringify(hw(s,r.v7_relativeSplatPath));return v.useMemo(()=>fw(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function nz(t,e){return rz(t,e)}function rz(t,e,n,r){sc()||vt(!1);let{navigator:s}=v.useContext(to),{matches:i}=v.useContext(Us),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=da(),u;if(e){var d;let y=typeof e=="string"?rc(e):e;l==="/"||(d=y.pathname)!=null&&d.startsWith(l)||vt(!1),u=y}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=O6(t,{pathname:p}),m=lz(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Di([l,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:Di([l,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return e&&m?v.createElement(sm.Provider,{value:{location:$u({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Si.Pop}},m):m}function sz(){let t=hz(),e=J6(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application
349Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},e),n?v.createElement("pre",{style:s},n):null,null)}const iz=v.createElement(sz,null);class oz extends v.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?v.createElement(Us.Provider,{value:this.props.routeContext},v.createElement(V2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function az(t){let{routeContext:e,match:n,children:r}=t,s=v.useContext(pw);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Us.Provider,{value:e},r)}function lz(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||vt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:p}=n,g=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||g){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let p,g=!1,m=null,y=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||iz,l&&(c<0&&f===0?(g=!0,y=null):c===f&&(g=!0,y=d.route.hydrateFallbackElement||null)));let b=e.concat(o.slice(0,f+1)),w=()=>{let x;return p?x=m:g?x=y:d.route.Component?x=v.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=u,v.createElement(az,{match:d,routeContext:{outlet:u,matches:b,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?v.createElement(oz,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var G2=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(G2||{}),Cf=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Cf||{});function cz(t){let e=v.useContext(pw);return e||vt(!1),e}function uz(t){let e=v.useContext(X6);return e||vt(!1),e}function dz(t){let e=v.useContext(Us);return e||vt(!1),e}function K2(t){let e=dz(),n=e.matches[e.matches.length-1];return n.route.id||vt(!1),n.route.id}function hz(){var t;let e=v.useContext(V2),n=uz(Cf.UseRouteError),r=K2(Cf.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function fz(){let{router:t}=cz(G2.UseNavigateStable),e=K2(Cf.UseNavigateStable),n=v.useRef(!1);return H2(()=>{n.current=!0}),v.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,$u({fromRouteId:e},i)))},[t,e])}function pz(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function mz(t){let{to:e,replace:n,state:r,relative:s}=t;sc()||vt(!1);let{future:i,static:o}=v.useContext(to),{matches:a}=v.useContext(Us),{pathname:l}=da(),c=ha(),u=fw(e,hw(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(u);return v.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function Fn(t){vt(!1)}function gz(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Si.Pop,navigator:i,static:o=!1,future:a}=t;sc()&&vt(!1);let l=e.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:i,static:o,future:$u({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=rc(r));
349let{pathname:u="/",search:d="",hash:f="",state:p=null,key:g="default"}=r,m=v.useMemo(()=>{let y=dw(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:g},navigationType:s}},[l,u,d,f,p,g,s]);return m==null?null:v.createElement(to.Provider,{value:c},v.createElement(sm.Provider,{children:n,value:m}))}function yz(t){let{children:e,location:n}=t;return nz(jv(e),n)}new Promise(()=>{});function jv(t,e){e===void 0&&(e=[]);let n=[];return v.Children.forEach(t,(r,s)=>{if(!v.isValidElement(r))return;let i=[...e,s];if(r.type===v.Fragment){n.push.apply(n,jv(r.props.children,i));return}r.type!==Fn&&vt(!1),!r.props.index||!r.props.children||vt(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=jv(r.props.children,i)),n.push(o)}),n}/** 350 * React Router DOM v6.30.1 351 * 352 * Copyright (c) Remix Software Inc. 353 * 354 * This source code is licensed under the MIT license found in the 355 * LICENSE.md file in the root directory of this source tree. 356 * 357 * @license MIT 358 */function Mv(){return Mv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mv.apply(this,arguments)}function vz(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function bz(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function wz(t,e){return t.button===0&&(!e||e==="_self")&&!bz(t)}function Rv(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function xz(t,e){let n=Rv(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const kz=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Sz="6";try{window.__reactRouterVersion=Sz}catch{}const Cz="startTransition",Uk=G0[Cz];function Ez(t){let{basename:e,children:n,future:r,window:s}=t,i=v.useRef();i.current==null&&(i.current=_6({window:s,v5Compat:!0}));let o=i.current,[a,l]=v.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=v.useCallback(d=>{c&&Uk?Uk(()=>l(d)):l(d)},[l,c]);return v.useLayoutEffect(()=>o.listen(u),[o,u]),v.useEffect(()=>pz(r),[r]),v.createElement(gz,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const Az=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yr=v.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,f=vz(e,kz),{basename:p}=v.useContext(to),g,m=!1;if(typeof c=="string"&&Tz.test(c)&&(g=c,Az))try{let x=new URL(window.location.href),k=c.startsWith("//")?new URL(x.protocol+c):new URL(c),S=dw(k.pathname,p);k.origin===x.origin&&S!=null?c=S+k.search+k.hash:m=!0}catch{}let y=ez(c,{relative:s}),b=_z(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function w(x){r&&r(x),x.defaultPrevented||b(x)}return v.createElement("a",Mv({},f,{href:g||y,onClick:m||i?r:w,ref:n,target:l}))});var Bk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Bk||(Bk={}));var Vk;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Vk||(Vk={}));function _z(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=ha(),c=da(),u=q2(t,{relative:o});return v.useCallback(d=>
358{if(wz(d,n)){d.preventDefault();let f=r!==void 0?r:Sf(c)===Sf(u);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,t,i,o,a])}function Nz(t){let e=v.useRef(Rv(t)),n=v.useRef(!1),r=da(),s=v.useMemo(()=>xz(r.search,n.current?null:e.current),[r.search]),i=ha(),o=v.useCallback((a,l)=>{const c=Rv(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}var Hk={},Iz="@vercel/analytics",Oz="1.5.0",Pz=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function Z2(){return typeof window<"u"}function Y2(){try{const t="production"}catch{}return"production"}function jz(t="auto"){if(t==="auto"){window.vam=Y2();return}window.vam=t}function Mz(){return(Z2()?window.vam:Y2())||"production"}function Dv(){return Mz()==="development"}function Rz(t){return t.scriptSrc?t.scriptSrc:Dv()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?`${t.basePath}/insights/script.js`:"/_vercel/insights/script.js"}function Dz(t={debug:!0}){var e;if(!Z2())return;jz(t.mode),Pz(),t.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",t.beforeSend));const n=Rz(t);if(document.head.querySelector(`script[src*="${n}"]`))return;const r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn=Iz+(t.framework?`/${t.framework}`:""),r.dataset.sdkv=Oz,t.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),t.endpoint?r.dataset.endpoint=t.endpoint:t.basePath&&(r.dataset.endpoint=`${t.basePath}/insights`),t.dsn&&(r.dataset.dsn=t.dsn),r.onerror=()=>{const s=Dv()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${s}`)},Dv()&&t.debug===!1&&(r.dataset.debug="false"),document.head.appendChild(r)}function Lz({route:t,path:e}){var n;(n=window.va)==null||n.call(window,"pageview",{route:t,path:e})}function $z(){if(!(typeof process>"u"||typeof Hk>"u"))return Hk.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function Fz(t){return v.useEffect(()=>{var e;t.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",t.beforeSend))},[t.beforeSend]),v.useEffect(()=>{Dz({framework:t.framework||"react",basePath:t.basePath??$z(),...t.route!==void 0&&{disableAutoTrack:!0},...t})},[]),v.useEffect(()=>{t.route&&t.path&&Lz({route:t.route,path:t.path})},[t.route,t.path]),null}const im=ud("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 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 hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),oe=v.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?N4:"button";return h.jsx(o,{className:ee(im({variant:e,size:n,className:t})),ref:i,...s})});oe.displayName="Button";const Wk=()=>{const{theme:t,setTheme:e}=t2(),[n,r]=v.useState(!1);return v.useEffect(()=>{r(!0)},[]),n?h.jsx(oe,{variant:"ghost",size:"icon",onClick:()=>e(t==="dark"?"light":"dark"),className:"[&_svg]:!size-6",children:t==="dark"?h.jsx(hk,{className:"h-6 w-6"}):h.jsx(B5,{className:"h-6 w-6"})}):h.jsx(oe,{variant:"ghost",size:"icon",className:"[&_svg]:!size-6",children:h.jsx(hk,{className:"h-6 w-6"})})};var Tg="focusScope.autoFocusOnMount",_g="focusScope.autoFocusOnUnmount",qk={bubbles:!1,cancelable:!0},zz="FocusScope",om=v.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=v.useState(null),c=rr(s),u=rr(i),d=v.useRef(null),f=$e(e,m=>l(m)),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let m=function(x){if(p.paused||!a)return;const k=x.target;a.contains(k)?d.current=k:ei(d.current,{select:!0})},y=function(x){if(p.paused||!a)return;const k=x.relatedTarget;k!==null&&(a.contains(k)||ei(d.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&ei(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),w.disconnect()}}},[r,a,p.paused]),v.useEffect(()=>{if(a){Kk.add(p);
vendor: 4,102 bytes, line 358
358const m=document.activeElement;if(!a.contains(m)){const b=new CustomEvent(Tg,qk);a.addEventListener(Tg,c),a.dispatchEvent(b),b.defaultPrevented||(Uz(qz(J2(a)),{select:!0}),document.activeElement===m&&ei(a))}return()=>{a.removeEventListener(Tg,c),setTimeout(()=>{const b=new CustomEvent(_g,qk);a.addEventListener(_g,u),a.dispatchEvent(b),b.defaultPrevented||ei(m??document.body,{select:!0}),a.removeEventListener(_g,u),Kk.remove(p)},0)}}},[a,c,u,p]);const g=v.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,b=document.activeElement;if(y&&b){const w=m.currentTarget,[x,k]=Bz(w);x&&k?!m.shiftKey&&b===k?(m.preventDefault(),n&&ei(x,{select:!0})):m.shiftKey&&b===x&&(m.preventDefault(),n&&ei(k,{select:!0})):b===w&&m.preventDefault()}},[n,r,p.paused]);return h.jsx(ke.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})});om.displayName=zz;function Uz(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(ei(r,{select:e}),document.activeElement!==n)return}function Bz(t){const e=J2(t),n=Gk(e,t),r=Gk(e.reverse(),t);return[n,r]}function J2(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Gk(t,e){for(const n of t)if(!Vz(n,{upTo:e}))return n}function Vz(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Hz(t){return t instanceof HTMLInputElement&&"select"in t}function ei(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Hz(t)&&e&&t.select()}}var Kk=Wz();function Wz(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Zk(t,e),t.unshift(e)},remove(e){var n;t=Zk(t,e),(n=t[0])==null||n.resume()}}}function Zk(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function qz(t){return t.filter(e=>e.tagName!=="A")}var Ng=0;function mw(){v.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Yk()),document.body.insertAdjacentElement("beforeend",t[1]??Yk()),Ng++,()=>{Ng===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ng--}},[])}function Yk(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Kr=function(){return Kr=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Kr.apply(this,arguments)};function Q2(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function Gz(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var jh="right-scroll-bar-position",Mh="width-before-scroll-bar",Kz="with-scroll-bars-hidden",Zz="--removed-body-scroll-bar-size";function Ig(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Yz(t,e){var n=v.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var Jz=typeof window<"u"?v.useLayoutEffect:v.useEffect,Jk=new WeakMap;function Qz(t,e){var n=Yz(null,function(r){return t.forEach(function(s){return Ig(s,r)})});return Jz(function(){var r=Jk.get(n);if(r){var s=new Set(r),i=new Set(t),o=n.current;
vendor: 4,196 bytes, lines 358-373
358s.forEach(function(a){i.has(a)||Ig(a,null)}),i.forEach(function(a){s.has(a)||Ig(a,o)})}Jk.set(n,t)},[t]),n}function Xz(t){return t}function eU(t,e){e===void 0&&(e=Xz);var n=[],r=!1,s={read:function(){if(r)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]:t},useMedium:function(i){var o=e(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function tU(t){t===void 0&&(t={});var e=eU(null);return e.options=Kr({async:!0,ssr:!1},t),e}var X2=function(t){var e=t.sideCar,n=Q2(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Kr({},n))};X2.isSideCarExport=!0;function nU(t,e){return t.useMedium(e),X2}var eN=tU(),Og=function(){},am=v.forwardRef(function(t,e){var n=v.useRef(null),r=v.useState({onScrollCapture:Og,onWheelCapture:Og,onTouchMoveCapture:Og}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,p=t.noRelative,g=t.noIsolation,m=t.inert,y=t.allowPinchZoom,b=t.as,w=b===void 0?"div":b,x=t.gapMode,k=Q2(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,E=Qz([n,e]),C=Kr(Kr({},k),s);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:eN,removeScrollBar:c,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?v.cloneElement(v.Children.only(a),Kr(Kr({},C),{ref:E})):v.createElement(w,Kr({},C,{className:l,ref:E}),a))});am.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};am.classNames={fullWidth:Mh,zeroRight:jh};var rU=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sU(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=rU();return e&&t.setAttribute("nonce",e),t}function iU(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function oU(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var aU=function(){var t=0,e=null;return{add:function(n){t==0&&(e=sU())&&(iU(e,n),oU(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},lU=function(){var t=aU();return function(e,n){v.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},tN=function(){var t=lU(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},cU={left:0,top:0,right:0,gap:0},Pg=function(t){return parseInt(t||"",10)||0},uU=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[Pg(n),Pg(r),Pg(s)]},dU=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return cU;var e=uU(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},hU=tN(),fl="data-scroll-locked",fU=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` 359 .`.concat(Kz,` { 360 overflow: hidden `).concat(r,`; 361 padding-right: `).concat(a,"px ").concat(r,`; 362 } 363 body[`).concat(fl,`] { 364 overflow: hidden `).concat(r,`; 365 overscroll-behavior: contain; 366 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 367 padding-left: `.concat(s,`px; 368 padding-top: `).concat(i,`px; 369 padding-right: `).concat(o,`px; 370 margin-left:0; 371 margin-top:0; 372 margin-right: `).concat(a,"px ").concat(r,`; 373 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
373")].filter(Boolean).join(""),` 374 } 375 376 .`).concat(jh,` { 377 right: `).concat(a,"px ").concat(r,`; 378 } 379 380 .`).concat(Mh,` { 381 margin-right: `).concat(a,"px ").concat(r,`; 382 } 383 384 .`).concat(jh," .").concat(jh,` { 385 right: 0 `).concat(r,`; 386 } 387 388 .`).concat(Mh," .").concat(Mh,` { 389 margin-right: 0 `).concat(r,`; 390 } 391 392 body[`).concat(fl,`] { 393 `).concat(Zz,": ").concat(a,`px; 394 } 395`)},Qk=function(){var t=parseInt(document.body.getAttribute(fl)||"0",10);return isFinite(t)?t:0},pU=function(){v.useEffect(function(){return document.body.setAttribute(fl,(Qk()+1).toString()),function(){var t=Qk()-1;t<=0?document.body.removeAttribute(fl):document.body.setAttribute(fl,t.toString())}},[])},mU=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;pU();var i=v.useMemo(function(){return dU(s)},[s]);return v.createElement(hU,{styles:fU(i,!e,s,n?"":"!important")})},Lv=!1;if(typeof window<"u")try{var Yd=Object.defineProperty({},"passive",{get:function(){return Lv=!0,!0}});window.addEventListener("test",Yd,Yd),window.removeEventListener("test",Yd,Yd)}catch{Lv=!1}var wa=Lv?{passive:!1}:!1,gU=function(t){return t.tagName==="TEXTAREA"},nN=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!gU(t)&&n[e]==="visible")},yU=function(t){return nN(t,"overflowY")},vU=function(t){return nN(t,"overflowX")},Xk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=rN(t,r);if(s){var i=sN(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bU=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},wU=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},rN=function(t,e){return t==="v"?yU(e):vU(e)},sN=function(t,e){return t==="v"?bU(e):wU(e)},xU=function(t,e){return t==="h"&&e==="rtl"?-1:1},kU=function(t,e,n,r,s){var i=xU(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,l=e.contains(a),c=!1,u=o>0,d=0,f=0;do{if(!a)break;var p=sN(t,a),g=p[0],m=p[1],y=p[2],b=m-y-i*g;(g||b)&&rN(t,a)&&(d+=b,f+=g);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(f)<1||!s))&&(c=!0),c},Jd=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},eS=function(t){return[t.deltaX,t.deltaY]},tS=function(t){return t&&"current"in t?t.current:t},SU=function(t,e){return t[0]===e[0]&&t[1]===e[1]},CU=function(t){return` 396 .block-interactivity-`.concat(t,` {pointer-events: none;} 397 .allow-interactivity-`).concat(t,` {pointer-events: all;} 398`)},EU=0,xa=[];function AU(t){var e=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),s=v.useState(EU++)[0],i=v.useState(tN)[0],o=v.useRef(t);v.useEffect(function(){o.current=t},[t]),v.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=Gz([t.lockRef.current],(t.shards||[]).map(tS),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=v.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var b=Jd(m),w=n.current,x="deltaX"in m?m.deltaX:w[0]-b[0],k="deltaY"in m?m.deltaY:w[1]-b[1],S,E=m.target,C=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var A=Xk(C,E);if(!A)return!0;if(A?S=C:(S=C==="v"?"h":"v",A=Xk(C,E)),!A)return!1;if(!r.current&&"changedTouches"in m&&(x||k)&&(r.current=S),!S)return!0;var N=r.current||S;return kU(N,y,m,N==="h"?x:k,!0)},[]),l=v.useCallback(function(m){var y=m;if(!(!xa.length||xa[xa.length-1]!==i)){var b="deltaY"in y?eS(y):Jd(y),w=e.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&SU(S.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}
vendor: 8,974 bytes, lines 398-402
398if(!w){var x=(o.current.shards||[]).map(tS).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=x.length>0?a(y,x[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),c=v.useCallback(function(m,y,b,w){var x={name:m,delta:y,target:b,should:w,shadowParent:TU(b)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(k){return k!==x})},1)},[]),u=v.useCallback(function(m){n.current=Jd(m),r.current=void 0},[]),d=v.useCallback(function(m){c(m.type,eS(m),m.target,a(m,t.lockRef.current))},[]),f=v.useCallback(function(m){c(m.type,Jd(m),m.target,a(m,t.lockRef.current))},[]);v.useEffect(function(){return xa.push(i),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,wa),document.addEventListener("touchmove",l,wa),document.addEventListener("touchstart",u,wa),function(){xa=xa.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,wa),document.removeEventListener("touchmove",l,wa),document.removeEventListener("touchstart",u,wa)}},[]);var p=t.removeScrollBar,g=t.inert;return v.createElement(v.Fragment,null,g?v.createElement(i,{styles:CU(s)}):null,p?v.createElement(mU,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function TU(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const _U=nU(eN,AU);var lm=v.forwardRef(function(t,e){return v.createElement(am,Kr({},t,{ref:e,sideCar:_U}))});lm.classNames=am.classNames;var NU=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ka=new WeakMap,Qd=new WeakMap,Xd={},jg=0,iN=function(t){return t&&(t.host||iN(t.parentNode))},IU=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=iN(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},OU=function(t,e,n,r){var s=IU(e,Array.isArray(t)?t:[t]);Xd[n]||(Xd[n]=new WeakMap);var i=Xd[n],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var p=f.getAttribute(r),g=p!==null&&p!=="false",m=(ka.get(f)||0)+1,y=(i.get(f)||0)+1;ka.set(f,m),i.set(f,y),o.push(f),m===1&&g&&Qd.set(f,!0),y===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return u(e),a.clear(),jg++,function(){o.forEach(function(d){var f=ka.get(d)-1,p=i.get(d)-1;ka.set(d,f),i.set(d,p),f||(Qd.has(d)||d.removeAttribute(r),Qd.delete(d)),p||d.removeAttribute(n)}),jg--,jg||(ka=new WeakMap,ka=new WeakMap,Qd=new WeakMap,Xd={})}},gw=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=NU(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),OU(r,s,n,"aria-hidden")):function(){return null}},cm="Dialog",[oN,aN]=sr(cm),[PU,Or]=oN(cm),lN=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=v.useRef(null),l=v.useRef(null),[c,u]=Ds({prop:r,defaultProp:s??!1,onChange:i,caller:cm});return h.jsx(PU,{scope:e,triggerRef:a,contentRef:l,contentId:Is(),titleId:Is(),descriptionId:Is(),open:c,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),modal:o,children:n})};lN.displayName=cm;var cN="DialogTrigger",uN=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Or(cN,n),i=$e(e,s.triggerRef);return h.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":bw(s.open),...r,ref:i,onClick:ge(t.onClick,s.onOpenToggle)})});uN.displayName=cN;var yw="DialogPortal",[jU,dN]=oN(yw,{forceMount:void 0}),hN=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Or(yw,e);return h.jsx(jU,{scope:e,forceMount:n,children:v.Children.map(r,o=>h.jsx(is,{present:n||i.open,children:h.jsx(ld,{asChild:!0,container:s,children:o})}))})};hN.displayName=yw;var Ef="DialogOverlay",fN=v.forwardRef((t,e)=>{const n=dN(Ef,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Or(Ef,t.__scopeDialog);return i.modal?h.jsx(is,{present:r||i.open,children:h.jsx(RU,{...s,ref:e})}):null});fN.displayName=Ef;var MU=Yo("DialogOverlay.RemoveScroll"),RU=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Or(Ef,n);return h.jsx(lm,{as:MU,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(ke.div,{"data-state":bw(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Qo="DialogContent",pN=v.forwardRef((t,e)=>{const n=dN(Qo,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Or(Qo,t.__scopeDialog);return h.jsx(is,{present:r||i.open,children:i.modal?h.jsx(DU,{...s,ref:e}):h.jsx(LU,{...s,ref:e})})});pN.displayName=Qo;var DU=v.forwardRef((t,e)=>{const n=Or(Qo,t.__scopeDialog),r=v.useRef(null),s=$e(e,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return gw(i)},[]),h.jsx(mN,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ge(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ge(t.onFocusOutside,i=>i.preventDefault())})}),LU=v.forwardRef((t,e)=>{const n=Or(Qo,t.__scopeDialog),r=v.useRef(!1),s=v.useRef(!1);return h.jsx(mN,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),mN=v.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Or(Qo,n),l=v.useRef(null),c=$e(e,l);return mw(),h.jsxs(h.Fragment,{children:[h.jsx(om,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(Ql,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":bw(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(FU,{titleId:a.titleId}),h.jsx(UU,{contentRef:l,descriptionId:a.descriptionId})]})]})}),vw="DialogTitle",gN=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Or(vw,n);return h.jsx(ke.h2,{id:s.titleId,...r,ref:e})});gN.displayName=vw;var yN="DialogDescription",vN=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Or(yN,n);return h.jsx(ke.p,{id:s.descriptionId,...r,ref:e})});vN.displayName=yN;var bN="DialogClose",wN=v.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Or(bN,n);return h.jsx(ke.button,{type:"button",...r,ref:e,onClick:ge(t.onClick,()=>s.onOpenChange(!1))})});wN.displayName=bN;function bw(t){return t?"open":"closed"}var xN="DialogTitleWarning",[$U,kN]=T4(xN,{contentName:Qo,titleName:vw,docsSlug:"dialog"}),FU=({titleId:t})=>{const e=kN(xN),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 399 400If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 401 402For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return v.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},zU="DialogDescriptionWarning",UU=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kN(zU).contentName}}.`;return v.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},SN=lN,CN=uN,EN=hN,ww=fN,xw=pN,kw=gN,Sw=vN,Cw=wN;const Rh=SN,BU=CN,VU=EN,AN=v.forwardRef(({className:t,...e},n)=>h.jsx(ww,{ref:n,className:ee("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",t),...e}));AN.displayName=ww.displayName;const Yc=v.forwardRef(({className:t,children:e,...n},r)=>h.jsxs(VU,{children:[h.jsx(AN,{}),h.jsxs(xw,{ref:r,className:ee("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:rou
402nded-lg",t),...n,children:[e,h.jsxs(Cw,{className:"absolute right-4 top-4 rounded-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:[h.jsx(Zp,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Yc.displayName=xw.displayName;const Jc=({className:t,...e})=>h.jsx("div",{className:ee("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Jc.displayName="DialogHeader";const Dh=({className:t,...e})=>h.jsx("div",{className:ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Dh.displayName="DialogFooter";const Qc=v.forwardRef(({className:t,...e},n)=>h.jsx(kw,{ref:n,className:ee("text-lg font-semibold leading-none tracking-tight",t),...e}));Qc.displayName=kw.displayName;const Ew=v.forwardRef(({className:t,...e},n)=>h.jsx(Sw,{ref:n,className:ee("text-sm text-muted-foreground",t),...e}));Ew.displayName=Sw.displayName;const Nt=v.forwardRef(({className:t,type:e,...n},r)=>h.jsx("input",{type:e,className:ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));Nt.displayName="Input";var HU="Label",TN=v.forwardRef((t,e)=>h.jsx(ke.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));TN.displayName=HU;var _N=TN;const WU=ud("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gt=v.forwardRef(({className:t,...e},n)=>h.jsx(_N,{ref:n,className:ee(WU(),t),...e}));gt.displayName=_N.displayName;const qU="modulepreload",GU=function(t){return"/"+t},nS={},j=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=GU(l),l in nS)return;nS[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":qU,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})},KU=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>j(async()=>{const{default:r}=await Promise.resolve().then(()=>ic);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)};class Aw extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}}class ZU extends Aw{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class rS extends Aw{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class sS extends Aw{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var $v;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})($v||($v={}));var YU=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
402return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class JU{constructor(e,{headers:n={},customFetch:r,region:s=$v.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=KU(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var r;return YU(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o}=n;let a={},{region:l}=n;l||(l=this.region);const c=new URL(`${this.url}/${e}`);l&&l!=="any"&&(a["x-region"]=l,c.searchParams.set("forceFunctionRegion",l));let u;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=o):typeof o=="string"?(a["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(a["Content-Type"]="application/json",u=JSON.stringify(o)));const d=yield this.fetch(c.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:u}).catch(m=>{throw new ZU(m)}),f=d.headers.get("x-relay-error");if(f&&f==="true")throw new rS(d);if(!d.ok)throw new sS(d);let p=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),g;return p==="application/json"?g=yield d.json():p==="application/octet-stream"?g=yield d.blob():p==="text/event-stream"?g=d:p==="multipart/form-data"?g=yield d.formData():g=yield d.text(),{data:g,error:null,response:d}}catch(s){return{data:null,error:s,response:s instanceof sS||s instanceof rS?s.context:void 0}}})}}var bn={},Tw={},um={},fd={},dm={},hm={},QU=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Rl=QU();const XU=Rl.fetch,NN=Rl.fetch.bind(Rl),IN=Rl.Headers,eB=Rl.Request,tB=Rl.Response,ic=Object.freeze(Object.defineProperty({__proto__:null,Headers:IN,Request:eB,Response:tB,default:NN,fetch:XU},Symbol.toStringTag,{value:"Module"})),nB=kR(ic);var fm={};Object.defineProperty(fm,"__esModule",{value:!0});let rB=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
402de=e.code}};fm.default=rB;var ON=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hm,"__esModule",{value:!0});const sB=ON(nB),iB=ON(fm);let oB=class{constructor(e){var n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(n=e.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=sB.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,n){return this.headers=new Headers(this.headers),this.headers.set(e,n),this}then(e,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,a,l,c;let u=null,d=null,f=null,p=i.status,g=i.statusText;if(i.ok){if(this.method!=="HEAD"){const w=await i.text();w===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?d=w:d=JSON.parse(w))}const y=(a=this.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),b=(l=i.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");y&&b&&b.length>1&&(f=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(u={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,f=null,p=406,g="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const y=await i.text();try{u=JSON.parse(y),Array.isArray(u)&&i.status===404&&(d=[],u=null,p=200,g="OK")}catch{i.status===404&&y===""?(p=204,g="No Content"):u={message:y}}if(u&&this.isMaybeSingle&&(!((c=u==null?void 0:u.details)===null||c===void 0)&&c.includes("0 rows"))&&(u=null,p=200,g="OK"),u&&this.shouldThrowOnError)throw new iB.default(u)}return{error:u,data:d,count:f,status:p,statusText:g}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(e,n)}returns(){return this}overrideTypes(){return this}};hm.default=oB;var aB=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dm,"__esModule",{value:!0});const lB=aB(hm);let cB=class extends lB.default{select(e){let n=!1;const r=(e??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,n,{foreignTable:r,referencedTable:s=r}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,`${n-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
402explain({analyze:e=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};dm.default=cB;var uB=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fd,"__esModule",{value:!0});const dB=uB(dm);let hB=class extends dB.default{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}in(e,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:r,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${o}.${n}`),this}match(e){return Object.entries(e).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(e,n,r){return this.url.searchParams.append(e,`not.${n}.${r}`),this}or(e,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,n,r){return this.url.searchParams.append(e,`${n}.${r}`),this}};fd.default=hB;var fB=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(um,"__esModule",{value:!0});const xc=fB(fd);let pB=class{constructor(e,{headers:n={},schema:r,fetch:s}){this.url=e,this.headers=new Headers(n),this.schema=r,this.fetch=s}select(e,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),r&&this.headers.append("Prefer",`count=${r}`),new xc.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:n,defaultToNull:r=!0}={}){var s;const i="POST";if(n&&this.headers.append("Prefer",`count=${n}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>
4020){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new xc.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(e,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:i=!0}={}){var o;const a="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),s&&this.headers.append("Prefer",`count=${s}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new xc.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(e,{count:n}={}){var r;const s="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new xc.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:e}={}){var n;const r="DELETE";return e&&this.headers.append("Prefer",`count=${e}`),new xc.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}};um.default=pB;var PN=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tw,"__esModule",{value:!0});const mB=PN(um),gB=PN(fd);let yB=class jN{constructor(e,{headers:n={},schema:r,fetch:s}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(e){const n=new URL(`${this.url}/${e}`);return new mB.default(n,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new jN(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([d,f])=>f!==void 0).map(([d,f])=>[d,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([d,f])=>{l.searchParams.append(d,f)})):(a="POST",c=n);const u=new Headers(this.headers);return i&&u.set("Prefer",`count=${i}`),new gB.default({method:a,url:l,headers:u,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};Tw.default=yB;var oc=er&&er.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bn,"__esModule",{value:!0});bn.PostgrestError=bn.PostgrestBuilder=bn.PostgrestTransformBuilder=bn.PostgrestFilterBuilder=bn.PostgrestQueryBuilder=bn.PostgrestClient=void 0;const MN=oc(Tw);bn.PostgrestClient=MN.default;const RN=oc(um);bn.PostgrestQueryBuilder=RN.default;const DN=oc(fd);bn.PostgrestFilterBuilder=DN.default;const LN=oc(dm);bn.PostgrestTransformBuilder=LN.default;const $N=oc(hm);bn.PostgrestBuilder=$N.default;const FN=oc(fm);bn.PostgrestError=FN.default;var vB=bn.default={PostgrestClient:MN.default,PostgrestQueryBuilder:RN.default,PostgrestFilterBuilder:DN.default,PostgrestTransformBuilder:LN.default,PostgrestBuilder:$N.default,PostgrestError:FN.default};const{PostgrestClient:bB,PostgrestQueryBuilder:wee,PostgrestFilterBuilder:xee,PostgrestTransformBuilder:kee,PostgrestBuilder:See,PostgrestError:Cee}=vB;class wB{static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,s=parseInt(r.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 403import ws from "ws" 404new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 405 406Suggested solution: ${e.workaround}`),new Error(n)}static createWebSocket(e,n){const r=this.getWebSocketConstructor();return new r(e,n)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const xB="2.15.5",kB=`realtime-js/${xB}`,SB="1.0.0",Fv=1e4,CB=1e3,EB=100;var Xc;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Xc||(Xc={}));var At;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(At||(At={}));var vr;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(vr||(vr={}));var zv;(function(t){t.websocket="websocket"})(zv||(zv={}));var wo;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(wo||(wo={}));class AB{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,n,r)}_decodeBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(e.slice(o,o+s));o=o+s;const l=r.decode(e.slice(o,o+i));o=o+i;const c=JSON.parse(r.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class zN{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ye;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.t
vendor: 5,741 bytes, line 406
406srange="tsrange",t.tstzrange="tstzrange"})(Ye||(Ye={}));const iS=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(e).reduce((i,o)=>(i[o]=TB(o,t,e,s),i),{})},TB=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?UN(i,o):Uv(o)},UN=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return OB(e,n)}switch(t){case Ye.bool:return _B(e);case Ye.float4:case Ye.float8:case Ye.int2:case Ye.int4:case Ye.int8:case Ye.numeric:case Ye.oid:return NB(e);case Ye.json:case Ye.jsonb:return IB(e);case Ye.timestamp:return PB(e);case Ye.abstime:case Ye.date:case Ye.daterange:case Ye.int4range:case Ye.int8range:case Ye.money:case Ye.reltime:case Ye.text:case Ye.time:case Ye.timestamptz:case Ye.timetz:case Ye.tsrange:case Ye.tstzrange:return Uv(e);default:return Uv(e)}},Uv=t=>t,_B=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},NB=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},IB=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},OB=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>UN(e,a))}return t},PB=t=>typeof t=="string"?t.replace(" ","T"):t,BN=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"};class Mg{constructor(e,n,r={},s=Fv){this.channel=e,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var r;return this._hasReceived(e)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var oS;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(oS||(oS={}));class eu{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=eu.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=eu.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=eu.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,r,s){const i=this.cloneDeep(e),o=this.transformState(n),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const d=i[c];if(d){const f=u.map(y=>y.presence_ref),p=d.map(y=>y.presence_ref),g=u.filter(y=>p.indexOf(y.presence_ref)<0),m=d.filter(y=>f.indexOf(y.presence_ref)<0);g.length>0&&(a[c]=g),m.length>0&&(l[c]=m)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(e,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const d=e[a].map(p=>p.presence_ref),f=u.filter(p=>d.indexOf(p.presence_ref)<0);e[a].unshift(...f)}r(a,u,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),e[a]=c,s(a,c,l),c.length===0&&delete e[a]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var aS;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
406E="DELETE"})(aS||(aS={}));var tu;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(tu||(tu={}));var ks;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ks||(ks={}));class _w{constructor(e,n={config:{}},r){this.topic=e,this.params=n,this.socket=r,this.bindings={},this.state=At.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Mg(this,vr.join,this.params,this.timeout),this.rejoinTimer=new zN(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=At.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=At.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=At.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=At.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=At.errored,this.rejoinTimer.scheduleTimeout())}),this._on(vr.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new eu(this),this.broadcastEndpointURL=BN(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==At.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[tu.PRESENCE]&&this.bindings[tu.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>e==null?void 0:e(ks.CHANNEL_ERROR,p)),this._onClose(()=>e==null?void 0:e(ks.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket.setAuth(),p===void 0){e==null||e(ks.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,y=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,b=[];for(let w=0;w<y;w++){const x=m[w],{filter:{event:k,schema:S,table:E,filter:C}}=x,A=p&&p[w];if(A&&A.event===k&&A.schema===S&&A.table===E&&A.filter===C)b.push(Object.assign(Object.assign({},x),{id:A.id}));else{this.unsubscribe(),this.state=At.errored,e==null||e(ks.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=b,e&&e(ks.SUBSCRIBED);return}}).receive("error",p=>{this.state=At.errored,e==null||e(ks.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(ks.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){return this.state===At.joined&&e===tu.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,n,r)}async send(e,n={}){var r,s;if(!this._canPush()&&e.type==="broadcast"){const{event:i,payload:o}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=At.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(vr.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new Mg(this,vr.leave,{},e),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}
406teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=At.closed,this.bindings={}}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(e,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Mg(this,e,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>EB){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(e,n,r){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,r){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=vr;if(r&&[a,l,c,u].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(p=>{var g,m,y;return((g=p.filter)===null||g===void 0?void 0:g.event)==="*"||((y=(m=p.filter)===null||m===void 0?void 0:m.event)===null||y===void 0?void 0:y.toLocaleLowerCase())===o}).map(p=>p.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(p=>{var g,m,y,b,w,x;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in p){const k=p.id,S=(g=p.filter)===null||g===void 0?void 0:g.event;return k&&((m=n.ids)===null||m===void 0?void 0:m.includes(k))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((y=n.data)===null||y===void 0?void 0:y.type.toLocaleLowerCase()))}else{const k=(w=(b=p==null?void 0:p.filter)===null||b===void 0?void 0:b.event)===null||w===void 0?void 0:w.toLocaleLowerCase();return k==="*"||k===((x=n==null?void 0:n.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===o}).map(p=>{if(typeof f=="object"&&"ids"in f){const g=f.data,{schema:m,table:y,commit_timestamp:b,type:w,errors:x}=g;f=Object.assign(Object.assign({},{schema:m,table:y,commit_timestamp:b,eventType:w,new:{},old:{},errors:x}),this._getPayloadRecords(g))}p.callback(f,r)})}_isClosed(){return this.state===At.closed}_isJoined(){return this.state===At.joined}_isJoining(){return this.state===At.joining}_isLeaving(){return this.state===At.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,r){const s=e.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,n){const r=e.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&_w.isEqual(s.filter,n))})),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(vr.close,{},e)}_onError(e){this._on(vr.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=At.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=iS(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=iS(e.columns,e.old_record)),n}}const Rg=()=>{},eh={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},jB=[1e3,2e3,5e3,1e4],MB=1e4,RB=` 407 addEventListener("message", (e) => { 408 if (e.data.event === "start") { 409 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 410 } 411 });`;class DB{constructor(e,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Fv,this.transport=null,this.heartbeatIntervalMs=eh.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Rg,this.ref=0,this.reconnectTimer=null,this.logger=Rg,this.conn=null,this.sendBuffer=[],this.serializer
411=new AB,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>j(async()=>{const{default:a}=await Promise.resolve().then(()=>ic);return{default:a}},void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${e}/${zv.websocket}`,this.httpEndpoint=BN(e),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=wB.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const n=e.message;throw n.includes("Node.js")?new Error(`${n} 412 413To use Realtime in Node.js, you need to provide a WebSocket implementation: 414 415Option 1: Use Node.js 22+ which has native WebSocket support 416Option 2: Install and provide the "ws" package: 417 418 npm install ws 419 420 import ws from "ws" 421 const client = new RealtimeClient(url, { 422 ...options, 423 transport: ws 424 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:SB}))}disconnect(e,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},e?this.conn.close(e,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,n,r){this.logger(e,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Xc.connecting:return wo.Connecting;case Xc.open:return wo.Open;case Xc.closing:return wo.Closing;default:return wo.Closed}}isConnected(){return this.connectionState()===wo.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new _w(`realtime:${e}`,n,this);return this.channels.push(i),i}}push(e){const{topic:n,event:r,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(e=this.conn)===null||e===void 0||e.close(CB,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},eh.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>
4240&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(r=>r.topic===e&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,n=>{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(c){this.log("error","error in heartbeat callback",c)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:s,payload:i,ref:o}=n,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${r} ${s} ${a}`.trim(),i),this.channels.filter(c=>c._isMember(r)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(e){var n;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var n;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(vr.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const r=e.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${e}${r}${s}`}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([RB],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(e,n=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(e=null){let n;e?n=e:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const s={access_token:n,version:kB};n&&r.updateJoinPayload(s),r.joinedOnce&&r._isJoined()&&r._push(vr.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${e}`,n)})}_triggerStateCallbacks(e,n){try{this.stateChangeCallbacks[e].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(r){this.log("error",`error triggering ${e} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new zN(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},eh.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var n,r,s,i,o,a,l,c,u;if(this.transport=(n=e==null?void 0:e.transport)!==null&&n!==void 0?n:null,this.timeout=(r=e==null?void 0:e.timeout)!==null&&r!==void 0?r:Fv,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:eh.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:Rg,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(l=e==null?void 0:e.reconnectAfterMs)!==null&&l!==void 0?l:d=>jB[d-1]||MB,this.encode=(c=e==null?void 0:e.encode)!==null&&c!==void 0?c:(d,f)=>f(JSON.stringify(d)),this.decode=(u=e==null?void 0:e.decode)!==null&&u!==void 0?u:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl}}}
424class Nw extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Tt(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class LB extends Nw{constructor(e,n,r){super(e),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Bv extends Nw{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var $B=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const VN=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>j(async()=>{const{default:r}=await Promise.resolve().then(()=>ic);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},FB=()=>$B(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield j(()=>Promise.resolve().then(()=>ic),void 0)).Response:Response}),Vv=t=>{if(Array.isArray(t))return t.map(n=>Vv(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Vv(r)}),e},zB=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};var fa=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const Dg=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),UB=(t,e,n)=>fa(void 0,void 0,void 0,function*(){const r=yield FB();t instanceof r&&!(n!=null&&n.noResolveJson)?t.json().then(s=>{const i=t.status||500,o=(s==null?void 0:s.statusCode)||i+"";e(new LB(Dg(s),i,o))}).catch(s=>{e(new Bv(Dg(s),s))}):e(new Bv(Dg(t),t))}),BB=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!r?s:(zB(r)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(r)):s.body=r,e!=null&&e.duplex&&(s.duplex=e.duplex),Object.assign(Object.assign({},s),n))};function pd(t,e,n,r,s,i){return fa(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(n,BB(e,r,s,i)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>UB(l,a,r))})})}function Af(t,e,n,r){return fa(this,void 0,void 0,function*(){return pd(t,"GET",e,n,r)})}function Fr(t,e,n,r,s){return fa(this,void 0,void 0,function*(){return pd(t,"POST",e,r,s,n)})}function Hv(t,e,n,r,s){return fa(this,void 0,void 0,function*(){return pd(t,"PUT",e,r,s,n)})}function VB(t,e,n,r){return fa(this,void 0,void 0,function*(){return pd(t,"HEAD",e,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function HN(t,e,n,r,s){return fa(this,void 0,void 0,function*(){return pd(t,"DELETE",e,r,s,n)})}var nn=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const HB={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},lS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class WB{constructor(e,n={},r,s){this.url=e,this.headers=n,this.bucketId=r,this.fetch=VN(s)}uploadOrUpdate(e,n,r,s){return nn(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},lS),s);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const c=this._removeEmptyFolders(n),u=this._getFinalPath(c),d=yield(e=="PUT"?Hv:Fr)(this.fetch,`${this.url}/object/${u}`,i,Object.assign({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:c,id:d.Id,fullPath:d.Key},error:null}}catch(i){if(Tt(i))return{data:null,error:i};throw i}})}upload(e,n,r){return nn(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,r)})}uploadToSignedUrl(e,n,r,s){return nn(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:lS.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const d=yield Hv(this.fetch,a.toString(),l,{headers:u});return{data:{path:i,fullPath:d.Key},error:null}}catch(l){if(Tt(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,n){return nn(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const i=yield Fr(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(this.url+i.url),a=o.searchParams.get("token");if(!a)throw new Nw("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(r){if(Tt(r))return{data:null,error:r};throw r}})}update(e,n,r){return nn(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,r)})}move(e,n,r){return nn(this,void 0,void 0,function*(){try{return{data:yield Fr(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(Tt(s))return{data:null,error:s};throw s}})}copy(e,n,r){return nn(this,void 0,void 0,function*(){try{return{data:{path:(yield Fr(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(Tt(s))return{data:null,error:s};throw s}})}createSignedUrl(e,n,r){return nn(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),i=yield Fr(this.fetch,`${this.url}/object/sign/${s}
424`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(Tt(s))return{data:null,error:s};throw s}})}createSignedUrls(e,n,r){return nn(this,void 0,void 0,function*(){try{const s=yield Fr(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(Tt(s))return{data:null,error:s};throw s}})}download(e,n){return nn(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=i?`?${i}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield Af(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Tt(a))return{data:null,error:a};throw a}})}info(e){return nn(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{const r=yield Af(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Vv(r),error:null}}catch(r){if(Tt(r))return{data:null,error:r};throw r}})}exists(e){return nn(this,void 0,void 0,function*(){const n=this._getFinalPath(e);try{return yield VB(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(Tt(r)&&r instanceof Bv){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(e,n){const r=this._getFinalPath(e),s=[],i=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";i!==""&&s.push(i);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(e){return nn(this,void 0,void 0,function*(){try{return{data:yield HN(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(Tt(n))return{data:null,error:n};throw n}})}list(e,n,r){return nn(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},HB),n),{prefix:e||""});return{data:yield Fr(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(Tt(s))return{data:null,error:s};throw s}})}listV2(e,n){return nn(this,void 0,void 0,function*(){try{const r=Object.assign({},e);return{data:yield Fr(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(Tt(r))return{data:null,error:r};throw r}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const qB="2.11.1",GB={"X-Client-Info":`storage-js/${qB}`};var Sa=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class KB{constructor(e,n={},r,s){const i=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({},GB),n),this.fetch=VN(r)}listBuckets(){return Sa(this,void 0,void 0,function*(){try{return{data:yield Af(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(Tt(e))return{data:null,error:e};throw e}})}getBucket(e){return Sa(this,void 0,void 0,function*(){try{return{data:yield Af(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(Tt(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return Sa(this,void 0,void 0,function*(){try{return{data:yield Fr(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Tt(r))return{data:null,error:r};throw r}})}updateBucket(e,n){return Sa(this,void 0,void 0,function*(){try{return{data:yield Hv(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Tt(r))return{data:null,error:r};throw r}})}emptyBucket(e){return Sa(this,void 0,void 0,function*(){try{return{data:yield Fr(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Tt(n))return{data:null,error:n};throw n}})}deleteBucket(e){return Sa(this,void 0,void 0,function*(){try{return{data:yield HN(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(Tt(n))return{data:null,error:n};throw n}})}}class ZB extends KB{constructor(e,n={},r,s){super(e,n,r,s)}from(e){return new WB(this.url,this.headers,e,this.fetch)}}const YB="2.57.2";let jc="";
424typeof Deno<"u"?jc="deno":typeof document<"u"?jc="web":typeof navigator<"u"&&navigator.product==="ReactNative"?jc="react-native":jc="node";const JB={"X-Client-Info":`supabase-js-${jc}/${YB}`},QB={headers:JB},XB={schema:"public"},eV={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},tV={};var nV=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};const rV=t=>{let e;return t?e=t:typeof fetch>"u"?e=NN:e=fetch,(...n)=>e(...n)},sV=()=>typeof Headers>"u"?IN:Headers,iV=(t,e,n)=>{const r=rV(n),s=sV();return(i,o)=>nV(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Object.assign(Object.assign({},o),{headers:c}))})};var oV=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};function aV(t){return t.endsWith("/")?t:t+"/"}function lV(t,e){var n,r;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:c,realtime:u,global:d}=e,f={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},c),i),realtime:Object.assign(Object.assign({},u),o),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=a==null?void 0:a.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>oV(this,void 0,void 0,function*(){return""})};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}const WN="2.71.1",ja=30*1e3,Wv=3,Lg=Wv*ja,cV="http://localhost:9999",uV="supabase.auth.token",dV={"X-Client-Info":`gotrue-js/${WN}`},qv="X-Supabase-Api-Version",qN={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},hV=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,fV=10*60*1e3;class Iw extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function Ne(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class pV extends Iw{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function mV(t){return Ne(t)&&t.name==="AuthApiError"}class GN extends Iw{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class no extends Iw{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class ti extends no{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function gV(t){return Ne(t)&&t.name==="AuthSessionMissingError"}class th extends no{constructor(){super("Auth session or user missing","AuthInvalidToken
424ResponseError",500,void 0)}}class nh extends no{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class rh extends no{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function yV(t){return Ne(t)&&t.name==="AuthImplicitGrantRedirectError"}class cS extends no{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Gv extends no{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function $g(t){return Ne(t)&&t.name==="AuthRetryableFetchError"}class uS extends no{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Kv extends no{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Tf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),dS=` 425\r=`.split(""),vV=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<dS.length;e+=1)t[dS[e].charCodeAt(0)]=-2;for(let e=0;e<Tf.length;e+=1)t[Tf[e].charCodeAt(0)]=e;return t})();function hS(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Tf[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(Tf[r]),e.queuedBits-=6}}function KN(t,e,n){const r=vV[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function fS(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{xV(o,r,n)};for(let o=0;o<t.length;o+=1)KN(t.charCodeAt(o),s,i);return e.join("")}function bV(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function wV(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}bV(r,e)}}function xV(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function kV(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)KN(t.charCodeAt(s),n,r);return new Uint8Array(e)}function SV(t){const e=[];return wV(t,n=>e.push(n)),new Uint8Array(e)}function CV(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>hS(s,n,r)),hS(null,n,r),e.join("")}function EV(t){return Math.round(Date.now()/1e3)+t}function AV(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const dr=()=>typeof window<"u"&&typeof document<"u",ho={tested:!1,writable:!1},ZN=()=>{if(!dr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ho.tested)return ho.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ho.tested=!0,ho.writable=!0}catch{ho.tested=!0,ho.writable=!1}return ho.writable};function TV(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const YN=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>j(async()=>{const{default:r}=await Promise.resolve().then(()=>ic);return{default:r}},void 0).then(({default:r})=>r(...n)):e=fetch,(...n)=>e(...n)},_V=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ma=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},fo=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ys=async(t,e)=>{await t.removeItem(e)};class pm{constructor(){this.promise=new pm.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}pm.promiseConstructor=Promise;function Fg(t){const e=t.split(".");if(e.length!==3)throw new Kv("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!hV.test(e[r]))throw new Kv("JWT not in base64url format");return{header:JSON.parse(fS(e[0])),payload:JSON.parse(fS(e[1])),signature:kV(e[2]),raw:{header:e[0],payload:e[1]}}}async function NV(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function IV(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function OV(t){return("0"+t.toString(16)).substr(-2)}function PV(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(e),Array.from(e,OV).join("")}async function jV(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",
425n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function MV(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await jV(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Ca(t,e,n=!1){const r=PV();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Ma(t,`${e}-code-verifier`,s);const i=await MV(r);return[i,r===i?"plain":"s256"]}const RV=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function DV(t){const e=t.headers.get(qv);if(!e||!e.match(RV))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function LV(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function $V(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const FV=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Ea(t){if(!FV.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function zg(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function pS(t){return JSON.parse(JSON.stringify(t))}var zV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};const yo=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),UV=[502,503,504];async function mS(t){var e;if(!_V(t))throw new Gv(yo(t),0);if(UV.includes(t.status))throw new Gv(yo(t),t.status);let n;try{n=await t.json()}catch(i){throw new GN(yo(i),i)}let r;const s=DV(t);if(s&&s.getTime()>=qN["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new uS(yo(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new ti}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new uS(yo(n),t.status,n.weak_password.reasons);throw new pV(yo(n),t.status||500,r)}const BV=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function Me(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[qv]||(i[qv]=qN["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await VV(t,e,n+a,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function VV(t,e,n,r,s,i){const o=BV(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new Gv(yo(l),0)}if(a.ok||await mS(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await mS(l)}}function bs(t){var e;let n=null;GV(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=EV(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:r},error:null}}function gS(t){const e=bs(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function di(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function HV(t){return{data:t,error:null}}function WV(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=zV(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function qV(t){return t}function GV(t){return t.access_token&&t.refresh_token&&t.expires_in}const Ug=["global","local","others"];var KV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n};class ZV{constructor({url:e="",headers:n={},fetch:r}){this.url=e,this.headers=n,this.fetch=YN(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n=Ug[0]){if(Ug.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Ug.join(", ")}`);try{return await Me(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Ne(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await Me(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:di})}catch(r){if(Ne(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=KV(e,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await Me(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:WV,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Ne(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Me(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:di})}catch(n){if(Ne(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await Me(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:qV});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return p.length>
4250&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(g.split(";")[1].split("=")[1]);c[`${y}Page`]=m}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(Ne(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Ea(e);try{return await Me(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:di})}catch(n){if(Ne(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Ea(e);try{return await Me(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:di})}catch(r){if(Ne(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Ea(e);try{return await Me(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:di})}catch(r){if(Ne(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Ea(e.userId);try{const{data:n,error:r}=await Me(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(Ne(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Ea(e.userId),Ea(e.id);try{return{data:await Me(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(Ne(n))return{data:null,error:n};throw n}}}function yS(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}function YV(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Aa={debug:!!(globalThis&&ZN()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class JN extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class JV extends JN{}async function QV(t,e,n){Aa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const r=new globalThis.AbortController;return e>0&&setTimeout(()=>{r.abort(),Aa.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Aa.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await n()}finally{Aa.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Aa.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new JV(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Aa.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}YV();const XV={url:cV,storageKey:uV,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:dV,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function vS(t,e,n){return await n()}const Ta={};class Fu{constructor(e){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Fu.nextInstanceID,Fu.nextInstanceID+=1,this.instanceID>0&&dr()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({}
425,XV),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new ZV({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=YN(s.fetch),this.lock=s.lock||vS,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:dr()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=QV:this.lock=vS,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:ZN()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=yS(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=yS(this.memoryStorage)),dr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var e,n;return(n=(e=Ta[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){Ta[this.storageKey]=Object.assign(Object.assign({},Ta[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=Ta[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Ta[this.storageKey]=Object.assign(Object.assign({},Ta[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${WN}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const n=TV(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),dr()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),yV(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Ne(n)?{error:n}:{error:new GN("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:bs}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(Ne(i))return{data:{user:null,session:null},error:i};throw i}}async signUp(e){var n,r,s;try{let i;if("email"in e){const{email:u,password:d,options:f}=e;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await Ca(this.storage,this.storageKey)),i=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:g},xform:bs})}else if("phone"in e){const{phone:u,password:d,options:f}=e;i=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:bs})}else throw new nh("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(Ne(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await Me(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:gS})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await Me(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:gS})}else throw new nh("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new th}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(Ne(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:n}=e;if(n==="solana")return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(e){var n,r,s,i,o,a,l,c,u,d,f,p;let g,m;if("message"in e)g=e.message,m=e.signature;else{const{chain:y,wallet:b,statement:w,options:x}=e;let k;if(dr())if(typeof b=="object")k=b;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))k=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=b}const S=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);
425if("signIn"in k&&k.signIn){const E=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),w?{statement:w}:null));let C;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")C=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)C=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)g=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${S.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...w?["",w,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((d=(u=x==null?void 0:x.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...x.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(` 426`);const E=await k.signMessage(new TextEncoder().encode(g),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:y,error:b}=await Me(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:CV(m)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:bs});if(b)throw b;return!y||!y.session||!y.user?{data:{user:null,session:null},error:new th}:(y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),{data:Object.assign({},y),error:b})}catch(y){if(Ne(y))return{data:{user:null,session:null},error:y};throw y}}async _exchangeCodeForSession(e){const n=await fo(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=await Me(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:bs});if(await Ys(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new th}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(Ne(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await Me(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:bs}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new th}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(Ne(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,r,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Ca(this.storage,this.storageKey));const{error:d}=await Me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await Me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new nh("You must provide either an email or phone number.")}catch(a){if(Ne(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await Me(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:bs});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(Ne(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var n,r,s;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await Ca(this.storage,this.storageKey)),await Me(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:HV}
426)}catch(i){if(Ne(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new ti;const{error:s}=await Me(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(Ne(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:s,options:i}=e,{error:o}=await Me(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in e){const{phone:r,type:s,options:i}=e,{data:o,error:a}=await Me(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new nh("You must provide either an email or phone number and a type")}catch(n){if(Ne(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await fo(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<Lg:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await fo(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=zg()}if(this.storage.isServer&&e.user){let o=this.suppressGetSessionWarning;e=new Proxy(e,{get:(l,c,u)=>(!o&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,u))})}return{data:{session:e},error:null}}const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Me(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:di}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;
426if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ti}:await Me(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:di})})}catch(n){if(Ne(n))return gV(n)&&(await this._removeSession(),await Ys(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new ti;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Ca(this.storage,this.storageKey));const{data:c,error:u}=await Me(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:di});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(Ne(r))return{data:{user:null},error:r};throw r}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ti;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Fg(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(n){if(Ne(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new ti;const{session:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(Ne(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e,n){try{if(!dr())throw new rh("No browser detected.");if(e.error||e.error_description||e.error_code)throw new rh(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new cS("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new rh("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new cS("No code detected.");const{data:w,error:x}=await this._exchangeCodeForSession(e.code);if(x)throw x;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:w.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=e;if(!i||!a||!o||!c)throw new rh("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let f=u+d;l&&(f=parseInt(l));const p=f-u;p*1e3<=ja&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const g=f-d;u-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,u):u-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,u);const{data:m,error:y}=await this._getUser(i);if(y)throw y;const b={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:b,redirectType:e.type},error:null}}catch(r){if(Ne(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const n=await fo(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{error:i};const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);
426if(a&&!(mV(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Ys(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const n=AV(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Ca(this.storage,this.storageKey,!0));try{return await Me(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(Ne(i))return{data:null,error:i};throw i}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(Ne(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Me(this.fetch,"GET",p,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return dr()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:e.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(Ne(r))return{data:{provider:e.provider,url:null},error:r};throw r}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await Me(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(Ne(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await IV(async s=>(s>
4260&&await NV(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await Me(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:bs})),(s,i)=>{const o=200*Math.pow(2,s);return i&&$g(i)&&Date.now()+o-r<ja})}catch(r){if(this._debug(n,"error",r),Ne(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),dr()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await fo(this.storage,this.storageKey);if(s&&this.userStorage){let o=await fo(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ma(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:zg()}else if(s&&!s.user&&!s.user){const o=await fo(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ys(this.storage,this.storageKey+"-user"),await Ma(this.storage,this.storageKey,s)):s.user=zg()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Lg;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Lg}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),$g(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new ti;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new pm;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new ti;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={session:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),Ne(i)){const o={session:null,error:i};return $g(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,n,r=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Ma(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=pS(s);await Ma(this.storage,this.storageKey,i)}else{const s=pS(n);await Ma(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await Ys(this.storage,this.storageKey),await Ys(this.storage,this.storageKey+"-code-verifier"),await Ys(this.storage,this.storageKey+"-user"),this.userStorage&&await Ys(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&dr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
426catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),ja);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-e)/ja);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ja}ms, refresh threshold is ${Wv} ticks`),s<=Wv&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof JN)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!dr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Ca(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await Me(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Ne(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:l,error:c}=await Me(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(e.factorType==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(Ne(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{data:null,error:i};const{data:o,error:a}=await Me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(Ne(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await Me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Ne(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(e==null?void 0:e.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:s,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,r;const{data:{session:s},error:i}=e;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=Fg(s.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+fV>s)return r;const{data:i,error:o}=await Me(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:p,error:g}
426=await this.getSession();if(g||!p.session)return{data:null,error:g};r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Fg(r);n!=null&&n.allowExpired||LV(i.exp);const c=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const u=$V(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,SV(`${a}.${l}`)))throw new Kv("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(Ne(r))return{data:null,error:r};throw r}}}Fu.nextInstanceID=0;const eH=Fu;class tH extends eH{constructor(e){super(e)}}var nH=function(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(d){o(d)}}function l(u){try{c(r.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})};class rH{constructor(e,n,r){var s,i,o;if(this.supabaseUrl=e,this.supabaseKey=n,!e)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=aV(e),l=new URL(a);this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:XB,realtime:tV,auth:Object.assign(Object.assign({},eV),{storageKey:c}),global:QB},d=lV(r??{},u);this.storageKey=(s=d.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(f,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=iV(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new bB(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new ZB(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new JU(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,n={},r={}){return this.rest.rpc(e,n,r)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return nH(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(e=r.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,storageKey:o,flowType:a,lock:l,debug:c},u,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tH({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),u),storageKey:o,autoRefreshToken:e,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,flowType:a,lock:l,debug:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new DB(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(e,n,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:e==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const sH=(t,e,n)=>new rH(t,e,n);function iH(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}iH()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
426ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const oH="https://shvcmmoyvrzmdhgrpqty.supabase.co",aH="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNodmNtbW95dnJ6bWRoZ3JwcXR5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTI3MDA0OTAsImV4cCI6MjA2ODI3NjQ5MH0.vPLKOvjuNt4lDQsTJyoj1mCosDmuPLjocrgOLNYJf2A",xe=sH(oH,aH,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),Zv=({children:t})=>{const[e,n]=v.useState(!1),[r,s]=v.useState(""),[i,o]=v.useState(""),[a,l]=v.useState(""),[c,u]=v.useState(!1),{toast:d}=Ir(),f=async p=>{if(p.preventDefault(),!r){d({title:"Error",description:"Please enter your email address",variant:"destructive"});return}u(!0);try{const{data:g,error:m}=await xe.functions.invoke("subscribe-to-newsletter",{body:{email:r.trim(),firstName:i.trim()||void 0,lastName:a.trim()||void 0}});if(m)throw m;d({title:"Success!",description:"Please check your mailbox and confirm your email"}),s(""),o(""),l(""),n(!1)}catch(g){console.error("Subscription error:",g),d({title:"Subscription Failed",description:g.message||"There was an error subscribing to the newsletter. Please try again.",variant:"destructive"})}finally{u(!1)}};return h.jsxs(Rh,{open:e,onOpenChange:n,children:[h.jsx(BU,{asChild:!0,children:t}),h.jsxs(Yc,{className:"sm:max-w-md",children:[h.jsxs(Jc,{children:[h.jsx(Qc,{children:"Subscribe to Newsletter"}),h.jsx(Ew,{children:"Get notifications for new blog posts delivered to your inbox."})]}),h.jsxs("form",{onSubmit:f,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"email",children:"Email Address *"}),h.jsx(Nt,{id:"email",type:"email",placeholder:"[email protected]",value:r,onChange:p=>s(p.target.value),required:!0,disabled:c})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"firstName",children:"First Name"}),h.jsx(Nt,{id:"firstName",type:"text",placeholder:"First name",value:i,onChange:p=>o(p.target.value),disabled:c})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"lastName",children:"Last Name"}),h.jsx(Nt,{id:"lastName",type:"text",placeholder:"Last name",value:a,onChange:p=>l(p.target.value),disabled:c})]})]}),h.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[h.jsx(oe,{type:"button",variant:"outline",onClick:()=>n(!1),disabled:c,children:"Cancel"}),h.jsx(oe,{type:"submit",disabled:c,children:c?h.jsxs(h.Fragment,{children:[h.jsx(el,{className:"h-4 w-4 animate-spin mr-2"}),"Subscribing..."]}):"Subscribe"})]})]})]})]})},En=()=>{const[t,e]=v.useState(!1),n=[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"MAD Podcast",href:"/podcast"},{name:"MAD Landscape",href:"/mad-landscapes"}];return h.jsx("header",{className:"bg-background/95 backdrop-blur-sm border-b border-border sticky top-0 z-50",children:h.jsxs("div",{className:"blog-container",children:[h.jsxs("nav",{className:"flex items-center justify-between h-16",children:[h.jsx("div",{className:"flex-shrink-0",children:h.jsx("a",{href:"/",className:"text-xl font-semibold text-foreground hover:text-primary transition-colors",children:"Matt Turck"})}),h.jsx("div",{className:"hidden md:block",children:h.jsx("div",{className:"ml-10 flex items-baseline space-x-8",children:n.map(r=>h.jsx("a",{href:r.href,className:"text-muted-foreground hover:text-foreground px-3 py-2 text-sm font-medium transition-colors",children:r.name},r.name))})}),h.jsxs("div",{className:"hidden md:flex items-center space-x-3",children:[h.jsx(Wk,{}),h.jsx(Zv,{children:h.jsx(oe,{className:"button-primary text-sm",children:"Subscribe"})})]}),h.jsxs("div",{className:"md:hidden flex items-center space-x-2",children:[h.jsx(Wk,{}),h.jsx(oe,{variant:"ghost",size:"sm",onClick:()=>e(!t),className:"inline-flex items-center justify-center p-2",children:h.jsx(z5,{className:"h-5 w-5"})})]})]}),t&&h.jsx("div",{className:"md:hidden",children:h.jsxs("div",{className:"px-2 pt-2 pb-3 space-y-1 border-t border-border",children:[n.map(r=>h.jsx("a",{href:r.href,className:"text-muted-foreground hover:text-foreground block px-3 py-2 text-base font-medium transition-colors",onClick:()=>e(!1),children:r.name},r.name)),h.jsx("div",{className:"px-3 py-2",children:h.jsx(Zv,{children:h.jsx(oe,{className:"button-primary w-full",children:"Subscribe"})})})]})})]})})},QN="/assets/x-logo-BKhcNxiQ.png",lH=()=>h.jsx("section",{className:"bg-gradient-to-br from-surface via-background to-accent-blue-light py-16 lg:py-24",children:h.jsx("div",{className:"blog-container",children:h.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[h.jsx("div",{className:"mb-8",children:h.jsx("div",{className:"w-32 h-32 mx-auto rounded-full overflow-hidden border-4 border-primary/20 shadow-lg",children:h.jsx("img",{src:"/lovable-uploads/bf75b503-f2b6-463f-9173-279454afd079.png",alt:"Matt Turck - VC at FirstMark",className:"w-full h-full object-cover"})})}),h.jsx("h1",{className:"text-4xl lg:text-6xl font-bold text-foreground mb-6 leading-tight",children:"Matt Turck"}),h.jsx("p",{className:"text-xl lg:text-2xl text-muted-foreground mb-6",children:"VC at FirstMark in New York"}),h.jsx("p",{className:"text-lg text-muted-foreground mb-12 max-w-2xl mx-auto leading-relaxed",children:"I invest in early-stage enterprise softw
426are, data and AI startups at FirstMark Capital, and I write about the space here. This blog is best known for the MAD Landscape, but you'll also find IPO breakdowns, podcast conversations, and reflections on venture capital and technology."}),h.jsxs("div",{className:"flex items-center justify-center space-x-8",children:[h.jsxs("a",{href:"https://twitter.com/mattturck",target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-3 text-lg text-muted-foreground hover:text-accent-blue transition-colors hover:scale-105",children:[h.jsx("img",{src:QN,alt:"X (Twitter)",className:"h-8 w-8 dark:invert transition-all"}),h.jsx("span",{className:"font-medium",children:"@mattturck"})]}),h.jsxs("a",{href:"https://firstmark.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-3 text-lg text-muted-foreground hover:text-accent-blue transition-colors hover:scale-105",children:[h.jsx(T5,{className:"h-8 w-8 text-foreground"}),h.jsx("span",{className:"font-medium",children:"FirstMark"})]})]})]})})}),_f=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:ee("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));_f.displayName="Card";const XN=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:ee("flex flex-col space-y-1.5 p-6",t),...e}));XN.displayName="CardHeader";const eI=v.forwardRef(({className:t,...e},n)=>h.jsx("h3",{ref:n,className:ee("text-2xl font-semibold leading-none tracking-tight",t),...e}));eI.displayName="CardTitle";const tI=v.forwardRef(({className:t,...e},n)=>h.jsx("p",{ref:n,className:ee("text-sm text-muted-foreground",t),...e}));tI.displayName="CardDescription";const Nf=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:ee("p-6 pt-0",t),...e}));Nf.displayName="CardContent";const cH=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:ee("flex items-center p-6 pt-0",t),...e}));cH.displayName="CardFooter";function Pr(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function Xo(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const nI=6048e5,uH=864e5;let dH={};function mm(){return dH}function zu(t,e){var a,l,c,u;const n=mm(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=Pr(t),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function If(t){return zu(t,{weekStartsOn:1})}function rI(t){const e=Pr(t),n=e.getFullYear(),r=Xo(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=If(r),i=Xo(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=If(i);return e.getTime()>=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function bS(t){const e=Pr(t);return e.setHours(0,0,0,0),e}function wS(t){const e=Pr(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function hH(t,e){const n=bS(t),r=bS(e),s=+n-wS(n),i=+r-wS(r);return Math.round((s-i)/uH)}function fH(t){const e=rI(t),n=Xo(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),If(n)}function pH(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function mH(t){if(!pH(t)&&typeof t!="number")return!1;const e=Pr(t);return!isNaN(Number(e))}function gH(t){const e=Pr(t),n=Xo(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const yH={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"}},vH=(t,e,n)=>{let r;const s=yH[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Bg(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const bH={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wH={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xH={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"}
vendor: 4,861 bytes, line 426
426,kH={date:Bg({formats:bH,defaultWidth:"full"}),time:Bg({formats:wH,defaultWidth:"full"}),dateTime:Bg({formats:xH,defaultWidth:"full"})},SH={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},CH=(t,e,n,r)=>SH[t];function kc(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const EH={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},AH={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},TH={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"]},_H={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"]},NH={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"}},IH={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"}},OH=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},PH={ordinalNumber:OH,era:kc({values:EH,defaultWidth:"wide"}),quarter:kc({values:AH,defaultWidth:"wide",argumentCallback:t=>t-1}),month:kc({values:TH,defaultWidth:"wide"}),day:kc({values:_H,defaultWidth:"wide"}),dayPeriod:kc({values:NH,defaultWidth:"wide",formattingValues:IH,defaultFormattingWidth:"wide"})};function Sc(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?MH(a,d=>d.test(o)):jH(a,d=>d.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function jH(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function MH(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function RH(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const DH=/^(\d+)(th|st|nd|rd)?/i,LH=/\d+/i,$H={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},FH={any:[/^b/i,/^(a|c)/i]},zH={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UH={any:[/1/i,/2/i,/3/i,/4/i]},BH={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},VH={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]},HH={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},WH={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]},qH={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},GH={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}}
vendor: 11,742 bytes, line 426
426,KH={ordinalNumber:RH({matchPattern:DH,parsePattern:LH,valueCallback:t=>parseInt(t,10)}),era:Sc({matchPatterns:$H,defaultMatchWidth:"wide",parsePatterns:FH,defaultParseWidth:"any"}),quarter:Sc({matchPatterns:zH,defaultMatchWidth:"wide",parsePatterns:UH,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Sc({matchPatterns:BH,defaultMatchWidth:"wide",parsePatterns:VH,defaultParseWidth:"any"}),day:Sc({matchPatterns:HH,defaultMatchWidth:"wide",parsePatterns:WH,defaultParseWidth:"any"}),dayPeriod:Sc({matchPatterns:qH,defaultMatchWidth:"any",parsePatterns:GH,defaultParseWidth:"any"})},ZH={code:"en-US",formatDistance:vH,formatLong:kH,formatRelative:CH,localize:PH,match:KH,options:{weekStartsOn:0,firstWeekContainsDate:1}};function YH(t){const e=Pr(t);return hH(e,gH(e))+1}function JH(t){const e=Pr(t),n=+If(e)-+fH(e);return Math.round(n/nI)+1}function sI(t,e){var u,d,f,p;const n=Pr(t),r=n.getFullYear(),s=mm(),i=(e==null?void 0:e.firstWeekContainsDate)??((d=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=Xo(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=zu(o,e),l=Xo(t,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=zu(l,e);return n.getTime()>=a.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function QH(t,e){var a,l,c,u;const n=mm(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=sI(t,e),i=Xo(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),zu(i,e)}function XH(t,e){const n=Pr(t),r=+zu(n,e)-+QH(n,e);return Math.round(r/nI)+1}function He(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Js={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return He(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):He(n+1,2)},d(t,e){return He(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return He(t.getHours()%12||12,e.length)},H(t,e){return He(t.getHours(),e.length)},m(t,e){return He(t.getMinutes(),e.length)},s(t,e){return He(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return He(s,e.length)}},_a={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xS={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Js.y(t,e)},Y:function(t,e,n,r){const s=sI(t,r),i=s>0?s:1-s;if(e==="YY"){const o=i%100;return He(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):He(i,e.length)},R:function(t,e){const n=rI(t);return He(n,e.length)},u:function(t,e){const n=t.getFullYear();return He(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return He(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return He(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Js.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return He(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=XH(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):He(s,e.length)},I:function(t,e,n){const r=JH(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):He(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Js.d(t,e)},D:function(t,e,n){const r=YH(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):He(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return He(i,2);case"eo":return n.ordinalNumber(i,{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"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return He(i,e.length);case"co":return n.ordinalNumber(i,{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"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return He(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=_a.noon:r===0?s=_a.midnight:s=r/12>=1?"pm":"am",e){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"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=_a.evening:r>=12?s=_a.afternoon:r>=4?s=_a.morning:s=_a.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Js.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Js.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):He(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):He(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Js.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Js.s(t,e)},S:function(t,e){return Js.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return SS(r);case"XXXX":case"XX":return vo(r);case"XXXXX":case"XXX":default:return vo(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return SS(r);case"xxxx":case"xx":return vo(r);case"xxxxx":case"xxx":default:return vo(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+kS(r,":");case"OOOO":default:return"GMT"+vo(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+kS(r,":");case"zzzz":default:return"GMT"+vo(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return He(r,e.length)},T:function(t,e,n){const r=t.getTime();return He(r,e.length)}};function kS(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+He(i,2)}function SS(t,e){return t%60===0?(t>0?"-":"+")+He(Math.abs(t)/60,2):vo(t,e)}function vo(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=He(Math.trunc(r/60),2),i=He(r%60,2);return n+s+e+i}const CS=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},iI=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},eW=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return CS(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",CS(r,e)).replace("{{time}}",iI(s,e))},tW={p:iI,P:eW},nW=/^D+$/,rW=/^Y+$/,sW=["D","DD","YY","YYYY"];function iW(t){return nW.test(t)}function oW(t){return rW.test(t)}function aW(t,e,n){const r=lW(t,e,n);if(console.warn(r),sW.includes(t))throw new RangeError(r)}function lW(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const cW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dW=/^'([^]*?)'?$/,hW=/''/g,fW=/[a-zA-Z]/;function md(t,e,n){var u,d,f,p;const r=mm(),s=r.locale??ZH,i=r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,a=Pr(t);if(!mH(a))throw new RangeError("Invalid time value");let l=e.match(uW).map(g=>{const m=g[0];if(m==="p"||m==="P"){const y=tW[m];return y(g,s.formatLong)}return g}).join("").match(cW).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const m=g[0];if(m==="'")return{isToken:!1,value:pW(g)};if(xS[m])return{isToken:!0,value:g};
426if(m.match(fW))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:g}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return l.map(g=>{if(!g.isToken)return g.value;const m=g.value;(oW(m)||iW(m))&&aW(m,e,String(t));const y=xS[m[0]];return y(a,m,s.localize,c)}).join("")}function pW(t){const e=t.match(dW);return e?e[1].replace(hW,"'"):t}const mW="shvcmmoyvrzmdhgrpqty",gW=t=>t.includes("mattturck.com")||t.includes("wp-content/uploads"),yW=t=>{if(!t||t.includes("supabase.co/storage"))return t;if(gW(t)){const e=t.replace(/^http:\/\//i,"https://");return`https://${mW}.functions.supabase.co/image-proxy?url=${encodeURIComponent(e)}`}return t},vW=["image/jpeg","image/png","image/gif","image/webp"],Of=t=>vW.includes(t.type),Pf=t=>`${{"image/avif":"AVIF","image/heic":"HEIC","image/heif":"HEIF","image/bmp":"BMP","image/tiff":"TIFF"}[t.type]||t.type.replace("image/","").toUpperCase()} images are not supported. Please use JPG, PNG, GIF, or WEBP.`,bW=async t=>{if(!Of(t))throw new Error(Pf(t));try{const e=t.name.split(".").pop(),n=`${Math.random().toString(36).substring(2)}-${Date.now()}.${e}`,{data:r,error:s}=await xe.storage.from("blog-images").upload(n,t,{cacheControl:"3600",upsert:!1});if(s)throw s;const{data:{publicUrl:i}}=xe.storage.from("blog-images").getPublicUrl(r.path);return i}catch(e){throw console.error("Error uploading image:",e),e}},oI=({title:t,excerpt:e,date:n,category:r,featured:s=!1,pinned:i=!1,slug:o,featured_image:a})=>{const l=ha(),c=()=>{l(`/${o}`)},u=md(new Date(n),"MMM d, yyyy");return i?h.jsx(_f,{className:"card-hover card-pinned border-accent-blue/20",onClick:c,children:h.jsxs(Nf,{className:"p-8 lg:p-12 relative",children:[r&&r.toLowerCase()!=="uncategorized"&&h.jsx("div",{className:"absolute top-4 left-4 z-10",children:h.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-accent-blue/10 text-accent-blue border border-accent-blue/20",children:r})}),h.jsx("div",{className:"flex items-center mb-6",children:h.jsxs("div",{className:"flex items-center space-x-2 text-accent-blue",children:[h.jsx(Wb,{className:"h-4 w-4"}),h.jsx("span",{className:"text-sm font-medium",children:"Pinned Post"})]})}),h.jsxs("div",{className:"grid md:grid-cols-2 gap-8 items-center",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-3xl lg:text-4xl font-bold text-foreground mb-4 leading-tight group-hover:text-accent-blue transition-colors",children:h.jsx("span",{className:"text-gradient",children:t})}),h.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:e}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:h.jsxs("div",{className:"flex items-center space-x-1",children:[h.jsx(xv,{className:"h-4 w-4"}),h.jsx("span",{children:u})]})}),h.jsxs("div",{className:"flex items-center space-x-2 text-accent-blue hover:text-accent-blue-hover transition-colors cursor-pointer group",children:[h.jsx("span",{className:"font-medium",children:"Read Analysis"}),h.jsx(lk,{className:"h-5 w-5 transform group-hover:translate-x-1 transition-transform"})]})]})]}),a&&h.jsx("div",{className:"relative",children:h.jsx("div",{className:"aspect-[4/3] relative overflow-hidden rounded-lg bg-white/5 border border-white/10 p-4 flex items-center justify-center",children:h.jsx("img",{src:yW(a),alt:t,loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",className:"w-full h-full object-contain group-hover:scale-105 transition-transform duration-300",onError:d=>{const f=d.target;f.onerror=null,f.src=a.replace(/^http:\/\//i,"https://")}})})})]})]})}):h.jsx(_f,{className:`card-hover cursor-pointer group min-h-[300px] ${s?"h-full":""}`,onClick:c,children:h.jsxs(Nf,{className:"p-0 h-full flex flex-col relative",children:[r&&r.toLowerCase()!=="uncategorized"&&h.jsx("div",{className:"absolute top-4 left-4 z-10",children:h.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-accent-blue/10 text-accent-blue border border-accent-blue/20",children:r})}),h.jsxs("div",{className:`flex-1 flex flex-col ${s?"p-8 lg:p-10":"p-8"} ${r&&r.toLowerCase()!=="uncategorized"?"pt-12":""}`,children:[h.jsx("h3",{className:`font-semibold text-foreground mb-4 group-hover:text-accent-blue transition-colors leading-tight flex-none ${s?"text-2xl lg:text-3xl":"text-xl"}`,children:t}),h.jsx("p",{className:`text-muted-foreground leading-relaxed mb-6 flex-1 ${s?"text-lg lg:text-xl line-clamp-6":"text-base line-clamp-4"}`,children:e}),h.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border mt-auto",children:[h.jsx("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:h.jsxs("div",{className:"flex items-center space-x-1",children:[h.jsx(xv,{className:"h-4 w-4"}),h.jsx("span",{children:u})]})}),h.jsxs("div",{className:"flex items-center space-x-1 text-sm text-accent-blue group-hover:text-accent-blue-hover transition-colors",children:[h.jsx("span",{children:"Read more"}),h.jsx(lk,{className:"h-4 w-4 transform group-hover:translate-x-1 transition-transform"})]})]})]})]})})},wW="/assets/threads-logo-Di_3sTKj.png",An=()=>{const t=new Date().getFullYear(),e={blog:[{name:"All Posts",href:"/blog"},{name:"MAD Landscape",href:"/mad-landscapes"},{name:"MAD Podcast",href:"/podcast"},{name:"AI & Data",href:"/blog?category=ai"},{name:"IPO Analysis",href:"/blog?category=ipo"},{name:"New Investments",href:"/blog?category=new-investment"}],links:[{name:"FirstMark",href:"https://firstmark.com"},{name:"Data Driven NYC",href:"https://firstmark.com/community/data-driven/"},{name:"MAD Podcast on YouTube",href:"https://www.youtube.com/c/DataDrivenNYC"},{name:"MAD Podcast on Apple",href:"https://podcasts.apple.com/us/podcast/the-mad-podcast-with-matt-turck/id1686238724"},{name:"MAD Podcast on Spotify",href:"https://open.spotify.com/show/7yLATDSaFvgJG80ACcRJtq"}],connect:[{name:"Twitter",href:"https://twitter.com/mattturck",type:"image"},{name:"LinkedIn",href:"https://linkedin.com/in/mattturck",icon:R5},{name:"Threads",href:"https://www.threads.com/@mattturck",type:"image",logo:wW}]};return h.jsx("footer",{id:"footer",className:"bg-surface border-t border-border",children:h.jsx("div",{className:"blog-container",children:h.jsxs("div",{className:"py-12 lg:py-16",children:[h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 lg:gap-12",children:[h.jsxs("div",{className:"md:col-span-1",children:[h.jsx("h3",{className:"text-xl font-semibold mb-4 text-foreground",children:"Matt Turck"}),h.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:"VC at FirstMark focusing on AI, data infrastru
426cture, and enterprise technology. Sharing insights on the evolving tech landscape."}),h.jsx("div",{className:"flex space-x-4",children:e.connect.map(n=>h.jsxs("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",className:"text-foreground hover:text-foreground/80 transition-colors",children:[n.type==="image"?h.jsx("img",{src:n.name==="Twitter"?QN:n.logo,alt:n.name==="Twitter"?"X (Twitter)":n.name,className:"h-5 w-5 dark:invert transition-all"}):h.jsx(n.icon,{className:"h-5 w-5"}),h.jsx("span",{className:"sr-only",children:n.name})]},n.name))})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-semibold mb-4 text-foreground",children:"Explore"}),h.jsx("ul",{className:"space-y-2",children:e.blog.map(n=>h.jsx("li",{children:h.jsx("a",{href:n.href,className:"text-muted-foreground hover:text-foreground transition-colors",children:n.name})},n.name))})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"font-semibold mb-4 text-foreground",children:"Links"}),h.jsxs("ul",{className:"space-y-2",children:[e.links.map(n=>h.jsx("li",{children:h.jsx("a",{href:n.href,className:"text-muted-foreground hover:text-foreground transition-colors",target:n.href.startsWith("http")?"_blank":"_self",rel:n.href.startsWith("http")?"noopener noreferrer":"",children:n.name})},n.name)),h.jsx("li",{children:h.jsx(Zv,{children:h.jsx("button",{className:"text-muted-foreground hover:text-foreground transition-colors text-left",children:"Subscribe"})})})]})]})]}),h.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:h.jsx("div",{className:"flex justify-center md:justify-start",children:h.jsxs("p",{className:"text-muted-foreground text-sm",children:["© ",t," Matt Turck. All rights reserved."]})})})]})})})},xW=[{id:"MrnhtyPGCKI",slug:"why-ai-agents-cheat-eric-ho-goodfire",episodeNumber:null,title:"Why AI Agents Cheat | Eric Ho (Goodfire)",guest:{name:"Eric Ho",role:"Co-founder and CEO, Goodfire"},publishedAt:"2026-10-01T11:30:00.000Z",durationLabel:"1h 10m",thumbnail:"https://i.ytimg.com/vi/MrnhtyPGCKI/maxresdefault.jpg",summary:"Eric Ho is the Co-founder and CEO at Goodfire. We cover why Kimi K3 reward hacks on 96% of SWE-bench, why models can encode an awareness that they are cheating in their activations, and how activation monitoring reuses forward-pass computations to screen behavior without the cost of external monitors.",tags:["AI agents","AI alignment","Reward hacking","Mechanistic interpretability","Activation monitoring"],chapterCount:34,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:83,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4227,assemblyAiCostUsd:.176}},{id:"awoR908Yu5Y",slug:"who-feeds-the-gpus-inside-ai-s-hidden-30b-layer-renen-hallak-vast-data",episodeNumber:null,title:"Who Feeds the GPUs? Inside AI's Hidden $30B Layer | Renen Hallak, VAST Data",guest:{name:"Renen Hallak",role:"Founder & CEO, VAST Data"},publishedAt:"2026-09-24T11:30:00.000Z",durationLabel:"1h 10m",thumbnail:"https://i.ytimg.com/vi/awoR908Yu5Y/maxresdefault.jpg",summary:"Renen Hallak is the Founder & CEO at VAST Data. We cover why enterprises at scale should buy rather than rent AI factories, why inference demands low-latency, always-on systems with model routing and persistent memory, and how confidential computing can let enterprises run models locally without exposing either their data or model buildersâ weights.",tags:["AI infrastructure","AI factories","inference","confidential computing","data architecture"],chapterCount:30,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:84,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4214,assemblyAiCostUsd:.176}},{id:"kyyLku5F3bo",slug:"when-ai-improves-itself-richard-socher-recursive",episodeNumber:null,title:"When AI Improves Itself | Richard Socher (Recursive)",guest:{name:"Richard Socher",role:"CEO and co-founder, Recursive"},publishedAt:"2026-09-10T11:30:00.000Z",durationLabel:"1h 14m",thumbnail:"https://i.ytimg.com/vi/kyyLku5F3bo/maxresdefault.jpg",summary:"Richard Socher is the CEO and co-founder at Recursive. We cover why AI can reconnect scienceâs fragmented subfields, how next-token prediction learns physical structure in proteins, and why simulations, scientific measurements, robotic experiments, and LLMs form the four pillars of a machine for discovery.",tags:["Recursive self-improvement","AI for science","Biology","World models","Drug discovery"],chapterCount:26,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:104,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4455,assemblyAiCostUsd:.186}},{id:"SK9ITBK5osA",slug:"ai-could-take-over-in-2029-is-it-already-too-late-ryan-greenblatt",episodeNumber:null,title:"AI Could Take Over in 2029. Is It Already Too Late? | Ryan Greenblatt",guest:{name:"Ryan Greenblatt",role:"Chief Scientist, Redwood Research"},publishedAt:"2026-08-27T14:22:21.000Z",durationLabel:"1h 19m",thumbnail:"https://i.ytimg.com/vi/SK9ITBK5osA/maxresdefault.jpg",summary:"Ryan Greenblatt is the Chief Scientist at Redwood Research. We cover his recommendation to plan for full AI R&D automation by early 2029, why alignment-faking experiments found Opus 3 behaving differently in training and deployment, and his Plan A proposal for US-China compute transparency that pauses most AI R&D.",tags:["AI safety","AI alignment","AI takeover","compute governance","AI t
426imelines"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:103,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4739,assemblyAiCostUsd:.197}},{id:"FU9A481E2W8",slug:"openais-model-hacked-us-hugging-faces-thomas-wolf",episodeNumber:null,title:"âOpenAIâs Model Hacked Usâ - Hugging Faceâs Thomas Wolf",guest:{name:"Thomas Wolf",role:"Co-founder and Chief Science Officer, Hugging Face"},publishedAt:"2026-08-07T18:38:32.000Z",durationLabel:"58 min",thumbnail:"https://i.ytimg.com/vi/FU9A481E2W8/maxresdefault.jpg",summary:"Thomas Wolf is the Co-founder and Chief Science Officer at Hugging Face. We cover why an AI agent testing cyber challenges pursued Hugging Faceâs CyberBench datasets as a side quest, why closed models refused to assist during the incident while an open model helped analyze it, and why safety depends more on alignment than whether models are open or closed.",tags:["AI safety","AI agents","open-source AI","cybersecurity","AI alignment"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:94,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3461,assemblyAiCostUsd:.144}},{id:"54pwkcp48Lg",slug:"how-to-build-long-horizon-ai-agents-mitch-troyanovsky-basis",episodeNumber:null,title:"How to Build Long-Horizon AI Agents â Mitch Troyanovsky, Basis",guest:{name:"Mitch Troyanovsky",role:"Co-founder, Basis"},publishedAt:"2026-08-06T11:30:01.000Z",durationLabel:"1h 23m",thumbnail:"https://i.ytimg.com/vi/54pwkcp48Lg/maxresdefault.jpg",summary:"Mitch Troyanovsky is the Co-founder at Basis. We cover why long-horizon agents need harnesses to compensate for their lack of memory, why passing 100 outcome evals does not prove production reliability, and how behavior specs turn human review processes into runtime checks and agent judges.",tags:["AI agents","long-horizon agents","agent evaluation","context engineering","accounting automation"],chapterCount:36,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:153,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4971,assemblyAiCostUsd:.207}},{id:"3FHsGiONOGw",slug:"the-biggest-ai-deployment-nobody-talks-about-samsara-ceo-sanjit-biswas",episodeNumber:null,title:"The Biggest AI Deployment Nobody Talks About | Samsara CEO Sanjit Biswas",guest:{name:"Sanjit Biswas",role:"CEO and co-founder, Samsara"},publishedAt:"2026-07-30T11:30:00.000Z",durationLabel:"1h 1m",thumbnail:"https://i.ytimg.com/vi/3FHsGiONOGw/maxresdefault.jpg",summary:"Sanjit Biswas is the CEO and co-founder at Samsara. We cover why physical AI requires rugged hardware and field deployment rather than simply more training data, how Samsara says its platform helped prevent 380,000 crashes last year through real-time driver feedback, and why its vehicles traveling 99% of U.S. roads create a network effect for risk and pothole detection.",tags:["Physical AI","Fleet safety","Edge AI","AI agents","Autonomous vehicles"],chapterCount:39,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:88,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3630,assemblyAiCostUsd:.151}},{id:"UEOSUSz--Ig",slug:"the-biggest-chip-ever-built-why-openai-runs-on-it-cerebras-ceo-andrew-feldman",episodeNumber:null,title:"The Biggest Chip Ever Built â Why OpenAI Runs On It | Cerebras CEO Andrew Feldman",guest:{name:"Andrew Feldman",role:"Co-founder and CEO, Cerebras"},publishedAt:"2026-07-23T11:30:00.000Z",durationLabel:"1h 13m",thumbnail:"https://i.ytimg.com/vi/UEOSUSz--Ig/maxresdefault.jpg",summary:"Andrew Feldman is the Co-founder and CEO at Cerebras. We cover why tokens per second per user is the key inference metric, how Cerebrasâ wafer-scale chip is 58 times larger than a GPU with thousands of times more memory bandwidth, and why generating one word can require moving model weights equal to 100 HD movies.",tags:["AI inference","Cerebras","AI chips","wafer-scale computing","OpenAI"],chapterCount:37,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:108,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4361,assemblyAiCostUsd:.182}},{id:"wEZBlmvxx4o",slug:"openais-compute-chief-we-cant-build-fast-enough-sachin-katti",episodeNumber:null,title:"OpenAIâs Compute Chief: We Canât Build Fast Enough | Sac
426hin Katti",guest:{name:"Sachin Katti",role:"Head of Industrial Compute, OpenAI"},publishedAt:"2026-07-16T11:30:01.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/wEZBlmvxx4o/maxresdefault.jpg",summary:"Sachin Katti is the Head of Industrial Compute at OpenAI. We cover why OpenAI sees failing to build enough compute as a bigger risk than overbuilding, why its Jalapeño chips optimize tokens per watt for known model workloads, and why new data centers require investment in generation, transmission, and substations.",tags:["AI compute","data centers","AI chips","inference","power grid"],chapterCount:26,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:76,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2636,assemblyAiCostUsd:.11}},{id:"nvwglW-PRYI",slug:"stripe-s-ai-chief-how-ai-agents-will-buy-sell-and-pay",episodeNumber:null,title:"Stripe's AI Chief: How AI Agents Will Buy, Sell, and Pay",guest:{name:"Emily Sands",role:"Head of AI, Stripe"},publishedAt:"2026-07-09T11:30:01.000Z",durationLabel:"1h 15m",thumbnail:"https://i.ytimg.com/vi/nvwglW-PRYI/maxresdefault.jpg",summary:"Emily Sands is the Head of AI at Stripe. We cover why businesses can expose product catalogs once instead of registering with every agent, how shared payment tokens let agents transact without seeing underlying credentials, and why AI companies are adopting hybrid billing because every prompt carries a marginal cost.",tags:["AI agents","Agentic commerce","AI payments","Usage-based billing","Token fraud"],chapterCount:34,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:109,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4497,assemblyAiCostUsd:.187}},{id:"Oojrfdl42LI",slug:"inside-nemotron-nvidias-ai-lab-bryan-catanzaro",episodeNumber:null,title:"Inside Nemotron & NVIDIAâs AI Lab | Bryan Catanzaro",guest:{name:"Bryan Catanzaro",role:"VP of Applied Deep Learning Research, NVIDIA"},publishedAt:"2026-07-02T11:30:00.000Z",durationLabel:"1h 23m",thumbnail:"https://i.ytimg.com/vi/Oojrfdl42LI/maxresdefault.jpg",summary:"Bryan Catanzaro is the VP of Applied Deep Learning Research at NVIDIA. We cover why companies choose open models to keep their data and guardrails under their control, how Nemotron Ultra trains 550 billion parameters with 4-bit arithmetic, and why predicting multiple tokens at once can speed inference without reducing accuracy.",tags:["Nemotron","NVIDIA","open source AI","LLM training","AI inference"],chapterCount:24,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:93,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4977,assemblyAiCostUsd:.207}},{id:"UN47z_opfmo",slug:"cloudflare-ceo-the-internet-s-business-model-is-dead",episodeNumber:null,title:"Cloudflare CEO: The Internet's Business Model Is Dead",guest:{name:"Matthew Prince",role:"CEO and co-founder, Cloudflare"},publishedAt:"2026-06-25T11:30:00.000Z",durationLabel:"1h 28m",thumbnail:"https://i.ytimg.com/vi/UN47z_opfmo/maxresdefault.jpg",summary:"Matthew Prince is the CEO and co-founder at Cloudflare. We cover bot traffic exceeding human traffic in the first half of 2026, why a shopping agent can visit 5,000 sites where a person visits five, and why an ad-funded internet cannot pay for bot traffic.",tags:["AI agents","internet infrastructure","bot traffic","web economics","Cloudflare"],chapterCount:22,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:98,requests:0,inputTokens:0,outputTokens:0,audioSeconds:5287,assemblyAiCostUsd:.22}},{id:"0NttU4CbyVs",slug:"the-gpu-myth-state-of-ai-compute-2026-stephen-balaban",episodeNumber:null,title:"The GPU Myth: State of AI Compute 2026 | Stephen Balaban",guest:{name:"Stephen Balaban",role:"Co-founder and CTO, Lambda"},publishedAt:"2026-06-18T11:30:00.000Z",durationLabel:"1h 14m",thumbnail:"https://i.ytimg.com/vi/0NttU4CbyVs/maxresdefault.jpg",summary:"Stephen Balaban is the Co-founder and CTO at Lambda. We cover why AI compute is a vertically integrated service rather than a commodity, how H100 price indices can mistake contract mix shifts for falling demand, and why land, power, and data center shells are the industryâs main bottlenecks.",tags:["AI compute","GPU cloud","data centers","NVIDIA","neoclouds"],chapterCount:33,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:93,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4467,assemblyAiCostUsd:.186}},{id:"oWOz2htozfI",slug:"openai-s-dan-roberts-why-ai-can-now-make-discoveries",episodeNumber:null,title:"OpenAI's Dan Roberts: Why AI Can Now Make Discoveries",guest:{name:"Dan Roberts",role:"Lead, Foundations of Reinforcement Learning at OpenAI"},publishedAt:"2026-06-04T12:30:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/oWOz2htozfI/maxresdefault.jpg",summary:"Dan Roberts is the Lead, Foundations of Reinforcement Learning at OpenAI. We cover how reinforcement learning teaches models to use test-time compute through language-based thought processes, why OpenAIâs unit-distance result came from exploring a conjecture mathematicians assumed was true, and why AIâs role in science is likely to expand gradually while research taste remains hard to verify.",tags:["reinforcement learning","test-time compute","AI reasoning","mathematical discovery","AI for science"],chapterCount:26,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:156,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2946,assemblyAiCostUsd:.123}},{id:"Gs2styCcwro",slug:"state-of-enterprise-ai-2026-aaron-levie-on-tokenmaxxing-rise-of-headless-and-ai-",episodeNumber:null,title:"State of Enterprise AI 2026: Aaron Levie on Tokenmaxxing, Rise of Headless, and AI-Proofing Your Job",guest:{name:"Aaron Levie",role:"Co-founder and CEO, Box"},publishedAt:"2026-05-28T11:30:00.000Z",durationLabel:"1h 13m",thumbnail:"https://i.ytimg.com/vi/Gs2styCcwro/maxresdefault.jpg",summary:"Aaron Levie is the Co-founder and CEO at Box. We cover why a single coding-agent task can consume $1,000 of compute, why faster model progress can slow enterprise AI rollout by making architectures obsolete, and why agents will drive both headless consumption pricing and new technical roles embedded in business functions.",tags:["enterprise AI","AI agents","AI compute","headless software","future of work"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:95,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4374,assemblyAiCostUsd:.182}},{id:"DhD1zZ8w8Mw",slug:"openai-s-yann-dubois-why-ai-progress-suddenly-feels-real",episodeNumber:null,title:"OpenAI's Yann Dubois: Why AI Progress Suddenly Feels Real",guest:{name:"Yann Dubois",role:"Co-Lead, Post-training Frontiers at OpenAI"},publishedAt:"2026-05-21T11:30:00.000Z",durationLabel:"1h 14m",thumbnail:"https://i.ytimg.com/vi/DhD1zZ8w8Mw/maxresdefault.jpg",summary:"Yann Dubois is the Co-Lead, Post-training Frontiers at OpenAI. We cover why coding tools feel suddenly useful only after crossing a reliability threshold, how reinforcement learning moves reasoning from verifiable competition problems to real-world utility, and why startupsâ biggest opportunity is the last mile of permissions, connectors, and vertical workflows.",tags:["AI reliability","reinforcement learning","reasoning models","test-time compute","AI startups"],chapterCount:22,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:84,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4436,assemblyAiCostUsd:.185}},{id:"kMXJrzAa5fM",slug:"the-agent-harness-building-secure-sandboxes-for-autonomous-ai-workloads",episodeNumber:null,title:"The Agent Harness: Building Secure Sandboxes for Autonomous AI Workloads",guest:{name:"Ivan Burazin",role:"CEO, Daytona"},publishedAt:"2026-05-14T11:30:00.000Z",durationLabel:"1h 5m",thumbnail:"https://i.ytimg.com/vi/kMXJrzAa5fM/maxresdefault.jpg",summary:"Ivan Burazin is the CEO at Daytona. We cover why agents need isolated computers with separate identities and spending limits, why fast sandbox spin-up keeps expensive GPUs fully utilized during RL workloads, and why long-running stateful sandboxes require live migration rather than the expiration model used by most cloud infrastru
426cture.",tags:["AI agents","AI sandboxes","Agent infrastructure","Reinforcement learning","Cloud computing"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:97,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3915,assemblyAiCostUsd:.163}},{id:"DvyZcCfepeI",slug:"openai-board-member-zico-kolter-on-the-real-risks-of-frontier-ai",episodeNumber:null,title:"OpenAI Board Member Zico Kolter on the Real Risks of Frontier AI",guest:{name:"Zico Kolter",role:"OpenAI Board Member; Head of Machine Learning, Carnegie Mellon University; Co-founder, Gray Swan"},publishedAt:"2026-05-07T11:30:01.000Z",durationLabel:"1h 17m",thumbnail:"https://i.ytimg.com/vi/DvyZcCfepeI/maxresdefault.jpg",summary:"Zico Kolter is the OpenAI Board Member; Head of Machine Learning, Carnegie Mellon University; Co-founder, Gray Swan. We cover why larger models do not automatically become more robust, how AI agents create new prompt-injection risks through third-party data and tool calls, and why reinforcement learning already trains models on their own generated outputs.",tags:["AI safety","OpenAI","AI security","AI agents","jailbreaks"],chapterCount:27,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:101,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4599,assemblyAiCostUsd:.192}},{id:"9MEJ4syOVrQ",slug:"anthropics-felix-rieseberg-claude-cowork-mythos-and-the-saas-extinction",episodeNumber:null,title:"Anthropicâs Felix Rieseberg: Claude Cowork, Mythos, and the SaaS Extinction",guest:{name:"Felix Rieseberg",role:"Engineering Lead for Claude Cowork, Anthropic"},publishedAt:"2026-04-10T11:30:00.000Z",durationLabel:"58 min",thumbnail:"https://i.ytimg.com/vi/9MEJ4syOVrQ/maxresdefault.jpg",summary:"Felix Rieseberg is the Engineering Lead for Claude Cowork at Anthropic. We cover why Mythos shows outsized cybersecurity capabilities, how Cowork uses sandboxed virtual machines and text-file memory to work across local files and apps, and why cheap AI-assisted execution makes user taste and iteration the new bottlenecks.",tags:["Claude Cowork","AI agents","Anthropic","AI product design","SaaS"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:80,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3480,assemblyAiCostUsd:.145}},{id:"Bo19sXssYXI",slug:"ai-is-already-building-ai-google-deepminds-mostafa-dehghani",episodeNumber:null,title:"AI is Already Building AI | Google DeepMindâs Mostafa Dehghani",guest:{name:"Mostafa Dehghani",role:"AI researcher, Google DeepMind"},publishedAt:"2026-04-02T11:30:00.000Z",durationLabel:"1h 5m",thumbnail:"https://i.ytimg.com/vi/Bo19sXssYXI/maxresdefault.jpg",summary:"Mostafa Dehghani is the AI researcher at Google DeepMind. We cover why new models are already built heavily with previous-generation models, why long-horizon automation is limited by compounding reliability and weak evals, and why multimodal training can teach models about the physical world more efficiently than text alone.",tags:["AI self-improvement","AI agents","continual learning","multimodal AI","model evaluation"],chapterCount:27,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:94,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3871,assemblyAiCostUsd:.161}},{id:"jH2ZIUKvazU",slug:"benedict-evans-openais-moat-problem-the-future-of-software",episodeNumber:null,title:"Benedict Evans: OpenAIâs Moat Problem & the Future of Software",guest:{name:"Benedict Evans",role:"Independent technology analyst"},publishedAt:"2026-03-19T11:30:00.000Z",durationLabel:"1h 1m",thumbnail:"https://i.ytimg.com/vi/jH2ZIUKvazU/maxresdefault.jpg",summary:"Benedict Evans is an Independent technology analyst. We cover why frontier models lack network effects, why better models do not matter when users still must check every answer, and why cheaper coding creates more improvised software rather than letting everyone build their own applications.",tags:["OpenAI","AI moats","ChatGPT","AI agents","software","AI investing"],chapterCount:15,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:91,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3666,assemblyAiCostUsd:.153}},{id:"rSKh6bVuVZI",slug:"everything-gets-rebuilt-the-new-ai-agent-stack-harrison-chase-langchain",episodeNumber:null,title:"Everything Gets Rebuilt: The New AI Agent Stack | Harrison Chase, LangChain",guest:{name:"Harrison Chase",role:"Co-founder and CEO, LangChain"},publishedAt:"2026-03-12T11:30:00.000Z",durationLabel:"47 min",thumbnail:"https://i.ytimg.com/vi/rSKh6bVuVZI/maxresdefault.jpg",summary:"Harrison Chase is the Co-founder and CEO at LangChain. We cover why coding agents lead because models are trained and reinforced on code, why a filesystem lets an agent manage its own context instead of overflowing its window, and why the lasting moat lies in encoded instructions, tools, and skills rather than volatile agent scaffolding.",tags:["AI agents","Agent harnesses","Context engineering","Coding agents","LangChain"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:70,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2817,assemblyAiCostUsd:.117}},{id:"DtD0ngZ5_bU",slug:"ai-that-can-prove-its-right-verification-as-the-missing-layer-in-ai-carina-hong",episodeNumber:null,title:"AI That Can Prove Itâs Right: Verification as the Missing Layer in AI â Carina Hong",guest:{name:"Carina Hong",role:"Founder & CEO, Axiom Math"},publishedAt:"2026-02-26T12:30:01.000Z",durationLabel:"1h 4m",thumbnail:"https://i.ytimg.com/vi/DtD0ngZ5_bU/maxresdefault.jpg",summary:"Carina Hong is the Founder & CEO at Axiom Math. We cover Axiom Prover's perfect 12/12 score on the Putnam after four months, why Lean lets every proof step receive verifiable reward rather than merely checking a numerical answer, and how formal verification could extend from mathematics to code and hardware where mostly correct is not enough.",tags:["AI reasoning","formal verification","
426Lean","theorem proving","AI for math"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:109,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3832,assemblyAiCostUsd:.16}},{id:"VsyvMPbZjYg",slug:"voice-ais-big-moment-why-everything-is-changing-now-ft-neil-zeghidour-gradium-ai",episodeNumber:null,title:"Voice AIâs Big Moment: Why Everything Is Changing Now (ft. Neil Zeghidour, Gradium AI)",guest:{name:"Neil Zeghidour",role:"CEO, Gradium AI"},publishedAt:"2026-02-19T12:30:00.000Z",durationLabel:"1h 23m",thumbnail:"https://i.ytimg.com/vi/VsyvMPbZjYg/maxresdefault.jpg",summary:"Neil Zeghidour is the CEO at Gradium AI. We cover why voice agents can already be more convenient than humans for always-available calls, why full-duplex speech-to-speech systems avoid the brittle turn-taking rules of cascaded models, and why the hardest unsolved problem is understanding a speaker amid factory noise and multiple simultaneous voices.",tags:["Voice AI","Speech-to-speech","Full-duplex AI","Neural codecs","On-device AI"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:132,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4969,assemblyAiCostUsd:.207}},{id:"14LtGxlFaEg",slug:"mistral-ai-vs-silicon-valley-the-rise-of-sovereign-ai",episodeNumber:null,title:"Mistral AI vs. Silicon Valley: The Rise of Sovereign AI",guest:{name:"Timothée Lacroix",role:"Co-Founder & CTO, Mistral AI"},publishedAt:"2026-02-12T12:30:00.000Z",durationLabel:"58 min",thumbnail:"https://i.ytimg.com/vi/14LtGxlFaEg/maxresdefault.jpg",summary:"Timothée Lacroix is the Co-Founder & CTO at Mistral AI. We cover why Mistral builds data centers for stable training on thousands of GPUs, why enterprise AI succeeds through governed workflows rather than autonomous agents, and why the real ROI arrives after companies connect and safely reuse their internal context.",tags:["Sovereign AI","Enterprise AI","AI agents","GPU infrastructure","Model training"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:73,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3500,assemblyAiCostUsd:.146}},{id:"DqBMzuzxZog",slug:"dylan-patel-nvidia-s-new-moat-why-china-is-semiconductor-pilled",episodeNumber:null,title:`Dylan Patel: NVIDIA's New Moat & Why China is "Semiconductor Pilledâ`,guest:{name:"Dylan Patel",role:"Founder and Chief Analyst, SemiAnalysis"},publishedAt:"2026-02-05T12:30:00.000Z",durationLabel:"1h 17m",thumbnail:"https://i.ytimg.com/vi/DqBMzuzxZog/maxresdefault.jpg",summary:"Dylan Patel is the Founder and Chief Analyst at SemiAnalysis. We cover why NVIDIA is building a portfolio of specialized chips as AI workloads diverge, why China has the most vertically integrated semiconductor stack despite lagging at the leading edge, and why $500 billion in AI CapEx only works as long as model progress continues.",tags:["NVIDIA","AI chips","semiconductors","China","AI infrastructure"],chapterCount:17,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:115,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4604,assemblyAiCostUsd:.192}},{id:"K5WPr5dtne0",slug:"state-of-llms-2026-rlvr-grpo-inference-scaling-sebastian-raschka",episodeNumber:null,title:"State of LLMs 2026: RLVR, GRPO, Inference Scaling â Sebastian Raschka",guest:{name:"Sebastian Raschka",role:"AI researcher and author"},publishedAt:"2026-01-29T12:30:00.000Z",durationLabel:"1h 8m",thumbnail:"https://i.ytimg.com/vi/K5WPr5dtne0/maxresdefault.jpg",summary:"Sebastian Raschka is the AI researcher and author. We cover why Transformers remain state of the art despite cheaper alternatives, how GRPO makes verifiable-reward training cheaper by removing reward and value models, and why inference-time scaling, tool use, and prompt management can materially improve model performance without changing weights.",tags:["LLMs","GRPO","RLVR","inference scaling","Transformers","AI benchmarks"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:101,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4093,assemblyAiCostUsd:.171}},{id:"XCCkgRzth6Q",slug:"the-end-of-gpu-scaling-compute-the-agent-era-tim-dettmers-ai2-dan-fu-together-ai",episodeNumber:null,title:"The End of GPU Scaling? Compute & The Agent Era â Tim Dettmers (Ai2) & Dan Fu (Together AI)",guest:{name:"Tim Dettmers",role:"Assistant Professor, CMU;
426 Research Scientist, Allen Institute for AI"},publishedAt:"2026-01-22T12:30:00.000Z",durationLabel:"1h 4m",thumbnail:"https://i.ytimg.com/vi/XCCkgRzth6Q/maxresdefault.jpg",summary:"Tim Dettmers is the Assistant Professor, CMU; Research Scientist, Allen Institute for AI. We cover why current models may leave up to 100x more training compute available through newer clusters and better utilization, how coding agents make kernel engineers up to 10x faster with expert oversight, and why inference hardware utilization below 5% leaves major room for cheaper, faster models.",tags:["GPU scaling","AI agents","Inference efficiency","GPU kernels","Open-source models"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:102,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3846,assemblyAiCostUsd:.16}},{id:"2WP4jab4F30",slug:"are-ai-evals-broken-anthropic-nyus-pavel-izmailov-on-llm-evaluation-reasoning-al",episodeNumber:null,title:"Are AI Evals Broken? Anthropic/NYUâs Pavel Izmailov on LLM Evaluation, Reasoning & âAlienâ Behavior",guest:{name:"Pavel Izmailov",role:"Research Scientist at Anthropic; Professor at NYU"},publishedAt:"2026-01-15T14:00:00.000Z",durationLabel:"45 min",thumbnail:"https://i.ytimg.com/vi/2WP4jab4F30/maxresdefault.jpg",summary:"Pavel Izmailov is the Research Scientist at Anthropic; Professor at NYU. We cover why contrived evaluations can elicit sabotage without showing coherent goals across settings, why reasoning RL may make alignment harder by letting models hide their thinking, and why deterministic transformations can create extractable structural information for compute-bounded models.",tags:["AI alignment","LLM evaluations","reasoning RL","scalable oversight","mechanistic interpretability"],chapterCount:19,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:68,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2701,assemblyAiCostUsd:.113}},{id:"cNGDAqFXvew",slug:"deepmind-gemini-3-lead-what-comes-after-infinite-data",episodeNumber:null,title:'DeepMind Gemini 3 Lead: What Comes After "Infinite Data"',guest:{name:"Sebastian Bourgeaud",role:"Pre-training Lead, Google DeepMind"},publishedAt:"2025-12-18T14:00:00.000Z",durationLabel:"55 min",thumbnail:"https://i.ytimg.com/vi/cNGDAqFXvew/maxresdefault.jpg",summary:"Sebastian Bourgeaud is the Pre-training Lead at Google DeepMind. We cover why Gemini 3 improves through many integrated changes rather than one breakthrough, how pre-training shifts from an effectively unlimited-data regime to a finite-data one, and why evals must predict both scale-up performance and post-training results while avoiding benchmark contamination.",tags:["Gemini 3","AI pre-training","scaling laws","synthetic data","model evals"],chapterCount:28,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:75,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3296,assemblyAiCostUsd:.137}},{id:"3K-R4yVjJfU",slug:"whats-next-for-ai-openais-ukasz-kaiser-transformer-co-author",episodeNumber:null,title:"Whatâs Next for AI? OpenAIâs Åukasz Kaiser (Transformer Co-Author)",guest:{name:"Åukasz Kaiser",role:"Research Scientist, OpenAI"},publishedAt:"2025-11-26T14:30:00.000Z",durationLabel:"1h 5m",thumbnail:"https://i.ytimg.com/vi/3K-R4yVjJfU/maxresdefault.jpg",summary:"Åukasz Kaiser is the Research Scientist at OpenAI. We cover why reasoning with reinforcement learning delivers larger gains per dollar than further pre-training, how models trained to verify answers learn to correct their own mistakes, and why even near-perfect machine translation still requires human review when trust is at stake.",tags:["reasoning models","reinforcement learning","Transformers","multimodal AI","AI agents"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:91,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3925,assemblyAiCostUsd:.164}},{id:"HGoQnDFHTVA",slug:"open-source-ai-strikes-back-inside-ai2s-olmo-3-thinking",episodeNumber:null,title:'Open Source AI Strikes Back â Inside Ai2âs OLMo 3 âThinking"',guest:{name:"Guest",role:""},publishedAt:"2025-11-20T14:00:01.000Z",durationLabel:"1h 28m",thumbnail:"https://i.ytimg.com/vi/HGoQnDFHTVA/maxresdefault.jpg",summary:"Guest is the Guest at Ai2. We cover why OLMo 3 releases its data and intermediate checkpoints alongside model weights, why Chinese labs use open models to gain U.S. mindshare, and why small reasoning models get most of their gains from distilled training traces while RL infrastru
426cture remains technically punishing.",tags:["OLMo 3","Open source AI","Reasoning models","Reinforcement learning","Qwen"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:142,requests:0,inputTokens:0,outputTokens:0,audioSeconds:5290,assemblyAiCostUsd:.22}},{id:"6lmuo8RD-Rs",slug:"intelligence-isnt-enough-why-energy-compute-decide-the-agi-race-eiso-kant",episodeNumber:null,title:"Intelligence Isnât Enough: Why Energy & Compute Decide the AGI Race â Eiso Kant",guest:{name:"Eiso Kant",role:"Co-CEO & Co-Founder, Poolside"},publishedAt:"2025-11-06T11:00:01.000Z",durationLabel:"1h 6m",thumbnail:"https://i.ytimg.com/vi/6lmuo8RD-Rs/maxresdefault.jpg",summary:"Eiso Kant is the Co-CEO & Co-Founder at Poolside. We cover why Poolside is building a 2-gigawatt campus because energy and data centers, not chips, constrain compute; why a 250-megawatt facility can cost about $8 billion; and why reverse-engineering the web into the thoughts and actions behind it could create a generalized reinforcement-learning objective.",tags:["AI infrastructure","data centers","reinforcement learning","AI agents","frontier models"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:98,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3988,assemblyAiCostUsd:.166}},{id:"qp9EXiyX-f4",slug:"state-of-ai-2025-with-nathan-benaich-power-deals-reasoning-breakthroughs-real-re",episodeNumber:null,title:"State of AI 2025 with Nathan Benaich: Power Deals, Reasoning Breakthroughs, Real Revenue",guest:{name:"Nathan Benaich",role:"Founder and General Partner, Air Street Capital"},publishedAt:"2025-10-30T08:00:01.000Z",durationLabel:"1h 3m",thumbnail:"https://i.ytimg.com/vi/qp9EXiyX-f4/maxresdefault.jpg",summary:"Nathan Benaich is the Founder and General Partner at Air Street Capital. We cover why reasoning models reach gold-medal performance at the International Math Olympiad, why AI subscription retention in Ramp's customer set rises from about 50% to 80% after 12 months since 2022, and why a 1-gigawatt AI data center costs roughly $50 billion in capex.",tags:["AI reasoning","AI economics","data centers","AI chips","AI agents"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:95,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3795,assemblyAiCostUsd:.158}},{id:"gTlxCrsUcFM",slug:"are-we-misreading-the-ai-exponential-julian-schrittwieser-on-move-37-scaling-rl-",episodeNumber:null,title:"Are We Misreading the AI Exponential? Julian Schrittwieser on Move 37 & Scaling RL (Anthropic)",guest:{name:"Julian Schrittwieser",role:"AI researcher, Anthropic"},publishedAt:"2025-10-23T11:30:00.000Z",durationLabel:"1h 10m",thumbnail:"https://i.ytimg.com/vi/gTlxCrsUcFM/maxresdefault.jpg",summary:"Julian Schrittwieser is the AI researcher at Anthropic. We cover why benchmark trends suggest top models can independently complete a full day of work within two years, why RL makes agents robust by training on their own failures and recoveries, and why he expects models to reach Nobel-level scientific insight by 2027 or 2028.",tags:["AI scaling","reinforcement learning","AI agents","AlphaGo","AI safety"],chapterCount:28,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:89,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4196,assemblyAiCostUsd:.175}},{id:"RqWIvvv3SnQ",slug:"how-gpt-5-thinks-openai-vp-of-research-jerry-tworek",episodeNumber:null,title:"How GPT-5 Thinks â OpenAI VP of Research Jerry Tworek",guest:{name:"Jerry Tworek",role:"VP of Research, OpenAI"},publishedAt:"2025-10-16T08:00:00.000Z",durationLabel:"1h 16m",thumbnail:"https://i.ytimg.com/vi/RqWIvvv3SnQ/maxresdefault.jpg",summary:"Jerry Tworek is the VP of Research at OpenAI. We cover why chain of thought lets models turn hard questions into step-by-step computations, why o1 was mostly a puzzle-solving demonstration while o3 became useful through tools and persistence, and why reinforcement learning needs pre-training but corrects limitations pre-training cannot resolve.",tags:["reasoning models","reinforcement learning","chain of thought","OpenAI research","AI agents"],chapterCount:25,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:92,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4564,assemblyAiCostUsd:.19}},{id:"FQy4YMYFLsI",slug:"sonnet-4-5-the-ai-plateau-myth-sholto-douglas-anthropic",episodeNumber:null,title:"Sonnet 4.5 & the AI Plateau Myth â Sholto Douglas (Anthropic)",guest:{name:"Sholto Douglas",role:"AI researcher, Anthropic"},publishedAt:"2025-10-02T11:22:53.000Z",durationLabel:"1h 10m",thumbnail:"https://i.ytimg.com/vi/FQy4YMYFLsI/maxresdefault.jpg",summary:"Sholto Douglas is the AI researcher at Anthropic. We cover why Sonnet can surpass an earlier Opus because mid-tier models iterate faster, how reinforcement learning and test-time compute create a new scaling axis for reasoning, and why 30-hour coding agents depend on memory and self-correction rather than raw programming ability.",tags:["Anthropic","Sonnet 4.5","AI agents","Reinforcement learning","Coding"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:87,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4203,assemblyAiCostUsd:.175}},{id:"vXcDBaKz2IU",slug:"goodbye-excel-ai-agents-for-self-driving-finance-pigment-ceo",episodeNumber:null,title:"Goodbye Excel? AI Agents for Self-Driving Finance â Pigment CEO",guest:{name:"Eléonore Crespo",role:"Co-CEO, Pigment"},publishedAt:"2025-09-11T11:30:00.000Z",durationLabel:"1h 6m",thumbnail:"https://i.ytimg.com/vi/vXcDBaKz2IU/maxresdefault.jpg",summary:"Eléonore Crespo is the Co-CEO at Pigment. We cover why Pigment separates its Analyst, Modeler, and Planner agents before coordinating them with a supervisor, how structured data and audit trails make agent calculations verifiable, and why Excel survives for years because enterprise adoption lags innovation.",tags:["AI agents","enterprise finance","autonomous planning","structured data","Excel"],chapterCount:27,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:94,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3946,assemblyAiCostUsd:.164}},{id:"IGx3lXJ9i0s",slug:"ai-videos-wild-year-runway-ceo-on-whats-next",episodeNumber:null,title:"AI Videoâs Wild Year â Runway CEO on Whatâs Next",guest:{name:"Cristóbal Valenzuela",role:"CEO & Co-Founder, Runway"},publishedAt:"2025-09-04T17:35:18.000Z",durationLabel:"1h 5m",thumbnail:"https://i.ytimg.com/vi/IGx3lXJ9i0s/maxresdefault.jpg",summary:"Cristóbal Valenzuela is the CEO & Co-Founder at Ru
426nway. We cover Runway's AI Film Festival growing from 300 submissions to roughly 6,000 and IMAX screenings, why AI tools can give VFX artists weekends back by speeding late-stage edits, and why generalist video models can modify footage from video and annotations rather than text alone.",tags:["AI video","Runway","generative AI","VFX","creative tools"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:83,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3897,assemblyAiCostUsd:.162}},{id:"IcbuTTVUY7M",slug:"how-to-build-a-beloved-ai-product-granola-ceo-chris-pedregal",episodeNumber:null,title:"How to Build a Beloved AI Product - Granola CEO Chris Pedregal",guest:{name:"Chris Pedregal",role:"Co-founder & CEO, Granola"},publishedAt:"2025-08-21T11:30:01.000Z",durationLabel:"1h 8m",thumbnail:"https://i.ytimg.com/vi/IcbuTTVUY7M/maxresdefault.jpg",summary:"Chris Pedregal is the Co-founder & CEO at Granola. We cover why Granola skips meeting bots and stored audio to feel less invasive, how the team spent a year in stealth before launch and cut half its features, and why it favors costly full-context analysis over retrieval for questions that span thousands of meetings.",tags:["AI productivity","Meeting notes","Product design","AI agents","Startup building"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:90,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4108,assemblyAiCostUsd:.171}},{id:"G4yZiAdOBJM",slug:"anthropic-s-surprise-hit-how-claude-code-became-an-ai-coding-powerhouse",episodeNumber:null,title:"Anthropic's Surprise Hit: How Claude Code Became an AI Coding Powerhouse",guest:{name:"Boris Cherny",role:"Creator of Claude Code, Anthropic"},publishedAt:"2025-08-07T11:30:46.000Z",durationLabel:"1h 0m",thumbnail:"https://i.ytimg.com/vi/G4yZiAdOBJM/maxresdefault.jpg",summary:"Boris Cherny is the Creator of Claude Code at Anthropic. We cover why giving Claude a Bash tool made a terminal prototype start coding, how Claude Code searches codebases with repeated simple file searches rather than RAG indexing, and why Anthropic's technical onboarding falls from weeks to a few days.",tags:["Claude Code","AI coding agents","Anthropic","developer tools","agentic AI"],chapterCount:19,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:79,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3616,assemblyAiCostUsd:.151}},{id:"3tDIDy9Z-7k",slug:"ex-deepmind-researcher-misha-laskin-on-enterprise-super-intelligence-reflection-",episodeNumber:null,title:"ExâDeepMind Researcherâ¯Mishaâ¯Laskin on Enterprise SuperâIntelligenceâ¯|â¯Reflectionâ¯AI",guest:{name:"Misha Laskin",role:"Co-founder and CEO, Reflection AI"},publishedAt:"2025-07-17T11:31:25.000Z",durationLabel:"1h 6m",thumbnail:"https://i.ytimg.com/vi/3tDIDy9Z-7k/maxresdefault.jpg",summary:"Misha Laskin is the Co-founder and CEO at Reflection AI. We cover why organizational superintelligence should function as an oracle, why code agents without context become L9 engineers with amnesia, and how Asimov combines code, chats, docs, and project tools into team-wide memory.",tags:["AI agents","coding agents","enterprise AI","reinforcement learning","organizational memory"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:97,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3989,assemblyAiCostUsd:.166}},{id:"nvwglW-PRYI",slug:"the-rise-of-agentic-commerce-emily-glassberg-sands-stripe",episodeNumber:null,title:"The Rise of Agentic Commerce â Emily Glassberg Sands (Stripe)",guest:{name:"Emily Glassberg Sands",role:"Head of Information, Stripe"},publishedAt:"2025-07-10T11:30:00.000Z",durationLabel:"1h 15m",thumbnail:"https://i.ytimg.com/vi/nvwglW-PRYI/maxresdefault.jpg",summary:"Emily Glassberg Sands is the Head of Information at Stripe. We cover how Stripeâs payment foundation model lifted card-testing detection from 59% to 97%, why agentic commerce requires merchants to expose machine-readable intent and product data, and how top AI companies on Stripe reach $30 million in annualized revenue in about 18 months versus 5.5 years for earlier Sa
426aS startups.",tags:["Stripe","payment AI","agentic commerce","fraud detection","AI startups"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:86,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4514,assemblyAiCostUsd:.188}},{id:"m1GMZ587aH8",slug:"ai-engineering-revolution-winners-chaos-whats-next-firstmark",episodeNumber:null,title:"AI Engineering Revolution: Winners, Chaos & Whatâs Next | FirstMark",guest:{name:"David Waltcher",role:"Partner, FirstMark Capital"},publishedAt:"2025-07-03T11:30:01.000Z",durationLabel:"50 min",thumbnail:"https://i.ytimg.com/vi/m1GMZ587aH8/maxresdefault.jpg",summary:"David Waltcher is the Partner at FirstMark Capital. We cover why AI code generation raises engineering throughput by 30% to 50%, why senior engineers are becoming professional code reviewers as commit volume rises, and why fragile CI/CD, security vulnerabilities, and overwhelmed QA create the next generation of developer-tool opportunities.",tags:["AI engineering","Developer tools","Code generation","DevOps","CTO strategy"],chapterCount:14,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:61,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2993,assemblyAiCostUsd:.125}},{id:"zhA7OMw4njw",slug:"guillermo-rauch-why-software-development-will-never-be-the-same",episodeNumber:null,title:"Guillermo Rauch: Why Software Development Will Never Be the Same",guest:{name:"Guillermo Rauch",role:"CEO, Vercel"},publishedAt:"2025-06-26T11:30:00.000Z",durationLabel:"1h 46m",thumbnail:"https://i.ytimg.com/vi/zhA7OMw4njw/maxresdefault.jpg",summary:"Guillermo Rauch is the CEO at Vercel. We cover how v0 surpassed 100 million a
426pp generations by making software creation accessible to anyone with an idea, why vibe coding prioritizes product feedback while mission-critical systems still require agentic engineering, and how MCP could become the protocol through which agents connect companiesâ data and services.",tags:["v0","vibe coding","AI agents","MCP","Vercel"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:115,requests:0,inputTokens:0,outputTokens:0,audioSeconds:6340,assemblyAiCostUsd:.264}},{id:"qOYkpLdYIIU",slug:"inside-canvas-3b-arr-ai-design-rocketship-cto-brendan-humphreys-on-magic-studio-",episodeNumber:null,title:"Inside Canvaâs $3B ARR AI Design Rocketship â CTO Brendan Humphreys on Magic Studio & Canva Code",guest:{name:"Brendan Humphreys",role:"Head of Engineering, Canva"},publishedAt:"2025-06-20T10:17:01.000Z",durationLabel:"57 min",thumbnail:"https://i.ytimg.com/vi/qOYkpLdYIIU/maxresdefault.jpg",summary:"Brendan Humphreys is the Head of Engineering at Canva. We cover how Canva shipped Canva Code from idea to production in about three months, why engineers must own and understand AI-generated code, and how intentional technical debt enabled Canva to reach product-market fit before a two-year editor rebuild.",tags:["Canva","AI product development","AI coding","Engineering leadership","Technical debt"],chapterCount:19,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:71,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3398,assemblyAiCostUsd:.142}},{id:"Gp-oPGYrQDs",slug:"github-ceo-the-ai-coding-gold-rush-vibe-coding-cursor",episodeNumber:null,title:"GitHub CEO: The AI Coding Gold Rush, Vibe Coding & Cursor",guest:{name:"Thomas Dohmke",role:"CEO, GitHub"},publishedAt:"2025-06-12T11:30:00.000Z",durationLabel:"1h 5m",thumbnail:"https://i.ytimg.com/vi/Gp-oPGYrQDs/maxresdefault.jpg",summary:"Thomas Dohmke is the CEO at GitHub. We cover why GitHub's $7.5 billion acquisition helped turn $200 million in ARR into more than $2 billion, why MCP and tool calls beat fine-tuning for keeping agents current on enterprise codebases, and why coding agents work best when they submit pull requests for developers to review.",tags:["GitHub Copilot","AI coding agents","developer tools","MCP","Microsoft"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:81,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3886,assemblyAiCostUsd:.162}},{id:"wGmfhn1n6GA",slug:"inside-the-paper-that-changed-ai-forever-cohere-ceo-aidan-gomez-on-2025-agents",episodeNumber:null,title:"Inside the Paper That Changed AI Forever - Cohere CEO Aidan Gomez on 2025 Agents",guest:{name:"Aidan Gomez",role:"CEO, Cohere"},publishedAt:"2025-06-05T11:30:00.000Z",durationLabel:"1h 2m",thumbnail:"https://i.ytimg.com/vi/wGmfhn1n6GA/maxresdefault.jpg",summary:"Aidan Gomez is the CEO at Cohere. We cover why transformers remain dominant because infrastructure and chips are optimized for them, why reasoning models deliver a large intelligence uplift at far less cost than pre-training, and how agents can cut financial research and hedge proposals from weeks to four or eight hours.",tags:["Transformers","Reasoning models","Enterprise AI","AI agents","Synthetic data"],chapterCount:24,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:76,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3744,assemblyAiCostUsd:.156}},{id:"MCMxSFoINUE",slug:"ai-that-ends-busy-work-hebbia-ceo-on-agent-employees",episodeNumber:null,title:"AI That Ends Busy Work â Hebbia CEO on âAgent Employeesâ",guest:{name:"George Sivulka",role:"Founder and CEO, Hebbia"},publishedAt:"2025-05-29T11:30:00.000Z",durationLabel:"48 min",thumbnail:"https://i.ytimg.com/vi/MCMxSFoINUE/maxresdefault.jpg",summary:"George Sivulka is the Founder and CEO at Hebbia. We cover why AI agents become nodes on the org chart, why general-purpose AI outperforms narrowly vertical tools, and how Hebbiaâs Matr
426ix platform combines preprocessed documents with recursive decomposition instead of relying on RAG alone.",tags:["AI agents","enterprise AI","knowledge work","RAG","organizational design"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:62,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2904,assemblyAiCostUsd:.121}},{id:"7s-uWHNn5Xc",slug:"ai-eats-the-world-benedict-evans-on-what-really-matters-now",episodeNumber:null,title:"AI Eats the World: Benedict Evans on What Really Matters Now",guest:{name:"Benedict Evans",role:"Independent analyst"},publishedAt:"2025-05-22T12:29:53.000Z",durationLabel:"1h 15m",thumbnail:"https://i.ytimg.com/vi/7s-uWHNn5Xc/maxresdefault.jpg",summary:"Benedict Evans is an Independent analyst. We cover why state-of-the-art models are becoming commodities while consumer mindshare remains concentrated in ChatGPT, why probabilistic AI requires products to manage error rates rather than treat models as oracles, and why enterprises have largely completed AIâs first wave of automation but have not found its next category-defining use cases.",tags:["AI models","Enterprise AI","AI adoption","Consumer AI","AI distribution"],chapterCount:17,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:118,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4509,assemblyAiCostUsd:.188}},{id:"MbHL0uvKYbE",slug:"jeremy-howard-on-building-5-000-ai-products-with-14-people-answer-ai-deep-dive",episodeNumber:null,title:"Jeremy Howard on Building 5,000 AI Products with 14 People (Answer AI Deep-Dive)",guest:{name:"Jeremy Howard",role:"Co-founder, Answer AI"},publishedAt:"2025-05-15T11:30:00.000Z",durationLabel:"55 min",thumbnail:"https://i.ytimg.com/vi/MbHL0uvKYbE/maxresdefault.jpg",summary:"Jeremy Howard is the Co-founder at Answer AI. We cover why Qwen and DeepSeek offer production flexibility commercial models cannot match, why autonomous coding agents like Devin produce slower and less maintainable software than shared human-AI workflows, and how a 12-to-14-person team aims to build thousands of AI products without scaling headcount.",tags:["Open-source AI","AI agents","Answer AI","Human-AI collaboration","AI product development"],chapterCount:17,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:82,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3302,assemblyAiCostUsd:.138}},{id:"4W_gXrBgQPk",slug:"why-influx-rebuilt-its-database-for-the-iot-and-robotics-explosion",episodeNumber:null,title:"Why Influx Rebuilt Its Database for the IoT and Robotics Explosion",guest:{name:"Paul Dix",role:"Founder and CTO, InfluxData"},publishedAt:"2025-05-08T11:31:28.000Z",durationLabel:"36 min",thumbnail:"https://i.ytimg.com/vi/4W_gXrBgQPk/maxresdefault.jpg",summary:"Paul Dix is the Founder and CTO at InfluxData. We cover why InfluxDB rebuilt in Rust to handle cardinality and separate compute from object storage, why the company abandoned Flux in favor of SQL, and how Tesla Powerwalls use time-series data to trade energy in four-second intervals.",tags:["time series databases","IoT","Rust","SQL","open source"],chapterCount:7,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:61,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2135,assemblyAiCostUsd:.089}},{id:"ilxmOBmVk8k",slug:"dashboards-are-dead-sigmas-bi-revolution-for-trillion-row-data",episodeNumber:null,title:"Dashboards Are Dead: Sigmaâs BI Revolution for Trillion-Row Data",guest:{name:"Mike Palmer",role:"CEO, Sigma Computing"},publishedAt:"2025-05-01T11:30:00.000Z",durationLabel:"42 min",thumbnail:"https://i.ytimg.com/vi/ilxmOBmVk8k/maxresdefault.jpg",summary:"Mike Palmer is the CEO at Sigma Computing. We cover why dashboards turn data into wrapping paper while spreadsheets remain how most people work, how Sigma runs live warehouse queries without caching to create six-billion-row pivot tables, and why AI data assistants need to show their sources and calculations because text-to-SQL answers are not trustworthy.",tags:["business intelligence","data warehouses","spreadsheet analytics","Snowflake","Databricks","AI analytics"],chapterCount:15,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:69,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2492,assemblyAiCostUsd:.104}},{id:"1csags-vTCI",slug:"gleans-breakthrough-ceo-arvind-jain-on-scaling-ai-agents-search",episodeNumber:null,title:"Gleanâs Breakthrough: CEO Arvind Jain on Scaling AI Agents & Search",guest:{name:"Arvind Jain",role:"CEO, Glean"},publishedAt:"2025-04-24T11:33:14.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/1csags-vTCI/maxresdefault.jpg",summary:"Arvind Jain is the CEO at Glean. We cover why enterprises start with closed models before distilling open-source models at scale, why agents still require human supervision despite reducing contract redlining from two weeks to one minute, and how Glean ranks enterprise knowledge using permissions, recency, and human behavior.",tags:["AI agents","enterprise search","open-source AI","LLMs","automation"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:68,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3131,assemblyAiCostUsd:.13}},{id:"7W-kb28nh6s",slug:"boxs-big-ai-leap-aaron-levie-on-agents-the-future-of-work",episodeNumber:null,title:"Boxâs Big AI Leap: Aaron Levie on Agents & the Future of Work",guest:{name:"Aaron Levie",role:"CEO and co-founder, Box"},publishedAt:"2025-04-17T16:52:43.000Z",durationLabel:"1h 16m",thumbnail:"https://i.ytimg.com/vi/7W-kb28nh6s/maxresdefault.jpg",summary:"Aaron Levie is the CEO and co-founder at Box. We cover why AI adoption faces less philosophical resistance than cloud, why Bo
426x uses focused Hubs to reduce data sprawl and unconstrained queries, and why agents remain safest for short, reviewable tasks because bad search and permissions can compound errors.",tags:["Enterprise AI","AI agents","Data governance","RAG","Box"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:89,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4546,assemblyAiCostUsd:.189}},{id:"qF2PsdSxlXI",slug:"snowflake-ceo-on-winning-the-ai-arms-race",episodeNumber:null,title:"Snowflake CEO on Winning the AI Arms Race",guest:{name:"Sridhar Ramaswamy",role:"CEO, Snowflake"},publishedAt:"2025-04-10T19:57:22.000Z",durationLabel:"1h 24m",thumbnail:"https://i.ytimg.com/vi/qF2PsdSxlXI/maxresdefault.jpg",summary:"Sridhar Ramaswamy is the CEO at Snowflake. We cover why AI needs governed, analytics-ready data rather than raw logs or vector indexes alone, why Snowflake embraces Iceberg despite the risk to storage revenue, and why Cortex Analyst prioritizes high-precision answers over attempting to answer every business question.",tags:["enterprise AI","data strategy","Apache Iceberg","Cortex Analyst","AI search"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:103,requests:0,inputTokens:0,outputTokens:0,audioSeconds:5021,assemblyAiCostUsd:.209}},{id:"qzb1y9gT0Sg",slug:"chasing-real-agi-inside-arc-prize-2025-with-chollet-knoop",episodeNumber:null,title:"Chasing Real AGI: Inside ARC Prize 2025 with Chollet & Knoop",guest:{name:"François Chollet",role:"Co-founder, ARC Prize and Ndea"},publishedAt:"2025-04-03T11:34:00.000Z",durationLabel:"1h 1m",thumbnail:"https://i.ytimg.com/vi/qzb1y9gT0Sg/maxresdefault.jpg",summary:"François Chollet is the Co-founder at ARC Prize and Ndea. We cover why ARC measures adaptation to novel problems rather than memorized skills, how test-time search drives major gains at far higher inference costs, and why ARC-AGI 2 tasks take humans about five minutes while base LLMs score 0%.",tags:["ARC-AGI","fluid intelligence","test-time adaptation","program synthesis","AI benchmarks"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:92,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3645,assemblyAiCostUsd:.152}},{id:"wbhGAc_itMg",slug:"why-this-ex-meta-leader-is-rethinking-ai-infrastructure-lin-qiao-ceo-fireworks-a",episodeNumber:null,title:"Why This Ex-Meta Leader is Rethinking AI Infrastructure | Lin Qiao, CEO, Fireworks AI",guest:{name:"Lin Qiao",role:"CEO, Fireworks AI"},publishedAt:"2025-03-27T11:30:00.000Z",durationLabel:"59 min",thumbnail:"https://i.ytimg.com/vi/wbhGAc_itMg/maxresdefault.jpg",summary:"Lin Qiao is the CEO at Fireworks AI. We cover why GenAI lets companies start building without an ML team, how Fireworks searches more than 80,000 configurations across quality, speed, and cost, and why AI infrastructure costs should fall by an order of magnitude to prevent startups from scaling to bankruptcy.",tags:["GenAI infrastructure","LLM inference","PyTorch","AI agents","Open models"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:73,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3554,assemblyAiCostUsd:.148}},{id:"v1QycrXdfeE",slug:"top-ai-researcher-on-gpt-4-5-deepseek-and-agentic-rag-douwe-kiela-ceo-contextual",episodeNumber:null,title:"Top AI Researcher on GPT 4.5, DeepSeek and Agentic RAG | Douwe Kiela, CEO, Contextual AI",guest:{name:"Douwe Kiela",role:"CEO, Contextual AI"},publishedAt:"2025-03-06T11:30:00.000Z",durationLabel:"51 min",thumbnail:"https://i.ytimg.com/vi/v1QycrXdfeE/maxresdefault.jpg",summary:"Douwe Kiela is the CEO at Contextual AI. We cover why DeepSeek is an existence proof that synthetic data can produce near-frontier models, why RAG, fine-tuning, and long context solve complementary problems, and why enterprise AI needs audit trails and uncertainty flags rather than 100% accuracy.",tags:["DeepSeek","RAG","Synthetic Data","Enterprise AI","AI Agents"],chapterCount:20,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:59,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3044,assemblyAiCostUsd:.127}},{id:"Fcyqh2UhGDM",slug:"empowering-millions-of-creators-with-ai-video-editing-gaurav-misra-ceo-captions",episodeNumber:null,title:"Empowering Millions of Creators with AI Video E
426diting | Gaurav Misra, CEO, Captions",guest:{name:"Gaurav Misra",role:"CEO, Captions"},publishedAt:"2025-02-20T11:30:00.000Z",durationLabel:"1h 13m",thumbnail:"https://i.ytimg.com/vi/Fcyqh2UhGDM/maxresdefault.jpg",summary:"Gaurav Misra is the CEO at Captions. We cover why Captions targets people who do not want to learn professional editing, how it uses AI to generate and edit talking-head footage, and why the company breaks videos into overlapping one-second segments to cut generation times to two or three minutes.",tags:["AI video","video editing","AI avatars","creator tools","generative AI"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:102,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4394,assemblyAiCostUsd:.183}},{id:"DgE8gk3pPeg",slug:"farewell-chatbots-ai-agents-are-taking-over-customer-service-mike-murchison-ceo-",episodeNumber:null,title:"Farewell, Chatbots: AI Agents Are Taking Over Customer Service | Mike Murchison, CEO, Ada",guest:{name:"Mike Murchison",role:"CEO, Ada"},publishedAt:"2025-02-13T11:30:00.000Z",durationLabel:"1h 11m",thumbnail:"https://i.ytimg.com/vi/DgE8gk3pPeg/maxresdefault.jpg",summary:"Mike Murchison is the CEO at Ada. We cover why value in AI increasingly sits at the application layer because controlling, measuring, and improving models is complex, how Ada orchestrates seven to nine models to plan and resolve an inquiry, and why measuring resolution rather than deflection can let agents autonomously resolve up to 85% of conversations.",tags:["AI agents","customer service","AI customer experience","model orchestration","customer support"],chapterCount:23,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:82,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4287,assemblyAiCostUsd:.179}},{id:"9xhDL2GbzaU",slug:"the-ai-coding-agent-revolution-the-future-of-software-techno-optimism-amjad-masa",episodeNumber:null,title:"The AI Coding Agent Revolution, The Future of Software, Techno-Optimism | Amjad Masad, CEO, Replit",guest:{name:"Amjad Masad",role:"CEO, Replit"},publishedAt:"2025-02-06T11:30:00.000Z",durationLabel:"1h 30m",thumbnail:"https://i.ytimg.com/vi/9xhDL2GbzaU/maxresdefault.jpg",summary:"Amjad Masad is the CEO at Replit. We cover why Replit builds a human-in-the-loop coding agent rather than a fully autonomous one, why easier software creation shifts the bottleneck from execution to ideas, and why he expects AI to reduce demand for long-tail SaaS while keeping professional software engineers.",tags:["AI coding agents","software engineering","Replit Agent","AI-generated software","techno-optimism"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:110,requests:0,inputTokens:0,outputTokens:0,audioSeconds:5379,assemblyAiCostUsd:.224}},{id:"tmbBSD_OeMk",slug:"trino-iceberg-and-the-battle-for-the-lakehouse-justin-borgman-ceo-starburst",episodeNumber:null,title:"Trino, Iceberg and the Battle for the Lakehouse | Justin Borgman, CEO, Starburst",guest:{name:"Justin Borgman",role:"CEO, Starburst"},publishedAt:"2025-01-30T11:30:00.000Z",durationLabel:"1h 6m",thumbnail:"https://i.ytimg.com/vi/tmbBSD_OeMk/maxresdefault.jpg",summary:"Justin Borgman is the CEO at Starburst. We cover why lakehouse performance has closed the gap with traditional warehouses after 15 years, why Iceberg remains independent despite Databricksâ Tabular acquisition, and why complex enterprise data infrastructure resists a true product-led growth motion.",tags:["Trino","Apache Iceberg","Lakehouse","Data infrastructure","Open source"],chapterCount:24,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:93,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3984,assemblyAiCostUsd:.166}},{id:"Z34tC4R31oo",slug:"understanding-data-engineering-in-2025-ben-rogojan-seattle-data-guy",episodeNumber:null,title:"Understanding Data Engineering in 2025 | Ben Rogojan, Seattle Data Guy",guest:{name:"Ben Rogojan",role:"Data engineering consultant, Seattle Data Guy"},publishedAt:"2025-01-23T11:30:00.000Z",durationLabel:"1h 2m",thumbnail:"https://i.ytimg.com/vi/Z34tC4R31oo/maxresdefault.jpg",summary:"Ben Rogojan is the Data engineering consultant at Seattle Data Guy. We cover why data engineering turns disparate sources into reliable datasets, how Iceberg lets companies separate data storage from compute engines, and why AI accelerates basic tasks but still needs engineers to prevent faulty models and exposed data.",tags:["data engineering","Apache Iceberg","AI engineering","data infrastru
426cture","Snowflake"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:97,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3744,assemblyAiCostUsd:.156}},{id:"p7F4f42iZ-c",slug:"what-you-must-know-about-ai-engineering-in-2025-chip-huyen-author-of-ai-engineer",episodeNumber:null,title:"What You MUST Know About AI Engineering in 2025 | Chip Huyen, Author of âAI Engineeringâ",guest:{name:"Chip Huyen",role:"Author, AI Engineering"},publishedAt:"2025-01-16T11:30:00.000Z",durationLabel:"1h 13m",thumbnail:"https://i.ytimg.com/vi/p7F4f42iZ-c/maxresdefault.jpg",summary:"Chip Huyen is the Author, AI Engineering. We cover why evaluation is the biggest bottleneck to AI adoption, why RAG remains necessary even with million-token contexts, and why training data for agent planning is difficult because human-efficient plans differ from AI-efficient ones.",tags:["AI engineering","AI evaluation","RAG","AI agents","prompt engineering"],chapterCount:24,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:92,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4355,assemblyAiCostUsd:.181}},{id:"GYxQBqgiWAg",slug:"dataiku-s-secret-to-scaling-ai-in-global-enterprises-florian-douetteau-ceo-datai",episodeNumber:null,title:"Dataiku's Secret to Scaling AI in Global Enterprises | Florian Douetteau, CEO, Dataiku",guest:{name:"Florian Douetteau",role:"Co-founder and CEO, Dataiku"},publishedAt:"2024-12-12T11:30:00.000Z",durationLabel:"53 min",thumbnail:"https://i.ytimg.com/vi/GYxQBqgiWAg/maxresdefault.jpg",summary:"Florian Douetteau is the Co-founder and CEO at Dataiku. We cover why enterprises need one platform for analytics, predictive models, and agents, why scaling hundreds of agents makes centralized guardrails and cost controls essential, and why generative AI will not replace predictive models built to optimize specific business decisions.",tags:["Enterprise AI","Generative AI","AI agents","MLOps","Data platforms"],chapterCount:14,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:74,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3186,assemblyAiCostUsd:.133}},{id:"7vremCZB2LE",slug:"building-the-easy-button-for-generative-ai-may-habib-ceo-writer",episodeNumber:null,title:"Building the Easy Button for Generative AI | May Habib, CEO, Writer",guest:{name:"May Habib",role:"CEO and co-founder, Writer"},publishedAt:"2024-11-21T11:30:00.000Z",durationLabel:"36 min",thumbnail:"https://i.ytimg.com/vi/7vremCZB2LE/maxresdefault.jpg",summary:"May Habib is the CEO and co-founder at Writer. We cover why graph-based retrieval handles complex enterprise documents without preprocessing, why production-grade AI requires business logic beyond prompting, and why autonomous action starts with the most knowledge-intensive nodes in a workflow.",tags:["enterprise AI","RAG","AI guardrails","AI agents","generative AI"],chapterCount:12,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:55,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2152,assemblyAiCostUsd:.09}},{id:"c_87fwKmkjM",slug:"state-of-ai-2024-frontier-models-ai-geopolitics-and-the-robotics-renaissance-nat",episodeNumber:null,title:"State of AI 2024: Frontier Models, AI Geopolitics and The Robotics Renaissance | Nathan Benaich, Founder, Air Street Capital",guest:{name:"Nathan Benaich",role:"Founder and General Partner, Air Street Capital"},publishedAt:"2024-11-14T11:30:00.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/c_87fwKmkjM/maxresdefault.jpg",summary:"Nathan Benaich is the Founder and General Partner at Air Street Capital. We cover why closed models retain demand despite open-source downloads, how vision-language models let warehouse robots generalize across customers and shorten go-live times, and why European AI regulation has delayed products such as Claude and Advanced Voice Mode.",tags:["Foundation models","AI robotics","Open source AI","AI regulation","AI investing"],chapterCount:11,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:77,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3099,assemblyAiCostUsd:.129}},{id:"vQUMydShPSs",slug:"superintelligence-bubbles-and-big-bets-ai-investing-in-2024-matt-turck-aman-kabe",episodeNumber:null,title:"Superintelligence, Bubbles And Big Bets: AI Investing in 2024 | Matt Turck & Aman Kabeer, FirstMark",guest:{name:"Aman Kabeer",role:"Partner, FirstMark"},publishedAt:"2024-11-08T12:19:03.000Z",durationLabel:"1h 10m",thumbnail:"https://i.ytimg.com/vi/vQUMydShPSs/maxresdefault.jpg",summary:"Aman Kabeer is the Partner at FirstMark. We cover why AI startups reach $30 million in ARR five times faster than earlier Sa
426aS companies, how roughly $40 billion in valuations sits against less than $100 million in revenue, and why 62% of CTOs who adopted AI report being underwhelmed by its impact.",tags:["AI investing","AI valuations","enterprise AI","SaaS","AI startups"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:84,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4178,assemblyAiCostUsd:.174}},{id:"j-kMDPAtQUc",slug:"can-ai-infrastructure-work-like-magic-erik-bernhardsson-ceo-modal",episodeNumber:null,title:"Can AI Infrastructure Work Like Magic? | Erik Bernhardsson, CEO, Modal",guest:{name:"Erik Bernhardsson",role:"CEO, Modal"},publishedAt:"2024-10-31T11:30:00.000Z",durationLabel:"56 min",thumbnail:"https://i.ytimg.com/vi/j-kMDPAtQUc/maxresdefault.jpg",summary:"Erik Bernhardsson is the CEO at Modal. We cover why serverless fits bursty AI workloads better than traditional web services, why Modal replaced Kubernetes and Docker to start containers in seconds, and why inference spending will eventually exceed training spending.",tags:["AI infrastructure","serverless","GPU compute","model inference","developer tools"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:102,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3367,assemblyAiCostUsd:.14}},{id:"MEQu3Sgwjr8",slug:"the-death-of-big-data-and-why-its-time-to-think-small-jordan-tigani-ceo-motherdu",episodeNumber:null,title:"The Death of Big Data and Why Itâs Time To Think Small | Jordan Tigani, CEO, MotherDuck",guest:{name:"Jordan Tigani",role:"CEO, MotherDuck"},publishedAt:"2024-10-24T11:49:47.000Z",durationLabel:"59 min",thumbnail:"https://i.ytimg.com/vi/MEQu3Sgwjr8/maxresdefault.jpg",summary:"Jordan Tigani is the CEO at MotherDuck. We cover why most big data workloads query only a hot slice of archived data, how distributed systems can add roughly 400 milliseconds of overhead where local queries run in single-digit milliseconds, and why MotherDuck splits query plans between local DuckDB instances and the cloud for 60-frames-per-second interfaces.",tags:["Small Data","DuckDB","Data Warehousing","Query Performance","MotherDuck"],chapterCount:15,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:79,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3540,assemblyAiCostUsd:.147}},{id:"c7Maiq84GVQ",slug:"the-4-5b-platform-driving-the-open-source-ai-revolution-clem-delangue-ceo-huggin",episodeNumber:null,title:"The $4.5B Platform Driving the Open Source AI Revolution | Clem Delangue, CEO, Hugging Face",guest:{name:"Clément Delangue",role:"Co-founder and CEO, Hugging Face"},publishedAt:"2024-10-17T11:30:00.000Z",durationLabel:"1h 7m",thumbnail:"https://i.ytimg.com/vi/c7Maiq84GVQ/maxresdefault.jpg",summary:"Clément Delangue is the Co-founder and CEO at Hugging Face. We cover why open-source models outperform closed systems for narrow text applications, why Chinese labs now lead open-source AI across many modalities, and why enterprises often move from large models to smaller specialized ones for greater speed, control, and accuracy.",tags:["Open source AI","Hugging Face","Small language models","Enterprise AI","AI policy"],chapterCount:15,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:79,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4022,assemblyAiCostUsd:.168}},{id:"YK2Be7LcaK8",slug:"agi-the-future-of-ai-agents-and-the-next-wave-of-opportunities-in-ai-richard-soc",episodeNumber:null,title:"AGI, The Future of AI Agents And The Next Wave of Opportunities in AI | Richard Socher, CEO, You.com",guest:{name:"Richard Socher",role:"CEO, You.com"},publishedAt:"2024-10-10T11:30:00.000Z",durationLabel:"1h 29m",thumbnail:"https://i.ytimg.com/vi/YK2Be7LcaK8/maxresdefault.jpg",summary:"Richard Socher is the CEO at You.com. We cover why cheaper intelligence could expand rather than eliminate knowledge work, why enterprise AI needs retrieval and verifiable citations instead of fine-tuning alone, and why agents that execute long sequences of actions remain difficult to make reliable.",tags:["AI agents","AGI","RAG","AI search","scaling laws"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:117,requests:0,inputTokens:0,outputTokens:0,audioSeconds:5315,assemblyAiCostUsd:.221}},{id:"0wQJ-D8W1Pg",slug:"building-the-database-that-can-do-it-all-tobie-morgan-hitchcock-ceo-of-surrealdb",episodeNumber:null,title:"Building The Database That Can Do It All | Tobie Morgan Hitchcock, CEO of SurrealDB",guest:{name:"Tobie Morgan Hitchcock",role:"CEO, SurrealDB"},publishedAt:"2024-10-03T12:22:03.000Z",durationLabel:"53 min",thumbnail:"https://i.ytimg.com/vi/0wQJ-D8W1Pg/maxresdefault.jpg",summary:"Tobie Morgan Hitchcock is the CEO at SurrealDB. We cover why SurrealDB started as a way to replace four database backends, how its record IDs combine document, graph, and time-series queries without indexes, and why running models beside data avoids moving records through separate infrastru
426cture.",tags:["databases","SurrealDB","Rust","graph databases","AI infrastructure"],chapterCount:14,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:70,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3185,assemblyAiCostUsd:.133}},{id:"i33VlhgYal0",slug:"ai-at-datadog-monitoring-machines-in-the-age-of-llms-olivier-pomel-ceo-of-datado",episodeNumber:null,title:"AI at Datadog: Monitoring machines in the age of LLMs | Olivier Pomel, CEO of Datadog",guest:{name:"Olivier Pomel",role:"Co-founder and CEO of Datadog"},publishedAt:"2024-09-27T11:30:00.000Z",durationLabel:"1h 2m",thumbnail:"https://i.ytimg.com/vi/i33VlhgYal0/maxresdefault.jpg",summary:"Olivier Pomel is the Co-founder and CEO at Datadog. We cover why calling Datadog infrastructure monitoring rather than a data platform immediately unlocked traction, why most security fixes belong with development and operations teams rather than security teams, and why LLM observability is harder when model behavior is nondeterministic.",tags:["Datadog","observability","LLM monitoring","cloud security","AI infrastructure"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:77,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3690,assemblyAiCostUsd:.154}},{id:"cyqNNHyorQQ",slug:"ai-at-zoominfo-superpowering-gtm-teams-ali-dasdan-cto-zoominfo",episodeNumber:null,title:"AI at ZoomInfo: Superpowering GTM teams | Ali Dasdan, CTO, ZoomInfo",guest:{name:"Ali Dasdan",role:"CTO, ZoomInfo"},publishedAt:"2024-09-19T11:30:00.000Z",durationLabel:"46 min",thumbnail:"https://i.ytimg.com/vi/cyqNNHyorQQ/maxresdefault.jpg",summary:"Ali Dasdan is the CTO at ZoomInfo. We cover how ZoomInfo combines customer first-party data with third-party data in single-tenant environments, why Copilot tells sellers which accounts and signals to prioritize while users report saving 10 hours a week, and why the company uses external models for hundreds of emails but self-hosted Llama for 100 million website-scale tasks.",tags:["GTM AI","data platforms","sales Copilot","LLM infrastructure","ZoomInfo"],chapterCount:11,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:64,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2743,assemblyAiCostUsd:.114}},{id:"yGcXDNHYlbs",slug:"ai-at-ramp-making-every-team-radically-more-productive-eric-glyman-ceo-ramp",episodeNumber:null,title:"AI at Ramp: Making Every Team Radically More Productive | Eric Glyman, CEO, Ramp",guest:{name:"Eric Glyman",role:"Co-founder and CEO, Ramp"},publishedAt:"2024-08-01T12:07:53.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/yGcXDNHYlbs/maxresdefault.jpg",summary:"Eric Glyman is the Co-founder and CEO at Ramp. We cover why Ramp combines card transactions, receipts, and org data to make expense management a matching problem, how aggregated invoice data lets customers compare vendor prices without Ramp selling company data, and why small decentralized product teams sustain release velocity.",tags:["fintech","AI","expense management","data infrastructure","product velocity"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:71,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2933,assemblyAiCostUsd:.122}},{id:"A1PmAOVezA0",slug:"making-ai-work-fine-tuning-inference-memory-sharon-zhou-ceo-lamini",episodeNumber:null,title:"Making AI Work: Fine-Tuning, Inference, Memory | Sharon Zhou, CEO, Lamini",guest:{name:"Sharon Zhou",role:"Co-founder and CEO, Lamini"},publishedAt:"2024-07-25T11:00:00.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/A1PmAOVezA0/maxresdefault.jpg",summary:"Sharon Zhou is the Co-founder and CEO at Lamini. We cover why general-purpose models are pretty good at everything but perfect at nothing for proprietary facts, how memory tuning raised a Fortune 100 text-to-SQL system from 50% to 95% accuracy in days, and why agents making 30 LLM calls cannot realistically deliver real-time latency.",tags:["enterprise AI","memory tuning","LLM inference","fine-tuning","AI agents"],chapterCount:12,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:66,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2635,assemblyAiCostUsd:.11}},{id:"1Jiunu0Kkas",slug:"an-inside-look-at-mastering-ai-jeremy-kahn-author-ai-editor-fortune",episodeNumber:null,title:"An inside look at âMastering AIâ | Jeremy Kahn, Author & AI Editor, Fortune",guest:{name:"Jeremy Kahn",role:"AI Editor, Fortune"}
426,publishedAt:"2024-07-18T11:00:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/1Jiunu0Kkas/maxresdefault.jpg",summary:"Jeremy Kahn is the AI Editor at Fortune. We cover why ChatGPTâs stripped-down dialogue interface changed how people experienced the same underlying model, why businesses must train workers on AI failure modes and fallback procedures, and why mass unemployment is a red herring if companies use AI to complement rather than replace workers.",tags:["Mastering AI","AI interfaces","AI safety","Future of work","AI regulation"],chapterCount:11,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:67,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2918,assemblyAiCostUsd:.122}},{id:"h8-ZwxmJzSI",slug:"from-business-to-warfare-how-ai-affects-the-modern-world-azeem-azhar",episodeNumber:null,title:"From Business to Warfare: How AI Affects the Modern World | Azeem Azhar",guest:{name:"Azeem Azhar",role:"Founder, Exponential View"},publishedAt:"2024-07-02T18:30:21.000Z",durationLabel:"1h 2m",thumbnail:"https://i.ytimg.com/vi/h8-ZwxmJzSI/maxresdefault.jpg",summary:"Azeem Azhar is the Founder at Exponential View. We cover why 75% of people may use AI daily within seven years of ChatGPTâs launch, how cheap drones and information operations reduce the cost of aggression, and why solar and batteries could make energy prices fall like transistor prices.",tags:["AI adoption","AI warfare","drone swarms","renewable energy","Exponential View"],chapterCount:11,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:73,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3696,assemblyAiCostUsd:.154}},{id:"HRh5setqGCU",slug:"how-clickhouse-powers-netflix-uber-and-spotifys-analytics-aaron-katz-ceo-of-clic",episodeNumber:null,title:"How ClickHouse powers Netflix, Uber and Spotifyâs Analytics | Aaron Katz, CEO of ClickHouse",guest:{name:"Aaron Katz",role:"CEO of ClickHouse"},publishedAt:"2024-06-13T11:00:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/HRh5setqGCU/maxresdefault.jpg",summary:"Aaron Katz is the CEO at ClickHouse. We cover why analytical queries increasingly need to return in hundreds of milliseconds, why ClickHouse skipped selling open-source support to build a cloud service first, and why a self-service product motion lets companies grow globally with a small sales team.",tags:["ClickHouse","real-time analytics","open source","cloud databases","product-led growth"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:72,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2947,assemblyAiCostUsd:.123}},{id:"S8sKGsK6z_U",slug:"from-tiny-romanian-startup-to-global-ai-automation-leader-daniel-dines-ceo-of-ui",episodeNumber:null,title:"From Tiny Romanian Startup to Global AI Automation Leader | Daniel Dines, CEO of UIPath",guest:{name:"Daniel Dines",role:"Co-founder and CEO, UiPath"},publishedAt:"2024-06-01T10:44:40.000Z",durationLabel:"1h 13m",thumbnail:"https://i.ytimg.com/vi/S8sKGsK6z_U/maxresdefault.jpg",summary:"Daniel Dines is the Co-founder and CEO at UiPath. We cover how a failed consumer tool led to a $10,000 screen-reading license, why UiPath went global while still small, including Japan generating more revenue than the US in 2017, and why enterprise automation needs predictable LLMs rather than smarter ones.",tags:["UiPath","RPA","enterprise AI","process mining","LLMs"],chapterCount:15,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:85,requests:0,inputTokens:0,outputTokens:0,audioSeconds:4377,assemblyAiCostUsd:.182}},{id:"BJ0ApWIpsWc",slug:"how-airtable-is-ushering-500-000-organizations-into-the-era-of-ai-howie-liu-ceo-",episodeNumber:null,title:"How Airtable is Ushering 500,000 Organizations Into The Era of AI | Howie Liu, CEO of Airtable",guest:{name:"Howie Liu",role:"Co-founder and CEO, Airtable"},publishedAt:"2024-05-23T11:00:00.000Z",durationLabel:"1h 3m",thumbnail:"https://i.ytimg.com/vi/BJ0ApWIpsWc/maxresdefault.jpg",summary:"Howie Liu is the Co-founder and CEO at Airtable. We cover why pre-trained models become useful when embedded in data and workflows, why human-designed approval steps outperform end-to-e
426nd AI agents for complex work, and why B2B product-led growth eventually needs an enterprise narrative because top-of-funnel growth naturally linearizes.",tags:["Airtable","enterprise AI","no-code","product-led growth","enterprise software"],chapterCount:12,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:95,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3764,assemblyAiCostUsd:.157}},{id:"gU6dGmZzmvI",slug:"ai-data-and-blockchain-a-vc-perspective-tomasz-tunguz-founder-of-theory-ventures",episodeNumber:null,title:"AI, Data and Blockchain: a VC perspective | Tomasz Tunguz, Founder of Theory Ventures",guest:{name:"Tomasz Tunguz",role:"Founder, Theory Ventures"},publishedAt:"2024-05-16T11:22:19.000Z",durationLabel:"55 min",thumbnail:"https://i.ytimg.com/vi/gU6dGmZzmvI/maxresdefault.jpg",summary:"Tomasz Tunguz is the Founder at Theory Ventures. We cover why $80 billion in AI investment could account for nearly half of venture funding, why Web3 databases can justify higher costs for cryptographic guarantees around sensitive data, and why routing routine queries to specialized small models can be more practical than relying on one general-purpose LLM.",tags:["AI investing","blockchain","LLMs","data infrastructure","venture capital"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:98,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3294,assemblyAiCostUsd:.137}},{id:"In3myGOHOGo",slug:"the-9b-startup-going-after-snowflake-and-databricks-renen-hallak-from-vast-data",episodeNumber:null,title:"The $9B Startup Going After Snowflake and Databricks | Renen Hallak from VAST Data",guest:{name:"Renen Hallak",role:"Founder and CEO, VAST Data"},publishedAt:"2024-05-03T11:30:00.000Z",durationLabel:"45 min",thumbnail:"https://i.ytimg.com/vi/In3myGOHOGo/maxresdefault.jpg",summary:"Renen Hallak is the Founder and CEO at VAST Data. We cover why AI requires fast access to all data rather than storage tiers, how VAST's disaggregated shared-everything architecture lets capacity scale independently from performance, and why Hallak believes the best way to sell is to listen until customers say they will buy what you build.",tags:["AI infrastructure","data storage","databases","enterprise sales","startup leadership"],chapterCount:21,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:81,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2726,assemblyAiCostUsd:.114}},{id:"FS2sy0DlcK8",slug:"navigating-the-ai-landscape-a-survival-guide-2024-mad-landscape-with-matt-turck-",episodeNumber:null,title:"Navigating the AI Landscape: A Survival Guide | 2024 MAD Landscape with Matt Turck and Aman Kabeer",guest:{name:"Aman Kabeer",role:"Co-founder and COO, FirstMark"},publishedAt:"2024-04-26T11:00:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/FS2sy0DlcK8/maxresdefault.jpg",summary:"Aman Kabeer is the Co-founder and COO at FirstMark. We cover why private equity roll-ups may still be ahead for the crowded landscape, how OpenAI moves faster than cloud providers built their markets, and why early generative AI startups such as Jasper and Tome still face the realities of startup life.",tags:["AI landscape","open source AI","AI investing","generative AI","modern data stack"],chapterCount:11,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:71,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2937,assemblyAiCostUsd:.122}},{id:"pSD_Sg3SSZc",slug:"ai-at-roblox-revolutionizing-game-creation-morgan-mcguire-from-roblox",episodeNumber:null,title:"AI at Roblox: Revolutionizing Game Creation | Morgan McGuire from Roblox",guest:{name:"Morgan McGuire",role:"Chief Scientist, Roblox"},publishedAt:"2024-04-17T11:00:00.000Z",durationLabel:"51 min",thumbnail:"https://i.ytimg.com/vi/pSD_Sg3SSZc/maxresdefault.jpg",summary:"Morgan McGuire is the Chief Scientist at Roblox. We cover how Roblox hosts 70 million daily users in community-created 3D
426worlds, why AI Code Assist has suggested 300 million characters of code while keeping humans in control, and how ControlNet lets creators preserve an imageâs composition without retraining a full generative model.",tags:["Roblox","Generative AI","3D creation","AI code assist","ControlNet","StarCoder"],chapterCount:8,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:95,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3034,assemblyAiCostUsd:.126}},{id:"iZoAwmAFz2Y",slug:"is-ai-a-platform-shift-or-a-paradigm-shift-benedict-evans",episodeNumber:null,title:"Is AI a platform shift or a paradigm shift? | Benedict Evans",guest:{name:"Benedict Evans",role:"Technology analyst and former partner at Andreessen Horowitz"},publishedAt:"2024-04-10T11:15:00.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/iZoAwmAFz2Y/maxresdefault.jpg",summary:"Benedict Evans is the Technology analyst and former partner at Andreessen Horowitz. We cover why generative AI needs dedicated tools rather than blank chat interfaces, why predictions about AGI lack a theory comparable to physics, and how AI bias often comes from hidden patterns in training data rather than explicit demographic fields.",tags:["Generative AI","AGI","AI bias","AI platforms","AR/VR"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:107,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3090,assemblyAiCostUsd:.129}},{id:"lOfDURxfzqY",slug:"from-social-app-to-data-giant-foursquare-s-evolution-gary-little-from-foursquare",episodeNumber:null,title:"From Social App to Data Giant: Foursquare's Evolution | Gary Little from Foursquare",guest:{name:"Gary Little",role:"CEO, Foursquare"},publishedAt:"2024-04-03T11:00:00.000Z",durationLabel:"25 min",thumbnail:"https://i.ytimg.com/vi/lOfDURxfzqY/maxresdefault.jpg",summary:"Gary Little is the CEO at Foursquare. We cover how Foursquare maps 200 million places across 190 countries with machine learning and human confirmation, why privacy rules push customers to analyze their own location data, and how a knowledge graph lets users ask real-time geospatial questions in natural language.",tags:["location intelligence","geospatial data","data privacy","knowledge graphs","AI","Foursquare"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:61,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1497,assemblyAiCostUsd:.062}},{id:"8Gqt9U-0QkU",slug:"why-generative-ai-will-unlock-new-art-forms-cris-valenzuela-from-runway",episodeNumber:null,title:"Why generative AI will unlock new art forms | Cris Valenzuela from Runway",guest:{name:"Cris Valenzuela",role:"Co-founder & CEO, Runway"},publishedAt:"2024-03-27T11:30:00.000Z",durationLabel:"30 min",thumbnail:"https://i.ytimg.com/vi/8Gqt9U-0QkU/maxresdefault.jpg",summary:"Cris Valenzuela is the Co-founder & CEO at Runway. We cover why generative AI should develop into a new art form rather than copy existing media, why creative software must move beyond manipulating tracks and pixels toward natural-language interaction, and how Runway gives creators control over video generation through Motion Brush and camera controls.",tags:["Generative AI","AI video","Creative tools","Stable Diffusion","Filmmaking"],chapterCount:14,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:67,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1792,assemblyAiCostUsd:.075}},{id:"1PoZ5uAIb4U",slug:"2024-will-be-the-year-of-generative-ai-in-production-in-the-enterprise-florian-d",episodeNumber:null,title:"2024 will be the year of Generative AI in production in the enterprise | Florian Douetteau from Dataiku",guest:{name:"Florian Douetteau",role:"Co-founder and CEO, Dataiku"},publishedAt:"2024-03-20T11:30:00.000Z",durationLabel:"26 min",thumbnail:"https://i.ytimg.com/vi/1PoZ5uAIb4U/maxresdefault.jpg",summary:"Florian Douetteau is the Co-founder and CEO at Dataiku. We cover why enterprises need to plan to switch LLM providers as applications mature, how generative AI supplies the last mile of personalization on top of traditional recommendation systems, and why cost monitoring can prevent an internal application from reaching a $100,000 run rate.",tags:["Generative AI","Enterprise AI","LLM operations","AI cost management","Dataiku"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:78,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1570,assemblyAiCostUsd:.065}},{id:"2Sdv7bEcG8Q",slug:"why-ecosystem-partnerships-are-the-future-in-the-age-of-ai-bob-moore-from-crossb",episodeNumber:null,title:"Why Ecosystem Partnerships Are The Future In The Age Of AI | Bob Moore from Crossbeam",guest:{name:"Bob Moore",role:"CEO, Crossbeam"},publishedAt:"2024-03-13T11:56:58.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/2Sdv7bEcG8Q/maxresdefault.jpg",summary:"Bob Moore is the CEO at Crossbeam. We cover why RJMetrics lost to a stack of connected products, how Crossbeam lets partners map account overlap without sharing their full customer lists, and why AI is making inbound discovery and cold outbound less predictable while ecosystem-led growth improves efficie
426ncy.",tags:["ecosystem-led growth","partnerships","go-to-market","AI marketing","Crossbeam"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:130,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2660,assemblyAiCostUsd:.111}},{id:"tINCmeUZlIY",slug:"saving-lives-with-ai-emi-gal-from-ezra",episodeNumber:null,title:"Saving lives with AI | Emi Gal from Ezra",guest:{name:"Emi Gal",role:"Founder and CEO, Ezra"},publishedAt:"2024-03-06T13:30:00.000Z",durationLabel:"50 min",thumbnail:"https://i.ytimg.com/vi/tINCmeUZlIY/maxresdefault.jpg",summary:"Emi Gal is the Founder and CEO at Ezra. We cover how Ezra uses AI to cut MRI scan times, why its proprietary longitudinal MRI dataset is its key advantage, and why radiologists will be replaced by radiologists using AI rather than by AI alone.",tags:["AI healthcare","MRI","cancer detection","medical imaging","radiology"],chapterCount:18,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:93,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3016,assemblyAiCostUsd:.126}},{id:"RfJCKqLhSgU",slug:"embracing-ai-lessons-from-intercom-s-journey",episodeNumber:null,title:"Embracing AI: Lessons from Intercom's Journey",guest:{name:"Des Traynor",role:"Co-founder, Intercom"},publishedAt:"2024-02-29T16:24:09.000Z",durationLabel:"1h 2m",thumbnail:"https://i.ytimg.com/vi/RfJCKqLhSgU/maxresdefault.jpg",summary:"Des Traynor is the Co-founder at Intercom. We cover why GPT-4 made automated customer service viable for conversational problem-solving, why customers value instant answers over personal tone for routine questions, and why Intercom prices Fin per resolved answer rather than relying only on seats.",tags:["AI customer support","Generative AI","Intercom Fin","AI pricing","LLM guardrails"],chapterCount:22,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:130,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3718,assemblyAiCostUsd:.155}},{id:"eCI1wtLw4Fo",slug:"is-the-modern-data-stack-dead-with-dbt-labs-ceo-tristan-handy",episodeNumber:null,title:"Is the Modern Data Stack Dead? with dbt Labs CEO Tristan Handy",guest:{name:"Tristan Handy",role:"CEO, dbt Labs"},publishedAt:"2024-02-22T21:56:00.000Z",durationLabel:"47 min",thumbnail:"https://i.ytimg.com/vi/eCI1wtLw4Fo/maxresdefault.jpg",summary:"Tristan Handy is the CEO at dbt Labs. We cover why the modern data stack is no longer a useful pre-cloud versus post-cloud distinction, why buyers no longer want to integrate nine separate products, and how a semantic layer can make AI-generated SQL deterministic for shared business metrics.",tags:["Modern Data Stack","Analytics Engineering","Semantic Layer","AI and Data","dbt"],chapterCount:13,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:60,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2842,assemblyAiCostUsd:.118}},{id:"CLQ-Al7RJjo",slug:"vector-databases-and-the-future-of-ai-native-applications-with-weaviates-ceo-bob",episodeNumber:null,title:"Vector Databases and the Future of AI-Native Applications with Weaviateâs CEO Bob van Luijt",guest:{name:"Bob van Luijt",role:"Co-Founder & Co-CEO, Weaviate"},publishedAt:"2024-02-15T13:59:00.000Z",durationLabel:"33 min",thumbnail:"https://i.ytimg.com/vi/CLQ-Al7RJjo/maxresdefault.jpg",summary:"Bob van Luijt is the Co-Founder & Co-CEO at Weaviate. We cover why RAG is less risky than fine-tuning but remains primitive, how hybrid search combines semantic retrieval with BM25 for exact identifiers, and why doubling embedding dimensions doubles memory needs as deployments scale to billions of objects.",tags:["Vector databases","RAG","Hybrid search","Embeddings","AI-native applications"],chapterCount:14,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:56,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1967,assemblyAiCostUsd:.082}},{id:"RrWPyj-Xlh4",slug:"bootstrapping-a-decacorn-on-15k-with-celonis-ceo-alexander-rinke",episodeNumber:null,title:"Bootstrapping a Decacorn on $15k with Celonis CEO Alexander Rinke",guest:{name:"Alexander Rinke",role:"Co-Founder & Co-CEO, Celonis"},publishedAt:"2024-02-08T16:23:49.000Z",durationLabel:"36 min",thumbnail:"https://i.ytimg.com/vi/RrWPyj-Xlh4/maxresdefault.jpg",summary:"Alexander Rinke is the Co-Founder & Co-CEO at Celonis. We cover how Celonis built its first prototype in three weeks and found its first customers with $15,000 in funding, why enterprise companies need product-market-people fit before scaling sales or partnerships, and how its Process Intelligence Graph connects data across systems to identify process friction automatically.",tags:["process mining","enterprise softw
426are","bootstrapping","go-to-market","generative AI"],chapterCount:16,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:54,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2139,assemblyAiCostUsd:.089}},{id:"Tv5XccCrHvA",slug:"nomic-truly-open-ai",episodeNumber:null,title:"Nomic: Truly open AI",guest:{name:"Brandon Duderstadt",role:"CEO and Co-Founder, Nomic AI"},publishedAt:"2024-02-01T15:50:00.000Z",durationLabel:"42 min",thumbnail:"https://i.ytimg.com/vi/Tv5XccCrHvA/maxresdefault.jpg",summary:"Brandon Duderstadt is the CEO and Co-Founder at Nomic AI. We cover why curating training data lets GPT4All remove refusal and one-word-answer behaviors, how Atlas surfaces model failures as localized patches in a dataset map, and why releasing model weights without training data limits reproducibility and auditability.",tags:["Open-source AI","GPT4All","Data quality","LLM benchmarking","Embeddings"],chapterCount:9,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:61,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2510,assemblyAiCostUsd:.105}},{id:"y6pAPwcbM4I",slug:"poolside-ai-for-software-development-with-cto-eiso-kant",episodeNumber:null,title:"Poolside: AI for Software Development with CTO Eiso Kant",guest:{name:"Eiso Kant",role:"CTO and Co-Founder, Poolside"},publishedAt:"2023-12-20T16:35:11.000Z",durationLabel:"45 min",thumbnail:"https://i.ytimg.com/vi/y6pAPwcbM4I/maxresdefault.jpg",summary:"Eiso Kant is the CTO and Co-Founder at Poolside. We cover why executable code lets models learn from scalable feedback rather than human evaluation, why Poolside expects most developers to adopt AI pair-programming assistants within 24 months, and why natural-language planning helps models find solutions that single-shot code generation misses.",tags:["AI coding","code execution","reinforcement learning","developer tools","LLM training"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:75,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2690,assemblyAiCostUsd:.112}},{id:"sxeEBxDzqzo",slug:"asapp-generative-ai-for-contact-centers-with-ceo-gustavo-sapoznik",episodeNumber:null,title:"ASAPP: Generative AI for Contact Centers with CEO Gustavo Sapoznik",guest:{name:"Gustavo Sapoznik",role:"Founder and CEO, ASAPP"},publishedAt:"2023-12-13T12:05:00.000Z",durationLabel:"33 min",thumbnail:"https://i.ytimg.com/vi/sxeEBxDzqzo/maxresdefault.jpg",summary:"Gustavo Sapoznik is the Founder and CEO at ASAPP. We cover why contact centers combine $600 billion in annual spending with agent attrition near 100%, how agent suggestions turn 20 seconds of typing into a one-second click, and why ASAPP trains specialized models when GPT-4 could make a conversation cost $50 to $100 rather than 30 cents.",tags:["contact center AI","generative AI","agent augmentation","speech recognition","enterprise AI"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:57,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1966,assemblyAiCostUsd:.082}},{id:"N4bCV9vKOy4",slug:"scott-belsky-ai-creativity",episodeNumber:null,title:"Scott Belsky: AI & Creativity",guest:{name:"Scott Belsky",role:"Chief Strategy Officer at Adobe"},publishedAt:"2023-12-06T12:03:00.000Z",durationLabel:"29 min",thumbnail:"https://i.ytimg.com/vi/N4bCV9vKOy4/maxresdefault.jpg",summary:"Scott Belsky is the Chief Strategy Officer at Adobe. We cover that the show publishes new conversations every Wednesday, that video recordings are available on the Data Driven NYC YouTube channel, and that important links appear in the show notes.",tags:["AI","creativity","Adobe","Scott Belsky"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:113,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1768,assemblyAiCostUsd:.074}},{id:"5cNt9Kpx5Ew",slug:"glean-ai-the-ml-powered-accounting-solution-with-ceo-howard-katzenberg",episodeNumber:null,title:"Glean AI: The ML-Powered Accounting Solution with CEO Howard Katzenberg",guest:{name:"Howard Katzenberg",role:"CEO, Glean AI"},publishedAt:"2023-11-29T12:27:00.000Z",durationLabel:"25 min",thumbnail:"https://i.ytimg.com/vi/5cNt9Kp
426x5Ew/maxresdefault.jpg",summary:"Howard Katzenberg is the CEO at Glean AI. We cover why manual vendor reviews repeatedly uncover about 10% in savings despite 99 of 100 bills being approved, how Glean uses multiple LLMs as a proxy confidence score and routes uncertain extractions to humans, and why it keeps calculations outside LLMs when analyzing vendor history.",tags:["accounts payable","vendor spend","LLMs","invoice analysis","finance automation"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:45,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1525,assemblyAiCostUsd:.064}},{id:"2vrYcQK8R5I",slug:"humanloop-llm-collaboration-and-optimization-with-ceo-raza-habib",episodeNumber:null,title:"Humanloop: LLM Collaboration and Optimization with CEO Raza Habib",guest:{name:"Raza Habib",role:"CEO, Humanloop"},publishedAt:"2023-11-22T11:31:00.000Z",durationLabel:"35 min",thumbnail:"https://i.ytimg.com/vi/2vrYcQK8R5I/maxresdefault.jpg",summary:"Raza Habib is the CEO at Humanloop. We cover why subjective, stochastic LLM outputs require evaluation across development, production, and regression testing, how tying feedback and observability to prompt editing cuts fixes from lengthy deployment workflows to the same day, and why teams often prototype with GPT-4 before fine-tuning smaller models for cost and latency.",tags:["LLM evaluation","prompt engineering","LLMOps","model optimization","AI agents"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:52,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2119,assemblyAiCostUsd:.088}},{id:"1I5PQqKFgHM",slug:"deepscribe-the-ai-powered-medical-scribe-with-ceo-akilesh-bapu",episodeNumber:null,title:"DeepScribe: The AI-Powered Medical Scribe with CEO Akilesh Bapu",guest:{name:"Akilesh Bapu",role:"CEO and Founder, DeepScribe"},publishedAt:"2023-11-15T11:30:00.000Z",durationLabel:"34 min",thumbnail:"https://i.ytimg.com/vi/1I5PQqKFgHM/maxresdefault.jpg",summary:"Akilesh Bapu is the CEO and Founder at DeepScribe. We cover how GPT-4 shifted buyers from asking whether to adopt ambient documentation to choosing a vendor, why DeepScribe needed 5 million labeled conversations to match human scribes, and how a multi-armed bandit selects speech vendors from clinician edits.",tags:["Healthcare AI","Medical scribing","Clinical documentation","Generative AI","Speech recognition"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:52,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2067,assemblyAiCostUsd:.086}},{id:"A1PmAOVezA0",slug:"lamini-fine-tuning-llms-for-the-enterprise-with-ceo-sharon-zhou",episodeNumber:null,title:"Lamini: Fine-Tuning LLMs for The Enterprise with CEO Sharon Zhou",guest:{name:"Sharon Zhou",role:"CEO, Lamini"},publishedAt:"2023-11-08T11:30:00.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/A1PmAOVezA0/maxresdefault.jpg",summary:"Sharon Zhou is the CEO at Lamini. We cover why fine-tuning learns from data while prompt engineering is strongest with little data, how narrow domain boundaries make model guardrails easier, and how parameter-efficient methods cut switching among 1,000 models from an estimated three months to three milliseconds.",tags:["LLM fine-tuning","enterprise AI","RLHF","model inference","AMD GPUs"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:62,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2613,assemblyAiCostUsd:.109}},{id:"perplexity-ai-the-ai-powered-answer-engine-with-ceo-aravind-srinivas",slug:"perplexity-ai-the-ai-powered-answer-engine-with-ceo-aravind-srinivas",episodeNumber:null,title:"Perplexity AI: The AI-Powered Answer Engine with CEO Aravind Srinivas",guest:{name:"Aravind Srinivas",role:"CEO, Perplexity AI"},publishedAt:"2023-11-01T11:53:48.000Z",durationLabel:"41 min",thumbnail:"https://d3t3ozftmdmh3i.cloudfront.net/staging/podcast_uploaded_nologo/40657026/40657026-1768486187830-f8f544fbc7c46.jpg",summary:"Aravind Srinivas is the CEO at Perplexity AI. We cover why Perplexity launched cited web answers one week after ChatGPT and found a broader market than Twitter search, why search depends more on index quality and ranking than index size, and why AI should clarify user intent instead of requiring prompt-engineering skill.",tags:["AI search","Perplexity AI","web indexing","retrieval augmented generation","open source models"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:60,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2468,assemblyAiCostUsd:.103}},{id:"nDZpSqlvi3E",slug:"diffblue-ai-for-code-testing-with-ceo-mathew-lodge",episodeNumber:null,title:"Diffblue: AI For Code Testing with CEO Mathew Lodge",guest:{name:"Mathew Lodge",role:"CEO, Diffblue"},publishedAt:"2023-10-25T13:30:19.000Z",durationLabel:"46 min",thumbnail:"https://i.ytimg.com/vi/nDZpSqlvi3E/maxresdefault.jpg",summary:"Mathew Lodge is the CEO at Diffblue. We cover why LLM coding assistants trade generality for errors, how Diffblue analyzes entire codebase
426s to iteratively generate boundary-testing unit tests, and why it generated 3,100 tests for a bank in eight hours rather than a developer's estimated year of work.",tags:["AI code testing","reinforcement learning","unit testing","Java","developer productivity"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:60,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2734,assemblyAiCostUsd:.114}},{id:"V7HHA3PnZAY",slug:"moonhub-ai-the-on-demand-ai-recruiter-with-founder-ceo-nancy-xu",episodeNumber:null,title:"Moonhub AI: The On-Demand AI Recruiter with Founder & CEO Nancy Xu",guest:{name:"Nancy Xu",role:"Founder & CEO, Moonhub AI"},publishedAt:"2023-10-18T12:16:00.000Z",durationLabel:"45 min",thumbnail:"https://i.ytimg.com/vi/V7HHA3PnZAY/maxresdefault.jpg",summary:"Nancy Xu is the Founder & CEO at Moonhub AI. We cover how Moonhub indexes public-web data on about one billion people, why hiring managers can search for candidates without Boolean-query expertise, and why Moonhub customers report that 80% of candidates they find through the platform were unavailable on other platforms.",tags:["AI recruiting","talent sourcing","LLM agents","future of work","recruiting technology"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:68,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2721,assemblyAiCostUsd:.113}},{id:"AkKMF8M9JwI",slug:"dust-secure-ai-assistants-for-the-enterprise-with-co-founder-stanislas-polu",episodeNumber:null,title:"Dust: Secure AI Assistants for The Enterprise with Co-Founder Stanislas Polu",guest:{name:"Stanislas Polu",role:"Co-Founder, Dust"},publishedAt:"2023-10-11T13:50:00.000Z",durationLabel:"54 min",thumbnail:"https://i.ytimg.com/vi/AkKMF8M9JwI/maxresdefault.jpg",summary:"Stanislas Polu is the Co-Founder at Dust. We cover why company-wide AI adoption follows a traditional adoption curve, why focused assistants onboard non-early adopters better than general-purpose chatbots, and why retrieving the right company data remains a bigger challenge than model hallucination.",tags:["enterprise AI","AI assistants","knowledge retrieval","LLM adoption","Dust"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:72,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3220,assemblyAiCostUsd:.134}},{id:"lUz6-A1aA4c",slug:"imbue-ai-agents-that-can-reason-with-ceo-kanjun-qiu",episodeNumber:null,title:"Imbue: AI Agents That Can Reason with CEO Kanjun Qiu",guest:{name:"Kanjun Qiu",role:"CEO, Imbue"},publishedAt:"2023-10-04T10:30:00.000Z",durationLabel:"45 min",thumbnail:"https://i.ytimg.com/vi/lUz6-A1aA4c/maxresdefault.jpg",summary:"Kanjun Qiu is the CEO at Imbue. We cover why reliable agents need judgment about when to ask questions and flag risk, how code serves as the internetâs clearest curriculum for step-by-step reasoning, and why Imbue treats current AI as an analog-computer phase where errors compound and new abstractions are needed.",tags:["AI agents","AI reasoning","foundation models","code generation","agent reliability"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:60,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2687,assemblyAiCostUsd:.112}},{id:"wp0H9WjeobU",slug:"guardrails-ai-deploying-generative-ai-safely-with-ceo-shreya-rajpal",episodeNumber:null,title:"Guardrails AI: Deploying Generative AI Safely with CEO Shreya Rajpal",guest:{name:"Shreya Rajpal",role:"Co-founder & CEO, Guardrails AI"},publishedAt:"2023-09-27T11:50:00.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/wp0H9WjeobU/maxresdefault.jpg",summary:"Shreya Rajpal is the Co-founder & CEO at Guardrails AI. We cover why 10-minute GenAI prototypes fail to deliver consistent customer value, why fine-tuning does not eliminate hallucinations, and how runtime val
426idators can enforce organization-specific rules for accuracy, compliance, privacy, and brand safety.",tags:["Generative AI safety","LLM guardrails","Hallucinations","RAG","Fine-tuning"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:67,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3120,assemblyAiCostUsd:.13}},{id:"4RTcpUgtZwY",slug:"ai21-labs-bringing-reliable-ai-to-the-enterprise-with-co-founder-ori-goshen",episodeNumber:null,title:"AI21 Labs: Bringing Reliable AI to the Enterprise with Co-Founder Ori Goshen",guest:{name:"Ori Goshen",role:"Co-Founder and Co-CEO, AI21 Labs"},publishedAt:"2023-09-20T10:43:00.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/4RTcpUgtZwY/maxresdefault.jpg",summary:"Ori Goshen is the Co-Founder and Co-CEO at AI21 Labs. We cover why larger models face diminishing returns for reliable reasoning, why 95% of enterprise use cases are narrow enough for task-specific systems, and how grounded question answering can turn hours of document research into minutes.",tags:["neurosymbolic AI","enterprise AI","LLM reliability","RAG","question answering"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:50,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3106,assemblyAiCostUsd:.129}},{id:"_0KsE8gM828",slug:"ai-gaming-and-building-a-data-science-brand-a-conversation-with-carly-taylor-fou",episodeNumber:null,title:"AI, Gaming, and Building a Data Science Brand - A Conversation with Carly Taylor, Founder of Rebel Data Science",guest:{name:"Carly Taylor",role:"Founder, Rebel Data Science"},publishedAt:"2023-09-13T10:23:00.000Z",durationLabel:"40 min",thumbnail:"https://i.ytimg.com/vi/_0KsE8gM828/maxresdefault.jpg",summary:"Carly Taylor is the Founder at Rebel Data Science. We cover how machine learning security focuses on outliers and changes adversary behavior, why generated NPC dialogue can make open-world games less repetitive without replacing existing work, and why startups need data engineering before expecting data scientists to own an end-to-end pipeline.",tags:["AI in gaming","machine learning security","data science","model observability","technical marketing"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:54,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2404,assemblyAiCostUsd:.1}},{id:"AeWV4B5iGLc",slug:"deepset-ai-nlp-for-the-enterprise-with-ceo-milos-rusic",episodeNumber:null,title:"Deepset AI: NLP For The Enterprise with CEO Milos Rusic",guest:{name:"Milos Rusic",role:"CEO & Co-founder, deepset AI"},publishedAt:"2023-09-06T10:35:00.000Z",durationLabel:"46 min",thumbnail:"https://i.ytimg.com/vi/AeWV4B5iGLc/maxresdefault.jpg",summary:"Milos Rusic is the CEO & Co-founder at deepset AI. We cover how Haystack breaks RAG applications into chunking, storage, retrieval, and generation; why grounding a model in a document corpus still does not prevent factual errors; and why enterprise LLM products require continuous evaluation, monitoring, and iteration after deployment.",tags:["RAG","LLM applications","Haystack","hallucination detection","enterprise AI"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:54,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2739,assemblyAiCostUsd:.114}},{id:"fQIkDsgArtA",slug:"bigid-data-visibility-control-with-ceo-dimitri-sirota",episodeNumber:null,title:"BigID: Data Visibility & Control with CEO Dimitri Sirota",guest:{name:"Dimitri Sirota",role:"Co-Founder and CEO, BigID"},publishedAt:"2023-08-30T10:30:00.000Z",durationLabel:"33 min",thumbnail:"https://i.ytimg.com/vi/fQIkDsgArtA/maxresdefault.jpg",summary:"Dimitri Sirota is the Co-Founder and CEO at BigID. We cover why GDPR expands personal data far beyond traditional identifiers, how BigID uses scanners and graph ML to locate and correlate data across cloud and legacy systems, and why enterprise configurability can overwhelm smaller companies.",tags:["data privacy","GDPR","data discovery","data security","enterprise softw
426are"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:47,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1996,assemblyAiCostUsd:.083}},{id:"2STR07YWFCY",slug:"hippocratic-ai-a-safety-first-llm-for-healthcare-with-ceo-munjal-shah",episodeNumber:null,title:"Hippocratic AI: A Safety-First LLM for Healthcare with CEO Munjal Shah",guest:{name:"Munjal Shah",role:"CEO and Co-founder, Hippocratic AI"},publishedAt:"2023-08-23T10:30:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/2STR07YWFCY/maxresdefault.jpg",summary:"Munjal Shah is the CEO and Co-founder at Hippocratic AI. We cover why healthcareâs biggest opportunity is adherence and support rather than diagnosis, how voice agents costing roughly 18 cents an hour could provide âsuper staffing,â and why Hippocratic AI relies on clinician-led testing and safety kick-outs before deployment.",tags:["Healthcare AI","LLMs","Patient support","AI safety","Virtual care"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:73,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2950,assemblyAiCostUsd:.123}},{id:"9YULS8a6XPs",slug:"you-com-an-ai-chatbot-to-search-the-web-with-ceo-richard-socher",episodeNumber:null,title:"You.com: An AI Chatbot to Search The Web with CEO Richard Socher",guest:{name:"Richard Socher",role:"CEO, You.com"},publishedAt:"2023-08-16T11:22:00.000Z",durationLabel:"47 min",thumbnail:"https://i.ytimg.com/vi/9YULS8a6XPs/maxresdefault.jpg",summary:"Richard Socher is the CEO at You.com. We cover why he argues search deteriorates under monopoly conditions, how retrieval-augmented generation lets language models reason over current web facts, and why organizations should not train their own LLMs from scratch without hundreds of millions of responses.",tags:["AI search","You.com","RAG","LLMs","chatbots"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:65,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2828,assemblyAiCostUsd:.118}},{id:"l-rHsLWwO78",slug:"weights-biases-the-developer-first-mlops-platform-with-ceo-lukas-biewald",episodeNumber:null,title:"Weights & Biases: The Developer-First MLOps Platform with CEO Lukas Biewald",guest:{name:"Lukas Biewald",role:"CEO, Weights & Biases"},publishedAt:"2023-08-09T11:00:00.000Z",durationLabel:"52 min",thumbnail:"https://i.ytimg.com/vi/l-rHsLWwO78/maxresdefault.jpg",summary:"Lukas Biewald is the CEO at Weights & Biases. We cover why tracking training data, infrastru
426cture, and hyperparameters is necessary for reproducible models, why most enterprises have not put LLMs into production because they are hard to evaluate and monitor, and why sophisticated teams still use logistic regression when it fits the job.",tags:["MLOps","LLMOps","model reproducibility","LLM monitoring","machine learning"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:74,requests:0,inputTokens:0,outputTokens:0,audioSeconds:3111,assemblyAiCostUsd:.13}},{id:"z1YuwHzCCm4",slug:"cockroach-labs-a-cloud-sql-database-built-for-survival-with-ceo-spencer-kimball",episodeNumber:null,title:"Cockroach Labs: A Cloud SQL Database Built for Survival with CEO Spencer Kimball",guest:{name:"Spencer Kimball",role:"CEO, Cockroach Labs"},publishedAt:"2023-08-02T11:12:00.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/z1YuwHzCCm4/maxresdefault.jpg",summary:"Spencer Kimball is the CEO at Cockroach Labs. We cover the showâs weekly Wednesday schedule, where video recordings of episodes are available, and that the Data Driven NYC YouTube channel hosts many more conversations.",tags:["Cockroach Labs","cloud SQL","databases","Spencer Kimball"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:60,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2645,assemblyAiCostUsd:.11}},{id:"Yg2po04VGuM",slug:"ada-ai-first-customer-service-with-ceo-mike-murchison",episodeNumber:null,title:"Ada: AI-First Customer Service with CEO Mike Murchison",guest:{name:"Mike Murchison",role:"Co-Founder & CEO, Ada"},publishedAt:"2023-07-26T11:00:00.000Z",durationLabel:"47 min",thumbnail:"https://i.ytimg.com/vi/Yg2po04VGuM/maxresdefault.jpg",summary:"Mike Murchison is the Co-Founder & CEO at Ada. We cover why companies that increase customer contact can outperform those trying to deflect it, how Ada charges only for accurate, relevant, and safe automated resolutions, and why reaching 100% automated resolution is more a cultural and API-access challenge than a technological one.",tags:["customer service AI","AI agents","resolution pricing","customer experience","generative AI"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:58,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2834,assemblyAiCostUsd:.118}},{id:"osEKONNEJY8",slug:"synthesia-creating-video-with-generative-ai-with-ceo-victor-riparbelli",episodeNumber:null,title:"Synthesia: Creating Video with Generative AI with CEO Victor Riparbelli",guest:{name:"Victor Riparbelli",role:"CEO, Synthesia"},publishedAt:"2023-07-19T11:00:00.000Z",durationLabel:"44 min",thumbnail:"https://i.ytimg.com/vi/osEKONNEJY8/maxresdefault.jpg",summary:"Victor Riparbelli is the CEO at Synthesia. We cover why Synthesiaâs videos replace text rather than video production, how enterprises use them to turn 40-page training manuals into multilingual video, and why production AI requires workflows for fact-checking rather than a simple API call.",tags:["AI video","Generative AI","Enterprise training","Digital humans","Content provenance"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:70,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2641,assemblyAiCostUsd:.11}},{id:"T9VLheAzqlY",slug:"llamaindex-unleashing-llms-on-your-data-with-ceo-jerry-liu",episodeNumber:null,title:"LlamaIndex: Unleashing LLMs on Your Data with CEO Jerry Liu",guest:{name:"Jerry Liu",role:"Co-Founder & CEO, LlamaIndex"},publishedAt:"2023-07-12T11:30:00.000Z",durationLabel:"41 min",thumbnail:"https://i.ytimg.com/vi/T9VLheAzqlY/maxresdefault.jpg",summary:"Jerry Liu is the Co-Founder & CEO at LlamaIndex. We cover that no substantive guest transcript was provided, that specific episode claims cannot be verified, and that the supplied metadata identifies LlamaIndexâs focus on connecting LLMs
426with data.",tags:["LlamaIndex","LLMs","data","AI"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:58,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2447,assemblyAiCostUsd:.102}},{id:"CqUFjtrJeTU",slug:"dataiku-the-single-platform-for-everyday-ai-with-ceo-florian-douetteau",episodeNumber:null,title:"Dataiku: The Single Platform for Everyday AI with CEO Florian Douetteau",guest:{name:"Florian Douetteau",role:"CEO and Co-Founder, Dataiku"},publishedAt:"2023-07-05T19:12:00.000Z",durationLabel:"49 min",thumbnail:"https://i.ytimg.com/vi/CqUFjtrJeTU/maxresdefault.jpg",summary:"Florian Douetteau is the CEO and Co-Founder at Dataiku. We cover why enterprise AI needs one platform rather than stitched-together tools, how generative AI makes previously uneconomic unstructured-data use cases viable, and why companies need accountability, fairness, transparency, and reliability frameworks before regulation arrives.",tags:["Enterprise AI","Dataiku","Generative AI","AI governance","MLOps"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:56,requests:0,inputTokens:0,outputTokens:0,audioSeconds:2915,assemblyAiCostUsd:.121}},{id:"NI0faK90TP4",slug:"chroma-programmable-ai-native-databases-with-co-founder-jeff-huber",episodeNumber:null,title:"Chroma: Programmable AI-Native Databases with Co-Founder Jeff Huber",guest:{name:"Jeff Huber",role:"Co-Founder, Chroma"},publishedAt:"2023-06-28T11:00:00.000Z",durationLabel:"26 min",thumbnail:"https://i.ytimg.com/vi/NI0faK90TP4/maxresdefault.jpg",summary:"Jeff Huber is the Co-Founder at Chroma. We cover why programmable memory lets developers deterministically specify the knowledge and tools an LLM uses, why grounding a model with retrieved documents is the state-of-the-art response to hallucinations, and why AI-native databases need both transactional and analytical workloads.",tags:["Vector databases","LLM memory","Retrieval augmented generation","Embeddings","Open source"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:40,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1549,assemblyAiCostUsd:.065}},{id:"7zCyHDCDCvo",slug:"hebbia-saving-smart-people-from-mundane-tasks-with-ceo-george-sivulka",episodeNumber:null,title:"Hebbia: Saving Smart People from Mundane Tasks with CEO George Sivulka",guest:{name:"George Sivulka",role:"CEO, Hebbia"},publishedAt:"2023-06-21T11:56:00.000Z",durationLabel:"23 min",thumbnail:"https://i.ytimg.com/vi/7zCyHDCDCvo/maxresdefault.jpg",summary:"George Sivulka is the CEO at Hebbia. We cover why Hebbia began with 400-page DEF 14As, how private equity diligence maps unstructured data rooms to 100- or 400-question trackers, and why chaining 90% accurate AI steps produces poor multi-step results.",tags:["Hebbia","LLMs","private equity","due diligence","document analysis"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:44,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1400,assemblyAiCostUsd:.058}},{id:"LhyWHCCVlNU",slug:"how-data-happened-a-conversation-with-chris-wiggins-author-and-chief-data-office",episodeNumber:null,title:"How Data Happened - A Conversation with Chris Wiggins, Author and Chief Data Officer at The New York Times",guest:{name:"Chris Wiggins",role:"Chief Data Officer, The New York Times"},publishedAt:"2023-06-14T11:35:00.000Z",durationLabel:"23 min",thumbnail:"https://i.ytimg.com/vi/LhyWHCCVlNU/maxresdefault.jpg",summary:"Chris Wiggins is the Chief Data Officer at The New York Times. We cover how statistics originally meant statecraft rather than mathematics, why early digital computers were built to process messy codebreaking data at Bletchley Park, and how deep neural networks decisively beat other image-labeling methods in 2012.",tags:["data history","artificial intelligence","machine learning","neural networks","Bletchley Park"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:50,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1358,assemblyAiCostUsd:.057}},{id:"Tv76v5gFmAk",slug:"notion-an-ai-assistant-to-work-faster-with-head-of-data-daniel-sternberg",episodeNumber:null,title:"Notion: An AI Assistant to Work Faster with Head of Data Daniel Sternberg",guest:{name:"Daniel Sternberg",role:"Head of Data, Notion"},publishedAt:"2023-06-07T13:50:00.000Z",durationLabel:"29 min",thumbnail:"https://i.ytimg.com/vi/Tv76v5gFmAk/maxresdefault.jpg",summary:"Daniel Sternberg is the Head of Data at Notion. We cover why Notion AIâs most-used features summarize content and generate meeting action items, how a small cross-functional team used existing infrastru
426cture to ship quickly, and why Notion does not inspect external workspace content unless users opt into specific logging.",tags:["Notion AI","data infrastructure","workplace AI","AI privacy"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:46,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1728,assemblyAiCostUsd:.072}},{id:"QcWZR61VQ3w",slug:"pinecone-long-term-memory-for-ai-with-ceo-edo-liberty",episodeNumber:null,title:"Pinecone: Long Term Memory for AI with CEO Edo Liberty",guest:{name:"Edo Liberty",role:"Founder & CEO, Pinecone"},publishedAt:"2023-05-31T11:30:00.000Z",durationLabel:"27 min",thumbnail:"https://i.ytimg.com/vi/QcWZR61VQ3w/maxresdefault.jpg",summary:"Edo Liberty is the Founder & CEO at Pinecone. We cover why AI systems should retrieve external data at inference rather than fit it into models, how vector databases serve as long-term memory across billions of embeddings, and why adding retrieved context can measurably reduce hallucinations.",tags:["vector databases","semantic search","LLM retrieval","AI memory","hallucination reduction"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:52,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1631,assemblyAiCostUsd:.068}},{id:"88x1XjQGci0",slug:"vectara-llm-powered-search-with-ceo-amr-awadallah",episodeNumber:null,title:"Vectara: LLM Powered Search with CEO Amr Awadallah",guest:{name:"Amr Awadallah",role:"CEO, Vectara"},publishedAt:"2023-05-24T12:30:00.000Z",durationLabel:"28 min",thumbnail:"https://i.ytimg.com/vi/88x1XjQGci0/maxresdefault.jpg",summary:"Amr Awadallah is the CEO at Vectara. We cover why grounded generation retrieves facts before generating answers to minimize hallucinations, why fine-tuning private data is slower and 100 times more expensive, and why action engines require zero hallucination before software can safely execute requests.",tags:["LLM search","retrieval-augmented generation","AI hallucinations","semantic search","enterprise AI"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:56,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1693,assemblyAiCostUsd:.071}},{id:"V8jzcg7RsZs",slug:"amplify-partners-ai-investing-and-the-startup-landscape-with-general-partner-sar",episodeNumber:null,title:"Amplify Partners: AI Investing and the Startup Landscape with General Partner Sarah Catanzaro",guest:{name:"Sarah Catanzaro",role:"General Partner at Amplify Partners"},publishedAt:"2023-05-17T12:48:00.000Z",durationLabel:"32 min",thumbnail:"https://i.ytimg.com/vi/V8jzcg7RsZs/maxresdefault.jpg",summary:"Sarah Catanzaro is the General Partner at Amplify Partners. We cover why AI applications still need to deliver everyday value rather than compete for mindshare, why incumbents can rapidly integrate LLMs while startups should redesign workflows rather than copy existing tools, and why cheap storage but expensive compute is reviving ETL and edge-based transformations.",tags:["AI investing","LLMs","data infrastructure","ETL","technical founders"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:53,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1906,assemblyAiCostUsd:.079}},{id:"DTghLFSUZ0A",slug:"assembly-ai-generative-ai-for-speech-recognition-with-ceo-dylan-fox",episodeNumber:null,title:"Assembly AI: Generative AI for Speech Recognition with CEO Dylan Fox",guest:{name:"Dylan Fox",role:"Founder & CEO, AssemblyAI"},publishedAt:"2023-05-10T12:30:00.000Z",durationLabel:"27 min",thumbnail:"https://i.ytimg.com/vi/DTghLFSUZ0A/maxresdefault.jpg",summary:"Dylan Fox is the Founder & CEO at AssemblyAI. We cover why transcription creates more value as input to downstream features than as an endpoint, why AssemblyAI reserves tailored models for use cases with product-market fit, and why scaling labeled audio data still leaves speech recognition with roughly 15% error rates on many datasets.",tags:["speech recognition","audio AI","generative AI","product-market fit","machine learning"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:46,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1624,assemblyAiCostUsd:.068}},{id:"IhP0IUiDhts",slug:"lightning-ai-build-and-deploy-ai-with-pytorch-with-ceo-william-falcon",episodeNumber:null,title:"Lightning AI: Build and Deploy AI with Pytorch with CEO William Falcon",guest:{name:"William Falcon",role:"Founder and CEO, Lightning AI"},publishedAt:"2023-05-03T20:18:00.000Z",durationLabel:"28 min",thumbnail:"https://i.ytimg.com/vi/IhP0IUiDhts/maxresdefault.jpg",summary:"William Falcon is the Founder and CEO at Lightning AI. We cover why collaborative ML projects become unmaintainable when distributed-training changes are duplicated across forks, why enterprise LLM deployments require auditability and human oversight because models hallucinate, and why he expects specialized small language models to replace giant models for deployment on a single GPU.",tags:["PyTorch","LLM deployment","open source AI","AI infrastru
426cture","small language models"],chapterCount:1,transcriptStatus:"cleaned",variant:null,model:"assemblyai+openai/gpt-5.6-terra",build:{model:"assemblyai+openai/gpt-5.6-terra",costUsd:null,durationSeconds:48,requests:0,inputTokens:0,outputTokens:0,audioSeconds:1708,assemblyAiCostUsd:.071}}],kW=Object.assign({
426"../../content/episodes/2024-will-be-the-year-of-generative-ai-in-production-in-the-enterprise-florian-d.json":()=>j(()=>import("./2024-will-be-the-year-of-generative-ai-in-production-in-the-enterprise-florian-d-D8K8xttU.js"),[]),
426"../../content/episodes/ada-ai-first-customer-service-with-ceo-mike-murchison.json":()=>j(()=>import("./ada-ai-first-customer-service-with-ceo-mike-murchison-DM7RSsVI.js"),[]),
426"../../content/episodes/agi-the-future-of-ai-agents-and-the-next-wave-of-opportunities-in-ai-richard-soc.json":()=>j(()=>import("./agi-the-future-of-ai-agents-and-the-next-wave-of-opportunities-in-ai-richard-soc-CbjZVrt4.js"),[]),
426"../../content/episodes/ai-at-datadog-monitoring-machines-in-the-age-of-llms-olivier-pomel-ceo-of-datado.json":()=>j(()=>import("./ai-at-datadog-monitoring-machines-in-the-age-of-llms-olivier-pomel-ceo-of-datado-TWgA6JhL.js"),[]),
426"../../content/episodes/ai-at-ramp-making-every-team-radically-more-productive-eric-glyman-ceo-ramp.json":()=>j(()=>import("./ai-at-ramp-making-every-team-radically-more-productive-eric-glyman-ceo-ramp-nNm8Dyb9.js"),[]),
426"../../content/episodes/ai-at-roblox-revolutionizing-game-creation-morgan-mcguire-from-roblox.json":()=>j(()=>import("./ai-at-roblox-revolutionizing-game-creation-morgan-mcguire-from-roblox-Bo4w2NwX.js"),[]),
426"../../content/episodes/ai-at-zoominfo-superpowering-gtm-teams-ali-dasdan-cto-zoominfo.json":()=>j(()=>import("./ai-at-zoominfo-superpowering-gtm-teams-ali-dasdan-cto-zoominfo-rO8FHcbl.js"),[]),
426"../../content/episodes/ai-could-take-over-in-2029-is-it-already-too-late-ryan-greenblatt.json":()=>j(()=>import("./ai-could-take-over-in-2029-is-it-already-too-late-ryan-greenblatt-BUttOh3W.js"),[]),
426"../../content/episodes/ai-data-and-blockchain-a-vc-perspective-tomasz-tunguz-founder-of-theory-ventures.json":()=>j(()=>import("./ai-data-and-blockchain-a-vc-perspective-tomasz-tunguz-founder-of-theory-ventures-CV1ztqmm.js"),[]),
426"../../content/episodes/ai-eats-the-world-benedict-evans-on-what-really-matters-now.json":()=>j(()=>import("./ai-eats-the-world-benedict-evans-on-what-really-matters-now-DGhxFfv7.js"),[]),
426"../../content/episodes/ai-engineering-revolution-winners-chaos-whats-next-firstmark.json":()=>j(()=>import("./ai-engineering-revolution-winners-chaos-whats-next-firstmark-BCF0jH4H.js"),[]),
426"../../content/episodes/ai-gaming-and-building-a-data-science-brand-a-conversation-with-carly-taylor-fou.json":()=>j(()=>import("./ai-gaming-and-building-a-data-science-brand-a-conversation-with-carly-taylor-fou-D3CkQzoo.js"),[]),
426"../../content/episodes/ai-is-already-building-ai-google-deepminds-mostafa-dehghani.json":()=>j(()=>import("./ai-is-already-building-ai-google-deepminds-mostafa-dehghani-BpHou2yH.js"),[]),
426"../../content/episodes/ai-that-can-prove-its-right-verification-as-the-missing-layer-in-ai-carina-hong.json":()=>j(()=>import("./ai-that-can-prove-its-right-verification-as-the-missing-layer-in-ai-carina-hong-BScKeyw0.js"),[]),
426"../../content/episodes/ai-that-ends-busy-work-hebbia-ceo-on-agent-employees.json":()=>j(()=>import("./ai-that-ends-busy-work-hebbia-ceo-on-agent-employees-D8RizVQz.js"),[]),
426"../../content/episodes/ai-videos-wild-year-runway-ceo-on-whats-next.json":()=>j(()=>import("./ai-videos-wild-year-runway-ceo-on-whats-next-DncZHY84.js"),[]),
426"../../content/episodes/ai21-labs-bringing-reliable-ai-to-the-enterprise-with-co-founder-ori-goshen.json":()=>j(()=>import("./ai21-labs-bringing-reliable-ai-to-the-enterprise-with-co-founder-ori-goshen-CSJKBtlF.js"),[]),
426"../../content/episodes/amplify-partners-ai-investing-and-the-startup-landscape-with-general-partner-sar.json":()=>j(()=>import("./amplify-partners-ai-investing-and-the-startup-landscape-with-general-partner-sar-BEgQBvoV.js"),[]),
426"../../content/episodes/an-inside-look-at-mastering-ai-jeremy-kahn-author-ai-editor-fortune.json":()=>j(()=>import("./an-inside-look-at-mastering-ai-jeremy-kahn-author-ai-editor-fortune-al-5o5nA.js"),[]),
426"../../content/episodes/anthropic-s-surprise-hit-how-claude-code-became-an-ai-coding-powerhouse.json":()=>j(()=>import("./anthropic-s-surprise-hit-how-claude-code-became-an-ai-coding-powerhouse-BKct1gPX.js"),[]),
426"../../content/episodes/anthropics-felix-rieseberg-claude-cowork-mythos-and-the-saas-extinction.json":()=>j(()=>import("./anthropics-felix-rieseberg-claude-cowork-mythos-and-the-saas-extinction-D5o-DuVv.js"),[]),
426"../../content/episodes/are-ai-evals-broken-anthropic-nyus-pavel-izmailov-on-llm-evaluation-reasoning-al.json":()=>j(()=>import("./are-ai-evals-broken-anthropic-nyus-pavel-izmailov-on-llm-evaluation-reasoning-al-DZXpGtyN.js"),[]),
426"../../content/episodes/are-we-misreading-the-ai-exponential-julian-schrittwieser-on-move-37-scaling-rl-.json":()=>j(()=>import("./are-we-misreading-the-ai-exponential-julian-schrittwieser-on-move-37-scaling-rl--SASs1b9a.js"),[]),
426"../../content/episodes/asapp-generative-ai-for-contact-centers-with-ceo-gustavo-sapoznik.json":()=>j(()=>import("./asapp-generative-ai-for-contact-centers-with-ceo-gustavo-sapoznik-DLxh9-um.js"),[]),
426"../../content/episodes/assembly-ai-generative-ai-for-speech-recognition-with-ceo-dylan-fox.json":()=>j(()=>import("./assembly-ai-generative-ai-for-speech-recognition-with-ceo-dylan-fox-82MUePkr.js"),[]),
426"../../content/episodes/benedict-evans-openais-moat-problem-the-future-of-software.json":()=>j(()=>import("./benedict-evans-openais-moat-problem-the-future-of-software-fvYFDiHC.js"),[]),
426"../../content/episodes/bigid-data-visibility-control-with-ceo-dimitri-sirota.json":()=>j(()=>import("./bigid-data-visibility-control-with-ceo-dimitri-sirota-DNKb_Ttv.js"),[]),
426"../../content/episodes/bootstrapping-a-decacorn-on-15k-with-celonis-ceo-alexander-rinke.json":()=>j(()=>import("./bootstrapping-a-decacorn-on-15k-with-celonis-ceo-alexander-rinke-B5THXg7Q.js"),[]),
426"../../content/episodes/boxs-big-ai-leap-aaron-levie-on-agents-the-future-of-work.json":()=>j(()=>import("./boxs-big-ai-leap-aaron-levie-on-agents-the-future-of-work-wnpuPBQw.js"),[]),
426"../../content/episodes/building-the-database-that-can-do-it-all-tobie-morgan-hitchcock-ceo-of-surrealdb.json":()=>j(()=>import("./building-the-database-that-can-do-it-all-tobie-morgan-hitchcock-ceo-of-surrealdb-DvGOfWT5.js"),[]),
426"../../content/episodes/building-the-easy-button-for-generative-ai-may-habib-ceo-writer.json":()=>j(()=>import("./building-the-easy-button-for-generative-ai-may-habib-ceo-writer-BQj_LXb6.js"),[]),
426"../../content/episodes/can-ai-infrastructure-work-like-magic-erik-bernhardsson-ceo-modal.json":()=>j(()=>import("./can-ai-infrastructure-work-like-magic-erik-bernhardsson-ceo-modal-Bmiag8m5.js"),[]),
426"../../content/episodes/chasing-real-agi-inside-arc-prize-2025-with-chollet-knoop.json":()=>j(()=>import("./chasing-real-agi-inside-arc-prize-2025-with-chollet-knoop-DG5BdkS2.js"),[]),
426"../../content/episodes/chroma-programmable-ai-native-databases-with-co-founder-jeff-huber.json":()=>j(()=>import("./chroma-programmable-ai-native-databases-with-co-founder-jeff-huber-DBYL1HA1.js"),[]),
426"../../content/episodes/cloudflare-ceo-the-internet-s-business-model-is-dead.json":()=>j(()=>import("./cloudflare-ceo-the-internet-s-business-model-is-dead-Qk3jTANo.js"),[]),
426"../../content/episodes/cockroach-labs-a-cloud-sql-database-built-for-survival-with-ceo-spencer-kimball.json":()=>j(()=>import("./cockroach-labs-a-cloud-sql-database-built-for-survival-with-ceo-spencer-kimball-CFmKcY9F.js"),[]),
426"../../content/episodes/dashboards-are-dead-sigmas-bi-revolution-for-trillion-row-data.json":()=>j(()=>import("./dashboards-are-dead-sigmas-bi-revolution-for-trillion-row-data-C9D3jVf1.js"),[]),
426"../../content/episodes/dataiku-s-secret-to-scaling-ai-in-global-enterprises-florian-douetteau-ceo-datai.json":()=>j(()=>import("./dataiku-s-secret-to-scaling-ai-in-global-enterprises-florian-douetteau-ceo-datai-BgKlUF46.js"),[]),
426"../../content/episodes/dataiku-the-single-platform-for-everyday-ai-with-ceo-florian-douetteau.json":()=>j(()=>import("./dataiku-the-single-platform-for-everyday-ai-with-ceo-florian-douetteau-DZRSNNLK.js"),[]),
426"../../content/episodes/deepmind-gemini-3-lead-what-comes-after-infinite-data.json":()=>j(()=>import("./deepmind-gemini-3-lead-what-comes-after-infinite-data-DfRy57ER.js"),[]),
426"../../content/episodes/deepscribe-the-ai-powered-medical-scribe-with-ceo-akilesh-bapu.json":()=>j(()=>import("./deepscribe-the-ai-powered-medical-scribe-with-ceo-akilesh-bapu-Lu7qeDsb.js"),[]),
426"../../content/episodes/deepset-ai-nlp-for-the-enterprise-with-ceo-milos-rusic.json":()=>j(()=>import("./deepset-ai-nlp-for-the-enterprise-with-ceo-milos-rusic-Bd5QciGr.js"),[]),
426"../../content/episodes/diffblue-ai-for-code-testing-with-ceo-mathew-lodge.json":()=>j(()=>import("./diffblue-ai-for-code-testing-with-ceo-mathew-lodge-BaZvW5ND.js"),[]),
426"../../content/episodes/dust-secure-ai-assistants-for-the-enterprise-with-co-founder-stanislas-polu.json":()=>j(()=>import("./dust-secure-ai-assistants-for-the-enterprise-with-co-founder-stanislas-polu-CKwzApLV.js"),[]),
426"../../content/episodes/dylan-patel-nvidia-s-new-moat-why-china-is-semiconductor-pilled.json":()=>j(()=>import("./dylan-patel-nvidia-s-new-moat-why-china-is-semiconductor-pilled-CQ-1KnNy.js"),[]),
426"../../content/episodes/embracing-ai-lessons-from-intercom-s-journey.json":()=>j(()=>import("./embracing-ai-lessons-from-intercom-s-journey-D0dudgCE.js"),[]),
426"../../content/episodes/empowering-millions-of-creators-with-ai-video-editing-gaurav-misra-ceo-captions.json":()=>j(()=>import("./empowering-millions-of-creators-with-ai-video-editing-gaurav-misra-ceo-captions-B-jQP7iy.js"),[]),
426"../../content/episodes/everything-gets-rebuilt-the-new-ai-agent-stack-harrison-chase-langchain.json":()=>j(()=>import("./everything-gets-rebuilt-the-new-ai-agent-stack-harrison-chase-langchain-Bat81iPM.js"),[]),
426"../../content/episodes/ex-deepmind-researcher-misha-laskin-on-enterprise-super-intelligence-reflection-.json":()=>j(()=>import("./ex-deepmind-researcher-misha-laskin-on-enterprise-super-intelligence-reflection--CjRAIFSy.js"),[]),
426"../../content/episodes/farewell-chatbots-ai-agents-are-taking-over-customer-service-mike-murchison-ceo-.json":()=>j(()=>import("./farewell-chatbots-ai-agents-are-taking-over-customer-service-mike-murchison-ceo--BaVHfHbl.js"),[]),
426"../../content/episodes/from-business-to-warfare-how-ai-affects-the-modern-world-azeem-azhar.json":()=>j(()=>import("./from-business-to-warfare-how-ai-affects-the-modern-world-azeem-azhar-JKy-EGUa.js"),[]),
426"../../content/episodes/from-social-app-to-data-giant-foursquare-s-evolution-gary-little-from-foursquare.json":()=>j(()=>import("./from-social-app-to-data-giant-foursquare-s-evolution-gary-little-from-foursquare-CtC7DCPJ.js"),[]),
426"../../content/episodes/from-tiny-romanian-startup-to-global-ai-automation-leader-daniel-dines-ceo-of-ui.json":()=>j(()=>import("./from-tiny-romanian-startup-to-global-ai-automation-leader-daniel-dines-ceo-of-ui-DSxMK8Xz.js"),[]),
426"../../content/episodes/github-ceo-the-ai-coding-gold-rush-vibe-coding-cursor.json":()=>j(()=>import("./github-ceo-the-ai-coding-gold-rush-vibe-coding-cursor-Bkb-AFCk.js"),[]),
426"../../content/episodes/glean-ai-the-ml-powered-accounting-solution-with-ceo-howard-katzenberg.json":()=>j(()=>import("./glean-ai-the-ml-powered-accounting-solution-with-ceo-howard-katzenberg-CZYBgX1w.js"),[]),
426"../../content/episodes/gleans-breakthrough-ceo-arvind-jain-on-scaling-ai-agents-search.json":()=>j(()=>import("./gleans-breakthrough-ceo-arvind-jain-on-scaling-ai-agents-search-CE3oF0qH.js"),[]),
426"../../content/episodes/goodbye-excel-ai-agents-for-self-driving-finance-pigment-ceo.json":()=>j(()=>import("./goodbye-excel-ai-agents-for-self-driving-finance-pigment-ceo-BhX5pGtC.js"),[]),
426"../../content/episodes/guardrails-ai-deploying-generative-ai-safely-with-ceo-shreya-rajpal.json":()=>j(()=>import("./guardrails-ai-deploying-generative-ai-safely-with-ceo-shreya-rajpal-BLkIX6fX.js"),[]),
426"../../content/episodes/guillermo-rauch-why-software-development-will-never-be-the-same.json":()=>j(()=>import("./guillermo-rauch-why-software-development-will-never-be-the-same-DN8blLop.js"),[]),
426"../../content/episodes/hebbia-saving-smart-people-from-mundane-tasks-with-ceo-george-sivulka.json":()=>j(()=>import("./hebbia-saving-smart-people-from-mundane-tasks-with-ceo-george-sivulka-CTeCJ48-.js"),[]),
426"../../content/episodes/hippocratic-ai-a-safety-first-llm-for-healthcare-with-ceo-munjal-shah.json":()=>j(()=>import("./hippocratic-ai-a-safety-first-llm-for-healthcare-with-ceo-munjal-shah-D1KRZEMR.js"),[]),
426"../../content/episodes/how-airtable-is-ushering-500-000-organizations-into-the-era-of-ai-howie-liu-ceo-.json":()=>j(()=>import("./how-airtable-is-ushering-500-000-organizations-into-the-era-of-ai-howie-liu-ceo--Dx9qXnO9.js"),[]),
426"../../content/episodes/how-clickhouse-powers-netflix-uber-and-spotifys-analytics-aaron-katz-ceo-of-clic.json":()=>j(()=>import("./how-clickhouse-powers-netflix-uber-and-spotifys-analytics-aaron-katz-ceo-of-clic-X28uLTzQ.js"),[]),
426"../../content/episodes/how-data-happened-a-conversation-with-chris-wiggins-author-and-chief-data-office.json":()=>j(()=>import("./how-data-happened-a-conversation-with-chris-wiggins-author-and-chief-data-office--3ReTosb.js"),[]),
426"../../content/episodes/how-gpt-5-thinks-openai-vp-of-research-jerry-tworek.json":()=>j(()=>import("./how-gpt-5-thinks-openai-vp-of-research-jerry-tworek-B9XfWpKJ.js"),[]),
426"../../content/episodes/how-to-build-a-beloved-ai-product-granola-ceo-chris-pedregal.json":()=>j(()=>import("./how-to-build-a-beloved-ai-product-granola-ceo-chris-pedregal-BtFoumJd.js"),[]),
426"../../content/episodes/how-to-build-long-horizon-ai-agents-mitch-troyanovsky-basis.json":()=>j(()=>import("./how-to-build-long-horizon-ai-agents-mitch-troyanovsky-basis-CjrayZyo.js"),[]),
426"../../content/episodes/humanloop-llm-collaboration-and-optimization-with-ceo-raza-habib.json":()=>j(()=>import("./humanloop-llm-collaboration-and-optimization-with-ceo-raza-habib-DTILs4Pq.js"),[]),
426"../../content/episodes/imbue-ai-agents-that-can-reason-with-ceo-kanjun-qiu.json":()=>j(()=>import("./imbue-ai-agents-that-can-reason-with-ceo-kanjun-qiu-BfAhi90O.js"),[]),
426"../../content/episodes/inside-canvas-3b-arr-ai-design-rocketship-cto-brendan-humphreys-on-magic-studio-.json":()=>j(()=>import("./inside-canvas-3b-arr-ai-design-rocketship-cto-brendan-humphreys-on-magic-studio--J9VN4FxG.js"),[]),
426"../../content/episodes/inside-nemotron-nvidias-ai-lab-bryan-catanzaro.json":()=>j(()=>import("./inside-nemotron-nvidias-ai-lab-bryan-catanzaro-CnFoTF27.js"),[]),
426"../../content/episodes/inside-the-paper-that-changed-ai-forever-cohere-ceo-aidan-gomez-on-2025-agents.json":()=>j(()=>import("./inside-the-paper-that-changed-ai-forever-cohere-ceo-aidan-gomez-on-2025-agents-DWDagXEA.js"),[]),
426"../../content/episodes/intelligence-isnt-enough-why-energy-compute-decide-the-agi-race-eiso-kant.json":()=>j(()=>import("./intelligence-isnt-enough-why-energy-compute-decide-the-agi-race-eiso-kant-DPXXmy3J.js"),[]),
426"../../content/episodes/is-ai-a-platform-shift-or-a-paradigm-shift-benedict-evans.json":()=>j(()=>import("./is-ai-a-platform-shift-or-a-paradigm-shift-benedict-evans-p16kTyTC.js"),[]),
426"../../content/episodes/is-the-modern-data-stack-dead-with-dbt-labs-ceo-tristan-handy.json":()=>j(()=>import("./is-the-modern-data-stack-dead-with-dbt-labs-ceo-tristan-handy-DcnadQCx.js"),[]),
426"../../content/episodes/jeremy-howard-on-building-5-000-ai-products-with-14-people-answer-ai-deep-dive.json":()=>j(()=>import("./jeremy-howard-on-building-5-000-ai-products-with-14-people-answer-ai-deep-dive-DZquF2kD.js"),[]),
426"../../content/episodes/lamini-fine-tuning-llms-for-the-enterprise-with-ceo-sharon-zhou.json":()=>j(()=>import("./lamini-fine-tuning-llms-for-the-enterprise-with-ceo-sharon-zhou-CcHCw1Om.js"),[]),
426"../../content/episodes/lightning-ai-build-and-deploy-ai-with-pytorch-with-ceo-william-falcon.json":()=>j(()=>import("./lightning-ai-build-and-deploy-ai-with-pytorch-with-ceo-william-falcon-6010Uarj.js"),[]),
426"../../content/episodes/llamaindex-unleashing-llms-on-your-data-with-ceo-jerry-liu.json":()=>j(()=>import("./llamaindex-unleashing-llms-on-your-data-with-ceo-jerry-liu-CfT9BtxW.js"),[]),
426"../../content/episodes/making-ai-work-fine-tuning-inference-memory-sharon-zhou-ceo-lamini.json":()=>j(()=>import("./making-ai-work-fine-tuning-inference-memory-sharon-zhou-ceo-lamini-BaiyzRXb.js"),[]),
426"../../content/episodes/mistral-ai-vs-silicon-valley-the-rise-of-sovereign-ai.json":()=>j(()=>import("./mistral-ai-vs-silicon-valley-the-rise-of-sovereign-ai-DvmWhIqw.js"),[]),
426"../../content/episodes/moonhub-ai-the-on-demand-ai-recruiter-with-founder-ceo-nancy-xu.json":()=>j(()=>import("./moonhub-ai-the-on-demand-ai-recruiter-with-founder-ceo-nancy-xu-BnTWLVWo.js"),[]),
426"../../content/episodes/navigating-the-ai-landscape-a-survival-guide-2024-mad-landscape-with-matt-turck-.json":()=>j(()=>import("./navigating-the-ai-landscape-a-survival-guide-2024-mad-landscape-with-matt-turck--1EAQEn7X.js"),[]),
426"../../content/episodes/nomic-truly-open-ai.json":()=>j(()=>import("./nomic-truly-open-ai-CfzAtGe2.js"),[]),
426"../../content/episodes/notified.json":()=>j(()=>import("./notified-C6TZUTAa.js"),[]),
426"../../content/episodes/notion-an-ai-assistant-to-work-faster-with-head-of-data-daniel-sternberg.json":()=>j(()=>import("./notion-an-ai-assistant-to-work-faster-with-head-of-data-daniel-sternberg-Bn4Leyua.js"),[]),
426"../../content/episodes/open-source-ai-strikes-back-inside-ai2s-olmo-3-thinking.json":()=>j(()=>import("./open-source-ai-strikes-back-inside-ai2s-olmo-3-thinking-C07Akp7x.js"),[]),
426"../../content/episodes/openai-board-member-zico-kolter-on-the-real-risks-of-frontier-ai.json":()=>j(()=>import("./openai-board-member-zico-kolter-on-the-real-risks-of-frontier-ai-BiJTM4SX.js"),[]),
426"../../content/episodes/openai-s-dan-roberts-why-ai-can-now-make-discoveries.json":()=>j(()=>import("./openai-s-dan-roberts-why-ai-can-now-make-discoveries-BOTJ7a-D.js"),[]),
426"../../content/episodes/openai-s-yann-dubois-why-ai-progress-suddenly-feels-real.json":()=>j(()=>import("./openai-s-yann-dubois-why-ai-progress-suddenly-feels-real-ty5ogFu6.js"),[]),
426"../../content/episodes/openais-compute-chief-we-cant-build-fast-enough-sachin-katti.json":()=>j(()=>import("./openais-compute-chief-we-cant-build-fast-enough-sachin-katti-CDheEDPM.js"),[]),
426"../../content/episodes/openais-model-hacked-us-hugging-faces-thomas-wolf.json":()=>j(()=>import("./openais-model-hacked-us-hugging-faces-thomas-wolf-CFe7eusl.js"),[]),
426"../../content/episodes/perplexity-ai-the-ai-powered-answer-engine-with-ceo-aravind-srinivas.json":()=>j(()=>import("./perplexity-ai-the-ai-powered-answer-engine-with-ceo-aravind-srinivas-B7eva_Db.js"),[]),
426"../../content/episodes/pinecone-long-term-memory-for-ai-with-ceo-edo-liberty.json":()=>j(()=>import("./pinecone-long-term-memory-for-ai-with-ceo-edo-liberty-rVbjfjMT.js"),[]),
426"../../content/episodes/poolside-ai-for-software-development-with-cto-eiso-kant.json":()=>j(()=>import("./poolside-ai-for-software-development-with-cto-eiso-kant-B9MEGrip.js"),[]),
426"../../content/episodes/saving-lives-with-ai-emi-gal-from-ezra.json":()=>j(()=>import("./saving-lives-with-ai-emi-gal-from-ezra-FPY3jUaI.js"),[]),
426"../../content/episodes/scott-belsky-ai-creativity.json":()=>j(()=>import("./scott-belsky-ai-creativity-NkrFVZFe.js"),[]),
426"../../content/episodes/snowflake-ceo-on-winning-the-ai-arms-race.json":()=>j(()=>import("./snowflake-ceo-on-winning-the-ai-arms-race-De1-Id4c.js"),[]),
426"../../content/episodes/sonnet-4-5-the-ai-plateau-myth-sholto-douglas-anthropic.json":()=>j(()=>import("./sonnet-4-5-the-ai-plateau-myth-sholto-douglas-anthropic-CCAZT6ma.js"),[]),
426"../../content/episodes/state-of-ai-2024-frontier-models-ai-geopolitics-and-the-robotics-renaissance-nat.json":()=>j(()=>import("./state-of-ai-2024-frontier-models-ai-geopolitics-and-the-robotics-renaissance-nat-CJLwc7it.js"),[]),
426"../../content/episodes/state-of-ai-2025-with-nathan-benaich-power-deals-reasoning-breakthroughs-real-re.json":()=>j(()=>import("./state-of-ai-2025-with-nathan-benaich-power-deals-reasoning-breakthroughs-real-re-b1lfuMr3.js"),[]),
426"../../content/episodes/state-of-enterprise-ai-2026-aaron-levie-on-tokenmaxxing-rise-of-headless-and-ai-.json":()=>j(()=>import("./state-of-enterprise-ai-2026-aaron-levie-on-tokenmaxxing-rise-of-headless-and-ai--C2jWXgvS.js"),[]),
426"../../content/episodes/state-of-llms-2026-rlvr-grpo-inference-scaling-sebastian-raschka.json":()=>j(()=>import("./state-of-llms-2026-rlvr-grpo-inference-scaling-sebastian-raschka-AMQdAgnT.js"),[]),
426"../../content/episodes/stripe-s-ai-chief-how-ai-agents-will-buy-sell-and-pay.json":()=>j(()=>import("./stripe-s-ai-chief-how-ai-agents-will-buy-sell-and-pay-BsQSr3c-.js"),[]),
426"../../content/episodes/superintelligence-bubbles-and-big-bets-ai-investing-in-2024-matt-turck-aman-kabe.json":()=>j(()=>import("./superintelligence-bubbles-and-big-bets-ai-investing-in-2024-matt-turck-aman-kabe-BPpwnpPi.js"),[]),
426"../../content/episodes/synthesia-creating-video-with-generative-ai-with-ceo-victor-riparbelli.json":()=>j(()=>import("./synthesia-creating-video-with-generative-ai-with-ceo-victor-riparbelli-BjOwLfpQ.js"),[]),
426"../../content/episodes/the-4-5b-platform-driving-the-open-source-ai-revolution-clem-delangue-ceo-huggin.json":()=>j(()=>import("./the-4-5b-platform-driving-the-open-source-ai-revolution-clem-delangue-ceo-huggin-SJE1_KdD.js"),[]),
426"../../content/episodes/the-9b-startup-going-after-snowflake-and-databricks-renen-hallak-from-vast-data.json":()=>j(()=>import("./the-9b-startup-going-after-snowflake-and-databricks-renen-hallak-from-vast-data-C3OmvlXn.js"),[]),
426"../../content/episodes/the-agent-harness-building-secure-sandboxes-for-autonomous-ai-workloads.json":()=>j(()=>import("./the-agent-harness-building-secure-sandboxes-for-autonomous-ai-workloads-DdBI7YJz.js"),[]),
426"../../content/episodes/the-ai-coding-agent-revolution-the-future-of-software-techno-optimism-amjad-masa.json":()=>j(()=>import("./the-ai-coding-agent-revolution-the-future-of-software-techno-optimism-amjad-masa-C_zAQUUM.js"),[]),
426"../../content/episodes/the-biggest-ai-deployment-nobody-talks-about-samsara-ceo-sanjit-biswas.json":()=>j(()=>import("./the-biggest-ai-deployment-nobody-talks-about-samsara-ceo-sanjit-biswas-CgQtlrRx.js"),[]),
426"../../content/episodes/the-biggest-chip-ever-built-why-openai-runs-on-it-cerebras-ceo-andrew-feldman.json":()=>j(()=>import("./the-biggest-chip-ever-built-why-openai-runs-on-it-cerebras-ceo-andrew-feldman-uv-0F3IC.js"),[]),
426"../../content/episodes/the-death-of-big-data-and-why-its-time-to-think-small-jordan-tigani-ceo-motherdu.json":()=>j(()=>import("./the-death-of-big-data-and-why-its-time-to-think-small-jordan-tigani-ceo-motherdu-DbmvpZII.js"),[]),
426"../../content/episodes/the-end-of-gpu-scaling-compute-the-agent-era-tim-dettmers-ai2-dan-fu-together-ai.json":()=>j(()=>import("./the-end-of-gpu-scaling-compute-the-agent-era-tim-dettmers-ai2-dan-fu-together-ai-D1oBaa-p.js"),[]),
426"../../content/episodes/the-gpu-myth-state-of-ai-compute-2026-stephen-balaban.json":()=>j(()=>import("./the-gpu-myth-state-of-ai-compute-2026-stephen-balaban-IKfEkZLC.js"),[]),
426"../../content/episodes/the-rise-of-agentic-commerce-emily-glassberg-sands-stripe.json":()=>j(()=>import("./the-rise-of-agentic-commerce-emily-glassberg-sands-stripe-CB7HRtKs.js"),[]),
426"../../content/episodes/top-ai-researcher-on-gpt-4-5-deepseek-and-agentic-rag-douwe-kiela-ceo-contextual.json":()=>j(()=>import("./top-ai-researcher-on-gpt-4-5-deepseek-and-agentic-rag-douwe-kiela-ceo-contextual-B7HmT7Vm.js"),[]),
426"../../content/episodes/trino-iceberg-and-the-battle-for-the-lakehouse-justin-borgman-ceo-starburst.json":()=>j(()=>import("./trino-iceberg-and-the-battle-for-the-lakehouse-justin-borgman-ceo-starburst-BHsNM4NN.js"),[]),
426"../../content/episodes/understanding-data-engineering-in-2025-ben-rogojan-seattle-data-guy.json":()=>j(()=>import("./understanding-data-engineering-in-2025-ben-rogojan-seattle-data-guy-D8Fs8Kp1.js"),[]),
426"../../content/episodes/vectara-llm-powered-search-with-ceo-amr-awadallah.json":()=>j(()=>import("./vectara-llm-powered-search-with-ceo-amr-awadallah-6AZCLPK2.js"),[]),
426"../../content/episodes/vector-databases-and-the-future-of-ai-native-applications-with-weaviates-ceo-bob.json":()=>j(()=>import("./vector-databases-and-the-future-of-ai-native-applications-with-weaviates-ceo-bob-LT0ADnBq.js"),[]),
426"../../content/episodes/voice-ais-big-moment-why-everything-is-changing-now-ft-neil-zeghidour-gradium-ai.json":()=>j(()=>import("./voice-ais-big-moment-why-everything-is-changing-now-ft-neil-zeghidour-gradium-ai-CeTktyZT.js"),[]),
426"../../content/episodes/weights-biases-the-developer-first-mlops-platform-with-ceo-lukas-biewald.json":()=>j(()=>import("./weights-biases-the-developer-first-mlops-platform-with-ceo-lukas-biewald-DI_k_1Iz.js"),[]),
426"../../content/episodes/what-you-must-know-about-ai-engineering-in-2025-chip-huyen-author-of-ai-engineer.json":()=>j(()=>import("./what-you-must-know-about-ai-engineering-in-2025-chip-huyen-author-of-ai-engineer-OnBIAbzC.js"),[]),
426"../../content/episodes/whats-next-for-ai-openais-ukasz-kaiser-transformer-co-author.json":()=>j(()=>import("./whats-next-for-ai-openais-ukasz-kaiser-transformer-co-author-DqSVZnbd.js"),[]),
426"../../content/episodes/when-ai-improves-itself-richard-socher-recursive.json":()=>j(()=>import("./when-ai-improves-itself-richard-socher-recursive-kEYDBW1W.js"),[]),
426"../../content/episodes/who-feeds-the-gpus-inside-ai-s-hidden-30b-layer-renen-hallak-vast-data.json":()=>j(()=>import("./who-feeds-the-gpus-inside-ai-s-hidden-30b-layer-renen-hallak-vast-data-BmozKoxm.js"),[]),
426"../../content/episodes/why-ai-agents-cheat-eric-ho-goodfire.json":()=>j(()=>import("./why-ai-agents-cheat-eric-ho-goodfire-B5T4JZBW.js"),[]),
426"../../content/episodes/why-ecosystem-partnerships-are-the-future-in-the-age-of-ai-bob-moore-from-crossb.json":()=>j(()=>import("./why-ecosystem-partnerships-are-the-future-in-the-age-of-ai-bob-moore-from-crossb-DhWteKy-.js"),[]),
426"../../content/episodes/why-generative-ai-will-unlock-new-art-forms-cris-valenzuela-from-runway.json":()=>j(()=>import("./why-generative-ai-will-unlock-new-art-forms-cris-valenzuela-from-runway-TFTcZczw.js"),[]),
426"../../content/episodes/why-influx-rebuilt-its-database-for-the-iot-and-robotics-explosion.json":()=>j(()=>import("./why-influx-rebuilt-its-database-for-the-iot-and-robotics-explosion-Cxa02W82.js"),[]),
426"../../content/episodes/why-this-ex-meta-leader-is-rethinking-ai-infrastructure-lin-qiao-ceo-fireworks-a.json":()=>j(()=>import("./why-this-ex-meta-leader-is-rethinking-ai-infrastructure-lin-qiao-ceo-fireworks-a-B6Ruv23P.js"),[]),
426"../../content/episodes/you-com-an-ai-chatbot-to-search-the-web-with-ceo-richard-socher.json":()=>j(()=>import("./you-com-an-ai-chatbot-to-search-the-web-with-ceo-richard-socher-CNZCEgOB.js"),[])
426}),Ow=xW;async function SW(t){const e=Object.entries(kW).find(([r])=>r.endsWith(`/${t}.json`));return e?(await e[1]()).default:null}function CW(t){var n;const e=Ow.filter(r=>r.id===t);return(n=e.find(r=>!r.variant)??e[0])==null?void 0:n.slug}function EW(t){return Ow.filter(e=>e.id===t)}function AW(t){return t?t.startsWith("anthropic/")?t.slice(10):t:null}function Pw(t){const e=Math.max(0,Math.round(t)),n=Math.floor(e/3600),r=Math.floor(e%3600/60),s=e%60,i=n>0?String(r).padStart(2,"0"):String(r);return n>0?`${n}:${i}:${String(s).padStart(2,"0")}`:`${i}:${String(s).padStart(2,"0")}`}function jw(t,e){return`https://www.youtube.com/watch?v=${t}&t=${Math.max(0,Math.round(e))}s`}function TW(t){return t.chapters.map((e,n)=>({chapter:e,blocks:t.transcript.filter(r=>r.chapter===n)}))}function _W(t,e){var r;const n=t.transcript.map(s=>`${s.speaker}: ${s.text}`).join(` 427 428`);return{"@context":"https://schema.org","@graph":[{"@type":"PodcastEpisode","@id":`${e}#episode`,url:e,name:t.title,datePublished:t.publishedAt,description:t.seoDescription||t.summary,timeRequired:`PT${Math.round(t.durationSeconds/60)}M`,transcript:n,associatedMedia:{"@type":"MediaObject",contentUrl:t.links.youtube},partOfSeries:{"@type":"PodcastSeries",name:t.show,url:"https://mattturck.com/podcast"},author:{"@type":"Person",name:t.host,url:"https://mattturck.com"},actor:t.guest.name?{"@type":"Person",name:t.guest.name,jobTitle:t.guest.role||void 0}:void 0,keywords:((r=t.tags)==null?void 0:r.join(", "))||void 0},{"@type":"VideoObject","@id":`${e}#video`,name:t.title,description:t.seoDescription||t.summary,thumbnailUrl:t.thumbnail,uploadDate:t.publishedAt,duration:`PT${Math.round(t.durationSeconds/60)}M`,embedUrl:`https://www.youtube.com/embed/${t.id}`,transcript:n,hasPart:t.chapters.map(s=>({"@type":"Clip",name:s.title,startOffset:s.start,endOffset:s.end,url:jw(t.id,s.start)}))},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"MAD Podcast",item:"https://mattturck.com/podcast"},{"@type":"ListItem",position:2,name:t.title,item:e}]}]}}const NW="/lovable-uploads/e6fb24b8-d6ab-4a82-a4f6-08e36a8e4c5b.png",IW=t=>new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),nu=({video:t,className:e,compact:n=!1,pinned:r=!1})=>{const s=CW(t.id),i=`https://www.youtube.com/watch?v=${t.id}`,o=h.jsxs("div",{className:"relative aspect-video overflow-hidden rounded-md bg-surface",children:[h.jsx("img",{src:t.thumbnail,alt:"",loading:"lazy",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"}),h.jsx("span",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100",children:h.jsx("span",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-white/90 shadow",children:h.jsx(V_,{className:"h-5 w-5 translate-x-0.5 text-black",fill:"currentColor"})})}),t.duration&&h.jsx("span",{className:"absolute bottom-2 right-2 rounded bg-black/75 px-1.5 py-0.5 text-[0.7rem] font-medium text-white",children:t.duration}),r&&h.jsx("span",{className:"absolute left-2 top-2 rounded bg-primary px-2 py-0.5 text-[0.7rem] font-medium text-primary-foreground",children:"ð Pinned"})]}),a=h.jsxs(h.Fragment,{children:[h.jsx("h3",{className:"mt-3 font-semibold leading-snug transition-colors group-hover:text-primary",children:t.title}),h.jsx("p",{className:"mt-1.5 line-clamp-2 text-sm leading-relaxed text-muted-foreground",children:t.description}),h.jsxs("p",{className:"mt-2 text-xs uppercase tracking-wide text-muted-foreground",children:[IW(t.publishedAt),t.viewCount&&` · ${parseInt(t.viewCount,10).toLocaleString()} views`]})]});return h.jsxs("div",{className:ee("group flex flex-col",e),children:[s?h.jsxs(Yr,{to:`/podcast/${s}`,className:"block",children:[o,a]}):h.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"block",children:[o,a]}),!n&&h.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[h.jsx(oe,{asChild:!0,variant:"outline",size:"sm",className:"w-full",children:h.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:[h.jsx("img",{src:NW,alt:"",className:"mr-2 h-4 w-4"}),"Watch on YouTube"]})}),s&&h.jsx(oe,{asChild:!0,variant:"secondary",size:"sm",className:"w-full",children:h.jsxs(Yr,{to:`/podcast/${s}`,children:[h.jsx(B_,{className:"mr-2 h-4 w-4"}),"View transcript"]})})]})]})};function Gn({className:t,...e}){return h.jsx("div",{className:ee("animate-pulse rounded-md bg-muted",t),...e})}function aI(){const[t,e]=v.useState([]),[n,r]=v.useState(!0),[s,i]=v.useState(null);v.useEffect(()=>{let l=!1;return xe.from("youtube_videos").select("*").order("published_at",{ascending:!1}).then(({data:c,error:u})=>{l||(u?i(u.message):e((c??[]).map(d=>
428({id:d.id,title:d.title,description:d.description??"",publishedAt:d.published_at,thumbnail:d.thumbnail??"",duration:d.duration??"",viewCount:d.view_count??void 0,isPinned:!!d.is_pinned}))),r(!1))}),()=>{l=!0}},[]);const o=t.find(l=>l.isPinned)??null,a=t.filter(l=>!l.isPinned);return{videos:t,pinned:o,rest:a,loading:n,error:s}}function jf(t){const e=document.createElement("textarea");e.innerHTML=t;const n=e.value,r=document.createElement("div");return r.innerHTML=n,r.textContent||r.innerText||""}const tl=[{id:1,title:"The 2025 MAD (Machine Learning, AI & Data) Landscape",excerpt:"A comprehensive analysis of the rapidly evolving AI and data infrastructure ecosystem. From foundation models to enterprise applications, explore the key players and trends shaping the future of artificial intelligence.",content:"<p>A comprehensive analysis of the rapidly evolving AI and data infrastructure ecosystem...</p>",slug:"mad-landscape-2025",date:"2025-03-04",read_time:"25 min read",category:"AI",featured_image:"https://mattturck.com/wp-content/uploads/2025/03/Screenshot-1602-1024x378.webp",author:"Matt Turck",sticky:!1},{id:2,title:"Quick S-1 Teardown: CoreWeave",excerpt:"The CoreWeave IPO presents a fascinating profile that blends cloud provider, hardware company, and AI startup characteristics. Here's our analysis of their unique position in the infrastructure space.",content:"<p>The CoreWeave IPO presents a fascinating profile...</p>",slug:"coreweave",date:"2025-03-04",read_time:"12 min read",category:"IPO",featured_image:"https://mattturck.com/wp-content/uploads/2025/03/Screenshot-1602-1024x378.webp",author:"Matt Turck",sticky:!1},{id:3,title:"AI in 2024: Never a Dull Moment",excerpt:"In AI, it's been the year of big, bigger and biggest. A comprehensive look at the explosive growth in the machine learning and AI ecosystem, mapping the key players and trends shaping the industry.",content:"<p>In AI, it's been the year of big, bigger and biggest...</p>",slug:"ai2024",date:"2024-11-10",read_time:"15 min read",category:"AI",featured_image:"https://mattturck.com/wp-content/uploads/2024/11/MAD-matt-aman-1024x576.jpeg",author:"Matt Turck",sticky:!1}];async function lI(t=10,e=1,n,r){console.log(`ð Fetching ${t} posts from Supabase DB, page ${e}${n?`, category: ${n}`:""}${r?`, search: ${r}`:""}`);const i=n?{ai:"AI",ipo:"IPO","new-investment":"New Investment",data:"Data"}[n.toLowerCase()]||n:void 0;try{const o="blog_posts";let a=xe.from(o).select("*",{count:"exact",head:!0}),l=xe.from(o).select("*").order("date",{ascending:!1}).range((e-1)*t,e*t-1);if(i&&i!=="all"&&i.toLowerCase()!=="uncategorized"&&(a=a.ilike("category",i),l=l.ilike("category",i)),r&&r.trim()){const p=`%${r}%`;a=a.or(`title.ilike.${p},content.ilike.${p},excerpt.ilike.${p}`),l=l.or(`title.ilike.${p},content.ilike.${p},excerpt.ilike.${p}`)}const[{count:c},{data:u,error:d}]=await Promise.all([a,l]);return d?(console.error("â Supabase error:",d),{posts:tl.slice(0,t),total:tl.length}):(console.log(`â
Fetched ${(u==null?void 0:u.length)||0} posts from Supabase (${c} total matching)`),{posts:(u||[]).map(p=>({...p,title:jf(p.title),excerpt:jf(p.excerpt),content:p.content,featured_image:p.featured_image?p.featured_image.replace(/^http:\/\//i,"https://"):null})),total:c||0})}catch(o){return console.error("â Failed to fetch posts from Supabase:",o),{posts:tl.slice(0,t),total:tl.length}}}async function OW(t){console.log(`ð Fetching post by slug: ${t}`);try{const e="blog_posts",{data:n,error:r}=await xe.from(e).select("*").eq("slug",t).maybeSingle();if(r&&console.error("â Supabase error:",r),n)return console.log("â
Fetched post from Supabase:",n.title),{...n,title:jf(n.title),excerpt:jf(n.excerpt),content:n.content,featured_image:n.featured_image?n.featured_image.replace(/^http:\/\//i,"https://"):null};console.log("â ï¸ Post not in Supabase, trying WordPress API...");const{data:s,error:i}=await xe.functions.invoke("fetch-blog-posts",{body:{action:"post",slug:t}});return i||!s?(console.error("â WordPress API error:",i),tl.find(o=>o.slug===t)||null):(console.log("â
Fetched post from WordPress:",s.title),s)}catch(e){return console.error("â Failed to fetch post:",e),tl.find(n=>n.slug===t)||null}}const PW=t=>new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ES=({title:t,href:e})=>h.jsxs("div",{className:"mb-6 flex items-baseline justify-between gap-4 border-b border-border pb-3",children:[h.jsx("h2",{className:"episode-title text-3xl",children:t}),h.jsx(Yr,{to:e,className:"shrink-0 text-xs font-semibold uppercase tracking-widest text-muted-foreground transition-colors hover:text-foreground",children:"View all"})]}),jW=({post:t})=>{var e;return h.jsxs(Yr,{to:`/${t.slug}`,className:"group flex flex-col",children:[h.jsx("div",{className:"aspect-video overflow-hidden rounded-md bg-surface",children:t.featured_image?h.jsx("img",{src:t.featured_image,alt:"",loading:"lazy",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"}):h.jsx("div",{className:"h-full w-full bg-secondary"})}),h.jsx("h3",{className:"mt-3 font-semibold leading-snug transition-colors group-hover:text-primary",children:t.title}),h.jsx("p",{className:"mt-1.5 line-clamp-2 text-sm leading-relaxed text-muted-foreground",children:(e=t.excerpt)==null?void 0:e.replace(/<[^>]*>/g,"")}),h.jsxs("p",{className:"mt-2 text-xs uppercase tracking-wide text-muted-foreground",children:[PW(t.date),t.read_time&&` · ${t.read_time}`]})]})},AS=()=>h.jsx(h.Fragment,{children:Array.from({length:4}).map((t,e)=>h.jsxs("div",{children:[h.jsx(Gn,{className:"aspect-video w-full rounded-md"}),h.jsx(Gn,{className:"mt-3 h-5 w-5/6"}),h.jsx(Gn,{className:"mt-2 h-4 w-full"})]},e))}),MW=()=>{const[t,e]=v.useState([]),[n,r]=v.useState(!0),{videos:s,loading:i}=aI();v.useEffect(()=>{lI(20).then(({posts:l})=>e(l)).catch(()=>e([])).finally(()=>r(!1))},[]);const o=t.find(l=>l.sticky),a=t.filter(l=>l.id!==(o==null?void 0:o.id)).slice(0,4);return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx(lH,{}),o&&h.jsx("section",{className:"py-8 lg:py-12",children:h.jsx("div",{className:"blog-container",children:h.jsx(oI,{...o,featured:!0,pinned:!0})})}),(i||s.length>0)&&h.jsx("section",{className:"pt-4 pb-12 lg:pt-8",children:h.jsxs("div",{className:"blog-container",children:[h.jsx(ES,{title:"Podcast",href:"/podcast"}),h.jsx("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-4",children:i?h.jsx(AS,{}):s.slice(0,4).map(l=>h.jsx(nu,{video:l,compact:!0},l.id))})]})}),(n||a.length>0)&&h.jsx("section",{id:"articles",className:"pb-16 lg:pb-24",children:h.jsxs("div",{className:"blog-container",children:[h.jsx(ES,{title:"Blog",href:"/blog"}),h.jsx("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-4",children:n?h.jsx(AS,{}
428):a.map(l=>h.jsx(jW,{post:l},l.slug))})]})}),h.jsx(An,{})]})},Mw=({className:t,...e})=>h.jsx("nav",{role:"navigation","aria-label":"pagination",className:ee("mx-auto flex w-full justify-center",t),...e});Mw.displayName="Pagination";const Rw=v.forwardRef(({className:t,...e},n)=>h.jsx("ul",{ref:n,className:ee("flex flex-row items-center gap-1",t),...e}));Rw.displayName="PaginationContent";const Vn=v.forwardRef(({className:t,...e},n)=>h.jsx("li",{ref:n,className:ee("",t),...e}));Vn.displayName="PaginationItem";const Fo=({className:t,isActive:e,size:n="icon",...r})=>h.jsx("a",{"aria-current":e?"page":void 0,className:ee(im({variant:e?"outline":"ghost",size:n}),t),...r});Fo.displayName="PaginationLink";const Dw=({className:t,...e})=>h.jsxs(Fo,{"aria-label":"Go to previous page",size:"default",className:ee("gap-1 pl-2.5",t),...e,children:[h.jsx(k5,{className:"h-4 w-4"}),h.jsx("span",{children:"Previous"})]});Dw.displayName="PaginationPrevious";const Lw=({className:t,...e})=>h.jsxs(Fo,{"aria-label":"Go to next page",size:"default",className:ee("gap-1 pr-2.5",t),...e,children:[h.jsx("span",{children:"Next"}),h.jsx(S5,{className:"h-4 w-4"})]});Lw.displayName="PaginationNext";const Yv=({className:t,...e})=>h.jsxs("span",{"aria-hidden":!0,className:ee("flex h-9 w-9 items-center justify-center",t),...e,children:[h.jsx(A5,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"More pages"})]});Yv.displayName="PaginationEllipsis";const TS=12,RW=t=>({ai:"AI & Data",ipo:"IPO","new-investment":"New Investment",data:"Data"})[t.toLowerCase()]||t,DW=(t,e)=>{const[n,r]=v.useState(t);return v.useEffect(()=>{const s=setTimeout(()=>{r(t)},e);return()=>{clearTimeout(s)}},[t,e]),n},LW=()=>{const[t,e]=v.useState([]),[n,r]=v.useState(0),[s,i]=v.useState(!0),[o,a]=v.useState(null),[l,c]=v.useState(""),[u,d]=Nz(),f=parseInt(u.get("page")||"1",10),p=u.get("category")||void 0,g=DW(l,300);v.useEffect(()=>{(async()=>{try{i(!0);const{posts:k,total:S}=await lI(TS,f,p,g);e(k),r(S)}catch{a("Failed to load blog posts")}finally{i(!1)}})()},[f,p,g]);const m=Math.ceil(n/TS),y=x=>{const k=new URLSearchParams(u);k.set("page",x.toString()),d(k),window.scrollTo({top:0,behavior:"smooth"})},b=x=>{c(x.target.value);const k=new URLSearchParams(u);k.set("page","1"),d(k)},w=()=>{const x=[],k=f>3,S=f<m-2;f>1&&x.push(h.jsx(Vn,{children:h.jsx(Dw,{onClick:()=>y(f-1)})},"prev")),f>2&&x.push(h.jsx(Vn,{children:h.jsx(Fo,{onClick:()=>y(1),isActive:!1,children:"1"})},1)),k&&x.push(h.jsx(Vn,{children:h.jsx(Yv,{})},"ellipsis-start"));const E=Math.max(1,f-1),C=Math.min(m,f+1);for(let A=E;A<=C;A++)A===m&&f<m-1||x.push(h.jsx(Vn,{children:h.jsx(Fo,{onClick:()=>y(A),isActive:A===f,children:A})},A));return S&&x.push(h.jsx(Vn,{children:h.jsx(Yv,{})},"ellipsis-end")),f<m-1&&x.push(h.jsx(Vn,{children:h.jsx(Fo,{onClick:()=>y(m),isActive:!1,children:m})},m)),f<m&&x.push(h.jsx(Vn,{children:h.jsx(Lw,{onClick:()=>y(f+1)})},"next")),x};return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx("section",{className:"py-3 lg:py-4 bg-gradient-to-b from-surface/50 to-background",children:h.jsx("div",{className:"blog-container",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-foreground mb-2",children:p?RW(p):"All Posts"}),p&&h.jsx("p",{className:"text-muted-foreground",children:"Showing posts in this category"})]})})}),h.jsx("section",{className:"py-4 lg:py-6",children:h.jsxs("div",{className:"blog-container",children:[h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:"relative max-w-md",children:[h.jsx(qb,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),h.jsx(Nt,{type:"text",placeholder:"Search posts...",value:l,onChange:b,className:"pl-10"})]})}),s&&h.jsx("div",{className:"text-center",children:h.jsx("div",{className:"text-muted-foreground",children:"Loading articles..."})}),o&&h.jsx("div",{className:"text-center",children:h.jsxs("div",{className:"text-red-500",children:["Error: ",o]})}),!s&&!o&&t.length>0&&h.jsxs("div",{className:"transition-all duration-300 ease-in-out",children:[h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8 mb-12 animate-fade-in",children:t.map(x=>h.jsx(oI,{...x},x.slug))}),m>1&&h.jsx("div",{className:"flex justify-center",children:h.jsx(Mw,{children:h.jsx(Rw,{children:w()})})})]}),!s&&!o&&t.length===0&&h.jsx("div",{className:"text-center transition-all duration-300 ease-in-out animate-fade-in",children:h.jsx("div",{className:"text-muted-foreground",children:g?`No posts found for "${g}"`:"No posts found."})})]})}),h.jsx(An,{})]})},$W=ud("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ru({className:t,variant:e,...n}){return h.jsx("div",{className:ee($W({variant:e}),t),...n})}var gm="Popover",[cI,Eee]=sr(gm,[nc]),gd=nc(),[FW,ro]=cI(gm),uI=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=gd(e),l=v.useRef(null),[c,u]=v.useState(!1),[d,f]=Ds({prop:r,defaultProp:s??!1,onChange:i,caller:gm});return h.jsx(S2,{...a,children:h.jsx(FW,{scope:e,contentId:Is(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:c,onCustomAnchorAdd:v.useCallback(()=>u(!0),[]),onCustomAnchorRemove:v.useCallback(()=>u(!1),[]),modal:o,children:n})})};uI.displayName=gm;var dI="PopoverAnchor",zW=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=ro(dI,n),i=gd(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return v.useEffect(()=>(o(),()=>a()),[o,a]),h.jsx(Xp,{...i,...r,ref:e})});zW.displayName=dI;var hI="PopoverTrigger",fI=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=ro(hI,n),i=gd(n),o=$e(e,s.triggerRef),a=h.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vI(s.open),...r,ref:o,onClick:ge(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?a:h.jsx(Xp,{asChild:!0,...i,children:a})});
428fI.displayName=hI;var $w="PopoverPortal",[UW,BW]=cI($w,{forceMount:void 0}),pI=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=ro($w,e);return h.jsx(UW,{scope:e,forceMount:n,children:h.jsx(is,{present:n||i.open,children:h.jsx(ld,{asChild:!0,container:s,children:r})})})};pI.displayName=$w;var Dl="PopoverContent",mI=v.forwardRef((t,e)=>{const n=BW(Dl,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=ro(Dl,t.__scopePopover);return h.jsx(is,{present:r||i.open,children:i.modal?h.jsx(HW,{...s,ref:e}):h.jsx(WW,{...s,ref:e})})});mI.displayName=Dl;var VW=Yo("PopoverContent.RemoveScroll"),HW=v.forwardRef((t,e)=>{const n=ro(Dl,t.__scopePopover),r=v.useRef(null),s=$e(e,r),i=v.useRef(!1);return v.useEffect(()=>{const o=r.current;if(o)return gw(o)},[]),h.jsx(lm,{as:VW,allowPinchZoom:!0,children:h.jsx(gI,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ge(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:ge(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),WW=v.forwardRef((t,e)=>{const n=ro(Dl,t.__scopePopover),r=v.useRef(!1),s=v.useRef(!1);return h.jsx(gI,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),gI=v.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=t,f=ro(Dl,n),p=gd(n);return mw(),h.jsx(om,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:h.jsx(Ql,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:h.jsx(ow,{"data-state":vI(f.open),role:"dialog",id:f.contentId,...p,...d,ref:e,style:{...d.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)"}})})})}),yI="PopoverClose",qW=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=ro(yI,n);return h.jsx(ke.button,{type:"button",...r,ref:e,onClick:ge(t.onClick,()=>s.onOpenChange(!1))})});qW.displayName=yI;var GW="PopoverArrow",KW=v.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=gd(n);return h.jsx(aw,{...s,...r,ref:e})});KW.displayName=GW;function vI(t){return t?"open":"closed"}var ZW=uI,YW=fI,JW=pI,bI=mI;const _S=ZW,NS=YW,Jv=v.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>h.jsx(JW,{children:h.jsx(bI,{ref:s,align:e,sideOffset:n,className:ee("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",t),...r})}));Jv.displayName=bI.displayName;const QW=()=>{var k;const{slug:t}=W2(),e=ha(),{toast:n}=Ir(),[r,s]=v.useState(null),[i,o]=v.useState(!0),[a,l]=v.useState(null);v.useState(null);const c="shvcmmoyvrzmdhgrpqty",u=()=>{window.history.length>1?e(-1):e("/")},d=async()=>{const S=`https://mattturck.com/blog/${t}`;try{await navigator.clipboard.writeText(S),n({description:"Link copied to clipboard"})}catch(E){console.error("Failed to copy:",E),n({description:"Failed to copy link",variant:"destructive"})}},f=()=>{const S=`https://mattturck.com/blog/${t}`,E=`Check out this post: ${r==null?void 0:r.title}`,C=`https://twitter.com/intent/tweet?text=${encodeURIComponent(E)}&url=${encodeURIComponent(S)}`;window.open(C,"_blank")},p=()=>{const S=`https://mattturck.com/blog/${t}`,E=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(S)}`;window.open(E,"_blank")};if(v.useEffect(()=>{(async()=>
428{if(!t){console.log("No slug provided");return}console.log("Loading post with slug:",t);try{o(!0),l(null);const E=await OW(t);if(console.log("Fetched post:",E),!E)console.log("Post not found for slug:",t),l("Post not found");else{console.log("Post loaded successfully:",E.title);const C=document.createElement("div");C.innerHTML=E.content;const A=$=>`https://${c}.functions.supabase.co/image-proxy?url=${encodeURIComponent($)}`,N=$=>$.replace(/^http:\/\//i,"https://"),M=$=>{if(/^https?:\/\//i.test($))return $;if(/^\/\//.test($))return`https:${$}`;try{const O=new URL("https://mattturck.com");return new URL($,O).toString()}catch{return $}},F=E.featured_image?N(M(E.featured_image)):null,P=Array.from(C.querySelectorAll("img"));console.log(`Found ${P.length} images in post: ${E.title}`);let V=!1;P.forEach(($,O)=>{const R=ae=>!ae||/^data:/i.test(ae)||/blank\.gif$/i.test(ae),K=ae=>$.getAttribute(ae),de=[K("data-src"),K("data-lazy-src"),K("data-original"),K("data-orig-file"),K("data-large-file"),K("data-medium-file"),K("src")].filter(Boolean);console.log(`Image ${O}: candidates=`,de);let se=de.find(ae=>!R(ae))||void 0;if(!se){const ae=$.closest("a");ae!=null&&ae.href&&/(\.(png|jpe?g|webp|gif)|\/uploads\/)/i.test(ae.href)&&(se=ae.href,console.log(`Image ${O}: Using anchor href:`,se))}if(se){const ae=M(se),he=N(ae);if(F&&he===F&&!V){console.log(`Image ${O}: Removing duplicate featured image from content`),V=!0,($.closest("figure")||$.closest("a")||$).remove();return}const Y=A(he);console.log(`Image ${O}: Proxying ${he} -> ${Y}`),$.setAttribute("src",Y),$.setAttribute("onerror",`this.onerror=null; this.src='${he}'; console.error('Proxy failed for ${he}');`)}else console.warn(`Image ${O}: No valid source found`,$.outerHTML.substring(0,200));["data-src","data-lazy-src","data-original","data-orig-file","data-large-file","data-medium-file"].forEach(ae=>$.removeAttribute(ae)),$.hasAttribute("srcset")&&$.removeAttribute("srcset"),$.hasAttribute("sizes")&&$.removeAttribute("sizes"),$.hasAttribute("referrerpolicy")||$.setAttribute("referrerpolicy","no-referrer"),O===0&&($.setAttribute("loading","eager"),$.setAttribute("decoding","async"))});const _=$=>$.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");Array.from(C.querySelectorAll("a[href]")).forEach($=>{var K,de;const O=$.getAttribute("href")||"",R=M(O);if(/\.pdf(\?|$)/i.test(R)){$.textContent=R,$.setAttribute("target","_blank"),$.setAttribute("rel","noopener noreferrer");const se=new RegExp(`(${_(R)})(?:\\s*\\1)+`,"i");$.textContent=($.textContent||"").replace(se,"$1");const ae=re=>{if(re.nodeType===Node.TEXT_NODE)return(re.textContent||"").replace(/\s+/g,"").includes(R.replace(/\s+/g,""));if(re.nodeType===Node.ELEMENT_NODE){const D=re;return D.tagName==="A"&&M(D.getAttribute("href")||"")===R?!0:(D.textContent||"").includes(R)}return!1};let he=$.nextSibling;for(let re=0;re<3&&he&&(ae(he)||he.nodeType===Node.TEXT_NODE&&(he.textContent||"").trim()==="");){const be=he;he=he.nextSibling,(K=be.parentNode)==null||K.removeChild(be)}const Y=$.nextElementSibling;Y&&Y.tagName==="A"&&M(Y.getAttribute("href")||"")===R&&((de=Y.parentNode)==null||de.removeChild(Y))}}),C.innerHTML=C.innerHTML.replace(/(https?:\/\/[^\s"'<>\)]+\.pdf(?:\?[^\s"'<>\)]*)?)(?:\1)+/gi,"$1"),s({...E,content:C.innerHTML});const B=C.querySelector("img");console.log("First image after rewrite:",B==null?void 0:B.getAttribute("src"))}}catch(E){console.error("Error loading post:",E),l("Failed to load blog post")}finally{o(!1)}})()},[t]),i)return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-5xl",children:[h.jsxs(oe,{variant:"ghost",onClick:u,className:"mb-8 text-muted-foreground hover:text-foreground",children:[h.jsx(Xa,{className:"h-4 w-4 mr-2"}),"Back"]}),h.jsx("div",{className:"text-center py-16",children:h.jsx("div",{className:"text-muted-foreground",children:"Loading article..."})})]}),h.jsx(An,{})]});if(a||!r)return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-5xl",children:[h.jsxs(oe,{variant:"ghost",onClick:u,className:"mb-8 text-muted-foreground hover:text-foreground",children:[h.jsx(Xa,{className:"h-4 w-4 mr-2"}),"Back"]}),h.jsx("div",{className:"text-center py-16",children:h.jsxs("div",{className:"text-red-500",children:["Error: ",a||"Post not found"]}
428)})]}),h.jsx(An,{})]});const g=r.excerpt?r.excerpt.replace(/<[^>]*>/g,"").substring(0,160):`Read "${r.title}" by Matt Turck on AI, data infrastructure, and enterprise technology.`,m=r.featured_image||"https://mattturck.com/MT-Black.png",y=`https://mattturck.com/blog/${t}`,b=r.featured_image&&r.featured_image.includes("supabase.co/storage"),x=(()=>{if(!r.featured_image)return null;if(b)return r.featured_image;const S=r.featured_image.replace(/^http:\/\//i,"https://");return`https://${c}.functions.supabase.co/image-proxy?url=${encodeURIComponent(S)}`})();return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsxs(zb,{children:[h.jsxs("title",{children:[r.title," - Matt Turck"]}),h.jsx("meta",{name:"description",content:g}),h.jsx("link",{rel:"canonical",href:y}),h.jsx("meta",{property:"og:type",content:"article"}),h.jsx("meta",{property:"og:url",content:y}),h.jsx("meta",{property:"og:title",content:r.title}),h.jsx("meta",{property:"og:description",content:g}),h.jsx("meta",{property:"og:image",content:m}),h.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),h.jsx("meta",{name:"twitter:url",content:y}),h.jsx("meta",{name:"twitter:title",content:r.title}),h.jsx("meta",{name:"twitter:description",content:g}),h.jsx("meta",{name:"twitter:image",content:m}),h.jsx("meta",{property:"article:published_time",content:r.date}),h.jsx("meta",{property:"article:author",content:"Matt Turck"}),r.tags&&r.tags.map(S=>h.jsx("meta",{property:"article:tag",content:S},S)),h.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BlogPosting",mainEntityOfPage:{"@type":"WebPage","@id":y},headline:r.title,description:g,image:m?[m]:void 0,datePublished:r.date,keywords:((k=r.tags)==null?void 0:k.join(", "))||void 0,articleSection:r.category||void 0,author:{"@type":"Person",name:r.author||"Matt Turck",url:"https://mattturck.com"},publisher:{"@type":"Person",name:"Matt Turck",url:"https://mattturck.com"}})})]}),h.jsx(En,{}),h.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-5xl",children:[h.jsxs(oe,{variant:"ghost",onClick:u,className:"mb-8 text-muted-foreground hover:text-foreground",children:[h.jsx(Xa,{className:"h-4 w-4 mr-2"}),"Back"]}),h.jsxs("header",{className:"mb-12",children:[h.jsxs("div",{className:"mb-4 space-y-2",children:[h.jsx("div",{children:h.jsx(ru,{variant:"secondary",className:"text-sm font-medium",children:r.category})}),r.tags&&r.tags.length>0&&h.jsx("div",{className:"flex flex-wrap gap-2",children:r.tags.map(S=>h.jsx(ru,{variant:"outline",className:"text-xs",children:S},S))})]}),h.jsx("h1",{className:"font-display text-4xl lg:text-5xl font-bold text-foreground mb-6 leading-tight",children:r.title}),h.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 pb-8 border-b border-border",children:[h.jsxs("div",{className:"flex items-center space-x-6 text-sm text-muted-foreground",children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(xv,{className:"h-4 w-4"}),h.jsx("span",{children:md(new Date(r.date),"MMM d, yyyy")})]}),h.jsx("span",{children:"â¢"}),h.jsx("span",{children:r.read_time}),h.jsx("span",{children:"â¢"}),h.jsx("span",{children:"By Matt Turck"})]}),h.jsx("div",{className:"flex items-center space-x-2",children:h.jsxs(_S,{children:[h.jsx(NS,{asChild:!0,children:h.jsxs(oe,{variant:"outline",size:"sm",children:[h.jsx(Sv,{className:"h-4 w-4 mr-2"}),"Share"]})}),h.jsx(Jv,{className:"w-48 p-2",children:h.jsxs("div",{className:"flex flex-col space-y-1",children:[h.jsxs(oe,{variant:"ghost",size:"sm",onClick:d,className:"justify-start",children:[h.jsx(uk,{className:"h-4 w-4 mr-2"}),"Copy link"]}),h.jsxs(oe,{variant:"ghost",size:"sm",onClick:f,className:"justify-start",children:[h.jsx("svg",{className:"h-4 w-4 mr-2",viewBox:"0 0 24 24",fill:"currentColor",children:h.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"})}),"Post to X"]}),h.jsxs(oe,{variant:"ghost",size:"sm",onClick:p,className:"justify-start",children:[h.jsx("svg",{className:"h-4 w-4 mr-2",viewBox:"0 0 24 24",fill:"
428currentColor",children:h.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),"Post to LinkedIn"]})]})})]})})]})]}),x&&h.jsx("div",{className:"mb-12 -mx-4 sm:mx-0",children:h.jsx("img",{src:x,alt:r.title,className:"w-full h-auto rounded-lg",loading:"eager",decoding:"async",referrerPolicy:"no-referrer",onError:S=>{const E=S.target;if(E.onerror=null,r.featured_image){const C=r.featured_image.replace(/^http:\/\//i,"https://");E.src=C,console.error("Featured image proxy failed, trying direct:",r.featured_image)}}})}),h.jsx("article",{className:"blog-prose max-w-none",children:h.jsx("div",{dangerouslySetInnerHTML:{__html:r.content}})}),h.jsx("div",{className:"mt-12 pt-8 border-t border-border",children:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs(oe,{variant:"outline",onClick:u,children:[h.jsx(Xa,{className:"h-4 w-4 mr-2"}),"Back to Articles"]}),h.jsxs(_S,{children:[h.jsx(NS,{asChild:!0,children:h.jsxs(oe,{variant:"outline",size:"sm",children:[h.jsx(Sv,{className:"h-4 w-4 mr-2"}),"Share"]})}),h.jsx(Jv,{className:"w-48 p-2",children:h.jsxs("div",{className:"flex flex-col space-y-1",children:[h.jsxs(oe,{variant:"ghost",size:"sm",onClick:d,className:"justify-start",children:[h.jsx(uk,{className:"h-4 w-4 mr-2"}),"Copy link"]}),h.jsxs(oe,{variant:"ghost",size:"sm",onClick:f,className:"justify-start",children:[h.jsx("svg",{className:"h-4 w-4 mr-2",viewBox:"0 0 24 24",fill:"currentColor",children:h.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"})}),"Post to X"]}),h.jsxs(oe,{variant:"ghost",size:"sm",onClick:p,className:"justify-start",children:[h.jsx("svg",{className:"h-4 w-4 mr-2",viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})}),"Post to LinkedIn"]})]})})]})]})})]}),h.jsx(An,{})]})};var XW="Separator",IS="horizontal",e8=["horizontal","vertical"],wI=v.forwardRef((t,e)=>{const{decorative:n,orientation:r=IS,...s}=t,i=t8(r)?r:IS,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return h.jsx(ke.div,{"data-orientation":i,...a,...s,ref:e})});wI.displayName=XW;function t8(t){return e8.includes(t)}var xI=wI;const kI=v.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},s)=>h.jsx(xI,{ref:s,decorative:n,orientation:e,className:ee("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));kI.displayName=xI.displayName;const n8=()=>{const[t,e]=v.useState(null),[n,r]=v.useState(!0),[s,i]=v.useState(null);return v.useEffect(()=>{(async()=>{try{const{data:a,error:l}=await xe.from("youtube_videos").select("*").order("published_at",{ascending:!1});if(l)throw console.error("Database query error:",l),new Error(l.message);const c=(a==null?void 0:a.map(f=>({id:f.id,title:f.title,description:f.description,publishedAt:f.published_at,thumbnail:f.thumbnail,duration:f.duration,viewCount:f.view_count})))||[],u=c.find((f,p)=>{var g;return(g=a==null?void 0:a[p])==null?void 0:g.is_pinned})||null,d=c.filter((f,p)=>{var g;return!((g=a==null?void 0:a[p])!=null&&g.is_pinned)}).slice(0,4);e({pinnedVideo:u,latestVideos:d}),i(null)}catch(a){console.error("YouTube fetch failed:",a),i("Failed to load podcast episodes. Please try again later.")}finally{r(!1)}})()},[]),n?h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx("main",{className:"blog-container py-12",children:h.jsx("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((o,a)=>h.jsxs("div",{children:[h.jsx(Gn,{className:"aspect-video w-full rounded-md"}),h.jsx(Gn,{className:"mt-3 h-5 w-5/6"}),h.jsx(Gn,{className:"mt-2 h-4 w-full"}),h.jsx(Gn,{className:"mt-1 h-4 w-2/3"})]},a))})}),h.jsx(An,{})]}):s||!t?h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx("main",{className:"blog-container py-12",children:h.jsx("div",{className:"text-center",children:h.jsx("div",{className:"bg-destructive/10 border border-destructive/20 rounded-lg p-6 max-w-md mx-auto",children:h.jsx("p",{className:"text-destructive",children:"Failed to load podcast episodes. Please try again later."})})})}),h.jsx(An,{})]}):h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsxs("main",{className:"blog-container py-12",children:[h.jsxs("div",{className:"relative mb-12",children:[h.jsx("img",{src:"/lovable-uploads/mad-podcast-mobile.webp",alt:"MAD Podcast Banner",className:"w-full h-48 object-contain rounded-lg shadow-lg md:hidden bg-surface"}),h.jsx("img",{src:"/lovable-uploads/df53e582-d1da-4058-8c92-241e09d23702.png",alt:"MAD Podcast Banner",className:"w-full h-52 object-cover rounded-lg shadow-lg hidden md:block"})]}),h.jsx("div",{className:"mb-12 max-w-4xl mx-auto text-center",children:h.jsx("p",{className:"text-xl lg:text-2xl text-muted-foreground",children:"In-depth, thoroughly researched conversations with leaders in ML, AI and Data (MAD)"})}),h.jsxs("div",{className:"mb-8",children:[h.jsxs("div",{className:"text-center mb-6",children:[h.jsx("p",{className:"text-base text-muted-foreground mb-3",children:"Watch/listen/subscribe"}),h.jsxs("div",{className:"flex justify-center items-center gap-3 md:gap-6 flex-wrap",children:[h.jsxs(oe,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-sm md:text-lg px-3 py-2 md:px-6 md:py-3",onClick:()=>window.open("https://www.youtube.com/c/DataDrivenNYC","_blank"),children:[h.jsx("img",{src:"/lovable-uploads/e6fb24b8-d6ab-4a82-a4f6-08e36a8e4c5b.png",alt:"YouTube",className:"w-5 h-5 md:w-8 md:h-8"}),h.jsx("span",{className:"hidden sm:inline",children:"YouTube"})]}),h.jsxs(oe,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-sm md:text-lg px-3 py-2 md:px-6 md:py-3",onClick:()=>window.open("https://podcasts.apple.com/us/podcast/the-mad-podcast-with-matt-turck/id1686238724","_blank"),children:[h.jsx("img",{src:"/lovable-uploads/6d6c0e49-cfc5-4
428636-968f-ffa35788cf56.png",alt:"Apple Podcasts",className:"w-5 h-5 md:w-8 md:h-8"}),h.jsx("span",{className:"hidden sm:inline",children:"Apple Podcasts"})]}),h.jsxs(oe,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-sm md:text-lg px-3 py-2 md:px-6 md:py-3",onClick:()=>window.open("https://open.spotify.com/show/7yLATDSaFvgJG80ACcRJtq","_blank"),children:[h.jsx("img",{src:"/lovable-uploads/1eabe915-dae4-4e0b-8511-3eefd5c2e9ac.png",alt:"Spotify",className:"w-5 h-5 md:w-8 md:h-8"}),h.jsx("span",{className:"hidden sm:inline",children:"Spotify"})]})]})]}),h.jsxs("div",{className:"relative",children:[h.jsx(kI,{className:"my-8"}),h.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:h.jsx("span",{className:"bg-background px-4 text-sm font-medium text-muted-foreground",children:"Recent Episodes"})})]})]}),h.jsxs("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 md:grid-cols-2",children:[t.pinnedVideo&&h.jsx(nu,{video:t.pinnedVideo,pinned:!0}),t.latestVideos[0]&&h.jsx(nu,{video:t.latestVideos[0]})]}),h.jsx("div",{className:"mt-10 grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3",children:t.latestVideos.slice(1).map(o=>h.jsx(nu,{video:o},o.id))}),h.jsx("div",{className:"mt-14 flex justify-center",children:h.jsx(oe,{asChild:!0,variant:"outline",size:"lg",className:"px-8",children:h.jsx(Yr,{to:"/podcast/all",children:"View all episodes"})})})]}),h.jsx(An,{})]})},r8=({chapters:t,onJump:e,className:n})=>{var i;const[r,s]=v.useState(((i=t[0])==null?void 0:i.slug)??null);return v.useEffect(()=>{const o=t.map(l=>document.getElementById(l.slug)).filter(l=>!!l);if(!o.length)return;const a=new IntersectionObserver(l=>{const c=l.filter(u=>u.isIntersecting).sort((u,d)=>u.boundingClientRect.top-d.boundingClientRect.top)[0];c&&s(c.target.id)},{rootMargin:"-80px 0px -70% 0px",threshold:0});return o.forEach(l=>a.observe(l)),()=>a.disconnect()},[t]),h.jsx("nav",{className:ee("space-y-1",n),"aria-label":"Episode contents",children:h.jsx("ol",{className:"space-y-1",children:t.map(o=>{const a=o.slug===r;return h.jsx("li",{children:h.jsxs("a",{href:`#${o.slug}`,onClick:()=>e==null?void 0:e(o),className:ee("group flex gap-3 py-2.5 text-[1.25rem] leading-snug transition-colors",a?"font-semibold text-foreground":"text-muted-foreground hover:text-foreground"),children:[h.jsx("span",{className:"shrink-0 pt-1 font-mono text-[0.85rem] tabular-nums text-muted-foreground/60",children:Pw(o.start)}),h.jsx("span",{children:o.title})]})},o.slug)})})})},s8=({text:t,query:e})=>{if(!e.trim())return h.jsx(h.Fragment,{children:t});const n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=t.split(new RegExp(`(${n})`,"gi"));return h.jsx(h.Fragment,{children:r.map((s,i)=>s.toLowerCase()===e.toLowerCase()?h.jsx("mark",{className:"bg-warning/30 text-foreground rounded-sm px-0.5",children:s},i):h.jsx("span",{children:s},i))})},i8=({block:t,isHost:e,videoId:n,query:r,showSpeaker:s})=>h.jsxs("div",{className:ee("group relative",e?"":"border-l-2 border-border pl-4 md:ml-8 md:pl-6"),children:[h.jsxs("div",{className:"flex items-baseline gap-3 mb-1",children:[h.jsx("span",{className:ee("text-[0.95rem] font-semibold",e?"text-accent-blue":"text-warning",!s&&"sr-only"),children:t.speaker}),h.jsx("a",{href:jw(n,t.start),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs tabular-nums text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100 hover:text-foreground",title:"Play this moment on YouTube",children:Pw(t.start)})]}),h.jsx("p",{className:"episode-transcript-text",children:h.jsx(s8,{text:t.text,query:r})})]}),o8=({episode:t})=>{const[e,n]=v.useState(""),[r,s]=v.useState(null),i=v.useMemo(()=>TW(t),[t]),o=v.useMemo(()=>{const c=e.trim().toLowerCase();return c?i.map(u=>({...u,blocks:u.blocks.filter(d=>d.text.toLowerCase().includes(c))})).filter(u=>u.blocks.length>0):i},[i,e]),a=v.useMemo(()=>e.trim()?o.reduce((c,u)=>c+u.blocks.length,0):0,[o,e]),l=async c=>{const u=`${window.location.origin}${window.location.pathname}#${c}`;try{await navigator.clipboard.writeText(u),s(c),window.setTimeout(()=>s(null),1600)}catch{}};return h.jsxs("div",{children:[h.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-8",children:[h.jsx("h2",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Transcript"}),h.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[h.jsx(qb,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}
428),h.jsx(Nt,{value:e,onChange:c=>n(c.target.value),placeholder:"Search this episode",className:"pl-9","aria-label":"Search the transcript"})]})]}),e.trim()&&h.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:a===0?`No matches for â${e}â.`:`${a} passage${a===1?"":"s"} matching â${e}â.`}),h.jsx("div",{className:"space-y-14",children:o.map(({chapter:c,blocks:u})=>h.jsxs("section",{"aria-labelledby":c.slug,children:[h.jsxs("div",{className:"group flex flex-wrap items-baseline gap-x-4 gap-y-1 border-b border-border pb-4 mb-8",children:[h.jsx("h3",{id:c.slug,className:"episode-title scroll-mt-28 text-3xl leading-tight",children:c.title}),h.jsx("a",{href:jw(t.id,c.start),target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs tabular-nums text-muted-foreground hover:text-foreground",children:Pw(c.start)}),h.jsx("button",{type:"button",onClick:()=>l(c.slug),className:"ml-auto text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100 focus:opacity-100 hover:text-foreground","aria-label":`Copy link to â${c.title}â`,children:r===c.slug?h.jsx(dd,{className:"h-4 w-4 text-success"}):h.jsx(j5,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"space-y-6",children:u.map((d,f)=>h.jsx(i8,{block:d,isHost:d.speaker===t.host,videoId:t.id,query:e,showSpeaker:f===0||u[f-1].speaker!==d.speaker},`${c.slug}-${d.start}-${f}`))})]},c.slug))})]})},a8=[{key:"youtube",label:"YouTube",icon:"/lovable-uploads/e6fb24b8-d6ab-4a82-a4f6-08e36a8e4c5b.png"},{key:"apple",label:"Apple Podcasts",icon:"/lovable-uploads/6d6c0e49-cfc5-4636-968f-ffa35788cf56.png"},{key:"spotify",label:"Spotify",icon:"/lovable-uploads/1eabe915-dae4-4e0b-8511-3eefd5c2e9ac.png"}],l8=t=>new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit"}),c8=()=>{var b;const{slug:t}=W2(),[e,n]=v.useState(null),[r,s]=v.useState(!0),[i,o]=v.useState(!0),[a,l]=v.useState(!1),[c,u]=v.useState(!1);v.useEffect(()=>{let w=!1;return s(!0),o(!0),SW(t??"").then(x=>{w||n(x)}).finally(()=>{w||s(!1)}),()=>{w=!0}},[t]),v.useEffect(()=>{var w;!e||!window.location.hash||(w=document.getElementById(window.location.hash.slice(1)))==null||w.scrollIntoView({behavior:"smooth",block:"start"})},[e]),v.useEffect(()=>{const w=()=>l(window.scrollY>420);return window.addEventListener("scroll",w,{passive:!0}),()=>window.removeEventListener("scroll",w)},[]);const d=async()=>{try{await navigator.clipboard.writeText(window.location.href),u(!0),window.setTimeout(()=>u(!1),1600)}catch{}};if(r)return h.jsxs("div",{className:"min-h-screen bg-surface",children:[h.jsx(En,{}),h.jsx("main",{className:"px-4 py-10 sm:px-6 lg:px-10",children:h.jsx("div",{className:"border border-card-border bg-card p-8 lg:p-12",children:h.jsxs("div",{className:"grid gap-10 lg:grid-cols-2",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsx(Gn,{className:"h-4 w-40"}),h.jsx(Gn,{className:"h-12 w-3/4"}),h.jsx(Gn,{className:"h-4 w-full"}),h.jsx(Gn,{className:"h-4 w-5/6"})]}),h.jsx(Gn,{className:"aspect-video w-full"})]})})}),h.jsx(An,{})]});if(!e)return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsxs("main",{className:"blog-container py-24 text-center",children:[h.jsx("h1",{className:"mb-4 text-3xl font-semibold",children:"Episode not found"}),h.jsx("p",{className:"mb-8 text-muted-foreground",children:"We couldn't find a transcript page for this episode."}),h.jsx(oe,{asChild:!0,children:h.jsx(Yr,{to:"/podcast",children:"Back to the MAD Podcast"})})]}),h.jsx(An,{})]});const f=`https://mattturck.com/podcast/${e.slug}`,p=e.seoDescription||e.summary.slice(0,155),g=EW(e.id),m=g.find(w=>!w.variant)??g[0],y=`https://mattturck.com/podcast/${(m==null?void 0:m.slug)??e.slug}`;return h.jsxs("div",{className:"min-h-screen bg-surface",children:[h.jsxs(zb,{children:[h.jsx("title",{children:`${e.title} | The MAD Podcast`}),h.jsx("meta",{name:"description",content:p}),h.jsx("link",{rel:"canonical",href:y}),e.variant&&h.jsx("meta",{name:"robots",content:"noindex"}),h.jsx("meta",{property:"og:type",content:"article"}),h.jsx("meta",{property:"og:url",content:f}),h.jsx("meta",{property:"og:title",content:e.title}),h.jsx("meta",{property:"og:description",content:p}),h.jsx("meta",{property:"og:image",content:e.thumbnail}),h.jsx("meta",{property:"og:site_name",content:"Matt Turck"}),h.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),h.jsx("meta",{name:"twitter:site",content:"@mattturck"}),h.jsx("meta",{name:"twitter:title",content:e.title}),h.jsx("meta",{name:"twitter:description",content:p}),h.jsx("meta",{name:"twitter:image",content:e.thumbnail}),h.jsx("meta",{property:"article:published_time",content:e.publishedAt}),h.jsx("meta",{property:"article:author",content:e.host}),h.jsx("script",{type:"application/ld+json",children:JSON.stringify(_W(e,f))})]}),h.jsx(En,{}),h.jsx("div",{className:ee("fixed inset-x-0 top-16 z-40 border-b border-border bg-background/95 backdrop-blur transition-transform duration-200",a?"translate-y-0":"-translate-y-[200%]"),children:h.jsxs("div",{className:"flex items-center gap-4 px-4 py-2.5 sm:px-6 lg:px-10",children:[h.jsx(Yr,{to:"/podcast",className:"shrink-0 text-sm font-semibold transition-colors hover:text-primary",children:"MAD Podcast"}),h.jsx("span",{className:"hidden truncate text-sm text-muted-foreground md:block",children:e.title}),h.jsxs("button",{type:"button",onClick:d,className:"ml-auto inline-flex shrink-0 items-center gap-1.5 rounded-full border border-border px-3 py-1 text-xs font-medium transition-colors hover:bg-secondary",children:[c?h.jsx(dd,{className:"h-3.5 w-3.5 text-success"}):h.jsx(Sv,{className:"h-3.5 w-3.5"}),c?"Copied":"Share"]})]})}),h.jsxs("main",{className:"px-4 pb-16 pt-8 sm:px-6 lg:px-10",children:[h.jsxs(Yr,{to:"/podcast",className:"mb-6 inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[h.jsx(Xa,{className:"h-4 w-4"}),"MAD Podcast"]}),h.jsx("article",{className:"border border-card-border bg-card",children:h.jsxs("div",{className:"grid lg:grid-cols-2",children:[h.jsxs("div",{className:"flex flex-col p-8 lg:p-12",children:[h.jsx("p",{className:"text-sm font-semibold",children:e.show}),e.episodeNumber!=null&&h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Episode ",e.episodeNumber]}),h.jsx("h1",{className:"episode-title mt-10 text-3xl leading-tight md:text-4xl lg:text-[2.75rem]",children:e.title}),h.jsx("p",{className:"mt-6 max-w-prose text-base leading-relaxed text-foreground
428/80",children:e.summary}),h.jsxs("div",{className:"mt-auto pt-10 text-sm",children:[h.jsx("p",{className:"text-muted-foreground",children:l8(e.publishedAt)}),h.jsxs("p",{className:"text-muted-foreground",children:["Hosted by ",h.jsx("span",{className:"font-semibold text-foreground",children:e.host}),e.guest.name&&h.jsxs(h.Fragment,{children:[" · with ",h.jsx("span",{className:"font-semibold text-foreground",children:e.guest.name}),e.guest.role?`, ${e.guest.role}`:""]})]}),((b=e.tags)==null?void 0:b.length)>0&&h.jsx("div",{className:"mt-5 flex flex-wrap gap-2",children:e.tags.map(w=>h.jsx("span",{className:"rounded bg-secondary px-2.5 py-1 text-[0.65rem] font-medium uppercase tracking-wider text-secondary-foreground",children:w},w))}),h.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-x-4 gap-y-3",children:[h.jsx("span",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Listen now"}),h.jsx("div",{className:"flex items-center gap-3",children:a8.map(w=>h.jsx("a",{href:e.links[w.key],target:"_blank",rel:"noopener noreferrer","aria-label":w.label,className:"opacity-60 transition-opacity hover:opacity-100",children:h.jsx("img",{src:w.icon,alt:w.label,className:"h-6 w-6"})},w.key))}),h.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:[e.durationLabel," · ",e.chapters.length," chapters"]})]})]})]}),h.jsx("div",{className:"order-first flex items-center justify-center border-b border-card-border bg-surface lg:order-none lg:border-b-0 lg:border-l",children:i?h.jsx("iframe",{className:"aspect-video w-full",src:`https://www.youtube.com/embed/${e.id}?autoplay=1&mute=1&playsinline=1`,title:e.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):h.jsxs("button",{type:"button",onClick:()=>o(!0),className:"group relative block w-full","aria-label":`Play ${e.title}`,children:[h.jsx("img",{src:e.thumbnail,alt:e.title,className:"aspect-video w-full object-cover",loading:"lazy"}),h.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/20 transition-colors group-hover:bg-black/35",children:h.jsx("span",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-white/95 shadow-lg transition-transform group-hover:scale-105",children:h.jsx(V_,{className:"h-7 w-7 translate-x-0.5 text-black",fill:"currentColor"})})})]})})]})}),g.length>1&&h.jsxs("div",{className:"mt-4 border border-card-border bg-card px-6 py-4",children:[h.jsx("p",{className:"mb-3 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Transcript build · model comparison"}),h.jsx("div",{className:"grid gap-2 sm:grid-cols-4",children:g.map(w=>{var C;const x=w.slug===e.slug,k=(C=w.build)==null?void 0:C.costUsd,S=AW(w.model)??"raw captions",E=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"block text-sm font-medium leading-tight",children:S}),h.jsxs("span",{className:"mt-1 block font-mono text-xs tabular-nums text-muted-foreground",children:[k!=null?`$${k.toFixed(3)}`:"free",w.build?` · ${w.build.durationSeconds}s`:""]})]});return x?h.jsx("div",{"aria-current":"page",className:"border-2 border-primary px-3 py-2",children:E},w.slug):h.jsx(Yr,{to:`/podcast/${w.slug}`,className:"border border-card-border px-3 py-2 transition-colors hover:border-primary/50 hover:bg-secondary/40",children:E},w.slug)})})]}),h.jsxs("section",{className:"mt-4 border border-card-border bg-card",children:[h.jsx("div",{className:"border-b border-card-border bg-surface px-6 py-2.5",children:h.jsx("span",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Contents"})}),h.jsxs("div",{className:"grid lg:grid-cols-[380px_minmax(0,76rem)_1fr]",children:[h.jsx("aside",{className:"border-b border-card-border p-6 lg:sticky lg:top-28 lg:max-h-[calc(100vh-9rem)] lg:self-start lg:overflow-y-auto lg:border-b-0 lg:border-r",children:h.jsx(r8,{chapters:e.chapters})}),h.jsxs("div",{className:"min-w-0 p-6 lg:border-r lg:border-card-border lg:p-10",children:[h.jsx(o8,{episode:e}),e.transcriptStatus!=="cleaned"&&h.jsx("p",{className:"mt-10 border border-border bg-surface px-4 py-3 text-sm text-muted-foreground",children:"This transcript is machine-generated and hasn't been through the editing pass yet."})]}
428),h.jsx("div",{"aria-hidden":!0,className:"hidden lg:block"})]})]})]}),h.jsxs("button",{type:"button",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:ee("fixed bottom-6 right-6 z-40 inline-flex items-center gap-1.5 rounded-full border border-border bg-background/95 px-4 py-2 text-xs font-medium shadow-lg backdrop-blur transition-opacity hover:bg-secondary",a?"opacity-100":"pointer-events-none opacity-0"),children:["Back to top",h.jsx(w5,{className:"h-3.5 w-3.5"})]}),h.jsx(An,{})]})},u8=()=>{const{videos:t}=aI(),e=v.useMemo(()=>new Map(t.filter(s=>s.viewCount).map(s=>[s.id,s.viewCount])),[t]),n=v.useMemo(()=>Ow.map(s=>({id:s.id,title:s.title,description:s.summary,publishedAt:s.publishedAt,thumbnail:s.thumbnail,duration:s.durationLabel,viewCount:e.get(s.id)})),[e]);return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsxs(zb,{children:[h.jsx("title",{children:"All episodes | The MAD Podcast with Matt Turck"}),h.jsx("meta",{name:"description",content:"Every episode of The MAD Podcast with Matt Turck â in-depth conversations with leaders in ML, AI and data."}),h.jsx("link",{rel:"canonical",href:"https://mattturck.com/podcast/all"})]}),h.jsx(En,{}),h.jsxs("main",{className:"blog-container py-12",children:[h.jsxs(Yr,{to:"/podcast",className:"mb-6 inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",children:[h.jsx(Xa,{className:"h-4 w-4"}),"MAD Podcast"]}),h.jsxs("div",{className:"mb-10 flex items-baseline justify-between gap-4 border-b border-border pb-4",children:[h.jsx("h1",{className:"text-3xl font-semibold tracking-tight",children:"All episodes"}),h.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.length," episodes"]})]}),null,h.jsx("div",{className:"grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-4",children:n.map(s=>h.jsx(nu,{video:s},s.id))})]}),h.jsx(An,{})]})},d8=()=>{const t=[{x:2012,label:"2012",href:"/a-chart-of-the-big-data-ecosystem",title:"A Chart Of The Big Data Ecosystem"},{x:2014,label:"2014",href:"/the-state-of-big-data-in-2014-a-chart",title:"The State of Big Data in 2014 â A Chart"},{x:2016,label:"2016",href:"/big-data-landscape",title:"Big Data Landscape"},{x:2017,label:"2017",href:"/bigdata2017",title:"2017 Big Data Landscape"},{x:2018,label:"2018",href:"/bigdata2018",title:"2018 Big Data & AI Landscape"},{x:2019,title:"MAD Landscape 2019 Series",labels:[{text:"Part 1",href:"/data2019",title:"2019 Data & AI Landscape"},{text:"Part 2",href:"/2019trends",title:"Emerging Architectures for Modern Data Infrastructure"}]},{x:2020,label:"2020",href:"/data2020",title:"2020 MAD (Machine Learning, Artificial Intelligence & Data) Landscape"},{x:2021,label:"2021",href:"/data2021",title:"2021 MAD (ML, AI & Data) Landscape"},{x:2023,title:"MAD Landscape 2023 Series",labels:[{text:"Part 1",href:"/mad2023",title:"MAD (ML/AI/Data) Landscape 2023"},{text:"Part 2",href:"/mad2023-part-ii",title:"The Modern AI Stack and the Path to the Next Intelligent Cloud"},{text:"Part 3",href:"/mad2023-part-iii",title:"Generative AI Startup Funding â Following the Money"},{text:"Part 4",href:"/mad2023-part-iv",title:"Unbundling the App Layer and Building the Intelligent Cloud OS"}]},{x:2024,label:"2024",href:"/mad2024",title:"The MAD (ML/AI/Data) Landscape 2024"},{x:2025,label:"2025",href:"https://www.mattturck.com/mad2025",title:"Bubble & Build: The 2025 MAD (Machine Learning, AI & Data) Landscape"}];return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx("section",{className:"py-8 lg:py-12",children:h.jsx("div",{className:"blog-container",children:h.jsxs("div",{className:"text-center mb-4 lg:mb-6",children:[h.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-foreground mb-6",children:"MAD Landscape"}),h.jsx("div",{className:"max-w-4xl mx-auto",children:h.jsxs("p",{className:"text-lg lg:text-xl text-muted-foreground leading-relaxed",children:["The MAD landscape is an annual market map of the Machine Learning, AI and Data ecosystem. Each post includes a graphic, commentary and a blog analyzing key trends from that specific year.",h.jsx("br",{}),h.jsx("br",{}),"A digital, searchable version of the MAD Landscape is available at"," ",h.jsx("a",{href:"https://mad.firstmark.com",target:"_blank",rel:"noopener noreferrer",className:"text-accent-blue hover:text-accent-blue-hover underline transition-colors",children:"mad.firstmark.com"})," ","and a PDF version is available"," ",h.jsx("a",{href:"/landscape/mad2025.pdf",target:"_blank",rel:"noopener noreferrer",className:"text-accent-blue hover:text-accent-blue-hover underline transition-colors",children:"here"}),"."]})})]})})}),h.jsx("section",{className:"pb-16 relative",children:h.jsxs("div",{className:"container mx-auto px-4 lg:px-6",children:[h.jsx("div",{className:"md:hidden relative max-w-2xl mx-auto",children:h.jsxs("div",{className:"relative py-8",children:[h.jsx("div",{className:"absolute left-1/2 top-0 bottom-0 w-0.5 bg-border transform -translate-x-1/2"}),h.jsx("div",{className:"space-y-12",children:t.slice().reverse().map((e,n)=>{const r=n%2===0;return h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-4 h-4 bg-accent-blue rounded-full border-4 border-background z-10"}),h.jsxs("div",{className:`w-44 ${r?"mr-auto pr-8":"ml-auto pl-8"}`,children:[e.label&&h.jsxs("div",{className:`bg-card border border-border p-3 rounded-lg shadow-sm hover:shadow-md hover:-translate-y-1 transition-all duration-200 cursor-pointer flex flex-col overflow-hidden relative ${e.href?"":"op
428acity-60 cursor-not-allowed"}`,onClick:()=>{e.href&&(window.location.href=e.href)},children:[h.jsx("div",{className:`absolute top-1/2 transform -translate-y-1/2 w-3 h-3 bg-card border border-border rotate-45 ${r?"-right-1.5 border-l-0 border-b-0":"-left-1.5 border-r-0 border-t-0"}`}),h.jsx("div",{className:"inline-flex items-center justify-center bg-accent-blue text-white font-bold text-sm px-3 py-1 rounded-full mb-2 self-center",children:e.label}),h.jsxs("div",{className:"text-center",children:[h.jsxs("h3",{className:"font-semibold text-sm mb-2 text-foreground",children:["MAD Landscape ",e.x]}),h.jsx("p",{className:"text-muted-foreground text-xs leading-snug",children:e.title})]})]}),e.labels&&h.jsxs("div",{className:"bg-card border border-border p-3 rounded-lg shadow-sm hover:shadow-md hover:-translate-y-1 transition-all duration-200 flex flex-col overflow-hidden relative",children:[h.jsx("div",{className:`absolute top-1/2 transform -translate-y-1/2 w-3 h-3 bg-card border border-border rotate-45 ${r?"-right-1.5 border-l-0 border-b-0":"-left-1.5 border-r-0 border-t-0"}`}),h.jsx("div",{className:"inline-flex items-center justify-center bg-accent-blue text-white font-bold text-sm px-3 py-1 rounded-full mb-2 self-center",children:e.x}),h.jsxs("div",{className:"text-center",children:[h.jsxs("h3",{className:"font-semibold text-sm mb-2 text-foreground",children:["MAD Landscape ",e.x," Series"]}),h.jsx("div",{className:"flex flex-wrap gap-1 justify-center",children:e.labels.map((s,i)=>h.jsx("div",{className:"bg-muted/50 rounded px-1.5 py-0.5 cursor-pointer hover:bg-muted transition-colors text-[10px] font-medium text-foreground",onClick:()=>{s.href&&(window.location.href=s.href)},title:s.title,children:s.text},i))})]})]})]})]},e.x)})})]})}),h.jsx("div",{className:"hidden md:block relative max-w-[1800px] mx-auto",children:h.jsxs("div",{className:"relative py-40",children:[h.jsx("div",{className:"absolute top-1/2 left-0 right-0 h-0.5 bg-border transform -translate-y-1/2"}),h.jsx("div",{className:"flex justify-between items-center relative gap-2",children:t.map((e,n)=>{const r=n%2===0;return h.jsxs("div",{className:"relative flex flex-col items-center flex-1",children:[h.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-4 h-4 bg-accent-blue rounded-full border-4 border-background z-10"}),h.jsxs("div",{className:`absolute left-1/2 transform -translate-x-1/2 w-44 lg:w-48 h-32 lg:h-34 ${r?"bottom-6":"top-6"}`,children:[e.label&&h.jsxs("div",{className:`bg-card border border-border p-3 rounded-lg shadow-sm hover:shadow-md hover:-translate-y-2 transition-all duration-200 cursor-pointer h-full flex flex-col overflow-hidden relative ${e.href?"":"opacity-60 cursor-not-allowed"}`,onClick:()=>{e.href&&(window.location.href=e.href)},children:[h.jsx("div",{className:`absolute left-1/2 transform -translate-x-1/2 w-3 h-3 bg-card border border-border rotate-45 ${r?"-bottom-1.5 border-r-0 border-b-0":"-top-1.5 border-l-0 border-t-0"}`}),h.jsx("div",{className:"inline-flex items-center justify-center bg-accent-blue text-white font-bold text-sm px-3 py-1 rounded-full mb-3 self-center",children:e.label}),h.jsxs("div",{className:"text-center flex-1 flex flex-col justify-center",children:[h.jsxs("h3",{className:"font-semibold text-sm mb-2 text-foreground",children:["MAD Landscape ",e.x]}),h.jsx("p",{className:"text-muted-foreground text-xs leading-snug",children:e.title})]})]}),e.labels&&h.jsxs("div",{className:"bg-card border border-border p-3 rounded-lg shadow-sm hover:shadow-md hover:-translate-y-2 transition-all duration-200 h-full flex flex-col overflow-hidden relative",children:[h.jsx("div",{className:`absolute left-1/2 transform -translate-x-1/2 w-3 h-3 bg-card border border-border rotate-45 ${r?"-bottom-1.5 border-r-0 border-b-0":"-top-1.5 border-l-0 border-t-0"}`}),h.jsx("div",{className:"inline-flex items-center justify-center bg-accent-blue text-white font-bold text-sm px-3 py-1 rounded-full mb-3 self-center",children:e.x}),h.jsxs("div",{className:"text-center flex-1 flex flex-col justify-center",children:[h.jsxs("h3",{className:"font-semibold text-sm mb-3 text-foreground",children:["MAD Landscape ",e.x," Series"]}),h.jsx("div",{className:"flex gap-1 justify-center overflow-hidden whitespace-nowrap",children:e.labels.map((s,i)=>h.jsx("div",{className:"bg-muted/50 rounded px-1.5 py-0.5 cursor-pointer hover:bg-muted transition-colors text-[10px] font-medium text-foreground",onClick:()=>{s.href&&(window.location.href=s.href)},title:s.title,children:s.text},i))})]})]})]})]},e.x)})})]})})]})}),h.jsx(An,{})]})},h8=()=>h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx(En,{}),h.jsx("main",{className:"blog-container py-12 lg:py-20",children:h.jsxs("div",{className:"max-w-4xl mx-auto",children:[h.jsxs("div",{className:"text-center mb-16",children:[h.jsx("h1",{className:"font-display text-4xl lg:text-5xl font-bold text-foreground mb-6",children:"About"}),h.jsx("div",{className:"w-24 h-1 bg-primary mx-auto"})]}),h.jsxs("div",{className:"prose prose-lg max-w-none",children:[h.jsxs("section",{className:"mb-8",children:[h.jsx("p",{className:"text-base text-foreground leading-relaxed mb-6",children:"I'm a venture capitalist and partner at FirstMark, based in New York. I invest in early stage startups, mostly at the seed and Series A stage."}),h.jsx("p",{className:"text-base text-foreground leading-relaxed mb-6",children:"I'm particularly active in enterprise softw
428are, with a career-long interest in data, machine learning and AI, from infrastructure to applications. I have also invested in other areas like crypto and fintech."}),h.jsx("p",{className:"text-base text-foreground leading-relaxed",children:"While the majority of my portfolio and core focus is in the United States, I actively invest in ambitious European startups that aim to be global category leaders from inception, and do my best to help them expand to the US. I have invested in France (where I was born and raised prior to moving to the US), the UK, Germany and Switzerland to date."})]}),h.jsxs("section",{className:"mb-8",children:[h.jsx("p",{className:"text-base text-foreground leading-relaxed mb-4",children:"Some companies I work with, in one capacity or another (board member, board observer, investor):"}),h.jsx("p",{className:"text-base text-foreground leading-relaxed",children:"Ada Support; Astronomer; ClickHouse; Cockroach Labs; Crossbeam; Dataiku; DCG; Espresso AI; Estuary; Helium (Nova Labs); Hyperscience; Lago; Ledger; Nextmv; Pigment; Softr; Sparta; SurrealDB; Synthesia; TensorZero; Upgrade"})]}),h.jsxs("section",{className:"mb-8",children:[h.jsx("p",{className:"text-base text-foreground leading-relaxed mb-4",children:"Some companies I worked with previously:"}),h.jsx("p",{className:"text-base text-foreground leading-relaxed",children:"ActionIQ (acquired by Uniphore), Frame AI (acquired by Hubspot), Quickwit (acquired by Datadog), Recombine (acquired by Cooper), Sense360 (acquired by Medallia), Sketchfab (acquired by Epic Games), Sproutling (acquired by Mattel), TextIQ (acquired by Relativity), Timber (acquired by Datadog)."})]}),h.jsx("section",{className:"mb-8",children:h.jsx("p",{className:"text-base text-foreground leading-relaxed",children:"As an angel (personal, prior to joining FirstMark), I was involved with companies like Datadog and LendingClub."})}),h.jsxs("section",{className:"mb-8",children:[h.jsx("p",{className:"text-base text-foreground leading-relaxed mb-6",children:"As part of my overall investing activity, I am very active in content creation and community building, with the following staples:"}),h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-surface border border-border rounded-xl p-6",children:[h.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:h.jsx("a",{href:"/mad-landscapes",className:"hover:text-primary transition-colors",children:"The MAD Landscape"})}),h.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"An annual market map and state of the union post of the machine learning, data and AI ecosystem"})]}),h.jsxs("div",{className:"bg-surface border border-border rounded-xl p-6",children:[h.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:h.jsx("a",{href:"/podcast",className:"hover:text-primary transition-colors",children:"The MAD Podcast"})}),h.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"A weekly-ish podcast with leaders in the space: CEOs, founders, researchers, heads of AI"})]}),h.jsxs("div",{className:"bg-surface border border-border rounded-xl p-6",children:[h.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:h.jsx("a",{href:"https://firstmark.com/community/data-driven/",target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:"Data Driven NYC"})}),h.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"A monthly-ish meetup held in person in New York, featuring top startups in data and AI"})]})]})]})]})]})}),h.jsx(An,{})]}),f8=()=>{const[t,e]=v.useState(""),[n,r]=v.useState(""),[s,i]=v.useState(""),[o,a]=v.useState(""),[l,c]=v.useState(!1),[u,d]=v.useState(!0),[f,p]=v.useState(!1),[g,m]=v.useState(!1),y=ha(),{toast:b}=Ir();v.useEffect(()=>{let S=!0;(async()=>{try{const{data:{session:A}}=await xe.auth.getSession();S&&A&&y("/admin"),S&&d(!1)}catch(A){console.error("Error checking auth:",A),S&&d(!1)}})();const{data:{subscription:C}}=xe.auth.onAuthStateChange((A,N)=>
428{S&&A==="PASSWORD_RECOVERY"?(m(!0),d(!1)):S&&N&&A==="SIGNED_IN"&&y("/admin")});return()=>{S=!1,C.unsubscribe()}},[y]);const w=async S=>{S.preventDefault(),c(!0);try{const{error:E}=await xe.auth.signInWithPassword({email:t,password:n});E?E.message.includes("Invalid login credentials")?b({title:"Login failed",description:"Invalid email or password. Please try again.",variant:"destructive"}):b({title:"Error",description:E.message,variant:"destructive"}):b({title:"Success",description:"Logged in successfully!"})}catch{b({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{c(!1)}},x=async S=>{S.preventDefault(),c(!0);try{const{data:E,error:C}=await xe.functions.invoke("reset-password",{body:{email:t}});C?b({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"}):(b({title:"Check your email",description:"If an account with that email exists, you will receive a password reset link."}),p(!1),e(""))}catch{b({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{c(!1)}},k=async S=>{if(S.preventDefault(),s!==o){b({title:"Error",description:"Passwords do not match.",variant:"destructive"});return}if(s.length<6){b({title:"Error",description:"Password must be at least 6 characters.",variant:"destructive"});return}c(!0);try{const{error:E}=await xe.auth.updateUser({password:s});E?b({title:"Error",description:E.message,variant:"destructive"}):(b({title:"Success",description:"Your password has been updated successfully!"}),m(!1),i(""),a(""),y("/admin"))}catch{b({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}finally{c(!1)}};return u?h.jsx("div",{className:"min-h-screen flex items-center justify-center",children:h.jsx(el,{className:"h-8 w-8 animate-spin text-primary"})}):h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-secondary/20 p-4",children:h.jsxs(_f,{className:"w-full max-w-md",children:[h.jsxs(XN,{children:[h.jsx(eI,{children:"Admin Access"}),f&&h.jsx(tI,{children:"Reset your password"})]}),h.jsx(Nf,{children:g?h.jsxs("form",{onSubmit:k,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"new-password",children:"New Password"}),h.jsx(Nt,{id:"new-password",type:"password",placeholder:"Enter new password",value:s,onChange:S=>i(S.target.value),required:!0,minLength:6})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"confirm-password",children:"Confirm Password"}),h.jsx(Nt,{id:"confirm-password",type:"password",placeholder:"Confirm new password",value:o,onChange:S=>a(S.target.value),required:!0,minLength:6})]}),h.jsxs(oe,{type:"submit",className:"w-full",disabled:l,children:[l&&h.jsx(el,{className:"mr-2 h-4 w-4 animate-spin"}),"Update Password"]})]}):f?h.jsxs("form",{onSubmit:x,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"reset-email",children:"Email"}),h.jsx(Nt,{id:"reset-email",type:"email",placeholder:"[email protected]",value:t,onChange:S=>e(S.target.value),required:!0})]}),h.jsxs(oe,{type:"submit",className:"w-full",disabled:l,children:[l&&h.jsx(el,{className:"mr-2 h-4 w-4 animate-spin"}),"Send Reset Link"]}),h.jsx(oe,{type:"button",variant:"ghost",className:"w-full",onClick:()=>{p(!1),e("")},children:"Back to Sign In"})]}):h.jsxs("form",{onSubmit:w,className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"signin-email",children:"Email"}),h.jsx(Nt,{id:"signin-email",type:"email",placeholder:"[email protected]",value:t,onChange:S=>e(S.target.value),required:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(gt,{htmlFor:"signin-password",children:"Password"}),h.jsx(Nt,{id:"signin-password",type:"password",value:n,onChange:S=>r(S.target.value),required:!0})]}),h.jsxs(oe,{type:"submit",className:"w-full",disabled:l,children:[l&&h.jsx(el,{className:"mr-2 h-4 w-4 animate-spin"}),"Sign In"]}),h.jsx(oe,{type:"button",variant:"link",className:"w-full",onClick:()=>p(!0),children:"Forgot password?"})]})})]})})};var p8=v.createContext(void 0);function Fw(t){const e=v.useContext(p8);return t||e||"ltr"}var Vg="rovingFocusGroup.onEntryFocus",m8={bubbles:!1,cancelable:!0},yd="RovingFocusGroup",[Qv,SI,g8]=Ub(yd),[y8,CI]=sr(yd,[g8]),[v8,b8]=y8(yd),EI=v.forwardRef((t,e)=>h.jsx(Qv.Provider,{scope:t.__scopeRovingFocusGroup,children:h.jsx(Qv.Slot,{scope:t.__scopeRovingFocusGroup,children:h.jsx(w8,{...t,ref:e})})}));EI.displayName=yd;var w8=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=t,f=v.useRef(null),p=$e(e,f),g=Fw(i),[m,y]=Ds({prop:o,defaultProp:a??null,onChange:l,caller:yd}),[b,w]=v.useState(!1),x=rr(c),k=SI(n),S=v.useRef(!1),[E,C]=v.useState(0);return v.useEffect(()=>{const A=f.current;if(A)return A.addEventListener(Vg,x),()=>A.removeEventListener(Vg,x)},[x]),h.jsx(v8,{scope:n,orientation:r,dir:g,loop:s,currentTabStopId:m,onItemFocus:v.useCallback(A=>y(A),[y]),onItemShiftTab:v.useCallback(()=>w(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(A=>A+1),[]),onFocusableItemRemove:v.useCallback(()=>C(A=>A-1),[]),children:h.jsx(ke.div,{tabIndex:b||E===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...t.style},onMouseDown:ge(t.onMouseDown,()=>{S.current=!0}),onFocus:ge(t.onFocus,A=>{const N=!S.current;if(A.target===A.currentTarget&&N&&!b){const M=new CustomEvent(Vg,m8);if(A.currentTarget.dispatchEvent(M),!M.defaultPrevented){const F=k().filter(
vendor: 7,108 bytes, line 428
428B=>B.focusable),P=F.find(B=>B.active),V=F.find(B=>B.id===m),H=[P,V,...F].filter(Boolean).map(B=>B.ref.current);_I(H,u)}}S.current=!1}),onBlur:ge(t.onBlur,()=>w(!1))})})}),AI="RovingFocusGroupItem",TI=v.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...a}=t,l=Is(),c=i||l,u=b8(AI,n),d=u.currentTabStopId===c,f=SI(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=u;return v.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),h.jsx(Qv.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:h.jsx(ke.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:ge(t.onMouseDown,y=>{r?u.onItemFocus(c):y.preventDefault()}),onFocus:ge(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:ge(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=S8(y,u.orientation,u.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(k=>k.focusable).map(k=>k.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const k=x.indexOf(y.currentTarget);x=u.loop?C8(x,k+1):x.slice(k+1)}setTimeout(()=>_I(x))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:m!=null}):o})})});TI.displayName=AI;var x8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function k8(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function S8(t,e,n){const r=k8(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return x8[r]}function _I(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function C8(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var E8=EI,A8=TI,ym="Tabs",[T8,Aee]=sr(ym,[CI]),NI=CI(),[_8,zw]=T8(ym),II=v.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=Fw(a),[d,f]=Ds({prop:r,onChange:s,defaultProp:i??"",caller:ym});return h.jsx(_8,{scope:n,baseId:Is(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:l,children:h.jsx(ke.div,{dir:u,"data-orientation":o,...c,ref:e})})});II.displayName=ym;var OI="TabsList",PI=v.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=zw(OI,n),o=NI(n);return h.jsx(E8,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:h.jsx(ke.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});PI.displayName=OI;var jI="TabsTrigger",MI=v.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,o=zw(jI,n),a=NI(n),l=LI(o.baseId,r),c=$I(o.baseId,r),u=r===o.value;return h.jsx(A8,{asChild:!0,...a,focusable:!s,active:u,children:h.jsx(ke.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:e,onMouseDown:ge(t.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:ge(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:ge(t.onFocus,()=>{const d=o.activationMode!=="manual";!u&&!s&&d&&o.onValueChange(r)})})})});MI.displayName=jI;var RI="TabsContent",DI=v.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=t,a=zw(RI,n),l=LI(a.baseId,r),c=$I(a.baseId,r),u=r===a.value,d=v.useRef(u);return v.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),h.jsx(is,{present:s||u,children:({present:f})=>h.jsx(ke.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});DI.displayName=RI;function LI(t,e){return`${t}-trigger-${e}`}function $I(t,e){return`${t}-content-${e}`}var N8=II,FI=PI,zI=MI,UI=DI;const I8=N8,BI=v.forwardRef(({className:t,...e},n)=>h.jsx(FI,{ref:n,className:ee("inline-flex h-11 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...e}));BI.displayName=FI.displayName;const Lh=v.forwardRef(({className:t,...e},n)=>h.jsx(zI,{ref:n,className:ee("inline-flex items-center justify-center whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md data-[state=inactive]:text-muted-foreground data-[state=inactive]:hover:text-foreground",t),...e}));Lh.displayName=zI.displayName;const $h=v.forwardRef(({className:t,...e},n)=>h.jsx(UI,{ref:n,className:ee("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));$h.displayName=UI.displayName;const VI=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{className:"relative w-full overflow-auto",children:h.jsx("table",{ref:n,className:ee("w-full caption-bottom text-sm",t),...e})}));VI.displayName="Table";const HI=v.forwardRef(({className:t,...e},n)=>h.jsx("thead",{ref:n,className:ee("[&_tr]:border-b",t),...e}));HI.displayName="TableHeader";const WI=v.forwardRef(({className:t,...e},n)=>h.jsx("tbody",{ref:n,className:ee("[&_tr:last-child]:border-0",t),...e}));WI.displayName="TableBody";const O8=v.forwardRef(({className:t,...e},n)=>h.jsx("tfoot",{ref:n,className:ee("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));O8.displayName="TableFooter";const Fh=v.forwardRef(({className:t,...e},n)=>h.jsx("tr",{ref:n,className:ee("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));Fh.displayName="TableRow";const Ra=v.forwardRef(({className:t,...e},n)=>h.jsx("th",{ref:n,className:ee("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));Ra.displayName="TableHead";const bo=v.forwardRef(({className:t,...e},n)=>h.jsx("td",{ref:n,className:ee("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));bo.displayName="TableCell";const P8=v.forwardRef(({className:t,...e},n)=>h.jsx("caption",{ref:n,className:ee("mt-4 text-sm text-muted-foreground",t),...e}));P8.displayName="TableCaption";var qI="AlertDialog",[j8,Tee]=sr(qI,[aN]),Bs=aN(),GI=t=>{const{__scopeAlertDialog:e,...n}=t,r=Bs(e);return h.jsx(SN,{...r,...n,modal:!0})};GI.displayName=qI;var M8="AlertDialogTrigger",R8=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Bs(n);return h.jsx(CN,{...s,...r,ref:e})});R8.displayName=M8;var D8="AlertDialogPortal",KI=t=>{const{__scopeAlertDialog:e,...n}=t,r=Bs(e);return h.jsx(EN,{...r,...n})};KI.displayName=D8;var L8="AlertDialogOverlay",ZI=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Bs(n);return h.jsx(ww,{...s,...r,ref:e})});ZI.displayName=L8;
428var pl="AlertDialogContent",[$8,F8]=j8(pl),z8=f_("AlertDialogContent"),YI=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...s}=t,i=Bs(n),o=v.useRef(null),a=$e(e,o),l=v.useRef(null);return h.jsx($U,{contentName:pl,titleName:JI,docsSlug:"alert-dialog",children:h.jsx($8,{scope:n,cancelRef:l,children:h.jsxs(xw,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ge(s.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[h.jsx(z8,{children:r}),h.jsx(B8,{contentRef:o})]})})})});YI.displayName=pl;var JI="AlertDialogTitle",QI=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Bs(n);return h.jsx(kw,{...s,...r,ref:e})});QI.displayName=JI;var XI="AlertDialogDescription",eO=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Bs(n);return h.jsx(Sw,{...s,...r,ref:e})});eO.displayName=XI;var U8="AlertDialogAction",tO=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Bs(n);return h.jsx(Cw,{...s,...r,ref:e})});tO.displayName=U8;var nO="AlertDialogCancel",rO=v.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:s}=F8(nO,n),i=Bs(n),o=$e(e,s);return h.jsx(Cw,{...i,...r,ref:o})});rO.displayName=nO;var B8=({contentRef:t})=>{const e=`\`${pl}\` requires a description for the component to be accessible for screen reader users. 429 430You can add a description to the \`${pl}\` by passing a \`${XI}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 431 432Alternatively, 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 \`${pl}\`. 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. 433 434For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},V8=GI,H8=KI,sO=ZI,iO=YI,oO=tO,aO=rO,lO=QI,cO=eO;const W8=V8,q8=H8,uO=v.forwardRef(({className:t,...e},n)=>h.jsx(sO,{className:ee("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",t),...e,ref:n}));uO.displayName=sO.displayName;const dO=v.forwardRef(({className:t,...e},n)=>h.jsxs(q8,{children:[h.jsx(uO,{}),h.jsx(iO,{ref:n,className:ee("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",t),...e})]}));dO.displayName=iO.displayName;const hO=({className:t,...e})=>h.jsx("div",{className:ee("flex flex-col space-y-2 text-center sm:text-left",t),...e});hO.displayName="AlertDialogHeader";const fO=({className:t,...e})=>h.jsx("div",{className:ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});fO.displayName="AlertDialogFooter";const pO=v.forwardRef(({className:t,...e},n)=>h.jsx(lO,{ref:n,className:ee("text-lg font-semibold",t),...e}));pO.displayName=lO.displayName;const mO=v.forwardRef(({className:t,...e},n)=>h.jsx(cO,{ref:n,className:ee("text-sm text-muted-foreground",t),...e}));mO.displayName=cO.displayName;const gO=v.forwardRef(({className:t,...e},n)=>h.jsx(oO,{ref:n,className:ee(im(),t),...e}));gO.displayName=oO.displayName;const yO=v.forwardRef(({className:t,...e},n)=>h.jsx(aO,{ref:n,className:ee(im({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));yO.displayName=aO.displayName;function OS(t,[e,n]){return Math.min(n,Math.max(e,t))}function Uw(t){const e=v.useRef({value:t,previous:t});return v.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var G8=[" ","Enter","ArrowUp","ArrowDown"],K8=[" ","Enter"],ea="Select",[vm,bm,Z8]=Ub(ea),[ac,_ee]=sr(ea,[Z8,nc]),wm=nc(),[Y8,so]=ac(ea),[J8,Q8]=ac(ea),vO=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:g}
vendor: 17,954 bytes, line 434
434=t,m=wm(e),[y,b]=v.useState(null),[w,x]=v.useState(null),[k,S]=v.useState(!1),E=Fw(c),[C,A]=Ds({prop:r,defaultProp:s??!1,onChange:i,caller:ea}),[N,M]=Ds({prop:o,defaultProp:a,onChange:l,caller:ea}),F=v.useRef(null),P=y?g||!!y.closest("form"):!0,[V,_]=v.useState(new Set),H=Array.from(V).map(B=>B.props.value).join(";");return h.jsx(S2,{...m,children:h.jsxs(Y8,{required:p,scope:e,trigger:y,onTriggerChange:b,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:S,contentId:Is(),value:N,onValueChange:M,open:C,onOpenChange:A,dir:E,triggerPointerDownPosRef:F,disabled:f,children:[h.jsx(vm.Provider,{scope:e,children:h.jsx(J8,{scope:t.__scopeSelect,onNativeOptionAdd:v.useCallback(B=>{_($=>new Set($).add(B))},[]),onNativeOptionRemove:v.useCallback(B=>{_($=>{const O=new Set($);return O.delete(B),O})},[]),children:n})}),P?h.jsxs(BO,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:N,onChange:B=>M(B.target.value),disabled:f,form:g,children:[N===void 0?h.jsx("option",{value:""}):null,Array.from(V)]},H):null]})})};vO.displayName=ea;var bO="SelectTrigger",wO=v.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=wm(n),o=so(bO,n),a=o.disabled||r,l=$e(e,o.onTriggerChange),c=bm(n),u=v.useRef("touch"),[d,f,p]=HO(m=>{const y=c().filter(x=>!x.disabled),b=y.find(x=>x.value===o.value),w=WO(y,m,b);w!==void 0&&o.onValueChange(w.value)}),g=m=>{a||(o.onOpenChange(!0),p()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return h.jsx(Xp,{asChild:!0,...i,children:h.jsx(ke.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":VO(o.value)?"":void 0,...s,ref:l,onClick:ge(s.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:ge(s.onPointerDown,m=>{u.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ge(s.onKeyDown,m=>{const y=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(y&&m.key===" ")&&G8.includes(m.key)&&(g(),m.preventDefault())})})})});wO.displayName=bO;var xO="SelectValue",kO=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=t,l=so(xO,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=$e(e,l.onValueNodeChange);return qt(()=>{c(u)},[c,u]),h.jsx(ke.span,{...a,ref:d,style:{pointerEvents:"none"},children:VO(l.value)?h.jsx(h.Fragment,{children:o}):i})});kO.displayName=xO;var X8="SelectIcon",SO=v.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return h.jsx(ke.span,{"aria-hidden":!0,...s,ref:e,children:r||"â¼"})});SO.displayName=X8;var e9="SelectPortal",CO=t=>h.jsx(ld,{asChild:!0,...t});CO.displayName=e9;var ta="SelectContent",EO=v.forwardRef((t,e)=>{const n=so(ta,t.__scopeSelect),[r,s]=v.useState();if(qt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?ua.createPortal(h.jsx(AO,{scope:t.__scopeSelect,children:h.jsx(vm.Slot,{scope:t.__scopeSelect,children:h.jsx("div",{children:t.children})})}),i):null}return h.jsx(TO,{...t,ref:e})});EO.displayName=ta;var hr=10,[AO,io]=ac(ta),t9="SelectContentImpl",n9=Yo("SelectContent.RemoveScroll"),TO=v.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y,...b}=t,w=so(ta,n),[x,k]=v.useState(null),[S,E]=v.useState(null),C=$e(e,D=>k(D)),[A,N]=v.useState(null),[M,F]=v.useState(null),P=bm(n),[V,_]=v.useState(!1),H=v.useRef(!1);v.useEffect(()=>{if(x)return gw(x)},[x]),mw();const B=v.useCallback(D=>{const[be,...De]=P().map(Ce=>Ce.ref.current),[pe]=De.slice(-1),fe=document.activeElement;for(const Ce of D)if(Ce===fe||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===be&&S&&(S.scrollTop=0),Ce===pe&&S&&(S.scrollTop=S.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==fe))return},[P,S]),$=v.useCallback(()=>B([A,x]),[B,A,x]);v.useEffect(()=>{V&&$()},[V,$]);const{onOpenChange:O,triggerPointerDownPosRef:R}=w;v.useEffect(()=>{if(x){let D={x:0,y:0};const be=pe=>{var fe,Ce;D={x:Math.abs(Math.round(pe.pageX)-(((fe=R.current)==null?void 0:fe.x)??0)),y:Math.abs(Math.round(pe.pageY)-(((Ce=R.current)==null?void 0:Ce.y)??0))}},De=pe=>{D.x<=10&&D.y<=10?pe.preventDefault():x.contains(pe.target)||O(!1),document.removeEventListener("pointermove",be),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",De,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",De,{capture:!0})}}},[x,O,R]),v.useEffect(()=>{const D=()=>O(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[O]);const[K,de]=HO(D=>{const be=P().filter(fe=>!fe.disabled),De=be.find(fe=>fe.ref.current===document.activeElement),pe=WO(be,D,De);pe&&setTimeout(()=>pe.ref.current.focus())}),se=v.useCallback((D,be,De)=>{const pe=!H.current&&!De;(w.value!==void 0&&w.value===be||pe)&&(N(D),pe&&(H.current=!0))},[w.value]),ae=v.useCallback(()=>x==null?void 0:x.focus(),[x]),he=v.useCallback((D,be,De)=>{const pe=!H.current&&!De;(w.value!==void 0&&w.value===be||pe)&&F(D)},[w.value]),Y=r==="popper"?Xv:_O,re=Y===Xv?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y}:{};return h.jsx(AO,{scope:n,content:x,viewport:S,onViewportChange:E,itemRefCallback:se,selectedItem:A,onItemLeave:ae,itemTextRefCallback:he,focusSelectedItem:$,selectedItemText:M,position:r,isPositioned:V,searchRef:K,children:h.jsx(lm,{as:n9,allowPinchZoom:!0,children:h.jsx(om,{asChild:!0,trapped:w.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:ge(s,D=>{var be;(be=w.trigger)==null||be.focus({preventScroll:!0}),D.preventDefault()}),children:h.jsx(Ql,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:h.jsx(Y,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:D=>D.preventDefault(),...b,...re,onPlaced:()=>_(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:ge(b.onKeyDown,D=>{const be=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!be&&D.key.length===1&&de(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let pe=P().filter(fe=>!fe.disabled).map(fe=>fe.ref.current);if(["ArrowUp","End"].includes(D.key)&&(pe=pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const fe=D.target,Ce=pe.indexOf(fe);pe=pe.slice(Ce+1)}setTimeout(()=>B(pe)),D.preventDefault()}})})})})})})});TO.displayName=t9;var r9="SelectItemAlignedPosition",_O=v.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=so(ta,n),o=io(ta,n),[a,l]=v.useState(null),[c,u]=v.useState(null),d=$e(e,C=>u(C)),f=bm(n),p=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:b,focusSelectedItem:w}=o,x=v.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&m&&y&&b){const C=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),N=i.valueNode.getBoundingClientRect(),M=b.getBoundingClientRect();if(i.dir!=="rtl"){const fe=M.left-A.left,Ce=N.left-fe,nt=C.left-Ce,Pt=C.width+nt,jr=Math.max(Pt,A.width),Mr=window.innerWidth-hr,ls=OS(Ce,[hr,Math.max(hr,Mr-jr)]);a.style.minWidth=Pt+"px",a.style.left=ls+"px"}else{const fe=A.right-M.right,Ce=window.innerWidth-N.right-fe,nt=window.innerWidth-C.right-Ce,Pt=C.width+nt,jr=Math.max(Pt,A.width),Mr=window.innerWidth-hr,ls=OS(Ce,[hr,Math.max(hr,Mr-jr)]);a.style.minWidth=Pt+"px",a.style.right=ls+"px"}const F=f(),P=window.innerHeight-hr*2,V=m.scrollHeight,_=window.getComputedStyle(c),H=parseInt(_.borderTopWidth,10),B=parseInt(_.paddingTop,10),$=parseInt(_.borderBottomWidth,10),O=parseInt(_.paddingBottom,10),R=H+B+V+O+$,K=Math.min(y.offsetHeight*5,R),de=window.getComputedStyle(m),se=parseInt(de.paddingTop,10),ae=parseInt(de.paddingBottom,10),he=C.top+C.height/2-hr,Y=P-he,re=y.offsetHeight/2,D=y.offsetTop+re,be=H+B+D,De=R-be;if(be<=he){const fe=F.length>0&&y===F[F.length-1].ref.current;a.style.bottom="0px";const Ce=c.clientHeight-m.offsetTop-m.offsetHeight,nt=Math.max(Y,re+(fe?ae:0)+Ce+$),Pt=be+nt;a.style.height=Pt+"px"}else{const fe=F.length>0&&y===F[0].ref.current;a.style.top="0px";const nt=Math.max(he,H+m.offsetTop+(fe?se:0)+re)+De;a.style.height=nt+"px",m.scrollTop=be-he+m.offsetTop}a.style.margin=`${hr}px 0`,a.style.minHeight=K+"px",a.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,a,c,m,y,b,i.dir,r]);qt(()=>x(),[x]);const[k,S]=v.useState();qt(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const E=v.useCallback(C=>{C&&g.current===!0&&(x(),w==null||w(),g.current=!1)},[x,w]);return h.jsx(i9,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:h.jsx(ke.div,{...s,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_O.displayName=r9;var s9="SelectPopperPosition",Xv=v.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=hr,...i}=t,o=wm(n);return h.jsx(ow,{...o,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xv.displayName=s9;var[i9,Bw]=ac(ta,{}),e0="SelectViewport",NO=v.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=io(e0,n),o=Bw(e0,n),a=$e(e,i.onViewportChange),l=v.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(vm.Slot,{scope:n,children:h.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ge(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&d){const p=Math.abs(l.current-u.scrollTop);if(p>0){const g=window.innerHeight-hr*2,m=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),b=Math.max(m,y);if(b<g){const w=b+p,x=Math.min(g,w),k=w-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=k>0?k:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});NO.displayName=e0;var IO="SelectGroup",[o9,a9]=ac(IO),l9=v.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Is();return h.jsx(o9,{scope:n,id:s,children:h.jsx(ke.div,{role:"group","aria-labelledby":s,...r,ref:e})})});l9.displayName=IO;var OO="SelectLabel",PO=v.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=a9(OO,n);return h.jsx(ke.div,{id:s.id,...r,ref:e})});PO.displayName=OO;var Mf="SelectItem",[c9,jO]=ac(Mf),MO=v.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=t,a=so(Mf,n),l=io(Mf,n),c=a.value===r,[u,d]=v.useState(i??""),[f,p]=v.useState(!1),g=$e(e,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,s)}),m=Is(),y=v.useRef("touch"),b=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(c9,{scope:n,value:r,disabled:s,textId:m,isSelected:c,onItemTextChange:v.useCallback(w=>{d(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:h.jsx(vm.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:h.jsx(ke.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:g,onFocus:ge(o.onFocus,()=>p(!0)),onBlur:ge(o.onBlur,()=>p(!1)),onClick:ge(o.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:ge(o.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:ge(o.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:ge(o.onPointerMove,w=>{var x;y.current=w.pointerType,s?(x=l.onItemLeave)==null||x.call(l):y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(o.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ge(o.onKeyDown,w=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&w.key===" "||(K8.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});MO.displayName=Mf;var Mc="SelectItemText",RO=v.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,o=so(Mc,n),a=io(Mc,n),l=jO(Mc,n),c=Q8(Mc,n),[u,d]=v.useState(null),f=$e(e,b=>d(b),l.onItemTextChange,b=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,b,l.value,l.disabled)}),p=u==null?void 0:u.textContent,g=v.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=c;return qt(()=>(m(g),()=>y(g)),[m,y,g]),h.jsxs(h.Fragment,{children:[h.jsx(ke.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ua.createPortal(i.children,o.valueNode):null]})});RO.displayName=Mc;var DO="SelectItemIndicator",LO=v.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return jO(DO,n).isSelected?h.jsx(ke.span,{"aria-hidden":!0,...r,ref:e}):null});LO.displayName=DO;var t0="SelectScrollUpButton",$O=v.forwardRef((t,e)=>{const n=io(t0,t.__scopeSelect),r=Bw(t0,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,r.onScrollButtonChange);return qt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(zO,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});$O.displayName=t0;var n0="SelectScrollDownButton",FO=v.forwardRef((t,e)=>{const n=io(n0,t.__scopeSelect),r=Bw(n0,t.__scopeSelect),[s,i]=v.useState(!1),o=$e(e,r.onScrollButtonChange);return qt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?h.jsx(zO,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});FO.displayName=n0;var zO=v.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=io("SelectScrollButton",n),o=v.useRef(null),a=bm(n),l=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>l(),[l]),qt(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),h.jsx(ke.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ge(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ge(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ge(s.onPointerLeave,()=>{l()})})}),u9="SelectSeparator",UO=v.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return h.jsx(ke.div,{"aria-hidden":!0,...r,ref:e})});UO.displayName=u9;var r0="SelectArrow",d9=v.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=wm(n),i=so(r0,n),o=io(r0,n);return i.open&&o.position==="popper"?h.jsx(aw,{...s,...r,ref:e}):null});d9.displayName=r0;var h9="SelectBubbleInput",BO=v.forwardRef(({__scopeSelect:t,value:e,...n},r)=>{const s=v.useRef(null),i=$e(r,s),o=Uw(e);return v.useEffect(()=>{const a=s.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&u){const d=new Event("change",{bubbles:!0});u.call(a,e),a.dispatchEvent(d)}},[o,e]),h.jsx(ke.select,{...n,style:{...v_,...n.style},ref:i,defaultValue:e})});BO.displayName=h9;function VO(t){return t===""||t===void 0}function HO(t){const e=rr(t),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(o=>{const a=n.current+o;e(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function WO(t,e,n){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let o=f9(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function f9(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var p9=vO,qO=wO,m9=kO,g9=SO,y9=CO,GO=EO,v9=NO,KO=PO,ZO=MO,b9=RO,w9=LO,YO=$O,JO=FO,QO=UO;const XO=p9,eP=m9,Vw=v.forwardRef(({className:t,children:e,...n},r)=>h.jsxs(qO,{ref:r,className:ee("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
434ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,h.jsx(g9,{asChild:!0,children:h.jsx(U_,{className:"h-4 w-4 opacity-50"})})]}));Vw.displayName=qO.displayName;const tP=v.forwardRef(({className:t,...e},n)=>h.jsx(YO,{ref:n,className:ee("flex cursor-default items-center justify-center py-1",t),...e,children:h.jsx(C5,{className:"h-4 w-4"})}));tP.displayName=YO.displayName;const nP=v.forwardRef(({className:t,...e},n)=>h.jsx(JO,{ref:n,className:ee("flex cursor-default items-center justify-center py-1",t),...e,children:h.jsx(U_,{className:"h-4 w-4"})}));nP.displayName=JO.displayName;const Hw=v.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>h.jsx(y9,{children:h.jsxs(GO,{ref:s,className:ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[h.jsx(tP,{}),h.jsx(v9,{className:ee("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),h.jsx(nP,{})]})}));Hw.displayName=GO.displayName;const x9=v.forwardRef(({className:t,...e},n)=>h.jsx(KO,{ref:n,className:ee("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));x9.displayName=KO.displayName;const hi=v.forwardRef(({className:t,children:e,...n},r)=>h.jsxs(ZO,{ref:r,className:ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(w9,{children:h.jsx(dd,{className:"h-4 w-4"})})}),h.jsx(b9,{children:e})]}));hi.displayName=ZO.displayName;const k9=v.forwardRef(({className:t,...e},n)=>h.jsx(QO,{ref:n,className:ee("-mx-1 my-1 h-px bg-muted",t),...e}));k9.displayName=QO.displayName;const S9=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value},C9=({onEditPost:t}={})=>{const[e,n]=v.useState([]),[r,s]=v.useState([]),[i,o]=v.useState(!0),[a,l]=v.useState(""),[c,u]=v.useState("all"),[d,f]=v.useState(!1),[p,g]=v.useState(null),[m,y]=v.useState([]),[b,w]=v.useState(1),x=20,{toast:k}=Ir();v.useEffect(()=>{S()},[]),v.useEffect(()=>{E()},[e,a,c]);const S=async()=>{try{o(!0);const _="blog_posts",{data:H,error:B}=await xe.from(_).select("id, title, slug, category, date, sticky, author, excerpt").order("date",{ascending:!1});if(B)throw B;n(H||[]);const $=Array.from(new Set((H||[]).map(O=>O.category).filter(Boolean)));y($)}catch(_){console.error("Error fetching posts:",_),k({title:"Error",description:"Failed to load posts. Please try again.",variant:"destructive"})}finally{o(!1)}},E=()=>{let _=[...e];a&&(_=_.filter(H=>H.title.toLowerCase().includes(a.toLowerCase()))),c!=="all"&&(_=_.filter(H=>H.category===c)),s(_),w(1)},C=async()=>{if(p)try{const _="blog_posts",{error:H}=await xe.from(_).delete().eq("id",p);if(H)throw H;k({title:"Success",description:"Post deleted successfully."}),S()}catch(_){console.error("Error deleting post:",_),k({title:"Error",description:"Failed to delete post. Please try again.",variant:"destructive"})}finally{f(!1),g(null)}},A=_=>{g(_),f(!0)},N=_=>{t&&t(_)};if(i)return h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("p",{className:"text-muted-foreground",children:"Loading posts..."})});const M=Math.ceil(r.length/x),F=(b-1)*x,P=F+x,V=r.slice(F,P);return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[h.jsxs("div",{className:"relative flex-1",children:[h.jsx(qb,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),h.jsx(Nt,{placeholder:"Search posts...",value:a,onChange:_=>l(_.target.value),className:"pl-9"})]}),h.jsxs(XO,{value:c,onValueChange:u,children:[h.jsx(Vw,{className:"w-full sm:w-[200px]",children:h.jsx(eP,{placeholder:"Filter by category"})}),h.jsxs(Hw,{children:[h.jsx(hi,{value:"all",children:"All Categories"}),m.map(_=>h.jsx(hi,{value:_,children:_},_))]})]})]}),h.jsx("div",{className:"border rounded-lg",children:h.jsxs(VI,{children:[h.jsx(HI,{children:h.jsxs(Fh,{children:[h.jsx(Ra,{children:"Title"}),h.jsx(Ra,{children:"Category"}),h.jsx(Ra,{children:"Date"}),h.jsx(Ra,{children:"Status"}),h.jsx(Ra,{className:"text-right",children:"Actions"})]})}),h.jsx(WI,{children:V.length===0?h.jsx(Fh,{children:h.jsx(bo,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No posts found."})}):V.map(_=>h.jsxs(Fh,{className:"cursor-pointer hover:bg-muted/50",onClick:()=>N(_.id),children:[h.jsx(bo,{className:"font-medium",children:h.jsxs("div",{className:"flex items-center gap-2",children:[_.sticky&&h.jsx(Wb,{className:"h-4 w-4 text-primary"}),S9(_.title)]})}),h.jsx(bo,{children:h.jsx(ru,{variant:"secondary",children:_.category})}),h.jsx(bo,{children:md(new Date(_.date),"MMM dd, yyyy")}),h.jsx(bo,{children:_.sticky?h.jsx(ru,{variant:"default",children:"Pinned"}):h.jsx(ru,{variant:"outline",children:"Regular"})}),h.jsx(bo,{className:"text-right",children:h.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h.jsx(oe,{variant:"ghost",size:"sm",onClick:H=>{H.stopPropagation(),N(_.id)},children:h.jsx(V5,{className:"h-4 w-4"})}),h.jsx(oe,{variant:"ghost",size:"sm",onClick:H=>{H.stopPropagation(),A(_.id)},children:h.jsx(H_,{className:"h-4 w-4"})})]})})]},_.id))})]})}),M>1&&h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",F+1,"-",Math.min(P,r.length)," of ",r.length," posts"]}),h.jsx(Mw,{children:h.jsxs(Rw,{children:[h.jsx(Vn,{children:h.jsx(Dw,{onClick:()=>w(_=>Math.max(1,_-1)),className:b===1?"pointer-events-none opacity-50":"cursor-pointer"})}),Array.from({length:M},(_,H)=>H+1).map(_=>_===1||_===M||_>=b-1&&_<=b+1?h.jsx(Vn,{children:h.jsx(Fo,{onClick:()=>w(_),isActive:b===_,className:"cursor-pointer",children:_})},_):_===b-2||_===b+2?h.jsx(Vn,{children:h.jsx("span",{className:"px-4",children:"..."})},_):null),h.jsx(Vn,{children:h.jsx(Lw,{onClick:()=>w(_=>Math.min(M,_+1)),className:b===M?"pointer-events-none opacity-50":"cursor-pointer"})})]})})]}),h.jsx(W8,{open:d,onOpenChange:f,children:h.jsxs(dO,{children:[h.jsxs(hO,{children:[h.jsx(pO,{children:"Are you sure?"}),h.jsx(mO,{children:"This action cannot be undone. This will permanently delete the blog post."})]}),h.jsxs(fO,{children:[h.jsx(yO,{children:"Cancel"}),h.jsx(gO,{onClick:C,children:"Delete"})]})]})})]})},PS=t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.value},E9=()=>{const[t,e]=v.useState([]),[n,r]=v.useState(!0),[s,i]=v.useState(null),[o,a]=v.useState(!1),{toast:l}=Ir();v.useEffect(()=>{c()},[]);const c=async()=>{try{r(!0);const{data:f,error:p}=await xe.from("youtube_videos").select("id, title, thumbnail, published_at, duration, is_pinned").order("published_at",{ascending:!1});if(p)throw p;e(f||[])}catch(f){console.error("Error fetching videos:",f),l({title:"Error",description:"Failed to load videos. Please try again.",variant:"destructive"})}finally{r(!1)}},u=async f=>{const p=t.find(g=>g.is_pinned);if((p==null?void 0:p.id)!==f)try{i(f);const{error:g}=await xe.from("youtube_videos").update({is_pinned:!1}
434).eq("is_pinned",!0);if(g)throw g;const{error:m}=await xe.from("youtube_videos").update({is_pinned:!0}).eq("id",f);if(m)throw m;l({title:"Pinned",description:"Featured podcast video updated."}),await c()}catch(g){console.error("Error pinning video:",g),l({title:"Error",description:"Failed to update the pinned video. Please try again.",variant:"destructive"})}finally{i(null)}},d=async()=>{try{a(!0);const{error:f}=await xe.functions.invoke("sync-youtube-videos");if(f)throw f;l({title:"Refreshed",description:"Pulled the latest videos from YouTube."}),await c()}catch(f){console.error("Error refreshing videos:",f),l({title:"Error",description:"Failed to refresh videos from YouTube. Please try again.",variant:"destructive"})}finally{a(!1)}};return n?h.jsx("div",{className:"flex items-center justify-center py-12",children:h.jsx("p",{className:"text-muted-foreground",children:"Loading videos..."})}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[h.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose which podcast video appears as the pinned/featured episode. Only one can be pinned at a time."}),h.jsxs(oe,{variant:"outline",size:"sm",onClick:d,disabled:o,children:[h.jsx(q5,{className:`h-4 w-4 mr-2 ${o?"animate-spin":""}`}),o?"Refreshing...":"Refresh from YouTube"]})]}),t.length===0?h.jsx("div",{className:"text-center py-12 text-muted-foreground",children:'No videos found. Click "Refresh from YouTube" to pull the latest episodes.'}):h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:t.map(f=>h.jsxs("div",{className:`border rounded-lg overflow-hidden flex flex-col ${f.is_pinned?"border-primary ring-1 ring-primary":""}`,children:[h.jsxs("div",{className:"relative aspect-video bg-muted",children:[f.thumbnail&&h.jsx("img",{src:f.thumbnail,alt:PS(f.title),className:"w-full h-full object-cover"}),f.is_pinned&&h.jsxs("div",{className:"absolute top-2 left-2 bg-primary text-primary-foreground px-2 py-1 rounded text-xs font-medium flex items-center gap-1",children:[h.jsx(Wb,{className:"h-3 w-3"})," Pinned"]}),f.duration&&h.jsx("div",{className:"absolute bottom-2 right-2 bg-black/70 text-white px-2 py-1 rounded text-xs",children:f.duration})]}),h.jsxs("div",{className:"p-3 flex flex-col flex-1 gap-2",children:[h.jsx("p",{className:"text-sm font-medium line-clamp-2",children:PS(f.title)}),h.jsx("p",{className:"text-xs text-muted-foreground",children:md(new Date(f.published_at),"MMM dd, yyyy")}),h.jsx("div",{className:"mt-auto pt-2",children:h.jsx(oe,{variant:f.is_pinned?"secondary":"default",size:"sm",className:"w-full",disabled:!!f.is_pinned||s!==null,onClick:()=>u(f.id),children:f.is_pinned?h.jsxs(h.Fragment,{children:[h.jsx(dd,{className:"h-4 w-4 mr-2"}),"Currently Pinned"]}):s===f.id?"Pinning...":"Pin as Featured"})})]})]},f.id))})]})};var vd=t=>t.type==="checkbox",Eo=t=>t instanceof Date,on=t=>t==null;const rP=t=>typeof t=="object";var bt=t=>!on(t)&&!Array.isArray(t)&&rP(t)&&!Eo(t),A9=t=>bt(t)&&t.target?vd(t.target)?t.target.checked:t.target.value:t,T9=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,_9=(t,e)=>t.has(T9(e)),N9=t=>{const e=t.constructor&&t.constructor.prototype;return bt(e)&&e.hasOwnProperty("isPrototypeOf")},Ww=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function jt(t){let e;const n=Array.isArray(t),r=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(!(Ww&&(t instanceof Blob||r))&&(n||bt(t)))if(e=n?[]:{},!n&&!N9(t))e=t;else for(const s in t)t.hasOwnProperty(s)&&(e[s]=jt(t[s]));else return t;return e}var xm=t=>/^\w*$/.test(t),kt=t=>t===void 0,qw=t=>Array.isArray(t)?t.filter(Boolean):[],Gw=t=>qw(t.replace(/["|']|\]/g,"").split(/\.|\[/)),ce=(t,e,n)=>{if(!e||!bt(t))return n;const r=(xm(e)?[e]:Gw(e)).reduce((s,i)=>on(s)?s:s[i],t);return kt(r)||r===t?kt(t[e])?n:t[e]:r},Vr=t=>typeof t=="boolean",Ke=(t,e,n)=>{let r=-1;const s=xm(e)?[e]:Gw(e),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=t[a];l=bt(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;t[a]=l,t=t[a]}};const jS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ps={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},I9=U.createContext(null);
434I9.displayName="HookFormContext";var O9=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const o=i;return e._proxyFormState[o]!==wr.all&&(e._proxyFormState[o]=!r||wr.all),t[o]}});return s};const P9=typeof window<"u"?U.useLayoutEffect:U.useEffect;var Jr=t=>typeof t=="string",j9=(t,e,n,r,s)=>Jr(t)?(r&&e.watch.add(t),ce(n,t,s)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),ce(n,i))):(r&&(e.watchAll=!0),n),s0=t=>on(t)||!rP(t);function fi(t,e,n=new WeakSet){if(s0(t)||s0(e))return t===e;if(Eo(t)&&Eo(e))return t.getTime()===e.getTime();const r=Object.keys(t),s=Object.keys(e);if(r.length!==s.length)return!1;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);for(const i of r){const o=t[i];if(!s.includes(i))return!1;if(i!=="ref"){const a=e[i];if(Eo(o)&&Eo(a)||bt(o)&&bt(a)||Array.isArray(o)&&Array.isArray(a)?!fi(o,a,n):o!==a)return!1}}return!0}var sP=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},su=t=>Array.isArray(t)?t:[t],MS=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},gn=t=>bt(t)&&!Object.keys(t).length,Kw=t=>t.type==="file",xr=t=>typeof t=="function",Rf=t=>{if(!Ww)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},iP=t=>t.type==="select-multiple",Zw=t=>t.type==="radio",M9=t=>Zw(t)||vd(t),Hg=t=>Rf(t)&&t.isConnected;function R9(t,e){const n=e.slice(0,-1).length;let r=0;for(;r<n;)t=kt(t)?r++:t[e[r++]];return t}function D9(t){for(const e in t)if(t.hasOwnProperty(e)&&!kt(t[e]))return!1;return!0}function xt(t,e){const n=Array.isArray(e)?e:xm(e)?[e]:Gw(e),r=n.length===1?t:R9(t,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(bt(r)&&gn(r)||Array.isArray(r)&&D9(r))&&xt(t,n.slice(0,-1)),t}var oP=t=>{for(const e in t)if(xr(t[e]))return!0;return!1};function Df(t,e={}){const n=Array.isArray(t);if(bt(t)||n)for(const r in t)Array.isArray(t[r])||bt(t[r])&&!oP(t[r])?(e[r]=Array.isArray(t[r])?[]:{},Df(t[r],e[r])):on(t[r])||(e[r]=!0);return e}function aP(t,e,n){const r=Array.isArray(t);if(bt(t)||r)for(const s in t)Array.isArray(t[s])||bt(t[s])&&!oP(t[s])?kt(e)||s0(n[s])?n[s]=Array.isArray(t[s])?Df(t[s],[]):{...Df(t[s])}:aP(t[s],on(e)?{}:e[s],n[s]):n[s]=!fi(t[s],e[s]);return n}var Cc=(t,e)=>aP(t,e,Df(e));const RS={value:!1,isValid:!1},DS={value:!0,isValid:!0};var lP=t=>
vendor: 8,773 bytes, line 434
434{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!kt(t[0].attributes.value)?kt(t[0].value)||t[0].value===""?DS:{value:t[0].value,isValid:!0}:DS:RS}return RS},cP=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>kt(t)?t:e?t===""?NaN:t&&+t:n&&Jr(t)?new Date(t):r?r(t):t;const LS={isValid:!1,value:null};var uP=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,LS):LS;function $S(t){const e=t.ref;return Kw(e)?e.files:Zw(e)?uP(t.refs).value:iP(e)?[...e.selectedOptions].map(({value:n})=>n):vd(e)?lP(t.refs).value:cP(kt(e.value)?t.ref.value:e.value,t)}var L9=(t,e,n,r)=>{const s={};for(const i of t){const o=ce(e,i);o&&Ke(s,i,o._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},Lf=t=>t instanceof RegExp,Ec=t=>kt(t)?t:Lf(t)?t.source:bt(t)?Lf(t.value)?t.value.source:t.value:t,FS=t=>({isOnSubmit:!t||t===wr.onSubmit,isOnBlur:t===wr.onBlur,isOnChange:t===wr.onChange,isOnAll:t===wr.all,isOnTouch:t===wr.onTouched});const zS="AsyncFunction";var $9=t=>!!t&&!!t.validate&&!!(xr(t.validate)&&t.validate.constructor.name===zS||bt(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===zS)),F9=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),US=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const iu=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=ce(t,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],s)&&!r)return!0;if(o.ref&&e(o.ref,o.name)&&!r)return!0;if(iu(a,e))break}else if(bt(a)&&iu(a,e))break}}};function BS(t,e,n){const r=ce(t,n);if(r||xm(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=ce(e,i),a=ce(t,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};s.pop()}return{name:n}}var z9=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return gn(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(o=>e[o]===(!r||wr.all))},U9=(t,e,n)=>!t||!e||t===e||su(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),B9=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,V9=(t,e)=>!qw(ce(t,e)).length&&xt(t,e),H9=(t,e,n)=>{const r=su(ce(t,n));return Ke(r,"root",e[n]),Ke(t,n,r),t},zh=t=>Jr(t);function VS(t,e,n="validate"){if(zh(t)||Array.isArray(t)&&t.every(zh)||Vr(t)&&!t)return{type:n,message:zh(t)?t:"",ref:e}}var Na=t=>bt(t)&&!Lf(t)?t:{value:t,message:""},HS=async(t,e,n,r,s,i)=>{const{ref:o,refs:a,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:p,validate:g,name:m,valueAsNumber:y,mount:b}=t._f,w=ce(n,m);if(!b||e.has(m))return{};const x=a?a[0]:o,k=P=>{s&&x.reportValidity&&(x.setCustomValidity(Vr(P)?"":P||""),x.reportValidity())},S={},E=Zw(o),C=vd(o),A=E||C,N=(y||Kw(o))&&kt(o.value)&&kt(w)||Rf(o)&&o.value===""||w===""||Array.isArray(w)&&!w.length,M=sP.bind(null,m,r,S),F=(P,V,_,H=ps.maxLength,B=ps.minLength)=>{const $=P?V:_;S[m]={type:P?H:B,message:$,ref:o,...M(P?H:B,$)}};if(i?!Array.isArray(w)||!w.length:l&&(!A&&(N||on(w))||Vr(w)&&!w||C&&!lP(a).isValid||E&&!uP(a).isValid)){const{value:P,message:V}=zh(l)?{value:!!l,message:l}:Na(l);if(P&&(S[m]={type:ps.required,message:V,ref:x,...M(ps.required,V)},!r))return k(V),S}if(!N&&(!on(d)||!on(f))){let P,V;const _=Na(f),H=Na(d);if(!on(w)&&!isNaN(w)){const B=o.valueAsNumber||w&&+w;on(_.value)||(P=B>_.value),on(H.value)||(V=B<H.value)}else{const B=o.valueAsDate||new Date(w),$=K=>new Date(new Date().toDateString()+" "+K),O=o.type=="time",R=o.type=="week";Jr(_.value)&&w&&(P=O?$(w)>$(_.value):R?w>_.value:B>new Date(_.value)),Jr(H.value)&&w&&(V=O?$(w)<$(H.value):R?w<H.value:B<new Date(H.value))}if((P||V)&&(F(!!P,_.message,H.message,ps.max,ps.min),!r))return k(S[m].message),S}if((c||u)&&!N&&(Jr(w)||i&&Array.isArray(w))){const P=Na(c),V=Na(u),_=!on(P.value)&&w.length>+P.value,H=!on(V.value)&&w.length<+V.value;if((_||H)&&(F(_,P.message,V.message),!r))return k(S[m].message),S}if(p&&!N&&Jr(w)){const{value:P,message:V}=Na(p);if(Lf(P)&&!w.match(P)&&(S[m]={type:ps.pattern,message:V,ref:o,...M(ps.pattern,V)},!r))return k(V),S}if(g){if(xr(g)){const P=await g(w,n),V=VS(P,x);if(V&&(S[m]={...V,...M(ps.validate,V.message)},!r))return k(V.message),S}else if(bt(g)){let P={};for(const V in g){if(!gn(P)&&!r)break;const _=VS(await g[V](w,n),x,V);_&&(P={..._,...M(V,_.message)},k(_.message),r&&(S[m]=P))}if(!gn(P)&&(S[m]={ref:x,...P},!r))return S}}return k(!0),S};const W9={mode:wr.onSubmit,reValidateMode:wr.onChange,shouldFocusError:!0};function q9(t={}){let e={...W9,...t},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:xr(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1},r={},s=bt(e.defaultValues)||bt(e.values)?jt(e.defaultValues||e.values)||{}:{},i=e.shouldUnregister?{}:jt(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let d={...u};const f={array:MS(),state:MS()},p=e.criteriaMode===wr.all,g=T=>I=>{clearTimeout(c),c=setTimeout(T,I)},m=async T=>{if(!e.disabled&&(u.isValid||d.isValid||T)){const I=e.resolver?gn((await C()).errors):await N(r,!0);I!==n.isValid&&f.state.next({isValid:I})}},y=(T,I)=>{!e.disabled&&(u.isValidating||u.validatingFields||d.isValidating||d.validatingFields)&&((T||Array.from(a.mount)).forEach(L=>{L&&(I?Ke(n.validatingFields,L,I):xt(n.validatingFields,L))}),f.state.next({validatingFields:n.validatingFields,isValidating:!gn(n.validatingFields)}))},b=(T,I=[],L,X,Q=!0,J=!0)=>{if(X&&L&&!e.disabled){if(o.action=!0,J&&Array.isArray(ce(r,T))){const ie=L(ce(r,T),X.argA,X.argB);Q&&Ke(r,T,ie)}if(J&&Array.isArray(ce(n.errors,T))){const ie=L(ce(n.errors,T),X.argA,X.argB);Q&&Ke(n.errors,T,ie),V9(n.errors,T)}if((u.touchedFields||d.touchedFields)&&J&&Array.isArray(ce(n.touchedFields,T))){const ie=L(ce(n.touchedFields,T),X.argA,X.argB);Q&&Ke(n.touchedFields,T,ie)}(u.dirtyFields||d.dirtyFields)&&(n.dirtyFields=Cc(s,i)),f.state.next({name:T,isDirty:F(T,I),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ke(i,T,I)},w=(T,I)=>{Ke(n.errors,T,I),f.state.next({errors:n.errors})},x=T=>{n.errors=T,f.state.next({errors:n.errors,isValid:!1})},k=(T,I,L,X)=>{const Q=ce(r,T);if(Q){const J=ce(i,T,kt(L)?ce(s,T):L);kt(J)||X&&X.defaultChecked||I?Ke(i,T,I?J:$S(Q._f)):_(T,J),o.mount&&m()}},S=(T,I,L,X,Q)=>{let J=!1,ie=!1;const Le={name:T};if(!e.disabled){if(!L||X){(u.isDirty||d.isDirty)&&(ie=n.isDirty,n.isDirty=Le.isDirty=F(),J=ie!==Le.isDirty);const qe=fi(ce(s,T),I);ie=!!ce(n.dirtyFields,T),qe?xt(n.dirtyFields,T):Ke(n.dirtyFields,T,!0),Le.dirtyFields=n.dirtyFields,J=J||(u.dirtyFields||d.dirtyFields)&&ie!==!qe}if(L){const qe=ce(n.touchedFields,T);qe||(Ke(n.touchedFields,T,L),Le.touchedFields=n.touchedFields,J=J||(u.touchedFields||d.touchedFields)&&qe!==L)}J&&Q&&f.state.next(Le)}return J?Le:{}},E=(T,I,L,X)=>{const Q=ce(n.errors,T),J=(u.isValid||d.isValid)&&Vr(I)&&n.isValid!==I;if(e.delayError&&L?(l=g(()=>w(T,L)),l(e.delayError)):(clearTimeout(c),l=null,L?Ke(n.errors,T,L):xt(n.errors,T)),(L?!fi(Q,L):Q)||!gn(X)||J){const ie={...X,...J&&Vr(I)?{isValid:I}:{},errors:n.errors,name:T};n={...n,...ie},f.state.next(ie)}},C=async T=>{y(T,!0);const I=await e.resolver(i,e.context,L9(T||a.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return y(T),I},A=async T=>{const{errors:I}=await C(T);if(T)for(const L of T){const X=ce(I,L);X?Ke(n.errors,L,X):xt(n.errors,L)}else n.errors=I;return I},N=async(T,I,L={valid:!0})=>{for(const X in T){const Q=T[X];if(Q){const{_f:J,...ie}=Q;if(J){const Le=a.array.has(J.name),qe=Q._f&&$9(Q._f);qe&&u.validatingFields&&y([X],!0);const mn=await HS(Q,a.disabled,i,p,e.shouldUseNativeValidation&&!I,Le);if(qe&&u.validatingFields&&y([X]),mn[J.name]&&(L.valid=!1,I))break;!I&&(ce(mn,J.name)?Le?H9(n.errors,mn,J.name):Ke(n.errors,J.name,mn[J.name]):xt(n.errors,J.name))}!gn(ie)&&await N(ie,I,L)}}return L.valid},M=()=>{for(const T of a.unMount){const I=ce(r,T);I&&(I._f.refs?I._f.refs.every(L=>!Hg(L)):!Hg(I._f.ref))&&D(T)}a.unMount=new Set},F=(T,I)=>!e.disabled&&(T&&I&&Ke(i,T,I),!fi(K(),s)),P=(T,I,L)=>j9(T,a,{...o.mount?i:kt(I)?s:Jr(T)?{[T]:I}:I},L,I),V=T=>qw(ce(o.mount?i:s,T,e.shouldUnregister?ce(s,T,[]):[])),_=(T,I,L={})=>{const X=ce(r,T);let Q=I;if(X){const J=X._f;J&&(!J.disabled&&Ke(i,T,cP(I,J)),Q=Rf(J.ref)&&on(I)?"":I,iP(J.ref)?[...J.ref.options].forEac
vendor: 2,084 bytes, line 434
434h(ie=>ie.selected=Q.includes(ie.value)):J.refs?vd(J.ref)?J.refs.forEach(ie=>{(!ie.defaultChecked||!ie.disabled)&&(Array.isArray(Q)?ie.checked=!!Q.find(Le=>Le===ie.value):ie.checked=Q===ie.value||!!Q)}):J.refs.forEach(ie=>ie.checked=ie.value===Q):Kw(J.ref)?J.ref.value="":(J.ref.value=Q,J.ref.type||f.state.next({name:T,values:jt(i)})))}(L.shouldDirty||L.shouldTouch)&&S(T,Q,L.shouldTouch,L.shouldDirty,!0),L.shouldValidate&&R(T)},H=(T,I,L)=>{for(const X in I){if(!I.hasOwnProperty(X))return;const Q=I[X],J=T+"."+X,ie=ce(r,J);(a.array.has(T)||bt(Q)||ie&&!ie._f)&&!Eo(Q)?H(J,Q,L):_(J,Q,L)}},B=(T,I,L={})=>{const X=ce(r,T),Q=a.array.has(T),J=jt(I);Ke(i,T,J),Q?(f.array.next({name:T,values:jt(i)}),(u.isDirty||u.dirtyFields||d.isDirty||d.dirtyFields)&&L.shouldDirty&&f.state.next({name:T,dirtyFields:Cc(s,i),isDirty:F(T,J)})):X&&!X._f&&!on(J)?H(T,J,L):_(T,J,L),US(T,a)&&f.state.next({...n,name:T}),f.state.next({name:o.mount?T:void 0,values:jt(i)})},$=async T=>{o.mount=!0;const I=T.target;let L=I.name,X=!0;const Q=ce(r,L),J=qe=>{X=Number.isNaN(qe)||Eo(qe)&&isNaN(qe.getTime())||fi(qe,ce(i,L,qe))},ie=FS(e.mode),Le=FS(e.reValidateMode);if(Q){let qe,mn;const us=I.type?$S(Q._f):A9(T),Rr=T.type===jS.BLUR||T.type===jS.FOCUS_OUT,Sd=!F9(Q._f)&&!e.resolver&&!ce(n.errors,L)&&!Q._f.deps||B9(Rr,ce(n.touchedFields,L),n.isSubmitted,Le,ie),co=US(L,a,Rr);Ke(i,L,us),Rr?(Q._f.onBlur&&Q._f.onBlur(T),l&&l(0)):Q._f.onChange&&Q._f.onChange(T);const Dr=S(L,us,Rr),Cd=!gn(Dr)||co;if(!Rr&&f.state.next({name:L,type:T.type,values:jt(i)}),Sd)return(u.isValid||d.isValid)&&(e.mode==="onBlur"?Rr&&m():Rr||m()),Cd&&f.state.next({name:L,...co?{}:Dr});if(!Rr&&co&&f.state.next({...n}),e.resolver){const{errors:ds}=await C([L]);if(J(us),X){const zm=BS(n.errors,r,L),Ed=BS(ds,r,zm.name||L);qe=Ed.error,L=Ed.name,mn=gn(ds)}}else y([L],!0),qe=(await HS(Q,a.disabled,i,p,e.shouldUseNativeValidation))[L],y([L]),J(us),X&&(qe?mn=!1:(u.isValid||d.isValid)&&(mn=await N(r,!0)));X&&(Q._f.deps&&R(Q._f.deps),E(L,mn,qe,Dr))}},O=(T,I)=>{if(ce(n.errors,I)&&T.focus)return T.focus(),1},R=async(T,I={})=>{let L,X;const Q=su(T);
vendor: 4,168 bytes, line 434
434if(e.resolver){const J=await A(kt(T)?T:Q);L=gn(J),X=T?!Q.some(ie=>ce(J,ie)):L}else T?(X=(await Promise.all(Q.map(async J=>{const ie=ce(r,J);return await N(ie&&ie._f?{[J]:ie}:ie)}))).every(Boolean),!(!X&&!n.isValid)&&m()):X=L=await N(r);return f.state.next({...!Jr(T)||(u.isValid||d.isValid)&&L!==n.isValid?{}:{name:T},...e.resolver||!T?{isValid:L}:{},errors:n.errors}),I.shouldFocus&&!X&&iu(r,O,T?Q:a.mount),X},K=T=>{const I={...o.mount?i:s};return kt(T)?I:Jr(T)?ce(I,T):T.map(L=>ce(I,L))},de=(T,I)=>({invalid:!!ce((I||n).errors,T),isDirty:!!ce((I||n).dirtyFields,T),error:ce((I||n).errors,T),isValidating:!!ce(n.validatingFields,T),isTouched:!!ce((I||n).touchedFields,T)}),se=T=>{T&&su(T).forEach(I=>xt(n.errors,I)),f.state.next({errors:T?n.errors:{}})},ae=(T,I,L)=>{const X=(ce(r,T,{_f:{}})._f||{}).ref,Q=ce(n.errors,T)||{},{ref:J,message:ie,type:Le,...qe}=Q;Ke(n.errors,T,{...qe,...I,ref:X}),f.state.next({name:T,errors:n.errors,isValid:!1}),L&&L.shouldFocus&&X&&X.focus&&X.focus()},he=(T,I)=>xr(T)?f.state.subscribe({next:L=>"values"in L&&T(P(void 0,I),L)}):P(T,I,!0),Y=T=>f.state.subscribe({next:I=>{U9(T.name,I.name,T.exact)&&z9(I,T.formState||u,ls,T.reRenderRoot)&&T.callback({values:{...i},...n,...I,defaultValues:s})}}).unsubscribe,re=T=>(o.mount=!0,d={...d,...T.formState},Y({...T,formState:d})),D=(T,I={})=>{for(const L of T?su(T):a.mount)a.mount.delete(L),a.array.delete(L),I.keepValue||(xt(r,L),xt(i,L)),!I.keepError&&xt(n.errors,L),!I.keepDirty&&xt(n.dirtyFields,L),!I.keepTouched&&xt(n.touchedFields,L),!I.keepIsValidating&&xt(n.validatingFields,L),!e.shouldUnregister&&!I.keepDefaultValue&&xt(s,L);f.state.next({values:jt(i)}),f.state.next({...n,...I.keepDirty?{isDirty:F()}:{}}),!I.keepIsValid&&m()},be=({disabled:T,name:I})=>{(Vr(T)&&o.mount||T||a.disabled.has(I))&&(T?a.disabled.add(I):a.disabled.delete(I))},De=(T,I={})=>{let L=ce(r,T);const X=Vr(I.disabled)||Vr(e.disabled);return Ke(r,T,{...L||{},_f:{...L&&L._f?L._f:{ref:{name:T}},name:T,mount:!0,...I}}),a.mount.add(T),L?be({disabled:Vr(I.disabled)?I.disabled:e.disabled,name:T}):k(T,!0,I.value),{...X?{disabled:I.disabled||e.disabled}:{},...e.progressive?{required:!!I.required,min:Ec(I.min),max:Ec(I.max),minLength:Ec(I.minLength),maxLength:Ec(I.maxLength),pattern:Ec(I.pattern)}:{},name:T,onChange:$,onBlur:$,ref:Q=>{if(Q){De(T,I),L=ce(r,T);const J=kt(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,ie=M9(J),Le=L._f.refs||[];if(ie?Le.find(qe=>qe===J):J===L._f.ref)return;Ke(r,T,{_f:{...L._f,...ie?{refs:[...Le.filter(Hg),J,...Array.isArray(ce(s,T))?[{}]:[]],ref:{type:J.type,name:T}}:{ref:J}}}),k(T,!1,void 0,J)}else L=ce(r,T,{}),L._f&&(L._f.mount=!1),(e.shouldUnregister||I.shouldUnregister)&&!(_9(a.array,T)&&o.action)&&a.unMount.add(T)}}},pe=()=>e.shouldFocusError&&iu(r,O,a.mount),fe=T=>{Vr(T)&&(f.state.next({disabled:T}),iu(r,(I,L)=>{const X=ce(r,L);X&&(I.disabled=X._f.disabled||T,Array.isArray(X._f.refs)&&X._f.refs.forEach(Q=>{Q.disabled=X._f.disabled||T}))},0,!1))},Ce=(T,I)=>async L=>{let X;L&&(L.preventDefault&&L.preventDefault(),L.persist&&L.persist());let Q=jt(i);if(f.state.next({isSubmitting:!0}),e.resolver){const{errors:J,values:ie}=await C();n.errors=J,Q=jt(ie)}else await N(r);if(a.disabled.size)for(const J of a.disabled)xt(Q,J);if(xt(n.errors,"root"),gn(n.errors)){f.state.next({errors:{}});try{await T(Q,L)}catch(J){X=J}}else I&&await I({...n.errors},L),pe(),setTimeout(pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:gn(n.errors)&&!X,submitCount:n.submitCount+1,errors:n.errors}),X)throw X},nt=(T,I={})=>{ce(r,T)&&(kt(I.defaultValue)?B(T,jt(ce(s,T))):(B(T,I.defaultValue),Ke(s,T,jt(I.defaultValue))),I.keepTouched||xt(n.touchedFields,T),I.keepDirty||(xt(n.dirtyFields,T),n.isDirty=I.defaultValue?F(T,jt(ce(s,T))):F()),I.keepError||(xt(n.errors,T),u.isValid&&m()),f.state.next({...n}))},Pt=(T,I={})=>{const L=T?jt(T):s,X=jt(L),Q=gn(T),J=Q?s:X;if(I.keepDefaultValues||(s=L),!I.keepValues){if(I.keepDirtyValues){const ie=new Set([...a.mount,...Object.keys(Cc(s,i))]);for(const Le of Array.from(ie))ce(n.dirtyFields,Le)?Ke(J,Le,ce(i,Le)):B(Le,ce(J,Le))}else{if(Ww&&kt(T))for(const ie of a.mount){const Le=ce(r,ie);
434if(Le&&Le._f){const qe=Array.isArray(Le._f.refs)?Le._f.refs[0]:Le._f.ref;if(Rf(qe)){const mn=qe.closest("form");if(mn){mn.reset();break}}}}if(I.keepFieldsRef)for(const ie of a.mount)B(ie,ce(J,ie));else r={}}i=e.shouldUnregister?I.keepDefaultValues?jt(s):{}:jt(J),f.array.next({values:{...J}}),f.state.next({values:{...J}})}a={mount:I.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!I.keepIsValid||!!I.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:I.keepSubmitCount?n.submitCount:0,isDirty:Q?!1:I.keepDirty?n.isDirty:!!(I.keepDefaultValues&&!fi(T,s)),isSubmitted:I.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:I.keepDirtyValues?I.keepDefaultValues&&i?Cc(s,i):n.dirtyFields:I.keepDefaultValues&&T?Cc(s,T):I.keepDirty?n.dirtyFields:{},touchedFields:I.keepTouched?n.touchedFields:{},errors:I.keepErrors?n.errors:{},isSubmitSuccessful:I.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},jr=(T,I)=>Pt(xr(T)?T(i):T,I),Mr=(T,I={})=>{const L=ce(r,T),X=L&&L._f;if(X){const Q=X.refs?X.refs[0]:X.ref;Q.focus&&(Q.focus(),I.shouldSelect&&xr(Q.select)&&Q.select())}},ls=T=>{n={...n,...T}},cs={control:{register:De,unregister:D,getFieldState:de,handleSubmit:Ce,setError:ae,_subscribe:Y,_runSchema:C,_focusError:pe,_getWatch:P,_getDirty:F,_setValid:m,_setFieldArray:b,_setDisabledField:be,_setErrors:x,_getFieldArray:V,_reset:Pt,_resetDefaultValues:()=>xr(e.defaultValues)&&e.defaultValues().then(T=>{jr(T,e.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:M,_disableForm:fe,_subjects:f,_proxyFormState:u,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(T){o=T},get _defaultValues(){return s},get _names(){return a},set _names(T){a=T},get _formState(){return n},get _options(){return e},set _options(T){e={...e,...T}}},subscribe:re,trigger:R,register:De,handleSubmit:Ce,watch:he,setValue:B,getValues:K,reset:jr,resetField:nt,clearErrors:se,unregister:D,setError:ae,setFocus:Mr,getFieldState:de};return{...cs,formControl:cs}}function G9(t={}){const e=U.useRef(void 0),n=U.useRef(void 0),[r,s]=U.useState({isDirty:!1,isValidating:!1,isLoading:xr(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,isReady:!1,defaultValues:xr(t.defaultValues)?void 0:t.defaultValues});if(!e.current)if(t.formControl)e.current={...t.formControl,formState:r},t.defaultValues&&!xr(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions);else{const{formControl:o,...a}=q9(t);e.current={...a,formState:r}}const i=e.current.control;return i._options=t,P9(()=>{const o=i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0});return s(a=>({...a,isReady:!0})),i._formState.isReady=!0,o},[i]),U.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),U.useEffect(()=>{t.mode&&(i._options.mode=t.mode),t.reValidateMode&&(i._options.reValidateMode=t.reValidateMode)},[i,t.mode,t.reValidateMode]),U.useEffect(()=>{t.errors&&(i._setErrors(t.errors),i._focusError())},[i,t.errors]),U.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,t.shouldUnregister]),U.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),U.useEffect(()=>{t.values&&!fi(t.values,n.current)?(i._reset(t.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=t.values,s(o=>({...o}))):i._resetDefaultValues()},[i,t.values]),U.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),e.current.formState=O9(r,i),e.current}const WS=(t,e,n)=>{if(t&&"reportValidity"in t){const r=ce(n,e);t.setCustomValidity(r&&r.message||""),t.reportValidity()}},dP=(t,e)=>{for(const n in e.fields){const r=e.fields[n];r&&r.ref&&"reportValidity"in r.ref?WS(r.ref,n,t):r.refs&&r.refs.forEac
vendor: 3,046 bytes, line 434
434h(s=>WS(s,n,t))}},K9=(t,e)=>{e.shouldUseNativeValidation&&dP(t,e);const n={};for(const r in t){const s=ce(e.fields,r),i=Object.assign(t[r]||{},{ref:s&&s.ref});if(Z9(e.names||Object.keys(t),r)){const o=Object.assign({},ce(n,r));Ke(o,"root",i),Ke(n,r,o)}else Ke(n,r,i)}return n},Z9=(t,e)=>t.some(n=>n.startsWith(e+"."));var Y9=function(t,e){for(var n={};t.length;){var r=t[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return t.push(d)})}),e){var l=n[o].types,c=l&&l[r.code];n[o]=sP(o,e,n,s,c?[].concat(c,r.message):r.message)}t.shift()}return n},J9=function(t,e,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(t[n.mode==="sync"?"parse":"parseAsync"](r,e)).then(function(c){return i.shouldUseNativeValidation&&dP({},i),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:K9(Y9(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Be;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Be||(Be={}));var qS;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(qS||(qS={}));const ue=Be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ii=t=>{switch(typeof t){case"undefined":return ue.undefined;case"string":return ue.string;case"number":return Number.isNaN(t)?ue.nan:ue.number;case"boolean":return ue.boolean;case"function":return ue.function;case"bigint":return ue.bigint;case"symbol":return ue.symbol;case"object":return Array.isArray(t)?ue.array:t===null?ue.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ue.promise:typeof Map<"u"&&t instanceof Map?ue.map:typeof Set<"u"&&t instanceof Set?ue.set:typeof Date<"u"&&t instanceof Date?ue.date:ue.object;default:return ue.unknown}}
vendor: 4,686 bytes, line 434
434,Z=Be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Fs extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(e){if(!(e instanceof Fs))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Fs.create=t=>new Fs(t);const i0=(t,e)=>{let n;switch(t.code){case Z.invalid_type:t.received===ue.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Be.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:n=`Unrecognized key(s) in object: ${Be.joinValues(t.keys,", ")}`;break;case Z.invalid_union:n="Invalid input";break;case Z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Be.joinValues(t.options)}`;break;case Z.invalid_enum_value:n=`Invalid enum value. Expected ${Be.joinValues(t.options)}, received '${t.received}'`;break;case Z.invalid_arguments:n="Invalid function arguments";break;case Z.invalid_return_type:n="Invalid function return type";break;case Z.invalid_date:n="Invalid date";break;case Z.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Be.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Z.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Z.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Z.custom:n="Invalid input";break;case Z.invalid_intersection_types:n="Intersection results could not be merged";break;case Z.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Z.not_finite:n="Number must be finite";break;default:n=e.defaultError,Be.assertNever(t)}return{message:n}};let Q9=i0;function X9(){return Q9}const e7=t=>
vendor: 29,199 bytes, line 434
434{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function te(t,e){const n=X9(),r=e7({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===i0?void 0:i0].filter(s=>!!s)});t.common.issues.push(r)}class Rn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Ee;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Rn.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Ee;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),Rc=t=>({status:"dirty",value:t}),ir=t=>({status:"valid",value:t}),GS=t=>t.status==="aborted",KS=t=>t.status==="dirty",Ll=t=>t.status==="valid",$f=t=>typeof Promise<"u"&&t instanceof Promise;var me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));class Ki{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ZS=(t,e)=>{if(Ll(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Fs(t.common.issues);return this._error=n,this._error}}};function je(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class ze{get description(){return this._def.description}_getType(e){return ii(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:ii(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Rn,ctx:{common:e.parent.common,data:e.data,parsedType:ii(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if($f(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ii(e)},s=this._parseSync({data:e,path:r.path,parent:r});return ZS(r,s)}"~validate"(e){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ii(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return Ll(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>Ll(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ii(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await($f(s)?s:Promise.resolve(s));return ZS(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:Z.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new Fl({schema:this,typeName:Ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Li.create(this,this._def)}nullable(){return zl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ts.create(this)}promise(){return Bf.create(this,this._def)}or(e){return zf.create([this,e],this._def)}and(e){return Uf.create(this,e,this._def)}transform(e){return new Fl({...je(this._def),schema:this,typeName:Ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new c0({...je(this._def),innerType:this,defaultValue:n,typeName:Ae.ZodDefault})}brand(){return new S7({typeName:Ae.ZodBranded,type:this,...je(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new u0({...je(this._def),innerType:this,catchValue:n,typeName:Ae.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Yw.create(this,e)}readonly(){return d0.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const t7=/^c[^\s-]{8,}$/i,n7=/^[0-9a-z]+$/,r7=/^[0-9A-HJKMNP-TV-Z]{26}$/i,s7=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,i7=/^[a-z0-9_-]{21}$/i,o7=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,a7=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,l7=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,c7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wg;const u7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,d7=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,h7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,f7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p7=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,m7=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hP="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",g7=new RegExp(`^${hP}$`);function fP(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function y7(t){return new RegExp(`^${fP(t)}$`)}function v7(t){let e=`${hP}T${fP(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function b7(t,e){return!!((e==="v4"||!e)&&u7.test(t)||(e==="v6"||!e)&&h7.test(t))}function w7(t,e){if(!o7.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function x7(t,e){return!!((e==="v4"||!e)&&d7.test(t)||(e==="v6"||!e)&&f7.test(t))}class Ci extends ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ue.string){const i=this._getOrReturnCtx(e);return te(i,{code:Z.invalid_type,expected:ue.string,received:i.parsedType}),Ee}const r=new Rn;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?te(s,{code:Z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(s,{code:Z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")l7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"email",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Wg||(Wg=new RegExp(c7,"u")),Wg.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"emoji",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")s7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"uuid",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")i7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"nanoid",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")t7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")n7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cuid2",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")r7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"ulid",code:Z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),te(s,{validation:"url",code:Z.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"regex",code:Z.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?v7(i).test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?g7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?y7(i).test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{code:Z.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?a7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"duration",code:Z.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?b7(e.data,i.version)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"ip",code:Z.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?w7(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"jwt",code:Z.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?x7(e.data,i.version)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"cidr",code:Z.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?p7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"base64",code:Z.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?m7.test(e.data)||(s=this._getOrReturnCtx(e,s),te(s,{validation:"base64url",code:Z.invalid_string,message:i.message}),r.dirty()):Be.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:Z.invalid_string,...me.errToObj(r)})}_addCheck(e){return new Ci({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...me.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...me.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...me.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...me.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...me.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...me.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...me.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...me.errToObj(n)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new Ci({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ci({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ci({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ci.create=t=>new Ci({checks:[],typeName:Ae.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...je(t)});function k7(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class Uu extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ue.number){const i=this._getOrReturnCtx(e);return te(i,{code:Z.invalid_type,expected:ue.number,received:i.parsedType}),Ee}let r;const s=new Rn;for(const i of this._def.checks)i.kind==="int"?Be.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:Z.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?k7(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_finite,message:i.message}),s.dirty()):Be.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,r,s){return new Uu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:me.toString(s)}]})}_addCheck(e){return new Uu({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Be.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Uu.create=t=>new Uu({checks:[],typeName:Ae.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...je(t)});class Bu extends ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ue.bigint)return this._getInvalidInput(e);let r;const s=new Rn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),te(r,{code:Z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Be.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return te(n,{code:Z.invalid_type,expected:ue.bigint,received:n.parsedType}),Ee}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,r,s){return new Bu({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:me.toString(s)}]})}_addCheck(e){return new Bu({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Bu.create=t=>new Bu({checks:[],typeName:Ae.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...je(t)});class o0 extends ze{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ue.boolean){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.boolean,received:r.parsedType}),Ee}return ir(e.data)}}o0.create=t=>new o0({typeName:Ae.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...je(t)});class Ff extends ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ue.date){const i=this._getOrReturnCtx(e);return te(i,{code:Z.invalid_type,expected:ue.date,received:i.parsedType}),Ee}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return te(i,{code:Z.invalid_date}),Ee}const r=new Rn;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),te(s,{code:Z.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Be.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ff({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Ff.create=t=>new Ff({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ae.ZodDate,...je(t)});class YS extends ze{_parse(e){if(this._getType(e)!==ue.symbol){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.symbol,received:r.parsedType}),Ee}return ir(e.data)}}YS.create=t=>new YS({typeName:Ae.ZodSymbol,...je(t)});class JS extends ze{_parse(e){if(this._getType(e)!==ue.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.undefined,received:r.parsedType}),Ee}return ir(e.data)}}JS.create=t=>new JS({typeName:Ae.ZodUndefined,...je(t)});class QS extends ze{_parse(e){if(this._getType(e)!==ue.null){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.null,received:r.parsedType}),Ee}return ir(e.data)}}QS.create=t=>new QS({typeName:Ae.ZodNull,...je(t)});class XS extends ze{constructor(){super(...arguments),this._any=!0}_parse(e){return ir(e.data)}}XS.create=t=>new XS({typeName:Ae.ZodAny,...je(t)});class eC extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ir(e.data)}}eC.create=t=>new eC({typeName:Ae.ZodUnknown,...je(t)});class Zi extends ze{_parse(e){const n=this._getOrReturnCtx(e);return te(n,{code:Z.invalid_type,expected:ue.never,received:n.parsedType}),Ee}}Zi.create=t=>new Zi({typeName:Ae.ZodNever,...je(t)});class tC extends ze{_parse(e){if(this._getType(e)!==ue.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.void,received:r.parsedType}),Ee}return ir(e.data)}}tC.create=t=>new tC({typeName:Ae.ZodVoid,...je(t)});class ts extends ze{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==ue.array)return te(n,{code:Z.invalid_type,expected:ue.array,received:n.parsedType}),Ee;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(te(n,{code:o?Z.too_big:Z.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(te(n,{code:Z.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(te(n,{code:Z.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new Ki(n,o,n.path,a)))).then(o=>Rn.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new Ki(n,o,n.path,a)));return Rn.mergeArray(r,i)}
vendor: 5,085 bytes, line 434
434get element(){return this._def.type}min(e,n){return new ts({...this._def,minLength:{value:e,message:me.toString(n)}})}max(e,n){return new ts({...this._def,maxLength:{value:e,message:me.toString(n)}})}length(e,n){return new ts({...this._def,exactLength:{value:e,message:me.toString(n)}})}nonempty(e){return this.min(1,e)}}ts.create=(t,e)=>new ts({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ae.ZodArray,...je(e)});function Da(t){if(t instanceof ht){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Li.create(Da(r))}return new ht({...t._def,shape:()=>e})}else return t instanceof ts?new ts({...t._def,type:Da(t.element)}):t instanceof Li?Li.create(Da(t.unwrap())):t instanceof zl?zl.create(Da(t.unwrap())):t instanceof na?na.create(t.items.map(e=>Da(e))):t}class ht extends ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Be.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==ue.object){const c=this._getOrReturnCtx(e);return te(c,{code:Z.invalid_type,expected:ue.object,received:c.parsedType}),Ee}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zi&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Ki(s,d,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Zi){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(te(s,{code:Z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Ki(s,d,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>Rn.mergeObjectSync(r,c)):Rn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new ht({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:me.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ht({...this._def,unknownKeys:"strip"})}passthrough(){return new ht({...this._def,unknownKeys:"passthrough"})}extend(e){return new ht({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ht({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ae.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new ht({...this._def,catchall:e})}pick(e){const n={};for(const r of Be.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new ht({...this._def,shape:()=>n})}omit(e){const n={};for(const r of Be.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new ht({...this._def,shape:()=>n})}deepPartial(){return Da(this)}partial(e){const n={};for(const r of Be.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new ht({...this._def,shape:()=>n})}required(e){const n={};for(const r of Be.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Li;)i=i._def.innerType;n[r]=i}return new ht({...this._def,shape:()=>n})}keyof(){return pP(Be.objectKeys(this.shape))}}ht.create=(t,e)=>new ht({shape:()=>t,unknownKeys:"strip",catchall:Zi.create(),typeName:Ae.ZodObject,...je(e)});ht.strictCreate=(t,e)=>new ht({shape:()=>t,unknownKeys:"strict",catchall:Zi.create(),typeName:Ae.ZodObject,...je(e)});ht.lazycreate=(t,e)=>new ht({shape:t,unknownKeys:"strip",catchall:Zi.create(),typeName:Ae.ZodObject,...je(e)});class zf extends ze{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Fs(a.ctx.common.issues));return te(n,{code:Z.invalid_union,unionErrors:o}),Ee}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 5,034 bytes, line 434
434const a=o.map(l=>new Fs(l));return te(n,{code:Z.invalid_union,unionErrors:a}),Ee}}get options(){return this._def.options}}zf.create=(t,e)=>new zf({options:t,typeName:Ae.ZodUnion,...je(e)});function a0(t,e){const n=ii(t),r=ii(e);if(t===e)return{valid:!0,data:t};if(n===ue.object&&r===ue.object){const s=Be.objectKeys(e),i=Be.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=a0(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===ue.array&&r===ue.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=a0(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===ue.date&&r===ue.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Uf extends ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(GS(i)||GS(o))return Ee;const a=a0(i.value,o.value);return a.valid?((KS(i)||KS(o))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:Z.invalid_intersection_types}),Ee)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Uf.create=(t,e,n)=>new Uf({left:t,right:e,typeName:Ae.ZodIntersection,...je(n)});class na extends ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.array)return te(r,{code:Z.invalid_type,expected:ue.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return te(r,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Ki(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Rn.mergeArray(n,o)):Rn.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new na({...this._def,rest:e})}}na.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new na({items:t,typeName:Ae.ZodTuple,rest:null,...je(e)})};class nC extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.map)return te(r,{code:Z.invalid_type,expected:ue.map,received:r.parsedType}),Ee;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new Ki(r,a,r.path,[c,"key"])),value:i._parse(new Ki(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ee;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}nC.create=(t,e,n)=>new nC({valueType:e,keyType:t,typeName:Ae.ZodMap,...je(n)});class Vu extends ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==ue.set)return te(r,{code:Z.invalid_type,expected:ue.set,received:r.parsedType}),Ee;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(te(r,{code:Z.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(te(r,{code:Z.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ee;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Ki(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,n){return new Vu({...this._def,minSize:{value:e,message:me.toString(n)}})}max(e,n){return new Vu({...this._def,maxSize:{value:e,message:me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Vu.create=(t,e)=>new Vu({valueType:t,minSize:null,maxSize:null,typeName:Ae.ZodSet,...je(e)});class rC extends ze{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}rC.create=(t,e)=>new rC({getter:t,typeName:Ae.ZodLazy,...je(e)});class l0 extends ze{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return te(n,{received:n.data,code:Z.invalid_literal,expected:this._def.value}),Ee}
vendor: 5,380 bytes, line 434
434return{status:"valid",value:e.data}}get value(){return this._def.value}}l0.create=(t,e)=>new l0({value:t,typeName:Ae.ZodLiteral,...je(e)});function pP(t,e){return new $l({values:t,typeName:Ae.ZodEnum,...je(e)})}class $l extends ze{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{expected:Be.joinValues(r),received:n.parsedType,code:Z.invalid_type}),Ee}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{received:n.data,code:Z.invalid_enum_value,options:r}),Ee}return ir(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return $l.create(e,{...this._def,...n})}exclude(e,n=this._def){return $l.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}$l.create=pP;class sC extends ze{_parse(e){const n=Be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ue.string&&r.parsedType!==ue.number){const s=Be.objectValues(n);return te(r,{expected:Be.joinValues(s),received:r.parsedType,code:Z.invalid_type}),Ee}if(this._cache||(this._cache=new Set(Be.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=Be.objectValues(n);return te(r,{received:r.data,code:Z.invalid_enum_value,options:s}),Ee}return ir(e.data)}get enum(){return this._def.values}}sC.create=(t,e)=>new sC({values:t,typeName:Ae.ZodNativeEnum,...je(e)});class Bf extends ze{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ue.promise&&n.common.async===!1)return te(n,{code:Z.invalid_type,expected:ue.promise,received:n.parsedType}),Ee;const r=n.parsedType===ue.promise?n.data:Promise.resolve(n.data);return ir(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Bf.create=(t,e)=>new Bf({type:t,typeName:Ae.ZodPromise,...je(e)});class Fl extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{te(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return Ee;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Ee:l.status==="dirty"||n.value==="dirty"?Rc(l.value):l});{if(n.value==="aborted")return Ee;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?Ee:a.status==="dirty"||n.value==="dirty"?Rc(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ee:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Ee:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ll(o))return Ee;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Ll(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):Ee);Be.assertNever(s)}}Fl.create=(t,e,n)=>new Fl({schema:t,typeName:Ae.ZodEffects,effect:e,...je(n)});Fl.createWithPreprocess=(t,e,n)=>new Fl({schema:e,effect:{type:"preprocess",transform:t},typeName:Ae.ZodEffects,...je(n)});class Li extends ze{_parse(e){return this._getType(e)===ue.undefined?ir(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:Ae.ZodOptional,...je(e)});class zl extends ze{_parse(e){return this._getType(e)===ue.null?ir(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}zl.create=(t,e)=>new zl({innerType:t,typeName:Ae.ZodNullable,...je(e)});class c0 extends ze{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===ue.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}c0.create=(t,e)=>new c0({innerType:t,typeName:Ae.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...je(e)});class u0 extends ze{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return $f(s)?s.then(i=>
434({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Fs(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Fs(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}u0.create=(t,e)=>new u0({innerType:t,typeName:Ae.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...je(e)});class iC extends ze{_parse(e){if(this._getType(e)!==ue.nan){const r=this._getOrReturnCtx(e);return te(r,{code:Z.invalid_type,expected:ue.nan,received:r.parsedType}),Ee}return{status:"valid",value:e.data}}}iC.create=t=>new iC({typeName:Ae.ZodNaN,...je(t)});class S7 extends ze{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Yw extends ze{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ee:i.status==="dirty"?(n.dirty(),Rc(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new Yw({in:e,out:n,typeName:Ae.ZodPipeline})}}class d0 extends ze{_parse(e){const n=this._def.innerType._parse(e),r=s=>(Ll(s)&&(s.value=Object.freeze(s.value)),s);return $f(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}d0.create=(t,e)=>new d0({innerType:t,typeName:Ae.ZodReadonly,...je(e)});ht.lazycreate;var Ae;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ae||(Ae={}));const Ia=Ci.create,C7=o0.create;Zi.create;ts.create;const E7=ht.create;ht.strictCreate;zf.create;Uf.create;na.create;const A7=l0.create;$l.create;Bf.create;Li.create;zl.create;var km="Switch",[T7,Nee]=sr(km),[_7,N7]=T7(km),mP=v.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,form:u,...d}=t,[f,p]=v.useState(null),g=$e(e,x=>p(x)),m=v.useRef(!1),y=f?u||!!f.closest("form"):!0,[b,w]=Ds({prop:s,defaultProp:i??!1,onChange:c,caller:km});return h.jsxs(_7,{scope:n,checked:b,disabled:a,children:[h.jsx(ke.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":bP(b),"data-disabled":a?"":void 0,disabled:a,value:l,...d,ref:g,onClick:ge(t.onClick,x=>{w(k=>!k),y&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),y&&h.jsx(vP,{control:f,bubbles:!m.current,name:r,value:l,checked:b,required:o,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});mP.displayName=km;var gP="SwitchThumb",yP=v.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=N7(gP,n);return h.jsx(ke.span,{"data-state":bP(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});yP.displayName=gP;var I7="SwitchBubbleInput",vP=v.forwardRef(({__scopeSwitch:t,control:e,checked:n,bubbles:r=!0,...s},i)=>{const o=v.useRef(null),a=$e(o,i),l=Uw(n),c=rw(e);return v.useEffect(()=>{const u=o.current;if(!u)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==n&&p){const g=new Event("click",{bubbles:r});p.call(u,n),u.dispatchEvent(g)}},[l,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vP.displayName=I7;function bP(t){return t?"checked":"unchecked"}var wP=mP,O7=yP;const xP=v.forwardRef(({className:t,...e},n)=>h.jsx(wP,{className:ee("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent 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",t),...e,ref:n,children:h.jsx(O7,{className:ee("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
434));xP.displayName=wP.displayName;var Sm="Checkbox",[P7,Iee]=sr(Sm),[j7,Jw]=P7(Sm);function M7(t){const{__scopeCheckbox:e,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=t,[f,p]=Ds({prop:n,defaultProp:s??!1,onChange:l,caller:Sm}),[g,m]=v.useState(null),[y,b]=v.useState(null),w=v.useRef(!1),x=g?!!o||!!g.closest("form"):!0,k={checked:f,disabled:i,setChecked:p,control:g,setControl:m,name:a,form:o,value:u,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:$i(s)?!1:s,isFormControl:x,bubbleInput:y,setBubbleInput:b};return h.jsx(j7,{scope:e,...k,children:R7(d)?d(k):r})}var kP="CheckboxTrigger",SP=v.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:n,...r},s)=>{const{control:i,value:o,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:g}=Jw(kP,t),m=$e(s,u),y=v.useRef(l);return v.useEffect(()=>{const b=i==null?void 0:i.form;if(b){const w=()=>d(y.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[i,d]),h.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":$i(l)?"mixed":l,"aria-required":c,"data-state":_P(l),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:m,onKeyDown:ge(e,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:ge(n,b=>{d(w=>$i(w)?!0:!w),g&&p&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});SP.displayName=kP;var Qw=v.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:c,form:u,...d}=t;return h.jsx(M7,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>h.jsxs(h.Fragment,{children:[h.jsx(SP,{...d,ref:e,__scopeCheckbox:n}),f&&h.jsx(TP,{__scopeCheckbox:n})]})})});Qw.displayName=Sm;var CP="CheckboxIndicator",EP=v.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=Jw(CP,n);return h.jsx(is,{present:r||$i(i.checked)||i.checked===!0,children:h.jsx(ke.span,{"data-state":_P(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});EP.displayName=CP;var AP="CheckboxBubbleInput",TP=v.forwardRef(({__scopeCheckbox:t,...e},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=Jw(AP,t),g=$e(n,p),m=Uw(i),y=rw(r);v.useEffect(()=>{const w=f;if(!w)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,E=!s.current;if(m!==i&&S){const C=new Event("click",{bubbles:E});w.indeterminate=$i(i),S.call(w,$i(i)?!1:i),w.dispatchEvent(C)}},[f,m,i,s]);const b=v.useRef($i(i)?!1:i);return h.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:a,disabled:l,name:c,value:u,form:d,...e,tabIndex:-1,ref:g,style:{...e.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});TP.displayName=AP;function R7(t){return typeof t=="function"}function $i(t){return t==="indeterminate"}function _P(t){return $i(t)?"indeterminate":t?"checked":"unchecked"}const NP=v.forwardRef(({className:t,...e},n)=>h.jsx(Qw,{ref:n,className:ee("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:h.jsx(EP,{className:ee("flex items-center justify-center text-current"),children:h.jsx(dd,{className:"h-4 w-4"})})}));NP.displayName=Qw.displayName;var IP={exports:{}},OP={};/** 435 * @license React 436 * use-sync-external-store-shim.production.js 437 * 438 * Copyright (c) Meta Platforms, Inc. and affiliates. 439 * 440 * This source code is licensed under the MIT license found in the 441 * LICENSE file in the root directory of this source tree. 442 */var Ul=v;function D7(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var L7=typeof Object.is=="function"?Object.is:D7,$7=Ul.useState,F7=Ul.useEffect,z7=Ul.useLayoutEffect,U7=Ul.useDebugValue;function B7(t,e){var n=e(),r=$7({inst:{value:n,getSnapshot:e}}),s=r[0].inst,i=r[1];return z7(function(){s.value=n,s.getSnapshot=e,qg(s)&&i({inst:s})},[t,n,e]),F7(function(){return qg(s)&&i({inst:s}),t(function(){qg(s)&&i({inst:s})})},[t]),U7(n),n}function qg(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!L7(t,n)}catch{return!0}}function V7(t,e){return e()}var H7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?V7:B7;OP.useSyncExternalStore=Ul.useSyncExternalStore!==void 0?Ul.useSyncExternalStore:H7;IP.exports=OP;var Xw=IP.exports;function Ut(t){this.content=t}Ut.prototype={constructor:Ut,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,s=r.find(t),i=r.content.slice();return s==-1?i.push(n||t,e):(i[s+1]=e,n&&(i[s]=n)),new Ut(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ut(n)},addToStart:function(t,e){return new Ut([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ut(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),i=r.find(t);return s.splice(i==-1?s.length:i,0,e,n),new Ut(s)}
vendor: 9,242 bytes, line 442
442,forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Ut.from(t),t.size?new Ut(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ut.from(t),t.size?new Ut(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ut.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Ut.from=function(t){if(t instanceof Ut)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ut(e)};function PP(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)n++;return n}if(s.content.size||i.content.size){let o=PP(s.content,i.content,n+1);if(o!=null)return o}n+=s.nodeSize}}function jP(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let o=t.child(--s),a=e.child(--i),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;c<u&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=jP(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class W{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,i){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,s+a,i||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new W(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,o=0;o<n;i++){let a=this.content[i],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),s+=a.nodeSize),o=l}return new W(r,s)}cutByIndex(e,n){return e==n?W.empty:e==0&&n==this.content.length?this:new W(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new W(s,i)}addToStart(e){return new W([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new W(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return PP(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return jP(this,e,n,r)}findIndex(e){if(e==0)return sh(0,e);if(e==this.size)return sh(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?sh(n+1,i):sh(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return W.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new W(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return W.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new W(n||e,r)}static from(e){if(!e)return W.empty;if(e instanceof W)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new W([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}W.empty=new W([],0);const Gg={index:0,offset:0};function sh(t,e){return Gg.index=t,Gg.offset=e,Gg}function Vf(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Vf(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Vf(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Ze=class h0{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Vf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return h0.none;if(e instanceof h0)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};Ze.none=[];class Hf extends Error{}class ne{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=RP(this.content,e+this.openStart,n);return r&&new ne(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ne(MP(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ne.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ne(W.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new ne(e,r,s)}}ne.empty=new ne(W.empty,0,0);function MP(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(s==e||i.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(MP(i.content,e-s-1,n-s-1)))}function RP(t,e,n,r){let{index:s,offset:i}=t.findIndex(e),o=t.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=RP(o.content,e-i-1,n,o);return a&&t.replaceChild(s,o.copy(a))}function W7(t,e,n){if(n.openStart>t.depth)throw new Hf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Hf("Inconsistent open depths");return DP(t,e,n,0)}function DP(t,e,n,r){let s=t.index(r),i=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let o=DP(t,e,n,r+1);return i.copy(i.content.replaceChild(s,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return Uo(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=q7(n,t);return Uo(i,$P(t,o,a,e,r))}else return Uo(i,Wf(t,e,r))}function LP(t,e){if(!e.type.compatibleContent(t.type))throw new Hf("Cannot join "+e.type.name+" onto "+t.type.name)}
vendor: 12,222 bytes, lines 442-443
442function f0(t,e,n){let r=t.node(n);return LP(r,e.node(n)),r}function zo(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function ou(t,e,n,r){let s=(e||t).node(n),i=0,o=e?e.index(n):s.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(zo(t.nodeAfter,r),i++));for(let a=i;a<o;a++)zo(s.child(a),r);e&&e.depth==n&&e.textOffset&&zo(e.nodeBefore,r)}function Uo(t,e){return t.type.checkContent(e),t.copy(e)}function $P(t,e,n,r,s){let i=t.depth>s&&f0(t,e,s+1),o=r.depth>s&&f0(n,r,s+1),a=[];return ou(null,t,s,a),i&&o&&e.index(s)==n.index(s)?(LP(i,o),zo(Uo(i,$P(t,e,n,r,s+1)),a)):(i&&zo(Uo(i,Wf(t,e,s+1)),a),ou(e,n,s,a),o&&zo(Uo(o,Wf(n,r,s+1)),a)),ou(r,null,s,a),new W(a)}function Wf(t,e,n){let r=[];if(ou(null,t,n,r),t.depth>n){let s=f0(t,e,n+1);zo(Uo(s,Wf(t,e,n+1)),r)}return ou(e,null,n,r),new W(r)}function q7(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)s=e.node(i).copy(W.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class Hu{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(n);return r?e.child(n).cut(r):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Ze.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new qf(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,i=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(i),c=i-l;if(r.push(o,a,s+l),!c||(o=o.child(a),o.isText))break;i=c-1,s+=l+1}return new Hu(n,r,i)}static resolveCached(e,n){let r=oC.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==n)return o}else oC.set(e,r=new G7);let s=r.elts[r.i]=Hu.resolve(e,n);return r.i=(r.i+1)%K7,s}}class G7{constructor(){this.elts=[],this.i=0}}const K7=12,oC=new WeakMap;class qf{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Z7=Object.create(null);let Fi=class p0{constructor(e,n,r,s=Ze.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||W.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,s){return this.content.textBetween(e,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Vf(this.attrs,n||e.defaultAttrs||Z7)&&Ze.sameSet(this.marks,r||Ze.none)}copy(e=null){return e==this.content?this:new p0(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new p0(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ne.empty;let s=this.resolve(e),i=this.resolve(n),o=r?0:s.sharedDepth(n),a=s.start(o),c=s.node(o).content.cut(s.pos-a,i.pos-a);return new ne(c,s.depth-o,i.depth-o)}replace(e,n,r){return W7(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return Hu.resolveCached(this,e)}resolveNoCache(e){return Hu.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),FP(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=W.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Ze.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Ze.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=W.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Fi.prototype.text=void 0;class Gf extends Fi{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):FP(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gf(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function FP(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ra{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Y7(e,n);if(r.next==null)return ra.empty;let s=zP(r);r.next&&r.err("Unexpected trailing text");let i=rq(nq(s));return sq(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let s=this;for(let i=n;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let s=[this];function i(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return W.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,a.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let a=s;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:a,next:l}=i.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(` 443`)}}ra.empty=new ra(!0);class Y7{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?
vendor: 5,506 bytes, line 443
443=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function zP(t){let e=[];do e.push(J7(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function J7(t){let e=[];do e.push(Q7(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Q7(t){let e=tq(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=X7(t,e);else break;return e}function aC(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function X7(t,e){let n=aC(t),r=n;return t.eat(",")&&(t.next!="}"?r=aC(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function eq(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let i in n){let o=n[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function tq(t){if(t.eat("(")){let e=zP(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=eq(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function nq(t){let e=[[]];return s(i(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function s(o,a){o.forEach(l=>l.to=a)}function i(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=i(o.exprs[l],a);if(l==o.exprs.length-1)return c;s(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),s(i(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return s(i(o.expr,a),l),s(i(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(i(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let u=n();s(i(o.expr,l),u),l=u}if(o.max==-1)s(i(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let u=n();r(l,u),s(i(o.expr,l),u),l=u}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function UP(t,e){return e-t}function lC(t,e){let n=[];return r(e),n.sort(UP);function r(s){let i=t[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let o=0;o<i.length;o++){let{term:a,to:l}=i[o];!a&&n.indexOf(l)==-1&&r(l)}}}function rq(t){let e=Object.create(null);return n(lC(t,0));function n(r){let s=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);lC(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new ra(r.indexOf(t.length-1)>-1);for(let o=0;o<s.length;o++){let a=s[o][1].sort(UP);i.next.push({type:s[o][0],next:e[a.join(",")]||n(a)})}return i}}function sq(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],i=!s.validEnd,o=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];o.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function BP(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function VP(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let i=t[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function HP(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let i=t[s];i.validate&&i.validate(e[s])}}function WP(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new oq(t,r,e[r]);return n}let cC=class qP{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=WP(e,r.attrs),this.defaultAttrs=BP(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ra.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:VP(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Fi(this,this.computeAttrs(e),W.from(n),Ze.setFrom(r))}createChecked(e=null,n,r){return n=W.from(n),this.checkContent(n),new Fi(this,this.computeAttrs(e),n,Ze.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=W.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(W.empty,!0);return i?new Fi(this,e,n.append(i),Ze.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);
vendor: 10,484 bytes, lines 443-445
443if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){HP(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Ze.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,o)=>r[i]=new qP(i,n,o));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function iq(t,e,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class oq{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?iq(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Cm{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=WP(e,s.attrs),this.excluded=null;let i=BP(this.attrs);this.instance=i?new Ze(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ze(this,VP(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Cm(i,s++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){HP(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class GP{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Ut.from(e.nodes),n.marks=Ut.from(e.marks||{}),this.nodes=cC.compile(this.spec.nodes,this),this.marks=Cm.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=ra.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?uC(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:uC(this,o.split(" "))}this.nodeFromJSON=s=>Fi.fromJSON(this,s),this.markFromJSON=s=>Ze.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof cC){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,s)}text(e,n){let r=this.nodes.text;return new Gf(r,r.defaultAttrs,e,Ze.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function uC(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],i=t.marks[s],o=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function aq(t){return t.tag!=null}function lq(t){return t.style!=null}class zi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(aq(s))this.tags.push(s);else if(lq(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new hC(this,n,!1);return r.addAll(e,Ze.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new hC(this,n,!0);return r.addAll(e,Ze.none,n.from,n.to),ne.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(dq(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<i)break}n.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=fC(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=fC(o)),o.node||o.ignore||o.mark||(o.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zi(e,zi.schemaRules(e)))}}const KP={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},cq={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ZP={ol:!0,ul:!0},Wu=1,m0=2,au=4;function dC(t,e,n){return e!=null?(e?Wu:0)|(e==="full"?m0:0):t&&t.whitespace=="pre"?Wu|m0:n&~au}class ih{constructor(e,n,r,s,i,o){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=Ze.none,this.match=i||(o&au?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(W.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wu)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=W.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(W.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!KP.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class hC{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,o=dC(null,n.preserveWhitespace,0)|(r?au:0);s?i=new ih(s.type,s.attrs,Ze.none,!0,n.topMatch||s.type.contentMatch,o):r?i=new ih(null,null,Ze.none,!0,null,o):i=new ih(e.schema.topNodeType,null,Ze.none,!0,null,o),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,i=s.options&m0?"full":this.localPreserveWS||(s.options&Wu)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,` 444`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(o.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=s.content[s.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;ZP.hasOwnProperty(o)&&this.parser.normalizeLists&&uq(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:cq.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(KP.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` 445`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(i,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,s){let i,o;
vendor: 4,119 bytes, line 445
445if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=s==null?null:e.childNodes[s];o!=a;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,n);this.findAtPoint(e,i)}findPlace(e,n,r){let s,i;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!s||s.length>c.length+a)&&(s=c,i=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=Ze.none;for(let a of s.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):pC(a.type,e.type))&&(o=a.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,s){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,s)),i}enterInner(e,n,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=dC(e,i,o.options);o.options&au&&o.content.length==0&&(a|=au);let l=Ze.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):pC(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ih(e,n,l,s,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Wu)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];
vendor: 9,668 bytes, line 445
445if(r.isTextblock&&r.defaultAttrs)return r}}}function uq(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ZP.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function dq(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function fC(t){let e={};for(let n in t)e[n]=t[n];return e}function pC(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let i=[],o=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class pa{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Kg(n).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let a=0,l=0;for(;a<i.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)s=i.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],u=this.serializeMark(c,o.isInline,n);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:s}=Uh(Kg(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&Uh(Kg(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return Uh(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new pa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=mC(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return mC(e.marks)}}function mC(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Kg(t){return t.document||window.document}const gC=new WeakMap;function hq(t){let e=gC.get(t);return e===void 0&&gC.set(t,e=fq(t)),e}function fq(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function Uh(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=hq(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(n=s.slice(0,o),s=s.slice(o+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:p,contentDOM:g}=Uh(t,f,n,r);if(l.appendChild(p),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}const YP=65535,JP=Math.pow(2,16);function pq(t,e){return t+e*JP}function yC(t){return t&YP}function mq(t){return(t-(t&YP))/JP}const QP=1,XP=2,Bh=4,ej=8;class g0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&ej)>0}get deletedBefore(){return(this.delInfo&(QP|Bh))>0}get deletedAfter(){return(this.delInfo&(XP|Bh))>0}get deletedAcross(){return(this.delInfo&Bh)>0}}class In{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&In.empty)return In.empty}recover(e){let n=0,r=yC(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+mq(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+i],u=this.ranges[a+o],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,p=l+s+(f<0?0:u);if(r)return p;let g=e==(n<0?l:d)?null:pq(a/3,e-l),m=e==l?XP:e==d?QP:Bh;return(n<0?e!=l:e!=d)&&(m|=ej),new g0(p,m,g)}s+=u-c}return r?e+s:new g0(e+s,0,null)}touches(e,n){let r=0,s=yC(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+i],u=l+c;if(e<=u&&a==s*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],a=o-(this.inverted?i:0),l=o+(this.inverted?0:i),c=this.ranges[s+n],u=this.ranges[s+r];e(a,a+c,l,l+u),i+=u-c}}invert(){return new In(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?In.empty:new In(e<0?[0,-e,0]:[0,0,e])}}In.empty=new In([]);class qu{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new qu(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new qu;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return r?e:new g0(e,s,null)}}const Zg=Object.create(null);class tn{getMap(){return In.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Zg[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Zg)throw new RangeError("Duplicate use of step JSON ID "+e);return Zg[e]=n,n.prototype.jsonID=e,n}}class Ct{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ct(e,null)}static fail(e){return new Ct(null,e)}static fromReplace(e,n,r,s){try{return Ct.ok(e.replace(n,r,s))}catch(i){if(i instanceof Hf)return Ct.fail(i.message);throw i}}}function ex(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(ex(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return W.fromArray(r)}class Ei extends tn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new ne(ex(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),n.openStart,n.openEnd);return Ct.fromReplace(e,this.from,this.to,i)}invert(){return new Cr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ei(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ei&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ei(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ei(n.from,n.to,e.markFromJSON(n.mark))}}tn.jsonID("addMark",Ei);class Cr extends tn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ne(ex(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Ct.fromReplace(e,this.from,this.to,r)}invert(){return new Ei(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Cr(n.pos,r.pos,this.mark)}merge(e){return e instanceof Cr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Cr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Cr(n.from,n.to,e.markFromJSON(n.mark))}}tn.jsonID("removeMark",Cr);class Ai extends tn{constructor(e,n){super(),this.pos=e,this.mark=n}
vendor: 5,584 bytes, line 445
445apply(e){let n=e.nodeAt(this.pos);if(!n)return Ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ct.fromReplace(e,this.pos,this.pos+1,new ne(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new Ai(this.pos,n.marks[s]);return new Ai(this.pos,this.mark)}}return new sa(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ai(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ai(n.pos,e.markFromJSON(n.mark))}}tn.jsonID("addNodeMark",Ai);class sa extends tn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ct.fromReplace(e,this.pos,this.pos+1,new ne(W.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Ai(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new sa(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new sa(n.pos,e.markFromJSON(n.mark))}}tn.jsonID("removeNodeMark",sa);class Rt extends tn{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&y0(e,this.from,this.to)?Ct.fail("Structure replace would overwrite content"):Ct.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new In([this.from,this.to-this.from,this.slice.size])}invert(e){return new Rt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Rt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Rt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ne.empty:new ne(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Rt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ne.empty:new ne(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Rt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Rt(n.from,n.to,ne.fromJSON(e,n.slice),!!n.structure)}}tn.jsonID("replace",Rt);class $t extends tn{constructor(e,n,r,s,i,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(y0(e,this.from,this.gapFrom)||y0(e,this.gapTo,this.to)))return Ct.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ct.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ct.fromReplace(e,this.from,this.to,r):Ct.fail("Content does not fit in gap")}getMap(){return new In([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new $t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new $t(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new $t(n.from,n.to,n.gapFrom,n.gapTo,ne.fromJSON(e,n.slice),n.insert,!!n.structure)}}tn.jsonID("replaceAround",$t);function y0(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function gq(t,e,n,r){let s=[],i=[],o,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,n),g=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(g)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=p:s.push(o=new Cr(f,p,d[m])));a&&a.to==f?a.to=p:i.push(a=new Ei(f,p,r))}}
vendor: 6,440 bytes, lines 445-446
445),s.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function yq(t,e,n,r){let s=[],i=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;i++;let l=null;if(r instanceof Cm){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let p=0;p<s.length;p++){let g=s[p];g.step==i-1&&d.eq(s[p].style)&&(f=g)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(a,e),to:c,step:i})}}}),s.forEach(o=>t.step(new Cr(o.from,o.to,o.style)))}function tx(t,e,n,r=n.contentMatch,s=!0){let i=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new Rt(a,u,ne.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new Cr(a,u,c.marks[f]));if(s&&c.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,g;for(;f=p.exec(c.text);)g||(g=new ne(W.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new Rt(a+f.index,a+f.index+f[0].length,g))}}a=u}if(!r.validEnd){let l=r.fillBefore(W.empty,!0);t.replace(a,a,new ne(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function vq(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function lc(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,i=0;;--r){let o=t.$from.node(r),a=t.$from.index(r)+s,l=t.$to.indexAfter(r)-i;if(r<t.depth&&o.canReplace(a,l,n))return r;if(r==0||o.type.spec.isolating||!vq(o,a,l))break;a&&(s=1),l<o.childCount&&(i=1)}return null}function bq(t,e,n){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),a=s.after(i+1),l=o,c=a,u=W.empty,d=0;for(let g=i,m=!1;g>n;g--)m||r.index(g)>0?(m=!0,u=W.from(r.node(g).copy(u)),d++):l--;let f=W.empty,p=0;for(let g=i,m=!1;g>n;g--)m||s.after(g+1)<s.end(g)?(m=!0,f=W.from(s.node(g).copy(f)),p++):c++;t.step(new $t(l,c,o,a,new ne(u.append(f),d,p),u.size-d,!0))}function nx(t,e,n=null,r=t){let s=wq(t,e),i=s&&xq(r,e);return i?s.map(vC).concat({type:e,attrs:n}).concat(i.map(vC)):null}function vC(t){return{type:t,attrs:null}}function wq(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return n.canReplaceWith(r,s,o)?i:null}function xq(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:o}function kq(t,e,n){let r=W.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=W.from(n[o].type.create(n[o].attrs,r))}let s=e.start,i=e.end;t.step(new $t(s,i,s,i,new ne(r,0,0),n.length,!0))}function Sq(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,l)&&Cq(t.doc,t.mapping.slice(i).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!g?c=!1:!p&&g&&(c=!0)}c===!1&&nj(t,o,a,i),tx(t,t.mapping.slice(i).map(a,1),r,void 0,c===null);let u=t.mapping.slice(i),d=u.map(a,1),f=u.map(a+o.nodeSize,1);return t.step(new $t(d,f,d+1,f-1,new ne(W.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&tj(t,o,a,i),!1}})}function tj(t,e,n,r){e.forEach((s,i)=>{if(s.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(s.text);){let l=t.mapping.slice(r).map(n+1+i+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function nj(t,e,n,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text(` 446`))}})}function Cq(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function Eq(t,e,n,r,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let o=n.create(r,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,o);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new $t(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ne(W.from(o),0,0),1,!0))}function ml(t,e,n=1,r){let s=t.resolve(e),i=s.depth-n,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,u=n-2;c>i;c--,u--){let d=s.node(c),f=s.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),g=r&&r[u+1];g&&(p=p.replaceChild(0,g.type.create(g.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let a=s.indexAfter(i),l=r&&r[0];return s.node(i).canReplaceWith(a,a,l?l.type:s.node(i+1).type)}function Aq(t,e,n=1,r){let s=t.doc.resolve(e),i=W.empty,o=W.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){i=W.from(s.node(a).copy(i));let u=r&&r[c];o=W.from(u?u.type.create(u.attrs,o):s.node(a).copy(o))}t.step(new Rt(e,e,new ne(i.append(o),n,n),!0))}function oo(t,e){let n=t.resolve(e),r=n.index();return rj(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Tq(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),o=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function rj(t,e){return!!(t&&e&&!t.isLeaf&&Tq(t,e))}function Em(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;s--){let i,o,a=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(s+1),a++,o=r.node(s).maybeChild(a)):(i=r.node(s).maybeChild(a-1),o=r.node(s+1)),i&&!i.isTextblock&&rj(i,o)&&r.node(s).canReplace(a,a+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function _q(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-n),o=i.node().type;if(s&&o.inlineContent){let u=o.whitespace=="pre",d=!!o.contentMatch.matchType(s);u&&!d?r=!1:!u&&d&&(r=!0)}let a=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);
vendor: 10,609 bytes, line 446
446nj(t,u.node(),u.before(),a)}o.inlineContent&&tx(t,e+n-1,o,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new Rt(c,l.map(e+n,-1),ne.empty,!0)),r===!0){let u=t.doc.resolve(c);tj(t,u.node(),u.before(),t.steps.length)}return t}function Nq(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function sj(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),u=!1;if(i==1)u=c.canReplace(l,l,s);else{let d=c.contentMatchAt(l).findWrapping(s.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function Am(t,e,n=e,r=ne.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),i=t.resolve(n);return ij(s,i,r)?new Rt(e,n,r):new Iq(s,i,r).fit()}function ij(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Iq{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=W.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=W.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,o=r.depth,a=s.depth;for(;o&&a&&i.childCount==1;)i=i.firstChild.content,o--,a--;let l=new ne(i,o,a);return e>-1?new $t(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Rt(r.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=Yg(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(o?c.matchType(o.type)||(d=c.fillBefore(W.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:d};if(n==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=Yg(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new ne(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=Yg(e,n);if(s.childCount<=1&&n>0){let i=e.size-n<=n+s.size;this.unplaced=new ne(Dc(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ne(Dc(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[n];if(s){for(let m=0;m<s.childCount;m++)u.push(s.child(m));d=d.matchFragment(s)}let p=a.size+e-(o.content.size-o.openEnd);for(;c<a.childCount;){let m=a.child(c),y=d.matchType(m.type);if(!y)break;c++,(c>1||l==0||m.content.size)&&(d=y,u.push(oj(m.mark(f.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let g=c==a.childCount;g||(p=-1),this.placed=Lc(this.placed,n,W.from(u)),this.frontier[n].match=d,g&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=a;m<p;m++){let b=y.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),y=b.content}this.unplaced=g?e==0?ne.empty:new ne(Dc(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new ne(Dc(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Jg(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=Jg(e,n,s,r,i);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Jg(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:o,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Lc(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=Lc(this.placed,this.depth,W.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(W.empty,!0);n.childCount&&(this.placed=Lc(this.placed,this.frontier.length,n))}}function Dc(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Dc(t.firstChild.content,e-1,n)))}function Lc(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Lc(t.lastChild.content,e-1,n)))}function Yg(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function oj(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,oj(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(W.empty,!0)))),t.copy(r)}function Jg(t,e,n,r,s){let i=t.node(e),o=s?t.indexAfter(e):t.index(e);if(o==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,o);return a&&!Oq(n,i.content,o)?a:null}function Oq(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Pq(t){return t.spec.defining||t.spec.definingForContent}function jq(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),i=t.doc.resolve(n);if(ij(s,i,r))return t.step(new Rt(e,n,r));let o=lj(s,i);o[o.length-1]==0&&o.pop();let a=-(s.depth+1);o.unshift(a);for(let f=s.depth,p=s.pos-1;f>0;f--,p--){let g=s.node(f).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;o.indexOf(f)>-1?a=f:s.before(f)==p&&o.splice(1,0,-f)}let l=o.indexOf(a),c=[],u=r.openStart;for(let f=r.content,p=0;;p++){let g=f.firstChild;if(c.push(g),p==r.openStart)break;f=g.content}for(let f=u-1;f>=0;f--){let p=c[f],g=Pq(p.type);if(g&&!p.sameMarkup(s.node(Math.abs(a)-1)))u=f;else if(g||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+u+1)%(r.openStart+1),g=c[p];if(g)for(let m=0;m<o.length;m++){let y=o[(m+l)%o.length],b=!0;y<0&&(b=!1,y=-y);let w=s.node(y-1),x=s.index(y-1);if(w.canReplaceWith(x,x,g.type,g.marks))return t.replace(s.before(y),b?i.after(y):n,new ne(aj(r.content,0,r.openStart,p),p,r.openEnd))}}let d=t.steps.length;for(let f=o.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let p=o[f];p<0||(e=s.before(p),n=i.after(p))}}function aj(t,e,n,r,s){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(aj(i.content,e+1,n,r,i)))}if(e>r){let i=s.contentMatchAt(0),o=i.fillBefore(t).append(t);t=o.append(i.matchFragment(o).fillBefore(W.empty,!0))}return t}function Mq(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=Nq(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new ne(W.from(r),0,0))}function Rq(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n),i=lj(r,s);for(let o=0;o<i.length;o++){let a=i[o],l=o==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),s.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),s.indexAfter(a-1))))return t.delete(r.before(a),s.after(a))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&s.end(o)-n!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function lj(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&n.push(s)}return n}class gl extends tn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ct.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return Ct.fromReplace(e,this.pos,this.pos+1,new ne(W.from(s),0,n.isLeaf?0:1))}getMap(){return In.empty}invert(e){return new gl(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gl(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new gl(n.pos,n.attr,n.value)}}tn.jsonID("attr",gl);class Gu extends tn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Ct.ok(r)}getMap(){return In.empty}invert(e){return new Gu(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gu(n.attr,n.value)}}tn.jsonID("docAttr",Gu);
vendor: 4,175 bytes, line 446
446let Bl=class extends Error{};Bl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Bl.prototype=Object.create(Error.prototype);Bl.prototype.constructor=Bl;Bl.prototype.name="TransformError";class cj{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new qu}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Bl(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ne.empty){let s=Am(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new ne(W.from(r),0,0))}delete(e,n){return this.replace(e,n,ne.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return jq(this,e,n,r),this}replaceRangeWith(e,n,r){return Mq(this,e,n,r),this}deleteRange(e,n){return Rq(this,e,n),this}lift(e,n){return bq(this,e,n),this}join(e,n=1){return _q(this,e,n),this}wrap(e,n){return kq(this,e,n),this}setBlockType(e,n=e,r,s=null){return Sq(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return Eq(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new gl(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gu(e,n)),this}addNodeMark(e,n){return this.step(new Ai(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ze)n.isInSet(r.marks)&&this.step(new sa(e,n));else{let s=r.marks,i,o=[];for(;i=n.isInSet(s);)o.push(new sa(e,i)),s=i.removeFromSet(s);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return Aq(this,e,n,r),this}addMark(e,n,r){return gq(this,e,n,r),this}removeMark(e,n,r){return yq(this,e,n,r),this}clearIncompatible(e,n,r){return tx(this,e,n,r),this}}const Qg=Object.create(null);class Pe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Dq(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=ne.empty){let r=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:c}=o[a],u=e.mapping.slice(i);e.replaceRange(u.map(l.pos),u.map(c.pos),a?ne.empty:n),a==0&&xC(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:a}=s[i],l=e.mapping.slice(r),c=l.map(o.pos),u=l.map(a.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),xC(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new Se(e):La(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let o=n<0?La(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):La(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Jn(e.node(0))}static atStart(e){return La(e,e,0,0,1)||new Jn(e)}static atEnd(e){return La(e,e,e.content.size,e.childCount,-1)||new Jn(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Qg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Qg)throw new RangeError("Duplicate use of selection JSON ID "+e);return Qg[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Se.between(this.$anchor,this.$head).getBookmark()}}Pe.prototype.visible=!0;class Dq{constructor(e,n){this.$from=e,this.$to=n}}let bC=!1;function wC(t){!bC&&!t.parent.inlineContent&&(bC=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Se extends Pe{constructor(e,n=e){wC(e),wC(n),super(e,n)}
vendor: 6,253 bytes, line 446
446get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Pe.near(r);let s=e.resolve(n.map(this.anchor));return new Se(s.parent.inlineContent?s:r,r)}replace(e,n=ne.empty){if(super.replace(e,n),n==ne.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Se&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Tm(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Se(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=Pe.findFrom(n,r,!0)||Pe.findFrom(n,-r,!0);if(i)n=i.$head;else return Pe.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(Pe.findFrom(e,-r,!0)||Pe.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Se(e,n)}}Pe.jsonID("text",Se);class Tm{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Tm(e.map(this.anchor),e.map(this.head))}resolve(e){return Se.between(e.resolve(this.anchor),e.resolve(this.head))}}class we extends Pe{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?Pe.near(i):new we(i)}content(){return new ne(W.from(this.node),0,0)}eq(e){return e instanceof we&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new rx(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new we(e.resolve(n.anchor))}static create(e,n){return new we(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}we.prototype.visible=!1;Pe.jsonID("node",we);class rx{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Tm(r,r):new rx(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&we.isSelectable(r)?new we(n):Pe.near(n)}}class Jn extends Pe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=ne.empty){if(n==ne.empty){e.delete(0,e.doc.content.size);let r=Pe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Jn(e)}map(e){return new Jn(e)}eq(e){return e instanceof Jn}getBookmark(){return Lq}}Pe.jsonID("all",Jn);const Lq={map(){return this},resolve(t){return new Jn(t)}};function La(t,e,n,r,s,i=!1){if(e.inlineContent)return Se.create(t,n);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let a=e.child(o);if(a.isAtom){if(!i&&we.isSelectable(a))return we.create(t,n-(s<0?a.nodeSize:0))}else{let l=La(t,a,n+s,s<0?a.childCount:0,s,i);if(l)return l}n+=a.nodeSize*s}return null}function xC(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof Rt||s instanceof $t))return;let i=t.mapping.maps[r],o;i.forEach((a,l,c,u)=>{o==null&&(o=u)}),t.setSelection(Pe.near(t.doc.resolve(o),n))}const kC=1,oh=2,SC=4;class $q extends cj{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|kC)&~oh,this.storedMarks=null,this}get selectionSet(){return(this.updated&kC)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=oh,this}ensureMarks(e){return Ze.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&oh)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~oh,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ze.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(n);i=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Pe.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=SC,this}get scrolledIntoView(){return(this.updated&SC)>0}}function CC(t,e){return!e||!t?t:t.bind(e)}class $c{constructor(e,n,r){this.name=e,this.init=CC(n.init,r),this.apply=CC(n.apply,r)}}const Fq=[new $c("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new $c("selection",{init(t,e){return t.selection||Pe.atStart(e.doc)},apply(t){return t.selection}}),new $c("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new $c("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Xg{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Fq.slice(),n&&n.forEac
vendor: 14,446 bytes, lines 446-447
446h(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new $c(r.key,r.spec.state,r))})}}class nl{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=s?s[o].n:0,c=s?s[o].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!s){s=[];for(let d=0;d<this.config.plugins.length;d++)s.push(d<o?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}s&&(s[o]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new nl(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new $q(this)}static create(e){let n=new Xg(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new nl(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new Xg(this.schema,e.plugins),r=n.fields,s=new nl(n);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Xg(e.schema,e.plugins),i=new nl(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=Fi.fromJSON(e.schema,n.doc);else if(o.name=="selection")i.selection=Pe.fromJSON(i.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[o.name]=c.fromJSON.call(l,e,n[a],i);return}}i[o.name]=o.init(e,i)}}),i}}function uj(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=uj(s,e,{})),n[r]=s}return n}class ct{constructor(e){this.spec=e,this.props={},e.props&&uj(e.props,this,this.props),this.key=e.key?e.key.key:dj("plugin")}getState(e){return e[this.key]}}const ey=Object.create(null);function dj(t){return t in ey?t+"$"+ ++ey[t]:(ey[t]=0,t+"$")}class Ot{constructor(e="key"){this.key=dj(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const zq=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function hj(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Uq=(t,e,n)=>{let r=hj(t,n);if(!r)return!1;let s=sx(r);if(!s){let o=r.blockRange(),a=o&&lc(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let i=s.nodeBefore;if(gj(t,s,e,-1))return!0;if(r.parent.content.size==0&&(Vl(i,"end")||we.isSelectable(i)))for(let o=r.depth;;o--){let a=Am(t.doc,r.before(o),r.after(o),ne.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(Vl(i,"end")?Pe.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):we.create(l.doc,s.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},Bq=(t,e,n)=>{let r=hj(t,n);if(!r)return!1;let s=sx(r);return s?fj(t,s,e):!1},Vq=(t,e,n)=>{let r=pj(t,n);if(!r)return!1;let s=ix(r);return s?fj(t,s,e):!1};function fj(t,e,n){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let u=s.lastChild;if(!u)return!1;s=u}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=Am(t.doc,i,l,ne.empty);if(!c||c.from!=i||c instanceof Rt&&c.slice.size>=l-i)return!1;if(n){let u=t.tr.step(c);u.setSelection(Se.create(u.doc,i)),n(u.scrollIntoView())}return!0}function Vl(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Hq=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=sx(r)}let o=i&&i.nodeBefore;return!o||!we.isSelectable(o)?!1:(e&&e(t.tr.setSelection(we.create(t.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function sx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function pj(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Wq=(t,e,n)=>{let r=pj(t,n);if(!r)return!1;let s=ix(r);if(!s)return!1;let i=s.nodeAfter;if(gj(t,s,e,1))return!0;if(r.parent.content.size==0&&(Vl(i,"start")||we.isSelectable(i))){let o=Am(t.doc,r.before(),r.after(),ne.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection(Vl(i,"start")?Pe.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):we.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},qq=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=ix(r)}let o=i&&i.nodeAfter;return!o||!we.isSelectable(o)?!1:(e&&e(t.tr.setSelection(we.create(t.doc,i.pos)).scrollIntoView()),!0)};function ix(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Gq=(t,e)=>{let n=t.selection,r=n instanceof we,s;if(r){if(n.node.isTextblock||!oo(t.doc,n.from))return!1;s=n.from}else if(s=Em(t.doc,n.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);r&&i.setSelection(we.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},Kq=(t,e)=>{let n=t.selection,r;if(n instanceof we){if(n.node.isTextblock||!oo(t.doc,n.to))return!1;r=n.to}else if(r=Em(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Zq=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),i=s&&lc(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},Yq=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(` 447`).scrollIntoView()),!0)};function mj(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Jq=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),o=mj(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(Pe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Qq=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof Jn||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=mj(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,a=t.tr.insert(o,i.createAndFill());a.setSelection(Se.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},Xq=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(ml(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&lc(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)},eG=(t,e)=>{let{$from:n,to:r}=t.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),e&&e(t.tr.setSelection(we.create(t.doc,s))),!0)};function tG(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||oo(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function gj(t,e,n,r){let s=e.nodeBefore,i=e.nodeAfter,o,a,l=s.type.spec.isolating||i.type.spec.isolating;if(!l&&tG(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(a=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,g=W.empty;for(let b=o.length-1;b>=0;b--)g=W.from(o[b].create(null,g));g=W.from(s.copy(g));let m=t.tr.step(new $t(e.pos-1,p,e.pos,p,new ne(g,1,0),o.length,!0)),y=m.doc.resolve(p+2*o.length);y.nodeAfter&&y.nodeAfter.type==s.type&&oo(m.doc,y.pos)&&m.join(y.pos),n(m.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:Pe.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),f=d&&lc(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(c&&Vl(i,"start",!0)&&Vl(s,"end")){let p=s,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let m=i,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let b=W.empty;for(let x=g.length-1;x>=0;x--)b=W.from(g[x].copy(b));let w=t.tr.step(new $t(e.pos-g.length,e.pos+i.nodeSize,e.pos+y,e.pos+i.nodeSize-y,new ne(b,g.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function yj(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(e.tr.setSelection(Se.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const nG=yj(-1),rG=yj(1);function sG(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i),a=o&&nx(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function EC(t,e=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(o,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let u=n.doc.resolve(c),d=u.index();s=u.parent.canReplaceWith(d,d+1,t)}})}if(!s)return!1;if(r){let i=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function iG(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i);if(!o)return!1;let a=r?n.tr:null;return oG(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function oG(t,e,n,r=null){let s=!1,i=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);i=new qf(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new qf(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let a=nx(i,n,r,e);return a?(t&&aG(t,e,a,s,n),!0):!1}function aG(t,e,n,r,s){let i=W.empty;for(let u=n.length-1;u>=0;u--)i=W.from(n[u].type.create(n[u].attrs,i));t.step(new $t(e.start-(r?2:0),e.end,e.start,e.end,new ne(i,0,0),n.length,!0));let o=0;for(let u=0;u<n.length;u++)n[u].type==s&&(o=u+1);let a=n.length-o,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&ml(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function lG(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?cG(e,n,t,i):uG(e,n,i):!0:!1}}function cG(t,e,n,r){let s=t.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new $t(i-1,o,i,o,new ne(W.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new qf(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const a=lc(r);if(a==null)return!1;s.lift(r,a);let l=s.doc.resolve(s.mapping.map(i,-1)-1);return oo(s.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&s.join(l.pos),e(s.scrollIntoView()),!0}function uG(t,e,n){let r=t.tr,s=n.parent;for(let p=n.end,g=n.endIndex-1,m=n.startIndex;g>m;g--)p-=s.child(g).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,o.content.append(l?W.empty:W.from(s))))return!1;let d=i.pos,f=d+o.nodeSize;return r.step(new $t(d-(a?1:0),f+(l?1:0),d+1,f-1,new ne((a?W.empty:W.from(s.copy(W.empty))).append(l?W.empty:W.from(s.copy(W.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function dG(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let a=i.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=W.from(c?t.create():null),d=new ne(W.from(t.create(null,W.from(a.type.create(null,u)))),c?3:1,0),f=i.start,p=i.end;n(e.tr.step(new $t(f-(c?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}const Bt=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Hl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let v0=null;const Ss=function(t,e,n){let r=v0||(v0=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},hG=function(){v0=null},ia=function(t,e,n,r){return n&&(AC(t,e,n,r,-1)||AC(t,e,n,r,1))},fG=/^(img|br|input|textarea|hr)$/i;function AC(t,e,n,r,s){for(var i;;){if(t==n&&e==r)return!0;
vendor: 5,457 bytes, line 447
447if(e==(s<0?0:Kn(t))){let o=t.parentNode;if(!o||o.nodeType!=1||bd(t)||fG.test(t.nodeName)||t.contentEditable=="false")return!1;e=Bt(t)+(s<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(s<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=o,e=s<0?Kn(t):0}else return!1}}function Kn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function pG(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Kn(t)}else if(t.parentNode&&!bd(t))e=Bt(t),t=t.parentNode;else return null}}function mG(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!bd(t))e=Bt(t)+1,t=t.parentNode;else return null}}function gG(t,e,n){for(let r=e==0,s=e==Kn(t);r||s;){if(t==n)return!0;let i=Bt(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,s=s&&i==Kn(t)}}function bd(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const _m=function(t){return t.focusNode&&ia(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function xo(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function yG(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function vG(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Kn(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Kn(r.startContainer),r.startOffset)}}}const rs=typeof navigator<"u"?navigator:null,TC=typeof document<"u"?document:null,ao=rs&&rs.userAgent||"",b0=/Edge\/(\d+)/.exec(ao),vj=/MSIE \d/.exec(ao),w0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ao),Tn=!!(vj||w0||b0),Ui=vj?document.documentMode:w0?+w0[1]:b0?+b0[1]:0,Qn=!Tn&&/gecko\/(\d+)/i.test(ao);Qn&&+(/Firefox\/(\d+)/.exec(ao)||[0,0])[1];const x0=!Tn&&/Chrome\/(\d+)/.exec(ao),Dt=!!x0,bj=x0?+x0[1]:0,en=!Tn&&!!rs&&/Apple Computer/.test(rs.vendor),Wl=en&&(/Mobile\/\w+/.test(ao)||!!rs&&rs.maxTouchPoints>2),Hn=Wl||(rs?/Mac/.test(rs.platform):!1),wj=rs?/Win/.test(rs.platform):!1,_s=/Android \d/.test(ao),wd=!!TC&&"webkitFontSmoothing"in TC.documentElement.style,bG=wd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function wG(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function ms(t,e){return typeof t=="number"?t:t[e]}function xG(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function _C(t,e,n){let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=Hl(o);continue}let a=o,l=a==i.body,c=l?wG(i):xG(a),u=0,d=0;if(e.top<c.top+ms(r,"top")?d=-(c.top-e.top+ms(s,"top")):e.bottom>c.bottom-ms(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+ms(s,"top")-c.top:e.bottom-c.bottom+ms(s,"bottom")),e.left<c.left+ms(r,"left")?u=-(c.left-e.left+ms(s,"left")):e.right>c.right-ms(r,"right")&&(u=e.right-c.right+ms(s,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let p=a.scrollLeft,g=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let m=a.scrollLeft-p,y=a.scrollTop-g;e={left:e.left-m,top:e.top-y,right:e.right-m,bottom:e.bottom-y}}let f=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:Hl(o)}}function kG(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(i,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,s=l.top;break}}return{refDOM:r,refTop:s,stack:xj(t.dom)}}function xj(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Hl(r));return e}function SG({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;kj(n,r==0?0:r-e)}function kj(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:i}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Oa=null;function CG(t){if(t.setActive)return t.setActive();if(Oa)return t.focus(Oa);let e=xj(t);t.focus(Oa==null?{get preventScroll(){return Oa={preventScroll:!0},!0}}:void 0),Oa||(Oa=!1,kj(e,0))}function Sj(t,e){let n,r=2e8,s,i=0,o=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Ss(u).getClientRects();else continue;for(let p=0;p<f.length;p++){let g=f[p];if(g.top<=o&&g.bottom>=a){o=Math.max(g.bottom,o),a=Math.min(g.top,a);let m=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(m<r){n=u,r=m,s=m&&n.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,u.nodeType==1&&m&&(i=d+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=u,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!n&&(e.left>=g.right&&e.top>
vendor: 12,622 bytes, lines 447-448
447=g.top||e.left>=g.left&&e.top>=g.bottom)&&(i=d+1)}}return!n&&l&&(n=l,s=c,r=0),n&&n.nodeType==3?EG(n,s):!n||r&&n.nodeType==1?{node:t,offset:i}:Sj(n,s)}function EG(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let o=ni(r,1);if(o.top!=o.bottom&&ox(e,o)){s={node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function ox(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function AG(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function TG(t,e,n){let{node:r,offset:s}=Sj(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,s,i)}function _G(t,e,n,r){let s=-1;for(let i=e,o=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?s=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(s=a.posAfter),o=!0),!a.contentDOM&&s<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function Cj(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let o=t.childNodes[i];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(ox(e,c))return Cj(o,e,c)}}if((i=(i+1)%r)==s)break}return t}function NG(t,e){let n=t.dom.ownerDocument,r,s=0,i=vG(n,e.left,e.top);i&&({node:r,offset:s}=i);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=t.dom.getBoundingClientRect();if(!ox(e,c)||(o=Cj(t.dom,e,c),!o))return null}if(en)for(let c=o;r&&c;c=Hl(c))c.draggable&&(r=void 0);if(o=AG(o,e),r){if(Qn&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let u=r.childNodes[s],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&s++}let c;wd&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(a=_G(t,r,s,e))}a==null&&(a=TG(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function NC(t){return t.top<t.bottom||t.left<t.right}function ni(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(NC(r))return r}return Array.prototype.find.call(n,NC)||t.getBoundingClientRect()}const IG=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ej(t,e,n){let{node:r,offset:s,atom:i}=t.docView.domFromPos(e,n<0?-1:1),o=wd||Qn;if(r.nodeType==3)if(o&&(IG.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let l=ni(Ss(r,s,s),n);if(Qn&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=ni(Ss(r,s-1,s-1),-1);if(c.top==l.top){let u=ni(Ss(r,s,s+1),-1);if(u.top!=l.top)return Ac(u,u.left<c.left)}}return l}else{let l=s,c=s,u=n<0?1:-1;return n<0&&!s?(c++,u=-1):n>=0&&s==r.nodeValue.length?(l--,u=1):n<0?l--:c++,Ac(ni(Ss(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==Kn(r))){let l=r.childNodes[s-1];if(l.nodeType==1)return ty(l.getBoundingClientRect(),!1)}if(i==null&&s<Kn(r)){let l=r.childNodes[s];if(l.nodeType==1)return ty(l.getBoundingClientRect(),!0)}return ty(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==Kn(r))){let l=r.childNodes[s-1],c=l.nodeType==3?Ss(l,Kn(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Ac(ni(c,1),!1)}if(i==null&&s<Kn(r)){let l=r.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Ss(l,0,o?0:1):l.nodeType==1?l:null:null;if(c)return Ac(ni(c,-1),!0)}return Ac(ni(r.nodeType==3?Ss(r):r,-n),n>=0)}function Ac(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function ty(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Aj(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function OG(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return Aj(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let o=Ej(t,s.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Ss(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const PG=/[\u0590-\u08ac]/;function jG(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,a=t.domSelection();return a?!PG.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:o:Aj(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:g,focusOffset:m}=t.domSelectionRange(),y=g&&!p.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return f!=null&&(a.caretBidiLevel=f),y}):r.pos==r.start()||r.pos==r.end()}let IC=null,OC=null,PC=!1;function MG(t,e,n){return IC==e&&OC==n?PC:(IC=e,OC=n,PC=n=="up"||n=="down"?OG(t,e,n):jG(t,e,n))}const Xn=0,jC=1,Ao=2,ss=3;class xd{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=Xn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>Bt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!n||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let o=0;o<s.children.length;o++){let a=s.children[o];if(a.size){s=a;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],a=i+o.size;if(a>e||o instanceof _j){s=e-i;break}i=a}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Tj&&i.side>=0;r--);if(n<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&n&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Bt(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Bt(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,a=0;;a++){let l=this.children[a],c=o+l.size;if(s==-1&&e<=c){let u=o+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=o;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){s=Bt(f.dom)+1;break}e-=f.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=Bt(d.dom);break}n+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,s=!1){let i=Math.min(e,n),o=Math.max(e,n);for(let p=0,g=0;p<this.children.length;p++){let m=this.children[p],y=g+m.size;if(i>g&&o<y)return m.setSelection(e-g-m.border,n-g-m.border,r,s);g=y}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Qn||en)&&e==n){let{node:p,offset:g}=a;if(p.nodeType==3){if(d=!!(g&&p.nodeValue[g-1]==` 448`),d&&g==p.nodeValue.length)for(let m=p,y;m;m=m.parentNode){if(y=m.nextSibling){y.nodeName=="BR"&&(a=l={node:y.parentNode,offset:Bt(y)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=p.childNodes[g-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Qn&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(s=!0)}if(!(s||d&&en)&&ia(a.node,a.offset,u.anchorNode,u.anchorOffset)&&ia(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||e==n)&&!(d&&Qn)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let g=a;a=l,l=g}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+i.border,l=o-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?Ao:jC,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ss:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Ao:ss}r=o}this.dirty=Ao}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Ao:jC;n.dirty<r&&(n.dirty=r)}
vendor: 3,737 bytes, line 448
448}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Tj extends xd{constructor(e,n,r,s){let i,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==Xn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class RG extends xd{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class oa extends xd{constructor(e,n,r,s,i){super(e,[],r,s),this.mark=n,this.spec=i}static create(e,n,r,s){let i=s.nodeViews[n.type.name],o=i&&i(n,s,r);return(!o||!o.dom)&&(o=pa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new oa(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ss||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ss&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Xn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Xn}}slice(e,n,r){let s=oa.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;n<o&&(i=S0(i,n,o,r)),e>0&&(i=S0(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Bi extends xd{constructor(e,n,r,s,i,o,a,l,c){super(e,[],i,o),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=a}static create(e,n,r,s,i,o){let a=i.nodeViews[n.type.name],l,c=a&&a(n,i,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,s),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=pa.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Oj(u,r,n),c?l=new DG(e,n,r,s,u,d||null,f,c,i,o+1):n.isText?new Nm(e,n,r,s,u,f,i):new Bi(e,n,r,s,u,d||null,f,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>W.empty)}return e}matchesNode(e,n,r){return this.dirty==Xn&&e.eq(this.node)&&Kf(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}
vendor: 21,878 bytes, line 448
448updateChildren(e,n){let r=this.node.inlineContent,s=n,i=e.composing?this.localCompositionInfo(e,n):null,o=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new $G(this,o&&o.node,e);UG(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?Ze.none:this.node.child(u).marks,r,e),l.placeWidget(c,e,s)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,e);let p;l.findNodeMatch(c,u,d,f)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(p=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,d,p,e)||l.updateNextNode(c,u,d,e,f,s)||l.addNode(c,u,d,e,s),s+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ao)&&(o&&this.protectLocalComposition(e,o),Nj(this.contentDOM,this.children,e),Wl&&BG(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof Se)||r<n||s>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,a=VG(this.node.content,o,r-n,s-n);return a<0?null:{node:i,pos:a,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new RG(this,i,n,s);e.input.compositionNodes.push(o),this.children=S0(this.children,r,r+s.length,e,o)}update(e,n,r,s){return this.dirty==ss||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=Xn}updateOuterDeco(e){if(Kf(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Ij(this.dom,this.nodeDOM,k0(this.outerDeco,this.node,n),k0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function MC(t,e,n,r,s){Oj(r,e,t);let i=new Bi(void 0,t,e,n,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class Nm extends Bi{constructor(e,n,r,s,i,o,a){super(e,n,r,s,i,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,s){return this.dirty==ss||this.dirty!=Xn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Xn||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=Xn,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let s=this.node.cut(e,n),i=document.createTextNode(s.text);return new Nm(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ss)}get domAtom(){return!1}isText(e){return this.node.text==e}}class _j extends xd{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Xn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class DG extends Bi{constructor(e,n,r,s,i,o,a,l,c,u){super(e,n,r,s,i,o,a,c,u),this.spec=l}update(e,n,r,s){if(this.dirty==ss)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Nj(t,e,n){let r=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let o=e[i],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=RC(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(a,r);if(o instanceof oa){let l=r?r.previousSibling:t.lastChild;Nj(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=RC(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const lu=function(t){t&&(this.nodeName=t)};lu.prototype=Object.create(null);const To=[new lu];function k0(t,e,n){if(t.length==0)return To;let r=n?To[0]:new lu,s=[r];for(let i=0;i<t.length;i++){let o=t[i].type.attrs;if(o){o.nodeName&&s.push(r=new lu(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&s.length==1&&s.push(r=new lu(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return s}function Ij(t,e,n,r){if(n==To&&r==To)return e;let s=e;for(let i=0;i<r.length;i++){let o=r[i],a=n[i];if(i){let l;a&&a.nodeName==o.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=To[0]),s=l}LG(s,a||To[0],o)}return s}function LG(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function Oj(t,e,n){return Ij(t,t,To,k0(e,n,t.nodeType!=1))}function Kf(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function RC(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class $G{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=FG(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let s=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;s<o&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=Xn,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=oa.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))i=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,s,i){let o=this.top.children[s];return o.dirty==ss&&o.dom==o.contentDOM&&(o.dirty=Ao),o.update(e,n,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,i,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Bi){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=ss&&Kf(n,l.outerDeco));if(!f&&l.update(e,n,r,s))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,s,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Ao,d.updateChildren(s,o+1),d.dirty=Xn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,i,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Kf(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let a=Bi.create(this.top,n,r,s,i,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,s,i){let o=Bi.create(this.top,e,n,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new Tj(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof oa;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Nm)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((en||Dt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new _j(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function FG(t,e){let n=e,r=n.children.length,s=t.childCount,i=new Map,o=[];e:for(;s>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof oa)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,i.set(a,s),o.push(a)}}return{index:s,matched:i,matches:o.reverse()}}function zG(t,e){return t.type.side-e.type.side}function UG(t,e,n,r){let s=e.locals(t),i=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,s,e.forChild(i,u),c),i+=u.nodeSize}return}let o=0,a=[],l=null;for(let c=0;;){let u,d;for(;o<s.length&&s[o].to==i;){let y=s[o++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(zG);for(let y=0;y<d.length;y++)n(d[y],c,!!l)}else n(u,c,!!l);let f,p;if(l)p=-1,f=l,l=null;else if(c<t.childCount)p=c,f=t.child(c++);else break;for(let y=0;y<a.length;y++)a[y].to<=i&&a.splice(y--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)a.push(s[o++]);let g=i+f.nodeSize;if(f.isText){let y=g;o<s.length&&s[o].from<y&&(y=s[o].from);for(let b=0;b<a.length;b++)a[b].to<y&&(y=a[b].to);y<g&&(l=f.cut(y-i),f=f.cut(0,y-i),g=y,p=-1)}else for(;o<s.length&&s[o].to<g;)o++;let m=f.isInline&&!f.isLeaf?a.filter(y=>!y.inline):a.slice();r(f,m,e.forChild(i,f),p),i=g}}function BG(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function VG(t,e,n,r){for(let s=0,i=0;s<t.childCount&&i<=r;){let o=t.child(s++),a=i;if(i+=o.nodeSize,!o.isText)continue;let l=o.text;for(;s<t.childCount;){let c=t.child(s++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function S0(t,e,n,r,s){let i=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],c=a,u=a+=l.size;c>=n||u<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),s&&(i.push(s),s=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function ax(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),i=s&&s.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(_m(n)){for(l=o;s&&!s.node;)s=s.parent;let d=s.node;if(s&&d.isAtom&&we.isSelectable(d)&&s.parent&&!(d.isInline&&gG(n.focusNode,n.focusOffset,s.dom))){let f=s.posBefore;c=new we(o==f?a:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=o,f=o;for(let p=0;p<n.rangeCount;p++){let g=n.getRangeAt(p);d=Math.min(d,t.docView.posFromDOM(g.startContainer,g.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(d<0)return null;[l,o]=f==t.state.selection.anchor?[f,d]:[d,f],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;c=lx(t,u,a,d)}return c}function Pj(t){return t.editable?t.hasFocus():Mj(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Os(t,e=!1){let n=t.state.selection;if(jj(t,n),!!Pj(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Dt){let r=t.domSelectionRange(),s=t.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&ia(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)WG(t);else{let{anchor:r,head:s}=n,i,o;DC&&!(n instanceof Se)&&(n.$from.parent.inlineContent||(i=LC(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=LC(t,n.to))),t.docView.setSelection(r,s,t,e),DC&&(i&&$C(i),o&&$C(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&HG(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const DC=en||Dt&&bj<63;function LC(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(en&&s&&s.contentEditable=="false")return ny(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return ny(s);if(i)return ny(i)}}function ny(t){return t.contentEditable="true",en&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $C(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function HG(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Pj(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function WG(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Bt(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Tn&&Ui<=11&&(n.disabled=!0,n.disabled=!1)}function jj(t,e){if(e instanceof we){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(FC(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else FC(t)}function FC(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function lx(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Se.between(e,n,r)}function zC(t){return t.editable&&!t.hasFocus()?!1:Mj(t)}function Mj(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function qG(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ia(e.node,e.offset,n.anchorNode,n.anchorOffset)}function C0(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&Pe.findFrom(i,e)}function oi(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function UC(t,e,n){let r=t.state.selection;if(r instanceof Se)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return oi(t,new Se(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=C0(t.state,e);return s&&s instanceof we?oi(t,s):!1}else if(!(Hn&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let a=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?we.isSelectable(i)?oi(t,new we(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):wd?oi(t,new Se(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof we&&r.node.isInline)return oi(t,new Se(e>0?r.$to:r.$from));{let s=C0(t.state,e);return s?oi(t,s):!1}}}function Zf(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function cu(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Pa(t,e){return e<0?GG(t):KG(t)}function GG(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,i,o=!1;for(Qn&&n.nodeType==1&&r<Zf(n)&&cu(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(cu(a,-1))s=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Rj(n))break;{let a=n.previousSibling;for(;a&&cu(a,-1);)s=n.parentNode,i=Bt(a),a=a.previousSibling;if(a)n=a,r=Zf(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?E0(t,n,r):s&&E0(t,s,i)}function KG(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=Zf(n),i,o;for(;;)if(r<s){if(n.nodeType!=1)break;let a=n.childNodes[r];if(cu(a,1))i=n,o=++r;else break}else{if(Rj(n))break;{let a=n.nextSibling;for(;a&&cu(a,1);)i=a.parentNode,o=Bt(a)+1,a=a.nextSibling;if(a)n=a,r=0,s=Zf(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&E0(t,i,o)}function Rj(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function ZG(t,e){for(;t&&e==t.childNodes.length&&!bd(t);)e=Bt(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function YG(t,e){for(;t&&!e&&!bd(t);)e=Bt(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function E0(t,e,n){if(e.nodeType!=3){let i,o;(o=ZG(e,n))?(e=o,n=0):(i=YG(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(_m(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&Os(t)},50)}function BC(t,e){let n=t.state.doc.resolve(e);if(!(Dt||wj)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function VC(t,e,n){let r=t.state.selection;if(r instanceof Se&&!r.empty||n.indexOf("s")>-1||Hn&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=C0(t.state,e);if(o&&o instanceof we)return oi(t,o)}if(!s.parent.inlineContent){let o=e<0?s:i,a=r instanceof Jn?Pe.near(o,e):Pe.findFrom(o,e);return a?oi(t,a):!1}return!1}function HC(t,e){if(!(t.state.selection instanceof Se))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=t.state.tr;return e<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),t.dispatch(o),!0}return!1}function WC(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function JG(t){if(!en||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;WC(t,r,"true"),setTimeout(()=>WC(t,r,"false"),20)}return!1}function QG(t){let e="";
vendor: 4,151 bytes, lines 448-451
448return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function XG(t,e){let n=e.keyCode,r=QG(e);if(n==8||Hn&&n==72&&r=="c")return HC(t,-1)||Pa(t,-1);if(n==46&&!e.shiftKey||Hn&&n==68&&r=="c")return HC(t,1)||Pa(t,1);if(n==13||n==27)return!0;if(n==37||Hn&&n==66&&r=="c"){let s=n==37?BC(t,t.state.selection.from)=="ltr"?-1:1:-1;return UC(t,s,r)||Pa(t,s)}else if(n==39||Hn&&n==70&&r=="c"){let s=n==39?BC(t,t.state.selection.from)=="ltr"?1:-1:1;return UC(t,s,r)||Pa(t,s)}else{if(n==38||Hn&&n==80&&r=="c")return VC(t,-1,r)||Pa(t,-1);if(n==40||Hn&&n==78&&r=="c")return JG(t)||VC(t,1,r)||Pa(t,1);if(r==(Hn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function cx(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let o=t.someProp("clipboardSerializer")||pa.fromSchema(t.state.schema),a=Uj(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=zj[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let g=a.createElement(u[p]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,` 449 450`);return{dom:l,text:f,slice:e}}function Dj(t,e,n,r,s){let i=s.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,i||r,t)}),i)return a=new ne(W.from(t.state.schema.text(e.replace(/\r\n?/g,` 451`))),0,0),t.someProp("transformPasted",f=>{a=f(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",f=>f(e,s,r,t));if(d)a=d;else{let f=s.marks(),{schema:p}=t.state,g=pa.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=o.appendChild(document.createElement("p"));m&&y.appendChild(g.serializeNode(p.text(m,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=rK(n),wd&&sK(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||zi.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!eK.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)a=iK(qC(a,+u[1],+u[2]),u[4]);else if(a=ne.maxOpen(tK(a.content,s),!0),a.openStart||a.openEnd){let d=0,f=0;for(let p=a.content.firstChild;d<a.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=a.content.lastChild;f<a.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);a=qC(a,d,f)}return t.someProp("transformPasted",d=>{a=d(a,t,l)}),a}const eK=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function tK(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,o=[];if(t.forEach(a=>{if(!o)return;let l=s.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&i.length&&$j(l,i,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=Fj(o[o.length-1],i.length));let u=Lj(a,l);o.push(u),s=s.matchType(u.type),i=l}}),o)return W.from(o)}return t}function Lj(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,W.from(t));return t}function $j(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=$j(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(W.from(Lj(n,t,s+1))))}}function Fj(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Fj(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(W.empty,!0);return t.copy(n.append(r))}
vendor: 4,745 bytes, line 451
451function A0(t,e,n,r,s,i){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(i=0),s<r-1&&(a=A0(a,e,n,r,s+1,i)),s>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,i<=s).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(W.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function qC(t,e,n){return e<t.openStart&&(t=new ne(A0(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ne(A0(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const zj={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let GC=null;function Uj(){return GC||(GC=document.implementation.createHTMLDocument("title"))}let ry=null;function nK(t){let e=window.trustedTypes;return e?(ry||(ry=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),ry.createHTML(t)):t}function rK(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Uj().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),s;if((s=r&&zj[r[1].toLowerCase()])&&(t=s.map(i=>"<"+i+">").join("")+t+s.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=nK(t),s)for(let i=0;i<s.length;i++)n=n.querySelector(s[i])||n;return n}function sK(t){let e=t.querySelectorAll(Dt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent=="Â "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function iK(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;s=W.from(l.create(r[a+1],s)),i++,o++}return new ne(s,i,o)}const un={},dn={},oK={touchstart:!0,touchmove:!0};class aK{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function lK(t){for(let e in un){let n=un[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{uK(t,r)&&!ux(t,r)&&(t.editable||!(r.type in dn))&&n(t,r)},oK[e]?{passive:!0}:void 0)}en&&t.dom.addEventListener("input",()=>null),T0(t)}function Ti(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function cK(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function T0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>ux(t,r))})}function ux(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function uK(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function dK(t,e){!ux(t,e)&&un[e.type]&&(t.editable||!(e.type in dn))&&un[e.type](t,e)}dn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Vj(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(_s&&Dt&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Wl&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,xo(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||XG(t,n)?n.preventDefault():Ti(t,"key")};dn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};dn.keypress=(t,e)=>{let n=e;if(Vj(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Hn&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Se)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function Im(t){return{left:t.clientX,top:t.clientY}}function hK(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}
vendor: 24,419 bytes, line 451
451function dx(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(t.someProp(e,a=>o>i.depth?a(t,n,i.nodeAfter,i.before(o),s,!0):a(t,n,i.node(o),i.before(o),s,!1)))return!0;return!1}function yl(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function fK(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&we.isSelectable(r)?(yl(t,new we(n)),!0):!1}function pK(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof we&&(r=n.node);let i=t.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o);if(we.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(o);break}}return s!=null?(yl(t,we.create(t.state.doc,s)),!0):!1}function mK(t,e,n,r,s){return dx(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?pK(t,n):fK(t,n))}function gK(t,e,n,r){return dx(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function yK(t,e,n,r){return dx(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||vK(t,n,r)}function vK(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(yl(t,Se.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),a=s.before(i);if(o.inlineContent)yl(t,Se.create(r,a+1,a+1+o.content.size));else if(we.isSelectable(o))yl(t,we.create(r,a));else continue;return!0}}function hx(t){return Yf(t)}const Bj=Hn?"metaKey":"ctrlKey";un.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=hx(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&hK(n,t.input.lastClick)&&!n[Bj]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button};let o=t.posAtCoords(Im(n));o&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new bK(t,o,n,!!r)):(i=="doubleClick"?gK:yK)(t,o.pos,o.inside,n)?n.preventDefault():Ti(t,"pointer"))};class bK{constructor(e,n,r,s){this.view=e,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Bj],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),o=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,o=u.depth?u.before():0}const a=s?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof we&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Qn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ti(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Os(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Im(e))),this.updateAllowDefault(e),this.allowDefault||!n?Ti(this.view,"pointer"):mK(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||en&&this.mightDrag&&!this.mightDrag.node.isAtom||Dt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(yl(this.view,Pe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Ti(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ti(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}un.touchstart=t=>{t.input.lastTouch=Date.now(),hx(t),Ti(t,"pointer")};un.touchmove=t=>{t.input.lastTouch=Date.now(),Ti(t,"pointer")};un.contextmenu=t=>hx(t);function Vj(t,e){return t.composing?!0:en&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const wK=_s?5e3:-1;dn.compositionstart=dn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Se&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Dt&&wj&&xK(t)))t.markCursor=t.state.storedMarks||n.marks(),Yf(t,!0),t.markCursor=null;else if(Yf(t,!e.selection.empty),Qn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}t.input.composing=!0}Hj(t,wK)};function xK(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}dn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Hj(t,20))};function Hj(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Yf(t),e))}function Wj(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=SK());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function kK(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=pG(e.focusNode,e.focusOffset),r=mG(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function SK(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Yf(t,e=!1){if(!(_s&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Wj(t),e||t.docView&&t.docView.dirty){let n=ax(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function CK(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ku=Tn&&Ui<15||Wl&&bG<604;un.copy=dn.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=Ku?null:n.clipboardData,o=r.content(),{dom:a,text:l}=cx(t,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):CK(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function EK(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function AK(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Zu(t,r.value,null,s,e):Zu(t,r.textContent,r.innerHTML,s,e)},50)}function Zu(t,e,n,r,s){let i=Dj(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,i||ne.empty)))return!0;if(!i)return!1;let o=EK(i),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function qj(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}dn.paste=(t,e)=>{let n=e;if(t.composing&&!_s)return;let r=Ku?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Zu(t,qj(r),r.getData("text/html"),s,n)?n.preventDefault():AK(t,n)};class Gj{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const TK=Hn?"altKey":"ctrlKey";function Kj(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[TK]}un.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(Im(n)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof we?s.to-1:s.to))){if(r&&r.mightDrag)o=we.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=we.create(t.state.doc,d.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:c,slice:u}=cx(t,a);(!n.dataTransfer.files.length||!Dt||bj>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ku?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ku||n.dataTransfer.setData("text/plain",c),t.dragging=new Gj(u,Kj(t,n),o)};un.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};dn.dragover=dn.dragenter=(t,e)=>e.preventDefault();dn.drop=(t,e)=>{try{_K(t,e,t.dragging)}finally{t.dragging=null}};function _K(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(Im(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",p=>{i=p(i,t,!1)}):i=Dj(t,qj(e.dataTransfer),Ku?null:e.dataTransfer.getData("text/html"),!1,s);let o=!!(n&&Kj(t,e));if(t.someProp("handleDrop",p=>p(t,e,i||ne.empty,o))){e.preventDefault();return}if(!i)return;e.preventDefault();let a=i?sj(t.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let l=t.state.tr;if(o){let{node:p}=n;p?p.replace(l):l.deleteSelection()}let c=l.mapping.map(a),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,d=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),l.doc.eq(d))return;let f=l.doc.resolve(c);if(u&&we.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new we(f));else{let p=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((g,m,y,b)=>p=b),l.setSelection(lx(t,f,l.doc.resolve(p)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}un.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Os(t)},20))};un.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};un.beforeinput=(t,e)=>{if(Dt&&_s&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,xo(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in dn)un[t]=dn[t];function Yu(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Jf{constructor(e,n){this.toDOM=e,this.spec=n||Bo,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:o}=e.mapResult(n.from+s,this.side<0?-1:1);return o?null:new ln(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Jf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Yu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Vi{constructor(e,n){this.attrs=e,this.spec=n||Bo}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new ln(i,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Vi&&Yu(this.attrs,e.attrs)&&Yu(this.spec,e.spec)}static is(e){return e.type instanceof Vi}destroy(){}}class fx{constructor(e,n){this.attrs=e,this.spec=n||Bo}map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let o=e.mapResult(n.to+s,-1);return o.deleted||o.pos<=i.pos?null:new ln(i.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof fx&&Yu(this.attrs,e.attrs)&&Yu(this.spec,e.spec)}destroy(){}}class ln{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new ln(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new ln(e,e,new Jf(n,r))}static inline(e,n,r,s){return new ln(e,n,new Vi(r,s))}static node(e,n,r,s){return new ln(e,n,new fx(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Vi}get widget(){return this.type instanceof Jf}}const $a=[],Bo={};class ot{constructor(e,n){this.local=e.length?e:$a,this.children=n.length?n:$a}static create(e,n){return n.length?Qf(n,e,0,Bo):Jt}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+s,a.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,s+a,i)}}map(e,n,r){return this==Jt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Bo)}mapInner(e,n,r,s,i){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,s);l&&l.type.valid(n,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?NK(this.children,o||[],e,n,r,s,i):o?new ot(o.sort(Vo),$a):Jt}add(e,n){return n.length?this==Jt?ot.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((a,l)=>{let c=l+r,u;if(u=Yj(n,a,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<l;)i+=3;s[i]==l?s[i+2]=s[i+2].addInner(a,u,c+1):s.splice(i,0,l,l+a.nodeSize,Qf(u,a,c+1,Bo)),i+=3}});let o=Zj(i?Jj(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new ot(o.length?this.local.concat(o).sort(Vo):this.local,s||this.children)}remove(e){return e.length==0||this==Jt?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,a=r[i]+n,l=r[i+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(o||(o=[])).push(d));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,a+1);c!=Jt?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let a=0;a<s.length;a++)s[a].eq(o,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new ot(s,r):Jt}forChild(e,n){if(this==Jt)return this;if(n.isLeaf)return ot.empty;let r,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,o=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>i&&l.type instanceof Vi){let c=Math.max(i,l.from)-i,u=Math.min(o,l.to)-i;c<u&&(s||(s=[])).push(l.copy(c,u))}}if(s){let a=new ot(s.sort(Vo),$a);return r?new pi([a,r]):a}return r||Jt}eq(e){if(this==e)return!0;if(!(e instanceof ot)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return px(this.localsInner(e))}localsInner(e){if(this==Jt)return $a;if(e.inlineContent||!this.local.some(Vi.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Vi||n.push(this.local[r]);return n}forEachSet(e){e(this)}}ot.empty=new ot([],[]);ot.removeOverlap=px;const Jt=ot.empty;class pi{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,Bo));return pi.from(r)}forChild(e,n){if(n.isLeaf)return ot.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=Jt&&(i instanceof pi?r=r.concat(i.members):r.push(i))}return pi.from(r)}eq(e){if(!(e instanceof pi)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?px(r?n:n.sort(Vo)):$a}static from(e){switch(e.length){case 0:return Jt;case 1:return e[0];default:return new pi(e.every(n=>n instanceof ot)?e:e.reduce((n,r)=>n.concat(r instanceof ot?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function NK(t,e,n,r,s,i,o){let a=t.slice();for(let c=0,u=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,p,g,m)=>{let y=m-g-(p-f);for(let b=0;b<a.length;b+=3){let w=a[b+1];if(w<0||f>w+u-d)continue;let x=a[b]+u-d;p>=x?a[b+1]=f<=x?-2:-1:f>=u&&y&&(a[b]+=y,a[b+1]+=y)}d+=y}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+i),d=u-s;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[c+1]+i,-1),p=f-s,{index:g,offset:m}=r.content.findIndex(d),y=r.maybeChild(g);if(y&&m==d&&m+y.nodeSize==p){let b=a[c+2].mapInner(n,y,u+1,t[c]+i+1,o);b!=Jt?(a[c]=d,a[c+1]=p,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=IK(a,t,e,n,s,i,o),u=Qf(c,r,0,o);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let p=u.children[d];for(;f<a.length&&a[f]<p;)f+=3;a.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new ot(e.sort(Vo),a)}function Zj(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new ln(s.from+e,s.to+e,s.type))}return n}function IK(t,e,n,r,s,i,o){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,s,c);d?n.push(d):o.onRemove&&o.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function Yj(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,o;i<t.length;i++)(o=t[i])&&o.from>n&&o.to<r&&((s||(s=[])).push(o),t[i]=null);return s}function Jj(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Qf(t,e,n,r){let s=[],i=!1;e.forEach((a,l)=>{let c=Yj(t,a,l+n);if(c){i=!0;let u=Qf(c,a,n+l+1,r);u!=Jt&&s.push(l,l+a.nodeSize,u)}});let o=Zj(i?Jj(t):t,-n).sort(Vo);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||s.length?new ot(o,s):Jt}function Vo(t,e){return t.from-e.from||t.to-e.to}function px(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),KC(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),KC(e,s,r.copy(i.from,r.to)));break}}}return e}function KC(t,e,n){for(;e<t.length&&Vo(n,t[e])>0;)e++;t.splice(e,0,n)}function sy(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Jt&&e.push(r)}),t.cursorWrapper&&e.push(ot.create(t.state.doc,[t.cursorWrapper.deco])),pi.from(e)}const OK={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},PK=Tn&&Ui<=11;class jK{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class MK{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new jK,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);Tn&&Ui<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),PK&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,OK)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(zC(this.view)){if(this.suppressingSelectionUpdates)return Os(this.view);if(Tn&&Ui<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ia(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Hl(i))n.add(i);for(let i=e.anchorNode;i;i=Hl(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&zC(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,a=!1,l=[];
vendor: 2,241 bytes, line 451
451if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(i=i<0?d.from:Math.min(d.from,i),o=o<0?d.to:Math.max(d.to,o),d.typeOver&&(a=!0))}if(Qn&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||LK(e,d)!=p)&&f.remove()}}}else if((Dt||en)&&l.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let d=u.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&u.parentNode.removeChild(u)}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&_m(r)&&(c=ax(e))&&c.eq(Pe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Os(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),RK(e)),this.handleDOMChange(i,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Os(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(Tn&&Ui<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(s=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let o=s&&s.parentNode==e.target?Bt(s)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?Bt(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAt
vendor: 4,112 bytes, line 451
451End+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let ZC=new WeakMap,YC=!1;function RK(t){if(!ZC.has(t)&&(ZC.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Qn,YC)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),YC=!0}}function JC(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return ia(o.node,o.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function DK(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return JC(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?JC(t,n):null}function LK(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function $K(t,e,n){let{node:r,fromOffset:s,toOffset:i,from:o,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],_m(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Dt&&t.input.lastKeyCode===8)for(let y=i;y>s;y--){let b=r.childNodes[y-1],w=b.pmViewDesc;if(b.nodeName=="BR"&&!w){i=y;break}if(!w||w.size)break}let d=t.state.doc,f=t.someProp("domParser")||zi.fromSchema(t.state.schema),p=d.resolve(o),g=null,m=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:s,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:FK,context:p});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),g={anchor:y+o,head:b+o}}return{doc:m,sel:g,from:o,to:a}}function FK(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(en&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||en&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const zK=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function UK(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,A=ax(t,C);if(A&&!t.state.selection.eq(A)){if(Dt&&_s&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",M=>M(t,xo(13,"Enter"))))return;let N=t.state.tr.setSelection(A);C=="pointer"?N.setMeta("pointer",!0):C=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),t.dispatch(N)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=$K(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),f,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,p="end"):(f=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let g=HK(d.content,c.doc.content,c.from,f,p);if(g&&t.input.domChangeCount++,(Wl&&t.input.lastIOSEnter>Date.now()-225||_s)&&s.some(C=>C.nodeType==1&&!zK.test(C.nodeName))&&(!g||g.endA>=g.endB)&&t.someProp("handleKeyDown",C=>C(t,xo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof Se&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let C=QC(t,t.state.doc,c.sel);if(C&&!C.eq(t.state.selection)){let A=t.state.tr.setSelection(C);
vendor: 14,388 bytes, line 451
451i&&A.setMeta("composition",i),t.dispatch(A)}}return}t.state.selection.from<t.state.selection.to&&g.start==g.endB&&t.state.selection instanceof Se&&(g.start>t.state.selection.from&&g.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?g.start=t.state.selection.from:g.endA<t.state.selection.to&&g.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(g.endB+=t.state.selection.to-g.endA,g.endA=t.state.selection.to)),Tn&&Ui<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" Â "&&(g.start--,g.endA--,g.endB--);let m=c.doc.resolveNoCache(g.start-c.from),y=c.doc.resolveNoCache(g.endB-c.from),b=u.resolve(g.start),w=m.sameParent(y)&&m.parent.inlineContent&&b.end()>=g.endA;if((Wl&&t.input.lastIOSEnter>Date.now()-225&&(!w||s.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!w&&m.pos<c.doc.content.size&&(!m.sameParent(y)||!m.parent.inlineContent)&&m.pos<y.pos&&!/\S/.test(c.doc.textBetween(m.pos,y.pos,"","")))&&t.someProp("handleKeyDown",C=>C(t,xo(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>g.start&&VK(u,g.start,g.endA,m,y)&&t.someProp("handleKeyDown",C=>C(t,xo(8,"Backspace")))){_s&&Dt&&t.domObserver.suppressSelectionUpdates();return}Dt&&g.endB==g.start&&(t.input.lastChromeDelete=Date.now()),_s&&!w&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,y=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,xo(13,"Enter"))})},20));let x=g.start,k=g.endA,S=C=>{let A=C||t.state.tr.replace(x,k,c.doc.slice(g.start-c.from,g.endB-c.from));if(c.sel){let N=QC(t,A.doc,c.sel);N&&!(Dt&&t.composing&&N.empty&&(g.start!=g.endB||t.input.lastChromeDelete<Date.now()-100)&&(N.head==x||N.head==A.mapping.map(k)-1)||Tn&&N.empty&&N.head==x)&&A.setSelection(N)}return i&&A.setMeta("composition",i),A.scrollIntoView()},E;if(w)if(m.pos==y.pos){Tn&&Ui<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Os(t),20));let C=S(t.state.tr.delete(x,k)),A=u.resolve(g.start).marksAcross(u.resolve(g.endA));A&&C.ensureMarks(A),t.dispatch(C)}else if(g.endA==g.endB&&(E=BK(m.parent.content.cut(m.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,g.endA-b.start())))){let C=S(t.state.tr);E.type=="add"?C.addMark(x,k,E.mark):C.removeMark(x,k,E.mark),t.dispatch(C)}else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,y.parentOffset),A=()=>S(t.state.tr.insertText(C,x,k));t.someProp("handleTextInput",N=>N(t,x,k,C,A))||t.dispatch(A())}else t.dispatch(S());else t.dispatch(S())}function QC(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:lx(t,e.resolve(n.anchor),e.resolve(n.head))}function BK(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,o,a,l;for(let u=0;u<r.length;u++)s=r[u].removeFromSet(s);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(s.length==1&&i.length==0)a=s[0],o="add",l=u=>u.mark(a.addToSet(u.marks));else if(s.length==0&&i.length==1)a=i[0],o="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(W.from(c).eq(t))return{mark:a,type:o}}function VK(t,e,n,r,s){if(n-e<=s.pos-r.pos||iy(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=t.resolve(iy(i,!0,!0));return!o.parent.isTextblock||o.pos>n||iy(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function iy(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function HK(t,e,n,r,s){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:o,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let l=Math.max(0,i-Math.min(o,a));r-=o+l-i}if(o<i&&t.size<e.size){let l=r<=i&&r>=o?i-r:0;i-=l,i&&i<e.size&&XC(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-o),o=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&XC(t.textBetween(i-1,i+1))&&(i+=l?1:-1),o=i+(o-a),a=i}return{start:i,endA:o,endB:a}}function XC(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class Qj{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new aK,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(sE),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=nE(this),tE(this),this.nodeViews=rE(this),this.docView=MC(this.state.doc,eE(this),sy(this),this.dom,this),this.domObserver=new MK(this,(r,s,i,o)=>UK(this,r,s,i,o)),this.domObserver.start(),lK(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&T0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(sE),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(Wj(this),o=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=rE(this);qK(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&T0(this),this.editable=nE(this),tE(this);let l=sy(this),c=eE(this),u=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(s.selection))&&(o=!0);let f=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&kG(this);if(o){this.domObserver.stop();let p=d&&(Tn||Dt)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&WK(s.selection,e.selection);if(d){let g=Dt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=kK(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=MC(e.doc,c,l,this.dom,this)),g&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&qG(this))?Os(this,p):(jj(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&SG(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof we){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&_C(this,n.getBoundingClientRect(),e)}else _C(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new Gj(e.slice,e.move,s<0?void 0:we.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(s=n?n(a):a))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let a=i[o].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(Tn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&CG(this.dom),Os(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return NG(this,e)}coordsAtPos(e,n=1){return Ej(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return MG(this,n||this.state,e)}pasteHTML(e,n){return Zu(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Zu(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return cx(this,e)}destroy(){this.docView&&(cK(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],sy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,hG())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return dK(this,e)}domSelectionRange(){let e=this.domSelection();return e?en&&this.root.nodeType===11&&yG(this.dom.ownerDocument)==this.dom&&DK(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Qj.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function eE(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[ln.node(0,t.state.doc.content.size,e)]}function tE(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:ln.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function nE(t){return!t.someProp("editable",e=>e(t.state)===!1)}function WK(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function rE(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function qK(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function sE(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Yi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Xf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},GK=typeof navigator<"u"&&/Mac/.test(navigator.platform),KK=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Vt=0;Vt<10;Vt++)Yi[48+Vt]=Yi[96+Vt]=String(Vt);for(var Vt=1;Vt<=24;Vt++)Yi[Vt+111]="F"+Vt;for(var Vt=65;Vt<=90;Vt++)Yi[Vt]=String.fromCharCode(Vt+32),Xf[Vt]=String.fromCharCode(Vt);for(var oy in Yi)Xf.hasOwnProperty(oy)||(Xf[oy]=Yi[oy]);function ZK(t){var e=GK&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||KK&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Xf:Yi)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const YK=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),JK=typeof navigator<"u"&&/Win/.test(navigator.platform);function QK(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))YK?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function XK(t){let e=Object.create(null);for(let n in t)e[QK(n)]=t[n];return e}
vendor: 55,170 bytes, lines 451-494
451function ay(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function eZ(t){return new ct({props:{handleKeyDown:Xj(t)}})}function Xj(t){let e=XK(t);return function(n,r){let s=ZK(r),i,o=e[ay(s,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let a=e[ay(s,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(JK&&r.ctrlKey&&r.altKey)&&(i=Yi[r.keyCode])&&i!=s){let a=e[ay(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var tZ=Object.defineProperty,mx=(t,e)=>{for(var n in e)tZ(t,n,{get:e[n],enumerable:!0})};function Om(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var Pm=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...c)=>{const u=a(...c)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o=[],a=!!t,l=t||s.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),o.every(d=>d===!0)),u={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...g)=>{const m=this.buildProps(l,e),y=f(...g)(m);return o.push(y),u}])),run:c};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o={tr:t,editor:r,view:i,state:Om({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(o)]))}};return o}},eM={};mx(eM,{blur:()=>nZ,clearContent:()=>rZ,clearNodes:()=>sZ,command:()=>iZ,createParagraphNear:()=>oZ,cut:()=>aZ,deleteCurrentNode:()=>lZ,deleteNode:()=>cZ,deleteRange:()=>uZ,deleteSelection:()=>dZ,enter:()=>hZ,exitCode:()=>fZ,extendMarkRange:()=>pZ,first:()=>mZ,focus:()=>yZ,forEach:()=>vZ,insertContent:()=>bZ,insertContentAt:()=>kZ,joinBackward:()=>EZ,joinDown:()=>CZ,joinForward:()=>AZ,joinItemBackward:()=>TZ,joinItemForward:()=>_Z,joinTextblockBackward:()=>NZ,joinTextblockForward:()=>IZ,joinUp:()=>SZ,keyboardShortcut:()=>PZ,lift:()=>jZ,liftEmptyBlock:()=>MZ,liftListItem:()=>RZ,newlineInCode:()=>DZ,resetAttributes:()=>LZ,scrollIntoView:()=>$Z,selectAll:()=>FZ,selectNodeBackward:()=>zZ,selectNodeForward:()=>UZ,selectParentNode:()=>BZ,selectTextblockEnd:()=>VZ,selectTextblockStart:()=>HZ,setContent:()=>WZ,setMark:()=>dY,setMeta:()=>hY,setNode:()=>fY,setNodeSelection:()=>pY,setTextDirection:()=>mY,setTextSelection:()=>gY,sinkListItem:()=>yY,splitBlock:()=>vY,splitListItem:()=>bY,toggleList:()=>wY,toggleMark:()=>xY,toggleNode:()=>kY,toggleWrap:()=>SY,undoInputRule:()=>CY,unsetAllMarks:()=>EY,unsetMark:()=>AY,unsetTextDirection:()=>TY,updateAttributes:()=>_Y,wrapIn:()=>NY,wrapInList:()=>IY});var nZ=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),rZ=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),sZ=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:o})=>{t.doc.nodesBetween(i.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+a.nodeSize)),p=d.blockRange(f);if(!p)return;const g=lc(p);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,m)}(g||g===0)&&e.lift(p,g)})}),!0},iZ=t=>e=>t(e),oZ=()=>({state:t,dispatch:e})=>Qq(t,e),aZ=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new Se(r.doc.resolve(Math.max(o-1,0)))),!0},lZ=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const a=s.before(i),l=s.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1};function Et(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var cZ=t=>({tr:e,state:n,dispatch:r})=>{const s=Et(t,n.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const l=i.before(o),c=i.after(o);e.delete(l,c).scrollIntoView()}return!0}return!1},uZ=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},dZ=()=>({state:t,dispatch:e})=>zq(t,e),hZ=()=>({commands:t})=>t.keyboardShortcut("Enter"),fZ=()=>({state:t,dispatch:e})=>Jq(t,e);function gx(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function ep(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:gx(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function tM(t,e,n={}){return t.find(r=>r.type===e&&ep(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function iE(t,e,n={}){return!!tM(t,e,n)}function yx(t,e,n){var r;if(!t||!e)return;let s=t.parent.childAfter(t.parentOffset);if((!s.node||!s.node.marks.some(u=>u.type===e))&&(s=t.parent.childBefore(t.parentOffset)),!s.node||!s.node.marks.some(u=>u.type===e)||(n=n||((r=s.node.marks[0])==null?void 0:r.attrs),!tM([...s.node.marks],e,n)))return;let o=s.index,a=t.start()+s.offset,l=o+1,c=a+s.node.nodeSize;for(;o>0&&iE([...t.parent.child(o-1).marks],e,n);)o-=1,a-=t.parent.child(o).nodeSize;for(;l<t.parent.childCount&&iE([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function Vs(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var pZ=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const i=Vs(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:u}=a;if(s){const d=yx(l,i,e);if(d&&d.from<=c&&d.to>=u){const f=Se.create(o,d.from,d.to);n.setSelection(f)}}return!0},mZ=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function nM(t){return t instanceof Se}function _o(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function rM(t,e=null){if(!e)return null;const n=Pe.atStart(t),r=Pe.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,i=r.to;return e==="all"?Se.create(t,_o(0,s,i),_o(t.content.size,s,i)):Se.create(t,_o(e,s,i),_o(e,s,i))}function gZ(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function vx(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}var yZ=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{(vx()||gZ())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!nM(n.state.selection))return o(),!0;const a=rM(s.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},vZ=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),bZ=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),sM=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&sM(r)}return t};function ah(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return sM(n)}function Ju(t,e,n){if(t instanceof Fi||t instanceof W)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return W.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Ju("",e,n)}if(s){if(n.errorOnInvalidContent){let o=!1,a="";const l=new GP({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?zi.fromSchema(l).parseSlice(ah(t),n.parseOptions):zi.fromSchema(l).parse(ah(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=zi.fromSchema(e);return n.slice?i.parseSlice(ah(t),n.parseOptions).content:i.parse(ah(t),n.parseOptions)}return Ju("",e,n)}function wZ(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof Rt||s instanceof $t))return;const i=t.mapping.maps[r];let o=0;i.forEach((a,l,c,u)=>{o===0&&(o=u)}),t.setSelection(Pe.near(t.doc.resolve(o),n))}var xZ=t=>!("type"in t),kZ=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=y=>{i.emit("contentError",{editor:i,error:y,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Ju(e,i.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=Ju(e,i.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:i.options.enableContentCheck})}catch(y){return l(y),!1}let{from:u,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,p=!0;if((xZ(a)?a:[a]).forEach(y=>{y.check(),f=f?y.isText&&y.marks.length===0:!1,p=p?y.isBlock:!1}),u===d&&p){const{parent:y}=r.doc.resolve(u);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(u-=1,d+=1)}let m;if(f){if(Array.isArray(e))m=e.map(y=>y.text||"").join("");else if(e instanceof W){let y="";e.forEach(b=>{b.text&&(y+=b.text)}),m=y}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,u,d)}else{m=a;const y=r.doc.resolve(u),b=y.node(),w=y.parentOffset===0,x=b.isText||b.isTextblock,k=b.content.size>0;w&&x&&k&&(u=Math.max(0,u-1)),r.replaceWith(u,d,m)}n.updateSelection&&wZ(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:m})}return!0},SZ=()=>({state:t,dispatch:e})=>Gq(t,e),CZ=()=>({state:t,dispatch:e})=>Kq(t,e),EZ=()=>({state:t,dispatch:e})=>Uq(t,e),AZ=()=>({state:t,dispatch:e})=>Wq(t,e),TZ=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Em(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},_Z=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Em(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},NZ=()=>({state:t,dispatch:e})=>Bq(t,e),IZ=()=>({state:t,dispatch:e})=>Vq(t,e);function iM(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function OZ(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))vx()||iM()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var PZ=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const i=OZ(t).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&s&&r.maybeStep(u)}),!0};function Ji(t,e,n={}){const{from:r,to:s,empty:i}=t.selection,o=e?Et(e,t.schema):null,a=[];t.doc.nodesBetween(r,s,(d,f)=>{if(d.isText)return;const p=Math.max(r,f),g=Math.min(s,f+d.nodeSize);a.push({node:d,from:p,to:g})});const l=s-r,c=a.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>ep(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}var jZ=(t,e={})=>({state:n,dispatch:r})=>{const s=Et(t,n.schema);return Ji(n,s,e)?Zq(n,r):!1},MZ=()=>({state:t,dispatch:e})=>Xq(t,e),RZ=t=>({state:e,dispatch:n})=>{const r=Et(t,e.schema);return lG(r)(e,n)},DZ=()=>({state:t,dispatch:e})=>Yq(t,e);function jm(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function oE(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var LZ=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=jm(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Et(t,r.schema)),a==="mark"&&(o=Vs(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,d)=>{i&&i===u.type&&(l=!0,s&&n.setNodeMarkup(d,void 0,oE(u.attrs,e))),o&&u.marks.length&&u.marks.forEach(f=>{o===f.type&&(l=!0,s&&n.addMark(d,d+u.nodeSize,o.create(oE(f.attrs,e))))})})}),l},$Z=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),FZ=()=>({tr:t,dispatch:e})=>{if(e){const n=new Jn(t.doc);t.setSelection(n)}return!0},zZ=()=>({state:t,dispatch:e})=>Hq(t,e),UZ=()=>({state:t,dispatch:e})=>qq(t,e),BZ=()=>({state:t,dispatch:e})=>eG(t,e),VZ=()=>({state:t,dispatch:e})=>rG(t,e),HZ=()=>({state:t,dispatch:e})=>nG(t,e);function _0(t,e,n={},r={}){return Ju(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var WZ=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:o,commands:a})=>{const{doc:l}=i;if(r.preserveWhitespace!=="full"){const c=_0(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return o&&i.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return o&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function oM(t,e){const n=Vs(e,t.schema),{from:r,to:s,empty:i}=t.selection,o=[];i?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function aM(t,e){const n=new cj(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function qZ(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function GZ(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function KZ(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Mm(t){return e=>KZ(e.$from,t)}function ye(t,e,n){return t.config[e]===void 0&&t.parent?ye(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?ye(t.parent,e,n):null}):t.config[e]}function bx(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=ye(e,"addExtensions",n);return r?[e,...bx(r())]:e}).flat(10)}function wx(t,e){const n=pa.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function lM(t){return typeof t=="function"}function Ve(t,e=void 0,...n){return lM(t)?e?t.bind(e)(...n):t(...n):t}function ZZ(t={}){return Object.keys(t).length===0&&t.constructor===Object}function ql(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function cM(t){const e=[],{nodeExtensions:n,markExtensions:r}=ql(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:s},l=ye(o,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,p])=>{e.push({type:d,name:f,attribute:{...i,...p}})})})})}),s.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=ye(o,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:o.name,name:u,attribute:f})})}),e}function mt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const a=i?String(i).split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(u=>!l.includes(u));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[s]?r[s].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),a.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());c.set(d,f)}),r[s]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[s]=i}),r},{})}function tp(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>mt(n,r),{})}function YZ(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function aE(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((i,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):YZ(n.getAttribute(o.name));return a==null?i:{...i,[o.name]:a}},{});return{...r,...s}}}}function lE(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&ZZ(n)?!1:n!=null))}function cE(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function JZ(t,e){var n;const r=cM(t),{nodeExtensions:s,markExtensions:i}=ql(t),o=(n=s.find(c=>ye(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(s.map(c=>{const u=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((b,w)=>{const x=ye(w,"extendNodeSchema",d);return{...b,...x?x(c):{}}},{}),p=lE({...f,content:Ve(ye(c,"content",d)),marks:Ve(ye(c,"marks",d)),group:Ve(ye(c,"group",d)),inline:Ve(ye(c,"inline",d)),atom:Ve(ye(c,"atom",d)),selectable:Ve(ye(c,"selectable",d)),draggable:Ve(ye(c,"draggable",d)),code:Ve(ye(c,"code",d)),whitespace:Ve(ye(c,"whitespace",d)),linebreakReplacement:Ve(ye(c,"linebreakReplacement",d)),defining:Ve(ye(c,"defining",d)),isolating:Ve(ye(c,"isolating",d)),attrs:Object.fromEntries(u.map(cE))}),g=Ve(ye(c,"parseHTML",d));g&&(p.parseDOM=g.map(b=>aE(b,u)));const m=ye(c,"renderHTML",d);m&&(p.toDOM=b=>m({node:b,HTMLAttributes:tp(b,u)}));const y=ye(c,"renderText",d);return y&&(p.toText=y),[c.name,p]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=t.reduce((y,b)=>{const w=ye(b,"extendMarkSchema",d);return{...y,...w?w(c):{}}},{}),p=lE({...f,inclusive:Ve(ye(c,"inclusive",d)),excludes:Ve(ye(c,"excludes",d)),group:Ve(ye(c,"group",d)),spanning:Ve(ye(c,"spanning",d)),code:Ve(ye(c,"code",d)),attrs:Object.fromEntries(u.map(cE))}),g=Ve(ye(c,"parseHTML",d));g&&(p.parseDOM=g.map(y=>aE(y,u)));const m=ye(c,"renderHTML",d);return m&&(p.toDOM=y=>m({mark:y,HTMLAttributes:tp(y,u)})),[c.name,p]}));return new GP({topNode:o,nodes:a,marks:l})}function QZ(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function xx(t){return t.sort((n,r)=>{const s=ye(n,"priority")||100,i=ye(r,"priority")||100;return s>i?-1:s<i?1:0})}function uM(t){const e=xx(bx(t)),n=QZ(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function dM(t,e,n){const{from:r,to:s}=e,{blockSeparator:i=` 452 453`,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,s,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(a+=i);const p=o==null?void 0:o[l.type.name];if(p)return u&&(a+=p({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)==null?void 0:f.slice(Math.max(r,c)-c,s-c))}),a}function XZ(t,e){const n={from:0,to:t.content.size};return dM(t,n,e)}function hM(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function eY(t,e){const n=Et(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,a=>{i.push(a)});const o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function fM(t,e){const n=jm(typeof e=="string"?e:e.name,t.schema);return n==="node"?eY(t,e):n==="mark"?oM(t,e):{}}function tY(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function nY(t){const e=tY(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,o)=>o!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function pM(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=e.slice(i).map(a,-1),u=e.slice(i).map(l),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),nY(r)}function kx(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const i=n.resolve(t),o=yx(i,s.type);o&&r.push({mark:s,...o})}):n.nodesBetween(t,e,(s,i)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var rY=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let i=r,o=null;for(;i>0&&o===null;){const a=s.node(i);(a==null?void 0:a.type.name)===e?o=a:i-=1}return[o,i]};function ly(t,e){return e.nodes[t]||e.marks[t]||null}function Vh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var sY=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,a)=>{var l,c;const u=((c=(l=s.type.spec).toText)==null?void 0:c.call(l,{node:s,pos:i,parent:o,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-i))}),n};function N0(t,e,n={}){const{empty:r,ranges:s}=t.selection,i=e?Vs(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>ep(d.attrs,n,{strict:!1}));let o=0;const a=[];if(s.forEach(({$from:d,$to:f})=>{const p=d.pos,g=f.pos;t.doc.nodesBetween(p,g,(m,y)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(p,y),w=Math.min(g,y+m.nodeSize),x=w-b;o+=x,a.push(...m.marks.map(k=>({mark:k,from:b,to:w})))})}),o===0)return!1;const l=a.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>ep(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=a.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=o}function iY(t,e,n={}){if(!e)return Ji(t,null,n)||N0(t,null,n);const r=jm(e,t.schema);return r==="node"?Ji(t,e,n):r==="mark"?N0(t,e,n):!1}var oY=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const i=Mm(a=>a.type.name===e)(t.selection);if(!i)return!1;const o=t.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},aY=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function uE(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function dE(t,e){const{nodeExtensions:n}=ql(e),r=n.find(o=>o.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=Ve(ye(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Rm(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(Rm(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function mM(t){return t instanceof we}var gM=class yM{constructor(e){this.position=e}static fromJSON(e){return new yM(e.position)}toJSON(){return{position:this.position}}};function lY(t,e){const n=e.mapping.mapResult(t.position);return{position:new gM(n.pos),mapResult:n}}function cY(t){return new gM(t)}function uY(t,e,n){var r;const{selection:s}=e;let i=null;if(nM(s)&&(i=s.$cursor),i){const a=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:o}=s;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const p=!f||f.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(n));c=p&&g}return!c}),c})}var dY=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:o,ranges:a}=i,l=Vs(t,r.schema);if(s)if(o){const c=oM(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,p)=>{const g=Math.max(p,u),m=Math.min(p+f.nodeSize,d);f.marks.find(b=>b.type===l)?f.marks.forEach(b=>{l===b.type&&n.addMark(g,m,l.create({...b.attrs,...e}))}):n.addMark(g,m,l.create(e))})});return uY(r,n,l)},hY=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),fY=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=Et(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:a})=>EC(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>EC(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},pY=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=_o(t,0,r.content.size),i=we.create(r,s);e.setSelection(i)}return!0},mY=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),s&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},gY=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,o=Se.atStart(r).from,a=Se.atEnd(r).to,l=_o(s,o,a),c=_o(i,o,a),u=Se.create(r,l,c);e.setSelection(u)}return!0},yY=t=>({state:e,dispatch:n})=>{const r=Et(t,e.schema);return dG(r)(e,n)};function hE(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e==null?void 0:e.includes(s.type.name));t.tr.ensureMarks(r)}}var vY=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:o}=e,{$from:a,$to:l}=i,c=s.extensionManager.attributes,u=Vh(c,a.node().type.name,a.node().attrs);if(i instanceof we&&i.node.isBlock)return!a.parentOffset||!ml(o,a.pos)?!1:(r&&(t&&hE(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:qZ(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,g=ml(e.doc,e.mapping.map(a.pos),1,p);if(!p&&!g&&ml(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(g=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(g&&(i instanceof Se&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,p),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const m=e.mapping.map(a.before()),y=e.doc.resolve(m);a.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}t&&hE(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return g},bY=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var o;const a=Et(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==a)return!1;const f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(s){let b=W.empty;const w=l.index(-1)?1:l.index(-2)?2:3;for(let A=l.depth-w;A>=l.depth-3;A-=1)b=W.from(l.node(A).copy(b));const x=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...Vh(f,l.node().type.name,l.node().attrs),...e},S=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(k))||void 0;b=b.append(W.from(a.createAndFill(null,S)||void 0));const E=l.before(l.depth-(w-1));n.replace(E,l.after(-x),new ne(b,4-w,0));let C=-1;n.doc.nodesBetween(E,n.doc.content.size,(A,N)=>{if(C>-1)return!1;A.isTextblock&&A.content.size===0&&(C=N+1)}),C>-1&&n.setSelection(Se.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}const p=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,g={...Vh(f,d.type.name,d.attrs),...e},m={...Vh(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const y=p?[{type:a,attrs:g},{type:p,attrs:m}]:[{type:a,attrs:g}];if(!ml(n.doc,l.pos,2))return!1;if(s){const{selection:b,storedMarks:w}=r,{splittableMarks:x}=i.extensionManager,k=w||b.$to.parentOffset&&b.$from.marks();if(n.split(l.pos,2,y).scrollIntoView(),!k||!s)return!0;const S=k.filter(E=>x.includes(E.type.name));n.ensureMarks(S)}return!0},cy=(t,e)=>{const n=Mm(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&oo(t.doc,n.pos)&&t.join(n.pos),!0},uy=(t,e)=>{const n=Mm(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&oo(t.doc,r)&&t.join(r),!0},wY=(t,e,n,r={})=>({editor:s,tr:i,state:o,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=s.extensionManager,p=Et(t,o.schema),g=Et(e,o.schema),{selection:m,storedMarks:y}=o,{$from:b,$to:w}=m,x=b.blockRange(w),k=y||m.$to.parentOffset&&m.$from.marks();if(!x)return!1;const S=Mm(E=>dE(E.type.name,d))(m);if(x.depth>=1&&S&&x.depth-S.depth<=1){if(S.node.type===p)return c.liftListItem(g);if(dE(S.node.type.name,d)&&p.validContent(S.node.content)&&a)return l().command(()=>(i.setNodeMarkup(S.pos,p),!0)).command(()=>cy(i,p)).command(()=>uy(i,p)).run()}return!n||!k||!a?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>cy(i,p)).command(()=>uy(i,p)).run():l().command(()=>{const E=u().wrapInList(p,r),C=k.filter(A=>f.includes(A.type.name));return i.ensureMarks(C),E?!0:c.clearNodes()}).wrapInList(p,r).command(()=>cy(i,p)).command(()=>uy(i,p)).run()},xY=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,o=Vs(t,r.schema);return N0(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},kY=(t,e,n={})=>({state:r,commands:s})=>{const i=Et(t,r.schema),o=Et(e,r.schema),a=Ji(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(o,l):s.setNode(i,{...l,...n})},SY=(t,e={})=>({state:n,commands:r})=>{const s=Et(t,n.schema);return Ji(n,s,e)?r.lift(s):r.wrapIn(s,e)},CY=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},EY=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:s}=n;return r||e&&s.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},AY=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=Vs(t,r.schema),{$from:c,empty:u,ranges:d}=a;if(!s)return!0;if(u&&o){let{from:f,to:p}=a;const g=(i=c.marks().find(y=>y.type===l))==null?void 0:i.attrs,m=yx(c,l,g);m&&(f=m.from,p=m.to),n.removeMark(f,p,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},TY=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=s.from,o=s.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},_Y=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=jm(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Et(t,r.schema)),a==="mark"&&(o=Vs(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;let f,p,g,m;n.selection.empty?r.doc.nodesBetween(u,d,(y,b)=>{i&&i===y.type&&(l=!0,g=Math.max(b,u),m=Math.min(b+y.nodeSize,d),f=b,p=y)}):r.doc.nodesBetween(u,d,(y,b)=>{b<u&&i&&i===y.type&&(l=!0,g=Math.max(b,u),m=Math.min(b+y.nodeSize,d),f=b,p=y),b>=u&&b<=d&&(i&&i===y.type&&(l=!0,s&&n.setNodeMarkup(b,void 0,{...y.attrs,...e})),o&&y.marks.length&&y.marks.forEach(w=>{if(o===w.type&&(l=!0,s)){const x=Math.max(b,u),k=Math.min(b+y.nodeSize,d);n.addMark(x,k,o.create({...w.attrs,...e}))}}))}),p&&(f!==void 0&&s&&n.setNodeMarkup(f,void 0,{...p.attrs,...e}),o&&p.marks.length&&p.marks.forEach(y=>{o===y.type&&s&&n.addMark(g,m,o.create({...y.attrs,...e}))}))}),l},NY=(t,e={})=>({state:n,dispatch:r})=>{const s=Et(t,n.schema);return sG(s,e)(n,r)},IY=(t,e={})=>({state:n,dispatch:r})=>{const s=Et(t,n.schema);return iG(s,e)(n,r)},OY=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},Dm=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},PY=(t,e)=>{if(gx(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function lh(t){var e;const{editor:n,from:r,to:s,text:i,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=sY(c)+i;return o.forEach(f=>{if(u)return;const p=PY(d,f.find);if(!p)return;const g=l.state.tr,m=Om({state:l.state,transaction:g}),y={from:r-(p[0].length-i.length),to:s},{commands:b,chain:w,can:x}=new Pm({editor:n,state:m});f.handler({state:m,range:y,match:p,commands:b,chain:w,can:x})===null||!g.steps.length||(f.undoable&&g.setMeta(a,{transform:g,from:r,to:s,text:i}),l.dispatch(g),u=!0)}),u}function jY(t){const{editor:e,rules:n}=t,r=new ct({state:{init(){return null},apply(s,i,o){const a=s.getMeta(r);if(a)return a;const l=s.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=wx(W.from(u),o.schema);const{from:d}=l,f=d+u.length;lh({editor:e,from:d,to:f,text:u,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,a){return lh({editor:e,from:i,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&lh({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?lh({editor:e,from:o.pos,to:o.pos,text:` 454`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function MY(t){return Object.prototype.toString.call(t).slice(8,-1)}function ch(t){return MY(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function vM(t,e){const n={...t};return ch(t)&&ch(e)&&Object.keys(e).forEach(r=>{ch(e[r])&&ch(t[r])?n[r]=vM(t[r],e[r]):n[r]=e[r]}),n}var Sx=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Ve(ye(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Ve(ye(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>vM(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},ma=class bM extends Sx{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new bM(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=o.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function RY(t){return typeof t=="number"}var wM=class{constructor(t){this.find=t.find,this.handler=t.handler}},DY=(t,e,n)=>{if(gx(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function LY(t){const{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:c,can:u}=new Pm({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,s,(p,g)=>{var m,y,b,w,x;if((y=(m=p.type)==null?void 0:m.spec)!=null&&y.code||!(p.isText||p.isTextblock||p.isInline))return;const k=(x=(w=(b=p.content)==null?void 0:b.size)!=null?w:p.nodeSize)!=null?x:0,S=Math.max(r,g),E=Math.min(s,g+k);if(S>=E)return;const C=p.isText?p.text||"":p.textBetween(S-g,E-g,void 0,"");DY(C,i.find,o).forEach(N=>{if(N.index===void 0)return;const M=S+N.index+1,F=M+N[0].length,P={from:n.tr.mapping.map(M),to:n.tr.mapping.map(F)},V=i.handler({state:n,range:P,match:N,commands:l,chain:c,can:u,pasteEvent:o,dropEvent:a});d.push(V)})}),d.every(p=>p!==null)}var uh=null,$Y=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function FY(t){const{editor:e,rules:n}=t;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:u,from:d,to:f,rule:p,pasteEvt:g})=>{const m=u.tr,y=Om({state:u,transaction:m});if(!(!LY({editor:e,state:y,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:g,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(u=>new ct({view(d){const f=g=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(g.target)?d.dom.parentElement:null,r&&(uh=e)},p=()=>{uh&&(uh=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,a=f,!i){const p=uh;p!=null&&p.isEditable&&setTimeout(()=>{const g=p.state.selection;g&&p.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(d,f)=>{var p;const g=(p=f.clipboardData)==null?void 0:p.getData("text/html");return o=f,s=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,p)=>{const g=d[0],m=g.getMeta("uiEvent")==="paste"&&!s,y=g.getMeta("uiEvent")==="drop"&&!i,b=g.getMeta("applyPasteRules"),w=!!b;if(!m&&!y&&!w)return;if(w){let{text:S}=b;typeof S=="string"?S=S:S=wx(W.from(S),p.schema);const{from:E}=b,C=E+S.length,A=$Y(S);return l({rule:u,state:p,from:E,to:{b:C},pasteEvt:A})}const x=f.doc.content.findDiffStart(p.doc.content),k=f.doc.content.findDiffEnd(p.doc.content);if(!(!RY(x)||!k||x===k.b))return l({rule:u,state:p,from:x,to:k,pasteEvt:o})}}))}var Lm=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=uM(t),this.schema=JZ(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ly(e.name,this.schema)},r=ye(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return xx([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ly(r.name,this.schema)},i=[],o=ye(r,"addKeyboardShortcuts",s);let a={};if(r.type==="mark"&&ye(r,"exitable",s)&&(a.ArrowRight=()=>ma.handleExit({editor:t,mark:r})),o){const f=Object.fromEntries(Object.entries(o()).map(([p,g])=>[p,()=>g({editor:t})]));a={...a,...f}}const l=eZ(a);i.push(l);const c=ye(r,"addInputRules",s);if(uE(r,t.options.enableInputRules)&&c){const f=c();if(f&&f.length){const p=jY({editor:t,rules:f}),g=Array.isArray(p)?p:[p];i.push(...g)}}const u=ye(r,"addPasteRules",s);if(uE(r,t.options.enablePasteRules)&&u){const f=u();if(f&&f.length){const p=FY({editor:t,rules:f});i.push(...p)}}const d=ye(r,"addProseMirrorPlugins",s);if(d){const f=d();i.push(...f)}return i})}get attributes(){return cM(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=ql(this.extensions);return Object.fromEntries(e.filter(n=>!!ye(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Et(n.name,this.schema)},i=ye(n,"addNodeView",s);if(!i)return[];const o=i();if(!o)return[];const a=(l,c,u,d,f)=>{const p=tp(l,r);return o({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:t,extension:n,HTMLAttributes:p})};return[n.name,a]}))}get markViews(){const{editor:t}=this,{markExtensions:e}=ql(this.extensions);return Object.fromEntries(e.filter(n=>!!ye(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Vs(n.name,this.schema)},i=ye(n,"addMarkView",s);if(!i)return[];const o=(a,l,c)=>{const u=tp(a,r);return i()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:u,updateAttributes:d=>{XY(a,t,d)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ly(e.name,this.schema)};e.type==="mark"&&((n=Ve(ye(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const s=ye(e,"onBeforeCreate",r),i=ye(e,"onCreate",r),o=ye(e,"onUpdate",r),a=ye(e,"onSelectionUpdate",r),l=ye(e,"onTransaction",r),c=ye(e,"onFocus",r),u=ye(e,"onBlur",r),d=ye(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}};Lm.resolve=uM;Lm.sort=xx;Lm.flatten=bx;var zY={};mx(zY,{ClipboardTextSerializer:()=>kM,Commands:()=>SM,Delete:()=>CM,Drop:()=>EM,Editable:()=>AM,FocusEvents:()=>_M,Keymap:()=>NM,Paste:()=>IM,Tabindex:()=>OM,TextDirection:()=>PM,focusEventsPluginKey:()=>TM});var wt=class xM extends Sx{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new xM(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},kM=wt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ct({key:new Ot("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,{ranges:i}=s,o=Math.min(...i.map(u=>u.$from.pos)),a=Math.max(...i.map(u=>u.$to.pos)),l=hM(n);return dM(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),SM=wt.create({name:"commands",addCommands(){return{...eM}}}),CM=wt.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const i=()=>{var o,a,l,c;if((c=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const u=aM(t.before,[t,...e]);pM(u).forEach(p=>{u.mapping.mapResult(p.oldRange.from).deletedAfter&&u.mapping.mapResult(p.oldRange.to).deletedBefore&&u.before.nodesBetween(p.oldRange.from,p.oldRange.to,(g,m)=>{const y=m+g.nodeSize-2,b=p.oldRange.from<=m&&y<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:g,from:m,to:y,newFrom:u.mapping.map(m),newTo:u.mapping.map(y),deletedRange:p.oldRange,newRange:p.newRange,partial:!b,editor:this.editor,transaction:t,combinedTransform:u})})});const f=u.mapping;u.steps.forEach((p,g)=>{var m,y;if(p instanceof Cr){const b=f.slice(g).map(p.from,-1),w=f.slice(g).map(p.to),x=f.invert().map(b,-1),k=f.invert().map(w),S=(m=u.doc.nodeAt(b-1))==null?void 0:m.marks.some(C=>C.eq(p.mark)),E=(y=u.doc.nodeAt(w))==null?void 0:y.marks.some(C=>C.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:x,to:k},newRange:{from:b,to:w},partial:!!(E||S),editor:this.editor,transaction:t,combinedTransform:u})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),EM=wt.create({name:"drop",addProseMirrorPlugins(){return[new ct({key:new Ot("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),AM=wt.create({name:"editable",addProseMirrorPlugins(){return[new ct({key:new Ot("editable"),props:{editable:()=>this.editor.options.editable}})]}}),TM=new Ot("focusEvents"),_M=wt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ct({key:TM,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),NM=wt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:f,parent:p}=d,g=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=g.parent.type.spec.isolating,y=d.pos-d.parentOffset,b=m&&g.parent.childCount===1?y===d.pos:Pe.atStart(c).from===f;return!u||!p.type.isTextblock||p.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return vx()||iM()?i:s},addProseMirrorPlugins(){return[new ct({key:new Ot("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(m=>m.getMeta("composition")))return;const r=t.some(m=>m.docChanged)&&!e.doc.eq(n.doc),s=t.some(m=>m.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:a}=e.selection,l=Pe.atStart(e.doc).from,c=Pe.atEnd(e.doc).to;if(i||!(o===l&&a===c)||!Rm(n.doc))return;const f=n.tr,p=Om({state:n,transaction:f}),{commands:g}=new Pm({editor:this.editor,state:p});if(g.clearNodes(),!!f.steps.length)return f}})]}}),IM=wt.create({name:"paste",addProseMirrorPlugins(){return[new ct({key:new Ot("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),OM=wt.create({name:"tabindex",addProseMirrorPlugins(){return[new ct({key:new Ot("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),PM=wt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=ql(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ct({key:new Ot("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),UY=class Fa{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Fa(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Fa(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Fa(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=this.pos+r+(i?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!s&&a.depth<=this.depth)return;const l=new Fa(a,this.editor,s,s?n:null);s&&(l.actualDepth=this.depth+1),e.push(new Fa(a,this.editor,s,s?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const i=s.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(i[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(l=>n[l]===o.node.attrs[l])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},BY=`.ProseMirror { 455 position: relative; 456} 457 458.ProseMirror { 459 word-wrap: break-word; 460 white-space: pre-wrap; 461 white-space: break-spaces; 462 -webkit-font-variant-ligatures: none; 463 font-variant-ligatures: none; 464 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 465} 466 467.ProseMirror [contenteditable="false"] { 468 white-space: normal; 469} 470 471.ProseMirror [contenteditable="false"] [contenteditable="true"] { 472 white-space: pre-wrap; 473} 474 475.ProseMirror pre { 476 white-space: pre-wrap; 477} 478 479img.ProseMirror-separator { 480 display: inline !important; 481 border: none !important; 482 margin: 0 !important; 483 width: 0 !important; 484 height: 0 !important; 485} 486 487.ProseMirror-gapcursor { 488 display: none; 489 pointer-events: none; 490 position: absolute; 491 margin: 0; 492} 493 494.ProseMirror-gapcursor:after {
495 content: ""; 496 display: block; 497 position: absolute; 498 top: -2px; 499 width: 20px; 500 border-top: 1px solid black; 501 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 502} 503 504@keyframes ProseMirror-cursor-blink { 505 to { 506 visibility: hidden; 507 } 508} 509 510.ProseMirror-hideselection *::selection { 511 background: transparent; 512} 513 514.ProseMirror-hideselection *::-moz-selection { 515 background: transparent; 516} 517 518.ProseMirror-hideselection * { 519 caret-color: transparent; 520} 521 522.ProseMirror-focused .ProseMirror-gapcursor { 523 display: block; 524}`;function VY(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var HY=class extends OY{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:lY,createMappablePosition:cY},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:s,moved:i})=>this.options.onDrop(r,s,i)),this.on("paste",({event:r,slice:s})=>this.options.onPaste(r,s)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=rM(e,this.options.autofocus);this.editorState=nl.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=VY(BY,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}
vendor: 8,336 bytes, lines 524-526
524),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=lM(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;n=n.filter(o=>!o.key.startsWith(i))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[AM,kM.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),SM,_M,NM,OM,EM,IM,CM,PM.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Lm(r,this)}createCommandManager(){this.commandManager=new Pm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=_0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=_0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){var e;this.editorView=new Qj(t,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)==null?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.prependClass(),this.injectCSS();const r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=o==null?void 0:o.getMeta("focus"),l=o==null?void 0:o.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return fM(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return iY(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return wx(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=` 525 526`,textSerializers:n={}}=t||{};return XZ(this.state.doc,{blockSeparator:e,textSerializers:{...hM(this.schema),...n}})}get isEmpty(){return Rm(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new UY(e,this)}get $doc(){return this.$pos(0)}};function Gl(t){return new Dm({find:t.find,handler:({state:e,range:n,match:r})=>{const s=Ve(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=n.from+a.indexOf(o),u=c+o.length;if(kx(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===t.type&&m!==p.mark.type)).filter(p=>p.to>c).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+l,c);const f=n.from+l+o.length;i.addMark(n.from+l,f,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function jM(t){return new Dm({find:t.find,handler:({state:e,range:n,match:r})=>{const s=Ve(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from;let a=n.to;const l=t.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=o+c;u>a?u=a:a=u+r[1].length;const d=r[0][r[0].length-1];i.insertText(d,o+r[0].length-1),i.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?o:o-1;i.insert(c,t.type.create(s)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function I0(t){return new Dm({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),i=Ve(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Kl(t){return new Dm({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const i=Ve(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),c=l&&nx(l,t.type,i);if(!c)return null;if(o.wrap(l,c),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:p}=t.editor.extensionManager,g=f||d.$to.parentOffset&&d.$from.marks();if(g){const m=g.filter(y=>p.includes(y.type.name));o.ensureMarks(m)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(d,i).run()}const u=o.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&oo(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&o.join(n.from-1)},undoable:t.undoable})}var WY=t=>"touches"in t,qY=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const c=l.clientX-this.startX,u=l.clientY-this.startY;this.handleResize(c,u)},this.handleMouseUp=()=>
526{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,s,i,o;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(s=t.options)!=null&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(i=t.options)!=null&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(o=t.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){return this.contentElement}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display="flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}
526removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,WY(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,s,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight;const i=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return i?r=this.startWidth+e:o&&(r=this.startWidth-e),a?s=this.startHeight+n:l&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s,i,o;if(!n){let c=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(s=this.maxSize)!=null&&s.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(i=this.maxSize)!=null&&i.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function GY(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof we){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}var KY={};mx(KY,{createAtomBlockMarkdownSpec:()=>MM,createBlockMarkdownSpec:()=>ZY,createInlineMarkdownSpec:()=>QY,parseAttributes:()=>Cx,parseIndentedBlocks:()=>O0,renderNestedMarkdownContent:()=>Ax,serializeAttributes:()=>Ex});function Cx(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),s=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const c=s.map(u=>u.trim().slice(1));e.class=c.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,u])=>{var d;const f=parseInt(((d=u.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),p=n[f];p&&(e[c]=p.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();
vendor: 5,797 bytes, lines 526-541
526return l&&l.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Ex(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function MM(t){const{nodeName:e,name:n,parseAttributes:r=Cx,serializeAttributes:s=Ex,defaultAttributes:i={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,c=u=>{if(!a)return u;const d={};return a.forEach(f=>{f in u&&(d[f]=u[f])}),d};return{parseMarkdown:(u,d)=>{const f={...i,...u.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(u){var d;const f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),p=(d=u.match(f))==null?void 0:d.index;return p!==void 0?p:-1},tokenize(u,d,f){const p=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),g=u.match(p);if(!g)return;const m=g[1]||"",y=r(m);if(!o.find(w=>!(w in y)))return{type:e,raw:g[0],attributes:y}}},renderMarkdown:u=>{const d=c(u.attrs||{}),f=s(d),p=f?` {${f}}`:"";return`:::${l}${p} :::`}}}function ZY(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=Cx,serializeAttributes:i=Ex,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,c=n||e,u=d=>{if(!l)return d;const f={};return l.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{let p;if(r){const m=r(d);p=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?p=f.parseChildren(d.tokens||[]):p=f.parseInline(d.tokens||[]);const g={...o,...d.attributes};return f.createNode(e,g,p)},markdownTokenizer:{name:e,level:"block",start(d){var f;const p=new RegExp(`^:::${c}`,"m"),g=(f=d.match(p))==null?void 0:f.index;return g!==void 0?g:-1},tokenize(d,f,p){var g;const m=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=d.match(m);if(!y)return;const[b,w=""]=y,x=s(w);let k=1;const S=b.length;let E="";const C=/^:::([\w-]*)(\s.*)?/gm,A=d.slice(S);for(C.lastIndex=0;;){const N=C.exec(A);if(N===null)break;const M=N.index,F=N[1];if(!((g=N[2])!=null&&g.endsWith(":::"))){if(F)k+=1;else if(k-=1,k===0){const P=A.slice(0,M);E=P.trim();const V=d.slice(0,S+M+N[0].length);let _=[];if(E)if(a==="block")for(_=p.blockTokens(P),_.forEach(H=>{H.text&&(!H.tokens||H.tokens.length===0)&&(H.tokens=p.inlineTokens(H.text))});_.length>0;){const H=_[_.length-1];if(H.type==="paragraph"&&(!H.text||H.text.trim()===""))_.pop();else break}else _=p.inlineTokens(E);return{type:e,raw:V,attributes:x,content:E,tokens:_}}}}}},renderMarkdown:(d,f)=>{const p=u(d.attrs||{}),g=i(p),m=g?` {${g}}`:"",y=f.renderChildren(d.content||[],` 527 528`);return`:::${c}${m} 529 530${y} 531 532:::`}}}function YY(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,i,o]=r;e[s]=i||o,r=n.exec(t)}return e}function JY(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function QY(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=YY,serializeAttributes:i=JY,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=f=>{if(!l)return f;const p={};return l.forEach(g=>{const m=typeof g=="string"?g:g.name,y=typeof g=="string"?void 0:g.skipIfDefault;if(m in f){const b=f[m];if(y!==void 0&&b===y)return;p[m]=b}}),p},d=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,p)=>{const g={...o,...f.attributes};if(a)return p.createNode(e,g);const m=r?r(f):f.content||"";return m?p.createNode(e,g,[p.createTextNode(m)]):p.createNode(e,g,[])},markdownTokenizer:{name:e,level:"inline",start(f){const p=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),g=f.match(p),m=g==null?void 0:g.index;return m!==void 0?m:-1},tokenize(f,p,g){const m=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),y=f.match(m);if(!y)return;let b="",w="";if(a){const[,k]=y;w=k}else{const[,k,S]=y;w=k,b=S||""}const x=s(w.trim());return{type:e,raw:y[0],content:b.trim(),attributes:x}}},renderMarkdown:f=>{let p="";r?p=r(f):f.content&&f.content.length>0&&(p=f.content.filter(b=>b.type==="text").map(b=>b.text).join(""));const g=u(f.attrs||{}),m=i(g),y=m?` ${m}`:"";return a?`[${c}${y}]`:`[${c}${y}]${p}[/${c}]`}}}function O0(t,e,n){var r,s,i,o;const a=t.split(` 533`),l=[];let c="",u=0;const d=e.baseIndentSize||2;for(;u<a.length;){const f=a[u],p=f.match(e.itemPattern);if(!p){if(l.length>0)break;if(f.trim()===""){u+=1,c=`${c}${f} 534`;continue}else return}const g=e.extractItemData(p),{indentLevel:m,mainContent:y}=g;c=`${c}${f} 535`;const b=[y];for(u+=1;u<a.length;){const S=a[u];if(S.trim()===""){const C=a.slice(u+1).findIndex(M=>M.trim()!=="");if(C===-1)break;if((((s=(r=a[u+1+C].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>m){b.push(S),c=`${c}${S} 536`,u+=1;continue}else break}if((((o=(i=S.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:o.length)||0)>m)b.push(S),c=`${c}${S} 537`,u+=1;else break}let w;const x=b.slice(1);if(x.length>0){const S=x.map(E=>E.slice(m+d)).join(` 538`);S.trim()&&(e.customNestedParser?w=e.customNestedParser(S):w=n.blockTokens(S))}const k=e.createToken(g,w);l.push(k)}if(l.length!==0)return{items:l,raw:c}}function Ax(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[i,...o]=t.content,a=e.renderChildren([i]),l=[`${s}${a}`];return o&&o.length>0&&o.forEach(c=>{const u=e.renderChildren([c]);if(u){const d=u.split(` 539`).map(f=>f?e.indent(f):"").join(` 540`);l.push(d)}}),l.join(` 541`)}function XY(t,e,n={}){const{state:r}=e,{doc:s,tr:i}=r,o=t;s.descendants((a,l)=>{const c=i.mapping.map(l),u=i.mapping.map(l)+a.nodeSize;let d=null;if(a.marks.forEach(p=>{if(p!==o)return!1;d=p}),!d)return;let f=!1;
541if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){const p=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,p)}}),i.docChanged&&e.view.dispatch(i)}var pn=class RM extends Sx{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new RM(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function aa(t){return new wM({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const i=Ve(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(kx(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===t.type&&y!==g.mark.type)).filter(g=>g.to>d).length)return null;f<n.to&&o.delete(f,n.to),d>n.from&&o.delete(n.from+u,d),c=n.from+u+a.length,o.addMark(n.from+u,c,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function eJ(t){return new wM({find:t.find,handler({match:e,chain:n,range:r,pasteEvent:s}){const i=Ve(t.getAttributes,void 0,e,s),o=Ve(t.getContent,void 0,i);if(i===!1||i===null)return null;const a={type:t.type.name,attrs:i};o&&(a.content=o),e.input&&n().deleteRange(r).insertContentAt(r.from,a)}})}const{getOwnPropertyNames:tJ,getOwnPropertySymbols:nJ}=Object,{hasOwnProperty:rJ}=Object.prototype;function fE(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function dh(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:i}=s,o=i.get(n),a=i.get(r);if(o&&a)return o===r&&a===n;i.set(n,r),i.set(r,n);const l=t(n,r,s);return i.delete(n),i.delete(r),l}}function sJ(t){return t!=null?t[Symbol.toStringTag]:void 0}function pE(t){return tJ(t).concat(nJ(t))}const iJ=Object.hasOwn||((t,e)=>rJ.call(t,e));function ga(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const oJ="__v",aJ="__o",lJ="_owner",{getOwnPropertyDescriptor:mE,keys:gE}=Object;function cJ(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function uJ(t,e){return ga(t.getTime(),e.getTime())}function dJ(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function hJ(t,e){return t===e}function yE(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.entries();let o,a,l=0;for(;(o=i.next())&&!o.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(s[d]){d++;continue}const f=o.value,p=a.value;if(n.equals(f[0],p[0],l,d,t,e,n)&&n.equals(f[1],p[1],f[0],p[0],t,e,n)){u=s[d]=!0;break}d++}if(!u)return!1;l++}return!0}const fJ=ga;function pJ(t,e,n){const r=gE(t);let s=r.length;if(gE(e).length!==s)return!1;for(;s-- >0;)if(!DM(t,e,n,r[s]))return!1;return!0}function Tc(t,e,n){const r=pE(t);let s=r.length;if(pE(e).length!==s)return!1;let i,o,a;for(;s-- >0;)if(i=r[s],!DM(t,e,n,i)||(o=mE(t,i),a=mE(e,i),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function mJ(t,e){return ga(t.valueOf(),e.valueOf())}function gJ(t,e){return t.source===e.source&&t.flags===e.flags}function vE(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.values();let o,a;for(;(o=i.next())&&!o.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!s[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function yJ(t,e){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function vJ(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function DM(t,e,n,r){return(r===lJ||r===aJ||r===oJ)&&(t.$$typeof||e.$$typeof)?!0:iJ(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const bJ="[object Arguments]",wJ="[object Boolean]",xJ="[object Date]",kJ="[object Error]",SJ="[object Map]",CJ="[object Number]",EJ="[object Object]",AJ="[object RegExp]",TJ="[object Set]",_J="[object String]",NJ="[object URL]",{isArray:IJ}=Array,bE=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,{assign:wE}=Object,OJ=Object.prototype.toString.call.bind(Object.prototype.toString);function PJ({areArraysEqual:t,areDatesEqual:e,areErrorsEqual:n,areFunctionsEqual:r,areMapsEqual:s,areNumbersEqual:i,areObjectsEqual:o,arePrimitiveWrappersEqual:a,areRegExpsEqual:l,areSetsEqual:c,areTypedArraysEqual:u,areUrlsEqual:d,unknownTagComparators:f}){return function(g,m,y){if(g===m)return!0;
541if(g==null||m==null)return!1;const b=typeof g;if(b!==typeof m)return!1;if(b!=="object")return b==="number"?i(g,m,y):b==="function"?r(g,m,y):!1;const w=g.constructor;if(w!==m.constructor)return!1;if(w===Object)return o(g,m,y);if(IJ(g))return t(g,m,y);if(bE!=null&&bE(g))return u(g,m,y);if(w===Date)return e(g,m,y);if(w===RegExp)return l(g,m,y);if(w===Map)return s(g,m,y);if(w===Set)return c(g,m,y);const x=OJ(g);if(x===xJ)return e(g,m,y);if(x===AJ)return l(g,m,y);if(x===SJ)return s(g,m,y);if(x===TJ)return c(g,m,y);if(x===EJ)return typeof g.then!="function"&&typeof m.then!="function"&&o(g,m,y);if(x===NJ)return d(g,m,y);if(x===kJ)return n(g,m,y);if(x===bJ)return o(g,m,y);if(x===wJ||x===CJ||x===_J)return a(g,m,y);if(f){let k=f[x];if(!k){const S=sJ(g);S&&(k=f[S])}if(k)return k(g,m,y)}return!1}}function jJ({circular:t,createCustomConfig:e,strict:n}){let r={areArraysEqual:n?Tc:cJ,areDatesEqual:uJ,areErrorsEqual:dJ,areFunctionsEqual:hJ,areMapsEqual:n?fE(yE,Tc):yE,areNumbersEqual:fJ,areObjectsEqual:n?Tc:pJ,arePrimitiveWrappersEqual:mJ,areRegExpsEqual:gJ,areSetsEqual:n?fE(vE,Tc):vE,areTypedArraysEqual:n?Tc:yJ,areUrlsEqual:vJ,unknownTagComparators:void 0};if(e&&(r=wE({},r,e(r))),t){const s=dh(r.areArraysEqual),i=dh(r.areMapsEqual),o=dh(r.areObjectsEqual),a=dh(r.areSetsEqual);r=wE({},r,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:a})}return r}function MJ(t){return function(e,n,r,s,i,o,a){return t(e,n,a)}}function RJ({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:s})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const i={cache:void 0,equals:r,meta:void 0,strict:s};return function(a,l){return e(a,l,i)}}const DJ=lo();lo({strict:!0});lo({circular:!0});lo({circular:!0,strict:!0});lo({createInternalComparator:()=>ga});lo({strict:!0,createInternalComparator:()=>ga});lo({circular:!0,createInternalComparator:()=>ga});lo({circular:!0,createInternalComparator:()=>ga,strict:!0});function lo(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,i=jJ(t),o=PJ(i),a=n?n(o):MJ(o);return RJ({circular:e,comparator:o,createState:r,equals:a,strict:s})}var LM={exports:{}},$M={};/** 542 * @license React 543 * use-sync-external-store-shim/with-selector.production.js 544 * 545 * Copyright (c) Meta Platforms, Inc. and affiliates. 546 * 547 * This source code is licensed under the MIT license found in the 548 * LICENSE file in the root directory of this source tree. 549 */var $m=v,LJ=Xw;function $J(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var FJ=typeof Object.is=="function"?Object.is:$J,zJ=LJ.useSyncExternalStore,UJ=$m.useRef,BJ=$m.useEffect,VJ=$m.useMemo,HJ=$m.useDebugValue;$M.useSyncExternalStoreWithSelector=function(t,e,n,r,s){var i=UJ(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=VJ(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),s!==void 0&&o.hasValue){var g=o.value;if(s(g,p))return d=g}return d=p}if(g=d,FJ(u,p))return g;var m=r(p);return s!==void 0&&s(g,m)?(u=p,g):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,s]);var a=zJ(t,i[0],i[1]);return BJ(function(){o.hasValue=!0,o.value=a},[a]),HJ(a),a};LM.exports=$M;var WJ=LM.exports,qJ=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},GJ=({contentComponent:t})=>{const e=Xw.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return h.jsx(h.Fragment,{children:Object.values(e)})};function KJ(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:$b.createPortal(r.reactElement,r.element,n)},t.forEach(s=>s())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(s=>s())}}}var ZJ=class extends U.Component{constructor(t){var e;super(t),this.editorContentRef=U.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const e=this.editorContentRef.current;e.append(t.view.dom),t.setOptions({element:e}),t.contentComponent=KJ(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(n=>n.hasContentComponentInitialized?n:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.firstChild))return;const n=document.createElement("div");n.append(e.view.dom),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:qJ(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&h.jsx(GJ,{contentComponent:t.contentComponent})]})}},YJ=v.forwardRef((t,e)=>{const n=U.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return U.createElement(ZJ,{key:n,innerRef:e,...t})}),JJ=U.memo(YJ),QJ=typeof window<"u"?v.useLayoutEffect:v.useEffect,XJ=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
549,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function eQ(t){var e;const[n]=v.useState(()=>new XJ(t.editor)),r=WJ.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:DJ);return QJ(()=>n.watch(t.editor),[t.editor,n]),v.useDebugValue(r),r}var tQ=!1,P0=typeof window>"u",nQ=P0||!!(typeof window<"u"&&window.next),rQ=class FM{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return P0||nQ?null:this.createEditor();if(this.options.current.immediatelyRender&&P0&&tQ)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)}};return new HY(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,i)=>{var o;return s===((o=n.extensions)==null?void 0:o[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?FM.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}
549):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function sQ(t={},e=[]){const n=v.useRef(t);n.current=t;const[r]=v.useState(()=>new rQ(n)),s=Xw.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return v.useDebugValue(s),v.useEffect(r.onRender(e)),eQ({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var iQ=v.createContext({editor:null});iQ.Consumer;var oQ=v.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),aQ=()=>v.useContext(oQ);U.forwardRef((t,e)=>{const{onDragStart:n}=aQ(),r=t.as||"div";return h.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});U.createContext({markViewContentRef:()=>{}});var np=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},lQ=/^\s*>\s$/,cQ=pn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return np("blockquote",{...mt(this.options.HTMLAttributes,t),children:np("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(s=>{const a=e.renderChildren([s]).split(` 550`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(` 551`))}),r.join(` 552${n} 553`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}}
vendor: 8,933 bytes, lines 553-574
553,addInputRules(){return[Kl({find:lQ,type:this.type})]}}),uQ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,dQ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,hQ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,fQ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,pQ=ma.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return np("strong",{...mt(this.options.HTMLAttributes,t),children:np("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Gl({find:uQ,type:this.type}),Gl({find:hQ,type:this.type})]},addPasteRules(){return[aa({find:dQ,type:this.type}),aa({find:fQ,type:this.type})]}}),mQ=/(^|[^`])`([^`]+)`(?!`)$/,gQ=/(^|[^`])`([^`]+)`(?!`)/g,yQ=ma.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",mt(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Gl({find:mQ,type:this.type})]},addPasteRules(){return[aa({find:gQ,type:this.type})]}}),dy=4,vQ=/^```([a-z]+)?[\s\n]$/,bQ=/^~~~([a-z]+)?[\s\n]$/,wQ=pn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:dy,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",mt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(` 554`):r=`\`\`\`${s} 555 556\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:dy,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;if(i.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:u}=s,p=r.doc.textBetween(c,u,` 557`,` 558`).split(` 559`).map(g=>a+g).join(` 560`);return l.replaceWith(c,u,r.schema.text(p)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:dy,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;return i.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:c}=i,u=i.start(),d=i.end(),p=r.doc.textBetween(u,d,` 561`,` 562`).split(` 563`);let g=0,m=0;const y=c-u;for(let E=0;E<p.length;E+=1){if(m+p[E].length>=y){g=E;break}m+=p[E].length+1}const w=((l=p[g].match(/^ */))==null?void 0:l[0])||"",x=Math.min(w.length,n);if(x===0)return!0;let k=u;for(let E=0;E<g;E+=1)k+=p[E].length+1;return a.delete(k,k+x),c-k<=x&&a.setSelection(Se.create(a.doc,k)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=s,f=r.doc.textBetween(l,c,` 564`,` 565`).split(` 566`).map(p=>{var g;const m=((g=p.match(/^ */))==null?void 0:g[0])||"",y=Math.min(m.length,n);return p.slice(y)}).join(` 567`);return a.replaceWith(l,c,r.schema.text(f)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(` 568 569`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(Pe.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[I0({find:vQ,type:this.type,getAttributes:t=>({language:t[1]})}),I0({find:bQ,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ct({key:new Ot("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s==null?void 0:s.mode;if(!n||!i)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,` 570`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(Se.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),xQ=pn.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 571 572`):""}),kQ=pn.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",mt(this.options.HTMLAttributes,t)]},renderText(){return` 573`},renderMarkdown:()=>` 574`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&o){const d=l.filter(f=>a.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),SQ=pn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,mt(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>I0({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
574)\\s$`),type:this.type,getAttributes:{level:t}}))}}),CQ=pn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",mt(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!GY(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return mM(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(Se.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(we.create(o.doc,l.pos)):o.setSelection(Se.create(o.doc,l.pos));else{const u=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=u==null?void 0:u.create();d&&(o.insert(c,d),o.setSelection(Se.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[jM({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 1,036 bytes, line 574
574ype})]}}),EQ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,AQ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,TQ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_Q=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,NQ=ma.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",mt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Gl({find:EQ,type:this.t
574ype}),Gl({find:TQ,type:this.type})]},addPasteRules(){return[aa({find:AQ,type:this.type}),aa({find:_Q,type:this.type})]}});const IQ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
574hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",OQ="ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мкд2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",j0="numeric",M0="ascii",R0="alpha",uu="asciinumeric",Fc="alph
574anumeric",D0="domain",zM="emoji",PQ="scheme",jQ="slashscheme",hy="whitespace";function MQ(t,e){return t in e||(e[t]=[]),e[t]}function No(t,e,n){e[j0]&&(e[uu]=!0,e[Fc]=!0),e[M0]&&(e[uu]=!0,e[R0]=!0),e[uu]&&(e[Fc]=!0),e[R0]&&(e[Fc]=!0),e[Fc]&&(e[D0]=!0),e[zM]&&(e[D0]=!0);for(const r in e){const s=MQ(r,n);s.indexOf(t)<0&&s.push(t)}}function RQ(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function wn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}wn.groups={};wn.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||wn.groups;let s;return e&&e.j?s=e:(s=new wn(e),n&&r&&No(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||wn.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let o,a=s.go(t);if(a?(o=new wn,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new wn,i){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(RQ(o.t,r),n);No(i,l,r)}else n&&No(i,n,r);o.t=i}return s.j[t]=o,o}};const Oe=(t,e,n,r,s)=>t.ta(e,n,r,s),ut=(t,e,n,r,s)=>t.tr(e,n,r,s),xE=(t,e,n,r,s)=>t.ts(e,n,r,s),q=(t,e,n,r,s)=>t.tt(e,n,r,s),ws="WORD",L0="UWORD",UM="ASCIINUMERICAL",BM="ALPHANUMERICAL",Qu="LOCALHOST",$0="TLD",F0="UTLD",Hh="SCHEME",za="SLASH_SCHEME",Tx="NUM",z0="WS",_x="NL",du="OPENBRACE",hu="CLOSEBRACE",rp="OPENBRACKET",sp="CLOSEBRACKET",ip="OPENPAREN",op="CLOSEPAREN",ap="OPENANGLEBRACKET",lp="CLOSEANGLEBRACKET",cp="FULLWIDTHLEFTPAREN",up="FULLWIDTHRIGHTPAREN",dp="LEFTCORNERBRACKET",hp="RIGHTCORNERBRACKET",fp="LEFTWHITECORNERBRACKET",pp="RIGHTWHITECORNERBRACKET",mp="FULLWIDTHLESSTHAN",gp="FULLWIDTHGREATERTHAN",yp="AMPERSAND",vp="APOSTROPHE",bp="ASTERISK",ai="AT",wp="BACKSLASH",xp="BACKTICK",kp="CARET",mi="COLON",Nx="COMMA",Sp="DOLLAR",zr="DOT",Cp="EQUALS",Ix="EXCLAMATION",zn="HYPHEN",fu="PERCENT",Ep="PIPE",Ap="PLUS",Tp="POUND",pu="QUERY",Ox="QUOTE",VM="FULLWIDTHMIDDLEDOT",Px="SEMI",Ur="SLASH",mu="TILDE",_p="UNDERSCORE",HM="EMOJI",Np="SYM";var WM=Object.freeze({__proto__:null,ALPHANUMERICAL:BM,AMPERSAND:yp,APOSTROPHE:vp,ASCIINUMERICAL:UM,ASTERISK:bp,AT:ai,BACKSLASH:wp,BACKTICK:xp,CARET:kp,CLOSEANGLEBRACKET:lp,CLOSEBRACE:hu,CLOSEBRACKET:sp,CLOSEPAREN:op,COLON:mi,COMMA:Nx,DOLLAR:Sp,DOT:zr,EMOJI:HM,EQUALS:Cp,EXCLAMATION:Ix,FULLWIDTHGREATERTHAN:gp,FULLWIDTHLEFTPAREN:cp,FULLWIDTHLESSTHAN:mp,FULLWIDTHMIDDLEDOT:VM,FULLWIDTHRIGHTPAREN:up,HYPHEN:zn,LEFTCORNERBRACKET:dp,LEFTWHITECORNERBRACKET:fp,LOCALHOST:Qu,NL:_x,NUM:Tx,OPENANGLEBRACKET:ap,OPENBRACE:du,OPENBRACKET:rp,OPENPAREN:ip,PERCENT:fu,PIPE:Ep,PLUS:Ap,POUND:Tp,QUERY:pu,QUOTE:Ox,RIGHTCORNERBRACKET:hp,RIGHTWHITECORNERBRACKET:pp,SCHEME:Hh,SEMI:Px,SLASH:Ur,SLASH_SCHEME:za,SYM:Np,TILDE:mu,TLD:$0,UNDERSCORE:_p,UTLD:F0,UWORD:L0,WORD:ws,WS:z0});const gs=/[a-z]/,_c=new RegExp("\\p{L}","u"),fy=new RegExp("\\p{Emoji}","u"),ys=/\d/,py=/\s/,kE="\r",my=` 575`,DQ="ï¸",LQ="â",gy="";let hh=null,fh=null;function $Q(t=[]){const e={};wn.groups=e;const n=new wn;hh==null&&(hh=SE(IQ)),fh==null&&(fh=SE(OQ)),q(n,"'",vp),q(n,"{",du),q(n,"}",hu),q(n,"[",rp),q(n,"]",sp),q(n,"(",ip),q(n,")",op),q(n,"<",ap),q(n,">",lp),q(n,"ï¼",cp),q(n,"ï¼",up),q(n,"ã",dp),q(n,"ã",hp),q(n,"ã",fp),q(n,"ã",pp),q(n,"ï¼",mp),q(n,"ï¼",gp),q(n,"&",yp),q(n,"*",bp),q(n,"@",ai),q(n,"`",xp),q(n,"^",kp),q(n,":",mi),q(n,",",Nx),q(n,"$",Sp),q(n,".",zr),q(n,"=",Cp),q(n,"!",Ix),q(n,"-",zn),q(n,"%",fu),q(n,"|",Ep),q(n,"+",Ap),q(n,"#",Tp),q(n,"?",pu),q(n,'"',Ox),q(n,"/",Ur),q(n,";",Px),q(n,"~",mu),q(n,"_",_p),q(n,"\\",wp),q(n,"ã»",VM);const r=ut(n,ys,Tx,{[j0]:!0});ut(r,ys,r);const s=ut(r,gs,UM,{[uu]:!0}),i=ut(r,_c,BM,{[Fc]:!0}),o=ut(n,gs,ws,{[M0]:!0});ut(o,ys,s),ut(o,gs,o),ut(s,ys,s),ut(s,gs,s);const a=ut(n,_c,L0,{[R0]:!0});ut(a,gs),ut(a,ys,i),ut(a,_c,a),ut(i,ys,i),ut(i,gs),ut(i,_c,i);const l=q(n,my,_x,{[hy]:!0}),c=q(n,kE,z0,{[hy]:!0}),u=ut(n,py,z0,{[hy]:!0});q(n,gy,u),q(c,my,l),q(c,gy,u),ut(c,py,u),q(u,kE),q(u,my),ut(u,py,u),q(u,gy,u);const d=ut(n,fy,HM,{[zM]:!0});q(d,"#"),ut(d,fy,d),q(d,DQ,d);const f=q(d,LQ);q(f,"#"),ut(f,fy,d);const p=[[gs,o],[ys,s]],g=[[gs,null],[_c,a],[ys,i]];for(let m=0;m<hh.length;m++)Qs(n,hh[m],$0,ws,p);for(let m=0;m<fh.length;m++)Qs(n,fh[m],F0,L0,g);No($0,{tld:!0,ascii:!0},e),No(F0,{utld:!0,alpha:!0},e),Qs(n,"file",Hh,ws,p),Qs(n,"mailto",Hh,ws,p),Qs(n,"http",za,ws,p),Qs(n,"https",za,ws,p),Qs(n,"ftp",za,ws,p),Qs(n,"ftps",za,ws,p),No(Hh,{scheme:!0,ascii:!0},e),No(za,{slashscheme:!0,ascii:!0},e),t=t.sort((m,y)=>m[0]>y[0]?1:-1);for(let m=0;m<t.length;m++){const y=t[m][0],w=t[m][1]?{[PQ]:!0}:{[jQ]:!0};y.indexOf("-")>=0?w[D0]=!0:gs.test(y)?ys.test(y)?w[uu]=!0:w[M0]=!0:w[j0]=!0,xE(n,y,y,w)}return xE(n,"localhost",Qu,{ascii:!0}),n.jd=new wn(Np),{start:n,tokens:Object.assign({groups:e},WM)}}function qM(t,e){const n=FQ(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let i=0,o=0;for(;o<r;){let a=t,l=null,c=0,u=null,d=-1,f=-1;for(;o<r&&(l=a.go(n[o]));
vendor: 28,913 bytes, lines 575-589
575)a=l,a.accepts()?(d=0,f=0,u=a):d>=0&&(d+=n[o].length,f++),c+=n[o].length,i+=n[o].length,o++;i-=d,o-=f,c-=d,s.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function FQ(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function Qs(t,e,n,r,s){let i;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new wn(r),i.jr=s.slice(),t.j[l]=i),t=i}return i=new wn(n),i.jr=s.slice(),t.j[e[o-1]]=i,i}function SE(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}const Xu={defaultProtocol:"http",events:null,format:CE,formatHref:CE,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function jx(t,e=null){let n=Object.assign({},Xu);t&&(n=Object.assign(n,t instanceof jx?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}jx.prototype={o:Xu,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:Xu[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function CE(t){return t}function GM(t,e){this.t="token",this.v=t,this.tk=e}GM.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Xu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),u&&Object.assign(o,u),{tagName:s,attributes:o,content:i,eventListeners:d}}};function Fm(t,e){class n extends GM{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const EE=Fm("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),AE=Fm("text"),zQ=Fm("nl"),ph=Fm("url",{isLink:!0,toHref(t=Xu.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Qu&&t[1].t===mi}}),$n=t=>new wn(t);function UQ({groups:t}){const e=t.domain.concat([yp,bp,ai,wp,xp,kp,Sp,Cp,zn,Tx,fu,Ep,Ap,Tp,Ur,Np,mu,_p]),n=[vp,mi,Nx,zr,Ix,fu,pu,Ox,Px,ap,lp,du,hu,sp,rp,ip,op,cp,up,dp,hp,fp,pp,mp,gp],r=[yp,vp,bp,wp,xp,kp,Sp,Cp,zn,du,hu,fu,Ep,Ap,Tp,pu,Ur,Np,mu,_p],s=$n(),i=q(s,mu);Oe(i,r,i),Oe(i,t.domain,i);const o=$n(),a=$n(),l=$n();Oe(s,t.domain,o),Oe(s,t.scheme,a),Oe(s,t.slashscheme,l),Oe(o,r,i),Oe(o,t.domain,o);const c=q(o,ai);q(i,ai,c),q(a,ai,c),q(l,ai,c);const u=q(i,zr);Oe(u,r,i),Oe(u,t.domain,i);const d=$n();Oe(c,t.domain,d),Oe(d,t.domain,d);const f=q(d,zr);Oe(f,t.domain,d);const p=$n(EE);Oe(f,t.tld,p),Oe(f,t.utld,p),q(c,Qu,p);const g=q(d,zn);q(g,zn,g),Oe(g,t.domain,d),Oe(p,t.domain,d),q(p,zr,f),q(p,zn,g);const m=q(p,mi);Oe(m,t.numeric,EE);const y=q(o,zn),b=q(o,zr);q(y,zn,y),Oe(y,t.domain,o),Oe(b,r,i),Oe(b,t.domain,o);const w=$n(ph);Oe(b,t.tld,w),Oe(b,t.utld,w),Oe(w,t.domain,o),Oe(w,r,i),q(w,zr,b),q(w,zn,y),q(w,ai,c);const x=q(w,mi),k=$n(ph);Oe(x,t.numeric,k);const S=$n(ph),E=$n();Oe(S,e,S),Oe(S,n,E),Oe(E,e,S),Oe(E,n,E),q(w,Ur,S),q(k,Ur,S);const C=q(a,mi),A=q(l,mi),N=q(A,Ur),M=q(N,Ur);Oe(a,t.domain,o),q(a,zr,b),q(a,zn,y),Oe(l,t.domain,o),q(l,zr,b),q(l,zn,y),Oe(C,t.domain,S),q(C,Ur,S),q(C,pu,S),Oe(M,t.domain,S),Oe(M,e,S),q(M,Ur,S);const F=[[du,hu],[rp,sp],[ip,op],[ap,lp],[cp,up],[dp,hp],[fp,pp],[mp,gp]];for(let P=0;P<F.length;P++){const[V,_]=F[P],H=q(S,V);q(E,V,H),q(H,_,S);const B=$n(ph);Oe(H,e,B);const $=$n();Oe(H,n),Oe(B,e,B),Oe(B,n,$),Oe($,e,B),Oe($,n,$),q(B,_,S),q($,_,S)}return q(s,Qu,w),q(s,_x,zQ),{start:s,tokens:WM}}function BQ(t,e,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let a=t,l=null,c=null,u=0,d=null,f=-1;for(;s<r&&!(l=a.go(n[s].t));)o.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(f=0,d=a):f>=0&&f++,s++,u++;if(f<0)s-=u,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(yy(AE,e,o)),o=[]),s-=f,u-=f;const p=d.t,g=n.slice(s-u,s);i.push(yy(p,e,g))}}return o.length>0&&i.push(yy(AE,e,o)),i}function yy(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const VQ=typeof console<"u"&&console&&console.warn||(()=>{}),HQ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",et={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function WQ(){return wn.groups={},et.scanner=null,et.parser=null,et.tokenQueue=[],et.pluginQueue=[],et.customSchemes=[],et.initialized=!1,et}function TE(t,e=!1){if(et.initialized&&VQ(`linkifyjs: already initialized - will not register custom scheme "${t}" ${HQ}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format. 5761. Must only contain digits, lowercase ASCII letters or "-" 5772. Cannot start or end with "-" 5783. "-" cannot repeat`);et.customSchemes.push([t,e])}function qQ(){et.scanner=$Q(et.customSchemes);for(let t=0;t<et.tokenQueue.length;t++)et.tokenQueue[t][1]({scanner:et.scanner});et.parser=UQ(et.scanner.tokens);for(let t=0;t<et.pluginQueue.length;t++)et.pluginQueue[t][1]({scanner:et.scanner,parser:et.parser});return et.initialized=!0,et}function Mx(t){return et.initialized||qQ(),BQ(et.parser.start,t,qM(et.scanner.start,t))}Mx.scan=qM;function KM(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new jx(n),s=Mx(t),i=[];for(let o=0;o<s.length;o++){const a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var Rx="[\0-  áá â-\u2029âã]",GQ=new RegExp(Rx),KQ=new RegExp(`${Rx}$`),ZQ=new RegExp(Rx,"g");function YQ(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function JQ(t){return new ct({key:new Ot("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,a=aM(n.doc,[...e]);if(pM(a).forEach(({newRange:c})=>{const u=GZ(r.doc,c,p=>p.isTextblock);let d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const p=r.doc.textBetween(c.from,c.to," "," ");if(!KQ.test(p))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){const p=f.split(GQ).filter(Boolean);if(p.length<=0)return!1;const g=p[p.length-1],m=d.pos+f.lastIndexOf(g);if(!g)return!1;const y=Mx(g).map(b=>b.toObject(t.defaultProtocol));if(!YQ(y))return!1;y.filter(b=>b.isLink).map(b=>({...b,from:m+b.start+1,to:m+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>t.validate(b.value)).filter(b=>t.shouldAutoLink(b.value)).forEach(b=>{kx(b.from,b.to,r.doc).some(w=>w.mark.type===t.type)||o.addMark(b.from,b.to,t.type.create({href:b.href}))})}}),!!o.steps.length)return o}})}function QQ(t){return new ct({key:new Ot("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=!1;if(t.enableClickSelection&&(o=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{let d=r.target;const f=[];for(;d.nodeName!=="DIV";)f.push(d),d=d.parentNode;a=f.find(p=>p.nodeName==="A")}if(!a)return o;const l=fM(e.state,t.type.name),c=(s=a==null?void 0:a.href)!=null?s:l.href,u=(i=a==null?void 0:a.target)!=null?i:l.target;a&&c&&(window.open(c,u),o=!0)}return o}}})}function XQ(t){return new ct({key:new Ot("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=KM(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||s!==void 0&&!s(c.href)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function po(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(ZQ,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var ZM=ma.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){TE(t);return}TE(t.scheme,t.optionalSlashes)})},onDestroy(){WQ()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!po(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!po(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!po(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",mt(this.options.HTMLAttributes,t),0]:["a",mt(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;const r=((n=t.attrs)==null?void 0:n.href)||"";return`[${e.renderChildren(t)}](${r})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!po(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!po(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[aa({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,s=KM(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!po(o,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(JQ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!po(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(QQ({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(XQ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),eX=ZM,tX=Object.defineProperty,nX=(t,e)=>{for(var n in e)tX(t,n,{get:e[n],enumerable:!0})},rX="listItem",_E="textStyle",NE=/^\s*([-+*])\s$/,YM=pn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",mt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 579`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rX,this.editor.getAttributes(_E)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Kl({find:NE,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Kl({find:NE,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(_E),editor:this.editor})),[t]}}),JM=pn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",mt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))n=e.parseChildren(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const o=t.tokens.slice(1),a=e.parseChildren(o);n.push(...a)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>Ax(t,e,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),sX={};nX(sX,{findListItemPos:()=>kd,getNextListDepth:()=>Dx,handleBackspace:()=>U0,handleDelete:()=>B0,hasListBefore:()=>QM,hasListItemAfter:()=>iX,hasListItemBefore:()=>XM,listItemHasSubList:()=>eR,nextListIsDeeper:()=>tR,nextListIsHigher:()=>nR});var kd=(t,e)=>{const{$from:n}=e.selection,r=Et(t,e.schema);let s=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)s=n.node(i),s.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},Dx=(t,e)=>{const n=kd(t,e);if(!n)return!1;const[,r]=rY(e,t,n.$pos.pos+4);return r},QM=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},XM=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},eR=(t,e,n)=>{if(!n)return!1;const r=Et(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},U0=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Ji(t.state,e)&&QM(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),c=[];l.node().descendants((f,p)=>{f.type.name===e&&c.push({node:f,pos:p})});const u=c.at(-1);if(!u)return!1;const d=t.state.doc.resolve(l.start()+u.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!Ji(t.state,e)||!aY(t.state))return!1;const r=kd(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=eR(e,t.state,i);return XM(e,t.state)&&!o?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},tR=(t,e)=>{const n=Dx(t,e),r=kd(t,e);return!r||!n?!1:n>r.depth},nR=(t,e)=>{const n=Dx(t,e),r=kd(t,e);return!r||!n?!1:n<r.depth},B0=(t,e)=>{if(!Ji(t.state,e)||!oY(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:tR(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():nR(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},iX=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},rR=wt.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&B0(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&B0(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&U0(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&U0(t,n,r)&&(e=!0)}),e}}}}),IE=/^(\s*)(\d+)\.\s+(.*)$/,oX=/^\s/;function aX(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(IE);if(!i)break;const[,o,a,l]=i,c=o.length;let u=l,d=n+1;const f=[s];for(;d<t.length;){const p=t[d];if(p.match(IE))break;if(p.trim()==="")f.push(p),u+=` 580`,d+=1;else if(p.match(oX))f.push(p),u+=` 581${p.slice(c+2)}`,d+=1;else break}e.push({indent:c,number:parseInt(a,10),content:u.trim(),raw:f.join(` 582`)}),r=d,n=d}return[e,r]}function sR(t,e,n){var r;const s=[];let i=0;for(;i<t.length;){const o=t[i];if(o.indent===e){const a=o.content.split(` 583`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const u=a.slice(1).join(` 584`).trim();if(u){const p=n.blockTokens(u);c.push(...p)}let d=i+1;const f=[];for(;d<t.length&&t[d].indent>e;)f.push(t[d]),d+=1;if(f.length>0){const p=Math.min(...f.map(m=>m.indent)),g=sR(f,p,n);c.push({type:"list",ordered:!0,start:f[0].number,items:g,raw:f.map(m=>m.raw).join(` 585`)})}s.push({type:"list_item",raw:o.raw,tokens:c}),i=d}else i+=1}return s}function lX(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var cX="listItem",OE="textStyle",PE=/^(\d+)\.\s$/,iR=pn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",mt(this.options.HTMLAttributes,n),0]:["ol",mt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?lX(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 586`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(` 587`),[i,o]=aX(s);if(i.length===0)return;const a=sR(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:s.slice(0,o).join(` 588`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(cX,this.editor.getAttributes(OE)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Kl({find:PE,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Kl({find:PE,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(OE)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),uX=/^\s*(\[([( |x])?\])\s$/,dX=pn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",mt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Ax(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=u=>{var d,f;a.ariaLabel=((f=(d=this.options.a11y)==null?void 0:d.checkboxLabel)==null?void 0:f.call(d,u,a.checked))||`Task item checkbox for ${u.textContent||"empty task item"}`};return c(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:d}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const p=n();if(typeof p!="number")return!1;const g=f.doc.nodeAt(p);return f.setNodeMarkup(p,void 0,{...g==null?void 0:g.attrs,checked:d}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,d)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,d])=>{s.setAttribute(u,d)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),s.append(i,l),Object.entries(e).forEach(([u,d])=>{s.setAttribute(u,d)}),{dom:s,contentDOM:l,update:u=>u.type!==this.type?!1:(s.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,c(u),!0)}}},addInputRules(){return[Kl({find:uX,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),hX=pn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",mt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,` 589`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const o=O0(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(i)},s=O0(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});wt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(YM.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(JM.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(rR.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(iR.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(dX.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(hX.configure(this.options.taskList)),t}});var fX=pn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",mt(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];return n.length===1&&n[0].type==="image"?e.parseChildren([n[0]]):e.createNode("paragraph",void 0,e.parseInline(n))},renderMarkdown:(t,e)=>!t||!Array.isArray(t.content)?"":e.renderChildren(t.content),addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),pX=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,mX=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,gX=ma.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",mt(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
vendor: 5,022 bytes, line 589
589,addInputRules(){return[Gl({find:pX,type:this.type})]},addPasteRules(){return[aa({find:mX,type:this.type})]}}),yX=pn.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),oR=ma.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",mt(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),vX=oR;function bX(t={}){return new ct({view(e){return new wX(e,t)}})}class wX{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,a=i.height/s.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let p=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(p){let g=p.getBoundingClientRect(),m=d?g.bottom:g.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;r={left:g.left,right:g.right,top:m-y,bottom:m+y}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,p=d.height/l.offsetHeight;c=d.left-l.scrollLeft*f,u=d.top-l.scrollTop*p}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-u)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!i){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=sj(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class pt extends Pe{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return pt.valid(r)?new pt(r):Pe.near(r)}content(){return ne.empty}eq(e){return e instanceof pt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new pt(e.resolve(n.pos))}getBookmark(){return new Lx(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!xX(e)||!kX(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&pt.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>
vendor: 19,418 bytes, line 589
5890?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=n;let l=e.doc.resolve(s);if(pt.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!we.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let a=e.doc.resolve(s);if(pt.valid(a))return a}return null}}}pt.prototype.visible=!1;pt.findFrom=pt.findGapCursorFrom;Pe.jsonID("gapcursor",pt);class Lx{constructor(e){this.pos=e}map(e){return new Lx(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return pt.valid(n)?new pt(n):Pe.near(n)}}function aR(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function xX(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||aR(s.type))return!0;if(s.inlineContent)return!1}}return!0}function kX(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||aR(s.type))return!0;if(s.inlineContent)return!1}}return!0}function SX(){return new ct({props:{decorations:TX,createSelectionBetween(t,e,n){return e.pos==n.pos&&pt.valid(n)?new pt(n):null},handleClick:EX,handleKeyDown:CX,handleDOMEvents:{beforeinput:AX}}})}const CX=Xj({ArrowLeft:mh("horiz",-1),ArrowRight:mh("horiz",1),ArrowUp:mh("vert",-1),ArrowDown:mh("vert",1)});function mh(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof Se){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=pt.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new pt(c))),!0):!1}}function EX(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!pt.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&we.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new pt(r))),!0)}function AX(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof pt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=W.empty;for(let o=r.length-1;o>=0;o--)s=W.from(r[o].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new ne(s,0,0));return i.setSelection(Se.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function TX(t){if(!(t.selection instanceof pt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ot.create(t.doc,[ln.widget(t.selection.head,e,{key:"gapcursor"})])}var Ip=200,Ft=function(){};Ft.prototype.append=function(e){return e.length?(e=Ft.from(e),!this.length&&e||e.length<Ip&&this.leafAppend(e)||this.length<Ip&&e.leafPrepend(this)||this.appendInner(e)):this};Ft.prototype.prepend=function(e){return e.length?Ft.from(e).append(this):this};Ft.prototype.appendInner=function(e){return new _X(this,e)};Ft.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ft.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ft.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ft.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Ft.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},n,r),s};Ft.from=function(e){return e instanceof Ft?e:e&&e.length?new lR(e):Ft.empty};var lR=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,a){for(var l=i;l<o;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,a){for(var l=i-1;l>=o;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Ip)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Ip)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Ft);Ft.empty=new lR([]);var _X=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(s,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Ft);const NX=500;class kr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){s||(s=this.remapping(r,f+1),i=s.maps.length),i--,u.push(d);return}if(s){u.push(new Br(d.map));let p=d.step.map(s.slice(i)),g;p&&o.maybeStep(p).doc&&(g=o.mapping.maps[o.mapping.maps.length-1],c.push(new Br(g,void 0,void 0,c.length+u.length))),i--,g&&s.appendMap(g,i)}else o.maybeStep(d.step);if(d.selection)return a=s?d.selection.map(s.slice(i)):d.selection,l=new kr(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,s){let i=[],o=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new Br(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():a=a.slice(0,a.length-1)),i.push(f),n&&(o++,n=void 0),s||(l=f)}let c=o-r.depth;return c>OX&&(a=IX(a,c),o-=c),new kr(a.append(i),o)}remapping(e,n){let r=new qu;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new kr(this.items.append(e.map(n=>new Br(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},s);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;o=Math.min(o,p);let g=i.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),y=f.selection&&f.selection.map(i.slice(l+1,p));y&&a++,r.push(new Br(g,m,y))}else r.push(new Br(g))},s);let c=[];for(let f=n;f<o;f++)c.push(new Br(i.maps[f]));let u=this.items.slice(0,s).append(c).append(r),d=new kr(u,a);return d.emptyItemCount()>NX&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)s.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=o.selection&&o.selection.map(n.slice(r));u&&i++;let d=new Br(c.invert(),l,u),f,p=s.length-1;(f=s.length&&s[p].merge(d))?s[p]=f:s.push(d)}}else o.map&&r--},this.items.length,0),new kr(Ft.from(s.reverse()),i)}}kr.empty=new kr(Ft.empty,0);function IX(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class Br{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Br(n.getMap().invert(),n,this.selection)}}}class li{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const OX=20;function PX(t,e,n,r){let s=n.getMeta(Ho),i;if(s)return s.historyState;n.getMeta(RX)&&(t=new li(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Ho))return o.getMeta(Ho).redo?new li(t.done.addTransform(n,void 0,r,Wh(e)),t.undone,jE(n.mapping.maps),t.prevTime,t.prevComposition):new li(t.done,t.undone.addTransform(n,void 0,r,Wh(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!jX(n,t.prevRanges)),c=o?vy(t.prevRanges,n.mapping):jE(n.mapping.maps);return new li(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Wh(e)),kr.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new li(t.done.rebased(n,i),t.undone.rebased(n,i),vy(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new li(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),vy(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function jX(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function jE(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,o)=>e.push(i,o));return e}function vy(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function MX(t,e,n){let r=Wh(e),s=Ho.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),l=new li(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(Ho,{redo:n,historyState:l})}let by=!1,ME=null;function Wh(t){let e=t.plugins;if(ME!=e){by=!1,ME=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){by=!0;break}}return by}const Ho=new Ot("history"),RX=new Ot("closeHistory");function DX(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ct({key:Ho,state:{init(){return new li(kr.empty,kr.empty,null,0,-1)},apply(e,n,r){return PX(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?uR:r=="historyRedo"?dR:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function cR(t,e){return(n,r)=>{let s=Ho.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=MX(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const uR=cR(!1,!0),dR=cR(!0,!0);wt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ct({key:new Ot("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const o=i-s,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=i-r,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}});var LX=wt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[bX(this.options)]}});wt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ct({key:new Ot("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return ot.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(ln.node(c,c+l.nodeSize,{class:this.options.className}))}),ot.create(t,i)}}})]}});var $X=wt.create({name:"gapCursor",addProseMirrorPlugins(){return[SX()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ve(ye(t,"allowGapCursor",n)))!=null?e:null}}});wt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ct({key:new Ot("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,s=[];if(!n)return null;const i=this.editor.isEmpty;return t.descendants((o,a)=>{const l=r>=a&&r<=a+o.nodeSize,c=!o.isLeaf&&Rm(o);if((l||!this.options.showOnlyCurrent)&&c){const u=[this.options.emptyNodeClass];i&&u.push(this.options.emptyEditorClass);const d=ln.node(a,a+o.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});s.push(d)}return this.options.includeChildren}),ot.create(t,s)}}})]}});wt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ct({key:new Ot("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||mM(n.selection)||t.view.dragging?null:ot.create(n.doc,[ln.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function RE({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var FX=wt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ot(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new ct({key:e,appendTransaction:(s,i,o)=>{const{doc:a,tr:l,schema:c}=o,u=e.getState(o),d=a.content.size,f=c.nodes[n];if(u)return l.insert(d,f.create())},state:{init:(s,i)=>{const o=i.tr.doc.lastChild;return!RE({node:o,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const o=s.doc.lastChild;return!RE({node:o,types:r})}}})]}}),zX=wt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>uR(t,e),redo:()=>({state:t,dispatch:e})=>dR(t,e)}},addProseMirrorPlugins(){return[DX(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),UX=wt.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(pQ.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(cQ.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(YM.configure(this.options.bulletList)),this.options.code!==!1&&s.push(yQ.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(wQ.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(xQ.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(LX.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push($X.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(kQ.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(SQ.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(zX.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(CQ.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(NQ.configure(this.options.italic)),this.options.listItem!==!1&&s.push(JM.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(rR.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(ZM.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(iR.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(fX.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(gX.configure(this.options.strike)),this.options.text!==!1&&s.push(yX.configure(this.options.text)),this.options.underline!==!1&&s.push(oR.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(FX.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),BX=UX,VX=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,HX=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,hR=t=>t.match(VX),DE=(t,e)=>e?"https://www.youtube-nocookie.com/embed/videoseries?list=":t?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",WX=t=>{const{url:e,allowFullscreen:n,autoplay:r,ccLanguage:s,ccLoadPolicy:i,controls:o,disableKBcontrol
589s:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:f,modestBranding:p,nocookie:g,origin:m,playlist:y,progressBarColor:b,startAt:w,rel:x}=t;if(!hR(e))return null;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){const A=e.split("/").pop();return A?`${DE(g)}${A}`:null}const S=/(?:(v|list)=|shorts\/)([-\w]+)/gm.exec(e);if(!S||!S[2])return null;let E=`${DE(g,S[1]==="list")}${S[2]}`;const C=[];return n===!1&&C.push("fs=0"),r&&C.push("autoplay=1"),s&&C.push(`cc_lang_pref=${s}`),i&&C.push("cc_load_policy=1"),o||C.push("controls=0"),a&&C.push("disablekb=1"),l&&C.push("enablejsapi=1"),c&&C.push(`end=${c}`),u&&C.push(`hl=${u}`),d&&C.push(`iv_load_policy=${d}`),f&&C.push("loop=1"),p&&C.push("modestbranding=1"),m&&C.push(`origin=${m}`),y&&C.push(`playlist=${y}`),w&&C.push(`start=${w}`),b&&C.push(`color=${b}`),x!==void 0&&C.push(`rel=${x}`),C.length&&(E+=`${S[1]==="v"?"?":"&"}${C.join("&")}`),E},qX=pn.create({name:"youtube",addOptions(){return{addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640,rel:1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML(){return[{tag:"div[data-youtube-video] iframe"}]},addCommands(){return{setYoutubeVideo:t=>({commands:e})=>hR(t.src)?e.insertContent({type:this.name,attrs:t}):!1}},addPasteRules(){return this.options.addPasteHandler?[eJ({find:HX,type:this.t
589ype,getAttributes:t=>({src:t.input})})]:[]},renderHTML({HTMLAttributes:t}){const e=WX({url:t.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:t.start||0,rel:this.options.rel});return t.src=e,["div",{"data-youtube-video":""},["iframe",mt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,rel:this.options.rel},t)]]},...MM({nodeName:"youtube",allowedAttributes:["src","width","height","start"]})}),GX=qX,KX=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,ZX=pn.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",mt(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,s,i,o;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(s=(r=t.attrs)==null?void 0:r.alt)!=null?s:"",c=(o=(i=t.attrs)==null?void 0:i.title)!=null?o:"";return c?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:s,getPos:i,HTMLAttributes:o,editor:a})=>{const l=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:l.setAttribute(d,f);break}}),l.src=o.src;const c=new qY({element:l,editor:a,node:s,getPos:i,onResize:(d,f)=>{l.style.width=`${d}px`,l.style.height=`${f}px`},onCommit:(d,f)=>{const p=i();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,p)=>d.type===s.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",l.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}}
589,addInputRules(){return[jM({find:KX,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),YX=ZX;const JX=YX.extend({name:"image",addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const n=e.style.width,r=e.getAttribute("width"),s=n||(r?`${r}px`:""),i=parseInt(s);return Number.isFinite(i)?i:null},renderHTML:e=>e.width?{style:`width: ${e.width}px;`}:{}},height:{default:null}}},addNodeView(){return({node:t,getPos:e,editor:n})=>{const r=document.createElement("span");r.className="tiptap-image-wrapper relative inline-block align-bottom select-none";const s=document.createElement("img");s.src=t.attrs.src,s.alt=t.attrs.alt||"",s.title=t.attrs.title||"",s.draggable=!0,s.className="rounded-lg max-w-full h-auto",t.attrs.width&&(s.style.width=`${t.attrs.width}px`);const i=document.createElement("span");i.className="tiptap-image-handle";const o=a=>{a.preventDefault(),a.stopPropagation();const l=a.clientX,u=s.getBoundingClientRect().width,d=p=>{const g=p.clientX-l,m=Math.max(60,Math.round(u+g));s.style.width=`${m}px`},f=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",f);const p=parseInt(s.style.width),g=e();if(typeof g=="number"){const m=n.state.tr.setNodeMarkup(g,void 0,{...t.attrs,width:p});n.view.dispatch(m)}};window.addEventListener("mousemove",d),window.addEventListener("mouseup",f)};return i.addEventListener("mousedown",o),r.appendChild(s),r.appendChild(i),{dom:r,update:a=>a.type!==t.type?!1:(a.attrs.src!==s.src&&(s.src=a.attrs.src),a.attrs.width?s.style.width=`${a.attrs.width}px`:s.style.removeProperty("width"),!0),destroy:()=>{i.removeEventListener("mousedown",o)}}}}}),fR=({value:t,onChange:e,mode:n="featured",onInsert:r})=>{const[s,i]=v.useState(!1),[o,a]=v.useState(t||""),l=v.useRef(null),c=v.useRef(null),{toast:u}=Ir();v.useEffect(()=>{a(t||"")},[t]);const d=async m=>{i(!0);try{const y=m.name.split(".").pop(),w=`${`${Math.random().toString(36).substring(2)}-${Date.now()}.${y}`}`,{error:x}=await xe.storage.from("blog-images").upload(w,m,{cacheControl:"3600",upsert:!1});if(x)throw x;const{data:{publicUrl:k}}=xe.storage.from("blog-images").getPublicUrl(w);n==="inline"&&r?(r(k),u({title:"Success",description:"Image inserted into editor"})):(a(k),e(k),u({title:"Success",description:"Image uploaded successfully"}))}catch(y){console.error("Error uploading image:",y),console.error("Error details:",JSON.stringify(y,null,2));const b=(y==null?void 0:y.message)||(y==null?void 0:y.error_description)||(y==null?void 0:y.statusText)||"Failed to upload image";u({title:"Upload Error",description:b,variant:"destructive"})}finally{i(!1)}},f=async m=>{var b;const y=(b=m.target.files)==null?void 0:b[0];if(y){if(!y.type.startsWith("image/")){u({title:"Error",description:"Please select an image file",variant:"destructive"});return}if(!Of(y)){u({title:"Unsupported format",description:Pf(y),variant:"destructive"});return}await d(y)}},p=async m=>{var b;const y=(b=m.clipboardData)==null?void 0:b.items;if(y){for(const w of y)if(w.type.startsWith("image/")){m.preventDefault();const x=w.getAsFile();if(x){if(!Of(x)){u({title:"Unsupported format",description:Pf(x),variant:"destructive"});return}await d(x)}break}}};v.useEffect(()=>{const m=c.current;if(m)return m.addEventListener("paste",p),()=>{m.removeEventListener("paste",p)}},[]);const g=()=>{a(""),e(""),l.current&&(l.current.value="")};return h.jsxs("div",{children:[n==="featured"&&h.jsx(gt,{children:"Featured Image"}),n==="featured"&&o?h.jsxs("div",{className:"mt-2 relative",children:[h.jsx("img",{src:o,alt:"Preview",className:"w-full max-h-64 object-cover rounded-lg border"}),h.jsx(oe,{type:"button",variant:"destructive",size:"sm",className:"absolute top-2 right-2",onClick:g,children:h.jsx(Zp,{className:"h-4 w-4"})})]}):n==="featured"?h.jsxs("div",{ref:c,className:"mt-2 border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors cursor-pointer",onClick:()=>{var m;return(m=l.current)==null?void 0:m.click()},tabIndex:0,children:[h.jsx(kv,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),h.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Click to upload or paste an image"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Supports: JPG, PNG, GIF, WEBP"})]}):h.jsxs("div",{ref:c,className:"border-2 border-dashed rounded-lg p-6 text-center hover:border-primary transition-colors cursor-pointer",onClick:()=>{var m;return(m=l.current)==null?void 0:m.click()},tabIndex:0,children:[h.jsx(kv,{className:"h-8 w-8 mx-auto mb-2 text-muted-foreground"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload image or paste from clipboard"})]}),h.jsx("input",{ref:l,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",onChange:f,className:"hidden"}),s&&h.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Uploading..."})]})},pR=v.forwardRef(({content:t,onChange:e},n)=>{const[r,s]=v.useState(!1),[i,o]=v.useState(!1),[a,l]=v.useState(!1),[c,u]=v.useState(""),[d,f]=v.useState(""),[p,g]=v.useState(""),[m,y]=v.useState(!1),{toast:b}=Ir(),w=async A=>
589{if(!A.type.startsWith("image/"))return b({title:"Invalid file type",description:"Please select an image file (JPG, PNG, GIF, WEBP)",variant:"destructive"}),null;if(!Of(A))return b({title:"Unsupported format",description:Pf(A),variant:"destructive"}),null;if(A.size>10485760)return b({title:"File too large",description:"Image must be less than 10MB",variant:"destructive"}),null;try{const N=await bW(A);return b({title:"Image uploaded",description:"Image has been inserted into the editor"}),N}catch(N){return b({title:"Upload failed",description:N.message||"Failed to upload image. Please try again.",variant:"destructive"}),null}},x=sQ({extensions:[BX,vX,eX.configure({openOnClick:!1}),JX.configure({inline:!0,allowBase64:!0,HTMLAttributes:{class:"rounded-lg max-w-full h-auto cursor-move"}}),GX.configure({width:640,height:360})],content:t,onUpdate:({editor:A})=>{e(A.getHTML())},editorProps:{attributes:{class:"blog-prose focus:outline-none min-h-[400px] max-w-none p-4"},handleDrop:(A,N,M,F)=>{if(!F&&N.dataTransfer&&N.dataTransfer.files&&N.dataTransfer.files[0]){const P=N.dataTransfer.files[0];if(P.type.startsWith("image/")){N.preventDefault();const{schema:V}=A.state,_=A.posAtCoords({left:N.clientX,top:N.clientY});return w(P).then(H=>{if(H&&_){const B=V.nodes.image.create({src:H}),$=A.state.tr.insert(_.pos,B);A.dispatch($)}}),!0}}return!1},handlePaste:(A,N)=>{var F;const M=(F=N.clipboardData)==null?void 0:F.items;if(M){for(let P=0;P<M.length;P++)if(M[P].type.startsWith("image/")){const V=M[P].getAsFile();if(V)return N.preventDefault(),w(V).then(_=>{if(_){const{schema:H}=A.state,B=H.nodes.image.create({src:_}),$=A.state.tr.replaceSelectionWith(B);A.dispatch($)}}),!0}}return!1}}});if(v.useEffect(()=>{x&&t!==x.getHTML()&&x.commands.setContent(t)},[t,x]),v.useImperativeHandle(n,()=>({insertImage:A=>{x&&x.chain().focus().setImage({src:A}).run()}})),!x)return null;const k=()=>{c&&(x.chain().focus().setLink({href:c}).run(),u(""),s(!1))},S=()=>{d&&(x.chain().focus().setImage({src:d}).run(),f(""),o(!1))},E=A=>{x.chain().focus().setImage({src:A}).run(),o(!1)},C=()=>{p&&(x.commands.setYoutubeVideo({src:p}),g(""),l(!1))};return h.jsxs("div",{className:"border rounded-lg overflow-hidden bg-background",children:[h.jsxs("div",{className:"border-b bg-muted/50 p-2",children:[h.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:h.jsx("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1 w-full",children:"ð¡ Tip: Drag & drop images directly into the editor, or paste from clipboard"})}),h.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleBold().run(),className:x.isActive("bold")?"bg-accent":"",children:h.jsx(x5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleItalic().run(),className:x.isActive("italic")?"bg-accent":"",children:h.jsx(P5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleUnderline().run(),className:x.isActive("underline")?"bg-accent":"",children:h.jsx(J5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleStrike().run(),className:x.isActive("strike")?"bg-accent":"",children:h.jsx(Y5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleCode().run(),className:x.isActive("code")?"bg-accent":"",children:h.jsx(ck,{className:"h-4 w-4"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-1"}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleHeading({level:1}).run(),className:x.isActive("heading",{level:1})?"bg-accent":"",children:h.jsx(N5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleHeading({level:2}).run(),className:x.isActive("heading",{level:2})?"bg-accent":"",children:h.jsx(I5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleHeading({level:3}).run(),className:x.isActive("heading",{level:3})?"bg-accent":"",children:h.jsx(O5,{className:"h-4 w-4"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-1"}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleBulletList().run(),className:x.isActive("bulletList")?"bg-accent":"",children:h.jsx(L5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleOrderedList().run(),className:x.isActive("orderedList")?"bg-accent":"",children:h.jsx(D5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleBlockquote().run(),className:x.isActive("blockquote")?"bg-accent":"",children:h.jsx(H5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().toggleCodeBlock().run(),className:x.isActive("codeBlock")?"bg-accent":"",children:h.jsx(ck,{className:"h-4 w-4"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-1"}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>s(!0),children:h.jsx(M5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>o(!0),children:h.jsx(kv,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>l(!0),children:h.jsx(e3,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().setHorizontalRule().run(),children:h.jsx(U5,{className:"h-4 w-4"})}),h.jsx("div",{className:"w-px h-8 bg-border mx-1"}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>
589x.chain().focus().undo().run(),disabled:!x.can().undo(),children:h.jsx(Q5,{className:"h-4 w-4"})}),h.jsx(oe,{type:"button",variant:"ghost",size:"sm",onClick:()=>x.chain().focus().redo().run(),disabled:!x.can().redo(),children:h.jsx(W5,{className:"h-4 w-4"})})]})]}),h.jsx(JJ,{editor:x,className:"bg-background"}),h.jsx(Rh,{open:r,onOpenChange:s,children:h.jsxs(Yc,{children:[h.jsx(Jc,{children:h.jsx(Qc,{children:"Insert Link"})}),h.jsx("div",{className:"space-y-4",children:h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"link-url",children:"URL"}),h.jsx(Nt,{id:"link-url",type:"url",placeholder:"https://example.com",value:c,onChange:A=>u(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),k())}})]})}),h.jsxs(Dh,{children:[h.jsx(oe,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),h.jsx(oe,{onClick:k,children:"Insert Link"})]})]})}),h.jsx(Rh,{open:i,onOpenChange:o,children:h.jsxs(Yc,{children:[h.jsxs(Jc,{children:[h.jsx(Qc,{children:"Insert Image"}),h.jsx(Ew,{children:"Upload an image or enter an image URL."})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsx("div",{children:h.jsx(fR,{mode:"inline",value:"",onChange:()=>{},onInsert:E})}),h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute inset-0 flex items-center",children:h.jsx("span",{className:"w-full border-t"})}),h.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:h.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"Or enter URL"})})]}),h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"image-url",children:"Image URL"}),h.jsx(Nt,{id:"image-url",type:"url",placeholder:"https://example.com/image.jpg",value:d,onChange:A=>f(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),S())},disabled:m})]})]}),h.jsxs(Dh,{children:[h.jsx(oe,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),h.jsx(oe,{onClick:S,disabled:!d||m,children:"Insert URL"})]})]})}),h.jsx(Rh,{open:a,onOpenChange:l,children:h.jsxs(Yc,{children:[h.jsx(Jc,{children:h.jsx(Qc,{children:"Embed YouTube Video"})}),h.jsx("div",{className:"space-y-4",children:h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"youtube-url",children:"YouTube URL"}),h.jsx(Nt,{id:"youtube-url",type:"url",placeholder:"https://www.youtube.com/watch?v=...",value:p,onChange:A=>g(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),C())}})]})}),h.jsxs(Dh,{children:[h.jsx(oe,{variant:"outline",onClick:()=>l(!1),children:"Cancel"}),h.jsx(oe,{onClick:C,children:"Embed Video"})]})]})})]})});pR.displayName="TiptapEditor";const QX=t=>{const r=t.replace(/<[^>]*>/g,"").split(/\s+/).filter(i=>i.length>0).length;return`${Math.ceil(r/200)} min read`},XX=E7({title:Ia().min(1,"Title is required"),slug:Ia().min(1,"Slug is required"),category:Ia().min(1,"Category is required"),tags:Ia(),featured_image:Ia().optional().or(A7("")),sticky:C7(),excerpt:Ia().optional()}),eee=1e4,tee=({postId:t,draftId:e,onSuccess:n})=>{const[r,s]=v.useState(""),[i,o]=v.useState(!1),[a,l]=v.useState(!t&&!e),[c,u]=v.useState(null),[d,f]=v.useState(null),[p,g]=v.useState(null),[m,y]=v.useState(null),[b,w]=v.useState("idle"),[x,k]=v.useState(!1),{toast:S}=Ir(),E=v.useRef(null),C=v.useRef(!0),A=v.useRef(null),{register:N,handleSubmit:M,setValue:F,watch:P,formState:{errors:V}}=G9({resolver:J9(XX),defaultValues:{title:"",slug:"",category:"Uncategorized",tags:"",featured_image:"",sticky:!1,excerpt:""}}),_=P("title"),H=P("sticky"),B=P("featured_image"),$=P();v.useEffect(()=>{(async()=>{const{data:{user:re}}=await xe.auth.getUser();re!=null&&re.email&&u(re.email)})()},[]);const O=v.useCallback(async()=>{if(!x)return;const Y=P();if(!(!Y.title&&!r))try{w("saving");const{data:{user:re}}=await xe.auth.getUser();if(!re)return;const D=Y.tags.split(",").map(pe=>pe.trim()).filter(pe=>pe),be={user_id:re.id,source_post_id:t||null,title:Y.title||"Untitled",slug:Y.slug||"untitled",category:Y.category,tags:D,featured_image:Y.featured_image||null,sticky:Y.sticky,content:r,excerpt:Y.excerpt||null,author:"Matt Turck",updated_at:new Date().toISOString()},De=p||d;if(De){const{error:pe}=await xe.from("blog_drafts").update(be).eq("id",De);if(pe)throw pe}else if(t){const{data:pe}=await xe.from("blog_drafts").select("id").eq("user_id",re.id).eq("source_post_id",t).maybeSingle();if(pe){g(pe.id);const{error:fe}=await xe.from("blog_drafts").update(be).eq("id",pe.id);if(fe)throw fe}else{const{data:fe,error:Ce}=await xe.from("blog_drafts").insert([be]).select("id").single();if(Ce)throw Ce;fe&&g(fe.id)}}else{const{data:pe,error:fe}=await xe.from("blog_drafts").insert([be]).select("id").single();if(fe)throw fe;pe&&g(pe.id)}y(new Date),w("saved"),k(!1)}catch(re){console.error("Autosave failed:",re),w("error")}},[t,x,r,p,d,P]);v.useEffect(()=>{const Y=setInterval(()=>{O()},eee);return()=>clearInterval(Y)},[O]),v.useEffect(()=>{C.current||(k(!0),w("idle"))},[r]),v.useEffect(()=>{C.current||JSON.stringify($)!==JSON.stringify(A.current)&&(A.current=$,k(!0),w("idle"))},[$]),v.useEffect(()=>{if(!t)return;(async()=>{var be;const{data:{user:re}}=await xe.auth.getUser();if(!re)return;const{data:D}=await xe.from("blog_drafts").select("*").eq("user_id",re.id).eq("source_post_id",t).maybeSingle();D&&(window.confirm(`Found an autosaved version from ${new Date(D.updated_at).toLocaleStr
589ing()}. Would you like to restore it?`)?(F("title",D.title||""),F("slug",D.slug||""),F("category",D.category||"Uncategorized"),F("tags",((be=D.tags)==null?void 0:be.join(", "))||""),F("featured_image",D.featured_image||""),F("sticky",D.sticky||!1),F("excerpt",D.excerpt||""),s(D.content||""),g(D.id),S({title:"Autosave restored",description:"Your previous unsaved changes have been restored."})):g(D.id))})()},[t,F,S]),v.useEffect(()=>{if(_&&!t){const Y=_.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"");F("slug",Y)}},[_,F,t]);const R=v.useRef(void 0);v.useEffect(()=>{B&&E.current&&!t&&!C.current&&R.current!==B&&E.current.insertImage(B),R.current=B},[B,t]),v.useEffect(()=>{t&&se()},[t]),v.useEffect(()=>{e&&K(e)},[e]),v.useEffect(()=>{!t&&!e&&setTimeout(()=>{C.current=!1},500)},[t,e]);const K=async Y=>{var re;try{const{data:D,error:be}=await xe.from("blog_drafts").select("*").eq("id",Y).single();if(be)throw be;D&&(F("title",de(D.title||"")),F("slug",D.slug||""),F("category",D.category||"Uncategorized"),F("tags",((re=D.tags)==null?void 0:re.join(", "))||""),F("featured_image",D.featured_image||""),F("sticky",D.sticky||!1),F("excerpt",D.excerpt?de(D.excerpt):""),s(D.content||""),f(Y),R.current=D.featured_image||"",setTimeout(()=>{C.current=!1},500),S({title:"Draft loaded",description:"You can continue editing your draft."}))}catch{S({title:"Error",description:"Failed to load draft.",variant:"destructive"})}},de=Y=>{const re=document.createElement("textarea");return re.innerHTML=Y,re.value},se=async()=>{var Y;try{const re="blog_posts",{data:D,error:be}=await xe.from(re).select("*").eq("id",t).single();if(be)throw be;D&&(F("title",de(D.title)),F("slug",D.slug),F("category",D.category||"Uncategorized"),F("tags",((Y=D.tags)==null?void 0:Y.join(", "))||""),F("featured_image",D.featured_image||""),F("sticky",D.sticky||!1),F("excerpt",D.excerpt?de(D.excerpt):""),s(D.content||""),setTimeout(()=>{C.current=!1},500))}catch{S({title:"Error",description:"Failed to load post.",variant:"destructive"})}},ae=async Y=>{o(!0);try{const{data:{user:re}}=await xe.auth.getUser();if(!re){S({title:"Error",description:"You must be logged in to save drafts.",variant:"destructive"});return}const D=Y.tags.split(",").map(fe=>fe.trim()).filter(fe=>fe),be=(c==null?void 0:c.split("@")[0])||"Matt Turck",De={user_id:re.id,title:Y.title,slug:Y.slug,category:Y.category,tags:D,featured_image:Y.featured_image||null,sticky:Y.sticky,content:r,excerpt:Y.excerpt||null,author:be,updated_at:new Date().toISOString()},pe=p||d;if(pe){const{error:fe}=await xe.from("blog_drafts").update(De).eq("id",pe);if(fe)throw fe}else{const{data:fe,error:Ce}=await xe.from("blog_drafts").insert([De]).select("id").single();if(Ce)throw Ce;fe&&g(fe.id)}k(!1),y(new Date),w("saved"),S({title:"Success",description:"Draft saved successfully."})}catch{S({title:"Error",description:"Failed to save draft.",variant:"destructive"})}finally{o(!1)}},he=async Y=>{if(!r||r.trim().length===0){S({title:"Error",description:"Content is required.",variant:"destructive"});return}o(!0);try{const re=Y.tags.split(",").map(pe=>pe.trim()).filter(pe=>pe),D=QX(r),De={title:Y.title,slug:Y.slug,category:Y.category,tags:re,featured_image:Y.featured_image||null,sticky:Y.sticky,content:r,excerpt:Y.excerpt||null,author:"Matt Turck",read_time:D};if(t){const pe="blog_posts",{error:fe}=await xe.from(pe).update(De).eq("id",t);if(fe)throw fe;p&&(await xe.from("blog_drafts").delete().eq("id",p),g(null)),k(!1),S({title:"Success",description:"Post updated successfully."})}else{const pe="blog_posts",{data:fe,error:Ce}=await xe.from(pe).insert([{...De,date:new Date().toISOString()}]).select().single();if(Ce)throw Ce;if(S({title:"Success",description:"Post published successfully."}),d&&await xe.from("blog_drafts").delete().eq("id",d),p&&p!==d&&(await xe.from("blog_drafts").delete().eq("id",p),g(null)),k(!1),a&&fe)try{const{data:nt,error:Pt}=await xe.functions.invoke("send-newsletter-for-post",{body:{post_id:fe.id,title:Y.title,slug:Y.slug,content:r,excerpt:Y.excerpt||null}});Pt?(console.error("Newsletter error:",Pt),S({title:"Newsletter",description:"Post published but newsletter scheduling failed. You can trigger it manually.",variant:"destructive"})):nt!=null&&nt.skipped?S({title:"Newsletter",description:"Newsletter was already sent for this post."}):S({title:"Newsletter Scheduled",description:"Newsletter will be sent at 4pm ET."})}catch(nt){console.error("Newsletter invocation error:",nt)}}n&&n()}catch(re){console.error("Post save error:",re);const D=(re==null?void 0:re.message)||(re==null?void 0:re.error_description)||"Failed to save post.";S({title:"Error",description:D,variant:"destructive"})}finally{o(!1)}};return h.jsxs("form",{className:"space-y-6",children:[h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"title",children:"Title *"}),h.jsx(Nt,{id:"title",...N("title"),placeholder:"Enter post title",className:"text-lg font-medium"}),V.title&&h.jsx("p",{className:"text-sm text-destructive mt-1",children:V.title.message})]}),h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"slug",children:"Slug *"}),h.jsx(Nt,{id:"slug",...N("slug"),placeholder:"post-slug"}),V.slug&&h.jsx("p",{className:"text-sm text-destructive mt-1",children:V.slug.message})]}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"category",children:"Category *"}),h.jsxs(XO,{value:P("category"),onValueChange:Y=>F("category",Y),children:[h.jsx(Vw,{children:h.jsx(eP,{placeholder:"Select category"})}),h.jsxs(Hw,{children:[h.jsx(hi,{value:"AI",children:"AI"}),h.jsx(hi,{value:"IPO",children:"IPO"}),h.jsx(hi,{value:"New Investment",children:"New Investment"}),h.jsx(hi,{value:"Data",children:"Data"}),h.jsx(hi,{value:"Uncategorized",children:"Uncategorized"})]})]}),V.category&&h.jsx("p",{className:"text-sm text-destructive mt-1",children:V.category.message})]}),h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"tags",children:"Tags (comma-separated)"}),h.jsx(Nt,{id:"tags",...N("tags"),placeholder:"machine learning, ai, data science"})]})]}),h.jsx("div",{children:h.jsx(fR,{value:P("featured_image"),onChange:Y=>F("featured_image",Y)})}),h.jsxs("div",{children:[h.jsx(gt,{htmlFor:"excerpt",children:"Excerpt (optional)"}),h.jsx(Nt,{id:"excerpt",...N("excerpt"),placeholder:"Brief summary of the post"})]}),h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx(xP,{id:"sticky",checked:H,onCheckedChange:Y=>F("sticky",Y)}),h.jsx(gt,{htmlFor:"sticky",className:"cursor-pointer",children:"Pin this post to the top"})]}),h.jsxs("div",{children:[h.jsx(gt,{children:"Content *"}),h.jsx(pR,{ref:E,content:r,onChange:s})]})]}),!t&&h.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-muted/50 rounded-lg border",children:[h.jsx(NP,{id:"sendNewsletter",checked:a,onCheckedChange:Y=>l(Y===!0)}),h.jsxs(gt,{htmlFor:"sendNewsletter",className:"cursor-pointer flex items-center gap-2",children:[h.jsx(F5,{className:"h-4 w-4"}),"Send newsletter notification (scheduled for 4pm ET)"]})]}),h.jsxs("div",{className:"flex gap-3 pt-4 border-t items-center",children:[!t&&h.jsxs(oe,{type:"button",variant:"outline",onClick:M(ae),disabled:i,children:[h.jsx(G5,{className:"h-4 w-4 mr-2"}),"Save Draft"]}),h.jsxs(oe,{type:"button",onClick:M(he),disabled:i,children:[h.jsx(K5,{
589className:"h-4 w-4 mr-2"}),t?"Update Post":"Publish Post"]}),h.jsxs("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground",children:[b==="saving"&&h.jsxs(h.Fragment,{children:[h.jsx(xg,{className:"h-4 w-4 animate-pulse"}),h.jsx("span",{children:"Saving..."})]}),b==="saved"&&m&&h.jsxs(h.Fragment,{children:[h.jsx(xg,{className:"h-4 w-4 text-green-500"}),h.jsxs("span",{children:["Autosaved ",m.toLocaleTimeString()]})]}),b==="error"&&h.jsxs(h.Fragment,{children:[h.jsx(E5,{className:"h-4 w-4 text-destructive"}),h.jsx("span",{children:"Autosave failed"})]}),b==="idle"&&x&&h.jsxs(h.Fragment,{children:[h.jsx(xg,{className:"h-4 w-4"}),h.jsx("span",{children:"Unsaved changes"})]})]})]})]})},nee=({onLoadDraft:t})=>{const[e,n]=v.useState([]),[r,s]=v.useState(!0),{toast:i}=Ir(),o=async()=>{try{const{data:l,error:c}=await xe.from("blog_drafts").select("id, title, slug, created_at, updated_at").order("updated_at",{ascending:!1});if(c)throw c;n(l||[])}catch(l){console.error("Error fetching drafts:",l),i({title:"Error",description:"Failed to load drafts",variant:"destructive"})}finally{s(!1)}},a=async l=>{try{const{error:c}=await xe.from("blog_drafts").delete().eq("id",l);if(c)throw c;i({title:"Success",description:"Draft deleted successfully"}),o()}catch(c){console.error("Error deleting draft:",c),i({title:"Error",description:"Failed to delete draft",variant:"destructive"})}};return v.useEffect(()=>{o()},[]),r?h.jsx("div",{className:"text-center py-4 text-muted-foreground",children:"Loading drafts..."}):e.length===0?h.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[h.jsx(B_,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),h.jsx("p",{children:"No drafts saved yet"})]}):h.jsxs("div",{className:"space-y-2",children:[h.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Saved Drafts"}),e.map(l=>h.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg hover:bg-muted/50 transition-colors",children:[h.jsxs("div",{className:"flex-1",children:[h.jsx("h4",{className:"font-medium",children:l.title}),h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",md(new Date(l.updated_at),"MMM d, yyyy h:mm a")]})]}),h.jsxs("div",{className:"flex gap-2",children:[t&&h.jsx(oe,{variant:"outline",size:"sm",onClick:()=>t(l.id),children:"Load"}),h.jsx(oe,{variant:"ghost",size:"sm",onClick:()=>a(l.id),children:h.jsx(H_,{className:"h-4 w-4"})})]})]},l.id))]})},ree=ud("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),mR=v.forwardRef(({className:t,variant:e,...n},r)=>h.jsx("div",{ref:r,role:"alert",className:ee(ree({variant:e}),t),...n}));mR.displayName="Alert";const see=v.forwardRef(({className:t,...e},n)=>h.jsx("h5",{ref:n,className:ee("mb-1 font-medium leading-none tracking-tight",t),...e}));see.displayName="AlertTitle";const gR=v.forwardRef(({className:t,...e},n)=>h.jsx("div",{ref:n,className:ee("text-sm [&_p]:leading-relaxed",t),...e}));gR.displayName="AlertDescription";const iee=()=>{const[t,e]=v.useState(!1),[n,r]=v.useState(null),[s,i]=v.useState(null),[o,a]=v.useState("create"),l=ha(),{toast:c}=Ir(),u=async()=>{e(!0);try{await xe.auth.signOut(),c({title:"Logged out",description:"You have been logged out successfully."}),l("/auth")}catch{c({title:"Error",description:"Failed to log out. Please try again.",variant:"destructive"})}finally{e(!1)}};return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b",children:h.jsxs("div",{className:"container mx-auto px-4 py-4 flex items-center justify-between",children:[h.jsx("h1",{className:"text-2xl font-bold",children:"Blog Admin"}),h.jsxs(oe,{variant:"outline",size:"sm",onClick:u,disabled:t,children:[h.jsx($5,{className:"h-4 w-4 mr-2"}),"Logout"]})]})}),h.jsxs("main",{className:"container mx-auto px-4 py-8",children:[(n||s)&&h.jsxs(mR,{className:"mb-6 border-primary bg-primary/5",children:[h.jsx(dk,{className:"h-4 w-4"}),h.jsxs(gR,{className:"flex items-center justify-between",children:[h.jsx("span",{className:"font-medium",children:n?`Editing post (ID: ${n})`:"Editing draft"}),h.jsxs(oe,{variant:"ghost",size:"sm",onClick:()=>{r(null),i(null),a("manage")},className:"h-8",children:[h.jsx(Zp,{className:"h-4 w-4 mr-1"}),"Cancel"]})]})]}),h.jsxs(I8,{value:o,onValueChange:a,className:"w-full",children:[h.jsxs(BI,{className:"grid w-full max-w-2xl grid-cols-3",children:[h.jsx(Lh,{value:"create",className:"gap-2",children:n?h.jsxs(h.Fragment,{children:[h.jsx(dk,{className:"h-4 w-4"}),"Edit Post"]}):h.jsxs(h.Fragment,{children:[h.jsx(_5,{className:"h-4 w-4"}),"Create New"]})}),h.jsxs(Lh,{value:"manage",className:"gap-2",children:[h.jsx(Z5,{className:"h-4 w-4"}),"Manage Posts"]}),h.jsxs(Lh,{value:"videos",className:"gap-2",children:[h.jsx(X5,{className:"h-4 w-4"}),"Featured Video"]})]}),h.jsxs($h,{value:"create",className:"mt-6 space-y-6",children:[h.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[h.jsx("h2",{className:"text-xl font-semibold mb-4",children:n?"Edit Post":"Create New Post"}),h.jsx(tee,{postId:n||void 0,draftId:s||void 0,onSuccess:()=>{r(null),i(null),a("manage")}})]}),!n&&!s&&h.jsx("div",{className:"bg-card p-6 rounded-lg border",children:h.jsx(nee,{onLoadDraft:d=>{i(d),r(null)}})})]}),h.jsx($h,{value:"manage",className:"mt-6",children:h.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[h.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Manage Posts"}),h.jsx(C9,{onEditPost:d=>{r(d),a("create")}})]})}),h.jsx($h,{value:"videos",className:"mt-6",children:h.jsxs("div",{className:"bg-card p-6 rounded-lg border",children:[h.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Featured Podcast Video"}),h.jsx(E9,{})]})})]})]})]})},oee=({children:t})=>{const[e,n]=v.useState(!0),[r,s]=v.useState(!1);return v.useEffect(()=>{let i=!0;const o=async()=>{try{const{data:{session:l}}=await xe.auth.getSession();if(!i)return;if(!l){s(!1),n(!1);return}const{data:c,error:u}=await xe.from("user_roles").select("role").eq("user_id",l.user.id).in("role",["admin","editor"]);if(!i)return;u?(console.error("Error checking user role:",u),s(!1)):s(c&&c.length>0)}catch(l){console.error("Error in access check:",l),i&&s(!1)}finally{i&&n(!1)}};o();const{data:{subscription:a}}=xe.auth.onAuthStateChange(()=>{i&&o()});return()=>{i=!1,a.unsubscribe()}},[]),e?h.jsx("div",{className:"min-h-screen flex items-center justify-center",children:h.jsx(el,{className:"h-8 w-8 animate-spin text-primary"})}):r?h.jsx(h.Fragment,{children:t}):h.jsx(mz,{to:"/auth",replace:!0})},aee=()=>{const t=da();return v.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:h.jsxs("div",{className:"text-center",children:[h.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),h.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),h.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},lee=new E6,cee=()=>h.jsx(T6,{client:lee,children:h.jsx(F3,{attribute:"class",defaultTheme:"light",enableSystem:!0,children:h.jsxs(t6,{children:[h.jsx(D3,{}),h.jsx(y$,{}),h.jsx(Fz,{}),h.jsx(Ez,{children:h.jsxs(yz,{children:[h.jsx(Fn,{path:"/",element:h.jsx(MW,{})}),h.jsx(Fn,{path:"/about",element:h.jsx(h8,{})}),h.jsx(Fn,{path:"/blog",element:h.jsx(LW,{})}),h.jsx(Fn,{path:"/podcast",element:h.jsx(n8,{})}),h.jsx(Fn,{path:"/podcast/all",element:h.jsx(u8,{})}),h.jsx(Fn,{path:"/podcast/:slug",element:h.jsx(c8,{})}),h.jsx(Fn,{path:"/mad-landscapes",element:h.jsx(d8,{})}),h.jsx(Fn,{path:"/auth",element:h.jsx(f8,{})}),h.jsx(Fn,{path:"/admin",element:h.jsx(oee,{children:h.jsx(iee,{})})}),h.jsx(Fn,{path:"/:slug",element:h.jsx(QW,{})}),h.jsx(Fn,{path:"*",element:h.jsx(aee,{})})]})})]})})});r_(document.getElementById("root")).render(h.jsx(U.StrictMode,{children:h.jsx(u_,{children:h.jsx(cee,{})})}));
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.