@graphql-yoga/graphiql
Version:
This the GraphiQL used by GraphQL Yoga. This package is currently not published to npm and only contains the React component `GraphQLYoga`.
489 lines • 1.29 MB
JavaScript
(function(Lo,co){typeof exports=="object"&&typeof module<"u"?co(exports):typeof define=="function"&&define.amd?define(["exports"],co):(Lo=typeof globalThis<"u"?globalThis:Lo||self,co(Lo.YogaGraphiQL={}))})(this,function(Lo){"use strict";var xue=Object.defineProperty;var Sue=(Lo,co,ci)=>co in Lo?xue(Lo,co,{enumerable:!0,configurable:!0,writable:!0,value:ci}):Lo[co]=ci;var H8=(Lo,co,ci)=>(Sue(Lo,typeof co!="symbol"?co+"":co,ci),ci);function co(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ui(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function W8(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var $N={exports:{}},Jh={},VN={exports:{}},ht={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Yf=Symbol.for("react.element"),G8=Symbol.for("react.portal"),Y8=Symbol.for("react.fragment"),Q8=Symbol.for("react.strict_mode"),K8=Symbol.for("react.profiler"),J8=Symbol.for("react.provider"),X8=Symbol.for("react.context"),Z8=Symbol.for("react.forward_ref"),e7=Symbol.for("react.suspense"),t7=Symbol.for("react.memo"),n7=Symbol.for("react.lazy"),jN=Symbol.iterator;function r7(e){return e===null||typeof e!="object"?null:(e=jN&&e[jN]||e["@@iterator"],typeof e=="function"?e:null)}var UN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BN=Object.assign,qN={};function Bc(e,t,n){this.props=e,this.context=t,this.refs=qN,this.updater=n||UN}Bc.prototype.isReactComponent={},Bc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")},Bc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zN(){}zN.prototype=Bc.prototype;function _1(e,t,n){this.props=e,this.context=t,this.refs=qN,this.updater=n||UN}var O1=_1.prototype=new zN;O1.constructor=_1,BN(O1,Bc.prototype),O1.isPureReactComponent=!0;var HN=Array.isArray,WN=Object.prototype.hasOwnProperty,A1={current:null},GN={key:!0,ref:!0,__self:!0,__source:!0};function YN(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)WN.call(t,r)&&!GN.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Yf,type:e,key:i,ref:s,props:o,_owner:A1.current}}function o7(e,t){return{$$typeof:Yf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function D1(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yf}function i7(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var QN=/\/+/g;function I1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?i7(""+e.key):t.toString(36)}function Xh(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Yf:case G8:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+I1(s,0):r,HN(o)?(n="",e!=null&&(n=e.replace(QN,"$&/")+"/"),Xh(o,t,n,"",function(f){return f})):o!=null&&(D1(o)&&(o=o7(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(QN,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",HN(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+I1(i,l);s+=Xh(i,t,n,c,o)}else if(c=r7(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+I1(i,l++),s+=Xh(i,t,n,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Zh(e,t,n){if(e==null)return e;var r=[],o=0;return Xh(e,r,"","",function(i){return t.call(n,i,o++)}),r}function s7(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lr={current:null},em={transition:null},a7={ReactCurrentDispatcher:Lr,ReactCurrentBatchConfig:em,ReactCurrentOwner:A1};ht.Children={map:Zh,forEach:function(e,t,n){Zh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zh(e,function(){t++}),t},toArray:function(e){return Zh(e,function(t){return t})||[]},only:function(e){if(!D1(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},ht.Component=Bc,ht.Fragment=Y8,ht.Profiler=K8,ht.PureComponent=_1,ht.StrictMode=Q8,ht.Suspense=e7,ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a7,ht.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=BN({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=A1.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)WN.call(t,c)&&!GN.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var f=0;f<c;f++)l[f]=arguments[f+2];r.children=l}return{$$typeof:Yf,type:e.type,key:o,ref:i,props:r,_owner:s}},ht.createContext=function(e){return e={$$typeof:X8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:J8,_context:e},e.Consumer=e},ht.createElement=YN,ht.createFactory=function(e){var t=YN.bind(null,e);return t.type=e,t},ht.createRef=function(){return{current:null}},ht.forwardRef=function(e){return{$$typeof:Z8,render:e}},ht.isValidElement=D1,ht.lazy=function(e){return{$$typeof:n7,_payload:{_status:-1,_result:e},_init:s7}},ht.memo=function(e,t){return{$$typeof:t7,type:e,compare:t===void 0?null:t}},ht.startTransition=function(e){var t=em.transition;em.transition={};try{e()}finally{em.transition=t}},ht.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},ht.useCallback=function(e,t){return Lr.current.useCallback(e,t)},ht.useContext=function(e){return Lr.current.useContext(e)},ht.useDebugValue=function(){},ht.useDeferredValue=function(e){return Lr.current.useDeferredValue(e)},ht.useEffect=function(e,t){return Lr.current.useEffect(e,t)},ht.useId=function(){return Lr.current.useId()},ht.useImperativeHandle=function(e,t,n){return Lr.current.useImperativeHandle(e,t,n)},ht.useInsertionEffect=function(e,t){return Lr.current.useInsertionEffect(e,t)},ht.useLayoutEffect=function(e,t){return Lr.current.useLayoutEffect(e,t)},ht.useMemo=function(e,t){return Lr.current.useMemo(e,t)},ht.useReducer=function(e,t,n){return Lr.current.useReducer(e,t,n)},ht.useRef=function(e){return Lr.current.useRef(e)},ht.useState=function(e){return Lr.current.useState(e)},ht.useSyncExternalStore=function(e,t,n){return Lr.current.useSyncExternalStore(e,t,n)},ht.useTransition=function(){return Lr.current.useTransition()},ht.version="18.2.0",VN.exports=ht;var k=VN.exports;const ce=Ui(k),L1=co({__proto__:null,default:ce},[k]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var l7=k,c7=Symbol.for("react.element"),u7=Symbol.for("react.fragment"),f7=Object.prototype.hasOwnProperty,d7=l7.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p7={key:!0,ref:!0,__self:!0,__source:!0};function KN(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)f7.call(t,r)&&!p7.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:c7,type:e,key:i,ref:s,props:o,_owner:d7.current}}Jh.Fragment=u7,Jh.jsx=KN,Jh.jsxs=KN,$N.exports=Jh;var W=$N.exports,JN={exports:{}},uo={},XN={exports:{}},ZN={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(Q,K){var Z=Q.length;Q.push(K);e:for(;0<Z;){var re=Z-1>>>1,J=Q[re];if(0<o(J,K))Q[re]=K,Q[Z]=J,Z=re;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var K=Q[0],Z=Q.pop();if(Z!==K){Q[0]=Z;e:for(var re=0,J=Q.length,ie=J>>>1;re<ie;){var ne=2*(re+1)-1,ae=Q[ne],le=ne+1,de=Q[le];if(0>o(ae,Z))le<J&&0>o(de,ae)?(Q[re]=de,Q[le]=Z,re=le):(Q[re]=ae,Q[ne]=Z,re=ne);else if(le<J&&0>o(de,Z))Q[re]=de,Q[le]=Z,re=le;else break e}}return K}function o(Q,K){var Z=Q.sortIndex-K.sortIndex;return Z!==0?Z:Q.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],f=[],d=1,g=null,m=3,v=!1,b=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=Q)r(f),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(f)}}function E(Q){if(w=!1,C(Q),!b)if(n(c)!==null)b=!0,te(_);else{var K=n(f);K!==null&&Y(E,K.startTime-Q)}}function _(Q,K){b=!1,w&&(w=!1,S(A),A=-1),v=!0;var Z=m;try{for(C(K),g=n(c);g!==null&&(!(g.expirationTime>K)||Q&&!q());){var re=g.callback;if(typeof re=="function"){g.callback=null,m=g.priorityLevel;var J=re(g.expirationTime<=K);K=e.unstable_now(),typeof J=="function"?g.callback=J:g===n(c)&&r(c),C(K)}else r(c);g=n(c)}if(g!==null)var ie=!0;else{var ne=n(f);ne!==null&&Y(E,ne.startTime-K),ie=!1}return ie}finally{g=null,m=Z,v=!1}}var I=!1,D=null,A=-1,F=5,$=-1;function q(){return!(e.unstable_now()-$<F)}function H(){if(D!==null){var Q=e.unstable_now();$=Q;var K=!0;try{K=D(!0,Q)}finally{K?z():(I=!1,D=null)}}else I=!1}var z;if(typeof x=="function")z=function(){x(H)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,R=B.port2;B.port1.onmessage=H,z=function(){R.postMessage(null)}}else z=function(){N(H,0)};function te(Q){D=Q,I||(I=!0,z())}function Y(Q,K){A=N(function(){Q(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,te(_))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(Q){switch(m){case 1:case 2:case 3:var K=3;break;default:K=m}var Z=m;m=K;try{return Q()}finally{m=Z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,K){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var Z=m;m=Q;try{return K()}finally{m=Z}},e.unstable_scheduleCallback=function(Q,K,Z){var re=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?re+Z:re):Z=re,Q){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=Z+J,Q={id:d++,callback:K,priorityLevel:Q,startTime:Z,expirationTime:J,sortIndex:-1},Z>re?(Q.sortIndex=Z,t(f,Q),n(c)===null&&Q===n(f)&&(w?(S(A),A=-1):w=!0,Y(E,Z-re))):(Q.sortIndex=J,t(c,Q),b||v||(b=!0,te(_))),Q},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(Q){var K=m;return function(){var Z=m;m=K;try{return Q.apply(this,arguments)}finally{m=Z}}}})(ZN),XN.exports=ZN;var h7=XN.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var e_=k,fo=h7;function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t_=new Set,Qf={};function yl(e,t){qc(e,t),qc(e+"Capture",t)}function qc(e,t){for(Qf[e]=t,e=0;e<t.length;e++)t_.add(t[e])}var ds=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),R1=Object.prototype.hasOwnProperty,m7=/^[: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]*$/,n_={},r_={};function g7(e){return R1.call(r_,e)?!0:R1.call(n_,e)?!1:m7.test(e)?r_[e]=!0:(n_[e]=!0,!1)}function v7(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function y7(e,t,n,r){if(t===null||typeof t>"u"||v7(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rr(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var er={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){er[e]=new Rr(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];er[t]=new Rr(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){er[e]=new Rr(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){er[e]=new Rr(e,2,!1,e,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(e){er[e]=new Rr(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){er[e]=new Rr(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){er[e]=new Rr(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){er[e]=new Rr(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){er[e]=new Rr(e,5,!1,e.toLowerCase(),null,!1,!1)});var F1=/[\-:]([a-z])/g;function M1(e){return e[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(e){var t=e.replace(F1,M1);er[t]=new Rr(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F1,M1);er[t]=new Rr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F1,M1);er[t]=new Rr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){er[e]=new Rr(e,1,!1,e.toLowerCase(),null,!1,!1)}),er.xlinkHref=new Rr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){er[e]=new Rr(e,1,!1,e.toLowerCase(),null,!0,!0)});function P1(e,t,n,r){var o=er.hasOwnProperty(t)?er[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(y7(t,n,o,r)&&(n=null),r||o===null?g7(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ps=e_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,tm=Symbol.for("react.element"),zc=Symbol.for("react.portal"),Hc=Symbol.for("react.fragment"),$1=Symbol.for("react.strict_mode"),V1=Symbol.for("react.profiler"),o_=Symbol.for("react.provider"),i_=Symbol.for("react.context"),j1=Symbol.for("react.forward_ref"),U1=Symbol.for("react.suspense"),B1=Symbol.for("react.suspense_list"),q1=Symbol.for("react.memo"),ra=Symbol.for("react.lazy"),s_=Symbol.for("react.offscreen"),a_=Symbol.iterator;function Kf(e){return e===null||typeof e!="object"?null:(e=a_&&e[a_]||e["@@iterator"],typeof e=="function"?e:null)}var tn=Object.assign,z1;function Jf(e){if(z1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);z1=t&&t[1]||""}return`
`+z1+e}var H1=!1;function W1(e,t){if(!e||H1)return"";H1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var o=f.stack.split(`
`),i=r.stack.split(`
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var c=`
`+o[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=l);break}}}finally{H1=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Jf(e):""}function b7(e){switch(e.tag){case 5:return Jf(e.type);case 16:return Jf("Lazy");case 13:return Jf("Suspense");case 19:return Jf("SuspenseList");case 0:case 2:case 15:return e=W1(e.type,!1),e;case 11:return e=W1(e.type.render,!1),e;case 1:return e=W1(e.type,!0),e;default:return""}}function G1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Hc:return"Fragment";case zc:return"Portal";case V1:return"Profiler";case $1:return"StrictMode";case U1:return"Suspense";case B1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case i_:return(e.displayName||"Context")+".Consumer";case o_:return(e._context.displayName||"Context")+".Provider";case j1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q1:return t=e.displayName||null,t!==null?t:G1(e.type)||"Memo";case ra:t=e._payload,e=e._init;try{return G1(e(t))}catch{}}return null}function E7(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G1(t);case 8:return t===$1?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w7(e){var t=l_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nm(e){e._valueTracker||(e._valueTracker=w7(e))}function c_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Y1(e,t){var n=t.checked;return tn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function u_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=oa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function f_(e,t){t=t.checked,t!=null&&P1(e,"checked",t,!1)}function Q1(e,t){f_(e,t);var n=oa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?K1(e,t.type,n):t.hasOwnProperty("defaultValue")&&K1(e,t.type,oa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function d_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function K1(e,t,n){(t!=="number"||rm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xf=Array.isArray;function Wc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+oa(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function J1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ne(91));return tn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function p_(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ne(92));if(Xf(n)){if(1<n.length)throw Error(Ne(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:oa(n)}}function h_(e,t){var n=oa(t.value),r=oa(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function m_(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function g_(e){switch(e){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 X1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?g_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var om,v_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(om=om||document.createElement("div"),om.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=om.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ed={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},x7=["Webkit","ms","Moz","O"];Object.keys(ed).forEach(function(e){x7.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ed[t]=ed[e]})});function y_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ed.hasOwnProperty(e)&&ed[e]?(""+t).trim():t+"px"}function b_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=y_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var S7=tn({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 Z1(e,t){if(t){if(S7[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function eb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tb=null;function nb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rb=null,Gc=null,Yc=null;function E_(e){if(e=xd(e)){if(typeof rb!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=Nm(t),rb(e.stateNode,e.type,t))}}function w_(e){Gc?Yc?Yc.push(e):Yc=[e]:Gc=e}function x_(){if(Gc){var e=Gc,t=Yc;if(Yc=Gc=null,E_(e),t)for(e=0;e<t.length;e++)E_(t[e])}}function S_(e,t){return e(t)}function T_(){}var ob=!1;function C_(e,t,n){if(ob)return e(t,n);ob=!0;try{return S_(e,t,n)}finally{ob=!1,(Gc!==null||Yc!==null)&&(T_(),x_())}}function td(e,t){var n=e.stateNode;if(n===null)return null;var r=Nm(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ne(231,t,typeof n));return n}var ib=!1;if(ds)try{var nd={};Object.defineProperty(nd,"passive",{get:function(){ib=!0}}),window.addEventListener("test",nd,nd),window.removeEventListener("test",nd,nd)}catch{ib=!1}function T7(e,t,n,r,o,i,s,l,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(d){this.onError(d)}}var rd=!1,im=null,sm=!1,sb=null,C7={onError:function(e){rd=!0,im=e}};function k7(e,t,n,r,o,i,s,l,c){rd=!1,im=null,T7.apply(C7,arguments)}function N7(e,t,n,r,o,i,s,l,c){if(k7.apply(this,arguments),rd){if(rd){var f=im;rd=!1,im=null}else throw Error(Ne(198));sm||(sm=!0,sb=f)}}function bl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function k_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N_(e){if(bl(e)!==e)throw Error(Ne(188))}function _7(e){var t=e.alternate;if(!t){if(t=bl(e),t===null)throw Error(Ne(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return N_(o),e;if(i===r)return N_(o),t;i=i.sibling}throw Error(Ne(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(Ne(189))}}if(n.alternate!==r)throw Error(Ne(190))}if(n.tag!==3)throw Error(Ne(188));return n.stateNode.current===n?e:t}function __(e){return e=_7(e),e!==null?O_(e):null}function O_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=O_(e);if(t!==null)return t;e=e.sibling}return null}var A_=fo.unstable_scheduleCallback,D_=fo.unstable_cancelCallback,O7=fo.unstable_shouldYield,A7=fo.unstable_requestPaint,hn=fo.unstable_now,D7=fo.unstable_getCurrentPriorityLevel,ab=fo.unstable_ImmediatePriority,I_=fo.unstable_UserBlockingPriority,am=fo.unstable_NormalPriority,I7=fo.unstable_LowPriority,L_=fo.unstable_IdlePriority,lm=null,Bi=null;function L7(e){if(Bi&&typeof Bi.onCommitFiberRoot=="function")try{Bi.onCommitFiberRoot(lm,e,void 0,(e.current.flags&128)===128)}catch{}}var ui=Math.clz32?Math.clz32:M7,R7=Math.log,F7=Math.LN2;function M7(e){return e>>>=0,e===0?32:31-(R7(e)/F7|0)|0}var cm=64,um=4194304;function od(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=od(l):(i&=s,i!==0&&(r=od(i)))}else s=n&~o,s!==0?r=od(s):i!==0&&(r=od(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ui(t),o=1<<n,r|=e[n],t&=~o;return r}function P7(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 $7(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-ui(i),l=1<<s,c=o[s];c===-1?(!(l&n)||l&r)&&(o[s]=P7(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function lb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function R_(){var e=cm;return cm<<=1,!(cm&4194240)&&(cm=64),e}function cb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function id(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ui(t),e[t]=n}function V7(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-ui(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function ub(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ui(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var _t=0;function F_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var M_,fb,P_,$_,V_,db=!1,dm=[],ia=null,sa=null,aa=null,sd=new Map,ad=new Map,la=[],j7="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 j_(e,t){switch(e){case"focusin":case"focusout":ia=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":aa=null;break;case"pointerover":case"pointerout":sd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ad.delete(t.pointerId)}}function ld(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=xd(t),t!==null&&fb(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function U7(e,t,n,r,o){switch(t){case"focusin":return ia=ld(ia,e,t,n,r,o),!0;case"dragenter":return sa=ld(sa,e,t,n,r,o),!0;case"mouseover":return aa=ld(aa,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return sd.set(i,ld(sd.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ad.set(i,ld(ad.get(i)||null,e,t,n,r,o)),!0}return!1}function U_(e){var t=El(e.target);if(t!==null){var n=bl(t);if(n!==null){if(t=n.tag,t===13){if(t=k_(n),t!==null){e.blockedOn=t,V_(e.priority,function(){P_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function pm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tb=r,n.target.dispatchEvent(r),tb=null}else return t=xd(n),t!==null&&fb(t),e.blockedOn=n,!1;t.shift()}return!0}function B_(e,t,n){pm(e)&&n.delete(t)}function B7(){db=!1,ia!==null&&pm(ia)&&(ia=null),sa!==null&&pm(sa)&&(sa=null),aa!==null&&pm(aa)&&(aa=null),sd.forEach(B_),ad.forEach(B_)}function cd(e,t){e.blockedOn===t&&(e.blockedOn=null,db||(db=!0,fo.unstable_scheduleCallback(fo.unstable_NormalPriority,B7)))}function ud(e){function t(o){return cd(o,e)}if(0<dm.length){cd(dm[0],e);for(var n=1;n<dm.length;n++){var r=dm[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ia!==null&&cd(ia,e),sa!==null&&cd(sa,e),aa!==null&&cd(aa,e),sd.forEach(t),ad.forEach(t),n=0;n<la.length;n++)r=la[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<la.length&&(n=la[0],n.blockedOn===null);)U_(n),n.blockedOn===null&&la.shift()}var Qc=ps.ReactCurrentBatchConfig,hm=!0;function q7(e,t,n,r){var o=_t,i=Qc.transition;Qc.transition=null;try{_t=1,pb(e,t,n,r)}finally{_t=o,Qc.transition=i}}function z7(e,t,n,r){var o=_t,i=Qc.transition;Qc.transition=null;try{_t=4,pb(e,t,n,r)}finally{_t=o,Qc.transition=i}}function pb(e,t,n,r){if(hm){var o=hb(e,t,n,r);if(o===null)Db(e,t,r,mm,n),j_(e,r);else if(U7(o,e,t,n,r))r.stopPropagation();else if(j_(e,r),t&4&&-1<j7.indexOf(e)){for(;o!==null;){var i=xd(o);if(i!==null&&M_(i),i=hb(e,t,n,r),i===null&&Db(e,t,r,mm,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Db(e,t,r,null,n)}}var mm=null;function hb(e,t,n,r){if(mm=null,e=nb(r),e=El(e),e!==null)if(t=bl(e),t===null)e=null;else if(n=t.tag,n===13){if(e=k_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return mm=e,null}function q_(e){switch(e){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(D7()){case ab:return 1;case I_:return 4;case am:case I7:return 16;case L_:return 536870912;default:return 16}default:return 16}}var ca=null,mb=null,gm=null;function z_(){if(gm)return gm;var e,t=mb,n=t.length,r,o="value"in ca?ca.value:ca.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return gm=o.slice(e,1<r?1-r:void 0)}function vm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ym(){return!0}function H_(){return!1}function po(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ym:H_,this.isPropagationStopped=H_,this}return tn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ym)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ym)},persist:function(){},isPersistent:ym}),t}var Kc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gb=po(Kc),fd=tn({},Kc,{view:0,detail:0}),H7=po(fd),vb,yb,dd,bm=tn({},fd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eb,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dd&&(dd&&e.type==="mousemove"?(vb=e.screenX-dd.screenX,yb=e.screenY-dd.screenY):yb=vb=0,dd=e),vb)},movementY:function(e){return"movementY"in e?e.movementY:yb}}),W_=po(bm),W7=tn({},bm,{dataTransfer:0}),G7=po(W7),Y7=tn({},fd,{relatedTarget:0}),bb=po(Y7),Q7=tn({},Kc,{animationName:0,elapsedTime:0,pseudoElement:0}),K7=po(Q7),J7=tn({},Kc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),X7=po(J7),Z7=tn({},Kc,{data:0}),G_=po(Z7),e9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t9={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"},n9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r9(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=n9[e])?!!t[e]:!1}function Eb(){return r9}var o9=tn({},fd,{key:function(e){if(e.key){var t=e9[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t9[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eb,charCode:function(e){return e.type==="keypress"?vm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),i9=po(o9),s9=tn({},bm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y_=po(s9),a9=tn({},fd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eb}),l9=po(a9),c9=tn({},Kc,{propertyName:0,elapsedTime:0,pseudoElement:0}),u9=po(c9),f9=tn({},bm,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),d9=po(f9),p9=[9,13,27,32],wb=ds&&"CompositionEvent"in window,pd=null;ds&&"documentMode"in document&&(pd=document.documentMode);var h9=ds&&"TextEvent"in window&&!pd,Q_=ds&&(!wb||pd&&8<pd&&11>=pd),K_=" ",J_=!1;function X_(e,t){switch(e){case"keyup":return p9.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Z_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jc=!1;function m9(e,t){switch(e){case"compositionend":return Z_(t);case"keypress":return t.which!==32?null:(J_=!0,K_);case"textInput":return e=t.data,e===K_&&J_?null:e;default:return null}}function g9(e,t){if(Jc)return e==="compositionend"||!wb&&X_(e,t)?(e=z_(),gm=mb=ca=null,Jc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Q_&&t.locale!=="ko"?null:t.data;default:return null}}var v9={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 eO(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v9[e.type]:t==="textarea"}function tO(e,t,n,r){w_(r),t=Tm(t,"onChange"),0<t.length&&(n=new gb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hd=null,md=null;function y9(e){bO(e,0)}function Em(e){var t=nu(e);if(c_(t))return e}function b9(e,t){if(e==="change")return t}var nO=!1;if(ds){var xb;if(ds){var Sb="oninput"in document;if(!Sb){var rO=document.createElement("div");rO.setAttribute("oninput","return;"),Sb=typeof rO.oninput=="function"}xb=Sb}else xb=!1;nO=xb&&(!document.documentMode||9<document.documentMode)}function oO(){hd&&(hd.detachEvent("onpropertychange",iO),md=hd=null)}function iO(e){if(e.propertyName==="value"&&Em(md)){var t=[];tO(t,md,e,nb(e)),C_(y9,t)}}function E9(e,t,n){e==="focusin"?(oO(),hd=t,md=n,hd.attachEvent("onpropertychange",iO)):e==="focusout"&&oO()}function w9(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Em(md)}function x9(e,t){if(e==="click")return Em(t)}function S9(e,t){if(e==="input"||e==="change")return Em(t)}function T9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fi=typeof Object.is=="function"?Object.is:T9;function gd(e,t){if(fi(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!R1.call(t,o)||!fi(e[o],t[o]))return!1}return!0}function sO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function aO(e,t){var n=sO(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sO(n)}}function lO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cO(){for(var e=window,t=rm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rm(e.document)}return t}function Tb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function C9(e){var t=cO(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lO(n.ownerDocument.documentElement,n)){if(r!==null&&Tb(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=aO(n,i);var s=aO(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var k9=ds&&"documentMode"in document&&11>=document.documentMode,Xc=null,Cb=null,vd=null,kb=!1;function uO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kb||Xc==null||Xc!==rm(r)||(r=Xc,"selectionStart"in r&&Tb(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}),vd&&gd(vd,r)||(vd=r,r=Tm(Cb,"onSelect"),0<r.length&&(t=new gb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xc)))}function wm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zc={animationend:wm("Animation","AnimationEnd"),animationiteration:wm("Animation","AnimationIteration"),animationstart:wm("Animation","AnimationStart"),transitionend:wm("Transition","TransitionEnd")},Nb={},fO={};ds&&(fO=document.createElement("div").style,"AnimationEvent"in window||(delete Zc.animationend.animation,delete Zc.animationiteration.animation,delete Zc.animationstart.animation),"TransitionEvent"in window||delete Zc.transitionend.transition);function xm(e){if(Nb[e])return Nb[e];if(!Zc[e])return e;var t=Zc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fO)return Nb[e]=t[n];return e}var dO=xm("animationend"),pO=xm("animationiteration"),hO=xm("animationstart"),mO=xm("transitionend"),gO=new Map,vO="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 ua(e,t){gO.set(e,t),yl(t,[e])}for(var _b=0;_b<vO.length;_b++){var Ob=vO[_b],N9=Ob.toLowerCase(),_9=Ob[0].toUpperCase()+Ob.slice(1);ua(N9,"on"+_9)}ua(dO,"onAnimationEnd"),ua(pO,"onAnimationIteration"),ua(hO,"onAnimationStart"),ua("dblclick","onDoubleClick"),ua("focusin","onFocus"),ua("focusout","onBlur"),ua(mO,"onTransitionEnd"),qc("onMouseEnter",["mouseout","mouseover"]),qc("onMouseLeave",["mouseout","mouseover"]),qc("onPointerEnter",["pointerout","pointerover"]),qc("onPointerLeave",["pointerout","pointerover"]),yl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),yl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),yl("onBeforeInput",["compositionend","keypress","textInput","paste"]),yl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),yl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),yl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yd="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(" "),O9=new Set("cancel close invalid load scroll toggle".split(" ").concat(yd));function yO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,N7(r,t,void 0,e),e.currentTarget=null}function bO(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],c=l.instance,f=l.currentTarget;if(l=l.listener,c!==i&&o.isPropagationStopped())break e;yO(o,l,f),i=c}else for(s=0;s<r.length;s++){if(l=r[s],c=l.instance,f=l.currentTarget,l=l.listener,c!==i&&o.isPropagationStopped())break e;yO(o,l,f),i=c}}}if(sm)throw e=sb,sm=!1,sb=null,e}function jt(e,t){var n=t[Pb];n===void 0&&(n=t[Pb]=new Set);var r=e+"__bubble";n.has(r)||(EO(t,e,2,!1),n.add(r))}function Ab(e,t,n){var r=0;t&&(r|=4),EO(n,e,r,t)}var Sm="_reactListening"+Math.random().toString(36).slice(2);function bd(e){if(!e[Sm]){e[Sm]=!0,t_.forEach(function(n){n!=="selectionchange"&&(O9.has(n)||Ab(n,!1,e),Ab(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sm]||(t[Sm]=!0,Ab("selectionchange",!1,t))}}function EO(e,t,n,r){switch(q_(t)){case 1:var o=q7;break;case 4:o=z7;break;default:o=pb}n=o.bind(null,t,n,e),o=void 0,!ib||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Db(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;s=s.return}for(;l!==null;){if(s=El(l),s===null)return;if(c=s.tag,c===5||c===6){r=i=s;continue e}l=l.parentNode}}r=r.return}C_(function(){var f=i,d=nb(n),g=[];e:{var m=gO.get(e);if(m!==void 0){var v=gb,b=e;switch(e){case"keypress":if(vm(n)===0)break e;case"keydown":case"keyup":v=i9;break;case"focusin":b="focus",v=bb;break;case"focusout":b="blur",v=bb;break;case"beforeblur":case"afterblur":v=bb;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":v=W_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=G7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=l9;break;case dO:case pO:case hO:v=K7;break;case mO:v=u9;break;case"scroll":v=H7;break;case"wheel":v=d9;break;case"copy":case"cut":case"paste":v=X7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Y_}var w=(t&4)!==0,N=!w&&e==="scroll",S=w?m!==null?m+"Capture":null:m;w=[];for(var x=f,C;x!==null;){C=x;var E=C.stateNode;if(C.tag===5&&E!==null&&(C=E,S!==null&&(E=td(x,S),E!=null&&w.push(Ed(x,E,C)))),N)break;x=x.return}0<w.length&&(m=new v(m,b,null,n,d),g.push({event:m,listeners:w}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==tb&&(b=n.relatedTarget||n.fromElement)&&(El(b)||b[hs]))break e;if((v||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=f,b=b?El(b):null,b!==null&&(N=bl(b),b!==N||b.tag!==5&&b.tag!==6)&&(b=null)):(v=null,b=f),v!==b)){if(w=W_,E="onMouseLeave",S="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(w=Y_,E="onPointerLeave",S="onPointerEnter",x="pointer"),N=v==null?m:nu(v),C=b==null?m:nu(b),m=new w(E,x+"leave",v,n,d),m.target=N,m.relatedTarget=C,E=null,El(d)===f&&(w=new w(S,x+"enter",b,n,d),w.target=C,w.relatedTarget=N,E=w),N=E,v&&b)t:{for(w=v,S=b,x=0,C=w;C;C=eu(C))x++;for(C=0,E=S;E;E=eu(E))C++;for(;0<x-C;)w=eu(w),x--;for(;0<C-x;)S=eu(S),C--;for(;x--;){if(w===S||S!==null&&w===S.alternate)break t;w=eu(w),S=eu(S)}w=null}else w=null;v!==null&&wO(g,m,v,w,!1),b!==null&&N!==null&&wO(g,N,b,w,!0)}}e:{if(m=f?nu(f):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var _=b9;else if(eO(m))if(nO)_=S9;else{_=w9;var I=E9}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(_=x9);if(_&&(_=_(e,f))){tO(g,_,n,d);break e}I&&I(e,m,f),e==="focusout"&&(I=m._wrapperState)&&I.controlled&&m.type==="number"&&K1(m,"number",m.value)}switch(I=f?nu(f):window,e){case"focusin":(eO(I)||I.contentEditable==="true")&&(Xc=I,Cb=f,vd=null);break;case"focusout":vd=Cb=Xc=null;break;case"mousedown":kb=!0;break;case"contextmenu":case"mouseup":case"dragend":kb=!1,uO(g,n,d);break;case"selectionchange":if(k9)break;case"keydown":case"keyup":uO(g,n,d)}var D;if(wb)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Jc?X_(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Q_&&n.locale!=="ko"&&(Jc||A!=="onCompositionStart"?A==="onCompositionEnd"&&Jc&&(D=z_()):(ca=d,mb="value"in ca?ca.value:ca.textContent,Jc=!0)),I=Tm(f,A),0<I.length&&(A=new G_(A,e,null,n,d),g.push({event:A,listeners:I}),D?A.data=D:(D=Z_(n),D!==null&&(A.data=D)))),(D=h9?m9(e,n):g9(e,n))&&(f=Tm(f,"onBeforeInput"),0<f.length&&(d=new G_("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:f}),d.data=D))}bO(g,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Tm(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=td(e,n),i!=null&&r.unshift(Ed(e,i,o)),i=td(e,t),i!=null&&r.push(Ed(e,i,o))),e=e.return}return r}function eu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wO(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,c=l.alternate,f=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&f!==null&&(l=f,o?(c=td(n,i),c!=null&&s.unshift(Ed(n,c,l))):o||(c=td(n,i),c!=null&&s.push(Ed(n,c,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var A9=/\r\n?/g,D9=/\u0000|\uFFFD/g;function xO(e){return(typeof e=="string"?e:""+e).replace(A9,`
`).replace(D9,"")}function Cm(e,t,n){if(t=xO(t),xO(e)!==t&&n)throw Error(Ne(425))}function km(){}var Ib=null,Lb=null;function Rb(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fb=typeof setTimeout=="function"?setTimeout:void 0,I9=typeof clearTimeout=="function"?clearTimeout:void 0,SO=typeof Promise=="function"?Promise:void 0,L9=typeof queueMicrotask=="function"?queueMicrotask:typeof SO<"u"?function(e){return SO.resolve(null).then(e).catch(R9)}:Fb;function R9(e){setTimeout(function(){throw e})}function Mb(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ud(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ud(t)}function fa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function TO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var tu=Math.random().toString(36).slice(2),qi="__reactFiber$"+tu,wd="__reactProps$"+tu,hs="__reactContainer$"+tu,Pb="__reactEvents$"+tu,F9="__reactListeners$"+tu,M9="__reactHandles$"+tu;function El(e){var t=e[qi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hs]||n[qi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=TO(e);e!==null;){if(n=e[qi])return n;e=TO(e)}return t}e=n,n=e.parentNode}return null}function xd(e){return e=e[qi]||e[hs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function nu(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ne(33))}function Nm(e){return e[wd]||null}var $b=[],ru=-1;function da(e){return{current:e}}function Ut(e){0>ru||(e.current=$b[ru],$b[ru]=null,ru--)}function Rt(e,t){ru++,$b[ru]=e.current,e.current=t}var pa={},mr=da(pa),Jr=da(!1),wl=pa;function ou(e,t){var n=e.type.contextTypes;if(!n)return pa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Xr(e){return e=e.childContextTypes,e!=null}function _m(){Ut(Jr),Ut(mr)}function CO(e,t,n){if(mr.current!==pa)throw Error(Ne(168));Rt(mr,t),Rt(Jr,n)}function kO(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Ne(108,E7(e)||"Unknown",o));return tn({},n,r)}function Om(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pa,wl=mr.current,Rt(mr,e),Rt(Jr,Jr.current),!0}function NO(e,t,n){var r=e.stateNode;if(!r)throw Error(Ne(169));n?(e=kO(e,t,wl),r.__reactInternalMemoizedMergedChildContext=e,Ut(Jr),Ut(mr),Rt(mr,e)):Ut(Jr),Rt(Jr,n)}var ms=null,Am=!1,Vb=!1;function _O(e){ms===null?ms=[e]:ms.push(e)}function P9(e){Am=!0,_O(e)}function ha(){if(!Vb&&ms!==null){Vb=!0;var e=0,t=_t;try{var n=ms;for(_t=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ms=null,Am=!1}catch(o){throw ms!==null&&(ms=ms.slice(e+1)),A_(ab,ha),o}finally{_t=t,Vb=!1}}return null}var iu=[],su=0,Dm=null,Im=0,Ro=[],Fo=0,xl=null,gs=1,vs="";function Sl(e,t){iu[su++]=Im,iu[su++]=Dm,Dm=e,Im=t}function OO(e,t,n){Ro[Fo++]=gs,Ro[Fo++]=vs,Ro[Fo++]=xl,xl=e;var r=gs;e=vs;var o=32-ui(r)-1;r&=~(1<<o),n+=1;var i=32-ui(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,gs=1<<32-ui(t)+o|n<<o|r,vs=i+e}else gs=1<<i|n<<o|r,vs=e}function jb(e){e.return!==null&&(Sl(e,1),OO(e,1,0))}function Ub(e){for(;e===Dm;)Dm=iu[--su],iu[su]=null,Im=iu[--su],iu[su]=null;for(;e===xl;)xl=Ro[--Fo],Ro[Fo]=null,vs=Ro[--Fo],Ro[Fo]=null,gs=Ro[--Fo],Ro[Fo]=null}var ho=null,mo=null,Yt=!1,di=null;function AO(e,t){var n=Vo(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function DO(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ho=e,mo=fa(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ho=e,mo=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xl!==null?{id:gs,overflow:vs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Vo(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ho=e,mo=null,!0):!1;default:return!1}}function Bb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qb(e){if(Yt){var t=mo;if(t){var n=t;if(!DO(e,t)){if(Bb(e))throw Error(Ne(418));t=fa(n.nextSibling);var r=ho;t&&DO(e,t)?AO(r,n):(e.flags=e.flags&-4097|2,Yt=!1,ho=e)}}else{if(Bb(e))throw Error(Ne(418));e.flags=e.flags&-4097|2,Yt=!1,ho=e}}}function IO(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ho=e}function Lm(e){if(e!==ho)return!1;if(!Yt)return IO(e),Yt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Rb(e.type,e.memoizedProps)),t&&(t=mo)){if(Bb(e))throw LO(),Error(Ne(418));for(;t;)AO(e,t),t=fa(t.nextSibling)}if(IO(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){mo=fa(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}mo=null}}else mo=ho?fa(e.stateNode.nextSibling):null;return!0}function LO(){for(var e=mo;e;)e=fa(e.nextSibling)}function au(){mo=ho=null,Yt=!1}function zb(e){di===null?di=[e]:di.push(e)}var $9=ps.ReactCurrentBatchConfig;function pi(e,t){if(e&&e.defaultProps){t=tn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Rm=da(null),Fm=null,lu=null,Hb=null;function Wb(){Hb=lu=Fm=null}function Gb(e){var t=Rm.current;Ut(Rm),e._currentValue=t}function Yb(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cu(e,t){Fm=e,Hb=lu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zr=!0),e.firstContext=null)}function Mo(e){var t=e._currentValue;if(Hb!==e)if(e={context:e,memoizedValue:t,next:null},lu===null){if(Fm===null)throw Error(Ne(308));lu=e,Fm.dependencies={lanes:0,firstContext:e}}else lu=lu.next=e;return t}var Tl=null;function Qb(e){Tl===null?Tl=[e]:Tl.push(e)}function RO(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Qb(t)):(n.next=o.next,o.next=n),t.interleaved=n,ys(e,r)}function ys(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ma=!1;function Kb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FO(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function bs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,bt&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ys(e,n)}return o=r.interleaved,o===null?(t.next=t,Qb(r)):(t.next=o.next,o.next=t),r.interleaved=t,ys(e,n)}function Mm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ub(e,n)}}function MO(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Pm(e,t,n,r){var o=e.updateQueue;ma=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,f=c.next;c.next=null,s===null?i=f:s.next=f,s=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==s&&(l===null?d.firstBaseUpdate=f:l.next=f,d.lastBaseUpdate=c))}if(i!==null){var g=o.baseState;s=0,d=f=c=null,l=i;do{var m=l.lane,v=l.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=e,w=l;switch(m=t,v=n,w.tag){case 1:if(b=w.payload,typeof b=="function"){g=b.call(v,g,m);break e}g=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=w.payload,m=typeof b=="function"?b.call(v,g,m):b,m==null)break e;g=tn({},g,m);break e;case 2:ma=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[l]:m.push(l))}else v={eventTime:v,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(f=d=v,c=g):d=d.next=v,s|=m;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;m=l,l=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(!0);if(d===null&&(c=g),o.baseState=c,o.firstBaseUpdate=f,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Nl|=s,e.lanes=s,e.memoizedState=g}}function PO(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(Ne(191,o));o.call(r)}}}var $O=new e_.Component().refs;function Jb(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:tn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $m={isMounted:function(e){return(e=e._reactInternals)?bl(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Mr(),o=Ea(e),i=bs(r,o);i.payload=t,n!=null&&(i.callback=n),t=ga(e,i,o),t!==null&&(gi(t,e,o,r),Mm(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Mr(),o=Ea(e),i=bs(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ga(e,i,o),t!==null&&(gi(t,e,o,r),Mm(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Mr(),r=Ea(e),o=bs(n,r);o.tag=2,t!=null&&(o.callback=t),t=ga(e,o,r),t!==null&&(gi(t,e,r,n),Mm(t,e,r))}};function VO(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!gd(n,r)||!gd(o,i):!0}function jO(e,t,n){var r=!1,o=pa,i=t.contextType;return typeof i=="object"&&i!==null?i=Mo(i):(o=Xr(t)?wl:mr.current,r=t.contextTypes,i=(r=r!=null)?ou(e,o):pa),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$m,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function UO(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$m.enqueueReplaceState(t,t.state,null)}function Xb(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=$O,Kb(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Mo(i):(i=Xr(t)?wl:mr.current,o.context=ou(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Jb(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&$m.enqueueReplaceState(o,o.state,null),Pm(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Sd(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ne(309));var r=n.stateNode}if(!r)throw Error(Ne(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;l===$O&&(l=o.refs={}),s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(Ne(284));if(!n._owner)throw Error(Ne(290,e))}return e}function Vm(e,t){throw e=Object.prototype.toString.call(t),Error(Ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function BO(e){var t=e._init;return t(e._payload)}function qO(e){function t(S,x){if(e){var C=S.deletions;C===null?(S.deletions=[x],S.flags|=16):C.push(x)}}function n(S,x){if(!e)return null;for(;x!==null;)t(S,x),x=x.sibling;return null}function r(S,x){for(S=new Map;x!==null;)x.key!==null?S.set(x.key,x):S.set(x.index,x),x=x.sibling;return S}function o(S,x){return S=xa(S,x),S.index=0,S.sibling=null,S}function i(S,x,C){return S.index=C,e?(C=S.alternate,C!==null?(C=C.index,C<x?(S.flags|=2,x):C):(S.flags|=2,x)):(S.flags|=1048576,x)}function s(S){return e&&S.alternate===null&&(S.flags|=2),S}function l(S,x,C,E){return x===null||x.tag!==6?(x=FE(C,S.mode,E),x.return=S,x):(x=o(x,C),x.return=S,x)}function c(S,x,C,E){var _=C.type;return _===Hc?d(S,x,C.props.children,E,C.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ra&&BO(_)===x.type)?(E=o(x,C.props),E.ref=Sd(S,x,C),E.return=S,E):(E=og(C.type,C.key,C.props,null,S.mode,E),E.ref=Sd(S,x,C),E.return=S,E)}function f(S,x,C,E){return x===null||x.tag!==4||x.stateNode.containerInfo!==C.containerInfo||x.stateNode.implementation!==C.implementation?(x=ME(C,S.mode,E),x.return=S,x):(x=o(x,C.children||[]),x.return=S,x)}function d(S,x,C,E,_){return x===null||x.tag!==7?(x=Dl(C,S.mode,E,_),x.return=S,x):(x=o(x,C),x.return=S,x)}function g(S,x,C){if(typeof x=="string"&&x!==""||typeof x=="number")return x=FE(""+x,S.mode,C),x.return=S,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case tm:return C=og(x.type,x.key,x.props,null,S.mode,C),C.ref=Sd(S,null,x),C.return=S,C;case zc:return x=ME(x,S.mode,C),x.return=S,x;case ra:var E=x._init;return g(S,E(x._payload),C)}if(Xf(x)||Kf(x))return x=Dl(x,S.mode,C,null),x.return=S,x;Vm(S,x)}return null}function m(S,x,C,E){var _=x!==null?x.key:null;if(typeof C=="string"&&C!==""||typeof C=="number")return _!==null?null:l(S,x,""+C,E);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case tm:return C.key===_?c(S,x,C,E):null;case zc:return C.key===_?f(S,x,C,E):null;case ra:return _=C._init,m(S,x,_(C._payload),E)}if(Xf(C)||Kf(C))return _!==null?null:d(S,x,C,E,null);Vm(S,C)}return null}function v(S,x,C,E,_){if(typeof E=="string"&&E!==""||typeof E=="number")return S=S.get(C)||null,l(x,S,""+E,_);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case tm:return S=S.get(E.key===null?C:E.key)||null,c(x,S,E,_);case zc:return S=S.get(E.key===null?C:E.key)||null,f(x,S,E,_);case ra:var I=E._init;return v(S,x,C,I(E._payload),_)}if(Xf(E)||Kf(E))return S=S.get(C)||null,d(x,S,E,_,null);Vm(x,E)}return null}function b(S,x,C,E){for(var _=null,I=null,D=x,A=x=0,F=null;D!==null&&A<C.length;A++){D.index>A?(F=D,D=null):F=D.sibling;var $=m(S,D,C[A],E);if($===null){D===null&&(D=F);break}e&&D&&$.alternate===null&&t(S,D),x=i($,x,A),I===null?_=$:I.sibling=$,I=$,D=F}if(A===C.length)return n(S,D),Yt&&Sl(S,A),_;if(D===null){for(;A<C.length;A++)D=g(S,C[A],E),D!==null&&(x=i(D,x,A),I===null?_=D:I.sibling=D,I=D);return Yt&&Sl(S,A),_}for(D=r(S,D);A<C.length;A++)F=v(D,S,A,C[A],E),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?A:F.key),x=i(F,x,A),I===null?_=F:I.sibling=F,I=F);return e&&D.forEach(function(q){return t(S,q)}),Yt&&Sl(S,A),_}function w(S,x,C,E){var _=Kf(C);if(typeof _!="function")throw Error(Ne(150));if(C=_.call(C),C==null)throw Error(Ne(151));for(var I=_=null,D=x,A=x=0,F=null,$=C.next();D!==null&&!$.done;A++,$=C.next()){D.index>A?(F=D,D=null):F=D.sibling;var q=m(S,D,$.value,E);if(q===null){D===null&&(D=F);break}e&&D&&q.alternate===null&&t(S,D),x=i(q,x,A),I===null?_=q:I.sibling=q,I=q,D=F}if($.done)return n(S,D),Yt&&Sl(S,A),_;if(D===null){for(;!$.done;A++,$=C.next())$=g(S,$.value,E),$!==null&&(x=i($,x,A),I===null?_=$:I.sibling=$,I=$);return Yt&&Sl(S,A),_}for(D=r(S,D);!$.done;A++,$=C.next())$=v(D,S,A,$.value,E),$!==null&&(e&&$.alternate!==null&&D.delete($.key===null?A:$.key),x=i($,x,A),I===null?_=$:I.sibling=$,I=$);return e&&D.forEach(function(H){return t(S,H)}),Yt&&Sl(S,A),_}function N(S,x,C,E){if(typeof C=="object"&&C!==null&&C.type===Hc&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case tm:e:{for(var _=C.key,I=x;I!==null;){if(I.key===_){if(_=C.type,_===Hc){if(I.tag===7){n(S,I.sibling),x=o(I,C.props.children),x.return=S,S=x;break e}}else if(I.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===ra&&BO(_)===I.type){n(S,I.sibling),x=o(I,C.props),x.ref=Sd(S,I,C),x.return=S,S=x;break e}n(S,I);break}else t(S,I);I=I.sibling}C.type===Hc?(x=Dl(C.props.children,S.mode,E,C.key),x.return=S,S=x):(E=og(C.type,C.key,C.props,null,S.mode,E),E.ref=Sd(S,x,C),E.return=S,S=E)}return s(S);case zc:e:{for(I=C.key;x!==null;){if(x.key===I)if(x.tag===4&&x.stateNode.containerInfo===C.containerInfo&&x.stateNode.implementation===C.implementation){n(S,x.sibling),x=o(x,C.children||[]),x.return=S,S=x;break e}else{n(S,x);break}else t(S,x);x=x.sibling}x=ME(C,S.mode,E),x.return=S,S=x}return s(S);case ra:return I=C._init,N(S,x,I(C._payload),E)}if(Xf(C))return b(S,x,C,E);if(Kf(C))return w(S,x,C,E);Vm(S,C)}return typeof C=="string"&&C!==""||typeof C=="number"?(C=""+C,x!==null&&x.tag===6?(n(S,x.sibling),x=o(x,C),x.return=S,S=x):(n(S,x),x=FE(C,S.mode,E),x.return=S,S=x),s(S)):n(S,x)}return N}var uu=qO(!0),zO=qO(!1),Td={},zi=da(Td),Cd=da(Td),kd=da(Td);function Cl(e){if(e===Td)throw Error(Ne(174));return e}function Zb(e,t){switch(Rt(kd,t),Rt(Cd,e),Rt(zi,Td),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:X1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=X1(t,e)}Ut(zi),Rt(zi,t)}function fu(){Ut(zi),Ut(Cd),Ut(kd)}function HO(e){Cl(kd.current);var t=Cl(zi.current),n=X1(t,e.type);t!==n&&(Rt(Cd,e),Rt(zi,n))}function eE(e){Cd.current===e&&(Ut(zi),Ut(Cd))}var nn=da(0);function jm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var tE=[];function nE(){for(var e=0;e<tE.length;e++)tE[e]._workInProgressVersionPrimary=null;tE.length=0}var Um=ps.ReactCurrentDispatcher,rE=ps.ReactCurrentBatchConfig,kl=0,rn=null,Ln=null,Hn=null,Bm=!1,Nd=!1,_d=0,V9=0;function gr(){throw Error(Ne(321))}function oE(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fi(e[n],t[n]))return!1;return!0}function iE(e,t,n,r,o,i){if(kl=i,rn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Um.current=e===null||e.memoizedState===null?q9:z9,e=n(r,o),Nd){i=0;do{if(Nd=!1,_d=0,25<=i)throw Error(Ne(301));i+=1,Hn=Ln=null,t.updateQueue=null,Um.current=H9,e=n(r,o)}while(Nd)}if(Um.current=Hm,t=Ln!==null&&Ln.next!==null,kl=0,Hn=Ln=rn=null,Bm=!1,t)throw Error(Ne(300));return e}function sE(){var e=_d!==0;return _d=0,e}function Hi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?rn.memoizedState=Hn=e:Hn=Hn.next=e,Hn}function Po(){if(Ln===null){var e=rn.alternate;e=e!==null?e.memoizedState:null}else e=Ln.next;var t=Hn===null?rn.memoizedState:Hn.next;if(t!==null)Hn=t,Ln=e;else{if(e===null)throw Error(Ne(310));Ln=e,e={memoizedState:Ln.memoizedState,baseState:Ln.baseState,baseQueue:Ln.baseQueue,queue:Ln.queue,next:null},Hn===null?rn.memoizedState=Hn=e:Hn=Hn.next=e}return Hn}function Od(e,t){return typeof t=="function"?t(e):t}function aE(e){var t=Po(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=Ln,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,c=null,f=i;do{var d=f.lane;if((kl&d)===d)c!==null&&(c=c.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var g={lane:d,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(l=c=g,s=r):c=c.next=g,rn.lanes|=d,Nl|=d}f=f.next}while(f!==null&&f!==i);c===null?s=r:c.next=l,fi(r,t.memoizedState)||(Zr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,rn.lanes|=i,Nl|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function lE(e){var t=Po(),n=t.queue;if(n===null)throw Error(Ne(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);fi(i,t.memoizedState)||(Zr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function WO(){}function GO(e,t){var n=rn,r=Po(),o=t(),i=!fi(r.memoizedState,o);if(i&&(r.memoizedState=o,Zr=!0),r=r.queue,cE(KO.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Hn!==null&&Hn.memoizedState.tag&1){if(n.flags|=2048,Ad(9,QO.bind(null,n,r,o,t),void 0,null),Wn===null)throw Error(Ne(349));kl&30||YO(n,t,o)}return o}function YO(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=rn.updateQueue,t===null?(t={lastEffect:null,stores:null},rn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function QO(e,t,n,r){t.value=n,t.getSnapshot=r,JO(t)&&XO(e)}function KO(e,t,n){return n(function(){JO(t)&&XO(e)})}function JO(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fi(e,n)}catch{return!0}}function XO(e){var t=ys(e,1);t!==null&&gi(t,e,1,-1)}function ZO(e){var t=Hi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Od,lastRenderedState:e},t.queue=e,e=e.dispatch=B9.bind(null,rn,e),[t.memoizedState,e]}function Ad(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=rn.updateQueue,t===null?(t={lastEffect:null,stores:null},rn.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function eA(){return Po().memoizedState}function qm(e,t,n,r){var o=Hi();rn.flags|=e,o.memoizedState=Ad(1|t,n,void 0,r===void 0?null:r)}function zm(e,t,n,r){var o=Po();r=r===void 0?null:r;var i=void 0;if(Ln!==null){var s=Ln.memoizedState;if(i=s.destroy,r!==null&&oE(r,s.deps)){o.memoizedState=Ad(t,n,i,r);return}}rn.flags|=e,o.memoizedState=Ad(1|t,n,i,r)}function tA(e,t){return qm(8390656,8,e,t)}function cE(e,t){return zm(2048,8,e,t)}function nA(e,t){return zm(4,2,e,t)}function rA(e,t){return zm(4,4,e,t)}function oA(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function iA(e,t,n){return n=n!=null?n.concat([e]):null,zm(4,4,oA.bind(null,t,e),n)}function uE(){}function sA(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oE(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function aA(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&oE(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lA(e,t,n){return kl&21?(fi(n,t)||(n=R_(),rn.lanes|=n,Nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Zr=!0),e.memoizedState=n)}function j9(e,t){var n=_t;_t=n!==0&&4>n?n:4,e(!0);var r=rE.transition;rE.transition={};try{e(!1),t()}finally{_t=n,rE.transition=r}}function cA(){return Po().memoizedState}function U9(e,t,n){var r=Ea(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},uA(e))fA(t,n);else if(n=RO(e,t,n,r),n!==null){var o=Mr();gi(n,e,r,o),dA(n,t,r)}}function B9(e,t,n){var r=Ea(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(uA(e))fA(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,fi(l,s)){var c=t.interleaved;c===null?(o.next=o,Qb(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=RO(e,t,o,r),n!==null&&(o=Mr(),gi(n,e,r,o),dA(n,t,r))}}function uA(e){var t=e.alternate;return e===rn||t!==null&&t===rn}function fA(e,t){Nd=Bm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ub(e,n)}}var Hm={readContext:Mo,useCallback:gr,useContext:gr,useEffect:gr,useImperativeHandle:gr,useInsertionEffect:gr,useLayoutEffect:gr,useMemo:gr,useReducer:gr,useRef:gr,useState:gr,useDebugValue:gr,useDeferredValue:gr,useTransition:gr,useMutableSource:gr,useSyncExternalStore:gr,useId:gr,unstable_isNewReconciler:!1},q9={readContext:Mo,useCallback:function(e,t){return Hi().memoizedState=[e,t===void 0?null:t],e},useContext:Mo,useEffect:tA,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qm(4194308,4,oA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qm(4194308,4,e,t)},useInsertionEffect:function(e,t){return qm(4,2,e,t)},useMemo:function(e,t){var n=Hi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=U9.bind(null,rn,e),[r.memoizedState,e]},useRef:function(e){var t=Hi();return e={current:e},t.memoizedState=e},useState:ZO,useDebugValue:uE,useDeferredValue:function(e){return Hi().memoizedState=e},useTransition:function(){var e=ZO(!1),t=e[0];return e=j9.bind(null,e[1]),Hi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rn,o=Hi();if(Yt){if(n===void 0)throw Error(Ne(407));n=n()}else{if(n=t(),Wn===null)throw Error(Ne(349));kl&30||YO(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,tA(KO.bind(null,r,i,e),[e]),r.flags|=2048,Ad(9,QO.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Hi(),t=Wn.identifierPrefix;if(Yt){var n=vs,r=gs;n=(r&~(1<<32-ui(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_d++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=V9++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},z9={readContext:Mo,useCallback:sA,useContext:Mo,useEffect:cE,useImperativeHandle:iA,useInsertionEffect:nA,useLayoutEffect:rA,useMemo:aA,useReducer:aE,useRef:eA,useState:function(){return aE(Od)},useDebugValue:uE,useDeferredValue:function(e){var t=Po();return lA(t,Ln.memoizedState,e)},useTransition:function(){var e=aE(Od)[0],t=Po().memoizedState;return[e,t]},useMutableSource:WO,useSyncExternalStore:GO,useId:cA,unstable_isNewReconciler:!1},H9={readContext:Mo,useCallback:sA,useContext:Mo,useEffect:cE,useImperativeHandle:iA,useInsertionEffect:nA,useLayoutEffect:rA,useMemo:aA,useReducer:lE,useRef:eA,useState:function(){return lE(Od)},useDebugValue:uE,useDeferredValue:function(e){var t=Po();return Ln===null?t.memoizedState=e:lA(t,Ln.memoizedState,e)},useTransition:function(){var e=lE(Od)[0],t=Po().memoizedState;return[e,t]},useMutableSource:WO,useSyncExternalStore:GO,useId:cA,unstable_isNewReconciler:!1};function du(e,t){try{var n="",r=t;do n+=b7(r),r=r.return;while(r);var o=n}catch(i){o=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function fE(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function dE(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var W9=typeof WeakMap=="function"?WeakMap:Map;function pA(e,t,n){n=bs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xm||(Xm=!0,NE=r),dE(e,t)},n}function hA(e,t,n){n=bs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){dE(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){dE(e,t),typeof r!="function"&&(ya===null?ya=new Set([this]):ya.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function mA(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new W9;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=sj.bind(null,e,t,n),t.then(e,e))}function gA(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function vA(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=bs(-1,1),t.tag=2,ga(n,t,1))),n.lanes|=1),e)}var G9=ps.ReactCurrentOwner,Zr=!1;function Fr(e,t,n,r){t.child=e===null?zO(t,null,n,r):uu(t,e.child,n,r)}function yA(e,t,n,r,o){n=n.render;var i=t.ref;return cu(t,o),r=iE(e,t,n,r,i,o),n=sE(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Yt&&n&&jb(t),t.flags|=1,Fr(e,t,r,o),t.child)}function bA(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!RE(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,EA(e,t,i,r,o)):(e=og(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:gd,n(s,r)&&e.ref===t.ref)return Es(e,t,o)}return t.flags|=1,e=xa(i,r),e.ref=t.ref,e.return=t,t.child=e}function EA(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(gd(i,r)&&e.ref===t.ref)if(Zr=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Zr=!0);else return t.lanes=e.lanes,Es(e,t,o)}return pE(e,t,n,r,o)}function wA(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(hu,go),go|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Rt(hu,go),go|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Rt(hu,go),go|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Rt(hu,go),go|=r;return Fr(e,t,o,n),t.child}function xA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pE(e,t,n,r,o){var i=Xr(n)?wl:mr.current;return i=ou(t,i),cu(t,o),n=iE(e,t,n,r,i,o),r=sE(),e!==null&&!Zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Es(e,t,o)):(Yt&&r&&jb(t),t.flags|=1,Fr(e,t,n,o),t.child)}function SA(e,t,n,r,o){if(Xr(n)){var i=!0;Om(t)}else i=!1;if(cu(t,o),t.stateNode===null)Gm(e,t),jO(t,n,r),Xb(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var c=s.context,f=n.contextType;typeof f=="object"&&f!==null?f=Mo(f):(f=Xr(n)?wl:mr.current,f=ou(t,f));var d=n.getDerivedStateFromProps,g=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";g||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||c!==f)&&UO(t,s,r,f),ma=!1;var m=t.memoizedState;s.state=m,Pm(t,r,s,o),c=t.memoizedState,l!==r||m!==c||Jr.current||ma?(typeof d=="function"&&(Jb(t,n,d,r),c=t.memoizedState),(l=ma||VO(t,n,l,r,m,c,f))?(g||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=f,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,FO(e,t),l=t.memoizedProps,f=t.type===t.elementType?l:pi(t.type,l),s.props=f,g=t.pendingProps,m=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=Mo(c):(c=Xr(n)?wl:mr.current,c=ou(t,c));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==g||m!==c)&&UO(t,s,r,c),ma=!1,m=t.memoizedState,s.state=m,Pm(t,r,s,o);var b=t.memoizedState;l!==g||m!==b||Jr.current||ma?(typeof v=="function"&&(Jb(t,n,v,r),b=t.memoizedState),(f=ma||VO(t,n,f,r,m,b,c)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,b,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,b,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),s.props=r,s.state=b,s.context=c,r=f):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return hE(e,t,n,r,i,o)}function hE(e,t,n,r,o,i){xA(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&NO(t,n,!1),Es(e,t,i);r=t.stateNode,G9.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=uu(t,e.child,null,i),t.child=uu(t,null,l,i)):Fr(e,t,l,i),t.memoizedState=r.state,o&&NO(t,n,!0),t.child}function TA(e){var t=e.stateNode;t.pendingContext?CO(e,t.pendingContext,t.pendingContext!==t.context):t.context&&CO(e,t.context,!1),Zb(e,t.containerInfo)}function CA(e,t,n,r,o){return au(),zb(o),t.flags|=256,Fr(e,t,n,r),t.child}var mE={dehydrated:null,treeContext:null,retryLane:0};function gE(e){return{baseLanes:e,cachePool:null,transitions:null}}function kA(e,t,n){var r=t.pendingProps,o=nn.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Rt(nn,o&1),e===null)return qb(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=ig(s,r,0,null),e=Dl(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=gE(n),t.memoizedState=mE,e):vE(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return Y9(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=xa(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=xa(l,i):(i=Dl(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?gE(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=mE,r}return i=e.child,e=i.sibling,r=xa(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function vE(e,t){return t=ig({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Wm(e,t,n,r){return r!==null&&zb(r),uu(t,e.child,null,n),e=vE(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Y9(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=fE(Error(Ne(422))),Wm(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ig({mode:"visible",children:r.children},o,0,null),i=Dl(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&uu(t,e.child,null,s),t.child.memoizedState=gE(s),t.memoizedState=mE,i);if(!(t.mode&1))return Wm(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(Ne(419)),r=fE(i,r,void 0),Wm(e,t,s,r)}if(l=(s&e.childLanes)!==0,Zr||l){if(r=Wn,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,ys(e,o),gi(r,e,o,-1))}return LE(),r=fE(Error(Ne(421))),Wm(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=aj.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,mo=fa(o.nextSibling),ho=t,Yt=!0,di=null,e!==null&&(Ro[Fo++]=gs,Ro[Fo++]=vs,Ro[Fo++]=xl,gs=e.id,vs=e.overflow,xl=t),t=vE(t,r.children),t.flags|=4096,t)}function NA(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yb(e.return,t,n)}function yE(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function _A(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Fr(e,t,r.children,n),r=nn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&NA(e,n,t);else if(e.tag===19)NA(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Rt(nn,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&jm(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),yE(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}yE(t,!0,n,null,i);break;case"together":yE(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Es(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nl|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,n=xa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Q9(e,t,n){switch(t.tag){case 3:TA(t),au();break;case 5:HO(t);break;case 1:Xr(t.type)&&Om(t);break;case 4:Zb(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Rt(Rm,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Rt(nn,nn.current&1),t.flags|=128,null):n&t.child.childLanes?kA(e,t,n):(Rt(nn,nn.current&1),e=Es(e,t,n),e!==null?e.sibling:null);Rt(nn,nn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return _A(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Rt(nn,nn.current),r)break;return null;case 22:case 23:return t.lanes=0,wA(e,t,n)}return Es(e,t,n)}var OA,bE,AA,DA;OA=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},bE=function(){},AA=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Cl(zi.current);var i=null;switch(n){case"input":o=Y1(e,o),r=Y1(e,r),i=[];break;case"select":o=tn({},o,{value:void 0}),r=tn({},r,{value:void 0}),i=[];break;case"textarea":o=J1(e,o),r=J1(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=km)}Z1(n,r);var s;n=null;for(f in o)if(!r.hasOwnProperty(f)&&o.hasOwnProperty(f)&&o[f]!=null)if(f==="style"){var l=o[f];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Qf.hasOwnProperty(f)?i||(i=[]):(i=i||[]).push(f,null));for(f in r){var c=r[f];if(l=o!=null?o[f]:void 0,r.hasOwnProperty(f)&&c!==l&&(c!=null||l!=null))if(f==="style")if(l){for(s in l)!l.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&l[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(i||(i=[]),i.push(f,n)),n=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Qf.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&jt("scroll",e),i||l===c||(i=[])):(i=i||[]).push(f,c))}n&&(i=i||[]).push("style",n);var f=i;(t.updateQueue=f)&&(t.flags|=4)}},DA=function(e,t,n,r){n!==r&&(t.flags|=4)};function Dd(e,t){if(!Yt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function K9(e,t,n){var r=t.pendingProps;switch(Ub(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vr(t),null;case 1:return Xr(t.type)&&_m(),vr(t),null;case 3:return r=t.stateNode,fu(),Ut(Jr),Ut(mr),nE(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Lm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,di!==null&&(AE(di),di=null))),bE(e,t),vr(t),null;case 5:eE(t);var o=Cl(kd.current);if(n=t.type,e!==null&&t.stateNode!=null)AA(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ne(166));return vr(t),null}if(e=Cl(zi.current),Lm(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qi]=t,r[wd]=i,e=(t.mode&1)!==0,n){case"dialog":jt("cancel",r),jt("close",r);break;case"iframe":case"object":case"embed":jt("load",r);break;case"video":case"audio":for(o=0;o<yd.length;o++)jt(yd[o],r);break;case"source":jt("error",r);break;case"img":case"image":case"link":jt("error",r),jt("load",r);break;case"details":jt("toggle",r);break;case"input":u_(r,i),jt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},jt("invalid",r);break;case"textarea":p_(r,i),jt("invalid",r)}Z1(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Cm(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Cm(r.textContent,l,e),o=["children",""+l]):Qf.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&jt("scroll",r)}switch(n){case"input":nm(r),d_(r,i,!0);break;case"textarea":nm(r),m_(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=km)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=g_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[qi]=t,e[wd]=r,OA(e,t,!1,!1),t.stateNode=e;e:{switch(s=eb(n,r),n){case"dialog":jt("cancel",e),jt("close",e),o=r;break;case"iframe":case"object":case"embed":jt("load",e),o=r;break;case"video":case"audio":for(o=0;o<yd.length;o++)jt(yd[o],e);o=r;break;case"source":jt("error",e),o=r;break;case"img":case"image":case"link":jt("error",e),jt("load",e),o=r;break;case"details":jt("toggle",e),o=r;break;case"input":u_(e,r),o=Y1(e,r),jt("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=tn({},r,{value:void 0}),jt("invalid",e);break;case"textarea":p_(e,r),o=J1(e,r),jt("invalid",e);break;default:o=r}Z1(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?b_(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&v_(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Zf(e,c):typeof c=="number"&&Zf(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qf.hasOwnProperty(i)?c!=null&&i==="onScroll"&&jt("scroll",e):c!=null&&P1(e,i,c,s))}switch(n){case"input":nm(e),d_(e,r,!1);break;case"textarea":nm(e),m_(e);break;case"option":r.value!=null&&e.setAttribute("value",""+oa(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Wc(e,!!r.multiple,i,!1):r.defaultValue!=null&&Wc(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=km)}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&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vr(t),null;case 6:if(e&&t.stateNode!=null)DA(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Ne(166));if(n=Cl(kd.current),Cl(zi.current),Lm(t)){if(r=t.stateNode,n=t.memoizedProps,r[qi]=t,(i=r.nodeValue!==n)&&(e=ho,e!==null))switch(e.tag){case 3:Cm(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cm(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qi]=t,t.stateNode=r}return vr(t),null;case 13:if(Ut(nn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Yt&&mo!==null&&t.mode&1&&!(t.flags&128))LO(),au(),t.flags|=98560,i=!1;else if(i=Lm(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(Ne(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ne(317));i[qi]=t}else au(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vr(t),i=!1}else di!==null&&(AE(di),di=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||nn.current&1?Rn===0&&(Rn=3):LE())),t.updateQueue!==null&&(t.flags|=4),vr(t),null);case 4:return fu(),bE(e,t),e===null&&bd(t.stateNode.containerInfo),vr(t),null;case 10:return Gb(t.type._context),vr(t),null;case 17:return Xr(t.type)&&_m(),vr(t),null;case 19:if(Ut(nn),i=t.memoizedState,i===null)return vr(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Dd(i,!1);else{if(Rn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=jm(e),s!==null){for(t.flags|=128,Dd(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Rt(nn,nn.current&1|2),t.child}e=e.sibling}i.tail!==null&&hn()>mu&&(t.flags|=128,r=!0,Dd(i,!1),t.lanes=4194304)}else{if(!r)if(e=jm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Dd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Yt)return vr(t),null}else 2*hn()-i.renderingStartTime>mu&&n!==1073741824&&(t.flags|=128,r=!0,Dd(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=hn(),t.sibling=null,n=nn.current,Rt(nn,r?n&1|2:n&1),t):(vr(t),null);case 22:case 23:return IE(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?go&1073741824&&(vr(t),t.subtreeFlags&6&&(t.flags|=8192)):vr(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function J9(e,t){switch(Ub(t),t.tag){case 1:return Xr(t.type)&&_m(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fu(),Ut(Jr),Ut(mr),nE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eE(t),null;case 13:if(Ut(nn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));au()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ut(nn),null;case 4:return fu(),null;case 10:return Gb(t.type._context),null;case 22:case 23:return IE(),null;case 24:return null;default:return null}}var Ym=!1,yr=!1,X9=typeof WeakSet=="function"?WeakSet:Set,$e=null;function pu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){un(e,t,r)}else n.current=null}function EE(e,t,n){try{n()}catch(r){un(e,t,r)}}var IA=!1;function Z9(e,t){if(Ib=hm,e=cO(),Tb(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,c=-1,f=0,d=0,g=e,m=null;t:for(;;){for(var v;g!==n||o!==0&&g.nodeType!==3||(l=s+o),g!==i||r!==0&&g.nodeType!==3||(c=s+r),g.nodeType===3&&(s+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++f===o&&(l=s),m===i&&++d===r&&(c=s),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lb={focusedElem:e,selectionRange:n},hm=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var w=b.memoizedProps,N=b.memoizedState,S=t.stateNode,x=S.getSnapshotBeforeUpdate(t.elementType===t.type?w:pi(t.type,w),N);S.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var C=t.stateNode.containerInfo;C.nodeType===1?C.textContent="":C.nodeType===9&&C.documentElement&&C.removeChild(C.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(E){un(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return b=IA,IA=!1,b}function Id(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&EE(t,n,i)}o=o.next}while(o!==r)}}function Qm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wE(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function LA(e){var t=e.alternate;t!==null&&(e.alternate=null,LA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[qi],delete t[wd],delete t[Pb],delete t[F9],delete t[M9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function RA(e){return e.tag===5||e.tag===3||e.tag===4}function FA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||RA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xE(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=km));else if(r!==4&&(e=e.child,e!==null))for(xE(e,t,n),e=e.sibling;e!==null;)xE(e,t,n),e=e.sibling}function SE(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(SE(e,t,n),e=e.sibling;e!==null;)SE(e,t,n),e=e.sibling}var tr=null,hi=!1;function va(e,t,n){for(n=n.child;n!==null;)MA(e,t,n),n=n.sibling}function MA(e,t,n){if(Bi&&typeof Bi.onCommitFiberUnmount=="function")try{Bi.onCommitFiberUnmount(lm,n)}catch{}switch(n.tag){case 5:yr||pu(n,t);case 6:var r=tr,o=hi;tr=null,va(e,t,n),tr=r,hi=o,tr!==null&&(hi?(e=tr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):tr.removeChild(n.stateNode));break;case 18:tr!==null&&(hi?(e=tr,n=n.stateNode,e.nodeType===8?Mb(e.parentNode,n):e.nodeType===1&&Mb(e,n),ud(e)):Mb(tr,n.stateNode));break;case 4:r=tr,o=hi,tr=n.stateNode.containerInfo,hi=!0,va(e,t,n),tr=r,hi=o;break;case 0:case 11:case 14:case 15:if(!yr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&EE(n,t,s),o=o.next}while(o!==r)}va(e,t,n);break;case 1:if(!yr&&(pu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){un(n,t,l)}va(e,t,n);break;case 21:va(e,t,n);break;case 22:n.mode&1?(yr=(r=yr)||n.memoizedState!==null,va(e,t,n),yr=r):va(e,t,n);break;default:va(e,t,n)}}function PA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new X9),t.forEach(function(r){var o=lj.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function mi(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:tr=l.stateNode,hi=!1;break e;case 3:tr=l.stateNode.containerInfo,hi=!0;break e;case 4:tr=l.stateNode.containerInfo,hi=!0;break e}l=l.return}if(tr===null)throw Error(Ne(160));MA(i,s,o),tr=null,hi=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(f){un(o,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)$A(t,e),t=t.sibling}function $A(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mi(t,e),Wi(e),r&4){try{Id(3,e,e.return),Qm(3,e)}catch(w){un(e,e.return,w)}try{Id(5,e,e.return)}catch(w){un(e,e.return,w)}}break;case 1:mi(t,e),Wi(e),r&512&&n!==null&&pu(n,n.return);break;case 5:if(mi(t,e),Wi(e),r&512&&n!==null&&pu(n,n.return),e.flags&32){var o=e.stateNode;try{Zf(o,"")}catch(w){un(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&f_(o,i),eb(l,s);var f=eb(l,i);for(s=0;s<c.length;s+=2){var d=c[s],g=c[s+1];d==="style"?b_(o,g):d==="dangerouslySetInnerHTML"?v_(o,g):d==="children"?Zf(o,g):P1(o,d,g,f)}switch(l){case"input":Q1(o,i);break;case"textarea":h_(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?Wc(o,!!i.multiple,v,!1):m!==!!i.multiple&&(i.defaultValue!=null?Wc(o,!!i.multiple,i.defaultValue,!0):Wc(o,!!i.multiple,i.multiple?[]:"",!1))}o[wd]=i}catch(w){un(e,e.return,w)}}break;case 6:if(mi(t,e),Wi(e),r&4){if(e.stateNode===null)throw Error(Ne(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){un(e,e.return,w)}}break;case 3:if(mi(t,e),Wi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ud(t.containerInfo)}catch(w){un(e,e.return,w)}break;case 4:mi(t,e),Wi(e);break;case 13:mi(t,e),Wi(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(kE=hn())),r&4&&PA(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(yr=(f=yr)||d,mi(t,e),yr=f):mi(t,e),Wi(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!d&&e.mode&1)for($e=e,d=e.child;d!==null;){for(g=$e=d;$e!==null;){switch(m=$e,v=m.child,m.tag){case 0:case 11:case 14:case 15:Id(4,m,m.return);break;case 1:pu(m,m.return);var b=m.stateNode;if(typeof b.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(w){un(r,n,w)}}break;case 5:pu(m,m.return);break;case 22:if(m.memoizedState!==null){UA(g);continue}}v!==null?(v.return=m,$e=v):UA(g)}d=d.sibling}e:for(d=null,g=e;;){if(g.tag===5){if(d===null){d=g;try{o=g.stateNode,f?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=g.stateNode,c=g.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=y_("display",s))}catch(w){un(e,e.return,w)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=f?"":g.memoizedProps}catch(w){un(e,e.return,w)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;d===g&&(d=null),g=g.return}d===g&&(d=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:mi(t,e),Wi(e),r&4&&PA(e);break;case 21:break;default:mi(t,e),Wi(e)}}function Wi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(RA(n)){var r=n;break e}n=n.return}throw Error(Ne(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Zf(o,""),r.flags&=-33);var i=FA(e);SE(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=FA(e);xE(e,l,s);break;default:throw Error(Ne(161))}}catch(c){un(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ej(e,t,n){$e=e,VA(e)}function VA(e,t,n){for(var r=(e.mode&1)!==0;$e!==null;){var o=$e,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ym;if(!s){var l=o.alternate,c=l!==null&&l.memoizedState!==null||yr;l=Ym;var f=yr;if(Ym=s,(yr=c)&&!f)for($e=o;$e!==null;)s=$e,c=s.child,s.tag===22&&s.memoizedState!==null?BA(o):c!==null?(c.return=s,$e=c):BA(o);for(;i!==null;)$e=i,VA(i),i=i.sibling;$e=o,Ym=l,yr=f}jA(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,$e=i):jA(e)}}function jA(e){for(;$e!==null;){var t=$e;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:yr||Qm(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!yr)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:pi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&PO(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}PO(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var d=f.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&ud(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ne(163))}yr||t.flags&512&&wE(t)}catch(m){un(t,t.return,m)}}if(t===e){$e=null;break}if(n=t.sibling,n!==null){n.return=t.return,$e=n;break}$e=t.return}}function UA(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var n=t.sibling;if(n!==null){n.return=t.return,$e=n;break}$e=t.return}}function BA(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qm(4,t)}catch(c){un(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){un(t,o,c)}}var i=t.return;try{wE(t)}catch(c){un(t,i,c)}break;case 5:var s=t.return;try{wE(t)}catch(c){un(t,s,c)}}}catch(c){un(t,t.return,c)}if(t===e){$e=null;break}var l=t.sibling;if(l!==null){l.return=t.return,$e=l;break}$e=t.return}}var tj=Math.ceil,Km=ps.ReactCurrentDispatcher,TE=ps.ReactCurrentOwner,$o=ps.ReactCurrentBatchConfig,bt=0,Wn=null,Cn=null,nr=0,go=0,hu=da(0),Rn=0,Ld=null,Nl=0,Jm=0,CE=0,Rd=null,eo=null,kE=0,mu=1/0,ws=null,Xm=!1,NE=null,ya=null,Zm=!1,ba=null,eg=0,Fd=0,_E=null,tg=-1,ng=0;function Mr(){return bt&6?hn():tg!==-1?tg:tg=hn()}function Ea(e){return e.mode&1?bt&2&&nr!==0?nr&-nr:$9.transition!==null?(ng===0&&(ng=R_()),ng):(e=_t,e!==0||(e=window.event,e=e===void 0?16:q_(e.type)),e):1}function gi(e,t,n,r){if(50<Fd)throw Fd=0,_E=null,Error(Ne(185));id(e,n,r),(!(bt&2)||e!==Wn)&&(e===Wn&&(!(bt&2)&&(Jm|=n),Rn===4&&wa(e,nr)),to(e,r),n===1&&bt===0&&!(t.mode&1)&&(mu=hn()+500,Am&&ha()))}function to(e,t){var n=e.callbackNode;$7(e,t);var r=fm(e,e===Wn?nr:0);if(r===0)n!==null&&D_(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&D_(n),t===1)e.tag===0?P9(zA.bind(null,e)):_O(zA.bind(null,e)),L9(function(){!(bt&6)&&ha()}),n=null;else{switch(F_(r)){case 1:n=ab;break;case 4:n=I_;break;case 16:n=am;break;case 536870912:n=L_;break;default:n=am}n=XA(n,qA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qA(e,t){if(tg=-1,ng=0,bt&6)throw Error(Ne(327));var n=e.callbackNode;if(gu()&&e.callbackNode!==n)return null;var r=fm(e,e===Wn?nr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=rg(e,r);else{t=r;var o=bt;bt|=2;var i=WA();(Wn!==e||nr!==t)&&(ws=null,mu=hn()+500,Ol(e,t));do try{oj();break}catch(l){HA(e,l)}while(!0);Wb(),Km.current=i,bt=o,Cn!==null?t=0:(Wn=null,nr=0,t=Rn)}if(t!==0){if(t===2&&(o=lb(e),o!==0&&(r=o,t=OE(e,o))),t===1)throw n=Ld,Ol(e,0),wa(e,r),to(e,hn()),n;if(t===6)wa(e,r);else{if(o=e.current.alternate,!(r&30)&&!nj(o)&&(t=rg(e,r),t===2&&(i=lb(e),i!==0&&(r=i,t=OE(e,i))),t===1))throw n=Ld,Ol(e,0),wa(e,r),to(e,hn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(Ne(345));case 2:Al(e,eo,ws);break;case 3:if(wa(e,r),(r&130023424)===r&&(t=kE+500-hn(),10<t)){if(fm(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Mr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Fb(Al.bind(null,e,eo,ws),t);break}Al(e,eo,ws);break;case 4:if(wa(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-ui(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=hn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tj(r/1960))-r,10<r){e.timeoutHandle=Fb(Al.bind(null,e,eo,ws),r);break}Al(e,eo,ws);break;case 5:Al(e,eo,ws);break;default:throw Error(Ne(329))}}}return to(e,hn()),e.callbackNode===n?qA.bind(null,e):null}function OE(e,t){var n=Rd;return e.current.memoizedState.isDehydrated&&(Ol(e,t).flags|=256),e=rg(e,t),e!==2&&(t=eo,eo=n,t!==null&&AE(t)),e}function AE(e){eo===null?eo=e:eo.push.apply(eo,e)}function nj(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!fi(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wa(e,t){for(t&=~CE,t&=~Jm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ui(t),r=1<<n;e[n]=-1,t&=~r}}function zA(e){if(bt&6)throw Error(Ne(327));gu();var t=fm(e,0);if(!(t&1))return to(e,hn()),null;var n=rg(e,t);if(e.tag!==0&&n===2){var r=lb(e);r!==0&&(t=r,n=OE(e,r))}if(n===1)throw n=Ld,Ol(e,0),wa(e,t),to(e,hn()),n;if(n===6)throw Error(Ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Al(e,eo,ws),to(e,hn()),null}function DE(e,t){var n=bt;bt|=1;try{return e(t)}finally{bt=n,bt===0&&(mu=hn()+500,Am&&ha())}}function _l(e){ba!==null&&ba.tag===0&&!(bt&6)&&gu();var t=bt;bt|=1;var n=$o.transition,r=_t;try{if($o.transition=null,_t=1,e)return e()}finally{_t=r,$o.transition=n,bt=t,!(bt&6)&&ha()}}function IE(){go=hu.current,Ut(hu)}function Ol(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,I9(n)),Cn!==null)for(n=Cn.return;n!==null;){var r=n;switch(Ub(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_m();break;case 3:fu(),Ut(Jr),Ut(mr),nE();break;case 5:eE(r);break;case 4:fu();break;case 13:Ut(nn);break;case 19:Ut(nn);break;case 10:Gb(r.type._context);break;case 22:case 23:IE()}n=n.return}if(Wn=e,Cn=e=xa(e.current,null),nr=go=t,Rn=0,Ld=null,CE=Jm=Nl=0,eo=Rd=null,Tl!==null){for(t=0;t<Tl.length;t++)if(n=Tl[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Tl=null}return e}function HA(e,t){do{var n=Cn;try{if(Wb(),Um.current=Hm,Bm){for(var r=rn.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Bm=!1}if(kl=0,Hn=Ln=rn=null,Nd=!1,_d=0,TE.current=null,n===null||n.return===null){Rn=1,Ld=t,Cn=null;break}e:{var i=e,s=n.return,l=n,c=t;if(t=nr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,d=l,g=d.tag;if(!(d.mode&1)&&(g===0||g===11||g===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=gA(s);if(v!==null){v.flags&=-257,vA(v,s,l,i,t),v.mode&1&&mA(i,f,t),t=v,c=f;var b=t.updateQueue;if(b===null){var w=new Set;w.add(c),t.updateQueue=w}else b.add(c);break e}else{if(!(t&1)){mA(i,f,t),LE();break e}c=Error(Ne(426))}}else if(Yt&&l.mode&1){var N=gA(s);if(N!==null){!(N.flags&65536)&&(N.flags|=256),vA(N,s,l,i,t),zb(du(c,l));break e}}i=c=du(c,l),Rn!==4&&(Rn=2),Rd===null?Rd=[i]:Rd.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var S=pA(i,c,t);MO(i,S);break e;case 1:l=c;var x=i.type,C=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(ya===null||!ya.has(C)))){i.flags|=65536,t&=-t,i.lanes|=t;var E=hA(i,l,t);MO(i,E);break e}}i=i.return}while(i!==null)}YA(n)}catch(_){t=_,Cn===n&&n!==null&&(Cn=n=n.return);continue}break}while(!0)}function WA(){var e=Km.current;return Km.current=Hm,e===null?Hm:e}function LE(){(Rn===0||Rn===3||Rn===2)&&(Rn=4),Wn===null||!(Nl&268435455)&&!(Jm&268435455)||wa(Wn,nr)}function rg(e,t){var n=bt;bt|=2;var r=WA();(Wn!==e||nr!==t)&&(ws=null,Ol(e,t));do try{rj();break}catch(o){HA(e,o)}while(!0);if(Wb(),bt=n,Km.current=r,Cn!==null)throw Error(Ne(261));return Wn=null,nr=0,Rn}function rj(){for(;Cn!==null;)GA(Cn)}function oj(){for(;Cn!==null&&!O7();)GA(Cn)}function GA(e){var t=JA(e.alternate,e,go);e.memoizedProps=e.pendingProps,t===null?YA(e):Cn=t,TE.current=null}function YA(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=J9(n,t),n!==null){n.flags&=32767,Cn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Rn=6,Cn=null;return}}else if(n=K9(n,t,go),n!==null){Cn=n;return}if(t=t.sibling,t!==null){Cn=t;return}Cn=t=e}while(t!==null);Rn===0&&(Rn=5)}function Al(e,t,n){var r=_t,o=$o.transition;try{$o.transition=null,_t=1,ij(e,t,n,r)}finally{$o.transition=o,_t=r}return null}function ij(e,t,n,r){do gu();while(ba!==null);if(bt&6)throw Error(Ne(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ne(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(V7(e,i),e===Wn&&(Cn=Wn=null,nr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Zm||(Zm=!0,XA(am,function(){return gu(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=$o.transition,$o.transition=null;var s=_t;_t=1;var l=bt;bt|=4,TE.current=null,Z9(e,n),$A(n,e),C9(Lb),hm=!!Ib,Lb=Ib=null,e.current=n,ej(n),A7(),bt=l,_t=s,$o.transition=i}else e.current=n;if(Zm&&(Zm=!1,ba=e,eg=o),i=e.pendingLanes,i===0&&(ya=null),L7(n.stateNode),to(e,hn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Xm)throw Xm=!1,e=NE,NE=null,e;return eg&1&&e.tag!==0&&gu(),i=e.pendingLanes,i&1?e===_E?Fd++:(Fd=0,_E=e):Fd=0,ha(),null}function gu(){if(ba!==null){var e=F_(eg),t=$o.transition,n=_t;try{if($o.transition=null,_t=16>e?16:e,ba===null)var r=!1;else{if(e=ba,ba=null,eg=0,bt&6)throw Error(Ne(331));var o=bt;for(bt|=4,$e=e.current;$e!==null;){var i=$e,s=i.child;if($e.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var f=l[c];for($e=f;$e!==null;){var d=$e;switch(d.tag){case 0:case 11:case 15:Id(8,d,i)}var g=d.child;if(g!==null)g.return=d,$e=g;else for(;$e!==null;){d=$e;var m=d.sibling,v=d.return;if(LA(d),d===f){$e=null;break}if(m!==null){m.return=v,$e=m;break}$e=v}}}var b=i.alternate;if(b!==null){var w=b.child;if(w!==null){b.child=null;do{var N=w.sibling;w.sibling=null,w=N}while(w!==null)}}$e=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,$e=s;else e:for(;$e!==null;){if(i=$e,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Id(9,i,i.return)}var S=i.sibling;if(S!==null){S.return=i.return,$e=S;break e}$e=i.return}}var x=e.current;for($e=x;$e!==null;){s=$e;var C=s.child;if(s.subtreeFlags&2064&&C!==null)C.return=s,$e=C;else e:for(s=x;$e!==null;){if(l=$e,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Qm(9,l)}}catch(_){un(l,l.return,_)}if(l===s){$e=null;break e}var E=l.sibling;if(E!==null){E.return=l.return,$e=E;break e}$e=l.return}}if(bt=o,ha(),Bi&&typeof Bi.onPostCommitFiberRoot=="function")try{Bi.onPostCommitFiberRoot(lm,e)}catch{}r=!0}return r}finally{_t=n,$o.transition=t}}return!1}function QA(e,t,n){t=du(n,t),t=pA(e,t,1),e=ga(e,t,1),t=Mr(),e!==null&&(id(e,1,t),to(e,t))}function un(e,t,n){if(e.tag===3)QA(e,e,n);else for(;t!==null;){if(t.tag===3){QA(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ya===null||!ya.has(r))){e=du(n,e),e=hA(t,e,1),t=ga(t,e,1),e=Mr(),t!==null&&(id(t,1,e),to(t,e));break}}t=t.return}}function sj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Mr(),e.pingedLanes|=e.suspendedLanes&n,Wn===e&&(nr&n)===n&&(Rn===4||Rn===3&&(nr&130023424)===nr&&500>hn()-kE?Ol(e,0):CE|=n),to(e,t)}function KA(e,t){t===0&&(e.mode&1?(t=um,um<<=1,!(um&130023424)&&(um=4194304)):t=1);var n=Mr();e=ys(e,t),e!==null&&(id(e,t,n),to(e,n))}function aj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KA(e,n)}function lj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ne(314))}r!==null&&r.delete(t),KA(e,n)}var JA;JA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Jr.current)Zr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Zr=!1,Q9(e,t,n);Zr=!!(e.flags&131072)}else Zr=!1,Yt&&t.flags&1048576&&OO(t,Im,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Gm(e,t),e=t.pendingProps;var o=ou(t,mr.current);cu(t,n),o=iE(null,t,r,e,o,n);var i=sE();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xr(r)?(i=!0,Om(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Kb(t),o.updater=$m,t.stateNode=o,o._reactInternals=t,Xb(t,r,e,n),t=hE(null,t,r,!0,i,n)):(t.tag=0,Yt&&i&&jb(t),Fr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Gm(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=uj(r),e=pi(r,e),o){case 0:t=pE(null,t,r,e,n);break e;case 1:t=SA(null,t,r,e,n);break e;case 11:t=yA(null,t,r,e,n);break e;case 14:t=bA(null,t,r,pi(r.type,e),n);break e}throw Error(Ne(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),pE(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),SA(e,t,r,o,n);case 3:e:{if(TA(t),e===null)throw Error(Ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,FO(e,t),Pm(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=du(Error(Ne(423)),t),t=CA(e,t,r,n,o);break e}else if(r!==o){o=du(Error(Ne(424)),t),t=CA(e,t,r,n,o);break e}else for(mo=fa(t.stateNode.containerInfo.firstChild),ho=t,Yt=!0,di=null,n=zO(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(au(),r===o){t=Es(e,t,n);break e}Fr(e,t,r,n)}t=t.child}return t;case 5:return HO(t),e===null&&qb(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Rb(r,o)?s=null:i!==null&&Rb(r,i)&&(t.flags|=32),xA(e,t),Fr(e,t,s,n),t.child;case 6:return e===null&&qb(t),null;case 13:return kA(e,t,n);case 4:return Zb(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uu(t,null,r,n):Fr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),yA(e,t,r,o,n);case 7:return Fr(e,t,t.pendingProps,n),t.child;case 8:return Fr(e,t,t.pendingProps.children,n),t.child;case 12:return Fr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,Rt(Rm,r._currentValue),r._currentValue=s,i!==null)if(fi(i.value,s)){if(i.children===o.children&&!Jr.current){t=Es(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=bs(-1,n&-n),c.tag=2;var f=i.updateQueue;if(f!==null){f=f.shared;var d=f.pending;d===null?c.next=c:(c.next=d.next,d.next=c),f.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Yb(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(Ne(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Yb(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Fr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,cu(t,n),o=Mo(o),r=r(o),t.flags|=1,Fr(e,t,r,n),t.child;case 14:return r=t.type,o=pi(r,t.pendingProps),o=pi(r.type,o),bA(e,t,r,o,n);case 15:return EA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:pi(r,o),Gm(e,t),t.tag=1,Xr(r)?(e=!0,Om(t)):e=!1,cu(t,n),jO(t,r,o),Xb(t,r,o,n),hE(null,t,r,!0,e,n);case 19:return _A(e,t,n);case 22:return wA(e,t,n)}throw Error(Ne(156,t.tag))};function XA(e,t){return A_(e,t)}function cj(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 Vo(e,t,n,r){return new cj(e,t,n,r)}function RE(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uj(e){if(typeof e=="function")return RE(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j1)return 11;if(e===q1)return 14}return 2}function xa(e,t){var n=e.alternate;return n===null?(n=Vo(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function og(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")RE(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Hc:return Dl(n.children,o,i,t);case $1:s=8,o|=8;break;case V1:return e=Vo(12,n,t,o|2),e.elementType=V1,e.lanes=i,e;case U1:return e=Vo(13,n,t,o),e.elementType=U1,e.lanes=i,e;case B1:return e=Vo(19,n,t,o),e.elementType=B1,e.lanes=i,e;case s_:return ig(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o_:s=10;break e;case i_:s=9;break e;case j1:s=11;break e;case q1:s=14;break e;case ra:s=16,r=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=Vo(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Dl(e,t,n,r){return e=Vo(7,e,r,t),e.lanes=n,e}function ig(e,t,n,r){return e=Vo(22,e,r,t),e.elementType=s_,e.lanes=n,e.stateNode={isHidden:!1},e}function FE(e,t,n){return e=Vo(6,e,null,t),e.lanes=n,e}function ME(e,t,n){return t=Vo(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fj(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cb(0),this.expirationTimes=cb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cb(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function PE(e,t,n,r,o,i,s,l,c){return e=new fj(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Vo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kb(i),e}function dj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zc,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ZA(e){if(!e)return pa;e=e._reactInternals;e:{if(bl(e)!==e||e.tag!==1)throw Error(Ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ne(171))}if(e.tag===1){var n=e.type;if(Xr(n))return kO(e,n,t)}return t}function eD(e,t,n,r,o,i,s,l,c){return e=PE(n,r,!0,e,o,i,s,l,c),e.context=ZA(null),n=e.current,r=Mr(),o=Ea(n),i=bs(r,o),i.callback=t??null,ga(n,i,o),e.current.lanes=o,id(e,o,r),to(e,r),e}function sg(e,t,n,r){var o=t.current,i=Mr(),s=Ea(o);return n=ZA(n),t.context===null?t.context=n:t.pendingContext=n,t=bs(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ga(o,t,s),e!==null&&(gi(e,o,s,i),Mm(e,o,s)),s}function ag(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tD(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $E(e,t){tD(e,t),(e=e.alternate)&&tD(e,t)}function pj(){return null}var nD=typeof reportError=="function"?reportError:function(e){console.error(e)};function VE(e){this._internalRoot=e}lg.prototype.render=VE.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ne(409));sg(e,t,null,null)},lg.prototype.unmount=VE.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_l(function(){sg(null,e,null,null)}),t[hs]=null}};function lg(e){this._internalRoot=e}lg.prototype.unstable_scheduleHydration=function(e){if(e){var t=$_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<la.length&&t!==0&&t<la[n].priority;n++);la.splice(n,0,e),n===0&&U_(e)}};function jE(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function rD(){}function hj(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var f=ag(s);i.call(f)}}var s=eD(t,r,e,0,null,!1,!1,"",rD);return e._reactRootContainer=s,e[hs]=s.current,bd(e.nodeType===8?e.parentNode:e),_l(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var f=ag(c);l.call(f)}}var c=PE(e,0,!1,null,null,!1,!1,"",rD);return e._reactRootContainer=c,e[hs]=c.current,bd(e.nodeType===8?e.parentNode:e),_l(function(){sg(t,c,n,r)}),c}function ug(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var c=ag(s);l.call(c)}}sg(t,s,e,o)}else s=hj(n,t,e,o,r);return ag(s)}M_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=od(t.pendingLanes);n!==0&&(ub(t,n|1),to(t,hn()),!(bt&6)&&(mu=hn()+500,ha()))}break;case 13:_l(function(){var r=ys(e,1);if(r!==null){var o=Mr();gi(r,e,1,o)}}),$E(e,1)}},fb=function(e){if(e.tag===13){var t=ys(e,134217728);if(t!==null){var n=Mr();gi(t,e,134217728,n)}$E(e,134217728)}},P_=function(e){if(e.tag===13){var t=Ea(e),n=ys(e,t);if(n!==null){var r=Mr();gi(n,e,t,r)}$E(e,t)}},$_=function(){return _t},V_=function(e,t){var n=_t;try{return _t=e,t()}finally{_t=n}},rb=function(e,t,n){switch(t){case"input":if(Q1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Nm(r);if(!o)throw Error(Ne(90));c_(r),Q1(r,o)}}}break;case"textarea":h_(e,n);break;case"select":t=n.value,t!=null&&Wc(e,!!n.multiple,t,!1)}},S_=DE,T_=_l;var mj={usingClientEntryPoint:!1,Events:[xd,nu,Nm,w_,x_,DE]},Md={findFiberByHostInstance:El,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},gj={bundleType:Md.bundleType,version:Md.version,rendererPackageName:Md.rendererPackageName,rendererConfig:Md.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ps.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=__(e),e===null?null:e.stateNode},findFiberByHostInstance:Md.findFiberByHostInstance||pj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fg.isDisabled&&fg.supportsFiber)try{lm=fg.inject(gj),Bi=fg}catch{}}uo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mj,uo.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jE(t))throw Error(Ne(200));return dj(e,t,null,n)},uo.createRoot=function(e,t){if(!jE(e))throw Error(Ne(299));var n=!1,r="",o=nD;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=PE(e,1,!1,null,null,n,!1,r,o),e[hs]=t.current,bd(e.nodeType===8?e.parentNode:e),new VE(t)},uo.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ne(188)):(e=Object.keys(e).join(","),Error(Ne(268,e)));return e=__(t),e=e===null?null:e.stateNode,e},uo.flushSync=function(e){return _l(e)},uo.hydrate=function(e,t,n){if(!cg(t))throw Error(Ne(200));return ug(null,e,t,!0,n)},uo.hydrateRoot=function(e,t,n){if(!jE(e))throw Error(Ne(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=nD;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=eD(t,null,e,1,n??null,o,!1,i,s),e[hs]=t.current,bd(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new lg(t)},uo.render=function(e,t,n){if(!cg(t))throw Error(Ne(200));return ug(null,e,t,!1,n)},uo.unmountComponentAtNode=function(e){if(!cg(e))throw Error(Ne(40));return e._reactRootContainer?(_l(function(){ug(null,null,e,!1,function(){e._reactRootContainer=null,e[hs]=null})}),!0):!1},uo.unstable_batchedUpdates=DE,uo.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cg(n))throw Error(Ne(200));if(e==null||e._reactInternals===void 0)throw Error(Ne(38));return ug(e,t,n,!1,r)},uo.version="18.2.0-next-9e3b772b8-20220608";function oD(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oD)}catch(e){console.error(e)}}oD(),JN.exports=uo;var Pd=JN.exports;const dg=Ui(Pd);function iD(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=iD(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Gn(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=iD(e))&&(r&&(r+=" "),r+=t);return r}const vj="16.8.1",UE=Object.freeze({major:16,minor:8,patch:1,preReleaseTag:null});function lt(e,t){if(!!!e)throw new Error(t)}function vo(e){return typeof(e==null?void 0:e.then)=="function"}function yo(e){return typeof e=="object"&&e!==null}function mn(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const yj=/\r\n|[\n\r]/g;function pg(e,t){let n=0,r=1;for(const o of e.body.matchAll(yj)){if(typeof o.index=="number"||mn(!1),o.index>=t)break;n=o.index+o[0].length,r+=1}return{line:r,column:t+1-n}}function sD(e){return BE(e.source,pg(e.source,e.start))}function BE(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,l=t.line===1?n:0,c=t.column+l,f=`${e.name}:${s}:${c}
`,d=r.split(/\r\n|[\n\r]/g),g=d[o];if(g.length>120){const m=Math.floor(c/80),v=c%80,b=[];for(let w=0;w<g.length;w+=80)b.push(g.slice(w,w+80));return f+aD([[`${s} |`,b[0]],...b.slice(1,m+1).map(w=>["|",w]),["|","^".padStart(v)],["|",b[m+1]]])}return f+aD([[`${s-1} |`,d[o-1]],[`${s} |`,g],["|","^".padStart(c)],[`${s+1} |`,d[o+1]]])}function aD(e){const t=e.filter(([r,o])=>o!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,o])=>r.padStart(n)+(o?" "+o:"")).join(`
`)}function bj(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class he extends Error{constructor(t,...n){var r,o,i;const{nodes:s,source:l,positions:c,path:f,originalError:d,extensions:g}=bj(n);super(t),this.name="GraphQLError",this.path=f??void 0,this.originalError=d??void 0,this.nodes=lD(Array.isArray(s)?s:s?[s]:void 0);const m=lD((r=this.nodes)===null||r===void 0?void 0:r.map(b=>b.loc).filter(b=>b!=null));this.source=l??(m==null||(o=m[0])===null||o===void 0?void 0:o.source),this.positions=c??(m==null?void 0:m.map(b=>b.start)),this.locations=c&&l?c.map(b=>pg(l,b)):m==null?void 0:m.map(b=>pg(b.source,b.start));const v=yo(d==null?void 0:d.extensions)?d==null?void 0:d.extensions:void 0;this.extensions=(i=g??v)!==null&&i!==void 0?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,he):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
`+sD(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
`+BE(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function lD(e){return e===void 0||e.length===0?void 0:e}function Ej(e){return e.toString()}function wj(e){return e.toJSON()}function Fn(e,t,n){return new he(`Syntax Error: ${n}`,{source:e,positions:[t]})}let cD=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},qE=class{constructor(t,n,r,o,i,s){this.kind=t,this.start=n,this.end=r,this.line=o,this.column=i,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const uD={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},xj=new Set(Object.keys(uD));function zE(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&xj.has(t)}var Mn;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Mn||(Mn={}));var Fe;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Fe||(Fe={}));var U;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(U||(U={}));function HE(e){return e===9||e===32}function $d(e){return e>=48&&e<=57}function fD(e){return e>=97&&e<=122||e>=65&&e<=90}function WE(e){return fD(e)||e===95}function dD(e){return fD(e)||$d(e)||e===95}function Sj(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,o=-1;for(let s=0;s<e.length;++s){var i;const l=e[s],c=Tj(l);c!==l.length&&(r=(i=r)!==null&&i!==void 0?i:s,o=s,s!==0&&c<n&&(n=c))}return e.map((s,l)=>l===0?s:s.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,o+1)}function Tj(e){let t=0;for(;t<e.length&&HE(e.charCodeAt(t));)++t;return t}function Cj(e){if(e==="")return!0;let t=!0,n=!1,r=!0,o=!1;for(let i=0;i<e.length;++i)switch(e.codePointAt(i)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!o)return!1;o=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!(t||r&&o)}function pD(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),o=r.length===1,i=r.length>1&&r.slice(1).every(v=>v.length===0||HE(v.charCodeAt(0))),s=n.endsWith('\\"""'),l=e.endsWith('"')&&!s,c=e.endsWith("\\"),f=l||c,d=!(t!=null&&t.minimize)&&(!o||e.length>70||f||i||s);let g="";const m=o&&HE(e.charCodeAt(0));return(d&&!m||i)&&(g+=`
`),g+=n,(d||f)&&(g+=`
`),'"""'+g+'"""'}var ge;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(ge||(ge={}));class GE{constructor(t){const n=new qE(ge.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==ge.EOF)do if(t.next)t=t.next;else{const n=kj(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===ge.COMMENT);return t}}function hD(e){return e===ge.BANG||e===ge.DOLLAR||e===ge.AMP||e===ge.PAREN_L||e===ge.PAREN_R||e===ge.SPREAD||e===ge.COLON||e===ge.EQUALS||e===ge.AT||e===ge.BRACKET_L||e===ge.BRACKET_R||e===ge.BRACE_L||e===ge.PIPE||e===ge.BRACE_R}function vu(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function hg(e,t){return mD(e.charCodeAt(t))&&gD(e.charCodeAt(t+1))}function mD(e){return e>=55296&&e<=56319}function gD(e){return e>=56320&&e<=57343}function Il(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return ge.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function kn(e,t,n,r,o){const i=e.line,s=1+n-e.lineStart;return new qE(t,n,r,i,s,o)}function kj(e,t){const n=e.source.body,r=n.length;let o=t;for(;o<r;){const i=n.charCodeAt(o);switch(i){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:n.charCodeAt(o+1)===10?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return Nj(e,o);case 33:return kn(e,ge.BANG,o,o+1);case 36:return kn(e,ge.DOLLAR,o,o+1);case 38:return kn(e,ge.AMP,o,o+1);case 40:return kn(e,ge.PAREN_L,o,o+1);case 41:return kn(e,ge.PAREN_R,o,o+1);case 46:if(n.charCodeAt(o+1)===46&&n.charCodeAt(o+2)===46)return kn(e,ge.SPREAD,o,o+3);break;case 58:return kn(e,ge.COLON,o,o+1);case 61:return kn(e,ge.EQUALS,o,o+1);case 64:return kn(e,ge.AT,o,o+1);case 91:return kn(e,ge.BRACKET_L,o,o+1);case 93:return kn(e,ge.BRACKET_R,o,o+1);case 123:return kn(e,ge.BRACE_L,o,o+1);case 124:return kn(e,ge.PIPE,o,o+1);case 125:return kn(e,ge.BRACE_R,o,o+1);case 34:return n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34?Lj(e,o):Oj(e,o)}if($d(i)||i===45)return _j(e,o,i);if(WE(i))return Rj(e,o);throw Fn(e.source,o,i===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:vu(i)||hg(n,o)?`Unexpected character: ${Il(e,o)}.`:`Invalid character: ${Il(e,o)}.`)}return kn(e,ge.EOF,r,r)}function Nj(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r;){const i=n.charCodeAt(o);if(i===10||i===13)break;if(vu(i))++o;else if(hg(n,o))o+=2;else break}return kn(e,ge.COMMENT,t,o,n.slice(t+1,o))}function _j(e,t,n){const r=e.source.body;let o=t,i=n,s=!1;if(i===45&&(i=r.charCodeAt(++o)),i===48){if(i=r.charCodeAt(++o),$d(i))throw Fn(e.source,o,`Invalid number, unexpected digit after 0: ${Il(e,o)}.`)}else o=YE(e,o,i),i=r.charCodeAt(o);if(i===46&&(s=!0,i=r.charCodeAt(++o),o=YE(e,o,i),i=r.charCodeAt(o)),(i===69||i===101)&&(s=!0,i=r.charCodeAt(++o),(i===43||i===45)&&(i=r.charCodeAt(++o)),o=YE(e,o,i),i=r.charCodeAt(o)),i===46||WE(i))throw Fn(e.source,o,`Invalid number, expected digit but got: ${Il(e,o)}.`);return kn(e,s?ge.FLOAT:ge.INT,t,o,r.slice(t,o))}function YE(e,t,n){if(!$d(n))throw Fn(e.source,t,`Invalid number, expected digit but got: ${Il(e,t)}.`);const r=e.source.body;let o=t+1;for(;$d(r.charCodeAt(o));)++o;return o}function Oj(e,t){const n=e.source.body,r=n.length;let o=t+1,i=o,s="";for(;o<r;){const l=n.charCodeAt(o);if(l===34)return s+=n.slice(i,o),kn(e,ge.STRING,t,o+1,s);if(l===92){s+=n.slice(i,o);const c=n.charCodeAt(o+1)===117?n.charCodeAt(o+2)===123?Aj(e,o):Dj(e,o):Ij(e,o);s+=c.value,o+=c.size,i=o;continue}if(l===10||l===13)break;if(vu(l))++o;else if(hg(n,o))o+=2;else throw Fn(e.source,o,`Invalid character within String: ${Il(e,o)}.`)}throw Fn(e.source,o,"Unterminated string.")}function Aj(e,t){const n=e.source.body;let r=0,o=3;for(;o<12;){const i=n.charCodeAt(t+o++);if(i===125){if(o<5||!vu(r))break;return{value:String.fromCodePoint(r),size:o}}if(r=r<<4|Vd(i),r<0)break}throw Fn(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+o)}".`)}function Dj(e,t){const n=e.source.body,r=vD(n,t+2);if(vu(r))return{value:String.fromCodePoint(r),size:6};if(mD(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const o=vD(n,t+8);if(gD(o))return{value:String.fromCodePoint(r,o),size:12}}throw Fn(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function vD(e,t){return Vd(e.charCodeAt(t))<<12|Vd(e.charCodeAt(t+1))<<8|Vd(e.charCodeAt(t+2))<<4|Vd(e.charCodeAt(t+3))}function Vd(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Ij(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Fn(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Lj(e,t){const n=e.source.body,r=n.length;let o=e.lineStart,i=t+3,s=i,l="";const c=[];for(;i<r;){const f=n.charCodeAt(i);if(f===34&&n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34){l+=n.slice(s,i),c.push(l);const d=kn(e,ge.BLOCK_STRING,t,i+3,Sj(c).join(`
`));return e.line+=c.length-1,e.lineStart=o,d}if(f===92&&n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34&&n.charCodeAt(i+3)===34){l+=n.slice(s,i),s=i+1,i+=4;continue}if(f===10||f===13){l+=n.slice(s,i),c.push(l),f===13&&n.charCodeAt(i+1)===10?i+=2:++i,l="",s=i,o=i;continue}if(vu(f))++i;else if(hg(n,i))i+=2;else throw Fn(e.source,i,`Invalid character within String: ${Il(e,i)}.`)}throw Fn(e.source,i,"Unterminated string.")}function Rj(e,t){const n=e.source.body,r=n.length;let o=t+1;for(;o<r;){const i=n.charCodeAt(o);if(dD(i))++o;else break}return kn(e,ge.NAME,t,o,n.slice(t,o))}const Fj=10,yD=2;function ye(e){return mg(e,[])}function mg(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Mj(e,t);default:return String(e)}}function Mj(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Pj(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:mg(r,n)}else if(Array.isArray(e))return Vj(e,n);return $j(e,n)}function Pj(e){return typeof e.toJSON=="function"}function $j(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>yD?"["+jj(e)+"]":"{ "+n.map(([o,i])=>o+": "+mg(i,t)).join(", ")+" }"}function Vj(e,t){if(e.length===0)return"[]";if(t.length>yD)return"[Array]";const n=Math.min(Fj,e.length),r=e.length-n,o=[];for(let i=0;i<n;++i)o.push(mg(e[i],t));return r===1?o.push("... 1 more item"):r>1&&o.push(`... ${r} more items`),"["+o.join(", ")+"]"}function jj(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const vi=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const o=n.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(o===i){const s=ye(t);throw new Error(`Cannot use ${o} "${s}" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
https://yarnpkg.com/en/docs/selective-version-resolutions
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.`)}}return!1};class jd{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||lt(!1,`Body must be a string. Received: ${ye(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||lt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||lt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function bD(e){return vi(e,jd)}function rr(e,t){return new gg(e,t).parseDocument()}function ED(e,t){const n=new gg(e,t);n.expectToken(ge.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(ge.EOF),r}function Uj(e,t){const n=new gg(e,t);n.expectToken(ge.SOF);const r=n.parseConstValueLiteral();return n.expectToken(ge.EOF),r}function Bj(e,t){const n=new gg(e,t);n.expectToken(ge.SOF);const r=n.parseTypeReference();return n.expectToken(ge.EOF),r}class gg{constructor(t,n={}){const r=bD(t)?t:new jd(t);this._lexer=new GE(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(ge.NAME);return this.node(t,{kind:U.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:U.DOCUMENT,definitions:this.many(ge.SOF,this.parseDefinition,ge.EOF)})}parseDefinition(){if(this.peek(ge.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===ge.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw Fn(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(ge.BRACE_L))return this.node(t,{kind:U.OPERATION_DEFINITION,operation:Mn.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(ge.NAME)&&(r=this.parseName()),this.node(t,{kind:U.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(ge.NAME);switch(t.value){case"query":return Mn.QUERY;case"mutation":return Mn.MUTATION;case"subscription":return Mn.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(ge.PAREN_L,this.parseVariableDefinition,ge.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:U.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ge.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ge.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(ge.DOLLAR),this.node(t,{kind:U.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:U.SELECTION_SET,selections:this.many(ge.BRACE_L,this.parseSelection,ge.BRACE_R)})}parseSelection(){return this.peek(ge.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,o;return this.expectOptionalToken(ge.COLON)?(r=n,o=this.parseName()):o=n,this.node(t,{kind:U.FIELD,alias:r,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ge.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(ge.PAREN_L,n,ge.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(ge.COLON),this.node(n,{kind:U.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(ge.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(ge.NAME)?this.node(t,{kind:U.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:U.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:U.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:U.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case ge.BRACKET_L:return this.parseList(t);case ge.BRACE_L:return this.parseObject(t);case ge.INT:return this.advanceLexer(),this.node(n,{kind:U.INT,value:n.value});case ge.FLOAT:return this.advanceLexer(),this.node(n,{kind:U.FLOAT,value:n.value});case ge.STRING:case ge.BLOCK_STRING:return this.parseStringLiteral();case ge.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:U.BOOLEAN,value:!0});case"false":return this.node(n,{kind:U.BOOLEAN,value:!1});case"null":return this.node(n,{kind:U.NULL});default:return this.node(n,{kind:U.ENUM,value:n.value})}case ge.DOLLAR:if(t)if(this.expectToken(ge.DOLLAR),this._lexer.token.kind===ge.NAME){const r=this._lexer.token.value;throw Fn(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:U.STRING,value:t.value,block:t.kind===ge.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:U.LIST,values:this.any(ge.BRACKET_L,n,ge.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:U.OBJECT,fields:this.any(ge.BRACE_L,n,ge.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(ge.COLON),this.node(n,{kind:U.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(ge.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(ge.AT),this.node(n,{kind:U.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(ge.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(ge.BRACKET_R),n=this.node(t,{kind:U.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(ge.BANG)?this.node(t,{kind:U.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:U.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(ge.STRING)||this.peek(ge.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),o=this.many(ge.BRACE_L,this.parseOperationTypeDefinition,ge.BRACE_R);return this.node(t,{kind:U.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:o})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(ge.COLON);const r=this.parseNamedType();return this.node(t,{kind:U.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),o=this.parseConstDirectives();return this.node(t,{kind:U.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:o})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:U.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(ge.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(ge.BRACE_L,this.parseFieldDefinition,ge.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),o=this.parseArgumentDefs();this.expectToken(ge.COLON);const i=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(t,{kind:U.FIELD_DEFINITION,description:n,name:r,arguments:o,type:i,directives:s})}parseArgumentDefs(){return this.optionalMany(ge.PAREN_L,this.parseInputValueDef,ge.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(ge.COLON);const o=this.parseTypeReference();let i;this.expectOptionalToken(ge.EQUALS)&&(i=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(t,{kind:U.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:s})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),o=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(t,{kind:U.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:o,directives:i,fields:s})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(t,{kind:U.UNION_TYPE_DEFINITION,description:n,name:r,directives:o,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(ge.EQUALS)?this.delimitedMany(ge.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(t,{kind:U.ENUM_TYPE_DEFINITION,description:n,name:r,directives:o,values:i})}parseEnumValuesDefinition(){return this.optionalMany(ge.BRACE_L,this.parseEnumValueDefinition,ge.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),o=this.parseConstDirectives();return this.node(t,{kind:U.ENUM_VALUE_DEFINITION,description:n,name:r,directives:o})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Fn(this._lexer.source,this._lexer.token.start,`${vg(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),o=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(t,{kind:U.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:o,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(ge.BRACE_L,this.parseInputValueDef,ge.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===ge.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(ge.BRACE_L,this.parseOperationTypeDefinition,ge.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:U.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:U.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&o.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:U.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(r.length===0&&o.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:U.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:o,fields:i})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();if(r.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:U.UNION_TYPE_EXTENSION,name:n,directives:r,types:o})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();if(r.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:U.ENUM_TYPE_EXTENSION,name:n,directives:r,values:o})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();if(r.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:U.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:o})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ge.AT);const r=this.parseName(),o=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(t,{kind:U.DIRECTIVE_DEFINITION,description:n,name:r,arguments:o,repeatable:i,locations:s})}parseDirectiveLocations(){return this.delimitedMany(ge.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(Fe,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new cD(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Fn(this._lexer.source,n.start,`Expected ${wD(t)}, found ${vg(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===ge.NAME&&n.value===t)this.advanceLexer();else throw Fn(this._lexer.source,n.start,`Expected "${t}", found ${vg(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===ge.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Fn(this._lexer.source,n.start,`Unexpected ${vg(n)}.`)}any(t,n,r){this.expectToken(t);const o=[];for(;!this.expectOptionalToken(r);)o.push(n.call(this));return o}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const o=[];do o.push(n.call(this));while(!this.expectOptionalToken(r));return o}return[]}many(t,n,r){this.expectToken(t);const o=[];do o.push(n.call(this));while(!this.expectOptionalToken(r));return o}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==ge.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Fn(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function vg(e){const t=e.value;return wD(e.kind)+(t!=null?` "${t}"`:"")}function wD(e){return hD(e)?`"${e}"`:e}const qj=5;function xs(e,t){const[n,r]=t?[e,t]:[void 0,e];let o=" Did you mean ";n&&(o+=n+" ");const i=r.map(c=>`"${c}"`);switch(i.length){case 0:return"";case 1:return o+i[0]+"?";case 2:return o+i[0]+" or "+i[1]+"?"}const s=i.slice(0,qj),l=s.pop();return o+s.join(", ")+", or "+l+"?"}function xD(e){return e}function Ss(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function Sa(e,t,n){const r=Object.create(null);for(const o of e)r[t(o)]=n(o);return r}function Ts(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function Ud(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let o=e.charCodeAt(n),i=t.charCodeAt(r);if(yg(o)&&yg(i)){let s=0;do++n,s=s*10+o-QE,o=e.charCodeAt(n);while(yg(o)&&s>0);let l=0;do++r,l=l*10+i-QE,i=t.charCodeAt(r);while(yg(i)&&l>0);if(s<l)return-1;if(s>l)return 1}else{if(o<i)return-1;if(o>i)return 1;++n,++r}}return e.length-t.length}const QE=48,zj=57;function yg(e){return!isNaN(e)&&QE<=e&&e<=zj}function Ta(e,t){const n=Object.create(null),r=new Hj(e),o=Math.floor(e.length*.4)+1;for(const i of t){const s=r.measure(i,o);s!==void 0&&(n[i]=s)}return Object.keys(n).sort((i,s)=>{const l=n[i]-n[s];return l!==0?l:Ud(i,s)})}class Hj{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=SD(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let o=SD(r),i=this._inputArray;if(o.length<i.length){const d=o;o=i,i=d}const s=o.length,l=i.length;if(s-l>n)return;const c=this._rows;for(let d=0;d<=l;d++)c[0][d]=d;for(let d=1;d<=s;d++){const g=c[(d-1)%3],m=c[d%3];let v=m[0]=d;for(let b=1;b<=l;b++){const w=o[d-1]===i[b-1]?0:1;let N=Math.min(g[b]+1,m[b-1]+1,g[b-1]+w);if(d>1&&b>1&&o[d-1]===i[b-2]&&o[d-2]===i[b-1]){const S=c[(d-2)%3][b-2];N=Math.min(N,S+1)}N<v&&(v=N),m[b]=N}if(v>n)return}const f=c[s%3][l];return f<=n?f:void 0}}function SD(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function jo(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function Wj(e){return`"${e.replace(Gj,Yj)}"`}const Gj=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Yj(e){return Qj[e.charCodeAt(0)]}const Qj=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Ll=Object.freeze({});function fn(e,t,n=uD){const r=new Map;for(const S of Object.values(U))r.set(S,yu(t,S));let o,i=Array.isArray(e),s=[e],l=-1,c=[],f=e,d,g;const m=[],v=[];do{l++;const S=l===s.length,x=S&&c.length!==0;if(S){if(d=v.length===0?void 0:m[m.length-1],f=g,g=v.pop(),x)if(i){f=f.slice();let E=0;for(const[_,I]of c){const D=_-E;I===null?(f.splice(D,1),E++):f[D]=I}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[E,_]of c)f[E]=_}l=o.index,s=o.keys,c=o.edits,i=o.inArray,o=o.prev}else if(g){if(d=i?l:s[l],f=g[d],f==null)continue;m.push(d)}let C;if(!Array.isArray(f)){var b,w;zE(f)||lt(!1,`Invalid AST Node: ${ye(f)}.`);const E=S?(b=r.get(f.kind))===null||b===void 0?void 0:b.leave:(w=r.get(f.kind))===null||w===void 0?void 0:w.enter;if(C=E==null?void 0:E.call(t,f,d,g,m,v),C===Ll)break;if(C===!1){if(!S){m.pop();continue}}else if(C!==void 0&&(c.push([d,C]),!S))if(zE(C))f=C;else{m.pop();continue}}if(C===void 0&&x&&c.push([d,f]),S)m.pop();else{var N;o={inArray:i,index:l,keys:s,edits:c,prev:o},i=Array.isArray(f),s=i?f:(N=n[f.kind])!==null&&N!==void 0?N:[],l=-1,c=[],g&&v.push(g),g=f}}while(o!==void 0);return c.length!==0?c[c.length-1][1]:e}function KE(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(U)){let o=!1;const i=new Array(e.length).fill(void 0),s=new Array(e.length).fill(void 0);for(let c=0;c<e.length;++c){const{enter:f,leave:d}=yu(e[c],r);o||(o=f!=null||d!=null),i[c]=f,s[c]=d}if(!o)continue;const l={enter(...c){const f=c[0];for(let g=0;g<e.length;g++)if(t[g]===null){var d;const m=(d=i[g])===null||d===void 0?void 0:d.apply(e[g],c);if(m===!1)t[g]=f;else if(m===Ll)t[g]=Ll;else if(m!==void 0)return m}},leave(...c){const f=c[0];for(let g=0;g<e.length;g++)if(t[g]===null){var d;const m=(d=s[g])===null||d===void 0?void 0:d.apply(e[g],c);if(m===Ll)t[g]=Ll;else if(m!==void 0&&m!==!1)return m}else t[g]===f&&(t[g]=null)}};n[r]=l}return n}function yu(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function Kj(e,t,n){const{enter:r,leave:o}=yu(e,t);return n?o:r}function ft(e){return fn(e,Xj)}const Jj=80,Xj={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Be(e.definitions,`
`)},OperationDefinition:{leave(e){const t=mt("(",Be(e.variableDefinitions,", "),")"),n=Be([e.operation,Be([e.name,t]),Be(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+mt(" = ",n)+mt(" ",Be(r," "))},SelectionSet:{leave:({selections:e})=>yi(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=mt("",e,": ")+t;let s=i+mt("(",Be(n,", "),")");return s.length>Jj&&(s=i+mt(`(
`,bg(Be(n,`
`)),`
)`)),Be([s,Be(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+mt(" ",Be(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Be(["...",mt("on ",e),Be(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${e}${mt("(",Be(n,", "),")")} on ${t} ${mt("",Be(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?pD(e):Wj(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Be(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Be(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+mt("(",Be(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>mt("",e,`
`)+Be(["schema",Be(t," "),yi(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>mt("",e,`
`)+Be(["scalar",t,Be(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>mt("",e,`
`)+Be(["type",t,mt("implements ",Be(n," & ")),Be(r," "),yi(o)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:o})=>mt("",e,`
`)+t+(TD(n)?mt(`(
`,bg(Be(n,`
`)),`
)`):mt("(",Be(n,", "),")"))+": "+r+mt(" ",Be(o," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:o})=>mt("",e,`
`)+Be([t+": "+n,mt("= ",r),Be(o," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:o})=>mt("",e,`
`)+Be(["interface",t,mt("implements ",Be(n," & ")),Be(r," "),yi(o)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>mt("",e,`
`)+Be(["union",t,Be(n," "),mt("= ",Be(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>mt("",e,`
`)+Be(["enum",t,Be(n," "),yi(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>mt("",e,`
`)+Be([t,Be(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>mt("",e,`
`)+Be(["input",t,Be(n," "),yi(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:o})=>mt("",e,`
`)+"directive @"+t+(TD(n)?mt(`(
`,bg(Be(n,`
`)),`
)`):mt("(",Be(n,", "),")"))+(r?" repeatable":"")+" on "+Be(o," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Be(["extend schema",Be(e," "),yi(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Be(["extend scalar",e,Be(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Be(["extend type",e,mt("implements ",Be(t," & ")),Be(n," "),yi(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Be(["extend interface",e,mt("implements ",Be(t," & ")),Be(n," "),yi(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Be(["extend union",e,Be(t," "),mt("= ",Be(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Be(["extend enum",e,Be(t," "),yi(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Be(["extend input",e,Be(t," "),yi(n)]," ")}};function Be(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function yi(e){return mt(`{
`,bg(Be(e,`
`)),`
}`)}function mt(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function bg(e){return mt(" ",e.replace(/\n/g,`
`))}function TD(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
`)))!==null&&t!==void 0?t:!1}function Eg(e,t){switch(e.kind){case U.NULL:return null;case U.INT:return parseInt(e.value,10);case U.FLOAT:return parseFloat(e.value);case U.STRING:case U.ENUM:case U.BOOLEAN:return e.value;case U.LIST:return e.values.map(n=>Eg(n,t));case U.OBJECT:return Sa(e.fields,n=>n.name.value,n=>Eg(n.value,t));case U.VARIABLE:return t==null?void 0:t[e.name.value]}}function bo(e){if(e!=null||lt(!1,"Must provide name."),typeof e=="string"||lt(!1,"Expected name to be a string."),e.length===0)throw new he("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!dD(e.charCodeAt(t)))throw new he(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!WE(e.charCodeAt(0)))throw new he(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function CD(e){if(e==="true"||e==="false"||e==="null")throw new he(`Enum values cannot be named: ${e}`);return bo(e)}function bu(e){return or(e)||Qe(e)||Xe(e)||Qt(e)||Lt(e)||gt(e)||vt(e)||He(e)}function Zj(e){if(!bu(e))throw new Error(`Expected ${ye(e)} to be a GraphQL type.`);return e}function or(e){return vi(e,Uo)}function eU(e){if(!or(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Scalar type.`);return e}function Qe(e){return vi(e,$n)}function kD(e){if(!Qe(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Object type.`);return e}function Xe(e){return vi(e,Pr)}function ND(e){if(!Xe(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Interface type.`);return e}function Qt(e){return vi(e,Na)}function tU(e){if(!Qt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Union type.`);return e}function Lt(e){return vi(e,Er)}function nU(e){if(!Lt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Enum type.`);return e}function gt(e){return vi(e,$r)}function rU(e){if(!gt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Input Object type.`);return e}function vt(e){return vi(e,Bt)}function oU(e){if(!vt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL List type.`);return e}function He(e){return vi(e,tt)}function iU(e){if(!He(e))throw new Error(`Expected ${ye(e)} to be a GraphQL Non-Null type.`);return e}function ir(e){return or(e)||Lt(e)||gt(e)||Bd(e)&&ir(e.ofType)}function sU(e){if(!ir(e))throw new Error(`Expected ${ye(e)} to be a GraphQL input type.`);return e}function Cs(e){return or(e)||Qe(e)||Xe(e)||Qt(e)||Lt(e)||Bd(e)&&Cs(e.ofType)}function aU(e){if(!Cs(e))throw new Error(`Expected ${ye(e)} to be a GraphQL output type.`);return e}function br(e){return or(e)||Lt(e)}function lU(e){if(!br(e))throw new Error(`Expected ${ye(e)} to be a GraphQL leaf type.`);return e}function Kt(e){return Qe(e)||Xe(e)||Qt(e)}function cU(e){if(!Kt(e))throw new Error(`Expected ${ye(e)} to be a GraphQL composite type.`);return e}function Pn(e){return Xe(e)||Qt(e)}function _D(e){if(!Pn(e))throw new Error(`Expected ${ye(e)} to be a GraphQL abstract type.`);return e}class Bt{constructor(t){bu(t)||lt(!1,`Expected ${ye(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class tt{constructor(t){JE(t)||lt(!1,`Expected ${ye(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function Bd(e){return vt(e)||He(e)}function uU(e){if(!Bd(e))throw new Error(`Expected ${ye(e)} to be a GraphQL wrapping type.`);return e}function JE(e){return bu(e)&&!He(e)}function OD(e){if(!JE(e))throw new Error(`Expected ${ye(e)} to be a GraphQL nullable type.`);return e}function Ca(e){if(e)return He(e)?e.ofType:e}function ks(e){return or(e)||Qe(e)||Xe(e)||Qt(e)||Lt(e)||gt(e)}function fU(e){if(!ks(e))throw new Error(`Expected ${ye(e)} to be a GraphQL named type.`);return e}function Et(e){if(e){let t=e;for(;Bd(t);)t=t.ofType;return t}}function XE(e){return typeof e=="function"?e():e}function ZE(e){return typeof e=="function"?e():e}class Uo{constructor(t){var n,r,o,i;const s=(n=t.parseValue)!==null&&n!==void 0?n:xD;this.name=bo(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:xD,this.parseValue=s,this.parseLiteral=(o=t.parseLiteral)!==null&&o!==void 0?o:(l,c)=>s(Eg(l,c)),this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(i=t.extensionASTNodes)!==null&&i!==void 0?i:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||lt(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${ye(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||lt(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||lt(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class $n{constructor(t){var n;this.name=bo(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>DD(t),this._interfaces=()=>AD(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||lt(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${ye(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:LD(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function AD(e){var t;const n=XE((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||lt(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function DD(e){const t=ZE(e.fields);return Eu(t)||lt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ts(t,(n,r)=>{var o;Eu(n)||lt(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||lt(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${ye(n.resolve)}.`);const i=(o=n.args)!==null&&o!==void 0?o:{};return Eu(i)||lt(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:bo(r),description:n.description,type:n.type,args:ID(i),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:jo(n.extensions),astNode:n.astNode}})}function ID(e){return Object.entries(e).map(([t,n])=>({name:bo(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:jo(n.extensions),astNode:n.astNode}))}function Eu(e){return yo(e)&&!Array.isArray(e)}function LD(e){return Ts(e,t=>({description:t.description,type:t.type,args:RD(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function RD(e){return Sa(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function ka(e){return He(e.type)&&e.defaultValue===void 0}class Pr{constructor(t){var n;this.name=bo(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=DD.bind(void 0,t),this._interfaces=AD.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||lt(!1,`${this.name} must provide "resolveType" as a function, but got: ${ye(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:LD(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Na{constructor(t){var n;this.name=bo(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=dU.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||lt(!1,`${this.name} must provide "resolveType" as a function, but got: ${ye(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function dU(e){const t=XE(e.types);return Array.isArray(t)||lt(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class Er{constructor(t){var n;this.name=bo(t.name),this.description=t.description,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=pU(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=Ss(this._values,r=>r.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const n=this._valueLookup.get(t);if(n===void 0)throw new he(`Enum "${this.name}" cannot represent value: ${ye(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=ye(t);throw new he(`Enum "${this.name}" cannot represent non-string value: ${r}.`+wg(this,r))}const n=this.getValue(t);if(n==null)throw new he(`Value "${t}" does not exist in "${this.name}" enum.`+wg(this,t));return n.value}parseLiteral(t,n){if(t.kind!==U.ENUM){const o=ft(t);throw new he(`Enum "${this.name}" cannot represent non-enum value: ${o}.`+wg(this,o),{nodes:t})}const r=this.getValue(t.value);if(r==null){const o=ft(t);throw new he(`Value "${o}" does not exist in "${this.name}" enum.`+wg(this,o),{nodes:t})}return r.value}toConfig(){const t=Sa(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function wg(e,t){const n=e.getValues().map(o=>o.name),r=Ta(t,n);return xs("the enum value",r)}function pU(e,t){return Eu(t)||lt(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Eu(r)||lt(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${ye(r)}.`),{name:CD(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:jo(r.extensions),astNode:r.astNode}))}class $r{constructor(t){var n;this.name=bo(t.name),this.description=t.description,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=hU.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=Ts(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function hU(e){const t=ZE(e.fields);return Eu(t)||lt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Ts(t,(n,r)=>(!("resolve"in n)||lt(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:bo(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:jo(n.extensions),astNode:n.astNode}))}function xg(e){return He(e.type)&&e.defaultValue===void 0}function Sg(e,t){return e===t?!0:He(e)&&He(t)||vt(e)&&vt(t)?Sg(e.ofType,t.ofType):!1}function Rl(e,t,n){return t===n?!0:He(n)?He(t)?Rl(e,t.ofType,n.ofType):!1:He(t)?Rl(e,t.ofType,n):vt(n)?vt(t)?Rl(e,t.ofType,n.ofType):!1:vt(t)?!1:Pn(n)&&(Xe(t)||Qe(t))&&e.isSubType(n,t)}function qd(e,t,n){return t===n?!0:Pn(t)?Pn(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):Pn(n)?e.isSubType(n,t):!1}const Tg=2147483647,Cg=-2147483648,zd=new Uo({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Qd(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new he(`Int cannot represent non-integer value: ${ye(t)}`);if(n>Tg||n<Cg)throw new he("Int cannot represent non 32-bit signed integer value: "+ye(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new he(`Int cannot represent non-integer value: ${ye(e)}`);if(e>Tg||e<Cg)throw new he(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==U.INT)throw new he(`Int cannot represent non-integer value: ${ft(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>Tg||t<Cg)throw new he(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),Hd=new Uo({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Qd(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new he(`Float cannot represent non numeric value: ${ye(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new he(`Float cannot represent non numeric value: ${ye(e)}`);return e},parseLiteral(e){if(e.kind!==U.FLOAT&&e.kind!==U.INT)throw new he(`Float cannot represent non numeric value: ${ft(e)}`,e);return parseFloat(e.value)}}),Ft=new Uo({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Qd(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new he(`String cannot represent value: ${ye(e)}`)},parseValue(e){if(typeof e!="string")throw new he(`String cannot represent a non string value: ${ye(e)}`);return e},parseLiteral(e){if(e.kind!==U.STRING)throw new he(`String cannot represent a non string value: ${ft(e)}`,{nodes:e});return e.value}}),qt=new Uo({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Qd(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new he(`Boolean cannot represent a non boolean value: ${ye(t)}`)},parseValue(e){if(typeof e!="boolean")throw new he(`Boolean cannot represent a non boolean value: ${ye(e)}`);return e},parseLiteral(e){if(e.kind!==U.BOOLEAN)throw new he(`Boolean cannot represent a non boolean value: ${ft(e)}`,{nodes:e});return e.value}}),Wd=new Uo({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Qd(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new he(`ID cannot represent value: ${ye(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new he(`ID cannot represent value: ${ye(e)}`)},parseLiteral(e){if(e.kind!==U.STRING&&e.kind!==U.INT)throw new he("ID cannot represent a non-string and non-integer value: "+ft(e),{nodes:e});return e.value}}),Gd=Object.freeze([Ft,zd,Hd,qt,Wd]);function Yd(e){return Gd.some(({name:t})=>e.name===t)}function Qd(e){if(yo(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!yo(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function kg(e){return vi(e,Eo)}function mU(e){if(!kg(e))throw new Error(`Expected ${ye(e)} to be a GraphQL directive.`);return e}class Eo{constructor(t){var n,r;this.name=bo(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=jo(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||lt(!1,`@${t.name} locations must be an Array.`);const o=(r=t.args)!==null&&r!==void 0?r:{};yo(o)&&!Array.isArray(o)||lt(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=ID(o)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:RD(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Ng=new Eo({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Fe.FIELD,Fe.FRAGMENT_SPREAD,Fe.INLINE_FRAGMENT],args:{if:{type:new tt(qt),description:"Included when true."}}}),_g=new Eo({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Fe.FIELD,Fe.FRAGMENT_SPREAD,Fe.INLINE_FRAGMENT],args:{if:{type:new tt(qt),description:"Skipped when true."}}}),ew="No longer supported",Og=new Eo({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Fe.FIELD_DEFINITION,Fe.ARGUMENT_DEFINITION,Fe.INPUT_FIELD_DEFINITION,Fe.ENUM_VALUE],args:{reason:{type:Ft,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ew}}}),tw=new Eo({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Fe.SCALAR],args:{url:{type:new tt(Ft),description:"The URL that specifies the behavior of this scalar."}}}),_a=Object.freeze([Ng,_g,Og,tw]);function Ag(e){return _a.some(({name:t})=>t===e.name)}function nw(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function Ns(e,t){if(He(t)){const n=Ns(e,t.ofType);return(n==null?void 0:n.kind)===U.NULL?null:n}if(e===null)return{kind:U.NULL};if(e===void 0)return null;if(vt(t)){const n=t.ofType;if(nw(e)){const r=[];for(const o of e){const i=Ns(o,n);i!=null&&r.push(i)}return{kind:U.LIST,values:r}}return Ns(e,n)}if(gt(t)){if(!yo(e))return null;const n=[];for(const r of Object.values(t.getFields())){const o=Ns(e[r.name],r.type);o&&n.push({kind:U.OBJECT_FIELD,name:{kind:U.NAME,value:r.name},value:o})}return{kind:U.OBJECT,fields:n}}if(br(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:U.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return FD.test(r)?{kind:U.INT,value:r}:{kind:U.FLOAT,value:r}}if(typeof n=="string")return Lt(t)?{kind:U.ENUM,value:n}:t===Wd&&FD.test(n)?{kind:U.INT,value:n}:{kind:U.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${ye(n)}.`)}mn(!1,"Unexpected input type: "+ye(t))}const FD=/^-?(?:0|[1-9][0-9]*)$/,Dg=new $n({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Ft,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new tt(new Bt(new tt(Bo))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new tt(Bo),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Bo,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Bo,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new tt(new Bt(new tt(rw))),resolve:e=>e.getDirectives()}})}),rw=new $n({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new tt(Ft),resolve:e=>e.name},description:{type:Ft,resolve:e=>e.description},isRepeatable:{type:new tt(qt),resolve:e=>e.isRepeatable},locations:{type:new tt(new Bt(new tt(ow))),resolve:e=>e.locations},args:{type:new tt(new Bt(new tt(Kd))),args:{includeDeprecated:{type:qt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),ow=new Er({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Fe.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Fe.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Fe.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Fe.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Fe.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Fe.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Fe.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Fe.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Fe.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Fe.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Fe.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Fe.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Fe.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Fe.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Fe.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Fe.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Fe.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Fe.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Fe.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Bo=new $n({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new tt(aw),resolve(e){if(or(e))return At.SCALAR;if(Qe(e))return At.OBJECT;if(Xe(e))return At.INTERFACE;if(Qt(e))return At.UNION;if(Lt(e))return At.ENUM;if(gt(e))return At.INPUT_OBJECT;if(vt(e))return At.LIST;if(He(e))return At.NON_NULL;mn(!1,`Unexpected type: "${ye(e)}".`)}},name:{type:Ft,resolve:e=>"name"in e?e.name:void 0},description:{type:Ft,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Ft,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Bt(new tt(iw)),args:{includeDeprecated:{type:qt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Qe(e)||Xe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Bt(new tt(Bo)),resolve(e){if(Qe(e)||Xe(e))return e.getInterfaces()}},possibleTypes:{type:new Bt(new tt(Bo)),resolve(e,t,n,{schema:r}){if(Pn(e))return r.getPossibleTypes(e)}},enumValues:{type:new Bt(new tt(sw)),args:{includeDeprecated:{type:qt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Lt(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Bt(new tt(Kd)),args:{includeDeprecated:{type:qt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(gt(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Bo,resolve:e=>"ofType"in e?e.ofType:void 0}})}),iw=new $n({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new tt(Ft),resolve:e=>e.name},description:{type:Ft,resolve:e=>e.description},args:{type:new tt(new Bt(new tt(Kd))),args:{includeDeprecated:{type:qt,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new tt(Bo),resolve:e=>e.type},isDeprecated:{type:new tt(qt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Ft,resolve:e=>e.deprecationReason}})}),Kd=new $n({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new tt(Ft),resolve:e=>e.name},description:{type:Ft,resolve:e=>e.description},type:{type:new tt(Bo),resolve:e=>e.type},defaultValue:{type:Ft,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=Ns(n,t);return r?ft(r):null}},isDeprecated:{type:new tt(qt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Ft,resolve:e=>e.deprecationReason}})}),sw=new $n({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new tt(Ft),resolve:e=>e.name},description:{type:Ft,resolve:e=>e.description},isDeprecated:{type:new tt(qt),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Ft,resolve:e=>e.deprecationReason}})});var At;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(At||(At={}));const aw=new Er({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:At.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:At.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:At.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:At.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:At.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:At.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:At.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:At.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),qo={name:"__schema",type:new tt(Dg),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},zo={name:"__type",type:Bo,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new tt(Ft),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},wo={name:"__typename",type:new tt(Ft),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Jd=Object.freeze([Dg,rw,ow,Bo,iw,Kd,sw,aw]);function Fl(e){return Jd.some(({name:t})=>e.name===t)}function Ig(e){return vi(e,Ml)}function lw(e){if(!Ig(e))throw new Error(`Expected ${ye(e)} to be a GraphQL schema.`);return e}class Ml{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,yo(t)||lt(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||lt(!1,`"types" must be Array if provided but got: ${ye(t.types)}.`),!t.directives||Array.isArray(t.directives)||lt(!1,`"directives" must be Array if provided but got: ${ye(t.directives)}.`),this.description=t.description,this.extensions=jo(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:_a;const o=new Set(t.types);if(t.types!=null)for(const i of t.types)o.delete(i),bi(i,o);this._queryType!=null&&bi(this._queryType,o),this._mutationType!=null&&bi(this._mutationType,o),this._subscriptionType!=null&&bi(this._subscriptionType,o);for(const i of this._directives)if(kg(i))for(const s of i.args)bi(s.type,o);bi(Dg,o),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const i of o){if(i==null)continue;const s=i.name;if(s||lt(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[s]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${s}".`);if(this._typeMap[s]=i,Xe(i)){for(const l of i.getInterfaces())if(Xe(l)){let c=this._implementationsMap[l.name];c===void 0&&(c=this._implementationsMap[l.name]={objects:[],interfaces:[]}),c.interfaces.push(i)}}else if(Qe(i)){for(const l of i.getInterfaces())if(Xe(l)){let c=this._implementationsMap[l.name];c===void 0&&(c=this._implementationsMap[l.name]={objects:[],interfaces:[]}),c.objects.push(i)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case Mn.QUERY:return this.getQueryType();case Mn.MUTATION:return this.getMutationType();case Mn.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Qt(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Qt(t))for(const o of t.getTypes())r[o.name]=!0;else{const o=this.getImplementations(t);for(const i of o.objects)r[i.name]=!0;for(const i of o.interfaces)r[i.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function bi(e,t){const n=Et(e);if(!t.has(n)){if(t.add(n),Qt(n))for(const r of n.getTypes())bi(r,t);else if(Qe(n)||Xe(n)){for(const r of n.getInterfaces())bi(r,t);for(const r of Object.values(n.getFields())){bi(r.type,t);for(const o of r.args)bi(o.type,t)}}else if(gt(n))for(const r of Object.values(n.getFields()))bi(r.type,t)}return t}function Lg(e){if(lw(e),e.__validationErrors)return e.__validationErrors;const t=new gU(e);vU(t),yU(t),bU(t);const n=t.getErrors();return e.__validationErrors=n,n}function Rg(e){const t=Lg(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}class gU{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new he(t,{nodes:r}))}getErrors(){return this._errors}}function vU(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!Qe(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${ye(n)}.`,(r=cw(t,Mn.QUERY))!==null&&r!==void 0?r:n.astNode)}const o=t.getMutationType();if(o&&!Qe(o)){var i;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${ye(o)}.`,(i=cw(t,Mn.MUTATION))!==null&&i!==void 0?i:o.astNode)}const s=t.getSubscriptionType();if(s&&!Qe(s)){var l;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${ye(s)}.`,(l=cw(t,Mn.SUBSCRIPTION))!==null&&l!==void 0?l:s.astNode)}}function cw(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var o;return(o=r==null?void 0:r.operationTypes)!==null&&o!==void 0?o:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function yU(e){for(const n of e.schema.getDirectives()){if(!kg(n)){e.reportError(`Expected directive but got: ${ye(n)}.`,n==null?void 0:n.astNode);continue}Pl(e,n);for(const r of n.args)if(Pl(e,r),ir(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${ye(r.type)}.`,r.astNode),ka(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[uw(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Pl(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function bU(e){const t=CU(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!ks(r)){e.reportError(`Expected GraphQL named type but got: ${ye(r)}.`,r.astNode);continue}Fl(r)||Pl(e,r),Qe(r)||Xe(r)?(MD(e,r),PD(e,r)):Qt(r)?xU(e,r):Lt(r)?SU(e,r):gt(r)&&(TU(e,r),t(r))}}function MD(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){if(Pl(e,s),!Cs(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Output Type but got: ${ye(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}for(const l of s.args){const c=l.name;if(Pl(e,l),!ir(l.type)){var o;e.reportError(`The type of ${t.name}.${s.name}(${c}:) must be Input Type but got: ${ye(l.type)}.`,(o=l.astNode)===null||o===void 0?void 0:o.type)}if(ka(l)&&l.deprecationReason!=null){var i;e.reportError(`Required argument ${t.name}.${s.name}(${c}:) cannot be deprecated.`,[uw(l.astNode),(i=l.astNode)===null||i===void 0?void 0:i.type])}}}}function PD(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!Xe(r)){e.reportError(`Type ${ye(t)} must only implement Interface types, it cannot implement ${ye(r)}.`,Xd(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Xd(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,Xd(t,r));continue}n[r.name]=!0,wU(e,t,r),EU(e,t,r)}}function EU(e,t,n){const r=t.getFields();for(const c of Object.values(n.getFields())){const f=c.name,d=r[f];if(!d){e.reportError(`Interface field ${n.name}.${f} expected but ${t.name} does not provide it.`,[c.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!Rl(e.schema,d.type,c.type)){var o,i;e.reportError(`Interface field ${n.name}.${f} expects type ${ye(c.type)} but ${t.name}.${f} is type ${ye(d.type)}.`,[(o=c.astNode)===null||o===void 0?void 0:o.type,(i=d.astNode)===null||i===void 0?void 0:i.type])}for(const g of c.args){const m=g.name,v=d.args.find(b=>b.name===m);if(!v){e.reportError(`Interface field argument ${n.name}.${f}(${m}:) expected but ${t.name}.${f} does not provide it.`,[g.astNode,d.astNode]);continue}if(!Sg(g.type,v.type)){var s,l;e.reportError(`Interface field argument ${n.name}.${f}(${m}:) expects type ${ye(g.type)} but ${t.name}.${f}(${m}:) is type ${ye(v.type)}.`,[(s=g.astNode)===null||s===void 0?void 0:s.type,(l=v.astNode)===null||l===void 0?void 0:l.type])}}for(const g of d.args){const m=g.name;!c.args.find(b=>b.name===m)&&ka(g)&&e.reportError(`Object field ${t.name}.${f} includes required argument ${m} that is missing from the Interface field ${n.name}.${f}.`,[g.astNode,c.astNode])}}}function wU(e,t,n){const r=t.getInterfaces();for(const o of n.getInterfaces())r.includes(o)||e.reportError(o===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${o.name} because it is implemented by ${n.name}.`,[...Xd(n,o),...Xd(t,n)])}function xU(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const o of n){if(r[o.name]){e.reportError(`Union type ${t.name} can only include type ${o.name} once.`,$D(t,o.name));continue}r[o.name]=!0,Qe(o)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${ye(o)}.`,$D(t,String(o)))}}function SU(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)Pl(e,r)}function TU(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const i of n){if(Pl(e,i),!ir(i.type)){var r;e.reportError(`The type of ${t.name}.${i.name} must be Input Type but got: ${ye(i.type)}.`,(r=i.astNode)===null||r===void 0?void 0:r.type)}if(xg(i)&&i.deprecationReason!=null){var o;e.reportError(`Required input field ${t.name}.${i.name} cannot be deprecated.`,[uw(i.astNode),(o=i.astNode)===null||o===void 0?void 0:o.type])}}}function CU(e){const t=Object.create(null),n=[],r=Object.create(null);return o;function o(i){if(t[i.name])return;t[i.name]=!0,r[i.name]=n.length;const s=Object.values(i.getFields());for(const l of s)if(He(l.type)&>(l.type.ofType)){const c=l.type.ofType,f=r[c.name];if(n.push(l),f===void 0)o(c);else{const d=n.slice(f),g=d.map(m=>m.name).join(".");e.reportError(`Cannot reference Input Object "${c.name}" within itself through a series of non-null fields: "${g}".`,d.map(m=>m.astNode))}n.pop()}r[i.name]=void 0}}function Xd(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(i=>{var s;return(s=i.interfaces)!==null&&s!==void 0?s:[]}).filter(i=>i.name.value===t.name)}function $D(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(i=>{var s;return(s=i.types)!==null&&s!==void 0?s:[]}).filter(i=>i.name.value===t)}function uw(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Og.name)}function Yn(e,t){switch(t.kind){case U.LIST_TYPE:{const n=Yn(e,t.type);return n&&new Bt(n)}case U.NON_NULL_TYPE:{const n=Yn(e,t.type);return n&&new tt(n)}case U.NAMED_TYPE:return e.getType(t.name.value)}}class _s{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??kU,n&&(ir(n)&&this._inputTypeStack.push(n),Kt(n)&&this._parentTypeStack.push(n),Cs(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case U.SELECTION_SET:{const o=Et(this.getType());this._parentTypeStack.push(Kt(o)?o:void 0);break}case U.FIELD:{const o=this.getParentType();let i,s;o&&(i=this._getFieldDef(n,o,t),i&&(s=i.type)),this._fieldDefStack.push(i),this._typeStack.push(Cs(s)?s:void 0);break}case U.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case U.OPERATION_DEFINITION:{const o=n.getRootType(t.operation);this._typeStack.push(Qe(o)?o:void 0);break}case U.INLINE_FRAGMENT:case U.FRAGMENT_DEFINITION:{const o=t.typeCondition,i=o?Yn(n,o):Et(this.getType());this._typeStack.push(Cs(i)?i:void 0);break}case U.VARIABLE_DEFINITION:{const o=Yn(n,t.type);this._inputTypeStack.push(ir(o)?o:void 0);break}case U.ARGUMENT:{var r;let o,i;const s=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();s&&(o=s.args.find(l=>l.name===t.name.value),o&&(i=o.type)),this._argument=o,this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(ir(i)?i:void 0);break}case U.LIST:{const o=Ca(this.getInputType()),i=vt(o)?o.ofType:o;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ir(i)?i:void 0);break}case U.OBJECT_FIELD:{const o=Et(this.getInputType());let i,s;gt(o)&&(s=o.getFields()[t.name.value],s&&(i=s.type)),this._defaultValueStack.push(s?s.defaultValue:void 0),this._inputTypeStack.push(ir(i)?i:void 0);break}case U.ENUM:{const o=Et(this.getInputType());let i;Lt(o)&&(i=o.getValue(t.value)),this._enumValue=i;break}}}leave(t){switch(t.kind){case U.SELECTION_SET:this._parentTypeStack.pop();break;case U.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case U.DIRECTIVE:this._directive=null;break;case U.OPERATION_DEFINITION:case U.INLINE_FRAGMENT:case U.FRAGMENT_DEFINITION:this._typeStack.pop();break;case U.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case U.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case U.LIST:case U.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case U.ENUM:this._enumValue=null;break}}}function kU(e,t,n){const r=n.name.value;if(r===qo.name&&e.getQueryType()===t)return qo;if(r===zo.name&&e.getQueryType()===t)return zo;if(r===wo.name&&Kt(t))return wo;if(Qe(t)||Xe(t))return t.getFields()[r]}function $l(e,t){return{enter(...n){const r=n[0];e.enter(r);const o=yu(t,r.kind).enter;if(o){const i=o.apply(t,n);return i!==void 0&&(e.leave(r),zE(i)&&e.enter(i)),i}},leave(...n){const r=n[0],o=yu(t,r.kind).leave;let i;return o&&(i=o.apply(t,n)),e.leave(r),i}}}function NU(e){return fw(e)||Fg(e)||pw(e)}function fw(e){return e.kind===U.OPERATION_DEFINITION||e.kind===U.FRAGMENT_DEFINITION}function _U(e){return e.kind===U.FIELD||e.kind===U.FRAGMENT_SPREAD||e.kind===U.INLINE_FRAGMENT}function VD(e){return e.kind===U.VARIABLE||e.kind===U.INT||e.kind===U.FLOAT||e.kind===U.STRING||e.kind===U.BOOLEAN||e.kind===U.NULL||e.kind===U.ENUM||e.kind===U.LIST||e.kind===U.OBJECT}function dw(e){return VD(e)&&(e.kind===U.LIST?e.values.some(dw):e.kind===U.OBJECT?e.fields.some(t=>dw(t.value)):e.kind!==U.VARIABLE)}function OU(e){return e.kind===U.NAMED_TYPE||e.kind===U.LIST_TYPE||e.kind===U.NON_NULL_TYPE}function Fg(e){return e.kind===U.SCHEMA_DEFINITION||wu(e)||e.kind===U.DIRECTIVE_DEFINITION}function wu(e){return e.kind===U.SCALAR_TYPE_DEFINITION||e.kind===U.OBJECT_TYPE_DEFINITION||e.kind===U.INTERFACE_TYPE_DEFINITION||e.kind===U.UNION_TYPE_DEFINITION||e.kind===U.ENUM_TYPE_DEFINITION||e.kind===U.INPUT_OBJECT_TYPE_DEFINITION}function pw(e){return e.kind===U.SCHEMA_EXTENSION||Mg(e)}function Mg(e){return e.kind===U.SCALAR_TYPE_EXTENSION||e.kind===U.OBJECT_TYPE_EXTENSION||e.kind===U.INTERFACE_TYPE_EXTENSION||e.kind===U.UNION_TYPE_EXTENSION||e.kind===U.ENUM_TYPE_EXTENSION||e.kind===U.INPUT_OBJECT_TYPE_EXTENSION}function hw(e){return{Document(t){for(const n of t.definitions)if(!fw(n)){const r=n.kind===U.SCHEMA_DEFINITION||n.kind===U.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new he(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function jD(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const o=e.getSchema(),i=t.name.value;let s=xs("to use an inline fragment on",AU(o,n,i));s===""&&(s=xs(DU(n,i))),e.reportError(new he(`Cannot query field "${i}" on type "${n.name}".`+s,{nodes:t}))}}}}function AU(e,t,n){if(!Pn(t))return[];const r=new Set,o=Object.create(null);for(const s of e.getPossibleTypes(t))if(s.getFields()[n]){r.add(s),o[s.name]=1;for(const l of s.getInterfaces()){var i;l.getFields()[n]&&(r.add(l),o[l.name]=((i=o[l.name])!==null&&i!==void 0?i:0)+1)}}return[...r].sort((s,l)=>{const c=o[l.name]-o[s.name];return c!==0?c:Xe(s)&&e.isSubType(s,l)?-1:Xe(l)&&e.isSubType(l,s)?1:Ud(s.name,l.name)}).map(s=>s.name)}function DU(e,t){if(Qe(e)||Xe(e)){const n=Object.keys(e.getFields());return Ta(t,n)}return[]}function UD(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=Yn(e.getSchema(),n);if(r&&!Kt(r)){const o=ft(n);e.reportError(new he(`Fragment cannot condition on non composite type "${o}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Yn(e.getSchema(),t.typeCondition);if(n&&!Kt(n)){const r=ft(t.typeCondition);e.reportError(new he(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function BD(e){return{...qD(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),o=e.getParentType();if(!n&&r&&o){const i=t.name.value,s=r.args.map(c=>c.name),l=Ta(i,s);e.reportError(new he(`Unknown argument "${i}" on field "${o.name}.${r.name}".`+xs(l),{nodes:t}))}}}}function qD(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():_a;for(const s of r)t[s.name]=s.args.map(l=>l.name);const o=e.getDocument().definitions;for(const s of o)if(s.kind===U.DIRECTIVE_DEFINITION){var i;const l=(i=s.arguments)!==null&&i!==void 0?i:[];t[s.name.value]=l.map(c=>c.name.value)}return{Directive(s){const l=s.name.value,c=t[l];if(s.arguments&&c)for(const f of s.arguments){const d=f.name.value;if(!c.includes(d)){const g=Ta(d,c);e.reportError(new he(`Unknown argument "${d}" on directive "@${l}".`+xs(g),{nodes:f}))}}return!1}}}function Pg(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():_a;for(const i of r)t[i.name]=i.locations;const o=e.getDocument().definitions;for(const i of o)i.kind===U.DIRECTIVE_DEFINITION&&(t[i.name.value]=i.locations.map(s=>s.value));return{Directive(i,s,l,c,f){const d=i.name.value,g=t[d];if(!g){e.reportError(new he(`Unknown directive "@${d}".`,{nodes:i}));return}const m=IU(f);m&&!g.includes(m)&&e.reportError(new he(`Directive "@${d}" may not be used on ${m}.`,{nodes:i}))}}}function IU(e){const t=e[e.length-1];switch("kind"in t||mn(!1),t.kind){case U.OPERATION_DEFINITION:return LU(t.operation);case U.FIELD:return Fe.FIELD;case U.FRAGMENT_SPREAD:return Fe.FRAGMENT_SPREAD;case U.INLINE_FRAGMENT:return Fe.INLINE_FRAGMENT;case U.FRAGMENT_DEFINITION:return Fe.FRAGMENT_DEFINITION;case U.VARIABLE_DEFINITION:return Fe.VARIABLE_DEFINITION;case U.SCHEMA_DEFINITION:case U.SCHEMA_EXTENSION:return Fe.SCHEMA;case U.SCALAR_TYPE_DEFINITION:case U.SCALAR_TYPE_EXTENSION:return Fe.SCALAR;case U.OBJECT_TYPE_DEFINITION:case U.OBJECT_TYPE_EXTENSION:return Fe.OBJECT;case U.FIELD_DEFINITION:return Fe.FIELD_DEFINITION;case U.INTERFACE_TYPE_DEFINITION:case U.INTERFACE_TYPE_EXTENSION:return Fe.INTERFACE;case U.UNION_TYPE_DEFINITION:case U.UNION_TYPE_EXTENSION:return Fe.UNION;case U.ENUM_TYPE_DEFINITION:case U.ENUM_TYPE_EXTENSION:return Fe.ENUM;case U.ENUM_VALUE_DEFINITION:return Fe.ENUM_VALUE;case U.INPUT_OBJECT_TYPE_DEFINITION:case U.INPUT_OBJECT_TYPE_EXTENSION:return Fe.INPUT_OBJECT;case U.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||mn(!1),n.kind===U.INPUT_OBJECT_TYPE_DEFINITION?Fe.INPUT_FIELD_DEFINITION:Fe.ARGUMENT_DEFINITION}default:mn(!1,"Unexpected kind: "+ye(t.kind))}}function LU(e){switch(e){case Mn.QUERY:return Fe.QUERY;case Mn.MUTATION:return Fe.MUTATION;case Mn.SUBSCRIPTION:return Fe.SUBSCRIPTION}}function mw(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new he(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function $g(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const i of e.getDocument().definitions)wu(i)&&(r[i.name.value]=!0);const o=[...Object.keys(n),...Object.keys(r)];return{NamedType(i,s,l,c,f){const d=i.name.value;if(!n[d]&&!r[d]){var g;const m=(g=f[2])!==null&&g!==void 0?g:l,v=m!=null&&RU(m);if(v&&zD.includes(d))return;const b=Ta(d,v?zD.concat(o):o);e.reportError(new he(`Unknown type "${d}".`+xs(b),{nodes:i}))}}}}const zD=[...Gd,...Jd].map(e=>e.name);function RU(e){return"kind"in e&&(Fg(e)||pw(e))}function HD(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===U.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new he("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function gw(e){var t,n,r;const o=e.getSchema(),i=(t=(n=(r=o==null?void 0:o.astNode)!==null&&r!==void 0?r:o==null?void 0:o.getQueryType())!==null&&n!==void 0?n:o==null?void 0:o.getMutationType())!==null&&t!==void 0?t:o==null?void 0:o.getSubscriptionType();let s=0;return{SchemaDefinition(l){if(i){e.reportError(new he("Cannot define a new schema within a schema extension.",{nodes:l}));return}s>0&&e.reportError(new he("Must provide only one schema definition.",{nodes:l})),++s}}}function WD(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(i){return o(i),!1}};function o(i){if(t[i.name.value])return;const s=i.name.value;t[s]=!0;const l=e.getFragmentSpreads(i.selectionSet);if(l.length!==0){r[s]=n.length;for(const c of l){const f=c.name.value,d=r[f];if(n.push(c),d===void 0){const g=e.getFragment(f);g&&o(g)}else{const g=n.slice(d),m=g.slice(0,-1).map(v=>'"'+v.name.value+'"').join(", ");e.reportError(new he(`Cannot spread fragment "${f}" within itself`+(m!==""?` via ${m}.`:"."),{nodes:g}))}n.pop()}r[s]=void 0}}}function GD(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:o}of r){const i=o.name.value;t[i]!==!0&&e.reportError(new he(n.name?`Variable "$${i}" is not defined by operation "${n.name.value}".`:`Variable "$${i}" is not defined.`,{nodes:[o,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function vw(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const o of t)for(const i of e.getRecursivelyReferencedFragments(o))r[i.name.value]=!0;for(const o of n){const i=o.name.value;r[i]!==!0&&e.reportError(new he(`Fragment "${i}" is never used.`,{nodes:o}))}}}}}function YD(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),o=e.getRecursiveVariableUsages(n);for(const{node:i}of o)r[i.name.value]=!0;for(const i of t){const s=i.variable.name.value;r[s]!==!0&&e.reportError(new he(n.name?`Variable "$${s}" is never used in operation "${n.name.value}".`:`Variable "$${s}" is never used.`,{nodes:i}))}}},VariableDefinition(n){t.push(n)}}}function Vg(e){switch(e.kind){case U.OBJECT:return{...e,fields:FU(e.fields)};case U.LIST:return{...e,values:e.values.map(Vg)};case U.INT:case U.FLOAT:case U.STRING:case U.BOOLEAN:case U.NULL:case U.ENUM:case U.VARIABLE:return e}}function FU(e){return e.map(t=>({...t,value:Vg(t.value)})).sort((t,n)=>Ud(t.name.value,n.name.value))}function QD(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+QD(n)).join(" and "):e}function KD(e){const t=new UU,n=new Map;return{SelectionSet(r){const o=MU(e,n,t,e.getParentType(),r);for(const[[i,s],l,c]of o){const f=QD(s);e.reportError(new he(`Fields "${i}" conflict because ${f}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:l.concat(c)}))}}}}function MU(e,t,n,r,o){const i=[],[s,l]=Bg(e,t,r,o);if($U(e,i,t,n,s),l.length!==0)for(let c=0;c<l.length;c++){jg(e,i,t,n,!1,s,l[c]);for(let f=c+1;f<l.length;f++)Ug(e,i,t,n,!1,l[c],l[f])}return i}function jg(e,t,n,r,o,i,s){const l=e.getFragment(s);if(!l)return;const[c,f]=Ew(e,n,l);if(i!==c){yw(e,t,n,r,o,i,c);for(const d of f)r.has(d,s,o)||(r.add(d,s,o),jg(e,t,n,r,o,i,d))}}function Ug(e,t,n,r,o,i,s){if(i===s||r.has(i,s,o))return;r.add(i,s,o);const l=e.getFragment(i),c=e.getFragment(s);if(!l||!c)return;const[f,d]=Ew(e,n,l),[g,m]=Ew(e,n,c);yw(e,t,n,r,o,f,g);for(const v of m)Ug(e,t,n,r,o,i,v);for(const v of d)Ug(e,t,n,r,o,v,s)}function PU(e,t,n,r,o,i,s,l){const c=[],[f,d]=Bg(e,t,o,i),[g,m]=Bg(e,t,s,l);yw(e,c,t,n,r,f,g);for(const v of m)jg(e,c,t,n,r,f,v);for(const v of d)jg(e,c,t,n,r,g,v);for(const v of d)for(const b of m)Ug(e,c,t,n,r,v,b);return c}function $U(e,t,n,r,o){for(const[i,s]of Object.entries(o))if(s.length>1)for(let l=0;l<s.length;l++)for(let c=l+1;c<s.length;c++){const f=JD(e,n,r,!1,i,s[l],s[c]);f&&t.push(f)}}function yw(e,t,n,r,o,i,s){for(const[l,c]of Object.entries(i)){const f=s[l];if(f)for(const d of c)for(const g of f){const m=JD(e,n,r,o,l,d,g);m&&t.push(m)}}}function JD(e,t,n,r,o,i,s){const[l,c,f]=i,[d,g,m]=s,v=r||l!==d&&Qe(l)&&Qe(d);if(!v){const x=c.name.value,C=g.name.value;if(x!==C)return[[o,`"${x}" and "${C}" are different fields`],[c],[g]];if(!VU(c,g))return[[o,"they have differing arguments"],[c],[g]]}const b=f==null?void 0:f.type,w=m==null?void 0:m.type;if(b&&w&&bw(b,w))return[[o,`they return conflicting types "${ye(b)}" and "${ye(w)}"`],[c],[g]];const N=c.selectionSet,S=g.selectionSet;if(N&&S){const x=PU(e,t,n,v,Et(b),N,Et(w),S);return jU(x,o,c,g)}}function VU(e,t){const n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const o=new Map(r.map(({name:i,value:s})=>[i.value,s]));return n.every(i=>{const s=i.value,l=o.get(i.name.value);return l===void 0?!1:XD(s)===XD(l)})}function XD(e){return ft(Vg(e))}function bw(e,t){return vt(e)?vt(t)?bw(e.ofType,t.ofType):!0:vt(t)?!0:He(e)?He(t)?bw(e.ofType,t.ofType):!0:He(t)?!0:br(e)||br(t)?e!==t:!1}function Bg(e,t,n,r){const o=t.get(r);if(o)return o;const i=Object.create(null),s=Object.create(null);ZD(e,n,r,i,s);const l=[i,Object.keys(s)];return t.set(r,l),l}function Ew(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const o=Yn(e.getSchema(),n.typeCondition);return Bg(e,t,o,n.selectionSet)}function ZD(e,t,n,r,o){for(const i of n.selections)switch(i.kind){case U.FIELD:{const s=i.name.value;let l;(Qe(t)||Xe(t))&&(l=t.getFields()[s]);const c=i.alias?i.alias.value:s;r[c]||(r[c]=[]),r[c].push([t,i,l]);break}case U.FRAGMENT_SPREAD:o[i.name.value]=!0;break;case U.INLINE_FRAGMENT:{const s=i.typeCondition,l=s?Yn(e.getSchema(),s):t;ZD(e,l,i.selectionSet,r,o);break}}}function jU(e,t,n,r){if(e.length>0)return[[t,e.map(([o])=>o)],[n,...e.map(([,o])=>o).flat()],[r,...e.map(([,,o])=>o).flat()]]}class UU{constructor(){this._data=new Map}has(t,n,r){var o;const[i,s]=t<n?[t,n]:[n,t],l=(o=this._data.get(i))===null||o===void 0?void 0:o.get(s);return l===void 0?!1:r?!0:r===l}add(t,n,r){const[o,i]=t<n?[t,n]:[n,t],s=this._data.get(o);s===void 0?this._data.set(o,new Map([[i,r]])):s.set(i,r)}}function e2(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(Kt(n)&&Kt(r)&&!qd(e.getSchema(),n,r)){const o=ye(r),i=ye(n);e.reportError(new he(`Fragment cannot be spread here as objects of type "${o}" can never be of type "${i}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=BU(e,n),o=e.getParentType();if(r&&o&&!qd(e.getSchema(),r,o)){const i=ye(o),s=ye(r);e.reportError(new he(`Fragment "${n}" cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}}}}function BU(e,t){const n=e.getFragment(t);if(n){const r=Yn(e.getSchema(),n.typeCondition);if(Kt(r))return r}}function ww(e){const t=e.getSchema(),n=Object.create(null);for(const o of e.getDocument().definitions)wu(o)&&(n[o.name.value]=o);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(o){const i=o.name.value,s=n[i],l=t==null?void 0:t.getType(i);let c;if(s?c=qU[s.kind]:l&&(c=zU(l)),c){if(c!==o.kind){const f=HU(o.kind);e.reportError(new he(`Cannot extend non-${f} type "${i}".`,{nodes:s?[s,o]:o}))}}else{const f=Object.keys({...n,...t==null?void 0:t.getTypeMap()}),d=Ta(i,f);e.reportError(new he(`Cannot extend type "${i}" because it is not defined.`+xs(d),{nodes:o.name}))}}}const qU={[U.SCALAR_TYPE_DEFINITION]:U.SCALAR_TYPE_EXTENSION,[U.OBJECT_TYPE_DEFINITION]:U.OBJECT_TYPE_EXTENSION,[U.INTERFACE_TYPE_DEFINITION]:U.INTERFACE_TYPE_EXTENSION,[U.UNION_TYPE_DEFINITION]:U.UNION_TYPE_EXTENSION,[U.ENUM_TYPE_DEFINITION]:U.ENUM_TYPE_EXTENSION,[U.INPUT_OBJECT_TYPE_DEFINITION]:U.INPUT_OBJECT_TYPE_EXTENSION};function zU(e){if(or(e))return U.SCALAR_TYPE_EXTENSION;if(Qe(e))return U.OBJECT_TYPE_EXTENSION;if(Xe(e))return U.INTERFACE_TYPE_EXTENSION;if(Qt(e))return U.UNION_TYPE_EXTENSION;if(Lt(e))return U.ENUM_TYPE_EXTENSION;if(gt(e))return U.INPUT_OBJECT_TYPE_EXTENSION;mn(!1,"Unexpected type: "+ye(e))}function HU(e){switch(e){case U.SCALAR_TYPE_EXTENSION:return"scalar";case U.OBJECT_TYPE_EXTENSION:return"object";case U.INTERFACE_TYPE_EXTENSION:return"interface";case U.UNION_TYPE_EXTENSION:return"union";case U.ENUM_TYPE_EXTENSION:return"enum";case U.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:mn(!1,"Unexpected kind: "+ye(e))}}function t2(e){return{...n2(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const o=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(i=>i.name.value));for(const i of r.args)if(!o.has(i.name)&&ka(i)){const s=ye(i.type);e.reportError(new he(`Field "${r.name}" argument "${i.name}" of type "${s}" is required, but it was not provided.`,{nodes:t}))}}}}}function n2(e){var t;const n=Object.create(null),r=e.getSchema(),o=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:_a;for(const l of o)n[l.name]=Ss(l.args.filter(ka),c=>c.name);const i=e.getDocument().definitions;for(const l of i)if(l.kind===U.DIRECTIVE_DEFINITION){var s;const c=(s=l.arguments)!==null&&s!==void 0?s:[];n[l.name.value]=Ss(c.filter(WU),f=>f.name.value)}return{Directive:{leave(l){const c=l.name.value,f=n[c];if(f){var d;const g=(d=l.arguments)!==null&&d!==void 0?d:[],m=new Set(g.map(v=>v.name.value));for(const[v,b]of Object.entries(f))if(!m.has(v)){const w=bu(b.type)?ye(b.type):ft(b.type);e.reportError(new he(`Directive "@${c}" argument "${v}" of type "${w}" is required, but it was not provided.`,{nodes:l}))}}}}}}function WU(e){return e.type.kind===U.NON_NULL_TYPE&&e.defaultValue==null}function r2(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(br(Et(n))){if(r){const o=t.name.value,i=ye(n);e.reportError(new he(`Field "${o}" must not have a selection since type "${i}" has no subfields.`,{nodes:r}))}}else if(!r){const o=t.name.value,i=ye(n);e.reportError(new he(`Field "${o}" of type "${i}" must have a selection of subfields. Did you mean "${o} { ... }"?`,{nodes:t}))}}}}}function o2(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function xu(e,t,n){return{prev:e,key:t,typename:n}}function Vr(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function xw(e,t,n=GU){return Zd(e,t,n,void 0)}function GU(e,t,n){let r="Invalid value "+ye(t);throw e.length>0&&(r+=` at "value${o2(e)}"`),n.message=r+": "+n.message,n}function Zd(e,t,n,r){if(He(t)){if(e!=null)return Zd(e,t.ofType,n,r);n(Vr(r),e,new he(`Expected non-nullable type "${ye(t)}" not to be null.`));return}if(e==null)return null;if(vt(t)){const o=t.ofType;return nw(e)?Array.from(e,(i,s)=>{const l=xu(r,s,void 0);return Zd(i,o,n,l)}):[Zd(e,o,n,r)]}if(gt(t)){if(!yo(e)){n(Vr(r),e,new he(`Expected type "${t.name}" to be an object.`));return}const o={},i=t.getFields();for(const s of Object.values(i)){const l=e[s.name];if(l===void 0){if(s.defaultValue!==void 0)o[s.name]=s.defaultValue;else if(He(s.type)){const c=ye(s.type);n(Vr(r),e,new he(`Field "${s.name}" of required type "${c}" was not provided.`))}continue}o[s.name]=Zd(l,s.type,n,xu(r,s.name,t.name))}for(const s of Object.keys(e))if(!i[s]){const l=Ta(s,Object.keys(t.getFields()));n(Vr(r),e,new he(`Field "${s}" is not defined by type "${t.name}".`+xs(l)))}return o}if(br(t)){let o;try{o=t.parseValue(e)}catch(i){i instanceof he?n(Vr(r),e,i):n(Vr(r),e,new he(`Expected type "${t.name}". `+i.message,{originalError:i}));return}return o===void 0&&n(Vr(r),e,new he(`Expected type "${t.name}".`)),o}mn(!1,"Unexpected input type: "+ye(t))}function Ho(e,t,n){if(e){if(e.kind===U.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const o=n[r];return o===null&&He(t)?void 0:o}if(He(t))return e.kind===U.NULL?void 0:Ho(e,t.ofType,n);if(e.kind===U.NULL)return null;if(vt(t)){const r=t.ofType;if(e.kind===U.LIST){const i=[];for(const s of e.values)if(i2(s,n)){if(He(r))return;i.push(null)}else{const l=Ho(s,r,n);if(l===void 0)return;i.push(l)}return i}const o=Ho(e,r,n);return o===void 0?void 0:[o]}if(gt(t)){if(e.kind!==U.OBJECT)return;const r=Object.create(null),o=Ss(e.fields,i=>i.name.value);for(const i of Object.values(t.getFields())){const s=o[i.name];if(!s||i2(s.value,n)){if(i.defaultValue!==void 0)r[i.name]=i.defaultValue;else if(He(i.type))return;continue}const l=Ho(s.value,i.type,n);if(l===void 0)return;r[i.name]=l}return r}if(br(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}mn(!1,"Unexpected input type: "+ye(t))}}function i2(e,t){return e.kind===U.VARIABLE&&(t==null||t[e.name.value]===void 0)}function s2(e,t,n,r){const o=[],i=r==null?void 0:r.maxErrors;try{const s=YU(e,t,n,l=>{if(i!=null&&o.length>=i)throw new he("Too many errors processing variables, error limit reached. Execution aborted.");o.push(l)});if(o.length===0)return{coerced:s}}catch(s){o.push(s)}return{errors:o}}function YU(e,t,n,r){const o={};for(const i of t){const s=i.variable.name.value,l=Yn(e,i.type);if(!ir(l)){const f=ft(i.type);r(new he(`Variable "$${s}" expected value of type "${f}" which cannot be used as an input type.`,{nodes:i.type}));continue}if(!a2(n,s)){if(i.defaultValue)o[s]=Ho(i.defaultValue,l);else if(He(l)){const f=ye(l);r(new he(`Variable "$${s}" of required type "${f}" was not provided.`,{nodes:i}))}continue}const c=n[s];if(c===null&&He(l)){const f=ye(l);r(new he(`Variable "$${s}" of non-null type "${f}" must not be null.`,{nodes:i}));continue}o[s]=xw(c,l,(f,d,g)=>{let m=`Variable "$${s}" got invalid value `+ye(d);f.length>0&&(m+=` at "${s}${o2(f)}"`),r(new he(m+"; "+g.message,{nodes:i,originalError:g}))})}return o}function qg(e,t,n){var r;const o={},i=(r=t.arguments)!==null&&r!==void 0?r:[],s=Ss(i,l=>l.name.value);for(const l of e.args){const c=l.name,f=l.type,d=s[c];if(!d){if(l.defaultValue!==void 0)o[c]=l.defaultValue;else if(He(f))throw new he(`Argument "${c}" of required type "${ye(f)}" was not provided.`,{nodes:t});continue}const g=d.value;let m=g.kind===U.NULL;if(g.kind===U.VARIABLE){const b=g.name.value;if(n==null||!a2(n,b)){if(l.defaultValue!==void 0)o[c]=l.defaultValue;else if(He(f))throw new he(`Argument "${c}" of required type "${ye(f)}" was provided the variable "$${b}" which was not provided a runtime value.`,{nodes:g});continue}m=n[b]==null}if(m&&He(f))throw new he(`Argument "${c}" of non-null type "${ye(f)}" must not be null.`,{nodes:g});const v=Ho(g,f,n);if(v===void 0)throw new he(`Argument "${c}" has invalid value ${ft(g)}.`,{nodes:g});o[c]=v}return o}function Os(e,t,n){var r;const o=(r=t.directives)===null||r===void 0?void 0:r.find(i=>i.name.value===e.name);if(o)return qg(e,o,n)}function a2(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Sw(e,t,n,r,o){const i=new Map;return zg(e,t,n,r,o,i,new Set),i}function QU(e,t,n,r,o){const i=new Map,s=new Set;for(const l of o)l.selectionSet&&zg(e,t,n,r,l.selectionSet,i,s);return i}function zg(e,t,n,r,o,i,s){for(const l of o.selections)switch(l.kind){case U.FIELD:{if(!Tw(n,l))continue;const c=KU(l),f=i.get(c);f!==void 0?f.push(l):i.set(c,[l]);break}case U.INLINE_FRAGMENT:{if(!Tw(n,l)||!l2(e,l,r))continue;zg(e,t,n,r,l.selectionSet,i,s);break}case U.FRAGMENT_SPREAD:{const c=l.name.value;if(s.has(c)||!Tw(n,l))continue;s.add(c);const f=t[c];if(!f||!l2(e,f,r))continue;zg(e,t,n,r,f.selectionSet,i,s);break}}}function Tw(e,t){const n=Os(_g,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=Os(Ng,t,e);return(r==null?void 0:r.if)!==!1}function l2(e,t,n){const r=t.typeCondition;if(!r)return!0;const o=Yn(e,r);return o===n?!0:Pn(o)?e.isSubType(o,n):!1}function KU(e){return e.alias?e.alias.value:e.name.value}function c2(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const o=t.name?t.name.value:null,i=Object.create(null),s=e.getDocument(),l=Object.create(null);for(const f of s.definitions)f.kind===U.FRAGMENT_DEFINITION&&(l[f.name.value]=f);const c=Sw(n,l,i,r,t.selectionSet);if(c.size>1){const g=[...c.values()].slice(1).flat();e.reportError(new he(o!=null?`Subscription "${o}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:g}))}for(const f of c.values())f[0].name.value.startsWith("__")&&e.reportError(new he(o!=null?`Subscription "${o}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:f}))}}}}}function Cw(e,t){const n=new Map;for(const r of e){const o=t(r),i=n.get(o);i===void 0?n.set(o,[r]):i.push(r)}return n}function u2(e){return{DirectiveDefinition(r){var o;const i=(o=r.arguments)!==null&&o!==void 0?o:[];return n(`@${r.name.value}`,i)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var o;const i=r.name.value,s=(o=r.fields)!==null&&o!==void 0?o:[];for(const c of s){var l;const f=c.name.value,d=(l=c.arguments)!==null&&l!==void 0?l:[];n(`${i}.${f}`,d)}return!1}function n(r,o){const i=Cw(o,s=>s.name.value);for(const[s,l]of i)l.length>1&&e.reportError(new he(`Argument "${r}(${s}:)" can only be defined once.`,{nodes:l.map(c=>c.name)}));return!1}}function Hg(e){return{Field:t,Directive:t};function t(n){var r;const o=(r=n.arguments)!==null&&r!==void 0?r:[],i=Cw(o,s=>s.name.value);for(const[s,l]of i)l.length>1&&e.reportError(new he(`There can be only one argument named "${s}".`,{nodes:l.map(c=>c.name)}))}}function kw(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const o=r.name.value;if(n!=null&&n.getDirective(o)){e.reportError(new he(`Directive "@${o}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[o]?e.reportError(new he(`There can be only one directive named "@${o}".`,{nodes:[t[o],r.name]})):t[o]=r.name,!1}}}function Wg(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():_a;for(const l of r)t[l.name]=!l.isRepeatable;const o=e.getDocument().definitions;for(const l of o)l.kind===U.DIRECTIVE_DEFINITION&&(t[l.name.value]=!l.repeatable);const i=Object.create(null),s=Object.create(null);return{enter(l){if(!("directives"in l)||!l.directives)return;let c;if(l.kind===U.SCHEMA_DEFINITION||l.kind===U.SCHEMA_EXTENSION)c=i;else if(wu(l)||Mg(l)){const f=l.name.value;c=s[f],c===void 0&&(s[f]=c=Object.create(null))}else c=Object.create(null);for(const f of l.directives){const d=f.name.value;t[d]&&(c[d]?e.reportError(new he(`The directive "@${d}" can only be used once at this location.`,{nodes:[c[d],f]})):c[d]=f)}}}}function Nw(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:o,EnumTypeExtension:o};function o(i){var s;const l=i.name.value;r[l]||(r[l]=Object.create(null));const c=(s=i.values)!==null&&s!==void 0?s:[],f=r[l];for(const d of c){const g=d.name.value,m=n[l];Lt(m)&&m.getValue(g)?e.reportError(new he(`Enum value "${l}.${g}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:d.name})):f[g]?e.reportError(new he(`Enum value "${l}.${g}" can only be defined once.`,{nodes:[f[g],d.name]})):f[g]=d.name}return!1}}function _w(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:o,InputObjectTypeExtension:o,InterfaceTypeDefinition:o,InterfaceTypeExtension:o,ObjectTypeDefinition:o,ObjectTypeExtension:o};function o(i){var s;const l=i.name.value;r[l]||(r[l]=Object.create(null));const c=(s=i.fields)!==null&&s!==void 0?s:[],f=r[l];for(const d of c){const g=d.name.value;JU(n[l],g)?e.reportError(new he(`Field "${l}.${g}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:d.name})):f[g]?e.reportError(new he(`Field "${l}.${g}" can only be defined once.`,{nodes:[f[g],d.name]})):f[g]=d.name}return!1}}function JU(e,t){return Qe(e)||Xe(e)||gt(e)?e.getFields()[t]!=null:!1}function f2(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new he(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Gg(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||mn(!1),n=r}},ObjectField(r){const o=r.name.value;n[o]?e.reportError(new he(`There can be only one input field named "${o}".`,{nodes:[n[o],r.name]})):n[o]=r.name}}}function d2(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new he(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Ow(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:o,SchemaExtension:o};function o(i){var s;const l=(s=i.operationTypes)!==null&&s!==void 0?s:[];for(const c of l){const f=c.operation,d=n[f];r[f]?e.reportError(new he(`Type for ${f} already defined in the schema. It cannot be redefined.`,{nodes:c})):d?e.reportError(new he(`There can be only one ${f} type in schema.`,{nodes:[d,c]})):n[f]=c}return!1}}function Aw(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(o){const i=o.name.value;if(n!=null&&n.getType(i)){e.reportError(new he(`Type "${i}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:o.name}));return}return t[i]?e.reportError(new he(`There can be only one type named "${i}".`,{nodes:[t[i],o.name]})):t[i]=o.name,!1}}function p2(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],o=Cw(r,i=>i.variable.name.value);for(const[i,s]of o)s.length>1&&e.reportError(new he(`There can be only one variable named "$${i}".`,{nodes:s.map(l=>l.variable.name)}))}}}function h2(e){return{ListValue(t){const n=Ca(e.getParentInputType());if(!vt(n))return Vl(e,t),!1},ObjectValue(t){const n=Et(e.getInputType());if(!gt(n))return Vl(e,t),!1;const r=Ss(t.fields,o=>o.name.value);for(const o of Object.values(n.getFields()))if(!r[o.name]&&xg(o)){const s=ye(o.type);e.reportError(new he(`Field "${n.name}.${o.name}" of required type "${s}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Et(e.getParentInputType());if(!e.getInputType()&>(n)){const o=Ta(t.name.value,Object.keys(n.getFields()));e.reportError(new he(`Field "${t.name.value}" is not defined by type "${n.name}".`+xs(o),{nodes:t}))}},NullValue(t){const n=e.getInputType();He(n)&&e.reportError(new he(`Expected value of type "${ye(n)}", found ${ft(t)}.`,{nodes:t}))},EnumValue:t=>Vl(e,t),IntValue:t=>Vl(e,t),FloatValue:t=>Vl(e,t),StringValue:t=>Vl(e,t),BooleanValue:t=>Vl(e,t)}}function Vl(e,t){const n=e.getInputType();if(!n)return;const r=Et(n);if(!br(r)){const o=ye(n);e.reportError(new he(`Expected value of type "${o}", found ${ft(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const i=ye(n);e.reportError(new he(`Expected value of type "${i}", found ${ft(t)}.`,{nodes:t}))}}catch(o){const i=ye(n);o instanceof he?e.reportError(o):e.reportError(new he(`Expected value of type "${i}", found ${ft(t)}; `+o.message,{nodes:t,originalError:o}))}}function m2(e){return{VariableDefinition(t){const n=Yn(e.getSchema(),t.type);if(n!==void 0&&!ir(n)){const r=t.variable.name.value,o=ft(t.type);e.reportError(new he(`Variable "$${r}" cannot be non-input type "${o}".`,{nodes:t.type}))}}}}function g2(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:o,type:i,defaultValue:s}of r){const l=o.name.value,c=t[l];if(c&&i){const f=e.getSchema(),d=Yn(f,c.type);if(d&&!XU(f,d,c.defaultValue,i,s)){const g=ye(d),m=ye(i);e.reportError(new he(`Variable "$${l}" of type "${g}" used in position expecting type "${m}".`,{nodes:[c,o]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function XU(e,t,n,r,o){if(He(r)&&!He(t)){if(!(n!=null&&n.kind!==U.NULL)&&!(o!==void 0))return!1;const l=r.ofType;return Rl(e,t,l)}return Rl(e,t,r)}const Dw=Object.freeze([hw,d2,HD,c2,$g,UD,m2,r2,jD,f2,mw,vw,e2,WD,p2,GD,YD,Pg,Wg,BD,Hg,h2,t2,g2,KD,Gg]),ZU=Object.freeze([gw,Ow,Aw,Nw,_w,u2,kw,$g,Pg,Wg,ww,qD,Hg,Gg,n2]);class v2{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===U.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let o;for(;o=r.pop();)for(const i of o.selections)i.kind===U.FRAGMENT_SPREAD?n.push(i):i.selectionSet&&r.push(i.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),o=[t.selectionSet];let i;for(;i=o.pop();)for(const s of this.getFragmentSpreads(i)){const l=s.name.value;if(r[l]!==!0){r[l]=!0;const c=this.getFragment(l);c&&(n.push(c),o.push(c.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class eB extends v2{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class y2 extends v2{constructor(t,n,r,o){super(n,o),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],o=new _s(this._schema);fn(t,$l(o,{VariableDefinition:()=>!1,Variable(i){r.push({node:i,type:o.getInputType(),defaultValue:o.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function ep(e,t,n=Dw,r,o=new _s(e)){var i;const s=(i=r==null?void 0:r.maxErrors)!==null&&i!==void 0?i:100;t||lt(!1,"Must provide document."),Rg(e);const l=Object.freeze({}),c=[],f=new y2(e,t,o,g=>{if(c.length>=s)throw c.push(new he("Too many validation errors, error limit reached. Validation aborted.")),l;c.push(g)}),d=KE(n.map(g=>g(f)));try{fn(t,$l(o,d))}catch(g){if(g!==l)throw g}return c}function b2(e,t,n=ZU){const r=[],o=new eB(e,t,s=>{r.push(s)}),i=n.map(s=>s(o));return fn(e,KE(i)),r}function tB(e){const t=b2(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
`))}function nB(e,t){const n=b2(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
`))}function rB(e){let t;return function(r,o,i){t===void 0&&(t=new WeakMap);let s=t.get(r);s===void 0&&(s=new WeakMap,t.set(r,s));let l=s.get(o);l===void 0&&(l=new WeakMap,s.set(o,l));let c=l.get(i);return c===void 0&&(c=e(r,o,i),l.set(i,c)),c}}function E2(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,o]of Object.keys(e).entries())n[o]=t[r];return n})}function oB(e,t,n){let r=n;for(const o of e)r=vo(r)?r.then(i=>t(i,o)):t(r,o);return r}function iB(e){return e instanceof Error?e:new sB(e)}class sB extends Error{constructor(t){super("Unexpected error value: "+ye(t)),this.name="NonErrorThrown",this.thrownValue=t}}function gn(e,t,n){var r;const o=iB(e);return aB(o)?o:new he(o.message,{nodes:(r=o.nodes)!==null&&r!==void 0?r:t,source:o.source,positions:o.positions,path:n,originalError:o})}function aB(e){return Array.isArray(e.path)}const lB=rB((e,t,n)=>QU(e.schema,e.fragments,e.variableValues,t,n));function Yg(e){arguments.length<2||lt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:o}=e;x2(t,n,r);const i=S2(e);if(!("schema"in i))return{errors:i};try{const{operation:s}=i,l=cB(i,s,o);return vo(l)?l.then(c=>Qg(c,i.errors),c=>(i.errors.push(c),Qg(null,i.errors))):Qg(l,i.errors)}catch(s){return i.errors.push(s),Qg(null,i.errors)}}function w2(e){const t=Yg(e);if(vo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Qg(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function x2(e,t,n){t||lt(!1,"Must provide document."),Rg(e),n==null||yo(n)||lt(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function S2(e){var t,n;const{schema:r,document:o,rootValue:i,contextValue:s,variableValues:l,operationName:c,fieldResolver:f,typeResolver:d,subscribeFieldResolver:g}=e;let m;const v=Object.create(null);for(const N of o.definitions)switch(N.kind){case U.OPERATION_DEFINITION:if(c==null){if(m!==void 0)return[new he("Must provide operation name if query contains multiple operations.")];m=N}else((t=N.name)===null||t===void 0?void 0:t.value)===c&&(m=N);break;case U.FRAGMENT_DEFINITION:v[N.name.value]=N;break}if(!m)return c!=null?[new he(`Unknown operation named "${c}".`)]:[new he("Must provide an operation.")];const b=(n=m.variableDefinitions)!==null&&n!==void 0?n:[],w=s2(r,b,l??{},{maxErrors:50});return w.errors?w.errors:{schema:r,fragments:v,rootValue:i,contextValue:s,operation:m,variableValues:w.coerced,fieldResolver:f??Xg,typeResolver:d??_2,subscribeFieldResolver:g??Xg,errors:[]}}function cB(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new he(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const o=Sw(e.schema,e.fragments,e.variableValues,r,t.selectionSet),i=void 0;switch(t.operation){case Mn.QUERY:return Kg(e,r,n,i,o);case Mn.MUTATION:return uB(e,r,n,i,o);case Mn.SUBSCRIPTION:return Kg(e,r,n,i,o)}}function uB(e,t,n,r,o){return oB(o.entries(),(i,[s,l])=>{const c=xu(r,s,t.name),f=T2(e,t,n,l,c);return f===void 0?i:vo(f)?f.then(d=>(i[s]=d,i)):(i[s]=f,i)},Object.create(null))}function Kg(e,t,n,r,o){const i=Object.create(null);let s=!1;try{for(const[l,c]of o.entries()){const f=xu(r,l,t.name),d=T2(e,t,n,c,f);d!==void 0&&(i[l]=d,vo(d)&&(s=!0))}}catch(l){if(s)return E2(i).finally(()=>{throw l});throw l}return s?E2(i):i}function T2(e,t,n,r,o){var i;const s=O2(e.schema,t,r[0]);if(!s)return;const l=s.type,c=(i=s.resolve)!==null&&i!==void 0?i:e.fieldResolver,f=C2(e,s,r,t,o);try{const d=qg(s,r[0],e.variableValues),g=e.contextValue,m=c(n,d,g,f);let v;return vo(m)?v=m.then(b=>tp(e,l,r,f,o,b)):v=tp(e,l,r,f,o,m),vo(v)?v.then(void 0,b=>{const w=gn(b,r,Vr(o));return Jg(w,l,e)}):v}catch(d){const g=gn(d,r,Vr(o));return Jg(g,l,e)}}function C2(e,t,n,r,o){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:o,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Jg(e,t,n){if(He(t))throw e;return n.errors.push(e),null}function tp(e,t,n,r,o,i){if(i instanceof Error)throw i;if(He(t)){const s=tp(e,t.ofType,n,r,o,i);if(s===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return s}if(i==null)return null;if(vt(t))return fB(e,t,n,r,o,i);if(br(t))return dB(t,i);if(Pn(t))return pB(e,t,n,r,o,i);if(Qe(t))return Iw(e,t,n,r,o,i);mn(!1,"Cannot complete value of unexpected output type: "+ye(t))}function fB(e,t,n,r,o,i){if(!nw(i))throw new he(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const s=t.ofType;let l=!1;const c=Array.from(i,(f,d)=>{const g=xu(o,d,void 0);try{let m;return vo(f)?m=f.then(v=>tp(e,s,n,r,g,v)):m=tp(e,s,n,r,g,f),vo(m)?(l=!0,m.then(void 0,v=>{const b=gn(v,n,Vr(g));return Jg(b,s,e)})):m}catch(m){const v=gn(m,n,Vr(g));return Jg(v,s,e)}});return l?Promise.all(c):c}function dB(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${ye(e)}.serialize(${ye(t)})\` to return non-nullable value, returned: ${ye(n)}`);return n}function pB(e,t,n,r,o,i){var s;const l=(s=t.resolveType)!==null&&s!==void 0?s:e.typeResolver,c=e.contextValue,f=l(i,c,r,t);return vo(f)?f.then(d=>Iw(e,k2(d,e,t,n,r,i),n,r,o,i)):Iw(e,k2(f,e,t,n,r,i),n,r,o,i)}function k2(e,t,n,r,o,i){if(e==null)throw new he(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(Qe(e))throw new he("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new he(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${ye(i)}, received "${ye(e)}".`);const s=t.schema.getType(e);if(s==null)throw new he(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!Qe(s))throw new he(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,s))throw new he(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,{nodes:r});return s}function Iw(e,t,n,r,o,i){const s=lB(e,t,n);if(t.isTypeOf){const l=t.isTypeOf(i,e.contextValue,r);if(vo(l))return l.then(c=>{if(!c)throw N2(t,i,n);return Kg(e,t,i,o,s)});if(!l)throw N2(t,i,n)}return Kg(e,t,i,o,s)}function N2(e,t,n){return new he(`Expected value of type "${e.name}" but got: ${ye(t)}.`,{nodes:n})}const _2=function(e,t,n,r){if(yo(e)&&typeof e.__typename=="string")return e.__typename;const o=n.schema.getPossibleTypes(r),i=[];for(let s=0;s<o.length;s++){const l=o[s];if(l.isTypeOf){const c=l.isTypeOf(e,t,n);if(vo(c))i[s]=c;else if(c)return l.name}}if(i.length)return Promise.all(i).then(s=>{for(let l=0;l<s.length;l++)if(s[l])return o[l].name})},Xg=function(e,t,n,r){if(yo(e)||typeof e=="function"){const o=e[r.fieldName];return typeof o=="function"?e[r.fieldName](t,n,r):o}};function O2(e,t,n){const r=n.name.value;return r===qo.name&&e.getQueryType()===t?qo:r===zo.name&&e.getQueryType()===t?zo:r===wo.name?wo:t.getFields()[r]}function hB(e){return new Promise(t=>t(A2(e)))}function mB(e){const t=A2(e);if(vo(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function A2(e){arguments.length<2||lt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:l,typeResolver:c}=e,f=Lg(t);if(f.length>0)return{errors:f};let d;try{d=rr(n)}catch(m){return{errors:[m]}}const g=ep(t,d);return g.length>0?{errors:g}:Yg({schema:t,document:d,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:l,typeResolver:c})}function D2(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function gB(e,t){const n=e[Symbol.asyncIterator]();async function r(o){if(o.done)return o;try{return{value:await t(o.value),done:!1}}catch(i){if(typeof n.return=="function")try{await n.return()}catch{}throw i}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(o){if(typeof n.throw=="function")return r(await n.throw(o));throw o},[Symbol.asyncIterator](){return this}}}async function vB(e){arguments.length<2||lt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await I2(e);return D2(t)?gB(t,r=>Yg({...e,rootValue:r})):t}function yB(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function I2(...e){const t=yB(e),{schema:n,document:r,variableValues:o}=t;x2(n,r,o);const i=S2(t);if(!("schema"in i))return{errors:i};try{const s=await bB(i);if(!D2(s))throw new Error(`Subscription field must return Async Iterable. Received: ${ye(s)}.`);return s}catch(s){if(s instanceof he)return{errors:[s]};throw s}}async function bB(e){const{schema:t,fragments:n,operation:r,variableValues:o,rootValue:i}=e,s=t.getSubscriptionType();if(s==null)throw new he("Schema is not configured to execute subscription operation.",{nodes:r});const l=Sw(t,n,o,s,r.selectionSet),[c,f]=[...l.entries()][0],d=O2(t,s,f[0]);if(!d){const b=f[0].name.value;throw new he(`The subscription field "${b}" is not defined.`,{nodes:f})}const g=xu(void 0,c,s.name),m=C2(e,d,f,s,g);try{var v;const b=qg(d,f[0],o),w=e.contextValue,S=await((v=d.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(i,b,w,m);if(S instanceof Error)throw S;return S}catch(b){throw gn(b,f,Vr(g))}}function L2(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const o=e.getParentType();o!=null||mn(!1),e.reportError(new he(`The field ${o.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const o=e.getDirective();if(o!=null)e.reportError(new he(`Directive "@${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const i=e.getParentType(),s=e.getFieldDef();i!=null&&s!=null||mn(!1),e.reportError(new he(`Field "${i.name}.${s.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Et(e.getParentInputType());if(gt(n)){const r=n.getFields()[t.name.value],o=r==null?void 0:r.deprecationReason;o!=null&&e.reportError(new he(`The input field ${n.name}.${r.name} is deprecated. ${o}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const o=Et(e.getInputType());o!=null||mn(!1),e.reportError(new he(`The enum value "${o.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function EB(e){return{Field(t){const n=Et(e.getType());n&&Fl(n)&&e.reportError(new he(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function Zg(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",o=t.directiveIsRepeatable?"isRepeatable":"",i=t.schemaDescription?n:"";function s(l){return t.inputValueDeprecation?l:""}return`
query IntrospectionQuery {
__schema {
${i}
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
${n}
${o}
locations
args${s("(includeDeprecated: true)")} {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
${n}
${r}
fields(includeDeprecated: true) {
name
${n}
args${s("(includeDeprecated: true)")} {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields${s("(includeDeprecated: true)")} {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
${n}
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
${n}
type { ...TypeRef }
defaultValue
${s("isDeprecated")}
${s("deprecationReason")}
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
}
`}function Lw(e,t){let n=null;for(const o of e.definitions)if(o.kind===U.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=o}else if(((r=o.name)===null||r===void 0?void 0:r.value)===t)return o}return n}function wB(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new he("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new he("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new he("Schema is not configured for subscriptions.",{nodes:t});return n}throw new he("Can only have query, mutation and subscription operations.",{nodes:t})}function xB(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=rr(Zg(n)),o=w2({schema:e,document:r});return!o.errors&&o.data||mn(!1),o.data}function Rw(e,t){yo(e)&&yo(e.__schema)||lt(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${ye(e)}.`);const n=e.__schema,r=Sa(n.types,F=>F.name,F=>m(F));for(const F of[...Gd,...Jd])r[F.name]&&(r[F.name]=F);const o=n.queryType?d(n.queryType):null,i=n.mutationType?d(n.mutationType):null,s=n.subscriptionType?d(n.subscriptionType):null,l=n.directives?n.directives.map(A):[];return new Ml({description:n.description,query:o,mutation:i,subscription:s,types:Object.values(r),directives:l,assumeValid:t==null?void 0:t.assumeValid});function c(F){if(F.kind===At.LIST){const $=F.ofType;if(!$)throw new Error("Decorated type deeper than introspection query.");return new Bt(c($))}if(F.kind===At.NON_NULL){const $=F.ofType;if(!$)throw new Error("Decorated type deeper than introspection query.");const q=c($);return new tt(OD(q))}return f(F)}function f(F){const $=F.name;if(!$)throw new Error(`Unknown type reference: ${ye(F)}.`);const q=r[$];if(!q)throw new Error(`Invalid or incomplete schema, unknown type: ${$}. Ensure that a full introspection query is used in order to build a client schema.`);return q}function d(F){return kD(f(F))}function g(F){return ND(f(F))}function m(F){if(F!=null&&F.name!=null&&F.kind!=null)switch(F.kind){case At.SCALAR:return v(F);case At.OBJECT:return w(F);case At.INTERFACE:return N(F);case At.UNION:return S(F);case At.ENUM:return x(F);case At.INPUT_OBJECT:return C(F)}const $=ye(F);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${$}.`)}function v(F){return new Uo({name:F.name,description:F.description,specifiedByURL:F.specifiedByURL})}function b(F){if(F.interfaces===null&&F.kind===At.INTERFACE)return[];if(!F.interfaces){const $=ye(F);throw new Error(`Introspection result missing interfaces: ${$}.`)}return F.interfaces.map(g)}function w(F){return new $n({name:F.name,description:F.description,interfaces:()=>b(F),fields:()=>E(F)})}function N(F){return new Pr({name:F.name,description:F.description,interfaces:()=>b(F),fields:()=>E(F)})}function S(F){if(!F.possibleTypes){const $=ye(F);throw new Error(`Introspection result missing possibleTypes: ${$}.`)}return new Na({name:F.name,description:F.description,types:()=>F.possibleTypes.map(d)})}function x(F){if(!F.enumValues){const $=ye(F);throw new Error(`Introspection result missing enumValues: ${$}.`)}return new Er({name:F.name,description:F.description,values:Sa(F.enumValues,$=>$.name,$=>({description:$.description,deprecationReason:$.deprecationReason}))})}function C(F){if(!F.inputFields){const $=ye(F);throw new Error(`Introspection result missing inputFields: ${$}.`)}return new $r({name:F.name,description:F.description,fields:()=>I(F.inputFields)})}function E(F){if(!F.fields)throw new Error(`Introspection result missing fields: ${ye(F)}.`);return Sa(F.fields,$=>$.name,_)}function _(F){const $=c(F.type);if(!Cs($)){const q=ye($);throw new Error(`Introspection must provide output type for fields, but received: ${q}.`)}if(!F.args){const q=ye(F);throw new Error(`Introspection result missing field args: ${q}.`)}return{description:F.description,deprecationReason:F.deprecationReason,type:$,args:I(F.args)}}function I(F){return Sa(F,$=>$.name,D)}function D(F){const $=c(F.type);if(!ir($)){const H=ye($);throw new Error(`Introspection must provide input type for arguments, but received: ${H}.`)}const q=F.defaultValue!=null?Ho(ED(F.defaultValue),$):void 0;return{description:F.description,type:$,defaultValue:q,deprecationReason:F.deprecationReason}}function A(F){if(!F.args){const $=ye(F);throw new Error(`Introspection result missing directive args: ${$}.`)}if(!F.locations){const $=ye(F);throw new Error(`Introspection result missing directive locations: ${$}.`)}return new Eo({name:F.name,description:F.description,isRepeatable:F.isRepeatable,locations:F.locations.slice(),args:I(F.args)})}}function SB(e,t,n){lw(e),t!=null&&t.kind===U.DOCUMENT||lt(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&nB(t,e);const r=e.toConfig(),o=R2(r,t,n);return r===o?e:new Ml(o)}function R2(e,t,n){var r,o,i,s;const l=[],c=Object.create(null),f=[];let d;const g=[];for(const J of t.definitions)if(J.kind===U.SCHEMA_DEFINITION)d=J;else if(J.kind===U.SCHEMA_EXTENSION)g.push(J);else if(wu(J))l.push(J);else if(Mg(J)){const ie=J.name.value,ne=c[ie];c[ie]=ne?ne.concat([J]):[J]}else J.kind===U.DIRECTIVE_DEFINITION&&f.push(J);if(Object.keys(c).length===0&&l.length===0&&f.length===0&&g.length===0&&d==null)return e;const m=Object.create(null);for(const J of e.types)m[J.name]=x(J);for(const J of l){var v;const ie=J.name.value;m[ie]=(v=F2[ie])!==null&&v!==void 0?v:re(J)}const b={query:e.query&&N(e.query),mutation:e.mutation&&N(e.mutation),subscription:e.subscription&&N(e.subscription),...d&&q([d]),...q(g)};return{description:(r=d)===null||r===void 0||(o=r.description)===null||o===void 0?void 0:o.value,...b,types:Object.values(m),directives:[...e.directives.map(S),...f.map(B)],extensions:Object.create(null),astNode:(i=d)!==null&&i!==void 0?i:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(g),assumeValid:(s=n==null?void 0:n.assumeValid)!==null&&s!==void 0?s:!1};function w(J){return vt(J)?new Bt(w(J.ofType)):He(J)?new tt(w(J.ofType)):N(J)}function N(J){return m[J.name]}function S(J){const ie=J.toConfig();return new Eo({...ie,args:Ts(ie.args,$)})}function x(J){if(Fl(J)||Yd(J))return J;if(or(J))return _(J);if(Qe(J))return I(J);if(Xe(J))return D(J);if(Qt(J))return A(J);if(Lt(J))return E(J);if(gt(J))return C(J);mn(!1,"Unexpected type: "+ye(J))}function C(J){var ie;const ne=J.toConfig(),ae=(ie=c[ne.name])!==null&&ie!==void 0?ie:[];return new $r({...ne,fields:()=>({...Ts(ne.fields,le=>({...le,type:w(le.type)})),...Y(ae)}),extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function E(J){var ie;const ne=J.toConfig(),ae=(ie=c[J.name])!==null&&ie!==void 0?ie:[];return new Er({...ne,values:{...ne.values,...Q(ae)},extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function _(J){var ie;const ne=J.toConfig(),ae=(ie=c[ne.name])!==null&&ie!==void 0?ie:[];let le=ne.specifiedByURL;for(const xe of ae){var de;le=(de=M2(xe))!==null&&de!==void 0?de:le}return new Uo({...ne,specifiedByURL:le,extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function I(J){var ie;const ne=J.toConfig(),ae=(ie=c[ne.name])!==null&&ie!==void 0?ie:[];return new $n({...ne,interfaces:()=>[...J.getInterfaces().map(N),...K(ae)],fields:()=>({...Ts(ne.fields,F),...R(ae)}),extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function D(J){var ie;const ne=J.toConfig(),ae=(ie=c[ne.name])!==null&&ie!==void 0?ie:[];return new Pr({...ne,interfaces:()=>[...J.getInterfaces().map(N),...K(ae)],fields:()=>({...Ts(ne.fields,F),...R(ae)}),extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function A(J){var ie;const ne=J.toConfig(),ae=(ie=c[ne.name])!==null&&ie!==void 0?ie:[];return new Na({...ne,types:()=>[...J.getTypes().map(N),...Z(ae)],extensionASTNodes:ne.extensionASTNodes.concat(ae)})}function F(J){return{...J,type:w(J.type),args:J.args&&Ts(J.args,$)}}function $(J){return{...J,type:w(J.type)}}function q(J){const ie={};for(const ae of J){var ne;const le=(ne=ae.operationTypes)!==null&&ne!==void 0?ne:[];for(const de of le)ie[de.operation]=H(de.type)}return ie}function H(J){var ie;const ne=J.name.value,ae=(ie=F2[ne])!==null&&ie!==void 0?ie:m[ne];if(ae===void 0)throw new Error(`Unknown type: "${ne}".`);return ae}function z(J){return J.kind===U.LIST_TYPE?new Bt(z(J.type)):J.kind===U.NON_NULL_TYPE?new tt(z(J.type)):H(J)}function B(J){var ie;return new Eo({name:J.name.value,description:(ie=J.description)===null||ie===void 0?void 0:ie.value,locations:J.locations.map(({value:ne})=>ne),isRepeatable:J.repeatable,args:te(J.arguments),astNode:J})}function R(J){const ie=Object.create(null);for(const le of J){var ne;const de=(ne=le.fields)!==null&&ne!==void 0?ne:[];for(const xe of de){var ae;ie[xe.name.value]={type:z(xe.type),description:(ae=xe.description)===null||ae===void 0?void 0:ae.value,args:te(xe.arguments),deprecationReason:ev(xe),astNode:xe}}}return ie}function te(J){const ie=J??[],ne=Object.create(null);for(const le of ie){var ae;const de=z(le.type);ne[le.name.value]={type:de,description:(ae=le.description)===null||ae===void 0?void 0:ae.value,defaultValue:Ho(le.defaultValue,de),deprecationReason:ev(le),astNode:le}}return ne}function Y(J){const ie=Object.create(null);for(const le of J){var ne;const de=(ne=le.fields)!==null&&ne!==void 0?ne:[];for(const xe of de){var ae;const ve=z(xe.type);ie[xe.name.value]={type:ve,description:(ae=xe.description)===null||ae===void 0?void 0:ae.value,defaultValue:Ho(xe.defaultValue,ve),deprecationReason:ev(xe),astNode:xe}}}return ie}function Q(J){const ie=Object.create(null);for(const le of J){var ne;const de=(ne=le.values)!==null&&ne!==void 0?ne:[];for(const xe of de){var ae;ie[xe.name.value]={description:(ae=xe.description)===null||ae===void 0?void 0:ae.value,deprecationReason:ev(xe),astNode:xe}}}return ie}function K(J){return J.flatMap(ie=>{var ne,ae;return(ne=(ae=ie.interfaces)===null||ae===void 0?void 0:ae.map(H))!==null&&ne!==void 0?ne:[]})}function Z(J){return J.flatMap(ie=>{var ne,ae;return(ne=(ae=ie.types)===null||ae===void 0?void 0:ae.map(H))!==null&&ne!==void 0?ne:[]})}function re(J){var ie;const ne=J.name.value,ae=(ie=c[ne])!==null&&ie!==void 0?ie:[];switch(J.kind){case U.OBJECT_TYPE_DEFINITION:{var le;const Oe=[J,...ae];return new $n({name:ne,description:(le=J.description)===null||le===void 0?void 0:le.value,interfaces:()=>K(Oe),fields:()=>R(Oe),astNode:J,extensionASTNodes:ae})}case U.INTERFACE_TYPE_DEFINITION:{var de;const Oe=[J,...ae];return new Pr({name:ne,description:(de=J.description)===null||de===void 0?void 0:de.value,interfaces:()=>K(Oe),fields:()=>R(Oe),astNode:J,extensionASTNodes:ae})}case U.ENUM_TYPE_DEFINITION:{var xe;const Oe=[J,...ae];return new Er({name:ne,description:(xe=J.description)===null||xe===void 0?void 0:xe.value,values:Q(Oe),astNode:J,extensionASTNodes:ae})}case U.UNION_TYPE_DEFINITION:{var ve;const Oe=[J,...ae];return new Na({name:ne,description:(ve=J.description)===null||ve===void 0?void 0:ve.value,types:()=>Z(Oe),astNode:J,extensionASTNodes:ae})}case U.SCALAR_TYPE_DEFINITION:{var qe;return new Uo({name:ne,description:(qe=J.description)===null||qe===void 0?void 0:qe.value,specifiedByURL:M2(J),astNode:J,extensionASTNodes:ae})}case U.INPUT_OBJECT_TYPE_DEFINITION:{var Ie;const Oe=[J,...ae];return new $r({name:ne,description:(Ie=J.description)===null||Ie===void 0?void 0:Ie.value,fields:()=>Y(Oe),astNode:J,extensionASTNodes:ae})}}}}const F2=Ss([...Gd,...Jd],e=>e.name);function ev(e){const t=Os(Og,e);return t==null?void 0:t.reason}function M2(e){const t=Os(tw,e);return t==null?void 0:t.url}function tv(e,t){e!=null&&e.kind===U.DOCUMENT||lt(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&tB(e);const r=R2({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const i of r.types)switch(i.name){case"Query":r.query=i;break;case"Mutation":r.mutation=i;break;case"Subscription":r.subscription=i;break}const o=[...r.directives,..._a.filter(i=>r.directives.every(s=>s.name!==i.name))];return new Ml({...r,directives:o})}function Fw(e,t){const n=rr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return tv(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function TB(e){const t=e.toConfig(),n=Sa(Mw(t.types),m=>m.name,g);return new Ml({...t,types:Object.values(n),directives:Mw(t.directives).map(s),query:i(t.query),mutation:i(t.mutation),subscription:i(t.subscription)});function r(m){return vt(m)?new Bt(r(m.ofType)):He(m)?new tt(r(m.ofType)):o(m)}function o(m){return n[m.name]}function i(m){return m&&o(m)}function s(m){const v=m.toConfig();return new Eo({...v,locations:P2(v.locations,b=>b),args:l(v.args)})}function l(m){return nv(m,v=>({...v,type:r(v.type)}))}function c(m){return nv(m,v=>({...v,type:r(v.type),args:v.args&&l(v.args)}))}function f(m){return nv(m,v=>({...v,type:r(v.type)}))}function d(m){return Mw(m).map(o)}function g(m){if(or(m)||Fl(m))return m;if(Qe(m)){const v=m.toConfig();return new $n({...v,interfaces:()=>d(v.interfaces),fields:()=>c(v.fields)})}if(Xe(m)){const v=m.toConfig();return new Pr({...v,interfaces:()=>d(v.interfaces),fields:()=>c(v.fields)})}if(Qt(m)){const v=m.toConfig();return new Na({...v,types:()=>d(v.types)})}if(Lt(m)){const v=m.toConfig();return new Er({...v,values:nv(v.values,b=>b)})}if(gt(m)){const v=m.toConfig();return new $r({...v,fields:()=>f(v.fields)})}mn(!1,"Unexpected type: "+ye(m))}}function nv(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(Ud))n[r]=t(e[r]);return n}function Mw(e){return P2(e,t=>t.name)}function P2(e,t){return e.slice().sort((n,r)=>{const o=t(n),i=t(r);return Ud(o,i)})}function CB(e){return $2(e,t=>!Ag(t),NB)}function kB(e){return $2(e,Ag,Fl)}function NB(e){return!Yd(e)&&!Fl(e)}function $2(e,t,n){const r=e.getDirectives().filter(t),o=Object.values(e.getTypeMap()).filter(n);return[_B(e),...r.map(i=>MB(i)),...o.map(i=>V2(i))].filter(Boolean).join(`
`)}function _B(e){if(e.description==null&&OB(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const o=e.getSubscriptionType();return o&&t.push(` subscription: ${o.name}`),Wo(e)+`schema {
${t.join(`
`)}
}`}function OB(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function V2(e){if(or(e))return AB(e);if(Qe(e))return DB(e);if(Xe(e))return IB(e);if(Qt(e))return LB(e);if(Lt(e))return RB(e);if(gt(e))return FB(e);mn(!1,"Unexpected type: "+ye(e))}function AB(e){return Wo(e)+`scalar ${e.name}`+PB(e)}function j2(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function DB(e){return Wo(e)+`type ${e.name}`+j2(e)+U2(e)}function IB(e){return Wo(e)+`interface ${e.name}`+j2(e)+U2(e)}function LB(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return Wo(e)+"union "+e.name+n}function RB(e){const t=e.getValues().map((n,r)=>Wo(n," ",!r)+" "+n.name+Vw(n.deprecationReason));return Wo(e)+`enum ${e.name}`+Pw(t)}function FB(e){const t=Object.values(e.getFields()).map((n,r)=>Wo(n," ",!r)+" "+$w(n));return Wo(e)+`input ${e.name}`+Pw(t)}function U2(e){const t=Object.values(e.getFields()).map((n,r)=>Wo(n," ",!r)+" "+n.name+B2(n.args," ")+": "+String(n.type)+Vw(n.deprecationReason));return Pw(t)}function Pw(e){return e.length!==0?` {
`+e.join(`
`)+`
}`:""}function B2(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map($w).join(", ")+")":`(
`+e.map((n,r)=>Wo(n," "+t,!r)+" "+t+$w(n)).join(`
`)+`
`+t+")"}function $w(e){const t=Ns(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ft(t)}`),n+Vw(e.deprecationReason)}function MB(e){return Wo(e)+"directive @"+e.name+B2(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Vw(e){return e==null?"":e!==ew?` @deprecated(reason: ${ft({kind:U.STRING,value:e})})`:" @deprecated"}function PB(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ft({kind:U.STRING,value:e.specifiedByURL})})`}function Wo(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const o=ft({kind:U.STRING,value:r,block:Cj(r)});return(t&&!n?`
`+t:t)+o.replace(/\n/g,`
`+t)+`
`}function $B(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:U.DOCUMENT,definitions:t}}function VB(e){const t=[],n=Object.create(null);for(const o of e.definitions)switch(o.kind){case U.OPERATION_DEFINITION:t.push(o);break;case U.FRAGMENT_DEFINITION:n[o.name.value]=z2(o.selectionSet);break}const r=Object.create(null);for(const o of t){const i=new Set;for(const l of z2(o.selectionSet))q2(i,n,l);const s=o.name?o.name.value:"";r[s]={kind:U.DOCUMENT,definitions:e.definitions.filter(l=>l===o||l.kind===U.FRAGMENT_DEFINITION&&i.has(l.name.value))}}return r}function q2(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const o of r)q2(e,t,o)}}function z2(e){const t=[];return fn(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function H2(e){const t=bD(e)?e:new jd(e),n=t.body,r=new GE(t);let o="",i=!1;for(;r.advance().kind!==ge.EOF;){const s=r.token,l=s.kind,c=!hD(s.kind);i&&(c||s.kind===ge.SPREAD)&&(o+=" ");const f=n.slice(s.start,s.end);l===ge.BLOCK_STRING?o+=pD(s.value,{minimize:!0}):o+=f,i=c}return o}function jB(e){const t=W2(e);if(t)throw t;return e}function W2(e){if(typeof e=="string"||lt(!1,"Expected name to be a string."),e.startsWith("__"))return new he(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{bo(e)}catch(t){return t}}var dn;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(dn||(dn={}));var Ei;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(Ei||(Ei={}));function UB(e,t){return G2(e,t).filter(n=>n.type in dn)}function BB(e,t){return G2(e,t).filter(n=>n.type in Ei)}function G2(e,t){return[...zB(e,t),...qB(e,t)]}function qB(e,t){const n=[],r=As(e.getDirectives(),t.getDirectives());for(const o of r.removed)n.push({type:dn.DIRECTIVE_REMOVED,description:`${o.name} was removed.`});for(const[o,i]of r.persisted){const s=As(o.args,i.args);for(const l of s.added)ka(l)&&n.push({type:dn.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${l.name} on directive ${o.name} was added.`});for(const l of s.removed)n.push({type:dn.DIRECTIVE_ARG_REMOVED,description:`${l.name} was removed from ${o.name}.`});o.isRepeatable&&!i.isRepeatable&&n.push({type:dn.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${o.name}.`});for(const l of o.locations)i.locations.includes(l)||n.push({type:dn.DIRECTIVE_LOCATION_REMOVED,description:`${l} was removed from ${o.name}.`})}return n}function zB(e,t){const n=[],r=As(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const o of r.removed)n.push({type:dn.TYPE_REMOVED,description:Yd(o)?`Standard scalar ${o.name} was removed because it is not referenced anymore.`:`${o.name} was removed.`});for(const[o,i]of r.persisted)Lt(o)&&Lt(i)?n.push(...GB(o,i)):Qt(o)&&Qt(i)?n.push(...WB(o,i)):gt(o)&>(i)?n.push(...HB(o,i)):Qe(o)&&Qe(i)?n.push(...Q2(o,i),...Y2(o,i)):Xe(o)&&Xe(i)?n.push(...Q2(o,i),...Y2(o,i)):o.constructor!==i.constructor&&n.push({type:dn.TYPE_CHANGED_KIND,description:`${o.name} changed from ${K2(o)} to ${K2(i)}.`});return n}function HB(e,t){const n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(const o of r.added)xg(o)?n.push({type:dn.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${o.name} on input type ${e.name} was added.`}):n.push({type:Ei.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${o.name} on input type ${e.name} was added.`});for(const o of r.removed)n.push({type:dn.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(const[o,i]of r.persisted)rp(o.type,i.type)||n.push({type:dn.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return n}function WB(e,t){const n=[],r=As(e.getTypes(),t.getTypes());for(const o of r.added)n.push({type:Ei.TYPE_ADDED_TO_UNION,description:`${o.name} was added to union type ${e.name}.`});for(const o of r.removed)n.push({type:dn.TYPE_REMOVED_FROM_UNION,description:`${o.name} was removed from union type ${e.name}.`});return n}function GB(e,t){const n=[],r=As(e.getValues(),t.getValues());for(const o of r.added)n.push({type:Ei.VALUE_ADDED_TO_ENUM,description:`${o.name} was added to enum type ${e.name}.`});for(const o of r.removed)n.push({type:dn.VALUE_REMOVED_FROM_ENUM,description:`${o.name} was removed from enum type ${e.name}.`});return n}function Y2(e,t){const n=[],r=As(e.getInterfaces(),t.getInterfaces());for(const o of r.added)n.push({type:Ei.IMPLEMENTED_INTERFACE_ADDED,description:`${o.name} added to interfaces implemented by ${e.name}.`});for(const o of r.removed)n.push({type:dn.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${o.name}.`});return n}function Q2(e,t){const n=[],r=As(Object.values(e.getFields()),Object.values(t.getFields()));for(const o of r.removed)n.push({type:dn.FIELD_REMOVED,description:`${e.name}.${o.name} was removed.`});for(const[o,i]of r.persisted)n.push(...YB(e,o,i)),np(o.type,i.type)||n.push({type:dn.FIELD_CHANGED_KIND,description:`${e.name}.${o.name} changed type from ${String(o.type)} to ${String(i.type)}.`});return n}function YB(e,t,n){const r=[],o=As(t.args,n.args);for(const i of o.removed)r.push({type:dn.ARG_REMOVED,description:`${e.name}.${t.name} arg ${i.name} was removed.`});for(const[i,s]of o.persisted)if(!rp(i.type,s.type))r.push({type:dn.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${i.name} has changed type from ${String(i.type)} to ${String(s.type)}.`});else if(i.defaultValue!==void 0)if(s.defaultValue===void 0)r.push({type:Ei.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${i.name} defaultValue was removed.`});else{const c=J2(i.defaultValue,i.type),f=J2(s.defaultValue,s.type);c!==f&&r.push({type:Ei.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${i.name} has changed defaultValue from ${c} to ${f}.`})}for(const i of o.added)ka(i)?r.push({type:dn.REQUIRED_ARG_ADDED,description:`A required arg ${i.name} on ${e.name}.${t.name} was added.`}):r.push({type:Ei.OPTIONAL_ARG_ADDED,description:`An optional arg ${i.name} on ${e.name}.${t.name} was added.`});return r}function np(e,t){return vt(e)?vt(t)&&np(e.ofType,t.ofType)||He(t)&&np(e,t.ofType):He(e)?He(t)&&np(e.ofType,t.ofType):ks(t)&&e.name===t.name||He(t)&&np(e,t.ofType)}function rp(e,t){return vt(e)?vt(t)&&rp(e.ofType,t.ofType):He(e)?He(t)&&rp(e.ofType,t.ofType)||!He(t)&&rp(e.ofType,t):ks(t)&&e.name===t.name}function K2(e){if(or(e))return"a Scalar type";if(Qe(e))return"an Object type";if(Xe(e))return"an Interface type";if(Qt(e))return"a Union type";if(Lt(e))return"an Enum type";if(gt(e))return"an Input type";mn(!1,"Unexpected type: "+ye(e))}function J2(e,t){const n=Ns(e,t);return n!=null||mn(!1),ft(Vg(n))}function As(e,t){const n=[],r=[],o=[],i=Ss(e,({name:l})=>l),s=Ss(t,({name:l})=>l);for(const l of e){const c=s[l.name];c===void 0?r.push(l):o.push([l,c])}for(const l of t)i[l.name]===void 0&&n.push(l);return{added:n,persisted:o,removed:r}}const QB=Object.freeze(Object.defineProperty({__proto__:null,BREAK:Ll,get BreakingChangeType(){return dn},DEFAULT_DEPRECATION_REASON:ew,get DangerousChangeType(){return Ei},get DirectiveLocation(){return Fe},ExecutableDefinitionsRule:hw,FieldsOnCorrectTypeRule:jD,FragmentsOnCompositeTypesRule:UD,GRAPHQL_MAX_INT:Tg,GRAPHQL_MIN_INT:Cg,GraphQLBoolean:qt,GraphQLDeprecatedDirective:Og,GraphQLDirective:Eo,GraphQLEnumType:Er,GraphQLError:he,GraphQLFloat:Hd,GraphQLID:Wd,GraphQLIncludeDirective:Ng,GraphQLInputObjectType:$r,GraphQLInt:zd,GraphQLInterfaceType:Pr,GraphQLList:Bt,GraphQLNonNull:tt,GraphQLObjectType:$n,GraphQLScalarType:Uo,GraphQLSchema:Ml,GraphQLSkipDirective:_g,GraphQLSpecifiedByDirective:tw,GraphQLString:Ft,GraphQLUnionType:Na,get Kind(){return U},KnownArgumentNamesRule:BD,KnownDirectivesRule:Pg,KnownFragmentNamesRule:mw,KnownTypeNamesRule:$g,Lexer:GE,Location:cD,LoneAnonymousOperationRule:HD,LoneSchemaDefinitionRule:gw,NoDeprecatedCustomRule:L2,NoFragmentCyclesRule:WD,NoSchemaIntrospectionCustomRule:EB,NoUndefinedVariablesRule:GD,NoUnusedFragmentsRule:vw,NoUnusedVariablesRule:YD,get OperationTypeNode(){return Mn},OverlappingFieldsCanBeMergedRule:KD,PossibleFragmentSpreadsRule:e2,PossibleTypeExtensionsRule:ww,ProvidedRequiredArgumentsRule:t2,ScalarLeafsRule:r2,SchemaMetaFieldDef:qo,SingleFieldSubscriptionsRule:c2,Source:jd,Token:qE,get TokenKind(){return ge},TypeInfo:_s,get TypeKind(){return At},TypeMetaFieldDef:zo,TypeNameMetaFieldDef:wo,UniqueArgumentDefinitionNamesRule:u2,UniqueArgumentNamesRule:Hg,UniqueDirectiveNamesRule:kw,UniqueDirectivesPerLocationRule:Wg,UniqueEnumValueNamesRule:Nw,UniqueFieldDefinitionNamesRule:_w,UniqueFragmentNamesRule:f2,UniqueInputFieldNamesRule:Gg,UniqueOperationNamesRule:d2,UniqueOperationTypesRule:Ow,UniqueTypeNamesRule:Aw,UniqueVariableNamesRule:p2,ValidationContext:y2,ValuesOfCorrectTypeRule:h2,VariablesAreInputTypesRule:m2,VariablesInAllowedPositionRule:g2,__Directive:rw,__DirectiveLocation:ow,__EnumValue:sw,__Field:iw,__InputValue:Kd,__Schema:Dg,__Type:Bo,__TypeKind:aw,assertAbstractType:_D,assertCompositeType:cU,assertDirective:mU,assertEnumType:nU,assertEnumValueName:CD,assertInputObjectType:rU,assertInputType:sU,assertInterfaceType:ND,assertLeafType:lU,assertListType:oU,assertName:bo,assertNamedType:fU,assertNonNullType:iU,assertNullableType:OD,assertObjectType:kD,assertOutputType:aU,assertScalarType:eU,assertSchema:lw,assertType:Zj,assertUnionType:tU,assertValidName:jB,assertValidSchema:Rg,assertWrappingType:uU,astFromValue:Ns,buildASTSchema:tv,buildClientSchema:Rw,buildSchema:Fw,coerceInputValue:xw,concatAST:$B,createSourceEventStream:I2,defaultFieldResolver:Xg,defaultTypeResolver:_2,doTypesOverlap:qd,execute:Yg,executeSync:w2,extendSchema:SB,findBreakingChanges:UB,findDangerousChanges:BB,formatError:wj,getArgumentValues:qg,getDirectiveValues:Os,getEnterLeaveForKind:yu,getIntrospectionQuery:Zg,getLocation:pg,getNamedType:Et,getNullableType:Ca,getOperationAST:Lw,getOperationRootType:wB,getVariableValues:s2,getVisitFn:Kj,graphql:hB,graphqlSync:mB,introspectionFromSchema:xB,introspectionTypes:Jd,isAbstractType:Pn,isCompositeType:Kt,isConstValueNode:dw,isDefinitionNode:NU,isDirective:kg,isEnumType:Lt,isEqualType:Sg,isExecutableDefinitionNode:fw,isInputObjectType:gt,isInputType:ir,isInterfaceType:Xe,isIntrospectionType:Fl,isLeafType:br,isListType:vt,isNamedType:ks,isNonNullType:He,isNullableType:JE,isObjectType:Qe,isOutputType:Cs,isRequiredArgument:ka,isRequiredInputField:xg,isScalarType:or,isSchema:Ig,isSelectionNode:_U,isSpecifiedDirective:Ag,isSpecifiedScalarType:Yd,isType:bu,isTypeDefinitionNode:wu,isTypeExtensionNode:Mg,isTypeNode:OU,isTypeSubTypeOf:Rl,isTypeSystemDefinitionNode:Fg,isTypeSystemExtensionNode:pw,isUnionType:Qt,isValidNameError:W2,isValueNode:VD,isWrappingType:Bd,lexicographicSortSchema:TB,locatedError:gn,parse:rr,parseConstValue:Uj,parseType:Bj,parseValue:ED,print:ft,printError:Ej,printIntrospectionSchema:kB,printLocation:sD,printSchema:CB,printSourceLocation:BE,printType:V2,resolveObjMapThunk:ZE,resolveReadonlyArrayThunk:XE,responsePathAsArray:Vr,separateOperations:VB,specifiedDirectives:_a,specifiedRules:Dw,specifiedScalarTypes:Gd,stripIgnoredCharacters:H2,subscribe:vB,syntaxError:Fn,typeFromAST:Yn,validate:ep,validateSchema:Lg,valueFromAST:Ho,valueFromASTUntyped:Eg,version:vj,versionInfo:UE,visit:fn,visitInParallel:KE,visitWithTypeInfo:$l},Symbol.toStringTag,{value:"Module"}));var X2=function(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{f(r.next(d))}catch(g){s(g)}}function c(d){try{f(r.throw(d))}catch(g){s(g)}}function f(d){d.done?i(d.value):o(d.value).then(l,c)}f((r=r.apply(e,t||[])).next())})};function Z2(e){return typeof e=="object"&&e!==null&&typeof e.then=="function"}function KB(e){return new Promise((t,n)=>{const r=e.subscribe({next(o){t(o),r.unsubscribe()},error:n,complete(){n(new Error("no value resolved"))}})})}function eI(e){return typeof e=="object"&&e!==null&&"subscribe"in e&&typeof e.subscribe=="function"}function tI(e){return typeof e=="object"&&e!==null&&(e[Symbol.toStringTag]==="AsyncGenerator"||Symbol.asyncIterator in e)}function JB(e){var t;return X2(this,void 0,void 0,function*(){const n=(t=("return"in e?e:e[Symbol.asyncIterator]()).return)===null||t===void 0?void 0:t.bind(e),o=yield("next"in e?e:e[Symbol.asyncIterator]()).next.bind(e)();return n==null||n(),o.value})}function nI(e){return X2(this,void 0,void 0,function*(){const t=yield e;return tI(t)?JB(t):eI(t)?KB(t):t})}var XB=new TextDecoder;async function ZB(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;const n=e.headers.get("content-type");if(!n||!~n.indexOf("multipart/mixed"))return e;const r=n.indexOf("boundary="),o=r+9,i=n.indexOf(";",o);return async function*(s,l,c){const f=s.getReader(),d=!c||!c.multiple;let g=l.length,m="",v=!0,b=[];try{let w;e:for(;!(w=await f.read()).done;){const N=XB.decode(w.value),S=N.indexOf(l);let x=m.length;for(m+=N,~S?x+=S:x=m.indexOf(l),b=[];~x;){const C=m.substring(0,x),E=m.substring(x+g);if(v)v=!1,l=`\r
`+l,g+=2;else{const _={},I=C.indexOf(`\r
\r
`)+4,D=String(m.slice(0,I)).trim().split(`\r
`);let A;for(;A=D.shift();)A=A.split(": "),_[A.shift().toLowerCase()]=A.join(": ");const F=C.lastIndexOf(`\r
`,I);let $=C.substring(I,F>-1?void 0:F),q=!1;if(A=_["content-type"],A&&~A.indexOf("application/json"))try{$=JSON.parse($),q=!0}catch{}if(A={headers:_,body:$,json:q},d?yield A:b.push(A),E.substring(0,2)==="--")break e}m=E,x=m.indexOf(l)}b.length&&(yield b)}}finally{b.length&&(yield b),await f.cancel()}}(e.body,`--${~r?n.substring(o,i>-1?i:void 0).replace(/['"]/g,"").trim():"-"}`,t)}var jw=function(e){return this instanceof jw?(this.v=e,this):new jw(e)};function Uw(e){return JSON.stringify(e,null,2)}function eq(e){return Object.assign(Object.assign({},e),{message:e.message,stack:e.stack})}function rI(e){return e instanceof Error?eq(e):e}function op(e){return Array.isArray(e)?Uw({errors:e.map(t=>rI(t))}):Uw({errors:[rI(e)]})}function Bw(e){return Uw(e)}function tq(e,t,n){const r=[];if(!e||!t)return{insertions:r,result:t};let o;try{o=rr(t)}catch{return{insertions:r,result:t}}const i=n||nq,s=new _s(e);return fn(o,{leave(l){s.leave(l)},enter(l){if(s.enter(l),l.kind==="Field"&&!l.selectionSet){const c=s.getType(),f=oI(iq(c),i);if(f&&l.loc){const d=oq(t,l.loc.start);r.push({index:l.loc.end,string:" "+ft(f).replaceAll(`
`,`
`+d)})}}}}),{insertions:r,result:rq(t,r)}}function nq(e){if(!("getFields"in e))return[];const t=e.getFields();if(t.id)return["id"];if(t.edges)return["edges"];if(t.node)return["node"];const n=[];for(const r of Object.keys(t))br(t[r].type)&&n.push(r);return n}function oI(e,t){const n=Et(e);if(!e||br(e))return;const r=t(n);if(!(!Array.isArray(r)||r.length===0||!("getFields"in n)))return{kind:U.SELECTION_SET,selections:r.map(o=>{const i=n.getFields()[o],s=i?i.type:null;return{kind:U.FIELD,name:{kind:U.NAME,value:o},selectionSet:oI(s,t)}})}}function rq(e,t){if(t.length===0)return e;let n="",r=0;for(const{index:o,string:i}of t)n+=e.slice(r,o)+i,r=o;return n+=e.slice(r),n}function oq(e,t){let n=t,r=t;for(;n;){const o=e.charCodeAt(n-1);if(o===10||o===13||o===8232||o===8233)break;n--,o!==9&&o!==11&&o!==12&&o!==32&&o!==160&&(r=n)}return e.slice(n,r)}function iq(e){if(e)return e}function sq(e,t){var n;const r=new Map,o=[];for(const i of e)if(i.kind==="Field"){const s=t(i),l=r.get(s);if(!((n=i.directives)===null||n===void 0)&&n.length){const c=Object.assign({},i);o.push(c)}else if(l!=null&&l.selectionSet&&i.selectionSet)l.selectionSet.selections=[...l.selectionSet.selections,...i.selectionSet.selections];else if(!l){const c=Object.assign({},i);r.set(s,c),o.push(c)}}else o.push(i);return o}function iI(e,t,n){var r;const o=n?Et(n).name:null,i=[],s=[];for(let l of t){if(l.kind==="FragmentSpread"){const c=l.name.value;if(!l.directives||l.directives.length===0){if(s.includes(c))continue;s.push(c)}const f=e[l.name.value];if(f){const{typeCondition:d,directives:g,selectionSet:m}=f;l={kind:U.INLINE_FRAGMENT,typeCondition:d,directives:g,selectionSet:m}}}if(l.kind===U.INLINE_FRAGMENT&&(!l.directives||((r=l.directives)===null||r===void 0?void 0:r.length)===0)){const c=l.typeCondition?l.typeCondition.name.value:null;if(!c||c===o){i.push(...iI(e,l.selectionSet.selections,n));continue}}i.push(l)}return i}function aq(e,t){const n=t?new _s(t):null,r=Object.create(null);for(const l of e.definitions)l.kind===U.FRAGMENT_DEFINITION&&(r[l.name.value]=l);const o={SelectionSet(l){const c=n?n.getParentType():null;let{selections:f}=l;return f=iI(r,f,c),Object.assign(Object.assign({},l),{selections:f})},FragmentDefinition(){return null}},i=fn(e,n?$l(n,o):o);return fn(i,{SelectionSet(l){let{selections:c}=l;return c=sq(c,f=>f.alias?f.alias.value:f.name.value),Object.assign(Object.assign({},l),{selections:c})},FragmentDefinition(){return null}})}function lq(e,t,n){if(!n||n.length<1)return;const r=n.map(o=>{var i;return(i=o.name)===null||i===void 0?void 0:i.value});if(t&&r.includes(t))return t;if(t&&e){const i=e.map(s=>{var l;return(l=s.name)===null||l===void 0?void 0:l.value}).indexOf(t);if(i!==-1&&i<r.length)return r[i]}return r[0]}function cq(e,t){return t instanceof DOMException&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e.length!==0}class qw{constructor(t){t?this.storage=t:t===null?this.storage=null:typeof window>"u"?this.storage=null:this.storage={getItem:window.localStorage.getItem.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),get length(){let n=0;for(const r in window.localStorage)r.indexOf(`${rv}:`)===0&&(n+=1);return n},clear(){for(const n in window.localStorage)n.indexOf(`${rv}:`)===0&&window.localStorage.removeItem(n)}}}get(t){if(!this.storage)return null;const n=`${rv}:${t}`,r=this.storage.getItem(n);return r==="null"||r==="undefined"?(this.storage.removeItem(n),null):r||null}set(t,n){let r=!1,o=null;if(this.storage){const i=`${rv}:${t}`;if(n)try{this.storage.setItem(i,n)}catch(s){o=s instanceof Error?s:new Error(`${s}`),r=cq(this.storage,s)}else this.storage.removeItem(i)}return{isQuotaError:r,error:o}}clear(){this.storage&&this.storage.clear()}}const rv="graphiql";class sI{constructor(t,n,r=null){this.key=t,this.storage=n,this.maxSize=r,this.items=this.fetchAll()}get length(){return this.items.length}contains(t){return this.items.some(n=>n.query===t.query&&n.variables===t.variables&&n.headers===t.headers&&n.operationName===t.operationName)}edit(t,n){if(typeof n=="number"&&this.items[n]){const o=this.items[n];if(o.query===t.query&&o.variables===t.variables&&o.headers===t.headers&&o.operationName===t.operationName){this.items.splice(n,1,t),this.save();return}}const r=this.items.findIndex(o=>o.query===t.query&&o.variables===t.variables&&o.headers===t.headers&&o.operationName===t.operationName);r!==-1&&(this.items.splice(r,1,t),this.save())}delete(t){const n=this.items.findIndex(r=>r.query===t.query&&r.variables===t.variables&&r.headers===t.headers&&r.operationName===t.operationName);n!==-1&&(this.items.splice(n,1),this.save())}fetchRecent(){return this.items.at(-1)}fetchAll(){const t=this.storage.get(this.key);return t?JSON.parse(t)[this.key]:[]}push(t){const n=[...this.items,t];this.maxSize&&n.length>this.maxSize&&n.shift();for(let r=0;r<5;r++){const o=this.storage.set(this.key,JSON.stringify({[this.key]:n}));if(!(o!=null&&o.error))this.items=n;else if(o.isQuotaError&&this.maxSize)n.shift();else return}}save(){this.storage.set(this.key,JSON.stringify({[this.key]:this.items}))}}const uq=1e5;class fq{constructor(t,n){this.storage=t,this.maxHistoryLength=n,this.updateHistory=({query:r,variables:o,headers:i,operationName:s})=>{if(!this.shouldSaveQuery(r,o,i,this.history.fetchRecent()))return;this.history.push({query:r,variables:o,headers:i,operationName:s});const l=this.history.items,c=this.favorite.items;this.queries=l.concat(c)},this.deleteHistory=({query:r,variables:o,headers:i,operationName:s,favorite:l},c=!1)=>{function f(d){const g=d.items.find(m=>m.query===r&&m.variables===o&&m.headers===i&&m.operationName===s);g&&d.delete(g)}(l||c)&&f(this.favorite),(!l||c)&&f(this.history),this.queries=[...this.history.items,...this.favorite.items]},this.history=new sI("queries",this.storage,this.maxHistoryLength),this.favorite=new sI("favorites",this.storage,null),this.queries=[...this.history.fetchAll(),...this.favorite.fetchAll()]}shouldSaveQuery(t,n,r,o){if(!t)return!1;try{rr(t)}catch{return!1}return t.length>uq?!1:o?!(JSON.stringify(t)===JSON.stringify(o.query)&&(JSON.stringify(n)===JSON.stringify(o.variables)&&(JSON.stringify(r)===JSON.stringify(o.headers)||r&&!o.headers)||n&&!o.variables)):!0}toggleFavorite({query:t,variables:n,headers:r,operationName:o,label:i,favorite:s}){const l={query:t,variables:n,headers:r,operationName:o,label:i};s?(l.favorite=!1,this.favorite.delete(l),this.history.push(l)):(l.favorite=!0,this.favorite.push(l),this.history.delete(l)),this.queries=[...this.history.items,...this.favorite.items]}editLabel({query:t,variables:n,headers:r,operationName:o,label:i,favorite:s},l){const c={query:t,variables:n,headers:r,operationName:o,label:i};s?this.favorite.edit(Object.assign(Object.assign({},c),{favorite:s}),l):this.history.edit(c,l),this.queries=[...this.history.items,...this.favorite.items]}}function dq(e){let t;return lI(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function aI(e,t,n){return n===qo.name&&e.getQueryType()===t?qo:n===zo.name&&e.getQueryType()===t?zo:n===wo.name&&Kt(t)?wo:"getFields"in t?t.getFields()[n]:null}function lI(e,t){const n=[];let r=e;for(;r!=null&&r.kind;)n.push(r),r=r.prevState;for(let o=n.length-1;o>=0;o--)t(n[o])}function jl(e){const t=Object.keys(e),n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=e[t[o]];return r}function on(e,t){return pq(t,cI(e.string))}function pq(e,t){if(!t)return zw(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:hq(cI(r.label),t),entry:r}));return zw(zw(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,o)=>(r.entry.isDeprecated?1:0)-(o.entry.isDeprecated?1:0)||r.proximity-o.proximity||r.entry.label.length-o.entry.label.length).map(r=>r.entry)}function zw(e,t){const n=e.filter(t);return n.length===0?e:n}function cI(e){return e.toLowerCase().replaceAll(/\W/g,"")}function hq(e,t){let n=mq(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function mq(e,t){let n,r;const o=[],i=e.length,s=t.length;for(n=0;n<=i;n++)o[n]=[n];for(r=1;r<=s;r++)o[0][r]=r;for(n=1;n<=i;n++)for(r=1;r<=s;r++){const l=e[n-1]===t[r-1]?0:1;o[n][r]=Math.min(o[n-1][r]+1,o[n][r-1]+1,o[n-1][r-1]+l),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(o[n][r]=Math.min(o[n][r],o[n-2][r-2]+l))}return o[i][s]}var uI;(function(e){function t(n){return typeof n=="string"}e.is=t})(uI||(uI={}));var Hw;(function(e){function t(n){return typeof n=="string"}e.is=t})(Hw||(Hw={}));var fI;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(fI||(fI={}));var ov;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(ov||(ov={}));var wi;(function(e){function t(r,o){return r===Number.MAX_VALUE&&(r=ov.MAX_VALUE),o===Number.MAX_VALUE&&(o=ov.MAX_VALUE),{line:r,character:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&ue.uinteger(o.line)&&ue.uinteger(o.character)}e.is=n})(wi||(wi={}));var vn;(function(e){function t(r,o,i,s){if(ue.uinteger(r)&&ue.uinteger(o)&&ue.uinteger(i)&&ue.uinteger(s))return{start:wi.create(r,o),end:wi.create(i,s)};if(wi.is(r)&&wi.is(o))return{start:r,end:o};throw new Error("Range#create called with invalid arguments[".concat(r,", ").concat(o,", ").concat(i,", ").concat(s,"]"))}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&wi.is(o.start)&&wi.is(o.end)}e.is=n})(vn||(vn={}));var iv;(function(e){function t(r,o){return{uri:r,range:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&vn.is(o.range)&&(ue.string(o.uri)||ue.undefined(o.uri))}e.is=n})(iv||(iv={}));var dI;(function(e){function t(r,o,i,s){return{targetUri:r,targetRange:o,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&vn.is(o.targetRange)&&ue.string(o.targetUri)&&vn.is(o.targetSelectionRange)&&(vn.is(o.originSelectionRange)||ue.undefined(o.originSelectionRange))}e.is=n})(dI||(dI={}));var Ww;(function(e){function t(r,o,i,s){return{red:r,green:o,blue:i,alpha:s}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&ue.numberRange(o.red,0,1)&&ue.numberRange(o.green,0,1)&&ue.numberRange(o.blue,0,1)&&ue.numberRange(o.alpha,0,1)}e.is=n})(Ww||(Ww={}));var pI;(function(e){function t(r,o){return{range:r,color:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&vn.is(o.range)&&Ww.is(o.color)}e.is=n})(pI||(pI={}));var hI;(function(e){function t(r,o,i){return{label:r,textEdit:o,additionalTextEdits:i}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&ue.string(o.label)&&(ue.undefined(o.textEdit)||Ds.is(o))&&(ue.undefined(o.additionalTextEdits)||ue.typedArray(o.additionalTextEdits,Ds.is))}e.is=n})(hI||(hI={}));var mI;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(mI||(mI={}));var gI;(function(e){function t(r,o,i,s,l,c){var f={startLine:r,endLine:o};return ue.defined(i)&&(f.startCharacter=i),ue.defined(s)&&(f.endCharacter=s),ue.defined(l)&&(f.kind=l),ue.defined(c)&&(f.collapsedText=c),f}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&ue.uinteger(o.startLine)&&ue.uinteger(o.startLine)&&(ue.undefined(o.startCharacter)||ue.uinteger(o.startCharacter))&&(ue.undefined(o.endCharacter)||ue.uinteger(o.endCharacter))&&(ue.undefined(o.kind)||ue.string(o.kind))}e.is=n})(gI||(gI={}));var Gw;(function(e){function t(r,o){return{location:r,message:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&iv.is(o.location)&&ue.string(o.message)}e.is=n})(Gw||(Gw={}));var vI;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(vI||(vI={}));var yI;(function(e){e.Unnecessary=1,e.Deprecated=2})(yI||(yI={}));var bI;(function(e){function t(n){var r=n;return ue.objectLiteral(r)&&ue.string(r.href)}e.is=t})(bI||(bI={}));var sv;(function(e){function t(r,o,i,s,l,c){var f={range:r,message:o};return ue.defined(i)&&(f.severity=i),ue.defined(s)&&(f.code=s),ue.defined(l)&&(f.source=l),ue.defined(c)&&(f.relatedInformation=c),f}e.create=t;function n(r){var o,i=r;return ue.defined(i)&&vn.is(i.range)&&ue.string(i.message)&&(ue.number(i.severity)||ue.undefined(i.severity))&&(ue.integer(i.code)||ue.string(i.code)||ue.undefined(i.code))&&(ue.undefined(i.codeDescription)||ue.string((o=i.codeDescription)===null||o===void 0?void 0:o.href))&&(ue.string(i.source)||ue.undefined(i.source))&&(ue.undefined(i.relatedInformation)||ue.typedArray(i.relatedInformation,Gw.is))}e.is=n})(sv||(sv={}));var Su;(function(e){function t(r,o){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var l={title:r,command:o};return ue.defined(i)&&i.length>0&&(l.arguments=i),l}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.string(o.title)&&ue.string(o.command)}e.is=n})(Su||(Su={}));var Ds;(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function n(i,s){return{range:{start:i,end:i},newText:s}}e.insert=n;function r(i){return{range:i,newText:""}}e.del=r;function o(i){var s=i;return ue.objectLiteral(s)&&ue.string(s.newText)&&vn.is(s.range)}e.is=o})(Ds||(Ds={}));var Tu;(function(e){function t(r,o,i){var s={label:r};return o!==void 0&&(s.needsConfirmation=o),i!==void 0&&(s.description=i),s}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&ue.string(o.label)&&(ue.boolean(o.needsConfirmation)||o.needsConfirmation===void 0)&&(ue.string(o.description)||o.description===void 0)}e.is=n})(Tu||(Tu={}));var wr;(function(e){function t(n){var r=n;return ue.string(r)}e.is=t})(wr||(wr={}));var Oa;(function(e){function t(i,s,l){return{range:i,newText:s,annotationId:l}}e.replace=t;function n(i,s,l){return{range:{start:i,end:i},newText:s,annotationId:l}}e.insert=n;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function o(i){var s=i;return Ds.is(s)&&(Tu.is(s.annotationId)||wr.is(s.annotationId))}e.is=o})(Oa||(Oa={}));var av;(function(e){function t(r,o){return{textDocument:r,edits:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&cv.is(o.textDocument)&&Array.isArray(o.edits)}e.is=n})(av||(av={}));var ip;(function(e){function t(r,o,i){var s={kind:"create",uri:r};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){var o=r;return o&&o.kind==="create"&&ue.string(o.uri)&&(o.options===void 0||(o.options.overwrite===void 0||ue.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||ue.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||wr.is(o.annotationId))}e.is=n})(ip||(ip={}));var sp;(function(e){function t(r,o,i,s){var l={kind:"rename",oldUri:r,newUri:o};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(l.options=i),s!==void 0&&(l.annotationId=s),l}e.create=t;function n(r){var o=r;return o&&o.kind==="rename"&&ue.string(o.oldUri)&&ue.string(o.newUri)&&(o.options===void 0||(o.options.overwrite===void 0||ue.boolean(o.options.overwrite))&&(o.options.ignoreIfExists===void 0||ue.boolean(o.options.ignoreIfExists)))&&(o.annotationId===void 0||wr.is(o.annotationId))}e.is=n})(sp||(sp={}));var ap;(function(e){function t(r,o,i){var s={kind:"delete",uri:r};return o!==void 0&&(o.recursive!==void 0||o.ignoreIfNotExists!==void 0)&&(s.options=o),i!==void 0&&(s.annotationId=i),s}e.create=t;function n(r){var o=r;return o&&o.kind==="delete"&&ue.string(o.uri)&&(o.options===void 0||(o.options.recursive===void 0||ue.boolean(o.options.recursive))&&(o.options.ignoreIfNotExists===void 0||ue.boolean(o.options.ignoreIfNotExists)))&&(o.annotationId===void 0||wr.is(o.annotationId))}e.is=n})(ap||(ap={}));var Yw;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(o){return ue.string(o.kind)?ip.is(o)||sp.is(o)||ap.is(o):av.is(o)}))}e.is=t})(Yw||(Yw={}));var lv=function(){function e(t,n){this.edits=t,this.changeAnnotations=n}return e.prototype.insert=function(t,n,r){var o,i;if(r===void 0?o=Ds.insert(t,n):wr.is(r)?(i=r,o=Oa.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Oa.insert(t,n,i)),this.edits.push(o),i!==void 0)return i},e.prototype.replace=function(t,n,r){var o,i;if(r===void 0?o=Ds.replace(t,n):wr.is(r)?(i=r,o=Oa.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),o=Oa.replace(t,n,i)),this.edits.push(o),i!==void 0)return i},e.prototype.delete=function(t,n){var r,o;if(n===void 0?r=Ds.del(t):wr.is(n)?(o=n,r=Oa.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=Oa.del(t,o)),this.edits.push(r),o!==void 0)return o},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),EI=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,n){var r;if(wr.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error("Id ".concat(r," is already in use."));if(n===void 0)throw new Error("No annotation provided for id ".concat(r));return this._annotations[r]=n,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new EI(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(av.is(r)){var o=new lv(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=o}})):t.changes&&Object.keys(t.changes).forEach(function(r){var o=new lv(t.changes[r]);n._textEditChanges[r]=o})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(cv.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){var o=[],i={textDocument:n,edits:o};this._workspaceEdit.documentChanges.push(i),r=new lv(o,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var o=[];this._workspaceEdit.changes[t]=o,r=new lv(o),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new EI,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Tu.is(n)||wr.is(n)?o=n:r=n;var i,s;if(o===void 0?i=ip.create(t,r):(s=wr.is(o)?o:this._changeAnnotations.manage(o),i=ip.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s},e.prototype.renameFile=function(t,n,r,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Tu.is(r)||wr.is(r)?i=r:o=r;var s,l;if(i===void 0?s=sp.create(t,n,o):(l=wr.is(i)?i:this._changeAnnotations.manage(i),s=sp.create(t,n,o,l)),this._workspaceEdit.documentChanges.push(s),l!==void 0)return l},e.prototype.deleteFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;Tu.is(n)||wr.is(n)?o=n:r=n;var i,s;if(o===void 0?i=ap.create(t,r):(s=wr.is(o)?o:this._changeAnnotations.manage(o),i=ap.create(t,r,s)),this._workspaceEdit.documentChanges.push(i),s!==void 0)return s},e})();var wI;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.string(o.uri)}e.is=n})(wI||(wI={}));var xI;(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.string(o.uri)&&ue.integer(o.version)}e.is=n})(xI||(xI={}));var cv;(function(e){function t(r,o){return{uri:r,version:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.string(o.uri)&&(o.version===null||ue.integer(o.version))}e.is=n})(cv||(cv={}));var SI;(function(e){function t(r,o,i,s){return{uri:r,languageId:o,version:i,text:s}}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.string(o.uri)&&ue.string(o.languageId)&&ue.integer(o.version)&&ue.string(o.text)}e.is=n})(SI||(SI={}));var Qw;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(Qw||(Qw={}));var lp;(function(e){function t(n){var r=n;return ue.objectLiteral(n)&&Qw.is(r.kind)&&ue.string(r.value)}e.is=t})(lp||(lp={}));var TI;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(TI||(TI={}));var Kw;(function(e){e.PlainText=1,e.Snippet=2})(Kw||(Kw={}));var CI;(function(e){e.Deprecated=1})(CI||(CI={}));var kI;(function(e){function t(r,o,i){return{newText:r,insert:o,replace:i}}e.create=t;function n(r){var o=r;return o&&ue.string(o.newText)&&vn.is(o.insert)&&vn.is(o.replace)}e.is=n})(kI||(kI={}));var NI;(function(e){e.asIs=1,e.adjustIndentation=2})(NI||(NI={}));var _I;(function(e){function t(n){var r=n;return r&&(ue.string(r.detail)||r.detail===void 0)&&(ue.string(r.description)||r.description===void 0)}e.is=t})(_I||(_I={}));var OI;(function(e){function t(n){return{label:n}}e.create=t})(OI||(OI={}));var AI;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(AI||(AI={}));var uv;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var o=r;return ue.string(o)||ue.objectLiteral(o)&&ue.string(o.language)&&ue.string(o.value)}e.is=n})(uv||(uv={}));var DI;(function(e){function t(n){var r=n;return!!r&&ue.objectLiteral(r)&&(lp.is(r.contents)||uv.is(r.contents)||ue.typedArray(r.contents,uv.is))&&(n.range===void 0||vn.is(n.range))}e.is=t})(DI||(DI={}));var II;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(II||(II={}));var LI;(function(e){function t(n,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];var s={label:n};return ue.defined(r)&&(s.documentation=r),ue.defined(o)?s.parameters=o:s.parameters=[],s}e.create=t})(LI||(LI={}));var RI;(function(e){e.Text=1,e.Read=2,e.Write=3})(RI||(RI={}));var FI;(function(e){function t(n,r){var o={range:n};return ue.number(r)&&(o.kind=r),o}e.create=t})(FI||(FI={}));var MI;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(MI||(MI={}));var PI;(function(e){e.Deprecated=1})(PI||(PI={}));var $I;(function(e){function t(n,r,o,i,s){var l={name:n,kind:r,location:{uri:i,range:o}};return s&&(l.containerName=s),l}e.create=t})($I||($I={}));var VI;(function(e){function t(n,r,o,i){return i!==void 0?{name:n,kind:r,location:{uri:o,range:i}}:{name:n,kind:r,location:{uri:o}}}e.create=t})(VI||(VI={}));var jI;(function(e){function t(r,o,i,s,l,c){var f={name:r,detail:o,kind:i,range:s,selectionRange:l};return c!==void 0&&(f.children=c),f}e.create=t;function n(r){var o=r;return o&&ue.string(o.name)&&ue.number(o.kind)&&vn.is(o.range)&&vn.is(o.selectionRange)&&(o.detail===void 0||ue.string(o.detail))&&(o.deprecated===void 0||ue.boolean(o.deprecated))&&(o.children===void 0||Array.isArray(o.children))&&(o.tags===void 0||Array.isArray(o.tags))}e.is=n})(jI||(jI={}));var UI;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(UI||(UI={}));var fv;(function(e){e.Invoked=1,e.Automatic=2})(fv||(fv={}));var BI;(function(e){function t(r,o,i){var s={diagnostics:r};return o!=null&&(s.only=o),i!=null&&(s.triggerKind=i),s}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.typedArray(o.diagnostics,sv.is)&&(o.only===void 0||ue.typedArray(o.only,ue.string))&&(o.triggerKind===void 0||o.triggerKind===fv.Invoked||o.triggerKind===fv.Automatic)}e.is=n})(BI||(BI={}));var qI;(function(e){function t(r,o,i){var s={title:r},l=!0;return typeof o=="string"?(l=!1,s.kind=o):Su.is(o)?s.command=o:s.edit=o,l&&i!==void 0&&(s.kind=i),s}e.create=t;function n(r){var o=r;return o&&ue.string(o.title)&&(o.diagnostics===void 0||ue.typedArray(o.diagnostics,sv.is))&&(o.kind===void 0||ue.string(o.kind))&&(o.edit!==void 0||o.command!==void 0)&&(o.command===void 0||Su.is(o.command))&&(o.isPreferred===void 0||ue.boolean(o.isPreferred))&&(o.edit===void 0||Yw.is(o.edit))}e.is=n})(qI||(qI={}));var zI;(function(e){function t(r,o){var i={range:r};return ue.defined(o)&&(i.data=o),i}e.create=t;function n(r){var o=r;return ue.defined(o)&&vn.is(o.range)&&(ue.undefined(o.command)||Su.is(o.command))}e.is=n})(zI||(zI={}));var HI;(function(e){function t(r,o){return{tabSize:r,insertSpaces:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&ue.uinteger(o.tabSize)&&ue.boolean(o.insertSpaces)}e.is=n})(HI||(HI={}));var WI;(function(e){function t(r,o,i){return{range:r,target:o,data:i}}e.create=t;function n(r){var o=r;return ue.defined(o)&&vn.is(o.range)&&(ue.undefined(o.target)||ue.string(o.target))}e.is=n})(WI||(WI={}));var GI;(function(e){function t(r,o){return{range:r,parent:o}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&vn.is(o.range)&&(o.parent===void 0||e.is(o.parent))}e.is=n})(GI||(GI={}));var YI;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(YI||(YI={}));var QI;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(QI||(QI={}));var KI;(function(e){function t(n){var r=n;return ue.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(KI||(KI={}));var JI;(function(e){function t(r,o){return{range:r,text:o}}e.create=t;function n(r){var o=r;return o!=null&&vn.is(o.range)&&ue.string(o.text)}e.is=n})(JI||(JI={}));var XI;(function(e){function t(r,o,i){return{range:r,variableName:o,caseSensitiveLookup:i}}e.create=t;function n(r){var o=r;return o!=null&&vn.is(o.range)&&ue.boolean(o.caseSensitiveLookup)&&(ue.string(o.variableName)||o.variableName===void 0)}e.is=n})(XI||(XI={}));var ZI;(function(e){function t(r,o){return{range:r,expression:o}}e.create=t;function n(r){var o=r;return o!=null&&vn.is(o.range)&&(ue.string(o.expression)||o.expression===void 0)}e.is=n})(ZI||(ZI={}));var eL;(function(e){function t(r,o){return{frameId:r,stoppedLocation:o}}e.create=t;function n(r){var o=r;return ue.defined(o)&&vn.is(r.stoppedLocation)}e.is=n})(eL||(eL={}));var Jw;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(Jw||(Jw={}));var Xw;(function(e){function t(r){return{value:r}}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&(o.tooltip===void 0||ue.string(o.tooltip)||lp.is(o.tooltip))&&(o.location===void 0||iv.is(o.location))&&(o.command===void 0||Su.is(o.command))}e.is=n})(Xw||(Xw={}));var tL;(function(e){function t(r,o,i){var s={position:r,label:o};return i!==void 0&&(s.kind=i),s}e.create=t;function n(r){var o=r;return ue.objectLiteral(o)&&wi.is(o.position)&&(ue.string(o.label)||ue.typedArray(o.label,Xw.is))&&(o.kind===void 0||Jw.is(o.kind))&&o.textEdits===void 0||ue.typedArray(o.textEdits,Ds.is)&&(o.tooltip===void 0||ue.string(o.tooltip)||lp.is(o.tooltip))&&(o.paddingLeft===void 0||ue.boolean(o.paddingLeft))&&(o.paddingRight===void 0||ue.boolean(o.paddingRight))}e.is=n})(tL||(tL={}));var nL;(function(e){function t(n){var r=n;return ue.objectLiteral(r)&&Hw.is(r.uri)&&ue.string(r.name)}e.is=t})(nL||(nL={}));var rL;(function(e){function t(i,s,l,c){return new gq(i,s,l,c)}e.create=t;function n(i){var s=i;return!!(ue.defined(s)&&ue.string(s.uri)&&(ue.undefined(s.languageId)||ue.string(s.languageId))&&ue.uinteger(s.lineCount)&&ue.func(s.getText)&&ue.func(s.positionAt)&&ue.func(s.offsetAt))}e.is=n;function r(i,s){for(var l=i.getText(),c=o(s,function(b,w){var N=b.range.start.line-w.range.start.line;return N===0?b.range.start.character-w.range.start.character:N}),f=l.length,d=c.length-1;d>=0;d--){var g=c[d],m=i.offsetAt(g.range.start),v=i.offsetAt(g.range.end);if(v<=f)l=l.substring(0,m)+g.newText+l.substring(v,l.length);else throw new Error("Overlapping edit");f=m}return l}e.applyEdits=r;function o(i,s){if(i.length<=1)return i;var l=i.length/2|0,c=i.slice(0,l),f=i.slice(l);o(c,s),o(f,s);for(var d=0,g=0,m=0;d<c.length&&g<f.length;){var v=s(c[d],f[g]);v<=0?i[m++]=c[d++]:i[m++]=f[g++]}for(;d<c.length;)i[m++]=c[d++];for(;g<f.length;)i[m++]=f[g++];return i}})(rL||(rL={}));var gq=function(){function e(t,n,r,o){this._uri=t,this._languageId=n,this._version=r,this._content=o,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content},e.prototype.update=function(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],n=this._content,r=!0,o=0;o<n.length;o++){r&&(t.push(o),r=!1);var i=n.charAt(o);r=i==="\r"||i===`
`,i==="\r"&&o+1<n.length&&n.charAt(o+1)===`
`&&o++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,o=n.length;if(o===0)return wi.create(0,t);for(;r<o;){var i=Math.floor((r+o)/2);n[i]>t?o=i:r=i+1}var s=r-1;return wi.create(s,t-n[s])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],o=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,o),r)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),ue;(function(e){var t=Object.prototype.toString;function n(v){return typeof v<"u"}e.defined=n;function r(v){return typeof v>"u"}e.undefined=r;function o(v){return v===!0||v===!1}e.boolean=o;function i(v){return t.call(v)==="[object String]"}e.string=i;function s(v){return t.call(v)==="[object Number]"}e.number=s;function l(v,b,w){return t.call(v)==="[object Number]"&&b<=v&&v<=w}e.numberRange=l;function c(v){return t.call(v)==="[object Number]"&&-2147483648<=v&&v<=2147483647}e.integer=c;function f(v){return t.call(v)==="[object Number]"&&0<=v&&v<=2147483647}e.uinteger=f;function d(v){return t.call(v)==="[object Function]"}e.func=d;function g(v){return v!==null&&typeof v=="object"}e.objectLiteral=g;function m(v,b){return Array.isArray(v)&&v.every(b)}e.typedArray=m})(ue||(ue={}));var st;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(st||(st={}));class Zw{constructor(t){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{const n=this._sourceText.charAt(this._pos);return this._pos++,n},this.eat=n=>{if(this._testNextCharacter(n))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=n=>{let r=this._testNextCharacter(n),o=!1;for(r&&(o=r,this._start=this._pos);r;)this._pos++,r=this._testNextCharacter(n),o=!0;return o},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=n=>{this._pos=n},this.match=(n,r=!0,o=!1)=>{let i=null,s=null;return typeof n=="string"?(s=new RegExp(n,o?"i":"g").test(this._sourceText.slice(this._pos,this._pos+n.length)),i=n):n instanceof RegExp&&(s=this._sourceText.slice(this._pos).match(n),i=s==null?void 0:s[0]),s!=null&&(typeof n=="string"||s instanceof Array&&this._sourceText.startsWith(s[0],this._pos))?(r&&(this._start=this._pos,i&&i.length&&(this._pos+=i.length)),s):!1},this.backUp=n=>{this._pos-=n},this.column=()=>this._pos,this.indentation=()=>{const n=this._sourceText.match(/\s*/);let r=0;if(n&&n.length!==0){const o=n[0];let i=0;for(;o.length>i;)o.charCodeAt(i)===9?r+=2:r++,i++}return r},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=t}_testNextCharacter(t){const n=this._sourceText.charAt(this._pos);let r=!1;return typeof t=="string"?r=n===t:r=t instanceof RegExp?t.test(n):t(n),r}}function Jt(e){return{ofRule:e}}function ct(e,t){return{ofRule:e,isList:!0,separator:t}}function vq(e,t){const n=e.match;return e.match=r=>{let o=!1;return n&&(o=n(r)),o&&t.every(i=>i.match&&!i.match(r))},e}function xo(e,t){return{style:t,match:n=>n.kind===e}}function Ve(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}const oL=e=>e===" "||e===" "||e===","||e===`
`||e==="\r"||e==="\uFEFF"||e===" ",iL={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},sL={Document:[ct("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return U.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[sr("query"),Jt(Mt("def")),Jt("VariableDefinitions"),ct("Directive"),"SelectionSet"],Mutation:[sr("mutation"),Jt(Mt("def")),Jt("VariableDefinitions"),ct("Directive"),"SelectionSet"],Subscription:[sr("subscription"),Jt(Mt("def")),Jt("VariableDefinitions"),ct("Directive"),"SelectionSet"],VariableDefinitions:[Ve("("),ct("VariableDefinition"),Ve(")")],VariableDefinition:["Variable",Ve(":"),"Type",Jt("DefaultValue")],Variable:[Ve("$","variable"),Mt("variable")],DefaultValue:[Ve("="),"Value"],SelectionSet:[Ve("{"),ct("Selection"),Ve("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Mt("property"),Ve(":"),Mt("qualifier"),Jt("Arguments"),ct("Directive"),Jt("SelectionSet")],Field:[Mt("property"),Jt("Arguments"),ct("Directive"),Jt("SelectionSet")],Arguments:[Ve("("),ct("Argument"),Ve(")")],Argument:[Mt("attribute"),Ve(":"),"Value"],FragmentSpread:[Ve("..."),Mt("def"),ct("Directive")],InlineFragment:[Ve("..."),Jt("TypeCondition"),ct("Directive"),"SelectionSet"],FragmentDefinition:[sr("fragment"),Jt(vq(Mt("def"),[sr("on")])),"TypeCondition",ct("Directive"),"SelectionSet"],TypeCondition:[sr("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[xo("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[xo("Name","builtin")],NullValue:[xo("Name","keyword")],EnumValue:[Mt("string-2")],ListValue:[Ve("["),ct("Value"),Ve("]")],ObjectValue:[Ve("{"),ct("ObjectField"),Ve("}")],ObjectField:[Mt("attribute"),Ve(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[Ve("["),"Type",Ve("]"),Jt(Ve("!"))],NonNullType:["NamedType",Jt(Ve("!"))],NamedType:[yq("atom")],Directive:[Ve("@","meta"),Mt("meta"),Jt("Arguments")],DirectiveDef:[sr("directive"),Ve("@","meta"),Mt("meta"),Jt("ArgumentsDef"),sr("on"),ct("DirectiveLocation",Ve("|"))],InterfaceDef:[sr("interface"),Mt("atom"),Jt("Implements"),ct("Directive"),Ve("{"),ct("FieldDef"),Ve("}")],Implements:[sr("implements"),ct("NamedType",Ve("&"))],DirectiveLocation:[Mt("string-2")],SchemaDef:[sr("schema"),ct("Directive"),Ve("{"),ct("OperationTypeDef"),Ve("}")],OperationTypeDef:[Mt("keyword"),Ve(":"),Mt("atom")],ScalarDef:[sr("scalar"),Mt("atom"),ct("Directive")],ObjectTypeDef:[sr("type"),Mt("atom"),Jt("Implements"),ct("Directive"),Ve("{"),ct("FieldDef"),Ve("}")],FieldDef:[Mt("property"),Jt("ArgumentsDef"),Ve(":"),"Type",ct("Directive")],ArgumentsDef:[Ve("("),ct("InputValueDef"),Ve(")")],InputValueDef:[Mt("attribute"),Ve(":"),"Type",Jt("DefaultValue"),ct("Directive")],UnionDef:[sr("union"),Mt("atom"),ct("Directive"),Ve("="),ct("UnionMember",Ve("|"))],UnionMember:["NamedType"],EnumDef:[sr("enum"),Mt("atom"),ct("Directive"),Ve("{"),ct("EnumValueDef"),Ve("}")],EnumValueDef:[Mt("string-2"),ct("Directive")],InputDef:[sr("input"),Mt("atom"),ct("Directive"),Ve("{"),ct("InputValueDef"),Ve("}")],ExtendDef:[sr("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return U.SCHEMA_EXTENSION;case"scalar":return U.SCALAR_TYPE_EXTENSION;case"type":return U.OBJECT_TYPE_EXTENSION;case"interface":return U.INTERFACE_TYPE_EXTENSION;case"union":return U.UNION_TYPE_EXTENSION;case"enum":return U.ENUM_TYPE_EXTENSION;case"input":return U.INPUT_OBJECT_TYPE_EXTENSION}},[U.SCHEMA_EXTENSION]:["SchemaDef"],[U.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[U.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[U.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[U.UNION_TYPE_EXTENSION]:["UnionDef"],[U.ENUM_TYPE_EXTENSION]:["EnumDef"],[U.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function sr(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function Mt(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function yq(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function cp(e={eatWhitespace:t=>t.eatWhile(oL),lexRules:iL,parseRules:sL,editorConfig:{}}){return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return up(e.parseRules,t,U.DOCUMENT),t},token(t,n){return bq(t,n,e)}}}function bq(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:o,parseRules:i,eatWhitespace:s,editorConfig:l}=n;if(t.rule&&t.rule.length===0?tx(t):t.needsAdvance&&(t.needsAdvance=!1,nx(t,!0)),e.sol()){const d=(l==null?void 0:l.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/d)}if(s(e))return"ws";const c=wq(o,e);if(!c)return e.match(/\S+/)||e.match(/\s/),up(ex,t,"Invalid"),"invalidchar";if(c.kind==="Comment")return up(ex,t,"Comment"),"comment";const f=aL({},t);if(c.kind==="Punctuation"){if(/^[{([]/.test(c.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(c.value)){const d=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&d.length>0&&d.at(-1)<t.indentLevel&&(t.indentLevel=d.at(-1))}}for(;t.rule;){let d=typeof t.rule=="function"?t.step===0?t.rule(c,e):null:t.rule[t.step];if(t.needsSeparator&&(d=d==null?void 0:d.separator),d){if(d.ofRule&&(d=d.ofRule),typeof d=="string"){up(i,t,d);continue}if(!((r=d.match)===null||r===void 0)&&r.call(d,c))return d.update&&d.update(t,c),c.kind==="Punctuation"?nx(t,!0):t.needsAdvance=!0,d.style}Eq(t)}return aL(t,f),up(ex,t,"Invalid"),"invalidchar"}function aL(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}const ex={Invalid:[],Comment:[]};function up(e,t,n){if(!e[n])throw new TypeError("Unknown rule: "+n);t.prevState=Object.assign({},t),t.kind=n,t.name=null,t.type=null,t.rule=e[n],t.step=0,t.needsSeparator=!1}function tx(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}function nx(e,t){var n;if(lL(e)&&e.rule){const r=e.rule[e.step];if(r.separator){const{separator:o}=r;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&o.ofRule)return}if(t)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)tx(e),e.rule&&(lL(e)?!((n=e.rule)===null||n===void 0)&&n[e.step].separator&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function lL(e){const t=Array.isArray(e.rule)&&typeof e.rule[e.step]!="string"&&e.rule[e.step];return t&&t.isList}function Eq(e){for(;e.rule&&!(Array.isArray(e.rule)&&e.rule[e.step].ofRule);)tx(e);e.rule&&nx(e,!1)}function wq(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=t.match(e[n[r]]);if(o&&o instanceof Array)return{kind:n[r],value:o[0]}}}const xq={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type"},_e=Object.assign(Object.assign({},U),xq),cL={command:"editor.action.triggerSuggest",title:"Suggestions"},Sq=e=>{const t=[];if(e)try{fn(rr(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t},Tq=[U.SCHEMA_DEFINITION,U.OPERATION_TYPE_DEFINITION,U.SCALAR_TYPE_DEFINITION,U.OBJECT_TYPE_DEFINITION,U.INTERFACE_TYPE_DEFINITION,U.UNION_TYPE_DEFINITION,U.ENUM_TYPE_DEFINITION,U.INPUT_OBJECT_TYPE_DEFINITION,U.DIRECTIVE_DEFINITION,U.SCHEMA_EXTENSION,U.SCALAR_TYPE_EXTENSION,U.OBJECT_TYPE_EXTENSION,U.INTERFACE_TYPE_EXTENSION,U.UNION_TYPE_EXTENSION,U.ENUM_TYPE_EXTENSION,U.INPUT_OBJECT_TYPE_EXTENSION],Cq=e=>{let t=!1;if(e)try{fn(rr(e),{enter(n){if(n.kind!=="Document")return Tq.includes(n.kind)?(t=!0,Ll):!1}})}catch{return t}return t};function kq(e,t,n,r,o,i){var s;const l=Object.assign(Object.assign({},i),{schema:e}),c=r||jq(t,n,1),f=c.state.kind==="Invalid"?c.state.prevState:c.state,d=(i==null?void 0:i.mode)||qq(t,i==null?void 0:i.uri);if(!f)return[];const{kind:g,step:m,prevState:v}=f,b=Bq(e,c.state);if(g===_e.DOCUMENT)return d===Ul.TYPE_SYSTEM?_q(c):Oq(c);if(g===_e.EXTEND_DEF)return Aq(c);if(((s=v==null?void 0:v.prevState)===null||s===void 0?void 0:s.kind)===_e.EXTENSION_DEFINITION&&f.name)return on(c,[]);if((v==null?void 0:v.kind)===U.SCALAR_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(or).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.OBJECT_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(N=>Qe(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.INTERFACE_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(Xe).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.UNION_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(Qt).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.ENUM_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(N=>Lt(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:st.Function})));if((v==null?void 0:v.kind)===U.INPUT_OBJECT_TYPE_EXTENSION)return on(c,Object.values(e.getTypeMap()).filter(gt).map(N=>({label:N.name,kind:st.Function})));if(g===_e.IMPLEMENTS||g===_e.NAMED_TYPE&&(v==null?void 0:v.kind)===_e.IMPLEMENTS)return Lq(c,f,e,t,b);if(g===_e.SELECTION_SET||g===_e.FIELD||g===_e.ALIASED_FIELD)return Dq(c,b,l);if(g===_e.ARGUMENTS||g===_e.ARGUMENT&&m===0){const{argDefs:N}=b;if(N)return on(c,N.map(S=>{var x;return{label:S.name,insertText:S.name+": ",command:cL,detail:String(S.type),documentation:(x=S.description)!==null&&x!==void 0?x:void 0,kind:st.Variable,type:S.type}}))}if((g===_e.OBJECT_VALUE||g===_e.OBJECT_FIELD&&m===0)&&b.objectFieldDefs){const N=jl(b.objectFieldDefs),S=g===_e.OBJECT_VALUE?st.Value:st.Field;return on(c,N.map(x=>{var C;return{label:x.name,detail:String(x.type),documentation:(C=x.description)!==null&&C!==void 0?C:void 0,kind:S,type:x.type}}))}if(g===_e.ENUM_VALUE||g===_e.LIST_VALUE&&m===1||g===_e.OBJECT_FIELD&&m===2||g===_e.ARGUMENT&&m===2)return Iq(c,b,t,e);if(g===_e.VARIABLE&&m===1){const N=Et(b.inputType),S=uL(t,e,c);return on(c,S.filter(x=>x.detail===(N==null?void 0:N.name)))}if(g===_e.TYPE_CONDITION&&m===1||g===_e.NAMED_TYPE&&v!=null&&v.kind===_e.TYPE_CONDITION)return Rq(c,b,e);if(g===_e.FRAGMENT_SPREAD&&m===1)return Fq(c,b,e,t,Array.isArray(o)?o:Sq(o));const w=fL(f);if(d===Ul.TYPE_SYSTEM&&!w.needsAdvance&&g===_e.NAMED_TYPE||g===_e.LIST_TYPE){if(w.kind===_e.FIELD_DEF)return on(c,Object.values(e.getTypeMap()).filter(N=>Cs(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:st.Function})));if(w.kind===_e.INPUT_VALUE_DEF)return on(c,Object.values(e.getTypeMap()).filter(N=>ir(N)&&!N.name.startsWith("__")).map(N=>({label:N.name,kind:st.Function})))}return g===_e.VARIABLE_DEFINITION&&m===2||g===_e.LIST_TYPE&&m===1||g===_e.NAMED_TYPE&&v&&(v.kind===_e.VARIABLE_DEFINITION||v.kind===_e.LIST_TYPE||v.kind===_e.NON_NULL_TYPE)?$q(c,e):g===_e.DIRECTIVE?Vq(c,f,e):[]}const dv=` {
$1
}`,Nq=e=>{const{type:t}=e;return Kt(t)||vt(t)&&Kt(t.ofType)||He(t)&&(Kt(t.ofType)||vt(t.ofType)&&Kt(t.ofType.ofType))?dv:null};function _q(e){return on(e,[{label:"extend",kind:st.Function},{label:"type",kind:st.Function},{label:"interface",kind:st.Function},{label:"union",kind:st.Function},{label:"input",kind:st.Function},{label:"scalar",kind:st.Function},{label:"schema",kind:st.Function}])}function Oq(e){return on(e,[{label:"query",kind:st.Function},{label:"mutation",kind:st.Function},{label:"subscription",kind:st.Function},{label:"fragment",kind:st.Function},{label:"{",kind:st.Constructor}])}function Aq(e){return on(e,[{label:"type",kind:st.Function},{label:"interface",kind:st.Function},{label:"union",kind:st.Function},{label:"input",kind:st.Function},{label:"scalar",kind:st.Function},{label:"schema",kind:st.Function}])}function Dq(e,t,n){var r;if(t.parentType){const{parentType:o}=t;let i=[];return"getFields"in o&&(i=jl(o.getFields())),Kt(o)&&i.push(wo),o===((r=n==null?void 0:n.schema)===null||r===void 0?void 0:r.getQueryType())&&i.push(qo,zo),on(e,i.map((s,l)=>{var c;const f={sortText:String(l)+s.name,label:s.name,detail:String(s.type),documentation:(c=s.description)!==null&&c!==void 0?c:void 0,deprecated:!!s.deprecationReason,isDeprecated:!!s.deprecationReason,deprecationReason:s.deprecationReason,kind:st.Field,type:s.type};if(n!=null&&n.fillLeafsOnComplete){const d=Nq(s);d&&(f.insertText=s.name+d,f.insertTextFormat=Kw.Snippet,f.command=cL)}return f}))}return[]}function Iq(e,t,n,r){const o=Et(t.inputType),i=uL(n,r,e).filter(s=>s.detail===o.name);if(o instanceof Er){const s=o.getValues();return on(e,s.map(l=>{var c;return{label:l.name,detail:String(o),documentation:(c=l.description)!==null&&c!==void 0?c:void 0,deprecated:!!l.deprecationReason,isDeprecated:!!l.deprecationReason,deprecationReason:l.deprecationReason,kind:st.EnumMember,type:o}}).concat(i))}return o===qt?on(e,i.concat([{label:"true",detail:String(qt),documentation:"Not false.",kind:st.Variable,type:qt},{label:"false",detail:String(qt),documentation:"Not true.",kind:st.Variable,type:qt}])):i}function Lq(e,t,n,r,o){if(t.needsSeparator)return[];const i=n.getTypeMap(),s=jl(i).filter(Xe),l=s.map(({name:v})=>v),c=new Set;pv(r,(v,b)=>{var w,N,S,x,C;if(b.name&&(b.kind===_e.INTERFACE_DEF&&!l.includes(b.name)&&c.add(b.name),b.kind===_e.NAMED_TYPE&&((w=b.prevState)===null||w===void 0?void 0:w.kind)===_e.IMPLEMENTS)){if(o.interfaceDef){if((N=o.interfaceDef)===null||N===void 0?void 0:N.getInterfaces().find(({name:D})=>D===b.name))return;const _=n.getType(b.name),I=(S=o.interfaceDef)===null||S===void 0?void 0:S.toConfig();o.interfaceDef=new Pr(Object.assign(Object.assign({},I),{interfaces:[...I.interfaces,_||new Pr({name:b.name,fields:{}})]}))}else if(o.objectTypeDef){if((x=o.objectTypeDef)===null||x===void 0?void 0:x.getInterfaces().find(({name:D})=>D===b.name))return;const _=n.getType(b.name),I=(C=o.objectTypeDef)===null||C===void 0?void 0:C.toConfig();o.objectTypeDef=new $n(Object.assign(Object.assign({},I),{interfaces:[...I.interfaces,_||new Pr({name:b.name,fields:{}})]}))}}});const f=o.interfaceDef||o.objectTypeDef,g=((f==null?void 0:f.getInterfaces())||[]).map(({name:v})=>v),m=s.concat([...c].map(v=>({name:v}))).filter(({name:v})=>v!==(f==null?void 0:f.name)&&!g.includes(v));return on(e,m.map(v=>{const b={label:v.name,kind:st.Interface,type:v};return v!=null&&v.description&&(b.documentation=v.description),b}))}function Rq(e,t,n,r){let o;if(t.parentType)if(Pn(t.parentType)){const i=_D(t.parentType),s=n.getPossibleTypes(i),l=Object.create(null);for(const c of s)for(const f of c.getInterfaces())l[f.name]=f;o=s.concat(jl(l))}else o=[t.parentType];else{const i=n.getTypeMap();o=jl(i).filter(s=>Kt(s)&&!s.name.startsWith("__"))}return on(e,o.map(i=>{const s=Et(i);return{label:String(i),documentation:(s==null?void 0:s.description)||"",kind:st.Field}}))}function Fq(e,t,n,r,o){if(!r)return[];const i=n.getTypeMap(),s=dq(e.state),l=Pq(r);o&&o.length>0&&l.push(...o);const c=l.filter(f=>i[f.typeCondition.name.value]&&!(s&&s.kind===_e.FRAGMENT_DEFINITION&&s.name===f.name.value)&&Kt(t.parentType)&&Kt(i[f.typeCondition.name.value])&&qd(n,t.parentType,i[f.typeCondition.name.value]));return on(e,c.map(f=>({label:f.name.value,detail:String(i[f.typeCondition.name.value]),documentation:`fragment ${f.name.value} on ${f.typeCondition.name.value}`,kind:st.Field,type:i[f.typeCondition.name.value]})))}const Mq=(e,t)=>{var n,r,o,i,s,l,c,f,d,g;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((o=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||o===void 0?void 0:o.kind)===t)return e.prevState.prevState;if(((l=(s=(i=e.prevState)===null||i===void 0?void 0:i.prevState)===null||s===void 0?void 0:s.prevState)===null||l===void 0?void 0:l.kind)===t)return e.prevState.prevState.prevState;if(((g=(d=(f=(c=e.prevState)===null||c===void 0?void 0:c.prevState)===null||f===void 0?void 0:f.prevState)===null||d===void 0?void 0:d.prevState)===null||g===void 0?void 0:g.kind)===t)return e.prevState.prevState.prevState.prevState};function uL(e,t,n){let r=null,o;const i=Object.create({});return pv(e,(s,l)=>{if((l==null?void 0:l.kind)===_e.VARIABLE&&l.name&&(r=l.name),(l==null?void 0:l.kind)===_e.NAMED_TYPE&&r){const c=Mq(l,_e.TYPE);c!=null&&c.type&&(o=t.getType(c==null?void 0:c.type))}r&&o&&!i[r]&&(i[r]={detail:o.toString(),insertText:n.string==="$"?r:"$"+r,label:r,type:o,kind:st.Variable},r=null,o=null)}),jl(i)}function Pq(e){const t=[];return pv(e,(n,r)=>{r.kind===_e.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:_e.FRAGMENT_DEFINITION,name:{kind:U.NAME,value:r.name},selectionSet:{kind:_e.SELECTION_SET,selections:[]},typeCondition:{kind:_e.NAMED_TYPE,name:{kind:U.NAME,value:r.type}}})}),t}function $q(e,t,n){const r=t.getTypeMap(),o=jl(r).filter(ir);return on(e,o.map(i=>({label:i.name,documentation:i.description,kind:st.Variable})))}function Vq(e,t,n,r){var o;if(!((o=t.prevState)===null||o===void 0)&&o.kind){const i=n.getDirectives().filter(s=>Uq(t.prevState,s));return on(e,i.map(s=>({label:s.name,documentation:s.description||"",kind:st.Function})))}return[]}function jq(e,t,n=0){let r=null,o=null,i=null;const s=pv(e,(l,c,f,d)=>{if(!(d!==t.line||l.getCurrentPosition()+n<t.character+1))return r=f,o=Object.assign({},c),i=l.current(),"BREAK"});return{start:s.start,end:s.end,string:i||s.string,state:o||s.state,style:r||s.style}}function pv(e,t){const n=e.split(`
`),r=cp();let o=r.startState(),i="",s=new Zw("");for(let l=0;l<n.length;l++){for(s=new Zw(n[l]);!s.eol()&&(i=r.token(s,o),t(s,o,i,l)!=="BREAK"););t(s,o,i,l),o.kind||(o=r.startState())}return{start:s.getStartOfToken(),end:s.getCurrentPosition(),string:s.current(),state:o,style:i}}function Uq(e,t){if(!(e!=null&&e.kind))return!1;const{kind:n,prevState:r}=e,{locations:o}=t;switch(n){case _e.QUERY:return o.includes(Fe.QUERY);case _e.MUTATION:return o.includes(Fe.MUTATION);case _e.SUBSCRIPTION:return o.includes(Fe.SUBSCRIPTION);case _e.FIELD:case _e.ALIASED_FIELD:return o.includes(Fe.FIELD);case _e.FRAGMENT_DEFINITION:return o.includes(Fe.FRAGMENT_DEFINITION);case _e.FRAGMENT_SPREAD:return o.includes(Fe.FRAGMENT_SPREAD);case _e.INLINE_FRAGMENT:return o.includes(Fe.INLINE_FRAGMENT);case _e.SCHEMA_DEF:return o.includes(Fe.SCHEMA);case _e.SCALAR_DEF:return o.includes(Fe.SCALAR);case _e.OBJECT_TYPE_DEF:return o.includes(Fe.OBJECT);case _e.FIELD_DEF:return o.includes(Fe.FIELD_DEFINITION);case _e.INTERFACE_DEF:return o.includes(Fe.INTERFACE);case _e.UNION_DEF:return o.includes(Fe.UNION);case _e.ENUM_DEF:return o.includes(Fe.ENUM);case _e.ENUM_VALUE:return o.includes(Fe.ENUM_VALUE);case _e.INPUT_DEF:return o.includes(Fe.INPUT_OBJECT);case _e.INPUT_VALUE_DEF:switch(r==null?void 0:r.kind){case _e.ARGUMENTS_DEF:return o.includes(Fe.ARGUMENT_DEFINITION);case _e.INPUT_DEF:return o.includes(Fe.INPUT_FIELD_DEFINITION)}}return!1}function Bq(e,t){let n,r,o,i,s,l,c,f,d,g,m;return lI(t,v=>{var b;switch(v.kind){case _e.QUERY:case"ShortQuery":g=e.getQueryType();break;case _e.MUTATION:g=e.getMutationType();break;case _e.SUBSCRIPTION:g=e.getSubscriptionType();break;case _e.INLINE_FRAGMENT:case _e.FRAGMENT_DEFINITION:v.type&&(g=e.getType(v.type));break;case _e.FIELD:case _e.ALIASED_FIELD:{!g||!v.name?s=null:(s=d?aI(e,d,v.name):null,g=s?s.type:null);break}case _e.SELECTION_SET:d=Et(g);break;case _e.DIRECTIVE:o=v.name?e.getDirective(v.name):null;break;case _e.INTERFACE_DEF:v.name&&(c=null,m=new Pr({name:v.name,interfaces:[],fields:{}}));break;case _e.OBJECT_TYPE_DEF:v.name&&(m=null,c=new $n({name:v.name,interfaces:[],fields:{}}));break;case _e.ARGUMENTS:{if(v.prevState)switch(v.prevState.kind){case _e.FIELD:r=s&&s.args;break;case _e.DIRECTIVE:r=o&&o.args;break;case _e.ALIASED_FIELD:{const C=(b=v.prevState)===null||b===void 0?void 0:b.name;if(!C){r=null;break}const E=d?aI(e,d,C):null;if(!E){r=null;break}r=E.args;break}default:r=null;break}else r=null;break}case _e.ARGUMENT:if(r){for(let C=0;C<r.length;C++)if(r[C].name===v.name){n=r[C];break}}l=n==null?void 0:n.type;break;case _e.ENUM_VALUE:const w=Et(l);i=w instanceof Er?w.getValues().find(C=>C.value===v.name):null;break;case _e.LIST_VALUE:const N=Ca(l);l=N instanceof Bt?N.ofType:null;break;case _e.OBJECT_VALUE:const S=Et(l);f=S instanceof $r?S.getFields():null;break;case _e.OBJECT_FIELD:const x=v.name&&f?f[v.name]:null;l=x==null?void 0:x.type;break;case _e.NAMED_TYPE:v.name&&(g=e.getType(v.name));break}}),{argDef:n,argDefs:r,directiveDef:o,enumValue:i,fieldDef:s,inputType:l,objectFieldDefs:f,parentType:d,type:g,interfaceDef:m,objectTypeDef:c}}var Ul;(function(e){e.TYPE_SYSTEM="TYPE_SYSTEM",e.EXECUTABLE="EXECUTABLE"})(Ul||(Ul={}));function qq(e,t){return t!=null&&t.endsWith(".graphqls")||Cq(e)?Ul.TYPE_SYSTEM:Ul.EXECUTABLE}function fL(e){return e.prevState&&e.kind&&[_e.NAMED_TYPE,_e.LIST_TYPE,_e.TYPE,_e.NON_NULL_TYPE].includes(e.kind)?fL(e.prevState):e}var hv={exports:{}};function dL(e,t){if(e!=null)return e;var n=new Error(t!==void 0?t:"Got unexpected "+e);throw n.framesToPop=1,n}hv.exports=dL,hv.exports.default=dL,Object.defineProperty(hv.exports,"__esModule",{value:!0});var zq=hv.exports;const pL=Ui(zq),Hq=(e,t)=>{if(!t)return[];const n=new Map,r=new Set;fn(e,{FragmentDefinition(s){n.set(s.name.value,!0)},FragmentSpread(s){r.has(s.name.value)||r.add(s.name.value)}});const o=new Set;for(const s of r)!n.has(s)&&t.has(s)&&o.add(pL(t.get(s)));const i=[];for(const s of o)fn(s,{FragmentSpread(l){!r.has(l.name.value)&&t.get(l.name.value)&&(o.add(pL(t.get(l.name.value))),r.add(l.name.value))}}),n.has(s.name.value)||i.push(s);return i};class hL{constructor(t,n){this.containsPosition=r=>this.start.line===r.line?this.start.character<=r.character:this.end.line===r.line?this.end.character>=r.character:this.start.line<=r.line&&this.end.line>=r.line,this.start=t,this.end=n}setStart(t,n){this.start=new Bl(t,n)}setEnd(t,n){this.end=new Bl(t,n)}}class Bl{constructor(t,n){this.lessThanOrEqualTo=r=>this.line<r.line||this.line===r.line&&this.character<=r.character,this.line=t,this.character=n}setLine(t){this.line=t}setCharacter(t){this.character=t}}const Wq=[gw,Ow,Aw,Nw,_w,kw,$g,Pg,Wg,ww,Hg,Gg];function Gq(e,t,n,r,o){const i=Dw.filter(l=>!(l===vw||l===hw||r&&l===mw));return n&&Array.prototype.push.apply(i,n),o&&Array.prototype.push.apply(i,Wq),ep(e,t,i).filter(l=>{if(l.message.includes("Unknown directive")&&l.nodes){const c=l.nodes[0];if(c&&c.kind===U.DIRECTIVE){const f=c.name.value;if(f==="arguments"||f==="argumentDefinitions")return!1}}return!0})}function Yq(e,t){const n=Object.create(null);for(const r of t.definitions)if(r.kind==="OperationDefinition"){const{variableDefinitions:o}=r;if(o)for(const{variable:i,type:s}of o){const l=Yn(e,s);l?n[i.name.value]=l:s.kind===U.NAMED_TYPE&&s.name.value==="Float"&&(n[i.name.value]=Hd)}}return n}function Qq(e,t){const n=t?Yq(t,e):void 0,r=[];return fn(e,{OperationDefinition(o){r.push(o)}}),{variableToType:n,operations:r}}function Kq(e,t){if(t)try{const n=rr(t);return Object.assign(Object.assign({},Qq(n,e)),{documentAST:n})}catch{return}}const mv={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},rx={[mv.Error]:1,[mv.Warning]:2,[mv.Information]:3,[mv.Hint]:4},gv=(e,t)=>{if(!e)throw new Error(t)};function Jq(e,t=null,n,r,o){var i,s;let l=null,c="";o&&(c=typeof o=="string"?o:o.reduce((d,g)=>d+ft(g)+`
`,""));const f=c?`${e}
${c}`:e;try{l=rr(f)}catch(d){if(d instanceof he){const g=Zq((s=(i=d.locations)===null||i===void 0?void 0:i[0])!==null&&s!==void 0?s:{line:0,column:0},f);return[{severity:rx.Error,message:d.message,source:"GraphQL: Syntax",range:g}]}throw d}return Xq(l,t,n,r)}function Xq(e,t=null,n,r){if(!t)return[];const o=Gq(t,e,n,r).flatMap(s=>mL(s,rx.Error,"Validation")),i=ep(t,e,[L2]).flatMap(s=>mL(s,rx.Warning,"Deprecation"));return o.concat(i)}function mL(e,t,n){if(!e.nodes)return[];const r=[];for(const[o,i]of e.nodes.entries()){const s=i.kind!=="Variable"&&"name"in i&&i.name!==void 0?i.name:"variable"in i&&i.variable!==void 0?i.variable:i;if(s){gv(e.locations,"GraphQL validation error requires locations.");const l=e.locations[o],c=ez(s),f=l.column+(c.end-c.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new hL(new Bl(l.line-1,l.column-1),new Bl(l.line-1,f))})}}return r}function Zq(e,t){const n=cp(),r=n.startState(),o=t.split(`
`);gv(o.length>=e.line,"Query text must have more lines than where the error happened");let i=null;for(let f=0;f<e.line;f++)for(i=new Zw(o[f]);!i.eol()&&n.token(i,r)!=="invalidchar";);gv(i,"Expected Parser stream to be available.");const s=e.line-1,l=i.getStartOfToken(),c=i.getCurrentPosition();return new hL(new Bl(s,l),new Bl(s,c))}function ez(e){const n=e.loc;return gv(n,"Expected ASTNode to have a location."),n}/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/var tz=function(t){return typeof t=="object"?t===null:typeof t!="function"};/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var nz=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1};/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var rz=nz;function gL(e){return rz(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}var oz=function(t){var n,r;return!(gL(t)===!1||(n=t.constructor,typeof n!="function")||(r=n.prototype,gL(r)===!1)||r.hasOwnProperty("isPrototypeOf")===!1)};/*!
* set-value <https://github.com/jonschlinkert/set-value>
*
* Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
* Released under the MIT License.
*/const{deleteProperty:iz}=Reflect,sz=tz,vL=oz,yL=e=>typeof e=="object"&&e!==null||typeof e=="function",az=e=>e==="__proto__"||e==="constructor"||e==="prototype",ox=e=>{if(!sz(e))throw new TypeError("Object keys must be strings or symbols");if(az(e))throw new Error(`Cannot set unsafe key: "${e}"`)},lz=e=>Array.isArray(e)?e.flat().map(String).join(","):e,cz=(e,t)=>{if(typeof e!="string"||!t)return e;let n=e+";";return t.arrays!==void 0&&(n+=`arrays=${t.arrays};`),t.separator!==void 0&&(n+=`separator=${t.separator};`),t.split!==void 0&&(n+=`split=${t.split};`),t.merge!==void 0&&(n+=`merge=${t.merge};`),t.preservePaths!==void 0&&(n+=`preservePaths=${t.preservePaths};`),n},uz=(e,t,n)=>{const r=lz(t?cz(e,t):e);ox(r);const o=ql.cache.get(r)||n();return ql.cache.set(r,o),o},fz=(e,t={})=>{const n=t.separator||".",r=n==="/"?!1:t.preservePaths;if(typeof e=="string"&&r!==!1&&/\//.test(e))return[e];const o=[];let i="";const s=l=>{let c;l.trim()!==""&&Number.isInteger(c=Number(l))?o.push(c):o.push(l)};for(let l=0;l<e.length;l++){const c=e[l];if(c==="\\"){i+=e[++l];continue}if(c===n){s(i),i="";continue}i+=c}return i&&s(i),o},bL=(e,t)=>t&&typeof t.split=="function"?t.split(e):typeof e=="symbol"?[e]:Array.isArray(e)?e:uz(e,t,()=>fz(e,t)),dz=(e,t,n,r)=>{if(ox(t),n===void 0)iz(e,t);else if(r&&r.merge){const o=r.merge==="function"?r.merge:Object.assign;o&&vL(e[t])&&vL(n)?e[t]=o(e[t],n):e[t]=n}else e[t]=n;return e},ql=(e,t,n,r)=>{if(!t||!yL(e))return e;const o=bL(t,r);let i=e;for(let s=0;s<o.length;s++){const l=o[s],c=o[s+1];if(ox(l),c===void 0){dz(i,l,n,r);break}if(typeof c=="number"&&!Array.isArray(i[l])){i=i[l]=[];continue}yL(i[l])||(i[l]={}),i=i[l]}return e};ql.split=bL,ql.cache=new Map,ql.clear=()=>{ql.cache=new Map};var pz=ql;const hz=Ui(pz);var mz=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},gz=mz,EL={"text/plain":"Text","text/html":"Url",default:"Text"},vz="Copy to clipboard: #{key}, Enter";function yz(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function bz(e,t){var n,r,o,i,s,l,c=!1;t||(t={}),n=t.debug||!1;try{o=gz(),i=document.createRange(),s=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(d){if(d.stopPropagation(),t.format)if(d.preventDefault(),typeof d.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=EL[t.format]||EL.default;window.clipboardData.setData(g,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(l),i.selectNodeContents(l),s.addRange(i);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");c=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=yz("message"in t?t.message:vz),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Ez=bz;const wz=Ui(Ez);function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}function dt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ix(...e){return t=>e.forEach(n=>xz(n,t))}function ar(...e){return k.useCallback(ix(...e),e)}function zl(e,t=[]){let n=[];function r(i,s){const l=k.createContext(s),c=n.length;n=[...n,s];function f(g){const{scope:m,children:v,...b}=g,w=(m==null?void 0:m[e][c])||l,N=k.useMemo(()=>b,Object.values(b));return k.createElement(w.Provider,{value:N},v)}function d(g,m){const v=(m==null?void 0:m[e][c])||l,b=k.useContext(v);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${g}\` must be used within \`${i}\``)}return f.displayName=i+"Provider",[f,d]}const o=()=>{const i=n.map(s=>k.createContext(s));return function(l){const c=(l==null?void 0:l[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,Sz(o,...t)]}function Sz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:c,scopeName:f})=>{const g=c(i)[`__scope${f}`];return{...l,...g}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Cu=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},Tz=L1.useId||(()=>{});let Cz=0;function Hl(e){const[t,n]=k.useState(Tz());return Cu(()=>{e||n(r=>r??String(Cz++))},[e]),e||(t?`radix-${t}`:"")}function Gi(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function vv({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=kz({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,l=Gi(n),c=k.useCallback(f=>{if(i){const g=typeof f=="function"?f(e):f;g!==e&&l(g)}else o(f)},[i,e,o,l]);return[s,c]}function kz({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=Gi(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const ku=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(Nz);if(i){const s=i.props.children,l=o.map(c=>c===i?k.Children.count(s)>1?k.Children.only(null):k.isValidElement(s)?s.props.children:null:c);return k.createElement(sx,Ze({},r,{ref:t}),k.isValidElement(s)?k.cloneElement(s,void 0,l):null)}return k.createElement(sx,Ze({},r,{ref:t}),n)});ku.displayName="Slot";const sx=k.forwardRef((e,t)=>{const{children:n,...r}=e;return k.isValidElement(n)?k.cloneElement(n,{..._z(r,n.props),ref:t?ix(t,n.ref):n.ref}):k.Children.count(n)>1?k.Children.only(null):null});sx.displayName="SlotClone";const wL=({children:e})=>k.createElement(k.Fragment,null,e);function Nz(e){return k.isValidElement(e)&&e.type===wL}function _z(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const lr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?ku:t;return k.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),k.createElement(l,Ze({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function xL(e,t){e&&Pd.flushSync(()=>e.dispatchEvent(t))}function Oz(e,t=globalThis==null?void 0:globalThis.document){const n=Gi(e);k.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const ax="dismissableLayer.update",Az="dismissableLayer.pointerDownOutside",Dz="dismissableLayer.focusOutside";let SL;const Iz=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lx=k.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...f}=e,d=k.useContext(Iz),[g,m]=k.useState(null),v=(n=g==null?void 0:g.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,b]=k.useState({}),w=ar(t,A=>m(A)),N=Array.from(d.layers),[S]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=N.indexOf(S),C=g?N.indexOf(g):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,_=C>=x,I=Lz(A=>{const F=A.target,$=[...d.branches].some(q=>q.contains(F));!_||$||(i==null||i(A),l==null||l(A),A.defaultPrevented||c==null||c())},v),D=Rz(A=>{const F=A.target;[...d.branches].some(q=>q.contains(F))||(s==null||s(A),l==null||l(A),A.defaultPrevented||c==null||c())},v);return Oz(A=>{C===d.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},v),k.useEffect(()=>{if(g)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(SL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),TL(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=SL)}},[g,v,r,d]),k.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),TL())},[g,d]),k.useEffect(()=>{const A=()=>b({});return document.addEventListener(ax,A),()=>document.removeEventListener(ax,A)},[]),k.createElement(lr.div,Ze({},f,{ref:w,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:dt(e.onFocusCapture,D.onFocusCapture),onBlurCapture:dt(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:dt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function Lz(e,t=globalThis==null?void 0:globalThis.document){const n=Gi(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let f=function(){CL(Az,n,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Rz(e,t=globalThis==null?void 0:globalThis.document){const n=Gi(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&CL(Dz,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function TL(){const e=new CustomEvent(ax);document.dispatchEvent(e)}function CL(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xL(o,i):o.dispatchEvent(i)}const cx="focusScope.autoFocusOnMount",ux="focusScope.autoFocusOnUnmount",kL={bubbles:!1,cancelable:!0},NL=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=k.useState(null),f=Gi(o),d=Gi(i),g=k.useRef(null),m=ar(t,w=>c(w)),v=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let w=function(C){if(v.paused||!l)return;const E=C.target;l.contains(E)?g.current=E:Aa(g.current,{select:!0})},N=function(C){if(v.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||Aa(g.current,{select:!0}))},S=function(C){if(document.activeElement===document.body)for(const _ of C)_.removedNodes.length>0&&Aa(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const x=new MutationObserver(S);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),x.disconnect()}}},[r,l,v.paused]),k.useEffect(()=>{if(l){AL.add(v);const w=document.activeElement;if(!l.contains(w)){const S=new CustomEvent(cx,kL);l.addEventListener(cx,f),l.dispatchEvent(S),S.defaultPrevented||(Fz(jz(_L(l)),{select:!0}),document.activeElement===w&&Aa(l))}return()=>{l.removeEventListener(cx,f),setTimeout(()=>{const S=new CustomEvent(ux,kL);l.addEventListener(ux,d),l.dispatchEvent(S),S.defaultPrevented||Aa(w??document.body,{select:!0}),l.removeEventListener(ux,d),AL.remove(v)},0)}}},[l,f,d,v]);const b=k.useCallback(w=>{if(!n&&!r||v.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(N&&S){const x=w.currentTarget,[C,E]=Mz(x);C&&E?!w.shiftKey&&S===E?(w.preventDefault(),n&&Aa(C,{select:!0})):w.shiftKey&&S===C&&(w.preventDefault(),n&&Aa(E,{select:!0})):S===x&&w.preventDefault()}},[n,r,v.paused]);return k.createElement(lr.div,Ze({tabIndex:-1},s,{ref:m,onKeyDown:b}))});function Fz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Aa(r,{select:t}),document.activeElement!==n)return}function Mz(e){const t=_L(e),n=OL(t,e),r=OL(t.reverse(),e);return[n,r]}function _L(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function OL(e,t){for(const n of e)if(!Pz(n,{upTo:t}))return n}function Pz(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $z(e){return e instanceof HTMLInputElement&&"select"in e}function Aa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$z(e)&&t&&e.select()}}const AL=Vz();function Vz(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=DL(e,t),e.unshift(t)},remove(t){var n;e=DL(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function DL(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jz(e){return e.filter(t=>t.tagName!=="A")}const fx=k.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?dg.createPortal(k.createElement(lr.div,Ze({},o,{ref:t})),r):null});function Uz(e,t){return k.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Da=e=>{const{present:t,children:n}=e,r=Bz(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=ar(r.ref,o.ref);return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};Da.displayName="Presence";function Bz(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),s=e?"mounted":"unmounted",[l,c]=Uz(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const f=yv(r.current);i.current=l==="mounted"?f:"none"},[l]),Cu(()=>{const f=r.current,d=o.current;if(d!==e){const m=i.current,v=yv(f);e?c("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Cu(()=>{if(t){const f=g=>{const v=yv(r.current).includes(g.animationName);g.target===t&&v&&Pd.flushSync(()=>c("ANIMATION_END"))},d=g=>{g.target===t&&(i.current=yv(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:k.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function yv(e){return(e==null?void 0:e.animationName)||"none"}let dx=0;function IL(){k.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:LL()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:LL()),dx++,()=>{dx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),dx--}},[])}function LL(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var px=function(e,t){return px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},px(e,t)};function RL(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");px(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Se=function(){return Se=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Se.apply(this,arguments)};function xr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Xt(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function xi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var bv="right-scroll-bar-position",Ev="width-before-scroll-bar",qz="with-scroll-bars-hidden",zz="--removed-body-scroll-bar-size";function Hz(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wz(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function Gz(e,t){return Wz(t||null,function(n){return e.forEach(function(r){return Hz(r,n)})})}function Yz(e){return e}function Qz(e,t){t===void 0&&(t=Yz);var n=[],r=!1,o={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]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(d){s.push(d),f()},filter:function(d){return s=s.filter(d),n}}}};return o}function Kz(e){e===void 0&&(e={});var t=Qz(null);return t.options=Se({async:!0,ssr:!1},e),t}var FL=function(e){var t=e.sideCar,n=xr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,Se({},n))};FL.isSideCarExport=!0;function Jz(e,t){return e.useMedium(t),FL}var ML=Kz(),hx=function(){},wv=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:hx,onWheelCapture:hx,onTouchMoveCapture:hx}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,c=e.className,f=e.removeScrollBar,d=e.enabled,g=e.shards,m=e.sideCar,v=e.noIsolation,b=e.inert,w=e.allowPinchZoom,N=e.as,S=N===void 0?"div":N,x=xr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),C=m,E=Gz([n,t]),_=Se(Se({},x),o);return k.createElement(k.Fragment,null,d&&k.createElement(C,{sideCar:ML,removeScrollBar:f,shards:g,noIsolation:v,inert:b,setCallbacks:i,allowPinchZoom:!!w,lockRef:n}),s?k.cloneElement(k.Children.only(l),Se(Se({},_),{ref:E})):k.createElement(S,Se({},_,{className:c,ref:E}),l))});wv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wv.classNames={fullWidth:Ev,zeroRight:bv};var Xz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xz();return t&&e.setAttribute("nonce",t),e}function eH(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tH(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nH=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zz())&&(eH(t,n),tH(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rH=function(){var e=nH();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PL=function(){var e=rH(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},oH={left:0,top:0,right:0,gap:0},mx=function(e){return parseInt(e||"",10)||0},iH=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[mx(n),mx(r),mx(o)]},sH=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oH;var t=iH(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aH=PL(),lH=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
.`.concat(qz,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(l,"px ").concat(r,`;
}
body {
overflow: hidden `).concat(r,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
padding-left: `.concat(o,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(bv,` {
right: `).concat(l,"px ").concat(r,`;
}
.`).concat(Ev,` {
margin-right: `).concat(l,"px ").concat(r,`;
}
.`).concat(bv," .").concat(bv,` {
right: 0 `).concat(r,`;
}
.`).concat(Ev," .").concat(Ev,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(zz,": ").concat(l,`px;
}
`)},cH=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=k.useMemo(function(){return sH(o)},[o]);return k.createElement(aH,{styles:lH(i,!t,o,n?"":"!important")})},gx=!1;if(typeof window<"u")try{var xv=Object.defineProperty({},"passive",{get:function(){return gx=!0,!0}});window.addEventListener("test",xv,xv),window.removeEventListener("test",xv,xv)}catch{gx=!1}var Nu=gx?{passive:!1}:!1,uH=function(e){return e.tagName==="TEXTAREA"},$L=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uH(e)&&n[t]==="visible")},fH=function(e){return $L(e,"overflowY")},dH=function(e){return $L(e,"overflowX")},VL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=jL(e,n);if(r){var o=UL(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},pH=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hH=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jL=function(e,t){return e==="v"?fH(t):dH(t)},UL=function(e,t){return e==="v"?pH(t):hH(t)},mH=function(e,t){return e==="h"&&t==="rtl"?-1:1},gH=function(e,t,n,r,o){var i=mH(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,c=t.contains(l),f=!1,d=s>0,g=0,m=0;do{var v=UL(e,l),b=v[0],w=v[1],N=v[2],S=w-N-i*b;(b||S)&&jL(e,l)&&(g+=S,m+=b),l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(o&&g===0||!o&&s>g)||!d&&(o&&m===0||!o&&-s>m))&&(f=!0),f},Sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},BL=function(e){return[e.deltaX,e.deltaY]},qL=function(e){return e&&"current"in e?e.current:e},vH=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yH=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},bH=0,_u=[];function EH(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(bH++)[0],i=k.useState(function(){return PL()})[0],s=k.useRef(e);k.useEffect(function(){s.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=xi([e.lockRef.current],(e.shards||[]).map(qL),!0).filter(Boolean);return w.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=k.useCallback(function(w,N){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var S=Sv(w),x=n.current,C="deltaX"in w?w.deltaX:x[0]-S[0],E="deltaY"in w?w.deltaY:x[1]-S[1],_,I=w.target,D=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in w&&D==="h"&&I.type==="range")return!1;var A=VL(D,I);if(!A)return!0;if(A?_=D:(_=D==="v"?"h":"v",A=VL(D,I)),!A)return!1;if(!r.current&&"changedTouches"in w&&(C||E)&&(r.current=_),!_)return!0;var F=r.current||_;return gH(F,N,w,F==="h"?C:E,!0)},[]),c=k.useCallback(function(w){var N=w;if(!(!_u.length||_u[_u.length-1]!==i)){var S="deltaY"in N?BL(N):Sv(N),x=t.current.filter(function(_){return _.name===N.type&&_.target===N.target&&vH(_.delta,S)})[0];if(x&&x.should){N.cancelable&&N.preventDefault();return}if(!x){var C=(s.current.shards||[]).map(qL).filter(Boolean).filter(function(_){return _.contains(N.target)}),E=C.length>0?l(N,C[0]):!s.current.noIsolation;E&&N.cancelable&&N.preventDefault()}}},[]),f=k.useCallback(function(w,N,S,x){var C={name:w,delta:N,target:S,should:x};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),d=k.useCallback(function(w){n.current=Sv(w),r.current=void 0},[]),g=k.useCallback(function(w){f(w.type,BL(w),w.target,l(w,e.lockRef.current))},[]),m=k.useCallback(function(w){f(w.type,Sv(w),w.target,l(w,e.lockRef.current))},[]);k.useEffect(function(){return _u.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Nu),document.addEventListener("touchmove",c,Nu),document.addEventListener("touchstart",d,Nu),function(){_u=_u.filter(function(w){return w!==i}),document.removeEventListener("wheel",c,Nu),document.removeEventListener("touchmove",c,Nu),document.removeEventListener("touchstart",d,Nu)}},[]);var v=e.removeScrollBar,b=e.inert;return k.createElement(k.Fragment,null,b?k.createElement(i,{styles:yH(o)}):null,v?k.createElement(cH,{gapMode:"margin"}):null)}const wH=Jz(ML,EH);var zL=k.forwardRef(function(e,t){return k.createElement(wv,Se({},e,{ref:t,sideCar:wH}))});zL.classNames=wv.classNames;const HL=zL;var xH=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ou=new WeakMap,Tv=new WeakMap,Cv={},vx=0,WL=function(e){return e&&(e.host||WL(e.parentNode))},SH=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=WL(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},TH=function(e,t,n,r){var o=SH(t,Array.isArray(e)?e:[e]);Cv[n]||(Cv[n]=new WeakMap);var i=Cv[n],s=[],l=new Set,c=new Set(o),f=function(g){!g||l.has(g)||(l.add(g),f(g.parentNode))};o.forEach(f);var d=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(m){if(l.has(m))d(m);else try{var v=m.getAttribute(r),b=v!==null&&v!=="false",w=(Ou.get(m)||0)+1,N=(i.get(m)||0)+1;Ou.set(m,w),i.set(m,N),s.push(m),w===1&&b&&Tv.set(m,!0),N===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),l.clear(),vx++,function(){s.forEach(function(g){var m=Ou.get(g)-1,v=i.get(g)-1;Ou.set(g,m),i.set(g,v),m||(Tv.has(g)||g.removeAttribute(r),Tv.delete(g)),v||g.removeAttribute(n)}),vx--,vx||(Ou=new WeakMap,Ou=new WeakMap,Tv=new WeakMap,Cv={})}},GL=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||xH(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),TH(r,o,n,"aria-hidden")):function(){return null}};const YL="Dialog",[QL,Cue]=zl(YL),[CH,Si]=QL(YL),kH=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=k.useRef(null),c=k.useRef(null),[f=!1,d]=vv({prop:r,defaultProp:o,onChange:i});return k.createElement(CH,{scope:t,triggerRef:l,contentRef:c,contentId:Hl(),titleId:Hl(),descriptionId:Hl(),open:f,onOpenChange:d,onOpenToggle:k.useCallback(()=>d(g=>!g),[d]),modal:s},n)},NH="DialogTrigger",_H=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(NH,n),i=ar(t,o.triggerRef);return k.createElement(lr.button,Ze({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":bx(o.open)},r,{ref:i,onClick:dt(e.onClick,o.onOpenToggle)}))}),KL="DialogPortal",[OH,JL]=QL(KL,{forceMount:void 0}),AH=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Si(KL,t);return k.createElement(OH,{scope:t,forceMount:n},k.Children.map(r,s=>k.createElement(Da,{present:n||i.open},k.createElement(fx,{asChild:!0,container:o},s))))},yx="DialogOverlay",DH=k.forwardRef((e,t)=>{const n=JL(yx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Si(yx,e.__scopeDialog);return i.modal?k.createElement(Da,{present:r||i.open},k.createElement(IH,Ze({},o,{ref:t}))):null}),IH=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(yx,n);return k.createElement(HL,{as:ku,allowPinchZoom:!0,shards:[o.contentRef]},k.createElement(lr.div,Ze({"data-state":bx(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Au="DialogContent",XL=k.forwardRef((e,t)=>{const n=JL(Au,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Si(Au,e.__scopeDialog);return k.createElement(Da,{present:r||i.open},i.modal?k.createElement(LH,Ze({},o,{ref:t})):k.createElement(RH,Ze({},o,{ref:t})))}),LH=k.forwardRef((e,t)=>{const n=Si(Au,e.__scopeDialog),r=k.useRef(null),o=ar(t,n.contentRef,r);return k.useEffect(()=>{const i=r.current;if(i)return GL(i)},[]),k.createElement(ZL,Ze({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dt(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:dt(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:dt(e.onFocusOutside,i=>i.preventDefault())}))}),RH=k.forwardRef((e,t)=>{const n=Si(Au,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return k.createElement(ZL,Ze({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var l;r.current||(l=n.triggerRef.current)===null||l===void 0||l.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,l;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((l=n.triggerRef.current)===null||l===void 0?void 0:l.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),ZL=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=Si(Au,n),c=k.useRef(null),f=ar(t,c);return IL(),k.createElement(k.Fragment,null,k.createElement(NL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},k.createElement(lx,Ze({role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":bx(l.open)},s,{ref:f,onDismiss:()=>l.onOpenChange(!1)}))),!1)}),eR="DialogTitle",tR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(eR,n);return k.createElement(lr.h2,Ze({id:o.titleId},r,{ref:t}))}),nR="DialogDescription",rR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(nR,n);return k.createElement(lr.p,Ze({id:o.descriptionId},r,{ref:t}))}),oR="DialogClose",iR=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Si(oR,n);return k.createElement(lr.button,Ze({type:"button"},r,{ref:t,onClick:dt(e.onClick,()=>o.onOpenChange(!1))}))});function bx(e){return e?"open":"closed"}const FH=kH,MH=_H,PH=AH,$H=DH,VH=XL,jH=tR,UH=rR,BH=iR,sR=k.forwardRef((e,t)=>k.createElement(lr.span,Ze({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));function aR(e){const t=e+"CollectionProvider",[n,r]=zl(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:w}=v,N=ce.useRef(null),S=ce.useRef(new Map).current;return ce.createElement(o,{scope:b,itemMap:S,collectionRef:N},w)},l=e+"CollectionSlot",c=ce.forwardRef((v,b)=>{const{scope:w,children:N}=v,S=i(l,w),x=ar(b,S.collectionRef);return ce.createElement(ku,{ref:x},N)}),f=e+"CollectionItemSlot",d="data-radix-collection-item",g=ce.forwardRef((v,b)=>{const{scope:w,children:N,...S}=v,x=ce.useRef(null),C=ar(b,x),E=i(f,w);return ce.useEffect(()=>(E.itemMap.set(x,{ref:x,...S}),()=>void E.itemMap.delete(x))),ce.createElement(ku,{[d]:"",ref:C},N)});function m(v){const b=i(e+"CollectionConsumer",v);return ce.useCallback(()=>{const N=b.collectionRef.current;if(!N)return[];const S=Array.from(N.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((E,_)=>S.indexOf(E.ref.current)-S.indexOf(_.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},m,r]}const qH=k.createContext(void 0);function lR(e){const t=k.useContext(qH);return e||t||"ltr"}const zH=["top","right","bottom","left"],Ia=Math.min,So=Math.max,kv=Math.round,Nv=Math.floor,La=e=>({x:e,y:e}),HH={left:"right",right:"left",bottom:"top",top:"bottom"},WH={start:"end",end:"start"};function Ex(e,t,n){return So(e,Ia(t,n))}function Is(e,t){return typeof e=="function"?e(t):e}function Ls(e){return e.split("-")[0]}function Du(e){return e.split("-")[1]}function wx(e){return e==="x"?"y":"x"}function xx(e){return e==="y"?"height":"width"}function Iu(e){return["top","bottom"].includes(Ls(e))?"y":"x"}function Sx(e){return wx(Iu(e))}function GH(e,t,n){n===void 0&&(n=!1);const r=Du(e),o=Sx(e),i=xx(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=_v(s)),[s,_v(s)]}function YH(e){const t=_v(e);return[Tx(e),t,Tx(t)]}function Tx(e){return e.replace(/start|end/g,t=>WH[t])}function QH(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function KH(e,t,n,r){const o=Du(e);let i=QH(Ls(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Tx)))),i}function _v(e){return e.replace(/left|right|bottom|top/g,t=>HH[t])}function JH(e){return{top:0,right:0,bottom:0,left:0,...e}}function cR(e){return typeof e!="number"?JH(e):{top:e,right:e,bottom:e,left:e}}function Ov(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function uR(e,t,n){let{reference:r,floating:o}=e;const i=Iu(t),s=Sx(t),l=xx(s),c=Ls(t),f=i==="y",d=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,m=r[l]/2-o[l]/2;let v;switch(c){case"top":v={x:d,y:r.y-o.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:g};break;case"left":v={x:r.x-o.width,y:g};break;default:v={x:r.x,y:r.y}}switch(Du(t)){case"start":v[s]-=m*(n&&f?-1:1);break;case"end":v[s]+=m*(n&&f?-1:1);break}return v}const XH=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:g}=uR(f,r,c),m=r,v={},b=0;for(let w=0;w<l.length;w++){const{name:N,fn:S}=l[w],{x,y:C,data:E,reset:_}=await S({x:d,y:g,initialPlacement:r,placement:m,strategy:o,middlewareData:v,rects:f,platform:s,elements:{reference:e,floating:t}});d=x??d,g=C??g,v={...v,[N]:{...v[N],...E}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(f=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:d,y:g}=uR(f,m,c)),w=-1)}return{x:d,y:g,placement:m,strategy:o,middlewareData:v}};async function fp(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:g="floating",altBoundary:m=!1,padding:v=0}=Is(t,e),b=cR(v),N=l[m?g==="floating"?"reference":"floating":g],S=Ov(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(N)))==null||n?N:N.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:c})),x=g==="floating"?{...s.floating,x:r,y:o}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),E=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},_=Ov(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:c}):x);return{top:(S.top-_.top+b.top)/E.y,bottom:(_.bottom-S.bottom+b.bottom)/E.y,left:(S.left-_.left+b.left)/E.x,right:(_.right-S.right+b.right)/E.x}}const ZH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:f,padding:d=0}=Is(e,t)||{};if(f==null)return{};const g=cR(d),m={x:n,y:r},v=Sx(o),b=xx(v),w=await s.getDimensions(f),N=v==="y",S=N?"top":"left",x=N?"bottom":"right",C=N?"clientHeight":"clientWidth",E=i.reference[b]+i.reference[v]-m[v]-i.floating[b],_=m[v]-i.reference[v],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let D=I?I[C]:0;(!D||!await(s.isElement==null?void 0:s.isElement(I)))&&(D=l.floating[C]||i.floating[b]);const A=E/2-_/2,F=D/2-w[b]/2-1,$=Ia(g[S],F),q=Ia(g[x],F),H=$,z=D-w[b]-q,B=D/2-w[b]/2+A,R=Ex(H,B,z),te=!c.arrow&&Du(o)!=null&&B!==R&&i.reference[b]/2-(B<H?$:q)-w[b]/2<0,Y=te?B<H?B-H:B-z:0;return{[v]:m[v]+Y,data:{[v]:R,centerOffset:B-R-Y,...te&&{alignmentOffset:Y}},reset:te}}}),eW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:d=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...N}=Is(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const S=Ls(o),x=Ls(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(f.floating)),E=m||(x||!w?[_v(l)]:YH(l));!m&&b!=="none"&&E.push(...KH(l,w,b,C));const _=[l,...E],I=await fp(t,N),D=[];let A=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&D.push(I[S]),g){const H=GH(o,s,C);D.push(I[H[0]],I[H[1]])}if(A=[...A,{placement:o,overflows:D}],!D.every(H=>H<=0)){var F,$;const H=(((F=i.flip)==null?void 0:F.index)||0)+1,z=_[H];if(z)return{data:{index:H,overflows:A},reset:{placement:z}};let B=($=A.filter(R=>R.overflows[0]<=0).sort((R,te)=>R.overflows[1]-te.overflows[1])[0])==null?void 0:$.placement;if(!B)switch(v){case"bestFit":{var q;const R=(q=A.map(te=>[te.placement,te.overflows.filter(Y=>Y>0).reduce((Y,Q)=>Y+Q,0)]).sort((te,Y)=>te[1]-Y[1])[0])==null?void 0:q[0];R&&(B=R);break}case"initialPlacement":B=l;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function fR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function dR(e){return zH.some(t=>e[t]>=0)}const tW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Is(e,t);switch(r){case"referenceHidden":{const i=await fp(t,{...o,elementContext:"reference"}),s=fR(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:dR(s)}}}case"escaped":{const i=await fp(t,{...o,altBoundary:!0}),s=fR(i,n.floating);return{data:{escapedOffsets:s,escaped:dR(s)}}}default:return{}}}}};async function nW(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ls(n),l=Du(n),c=Iu(n)==="y",f=["left","top"].includes(s)?-1:1,d=i&&c?-1:1,g=Is(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),c?{x:v*d,y:m*f}:{x:m*f,y:v*d}}const rW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,c=await nW(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},oW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:N=>{let{x:S,y:x}=N;return{x:S,y:x}}},...c}=Is(e,t),f={x:n,y:r},d=await fp(t,c),g=Iu(Ls(o)),m=wx(g);let v=f[m],b=f[g];if(i){const N=m==="y"?"top":"left",S=m==="y"?"bottom":"right",x=v+d[N],C=v-d[S];v=Ex(x,v,C)}if(s){const N=g==="y"?"top":"left",S=g==="y"?"bottom":"right",x=b+d[N],C=b-d[S];b=Ex(x,b,C)}const w=l.fn({...t,[m]:v,[g]:b});return{...w,data:{x:w.x-n,y:w.y-r}}}}},iW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=Is(e,t),d={x:n,y:r},g=Iu(o),m=wx(g);let v=d[m],b=d[g];const w=Is(l,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const C=m==="y"?"height":"width",E=i.reference[m]-i.floating[C]+N.mainAxis,_=i.reference[m]+i.reference[C]-N.mainAxis;v<E?v=E:v>_&&(v=_)}if(f){var S,x;const C=m==="y"?"width":"height",E=["top","left"].includes(Ls(o)),_=i.reference[g]-i.floating[C]+(E&&((S=s.offset)==null?void 0:S[g])||0)+(E?0:N.crossAxis),I=i.reference[g]+i.reference[C]+(E?0:((x=s.offset)==null?void 0:x[g])||0)-(E?N.crossAxis:0);b<_?b=_:b>I&&(b=I)}return{[m]:v,[g]:b}}}},sW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...l}=Is(e,t),c=await fp(t,l),f=Ls(n),d=Du(n),g=Iu(n)==="y",{width:m,height:v}=r.floating;let b,w;f==="top"||f==="bottom"?(b=f,w=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=f,b=d==="end"?"top":"bottom");const N=v-c[b],S=m-c[w],x=!t.middlewareData.shift;let C=N,E=S;if(g){const I=m-c.left-c.right;E=d||x?Ia(S,I):I}else{const I=v-c.top-c.bottom;C=d||x?Ia(N,I):I}if(x&&!d){const I=So(c.left,0),D=So(c.right,0),A=So(c.top,0),F=So(c.bottom,0);g?E=m-2*(I!==0||D!==0?I+D:So(c.left,c.right)):C=v-2*(A!==0||F!==0?A+F:So(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:C});const _=await o.getDimensions(i.floating);return m!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function Ra(e){return pR(e)?(e.nodeName||"").toLowerCase():"#document"}function To(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rs(e){var t;return(t=(pR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pR(e){return e instanceof Node||e instanceof To(e).Node}function Fs(e){return e instanceof Element||e instanceof To(e).Element}function Yi(e){return e instanceof HTMLElement||e instanceof To(e).HTMLElement}function hR(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof To(e).ShadowRoot}function dp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function aW(e){return["table","td","th"].includes(Ra(e))}function Cx(e){const t=kx(),n=Go(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function lW(e){let t=Lu(e);for(;Yi(t)&&!Av(t);){if(Cx(t))return t;t=Lu(t)}return null}function kx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Av(e){return["html","body","#document"].includes(Ra(e))}function Go(e){return To(e).getComputedStyle(e)}function Dv(e){return Fs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Lu(e){if(Ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hR(e)&&e.host||Rs(e);return hR(t)?t.host:t}function mR(e){const t=Lu(e);return Av(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yi(t)&&dp(t)?t:mR(t)}function pp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mR(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=To(o);return i?t.concat(s,s.visualViewport||[],dp(o)?o:[],s.frameElement&&n?pp(s.frameElement):[]):t.concat(o,pp(o,[],n))}function gR(e){const t=Go(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Yi(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=kv(n)!==i||kv(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function Nx(e){return Fs(e)?e:e.contextElement}function Ru(e){const t=Nx(e);if(!Yi(t))return La(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gR(t);let s=(i?kv(n.width):n.width)/r,l=(i?kv(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const cW=La(0);function vR(e){const t=To(e);return!kx()||!t.visualViewport?cW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function uW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==To(e)?!1:t}function Wl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Nx(e);let s=La(1);t&&(r?Fs(r)&&(s=Ru(r)):s=Ru(e));const l=uW(i,n,r)?vR(i):La(0);let c=(o.left+l.x)/s.x,f=(o.top+l.y)/s.y,d=o.width/s.x,g=o.height/s.y;if(i){const m=To(i),v=r&&Fs(r)?To(r):r;let b=m,w=b.frameElement;for(;w&&r&&v!==b;){const N=Ru(w),S=w.getBoundingClientRect(),x=Go(w),C=S.left+(w.clientLeft+parseFloat(x.paddingLeft))*N.x,E=S.top+(w.clientTop+parseFloat(x.paddingTop))*N.y;c*=N.x,f*=N.y,d*=N.x,g*=N.y,c+=C,f+=E,b=To(w),w=b.frameElement}}return Ov({width:d,height:g,x:c,y:f})}const fW=[":popover-open",":modal"];function yR(e){return fW.some(t=>{try{return e.matches(t)}catch{return!1}})}function dW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Rs(r),l=t?yR(t.floating):!1;if(r===s||l&&i)return n;let c={scrollLeft:0,scrollTop:0},f=La(1);const d=La(0),g=Yi(r);if((g||!g&&!i)&&((Ra(r)!=="body"||dp(s))&&(c=Dv(r)),Yi(r))){const m=Wl(r);f=Ru(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+d.x,y:n.y*f.y-c.scrollTop*f.y+d.y}}function pW(e){return Array.from(e.getClientRects())}function bR(e){return Wl(Rs(e)).left+Dv(e).scrollLeft}function hW(e){const t=Rs(e),n=Dv(e),r=e.ownerDocument.body,o=So(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=So(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+bR(e);const l=-n.scrollTop;return Go(r).direction==="rtl"&&(s+=So(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}function mW(e,t){const n=To(e),r=Rs(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const f=kx();(!f||f&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:l,y:c}}function gW(e,t){const n=Wl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Yi(e)?Ru(e):La(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,f=r*i.y;return{width:s,height:l,x:c,y:f}}function ER(e,t,n){let r;if(t==="viewport")r=mW(e,n);else if(t==="document")r=hW(Rs(e));else if(Fs(t))r=gW(t,n);else{const o=vR(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Ov(r)}function wR(e,t){const n=Lu(e);return n===t||!Fs(n)||Av(n)?!1:Go(n).position==="fixed"||wR(n,t)}function vW(e,t){const n=t.get(e);if(n)return n;let r=pp(e,[],!1).filter(l=>Fs(l)&&Ra(l)!=="body"),o=null;const i=Go(e).position==="fixed";let s=i?Lu(e):e;for(;Fs(s)&&!Av(s);){const l=Go(s),c=Cx(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||dp(s)&&!c&&wR(e,s))?r=r.filter(d=>d!==s):o=l,s=Lu(s)}return t.set(e,r),r}function yW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?vW(t,this._c):[].concat(n),r],l=s[0],c=s.reduce((f,d)=>{const g=ER(t,d,o);return f.top=So(g.top,f.top),f.right=Ia(g.right,f.right),f.bottom=Ia(g.bottom,f.bottom),f.left=So(g.left,f.left),f},ER(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bW(e){const{width:t,height:n}=gR(e);return{width:t,height:n}}function EW(e,t,n){const r=Yi(t),o=Rs(t),i=n==="fixed",s=Wl(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=La(0);if(r||!r&&!i)if((Ra(t)!=="body"||dp(o))&&(l=Dv(t)),r){const g=Wl(t,!0,i,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&(c.x=bR(o));const f=s.left+l.scrollLeft-c.x,d=s.top+l.scrollTop-c.y;return{x:f,y:d,width:s.width,height:s.height}}function xR(e,t){return!Yi(e)||Go(e).position==="fixed"?null:t?t(e):e.offsetParent}function SR(e,t){const n=To(e);if(!Yi(e)||yR(e))return n;let r=xR(e,t);for(;r&&aW(r)&&Go(r).position==="static";)r=xR(r,t);return r&&(Ra(r)==="html"||Ra(r)==="body"&&Go(r).position==="static"&&!Cx(r))?n:r||lW(e)||n}const wW=async function(e){const t=this.getOffsetParent||SR,n=this.getDimensions;return{reference:EW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function xW(e){return Go(e).direction==="rtl"}const SW={convertOffsetParentRelativeRectToViewportRelativeRect:dW,getDocumentElement:Rs,getClippingRect:yW,getOffsetParent:SR,getElementRects:wW,getClientRects:pW,getDimensions:bW,getScale:Ru,isElement:Fs,isRTL:xW};function TW(e,t){let n=null,r;const o=Rs(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const{left:f,top:d,width:g,height:m}=e.getBoundingClientRect();if(l||t(),!g||!m)return;const v=Nv(d),b=Nv(o.clientWidth-(f+g)),w=Nv(o.clientHeight-(d+m)),N=Nv(f),x={rootMargin:-v+"px "+-b+"px "+-w+"px "+-N+"px",threshold:So(0,Ia(1,c))||1};let C=!0;function E(_){const I=_[0].intersectionRatio;if(I!==c){if(!C)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},100)}C=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function CW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=Nx(e),d=o||i?[...f?pp(f):[],...pp(t)]:[];d.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),i&&S.addEventListener("resize",n)});const g=f&&l?TW(f,n):null;let m=-1,v=null;s&&(v=new ResizeObserver(S=>{let[x]=S;x&&x.target===f&&v&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),f&&!c&&v.observe(f),v.observe(t));let b,w=c?Wl(e):null;c&&N();function N(){const S=Wl(e);w&&(S.x!==w.x||S.y!==w.y||S.width!==w.width||S.height!==w.height)&&n(),w=S,b=requestAnimationFrame(N)}return n(),()=>{var S;d.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),g==null||g(),(S=v)==null||S.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const kW=oW,NW=eW,_W=sW,OW=tW,TR=ZH,AW=iW,DW=(e,t,n)=>{const r=new Map,o={platform:SW,...n},i={...o.platform,_c:r};return XH(e,t,{...o,platform:i})},IW=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?TR({element:r.current,padding:o}).fn(n):{}:r?TR({element:r,padding:o}).fn(n):{}}}};var Iv=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Lv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Lv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function CR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kR(e,t){const n=CR(e);return Math.round(t*n)/n}function NR(e){const t=k.useRef(e);return Iv(()=>{t.current=e}),t}function LW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[d,g]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=k.useState(r);Lv(m,r)||v(r);const[b,w]=k.useState(null),[N,S]=k.useState(null),x=k.useCallback(Y=>{Y!==I.current&&(I.current=Y,w(Y))},[]),C=k.useCallback(Y=>{Y!==D.current&&(D.current=Y,S(Y))},[]),E=i||b,_=s||N,I=k.useRef(null),D=k.useRef(null),A=k.useRef(d),F=c!=null,$=NR(c),q=NR(o),H=k.useCallback(()=>{if(!I.current||!D.current)return;const Y={placement:t,strategy:n,middleware:m};q.current&&(Y.platform=q.current),DW(I.current,D.current,Y).then(Q=>{const K={...Q,isPositioned:!0};z.current&&!Lv(A.current,K)&&(A.current=K,Pd.flushSync(()=>{g(K)}))})},[m,t,n,q]);Iv(()=>{f===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,g(Y=>({...Y,isPositioned:!1})))},[f]);const z=k.useRef(!1);Iv(()=>(z.current=!0,()=>{z.current=!1}),[]),Iv(()=>{if(E&&(I.current=E),_&&(D.current=_),E&&_){if($.current)return $.current(E,_,H);H()}},[E,_,H,$,F]);const B=k.useMemo(()=>({reference:I,floating:D,setReference:x,setFloating:C}),[x,C]),R=k.useMemo(()=>({reference:E,floating:_}),[E,_]),te=k.useMemo(()=>{const Y={position:n,left:0,top:0};if(!R.floating)return Y;const Q=kR(R.floating,d.x),K=kR(R.floating,d.y);return l?{...Y,transform:"translate("+Q+"px, "+K+"px)",...CR(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Q,top:K}},[n,l,R.floating,d.x,d.y]);return k.useMemo(()=>({...d,update:H,refs:B,elements:R,floatingStyles:te}),[d,H,B,R,te])}const RW=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return k.createElement(lr.svg,Ze({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:k.createElement("polygon",{points:"0,0 30,0 15,10"}))});function FW(e){const[t,n]=k.useState(void 0);return Cu(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;s=f.inlineSize,l=f.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const _R="Popper",[OR,Rv]=zl(_R),[MW,AR]=OR(_R),PW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=k.useState(null);return k.createElement(MW,{scope:t,anchor:r,onAnchorChange:o},n)},$W="PopperAnchor",VW=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=AR($W,n),s=k.useRef(null),l=ar(t,s);return k.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:k.createElement(lr.div,Ze({},o,{ref:l}))}),DR="PopperContent",[jW,UW]=OR(DR),BW=k.forwardRef((e,t)=>{var n,r,o,i,s,l,c,f;const{__scopePopper:d,side:g="bottom",sideOffset:m=0,align:v="center",alignOffset:b=0,arrowPadding:w=0,avoidCollisions:N=!0,collisionBoundary:S=[],collisionPadding:x=0,sticky:C="partial",hideWhenDetached:E=!1,updatePositionStrategy:_="optimized",onPlaced:I,...D}=e,A=AR(DR,d),[F,$]=k.useState(null),q=ar(t,je=>$(je)),[H,z]=k.useState(null),B=FW(H),R=(n=B==null?void 0:B.width)!==null&&n!==void 0?n:0,te=(r=B==null?void 0:B.height)!==null&&r!==void 0?r:0,Y=g+(v!=="center"?"-"+v:""),Q=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},K=Array.isArray(S)?S:[S],Z=K.length>0,re={padding:Q,boundary:K.filter(HW),altBoundary:Z},{refs:J,floatingStyles:ie,placement:ne,isPositioned:ae,middlewareData:le}=LW({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>CW(...je,{animationFrame:_==="always"}),elements:{reference:A.anchor},middleware:[rW({mainAxis:m+te,alignmentAxis:b}),N&&kW({mainAxis:!0,crossAxis:!1,limiter:C==="partial"?AW():void 0,...re}),N&&NW({...re}),_W({...re,apply:({elements:je,rects:Dt,availableWidth:Nr,availableHeight:$t})=>{const{width:xn,height:os}=Dt.reference,fr=je.floating.style;fr.setProperty("--radix-popper-available-width",`${Nr}px`),fr.setProperty("--radix-popper-available-height",`${$t}px`),fr.setProperty("--radix-popper-anchor-width",`${xn}px`),fr.setProperty("--radix-popper-anchor-height",`${os}px`)}}),H&&IW({element:H,padding:w}),WW({arrowWidth:R,arrowHeight:te}),E&&OW({strategy:"referenceHidden",...re})]}),[de,xe]=LR(ne),ve=Gi(I);Cu(()=>{ae&&(ve==null||ve())},[ae,ve]);const qe=(o=le.arrow)===null||o===void 0?void 0:o.x,Ie=(i=le.arrow)===null||i===void 0?void 0:i.y,Oe=((s=le.arrow)===null||s===void 0?void 0:s.centerOffset)!==0,[it,Ot]=k.useState();return Cu(()=>{F&&Ot(window.getComputedStyle(F).zIndex)},[F]),k.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:ae?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:it,"--radix-popper-transform-origin":[(l=le.transformOrigin)===null||l===void 0?void 0:l.x,(c=le.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:e.dir},k.createElement(jW,{scope:d,placedSide:de,onArrowChange:z,arrowX:qe,arrowY:Ie,shouldHideArrow:Oe},k.createElement(lr.div,Ze({"data-side":de,"data-align":xe},D,{ref:q,style:{...D.style,animation:ae?void 0:"none",opacity:(f=le.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))}),IR="PopperArrow",qW={top:"bottom",right:"left",bottom:"top",left:"right"},zW=k.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=UW(IR,r),s=qW[i.placedSide];return k.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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}},k.createElement(RW,Ze({},o,{ref:n,style:{...o.style,display:"block"}})))});function HW(e){return e!==null}const WW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,s;const{placement:l,rects:c,middlewareData:f}=t,g=((n=f.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=g?0:e.arrowWidth,v=g?0:e.arrowHeight,[b,w]=LR(l),N={start:"0%",center:"50%",end:"100%"}[w],S=((r=(o=f.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+m/2,x=((i=(s=f.arrow)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)+v/2;let C="",E="";return b==="bottom"?(C=g?N:`${S}px`,E=`${-v}px`):b==="top"?(C=g?N:`${S}px`,E=`${c.floating.height+v}px`):b==="right"?(C=`${-v}px`,E=g?N:`${x}px`):b==="left"&&(C=`${c.floating.width+v}px`,E=g?N:`${x}px`),{data:{x:C,y:E}}}});function LR(e){const[t,n="center"]=e.split("-");return[t,n]}const RR=PW,FR=VW,MR=BW,_x="rovingFocusGroup.onEntryFocus",GW={bubbles:!1,cancelable:!0},Ox="RovingFocusGroup",[Ax,PR,YW]=aR(Ox),[QW,$R]=zl(Ox,[YW]),[KW,JW]=QW(Ox),XW=k.forwardRef((e,t)=>k.createElement(Ax.Provider,{scope:e.__scopeRovingFocusGroup},k.createElement(Ax.Slot,{scope:e.__scopeRovingFocusGroup},k.createElement(ZW,Ze({},e,{ref:t}))))),ZW=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:f,...d}=e,g=k.useRef(null),m=ar(t,g),v=lR(i),[b=null,w]=vv({prop:s,defaultProp:l,onChange:c}),[N,S]=k.useState(!1),x=Gi(f),C=PR(n),E=k.useRef(!1),[_,I]=k.useState(0);return k.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(_x,x),()=>D.removeEventListener(_x,x)},[x]),k.createElement(KW,{scope:n,orientation:r,dir:v,loop:o,currentTabStopId:b,onItemFocus:k.useCallback(D=>w(D),[w]),onItemShiftTab:k.useCallback(()=>S(!0),[]),onFocusableItemAdd:k.useCallback(()=>I(D=>D+1),[]),onFocusableItemRemove:k.useCallback(()=>I(D=>D-1),[])},k.createElement(lr.div,Ze({tabIndex:N||_===0?-1:0,"data-orientation":r},d,{ref:m,style:{outline:"none",...e.style},onMouseDown:dt(e.onMouseDown,()=>{E.current=!0}),onFocus:dt(e.onFocus,D=>{const A=!E.current;if(D.target===D.currentTarget&&A&&!N){const F=new CustomEvent(_x,GW);if(D.currentTarget.dispatchEvent(F),!F.defaultPrevented){const $=C().filter(R=>R.focusable),q=$.find(R=>R.active),H=$.find(R=>R.id===b),B=[q,H,...$].filter(Boolean).map(R=>R.ref.current);VR(B)}}E.current=!1}),onBlur:dt(e.onBlur,()=>S(!1))})))}),eG="RovingFocusGroupItem",tG=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,l=Hl(),c=i||l,f=JW(eG,n),d=f.currentTabStopId===c,g=PR(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=f;return k.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),k.createElement(Ax.ItemSlot,{scope:n,id:c,focusable:r,active:o},k.createElement(lr.span,Ze({tabIndex:d?0:-1,"data-orientation":f.orientation},s,{ref:t,onMouseDown:dt(e.onMouseDown,b=>{r?f.onItemFocus(c):b.preventDefault()}),onFocus:dt(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:dt(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=oG(b,f.orientation,f.dir);if(w!==void 0){b.preventDefault();let S=g().filter(x=>x.focusable).map(x=>x.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const x=S.indexOf(b.currentTarget);S=f.loop?iG(S,x+1):S.slice(x+1)}setTimeout(()=>VR(S))}})})))}),nG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function oG(e,t,n){const r=rG(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return nG[r]}function VR(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function iG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const sG=XW,aG=tG,lG=["Enter"," "],cG=["ArrowDown","PageUp","Home"],jR=["ArrowUp","PageDown","End"],uG=[...cG,...jR],Fv="Menu",[Dx,fG,dG]=aR(Fv),[Gl,UR]=zl(Fv,[dG,Rv,$R]),Ix=Rv(),BR=$R(),[pG,hp]=Gl(Fv),[hG,Lx]=Gl(Fv),mG=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=Ix(t),[c,f]=k.useState(null),d=k.useRef(!1),g=Gi(i),m=lR(o);return k.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),k.createElement(RR,l,k.createElement(pG,{scope:t,open:n,onOpenChange:g,content:c,onContentChange:f},k.createElement(hG,{scope:t,onClose:k.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:d,dir:m,modal:s},r)))},gG=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ix(n);return k.createElement(FR,Ze({},o,r,{ref:t}))}),qR="MenuPortal",[vG,yG]=Gl(qR,{forceMount:void 0}),bG=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=hp(qR,t);return k.createElement(vG,{scope:t,forceMount:n},k.createElement(Da,{present:n||i.open},k.createElement(fx,{asChild:!0,container:o},r)))},Fa="MenuContent",[EG,zR]=Gl(Fa),wG=k.forwardRef((e,t)=>{const n=yG(Fa,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=hp(Fa,e.__scopeMenu),s=Lx(Fa,e.__scopeMenu);return k.createElement(Dx.Provider,{scope:e.__scopeMenu},k.createElement(Da,{present:r||i.open},k.createElement(Dx.Slot,{scope:e.__scopeMenu},s.modal?k.createElement(xG,Ze({},o,{ref:t})):k.createElement(SG,Ze({},o,{ref:t})))))}),xG=k.forwardRef((e,t)=>{const n=hp(Fa,e.__scopeMenu),r=k.useRef(null),o=ar(t,r);return k.useEffect(()=>{const i=r.current;if(i)return GL(i)},[]),k.createElement(HR,Ze({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:dt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),SG=k.forwardRef((e,t)=>{const n=hp(Fa,e.__scopeMenu);return k.createElement(HR,Ze({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),HR=k.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:g,onInteractOutside:m,onDismiss:v,disableOutsideScroll:b,...w}=e,N=hp(Fa,n),S=Lx(Fa,n),x=Ix(n),C=BR(n),E=fG(n),[_,I]=k.useState(null),D=k.useRef(null),A=ar(t,D,N.onContentChange),F=k.useRef(0),$=k.useRef(""),q=k.useRef(0),H=k.useRef(null),z=k.useRef("right"),B=k.useRef(0),R=b?HL:k.Fragment,te=b?{as:ku,allowPinchZoom:!0}:void 0,Y=K=>{var Z,re;const J=$.current+K,ie=E().filter(ve=>!ve.disabled),ne=document.activeElement,ae=(Z=ie.find(ve=>ve.ref.current===ne))===null||Z===void 0?void 0:Z.textValue,le=ie.map(ve=>ve.textValue),de=OG(le,J,ae),xe=(re=ie.find(ve=>ve.textValue===de))===null||re===void 0?void 0:re.ref.current;(function ve(qe){$.current=qe,window.clearTimeout(F.current),qe!==""&&(F.current=window.setTimeout(()=>ve(""),1e3))})(J),xe&&setTimeout(()=>xe.focus())};k.useEffect(()=>()=>window.clearTimeout(F.current),[]),IL();const Q=k.useCallback(K=>{var Z,re;return z.current===((Z=H.current)===null||Z===void 0?void 0:Z.side)&&DG(K,(re=H.current)===null||re===void 0?void 0:re.area)},[]);return k.createElement(EG,{scope:n,searchRef:$,onItemEnter:k.useCallback(K=>{Q(K)&&K.preventDefault()},[Q]),onItemLeave:k.useCallback(K=>{var Z;Q(K)||((Z=D.current)===null||Z===void 0||Z.focus(),I(null))},[Q]),onTriggerLeave:k.useCallback(K=>{Q(K)&&K.preventDefault()},[Q]),pointerGraceTimerRef:q,onPointerGraceIntentChange:k.useCallback(K=>{H.current=K},[])},k.createElement(R,te,k.createElement(NL,{asChild:!0,trapped:o,onMountAutoFocus:dt(i,K=>{var Z;K.preventDefault(),(Z=D.current)===null||Z===void 0||Z.focus()}),onUnmountAutoFocus:s},k.createElement(lx,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:g,onInteractOutside:m,onDismiss:v},k.createElement(sG,Ze({asChild:!0},C,{dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:I,onEntryFocus:dt(c,K=>{S.isUsingKeyboardRef.current||K.preventDefault()})}),k.createElement(MR,Ze({role:"menu","aria-orientation":"vertical","data-state":kG(N.open),"data-radix-menu-content":"",dir:S.dir},x,w,{ref:A,style:{outline:"none",...w.style},onKeyDown:dt(w.onKeyDown,K=>{const re=K.target.closest("[data-radix-menu-content]")===K.currentTarget,J=K.ctrlKey||K.altKey||K.metaKey,ie=K.key.length===1;re&&(K.key==="Tab"&&K.preventDefault(),!J&&ie&&Y(K.key));const ne=D.current;if(K.target!==ne||!uG.includes(K.key))return;K.preventDefault();const le=E().filter(de=>!de.disabled).map(de=>de.ref.current);jR.includes(K.key)&&le.reverse(),NG(le)}),onBlur:dt(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(F.current),$.current="")}),onPointerMove:dt(e.onPointerMove,Fx(K=>{const Z=K.target,re=B.current!==K.clientX;if(K.currentTarget.contains(Z)&&re){const J=K.clientX>B.current?"right":"left";z.current=J,B.current=K.clientX}}))})))))))}),Rx="MenuItem",WR="menu.itemSelect",TG=k.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=k.useRef(null),s=Lx(Rx,e.__scopeMenu),l=zR(Rx,e.__scopeMenu),c=ar(t,i),f=k.useRef(!1),d=()=>{const g=i.current;if(!n&&g){const m=new CustomEvent(WR,{bubbles:!0,cancelable:!0});g.addEventListener(WR,v=>r==null?void 0:r(v),{once:!0}),xL(g,m),m.defaultPrevented?f.current=!1:s.onClose()}};return k.createElement(CG,Ze({},o,{ref:c,disabled:n,onClick:dt(e.onClick,d),onPointerDown:g=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,g),f.current=!0},onPointerUp:dt(e.onPointerUp,g=>{var m;f.current||(m=g.currentTarget)===null||m===void 0||m.click()}),onKeyDown:dt(e.onKeyDown,g=>{const m=l.searchRef.current!=="";n||m&&g.key===" "||lG.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})}))}),CG=k.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=zR(Rx,n),l=BR(n),c=k.useRef(null),f=ar(t,c),[d,g]=k.useState(!1),[m,v]=k.useState("");return k.useEffect(()=>{const b=c.current;if(b){var w;v(((w=b.textContent)!==null&&w!==void 0?w:"").trim())}},[i.children]),k.createElement(Dx.ItemSlot,{scope:n,disabled:r,textValue:o??m},k.createElement(aG,Ze({asChild:!0},l,{focusable:!r}),k.createElement(lr.div,Ze({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:f,onPointerMove:dt(e.onPointerMove,Fx(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus())})),onPointerLeave:dt(e.onPointerLeave,Fx(b=>s.onItemLeave(b))),onFocus:dt(e.onFocus,()=>g(!0)),onBlur:dt(e.onBlur,()=>g(!1))}))))});Gl("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),Gl("MenuItemIndicator",{checked:!1}),Gl("MenuSub");function kG(e){return e?"open":"closed"}function NG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function _G(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function OG(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=_G(e,Math.max(i,0));o.length===1&&(s=s.filter(f=>f!==n));const c=s.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function AG(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i].x,c=t[i].y,f=t[s].x,d=t[s].y;c>r!=d>r&&n<(f-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function DG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return AG(n,t)}function Fx(e){return t=>t.pointerType==="mouse"?e(t):void 0}const IG=mG,LG=gG,RG=bG,FG=wG,MG=TG,GR="DropdownMenu",[PG,Due]=zl(GR,[UR]),mp=UR(),[$G,YR]=PG(GR),VG=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=mp(t),f=k.useRef(null),[d=!1,g]=vv({prop:o,defaultProp:i,onChange:s});return k.createElement($G,{scope:t,triggerId:Hl(),triggerRef:f,contentId:Hl(),open:d,onOpenChange:g,onOpenToggle:k.useCallback(()=>g(m=>!m),[g]),modal:l},k.createElement(IG,Ze({},c,{open:d,onOpenChange:g,dir:r,modal:l}),n))},jG="DropdownMenuTrigger",UG=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=YR(jG,n),s=mp(n);return k.createElement(LG,Ze({asChild:!0},s),k.createElement(lr.button,Ze({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},o,{ref:ix(t,i.triggerRef),onPointerDown:dt(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:dt(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})))}),BG=e=>{const{__scopeDropdownMenu:t,...n}=e,r=mp(t);return k.createElement(RG,Ze({},r,n))},qG="DropdownMenuContent",zG=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=YR(qG,n),i=mp(n),s=k.useRef(!1);return k.createElement(FG,Ze({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:dt(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:dt(e.onInteractOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,d=c.button===2||f;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),HG=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=mp(n);return k.createElement(MG,Ze({},o,r,{ref:t}))}),WG=VG,GG=UG,YG=BG,QG=zG,KG=HG;var Tt={},QR={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""},Mx=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Fu={},KR={};function JG(e){var t,n,r=KR[e];if(r)return r;for(r=KR[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}function Mv(e,t,n){var r,o,i,s,l,c="";for(typeof t!="string"&&(n=t,t=Mv.defaultChars),typeof n>"u"&&(n=!0),l=JG(t),r=0,o=e.length;r<o;r++){if(i=e.charCodeAt(r),n&&i===37&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){c+=e.slice(r,r+3),r+=2;continue}if(i<128){c+=l[i];continue}if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<o&&(s=e.charCodeAt(r+1),s>=56320&&s<=57343)){c+=encodeURIComponent(e[r]+e[r+1]),r++;continue}c+="%EF%BF%BD";continue}c+=encodeURIComponent(e[r])}return c}Mv.defaultChars=";/?:@&=+$,-_.!~*'()#",Mv.componentChars="-_.!~*'()";var XG=Mv,JR={};function ZG(e){var t,n,r=JR[e];if(r)return r;for(r=JR[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),r.push(n);for(t=0;t<e.length;t++)n=e.charCodeAt(t),r[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return r}function Pv(e,t){var n;return typeof t!="string"&&(t=Pv.defaultChars),n=ZG(t),e.replace(/(%[a-f0-9]{2})+/gi,function(r){var o,i,s,l,c,f,d,g="";for(o=0,i=r.length;o<i;o+=3){if(s=parseInt(r.slice(o+1,o+3),16),s<128){g+=n[s];continue}if((s&224)===192&&o+3<i&&(l=parseInt(r.slice(o+4,o+6),16),(l&192)===128)){d=s<<6&1984|l&63,d<128?g+="��":g+=String.fromCharCode(d),o+=3;continue}if((s&240)===224&&o+6<i&&(l=parseInt(r.slice(o+4,o+6),16),c=parseInt(r.slice(o+7,o+9),16),(l&192)===128&&(c&192)===128)){d=s<<12&61440|l<<6&4032|c&63,d<2048||d>=55296&&d<=57343?g+="���":g+=String.fromCharCode(d),o+=6;continue}if((s&248)===240&&o+9<i&&(l=parseInt(r.slice(o+4,o+6),16),c=parseInt(r.slice(o+7,o+9),16),f=parseInt(r.slice(o+10,o+12),16),(l&192)===128&&(c&192)===128&&(f&192)===128)){d=s<<18&1835008|l<<12&258048|c<<6&4032|f&63,d<65536||d>1114111?g+="����":(d-=65536,g+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}g+="�"}return g})}Pv.defaultChars=";/?:@&=+$,#",Pv.componentChars="";var eY=Pv,tY=function(t){var n="";return n+=t.protocol||"",n+=t.slashes?"//":"",n+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?n+="["+t.hostname+"]":n+=t.hostname||"",n+=t.port?":"+t.port:"",n+=t.pathname||"",n+=t.search||"",n+=t.hash||"",n};function $v(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var nY=/^([a-z0-9.+-]+:)/i,rY=/:[0-9]*$/,oY=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,iY=["<",">",'"',"`"," ","\r",`
`," "],sY=["{","}","|","\\","^","`"].concat(iY),aY=["'"].concat(sY),XR=["%","/","?",";","#"].concat(aY),ZR=["/","?","#"],lY=255,eF=/^[+a-z0-9A-Z_-]{0,63}$/,cY=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,tF={javascript:!0,"javascript:":!0},nF={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function uY(e,t){if(e&&e instanceof $v)return e;var n=new $v;return n.parse(e,t),n}$v.prototype.parse=function(e,t){var n,r,o,i,s,l=e;if(l=l.trim(),!t&&e.split("#").length===1){var c=oY.exec(l);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var f=nY.exec(l);if(f&&(f=f[0],o=f.toLowerCase(),this.protocol=f,l=l.substr(f.length)),(t||f||l.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=l.substr(0,2)==="//",s&&!(f&&tF[f])&&(l=l.substr(2),this.slashes=!0)),!tF[f]&&(s||f&&!nF[f])){var d=-1;for(n=0;n<ZR.length;n++)i=l.indexOf(ZR[n]),i!==-1&&(d===-1||i<d)&&(d=i);var g,m;for(d===-1?m=l.lastIndexOf("@"):m=l.lastIndexOf("@",d),m!==-1&&(g=l.slice(0,m),l=l.slice(m+1),this.auth=g),d=-1,n=0;n<XR.length;n++)i=l.indexOf(XR[n]),i!==-1&&(d===-1||i<d)&&(d=i);d===-1&&(d=l.length),l[d-1]===":"&&d--;var v=l.slice(0,d);l=l.slice(d),this.parseHost(v),this.hostname=this.hostname||"";var b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b){var w=this.hostname.split(/\./);for(n=0,r=w.length;n<r;n++){var N=w[n];if(N&&!N.match(eF)){for(var S="",x=0,C=N.length;x<C;x++)N.charCodeAt(x)>127?S+="x":S+=N[x];if(!S.match(eF)){var E=w.slice(0,n),_=w.slice(n+1),I=N.match(cY);I&&(E.push(I[1]),_.unshift(I[2])),_.length&&(l=_.join(".")+l),this.hostname=E.join(".");break}}}}this.hostname.length>lY&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=l.indexOf("#");D!==-1&&(this.hash=l.substr(D),l=l.slice(0,D));var A=l.indexOf("?");return A!==-1&&(this.search=l.substr(A),l=l.slice(0,A)),l&&(this.pathname=l),nF[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},$v.prototype.parseHost=function(e){var t=rY.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var fY=uY;Fu.encode=XG,Fu.decode=eY,Fu.format=tY,Fu.parse=fY;var Yl={},Px,rF;function oF(){return rF||(rF=1,Px=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Px}var $x,iF;function sF(){return iF||(iF=1,$x=/[\0-\x1F\x7F-\x9F]/),$x}var Vx,aF;function dY(){return aF||(aF=1,Vx=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),Vx}var jx,lF;function cF(){return lF||(lF=1,jx=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),jx}var uF;function pY(){return uF||(uF=1,Yl.Any=oF(),Yl.Cc=sF(),Yl.Cf=dY(),Yl.P=Mx,Yl.Z=cF()),Yl}(function(e){function t(B){return Object.prototype.toString.call(B)}function n(B){return t(B)==="[object String]"}var r=Object.prototype.hasOwnProperty;function o(B,R){return r.call(B,R)}function i(B){var R=Array.prototype.slice.call(arguments,1);return R.forEach(function(te){if(te){if(typeof te!="object")throw new TypeError(te+"must be object");Object.keys(te).forEach(function(Y){B[Y]=te[Y]})}}),B}function s(B,R,te){return[].concat(B.slice(0,R),te,B.slice(R+1))}function l(B){return!(B>=55296&&B<=57343||B>=64976&&B<=65007||(B&65535)===65535||(B&65535)===65534||B>=0&&B<=8||B===11||B>=14&&B<=31||B>=127&&B<=159||B>1114111)}function c(B){if(B>65535){B-=65536;var R=55296+(B>>10),te=56320+(B&1023);return String.fromCharCode(R,te)}return String.fromCharCode(B)}var f=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,d=/&([a-z#][a-z0-9]{1,31});/gi,g=new RegExp(f.source+"|"+d.source,"gi"),m=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,v=QR;function b(B,R){var te=0;return o(v,R)?v[R]:R.charCodeAt(0)===35&&m.test(R)&&(te=R[1].toLowerCase()==="x"?parseInt(R.slice(2),16):parseInt(R.slice(1),10),l(te))?c(te):B}function w(B){return B.indexOf("\\")<0?B:B.replace(f,"$1")}function N(B){return B.indexOf("\\")<0&&B.indexOf("&")<0?B:B.replace(g,function(R,te,Y){return te||b(R,Y)})}var S=/[&<>"]/,x=/[&<>"]/g,C={"&":"&","<":"<",">":">",'"':"""};function E(B){return C[B]}function _(B){return S.test(B)?B.replace(x,E):B}var I=/[.?*+^$[\]\\(){}|-]/g;function D(B){return B.replace(I,"\\$&")}function A(B){switch(B){case 9:case 32:return!0}return!1}function F(B){if(B>=8192&&B<=8202)return!0;switch(B){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var $=Mx;function q(B){return $.test(B)}function H(B){switch(B){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function z(B){return B=B.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(B=B.replace(/ẞ/g,"ß")),B.toLowerCase().toUpperCase()}e.lib={},e.lib.mdurl=Fu,e.lib.ucmicro=pY(),e.assign=i,e.isString=n,e.has=o,e.unescapeMd=w,e.unescapeAll=N,e.isValidEntityCode=l,e.fromCodePoint=c,e.escapeHtml=_,e.arrayReplaceAt=s,e.isSpace=A,e.isWhiteSpace=F,e.isMdAsciiPunct=H,e.isPunctChar=q,e.escapeRE=D,e.normalizeReference=z})(Tt);var Vv={},hY=function(t,n,r){var o,i,s,l,c=-1,f=t.posMax,d=t.pos;for(t.pos=n+1,o=1;t.pos<f;){if(s=t.src.charCodeAt(t.pos),s===93&&(o--,o===0)){i=!0;break}if(l=t.pos,t.md.inline.skipToken(t),s===91){if(l===t.pos-1)o++;else if(r)return t.pos=d,-1}}return i&&(c=t.pos),t.pos=d,c},fF=Tt.unescapeAll,mY=function(t,n,r){var o,i,s=0,l=n,c={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(n)===60){for(n++;n<r;){if(o=t.charCodeAt(n),o===10||o===60)return c;if(o===62)return c.pos=n+1,c.str=fF(t.slice(l+1,n)),c.ok=!0,c;if(o===92&&n+1<r){n+=2;continue}n++}return c}for(i=0;n<r&&(o=t.charCodeAt(n),!(o===32||o<32||o===127));){if(o===92&&n+1<r){if(t.charCodeAt(n+1)===32)break;n+=2;continue}if(o===40&&(i++,i>32))return c;if(o===41){if(i===0)break;i--}n++}return l===n||i!==0||(c.str=fF(t.slice(l,n)),c.lines=s,c.pos=n,c.ok=!0),c},gY=Tt.unescapeAll,vY=function(t,n,r){var o,i,s=0,l=n,c={ok:!1,pos:0,lines:0,str:""};if(n>=r||(i=t.charCodeAt(n),i!==34&&i!==39&&i!==40))return c;for(n++,i===40&&(i=41);n<r;){if(o=t.charCodeAt(n),o===i)return c.pos=n+1,c.lines=s,c.str=gY(t.slice(l+1,n)),c.ok=!0,c;if(o===40&&i===41)return c;o===10?s++:o===92&&n+1<r&&(n++,t.charCodeAt(n)===10&&s++),n++}return c};Vv.parseLinkLabel=hY,Vv.parseLinkDestination=mY,Vv.parseLinkTitle=vY;var yY=Tt.assign,bY=Tt.unescapeAll,Ql=Tt.escapeHtml,Qi={};Qi.code_inline=function(e,t,n,r,o){var i=e[t];return"<code"+o.renderAttrs(i)+">"+Ql(e[t].content)+"</code>"},Qi.code_block=function(e,t,n,r,o){var i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+Ql(e[t].content)+`</code></pre>
`},Qi.fence=function(e,t,n,r,o){var i=e[t],s=i.info?bY(i.info).trim():"",l="",c="",f,d,g,m,v;return s&&(g=s.split(/(\s+)/g),l=g[0],c=g.slice(2).join("")),n.highlight?f=n.highlight(i.content,l,c)||Ql(i.content):f=Ql(i.content),f.indexOf("<pre")===0?f+`
`:s?(d=i.attrIndex("class"),m=i.attrs?i.attrs.slice():[],d<0?m.push(["class",n.langPrefix+l]):(m[d]=m[d].slice(),m[d][1]+=" "+n.langPrefix+l),v={attrs:m},"<pre><code"+o.renderAttrs(v)+">"+f+`</code></pre>
`):"<pre><code"+o.renderAttrs(i)+">"+f+`</code></pre>
`},Qi.image=function(e,t,n,r,o){var i=e[t];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(e,t,n)},Qi.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
`:`<br>
`},Qi.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`},Qi.text=function(e,t){return Ql(e[t].content)},Qi.html_block=function(e,t){return e[t].content},Qi.html_inline=function(e,t){return e[t].content};function Mu(){this.rules=yY({},Qi)}Mu.prototype.renderAttrs=function(t){var n,r,o;if(!t.attrs)return"";for(o="",n=0,r=t.attrs.length;n<r;n++)o+=" "+Ql(t.attrs[n][0])+'="'+Ql(t.attrs[n][1])+'"';return o},Mu.prototype.renderToken=function(t,n,r){var o,i="",s=!1,l=t[n];return l.hidden?"":(l.block&&l.nesting!==-1&&n&&t[n-1].hidden&&(i+=`
`),i+=(l.nesting===-1?"</":"<")+l.tag,i+=this.renderAttrs(l),l.nesting===0&&r.xhtmlOut&&(i+=" /"),l.block&&(s=!0,l.nesting===1&&n+1<t.length&&(o=t[n+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===l.tag)&&(s=!1))),i+=s?`>
`:">",i)},Mu.prototype.renderInline=function(e,t,n){for(var r,o="",i=this.rules,s=0,l=e.length;s<l;s++)r=e[s].type,typeof i[r]<"u"?o+=i[r](e,s,t,n,this):o+=this.renderToken(e,s,t);return o},Mu.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=0,i=e.length;o<i;o++)e[o].type==="text"?r+=e[o].content:e[o].type==="image"?r+=this.renderInlineAsText(e[o].children,t,n):e[o].type==="softbreak"&&(r+=`
`);return r},Mu.prototype.render=function(e,t,n){var r,o,i,s="",l=this.rules;for(r=0,o=e.length;r<o;r++)i=e[r].type,i==="inline"?s+=this.renderInline(e[r].children,t,n):typeof l[i]<"u"?s+=l[e[r].type](e,r,t,n,this):s+=this.renderToken(e,r,t,n);return s};var EY=Mu;function Ti(){this.__rules__=[],this.__cache__=null}Ti.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Ti.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})},Ti.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},Ti.prototype.before=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Ti.prototype.after=function(e,t,n,r){var o=this.__find__(e),i=r||{};if(o===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Ti.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},Ti.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(r){var o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!0,n.push(r)},this),this.__cache__=null,n},Ti.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)},Ti.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(r){var o=this.__find__(r);if(o<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[o].enabled=!1,n.push(r)},this),this.__cache__=null,n},Ti.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};var Ux=Ti,wY=/\r\n?|\n/g,xY=/\0/g,SY=function(t){var n;n=t.src.replace(wY,`
`),n=n.replace(xY,"�"),t.src=n},TY=function(t){var n;t.inlineMode?(n=new t.Token("inline","",0),n.content=t.src,n.map=[0,1],n.children=[],t.tokens.push(n)):t.md.block.parse(t.src,t.md,t.env,t.tokens)},CY=function(t){var n=t.tokens,r,o,i;for(o=0,i=n.length;o<i;o++)r=n[o],r.type==="inline"&&t.md.inline.parse(r.content,t.md,t.env,r.children)},kY=Tt.arrayReplaceAt;function NY(e){return/^<a[>\s]/i.test(e)}function _Y(e){return/^<\/a\s*>/i.test(e)}var OY=function(t){var n,r,o,i,s,l,c,f,d,g,m,v,b,w,N,S,x=t.tokens,C;if(t.md.options.linkify){for(r=0,o=x.length;r<o;r++)if(!(x[r].type!=="inline"||!t.md.linkify.pretest(x[r].content)))for(i=x[r].children,b=0,n=i.length-1;n>=0;n--){if(l=i[n],l.type==="link_close"){for(n--;i[n].level!==l.level&&i[n].type!=="link_open";)n--;continue}if(l.type==="html_inline"&&(NY(l.content)&&b>0&&b--,_Y(l.content)&&b++),!(b>0)&&l.type==="text"&&t.md.linkify.test(l.content)){for(d=l.content,C=t.md.linkify.match(d),c=[],v=l.level,m=0,f=0;f<C.length;f++)w=C[f].url,N=t.md.normalizeLink(w),t.md.validateLink(N)&&(S=C[f].text,C[f].schema?C[f].schema==="mailto:"&&!/^mailto:/i.test(S)?S=t.md.normalizeLinkText("mailto:"+S).replace(/^mailto:/,""):S=t.md.normalizeLinkText(S):S=t.md.normalizeLinkText("http://"+S).replace(/^http:\/\//,""),g=C[f].index,g>m&&(s=new t.Token("text","",0),s.content=d.slice(m,g),s.level=v,c.push(s)),s=new t.Token("link_open","a",1),s.attrs=[["href",N]],s.level=v++,s.markup="linkify",s.info="auto",c.push(s),s=new t.Token("text","",0),s.content=S,s.level=v,c.push(s),s=new t.Token("link_close","a",-1),s.level=--v,s.markup="linkify",s.info="auto",c.push(s),m=C[f].lastIndex);m<d.length&&(s=new t.Token("text","",0),s.content=d.slice(m),s.level=v,c.push(s)),x[r].children=i=kY(i,n,c)}}}},dF=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,AY=/\((c|tm|r|p)\)/i,DY=/\((c|tm|r|p)\)/ig,IY={c:"©",r:"®",p:"§",tm:"™"};function LY(e,t){return IY[t.toLowerCase()]}function RY(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)n=e[t],n.type==="text"&&!r&&(n.content=n.content.replace(DY,LY)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function FY(e){var t,n,r=0;for(t=e.length-1;t>=0;t--)n=e[t],n.type==="text"&&!r&&dF.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}var MY=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(AY.test(t.tokens[n].content)&&RY(t.tokens[n].children),dF.test(t.tokens[n].content)&&FY(t.tokens[n].children))},pF=Tt.isWhiteSpace,hF=Tt.isPunctChar,mF=Tt.isMdAsciiPunct,PY=/['"]/,gF=/['"]/g,vF="’";function jv(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function $Y(e,t){var n,r,o,i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,I;for(E=[],n=0;n<e.length;n++){for(r=e[n],c=e[n].level,x=E.length-1;x>=0&&!(E[x].level<=c);x--);if(E.length=x+1,r.type==="text"){o=r.content,s=0,l=o.length;e:for(;s<l&&(gF.lastIndex=s,i=gF.exec(o),!!i);){if(N=S=!0,s=i.index+1,C=i[0]==="'",d=32,i.index-1>=0)d=o.charCodeAt(i.index-1);else for(x=n-1;x>=0&&!(e[x].type==="softbreak"||e[x].type==="hardbreak");x--)if(e[x].content){d=e[x].content.charCodeAt(e[x].content.length-1);break}if(g=32,s<l)g=o.charCodeAt(s);else for(x=n+1;x<e.length&&!(e[x].type==="softbreak"||e[x].type==="hardbreak");x++)if(e[x].content){g=e[x].content.charCodeAt(0);break}if(m=mF(d)||hF(String.fromCharCode(d)),v=mF(g)||hF(String.fromCharCode(g)),b=pF(d),w=pF(g),w?N=!1:v&&(b||m||(N=!1)),b?S=!1:m&&(w||v||(S=!1)),g===34&&i[0]==='"'&&d>=48&&d<=57&&(S=N=!1),N&&S&&(N=m,S=v),!N&&!S){C&&(r.content=jv(r.content,i.index,vF));continue}if(S){for(x=E.length-1;x>=0&&(f=E[x],!(E[x].level<c));x--)if(f.single===C&&E[x].level===c){f=E[x],C?(_=t.md.options.quotes[2],I=t.md.options.quotes[3]):(_=t.md.options.quotes[0],I=t.md.options.quotes[1]),r.content=jv(r.content,i.index,I),e[f.token].content=jv(e[f.token].content,f.pos,_),s+=I.length-1,f.token===n&&(s+=_.length-1),o=r.content,l=o.length,E.length=x;continue e}}N?E.push({token:n,pos:i.index,single:C,level:c}):S&&C&&(r.content=jv(r.content,i.index,vF))}}}}var VY=function(t){var n;if(t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type!=="inline"||!PY.test(t.tokens[n].content)||$Y(t.tokens[n].children,t)};function Pu(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Pu.prototype.attrIndex=function(t){var n,r,o;if(!this.attrs)return-1;for(n=this.attrs,r=0,o=n.length;r<o;r++)if(n[r][0]===t)return r;return-1},Pu.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},Pu.prototype.attrSet=function(t,n){var r=this.attrIndex(t),o=[t,n];r<0?this.attrPush(o):this.attrs[r]=o},Pu.prototype.attrGet=function(t){var n=this.attrIndex(t),r=null;return n>=0&&(r=this.attrs[n][1]),r},Pu.prototype.attrJoin=function(t,n){var r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};var Bx=Pu,jY=Bx;function yF(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}yF.prototype.Token=jY;var UY=yF,BY=Ux,qx=[["normalize",SY],["block",TY],["inline",CY],["linkify",OY],["replacements",MY],["smartquotes",VY]];function zx(){this.ruler=new BY;for(var e=0;e<qx.length;e++)this.ruler.push(qx[e][0],qx[e][1])}zx.prototype.process=function(e){var t,n,r;for(r=this.ruler.getRules(""),t=0,n=r.length;t<n;t++)r[t](e)},zx.prototype.State=UY;var qY=zx,Hx=Tt.isSpace;function Wx(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function bF(e){var t=[],n=0,r=e.length,o,i=!1,s=0,l="";for(o=e.charCodeAt(n);n<r;)o===124&&(i?(l+=e.substring(s,n-1),s=n):(t.push(l+e.substring(s,n)),l="",s=n+1)),i=o===92,n++,o=e.charCodeAt(n);return t.push(l+e.substring(s)),t}var zY=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,I;if(n+2>r||(d=n+1,t.sCount[d]<t.blkIndent)||t.sCount[d]-t.blkIndent>=4||(l=t.bMarks[d]+t.tShift[d],l>=t.eMarks[d])||(_=t.src.charCodeAt(l++),_!==124&&_!==45&&_!==58)||l>=t.eMarks[d]||(I=t.src.charCodeAt(l++),I!==124&&I!==45&&I!==58&&!Hx(I))||_===45&&Hx(I))return!1;for(;l<t.eMarks[d];){if(i=t.src.charCodeAt(l),i!==124&&i!==45&&i!==58&&!Hx(i))return!1;l++}for(s=Wx(t,n+1),g=s.split("|"),b=[],c=0;c<g.length;c++){if(w=g[c].trim(),!w){if(c===0||c===g.length-1)continue;return!1}if(!/^:?-+:?$/.test(w))return!1;w.charCodeAt(w.length-1)===58?b.push(w.charCodeAt(0)===58?"center":"right"):w.charCodeAt(0)===58?b.push("left"):b.push("")}if(s=Wx(t,n).trim(),s.indexOf("|")===-1||t.sCount[n]-t.blkIndent>=4||(g=bF(s),g.length&&g[0]===""&&g.shift(),g.length&&g[g.length-1]===""&&g.pop(),m=g.length,m===0||m!==b.length))return!1;if(o)return!0;for(x=t.parentType,t.parentType="table",E=t.md.block.ruler.getRules("blockquote"),v=t.push("table_open","table",1),v.map=N=[n,0],v=t.push("thead_open","thead",1),v.map=[n,n+1],v=t.push("tr_open","tr",1),v.map=[n,n+1],c=0;c<g.length;c++)v=t.push("th_open","th",1),b[c]&&(v.attrs=[["style","text-align:"+b[c]]]),v=t.push("inline","",0),v.content=g[c].trim(),v.children=[],v=t.push("th_close","th",-1);for(v=t.push("tr_close","tr",-1),v=t.push("thead_close","thead",-1),d=n+2;d<r&&!(t.sCount[d]<t.blkIndent);d++){for(C=!1,c=0,f=E.length;c<f;c++)if(E[c](t,d,r,!0)){C=!0;break}if(C||(s=Wx(t,d).trim(),!s)||t.sCount[d]-t.blkIndent>=4)break;for(g=bF(s),g.length&&g[0]===""&&g.shift(),g.length&&g[g.length-1]===""&&g.pop(),d===n+2&&(v=t.push("tbody_open","tbody",1),v.map=S=[n+2,0]),v=t.push("tr_open","tr",1),v.map=[d,d+1],c=0;c<m;c++)v=t.push("td_open","td",1),b[c]&&(v.attrs=[["style","text-align:"+b[c]]]),v=t.push("inline","",0),v.content=g[c]?g[c].trim():"",v.children=[],v=t.push("td_close","td",-1);v=t.push("tr_close","tr",-1)}return S&&(v=t.push("tbody_close","tbody",-1),S[1]=d),v=t.push("table_close","table",-1),N[1]=d,t.parentType=x,t.line=d,!0},HY=function(t,n,r){var o,i,s;if(t.sCount[n]-t.blkIndent<4)return!1;for(i=o=n+1;o<r;){if(t.isEmpty(o)){o++;continue}if(t.sCount[o]-t.blkIndent>=4){o++,i=o;continue}break}return t.line=i,s=t.push("code_block","code",0),s.content=t.getLines(n,i,4+t.blkIndent,!1)+`
`,s.map=[n,t.line],!0},WY=function(t,n,r,o){var i,s,l,c,f,d,g,m=!1,v=t.bMarks[n]+t.tShift[n],b=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||v+3>b||(i=t.src.charCodeAt(v),i!==126&&i!==96)||(f=v,v=t.skipChars(v,i),s=v-f,s<3)||(g=t.src.slice(f,v),l=t.src.slice(v,b),i===96&&l.indexOf(String.fromCharCode(i))>=0))return!1;if(o)return!0;for(c=n;c++,!(c>=r||(v=f=t.bMarks[c]+t.tShift[c],b=t.eMarks[c],v<b&&t.sCount[c]<t.blkIndent));)if(t.src.charCodeAt(v)===i&&!(t.sCount[c]-t.blkIndent>=4)&&(v=t.skipChars(v,i),!(v-f<s)&&(v=t.skipSpaces(v),!(v<b)))){m=!0;break}return s=t.sCount[n],t.line=c+(m?1:0),d=t.push("fence","code",0),d.info=l,d.content=t.getLines(n+1,c,s,!0),d.markup=g,d.map=[n,t.line],!0},EF=Tt.isSpace,GY=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,I,D,A,F=t.lineMax,$=t.bMarks[n]+t.tShift[n],q=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt($++)!==62)return!1;if(o)return!0;for(c=v=t.sCount[n]+1,t.src.charCodeAt($)===32?($++,c++,v++,i=!1,E=!0):t.src.charCodeAt($)===9?(E=!0,(t.bsCount[n]+v)%4===3?($++,c++,v++,i=!1):i=!0):E=!1,b=[t.bMarks[n]],t.bMarks[n]=$;$<q&&(s=t.src.charCodeAt($),EF(s));){s===9?v+=4-(v+t.bsCount[n]+(i?1:0))%4:v++;$++}for(w=[t.bsCount[n]],t.bsCount[n]=t.sCount[n]+1+(E?1:0),d=$>=q,x=[t.sCount[n]],t.sCount[n]=v-c,C=[t.tShift[n]],t.tShift[n]=$-t.bMarks[n],I=t.md.block.ruler.getRules("blockquote"),S=t.parentType,t.parentType="blockquote",m=n+1;m<r&&(A=t.sCount[m]<t.blkIndent,$=t.bMarks[m]+t.tShift[m],q=t.eMarks[m],!($>=q));m++){if(t.src.charCodeAt($++)===62&&!A){for(c=v=t.sCount[m]+1,t.src.charCodeAt($)===32?($++,c++,v++,i=!1,E=!0):t.src.charCodeAt($)===9?(E=!0,(t.bsCount[m]+v)%4===3?($++,c++,v++,i=!1):i=!0):E=!1,b.push(t.bMarks[m]),t.bMarks[m]=$;$<q&&(s=t.src.charCodeAt($),EF(s));){s===9?v+=4-(v+t.bsCount[m]+(i?1:0))%4:v++;$++}d=$>=q,w.push(t.bsCount[m]),t.bsCount[m]=t.sCount[m]+1+(E?1:0),x.push(t.sCount[m]),t.sCount[m]=v-c,C.push(t.tShift[m]),t.tShift[m]=$-t.bMarks[m];continue}if(d)break;for(_=!1,l=0,f=I.length;l<f;l++)if(I[l](t,m,r,!0)){_=!0;break}if(_){t.lineMax=m,t.blkIndent!==0&&(b.push(t.bMarks[m]),w.push(t.bsCount[m]),C.push(t.tShift[m]),x.push(t.sCount[m]),t.sCount[m]-=t.blkIndent);break}b.push(t.bMarks[m]),w.push(t.bsCount[m]),C.push(t.tShift[m]),x.push(t.sCount[m]),t.sCount[m]=-1}for(N=t.blkIndent,t.blkIndent=0,D=t.push("blockquote_open","blockquote",1),D.markup=">",D.map=g=[n,0],t.md.block.tokenize(t,n,m),D=t.push("blockquote_close","blockquote",-1),D.markup=">",t.lineMax=F,t.parentType=S,g[1]=t.line,l=0;l<C.length;l++)t.bMarks[l+n]=b[l],t.tShift[l+n]=C[l],t.sCount[l+n]=x[l],t.bsCount[l+n]=w[l];return t.blkIndent=N,!0},YY=Tt.isSpace,QY=function(t,n,r,o){var i,s,l,c,f=t.bMarks[n]+t.tShift[n],d=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(i=t.src.charCodeAt(f++),i!==42&&i!==45&&i!==95))return!1;for(s=1;f<d;){if(l=t.src.charCodeAt(f++),l!==i&&!YY(l))return!1;l===i&&s++}return s<3?!1:(o||(t.line=n+1,c=t.push("hr","hr",0),c.map=[n,t.line],c.markup=Array(s+1).join(String.fromCharCode(i))),!0)},wF=Tt.isSpace;function xF(e,t){var n,r,o,i;return r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],n=e.src.charCodeAt(r++),n!==42&&n!==45&&n!==43||r<o&&(i=e.src.charCodeAt(r),!wF(i))?-1:r}function SF(e,t){var n,r=e.bMarks[t]+e.tShift[t],o=r,i=e.eMarks[t];if(o+1>=i||(n=e.src.charCodeAt(o++),n<48||n>57))return-1;for(;;){if(o>=i)return-1;if(n=e.src.charCodeAt(o++),n>=48&&n<=57){if(o-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return o<i&&(n=e.src.charCodeAt(o),!wF(n))?-1:o}function KY(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}var JY=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_,I,D,A,F,$,q,H,z,B,R,te,Y=!1,Q=!0;if(t.sCount[n]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]<t.blkIndent)return!1;if(o&&t.parentType==="paragraph"&&t.sCount[n]>=t.blkIndent&&(Y=!0),(q=SF(t,n))>=0){if(g=!0,z=t.bMarks[n]+t.tShift[n],S=Number(t.src.slice(z,q-1)),Y&&S!==1)return!1}else if((q=xF(t,n))>=0)g=!1;else return!1;if(Y&&t.skipSpaces(q)>=t.eMarks[n])return!1;if(N=t.src.charCodeAt(q-1),o)return!0;for(w=t.tokens.length,g?(te=t.push("ordered_list_open","ol",1),S!==1&&(te.attrs=[["start",S]])):te=t.push("bullet_list_open","ul",1),te.map=b=[n,0],te.markup=String.fromCharCode(N),C=n,H=!1,R=t.md.block.ruler.getRules("list"),I=t.parentType,t.parentType="list";C<r;){for($=q,x=t.eMarks[C],d=E=t.sCount[C]+q-(t.bMarks[n]+t.tShift[n]);$<x;){if(i=t.src.charCodeAt($),i===9)E+=4-(E+t.bsCount[C])%4;else if(i===32)E++;else break;$++}if(s=$,s>=x?f=1:f=E-d,f>4&&(f=1),c=d+f,te=t.push("list_item_open","li",1),te.markup=String.fromCharCode(N),te.map=m=[n,0],g&&(te.info=t.src.slice(z,q-1)),F=t.tight,A=t.tShift[n],D=t.sCount[n],_=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=c,t.tight=!0,t.tShift[n]=s-t.bMarks[n],t.sCount[n]=E,s>=x&&t.isEmpty(n+1)?t.line=Math.min(t.line+2,r):t.md.block.tokenize(t,n,r,!0),(!t.tight||H)&&(Q=!1),H=t.line-n>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=_,t.tShift[n]=A,t.sCount[n]=D,t.tight=F,te=t.push("list_item_close","li",-1),te.markup=String.fromCharCode(N),C=n=t.line,m[1]=C,s=t.bMarks[n],C>=r||t.sCount[C]<t.blkIndent||t.sCount[n]-t.blkIndent>=4)break;for(B=!1,l=0,v=R.length;l<v;l++)if(R[l](t,C,r,!0)){B=!0;break}if(B)break;if(g){if(q=SF(t,C),q<0)break;z=t.bMarks[C]+t.tShift[C]}else if(q=xF(t,C),q<0)break;if(N!==t.src.charCodeAt(q-1))break}return g?te=t.push("ordered_list_close","ol",-1):te=t.push("bullet_list_close","ul",-1),te.markup=String.fromCharCode(N),b[1]=C,t.line=C,t.parentType=I,Q&&KY(t,w),!0},XY=Tt.normalizeReference,Uv=Tt.isSpace,ZY=function(t,n,r,o){var i,s,l,c,f,d,g,m,v,b,w,N,S,x,C,E,_=0,I=t.bMarks[n]+t.tShift[n],D=t.eMarks[n],A=n+1;if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(I)!==91)return!1;for(;++I<D;)if(t.src.charCodeAt(I)===93&&t.src.charCodeAt(I-1)!==92){if(I+1===D||t.src.charCodeAt(I+1)!==58)return!1;break}for(c=t.lineMax,C=t.md.block.ruler.getRules("reference"),b=t.parentType,t.parentType="reference";A<c&&!t.isEmpty(A);A++)if(!(t.sCount[A]-t.blkIndent>3)&&!(t.sCount[A]<0)){for(x=!1,d=0,g=C.length;d<g;d++)if(C[d](t,A,c,!0)){x=!0;break}if(x)break}for(S=t.getLines(n,A,t.blkIndent,!1).trim(),D=S.length,I=1;I<D;I++){if(i=S.charCodeAt(I),i===91)return!1;if(i===93){v=I;break}else i===10?_++:i===92&&(I++,I<D&&S.charCodeAt(I)===10&&_++)}if(v<0||S.charCodeAt(v+1)!==58)return!1;for(I=v+2;I<D;I++)if(i=S.charCodeAt(I),i===10)_++;else if(!Uv(i))break;if(w=t.md.helpers.parseLinkDestination(S,I,D),!w.ok||(f=t.md.normalizeLink(w.str),!t.md.validateLink(f)))return!1;for(I=w.pos,_+=w.lines,s=I,l=_,N=I;I<D;I++)if(i=S.charCodeAt(I),i===10)_++;else if(!Uv(i))break;for(w=t.md.helpers.parseLinkTitle(S,I,D),I<D&&N!==I&&w.ok?(E=w.str,I=w.pos,_+=w.lines):(E="",I=s,_=l);I<D&&(i=S.charCodeAt(I),!!Uv(i));)I++;if(I<D&&S.charCodeAt(I)!==10&&E)for(E="",I=s,_=l;I<D&&(i=S.charCodeAt(I),!!Uv(i));)I++;return I<D&&S.charCodeAt(I)!==10||(m=XY(S.slice(1,v)),!m)?!1:(o||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[m]>"u"&&(t.env.references[m]={title:E,href:f}),t.parentType=b,t.line=n+_+1),!0)},eQ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Bv={},tQ="[a-zA-Z_:][a-zA-Z0-9:._-]*",nQ="[^\"'=<>`\\x00-\\x20]+",rQ="'[^']*'",oQ='"[^"]*"',iQ="(?:"+nQ+"|"+rQ+"|"+oQ+")",sQ="(?:\\s+"+tQ+"(?:\\s*=\\s*"+iQ+")?)",TF="<[A-Za-z][A-Za-z0-9\\-]*"+sQ+"*\\s*\\/?>",CF="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",aQ="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",lQ="<[?][\\s\\S]*?[?]>",cQ="<![A-Z]+\\s+[^>]*>",uQ="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",fQ=new RegExp("^(?:"+TF+"|"+CF+"|"+aQ+"|"+lQ+"|"+cQ+"|"+uQ+")"),dQ=new RegExp("^(?:"+TF+"|"+CF+")");Bv.HTML_TAG_RE=fQ,Bv.HTML_OPEN_CLOSE_TAG_RE=dQ;var pQ=eQ,hQ=Bv.HTML_OPEN_CLOSE_TAG_RE,$u=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+pQ.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(hQ.source+"\\s*$"),/^$/,!1]],mQ=function(t,n,r,o){var i,s,l,c,f=t.bMarks[n]+t.tShift[n],d=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(f)!==60)return!1;for(c=t.src.slice(f,d),i=0;i<$u.length&&!$u[i][0].test(c);i++);if(i===$u.length)return!1;if(o)return $u[i][2];if(s=n+1,!$u[i][1].test(c)){for(;s<r&&!(t.sCount[s]<t.blkIndent);s++)if(f=t.bMarks[s]+t.tShift[s],d=t.eMarks[s],c=t.src.slice(f,d),$u[i][1].test(c)){c.length!==0&&s++;break}}return t.line=s,l=t.push("html_block","",0),l.map=[n,s],l.content=t.getLines(n,s,t.blkIndent,!0),!0},kF=Tt.isSpace,gQ=function(t,n,r,o){var i,s,l,c,f=t.bMarks[n]+t.tShift[n],d=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(i=t.src.charCodeAt(f),i!==35||f>=d))return!1;for(s=1,i=t.src.charCodeAt(++f);i===35&&f<d&&s<=6;)s++,i=t.src.charCodeAt(++f);return s>6||f<d&&!kF(i)?!1:(o||(d=t.skipSpacesBack(d,f),l=t.skipCharsBack(d,35,f),l>f&&kF(t.src.charCodeAt(l-1))&&(d=l),t.line=n+1,c=t.push("heading_open","h"+String(s),1),c.markup="########".slice(0,s),c.map=[n,t.line],c=t.push("inline","",0),c.content=t.src.slice(f,d).trim(),c.map=[n,t.line],c.children=[],c=t.push("heading_close","h"+String(s),-1),c.markup="########".slice(0,s)),!0)},vQ=function(t,n,r){var o,i,s,l,c,f,d,g,m,v=n+1,b,w=t.md.block.ruler.getRules("paragraph");if(t.sCount[n]-t.blkIndent>=4)return!1;for(b=t.parentType,t.parentType="paragraph";v<r&&!t.isEmpty(v);v++)if(!(t.sCount[v]-t.blkIndent>3)){if(t.sCount[v]>=t.blkIndent&&(f=t.bMarks[v]+t.tShift[v],d=t.eMarks[v],f<d&&(m=t.src.charCodeAt(f),(m===45||m===61)&&(f=t.skipChars(f,m),f=t.skipSpaces(f),f>=d)))){g=m===61?1:2;break}if(!(t.sCount[v]<0)){for(i=!1,s=0,l=w.length;s<l;s++)if(w[s](t,v,r,!0)){i=!0;break}if(i)break}}return g?(o=t.getLines(n,v,t.blkIndent,!1).trim(),t.line=v+1,c=t.push("heading_open","h"+String(g),1),c.markup=String.fromCharCode(m),c.map=[n,t.line],c=t.push("inline","",0),c.content=o,c.map=[n,t.line-1],c.children=[],c=t.push("heading_close","h"+String(g),-1),c.markup=String.fromCharCode(m),t.parentType=b,!0):!1},yQ=function(t,n){var r,o,i,s,l,c,f=n+1,d=t.md.block.ruler.getRules("paragraph"),g=t.lineMax;for(c=t.parentType,t.parentType="paragraph";f<g&&!t.isEmpty(f);f++)if(!(t.sCount[f]-t.blkIndent>3)&&!(t.sCount[f]<0)){for(o=!1,i=0,s=d.length;i<s;i++)if(d[i](t,f,g,!0)){o=!0;break}if(o)break}return r=t.getLines(n,f,t.blkIndent,!1).trim(),t.line=f,l=t.push("paragraph_open","p",1),l.map=[n,t.line],l=t.push("inline","",0),l.content=r,l.map=[n,t.line],l.children=[],l=t.push("paragraph_close","p",-1),t.parentType=c,!0},NF=Bx,qv=Tt.isSpace;function Ki(e,t,n,r){var o,i,s,l,c,f,d,g;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",i=this.src,g=!1,s=l=f=d=0,c=i.length;l<c;l++){if(o=i.charCodeAt(l),!g)if(qv(o)){f++,o===9?d+=4-d%4:d++;continue}else g=!0;(o===10||l===c-1)&&(o!==10&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(f),this.sCount.push(d),this.bsCount.push(0),g=!1,f=0,d=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Ki.prototype.push=function(e,t,n){var r=new NF(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},Ki.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Ki.prototype.skipEmptyLines=function(t){for(var n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},Ki.prototype.skipSpaces=function(t){for(var n,r=this.src.length;t<r&&(n=this.src.charCodeAt(t),!!qv(n));t++);return t},Ki.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!qv(this.src.charCodeAt(--t)))return t+1;return t},Ki.prototype.skipChars=function(t,n){for(var r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t},Ki.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t},Ki.prototype.getLines=function(t,n,r,o){var i,s,l,c,f,d,g,m=t;if(t>=n)return"";for(d=new Array(n-t),i=0;m<n;m++,i++){for(s=0,g=c=this.bMarks[m],m+1<n||o?f=this.eMarks[m]+1:f=this.eMarks[m];c<f&&s<r;){if(l=this.src.charCodeAt(c),qv(l))l===9?s+=4-(s+this.bsCount[m])%4:s++;else if(c-g<this.tShift[m])s++;else break;c++}s>r?d[i]=new Array(s-r+1).join(" ")+this.src.slice(c,f):d[i]=this.src.slice(c,f)}return d.join("")},Ki.prototype.Token=NF;var bQ=Ki,EQ=Ux,zv=[["table",zY,["paragraph","reference"]],["code",HY],["fence",WY,["paragraph","reference","blockquote","list"]],["blockquote",GY,["paragraph","reference","blockquote","list"]],["hr",QY,["paragraph","reference","blockquote","list"]],["list",JY,["paragraph","reference","blockquote"]],["reference",ZY],["html_block",mQ,["paragraph","reference","blockquote"]],["heading",gQ,["paragraph","reference","blockquote"]],["lheading",vQ],["paragraph",yQ]];function Hv(){this.ruler=new EQ;for(var e=0;e<zv.length;e++)this.ruler.push(zv[e][0],zv[e][1],{alt:(zv[e][2]||[]).slice()})}Hv.prototype.tokenize=function(e,t,n){for(var r,o,i=this.ruler.getRules(""),s=i.length,l=t,c=!1,f=e.md.options.maxNesting;l<n&&(e.line=l=e.skipEmptyLines(l),!(l>=n||e.sCount[l]<e.blkIndent));){if(e.level>=f){e.line=n;break}for(o=0;o<s&&(r=i[o](e,l,n,!1),!r);o++);e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),l=e.line,l<n&&e.isEmpty(l)&&(c=!0,l++,e.line=l)}},Hv.prototype.parse=function(e,t,n,r){var o;e&&(o=new this.State(e,t,n,r),this.tokenize(o,o.line,o.lineMax))},Hv.prototype.State=bQ;var wQ=Hv;function xQ(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}for(var SQ=function(t,n){for(var r=t.pos;r<t.posMax&&!xQ(t.src.charCodeAt(r));)r++;return r===t.pos?!1:(n||(t.pending+=t.src.slice(t.pos,r)),t.pos=r,!0)},TQ=Tt.isSpace,CQ=function(t,n){var r,o,i,s=t.pos;if(t.src.charCodeAt(s)!==10)return!1;if(r=t.pending.length-1,o=t.posMax,!n)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){for(i=r-1;i>=1&&t.pending.charCodeAt(i-1)===32;)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(s++;s<o&&TQ(t.src.charCodeAt(s));)s++;return t.pos=s,!0},kQ=Tt.isSpace,Gx=[],_F=0;_F<256;_F++)Gx.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Gx[e.charCodeAt(0)]=1});var NQ=function(t,n){var r,o=t.pos,i=t.posMax;if(t.src.charCodeAt(o)!==92)return!1;if(o++,o<i){if(r=t.src.charCodeAt(o),r<256&&Gx[r]!==0)return n||(t.pending+=t.src[o]),t.pos+=2,!0;if(r===10){for(n||t.push("hardbreak","br",0),o++;o<i&&(r=t.src.charCodeAt(o),!!kQ(r));)o++;return t.pos=o,!0}}return n||(t.pending+="\\"),t.pos++,!0},_Q=function(t,n){var r,o,i,s,l,c,f,d,g=t.pos,m=t.src.charCodeAt(g);if(m!==96)return!1;for(r=g,g++,o=t.posMax;g<o&&t.src.charCodeAt(g)===96;)g++;if(i=t.src.slice(r,g),f=i.length,t.backticksScanned&&(t.backticks[f]||0)<=r)return n||(t.pending+=i),t.pos+=f,!0;for(l=c=g;(l=t.src.indexOf("`",c))!==-1;){for(c=l+1;c<o&&t.src.charCodeAt(c)===96;)c++;if(d=c-l,d===f)return n||(s=t.push("code_inline","code",0),s.markup=i,s.content=t.src.slice(g,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=c,!0;t.backticks[d]=l}return t.backticksScanned=!0,n||(t.pending+=i),t.pos+=f,!0},Wv={};Wv.tokenize=function(t,n){var r,o,i,s,l,c=t.pos,f=t.src.charCodeAt(c);if(n||f!==126||(o=t.scanDelims(t.pos,!0),s=o.length,l=String.fromCharCode(f),s<2))return!1;for(s%2&&(i=t.push("text","",0),i.content=l,s--),r=0;r<s;r+=2)i=t.push("text","",0),i.content=l+l,t.delimiters.push({marker:f,length:0,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return t.pos+=o.length,!0};function OF(e,t){var n,r,o,i,s,l=[],c=t.length;for(n=0;n<c;n++)o=t[n],o.marker===126&&o.end!==-1&&(i=t[o.end],s=e.tokens[o.token],s.type="s_open",s.tag="s",s.nesting=1,s.markup="~~",s.content="",s=e.tokens[i.token],s.type="s_close",s.tag="s",s.nesting=-1,s.markup="~~",s.content="",e.tokens[i.token-1].type==="text"&&e.tokens[i.token-1].content==="~"&&l.push(i.token-1));for(;l.length;){for(n=l.pop(),r=n+1;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,n!==r&&(s=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=s)}}Wv.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(OF(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&OF(t,r[n].delimiters)};var Gv={};Gv.tokenize=function(t,n){var r,o,i,s=t.pos,l=t.src.charCodeAt(s);if(n||l!==95&&l!==42)return!1;for(o=t.scanDelims(t.pos,l===42),r=0;r<o.length;r++)i=t.push("text","",0),i.content=String.fromCharCode(l),t.delimiters.push({marker:l,length:o.length,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return t.pos+=o.length,!0};function AF(e,t){var n,r,o,i,s,l,c=t.length;for(n=c-1;n>=0;n--)r=t[n],!(r.marker!==95&&r.marker!==42)&&r.end!==-1&&(o=t[r.end],l=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),i=e.tokens[r.token],i.type=l?"strong_open":"em_open",i.tag=l?"strong":"em",i.nesting=1,i.markup=l?s+s:s,i.content="",i=e.tokens[o.token],i.type=l?"strong_close":"em_close",i.tag=l?"strong":"em",i.nesting=-1,i.markup=l?s+s:s,i.content="",l&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}Gv.postProcess=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(AF(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&AF(t,r[n].delimiters)};var OQ=Tt.normalizeReference,Yx=Tt.isSpace,AQ=function(t,n){var r,o,i,s,l,c,f,d,g,m="",v="",b=t.pos,w=t.posMax,N=t.pos,S=!0;if(t.src.charCodeAt(t.pos)!==91||(l=t.pos+1,s=t.md.helpers.parseLinkLabel(t,t.pos,!0),s<0))return!1;if(c=s+1,c<w&&t.src.charCodeAt(c)===40){for(S=!1,c++;c<w&&(o=t.src.charCodeAt(c),!(!Yx(o)&&o!==10));c++);if(c>=w)return!1;if(N=c,f=t.md.helpers.parseLinkDestination(t.src,c,t.posMax),f.ok){for(m=t.md.normalizeLink(f.str),t.md.validateLink(m)?c=f.pos:m="",N=c;c<w&&(o=t.src.charCodeAt(c),!(!Yx(o)&&o!==10));c++);if(f=t.md.helpers.parseLinkTitle(t.src,c,t.posMax),c<w&&N!==c&&f.ok)for(v=f.str,c=f.pos;c<w&&(o=t.src.charCodeAt(c),!(!Yx(o)&&o!==10));c++);}(c>=w||t.src.charCodeAt(c)!==41)&&(S=!0),c++}if(S){if(typeof t.env.references>"u")return!1;if(c<w&&t.src.charCodeAt(c)===91?(N=c+1,c=t.md.helpers.parseLinkLabel(t,c),c>=0?i=t.src.slice(N,c++):c=s+1):c=s+1,i||(i=t.src.slice(l,s)),d=t.env.references[OQ(i)],!d)return t.pos=b,!1;m=d.href,v=d.title}return n||(t.pos=l,t.posMax=s,g=t.push("link_open","a",1),g.attrs=r=[["href",m]],v&&r.push(["title",v]),t.md.inline.tokenize(t),g=t.push("link_close","a",-1)),t.pos=c,t.posMax=w,!0},DQ=Tt.normalizeReference,Qx=Tt.isSpace,IQ=function(t,n){var r,o,i,s,l,c,f,d,g,m,v,b,w,N="",S=t.pos,x=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91||(c=t.pos+2,l=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),l<0))return!1;if(f=l+1,f<x&&t.src.charCodeAt(f)===40){for(f++;f<x&&(o=t.src.charCodeAt(f),!(!Qx(o)&&o!==10));f++);if(f>=x)return!1;for(w=f,g=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),g.ok&&(N=t.md.normalizeLink(g.str),t.md.validateLink(N)?f=g.pos:N=""),w=f;f<x&&(o=t.src.charCodeAt(f),!(!Qx(o)&&o!==10));f++);if(g=t.md.helpers.parseLinkTitle(t.src,f,t.posMax),f<x&&w!==f&&g.ok)for(m=g.str,f=g.pos;f<x&&(o=t.src.charCodeAt(f),!(!Qx(o)&&o!==10));f++);else m="";if(f>=x||t.src.charCodeAt(f)!==41)return t.pos=S,!1;f++}else{if(typeof t.env.references>"u")return!1;if(f<x&&t.src.charCodeAt(f)===91?(w=f+1,f=t.md.helpers.parseLinkLabel(t,f),f>=0?s=t.src.slice(w,f++):f=l+1):f=l+1,s||(s=t.src.slice(c,l)),d=t.env.references[DQ(s)],!d)return t.pos=S,!1;N=d.href,m=d.title}return n||(i=t.src.slice(c,l),t.md.inline.parse(i,t.md,t.env,b=[]),v=t.push("image","img",0),v.attrs=r=[["src",N],["alt",""]],v.children=b,v.content=i,m&&r.push(["title",m])),t.pos=f,t.posMax=x,!0},LQ=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,RQ=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,FQ=function(t,n){var r,o,i,s,l,c,f=t.pos;if(t.src.charCodeAt(f)!==60)return!1;for(l=t.pos,c=t.posMax;;){if(++f>=c||(s=t.src.charCodeAt(f),s===60))return!1;if(s===62)break}return r=t.src.slice(l+1,f),RQ.test(r)?(o=t.md.normalizeLink(r),t.md.validateLink(o)?(n||(i=t.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=t.push("text","",0),i.content=t.md.normalizeLinkText(r),i=t.push("link_close","a",-1),i.markup="autolink",i.info="auto"),t.pos+=r.length+2,!0):!1):LQ.test(r)?(o=t.md.normalizeLink("mailto:"+r),t.md.validateLink(o)?(n||(i=t.push("link_open","a",1),i.attrs=[["href",o]],i.markup="autolink",i.info="auto",i=t.push("text","",0),i.content=t.md.normalizeLinkText(r),i=t.push("link_close","a",-1),i.markup="autolink",i.info="auto"),t.pos+=r.length+2,!0):!1):!1},MQ=Bv.HTML_TAG_RE;function PQ(e){var t=e|32;return t>=97&&t<=122}var $Q=function(t,n){var r,o,i,s,l=t.pos;return!t.md.options.html||(i=t.posMax,t.src.charCodeAt(l)!==60||l+2>=i)||(r=t.src.charCodeAt(l+1),r!==33&&r!==63&&r!==47&&!PQ(r))||(o=t.src.slice(l).match(MQ),!o)?!1:(n||(s=t.push("html_inline","",0),s.content=t.src.slice(l,l+o[0].length)),t.pos+=o[0].length,!0)},DF=QR,VQ=Tt.has,jQ=Tt.isValidEntityCode,IF=Tt.fromCodePoint,UQ=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,BQ=/^&([a-z][a-z0-9]{1,31});/i,qQ=function(t,n){var r,o,i,s=t.pos,l=t.posMax;if(t.src.charCodeAt(s)!==38)return!1;if(s+1<l){if(r=t.src.charCodeAt(s+1),r===35){if(i=t.src.slice(s).match(UQ),i)return n||(o=i[1][0].toLowerCase()==="x"?parseInt(i[1].slice(1),16):parseInt(i[1],10),t.pending+=jQ(o)?IF(o):IF(65533)),t.pos+=i[0].length,!0}else if(i=t.src.slice(s).match(BQ),i&&VQ(DF,i[1]))return n||(t.pending+=DF[i[1]]),t.pos+=i[0].length,!0}return n||(t.pending+="&"),t.pos++,!0};function LF(e,t){var n,r,o,i,s,l,c,f,d={},g=t.length;if(g){var m=0,v=-2,b=[];for(n=0;n<g;n++)if(o=t[n],b.push(0),(t[m].marker!==o.marker||v!==o.token-1)&&(m=n),v=o.token,o.length=o.length||0,!!o.close){for(d.hasOwnProperty(o.marker)||(d[o.marker]=[-1,-1,-1,-1,-1,-1]),s=d[o.marker][(o.open?3:0)+o.length%3],r=m-b[m]-1,l=r;r>s;r-=b[r]+1)if(i=t[r],i.marker===o.marker&&i.open&&i.end<0&&(c=!1,(i.close||o.open)&&(i.length+o.length)%3===0&&(i.length%3!==0||o.length%3!==0)&&(c=!0),!c)){f=r>0&&!t[r-1].open?b[r-1]+1:0,b[n]=n-r+f,b[r]=f,o.open=!1,i.end=n,i.close=!1,l=-1,v=-2;break}l!==-1&&(d[o.marker][(o.open?3:0)+(o.length||0)%3]=l)}}}var zQ=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(LF(t,t.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&LF(t,r[n].delimiters)},HQ=function(t){var n,r,o=0,i=t.tokens,s=t.tokens.length;for(n=r=0;n<s;n++)i[n].nesting<0&&o--,i[n].level=o,i[n].nesting>0&&o++,i[n].type==="text"&&n+1<s&&i[n+1].type==="text"?i[n+1].content=i[n].content+i[n+1].content:(n!==r&&(i[r]=i[n]),r++);n!==r&&(i.length=r)},Kx=Bx,RF=Tt.isWhiteSpace,FF=Tt.isPunctChar,MF=Tt.isMdAsciiPunct;function gp(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}gp.prototype.pushPending=function(){var e=new Kx("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},gp.prototype.push=function(e,t,n){this.pending&&this.pushPending();var r=new Kx(e,t,n),o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},gp.prototype.scanDelims=function(e,t){var n=e,r,o,i,s,l,c,f,d,g,m=!0,v=!0,b=this.posMax,w=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;n<b&&this.src.charCodeAt(n)===w;)n++;return i=n-e,o=n<b?this.src.charCodeAt(n):32,f=MF(r)||FF(String.fromCharCode(r)),g=MF(o)||FF(String.fromCharCode(o)),c=RF(r),d=RF(o),d?m=!1:g&&(c||f||(m=!1)),c?v=!1:f&&(d||g||(v=!1)),t?(s=m,l=v):(s=m&&(!v||f),l=v&&(!m||g)),{can_open:s,can_close:l,length:i}},gp.prototype.Token=Kx;var WQ=gp,PF=Ux,Jx=[["text",SQ],["newline",CQ],["escape",NQ],["backticks",_Q],["strikethrough",Wv.tokenize],["emphasis",Gv.tokenize],["link",AQ],["image",IQ],["autolink",FQ],["html_inline",$Q],["entity",qQ]],Xx=[["balance_pairs",zQ],["strikethrough",Wv.postProcess],["emphasis",Gv.postProcess],["text_collapse",HQ]];function vp(){var e;for(this.ruler=new PF,e=0;e<Jx.length;e++)this.ruler.push(Jx[e][0],Jx[e][1]);for(this.ruler2=new PF,e=0;e<Xx.length;e++)this.ruler2.push(Xx[e][0],Xx[e][1])}vp.prototype.skipToken=function(e){var t,n,r=e.pos,o=this.ruler.getRules(""),i=o.length,s=e.md.options.maxNesting,l=e.cache;if(typeof l[r]<"u"){e.pos=l[r];return}if(e.level<s)for(n=0;n<i&&(e.level++,t=o[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,l[r]=e.pos},vp.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,i=e.posMax,s=e.md.options.maxNesting;e.pos<i;){if(e.level<s)for(n=0;n<o&&(t=r[n](e,!1),!t);n++);if(t){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},vp.prototype.parse=function(e,t,n,r){var o,i,s,l=new this.State(e,t,n,r);for(this.tokenize(l),i=this.ruler2.getRules(""),s=i.length,o=0;o<s;o++)i[o](l)},vp.prototype.State=WQ;var GQ=vp,Zx,$F;function YQ(){return $F||($F=1,Zx=function(e){var t={};t.src_Any=oF().source,t.src_Cc=sF().source,t.src_Z=cF().source,t.src_P=Mx.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}),Zx}function eS(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function Yv(e){return Object.prototype.toString.call(e)}function QQ(e){return Yv(e)==="[object String]"}function KQ(e){return Yv(e)==="[object Object]"}function JQ(e){return Yv(e)==="[object RegExp]"}function VF(e){return Yv(e)==="[object Function]"}function XQ(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var jF={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ZQ(e){return Object.keys(e||{}).reduce(function(t,n){return t||jF.hasOwnProperty(n)},!1)}var eK={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},tK="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",nK="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function rK(e){e.__index__=-1,e.__text_cache__=""}function oK(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function UF(){return function(e,t){t.normalize(e)}}function Qv(e){var t=e.re=YQ()(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(tK),n.push(t.src_xn),t.src_tlds=n.join("|");function r(l){return l.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");var o=[];e.__compiled__={};function i(l,c){throw new Error('(LinkifyIt) Invalid schema "'+l+'": '+c)}Object.keys(e.__schemas__).forEach(function(l){var c=e.__schemas__[l];if(c!==null){var f={validate:null,link:null};if(e.__compiled__[l]=f,KQ(c)){JQ(c.validate)?f.validate=oK(c.validate):VF(c.validate)?f.validate=c.validate:i(l,c),VF(c.normalize)?f.normalize=c.normalize:c.normalize?i(l,c):f.normalize=UF();return}if(QQ(c)){o.push(l);return}i(l,c)}}),o.forEach(function(l){e.__compiled__[e.__schemas__[l]]&&(e.__compiled__[l].validate=e.__compiled__[e.__schemas__[l]].validate,e.__compiled__[l].normalize=e.__compiled__[e.__schemas__[l]].normalize)}),e.__compiled__[""]={validate:null,normalize:UF()};var s=Object.keys(e.__compiled__).filter(function(l){return l.length>0&&e.__compiled__[l]}).map(XQ).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),rK(e)}function iK(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function BF(e,t){var n=new iK(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Yo(e,t){if(!(this instanceof Yo))return new Yo(e,t);t||ZQ(e)&&(t=e,e={}),this.__opts__=eS({},jF,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=eS({},eK,e),this.__compiled__={},this.__tlds__=nK,this.__tlds_replaced__=!1,this.re={},Qv(this)}Yo.prototype.add=function(t,n){return this.__schemas__[t]=n,Qv(this),this},Yo.prototype.set=function(t){return this.__opts__=eS(this.__opts__,t),this},Yo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var n,r,o,i,s,l,c,f,d;if(this.re.schema_test.test(t)){for(c=this.re.schema_search,c.lastIndex=0;(n=c.exec(t))!==null;)if(i=this.testSchemaAt(t,n[2],c.lastIndex),i){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(f=t.search(this.re.host_fuzzy_test),f>=0&&(this.__index__<0||f<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=t.indexOf("@"),d>=0&&(o=t.match(this.re.email_fuzzy))!==null&&(s=o.index+o[1].length,l=o.index+o[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&l>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=l))),this.__index__>=0},Yo.prototype.pretest=function(t){return this.re.pretest.test(t)},Yo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0},Yo.prototype.match=function(t){var n=0,r=[];this.__index__>=0&&this.__text_cache__===t&&(r.push(BF(this,n)),n=this.__last_index__);for(var o=n?t.slice(n):t;this.test(o);)r.push(BF(this,n)),o=o.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},Yo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,o,i){return r!==i[o-1]}).reverse(),Qv(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Qv(this),this)},Yo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},Yo.prototype.onCompile=function(){};var sK=Yo,Kv={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */Kv.exports,function(e,t){(function(n){var r=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,i=typeof ci=="object"&&ci;(i.global===i||i.window===i||i.self===i)&&(n=i);var s,l=2147483647,c=36,f=1,d=26,g=38,m=700,v=72,b=128,w="-",N=/^xn--/,S=/[^\x20-\x7E]/,x=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=c-f,_=Math.floor,I=String.fromCharCode,D;function A(Z){throw RangeError(C[Z])}function F(Z,re){for(var J=Z.length,ie=[];J--;)ie[J]=re(Z[J]);return ie}function $(Z,re){var J=Z.split("@"),ie="";J.length>1&&(ie=J[0]+"@",Z=J[1]),Z=Z.replace(x,".");var ne=Z.split("."),ae=F(ne,re).join(".");return ie+ae}function q(Z){for(var re=[],J=0,ie=Z.length,ne,ae;J<ie;)ne=Z.charCodeAt(J++),ne>=55296&&ne<=56319&&J<ie?(ae=Z.charCodeAt(J++),(ae&64512)==56320?re.push(((ne&1023)<<10)+(ae&1023)+65536):(re.push(ne),J--)):re.push(ne);return re}function H(Z){return F(Z,function(re){var J="";return re>65535&&(re-=65536,J+=I(re>>>10&1023|55296),re=56320|re&1023),J+=I(re),J}).join("")}function z(Z){return Z-48<10?Z-22:Z-65<26?Z-65:Z-97<26?Z-97:c}function B(Z,re){return Z+22+75*(Z<26)-((re!=0)<<5)}function R(Z,re,J){var ie=0;for(Z=J?_(Z/m):Z>>1,Z+=_(Z/re);Z>E*d>>1;ie+=c)Z=_(Z/E);return _(ie+(E+1)*Z/(Z+g))}function te(Z){var re=[],J=Z.length,ie,ne=0,ae=b,le=v,de,xe,ve,qe,Ie,Oe,it,Ot,je;for(de=Z.lastIndexOf(w),de<0&&(de=0),xe=0;xe<de;++xe)Z.charCodeAt(xe)>=128&&A("not-basic"),re.push(Z.charCodeAt(xe));for(ve=de>0?de+1:0;ve<J;){for(qe=ne,Ie=1,Oe=c;ve>=J&&A("invalid-input"),it=z(Z.charCodeAt(ve++)),(it>=c||it>_((l-ne)/Ie))&&A("overflow"),ne+=it*Ie,Ot=Oe<=le?f:Oe>=le+d?d:Oe-le,!(it<Ot);Oe+=c)je=c-Ot,Ie>_(l/je)&&A("overflow"),Ie*=je;ie=re.length+1,le=R(ne-qe,ie,qe==0),_(ne/ie)>l-ae&&A("overflow"),ae+=_(ne/ie),ne%=ie,re.splice(ne++,0,ae)}return H(re)}function Y(Z){var re,J,ie,ne,ae,le,de,xe,ve,qe,Ie,Oe=[],it,Ot,je,Dt;for(Z=q(Z),it=Z.length,re=b,J=0,ae=v,le=0;le<it;++le)Ie=Z[le],Ie<128&&Oe.push(I(Ie));for(ie=ne=Oe.length,ne&&Oe.push(w);ie<it;){for(de=l,le=0;le<it;++le)Ie=Z[le],Ie>=re&&Ie<de&&(de=Ie);for(Ot=ie+1,de-re>_((l-J)/Ot)&&A("overflow"),J+=(de-re)*Ot,re=de,le=0;le<it;++le)if(Ie=Z[le],Ie<re&&++J>l&&A("overflow"),Ie==re){for(xe=J,ve=c;qe=ve<=ae?f:ve>=ae+d?d:ve-ae,!(xe<qe);ve+=c)Dt=xe-qe,je=c-qe,Oe.push(I(B(qe+Dt%je,0))),xe=_(Dt/je);Oe.push(I(B(xe,0))),ae=R(J,Ot,ie==ne),J=0,++ie}++J,++re}return Oe.join("")}function Q(Z){return $(Z,function(re){return N.test(re)?te(re.slice(4).toLowerCase()):re})}function K(Z){return $(Z,function(re){return S.test(re)?"xn--"+Y(re):re})}if(s={version:"1.3.2",ucs2:{decode:q,encode:H},decode:te,encode:Y,toASCII:K,toUnicode:Q},r&&o)if(e.exports==r)o.exports=s;else for(D in s)s.hasOwnProperty(D)&&(r[D]=s[D]);else n.punycode=s})(ci)}(Kv,Kv.exports);var aK=Kv.exports,lK={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},cK={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}},uK={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}},yp=Tt,fK=Vv,dK=EY,pK=qY,hK=wQ,mK=GQ,gK=sK,Kl=Fu,qF=aK,vK={default:lK,zero:cK,commonmark:uK},yK=/^(vbscript|javascript|file|data):/,bK=/^data:image\/(gif|png|jpeg|webp);/;function EK(e){var t=e.trim().toLowerCase();return yK.test(t)?!!bK.test(t):!0}var zF=["http:","https:","mailto:"];function wK(e){var t=Kl.parse(e,!0);if(t.hostname&&(!t.protocol||zF.indexOf(t.protocol)>=0))try{t.hostname=qF.toASCII(t.hostname)}catch{}return Kl.encode(Kl.format(t))}function xK(e){var t=Kl.parse(e,!0);if(t.hostname&&(!t.protocol||zF.indexOf(t.protocol)>=0))try{t.hostname=qF.toUnicode(t.hostname)}catch{}return Kl.decode(Kl.format(t),Kl.decode.defaultChars+"%")}function Qo(e,t){if(!(this instanceof Qo))return new Qo(e,t);t||yp.isString(e)||(t=e||{},e="default"),this.inline=new mK,this.block=new hK,this.core=new pK,this.renderer=new dK,this.linkify=new gK,this.validateLink=EK,this.normalizeLink=wK,this.normalizeLinkText=xK,this.utils=yp,this.helpers=yp.assign({},fK),this.options={},this.configure(e),t&&this.set(t)}Qo.prototype.set=function(e){return yp.assign(this.options,e),this},Qo.prototype.configure=function(e){var t=this,n;if(yp.isString(e)&&(n=e,e=vK[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},Qo.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},Qo.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(o){n=n.concat(this[o].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter(function(o){return n.indexOf(o)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},Qo.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Qo.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Qo.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Qo.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Qo.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var SK=Qo,TK=SK;const CK=Ui(TK);var kK="production",HF=typeof process>"u"||process.env===void 0?kK:"production",Ms=function(e){return{isEnabled:function(t){return e.some(function(n){return!!t[n]})}}},bp={measureLayout:Ms(["layout","layoutId","drag"]),animation:Ms(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Ms(["exit"]),drag:Ms(["drag","dragControls"]),focus:Ms(["whileFocus"]),hover:Ms(["whileHover","onHoverStart","onHoverEnd"]),tap:Ms(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Ms(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Ms(["whileInView","onViewportEnter","onViewportLeave"])};function NK(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?bp.projectionNodeConstructor=e[t]:bp[t].Component=e[t])}var Jv=function(){},WF=k.createContext({strict:!1}),GF=Object.keys(bp),_K=GF.length;function OK(e,t,n){var r=[],o=k.useContext(WF);if(!t)return null;HF!=="production"&&n&&o.strict;for(var i=0;i<_K;i++){var s=GF[i],l=bp[s],c=l.isEnabled,f=l.Component;c(e)&&f&&r.push(k.createElement(f,Se({key:s},e,{visualElement:t})))}return r}var Xv=k.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),Zv=k.createContext({});function AK(){return k.useContext(Zv).visualElement}var e0=k.createContext(null),Vu=typeof document<"u",tS=Vu?k.useLayoutEffect:k.useEffect,nS={current:null},YF=!1;function DK(){if(YF=!0,!!Vu)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return nS.current=e.matches};e.addListener(t),t()}else nS.current=!1}function IK(){!YF&&DK();var e=Xt(k.useState(nS.current),1),t=e[0];return t}function LK(){var e=IK(),t=k.useContext(Xv).reducedMotion;return t==="never"?!1:t==="always"?!0:e}function RK(e,t,n,r){var o=k.useContext(WF),i=AK(),s=k.useContext(e0),l=LK(),c=k.useRef(void 0);r||(r=o.renderer),!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceId:s==null?void 0:s.id,blockInitialAnimation:(s==null?void 0:s.initial)===!1,shouldReduceMotion:l}));var f=c.current;return tS(function(){f==null||f.syncRender()}),k.useEffect(function(){var d;(d=f==null?void 0:f.animationState)===null||d===void 0||d.animateChanges()}),tS(function(){return function(){return f==null?void 0:f.notifyUnmount()}},[]),f}function ju(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function FK(e,t,n){return k.useCallback(function(r){var o;r&&((o=e.mount)===null||o===void 0||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ju(n)&&(n.current=r))},[t])}function QF(e){return Array.isArray(e)}function Ci(e){return typeof e=="string"||QF(e)}function MK(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.get()}),t}function PK(e){var t={};return e.forEachValue(function(n,r){return t[r]=n.getVelocity()}),t}function KF(e,t,n,r,o){var i;return r===void 0&&(r={}),o===void 0&&(o={}),typeof t=="function"&&(t=t(n??e.custom,r,o)),typeof t=="string"&&(t=(i=e.variants)===null||i===void 0?void 0:i[t]),typeof t=="function"&&(t=t(n??e.custom,r,o)),t}function t0(e,t,n){var r=e.getProps();return KF(r,t,n??r.custom,MK(e),PK(e))}function n0(e){var t;return typeof((t=e.animate)===null||t===void 0?void 0:t.start)=="function"||Ci(e.initial)||Ci(e.animate)||Ci(e.whileHover)||Ci(e.whileDrag)||Ci(e.whileTap)||Ci(e.whileFocus)||Ci(e.exit)}function JF(e){return!!(n0(e)||e.variants)}function $K(e,t){if(n0(e)){var n=e.initial,r=e.animate;return{initial:n===!1||Ci(n)?n:void 0,animate:Ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function VK(e){var t=$K(e,k.useContext(Zv)),n=t.initial,r=t.animate;return k.useMemo(function(){return{initial:n,animate:r}},[XF(n),XF(r)])}function XF(e){return Array.isArray(e)?e.join(" "):e}function Ma(e){var t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}var Ep={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jK=1;function UK(){return Ma(function(){if(Ep.hasEverUpdated)return jK++})}var ZF=k.createContext({}),eM=k.createContext({});function BK(e,t,n,r){var o,i=t.layoutId,s=t.layout,l=t.drag,c=t.dragConstraints,f=t.layoutScroll,d=k.useContext(eM);!r||!n||n!=null&&n.projection||(n.projection=new r(e,n.getLatestValues(),(o=n.parent)===null||o===void 0?void 0:o.projection),n.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!l||c&&ju(c),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:typeof s=="string"?s:"both",initialPromotionConfig:d,layoutScroll:f}))}var qK=function(e){RL(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var n=this.props,r=n.visualElement,o=n.props;r&&r.setProps(o)},t.prototype.render=function(){return this.props.children},t}(ce.Component);function zK(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.projectionNodeConstructor,o=e.useRender,i=e.useVisualState,s=e.Component;t&&NK(t);function l(c,f){var d=HK(c);c=Se(Se({},c),{layoutId:d});var g=k.useContext(Xv),m=null,v=VK(c),b=g.isStatic?void 0:UK(),w=i(c,g.isStatic);return!g.isStatic&&Vu&&(v.visualElement=RK(s,w,Se(Se({},g),c),n),BK(b,c,v.visualElement,r||bp.projectionNodeConstructor),m=OK(c,v.visualElement,t)),k.createElement(qK,{visualElement:v.visualElement,props:Se(Se({},g),c)},m,k.createElement(Zv.Provider,{value:v},o(s,c,b,FK(w,v.visualElement,f),w,g.isStatic,v.visualElement)))}return k.forwardRef(l)}function HK(e){var t,n=e.layoutId,r=(t=k.useContext(ZF))===null||t===void 0?void 0:t.id;return r&&n!==void 0?r+"-"+n:n}function WK(e){function t(r,o){return o===void 0&&(o={}),zK(e(r,o))}if(typeof Proxy>"u")return t;var n=new Map;return new Proxy(t,{get:function(r,o){return n.has(o)||n.set(o,t(o)),n.get(o)}})}var GK=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function rS(e){return typeof e!="string"||e.includes("-")?!1:!!(GK.indexOf(e)>-1||/[A-Z]/.test(e))}var r0={};function YK(e){Object.assign(r0,e)}var oS=["","X","Y","Z"],QK=["translate","scale","rotate","skew"],wp=["transformPerspective","x","y","z"];QK.forEach(function(e){return oS.forEach(function(t){return wp.push(e+t)})});function KK(e,t){return wp.indexOf(e)-wp.indexOf(t)}var JK=new Set(wp);function xp(e){return JK.has(e)}var XK=new Set(["originX","originY","originZ"]);function tM(e){return XK.has(e)}function nM(e,t){var n=t.layout,r=t.layoutId;return xp(e)||tM(e)||(n||r!==void 0)&&(!!r0[e]||e==="opacity")}var Ji=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},ZK={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function eJ(e,t,n,r){var o=e.transform,i=e.transformKeys,s=t.enableHardwareAcceleration,l=s===void 0?!0:s,c=t.allowTransformNone,f=c===void 0?!0:c,d="";i.sort(KK);for(var g=!1,m=i.length,v=0;v<m;v++){var b=i[v];d+="".concat(ZK[b]||b,"(").concat(o[b],") "),b==="z"&&(g=!0)}return!g&&l?d+="translateZ(0)":d=d.trim(),r?d=r(o,n?"":d):f&&n&&(d="none"),d}function tJ(e){var t=e.originX,n=t===void 0?"50%":t,r=e.originY,o=r===void 0?"50%":r,i=e.originZ,s=i===void 0?0:i;return"".concat(n," ").concat(o," ").concat(s)}function rM(e){return e.startsWith("--")}var nJ=function(e,t){return t&&typeof e=="number"?t.transform(e):e};const oM=(e,t)=>n=>Math.max(Math.min(n,t),e),Sp=e=>e%1?Number(e.toFixed(5)):e,Tp=/(-)?([\d]*\.?[\d])+/g,iS=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,rJ=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Cp(e){return typeof e=="string"}const Jl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kp=Object.assign(Object.assign({},Jl),{transform:oM(0,1)}),o0=Object.assign(Object.assign({},Jl),{default:1}),Np=e=>({test:t=>Cp(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pa=Np("deg"),Xi=Np("%"),et=Np("px"),oJ=Np("vh"),iJ=Np("vw"),iM=Object.assign(Object.assign({},Xi),{parse:e=>Xi.parse(e)/100,transform:e=>Xi.transform(e*100)}),sS=(e,t)=>n=>!!(Cp(n)&&rJ.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),sM=(e,t,n)=>r=>{if(!Cp(r))return r;const[o,i,s,l]=r.match(Tp);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Xl={test:sS("hsl","hue"),parse:sM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xi.transform(Sp(t))+", "+Xi.transform(Sp(n))+", "+Sp(kp.transform(r))+")"},sJ=oM(0,255),aS=Object.assign(Object.assign({},Jl),{transform:e=>Math.round(sJ(e))}),$a={test:sS("rgb","red"),parse:sM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+aS.transform(e)+", "+aS.transform(t)+", "+aS.transform(n)+", "+Sp(kp.transform(r))+")"};function aJ(e){let t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const lS={test:sS("#"),parse:aJ,transform:$a.transform},jr={test:e=>$a.test(e)||lS.test(e)||Xl.test(e),parse:e=>$a.test(e)?$a.parse(e):Xl.test(e)?Xl.parse(e):lS.parse(e),transform:e=>Cp(e)?e:e.hasOwnProperty("red")?$a.transform(e):Xl.transform(e)},aM="${c}",lM="${n}";function lJ(e){var t,n,r,o;return isNaN(e)&&Cp(e)&&((n=(t=e.match(Tp))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((o=(r=e.match(iS))===null||r===void 0?void 0:r.length)!==null&&o!==void 0?o:0)>0}function cM(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(iS);r&&(n=r.length,e=e.replace(iS,aM),t.push(...r.map(jr.parse)));const o=e.match(Tp);return o&&(e=e.replace(Tp,lM),t.push(...o.map(Jl.parse))),{values:t,numColors:n,tokenised:e}}function uM(e){return cM(e).values}function fM(e){const{values:t,numColors:n,tokenised:r}=cM(e),o=t.length;return i=>{let s=r;for(let l=0;l<o;l++)s=s.replace(l<n?aM:lM,l<n?jr.transform(i[l]):Sp(i[l]));return s}}const cJ=e=>typeof e=="number"?0:e;function uJ(e){const t=uM(e);return fM(e)(t.map(cJ))}const Ps={test:lJ,parse:uM,createTransformer:fM,getAnimatableNone:uJ},fJ=new Set(["brightness","contrast","saturate","opacity"]);function dJ(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tp)||[];if(!r)return e;const o=n.replace(r,"");let i=fJ.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const pJ=/([a-z-]*)\(.*?\)/g,cS=Object.assign(Object.assign({},Ps),{getAnimatableNone:e=>{const t=e.match(pJ);return t?t.map(dJ).join(" "):e}});var dM=Se(Se({},Jl),{transform:Math.round}),pM={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,size:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,rotate:Pa,rotateX:Pa,rotateY:Pa,rotateZ:Pa,scale:o0,scaleX:o0,scaleY:o0,scaleZ:o0,skew:Pa,skewX:Pa,skewY:Pa,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:kp,originX:iM,originY:iM,originZ:et,zIndex:dM,fillOpacity:kp,strokeOpacity:kp,numOctaves:dM};function uS(e,t,n,r){var o,i=e.style,s=e.vars,l=e.transform,c=e.transformKeys,f=e.transformOrigin;c.length=0;var d=!1,g=!1,m=!0;for(var v in t){var b=t[v];if(rM(v)){s[v]=b;continue}var w=pM[v],N=nJ(b,w);if(xp(v)){if(d=!0,l[v]=N,c.push(v),!m)continue;b!==((o=w.default)!==null&&o!==void 0?o:0)&&(m=!1)}else tM(v)?(f[v]=N,g=!0):i[v]=N}d?i.transform=eJ(e,n,m,r):r?i.transform=r({},""):!t.transform&&i.transform&&(i.transform="none"),g&&(i.transformOrigin=tJ(f))}var fS=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function hM(e,t,n){for(var r in t)!Ji(t[r])&&!nM(r,n)&&(e[r]=t[r])}function hJ(e,t,n){var r=e.transformTemplate;return k.useMemo(function(){var o=fS();uS(o,t,{enableHardwareAcceleration:!n},r);var i=o.vars,s=o.style;return Se(Se({},i),s)},[t])}function mJ(e,t,n){var r=e.style||{},o={};return hM(o,r,e),Object.assign(o,hJ(e,t,n)),e.transformValues&&(o=e.transformValues(o)),o}function gJ(e,t,n){var r={},o=mJ(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),r.style=o,r}var vJ=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function i0(e){return vJ.has(e)}var mM=function(e){return!i0(e)};function yJ(e){e&&(mM=function(t){return t.startsWith("on")?!i0(t):e(t)})}try{yJ(require("@emotion/is-prop-valid").default)}catch{}function bJ(e,t,n){var r={};for(var o in e)(mM(o)||n===!0&&i0(o)||!t&&!i0(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function gM(e,t,n){return typeof e=="string"?e:et.transform(t+n*e)}function EJ(e,t,n){var r=gM(t,e.x,e.width),o=gM(n,e.y,e.height);return"".concat(r," ").concat(o)}var wJ={offset:"stroke-dashoffset",array:"stroke-dasharray"},xJ={offset:"strokeDashoffset",array:"strokeDasharray"};function SJ(e,t,n,r,o){n===void 0&&(n=1),r===void 0&&(r=0),o===void 0&&(o=!0),e.pathLength=1;var i=o?wJ:xJ;e[i.offset]=et.transform(-r);var s=et.transform(t),l=et.transform(n);e[i.array]="".concat(s," ").concat(l)}function dS(e,t,n,r){var o=t.attrX,i=t.attrY,s=t.originX,l=t.originY,c=t.pathLength,f=t.pathSpacing,d=f===void 0?1:f,g=t.pathOffset,m=g===void 0?0:g,v=xr(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);uS(e,v,n,r),e.attrs=e.style,e.style={};var b=e.attrs,w=e.style,N=e.dimensions;b.transform&&(N&&(w.transform=b.transform),delete b.transform),N&&(s!==void 0||l!==void 0||w.transform)&&(w.transformOrigin=EJ(N,s!==void 0?s:.5,l!==void 0?l:.5)),o!==void 0&&(b.x=o),i!==void 0&&(b.y=i),c!==void 0&&SJ(b,c,d,m,!1)}var vM=function(){return Se(Se({},fS()),{attrs:{}})};function TJ(e,t){var n=k.useMemo(function(){var o=vM();return dS(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),Se(Se({},o.attrs),{style:Se({},o.style)})},[t]);if(e.style){var r={};hM(r,e.style,e),n.style=Se(Se({},r),n.style)}return n}function CJ(e){e===void 0&&(e=!1);var t=function(n,r,o,i,s,l){var c=s.latestValues,f=rS(n)?TJ:gJ,d=f(r,c,l),g=bJ(r,typeof n=="string",e),m=Se(Se(Se({},g),d),{ref:i});return o&&(m["data-projection-id"]=o),k.createElement(n,m)};return t}var kJ=/([a-z])([A-Z])/g,NJ="$1-$2",yM=function(e){return e.replace(kJ,NJ).toLowerCase()};function bM(e,t,n,r){var o=t.style,i=t.vars;Object.assign(e.style,o,r&&r.getProjectionStyles(n));for(var s in i)e.style.setProperty(s,i[s])}var EM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function wM(e,t,n,r){bM(e,t,void 0,r);for(var o in t.attrs)e.setAttribute(EM.has(o)?o:yM(o),t.attrs[o])}function pS(e){var t=e.style,n={};for(var r in t)(Ji(t[r])||nM(r,e))&&(n[r]=t[r]);return n}function xM(e){var t=pS(e);for(var n in e)if(Ji(e[n])){var r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function hS(e){return typeof e=="object"&&typeof e.start=="function"}var _p=function(e){return Array.isArray(e)},_J=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},SM=function(e){return _p(e)?e[e.length-1]||0:e};function s0(e){var t=Ji(e)?e.get():e;return _J(t)?t.toValue():t}function TM(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,s=e.onMount,l={latestValues:OJ(t,n,r,o),renderState:i()};return s&&(l.mount=function(c){return s(t,c,l)}),l}var CM=function(e){return function(t,n){var r=k.useContext(Zv),o=k.useContext(e0);return n?TM(e,t,r,o):Ma(function(){return TM(e,t,r,o)})}};function OJ(e,t,n,r){var o={},i=(n==null?void 0:n.initial)===!1,s=r(e);for(var l in s)o[l]=s0(s[l]);var c=e.initial,f=e.animate,d=n0(e),g=JF(e);t&&g&&!d&&e.inherit!==!1&&(c??(c=t.initial),f??(f=t.animate));var m=i||c===!1,v=m?f:c;if(v&&typeof v!="boolean"&&!hS(v)){var b=Array.isArray(v)?v:[v];b.forEach(function(w){var N=KF(e,w);if(N){var S=N.transitionEnd;N.transition;var x=xr(N,["transitionEnd","transition"]);for(var C in x){var E=x[C];if(Array.isArray(E)){var _=m?E.length-1:0;E=E[_]}E!==null&&(o[C]=E)}for(var C in S)o[C]=S[C]}})}return o}var AJ={useVisualState:CM({scrapeMotionValuesFromProps:xM,createRenderState:vM,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}dS(r,o,{enableHardwareAcceleration:!1},e.transformTemplate),wM(t,r)}})},DJ={useVisualState:CM({scrapeMotionValuesFromProps:pS,createRenderState:fS})};function IJ(e,t,n,r,o){var i=t.forwardMotionProps,s=i===void 0?!1:i,l=rS(e)?AJ:DJ;return Se(Se({},l),{preloadedFeatures:n,useRender:CJ(s),createVisualElement:r,projectionNodeConstructor:o,Component:e})}var Pt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Pt||(Pt={}));function a0(e,t,n,r){return r===void 0&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function mS(e,t,n,r){k.useEffect(function(){var o=e.current;if(n&&o)return a0(o,t,n,r)},[e,t,n,r])}function LJ(e){var t=e.whileFocus,n=e.visualElement,r=function(){var i;(i=n.animationState)===null||i===void 0||i.setActive(Pt.Focus,!0)},o=function(){var i;(i=n.animationState)===null||i===void 0||i.setActive(Pt.Focus,!1)};mS(n,"focus",t?r:void 0),mS(n,"blur",t?o:void 0)}function kM(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function NM(e){var t=!!e.touches;return t}function RJ(e){return function(t){var n=t instanceof MouseEvent,r=!n||n&&t.button===0;r&&e(t)}}var FJ={pageX:0,pageY:0};function MJ(e,t){t===void 0&&(t="page");var n=e.touches[0]||e.changedTouches[0],r=n||FJ;return{x:r[t+"X"],y:r[t+"Y"]}}function PJ(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function gS(e,t){return t===void 0&&(t="page"),{point:NM(e)?MJ(e,t):PJ(e,t)}}var _M=function(e,t){t===void 0&&(t=!1);var n=function(r){return e(r,gS(r))};return t?RJ(n):n},$J=function(){return Vu&&window.onpointerdown===null},VJ=function(){return Vu&&window.ontouchstart===null},jJ=function(){return Vu&&window.onmousedown===null},UJ={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},BJ={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function OM(e){return $J()?e:VJ()?BJ[e]:jJ()?UJ[e]:e}function Uu(e,t,n,r){return a0(e,OM(t),_M(n,t==="pointerdown"),r)}function l0(e,t,n,r){return mS(e,OM(t),n&&_M(n,t==="pointerdown"),r)}function AM(e){var t=null;return function(){var n=function(){t=null};return t===null?(t=e,n):!1}}var DM=AM("dragHorizontal"),IM=AM("dragVertical");function LM(e){var t=!1;if(e==="y")t=IM();else if(e==="x")t=DM();else{var n=DM(),r=IM();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function RM(){var e=LM(!0);return e?(e(),!1):!0}function FM(e,t,n){return function(r,o){var i;!kM(r)||RM()||((i=e.animationState)===null||i===void 0||i.setActive(Pt.Hover,t),n==null||n(r,o))}}function qJ(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;l0(o,"pointerenter",t||r?FM(o,!0,t):void 0,{passive:!t}),l0(o,"pointerleave",n||r?FM(o,!1,n):void 0,{passive:!n})}var MM=function(e,t){return t?e===t?!0:MM(e,t.parentElement):!1};function PM(e){return k.useEffect(function(){return function(){return e()}},[])}const c0=(e,t,n)=>Math.min(Math.max(n,e),t),vS=.001,zJ=.01,HJ=10,WJ=.05,GJ=1;function YJ({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,s=1-t;s=c0(WJ,GJ,s),e=c0(zJ,HJ,e/1e3),s<1?(o=f=>{const d=f*s,g=d*e,m=d-n,v=yS(f,s),b=Math.exp(-g);return vS-m/v*b},i=f=>{const g=f*s*e,m=g*n+n,v=Math.pow(s,2)*Math.pow(f,2)*e,b=Math.exp(-g),w=yS(Math.pow(f,2),s);return(-o(f)+vS>0?-1:1)*((m-v)*b)/w}):(o=f=>{const d=Math.exp(-f*e),g=(f-n)*e+1;return-vS+d*g},i=f=>{const d=Math.exp(-f*e),g=(n-f)*(e*e);return d*g});const l=5/e,c=KJ(o,i,l);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const f=Math.pow(c,2)*r;return{stiffness:f,damping:s*2*Math.sqrt(r*f),duration:e}}}const QJ=12;function KJ(e,t,n){let r=n;for(let o=1;o<QJ;o++)r=r-e(r)/t(r);return r}function yS(e,t){return e*Math.sqrt(1-t*t)}const JJ=["duration","bounce"],XJ=["stiffness","damping","mass"];function $M(e,t){return t.some(n=>e[n]!==void 0)}function ZJ(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!$M(e,XJ)&&$M(e,JJ)){const n=YJ(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function bS(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:o}=e,i=xr(e,["from","to","restSpeed","restDelta"]);const s={done:!1,value:t};let{stiffness:l,damping:c,mass:f,velocity:d,duration:g,isResolvedFromDuration:m}=ZJ(i),v=VM,b=VM;function w(){const N=d?-(d/1e3):0,S=n-t,x=c/(2*Math.sqrt(l*f)),C=Math.sqrt(l/f)/1e3;if(o===void 0&&(o=Math.min(Math.abs(n-t)/100,.4)),x<1){const E=yS(C,x);v=_=>{const I=Math.exp(-x*C*_);return n-I*((N+x*C*S)/E*Math.sin(E*_)+S*Math.cos(E*_))},b=_=>{const I=Math.exp(-x*C*_);return x*C*I*(Math.sin(E*_)*(N+x*C*S)/E+S*Math.cos(E*_))-I*(Math.cos(E*_)*(N+x*C*S)-E*S*Math.sin(E*_))}}else if(x===1)v=E=>n-Math.exp(-C*E)*(S+(N+C*S)*E);else{const E=C*Math.sqrt(x*x-1);v=_=>{const I=Math.exp(-x*C*_),D=Math.min(E*_,300);return n-I*((N+x*C*S)*Math.sinh(D)+E*S*Math.cosh(D))/E}}}return w(),{next:N=>{const S=v(N);if(m)s.done=N>=g;else{const x=b(N)*1e3,C=Math.abs(x)<=r,E=Math.abs(n-S)<=o;s.done=C&&E}return s.value=s.done?n:S,s},flipTarget:()=>{d=-d,[t,n]=[n,t],w()}}}bS.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const VM=e=>0,Op=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},sn=(e,t,n)=>-n*e+n*t+e;function ES(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;o=ES(c,l,e+1/3),i=ES(c,l,e),s=ES(c,l,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}const eX=(e,t,n)=>{const r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},tX=[lS,$a,Xl],UM=e=>tX.find(t=>t.test(e)),BM=(e,t)=>{let n=UM(e),r=UM(t),o=n.parse(e),i=r.parse(t);n===Xl&&(o=jM(o),n=$a),r===Xl&&(i=jM(i),r=$a);const s=Object.assign({},o);return l=>{for(const c in s)c!=="alpha"&&(s[c]=eX(o[c],i[c],l));return s.alpha=sn(o.alpha,i.alpha,l),n.transform(s)}},wS=e=>typeof e=="number",nX=(e,t)=>n=>t(e(n)),u0=(...e)=>e.reduce(nX);function qM(e,t){return wS(e)?n=>sn(e,t,n):jr.test(e)?BM(e,t):WM(e,t)}const zM=(e,t)=>{const n=[...e],r=n.length,o=e.map((i,s)=>qM(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}},rX=(e,t)=>{const n=Object.assign(Object.assign({},e),t),r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=qM(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}};function HM(e){const t=Ps.parse(e),n=t.length;let r=0,o=0,i=0;for(let s=0;s<n;s++)r||typeof t[s]=="number"?r++:t[s].hue!==void 0?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}const WM=(e,t)=>{const n=Ps.createTransformer(t),r=HM(e),o=HM(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?u0(zM(r.parsed,o.parsed),n):s=>`${s>0?t:e}`},oX=(e,t)=>n=>sn(e,t,n);function iX(e){if(typeof e=="number")return oX;if(typeof e=="string")return jr.test(e)?BM:WM;if(Array.isArray(e))return zM;if(typeof e=="object")return rX}function sX(e,t,n){const r=[],o=n||iX(e[0]),i=e.length-1;for(let s=0;s<i;s++){let l=o(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]:t;l=u0(c,l)}r.push(l)}return r}function aX([e,t],[n]){return r=>n(Op(e,t,r))}function lX(e,t){const n=e.length,r=n-1;return o=>{let i=0,s=!1;if(o<=e[0]?s=!0:o>=e[r]&&(i=r-1,s=!0),!s){let c=1;for(;c<n&&!(e[c]>o||c===r);c++);i=c-1}const l=Op(e[i],e[i+1],o);return t[i](l)}}function xS(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;Jv(i===t.length),Jv(!r||!Array.isArray(r)||r.length===i-1),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const s=sX(t,r,o),l=i===2?aX(e,s):lX(e,s);return n?c=>l(c0(e[0],e[i-1],c)):l}const f0=e=>t=>1-e(1-t),SS=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cX=e=>t=>Math.pow(t,e),GM=e=>t=>t*t*((e+1)*t-e),uX=e=>{const t=GM(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},YM=1.525,fX=4/11,dX=8/11,pX=9/10,TS=e=>e,CS=cX(2),hX=f0(CS),QM=SS(CS),KM=e=>1-Math.sin(Math.acos(e)),kS=f0(KM),mX=SS(kS),NS=GM(YM),gX=f0(NS),vX=SS(NS),yX=uX(YM),bX=4356/361,EX=35442/1805,wX=16061/1805,d0=e=>{if(e===1||e===0)return e;const t=e*e;return e<fX?7.5625*t:e<dX?9.075*t-9.9*e+3.4:e<pX?bX*t-EX*e+wX:10.8*e*e-20.52*e+10.72},xX=f0(d0),SX=e=>e<.5?.5*(1-d0(1-e*2)):.5*d0(e*2-1)+.5;function TX(e,t){return e.map(()=>t||QM).splice(0,e.length-1)}function CX(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function kX(e,t){return e.map(n=>n*t)}function p0({from:e=0,to:t=1,ease:n,offset:r,duration:o=300}){const i={done:!1,value:e},s=Array.isArray(t)?t:[e,t],l=kX(r&&r.length===s.length?r:CX(s),o);function c(){return xS(l,s,{ease:Array.isArray(n)?n:TX(s,n)})}let f=c();return{next:d=>(i.value=f(d),i.done=d>=o,i),flipTarget:()=>{s.reverse(),f=c()}}}function NX({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:o=.5,modifyTarget:i}){const s={done:!1,value:t};let l=n*e;const c=t+l,f=i===void 0?c:i(c);return f!==c&&(l=f-t),{next:d=>{const g=-l*Math.exp(-d/r);return s.done=!(g>o||g<-o),s.value=s.done?f:f+g,s},flipTarget:()=>{}}}const JM={keyframes:p0,spring:bS,decay:NX};function _X(e){if(Array.isArray(e.to))return p0;if(JM[e.type])return JM[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?p0:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?bS:p0}const XM=1/60*1e3,OX=typeof performance<"u"?()=>performance.now():()=>Date.now(),ZM=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(OX()),XM);function AX(e){let t=[],n=[],r=0,o=!1,i=!1;const s=new WeakSet,l={schedule:(c,f=!1,d=!1)=>{const g=d&&o,m=g?t:n;return f&&s.add(c),m.indexOf(c)===-1&&(m.push(c),g&&o&&(r=t.length)),c},cancel:c=>{const f=n.indexOf(c);f!==-1&&n.splice(f,1),s.delete(c)},process:c=>{if(o){i=!0;return}if(o=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let f=0;f<r;f++){const d=t[f];d(c),s.has(d)&&(l.schedule(d),e())}o=!1,i&&(i=!1,l.process(c))}};return l}const DX=40;let _S=!0,Ap=!1,OS=!1;const Bu={delta:0,timestamp:0},Dp=["read","update","preRender","render","postRender"],h0=Dp.reduce((e,t)=>(e[t]=AX(()=>Ap=!0),e),{}),ki=Dp.reduce((e,t)=>{const n=h0[t];return e[t]=(r,o=!1,i=!1)=>(Ap||LX(),n.schedule(r,o,i)),e},{}),qu=Dp.reduce((e,t)=>(e[t]=h0[t].cancel,e),{}),AS=Dp.reduce((e,t)=>(e[t]=()=>h0[t].process(Bu),e),{}),IX=e=>h0[e].process(Bu),eP=e=>{Ap=!1,Bu.delta=_S?XM:Math.max(Math.min(e-Bu.timestamp,DX),1),Bu.timestamp=e,OS=!0,Dp.forEach(IX),OS=!1,Ap&&(_S=!1,ZM(eP))},LX=()=>{Ap=!0,_S=!0,OS||ZM(eP)},m0=()=>Bu;function tP(e,t,n=0){return e-t-n}function RX(e,t,n=0,r=!0){return r?tP(t+-e,t,n):t-(e-t)+n}function FX(e,t,n,r){return r?e>=t+n:e<=-n}const MX=e=>{const t=({delta:n})=>e(n);return{start:()=>ki.update(t,!0),stop:()=>qu.update(t)}};function nP(e){var t,n,{from:r,autoplay:o=!0,driver:i=MX,elapsed:s=0,repeat:l=0,repeatType:c="loop",repeatDelay:f=0,onPlay:d,onStop:g,onComplete:m,onRepeat:v,onUpdate:b}=e,w=xr(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:N}=w,S,x=0,C=w.duration,E,_=!1,I=!0,D;const A=_X(w);!((n=(t=A).needsInterpolation)===null||n===void 0)&&n.call(t,r,N)&&(D=xS([0,100],[r,N],{clamp:!1}),r=0,N=100);const F=A(Object.assign(Object.assign({},w),{from:r,to:N}));function $(){x++,c==="reverse"?(I=x%2===0,s=RX(s,C,f,I)):(s=tP(s,C,f),c==="mirror"&&F.flipTarget()),_=!1,v&&v()}function q(){S.stop(),m&&m()}function H(B){if(I||(B=-B),s+=B,!_){const R=F.next(Math.max(0,s));E=R.value,D&&(E=D(E)),_=I?R.done:s<=0}b==null||b(E),_&&(x===0&&(C??(C=s)),x<l?FX(s,C,f,I)&&$():q())}function z(){d==null||d(),S=i(H),S.start()}return o&&z(),{stop:()=>{g==null||g(),S.stop()}}}function rP(e,t){return t?e*(1e3/t):0}function PX({from:e=0,velocity:t=0,min:n,max:r,power:o=.8,timeConstant:i=750,bounceStiffness:s=500,bounceDamping:l=10,restDelta:c=1,modifyTarget:f,driver:d,onUpdate:g,onComplete:m,onStop:v}){let b;function w(C){return n!==void 0&&C<n||r!==void 0&&C>r}function N(C){return n===void 0?r:r===void 0||Math.abs(n-C)<Math.abs(r-C)?n:r}function S(C){b==null||b.stop(),b=nP(Object.assign(Object.assign({},C),{driver:d,onUpdate:E=>{var _;g==null||g(E),(_=C.onUpdate)===null||_===void 0||_.call(C,E)},onComplete:m,onStop:v}))}function x(C){S(Object.assign({type:"spring",stiffness:s,damping:l,restDelta:c},C))}if(w(e))x({from:e,velocity:t,to:N(e)});else{let C=o*t+e;typeof f<"u"&&(C=f(C));const E=N(C),_=E===n?-1:1;let I,D;const A=F=>{I=D,D=F,t=rP(F-I,m0().delta),(_===1&&F>E||_===-1&&F<E)&&x({from:F,to:E,velocity:t})};S({type:"decay",from:e,velocity:t,timeConstant:i,power:o,restDelta:c,modifyTarget:f,onUpdate:w(C)?A:void 0})}return{stop:()=>b==null?void 0:b.stop()}}const DS=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),oP=e=>DS(e)&&e.hasOwnProperty("z"),g0=(e,t)=>Math.abs(e-t);function iP(e,t){if(wS(e)&&wS(t))return g0(e,t);if(DS(e)&&DS(t)){const n=g0(e.x,t.x),r=g0(e.y,t.y),o=oP(e)&&oP(t)?g0(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}const sP=(e,t)=>1-3*t+3*e,aP=(e,t)=>3*t-6*e,lP=e=>3*e,v0=(e,t,n)=>((sP(t,n)*e+aP(t,n))*e+lP(t))*e,cP=(e,t,n)=>3*sP(t,n)*e*e+2*aP(t,n)*e+lP(t),$X=1e-7,VX=10;function jX(e,t,n,r,o){let i,s,l=0;do s=t+(n-t)/2,i=v0(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>$X&&++l<VX);return s}const UX=8,BX=.001;function qX(e,t,n,r){for(let o=0;o<UX;++o){const i=cP(t,n,r);if(i===0)return t;const s=v0(t,n,r)-e;t-=s/i}return t}const y0=11,b0=1/(y0-1);function zX(e,t,n,r){if(e===t&&n===r)return TS;const o=new Float32Array(y0);for(let s=0;s<y0;++s)o[s]=v0(s*b0,e,n);function i(s){let l=0,c=1;const f=y0-1;for(;c!==f&&o[c]<=s;++c)l+=b0;--c;const d=(s-o[c])/(o[c+1]-o[c]),g=l+d*b0,m=cP(g,e,n);return m>=BX?qX(s,g,e,n):m===0?g:jX(s,l,l+b0,e,n)}return s=>s===0||s===1?s:v0(i(s),t,r)}function HX(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,s=t||n||r||o,l=k.useRef(!1),c=k.useRef(null),f={passive:!(n||t||r||b)};function d(){var w;(w=c.current)===null||w===void 0||w.call(c),c.current=null}function g(){var w;return d(),l.current=!1,(w=i.animationState)===null||w===void 0||w.setActive(Pt.Tap,!1),!RM()}function m(w,N){g()&&(MM(i.getInstance(),w.target)?t==null||t(w,N):r==null||r(w,N))}function v(w,N){g()&&(r==null||r(w,N))}function b(w,N){var S;d(),!l.current&&(l.current=!0,c.current=u0(Uu(window,"pointerup",m,f),Uu(window,"pointercancel",v,f)),(S=i.animationState)===null||S===void 0||S.setActive(Pt.Tap,!0),n==null||n(w,N))}l0(i,"pointerdown",s?b:void 0,f),PM(d)}var uP=new Set;function WX(e,t,n){e||uP.has(t)||(console.warn(t),n&&console.warn(n),uP.add(t))}var IS=new WeakMap,LS=new WeakMap,GX=function(e){var t;(t=IS.get(e.target))===null||t===void 0||t(e)},YX=function(e){e.forEach(GX)};function QX(e){var t=e.root,n=xr(e,["root"]),r=t||document;LS.has(r)||LS.set(r,{});var o=LS.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(YX,Se({root:t},n))),o[i]}function KX(e,t,n){var r=QX(t);return IS.set(e,n),r.observe(e),function(){IS.delete(e),r.unobserve(e)}}function JX(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,s=i===void 0?{}:i,l=k.useRef({hasEnteredView:!1,isInView:!1}),c=!!(n||r||o);s.once&&l.current.hasEnteredView&&(c=!1);var f=typeof IntersectionObserver>"u"?eZ:ZX;f(c,l.current,t,s)}var XX={some:0,all:1};function ZX(e,t,n,r){var o=r.root,i=r.margin,s=r.amount,l=s===void 0?"some":s,c=r.once;k.useEffect(function(){if(e){var f={root:o==null?void 0:o.current,rootMargin:i,threshold:typeof l=="number"?l:XX[l]},d=function(g){var m,v=g.isIntersecting;if(t.isInView!==v&&(t.isInView=v,!(c&&!v&&t.hasEnteredView))){v&&(t.hasEnteredView=!0),(m=n.animationState)===null||m===void 0||m.setActive(Pt.InView,v);var b=n.getProps(),w=v?b.onViewportEnter:b.onViewportLeave;w==null||w(g)}};return KX(n.getInstance(),f,d)}},[e,o,i,l])}function eZ(e,t,n,r){var o=r.fallback,i=o===void 0?!0:o;k.useEffect(function(){!e||!i||(HF!=="production"&&WX(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var s;t.hasEnteredView=!0;var l=n.getProps().onViewportEnter;l==null||l(null),(s=n.animationState)===null||s===void 0||s.setActive(Pt.InView,!0)}))},[e])}var Va=function(e){return function(t){return e(t),null}},tZ={inView:Va(JX),tap:Va(HX),focus:Va(LJ),hover:Va(qJ)},nZ=0,rZ=function(){return nZ++},oZ=function(){return Ma(rZ)};function fP(){var e=k.useContext(e0);if(e===null)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=oZ();k.useEffect(function(){return r(o)},[]);var i=function(){return n==null?void 0:n(o)};return!t&&n?[!1,i]:[!0]}function dP(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var E0=function(e){return e*1e3},iZ={linear:TS,easeIn:CS,easeInOut:QM,easeOut:hX,circIn:KM,circInOut:mX,circOut:kS,backIn:NS,backInOut:vX,backOut:gX,anticipate:yX,bounceIn:xX,bounceInOut:SX,bounceOut:d0},pP=function(e){if(Array.isArray(e)){Jv(e.length===4);var t=Xt(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return zX(n,r,o,i)}else if(typeof e=="string")return iZ[e];return e},sZ=function(e){return Array.isArray(e)&&typeof e[0]!="number"},hP=function(e,t){return e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Ps.test(t)&&!t.startsWith("url("))},Zl=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},w0=function(e){return{type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}},RS=function(){return{type:"keyframes",ease:"linear",duration:.3}},aZ=function(e){return{type:"keyframes",duration:.8,values:e}},mP={x:Zl,y:Zl,z:Zl,rotate:Zl,rotateX:Zl,rotateY:Zl,rotateZ:Zl,scaleX:w0,scaleY:w0,scale:w0,opacity:RS,backgroundColor:RS,color:RS,default:w0},lZ=function(e,t){var n;return _p(t)?n=aZ:n=mP[e]||mP.default,Se({to:t},n(t))},cZ=Se(Se({},pM),{color:jr,backgroundColor:jr,outlineColor:jr,fill:jr,stroke:jr,borderColor:jr,borderTopColor:jr,borderRightColor:jr,borderBottomColor:jr,borderLeftColor:jr,filter:cS,WebkitFilter:cS}),FS=function(e){return cZ[e]};function MS(e,t){var n,r=FS(e);return r!==cS&&(r=Ps),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}function uZ(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=xr(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}function fZ(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,s=xr(e,["ease","times","yoyo","flip","loop"]),l=Se({},s);return n&&(l.offset=n),s.duration&&(l.duration=E0(s.duration)),s.repeatDelay&&(l.repeatDelay=E0(s.repeatDelay)),t&&(l.ease=sZ(t)?t.map(pP):pP(t)),s.type==="tween"&&(l.type="keyframes"),(r||i||o)&&(r?l.repeatType="reverse":i?l.repeatType="loop":o&&(l.repeatType="mirror"),l.repeat=i||r||o||s.repeat),s.type!=="spring"&&(l.type="keyframes"),l}function dZ(e,t){var n,r,o=PS(e,t)||{};return(r=(n=o.delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function pZ(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=xi([],Xt(e.to),!1),e.to[0]=e.from),e}function hZ(e,t,n){var r;return Array.isArray(t.to)&&((r=e.duration)!==null&&r!==void 0||(e.duration=.8)),pZ(t),uZ(e)||(e=Se(Se({},e),lZ(n,t.to))),Se(Se({},t),fZ(e))}function mZ(e,t,n,r,o){var i,s=PS(r,e),l=(i=s.from)!==null&&i!==void 0?i:t.get(),c=hP(e,n);l==="none"&&c&&typeof n=="string"?l=MS(e,n):gP(l)&&typeof n=="string"?l=vP(n):!Array.isArray(n)&&gP(n)&&typeof l=="string"&&(n=vP(l));var f=hP(e,l);function d(){var m={from:l,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(v){return t.set(v)}};return s.type==="inertia"||s.type==="decay"?PX(Se(Se({},m),s)):nP(Se(Se({},hZ(s,m,e)),{onUpdate:function(v){var b;m.onUpdate(v),(b=s.onUpdate)===null||b===void 0||b.call(s,v)},onComplete:function(){var v;m.onComplete(),(v=s.onComplete)===null||v===void 0||v.call(s)}}))}function g(){var m,v,b=SM(n);return t.set(b),o(),(m=s==null?void 0:s.onUpdate)===null||m===void 0||m.call(s,b),(v=s==null?void 0:s.onComplete)===null||v===void 0||v.call(s),{stop:function(){}}}return!f||!c||s.type===!1?g:d}function gP(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function vP(e){return typeof e=="number"?0:MS("",e)}function PS(e,t){return e[t]||e.default||e}function $S(e,t,n,r){return r===void 0&&(r={}),t.start(function(o){var i,s,l=mZ(e,t,n,r,o),c=dZ(r,e),f=function(){return s=l()};return c?i=window.setTimeout(f,E0(c)):f(),function(){clearTimeout(i),s==null||s.stop()}})}var gZ=function(e){return/^\-?\d*\.?\d+$/.test(e)},vZ=function(e){return/^0[^.\s]+$/.test(e)};function VS(e,t){e.indexOf(t)===-1&&e.push(t)}function jS(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function yZ(e,t,n){var r=Xt(e),o=r.slice(0),i=t<0?o.length+t:t;if(i>=0&&i<o.length){var s=n<0?o.length+n:n,l=Xt(o.splice(t,1),1),c=l[0];o.splice(s,0,c)}return o}var Ip=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var n=this;return VS(this.subscriptions,t),function(){return jS(n.subscriptions,t)}},e.prototype.notify=function(t,n,r){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(var i=0;i<o;i++){var s=this.subscriptions[i];s&&s(t,n,r)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),bZ=function(e){return!isNaN(parseFloat(e))},EZ=function(){function e(t){var n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Ip,this.velocityUpdateSubscribers=new Ip,this.renderSubscribers=new Ip,this.canTrackVelocity=!1,this.updateAndNotify=function(r,o){o===void 0&&(o=!0),n.prev=n.current,n.current=r;var i=m0(),s=i.delta,l=i.timestamp;n.lastUpdated!==l&&(n.timeDelta=s,n.lastUpdated=l,ki.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),o&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return ki.postRender(n.velocityCheck)},this.velocityCheck=function(r){var o=r.timestamp;o!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=bZ(this.current)}return e.prototype.onChange=function(t){return this.updateSubscribers.add(t)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},e.prototype.attach=function(t){this.passiveEffect=t},e.prototype.set=function(t,n){n===void 0&&(n=!0),!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?rP(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(t){var n=this;return this.stop(),new Promise(function(r){n.hasAnimated=!0,n.stopAnimation=t(r)}).then(function(){return n.clearAnimation()})},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function ec(e){return new EZ(e)}var yP=function(e){return function(t){return t.test(e)}},wZ={test:function(e){return e==="auto"},parse:function(e){return e}},bP=[Jl,et,Xi,Pa,iJ,oJ,wZ],Lp=function(e){return bP.find(yP(e))},xZ=xi(xi([],Xt(bP),!1),[jr,Ps],!1),SZ=function(e){return xZ.find(yP(e))};function TZ(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ec(n))}function CZ(e,t){var n=t0(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=o===void 0?{}:o;r.transition;var s=xr(r,["transitionEnd","transition"]);s=Se(Se({},s),i);for(var l in s){var c=SM(s[l]);TZ(e,l,c)}}function kZ(e,t,n){var r,o,i,s,l=Object.keys(t).filter(function(v){return!e.hasValue(v)}),c=l.length;if(c)for(var f=0;f<c;f++){var d=l[f],g=t[d],m=null;Array.isArray(g)&&(m=g[0]),m===null&&(m=(o=(r=n[d])!==null&&r!==void 0?r:e.readValue(d))!==null&&o!==void 0?o:t[d]),m!=null&&(typeof m=="string"&&(gZ(m)||vZ(m))?m=parseFloat(m):!SZ(m)&&Ps.test(g)&&(m=MS(d,g)),e.addValue(d,ec(m)),(i=(s=n)[d])!==null&&i!==void 0||(s[d]=m),e.setBaseTarget(d,m))}}function NZ(e,t){if(t){var n=t[e]||t.default||t;return n.from}}function _Z(e,t,n){var r,o,i={};for(var s in e)i[s]=(r=NZ(s,t))!==null&&r!==void 0?r:(o=n.getValue(s))===null||o===void 0?void 0:o.get();return i}function OZ(e,t,n){n===void 0&&(n={}),e.notifyAnimationStart(t);var r;if(Array.isArray(t)){var o=t.map(function(s){return US(e,s,n)});r=Promise.all(o)}else if(typeof t=="string")r=US(e,t,n);else{var i=typeof t=="function"?t0(e,t,n.custom):t;r=EP(e,i,n)}return r.then(function(){return e.notifyAnimationComplete(t)})}function US(e,t,n){var r;n===void 0&&(n={});var o=t0(e,t,n.custom),i=(o||{}).transition,s=i===void 0?e.getDefaultTransition()||{}:i;n.transitionOverride&&(s=n.transitionOverride);var l=o?function(){return EP(e,o,n)}:function(){return Promise.resolve()},c=!((r=e.variantChildren)===null||r===void 0)&&r.size?function(v){v===void 0&&(v=0);var b=s.delayChildren,w=b===void 0?0:b,N=s.staggerChildren,S=s.staggerDirection;return AZ(e,t,w+v,N,S,n)}:function(){return Promise.resolve()},f=s.when;if(f){var d=Xt(f==="beforeChildren"?[l,c]:[c,l],2),g=d[0],m=d[1];return g().then(m)}else return Promise.all([l(),c(n.delay)])}function EP(e,t,n){var r,o=n===void 0?{}:n,i=o.delay,s=i===void 0?0:i,l=o.transitionOverride,c=o.type,f=e.makeTargetAnimatable(t),d=f.transition,g=d===void 0?e.getDefaultTransition():d,m=f.transitionEnd,v=xr(f,["transition","transitionEnd"]);l&&(g=l);var b=[],w=c&&((r=e.animationState)===null||r===void 0?void 0:r.getState()[c]);for(var N in v){var S=e.getValue(N),x=v[N];if(!(!S||x===void 0||w&&IZ(w,N))){var C=Se({delay:s},g);e.shouldReduceMotion&&xp(N)&&(C=Se(Se({},C),{type:!1,delay:0}));var E=$S(N,S,x,C);b.push(E)}}return Promise.all(b).then(function(){m&&CZ(e,m)})}function AZ(e,t,n,r,o,i){n===void 0&&(n=0),r===void 0&&(r=0),o===void 0&&(o=1);var s=[],l=(e.variantChildren.size-1)*r,c=o===1?function(f){return f===void 0&&(f=0),f*r}:function(f){return f===void 0&&(f=0),l-f*r};return Array.from(e.variantChildren).sort(DZ).forEach(function(f,d){s.push(US(f,t,Se(Se({},i),{delay:n+c(d)})).then(function(){return f.notifyAnimationComplete(t)}))}),Promise.all(s)}function DZ(e,t){return e.sortNodePosition(t)}function IZ(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&r[t]!==!0;return r[t]=!1,o}var BS=[Pt.Animate,Pt.InView,Pt.Focus,Pt.Hover,Pt.Tap,Pt.Drag,Pt.Exit],LZ=xi([],Xt(BS),!1).reverse(),RZ=BS.length;function FZ(e){return function(t){return Promise.all(t.map(function(n){var r=n.animation,o=n.options;return OZ(e,r,o)}))}}function MZ(e){var t=FZ(e),n=$Z(),r={},o=!0,i=function(d,g){var m=t0(e,g);if(m){m.transition;var v=m.transitionEnd,b=xr(m,["transition","transitionEnd"]);d=Se(Se(Se({},d),b),v)}return d};function s(d){return r[d]!==void 0}function l(d){t=d(e)}function c(d,g){for(var m,v=e.getProps(),b=e.getVariantContext(!0)||{},w=[],N=new Set,S={},x=1/0,C=function(D){var A=LZ[D],F=n[A],$=(m=v[A])!==null&&m!==void 0?m:b[A],q=Ci($),H=A===g?F.isActive:null;H===!1&&(x=D);var z=$===b[A]&&$!==v[A]&&q;if(z&&o&&e.manuallyAnimateOnMount&&(z=!1),F.protectedKeys=Se({},S),!F.isActive&&H===null||!$&&!F.prevProp||hS($)||typeof $=="boolean")return"continue";var B=PZ(F.prevProp,$),R=B||A===g&&F.isActive&&!z&&q||D>x&&q,te=Array.isArray($)?$:[$],Y=te.reduce(i,{});H===!1&&(Y={});var Q=F.prevResolvedValues,K=Q===void 0?{}:Q,Z=Se(Se({},K),Y),re=function(ae){R=!0,N.delete(ae),F.needsAnimating[ae]=!0};for(var J in Z){var ie=Y[J],ne=K[J];S.hasOwnProperty(J)||(ie!==ne?_p(ie)&&_p(ne)?!dP(ie,ne)||B?re(J):F.protectedKeys[J]=!0:ie!==void 0?re(J):N.add(J):ie!==void 0&&N.has(J)?re(J):F.protectedKeys[J]=!0)}F.prevProp=$,F.prevResolvedValues=Y,F.isActive&&(S=Se(Se({},S),Y)),o&&e.blockInitialAnimation&&(R=!1),R&&!z&&w.push.apply(w,xi([],Xt(te.map(function(ae){return{animation:ae,options:Se({type:A},d)}})),!1))},E=0;E<RZ;E++)C(E);if(r=Se({},S),N.size){var _={};N.forEach(function(D){var A=e.getBaseTarget(D);A!==void 0&&(_[D]=A)}),w.push({animation:_})}var I=!!w.length;return o&&v.initial===!1&&!e.manuallyAnimateOnMount&&(I=!1),o=!1,I?t(w):Promise.resolve()}function f(d,g,m){var v;if(n[d].isActive===g)return Promise.resolve();(v=e.variantChildren)===null||v===void 0||v.forEach(function(N){var S;return(S=N.animationState)===null||S===void 0?void 0:S.setActive(d,g)}),n[d].isActive=g;var b=c(m,d);for(var w in n)n[w].protectedKeys={};return b}return{isAnimated:s,animateChanges:c,setActive:f,setAnimateFunction:l,getState:function(){return n}}}function PZ(e,t){return typeof t=="string"?t!==e:QF(t)?!dP(t,e):!1}function tc(e){return e===void 0&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $Z(){var e;return e={},e[Pt.Animate]=tc(!0),e[Pt.InView]=tc(),e[Pt.Hover]=tc(),e[Pt.Tap]=tc(),e[Pt.Drag]=tc(),e[Pt.Focus]=tc(),e[Pt.Exit]=tc(),e}var VZ={animation:Va(function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=MZ(t)),hS(n)&&k.useEffect(function(){return n.subscribe(t)},[n])}),exit:Va(function(e){var t=e.custom,n=e.visualElement,r=Xt(fP(),2),o=r[0],i=r[1],s=k.useContext(e0);k.useEffect(function(){var l,c;n.isPresent=o;var f=(l=n.animationState)===null||l===void 0?void 0:l.setActive(Pt.Exit,!o,{custom:(c=s==null?void 0:s.custom)!==null&&c!==void 0?c:t});!o&&(f==null||f.then(i))},[o])})},wP=function(){function e(t,n,r){var o=this,i=r===void 0?{}:r,s=i.transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var m=zS(o.lastMoveEventInfo,o.history),v=o.startEvent!==null,b=iP(m.offset,{x:0,y:0})>=3;if(!(!v&&!b)){var w=m.point,N=m0().timestamp;o.history.push(Se(Se({},w),{timestamp:N}));var S=o.handlers,x=S.onStart,C=S.onMove;v||(x&&x(o.lastMoveEvent,m),o.startEvent=o.lastMoveEvent),C&&C(o.lastMoveEvent,m)}}},this.handlePointerMove=function(m,v){if(o.lastMoveEvent=m,o.lastMoveEventInfo=qS(v,o.transformPagePoint),kM(m)&&m.buttons===0){o.handlePointerUp(m,v);return}ki.update(o.updatePoint,!0)},this.handlePointerUp=function(m,v){o.end();var b=o.handlers,w=b.onEnd,N=b.onSessionEnd,S=zS(qS(v,o.transformPagePoint),o.history);o.startEvent&&w&&w(m,S),N&&N(m,S)},!(NM(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=s;var l=gS(t),c=qS(l,this.transformPagePoint),f=c.point,d=m0().timestamp;this.history=[Se(Se({},f),{timestamp:d})];var g=n.onSessionStart;g&&g(t,zS(c,this.history)),this.removeListeners=u0(Uu(window,"pointermove",this.handlePointerMove),Uu(window,"pointerup",this.handlePointerUp),Uu(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),qu.update(this.updatePoint)},e}();function qS(e,t){return t?{point:t(e.point)}:e}function xP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zS(e,t){var n=e.point;return{point:n,delta:xP(n,SP(t)),offset:xP(n,jZ(t)),velocity:UZ(t,.1)}}function jZ(e){return e[0]}function SP(e){return e[e.length-1]}function UZ(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=SP(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>E0(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(i===0)return{x:0,y:0};var s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function $s(e){return e.max-e.min}function TP(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=.01),iP(e,t)<n}function CP(e,t,n,r){r===void 0&&(r=.5),e.origin=r,e.originPoint=sn(t.min,t.max,e.origin),e.scale=$s(n)/$s(t),(TP(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=sn(n.min,n.max,e.origin)-e.originPoint,(TP(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Rp(e,t,n,r){CP(e.x,t.x,n.x,r==null?void 0:r.originX),CP(e.y,t.y,n.y,r==null?void 0:r.originY)}function kP(e,t,n){e.min=n.min+t.min,e.max=e.min+$s(t)}function BZ(e,t,n){kP(e.x,t.x,n.x),kP(e.y,t.y,n.y)}function NP(e,t,n){e.min=t.min-n.min,e.max=e.min+$s(t)}function Fp(e,t,n){NP(e.x,t.x,n.x),NP(e.y,t.y,n.y)}function qZ(e,t,n){var r=t.min,o=t.max;return r!==void 0&&e<r?e=n?sn(r,e,n.min):Math.max(e,r):o!==void 0&&e>o&&(e=n?sn(o,e,n.max):Math.min(e,o)),e}function _P(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zZ(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:_P(e.x,r,i),y:_P(e.y,n,o)}}function OP(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(n=Xt([o,r],2),r=n[0],o=n[1]),{min:r,max:o}}function HZ(e,t){return{x:OP(e.x,t.x),y:OP(e.y,t.y)}}function WZ(e,t){var n=.5,r=$s(e),o=$s(t);return o>r?n=Op(t.min,t.max-r,e.min):r>o&&(n=Op(e.min,e.max-o,t.min)),c0(0,1,n)}function GZ(e,t){var n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var HS=.35;function YZ(e){return e===void 0&&(e=HS),e===!1?e=0:e===!0&&(e=HS),{x:AP(e,"left","right"),y:AP(e,"top","bottom")}}function AP(e,t,n){return{min:DP(e,t),max:DP(e,n)}}function DP(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}var IP=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Mp=function(){return{x:IP(),y:IP()}},LP=function(){return{min:0,max:0}},Sr=function(){return{x:LP(),y:LP()}};function Zi(e){return[e("x"),e("y")]}function RP(e){var t=e.top,n=e.left,r=e.right,o=e.bottom;return{x:{min:n,max:r},y:{min:t,max:o}}}function QZ(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}function KZ(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function WS(e){return e===void 0||e===1}function FP(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!WS(t)||!WS(n)||!WS(r)}function ja(e){return FP(e)||MP(e.x)||MP(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function MP(e){return e&&e!=="0%"}function x0(e,t,n){var r=e-n,o=t*r;return n+o}function PP(e,t,n,r,o){return o!==void 0&&(e=x0(e,o,r)),x0(e,n,r)+t}function GS(e,t,n,r,o){t===void 0&&(t=0),n===void 0&&(n=1),e.min=PP(e.min,t,n,r,o),e.max=PP(e.max,t,n,r,o)}function $P(e,t){var n=t.x,r=t.y;GS(e.x,n.translate,n.scale,n.originPoint),GS(e.y,r.translate,r.scale,r.originPoint)}function JZ(e,t,n,r){var o,i;r===void 0&&(r=!1);var s=n.length;if(s){t.x=t.y=1;for(var l,c,f=0;f<s;f++)l=n[f],c=l.projectionDelta,((i=(o=l.instance)===null||o===void 0?void 0:o.style)===null||i===void 0?void 0:i.display)!=="contents"&&(r&&l.options.layoutScroll&&l.scroll&&l!==l.root&&zu(e,{x:-l.scroll.x,y:-l.scroll.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,$P(e,c)),r&&ja(l.latestValues)&&zu(e,l.latestValues))}}function Ua(e,t){e.min=e.min+t,e.max=e.max+t}function VP(e,t,n){var r=Xt(n,3),o=r[0],i=r[1],s=r[2],l=t[s]!==void 0?t[s]:.5,c=sn(e.min,e.max,l);GS(e,t[o],t[i],c,t.scale)}var XZ=["x","scaleX","originX"],ZZ=["y","scaleY","originY"];function zu(e,t){VP(e.x,t,XZ),VP(e.y,t,ZZ)}function jP(e,t){return RP(KZ(e.getBoundingClientRect(),t))}function eee(e,t,n){var r=jP(e,n),o=t.scroll;return o&&(Ua(r.x,o.x),Ua(r.y,o.y)),r}var tee=new WeakMap,nee=function(){function e(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Sr(),this.visualElement=t}return e.prototype.start=function(t,n){var r=this,o=n===void 0?{}:n,i=o.snapToCursor,s=i===void 0?!1:i;if(this.visualElement.isPresent!==!1){var l=function(g){r.stopAnimation(),s&&r.snapToCursor(gS(g,"page").point)},c=function(g,m){var v,b=r.getProps(),w=b.drag,N=b.dragPropagation,S=b.onDragStart;w&&!N&&(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=LM(w),!r.openGlobalLock)||(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),Zi(function(x){var C,E,_=r.getAxisMotionValue(x).get()||0;if(Xi.test(_)){var I=(E=(C=r.visualElement.projection)===null||C===void 0?void 0:C.layout)===null||E===void 0?void 0:E.actual[x];if(I){var D=$s(I);_=D*(parseFloat(_)/100)}}r.originPoint[x]=_}),S==null||S(g,m),(v=r.visualElement.animationState)===null||v===void 0||v.setActive(Pt.Drag,!0))},f=function(g,m){var v=r.getProps(),b=v.dragPropagation,w=v.dragDirectionLock,N=v.onDirectionLock,S=v.onDrag;if(!(!b&&!r.openGlobalLock)){var x=m.offset;if(w&&r.currentDirection===null){r.currentDirection=ree(x),r.currentDirection!==null&&(N==null||N(r.currentDirection));return}r.updateAxis("x",m.point,x),r.updateAxis("y",m.point,x),r.visualElement.syncRender(),S==null||S(g,m)}},d=function(g,m){return r.stop(g,m)};this.panSession=new wP(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(t,n){var r=this.isDragging;if(this.cancel(),!!r){var o=n.velocity;this.startAnimation(o);var i=this.getProps().onDragEnd;i==null||i(t,n)}},e.prototype.cancel=function(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;var r=this.getProps().dragPropagation;!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Pt.Drag,!1)},e.prototype.updateAxis=function(t,n,r){var o=this.getProps().drag;if(!(!r||!S0(t,o,this.currentDirection))){var i=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=qZ(s,this.constraints[t],this.elastic[t])),i.set(s)}},e.prototype.resolveConstraints=function(){var t=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,i=(this.visualElement.projection||{}).layout,s=this.constraints;r&&ju(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&i?this.constraints=zZ(i.actual,r):this.constraints=!1,this.elastic=YZ(o),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Zi(function(l){t.getAxisMotionValue(l)&&(t.constraints[l]=GZ(i.actual[l],t.constraints[l]))})},e.prototype.resolveRefConstraints=function(){var t=this.getProps(),n=t.dragConstraints,r=t.onMeasureDragConstraints;if(!n||!ju(n))return!1;var o=n.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var s=eee(o,i.root,this.visualElement.getTransformPagePoint()),l=HZ(i.layout.actual,s);if(r){var c=r(QZ(l));this.hasMutatedConstraints=!!c,c&&(l=RP(c))}return l},e.prototype.startAnimation=function(t){var n=this,r=this.getProps(),o=r.drag,i=r.dragMomentum,s=r.dragElastic,l=r.dragTransition,c=r.dragSnapToOrigin,f=r.onDragTransitionEnd,d=this.constraints||{},g=Zi(function(m){var v;if(S0(m,o,n.currentDirection)){var b=(v=d==null?void 0:d[m])!==null&&v!==void 0?v:{};c&&(b={min:0,max:0});var w=s?200:1e6,N=s?40:1e7,S=Se(Se({type:"inertia",velocity:i?t[m]:0,bounceStiffness:w,bounceDamping:N,timeConstant:750,restDelta:1,restSpeed:10},l),b);return n.startAxisValueAnimation(m,S)}});return Promise.all(g).then(f)},e.prototype.startAxisValueAnimation=function(t,n){var r=this.getAxisMotionValue(t);return $S(t,r,0,n)},e.prototype.stopAnimation=function(){var t=this;Zi(function(n){return t.getAxisMotionValue(n).stop()})},e.prototype.getAxisMotionValue=function(t){var n,r,o="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[o];return i||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)},e.prototype.snapToCursor=function(t){var n=this;Zi(function(r){var o=n.getProps().drag;if(S0(r,o,n.currentDirection)){var i=n.visualElement.projection,s=n.getAxisMotionValue(r);if(i&&i.layout){var l=i.layout.actual[r],c=l.min,f=l.max;s.set(t[r]-sn(c,f,.5))}}})},e.prototype.scalePositionWithinConstraints=function(){var t=this,n,r=this.getProps(),o=r.drag,i=r.dragConstraints,s=this.visualElement.projection;if(!(!ju(i)||!s||!this.constraints)){this.stopAnimation();var l={x:0,y:0};Zi(function(f){var d=t.getAxisMotionValue(f);if(d){var g=d.get();l[f]=WZ({min:g,max:g},t.constraints[f])}});var c=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=c?c({},""):"none",(n=s.root)===null||n===void 0||n.updateScroll(),s.updateLayout(),this.resolveConstraints(),Zi(function(f){if(S0(f,o,null)){var d=t.getAxisMotionValue(f),g=t.constraints[f],m=g.min,v=g.max;d.set(sn(m,v,l[f]))}})}},e.prototype.addListeners=function(){var t=this,n;tee.set(this.visualElement,this);var r=this.visualElement.getInstance(),o=Uu(r,"pointerdown",function(f){var d=t.getProps(),g=d.drag,m=d.dragListener,v=m===void 0?!0:m;g&&v&&t.start(f)}),i=function(){var f=t.getProps().dragConstraints;ju(f)&&(t.constraints=t.resolveRefConstraints())},s=this.visualElement.projection,l=s.addEventListener("measure",i);s&&!s.layout&&((n=s.root)===null||n===void 0||n.updateScroll(),s.updateLayout()),i();var c=a0(window,"resize",function(){return t.scalePositionWithinConstraints()});return s.addEventListener("didUpdate",function(f){var d=f.delta,g=f.hasLayoutChanged;t.isDragging&&g&&(Zi(function(m){var v=t.getAxisMotionValue(m);v&&(t.originPoint[m]+=d[m].translate,v.set(v.get()+d[m].translate))}),t.visualElement.syncRender())}),function(){c(),o(),l()}},e.prototype.getProps=function(){var t=this.visualElement.getProps(),n=t.drag,r=n===void 0?!1:n,o=t.dragDirectionLock,i=o===void 0?!1:o,s=t.dragPropagation,l=s===void 0?!1:s,c=t.dragConstraints,f=c===void 0?!1:c,d=t.dragElastic,g=d===void 0?HS:d,m=t.dragMomentum,v=m===void 0?!0:m;return Se(Se({},t),{drag:r,dragDirectionLock:i,dragPropagation:l,dragConstraints:f,dragElastic:g,dragMomentum:v})},e}();function S0(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ree(e,t){t===void 0&&(t=10);var n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function oee(e){var t=e.dragControls,n=e.visualElement,r=Ma(function(){return new nee(n)});k.useEffect(function(){return t&&t.subscribe(r)},[r,t]),k.useEffect(function(){return r.addListeners()},[r])}function iee(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,s=t||n||r||o,l=k.useRef(null),c=k.useContext(Xv).transformPagePoint,f={onSessionStart:o,onStart:n,onMove:t,onEnd:function(g,m){l.current=null,r&&r(g,m)}};k.useEffect(function(){l.current!==null&&l.current.updateHandlers(f)});function d(g){l.current=new wP(g,f,{transformPagePoint:c})}l0(i,"pointerdown",s&&d),PM(function(){return l.current&&l.current.end()})}var see={pan:Va(iee),drag:Va(oee)},T0=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function aee(){var e=T0.map(function(){return new Ip}),t={},n={clearAllListeners:function(){return e.forEach(function(r){return r.clear()})},updatePropListeners:function(r){T0.forEach(function(o){var i,s="on"+o,l=r[s];(i=t[o])===null||i===void 0||i.call(t),l&&(t[o]=n[s](l))})}};return e.forEach(function(r,o){n["on"+T0[o]]=function(i){return r.add(i)},n["notify"+T0[o]]=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r.notify.apply(r,xi([],Xt(i),!1))}}),n}function lee(e,t,n){var r;for(var o in t){var i=t[o],s=n[o];if(Ji(i))e.addValue(o,i);else if(Ji(s))e.addValue(o,ec(i));else if(s!==i)if(e.hasValue(o)){var l=e.getValue(o);!l.hasAnimated&&l.set(i)}else e.addValue(o,ec((r=e.getStaticValue(o))!==null&&r!==void 0?r:i))}for(var o in n)t[o]===void 0&&e.removeValue(o);return t}var UP=function(e){var t=e.treeType,n=t===void 0?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,s=e.measureViewportBox,l=e.render,c=e.readValueFromInstance,f=e.removeValueFromRenderState,d=e.sortNodePosition,g=e.scrapeMotionValuesFromProps;return function(m,v){var b=m.parent,w=m.props,N=m.presenceId,S=m.blockInitialAnimation,x=m.visualState,C=m.shouldReduceMotion;v===void 0&&(v={});var E=!1,_=x.latestValues,I=x.renderState,D,A=aee(),F=new Map,$=new Map,q={},H=Se({},_),z;function B(){!D||!E||(R(),l(D,I,w.style,ie.projection))}function R(){r(ie,I,_,v,w)}function te(){A.notifyUpdate(_)}function Y(ne,ae){var le=ae.onChange(function(xe){_[ne]=xe,w.onUpdate&&ki.update(te,!1,!0)}),de=ae.onRenderRequest(ie.scheduleRender);$.set(ne,function(){le(),de()})}var Q=g(w);for(var K in Q){var Z=Q[K];_[K]!==void 0&&Ji(Z)&&Z.set(_[K],!1)}var re=n0(w),J=JF(w),ie=Se(Se({treeType:n,current:null,depth:b?b.depth+1:0,parent:b,children:new Set,presenceId:N,shouldReduceMotion:C,variantChildren:J?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:!!(b!=null&&b.isMounted()),blockInitialAnimation:S,isMounted:function(){return!!D},mount:function(ne){E=!0,D=ie.current=ne,ie.projection&&ie.projection.mount(ne),J&&b&&!re&&(z=b==null?void 0:b.addVariantChild(ie)),F.forEach(function(ae,le){return Y(le,ae)}),b==null||b.children.add(ie),ie.setProps(w)},unmount:function(){var ne;(ne=ie.projection)===null||ne===void 0||ne.unmount(),qu.update(te),qu.render(B),$.forEach(function(ae){return ae()}),z==null||z(),b==null||b.children.delete(ie),A.clearAllListeners(),D=void 0,E=!1},addVariantChild:function(ne){var ae,le=ie.getClosestVariantNode();if(le)return(ae=le.variantChildren)===null||ae===void 0||ae.add(ne),function(){return le.variantChildren.delete(ne)}},sortNodePosition:function(ne){return!d||n!==ne.treeType?0:d(ie.getInstance(),ne.getInstance())},getClosestVariantNode:function(){return J?ie:b==null?void 0:b.getClosestVariantNode()},getLayoutId:function(){return w.layoutId},getInstance:function(){return D},getStaticValue:function(ne){return _[ne]},setStaticValue:function(ne,ae){return _[ne]=ae},getLatestValues:function(){return _},setVisibility:function(ne){ie.isVisible!==ne&&(ie.isVisible=ne,ie.scheduleRender())},makeTargetAnimatable:function(ne,ae){return ae===void 0&&(ae=!0),i(ie,ne,w,ae)},measureViewportBox:function(){return s(D,w)},addValue:function(ne,ae){ie.hasValue(ne)&&ie.removeValue(ne),F.set(ne,ae),_[ne]=ae.get(),Y(ne,ae)},removeValue:function(ne){var ae;F.delete(ne),(ae=$.get(ne))===null||ae===void 0||ae(),$.delete(ne),delete _[ne],f(ne,I)},hasValue:function(ne){return F.has(ne)},getValue:function(ne,ae){var le=F.get(ne);return le===void 0&&ae!==void 0&&(le=ec(ae),ie.addValue(ne,le)),le},forEachValue:function(ne){return F.forEach(ne)},readValue:function(ne){var ae;return(ae=_[ne])!==null&&ae!==void 0?ae:c(D,ne,v)},setBaseTarget:function(ne,ae){H[ne]=ae},getBaseTarget:function(ne){if(o){var ae=o(w,ne);if(ae!==void 0&&!Ji(ae))return ae}return H[ne]}},A),{build:function(){return R(),I},scheduleRender:function(){ki.render(B,!1,!0)},syncRender:B,setProps:function(ne){(ne.transformTemplate||w.transformTemplate)&&ie.scheduleRender(),w=ne,A.updatePropListeners(ne),q=lee(ie,g(w),q)},getProps:function(){return w},getVariant:function(ne){var ae;return(ae=w.variants)===null||ae===void 0?void 0:ae[ne]},getDefaultTransition:function(){return w.transition},getTransformPagePoint:function(){return w.transformPagePoint},getVariantContext:function(ne){if(ne===void 0&&(ne=!1),ne)return b==null?void 0:b.getVariantContext();if(!re){var ae=(b==null?void 0:b.getVariantContext())||{};return w.initial!==void 0&&(ae.initial=w.initial),ae}for(var le={},de=0;de<cee;de++){var xe=BP[de],ve=w[xe];(Ci(ve)||ve===!1)&&(le[xe]=ve)}return le}});return ie}},BP=xi(["initial"],Xt(BS),!1),cee=BP.length;function YS(e){return typeof e=="string"&&e.startsWith("var(--")}var qP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function uee(e){var t=qP.exec(e);if(!t)return[,];var n=Xt(t,3),r=n[1],o=n[2];return[r,o]}function QS(e,t,n){var r=Xt(uee(e),2),o=r[0],i=r[1];if(o){var s=window.getComputedStyle(t).getPropertyValue(o);return s?s.trim():YS(i)?QS(i,t):i}}function fee(e,t,n){var r,o=xr(t,[]),i=e.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};n&&(n=Se({},n)),e.forEachValue(function(f){var d=f.get();if(YS(d)){var g=QS(d,i);g&&f.set(g)}});for(var s in o){var l=o[s];if(YS(l)){var c=QS(l,i);c&&(o[s]=c,n&&((r=n[s])!==null&&r!==void 0||(n[s]=l)))}}return{target:o,transitionEnd:n}}var dee=new Set(["width","height","top","left","right","bottom","x","y"]),zP=function(e){return dee.has(e)},pee=function(e){return Object.keys(e).some(zP)},HP=function(e,t){e.set(t,!1),e.set(t)},WP=function(e){return e===Jl||e===et},GP;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(GP||(GP={}));var YP=function(e,t){return parseFloat(e.split(", ")[t])},QP=function(e,t){return function(n,r){var o=r.transform;if(o==="none"||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return YP(i[1],t);var s=o.match(/^matrix\((.+)\)$/);return s?YP(s[1],e):0}},hee=new Set(["x","y","z"]),mee=wp.filter(function(e){return!hee.has(e)});function gee(e){var t=[];return mee.forEach(function(n){var r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}var KP={width:function(e,t){var n=e.x,r=t.paddingLeft,o=r===void 0?"0":r,i=t.paddingRight,s=i===void 0?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(s)},height:function(e,t){var n=e.y,r=t.paddingTop,o=r===void 0?"0":r,i=t.paddingBottom,s=i===void 0?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(s)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:QP(4,13),y:QP(5,14)},vee=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),s=i.display,l={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(function(f){l[f]=KP[f](r,i)}),t.syncRender();var c=t.measureViewportBox();return n.forEach(function(f){var d=t.getValue(f);HP(d,l[f]),e[f]=KP[f](c,i)}),e},yee=function(e,t,n,r){n===void 0&&(n={}),r===void 0&&(r={}),t=Se({},t),r=Se({},r);var o=Object.keys(t).filter(zP),i=[],s=!1,l=[];if(o.forEach(function(d){var g=e.getValue(d);if(e.hasValue(d)){var m=n[d],v=Lp(m),b=t[d],w;if(_p(b)){var N=b.length,S=b[0]===null?1:0;m=b[S],v=Lp(m);for(var x=S;x<N;x++)w?Jv(Lp(b[x])===w):w=Lp(b[x])}else w=Lp(b);if(v!==w)if(WP(v)&&WP(w)){var C=g.get();typeof C=="string"&&g.set(parseFloat(C)),typeof b=="string"?t[d]=parseFloat(b):Array.isArray(b)&&w===et&&(t[d]=b.map(parseFloat))}else v!=null&&v.transform&&(w!=null&&w.transform)&&(m===0||b===0)?m===0?g.set(w.transform(m)):t[d]=v.transform(b):(s||(i=gee(e),s=!0),l.push(d),r[d]=r[d]!==void 0?r[d]:t[d],HP(g,b))}}),l.length){var c=l.indexOf("height")>=0?window.pageYOffset:null,f=vee(t,e,l);return i.length&&i.forEach(function(d){var g=Xt(d,2),m=g[0],v=g[1];e.getValue(m).set(v)}),e.syncRender(),c!==null&&window.scrollTo({top:c}),{target:f,transitionEnd:r}}else return{target:t,transitionEnd:r}};function bee(e,t,n,r){return pee(t)?yee(e,t,n,r):{target:t,transitionEnd:r}}var Eee=function(e,t,n,r){var o=fee(e,t,r);return t=o.target,r=o.transitionEnd,bee(e,t,n,r)};function wee(e){return window.getComputedStyle(e)}var JP={treeType:"dom",readValueFromInstance:function(e,t){if(xp(t)){var n=FS(t);return n&&n.default||0}else{var r=wee(e);return(rM(t)?r.getPropertyValue(t):r[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox:function(e,t){var n=t.transformPagePoint;return jP(e,n)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;r===void 0&&(r=!0);var i=t.transition,s=t.transitionEnd,l=xr(t,["transition","transitionEnd"]),c=_Z(l,i||{},e);if(o&&(s&&(s=o(s)),l&&(l=o(l)),c&&(c=o(c))),r){kZ(e,l,c);var f=Eee(e,l,c,s);s=f.transitionEnd,l=f.target}return Se({transition:i,transitionEnd:s},l)},scrapeMotionValuesFromProps:pS,build:function(e,t,n,r,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),uS(t,n,r,o.transformTemplate)},render:bM},xee=UP(JP),See=UP(Se(Se({},JP),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return xp(t)?((n=FS(t))===null||n===void 0?void 0:n.default)||0:(t=EM.has(t)?t:yM(t),e.getAttribute(t))},scrapeMotionValuesFromProps:xM,build:function(e,t,n,r,o){dS(t,n,r,o.transformTemplate)},render:wM})),Tee=function(e,t){return rS(e)?See(t,{enableHardwareAcceleration:!1}):xee(t,{enableHardwareAcceleration:!0})};function XP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Pp={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(et.test(e))e=parseFloat(e);else return e;var n=XP(e,t.target.x),r=XP(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},ZP="_$css",Cee={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,o=e,i=e.includes("var("),s=[];i&&(e=e.replace(qP,function(w){return s.push(w),ZP}));var l=Ps.parse(e);if(l.length>5)return o;var c=Ps.createTransformer(e),f=typeof l[0]!="number"?1:0,d=r.x.scale*n.x,g=r.y.scale*n.y;l[0+f]/=d,l[1+f]/=g;var m=sn(d,g,.5);typeof l[2+f]=="number"&&(l[2+f]/=m),typeof l[3+f]=="number"&&(l[3+f]/=m);var v=c(l);if(i){var b=0;v=v.replace(ZP,function(){var w=s[b];return b++,w})}return v}},kee=function(e){RL(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var n=this,r=this.props,o=r.visualElement,i=r.layoutGroup,s=r.switchLayoutGroup,l=r.layoutId,c=o.projection;YK(_ee),c&&(i!=null&&i.group&&i.group.add(c),s!=null&&s.register&&l&&s.register(c),c.root.didUpdate(),c.addEventListener("animationComplete",function(){n.safeToRemove()}),c.setOptions(Se(Se({},c.options),{onExitComplete:function(){return n.safeToRemove()}}))),Ep.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(n){var r=this,o=this.props,i=o.layoutDependency,s=o.visualElement,l=o.drag,c=o.isPresent,f=s.projection;return f&&(f.isPresent=c,l||n.layoutDependency!==i||i===void 0?f.willUpdate():this.safeToRemove(),n.isPresent!==c&&(c?f.promote():f.relegate()||ki.postRender(function(){var d;!((d=f.getStack())===null||d===void 0)&&d.members.length||r.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var n=this.props.visualElement.projection;n&&(n.root.didUpdate(),!n.currentAnimation&&n.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,s=r.projection;s&&(s.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(s),i!=null&&i.deregister&&i.deregister(s))},t.prototype.safeToRemove=function(){var n=this.props.safeToRemove;n==null||n()},t.prototype.render=function(){return null},t}(ce.Component);function Nee(e){var t=Xt(fP(),2),n=t[0],r=t[1],o=k.useContext(ZF);return ce.createElement(kee,Se({},e,{layoutGroup:o,switchLayoutGroup:k.useContext(eM),isPresent:n,safeToRemove:r}))}var _ee={borderRadius:Se(Se({},Pp),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Pp,borderTopRightRadius:Pp,borderBottomLeftRadius:Pp,borderBottomRightRadius:Pp,boxShadow:Cee},Oee={measureLayout:Nee};function Aee(e,t,n){n===void 0&&(n={});var r=Ji(e)?e:ec(e);return $S("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var e3=["TopLeft","TopRight","BottomLeft","BottomRight"],Dee=e3.length,t3=function(e){return typeof e=="string"?parseFloat(e):e},n3=function(e){return typeof e=="number"||et.test(e)};function Iee(e,t,n,r,o,i){var s,l,c,f;o?(e.opacity=sn(0,(s=n.opacity)!==null&&s!==void 0?s:1,Lee(r)),e.opacityExit=sn((l=t.opacity)!==null&&l!==void 0?l:1,0,Ree(r))):i&&(e.opacity=sn((c=t.opacity)!==null&&c!==void 0?c:1,(f=n.opacity)!==null&&f!==void 0?f:1,r));for(var d=0;d<Dee;d++){var g="border".concat(e3[d],"Radius"),m=r3(t,g),v=r3(n,g);if(!(m===void 0&&v===void 0)){m||(m=0),v||(v=0);var b=m===0||v===0||n3(m)===n3(v);b?(e[g]=Math.max(sn(t3(m),t3(v),r),0),(Xi.test(v)||Xi.test(m))&&(e[g]+="%")):e[g]=v}}(t.rotate||n.rotate)&&(e.rotate=sn(t.rotate||0,n.rotate||0,r))}function r3(e,t){var n;return(n=e[t])!==null&&n!==void 0?n:e.borderRadius}var Lee=o3(0,.5,kS),Ree=o3(.5,.95,TS);function o3(e,t,n){return function(r){return r<e?0:r>t?1:n(Op(e,t,r))}}function i3(e,t){e.min=t.min,e.max=t.max}function Ni(e,t){i3(e.x,t.x),i3(e.y,t.y)}function s3(e,t,n,r,o){return e-=t,e=x0(e,1/n,r),o!==void 0&&(e=x0(e,1/o,r)),e}function Fee(e,t,n,r,o,i,s){if(t===void 0&&(t=0),n===void 0&&(n=1),r===void 0&&(r=.5),i===void 0&&(i=e),s===void 0&&(s=e),Xi.test(t)){t=parseFloat(t);var l=sn(s.min,s.max,t/100);t=l-s.min}if(typeof t=="number"){var c=sn(i.min,i.max,r);e===i&&(c-=t),e.min=s3(e.min,t,n,c,o),e.max=s3(e.max,t,n,c,o)}}function a3(e,t,n,r,o){var i=Xt(n,3),s=i[0],l=i[1],c=i[2];Fee(e,t[s],t[l],t[c],t.scale,r,o)}var Mee=["x","scaleX","originX"],Pee=["y","scaleY","originY"];function l3(e,t,n,r){a3(e.x,t,Mee,n==null?void 0:n.x,r==null?void 0:r.x),a3(e.y,t,Pee,n==null?void 0:n.y,r==null?void 0:r.y)}function c3(e){return e.translate===0&&e.scale===1}function u3(e){return c3(e.x)&&c3(e.y)}function f3(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var $ee=function(){function e(){this.members=[]}return e.prototype.add=function(t){VS(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(jS(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var n=this.members[this.members.length-1];n&&this.promote(n)}},e.prototype.relegate=function(t){var n=this.members.findIndex(function(s){return t===s});if(n===0)return!1;for(var r,o=n;o>=0;o--){var i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1},e.prototype.promote=function(t,n){var r,o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);var i=t.options.crossfade;i===!1&&o.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var n,r,o,i,s;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(s=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||s===void 0||s.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),Vee="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function d3(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var s=n.rotate,l=n.rotateX,c=n.rotateY;s&&(i+="rotate(".concat(s,"deg) ")),l&&(i+="rotateX(".concat(l,"deg) ")),c&&(i+="rotateY(".concat(c,"deg) "))}var f=e.x.scale*t.x,d=e.y.scale*t.y;return i+="scale(".concat(f,", ").concat(d,")"),i===Vee?"none":i}var jee=function(e,t){return e.depth-t.depth},Uee=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){VS(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){jS(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(jee),this.isDirty=!1,this.children.forEach(t)},e}(),p3=1e3;function h3(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function s(l,c,f){var d=this;c===void 0&&(c={}),f===void 0&&(f=n==null?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){d.isUpdating&&(d.isUpdating=!1,d.clearAllSnapshots())},this.updateProjection=function(){d.nodes.forEach(Gee),d.nodes.forEach(Yee)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=l,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?xi(xi([],Xt(f.path),!1),[f],!1):[],this.parent=f,this.depth=f?f.depth+1:0,l&&this.root.registerPotentialNode(l,this);for(var g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new Uee)}return s.prototype.addEventListener=function(l,c){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Ip),this.eventHandlers.get(l).add(c)},s.prototype.notifyListeners=function(l){for(var c=[],f=1;f<arguments.length;f++)c[f-1]=arguments[f];var d=this.eventHandlers.get(l);d==null||d.notify.apply(d,xi([],Xt(c),!1))},s.prototype.hasListeners=function(l){return this.eventHandlers.has(l)},s.prototype.registerPotentialNode=function(l,c){this.potentialNodes.set(l,c)},s.prototype.mount=function(l,c){var f=this,d;if(c===void 0&&(c=!1),!this.instance){this.isSVG=l instanceof SVGElement&&l.tagName!=="svg",this.instance=l;var g=this.options,m=g.layoutId,v=g.layout,b=g.visualElement;if(b&&!b.getInstance()&&b.mount(l),this.root.nodes.add(this),(d=this.parent)===null||d===void 0||d.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),c&&(v||m)&&(this.isLayoutDirty=!0),t){var w,N=function(){return f.root.updateBlockedByResize=!1};t(l,function(){f.root.updateBlockedByResize=!0,clearTimeout(w),w=window.setTimeout(N,250),Ep.hasAnimatedSinceResize&&(Ep.hasAnimatedSinceResize=!1,f.nodes.forEach(Wee))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&b&&(m||v)&&this.addEventListener("didUpdate",function(S){var x,C,E,_,I,D=S.delta,A=S.hasLayoutChanged,F=S.hasRelativeTargetChanged,$=S.layout;if(f.isTreeAnimationBlocked()){f.target=void 0,f.relativeTarget=void 0;return}var q=(C=(x=f.options.transition)!==null&&x!==void 0?x:b.getDefaultTransition())!==null&&C!==void 0?C:Zee,H=b.getProps(),z=H.onLayoutAnimationStart,B=H.onLayoutAnimationComplete,R=!f.targetLayout||!f3(f.targetLayout,$)||F,te=!A&&F;if(!((E=f.resumeFrom)===null||E===void 0)&&E.instance||te||A&&(R||!f.currentAnimation)){f.resumeFrom&&(f.resumingFrom=f.resumeFrom,f.resumingFrom.resumingFrom=void 0),f.setAnimationOrigin(D,te);var Y=Se(Se({},PS(q,"layout")),{onPlay:z,onComplete:B});b.shouldReduceMotion&&(Y.delay=0,Y.type=!1),f.startAnimation(Y)}else!A&&f.animationProgress===0&&f.finishAnimation(),f.isLead()&&((I=(_=f.options).onExitComplete)===null||I===void 0||I.call(_));f.targetLayout=$})}},s.prototype.unmount=function(){var l,c;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(l=this.getStack())===null||l===void 0||l.remove(this),(c=this.parent)===null||c===void 0||c.children.delete(this),this.instance=void 0,qu.preRender(this.updateProjection)},s.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},s.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},s.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},s.prototype.isTreeAnimationBlocked=function(){var l;return this.isAnimationBlocked||((l=this.parent)===null||l===void 0?void 0:l.isTreeAnimationBlocked())||!1},s.prototype.startUpdate=function(){var l;this.isUpdateBlocked()||(this.isUpdating=!0,(l=this.nodes)===null||l===void 0||l.forEach(Qee))},s.prototype.willUpdate=function(l){var c,f,d;if(l===void 0&&(l=!0),this.root.isUpdateBlocked()){(f=(c=this.options).onExitComplete)===null||f===void 0||f.call(c);return}if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var g=0;g<this.path.length;g++){var m=this.path[g];m.shouldResetTransform=!0,m.updateScroll()}var v=this.options,b=v.layoutId,w=v.layout;if(!(b===void 0&&!w)){var N=(d=this.options.visualElement)===null||d===void 0?void 0:d.getProps().transformTemplate;this.prevTransformTemplateValue=N==null?void 0:N(this.latestValues,""),this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}}},s.prototype.didUpdate=function(){var l=this.isUpdateBlocked();if(l){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(m3);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(ete),this.potentialNodes.clear()),this.nodes.forEach(Hee),this.nodes.forEach(Bee),this.nodes.forEach(qee),this.clearAllSnapshots(),AS.update(),AS.preRender(),AS.render())},s.prototype.clearAllSnapshots=function(){this.nodes.forEach(zee),this.sharedNodes.forEach(Kee)},s.prototype.scheduleUpdateProjection=function(){ki.preRender(this.updateProjection,!1,!0)},s.prototype.scheduleCheckAfterUnmount=function(){var l=this;ki.postRender(function(){l.isLayoutDirty?l.root.didUpdate():l.root.checkUpdateFailed()})},s.prototype.updateSnapshot=function(){if(!(this.snapshot||!this.instance)){var l=this.measure(),c=this.removeTransform(this.removeElementScroll(l));b3(c),this.snapshot={measured:l,layout:c,latestValues:{}}}},s.prototype.updateLayout=function(){var l;if(this.instance&&(this.updateScroll(),!(!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))){if(this.resumeFrom&&!this.resumeFrom.instance)for(var c=0;c<this.path.length;c++){var f=this.path[c];f.updateScroll()}var d=this.measure();b3(d);var g=this.layout;this.layout={measured:d,actual:this.removeElementScroll(d)},this.layoutCorrected=Sr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),(l=this.options.visualElement)===null||l===void 0||l.notifyLayoutMeasure(this.layout.actual,g==null?void 0:g.actual)}},s.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=o(this.instance),this.scroll=r(this.instance))},s.prototype.resetTransform=function(){var l;if(i){var c=this.isLayoutDirty||this.shouldResetTransform,f=this.projectionDelta&&!u3(this.projectionDelta),d=(l=this.options.visualElement)===null||l===void 0?void 0:l.getProps().transformTemplate,g=d==null?void 0:d(this.latestValues,""),m=g!==this.prevTransformTemplateValue;c&&(f||ja(this.latestValues)||m)&&(i(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}},s.prototype.measure=function(){var l=this.options.visualElement;if(!l)return Sr();var c=l.measureViewportBox(),f=this.root.scroll;return f&&(Ua(c.x,f.x),Ua(c.y,f.y)),c},s.prototype.removeElementScroll=function(l){var c=Sr();Ni(c,l);for(var f=0;f<this.path.length;f++){var d=this.path[f],g=d.scroll,m=d.options,v=d.isScrollRoot;if(d!==this.root&&g&&m.layoutScroll){if(v){Ni(c,l);var b=this.root.scroll;b&&(Ua(c.x,-b.x),Ua(c.y,-b.y))}Ua(c.x,g.x),Ua(c.y,g.y)}}return c},s.prototype.applyTransform=function(l,c){c===void 0&&(c=!1);var f=Sr();Ni(f,l);for(var d=0;d<this.path.length;d++){var g=this.path[d];!c&&g.options.layoutScroll&&g.scroll&&g!==g.root&&zu(f,{x:-g.scroll.x,y:-g.scroll.y}),ja(g.latestValues)&&zu(f,g.latestValues)}return ja(this.latestValues)&&zu(f,this.latestValues),f},s.prototype.removeTransform=function(l){var c,f=Sr();Ni(f,l);for(var d=0;d<this.path.length;d++){var g=this.path[d];if(g.instance&&ja(g.latestValues)){FP(g.latestValues)&&g.updateSnapshot();var m=Sr(),v=g.measure();Ni(m,v),l3(f,g.latestValues,(c=g.snapshot)===null||c===void 0?void 0:c.layout,m)}}return ja(this.latestValues)&&l3(f,this.latestValues),f},s.prototype.setTargetDelta=function(l){this.targetDelta=l,this.root.scheduleUpdateProjection()},s.prototype.setOptions=function(l){var c;this.options=Se(Se(Se({},this.options),l),{crossfade:(c=l.crossfade)!==null&&c!==void 0?c:!0})},s.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},s.prototype.resolveTargetDelta=function(){var l,c=this.options,f=c.layout,d=c.layoutId;!this.layout||!(f||d)||(!this.targetDelta&&!this.relativeTarget&&(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget=Sr(),this.relativeTargetOrigin=Sr(),Fp(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),Ni(this.relativeTarget,this.relativeTargetOrigin))),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Sr(),this.targetWithTransforms=Sr()),this.relativeTarget&&this.relativeTargetOrigin&&(!((l=this.relativeParent)===null||l===void 0)&&l.target)?BZ(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.actual):Ni(this.target,this.layout.actual),$P(this.target,this.targetDelta)):Ni(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&!!this.relativeParent.resumingFrom==!!this.resumingFrom&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget=Sr(),this.relativeTargetOrigin=Sr(),Fp(this.relativeTargetOrigin,this.target,this.relativeParent.target),Ni(this.relativeTarget,this.relativeTargetOrigin)))))},s.prototype.getClosestProjectingParent=function(){if(!(!this.parent||ja(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},s.prototype.calcProjection=function(){var l,c=this.options,f=c.layout,d=c.layoutId;if(this.isTreeAnimating=!!(!((l=this.parent)===null||l===void 0)&&l.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!(!this.layout||!(f||d))){var g=this.getLead();Ni(this.layoutCorrected,this.layout.actual),JZ(this.layoutCorrected,this.treeScale,this.path,!!this.resumingFrom||this!==g);var m=g.target;if(m){this.projectionDelta||(this.projectionDelta=Mp(),this.projectionDeltaWithTransform=Mp());var v=this.treeScale.x,b=this.treeScale.y,w=this.projectionTransform;Rp(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=d3(this.projectionDelta,this.treeScale),(this.projectionTransform!==w||this.treeScale.x!==v||this.treeScale.y!==b)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}}},s.prototype.hide=function(){this.isVisible=!1},s.prototype.show=function(){this.isVisible=!0},s.prototype.scheduleRender=function(l){var c,f,d;l===void 0&&(l=!0),(f=(c=this.options).scheduleRender)===null||f===void 0||f.call(c),l&&((d=this.getStack())===null||d===void 0||d.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},s.prototype.setAnimationOrigin=function(l,c){var f=this,d;c===void 0&&(c=!1);var g=this.snapshot,m=(g==null?void 0:g.latestValues)||{},v=Se({},this.latestValues),b=Mp();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!c;var w=Sr(),N=g==null?void 0:g.isShared,S=(((d=this.getStack())===null||d===void 0?void 0:d.members.length)||0)<=1,x=!!(N&&!S&&this.options.crossfade===!0&&!this.path.some(Xee));this.animationProgress=0,this.mixTargetDelta=function(C){var E,_=C/1e3;g3(b.x,l.x,_),g3(b.y,l.y,_),f.setTargetDelta(b),f.relativeTarget&&f.relativeTargetOrigin&&f.layout&&(!((E=f.relativeParent)===null||E===void 0)&&E.layout)&&(Fp(w,f.layout.actual,f.relativeParent.layout.actual),Jee(f.relativeTarget,f.relativeTargetOrigin,w,_)),N&&(f.animationValues=v,Iee(v,m,f.latestValues,_,x,S)),f.root.scheduleUpdateProjection(),f.scheduleRender(),f.animationProgress=_},this.mixTargetDelta(0)},s.prototype.startAnimation=function(l){var c=this,f,d;this.notifyListeners("animationStart"),(f=this.currentAnimation)===null||f===void 0||f.stop(),this.resumingFrom&&((d=this.resumingFrom.currentAnimation)===null||d===void 0||d.stop()),this.pendingAnimation&&(qu.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ki.update(function(){Ep.hasAnimatedSinceResize=!0,c.currentAnimation=Aee(0,p3,Se(Se({},l),{onUpdate:function(g){var m;c.mixTargetDelta(g),(m=l.onUpdate)===null||m===void 0||m.call(l,g)},onComplete:function(){var g;(g=l.onComplete)===null||g===void 0||g.call(l),c.completeAnimation()}})),c.resumingFrom&&(c.resumingFrom.currentAnimation=c.currentAnimation),c.pendingAnimation=void 0})},s.prototype.completeAnimation=function(){var l;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(l=this.getStack())===null||l===void 0||l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},s.prototype.finishAnimation=function(){var l;this.currentAnimation&&((l=this.mixTargetDelta)===null||l===void 0||l.call(this,p3),this.currentAnimation.stop()),this.completeAnimation()},s.prototype.applyTransformsToTarget=function(){var l=this.getLead(),c=l.targetWithTransforms,f=l.target,d=l.layout,g=l.latestValues;!c||!f||!d||(Ni(c,f),zu(c,g),Rp(this.projectionDeltaWithTransform,this.layoutCorrected,c,g))},s.prototype.registerSharedNode=function(l,c){var f,d,g;this.sharedNodes.has(l)||this.sharedNodes.set(l,new $ee);var m=this.sharedNodes.get(l);m.add(c),c.promote({transition:(f=c.options.initialPromotionConfig)===null||f===void 0?void 0:f.transition,preserveFollowOpacity:(g=(d=c.options.initialPromotionConfig)===null||d===void 0?void 0:d.shouldPreserveFollowOpacity)===null||g===void 0?void 0:g.call(d,c)})},s.prototype.isLead=function(){var l=this.getStack();return l?l.lead===this:!0},s.prototype.getLead=function(){var l,c=this.options.layoutId;return c?((l=this.getStack())===null||l===void 0?void 0:l.lead)||this:this},s.prototype.getPrevLead=function(){var l,c=this.options.layoutId;return c?(l=this.getStack())===null||l===void 0?void 0:l.prevLead:void 0},s.prototype.getStack=function(){var l=this.options.layoutId;if(l)return this.root.sharedNodes.get(l)},s.prototype.promote=function(l){var c=l===void 0?{}:l,f=c.needsReset,d=c.transition,g=c.preserveFollowOpacity,m=this.getStack();m&&m.promote(this,g),f&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})},s.prototype.relegate=function(){var l=this.getStack();return l?l.relegate(this):!1},s.prototype.resetRotation=function(){var l=this.options.visualElement;if(l){for(var c=!1,f={},d=0;d<oS.length;d++){var g=oS[d],m="rotate"+g;l.getStaticValue(m)&&(c=!0,f[m]=l.getStaticValue(m),l.setStaticValue(m,0))}if(c){l==null||l.syncRender();for(var m in f)l.setStaticValue(m,f[m]);l.scheduleRender()}}},s.prototype.getProjectionStyles=function(l){var c,f,d,g,m,v;l===void 0&&(l={});var b={};if(!this.instance||this.isSVG)return b;if(this.isVisible)b.visibility="";else return{visibility:"hidden"};var w=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,b.opacity="",b.pointerEvents=s0(l.pointerEvents)||"",b.transform=w?w(this.latestValues,""):"none",b;var N=this.getLead();if(!this.projectionDelta||!this.layout||!N.target){var S={};return this.options.layoutId&&(S.opacity=(f=this.latestValues.opacity)!==null&&f!==void 0?f:1,S.pointerEvents=s0(l.pointerEvents)||""),this.hasProjected&&!ja(this.latestValues)&&(S.transform=w?w({},""):"none",this.hasProjected=!1),S}var x=N.animationValues||N.latestValues;this.applyTransformsToTarget(),b.transform=d3(this.projectionDeltaWithTransform,this.treeScale,x),w&&(b.transform=w(x,b.transform));var C=this.projectionDelta,E=C.x,_=C.y;b.transformOrigin="".concat(E.origin*100,"% ").concat(_.origin*100,"% 0"),N.animationValues?b.opacity=N===this?(g=(d=x.opacity)!==null&&d!==void 0?d:this.latestValues.opacity)!==null&&g!==void 0?g:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:b.opacity=N===this?(m=x.opacity)!==null&&m!==void 0?m:"":(v=x.opacityExit)!==null&&v!==void 0?v:0;for(var I in r0)if(x[I]!==void 0){var D=r0[I],A=D.correct,F=D.applyTo,$=A(x[I],N);if(F)for(var q=F.length,H=0;H<q;H++)b[F[H]]=$;else b[I]=$}return this.options.layoutId&&(b.pointerEvents=N===this?s0(l.pointerEvents)||"":"none"),b},s.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},s.prototype.resetTree=function(){this.root.nodes.forEach(function(l){var c;return(c=l.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(m3),this.root.sharedNodes.clear()},s}()}function Bee(e){e.updateLayout()}function qee(e){var t,n,r,o,i=(n=(t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)!==null&&n!==void 0?n:e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){var s=e.layout,l=s.actual,c=s.measured;e.options.animationType==="size"?Zi(function(x){var C=i.isShared?i.measured[x]:i.layout[x],E=$s(C);C.min=l[x].min,C.max=C.min+E}):e.options.animationType==="position"&&Zi(function(x){var C=i.isShared?i.measured[x]:i.layout[x],E=$s(l[x]);C.max=C.min+E});var f=Mp();Rp(f,l,i.layout);var d=Mp();i.isShared?Rp(d,e.applyTransform(c,!0),i.measured):Rp(d,l,i.layout);var g=!u3(f),m=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var v=e.relativeParent,b=v.snapshot,w=v.layout;if(b&&w){var N=Sr();Fp(N,i.layout,b.layout);var S=Sr();Fp(S,l,w.actual),f3(N,S)||(m=!0)}}e.notifyListeners("didUpdate",{layout:l,snapshot:i,delta:d,layoutDelta:f,hasLayoutChanged:g,hasRelativeTargetChanged:m})}else e.isLead()&&((o=(r=e.options).onExitComplete)===null||o===void 0||o.call(r));e.options.transition=void 0}function zee(e){e.clearSnapshot()}function m3(e){e.clearMeasurements()}function Hee(e){var t=e.options.visualElement;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function Wee(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Gee(e){e.resolveTargetDelta()}function Yee(e){e.calcProjection()}function Qee(e){e.resetRotation()}function Kee(e){e.removeLeadSnapshot()}function g3(e,t,n){e.translate=sn(t.translate,0,n),e.scale=sn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function v3(e,t,n,r){e.min=sn(t.min,n.min,r),e.max=sn(t.max,n.max,r)}function Jee(e,t,n,r){v3(e.x,t.x,n.x,r),v3(e.y,t.y,n.y,r)}function Xee(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Zee={duration:.45,ease:[.4,0,.1,1]};function ete(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(e.path[r].instance){n=e.path[r];break}var o=n&&n!==e.root?n.instance:document,i=o.querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function y3(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function b3(e){y3(e.x),y3(e.y)}var tte=h3({attachResizeListener:function(e,t){return a0(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),KS={current:void 0},nte=h3({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!KS.current){var e=new tte(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),KS.current=e}return KS.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),rte=Se(Se(Se(Se({},VZ),tZ),see),Oee),E3=WK(function(e,t){return IJ(e,t,rte,Tee,nte)}),w3=k.createContext(null);function ote(e,t,n,r){if(!r)return e;var o=e.findIndex(function(d){return d.value===t});if(o===-1)return e;var i=r>0?1:-1,s=e[o+i];if(!s)return e;var l=e[o],c=s.layout,f=sn(c.min,c.max,.5);return i===1&&l.layout.max+n>f||i===-1&&l.layout.min+n<f?yZ(e,o,o+i):e}function ite(e,t){var n=e.children,r=e.as,o=r===void 0?"ul":r,i=e.axis,s=i===void 0?"y":i,l=e.onReorder,c=e.values,f=xr(e,["children","as","axis","onReorder","values"]),d=Ma(function(){return E3(o)}),g=[],m=k.useRef(!1),v={axis:s,registerItem:function(b,w){w&&g.findIndex(function(N){return b===N.value})===-1&&(g.push({value:b,layout:w[s]}),g.sort(lte))},updateOrder:function(b,w,N){if(!m.current){var S=ote(g,b,w,N);g!==S&&(m.current=!0,l(S.map(ate).filter(function(x){return c.indexOf(x)!==-1})))}}};return k.useEffect(function(){m.current=!1}),k.createElement(d,Se({},f,{ref:t}),k.createElement(w3.Provider,{value:v},n))}var ste=k.forwardRef(ite);function ate(e){return e.value}function lte(e,t){return e.layout.min-t.layout.min}function x3(e){var t=Ma(function(){return ec(e)}),n=k.useContext(Xv).isStatic;if(n){var r=Xt(k.useState(e),2),o=r[1];k.useEffect(function(){return t.onChange(o)},[])}return t}var cte=function(e){return typeof e=="object"&&e.mix},ute=function(e){return cte(e)?e.mix:void 0};function fte(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,o=e[0+r],i=e[1+r],s=e[2+r],l=e[3+r],c=xS(i,s,Se({mixer:ute(s[0])},l));return n?c(o):c}function dte(e,t){tS(function(){var n=e.map(function(r){return r.onChange(t)});return function(){return n.forEach(function(r){return r()})}})}function pte(e,t){var n=x3(t()),r=function(){return n.set(t())};return r(),dte(e,function(){return ki.update(r,!1,!0)}),n}function hte(e,t,n,r){var o=typeof t=="function"?t:fte(t,n,r);return Array.isArray(e)?S3(e,o):S3([e],function(i){var s=Xt(i,1),l=s[0];return o(l)})}function S3(e,t){var n=Ma(function(){return[]});return pte(e,function(){n.length=0;for(var r=e.length,o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function T3(e,t){return t===void 0&&(t=0),Ji(e)?e:x3(t)}function mte(e,t){var n=e.children,r=e.style,o=e.value,i=e.as,s=i===void 0?"li":i,l=e.onDrag,c=e.layout,f=c===void 0?!0:c,d=xr(e,["children","style","value","as","onDrag","layout"]),g=Ma(function(){return E3(s)}),m=k.useContext(w3),v={x:T3(r==null?void 0:r.x),y:T3(r==null?void 0:r.y)},b=hte([v.x,v.y],function(E){var _=Xt(E,2),I=_[0],D=_[1];return I||D?1:"unset"}),w=k.useRef(null),N=m,S=N.axis,x=N.registerItem,C=N.updateOrder;return k.useEffect(function(){x(o,w.current)},[m]),k.createElement(g,Se({drag:S},d,{dragSnapToOrigin:!0,style:Se(Se({},r),{x:v.x,y:v.y,zIndex:b}),layout:f,onDrag:function(E,_){var I=_.velocity;I[S]&&C(o,v[S].get(),I[S]),l==null||l(E,_)},onLayoutMeasure:function(E){w.current=E},ref:t}),n)}var gte=k.forwardRef(mte),C3={Group:ste,Item:gte};const[C0,K9e]=zl("Tooltip",[Rv]),JS=Rv(),vte="TooltipProvider",yte=700,XS="tooltip.open",[bte,ZS]=C0(vte),Ete=e=>{const{__scopeTooltip:t,delayDuration:n=yte,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[s,l]=k.useState(!0),c=k.useRef(!1),f=k.useRef(0);return k.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),k.createElement(bte,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:k.useCallback(()=>{window.clearTimeout(f.current),l(!1)},[]),onClose:k.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>l(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:k.useCallback(d=>{c.current=d},[]),disableHoverableContent:o},i)},eT="Tooltip",[wte,$p]=C0(eT),xte=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=ZS(eT,e.__scopeTooltip),f=JS(t),[d,g]=k.useState(null),m=Hl(),v=k.useRef(0),b=s??c.disableHoverableContent,w=l??c.delayDuration,N=k.useRef(!1),[S=!1,x]=vv({prop:r,defaultProp:o,onChange:D=>{D?(c.onOpen(),document.dispatchEvent(new CustomEvent(XS))):c.onClose(),i==null||i(D)}}),C=k.useMemo(()=>S?N.current?"delayed-open":"instant-open":"closed",[S]),E=k.useCallback(()=>{window.clearTimeout(v.current),N.current=!1,x(!0)},[x]),_=k.useCallback(()=>{window.clearTimeout(v.current),x(!1)},[x]),I=k.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{N.current=!0,x(!0)},w)},[w,x]);return k.useEffect(()=>()=>window.clearTimeout(v.current),[]),k.createElement(RR,f,k.createElement(wte,{scope:t,contentId:m,open:S,stateAttribute:C,trigger:d,onTriggerChange:g,onTriggerEnter:k.useCallback(()=>{c.isOpenDelayed?I():E()},[c.isOpenDelayed,I,E]),onTriggerLeave:k.useCallback(()=>{b?_():window.clearTimeout(v.current)},[_,b]),onOpen:E,onClose:_,disableHoverableContent:b},n))},k3="TooltipTrigger",Ste=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$p(k3,n),i=ZS(k3,n),s=JS(n),l=k.useRef(null),c=ar(t,l,o.onTriggerChange),f=k.useRef(!1),d=k.useRef(!1),g=k.useCallback(()=>f.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),k.createElement(FR,Ze({asChild:!0},s),k.createElement(lr.button,Ze({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:c,onPointerMove:dt(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:dt(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:dt(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:dt(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:dt(e.onBlur,o.onClose),onClick:dt(e.onClick,o.onClose)})))}),N3="TooltipPortal",[Tte,Cte]=C0(N3,{forceMount:void 0}),kte=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=$p(N3,t);return k.createElement(Tte,{scope:t,forceMount:n},k.createElement(Da,{present:n||i.open},k.createElement(fx,{asChild:!0,container:o},r)))},Vp="TooltipContent",Nte=k.forwardRef((e,t)=>{const n=Cte(Vp,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=$p(Vp,e.__scopeTooltip);return k.createElement(Da,{present:r||s.open},s.disableHoverableContent?k.createElement(_3,Ze({side:o},i,{ref:t})):k.createElement(_te,Ze({side:o},i,{ref:t})))}),_te=k.forwardRef((e,t)=>{const n=$p(Vp,e.__scopeTooltip),r=ZS(Vp,e.__scopeTooltip),o=k.useRef(null),i=ar(t,o),[s,l]=k.useState(null),{trigger:c,onClose:f}=n,d=o.current,{onPointerInTransitChange:g}=r,m=k.useCallback(()=>{l(null),g(!1)},[g]),v=k.useCallback((b,w)=>{const N=b.currentTarget,S={x:b.clientX,y:b.clientY},x=Ate(S,N.getBoundingClientRect()),C=Dte(S,x),E=Ite(w.getBoundingClientRect()),_=Rte([...C,...E]);l(_),g(!0)},[g]);return k.useEffect(()=>()=>m(),[m]),k.useEffect(()=>{if(c&&d){const b=N=>v(N,d),w=N=>v(N,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",w)}}},[c,d,v,m]),k.useEffect(()=>{if(s){const b=w=>{const N=w.target,S={x:w.clientX,y:w.clientY},x=(c==null?void 0:c.contains(N))||(d==null?void 0:d.contains(N)),C=!Lte(S,s);x?m():C&&(m(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,s,f,m]),k.createElement(_3,Ze({},e,{ref:i}))}),[Ote,J9e]=C0(eT,{isInside:!1}),_3=k.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=$p(Vp,n),f=JS(n),{onClose:d}=c;return k.useEffect(()=>(document.addEventListener(XS,d),()=>document.removeEventListener(XS,d)),[d]),k.useEffect(()=>{if(c.trigger){const g=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&d()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[c.trigger,d]),k.createElement(lx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:g=>g.preventDefault(),onDismiss:d},k.createElement(MR,Ze({"data-state":c.stateAttribute},f,l,{ref:t,style:{...l.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)"}}),k.createElement(wL,null,r),k.createElement(Ote,{scope:n,isInside:!0},k.createElement(sR,{id:c.contentId,role:"tooltip"},o||r))))});function Ate(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Dte(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Ite(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Lte(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i].x,c=t[i].y,f=t[s].x,d=t[s].y;c>r!=d>r&&n<(f-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function Rte(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Fte(t)}function Fte(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const Mte=Ete,Pte=xte,$te=Ste,Vte=kte,jte=Nte;function Hu(e,t,n){let r=n.initialDeps??[],o;return()=>{var i,s,l,c;let f;n.key&&((i=n.debug)!=null&&i.call(n))&&(f=Date.now());const d=e();if(!(d.length!==r.length||d.some((v,b)=>r[b]!==v)))return o;r=d;let m;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(m=Date.now()),o=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const v=Math.round((Date.now()-f)*100)/100,b=Math.round((Date.now()-m)*100)/100,w=b/16,N=(S,x)=>{for(S=String(S);S.length<x;)S=" "+S;return S};console.info(`%c⏱ ${N(b,5)} /${N(v,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,o),o}}function tT(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const Ute=(e,t)=>Math.abs(e-t)<1,Bte=e=>e,qte=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let o=t;o<=n;o++)r.push(o);return r},zte=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=i=>{const{width:s,height:l}=i;t({width:Math.round(s),height:Math.round(l)})};if(r(n.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const o=new ResizeObserver(i=>{const s=i[0];if(s!=null&&s.borderBoxSize){const l=s.borderBoxSize[0];if(l){r({width:l.inlineSize,height:l.blockSize});return}}r(n.getBoundingClientRect())});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Hte=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=()=>{t(n[e.options.horizontal?"scrollLeft":"scrollTop"])};return r(),n.addEventListener("scroll",r,{passive:!0}),()=>{n.removeEventListener("scroll",r)}},Wte=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Gte=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;const s=e+t;(i=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||i.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:n})};class Yte{constructor(t){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.isScrollingTimeoutId=null,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(typeof ResizeObserver<"u"?n=new ResizeObserver(o=>{o.forEach(i=>{this._measureElement(i.target,i)})}):null);return{disconnect:()=>{var o;return(o=r())==null?void 0:o.disconnect()},observe:o=>{var i;return(i=r())==null?void 0:i.observe(o,{box:"border-box"})},unobserve:o=>{var i;return(i=r())==null?void 0:i.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,o])=>{typeof o>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Bte,rangeExtractor:qte,onChange:()=>{},measureElement:Wte,initialRect:{width:0,height:0},scrollMargin:0,gap:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...n}},this.notify=n=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,n)},this.maybeNotify=Hu(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const n=this.options.getScrollElement();this.scrollElement!==n&&(this.cleanup(),this.scrollElement=n,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,r=>{this.scrollAdjustments=0,this.scrollOffset!==r&&(this.isScrollingTimeoutId!==null&&(clearTimeout(this.isScrollingTimeoutId),this.isScrollingTimeoutId=null),this.isScrolling=!0,this.scrollDirection=this.scrollOffset<r?"forward":"backward",this.scrollOffset=r,this.maybeNotify(),this.isScrollingTimeoutId=setTimeout(()=>{this.isScrollingTimeoutId=null,this.isScrolling=!1,this.scrollDirection=null,this.maybeNotify()},this.options.scrollingDelay))})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.memoOptions=Hu(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,r,o,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:o,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(n,r)=>{const o=new Map,i=new Map;for(let s=r-1;s>=0;s--){const l=n[s];if(o.has(l.lane))continue;const c=i.get(l.lane);if(c==null||l.end>c.end?i.set(l.lane,l):l.end<c.end&&o.set(l.lane,!0),o.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((s,l)=>s.end===l.end?s.index-l.index:s.end-l.end)[0]:void 0},this.getMeasurements=Hu(()=>[this.memoOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:o,getItemKey:i},s)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,l);for(let f=l;f<n;f++){const d=i(f),g=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f),m=g?g.end+this.options.gap:r+o,v=s.get(d),b=typeof v=="number"?v:this.options.estimateSize(f),w=m+b,N=g?g.lane:f%this.options.lanes;c[f]={index:f,start:m,size:b,end:w,key:d,lane:N}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Hu(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,r,o)=>this.range=n.length>0&&r>0?Qte({measurements:n,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Hu(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,r,o,i)=>r===null?[]:n({...r,overscan:o,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,o=n.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const o=this.measurementsCache[this.indexFromElement(n)];if(!o||!n.isConnected){this.measureElementCache.forEach((l,c)=>{l===n&&(this.observer.unobserve(n),this.measureElementCache.delete(c))});return}const i=this.measureElementCache.get(o.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.measureElementCache.set(o.key,n));const s=this.options.measureElement(n,r,this);this.resizeItem(o,s)},this.resizeItem=(n,r)=>{const o=this.itemSizeCache.get(n.key)??n.size,i=r-o;i!==0&&(n.start<this.scrollOffset+this.scrollAdjustments&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,r)),this.notify(!1))},this.measureElement=n=>{n&&this._measureElement(n,void 0)},this.getVirtualItems=Hu(()=>[this.getIndexes(),this.getMeasurements()],(n,r)=>{const o=[];for(let i=0,s=n.length;i<s;i++){const l=n[i],c=r[l];o.push(c)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();return tT(r[O3(0,r.length-1,o=>tT(r[o]).start,n)])},this.getOffsetForAlignment=(n,r)=>{const o=this.getSize();r==="auto"&&(n<=this.scrollOffset?r="start":n>=this.scrollOffset+o?r="end":r="start"),r==="start"?n=n:r==="end"?n=n-o:r==="center"&&(n=n-o/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=tT(this.getMeasurements()[n]);if(r==="auto")if(o.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)r="end";else if(o.start<=this.scrollOffset+this.options.scrollPaddingStart)r="start";else return[this.scrollOffset,r];const i=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,r),r]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(n,{align:r="auto",behavior:o}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,s]=this.getOffsetForIndex(n,r);this._scrollToOffset(i,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[c]=this.getOffsetForIndex(n,s);Ute(c,this.scrollOffset)||this.scrollToIndex(n,{align:s,behavior:o})}else this.scrollToIndex(n,{align:s,behavior:o})}))},this.scrollBy=(n,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?((n=r[r.length-1])==null?void 0:n.end)??0:Math.max(...r.slice(-this.options.lanes).map(i=>i.end)),o-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:r,behavior:o})=>{this.options.scrollToFn(n,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.maybeNotify()}}const O3=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else if(i>r)t=o-1;else return o}return e>0?e-1:0};function Qte({measurements:e,outerSize:t,scrollOffset:n}){const r=e.length-1,i=O3(0,r,l=>e[l].start,n);let s=i;for(;s<r&&e[s].end<n+t;)s++;return{startIndex:i,endIndex:s}}const Kte=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Jte(e){const t=k.useReducer(()=>({}),{})[1],n={...e,onChange:(o,i)=>{var s;i?Pd.flushSync(t):t(),(s=e.onChange)==null||s.call(e,o,i)}},[r]=k.useState(()=>new Yte(n));return r.setOptions(n),k.useEffect(()=>r._didMount(),[]),Kte(()=>r._willUpdate()),r}function Xte(e){return Jte({observeElementRect:zte,observeElementOffset:Hte,scrollToFn:Gte,...e})}var Zte=Object.defineProperty,ene=(e,t,n)=>t in e?Zte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nT=(e,t,n)=>(ene(e,typeof t!="symbol"?t+"":t,n),n);let tne=class{constructor(){nT(this,"current",this.detect()),nT(this,"handoffState","pending"),nT(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},nc=new tne,Ur=(e,t)=>{nc.isServer?k.useEffect(e,t):k.useLayoutEffect(e,t)};function jp(e){let t=k.useRef(e);return Ur(()=>{t.current=e},[e]),t}function rT(e,t){let[n,r]=k.useState(e),o=jp(e);return Ur(()=>r(o.current),[o,r,...t]),n}let kt=function(e){let t=jp(e);return ce.useCallback((...n)=>t.current(...n),[t])};function nne(e,t,n){let[r,o]=k.useState(n),i=e!==void 0,s=k.useRef(i),l=k.useRef(!1),c=k.useRef(!1);return i&&!s.current&&!l.current?(l.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&s.current&&!c.current&&(c.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,kt(f=>(i||o(f),t==null?void 0:t(f)))]}function rne(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function k0(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return rne(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=k0();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function oT(){let[e]=k.useState(k0);return k.useEffect(()=>()=>e.dispose(),[e]),e}function one(){let e=typeof document>"u";return"useSyncExternalStore"in L1?(t=>t.useSyncExternalStore)(L1)(()=>()=>{},()=>!1,()=>!e):!1}function ine(){let e=one(),[t,n]=k.useState(nc.isHandoffComplete);return t&&nc.isHandoffComplete===!1&&n(!1),k.useEffect(()=>{t!==!0&&n(!0)},[t]),k.useEffect(()=>nc.handoff(),[]),e?!1:t}var A3;let Up=(A3=ce.useId)!=null?A3:function(){let e=ine(),[t,n]=ce.useState(e?()=>nc.nextId():null);return Ur(()=>{t===null&&n(nc.nextId())},[t]),t!=null?""+t:void 0};function Vs(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Vs),r}function iT(e){return nc.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let D3=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var sne=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(sne||{}),ane=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ane||{}),lne=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(lne||{}),I3=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(I3||{});function cne(e,t=0){var n;return e===((n=iT(e))==null?void 0:n.body)?!1:Vs(t,{0(){return e.matches(D3)},1(){let r=e;for(;r!==null;){if(r.matches(D3))return!0;r=r.parentElement}return!1}})}var une=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(une||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function fne(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function dne(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function pne(){return/Android/gi.test(window.navigator.userAgent)}function L3(){return dne()||pne()}function N0(e,t,n){let r=jp(t);k.useEffect(()=>{function o(i){r.current(i)}return document.addEventListener(e,o,n),()=>document.removeEventListener(e,o,n)},[e,n])}function hne(e,t,n){let r=jp(t);k.useEffect(()=>{function o(i){r.current(i)}return window.addEventListener(e,o,n),()=>window.removeEventListener(e,o,n)},[e,n])}function mne(e,t,n=!0){let r=k.useRef(!1);k.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function o(s,l){if(!r.current||s.defaultPrevented)return;let c=l(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function d(g){return typeof g=="function"?d(g()):Array.isArray(g)||g instanceof Set?g:[g]}(e);for(let d of f){if(d===null)continue;let g=d instanceof HTMLElement?d:d.current;if(g!=null&&g.contains(c)||s.composed&&s.composedPath().includes(g))return}return!cne(c,I3.Loose)&&c.tabIndex!==-1&&s.preventDefault(),t(s,c)}let i=k.useRef(null);N0("pointerdown",s=>{var l,c;r.current&&(i.current=((c=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:c[0])||s.target)},!0),N0("mousedown",s=>{var l,c;r.current&&(i.current=((c=(l=s.composedPath)==null?void 0:l.call(s))==null?void 0:c[0])||s.target)},!0),N0("click",s=>{L3()||i.current&&(o(s,()=>i.current),i.current=null)},!0),N0("touchend",s=>o(s,()=>s.target instanceof HTMLElement?s.target:null),!0),hne("blur",s=>o(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function gne(...e){return k.useMemo(()=>iT(...e),[...e])}function R3(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function vne(e,t){let[n,r]=k.useState(()=>R3(e));return Ur(()=>{r(R3(e))},[e.type,e.as]),Ur(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let yne=Symbol();function Bp(...e){let t=k.useRef(e);k.useEffect(()=>{t.current=e},[e]);let n=kt(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[yne]))?void 0:n}function F3(e){return[e.screenX,e.screenY]}function bne(){let e=k.useRef([-1,-1]);return{wasMoved(t){let n=F3(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=F3(t)}}}function Ene({container:e,accept:t,walk:n,enabled:r=!0}){let o=k.useRef(t),i=k.useRef(n);k.useEffect(()=>{o.current=t,i.current=n},[t,n]),Ur(()=>{if(!e||!r)return;let s=iT(e);if(!s)return;let l=o.current,c=i.current,f=Object.assign(g=>l(g),{acceptNode:l}),d=s.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,f,!1);for(;d.nextNode();)c(d.currentNode)},[e,r,o,i])}function M3(e,t){let n=k.useRef([]),r=kt(e);k.useEffect(()=>{let o=[...n.current];for(let[i,s]of t.entries())if(n.current[i]!==s){let l=r(t,o);return n.current=t,l}},[r,...t])}function P3(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var sT=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(sT||{}),wne=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(wne||{});function rc({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:s,mergeRefs:l}){l=l??xne;let c=$3(t,e);if(i)return _0(c,n,r,s,l);let f=o??0;if(f&2){let{static:d=!1,...g}=c;if(d)return _0(g,n,r,s,l)}if(f&1){let{unmount:d=!0,...g}=c;return Vs(d?0:1,{0(){return null},1(){return _0({...g,hidden:!0,style:{display:"none"}},n,r,s,l)}})}return _0(c,n,r,s,l)}function _0(e,t={},n,r,o){let{as:i=n,children:s,refName:l="ref",...c}=lT(e,["unmount","static"]),f=e.ref!==void 0?{[l]:e.ref}:{},d=typeof s=="function"?s(t):s;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t));let g={};if(t){let m=!1,v=[];for(let[b,w]of Object.entries(t))typeof w=="boolean"&&(m=!0),w===!0&&v.push(b);m&&(g["data-headlessui-state"]=v.join(" "))}if(i===k.Fragment&&Object.keys(aT(c)).length>0){if(!k.isValidElement(d)||Array.isArray(d)&&d.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(c).map(w=>` - ${w}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(w=>` - ${w}`).join(`
`)].join(`
`));let m=d.props,v=typeof(m==null?void 0:m.className)=="function"?(...w)=>P3(m==null?void 0:m.className(...w),c.className):P3(m==null?void 0:m.className,c.className),b=v?{className:v}:{};return k.cloneElement(d,Object.assign({},$3(d.props,aT(lT(c,["ref"]))),g,f,{ref:o(d.ref,f.ref)},b))}return k.createElement(i,Object.assign({},lT(c,["ref"]),i!==k.Fragment&&f,i!==k.Fragment&&g),d)}function xne(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function $3(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](o,...i){let s=n[r];for(let l of s){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;l(o,...i)}}});return t}function oc(e){var t;return Object.assign(k.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function aT(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function lT(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let Sne="div";var V3=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(V3||{});function Tne(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return rc({ourProps:i,theirProps:o,slot:{},defaultTag:Sne,name:"Hidden"})}let Cne=oc(Tne),cT=k.createContext(null);cT.displayName="OpenClosedContext";var qp=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(qp||{});function kne(){return k.useContext(cT)}function Nne({value:e,children:t}){return ce.createElement(cT.Provider,{value:e},t)}function _ne(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let ic=[];_ne(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ic[0]!==t.target&&(ic.unshift(t.target),ic=ic.filter(n=>n!=null&&n.isConnected),ic.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function One(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Ane(n)?!1:r}function Ane(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function Dne(e){throw new Error("Unexpected object: "+e)}var Vn=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Vn||{});function j3(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:Dne(e)}}function U3(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))q3(n,B3(t,r),o);return n}function B3(e,t){return e?e+"["+t+"]":t}function q3(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())q3(e,B3(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):U3(n,t,e)}var Co=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Co||{}),Ine=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Ine||{}),Lne=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Lne||{}),Rne=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Rne||{}),Fne=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(Fne||{});function uT(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=t(e.options.slice()),o=r.length>0&&r[0].dataRef.current.order!==null?r.sort((s,l)=>s.dataRef.current.order-l.dataRef.current.order):fne(r,s=>s.dataRef.current.domRef.current),i=n?o.indexOf(n):null;return i===-1&&(i=null),{options:o,activeOptionIndex:i}}let Mne={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let r=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(r!==-1)return{...e,activeOptionIndex:r,comboboxState:0}}return{...e,comboboxState:0}},2(e,t){var n,r,o,i,s;if((n=e.dataRef.current)!=null&&n.disabled||(r=e.dataRef.current)!=null&&r.optionsRef.current&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let d=t.focus===Vn.Specific?t.idx:j3(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var m,v;return(v=(m=e.activeOptionIndex)!=null?m:e.virtual.options.findIndex(b=>!e.virtual.disabled(b)))!=null?v:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),g=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===d&&e.activationTrigger===g?e:{...e,activeOptionIndex:d,activationTrigger:g}}let l=uT(e);if(l.activeOptionIndex===null){let d=l.options.findIndex(g=>!g.dataRef.current.disabled);d!==-1&&(l.activeOptionIndex=d)}let c=t.focus===Vn.Specific?t.idx:j3(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled}),f=(s=t.trigger)!=null?s:2;return e.activeOptionIndex===c&&e.activationTrigger===f?e:{...e,...l,activeOptionIndex:c,activationTrigger:f}},3:(e,t)=>{var n,r,o;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,s=uT(e,c=>(c.push(i),c));e.activeOptionIndex===null&&(r=e.dataRef.current)!=null&&r.isSelected(t.payload.dataRef.current.value)&&(s.activeOptionIndex=s.options.indexOf(i));let l={...e,...s,activationTrigger:2};return(o=e.dataRef.current)!=null&&o.__demoMode&&e.dataRef.current.value===void 0&&(l.activeOptionIndex=0),l},4:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(o=>o.id!==t.id)};let r=uT(e,o=>{let i=o.findIndex(s=>s.id===t.id);return i!==-1&&o.splice(i,1),o});return{...e,...r,activationTrigger:2}},5:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let r=e.activeOptionIndex;if(e.activeOptionIndex!==null){let o=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);o!==-1?r=o:r=null}return{...e,activeOptionIndex:r,virtual:Object.assign({},e.virtual,{options:t.options})}}},fT=k.createContext(null);fT.displayName="ComboboxActionsContext";function zp(e){let t=k.useContext(fT);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,zp),n}return t}let z3=k.createContext(null);function Pne(e){var t;let n=sc("VirtualProvider"),[r,o]=k.useMemo(()=>{let c=n.optionsRef.current;if(!c)return[0,0];let f=window.getComputedStyle(c);return[parseFloat(f.paddingBlockStart||f.paddingTop),parseFloat(f.paddingBlockEnd||f.paddingBottom)]},[n.optionsRef.current]),i=Xte({scrollPaddingStart:r,scrollPaddingEnd:o,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var c;return(c=n.optionsRef.current)!=null?c:null},overscan:12}),[s,l]=k.useState(0);return Ur(()=>{l(c=>c+1)},[(t=n.virtual)==null?void 0:t.options]),ce.createElement(z3.Provider,{value:i},ce.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:c=>{if(c){if(typeof process<"u"&&process.env.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},i.getVirtualItems().map(c=>{var f;return ce.createElement(k.Fragment,{key:c.key},ce.cloneElement((f=e.children)==null?void 0:f.call(e,{option:n.virtual.options[c.index],open:n.comboboxState===0}),{key:`${s}-${c.key}`,"data-index":c.index,"aria-setsize":n.virtual.options.length,"aria-posinset":c.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${c.start}px)`,overflowAnchor:"none"}}))})))}let dT=k.createContext(null);dT.displayName="ComboboxDataContext";function sc(e){let t=k.useContext(dT);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,sc),n}return t}function $ne(e,t){return Vs(t.type,Mne,e,t)}let Vne=k.Fragment;function jne(e,t){let{value:n,defaultValue:r,onChange:o,form:i,name:s,by:l=null,disabled:c=!1,__demoMode:f=!1,nullable:d=!1,multiple:g=!1,immediate:m=!1,virtual:v=null,...b}=e,w=!1,N=null,[S=g?[]:void 0,x]=nne(n,o,r),[C,E]=k.useReducer($ne,{dataRef:k.createRef(),comboboxState:f?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),_=k.useRef(!1),I=k.useRef({static:!1,hold:!1}),D=k.useRef(null),A=k.useRef(null),F=k.useRef(null),$=k.useRef(null),q=kt(typeof l=="string"?(ve,qe)=>{let Ie=l;return(ve==null?void 0:ve[Ie])===(qe==null?void 0:qe[Ie])}:l??((ve,qe)=>ve===qe)),H=kt(ve=>C.options.findIndex(qe=>q(qe.dataRef.current.value,ve))),z=k.useCallback(ve=>Vs(R.mode,{1:()=>S.some(qe=>q(qe,ve)),0:()=>q(S,ve)}),[S]),B=kt(ve=>C.activeOptionIndex===H(ve)),R=k.useMemo(()=>({...C,immediate:w,optionsPropsRef:I,labelRef:D,inputRef:A,buttonRef:F,optionsRef:$,value:S,defaultValue:r,disabled:c,mode:g?1:0,virtual:C.virtual,get activeOptionIndex(){if(_.current&&C.activeOptionIndex===null&&C.options.length>0){let ve=C.options.findIndex(qe=>!qe.dataRef.current.disabled);if(ve!==-1)return ve}return C.activeOptionIndex},calculateIndex:H,compare:q,isSelected:z,isActive:B,nullable:d,__demoMode:f}),[S,r,c,g,d,f,C,N]);Ur(()=>{},[N,void 0]),Ur(()=>{C.dataRef.current=R},[R]),mne([R.buttonRef,R.inputRef,R.optionsRef],()=>ae.closeCombobox(),R.comboboxState===0);let te=k.useMemo(()=>{var ve,qe,Ie;return{open:R.comboboxState===0,disabled:c,activeIndex:R.activeOptionIndex,activeOption:R.activeOptionIndex===null?null:R.virtual?R.virtual.options[(ve=R.activeOptionIndex)!=null?ve:0]:(Ie=(qe=R.options[R.activeOptionIndex])==null?void 0:qe.dataRef.current.value)!=null?Ie:null,value:S}},[R,c,S]),Y=kt(()=>{if(R.activeOptionIndex!==null){if(R.virtual)ie(R.virtual.options[R.activeOptionIndex]);else{let{dataRef:ve}=R.options[R.activeOptionIndex];ie(ve.current.value)}ae.goToOption(Vn.Specific,R.activeOptionIndex)}}),Q=kt(()=>{E({type:0}),_.current=!0}),K=kt(()=>{E({type:1}),_.current=!1}),Z=kt((ve,qe,Ie)=>(_.current=!1,ve===Vn.Specific?E({type:2,focus:Vn.Specific,idx:qe,trigger:Ie}):E({type:2,focus:ve,trigger:Ie}))),re=kt((ve,qe)=>(E({type:3,payload:{id:ve,dataRef:qe}}),()=>{R.isActive(qe.current.value)&&(_.current=!0),E({type:4,id:ve})})),J=kt(ve=>(E({type:5,id:ve}),()=>E({type:5,id:null}))),ie=kt(ve=>Vs(R.mode,{0(){return x==null?void 0:x(ve)},1(){let qe=R.value.slice(),Ie=qe.findIndex(Oe=>q(Oe,ve));return Ie===-1?qe.push(ve):qe.splice(Ie,1),x==null?void 0:x(qe)}})),ne=kt(ve=>{E({type:6,trigger:ve})}),ae=k.useMemo(()=>({onChange:ie,registerOption:re,registerLabel:J,goToOption:Z,closeCombobox:K,openCombobox:Q,setActivationTrigger:ne,selectActiveOption:Y}),[]),le=t===null?{}:{ref:t},de=k.useRef(null),xe=oT();return k.useEffect(()=>{de.current&&r!==void 0&&xe.addEventListener(de.current,"reset",()=>{x==null||x(r)})},[de,x]),ce.createElement(fT.Provider,{value:ae},ce.createElement(dT.Provider,{value:R},ce.createElement(Nne,{value:Vs(R.comboboxState,{0:qp.Open,1:qp.Closed})},s!=null&&S!=null&&U3({[s]:S}).map(([ve,qe],Ie)=>ce.createElement(Cne,{features:V3.Hidden,ref:Ie===0?Oe=>{var it;de.current=(it=Oe==null?void 0:Oe.closest("form"))!=null?it:null}:void 0,...aT({key:ve,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:ve,value:qe})})),rc({ourProps:le,theirProps:b,slot:te,defaultTag:Vne,name:"Combobox"}))))}let Une="input";function Bne(e,t){var n,r,o,i,s;let l=Up(),{id:c=`headlessui-combobox-input-${l}`,onChange:f,displayValue:d,type:g="text",...m}=e,v=sc("Combobox.Input"),b=zp("Combobox.Input"),w=Bp(v.inputRef,t),N=gne(v.inputRef),S=k.useRef(!1),x=oT(),C=kt(()=>{b.onChange(null),v.optionsRef.current&&(v.optionsRef.current.scrollTop=0),b.goToOption(Vn.Nothing)}),E=function(){var R;return typeof d=="function"&&v.value!==void 0?(R=d(v.value))!=null?R:"":typeof v.value=="string"?v.value:""}();M3(([R,te],[Y,Q])=>{if(S.current)return;let K=v.inputRef.current;K&&((Q===0&&te===1||R!==Y)&&(K.value=R),requestAnimationFrame(()=>{if(S.current||!K||(N==null?void 0:N.activeElement)!==K)return;let{selectionStart:Z,selectionEnd:re}=K;Math.abs((re??0)-(Z??0))===0&&Z===0&&K.setSelectionRange(K.value.length,K.value.length)}))},[E,v.comboboxState,N]),M3(([R],[te])=>{if(R===0&&te===1){if(S.current)return;let Y=v.inputRef.current;if(!Y)return;let Q=Y.value,{selectionStart:K,selectionEnd:Z,selectionDirection:re}=Y;Y.value="",Y.value=Q,re!==null?Y.setSelectionRange(K,Z,re):Y.setSelectionRange(K,Z)}},[v.comboboxState]);let _=k.useRef(!1),I=kt(()=>{_.current=!0}),D=kt(()=>{x.nextFrame(()=>{_.current=!1})}),A=kt(R=>{switch(S.current=!0,R.key){case Co.Enter:if(S.current=!1,v.comboboxState!==0||_.current)return;if(R.preventDefault(),R.stopPropagation(),v.activeOptionIndex===null){b.closeCombobox();return}b.selectActiveOption(),v.mode===0&&b.closeCombobox();break;case Co.ArrowDown:return S.current=!1,R.preventDefault(),R.stopPropagation(),Vs(v.comboboxState,{0:()=>b.goToOption(Vn.Next),1:()=>b.openCombobox()});case Co.ArrowUp:return S.current=!1,R.preventDefault(),R.stopPropagation(),Vs(v.comboboxState,{0:()=>b.goToOption(Vn.Previous),1:()=>{b.openCombobox(),x.nextFrame(()=>{v.value||b.goToOption(Vn.Last)})}});case Co.Home:if(R.shiftKey)break;return S.current=!1,R.preventDefault(),R.stopPropagation(),b.goToOption(Vn.First);case Co.PageUp:return S.current=!1,R.preventDefault(),R.stopPropagation(),b.goToOption(Vn.First);case Co.End:if(R.shiftKey)break;return S.current=!1,R.preventDefault(),R.stopPropagation(),b.goToOption(Vn.Last);case Co.PageDown:return S.current=!1,R.preventDefault(),R.stopPropagation(),b.goToOption(Vn.Last);case Co.Escape:return S.current=!1,v.comboboxState!==0?void 0:(R.preventDefault(),v.optionsRef.current&&!v.optionsPropsRef.current.static&&R.stopPropagation(),v.nullable&&v.mode===0&&v.value===null&&C(),b.closeCombobox());case Co.Tab:if(S.current=!1,v.comboboxState!==0)return;v.mode===0&&v.activationTrigger!==1&&b.selectActiveOption(),b.closeCombobox();break}}),F=kt(R=>{f==null||f(R),v.nullable&&v.mode===0&&R.target.value===""&&C(),b.openCombobox()}),$=kt(R=>{var te,Y,Q;let K=(te=R.relatedTarget)!=null?te:ic.find(Z=>Z!==R.currentTarget);if(S.current=!1,!((Y=v.optionsRef.current)!=null&&Y.contains(K))&&!((Q=v.buttonRef.current)!=null&&Q.contains(K))&&v.comboboxState===0)return R.preventDefault(),v.mode===0&&(v.nullable&&v.value===null?C():v.activationTrigger!==1&&b.selectActiveOption()),b.closeCombobox()}),q=kt(R=>{var te,Y,Q;let K=(te=R.relatedTarget)!=null?te:ic.find(Z=>Z!==R.currentTarget);(Y=v.buttonRef.current)!=null&&Y.contains(K)||(Q=v.optionsRef.current)!=null&&Q.contains(K)||v.disabled||v.immediate&&v.comboboxState!==0&&(b.openCombobox(),x.nextFrame(()=>{b.setActivationTrigger(1)}))}),H=rT(()=>{if(v.labelId)return[v.labelId].join(" ")},[v.labelId]),z=k.useMemo(()=>({open:v.comboboxState===0,disabled:v.disabled}),[v]),B={ref:w,id:c,role:"combobox",type:g,"aria-controls":(n=v.optionsRef.current)==null?void 0:n.id,"aria-expanded":v.comboboxState===0,"aria-activedescendant":v.activeOptionIndex===null?void 0:v.virtual?(r=v.options.find(R=>{var te;return!((te=v.virtual)!=null&&te.disabled(R.dataRef.current.value))&&v.compare(R.dataRef.current.value,v.virtual.options[v.activeOptionIndex])}))==null?void 0:r.id:(o=v.options[v.activeOptionIndex])==null?void 0:o.id,"aria-labelledby":H,"aria-autocomplete":"list",defaultValue:(s=(i=e.defaultValue)!=null?i:v.defaultValue!==void 0?d==null?void 0:d(v.defaultValue):null)!=null?s:v.defaultValue,disabled:v.disabled,onCompositionStart:I,onCompositionEnd:D,onKeyDown:A,onChange:F,onFocus:q,onBlur:$};return rc({ourProps:B,theirProps:m,slot:z,defaultTag:Une,name:"Combobox.Input"})}let qne="button";function zne(e,t){var n;let r=sc("Combobox.Button"),o=zp("Combobox.Button"),i=Bp(r.buttonRef,t),s=Up(),{id:l=`headlessui-combobox-button-${s}`,...c}=e,f=oT(),d=kt(w=>{switch(w.key){case Co.ArrowDown:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&o.openCombobox(),f.nextFrame(()=>{var N;return(N=r.inputRef.current)==null?void 0:N.focus({preventScroll:!0})});case Co.ArrowUp:return w.preventDefault(),w.stopPropagation(),r.comboboxState===1&&(o.openCombobox(),f.nextFrame(()=>{r.value||o.goToOption(Vn.Last)})),f.nextFrame(()=>{var N;return(N=r.inputRef.current)==null?void 0:N.focus({preventScroll:!0})});case Co.Escape:return r.comboboxState!==0?void 0:(w.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&w.stopPropagation(),o.closeCombobox(),f.nextFrame(()=>{var N;return(N=r.inputRef.current)==null?void 0:N.focus({preventScroll:!0})}));default:return}}),g=kt(w=>{if(One(w.currentTarget))return w.preventDefault();r.comboboxState===0?o.closeCombobox():(w.preventDefault(),o.openCombobox()),f.nextFrame(()=>{var N;return(N=r.inputRef.current)==null?void 0:N.focus({preventScroll:!0})})}),m=rT(()=>{if(r.labelId)return[r.labelId,l].join(" ")},[r.labelId,l]),v=k.useMemo(()=>({open:r.comboboxState===0,disabled:r.disabled,value:r.value}),[r]),b={ref:i,id:l,type:vne(e,r.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=r.optionsRef.current)==null?void 0:n.id,"aria-expanded":r.comboboxState===0,"aria-labelledby":m,disabled:r.disabled,onClick:g,onKeyDown:d};return rc({ourProps:b,theirProps:c,slot:v,defaultTag:qne,name:"Combobox.Button"})}let Hne="label";function Wne(e,t){let n=Up(),{id:r=`headlessui-combobox-label-${n}`,...o}=e,i=sc("Combobox.Label"),s=zp("Combobox.Label"),l=Bp(i.labelRef,t);Ur(()=>s.registerLabel(r),[r]);let c=kt(()=>{var d;return(d=i.inputRef.current)==null?void 0:d.focus({preventScroll:!0})}),f=k.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return rc({ourProps:{ref:l,id:r,onClick:c},theirProps:o,slot:f,defaultTag:Hne,name:"Combobox.Label"})}let Gne="ul",Yne=sT.RenderStrategy|sT.Static;function Qne(e,t){let n=Up(),{id:r=`headlessui-combobox-options-${n}`,hold:o=!1,...i}=e,s=sc("Combobox.Options"),l=Bp(s.optionsRef,t),c=kne(),f=c!==null?(c&qp.Open)===qp.Open:s.comboboxState===0;Ur(()=>{var v;s.optionsPropsRef.current.static=(v=e.static)!=null?v:!1},[s.optionsPropsRef,e.static]),Ur(()=>{s.optionsPropsRef.current.hold=o},[s.optionsPropsRef,o]),Ene({container:s.optionsRef.current,enabled:s.comboboxState===0,accept(v){return v.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:v.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(v){v.setAttribute("role","none")}});let d=rT(()=>{var v,b;return(b=s.labelId)!=null?b:(v=s.buttonRef.current)==null?void 0:v.id},[s.labelId,s.buttonRef.current]),g=k.useMemo(()=>({open:s.comboboxState===0,option:void 0}),[s]),m={"aria-labelledby":d,role:"listbox","aria-multiselectable":s.mode===1?!0:void 0,id:r,ref:l};return s.virtual&&s.comboboxState===0&&Object.assign(i,{children:ce.createElement(Pne,null,i.children)}),rc({ourProps:m,theirProps:i,slot:g,defaultTag:Gne,features:Yne,visible:f,name:"Combobox.Options"})}let Kne="li";function Jne(e,t){var n;let r=Up(),{id:o=`headlessui-combobox-option-${r}`,disabled:i=!1,value:s,order:l=null,...c}=e,f=sc("Combobox.Option"),d=zp("Combobox.Option"),g=f.virtual?f.activeOptionIndex===f.calculateIndex(s):f.activeOptionIndex===null?!1:((n=f.options[f.activeOptionIndex])==null?void 0:n.id)===o,m=f.isSelected(s),v=k.useRef(null),b=jp({disabled:i,value:s,domRef:v,order:l}),w=k.useContext(z3),N=Bp(t,v,w?w.measureElement:null),S=kt(()=>d.onChange(s));Ur(()=>d.registerOption(o,b),[b,o]);let x=k.useRef(!(f.virtual||f.__demoMode));Ur(()=>{if(!f.virtual||!f.__demoMode)return;let $=k0();return $.requestAnimationFrame(()=>{x.current=!0}),$.dispose},[f.virtual,f.__demoMode]),Ur(()=>{if(!x.current||f.comboboxState!==0||!g||f.activationTrigger===0)return;let $=k0();return $.requestAnimationFrame(()=>{var q,H;(H=(q=v.current)==null?void 0:q.scrollIntoView)==null||H.call(q,{block:"nearest"})}),$.dispose},[v,g,f.comboboxState,f.activationTrigger,f.activeOptionIndex]);let C=kt($=>{var q;if(i||(q=f.virtual)!=null&&q.disabled(s))return $.preventDefault();S(),L3()||requestAnimationFrame(()=>{var H;return(H=f.inputRef.current)==null?void 0:H.focus({preventScroll:!0})}),f.mode===0&&requestAnimationFrame(()=>d.closeCombobox())}),E=kt(()=>{var $;if(i||($=f.virtual)!=null&&$.disabled(s))return d.goToOption(Vn.Nothing);let q=f.calculateIndex(s);d.goToOption(Vn.Specific,q)}),_=bne(),I=kt($=>_.update($)),D=kt($=>{var q;if(!_.wasMoved($)||i||(q=f.virtual)!=null&&q.disabled(s)||g)return;let H=f.calculateIndex(s);d.goToOption(Vn.Specific,H,0)}),A=kt($=>{var q;_.wasMoved($)&&(i||(q=f.virtual)!=null&&q.disabled(s)||g&&(f.optionsPropsRef.current.hold||d.goToOption(Vn.Nothing)))}),F=k.useMemo(()=>({active:g,selected:m,disabled:i}),[g,m,i]);return rc({ourProps:{id:o,ref:N,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":m,disabled:void 0,onClick:C,onFocus:E,onPointerEnter:I,onMouseEnter:I,onPointerMove:D,onMouseMove:D,onPointerLeave:A,onMouseLeave:A},theirProps:c,slot:F,defaultTag:Kne,name:"Combobox.Option"})}let Xne=oc(jne),Zne=oc(zne),ere=oc(Bne),tre=oc(Wne),nre=oc(Qne),rre=oc(Jne),Wu=Object.assign(Xne,{Input:ere,Button:Zne,Label:tre,Options:nre,Option:rre});var ore=Object.defineProperty,fe=(e,t)=>ore(e,"name",{value:t,configurable:!0});function Ba(e){const t=k.createContext(null);return t.displayName=e,t}fe(Ba,"createNullableContext");function qa(e){function t(n){var r;const o=k.useContext(e);if(o===null&&n!=null&&n.nonNull)throw new Error(`Tried to use \`${((r=n.caller)==null?void 0:r.name)||t.caller.name}\` without the necessary context. Make sure to render the \`${e.displayName}Provider\` component higher up the tree.`);return o}return fe(t,"useGivenContext"),Object.defineProperty(t,"name",{value:`use${e.displayName}`}),t}fe(qa,"createContextHook");const H3=Ba("StorageContext");function W3(e){const t=k.useRef(!0),[n,r]=k.useState(new qw(e.storage));return k.useEffect(()=>{t.current?t.current=!1:r(new qw(e.storage))},[e.storage]),W.jsx(H3.Provider,{value:n,children:e.children})}fe(W3,"StorageContextProvider");const za=qa(H3),ire=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),k.createElement("rect",{x:6,y:6,width:2,height:2,rx:1,fill:"currentColor"})),"SvgArgument"),sre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M1 1L7 7L13 1",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronDown"),are=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 7 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M6 1.04819L2 5.04819L6 9.04819",stroke:"currentColor",strokeWidth:1.75})),"SvgChevronLeft"),lre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M13 8L7 2L1 8",stroke:"currentColor",strokeWidth:1.5})),"SvgChevronUp"),cre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M1 1L12.9998 12.9997",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{d:"M13 1L1.00079 13.0003",stroke:"currentColor",strokeWidth:1.5})),"SvgClose"),ure=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M11.25 14.2105V15.235C11.25 16.3479 10.3479 17.25 9.23501 17.25H2.76499C1.65214 17.25 0.75 16.3479 0.75 15.235L0.75 8.76499C0.75 7.65214 1.65214 6.75 2.76499 6.75L3.78947 6.75",stroke:"currentColor",strokeWidth:1.5}),k.createElement("rect",{x:6.75,y:.75,width:10.5,height:10.5,rx:2.2069,stroke:"currentColor",strokeWidth:1.5})),"SvgCopy"),fre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M5.0484 1.40838C6.12624 0.33054 7.87376 0.330541 8.9516 1.40838L12.5916 5.0484C13.6695 6.12624 13.6695 7.87376 12.5916 8.9516L8.9516 12.5916C7.87376 13.6695 6.12624 13.6695 5.0484 12.5916L1.40838 8.9516C0.33054 7.87376 0.330541 6.12624 1.40838 5.0484L5.0484 1.40838Z",stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M5 9L9 5",stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M5 5L9 9",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedArgument"),dre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgDeprecatedEnumValue"),pre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:.6,y:.6,width:10.8,height:10.8,rx:3.4,stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M4 8L8 4",stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M4 4L8 8",stroke:"currentColor",strokeWidth:1.2})),"SvgDeprecatedField"),hre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0.5 12 12",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:7,y:5.5,width:2,height:2,rx:1,transform:"rotate(90 7 5.5)",fill:"currentColor"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8 9L10.8 9.5C10.8 10.4941 9.99411 11.3 9 11.3L3 11.3C2.00589 11.3 1.2 10.4941 1.2 9.5L1.2 9L-3.71547e-07 9L-3.93402e-07 9.5C-4.65826e-07 11.1569 1.34314 12.5 3 12.5L9 12.5C10.6569 12.5 12 11.1569 12 9.5L12 9L10.8 9ZM10.8 4L12 4L12 3.5C12 1.84315 10.6569 0.5 9 0.5L3 0.5C1.34315 0.5 -5.87117e-08 1.84315 -1.31135e-07 3.5L-1.5299e-07 4L1.2 4L1.2 3.5C1.2 2.50589 2.00589 1.7 3 1.7L9 1.7C9.99411 1.7 10.8 2.50589 10.8 3.5L10.8 4Z",fill:"currentColor"})),"SvgDirective"),mre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H17.25C17.8023 0.75 18.25 1.19772 18.25 1.75V5.25",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H18.25C18.8023 5.25 19.25 5.69771 19.25 6.25V22.25C19.25 22.8023 18.8023 23.25 18.25 23.25H3C1.75736 23.25 0.75 22.2426 0.75 21V3Z",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 5.25C1.75736 5.25 0.75 4.24264 0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H3ZM13 11L6 11V12.5L13 12.5V11Z",fill:"currentColor"})),"SvgDocsFilled"),gre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 20 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M0.75 3C0.75 4.24264 1.75736 5.25 3 5.25H17.25M0.75 3C0.75 1.75736 1.75736 0.75 3 0.75H16.25C16.8023 0.75 17.25 1.19772 17.25 1.75V5.25M0.75 3V21C0.75 22.2426 1.75736 23.25 3 23.25H18.25C18.8023 23.25 19.25 22.8023 19.25 22.25V6.25C19.25 5.69771 18.8023 5.25 18.25 5.25H17.25",stroke:"currentColor",strokeWidth:1.5}),k.createElement("line",{x1:13,y1:11.75,x2:6,y2:11.75,stroke:"currentColor",strokeWidth:1.5})),"SvgDocs"),vre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:5,y:5,width:2,height:2,rx:1,fill:"currentColor"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 1.2H9C9.99411 1.2 10.8 2.00589 10.8 3V9C10.8 9.99411 9.99411 10.8 9 10.8H8.5V12H9C10.6569 12 12 10.6569 12 9V3C12 1.34315 10.6569 0 9 0H8.5V1.2ZM3.5 1.2V0H3C1.34315 0 0 1.34315 0 3V9C0 10.6569 1.34315 12 3 12H3.5V10.8H3C2.00589 10.8 1.2 9.99411 1.2 9V3C1.2 2.00589 2.00589 1.2 3 1.2H3.5Z",fill:"currentColor"})),"SvgEnumValue"),yre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:.6,y:1.1,width:10.8,height:10.8,rx:2.4,stroke:"currentColor",strokeWidth:1.2}),k.createElement("rect",{x:5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgField"),bre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M1.59375 9.52344L4.87259 12.9944L8.07872 9.41249",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),k.createElement("path",{d:"M13.75 5.25V10.75H18.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"square"}),k.createElement("path",{d:"M4.95427 11.9332C4.55457 10.0629 4.74441 8.11477 5.49765 6.35686C6.25089 4.59894 7.5305 3.11772 9.16034 2.11709C10.7902 1.11647 12.6901 0.645626 14.5986 0.769388C16.5071 0.893151 18.3303 1.60543 19.8172 2.80818C21.3042 4.01093 22.3818 5.64501 22.9017 7.48548C23.4216 9.32595 23.3582 11.2823 22.7203 13.0853C22.0824 14.8883 20.9013 16.4492 19.3396 17.5532C17.778 18.6572 15.9125 19.25 14 19.25",stroke:"currentColor",strokeWidth:1.5})),"SvgHistory"),Ere=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("circle",{cx:6,cy:6,r:5.4,stroke:"currentColor",strokeWidth:1.2,strokeDasharray:"4.241025 4.241025",transform:"rotate(22.5)","transform-origin":"center"}),k.createElement("circle",{cx:6,cy:6,r:1,fill:"currentColor"})),"SvgImplements"),wre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M1.5 14.5653C1.5 15.211 1.75652 15.8303 2.21314 16.2869C2.66975 16.7435 3.28905 17 3.9348 17C4.58054 17 5.19984 16.7435 5.65646 16.2869C6.11307 15.8303 6.36959 15.211 6.36959 14.5653V12.1305H3.9348C3.28905 12.1305 2.66975 12.387 2.21314 12.8437C1.75652 13.3003 1.5 13.9195 1.5 14.5653Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M3.9348 1.00063C3.28905 1.00063 2.66975 1.25715 2.21314 1.71375C1.75652 2.17035 1.5 2.78964 1.5 3.43537C1.5 4.0811 1.75652 4.70038 2.21314 5.15698C2.66975 5.61358 3.28905 5.8701 3.9348 5.8701H6.36959V3.43537C6.36959 2.78964 6.11307 2.17035 5.65646 1.71375C5.19984 1.25715 4.58054 1.00063 3.9348 1.00063Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M15.0652 12.1305H12.6304V14.5653C12.6304 15.0468 12.7732 15.5175 13.0407 15.9179C13.3083 16.3183 13.6885 16.6304 14.1334 16.8147C14.5783 16.9989 15.0679 17.0472 15.5402 16.9532C16.0125 16.8593 16.4464 16.6274 16.7869 16.2869C17.1274 15.9464 17.3593 15.5126 17.4532 15.0403C17.5472 14.568 17.4989 14.0784 17.3147 13.6335C17.1304 13.1886 16.8183 12.8084 16.4179 12.5409C16.0175 12.2733 15.5468 12.1305 15.0652 12.1305Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M12.6318 5.86775H6.36955V12.1285H12.6318V5.86775Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M17.5 3.43473C17.5 2.789 17.2435 2.16972 16.7869 1.71312C16.3303 1.25652 15.711 1 15.0652 1C14.4195 1 13.8002 1.25652 13.3435 1.71312C12.8869 2.16972 12.6304 2.789 12.6304 3.43473V5.86946H15.0652C15.711 5.86946 16.3303 5.61295 16.7869 5.15635C17.2435 4.69975 17.5 4.08046 17.5 3.43473Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgKeyboardShortcut"),xre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("circle",{cx:5,cy:5,r:4.35,stroke:"currentColor",strokeWidth:1.3}),k.createElement("line",{x1:8.45962,y1:8.54038,x2:11.7525,y2:11.8333,stroke:"currentColor",strokeWidth:1.3})),"SvgMagnifyingGlass"),Sre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"-2 -2 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M17.2492 6V2.9569C17.2492 1.73806 16.2611 0.75 15.0423 0.75L2.9569 0.75C1.73806 0.75 0.75 1.73806 0.75 2.9569L0.75 6",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{d:"M0.749873 12V15.0431C0.749873 16.2619 1.73794 17.25 2.95677 17.25H15.0421C16.261 17.25 17.249 16.2619 17.249 15.0431V12",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{d:"M6 4.5L9 7.5L12 4.5",stroke:"currentColor",strokeWidth:1.5}),k.createElement("path",{d:"M12 13.5L9 10.5L6 13.5",stroke:"currentColor",strokeWidth:1.5})),"SvgMerge"),Tre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M0.75 13.25L0.0554307 12.967C-0.0593528 13.2488 0.00743073 13.5719 0.224488 13.7851C0.441545 13.9983 0.765869 14.0592 1.04549 13.9393L0.75 13.25ZM12.8214 1.83253L12.2911 2.36286L12.2911 2.36286L12.8214 1.83253ZM12.8214 3.90194L13.3517 4.43227L12.8214 3.90194ZM10.0981 1.17859L9.56773 0.648259L10.0981 1.17859ZM12.1675 1.17859L12.6978 0.648258L12.6978 0.648257L12.1675 1.17859ZM2.58049 8.75697L3.27506 9.03994L2.58049 8.75697ZM2.70066 8.57599L3.23099 9.10632L2.70066 8.57599ZM5.2479 11.4195L4.95355 10.7297L5.2479 11.4195ZM5.42036 11.303L4.89003 10.7727L5.42036 11.303ZM4.95355 10.7297C4.08882 11.0987 3.41842 11.362 2.73535 11.6308C2.05146 11.9 1.35588 12.1743 0.454511 12.5607L1.04549 13.9393C1.92476 13.5624 2.60256 13.2951 3.28469 13.0266C3.96762 12.7578 4.65585 12.4876 5.54225 12.1093L4.95355 10.7297ZM1.44457 13.533L3.27506 9.03994L1.88592 8.474L0.0554307 12.967L1.44457 13.533ZM3.23099 9.10632L10.6284 1.70892L9.56773 0.648259L2.17033 8.04566L3.23099 9.10632ZM11.6371 1.70892L12.2911 2.36286L13.3517 1.3022L12.6978 0.648258L11.6371 1.70892ZM12.2911 3.37161L4.89003 10.7727L5.95069 11.8333L13.3517 4.43227L12.2911 3.37161ZM12.2911 2.36286C12.5696 2.64142 12.5696 3.09305 12.2911 3.37161L13.3517 4.43227C14.2161 3.56792 14.2161 2.16654 13.3517 1.3022L12.2911 2.36286ZM10.6284 1.70892C10.9069 1.43036 11.3586 1.43036 11.6371 1.70892L12.6978 0.648257C11.8335 -0.216088 10.4321 -0.216084 9.56773 0.648259L10.6284 1.70892ZM3.27506 9.03994C3.26494 9.06479 3.24996 9.08735 3.23099 9.10632L2.17033 8.04566C2.04793 8.16806 1.95123 8.31369 1.88592 8.474L3.27506 9.03994ZM5.54225 12.1093C5.69431 12.0444 5.83339 11.9506 5.95069 11.8333L4.89003 10.7727C4.90863 10.7541 4.92988 10.7398 4.95355 10.7297L5.54225 12.1093Z",fill:"currentColor"}),k.createElement("path",{d:"M11.5 4.5L9.5 2.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"}),k.createElement("path",{d:"M5.5 10.5L3.5 8.5",stroke:"currentColor",strokeWidth:1.4026,strokeLinecap:"round",strokeLinejoin:"round"})),"SvgPen"),Cre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M1.32226e-07 1.6609C7.22332e-08 0.907329 0.801887 0.424528 1.46789 0.777117L15.3306 8.11621C16.0401 8.49182 16.0401 9.50818 15.3306 9.88379L1.46789 17.2229C0.801886 17.5755 1.36076e-06 17.0927 1.30077e-06 16.3391L1.32226e-07 1.6609Z",fill:"currentColor"})),"SvgPlay"),kre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 10 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 9.25V13.5H5.75V9.25L10 9.25V7.75L5.75 7.75V3.5H4.25V7.75L0 7.75V9.25L4.25 9.25Z",fill:"currentColor"})),"SvgPlus"),Nre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{width:25,height:25,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M10.2852 24.0745L13.7139 18.0742",stroke:"currentColor",strokeWidth:1.5625}),k.createElement("path",{d:"M14.5742 24.0749L17.1457 19.7891",stroke:"currentColor",strokeWidth:1.5625}),k.createElement("path",{d:"M19.4868 24.0735L20.7229 21.7523C21.3259 20.6143 21.5457 19.3122 21.3496 18.0394C21.1535 16.7666 20.5519 15.591 19.6342 14.6874L23.7984 6.87853C24.0123 6.47728 24.0581 6.00748 23.9256 5.57249C23.7932 5.1375 23.4933 4.77294 23.0921 4.55901C22.6908 4.34509 22.221 4.29932 21.7861 4.43178C21.3511 4.56424 20.9865 4.86408 20.7726 5.26533L16.6084 13.0742C15.3474 12.8142 14.0362 12.9683 12.8699 13.5135C11.7035 14.0586 10.7443 14.9658 10.135 16.1L6 24.0735",stroke:"currentColor",strokeWidth:1.5625}),k.createElement("path",{d:"M4 15L5 13L7 12L5 11L4 9L3 11L1 12L3 13L4 15Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"}),k.createElement("path",{d:"M11.5 8L12.6662 5.6662L15 4.5L12.6662 3.3338L11.5 1L10.3338 3.3338L8 4.5L10.3338 5.6662L11.5 8Z",stroke:"currentColor",strokeWidth:1.5625,strokeLinejoin:"round"})),"SvgPrettify"),_re=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M4.75 9.25H1.25V12.75",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),k.createElement("path",{d:"M11.25 6.75H14.75V3.25",stroke:"currentColor",strokeWidth:1,strokeLinecap:"square"}),k.createElement("path",{d:"M14.1036 6.65539C13.8 5.27698 13.0387 4.04193 11.9437 3.15131C10.8487 2.26069 9.48447 1.76694 8.0731 1.75043C6.66173 1.73392 5.28633 2.19563 4.17079 3.0604C3.05526 3.92516 2.26529 5.14206 1.92947 6.513",stroke:"currentColor",strokeWidth:1}),k.createElement("path",{d:"M1.89635 9.34461C2.20001 10.723 2.96131 11.9581 4.05631 12.8487C5.15131 13.7393 6.51553 14.2331 7.9269 14.2496C9.33827 14.2661 10.7137 13.8044 11.8292 12.9396C12.9447 12.0748 13.7347 10.8579 14.0705 9.487",stroke:"currentColor",strokeWidth:1})),"SvgReload"),Ore=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),k.createElement("path",{d:"M4.25 7.5C4.25 6 5.75 5 6.5 6.5C7.25 8 8.75 7 8.75 5.5",stroke:"currentColor",strokeWidth:1.2})),"SvgRootType"),Are=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29186 1.92702C9.06924 1.82745 8.87014 1.68202 8.70757 1.50024L7.86631 0.574931C7.62496 0.309957 7.30773 0.12592 6.95791 0.0479385C6.60809 -0.0300431 6.24274 0.00182978 5.91171 0.139208C5.58068 0.276585 5.3001 0.512774 5.10828 0.815537C4.91645 1.1183 4.82272 1.47288 4.83989 1.83089L4.90388 3.08019C4.91612 3.32348 4.87721 3.56662 4.78968 3.79394C4.70215 4.02126 4.56794 4.2277 4.39571 4.39994C4.22347 4.57219 4.01704 4.7064 3.78974 4.79394C3.56243 4.88147 3.3193 4.92038 3.07603 4.90814L1.8308 4.84414C1.47162 4.82563 1.11553 4.91881 0.811445 5.11086C0.507359 5.30292 0.270203 5.58443 0.132561 5.91671C-0.00508149 6.249 -0.0364554 6.61576 0.0427496 6.9666C0.121955 7.31744 0.307852 7.63514 0.5749 7.87606L1.50016 8.71204C1.68193 8.87461 1.82735 9.07373 1.92692 9.29636C2.02648 9.51898 2.07794 9.76012 2.07794 10.004C2.07794 10.2479 2.02648 10.489 1.92692 10.7116C1.82735 10.9343 1.68193 11.1334 1.50016 11.296L0.5749 12.1319C0.309856 12.3729 0.125575 12.6898 0.0471809 13.0393C-0.0312128 13.3888 9.64098e-05 13.754 0.13684 14.0851C0.273583 14.4162 0.509106 14.6971 0.811296 14.8894C1.11349 15.0817 1.46764 15.1762 1.82546 15.1599L3.0707 15.0959C3.31397 15.0836 3.5571 15.1225 3.7844 15.2101C4.01171 15.2976 4.21814 15.4318 4.39037 15.6041C4.56261 15.7763 4.69682 15.9827 4.78435 16.2101C4.87188 16.4374 4.91078 16.6805 4.89855 16.9238L4.83455 18.1691C4.81605 18.5283 4.90921 18.8844 5.10126 19.1885C5.2933 19.4926 5.5748 19.7298 5.90707 19.8674C6.23934 20.0051 6.60608 20.0365 6.9569 19.9572C7.30772 19.878 7.6254 19.6921 7.86631 19.4251L8.7129 18.4998C8.87547 18.318 9.07458 18.1725 9.29719 18.073C9.51981 17.9734 9.76093 17.9219 10.0048 17.9219C10.2487 17.9219 10.4898 17.9734 10.7124 18.073C10.935 18.1725 11.1341 18.318 11.2967 18.4998L12.1326 19.4251C12.3735 19.6921 12.6912 19.878 13.042 19.9572C13.3929 20.0365 13.7596 20.0051 14.0919 19.8674C14.4241 19.7298 14.7056 19.4926 14.8977 19.1885C15.0897 18.8844 15.1829 18.5283 15.1644 18.1691L15.1004 16.9238C15.0882 16.6805 15.1271 16.4374 15.2146 16.2101C15.3021 15.9827 15.4363 15.7763 15.6086 15.6041C15.7808 15.4318 15.9872 15.2976 16.2145 15.2101C16.4418 15.1225 16.685 15.0836 16.9282 15.0959L18.1735 15.1599C18.5326 15.1784 18.8887 15.0852 19.1928 14.8931C19.4969 14.7011 19.7341 14.4196 19.8717 14.0873C20.0093 13.755 20.0407 13.3882 19.9615 13.0374C19.8823 12.6866 19.6964 12.3689 19.4294 12.1279L18.5041 11.292C18.3223 11.1294 18.1769 10.9303 18.0774 10.7076C17.9778 10.485 17.9263 10.2439 17.9263 10C17.9263 9.75612 17.9778 9.51499 18.0774 9.29236C18.1769 9.06973 18.3223 8.87062 18.5041 8.70804L19.4294 7.87206C19.6964 7.63114 19.8823 7.31344 19.9615 6.9626C20.0407 6.61176 20.0093 6.245 19.8717 5.91271C19.7341 5.58043 19.4969 5.29892 19.1928 5.10686C18.8887 4.91481 18.5326 4.82163 18.1735 4.84014L16.9282 4.90414C16.685 4.91638 16.4418 4.87747 16.2145 4.78994C15.9872 4.7024 15.7808 4.56818 15.6086 4.39594C15.4363 4.2237 15.3021 4.01726 15.2146 3.78994C15.1271 3.56262 15.0882 3.31948 15.1004 3.07619L15.1644 1.83089C15.1829 1.4717 15.0897 1.11559 14.8977 0.811487C14.7056 0.507385 14.4241 0.270217 14.0919 0.132568C13.7596 -0.00508182 13.3929 -0.0364573 13.042 0.0427519C12.6912 0.121961 12.3735 0.307869 12.1326 0.574931L11.2914 1.50024C11.1288 1.68202 10.9297 1.82745 10.7071 1.92702C10.4845 2.02659 10.2433 2.07805 9.99947 2.07805C9.7556 2.07805 9.51448 2.02659 9.29186 1.92702ZM14.3745 10C14.3745 12.4162 12.4159 14.375 9.99977 14.375C7.58365 14.375 5.625 12.4162 5.625 10C5.625 7.58375 7.58365 5.625 9.99977 5.625C12.4159 5.625 14.3745 7.58375 14.3745 10Z",fill:"currentColor"})),"SvgSettings"),Dre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",fill:"currentColor",stroke:"currentColor"})),"SvgStarFilled"),Ire=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M6.5782 1.07092C6.71096 0.643026 7.28904 0.643027 7.4218 1.07092L8.59318 4.84622C8.65255 5.03758 8.82284 5.16714 9.01498 5.16714L12.8056 5.16714C13.2353 5.16714 13.4139 5.74287 13.0663 6.00732L9.99962 8.34058C9.84418 8.45885 9.77913 8.66848 9.83851 8.85984L11.0099 12.6351C11.1426 13.063 10.675 13.4189 10.3274 13.1544L7.26069 10.8211C7.10524 10.7029 6.89476 10.7029 6.73931 10.8211L3.6726 13.1544C3.32502 13.4189 2.85735 13.063 2.99012 12.6351L4.16149 8.85984C4.22087 8.66848 4.15582 8.45885 4.00038 8.34058L0.933671 6.00732C0.586087 5.74287 0.764722 5.16714 1.19436 5.16714L4.98502 5.16714C5.17716 5.16714 5.34745 5.03758 5.40682 4.84622L6.5782 1.07092Z",stroke:"currentColor",strokeWidth:1.5})),"SvgStar"),Lre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{width:16,height:16,rx:2,fill:"currentColor"})),"SvgStop"),Rre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{width:"1em",height:"5em",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd","aria-hidden":"true",viewBox:"0 0 23 23",style:{height:"1.5em"},clipRule:"evenodd","aria-labelledby":t,...n},e===void 0?k.createElement("title",{id:t},"trash icon"):e?k.createElement("title",{id:t},e):null,k.createElement("path",{d:"M19 24h-14c-1.104 0-2-.896-2-2v-17h-1v-2h6v-1.5c0-.827.673-1.5 1.5-1.5h5c.825 0 1.5.671 1.5 1.5v1.5h6v2h-1v17c0 1.104-.896 2-2 2zm0-19h-14v16.5c0 .276.224.5.5.5h13c.276 0 .5-.224.5-.5v-16.5zm-7 7.586l3.293-3.293 1.414 1.414-3.293 3.293 3.293 3.293-1.414 1.414-3.293-3.293-3.293 3.293-1.414-1.414 3.293-3.293-3.293-3.293 1.414-1.414 3.293 3.293zm2-10.586h-4v1h4v-1z",fill:"currentColor",strokeWidth:.25,stroke:"currentColor"})),"SvgTrash"),Fre=fe(({title:e,titleId:t,...n})=>k.createElement("svg",{height:"1em",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":t,...n},e?k.createElement("title",{id:t},e):null,k.createElement("rect",{x:.6,y:.6,width:11.8,height:11.8,rx:5.9,stroke:"currentColor",strokeWidth:1.2}),k.createElement("rect",{x:5.5,y:5.5,width:2,height:2,rx:1,fill:"currentColor"})),"SvgType"),Mre=wt(ire),Pre=wt(sre),$re=wt(are),Vre=wt(lre),pT=wt(cre),jre=wt(ure),Ure=wt(fre),Bre=wt(dre),qre=wt(pre),zre=wt(hre),Hre=wt(mre,"filled docs icon"),Wre=wt(gre),Gre=wt(vre),Yre=wt(yre),Qre=wt(bre),Kre=wt(Ere),Jre=wt(wre),Xre=wt(xre),Zre=wt(Sre),eoe=wt(Tre),toe=wt(Cre),noe=wt(kre),roe=wt(Nre),ooe=wt(_re),ioe=wt(Ore),soe=wt(Are),aoe=wt(Dre,"filled star icon"),loe=wt(Ire),coe=wt(Lre),uoe=wt(Rre,"trash icon"),O0=wt(Fre);function wt(e,t=e.name.replace("Svg","").replaceAll(/([A-Z])/g," $1").trimStart().toLowerCase()+" icon"){return e.defaultProps={title:t},e}fe(wt,"generateIcon");const jn=k.forwardRef((e,t)=>W.jsx("button",{...e,ref:t,className:Gn("graphiql-un-styled",e.className)}));jn.displayName="UnStyledButton";const _i=k.forwardRef((e,t)=>W.jsx("button",{...e,ref:t,className:Gn("graphiql-button",{success:"graphiql-button-success",error:"graphiql-button-error"}[e.state],e.className)}));_i.displayName="Button";const hT=k.forwardRef((e,t)=>W.jsx("div",{...e,ref:t,className:Gn("graphiql-button-group",e.className)}));hT.displayName="ButtonGroup";const Hp=fe((e,t)=>Object.entries(t).reduce((n,[r,o])=>(n[r]=o,n),e),"createComponentGroup"),G3=k.forwardRef((e,t)=>W.jsx(BH,{asChild:!0,children:W.jsxs(jn,{...e,ref:t,type:"button",className:Gn("graphiql-dialog-close",e.className),children:[W.jsx(sR,{children:"Close dialog"}),W.jsx(pT,{})]})}));G3.displayName="Dialog.Close";function Y3({children:e,...t}){return W.jsx(FH,{...t,children:W.jsxs(PH,{children:[W.jsx($H,{className:"graphiql-dialog-overlay"}),W.jsx(VH,{className:"graphiql-dialog",children:e})]})})}fe(Y3,"DialogRoot");const Gu=Hp(Y3,{Close:G3,Title:jH,Trigger:MH,Description:UH}),Q3=k.forwardRef((e,t)=>W.jsx(GG,{asChild:!0,children:W.jsx("button",{...e,ref:t,className:Gn("graphiql-un-styled",e.className)})}));Q3.displayName="DropdownMenuButton";function K3({children:e,align:t="start",sideOffset:n=5,className:r,...o}){return W.jsx(YG,{children:W.jsx(QG,{align:t,sideOffset:n,className:Gn("graphiql-dropdown-content",r),...o,children:e})})}fe(K3,"Content");const foe=fe(({className:e,children:t,...n})=>W.jsx(KG,{className:Gn("graphiql-dropdown-item",e),...n,children:t}),"Item"),Ha=Hp(WG,{Button:Q3,Item:foe,Content:K3}),A0=new CK({breaks:!0,linkify:!0}),es=k.forwardRef(({children:e,onlyShowFirstChild:t,type:n,...r},o)=>W.jsx("div",{...r,ref:o,className:Gn(`graphiql-markdown-${n}`,t&&"graphiql-markdown-preview",r.className),dangerouslySetInnerHTML:{__html:A0.render(e)}}));es.displayName="MarkdownContent";const mT=k.forwardRef((e,t)=>W.jsx("div",{...e,ref:t,className:Gn("graphiql-spinner",e.className)}));mT.displayName="Spinner";function J3({children:e,align:t="start",side:n="bottom",sideOffset:r=5,label:o}){return W.jsxs(Pte,{children:[W.jsx($te,{asChild:!0,children:e}),W.jsx(Vte,{children:W.jsx(jte,{className:"graphiql-tooltip",align:t,side:n,sideOffset:r,children:o})})]})}fe(J3,"TooltipRoot");const Tr=Hp(J3,{Provider:Mte}),X3=k.forwardRef(({isActive:e,value:t,children:n,className:r,...o},i)=>W.jsx(C3.Item,{...o,ref:i,value:t,"aria-selected":e?"true":void 0,role:"tab",className:Gn("graphiql-tab",e&&"graphiql-tab-active",r),children:n}));X3.displayName="Tab";const Z3=k.forwardRef((e,t)=>W.jsx(jn,{...e,ref:t,type:"button",className:Gn("graphiql-tab-button",e.className),children:e.children}));Z3.displayName="Tab.Button";const e5=k.forwardRef((e,t)=>W.jsx(Tr,{label:"Close Tab",children:W.jsx(jn,{"aria-label":"Close Tab",...e,ref:t,type:"button",className:Gn("graphiql-tab-close",e.className),children:W.jsx(pT,{})})}));e5.displayName="Tab.Close";const gT=Hp(X3,{Button:Z3,Close:e5}),t5=k.forwardRef(({values:e,onReorder:t,children:n,className:r,...o},i)=>W.jsx(C3.Group,{...o,ref:i,values:e,onReorder:t,axis:"x",role:"tablist",className:Gn("graphiql-tabs",r),children:n}));t5.displayName="Tabs";const n5=Ba("HistoryContext");function r5(e){var t;const n=za(),r=k.useRef(new fq(n||new qw(null),e.maxHistoryLength||doe)),[o,i]=k.useState(((t=r.current)==null?void 0:t.queries)||[]),s=k.useCallback(m=>{var v;(v=r.current)==null||v.updateHistory(m),i(r.current.queries)},[]),l=k.useCallback((m,v)=>{r.current.editLabel(m,v),i(r.current.queries)},[]),c=k.useCallback(m=>{r.current.toggleFavorite(m),i(r.current.queries)},[]),f=k.useCallback(m=>m,[]),d=k.useCallback((m,v=!1)=>{r.current.deleteHistory(m,v),i(r.current.queries)},[]),g=k.useMemo(()=>({addToHistory:s,editLabel:l,items:o,toggleFavorite:c,setActive:f,deleteFromHistory:d}),[s,l,o,c,f,d]);return W.jsx(n5.Provider,{value:g,children:e.children})}fe(r5,"HistoryContextProvider");const D0=qa(n5),doe=20;function o5(){const{items:e,deleteFromHistory:t}=D0({nonNull:!0});let n=e.slice().map((l,c)=>({...l,index:c})).reverse();const r=n.filter(l=>l.favorite);r.length&&(n=n.filter(l=>!l.favorite));const[o,i]=k.useState(null);k.useEffect(()=>{o&&setTimeout(()=>{i(null)},2e3)},[o]);const s=k.useCallback(()=>{try{for(const l of n)t(l,!0);i("success")}catch{i("error")}},[t,n]);return W.jsxs("section",{"aria-label":"History",className:"graphiql-history",children:[W.jsxs("div",{className:"graphiql-history-header",children:["History",(o||n.length>0)&&W.jsx(_i,{type:"button",state:o||void 0,disabled:!n.length,onClick:s,children:{success:"Cleared",error:"Failed to Clear"}[o]||"Clear"})]}),!!r.length&&W.jsx("ul",{className:"graphiql-history-items",children:r.map(l=>W.jsx(Wp,{item:l},l.index))}),!!r.length&&!!n.length&&W.jsx("div",{className:"graphiql-history-item-spacer"}),!!n.length&&W.jsx("ul",{className:"graphiql-history-items",children:n.map(l=>W.jsx(Wp,{item:l},l.index))})]})}fe(o5,"History");function Wp(e){const{editLabel:t,toggleFavorite:n,deleteFromHistory:r,setActive:o}=D0({nonNull:!0,caller:Wp}),{headerEditor:i,queryEditor:s,variableEditor:l}=Qn({nonNull:!0,caller:Wp}),c=k.useRef(null),f=k.useRef(null),[d,g]=k.useState(!1);k.useEffect(()=>{var C;d&&((C=c.current)==null||C.focus())},[d]);const m=e.item.label||e.item.operationName||i5(e.item.query),v=k.useCallback(()=>{var C;g(!1);const{index:E,..._}=e.item;t({..._,label:(C=c.current)==null?void 0:C.value},E)},[t,e.item]),b=k.useCallback(()=>{g(!1)},[]),w=k.useCallback(C=>{C.stopPropagation(),g(!0)},[]),N=k.useCallback(()=>{const{query:C,variables:E,headers:_}=e.item;s==null||s.setValue(C??""),l==null||l.setValue(E??""),i==null||i.setValue(_??""),o(e.item)},[i,e.item,s,o,l]),S=k.useCallback(C=>{C.stopPropagation(),r(e.item)},[e.item,r]),x=k.useCallback(C=>{C.stopPropagation(),n(e.item)},[e.item,n]);return W.jsx("li",{className:Gn("graphiql-history-item",d&&"editable"),children:d?W.jsxs(W.Fragment,{children:[W.jsx("input",{type:"text",defaultValue:e.item.label,ref:c,onKeyDown:C=>{C.key==="Esc"?g(!1):C.key==="Enter"&&(g(!1),t({...e.item,label:C.currentTarget.value}))},placeholder:"Type a label"}),W.jsx(jn,{type:"button",ref:f,onClick:v,children:"Save"}),W.jsx(jn,{type:"button",ref:f,onClick:b,children:W.jsx(pT,{})})]}):W.jsxs(W.Fragment,{children:[W.jsx(Tr,{label:"Set active",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-label",onClick:N,"aria-label":"Set active",children:m})}),W.jsx(Tr,{label:"Edit label",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-action",onClick:w,"aria-label":"Edit label",children:W.jsx(eoe,{"aria-hidden":"true"})})}),W.jsx(Tr,{label:e.item.favorite?"Remove favorite":"Add favorite",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-action",onClick:x,"aria-label":e.item.favorite?"Remove favorite":"Add favorite",children:e.item.favorite?W.jsx(aoe,{"aria-hidden":"true"}):W.jsx(loe,{"aria-hidden":"true"})})}),W.jsx(Tr,{label:"Delete from history",children:W.jsx(jn,{type:"button",className:"graphiql-history-item-action",onClick:S,"aria-label":"Delete from history",children:W.jsx(uoe,{"aria-hidden":"true"})})})]})})}fe(Wp,"HistoryItem");function i5(e){return e==null?void 0:e.split(`
`).map(t=>t.replace(/#(.*)/,"")).join(" ").replaceAll("{"," { ").replaceAll("}"," } ").replaceAll(/[\s]{2,}/g," ")}fe(i5,"formatQuery");const s5=Ba("ExecutionContext");function I0({fetcher:e,getDefaultFieldNames:t,children:n,operationName:r}){if(!e)throw new TypeError("The `ExecutionContextProvider` component requires a `fetcher` function to be passed as prop.");const{externalFragments:o,headerEditor:i,queryEditor:s,responseEditor:l,variableEditor:c,updateActiveTabValues:f}=Qn({nonNull:!0,caller:I0}),d=D0(),g=q0({getDefaultFieldNames:t,caller:I0}),[m,v]=k.useState(!1),[b,w]=k.useState(null),N=k.useRef(0),S=k.useCallback(()=>{b==null||b.unsubscribe(),v(!1),w(null)},[b]),x=k.useCallback(async()=>{if(!s||!l)return;if(b){S();return}const _=fe(z=>{l.setValue(z),f({response:z})},"setResponse");N.current+=1;const I=N.current;let D=g()||s.getValue();const A=c==null?void 0:c.getValue();let F;try{F=vT({json:A,errorMessageParse:"Variables are invalid JSON",errorMessageType:"Variables are not a JSON object."})}catch(z){_(z instanceof Error?z.message:`${z}`);return}const $=i==null?void 0:i.getValue();let q;try{q=vT({json:$,errorMessageParse:"Headers are invalid JSON",errorMessageType:"Headers are not a JSON object."})}catch(z){_(z instanceof Error?z.message:`${z}`);return}if(o){const z=s.documentAST?Hq(s.documentAST,o):[];z.length>0&&(D+=`
`+z.map(B=>ft(B)).join(`
`))}_(""),v(!0);const H=r??s.operationName??void 0;d==null||d.addToHistory({query:D,variables:A,headers:$,operationName:H});try{let z={data:{}};const B=fe(Y=>{if(I!==N.current)return;let Q=Array.isArray(Y)?Y:!1;if(!Q&&typeof Y=="object"&&Y!==null&&"hasNext"in Y&&(Q=[Y]),Q){const K={data:z.data},Z=[...(z==null?void 0:z.errors)||[],...Q.flatMap(re=>re.errors).filter(Boolean)];Z.length&&(K.errors=Z);for(const re of Q){const{path:J,data:ie,errors:ne,...ae}=re;if(J){if(!ie)throw new Error(`Expected part to contain a data property, but got ${re}`);hz(K.data,J,ie,{merge:!0})}else ie&&(K.data=ie);z={...K,...ae}}v(!1),_(Bw(z))}else{const K=Bw(Y);v(!1),_(K)}},"handleResponse"),R=e({query:D,variables:F,operationName:H},{headers:q??void 0,documentAST:s.documentAST??void 0}),te=await Promise.resolve(R);if(eI(te))w(te.subscribe({next(Y){B(Y)},error(Y){v(!1),Y&&_(op(Y)),w(null)},complete(){v(!1),w(null)}}));else if(tI(te)){w({unsubscribe:()=>{var Y,Q;return(Q=(Y=te[Symbol.asyncIterator]()).return)==null?void 0:Q.call(Y)}});for await(const Y of te)B(Y);v(!1),w(null)}else B(te)}catch(z){v(!1),_(op(z)),w(null)}},[g,o,e,i,d,r,s,l,S,b,f,c]),C=!!b,E=k.useMemo(()=>({isFetching:m,isSubscribed:C,operationName:r??null,run:x,stop:S}),[m,C,r,x,S]);return W.jsx(s5.Provider,{value:E,children:n})}fe(I0,"ExecutionContextProvider");const Yu=qa(s5);function vT({json:e,errorMessageParse:t,errorMessageType:n}){let r;try{r=e&&e.trim()!==""?JSON.parse(e):void 0}catch(i){throw new Error(`${t}: ${i instanceof Error?i.message:i}.`)}const o=typeof r=="object"&&r!==null&&!Array.isArray(r);if(r!==void 0&&!o)throw new Error(n);return r}fe(vT,"tryParseJsonObject");const L0="graphiql",R0="sublime";let a5=!1;typeof window=="object"&&(a5=window.navigator.platform.toLowerCase().indexOf("mac")===0);const F0={[a5?"Cmd-F":"Ctrl-F"]:"findPersistent","Cmd-G":"findPersistent","Ctrl-G":"findPersistent","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight"};async function Qu(e,t){const n=await Promise.resolve().then(()=>ece).then(r=>r.c).then(r=>typeof r=="function"?r:r.default);return await Promise.all((t==null?void 0:t.useCommonAddons)===!1?e:[Promise.resolve().then(()=>rce).then(r=>r.s),Promise.resolve().then(()=>lce).then(r=>r.m),Promise.resolve().then(()=>fce).then(r=>r.c),Promise.resolve().then(()=>z4).then(r=>r.b),Promise.resolve().then(()=>Q4).then(r=>r.f),Promise.resolve().then(()=>bce).then(r=>r.l),Promise.resolve().then(()=>t6).then(r=>r.s),Promise.resolve().then(()=>s6).then(r=>r.j),Promise.resolve().then(()=>r6).then(r=>r.d),Promise.resolve().then(()=>c6).then(r=>r.s),...e]),n}fe(Qu,"importCodeMirror");const poe=fe(e=>e?ft(e):"","printDefault");function yT({field:e}){if(!("defaultValue"in e)||e.defaultValue===void 0)return null;const t=Ns(e.defaultValue,e.type);return t?W.jsxs(W.Fragment,{children:[" = ",W.jsx("span",{className:"graphiql-doc-explorer-default-value",children:poe(t)})]}):null}fe(yT,"DefaultValue");const l5=Ba("SchemaContext");function bT(e){if(!e.fetcher)throw new TypeError("The `SchemaContextProvider` component requires a `fetcher` function to be passed as prop.");const{initialHeaders:t,headerEditor:n}=Qn({nonNull:!0,caller:bT}),[r,o]=k.useState(),[i,s]=k.useState(!1),[l,c]=k.useState(null),f=k.useRef(0);k.useEffect(()=>{o(Ig(e.schema)||e.schema===null||e.schema===void 0?e.schema:void 0),f.current++},[e.schema]);const d=k.useRef(t);k.useEffect(()=>{n&&(d.current=n.getValue())});const{introspectionQuery:g,introspectionQueryName:m,introspectionQuerySansSubscriptions:v}=c5({inputValueDeprecation:e.inputValueDeprecation,introspectionQueryName:e.introspectionQueryName,schemaDescription:e.schemaDescription}),{fetcher:b,onSchemaChange:w,dangerouslyAssumeSchemaIsValid:N,children:S}=e,x=k.useCallback(()=>{if(Ig(e.schema)||e.schema===null)return;const _=++f.current,I=e.schema;async function D(){if(I)return I;const A=u5(d.current);if(!A.isValidJSON){c("Introspection failed as headers are invalid.");return}const F=A.headers?{headers:A.headers}:{},$=nI(b({query:g,operationName:m},F));if(!Z2($)){c("Fetcher did not return a Promise for introspection.");return}s(!0),c(null);let q=await $;if(typeof q!="object"||q===null||!("data"in q)){const z=nI(b({query:v,operationName:m},F));if(!Z2(z))throw new Error("Fetcher did not return a Promise for introspection.");q=await z}if(s(!1),q!=null&&q.data&&"__schema"in q.data)return q.data;const H=typeof q=="string"?q:Bw(q);c(H)}fe(D,"fetchIntrospectionData"),D().then(A=>{if(!(_!==f.current||!A))try{const F=Rw(A);o(F),w==null||w(F)}catch(F){c(op(F))}}).catch(A=>{_===f.current&&(c(op(A)),s(!1))})},[b,m,g,v,w,e.schema]);k.useEffect(()=>{x()},[x]),k.useEffect(()=>{function _(I){I.ctrlKey&&I.key==="R"&&x()}return fe(_,"triggerIntrospection"),window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)});const C=k.useMemo(()=>!r||N?[]:Lg(r),[r,N]),E=k.useMemo(()=>({fetchError:l,introspect:x,isFetching:i,schema:r,validationErrors:C}),[l,x,i,r,C]);return W.jsx(l5.Provider,{value:E,children:S})}fe(bT,"SchemaContextProvider");const Oi=qa(l5);function c5({inputValueDeprecation:e,introspectionQueryName:t,schemaDescription:n}){return k.useMemo(()=>{const r=t||"IntrospectionQuery";let o=Zg({inputValueDeprecation:e,schemaDescription:n});t&&(o=o.replace("query IntrospectionQuery",`query ${r}`));const i=o.replace("subscriptionType { name }","");return{introspectionQueryName:r,introspectionQuery:o,introspectionQuerySansSubscriptions:i}},[e,t,n])}fe(c5,"useIntrospectionQuery");function u5(e){let t=null,n=!0;try{e&&(t=JSON.parse(e))}catch{n=!1}return{headers:t,isValidJSON:n}}fe(u5,"parseHeaderString");const M0={name:"Docs"},f5=Ba("ExplorerContext");function ET(e){const{schema:t,validationErrors:n}=Oi({nonNull:!0,caller:ET}),[r,o]=k.useState([M0]),i=k.useCallback(f=>{o(d=>d.at(-1).def===f.def?d:[...d,f])},[]),s=k.useCallback(()=>{o(f=>f.length>1?f.slice(0,-1):f)},[]),l=k.useCallback(()=>{o(f=>f.length===1?f:[M0])},[]);k.useEffect(()=>{t==null||n.length>0?l():o(f=>{if(f.length===1)return f;const d=[M0];let g=null;for(const m of f)if(m!==M0)if(m.def)if(ks(m.def)){const v=t.getType(m.def.name);if(v)d.push({name:m.name,def:v}),g=v;else break}else{if(g===null)break;if(Qe(g)||gt(g)){const v=g.getFields()[m.name];if(v)d.push({name:m.name,def:v});else break}else{if(or(g)||Lt(g)||Xe(g)||Qt(g))break;{const v=g;if(v.args.find(b=>b.name===m.name))d.push({name:m.name,def:v});else break}}}else g=null,d.push(m);return d})},[l,t,n]);const c=k.useMemo(()=>({explorerNavStack:r,push:i,pop:s,reset:l}),[r,i,s,l]);return W.jsx(f5.Provider,{value:c,children:e.children})}fe(ET,"ExplorerContextProvider");const Wa=qa(f5);function Gp(e,t){return He(e)?W.jsxs(W.Fragment,{children:[Gp(e.ofType,t),"!"]}):vt(e)?W.jsxs(W.Fragment,{children:["[",Gp(e.ofType,t),"]"]}):t(e)}fe(Gp,"renderType");function Ai(e){const{push:t}=Wa({nonNull:!0,caller:Ai});return e.type?Gp(e.type,n=>W.jsx("a",{className:"graphiql-doc-explorer-type-name",onClick:r=>{r.preventDefault(),t({name:n.name,def:n})},href:"#",children:n.name})):null}fe(Ai,"TypeLink");function Yp({arg:e,showDefaultValue:t,inline:n}){const r=W.jsxs("span",{children:[W.jsx("span",{className:"graphiql-doc-explorer-argument-name",children:e.name}),": ",W.jsx(Ai,{type:e.type}),t!==!1&&W.jsx(yT,{field:e})]});return n?r:W.jsxs("div",{className:"graphiql-doc-explorer-argument",children:[r,e.description?W.jsx(es,{type:"description",children:e.description}):null,e.deprecationReason?W.jsxs("div",{className:"graphiql-doc-explorer-argument-deprecation",children:[W.jsx("div",{className:"graphiql-doc-explorer-argument-deprecation-label",children:"Deprecated"}),W.jsx(es,{type:"deprecation",children:e.deprecationReason})]}):null]})}fe(Yp,"Argument");function wT(e){return e.children?W.jsxs("div",{className:"graphiql-doc-explorer-deprecation",children:[W.jsx("div",{className:"graphiql-doc-explorer-deprecation-label",children:"Deprecated"}),W.jsx(es,{type:"deprecation",onlyShowFirstChild:e.preview??!0,children:e.children})]}):null}fe(wT,"DeprecationReason");function d5({directive:e}){return W.jsxs("span",{className:"graphiql-doc-explorer-directive",children:["@",e.name.value]})}fe(d5,"Directive");function ko(e){const t=hoe[e.title];return W.jsxs("div",{children:[W.jsxs("div",{className:"graphiql-doc-explorer-section-title",children:[W.jsx(t,{}),e.title]}),W.jsx("div",{className:"graphiql-doc-explorer-section-content",children:e.children})]})}fe(ko,"ExplorerSection");const hoe={Arguments:Mre,"Deprecated Arguments":Ure,"Deprecated Enum Values":Bre,"Deprecated Fields":qre,Directives:zre,"Enum Values":Gre,Fields:Yre,Implements:Kre,Implementations:O0,"Possible Types":O0,"Root Types":ioe,Type:O0,"All Schema Types":O0};function p5(e){return W.jsxs(W.Fragment,{children:[e.field.description?W.jsx(es,{type:"description",children:e.field.description}):null,W.jsx(wT,{preview:!1,children:e.field.deprecationReason}),W.jsx(ko,{title:"Type",children:W.jsx(Ai,{type:e.field.type})}),W.jsx(h5,{field:e.field}),W.jsx(m5,{field:e.field})]})}fe(p5,"FieldDocumentation");function h5({field:e}){const[t,n]=k.useState(!1),r=k.useCallback(()=>{n(!0)},[]);if(!("args"in e))return null;const o=[],i=[];for(const s of e.args)s.deprecationReason?i.push(s):o.push(s);return W.jsxs(W.Fragment,{children:[o.length>0?W.jsx(ko,{title:"Arguments",children:o.map(s=>W.jsx(Yp,{arg:s},s.name))}):null,i.length>0?t||o.length===0?W.jsx(ko,{title:"Deprecated Arguments",children:i.map(s=>W.jsx(Yp,{arg:s},s.name))}):W.jsx(_i,{type:"button",onClick:r,children:"Show Deprecated Arguments"}):null]})}fe(h5,"Arguments");function m5({field:e}){var t;const n=((t=e.astNode)==null?void 0:t.directives)||[];return!n||n.length===0?null:W.jsx(ko,{title:"Directives",children:n.map(r=>W.jsx("div",{children:W.jsx(d5,{directive:r})},r.name.value))})}fe(m5,"Directives");function g5(e){var t,n,r,o;const i=e.schema.getQueryType(),s=(n=(t=e.schema).getMutationType)==null?void 0:n.call(t),l=(o=(r=e.schema).getSubscriptionType)==null?void 0:o.call(r),c=e.schema.getTypeMap(),f=[i==null?void 0:i.name,s==null?void 0:s.name,l==null?void 0:l.name];return W.jsxs(W.Fragment,{children:[W.jsx(es,{type:"description",children:e.schema.description||"A GraphQL schema provides a root type for each kind of operation."}),W.jsxs(ko,{title:"Root Types",children:[i?W.jsxs("div",{children:[W.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"query"}),": ",W.jsx(Ai,{type:i})]}):null,s&&W.jsxs("div",{children:[W.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"mutation"}),": ",W.jsx(Ai,{type:s})]}),l&&W.jsxs("div",{children:[W.jsx("span",{className:"graphiql-doc-explorer-root-type",children:"subscription"}),": ",W.jsx(Ai,{type:l})]})]}),W.jsx(ko,{title:"All Schema Types",children:c&&W.jsx("div",{children:Object.values(c).map(d=>f.includes(d.name)||d.name.startsWith("__")?null:W.jsx("div",{children:W.jsx(Ai,{type:d})},d.name))})})]})}fe(g5,"SchemaDocumentation");function ac(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout(()=>{n=null,t(...r)},e)}}fe(ac,"debounce");function xT(){const{explorerNavStack:e,push:t}=Wa({nonNull:!0,caller:xT}),n=k.useRef(null),r=P0(),[o,i]=k.useState(""),[s,l]=k.useState(r(o)),c=k.useMemo(()=>ac(200,v=>{l(r(v))}),[r]);k.useEffect(()=>{c(o)},[c,o]),k.useEffect(()=>{function v(b){var w;b.metaKey&&b.key==="k"&&((w=n.current)==null||w.focus())}return fe(v,"handleKeyDown"),window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[]);const f=e.at(-1),d=k.useCallback(v=>{t("field"in v?{name:v.field.name,def:v.field}:{name:v.type.name,def:v.type})},[t]),g=k.useRef(!1),m=k.useCallback(v=>{g.current=v.type==="focus"},[]);return e.length===1||Qe(f.def)||Xe(f.def)||gt(f.def)?W.jsxs(Wu,{as:"div",className:"graphiql-doc-explorer-search",onChange:d,"data-state":g?void 0:"idle","aria-label":`Search ${f.name}...`,children:[W.jsxs("div",{className:"graphiql-doc-explorer-search-input",onClick:()=>{var v;(v=n.current)==null||v.focus()},children:[W.jsx(Xre,{}),W.jsx(Wu.Input,{autoComplete:"off",onFocus:m,onBlur:m,onChange:v=>i(v.target.value),placeholder:"⌘ K",ref:n,value:o,"data-cy":"doc-explorer-input"})]}),g.current&&W.jsxs(Wu.Options,{"data-cy":"doc-explorer-list",children:[s.within.length+s.types.length+s.fields.length===0?W.jsx("li",{className:"graphiql-doc-explorer-search-empty",children:"No results found"}):s.within.map((v,b)=>W.jsx(Wu.Option,{value:v,"data-cy":"doc-explorer-option",children:W.jsx(ST,{field:v.field,argument:v.argument})},`within-${b}`)),s.within.length>0&&s.types.length+s.fields.length>0?W.jsx("div",{className:"graphiql-doc-explorer-search-divider",children:"Other results"}):null,s.types.map((v,b)=>W.jsx(Wu.Option,{value:v,"data-cy":"doc-explorer-option",children:W.jsx(V0,{type:v.type})},`type-${b}`)),s.fields.map((v,b)=>W.jsxs(Wu.Option,{value:v,"data-cy":"doc-explorer-option",children:[W.jsx(V0,{type:v.type}),".",W.jsx(ST,{field:v.field,argument:v.argument})]},`field-${b}`))]})]}):null}fe(xT,"Search");function P0(e){const{explorerNavStack:t}=Wa({nonNull:!0,caller:e||P0}),{schema:n}=Oi({nonNull:!0,caller:e||P0}),r=t.at(-1);return k.useCallback(o=>{const i={within:[],types:[],fields:[]};if(!n)return i;const s=r.def,l=n.getTypeMap();let c=Object.keys(l);s&&(c=c.filter(f=>f!==s.name),c.unshift(s.name));for(const f of c){if(i.within.length+i.types.length+i.fields.length>=100)break;const d=l[f];if(s!==d&&$0(f,o)&&i.types.push({type:d}),!Qe(d)&&!Xe(d)&&!gt(d))continue;const g=d.getFields();for(const m in g){const v=g[m];let b;if(!$0(m,o))if("args"in v){if(b=v.args.filter(w=>$0(w.name,o)),b.length===0)continue}else continue;i[s===d?"within":"fields"].push(...b?b.map(w=>({type:d,field:v,argument:w})):[{type:d,field:v}])}}return i},[r.def,n])}fe(P0,"useSearchResults");function $0(e,t){try{const n=t.replaceAll(/[^_0-9A-Za-z]/g,r=>"\\"+r);return e.search(new RegExp(n,"i"))!==-1}catch{return e.toLowerCase().includes(t.toLowerCase())}}fe($0,"isMatch");function V0(e){return W.jsx("span",{className:"graphiql-doc-explorer-search-type",children:e.type.name})}fe(V0,"Type");function ST({field:e,argument:t}){return W.jsxs(W.Fragment,{children:[W.jsx("span",{className:"graphiql-doc-explorer-search-field",children:e.name}),t?W.jsxs(W.Fragment,{children:["(",W.jsx("span",{className:"graphiql-doc-explorer-search-argument",children:t.name}),":"," ",Gp(t.type,n=>W.jsx(V0,{type:n})),")"]}):null]})}fe(ST,"Field$1");function v5(e){const{push:t}=Wa({nonNull:!0});return W.jsx("a",{className:"graphiql-doc-explorer-field-name",onClick:n=>{n.preventDefault(),t({name:e.field.name,def:e.field})},href:"#",children:e.field.name})}fe(v5,"FieldLink");function y5(e){return ks(e.type)?W.jsxs(W.Fragment,{children:[e.type.description?W.jsx(es,{type:"description",children:e.type.description}):null,W.jsx(b5,{type:e.type}),W.jsx(E5,{type:e.type}),W.jsx(w5,{type:e.type}),W.jsx(x5,{type:e.type})]}):null}fe(y5,"TypeDocumentation");function b5({type:e}){return Qe(e)&&e.getInterfaces().length>0?W.jsx(ko,{title:"Implements",children:e.getInterfaces().map(t=>W.jsx("div",{children:W.jsx(Ai,{type:t})},t.name))}):null}fe(b5,"ImplementsInterfaces");function E5({type:e}){const[t,n]=k.useState(!1),r=k.useCallback(()=>{n(!0)},[]);if(!Qe(e)&&!Xe(e)&&!gt(e))return null;const o=e.getFields(),i=[],s=[];for(const l of Object.keys(o).map(c=>o[c]))l.deprecationReason?s.push(l):i.push(l);return W.jsxs(W.Fragment,{children:[i.length>0?W.jsx(ko,{title:"Fields",children:i.map(l=>W.jsx(TT,{field:l},l.name))}):null,s.length>0?t||i.length===0?W.jsx(ko,{title:"Deprecated Fields",children:s.map(l=>W.jsx(TT,{field:l},l.name))}):W.jsx(_i,{type:"button",onClick:r,children:"Show Deprecated Fields"}):null]})}fe(E5,"Fields");function TT({field:e}){const t="args"in e?e.args.filter(n=>!n.deprecationReason):[];return W.jsxs("div",{className:"graphiql-doc-explorer-item",children:[W.jsxs("div",{children:[W.jsx(v5,{field:e}),t.length>0?W.jsxs(W.Fragment,{children:["(",W.jsx("span",{children:t.map(n=>t.length===1?W.jsx(Yp,{arg:n,inline:!0},n.name):W.jsx("div",{className:"graphiql-doc-explorer-argument-multiple",children:W.jsx(Yp,{arg:n,inline:!0})},n.name))}),")"]}):null,": ",W.jsx(Ai,{type:e.type}),W.jsx(yT,{field:e})]}),e.description?W.jsx(es,{type:"description",onlyShowFirstChild:!0,children:e.description}):null,W.jsx(wT,{children:e.deprecationReason})]})}fe(TT,"Field");function w5({type:e}){const[t,n]=k.useState(!1),r=k.useCallback(()=>{n(!0)},[]);if(!Lt(e))return null;const o=[],i=[];for(const s of e.getValues())s.deprecationReason?i.push(s):o.push(s);return W.jsxs(W.Fragment,{children:[o.length>0?W.jsx(ko,{title:"Enum Values",children:o.map(s=>W.jsx(CT,{value:s},s.name))}):null,i.length>0?t||o.length===0?W.jsx(ko,{title:"Deprecated Enum Values",children:i.map(s=>W.jsx(CT,{value:s},s.name))}):W.jsx(_i,{type:"button",onClick:r,children:"Show Deprecated Values"}):null]})}fe(w5,"EnumValues");function CT({value:e}){return W.jsxs("div",{className:"graphiql-doc-explorer-item",children:[W.jsx("div",{className:"graphiql-doc-explorer-enum-value",children:e.name}),e.description?W.jsx(es,{type:"description",children:e.description}):null,e.deprecationReason?W.jsx(es,{type:"deprecation",children:e.deprecationReason}):null]})}fe(CT,"EnumValue");function x5({type:e}){const{schema:t}=Oi({nonNull:!0});return!t||!Pn(e)?null:W.jsx(ko,{title:Xe(e)?"Implementations":"Possible Types",children:t.getPossibleTypes(e).map(n=>W.jsx("div",{children:W.jsx(Ai,{type:n})},n.name))})}fe(x5,"PossibleTypes");function j0(){const{fetchError:e,isFetching:t,schema:n,validationErrors:r}=Oi({nonNull:!0,caller:j0}),{explorerNavStack:o,pop:i}=Wa({nonNull:!0,caller:j0}),s=o.at(-1);let l=null;e?l=W.jsx("div",{className:"graphiql-doc-explorer-error",children:"Error fetching schema"}):r.length>0?l=W.jsxs("div",{className:"graphiql-doc-explorer-error",children:["Schema is invalid: ",r[0].message]}):t?l=W.jsx(mT,{}):n?o.length===1?l=W.jsx(g5,{schema:n}):bu(s.def)?l=W.jsx(y5,{type:s.def}):s.def&&(l=W.jsx(p5,{field:s.def})):l=W.jsx("div",{className:"graphiql-doc-explorer-error",children:"No GraphQL schema available"});let c;return o.length>1&&(c=o.at(-2).name),W.jsxs("section",{className:"graphiql-doc-explorer","aria-label":"Documentation Explorer",children:[W.jsxs("div",{className:"graphiql-doc-explorer-header",children:[W.jsxs("div",{className:"graphiql-doc-explorer-header-content",children:[c&&W.jsxs("a",{href:"#",className:"graphiql-doc-explorer-back",onClick:f=>{f.preventDefault(),i()},"aria-label":`Go back to ${c}`,children:[W.jsx($re,{}),c]}),W.jsx("div",{className:"graphiql-doc-explorer-title",children:s.name})]}),W.jsx(xT,{},s.name)]}),W.jsx("div",{className:"graphiql-doc-explorer-content",children:l})]})}fe(j0,"DocExplorer");const Qp={title:"Documentation Explorer",icon:fe(function(){const e=U0();return(e==null?void 0:e.visiblePlugin)===Qp?W.jsx(Hre,{}):W.jsx(Wre,{})},"Icon"),content:j0},S5={title:"History",icon:Qre,content:o5},T5=Ba("PluginContext");function C5(e){const t=za(),n=Wa(),r=D0(),o=!!n,i=!!r,s=k.useMemo(()=>{const v=[],b={};o&&(v.push(Qp),b[Qp.title]=!0),i&&(v.push(S5),b[S5.title]=!0);for(const w of e.plugins||[]){if(typeof w.title!="string"||!w.title)throw new Error("All GraphiQL plugins must have a unique title");if(b[w.title])throw new Error(`All GraphiQL plugins must have a unique title, found two plugins with the title '${w.title}'`);v.push(w),b[w.title]=!0}return v},[o,i,e.plugins]),[l,c]=k.useState(()=>{const v=t==null?void 0:t.get(k5);return s.find(w=>w.title===v)||(v&&(t==null||t.set(k5,"")),e.visiblePlugin&&s.find(w=>(typeof e.visiblePlugin=="string"?w.title:w)===e.visiblePlugin)||null)}),{onTogglePluginVisibility:f,children:d}=e,g=k.useCallback(v=>{const b=v&&s.find(w=>(typeof v=="string"?w.title:w)===v)||null;c(w=>b===w?w:(f==null||f(b),b))},[f,s]);k.useEffect(()=>{e.visiblePlugin&&g(e.visiblePlugin)},[s,e.visiblePlugin,g]);const m=k.useMemo(()=>({plugins:s,setVisiblePlugin:g,visiblePlugin:l}),[s,g,l]);return W.jsx(T5.Provider,{value:m,children:d})}fe(C5,"PluginContextProvider");const U0=qa(T5),k5="visiblePlugin";function N5(e,t,n,r,o,i){Qu([],{useCommonAddons:!1}).then(l=>{let c,f,d,g,m,v,b,w,N;l.on(t,"select",(S,x)=>{if(!c){const C=x.parentNode;c=document.createElement("div"),c.className="CodeMirror-hint-information",C.append(c);const E=document.createElement("header");E.className="CodeMirror-hint-information-header",c.append(E),f=document.createElement("span"),f.className="CodeMirror-hint-information-field-name",E.append(f),d=document.createElement("span"),d.className="CodeMirror-hint-information-type-name-pill",E.append(d),g=document.createElement("span"),d.append(g),m=document.createElement("a"),m.className="CodeMirror-hint-information-type-name",m.href="javascript:void 0",m.addEventListener("click",s),d.append(m),v=document.createElement("span"),d.append(v),b=document.createElement("div"),b.className="CodeMirror-hint-information-description",c.append(b),w=document.createElement("div"),w.className="CodeMirror-hint-information-deprecation",c.append(w);const _=document.createElement("span");_.className="CodeMirror-hint-information-deprecation-label",_.textContent="Deprecated",w.append(_),N=document.createElement("div"),N.className="CodeMirror-hint-information-deprecation-reason",w.append(N);const I=parseInt(window.getComputedStyle(c).paddingBottom.replace(/px$/,""),10)||0,D=parseInt(window.getComputedStyle(c).maxHeight.replace(/px$/,""),10)||0,A=fe(()=>{c&&(c.style.paddingTop=C.scrollTop+I+"px",c.style.maxHeight=C.scrollTop+D+"px")},"handleScroll");C.addEventListener("scroll",A);let F;C.addEventListener("DOMNodeRemoved",F=fe($=>{$.target===C&&(C.removeEventListener("scroll",A),C.removeEventListener("DOMNodeRemoved",F),c&&c.removeEventListener("click",s),c=null,f=null,d=null,g=null,m=null,v=null,b=null,w=null,N=null,F=null)},"onRemoveFn"))}if(f&&(f.textContent=S.text),d&&g&&m&&v)if(S.type){d.style.display="inline";const C=fe(E=>{He(E)?(v.textContent="!"+v.textContent,C(E.ofType)):vt(E)?(g.textContent+="[",v.textContent="]"+v.textContent,C(E.ofType)):m.textContent=E.name},"renderType");g.textContent="",v.textContent="",C(S.type)}else g.textContent="",m.textContent="",v.textContent="",d.style.display="none";b&&(S.description?(b.style.display="block",b.innerHTML=A0.render(S.description)):(b.style.display="none",b.innerHTML="")),w&&N&&(S.deprecationReason?(w.style.display="block",N.innerHTML=A0.render(S.deprecationReason)):(w.style.display="none",N.innerHTML=""))})});function s(l){if(!n||!r||!o||!(l.currentTarget instanceof HTMLElement))return;const c=l.currentTarget.textContent||"",f=n.getType(c);f&&(o.setVisiblePlugin(Qp),r.push({name:f.name,def:f}),i==null||i(f))}fe(s,"onClickHintInformation")}fe(N5,"onHasCompletion");function Kp(e,t){k.useEffect(()=>{e&&typeof t=="string"&&t!==e.getValue()&&e.setValue(t)},[e,t])}fe(Kp,"useSynchronizeValue");function Jp(e,t,n){k.useEffect(()=>{e&&e.setOption(t,n)},[e,t,n])}fe(Jp,"useSynchronizeOption");function kT(e,t,n,r,o){const{updateActiveTabValues:i}=Qn({nonNull:!0,caller:o}),s=za();k.useEffect(()=>{if(!e)return;const l=ac(500,d=>{!s||n===null||s.set(n,d)}),c=ac(100,d=>{i({[r]:d})}),f=fe((d,g)=>{if(!g)return;const m=d.getValue();l(m),c(m),t==null||t(m)},"handleChange");return e.on("change",f),()=>e.off("change",f)},[t,e,s,n,r,i])}fe(kT,"useChangeHandler");function NT(e,t,n){const{schema:r}=Oi({nonNull:!0,caller:n}),o=Wa(),i=U0();k.useEffect(()=>{if(!e)return;const s=fe((l,c)=>{N5(l,c,r,o,i,f=>{t==null||t({kind:"Type",type:f,schema:r||void 0})})},"handleCompletion");return e.on("hasCompletion",s),()=>e.off("hasCompletion",s)},[t,e,o,i,r])}fe(NT,"useCompletion");function Di(e,t,n){k.useEffect(()=>{if(e){for(const r of t)e.removeKeyMap(r);if(n){const r={};for(const o of t)r[o]=()=>n();e.addKeyMap(r)}}},[e,t,n])}fe(Di,"useKeyMap");function B0({caller:e,onCopyQuery:t}={}){const{queryEditor:n}=Qn({nonNull:!0,caller:e||B0});return k.useCallback(()=>{if(!n)return;const r=n.getValue();wz(r),t==null||t(r)},[n,t])}fe(B0,"useCopyQuery");function lc({caller:e}={}){const{queryEditor:t}=Qn({nonNull:!0,caller:e||lc}),{schema:n}=Oi({nonNull:!0,caller:lc});return k.useCallback(()=>{const r=t==null?void 0:t.documentAST,o=t==null?void 0:t.getValue();!r||!o||t.setValue(ft(aq(r,n)))},[t,n])}fe(lc,"useMergeQuery");function Ku({caller:e}={}){const{queryEditor:t,headerEditor:n,variableEditor:r}=Qn({nonNull:!0,caller:e||Ku});return k.useCallback(()=>{if(r){const o=r.getValue();try{const i=JSON.stringify(JSON.parse(o),null,2);i!==o&&r.setValue(i)}catch{}}if(n){const o=n.getValue();try{const i=JSON.stringify(JSON.parse(o),null,2);i!==o&&n.setValue(i)}catch{}}if(t){const o=t.getValue(),i=ft(rr(o));i!==o&&t.setValue(i)}},[t,r,n])}fe(Ku,"usePrettifyEditors");function q0({getDefaultFieldNames:e,caller:t}={}){const{schema:n}=Oi({nonNull:!0,caller:t||q0}),{queryEditor:r}=Qn({nonNull:!0,caller:t||q0});return k.useCallback(()=>{if(!r)return;const o=r.getValue(),{insertions:i,result:s}=tq(n,o,e);return i&&i.length>0&&r.operation(()=>{const l=r.getCursor(),c=r.indexFromPos(l);r.setValue(s||"");let f=0;const d=i.map(({index:m,string:v})=>r.markText(r.posFromIndex(m+f),r.posFromIndex(m+(f+=v.length)),{className:"auto-inserted-leaf",clearOnEnter:!0,title:"Automatically added leaf fields"}));setTimeout(()=>{for(const m of d)m.clear()},7e3);let g=c;for(const{index:m,string:v}of i)m<c&&(g+=v.length);r.setCursor(r.posFromIndex(g))}),s},[e,r,n])}fe(q0,"useAutoCompleteLeafs");const moe=fe(e=>{const t=Qn({nonNull:!0})[`${e}Editor`];let n="";const r=(t==null?void 0:t.getValue())??!1;r&&r.length>0&&(n=r);const o=k.useCallback(i=>t==null?void 0:t.setValue(i),[t]);return k.useMemo(()=>[n,o],[n,o])},"useEditorState"),goe=fe(()=>moe("query"),"useOperationsEditorState");function _5([e,t]){const n=k.useRef({pending:null,last:e}),[r,o]=k.useState(e);k.useEffect(()=>{n.current.last===e||(n.current.last=e,n.current.pending===null?o(e):n.current.pending===e?(n.current.pending=null,e!==r&&(n.current.pending=r,t(r))):(n.current.pending=null,o(e)))},[e,r,t]);const i=k.useCallback(s=>{o(s),n.current.pending===null&&n.current.last!==s&&(n.current.pending=s,t(s))},[t]);return k.useMemo(()=>[r,i],[r,i])}fe(_5,"useOptimisticState");function Ju({editorTheme:e=L0,keyMap:t=R0,onEdit:n,readOnly:r=!1}={},o){const{initialHeaders:i,headerEditor:s,setHeaderEditor:l,shouldPersistHeaders:c}=Qn({nonNull:!0,caller:o||Ju}),f=Yu(),d=lc({caller:o||Ju}),g=Ku({caller:o||Ju}),m=k.useRef(null);return k.useEffect(()=>{let v=!0;return Qu([Promise.resolve().then(()=>Ice).then(b=>b.j)]).then(b=>{if(!v)return;const w=m.current;if(!w)return;const N=b(w,{value:i,lineNumbers:!0,tabSize:2,mode:{name:"javascript",json:!0},theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:r?"nocursor":!1,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:F0});N.addKeyMap({"Cmd-Space"(){N.showHint({completeSingle:!1,container:w})},"Ctrl-Space"(){N.showHint({completeSingle:!1,container:w})},"Alt-Space"(){N.showHint({completeSingle:!1,container:w})},"Shift-Space"(){N.showHint({completeSingle:!1,container:w})}}),N.on("keyup",(S,x)=>{const{code:C,key:E,shiftKey:_}=x,I=C.startsWith("Key"),D=!_&&C.startsWith("Digit");(I||D||E==="_"||E==='"')&&S.execCommand("autocomplete")}),l(N)}),()=>{v=!1}},[e,i,r,l]),Jp(s,"keyMap",t),kT(s,n,c?z0:null,"headers",Ju),Di(s,["Cmd-Enter","Ctrl-Enter"],f==null?void 0:f.run),Di(s,["Shift-Ctrl-P"],g),Di(s,["Shift-Ctrl-M"],d),m}fe(Ju,"useHeaderEditor");const z0="headers",voe=Array.from({length:11},(e,t)=>String.fromCharCode(8192+t)).concat(["\u2028","\u2029"," "," "]),yoe=new RegExp("["+voe.join("")+"]","g");function O5(e){return e.replace(yoe," ")}fe(O5,"normalizeWhitespace");function Ga({editorTheme:e=L0,keyMap:t=R0,onClickReference:n,onCopyQuery:r,onEdit:o,readOnly:i=!1}={},s){const{schema:l}=Oi({nonNull:!0,caller:s||Ga}),{externalFragments:c,initialQuery:f,queryEditor:d,setOperationName:g,setQueryEditor:m,validationRules:v,variableEditor:b,updateActiveTabValues:w}=Qn({nonNull:!0,caller:s||Ga}),N=Yu(),S=za(),x=Wa(),C=U0(),E=B0({caller:s||Ga,onCopyQuery:r}),_=lc({caller:s||Ga}),I=Ku({caller:s||Ga}),D=k.useRef(null),A=k.useRef(),F=k.useRef(()=>{});k.useEffect(()=>{F.current=H=>{if(!(!x||!C)){switch(C.setVisiblePlugin(Qp),H.kind){case"Type":{x.push({name:H.type.name,def:H.type});break}case"Field":{x.push({name:H.field.name,def:H.field});break}case"Argument":{H.field&&x.push({name:H.field.name,def:H.field});break}case"EnumValue":{H.type&&x.push({name:H.type.name,def:H.type});break}}n==null||n(H)}}},[x,n,C]),k.useEffect(()=>{let H=!0;return Qu([Promise.resolve().then(()=>Fce).then(z=>z.c),Promise.resolve().then(()=>g6).then(z=>z.s),Promise.resolve().then(()=>$ce),Promise.resolve().then(()=>jce),Promise.resolve().then(()=>Gce),Promise.resolve().then(()=>Kce),Promise.resolve().then(()=>nue)]).then(z=>{if(!H)return;A.current=z;const B=D.current;if(!B)return;const R=z(B,{value:f,lineNumbers:!0,tabSize:2,foldGutter:!0,mode:"graphql",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:i?"nocursor":!1,lint:{schema:void 0,validationRules:null,externalFragments:void 0},hintOptions:{schema:void 0,closeOnUnfocus:!1,completeSingle:!1,container:B,externalFragments:void 0},info:{schema:void 0,renderDescription:Y=>A0.render(Y),onClick(Y){F.current(Y)}},jump:{schema:void 0,onClick(Y){F.current(Y)}},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{...F0,"Cmd-S"(){},"Ctrl-S"(){}}});R.addKeyMap({"Cmd-Space"(){R.showHint({completeSingle:!0,container:B})},"Ctrl-Space"(){R.showHint({completeSingle:!0,container:B})},"Alt-Space"(){R.showHint({completeSingle:!0,container:B})},"Shift-Space"(){R.showHint({completeSingle:!0,container:B})},"Shift-Alt-Space"(){R.showHint({completeSingle:!0,container:B})}}),R.on("keyup",(Y,Q)=>{boe.test(Q.key)&&Y.execCommand("autocomplete")});let te=!1;R.on("startCompletion",()=>{te=!0}),R.on("endCompletion",()=>{te=!1}),R.on("keydown",(Y,Q)=>{Q.key==="Escape"&&te&&Q.stopPropagation()}),R.on("beforeChange",(Y,Q)=>{var K;if(Q.origin==="paste"){const Z=Q.text.map(O5);(K=Q.update)==null||K.call(Q,Q.from,Q.to,Z)}}),R.documentAST=null,R.operationName=null,R.operations=null,R.variableToType=null,m(R)}),()=>{H=!1}},[e,f,i,m]),Jp(d,"keyMap",t),k.useEffect(()=>{if(!d)return;function H(B){var R;const te=Kq(l,B.getValue()),Y=lq(B.operations??void 0,B.operationName??void 0,te==null?void 0:te.operations);return B.documentAST=(te==null?void 0:te.documentAST)??null,B.operationName=Y??null,B.operations=(te==null?void 0:te.operations)??null,b&&(b.state.lint.linterOptions.variableToType=te==null?void 0:te.variableToType,b.options.lint.variableToType=te==null?void 0:te.variableToType,b.options.hintOptions.variableToType=te==null?void 0:te.variableToType,(R=A.current)==null||R.signal(b,"change",b)),te?{...te,operationName:Y}:null}fe(H,"getAndUpdateOperationFacts");const z=ac(100,B=>{const R=B.getValue();S==null||S.set(L5,R);const te=B.operationName,Y=H(B);(Y==null?void 0:Y.operationName)!==void 0&&(S==null||S.set(Eoe,Y.operationName)),o==null||o(R,Y==null?void 0:Y.documentAST),Y!=null&&Y.operationName&&te!==Y.operationName&&g(Y.operationName),w({query:R,operationName:(Y==null?void 0:Y.operationName)??null})});return H(d),d.on("change",z),()=>d.off("change",z)},[o,d,l,g,S,b,w]),A5(d,l??null,A),D5(d,v??null,A),I5(d,c,A),NT(d,n||null,Ga);const $=N==null?void 0:N.run,q=k.useCallback(()=>{var H;if(!$||!d||!d.operations||!d.hasFocus()){$==null||$();return}const z=d.indexFromPos(d.getCursor());let B;for(const R of d.operations)R.loc&&R.loc.start<=z&&R.loc.end>=z&&(B=(H=R.name)==null?void 0:H.value);B&&B!==d.operationName&&g(B),$()},[d,$,g]);return Di(d,["Cmd-Enter","Ctrl-Enter"],q),Di(d,["Shift-Ctrl-C"],E),Di(d,["Shift-Ctrl-P","Shift-Ctrl-F"],I),Di(d,["Shift-Ctrl-M"],_),D}fe(Ga,"useQueryEditor");function A5(e,t,n){k.useEffect(()=>{if(!e)return;const r=e.options.lint.schema!==t;e.state.lint.linterOptions.schema=t,e.options.lint.schema=t,e.options.hintOptions.schema=t,e.options.info.schema=t,e.options.jump.schema=t,r&&n.current&&n.current.signal(e,"change",e)},[e,t,n])}fe(A5,"useSynchronizeSchema");function D5(e,t,n){k.useEffect(()=>{if(!e)return;const r=e.options.lint.validationRules!==t;e.state.lint.linterOptions.validationRules=t,e.options.lint.validationRules=t,r&&n.current&&n.current.signal(e,"change",e)},[e,t,n])}fe(D5,"useSynchronizeValidationRules");function I5(e,t,n){const r=k.useMemo(()=>[...t.values()],[t]);k.useEffect(()=>{if(!e)return;const o=e.options.lint.externalFragments!==r;e.state.lint.linterOptions.externalFragments=r,e.options.lint.externalFragments=r,e.options.hintOptions.externalFragments=r,o&&n.current&&n.current.signal(e,"change",e)},[e,r,n])}fe(I5,"useSynchronizeExternalFragments");const boe=/^[a-zA-Z0-9_@(]$/,L5="query",Eoe="operationName";function R5({defaultQuery:e,defaultHeaders:t,headers:n,defaultTabs:r,query:o,variables:i,storage:s,shouldPersistHeaders:l}){const c=s==null?void 0:s.get(Zp);try{if(!c)throw new Error("Storage for tabs is empty");const f=JSON.parse(c),d=l?n:void 0;if(F5(f)){const g=Xp({query:o,variables:i,headers:d});let m=-1;for(let v=0;v<f.tabs.length;v++){const b=f.tabs[v];b.hash=Xp({query:b.query,variables:b.variables,headers:b.headers}),b.hash===g&&(m=v)}if(m>=0)f.activeTabIndex=m;else{const v=o?H0(o):null;f.tabs.push({id:IT(),hash:g,title:v||LT,query:o,variables:i,headers:n,operationName:v,response:null}),f.activeTabIndex=f.tabs.length-1}return f}throw new Error("Storage for tabs is invalid")}catch{return{activeTabIndex:0,tabs:(r||[{query:o??e,variables:i,headers:n??t}]).map(AT)}}}fe(R5,"getDefaultTabState");function F5(e){return e&&typeof e=="object"&&!Array.isArray(e)&&P5(e,"activeTabIndex")&&"tabs"in e&&Array.isArray(e.tabs)&&e.tabs.every(M5)}fe(F5,"isTabsState");function M5(e){return e&&typeof e=="object"&&!Array.isArray(e)&&_T(e,"id")&&_T(e,"title")&&Xu(e,"query")&&Xu(e,"variables")&&Xu(e,"headers")&&Xu(e,"operationName")&&Xu(e,"response")}fe(M5,"isTabState");function P5(e,t){return t in e&&typeof e[t]=="number"}fe(P5,"hasNumberKey");function _T(e,t){return t in e&&typeof e[t]=="string"}fe(_T,"hasStringKey");function Xu(e,t){return t in e&&(typeof e[t]=="string"||e[t]===null)}fe(Xu,"hasStringOrNullKey");function $5({queryEditor:e,variableEditor:t,headerEditor:n,responseEditor:r}){return k.useCallback(o=>{const i=(e==null?void 0:e.getValue())??null,s=(t==null?void 0:t.getValue())??null,l=(n==null?void 0:n.getValue())??null,c=(e==null?void 0:e.operationName)??null,f=(r==null?void 0:r.getValue())??null;return DT(o,{query:i,variables:s,headers:l,response:f,operationName:c})},[e,t,n,r])}fe($5,"useSynchronizeActiveTabValues");function OT(e,t=!1){return JSON.stringify(e,(n,r)=>n==="hash"||n==="response"||!t&&n==="headers"?null:r)}fe(OT,"serializeTabState");function V5({storage:e,shouldPersistHeaders:t}){const n=k.useMemo(()=>ac(500,r=>{e==null||e.set(Zp,r)}),[e]);return k.useCallback(r=>{n(OT(r,t))},[t,n])}fe(V5,"useStoreTabs");function j5({queryEditor:e,variableEditor:t,headerEditor:n,responseEditor:r}){return k.useCallback(({query:o,variables:i,headers:s,response:l})=>{e==null||e.setValue(o??""),t==null||t.setValue(i??""),n==null||n.setValue(s??""),r==null||r.setValue(l??"")},[n,e,r,t])}fe(j5,"useSetEditorValues");function AT({query:e=null,variables:t=null,headers:n=null}={}){return{id:IT(),hash:Xp({query:e,variables:t,headers:n}),title:e&&H0(e)||LT,query:e,variables:t,headers:n,operationName:null,response:null}}fe(AT,"createTab");function DT(e,t){return{...e,tabs:e.tabs.map((n,r)=>{if(r!==e.activeTabIndex)return n;const o={...n,...t};return{...o,hash:Xp(o),title:o.operationName||(o.query?H0(o.query):void 0)||LT}})}}fe(DT,"setPropertiesInActiveTab");function IT(){const e=fe(()=>Math.floor((1+Math.random())*65536).toString(16).slice(1),"s4");return`${e()}${e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}fe(IT,"guid");function Xp(e){return[e.query??"",e.variables??"",e.headers??""].join("|")}fe(Xp,"hashFromTabContents");function H0(e){const t=/^(?!#).*(query|subscription|mutation)\s+([a-zA-Z0-9_]+)/m.exec(e);return(t==null?void 0:t[2])??null}fe(H0,"fuzzyExtractOperationName");function U5(e){const t=e==null?void 0:e.get(Zp);if(t){const n=JSON.parse(t);e==null||e.set(Zp,JSON.stringify(n,(r,o)=>r==="headers"?null:o))}}fe(U5,"clearHeadersFromTabs");const LT="<untitled>",Zp="tabState";function cc({editorTheme:e=L0,keyMap:t=R0,onClickReference:n,onEdit:r,readOnly:o=!1}={},i){const{initialVariables:s,variableEditor:l,setVariableEditor:c}=Qn({nonNull:!0,caller:i||cc}),f=Yu(),d=lc({caller:i||cc}),g=Ku({caller:i||cc}),m=k.useRef(null),v=k.useRef();return k.useEffect(()=>{let b=!0;return Qu([Promise.resolve().then(()=>oue),Promise.resolve().then(()=>sue),Promise.resolve().then(()=>fue)]).then(w=>{if(!b)return;v.current=w;const N=m.current;if(!N)return;const S=w(N,{value:s,lineNumbers:!0,tabSize:2,mode:"graphql-variables",theme:e,autoCloseBrackets:!0,matchBrackets:!0,showCursorWhenSelecting:!0,readOnly:o?"nocursor":!1,foldGutter:!0,lint:{variableToType:void 0},hintOptions:{closeOnUnfocus:!1,completeSingle:!1,container:N,variableToType:void 0},gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:F0});S.addKeyMap({"Cmd-Space"(){S.showHint({completeSingle:!1,container:N})},"Ctrl-Space"(){S.showHint({completeSingle:!1,container:N})},"Alt-Space"(){S.showHint({completeSingle:!1,container:N})},"Shift-Space"(){S.showHint({completeSingle:!1,container:N})}}),S.on("keyup",(x,C)=>{const{code:E,key:_,shiftKey:I}=C,D=E.startsWith("Key"),A=!I&&E.startsWith("Digit");(D||A||_==="_"||_==='"')&&x.execCommand("autocomplete")}),c(S)}),()=>{b=!1}},[e,s,o,c]),Jp(l,"keyMap",t),kT(l,r,B5,"variables",cc),NT(l,n||null,cc),Di(l,["Cmd-Enter","Ctrl-Enter"],f==null?void 0:f.run),Di(l,["Shift-Ctrl-P"],g),Di(l,["Shift-Ctrl-M"],d),m}fe(cc,"useVariableEditor");const B5="variables",q5=Ba("EditorContext");function z5(e){const t=za(),[n,r]=k.useState(null),[o,i]=k.useState(null),[s,l]=k.useState(null),[c,f]=k.useState(null),[d,g]=k.useState(()=>{const Y=(t==null?void 0:t.get(RT))!==null;return e.shouldPersistHeaders!==!1&&Y?(t==null?void 0:t.get(RT))==="true":!!e.shouldPersistHeaders});Kp(n,e.headers),Kp(o,e.query),Kp(s,e.response),Kp(c,e.variables);const m=V5({storage:t,shouldPersistHeaders:d}),[v]=k.useState(()=>{const Y=e.query??(t==null?void 0:t.get(L5))??null,Q=e.variables??(t==null?void 0:t.get(B5))??null,K=e.headers??(t==null?void 0:t.get(z0))??null,Z=e.response??"",re=R5({query:Y,variables:Q,headers:K,defaultTabs:e.defaultTabs,defaultQuery:e.defaultQuery||woe,defaultHeaders:e.defaultHeaders,storage:t,shouldPersistHeaders:d});return m(re),{query:Y??(re.activeTabIndex===0?re.tabs[0].query:null)??"",variables:Q??"",headers:K??e.defaultHeaders??"",response:Z,tabState:re}}),[b,w]=k.useState(v.tabState),N=k.useCallback(Y=>{if(Y){t==null||t.set(z0,(n==null?void 0:n.getValue())??"");const Q=OT(b,!0);t==null||t.set(Zp,Q)}else t==null||t.set(z0,""),U5(t);g(Y),t==null||t.set(RT,Y.toString())},[t,b,n]),S=k.useRef();k.useEffect(()=>{const Y=!!e.shouldPersistHeaders;(S==null?void 0:S.current)!==Y&&(N(Y),S.current=Y)},[e.shouldPersistHeaders,N]);const x=$5({queryEditor:o,variableEditor:c,headerEditor:n,responseEditor:s}),C=j5({queryEditor:o,variableEditor:c,headerEditor:n,responseEditor:s}),{onTabChange:E,defaultHeaders:_,children:I}=e,D=k.useCallback(()=>{w(Y=>{const Q=x(Y),K={tabs:[...Q.tabs,AT({headers:_})],activeTabIndex:Q.tabs.length};return m(K),C(K.tabs[K.activeTabIndex]),E==null||E(K),K})},[_,E,C,m,x]),A=k.useCallback(Y=>{w(Q=>{const K={...Q,activeTabIndex:Y};return m(K),C(K.tabs[K.activeTabIndex]),E==null||E(K),K})},[E,C,m]),F=k.useCallback(Y=>{w(Q=>{const K=Q.tabs[Q.activeTabIndex],Z={tabs:Y,activeTabIndex:Y.indexOf(K)};return m(Z),C(Z.tabs[Z.activeTabIndex]),E==null||E(Z),Z})},[E,C,m]),$=k.useCallback(Y=>{w(Q=>{const K={tabs:Q.tabs.filter((Z,re)=>Y!==re),activeTabIndex:Math.max(Q.activeTabIndex-1,0)};return m(K),C(K.tabs[K.activeTabIndex]),E==null||E(K),K})},[E,C,m]),q=k.useCallback(Y=>{w(Q=>{const K=DT(Q,Y);return m(K),E==null||E(K),K})},[E,m]),{onEditOperationName:H}=e,z=k.useCallback(Y=>{o&&(o.operationName=Y,q({operationName:Y}),H==null||H(Y))},[H,o,q]),B=k.useMemo(()=>{const Y=new Map;if(Array.isArray(e.externalFragments))for(const Q of e.externalFragments)Y.set(Q.name.value,Q);else if(typeof e.externalFragments=="string")fn(rr(e.externalFragments,{}),{FragmentDefinition(Q){Y.set(Q.name.value,Q)}});else if(e.externalFragments)throw new Error("The `externalFragments` prop must either be a string that contains the fragment definitions in SDL or a list of FragmentDefinitionNode objects.");return Y},[e.externalFragments]),R=k.useMemo(()=>e.validationRules||[],[e.validationRules]),te=k.useMemo(()=>({...b,addTab:D,changeTab:A,moveTab:F,closeTab:$,updateActiveTabValues:q,headerEditor:n,queryEditor:o,responseEditor:s,variableEditor:c,setHeaderEditor:r,setQueryEditor:i,setResponseEditor:l,setVariableEditor:f,setOperationName:z,initialQuery:v.query,initialVariables:v.variables,initialHeaders:v.headers,initialResponse:v.response,externalFragments:B,validationRules:R,shouldPersistHeaders:d,setShouldPersistHeaders:N}),[b,D,A,F,$,q,n,o,s,c,z,v,B,R,d,N]);return W.jsx(q5.Provider,{value:te,children:I})}fe(z5,"EditorContextProvider");const Qn=qa(q5),RT="shouldPersistHeaders",woe=`# Welcome to GraphiQL
#
# GraphiQL is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
# {
# field(arg: "value") {
# subField
# }
# }
#
# Keyboard shortcuts:
#
# Prettify query: Shift-Ctrl-P (or press the prettify button)
#
# Merge fragments: Shift-Ctrl-M (or press the merge button)
#
# Run Query: Ctrl-Enter (or press the play button)
#
# Auto Complete: Ctrl-Space (or just start typing)
#
`;function W0({isHidden:e,...t}){const{headerEditor:n}=Qn({nonNull:!0,caller:W0}),r=Ju(t,W0);return k.useEffect(()=>{e||n==null||n.refresh()},[n,e]),W.jsx("div",{className:Gn("graphiql-editor",e&&"hidden"),ref:r})}fe(W0,"HeaderEditor");function G0(e){var t;const[n,r]=k.useState({width:null,height:null}),[o,i]=k.useState(null),s=k.useRef(null),l=(t=FT(e.token))==null?void 0:t.href;k.useEffect(()=>{if(s.current){if(!l){r({width:null,height:null}),i(null);return}fetch(l,{method:"HEAD"}).then(f=>{i(f.headers.get("Content-Type"))}).catch(()=>{i(null)})}},[l]);const c=n.width!==null&&n.height!==null?W.jsxs("div",{children:[n.width,"x",n.height,o===null?null:" "+o]}):null;return W.jsxs("div",{children:[W.jsx("img",{onLoad:()=>{var f,d;r({width:((f=s.current)==null?void 0:f.naturalWidth)??null,height:((d=s.current)==null?void 0:d.naturalHeight)??null})},ref:s,src:l}),c]})}fe(G0,"ImagePreview"),G0.shouldRender=fe(function(e){const t=FT(e);return t?H5(t):!1},"shouldRender");function FT(e){if(e.type!=="string")return;const t=e.string.slice(1).slice(0,-1).trim();try{const{location:n}=window;return new URL(t,n.protocol+"//"+n.host)}catch{return}}fe(FT,"tokenToURL");function H5(e){return/(bmp|gif|jpeg|jpg|png|svg)$/.test(e.pathname)}fe(H5,"isImageURL");function MT(e){const t=Ga(e,MT);return W.jsx("div",{className:"graphiql-editor",ref:t})}fe(MT,"QueryEditor");function Y0({responseTooltip:e,editorTheme:t=L0,keyMap:n=R0}={},r){const{fetchError:o,validationErrors:i}=Oi({nonNull:!0,caller:r||Y0}),{initialResponse:s,responseEditor:l,setResponseEditor:c}=Qn({nonNull:!0,caller:r||Y0}),f=k.useRef(null),d=k.useRef(e);return k.useEffect(()=>{d.current=e},[e]),k.useEffect(()=>{let g=!0;return Qu([Promise.resolve().then(()=>Q4).then(m=>m.f),Promise.resolve().then(()=>z4).then(m=>m.b),Promise.resolve().then(()=>r6).then(m=>m.d),Promise.resolve().then(()=>g6).then(m=>m.s),Promise.resolve().then(()=>t6).then(m=>m.s),Promise.resolve().then(()=>s6).then(m=>m.j),Promise.resolve().then(()=>c6).then(m=>m.s),Promise.resolve().then(()=>hue),Promise.resolve().then(()=>Hce)],{useCommonAddons:!1}).then(m=>{if(!g)return;const v=document.createElement("div");m.registerHelper("info","graphql-results",(N,S,x,C)=>{const E=[],_=d.current;return _&&E.push(W.jsx(_,{pos:C,token:N})),G0.shouldRender(N)&&E.push(W.jsx(G0,{token:N},"image-preview")),E.length?(dg.render(E,v),v):(dg.unmountComponentAtNode(v),null)});const b=f.current;if(!b)return;const w=m(b,{value:s,lineWrapping:!0,readOnly:!0,theme:t,mode:"graphql-results",foldGutter:!0,gutters:["CodeMirror-foldgutter"],info:!0,extraKeys:F0});c(w)}),()=>{g=!1}},[t,s,c]),Jp(l,"keyMap",n),k.useEffect(()=>{o&&(l==null||l.setValue(o)),i.length>0&&(l==null||l.setValue(op(i)))},[l,o,i]),f}fe(Y0,"useResponseEditor");function PT(e){const t=Y0(e,PT);return W.jsx("section",{className:"result-window","aria-label":"Result Window","aria-live":"polite","aria-atomic":"true",ref:t})}fe(PT,"ResponseEditor");function Q0({isHidden:e,...t}){const{variableEditor:n}=Qn({nonNull:!0,caller:Q0}),r=cc(t,Q0);return k.useEffect(()=>{n&&!e&&n.refresh()},[n,e]),W.jsx("div",{className:Gn("graphiql-editor",e&&"hidden"),ref:r})}fe(Q0,"VariableEditor");function $T({children:e,dangerouslyAssumeSchemaIsValid:t,defaultQuery:n,defaultHeaders:r,defaultTabs:o,externalFragments:i,fetcher:s,getDefaultFieldNames:l,headers:c,inputValueDeprecation:f,introspectionQueryName:d,maxHistoryLength:g,onEditOperationName:m,onSchemaChange:v,onTabChange:b,onTogglePluginVisibility:w,operationName:N,plugins:S,query:x,response:C,schema:E,schemaDescription:_,shouldPersistHeaders:I,storage:D,validationRules:A,variables:F,visiblePlugin:$}){return W.jsx(W3,{storage:D,children:W.jsx(r5,{maxHistoryLength:g,children:W.jsx(z5,{defaultQuery:n,defaultHeaders:r,defaultTabs:o,externalFragments:i,headers:c,onEditOperationName:m,onTabChange:b,query:x,response:C,shouldPersistHeaders:I,validationRules:A,variables:F,children:W.jsx(bT,{dangerouslyAssumeSchemaIsValid:t,fetcher:s,inputValueDeprecation:f,introspectionQueryName:d,onSchemaChange:v,schema:E,schemaDescription:_,children:W.jsx(I0,{getDefaultFieldNames:l,fetcher:s,operationName:N,children:W.jsx(ET,{children:W.jsx(C5,{onTogglePluginVisibility:w,plugins:S,visiblePlugin:$,children:e})})})})})})})}fe($T,"GraphiQLProvider");function W5(){const e=za(),[t,n]=k.useState(()=>{if(!e)return null;const o=e.get(VT);switch(o){case"light":return"light";case"dark":return"dark";default:return typeof o=="string"&&e.set(VT,""),null}});k.useLayoutEffect(()=>{typeof window>"u"||(document.body.classList.remove("graphiql-light","graphiql-dark"),t&&document.body.classList.add(`graphiql-${t}`))},[t]);const r=k.useCallback(o=>{e==null||e.set(VT,o||""),n(o)},[e]);return k.useMemo(()=>({theme:t,setTheme:r}),[t,r])}fe(W5,"useTheme");const VT="theme";function K0({defaultSizeRelation:e=xoe,direction:t,initiallyHidden:n,onHiddenElementChange:r,sizeThresholdFirst:o=100,sizeThresholdSecond:i=100,storageKey:s}){const l=za(),c=k.useMemo(()=>ac(500,x=>{s&&(l==null||l.set(s,x))}),[l,s]),[f,d]=k.useState(()=>{const x=s&&(l==null?void 0:l.get(s));return x===J0||n==="first"?"first":x===X0||n==="second"?"second":null}),g=k.useCallback(x=>{x!==f&&(d(x),r==null||r(x))},[f,r]),m=k.useRef(null),v=k.useRef(null),b=k.useRef(null),w=k.useRef(`${e}`);k.useLayoutEffect(()=>{const x=s&&(l==null?void 0:l.get(s))||w.current;m.current&&(m.current.style.display="flex",m.current.style.flex=x===J0||x===X0?w.current:x),b.current&&(b.current.style.display="flex",b.current.style.flex="1"),v.current&&(v.current.style.display="flex")},[t,l,s]);const N=k.useCallback(x=>{const C=x==="first"?m.current:b.current;if(C&&(C.style.left="-1000px",C.style.position="absolute",C.style.opacity="0",C.style.height="500px",C.style.width="500px",m.current)){const E=parseFloat(m.current.style.flex);(!Number.isFinite(E)||E<1)&&(m.current.style.flex="1")}},[]),S=k.useCallback(x=>{const C=x==="first"?m.current:b.current;if(C&&(C.style.width="",C.style.height="",C.style.opacity="",C.style.position="",C.style.left="",l&&s)){const E=l.get(s);m.current&&E!==J0&&E!==X0&&(m.current.style.flex=E||w.current)}},[l,s]);return k.useLayoutEffect(()=>{f==="first"?N("first"):S("first"),f==="second"?N("second"):S("second")},[f,N,S]),k.useEffect(()=>{if(!v.current||!m.current||!b.current)return;const x=v.current,C=m.current,E=C.parentElement,_=t==="horizontal"?"clientX":"clientY",I=t==="horizontal"?"left":"top",D=t==="horizontal"?"right":"bottom",A=t==="horizontal"?"clientWidth":"clientHeight";function F(q){q.preventDefault();const H=q[_]-x.getBoundingClientRect()[I];function z(R){if(R.buttons===0)return B();const te=R[_]-E.getBoundingClientRect()[I]-H,Y=E.getBoundingClientRect()[D]-R[_]+H-x[A];if(te<o)g("first"),c(J0);else if(Y<i)g("second"),c(X0);else{g(null);const Q=`${te/Y}`;C.style.flex=Q,c(Q)}}fe(z,"handleMouseMove");function B(){document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",B)}fe(B,"handleMouseUp"),document.addEventListener("mousemove",z),document.addEventListener("mouseup",B)}fe(F,"handleMouseDown"),x.addEventListener("mousedown",F);function $(){m.current&&(m.current.style.flex=w.current),c(w.current),g(null)}return fe($,"reset"),x.addEventListener("dblclick",$),()=>{x.removeEventListener("mousedown",F),x.removeEventListener("dblclick",$)}},[t,g,o,i,c]),k.useMemo(()=>({dragBarRef:v,hiddenElement:f,firstRef:m,setHiddenElement:d,secondRef:b}),[f,d])}fe(K0,"useDragResize");const xoe=1,J0="hide-first",X0="hide-second",Z0=k.forwardRef(({label:e,onClick:t,...n},r)=>{const[o,i]=k.useState(null),s=k.useCallback(l=>{try{t==null||t(l),i(null)}catch(c){i(c instanceof Error?c:new Error(`Toolbar button click failed: ${c}`))}},[t]);return W.jsx(Tr,{label:e,children:W.jsx(jn,{...n,ref:r,type:"button",className:Gn("graphiql-toolbar-button",o&&"error",n.className),onClick:s,"aria-label":o?o.message:e,"aria-invalid":o?"true":n["aria-invalid"]})})});Z0.displayName="ToolbarButton";function ey(){const{queryEditor:e,setOperationName:t}=Qn({nonNull:!0,caller:ey}),{isFetching:n,isSubscribed:r,operationName:o,run:i,stop:s}=Yu({nonNull:!0,caller:ey}),l=(e==null?void 0:e.operations)||[],c=l.length>1&&typeof o!="string",f=n||r,d=`${f?"Stop":"Execute"} query (Ctrl-Enter)`,g={type:"button",className:"graphiql-execute-button",children:f?W.jsx(coe,{}):W.jsx(toe,{}),"aria-label":d};return c&&!f?W.jsxs(Ha,{children:[W.jsx(Tr,{label:d,children:W.jsx(Ha.Button,{...g})}),W.jsx(Ha.Content,{children:l.map((m,v)=>{const b=m.name?m.name.value:`<Unnamed ${m.operation}>`;return W.jsx(Ha.Item,{onSelect:()=>{var w;const N=(w=m.name)==null?void 0:w.value;e&&N&&N!==e.operationName&&t(N),i()},children:b},`${b}-${v}`)})})]}):W.jsx(Tr,{label:d,children:W.jsx("button",{...g,onClick:()=>{f?s():i()}})})}fe(ey,"ExecuteButton"),Hp(fe(({button:e,children:t,label:n,...r})=>W.jsxs(Ha,{...r,children:[W.jsx(Tr,{label:n,children:W.jsx(Ha.Button,{className:Gn("graphiql-un-styled graphiql-toolbar-menu",r.className),"aria-label":n,children:e})}),W.jsx(Ha.Content,{children:t})]}),"ToolbarMenuRoot"),{Item:Ha.Item});var ty={},ny={};const Soe=W8(QB);Object.defineProperty(ny,"__esModule",{value:!0});var Toe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G5=function(){function e(t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var l=t[Symbol.iterator](),c;!(o=(c=l.next()).done)&&(r.push(c.value),!(n&&r.length===n));o=!0);}catch(f){i=!0,s=f}finally{try{!o&&l.return&&l.return()}finally{if(i)throw s}}return r}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ii=function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();ny.defaultValue=UT;var Coe=k,Ee=koe(Coe),rt=Soe;function koe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function Y5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ko(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function Ri(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function jT(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Noe={keyword:"#B11A04",def:"#D2054E",property:"#1F61A0",qualifier:"#1C92A9",attribute:"#8B2BB9",number:"#2882F9",string:"#D64292",builtin:"#D47509",string2:"#0B7FC7",variable:"#397D13",atom:"#CA9800"},_oe=Ee.createElement("svg",{width:"12",height:"9"},Ee.createElement("path",{fill:"#666",d:"M 0 2 L 9 2 L 4.5 7.5 z"})),Ooe=Ee.createElement("svg",{width:"12",height:"9"},Ee.createElement("path",{fill:"#666",d:"M 0 0 L 0 9 L 5.5 4.5 z"})),Aoe=Ee.createElement("svg",{style:{marginRight:"3px",marginLeft:"-3px"},width:"12",height:"12",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ee.createElement("path",{d:"M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0ZM16 16H2V2H16V16ZM14.99 6L13.58 4.58L6.99 11.17L4.41 8.6L2.99 10.01L6.99 14L14.99 6Z",fill:"#666"})),Doe=Ee.createElement("svg",{style:{marginRight:"3px",marginLeft:"-3px"},width:"12",height:"12",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ee.createElement("path",{d:"M16 2V16H2V2H16ZM16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z",fill:"#CCC"}));function ry(e){return e.checked?e.styleConfig.checkboxChecked:e.styleConfig.checkboxUnchecked}function Q5(e){var t=e.getFields();if(t.id){var n=["id"];return t.email?n.push("email"):t.name&&n.push("name"),n}if(t.edges)return["edges"];if(t.node)return["node"];if(t.nodes)return["nodes"];var r=[];return Object.keys(t).forEach(function(o){(0,rt.isLeafType)(t[o].type)&&r.push(o)}),r.length?r.slice(0,2):["__typename"]}function K5(e){return(0,rt.isNonNullType)(e.type)&&e.defaultValue===void 0}function Ioe(e){for(var t=e;(0,rt.isWrappingType)(t);)t=t.ofType;return t}function Ya(e){for(var t=e;(0,rt.isWrappingType)(t);)t=t.ofType;return t}function J5(e,t){if(typeof t!="string"&&t.kind==="VariableDefinition")return t.variable;if((0,rt.isScalarType)(e))try{switch(e.name){case"String":return{kind:"StringValue",value:String(e.parseValue(t))};case"Float":return{kind:"FloatValue",value:String(e.parseValue(parseFloat(t)))};case"Int":return{kind:"IntValue",value:String(e.parseValue(parseInt(t,10)))};case"Boolean":try{var n=JSON.parse(t);return typeof n=="boolean"?{kind:"BooleanValue",value:n}:{kind:"BooleanValue",value:!1}}catch{return{kind:"BooleanValue",value:!1}}default:return{kind:"StringValue",value:String(e.parseValue(t))}}}catch(o){return console.error("error coercing arg value",o,t),{kind:"StringValue",value:t}}else try{var r=e.parseValue(t);return r?{kind:"EnumValue",value:String(r)}:{kind:"EnumValue",value:e.getValues()[0].name}}catch{return{kind:"EnumValue",value:e.getValues()[0].name}}}var Loe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._getArgSelection=function(){return o.props.selection.fields.find(function(f){return f.name.value===o.props.arg.name})},o._removeArg=function(){var f=o.props.selection,d=o._getArgSelection();o._previousArgSelection=d,o.props.modifyFields(f.fields.filter(function(g){return g!==d}),!0)},o._addArg=function(){var f=o.props,d=f.selection,g=f.arg,m=f.getDefaultScalarArgValue,v=f.parentField,b=f.makeDefaultArg,w=Ya(g.type),N=null;if(o._previousArgSelection)N=o._previousArgSelection;else if((0,rt.isInputObjectType)(w)){var S=w.getFields();N={kind:"ObjectField",name:{kind:"Name",value:g.name},value:{kind:"ObjectValue",fields:oy(m,b,v,Object.keys(S).map(function(x){return S[x]}))}}}else(0,rt.isLeafType)(w)&&(N={kind:"ObjectField",name:{kind:"Name",value:g.name},value:m(v,g,w)});if(!N)console.error("Unable to add arg for argType",w);else return o.props.modifyFields([].concat(Ko(d.fields||[]),[N]),!0)},o._setArgValue=function(f,d){var g=!1,m=!1,v=!1;try{f.kind==="VariableDefinition"?m=!0:f===null||typeof f>"u"?g=!0:typeof f.kind=="string"&&(v=!0)}catch{}var b=o.props.selection,w=o._getArgSelection();if(!w){console.error("missing arg selection when setting arg value");return}var N=Ya(o.props.arg.type),S=(0,rt.isLeafType)(N)||m||g||v;if(!S){console.warn("Unable to handle non leaf types in InputArgView.setArgValue",f);return}var x=void 0,C=void 0;f===null||typeof f>"u"?C=null:!f.target&&f.kind&&f.kind==="VariableDefinition"?(x=f,C=x.variable):typeof f.kind=="string"?C=f:f.target&&typeof f.target.value=="string"&&(x=f.target.value,C=J5(N,x));var E=o.props.modifyFields((b.fields||[]).map(function(_){var I=_===w,D=I?Ct({},_,{value:C}):_;return D}),d);return E},o._modifyChildFields=function(f){return o.props.modifyFields(o.props.selection.fields.map(function(d){return d.name.value===o.props.arg.name?Ct({},d,{value:{kind:"ObjectValue",fields:f}}):d}),!0)},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this.props,o=r.arg,i=r.parentField,s=this._getArgSelection();return Ee.createElement(Z5,{argValue:s?s.value:null,arg:o,parentField:i,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._modifyChildFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),t}(Ee.PureComponent);function UT(e){if((0,rt.isEnumType)(e))return{kind:"EnumValue",value:e.getValues()[0].name};switch(e.name){case"String":return{kind:"StringValue",value:""};case"Float":return{kind:"FloatValue",value:"1.5"};case"Int":return{kind:"IntValue",value:"10"};case"Boolean":return{kind:"BooleanValue",value:!1};default:return{kind:"StringValue",value:""}}}function X5(e,t,n){return UT(n)}var Roe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._getArgSelection=function(){var f=o.props.selection;return(f.arguments||[]).find(function(d){return d.name.value===o.props.arg.name})},o._removeArg=function(f){var d=o.props.selection,g=o._getArgSelection();return o._previousArgSelection=g,o.props.modifyArguments((d.arguments||[]).filter(function(m){return m!==g}),f)},o._addArg=function(f){var d=o.props,g=d.selection,m=d.getDefaultScalarArgValue,v=d.makeDefaultArg,b=d.parentField,w=d.arg,N=Ya(w.type),S=null;if(o._previousArgSelection)S=o._previousArgSelection;else if((0,rt.isInputObjectType)(N)){var x=N.getFields();S={kind:"Argument",name:{kind:"Name",value:w.name},value:{kind:"ObjectValue",fields:oy(m,v,b,Object.keys(x).map(function(C){return x[C]}))}}}else(0,rt.isLeafType)(N)&&(S={kind:"Argument",name:{kind:"Name",value:w.name},value:m(b,w,N)});return S?o.props.modifyArguments([].concat(Ko(g.arguments||[]),[S]),f):(console.error("Unable to add arg for argType",N),null)},o._setArgValue=function(f,d){var g=!1,m=!1,v=!1;try{f.kind==="VariableDefinition"?m=!0:f===null||typeof f>"u"?g=!0:typeof f.kind=="string"&&(v=!0)}catch{}var b=o.props.selection,w=o._getArgSelection();if(!w&&!m){console.error("missing arg selection when setting arg value");return}var N=Ya(o.props.arg.type),S=(0,rt.isLeafType)(N)||m||g||v;if(!S){console.warn("Unable to handle non leaf types in ArgView._setArgValue");return}var x=void 0,C=void 0;return f===null||typeof f>"u"?C=null:f.target&&typeof f.target.value=="string"?(x=f.target.value,C=J5(N,x)):!f.target&&f.kind==="VariableDefinition"?(x=f,C=x.variable):typeof f.kind=="string"&&(C=f),o.props.modifyArguments((b.arguments||[]).map(function(E){return E===w?Ct({},E,{value:C}):E}),d)},o._setArgFields=function(f,d){var g=o.props.selection,m=o._getArgSelection();if(!m){console.error("missing arg selection when setting arg value");return}return o.props.modifyArguments((g.arguments||[]).map(function(v){return v===m?Ct({},v,{value:{kind:"ObjectValue",fields:f}}):v}),d)},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this.props,o=r.arg,i=r.parentField,s=this._getArgSelection();return Ee.createElement(Z5,{argValue:s?s.value:null,arg:o,parentField:i,addArg:this._addArg,removeArg:this._removeArg,setArgFields:this._setArgFields,setArgValue:this._setArgValue,getDefaultScalarArgValue:this.props.getDefaultScalarArgValue,makeDefaultArg:this.props.makeDefaultArg,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig,onCommit:this.props.onCommit,definition:this.props.definition})}}]),t}(Ee.PureComponent);function Foe(e){return e.ctrlKey&&e.key==="Enter"}function Moe(e){return e!=="FragmentDefinition"}var Poe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._handleChange=function(f){o.props.setArgValue(f,!0)},r),yn(o,i)}return Ii(t,[{key:"componentDidMount",value:function(){var r=this._ref,o=document.activeElement;r&&o&&!(o instanceof HTMLTextAreaElement)&&(r.focus(),r.setSelectionRange(0,r.value.length))}},{key:"render",value:function(){var r=this,o=this.props,i=o.arg,s=o.argValue,l=o.styleConfig,c=Ya(i.type),f=typeof s.value=="string"?s.value:"",d=this.props.argValue.kind==="StringValue"?l.colors.string:l.colors.number;return Ee.createElement("span",{style:{color:d}},c.name==="String"?'"':"",Ee.createElement("input",{style:{border:"none",borderBottom:"1px solid #888",outline:"none",width:Math.max(1,Math.min(15,f.length))+"ch",color:d},ref:function(m){r._ref=m},type:"text",onChange:this._handleChange,value:f}),c.name==="String"?'"':"")}}]),t}(Ee.PureComponent),Z5=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={displayArgActions:!1},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.argValue,s=o.arg,l=o.styleConfig,c=Ya(s.type),f=null;if(i){if(i.kind==="Variable")f=Ee.createElement("span",{style:{color:l.colors.variable}},"$",i.name.value);else if((0,rt.isScalarType)(c))c.name==="Boolean"?f=Ee.createElement("select",{style:{color:l.colors.builtin},onChange:this.props.setArgValue,value:i.kind==="BooleanValue"?i.value:void 0},Ee.createElement("option",{key:"true",value:"true"},"true"),Ee.createElement("option",{key:"false",value:"false"},"false")):f=Ee.createElement(Poe,{setArgValue:this.props.setArgValue,arg:s,argValue:i,onRunOperation:this.props.onRunOperation,styleConfig:this.props.styleConfig});else if((0,rt.isEnumType)(c))i.kind==="EnumValue"?f=Ee.createElement("select",{style:{backgroundColor:"white",color:l.colors.string2},onChange:this.props.setArgValue,value:i.value},c.getValues().map(function(w){return Ee.createElement("option",{key:w.name,value:w.name},w.name)})):console.error("arg mismatch between arg and selection",c,i);else if((0,rt.isInputObjectType)(c))if(i.kind==="ObjectValue"){var d=c.getFields();f=Ee.createElement("div",{style:{marginLeft:16}},Object.keys(d).sort().map(function(w){return Ee.createElement(Loe,{key:w,arg:d[w],parentField:r.props.parentField,selection:i,modifyFields:r.props.setArgFields,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit,definition:r.props.definition})}))}else console.error("arg mismatch between arg and selection",c,i)}var g=function(){var N=s.name,S=(r.props.definition.variableDefinitions||[]).filter(function(Z){return Z.variable.name.value.startsWith(N)}).length,x=void 0;S>0?x=""+N+S:x=N;var C=s.type.toString(),E=(0,rt.parseType)(C),_={kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:x}},type:E,directives:[]},I=function(re){return(r.props.definition.variableDefinitions||[]).find(function(J){return J.variable.name.value===re})},D=void 0,A={};if(typeof i<"u"&&i!==null){var F=(0,rt.visit)(i,{Variable:function(re){var J=re.name.value,ie=I(J);if(A[J]=A[J]+1||1,!!ie)return ie.defaultValue}}),$=_.type.kind==="NonNullType",q=$?Ct({},_,{type:_.type.type}):_;D=Ct({},q,{defaultValue:F})}else D=_;var H=Object.entries(A).filter(function(Z){var re=G5(Z,2);re[0];var J=re[1];return J<2}).map(function(Z){var re=G5(Z,2),J=re[0];return re[1],J});if(D){var z=r.props.setArgValue(D,!1);if(z){var B=z.definitions.find(function(Z){return Z.operation&&Z.name&&Z.name.value&&r.props.definition.name&&r.props.definition.name.value?Z.name.value===r.props.definition.name.value:!1}),R=[].concat(Ko(B.variableDefinitions||[]),[D]).filter(function(Z){return H.indexOf(Z.variable.name.value)===-1}),te=Ct({},B,{variableDefinitions:R}),Y=z.definitions,Q=Y.map(function(Z){return B===Z?te:Z}),K=Ct({},z,{definitions:Q});r.props.onCommit(K)}}},m=function(){if(!(!i||!i.name||!i.name.value)){var N=i.name.value,S=(r.props.definition.variableDefinitions||[]).find(function(q){return q.variable.name.value===N});if(S){var x=S.defaultValue,C=r.props.setArgValue(x,{commit:!1});if(C){var E=C.definitions.find(function(q){return q.name.value===r.props.definition.name.value});if(!E)return;var _=0;(0,rt.visit)(E,{Variable:function(H){H.name.value===N&&(_=_+1)}});var I=E.variableDefinitions||[];_<2&&(I=I.filter(function(q){return q.variable.name.value!==N}));var D=Ct({},E,{variableDefinitions:I}),A=C.definitions,F=A.map(function(q){return E===q?D:q}),$=Ct({},C,{definitions:F});r.props.onCommit($)}}}},v=i&&i.kind==="Variable",b=this.state.displayArgActions?Ee.createElement("button",{type:"submit",className:"toolbar-button",title:v?"Remove the variable":"Extract the current value into a GraphQL variable",onClick:function(N){N.preventDefault(),N.stopPropagation(),v?m():g()},style:l.styles.actionButtonStyle},Ee.createElement("span",{style:{color:l.colors.variable}},"$")):null;return Ee.createElement("div",{style:{cursor:"pointer",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-arg-name":s.name,"data-arg-type":c.name,className:"graphiql-explorer-"+s.name},Ee.createElement("span",{style:{cursor:"pointer"},onClick:function(N){var S=!i;S?r.props.addArg(!0):r.props.removeArg(!0),r.setState({displayArgActions:S})}},(0,rt.isInputObjectType)(c)?Ee.createElement("span",null,i?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):Ee.createElement(ry,{checked:!!i,styleConfig:this.props.styleConfig}),Ee.createElement("span",{style:{color:l.colors.attribute},title:s.description,onMouseEnter:function(){i!==null&&typeof i<"u"&&r.setState({displayArgActions:!0})},onMouseLeave:function(){return r.setState({displayArgActions:!1})}},s.name,K5(s)?"*":"",": ",b," ")," "),f||Ee.createElement("span",null)," ")}}]),t}(Ee.PureComponent),$oe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._addFragment=function(){o.props.modifySelections([].concat(Ko(o.props.selections),[o._previousSelection||{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:o.props.implementingType.name}},selectionSet:{kind:"SelectionSet",selections:o.props.getDefaultFieldNames(o.props.implementingType).map(function(f){return{kind:"Field",name:{kind:"Name",value:f}}})}}]))},o._removeFragment=function(){var f=o._getSelection();o._previousSelection=f,o.props.modifySelections(o.props.selections.filter(function(d){return d!==f}))},o._getSelection=function(){var f=o.props.selections.find(function(d){return d.kind==="InlineFragment"&&d.typeCondition&&o.props.implementingType.name===d.typeCondition.name.value});if(!f)return null;if(f.kind==="InlineFragment")return f},o._modifyChildSelections=function(f,d){var g=o._getSelection();return o.props.modifySelections(o.props.selections.map(function(m){return m===g?{directives:m.directives,kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:o.props.implementingType.name}},selectionSet:{kind:"SelectionSet",selections:f}}:m}),d)},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.implementingType,s=o.schema,l=o.getDefaultFieldNames,c=o.styleConfig,f=this._getSelection(),d=i.getFields(),g=f?f.selectionSet?f.selectionSet.selections:[]:[];return Ee.createElement("div",{className:"graphiql-explorer-"+i.name},Ee.createElement("span",{style:{cursor:"pointer"},onClick:f?this._removeFragment:this._addFragment},Ee.createElement(ry,{checked:!!f,styleConfig:this.props.styleConfig}),Ee.createElement("span",{style:{color:c.colors.atom}},this.props.implementingType.name)),f?Ee.createElement("div",{style:{marginLeft:16}},Object.keys(d).sort().map(function(m){return Ee.createElement(t$,{key:m,field:d[m],selections:g,modifySelections:r._modifyChildSelections,schema:s,getDefaultFieldNames:l,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,onCommit:r.props.onCommit,styleConfig:r.props.styleConfig,definition:r.props.definition,availableFragments:r.props.availableFragments})})):null)}}]),t}(Ee.PureComponent),Voe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o._addFragment=function(){o.props.modifySelections([].concat(Ko(o.props.selections),[o._previousSelection||{kind:"FragmentSpread",name:o.props.fragment.name}]))},o._removeFragment=function(){var f=o._getSelection();o._previousSelection=f,o.props.modifySelections(o.props.selections.filter(function(d){var g=d.kind==="FragmentSpread"&&d.name.value===o.props.fragment.name.value;return!g}))},o._getSelection=function(){var f=o.props.selections.find(function(d){return d.kind==="FragmentSpread"&&d.name.value===o.props.fragment.name.value});return f},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this.props.styleConfig,o=this._getSelection();return Ee.createElement("div",{className:"graphiql-explorer-"+this.props.fragment.name.value},Ee.createElement("span",{style:{cursor:"pointer"},onClick:o?this._removeFragment:this._addFragment},Ee.createElement(ry,{checked:!!o,styleConfig:this.props.styleConfig}),Ee.createElement("span",{style:{color:r.colors.def},className:"graphiql-explorer-"+this.props.fragment.name.value},this.props.fragment.name.value)))}}]),t}(Ee.PureComponent);function oy(e,t,n,r){var o=[],i=!0,s=!1,l=void 0;try{for(var c=r[Symbol.iterator](),f;!(i=(f=c.next()).done);i=!0){var d=f.value;if((0,rt.isRequiredInputField)(d)||t&&t(n,d)){var g=Ya(d.type);(0,rt.isInputObjectType)(g)?function(){var m=g.getFields();o.push({kind:"ObjectField",name:{kind:"Name",value:d.name},value:{kind:"ObjectValue",fields:oy(e,t,n,Object.keys(m).map(function(v){return m[v]}))}})}():(0,rt.isLeafType)(g)&&o.push({kind:"ObjectField",name:{kind:"Name",value:d.name},value:e(n,d,g)})}}}catch(m){s=!0,l=m}finally{try{!i&&c.return&&c.return()}finally{if(s)throw l}}return o}function e$(e,t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var l=n.args[Symbol.iterator](),c;!(o=(c=l.next()).done);o=!0){var f=c.value;if(K5(f)||t&&t(n,f)){var d=Ya(f.type);(0,rt.isInputObjectType)(d)?function(){var g=d.getFields();r.push({kind:"Argument",name:{kind:"Name",value:f.name},value:{kind:"ObjectValue",fields:oy(e,t,n,Object.keys(g).map(function(m){return g[m]}))}})}():(0,rt.isLeafType)(d)&&r.push({kind:"Argument",name:{kind:"Name",value:f.name},value:e(n,f,d)})}}}catch(g){i=!0,s=g}finally{try{!o&&l.return&&l.return()}finally{if(i)throw s}}return r}var t$=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={displayFieldActions:!1},o._addAllFieldsToSelections=function(f){var d=f?Object.keys(f).map(function(v){return{kind:"Field",name:{kind:"Name",value:v},arguments:[]}}):[],g={kind:"SelectionSet",selections:d},m=[].concat(Ko(o.props.selections.filter(function(v){return v.kind==="InlineFragment"?!0:v.name.value!==o.props.field.name})),[{kind:"Field",name:{kind:"Name",value:o.props.field.name},arguments:e$(o.props.getDefaultScalarArgValue,o.props.makeDefaultArg,o.props.field),selectionSet:g}]);o.props.modifySelections(m)},o._addFieldToSelections=function(f){var d=[].concat(Ko(o.props.selections),[o._previousSelection||{kind:"Field",name:{kind:"Name",value:o.props.field.name},arguments:e$(o.props.getDefaultScalarArgValue,o.props.makeDefaultArg,o.props.field)}]);o.props.modifySelections(d)},o._handleUpdateSelections=function(f){var d=o._getSelection();if(d&&!f.altKey)o._removeFieldFromSelections();else{var g=(0,rt.getNamedType)(o.props.field.type),m=(0,rt.isObjectType)(g)&&g.getFields(),v=!!m&&f.altKey;v?o._addAllFieldsToSelections(m):o._addFieldToSelections(m)}},o._removeFieldFromSelections=function(){var f=o._getSelection();o._previousSelection=f,o.props.modifySelections(o.props.selections.filter(function(d){return d!==f}))},o._getSelection=function(){var f=o.props.selections.find(function(d){return d.kind==="Field"&&o.props.field.name===d.name.value});if(!f)return null;if(f.kind==="Field")return f},o._setArguments=function(f,d){var g=o._getSelection();if(!g){console.error("Missing selection when setting arguments",f);return}return o.props.modifySelections(o.props.selections.map(function(m){return m===g?{alias:g.alias,arguments:f,directives:g.directives,kind:"Field",name:g.name,selectionSet:g.selectionSet}:m}),d)},o._modifyChildSelections=function(f,d){return o.props.modifySelections(o.props.selections.map(function(g){if(g.kind==="Field"&&o.props.field.name===g.name.value){if(g.kind!=="Field")throw new Error("invalid selection");return{alias:g.alias,arguments:g.arguments,directives:g.directives,kind:"Field",name:g.name,selectionSet:{kind:"SelectionSet",selections:f}}}return g}),d)},r),yn(o,i)}return Ii(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.field,s=o.schema,l=o.getDefaultFieldNames,c=o.styleConfig,f=this._getSelection(),d=Ioe(i.type),g=i.args.sort(function(S,x){return S.name.localeCompare(x.name)}),m="graphiql-explorer-node graphiql-explorer-"+i.name;i.isDeprecated&&(m+=" graphiql-explorer-deprecated");var v=(0,rt.isObjectType)(d)||(0,rt.isInterfaceType)(d)||(0,rt.isUnionType)(d)?this.props.availableFragments&&this.props.availableFragments[d.name]:null,b=Ee.createElement("div",{className:m},Ee.createElement("span",{title:i.description,style:{cursor:"pointer",display:"inline-flex",alignItems:"center",minHeight:"16px",WebkitUserSelect:"none",userSelect:"none"},"data-field-name":i.name,"data-field-type":d.name,onClick:this._handleUpdateSelections,onMouseEnter:function(){var x=(0,rt.isObjectType)(d)&&f&&f.selectionSet&&f.selectionSet.selections.filter(function(C){return C.kind!=="FragmentSpread"}).length>0;x&&r.setState({displayFieldActions:!0})},onMouseLeave:function(){return r.setState({displayFieldActions:!1})}},(0,rt.isObjectType)(d)?Ee.createElement("span",null,f?this.props.styleConfig.arrowOpen:this.props.styleConfig.arrowClosed):null,(0,rt.isObjectType)(d)?null:Ee.createElement(ry,{checked:!!f,styleConfig:this.props.styleConfig}),Ee.createElement("span",{style:{color:c.colors.property},className:"graphiql-explorer-field-view"},i.name),this.state.displayFieldActions?Ee.createElement("button",{type:"submit",className:"toolbar-button",title:"Extract selections into a new reusable fragment",onClick:function(x){x.preventDefault(),x.stopPropagation();var C=d.name,E=C+"Fragment",_=(v||[]).filter(function(q){return q.name.value.startsWith(E)}).length;_>0&&(E=""+E+_);var I=f?f.selectionSet?f.selectionSet.selections:[]:[],D=[{kind:"FragmentSpread",name:{kind:"Name",value:E},directives:[]}],A={kind:"FragmentDefinition",name:{kind:"Name",value:E},typeCondition:{kind:"NamedType",name:{kind:"Name",value:d.name}},directives:[],selectionSet:{kind:"SelectionSet",selections:I}},F=r._modifyChildSelections(D,!1);if(F){var $=Ct({},F,{definitions:[].concat(Ko(F.definitions),[A])});r.props.onCommit($)}else console.warn("Unable to complete extractFragment operation")},style:Ct({},c.styles.actionButtonStyle)},Ee.createElement("span",null,"…")):null),f&&g.length?Ee.createElement("div",{style:{marginLeft:16},className:"graphiql-explorer-graphql-arguments"},g.map(function(S){return Ee.createElement(Roe,{key:S.name,parentField:i,arg:S,selection:f,modifyArguments:r._setArguments,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit,definition:r.props.definition})})):null);if(f&&((0,rt.isObjectType)(d)||(0,rt.isInterfaceType)(d)||(0,rt.isUnionType)(d))){var w=(0,rt.isUnionType)(d)?{}:d.getFields(),N=f?f.selectionSet?f.selectionSet.selections:[]:[];return Ee.createElement("div",{className:"graphiql-explorer-"+i.name},b,Ee.createElement("div",{style:{marginLeft:16}},v?v.map(function(S){var x=s.getType(S.typeCondition.name.value),C=S.name.value;return x?Ee.createElement(Voe,{key:C,fragment:S,selections:N,modifySelections:r._modifyChildSelections,schema:s,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit}):null}):null,Object.keys(w).sort().map(function(S){return Ee.createElement(t,{key:S,field:w[S],selections:N,modifySelections:r._modifyChildSelections,schema:s,getDefaultFieldNames:l,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit,definition:r.props.definition,availableFragments:r.props.availableFragments})}),(0,rt.isInterfaceType)(d)||(0,rt.isUnionType)(d)?s.getPossibleTypes(d).map(function(S){return Ee.createElement($oe,{key:S.name,implementingType:S,selections:N,modifySelections:r._modifyChildSelections,schema:s,getDefaultFieldNames:l,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit,definition:r.props.definition})}):null))}return b}}]),t}(Ee.PureComponent);function joe(e){try{return e.trim()?(0,rt.parse)(e,{noLocation:!0}):null}catch(t){return new Error(t)}}var Uoe={kind:"OperationDefinition",operation:"query",variableDefinitions:[],name:{kind:"Name",value:"MyQuery"},directives:[],selectionSet:{kind:"SelectionSet",selections:[]}},iy={kind:"Document",definitions:[Uoe]},Zu=null;function Boe(e){if(Zu&&Zu[0]===e)return Zu[1];var t=joe(e);return t?t instanceof Error?Zu?Zu[1]:iy:(Zu=[e,t],t):iy}var n$={buttonStyle:{fontSize:"1.2em",padding:"0px",backgroundColor:"white",border:"none",margin:"5px 0px",height:"40px",width:"100%",display:"block",maxWidth:"none"},actionButtonStyle:{padding:"0px",backgroundColor:"white",border:"none",margin:"0px",maxWidth:"none",height:"15px",width:"15px",display:"inline-block",fontSize:"smaller"},explorerActionsStyle:{margin:"4px -8px -8px",paddingLeft:"8px",bottom:"0px",width:"100%",textAlign:"center",background:"none",borderTop:"none",borderBottom:"none"}},qoe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={newOperationType:"query",displayTitleActions:!1},o._modifySelections=function(f,d){var g=o.props.definition;g.selectionSet.selections.length===0&&o._previousOperationDef&&(g=o._previousOperationDef);var m=void 0;if(g.kind==="FragmentDefinition")m=Ct({},g,{selectionSet:Ct({},g.selectionSet,{selections:f})});else if(g.kind==="OperationDefinition"){var v=f.filter(function(b){return!(b.kind==="Field"&&b.name.value==="__typename")});v.length===0&&(v=[{kind:"Field",name:{kind:"Name",value:"__typename ## Placeholder value"}}]),m=Ct({},g,{selectionSet:Ct({},g.selectionSet,{selections:v})})}return o.props.onEdit(m,d)},o._onOperationRename=function(f){return o.props.onOperationRename(f.target.value)},o._handlePotentialRun=function(f){Foe(f)&&Moe(o.props.definition.kind)&&o.props.onRunOperation(o.props.name)},o._rootViewElId=function(){var f=o.props,d=f.operationType,g=f.name,m=d+"-"+(g||"unknown");return m},r),yn(o,i)}return Ii(t,[{key:"componentDidMount",value:function(){var r=this._rootViewElId();this.props.onMount(r)}},{key:"render",value:function(){var r=this,o=this.props,i=o.operationType,s=o.definition,l=o.schema,c=o.getDefaultFieldNames,f=o.styleConfig,d=this._rootViewElId(),g=this.props.fields||{},m=s,v=m.selectionSet.selections,b=this.props.name||jT(i)+" Name";return Ee.createElement("div",{id:d,tabIndex:"0",onKeyDown:this._handlePotentialRun,style:{borderBottom:this.props.isLast?"none":"1px solid #d6d6d6",marginBottom:"0em",paddingBottom:"1em"}},Ee.createElement("div",{style:{color:f.colors.keyword,paddingBottom:4},className:"graphiql-operation-title-bar",onMouseEnter:function(){return r.setState({displayTitleActions:!0})},onMouseLeave:function(){return r.setState({displayTitleActions:!1})}},i," ",Ee.createElement("span",{style:{color:f.colors.def}},Ee.createElement("input",{style:{color:f.colors.def,border:"none",borderBottom:"1px solid #888",outline:"none",width:Math.max(4,b.length)+"ch"},autoComplete:"false",placeholder:jT(i)+" Name",value:this.props.name,onKeyDown:this._handlePotentialRun,onChange:this._onOperationRename})),this.props.onTypeName?Ee.createElement("span",null,Ee.createElement("br",null),"on "+this.props.onTypeName):"",this.state.displayTitleActions?Ee.createElement(Ee.Fragment,null,Ee.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return r.props.onOperationDestroy()},style:Ct({},f.styles.actionButtonStyle)},Ee.createElement("span",null,"✕")),Ee.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return r.props.onOperationClone()},style:Ct({},f.styles.actionButtonStyle)},Ee.createElement("span",null,"⎘"))):""),Object.keys(g).sort().map(function(w){return Ee.createElement(t$,{key:w,field:g[w],selections:v,modifySelections:r._modifySelections,schema:l,getDefaultFieldNames:c,getDefaultScalarArgValue:r.props.getDefaultScalarArgValue,makeDefaultArg:r.props.makeDefaultArg,onRunOperation:r.props.onRunOperation,styleConfig:r.props.styleConfig,onCommit:r.props.onCommit,definition:r.props.definition,availableFragments:r.props.availableFragments})}))}}]),t}(Ee.PureComponent);function zoe(){return Ee.createElement("div",{style:{fontFamily:"sans-serif",display:"flex",flexDirection:"column",alignItems:"center",margin:"1em",marginTop:0,flexGrow:1,justifyContent:"flex-end"}},Ee.createElement("div",{style:{borderTop:"1px solid #d6d6d6",paddingTop:"1em",width:"100%",textAlign:"center"}},"GraphiQL Explorer by ",Ee.createElement("a",{href:"https://www.onegraph.com"},"OneGraph")),Ee.createElement("div",null,"Contribute on"," ",Ee.createElement("a",{href:"https://github.com/OneGraph/graphiql-explorer"},"GitHub")))}var r$=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={newOperationType:"query",operation:null,operationToScrollTo:null},o._resetScroll=function(){var f=o._ref;f&&(f.scrollLeft=0)},o._onEdit=function(f){return o.props.onEdit(f)},o._setAddOperationType=function(f){o.setState({newOperationType:f})},o._handleRootViewMount=function(f){if(o.state.operationToScrollTo&&o.state.operationToScrollTo===f){var d=".graphiql-explorer-root #"+f,g=document.querySelector(d);g&&g.scrollIntoView()}},r),yn(o,i)}return Ii(t,[{key:"componentDidMount",value:function(){this._resetScroll()}},{key:"render",value:function(){var r=this,o=this.props,i=o.schema,s=o.query,l=o.makeDefaultArg;if(!i)return Ee.createElement("div",{style:{fontFamily:"sans-serif"},className:"error-container"},"No Schema Available");var c={colors:this.props.colors||Noe,checkboxChecked:this.props.checkboxChecked||Aoe,checkboxUnchecked:this.props.checkboxUnchecked||Doe,arrowClosed:this.props.arrowClosed||Ooe,arrowOpen:this.props.arrowOpen||_oe,styles:this.props.styles?Ct({},n$,this.props.styles):n$},f=i.getQueryType(),d=i.getMutationType(),g=i.getSubscriptionType();if(!f&&!d&&!g)return Ee.createElement("div",null,"Missing query type");var m=f&&f.getFields(),v=d&&d.getFields(),b=g&&g.getFields(),w=Boe(s),N=this.props.getDefaultFieldNames||Q5,S=this.props.getDefaultScalarArgValue||X5,x=w.definitions,C=x.map(function(R){return R.kind==="FragmentDefinition"||R.kind==="OperationDefinition"?R:null}).filter(Boolean),E=C.length===0?iy.definitions:C,_=function(te,Y){var Q=Y==null||Y===""?null:{kind:"Name",value:Y,loc:void 0},K=Ct({},te,{name:Q}),Z=w.definitions,re=Z.map(function(J){return te===J?K:J});return Ct({},w,{definitions:re})},I=function(te){var Y=void 0;te.kind==="FragmentDefinition"?Y="fragment":Y=te.operation;var Q=(te.name&&te.name.value||"")+"Copy",K={kind:"Name",value:Q,loc:void 0},Z=Ct({},te,{name:K}),re=w.definitions,J=[].concat(Ko(re),[Z]);return r.setState({operationToScrollTo:Y+"-"+Q}),Ct({},w,{definitions:J})},D=function(te){var Y=w.definitions,Q=Y.filter(function(K){return te!==K});return Ct({},w,{definitions:Q})},A=function(te){var Y=w.definitions,Q=w.definitions.length===1&&w.definitions[0]===iy.definitions[0],K=Q?[]:Y.filter(function(le){return le.kind==="OperationDefinition"?le.operation===te:!1}),Z="My"+jT(te)+(K.length===0?"":K.length+1),re="__typename # Placeholder value",J={kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:re,loc:null},arguments:[],directives:[],selectionSet:null,loc:null}],loc:null},ie={kind:"OperationDefinition",operation:te,name:{kind:"Name",value:Z},variableDefinitions:[],directives:[],selectionSet:J,loc:null},ne=Q?[ie]:[].concat(Ko(w.definitions),[ie]),ae=Ct({},w,{definitions:ne});r.setState({operationToScrollTo:te+"-"+Z}),r.props.onEdit((0,rt.print)(ae))},F=[m?Ee.createElement("option",{key:"query",className:"toolbar-button",style:c.styles.buttonStyle,type:"link",value:"query"},"Query"):null,v?Ee.createElement("option",{key:"mutation",className:"toolbar-button",style:c.styles.buttonStyle,type:"link",value:"mutation"},"Mutation"):null,b?Ee.createElement("option",{key:"subscription",className:"toolbar-button",style:c.styles.buttonStyle,type:"link",value:"subscription"},"Subscription"):null].filter(Boolean),$=F.length===0||this.props.hideActions?null:Ee.createElement("div",{style:{minHeight:"50px",maxHeight:"50px",overflow:"none"}},Ee.createElement("form",{className:"variable-editor-title graphiql-explorer-actions",style:Ct({},c.styles.explorerActionsStyle,{display:"flex",flexDirection:"row",alignItems:"center",borderTop:"1px solid rgb(214, 214, 214)"}),onSubmit:function(te){return te.preventDefault()}},Ee.createElement("span",{style:{display:"inline-block",flexGrow:"0",textAlign:"right"}},"Add new"," "),Ee.createElement("select",{onChange:function(te){return r._setAddOperationType(te.target.value)},value:this.state.newOperationType,style:{flexGrow:"2"}},F),Ee.createElement("button",{type:"submit",className:"toolbar-button",onClick:function(){return r.state.newOperationType?A(r.state.newOperationType):null},style:Ct({},c.styles.buttonStyle,{height:"22px",width:"22px"})},Ee.createElement("span",null,"+")))),q=this.props.externalFragments&&this.props.externalFragments.reduce(function(R,te){if(te.kind==="FragmentDefinition"){var Y=te.typeCondition.name.value,Q=R[Y]||[],K=[].concat(Ko(Q),[te]).sort(function(Z,re){return Z.name.value.localeCompare(re.name.value)});return Ct({},R,Y5({},Y,K))}return R},{}),H=E.reduce(function(R,te){if(te.kind==="FragmentDefinition"){var Y=te.typeCondition.name.value,Q=R[Y]||[],K=[].concat(Ko(Q),[te]).sort(function(Z,re){return Z.name.value.localeCompare(re.name.value)});return Ct({},R,Y5({},Y,K))}return R},{}),z=Ct({},H,q),B=this.props.showAttribution?Ee.createElement(zoe,null):null;return Ee.createElement("div",{ref:function(te){r._ref=te},style:{fontSize:12,textOverflow:"ellipsis",whiteSpace:"nowrap",margin:0,padding:8,fontFamily:'Consolas, Inconsolata, "Droid Sans Mono", Monaco, monospace',display:"flex",flexDirection:"column",height:"100%"},className:"graphiql-explorer-root"},Ee.createElement("div",{style:{flexGrow:"1",overflow:"scroll"}},E.map(function(R,te){var Y=R&&R.name&&R.name.value,Q=R.kind==="FragmentDefinition"?"fragment":R&&R.operation||"query",K=function(xe){var ve=_(R,xe);r.props.onEdit((0,rt.print)(ve))},Z=function(){var xe=I(R);r.props.onEdit((0,rt.print)(xe))},re=function(){var xe=D(R);r.props.onEdit((0,rt.print)(xe))},J=R.kind==="FragmentDefinition"&&R.typeCondition.kind==="NamedType"&&i.getType(R.typeCondition.name.value),ie=J instanceof rt.GraphQLObjectType?J.getFields():null,ne=Q==="query"?m:Q==="mutation"?v:Q==="subscription"?b:R.kind==="FragmentDefinition"?ie:null,ae=R.kind==="FragmentDefinition"?R.typeCondition.name.value:null,le=function(xe){var ve=(0,rt.print)(xe);r.props.onEdit(ve)};return Ee.createElement(qoe,{key:te,isLast:te===E.length-1,fields:ne,operationType:Q,name:Y,definition:R,onOperationRename:K,onOperationDestroy:re,onOperationClone:Z,onTypeName:ae,onMount:r._handleRootViewMount,onCommit:le,onEdit:function(xe,ve){var qe=void 0;if((typeof ve>"u"?"undefined":Toe(ve))==="object"&&typeof ve.commit<"u"?qe=ve.commit:qe=!0,xe){var Ie=Ct({},w,{definitions:w.definitions.map(function(Oe){return Oe===R?xe:Oe})});return qe&&le(Ie),Ie}else return w},schema:i,getDefaultFieldNames:N,getDefaultScalarArgValue:S,makeDefaultArg:l,onRunOperation:function(){r.props.onRunOperation&&r.props.onRunOperation(Y)},styleConfig:c,availableFragments:z})}),B),$)}}]),t}(Ee.PureComponent);r$.defaultProps={getDefaultFieldNames:Q5,getDefaultScalarArgValue:X5};var Hoe=function(e){Ri(t,e);function t(){var n,r,o,i;Li(this,t);for(var s=arguments.length,l=Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=(r=(o=yn(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(l))),o),o.state={hasError:!1,error:null,errorInfo:null},r),yn(o,i)}return Ii(t,[{key:"componentDidCatch",value:function(r,o){this.setState({hasError:!0,error:r,errorInfo:o}),console.error("Error in component",r,o)}},{key:"render",value:function(){return this.state.hasError?Ee.createElement("div",{style:{padding:18,fontFamily:"sans-serif"}},Ee.createElement("div",null,"Something went wrong"),Ee.createElement("details",{style:{whiteSpace:"pre-wrap"}},this.state.error?this.state.error.toString():null,Ee.createElement("br",null),this.state.errorInfo?this.state.errorInfo.componentStack:null)):this.props.children}}]),t}(Ee.Component),BT=function(e){Ri(t,e);function t(){return Li(this,t),yn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Ii(t,[{key:"render",value:function(){return Ee.createElement("div",{className:"docExplorerWrap",style:{height:"100%",width:this.props.width,minWidth:this.props.width,zIndex:7,display:this.props.explorerIsOpen?"flex":"none",flexDirection:"column",overflow:"hidden"}},Ee.createElement("div",{className:"doc-explorer-title-bar"},Ee.createElement("div",{className:"doc-explorer-title"},this.props.title),Ee.createElement("div",{className:"doc-explorer-rhs"},Ee.createElement("div",{className:"docExplorerHide",onClick:this.props.onToggleExplorer},"✕"))),Ee.createElement("div",{className:"doc-explorer-contents",style:{padding:"0px",overflowY:"unset"}},Ee.createElement(Hoe,null,Ee.createElement(r$,this.props))))}}]),t}(Ee.PureComponent);BT.defaultValue=UT,BT.defaultProps={width:320,title:"Explorer"},ny.default=BT,Object.defineProperty(ty,"__esModule",{value:!0});var o$=ty.Explorer=void 0,Woe=ny,i$=Goe(Woe);function Goe(e){return e&&e.__esModule?e:{default:e}}o$=ty.Explorer=i$.default,ty.default=i$.default;const Yoe={keyword:"hsl(var(--color-primary))",def:"hsl(var(--color-tertiary))",property:"hsl(var(--color-info))",qualifier:"hsl(var(--color-secondary))",attribute:"hsl(var(--color-tertiary))",number:"hsl(var(--color-success))",string:"hsl(var(--color-warning))",builtin:"hsl(var(--color-success))",string2:"hsl(var(--color-secondary))",variable:"hsl(var(--color-secondary))",atom:"hsl(var(--color-tertiary))"},Qoe=ce.createElement("svg",{viewBox:"0 -4 13 15",style:{color:"hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",marginRight:"var(--px-4)",height:"var(--px-16)",width:"var(--px-16)"}},ce.createElement("path",{d:"M3.35355 6.85355L6.14645 9.64645C6.34171 9.84171 6.65829 9.84171 6.85355 9.64645L9.64645 6.85355C9.96143 6.53857 9.73835 6 9.29289 6L3.70711 6C3.26165 6 3.03857 6.53857 3.35355 6.85355Z",fill:"currentColor"})),Koe=ce.createElement("svg",{viewBox:"0 -2 13 15",style:{color:"hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",marginRight:"var(--px-4)",height:"var(--px-16)",width:"var(--px-16)"}},ce.createElement("path",{d:"M6.35355 11.1464L9.14645 8.35355C9.34171 8.15829 9.34171 7.84171 9.14645 7.64645L6.35355 4.85355C6.03857 4.53857 5.5 4.76165 5.5 5.20711V10.7929C5.5 11.2383 6.03857 11.4614 6.35355 11.1464Z",fill:"currentColor"})),Joe=ce.createElement("svg",{viewBox:"0 0 15 15",style:{color:"hsla(var(--color-neutral), var(--alpha-tertiary, 0.4))",marginRight:"var(--px-4)",height:"var(--px-16)",width:"var(--px-16)"}},ce.createElement("circle",{cx:"7.5",cy:"7.5",r:"6",stroke:"currentColor",fill:"none"})),Xoe=ce.createElement("svg",{viewBox:"0 0 15 15",style:{color:"hsl(var(--color-info))",marginRight:"var(--px-4)",height:"var(--px-16)",width:"var(--px-16)"}},ce.createElement("circle",{cx:"7.5",cy:"7.5",r:"7.5",fill:"currentColor"}),ce.createElement("path",{d:"M4.64641 7.00106L6.8801 9.23256L10.5017 5.61325",fill:"none",stroke:"white",strokeWidth:"1.5"})),Zoe={buttonStyle:{backgroundColor:"transparent",border:"none",color:"hsla(var(--color-neutral), var(--alpha-secondary, 0.6))",cursor:"pointer",fontSize:"1em"},explorerActionsStyle:{padding:"var(--px-8) var(--px-4)"},actionButtonStyle:{backgroundColor:"transparent",border:"none",color:"hsla(var(--color-neutral), var(--alpha-secondary, 0.6))",cursor:"pointer",fontSize:"1em"}};function eie(e){const{setOperationName:t}=Qn({nonNull:!0}),{schema:n}=Oi({nonNull:!0}),{run:r}=Yu({nonNull:!0}),o=k.useCallback(l=>{l&&t(l),r()},[r,t]),[i,s]=_5(goe());return ce.createElement(o$,{schema:n,onRunOperation:o,explorerIsOpen:!0,colors:Yoe,arrowOpen:Qoe,arrowClosed:Koe,checkboxUnchecked:Joe,checkboxChecked:Xoe,styles:Zoe,query:i,onEdit:s,...e})}function tie(e){return{title:"GraphiQL Explorer",icon:()=>ce.createElement("svg",{height:"1em",strokeWidth:"1.5",viewBox:"0 0 24 24",fill:"none"},ce.createElement("path",{d:"M18 6H20M22 6H20M20 6V4M20 6V8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),content:()=>ce.createElement(eie,{...e})}}var qT=function(){return qT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},qT.apply(this,arguments)},nie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},sy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(l){s={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i},rie=parseInt(ce.version.slice(0,2),10);if(rie<16)throw new Error(["GraphiQL 0.18.0 and after is not compatible with React 15 or below.","If you are using a CDN source (jsdelivr, unpkg, etc), follow this example:","https://github.com/graphql/graphiql/blob/master/examples/graphiql-cdn/index.html#L49"].join(`
`));function Qa(e){var t,n=e.dangerouslyAssumeSchemaIsValid,r=e.defaultQuery,o=e.defaultTabs,i=e.externalFragments,s=e.fetcher,l=e.getDefaultFieldNames,c=e.headers,f=e.inputValueDeprecation,d=e.introspectionQueryName,g=e.maxHistoryLength,m=e.onEditOperationName,v=e.onSchemaChange,b=e.onTabChange,w=e.onTogglePluginVisibility,N=e.operationName,S=e.plugins,x=e.query,C=e.response,E=e.schema,_=e.schemaDescription,I=e.shouldPersistHeaders,D=e.storage,A=e.validationRules,F=e.variables,$=e.visiblePlugin,q=e.defaultHeaders,H=nie(e,["dangerouslyAssumeSchemaIsValid","defaultQuery","defaultTabs","externalFragments","fetcher","getDefaultFieldNames","headers","inputValueDeprecation","introspectionQueryName","maxHistoryLength","onEditOperationName","onSchemaChange","onTabChange","onTogglePluginVisibility","operationName","plugins","query","response","schema","schemaDescription","shouldPersistHeaders","storage","validationRules","variables","visiblePlugin","defaultHeaders"]);if(typeof s!="function")throw new TypeError("The `GraphiQL` component requires a `fetcher` function to be passed as prop.");return ce.createElement($T,{getDefaultFieldNames:l,dangerouslyAssumeSchemaIsValid:n,defaultQuery:r,defaultHeaders:q,defaultTabs:o,externalFragments:i,fetcher:s,headers:c,inputValueDeprecation:f,introspectionQueryName:d,maxHistoryLength:g,onEditOperationName:m,onSchemaChange:v,onTabChange:b,onTogglePluginVisibility:w,plugins:S,visiblePlugin:$,operationName:N,query:x,response:C,schema:E,schemaDescription:_,shouldPersistHeaders:I,storage:D,validationRules:A,variables:F},ce.createElement(s$,qT({showPersistHeadersSettings:I!==!1,disableTabs:(t=H.disableTabs)!==null&&t!==void 0?t:!1},H)))}Qa.Logo=a$,Qa.Toolbar=l$,Qa.Footer=c$;function s$(e){var t,n,r,o,i=(t=e.isHeadersEditorEnabled)!==null&&t!==void 0?t:!0,s=Qn({nonNull:!0}),l=Yu({nonNull:!0}),c=Oi({nonNull:!0}),f=za(),d=U0(),g=B0({onCopyQuery:e.onCopyQuery}),m=lc(),v=Ku(),b=W5(),w=b.theme,N=b.setTheme,S=(n=d==null?void 0:d.visiblePlugin)===null||n===void 0?void 0:n.content,x=K0({defaultSizeRelation:1/3,direction:"horizontal",initiallyHidden:d!=null&&d.visiblePlugin?void 0:"first",onHiddenElementChange:function(Oe){Oe==="first"&&(d==null||d.setVisiblePlugin(null))},sizeThresholdSecond:200,storageKey:"docExplorerFlex"}),C=K0({direction:"horizontal",storageKey:"editorFlex"}),E=K0({defaultSizeRelation:3,direction:"vertical",initiallyHidden:function(){if(!(e.defaultEditorToolsVisibility==="variables"||e.defaultEditorToolsVisibility==="headers"))return typeof e.defaultEditorToolsVisibility=="boolean"?e.defaultEditorToolsVisibility?void 0:"second":s.initialVariables||s.initialHeaders?void 0:"second"}(),sizeThresholdSecond:60,storageKey:"secondaryEditorFlex"}),_=sy(k.useState(function(){return e.defaultEditorToolsVisibility==="variables"||e.defaultEditorToolsVisibility==="headers"?e.defaultEditorToolsVisibility:!s.initialVariables&&s.initialHeaders&&i?"headers":"variables"}),2),I=_[0],D=_[1],A=sy(k.useState(null),2),F=A[0],$=A[1],q=sy(k.useState(null),2),H=q[0],z=q[1],B=ce.Children.toArray(e.children),R=B.find(function(Oe){return HT(Oe,Qa.Logo)})||ce.createElement(Qa.Logo,null),te=B.find(function(Oe){return HT(Oe,Qa.Toolbar)})||ce.createElement(ce.Fragment,null,ce.createElement(Z0,{onClick:v,label:"Prettify query (Shift-Ctrl-P)"},ce.createElement(roe,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),ce.createElement(Z0,{onClick:m,label:"Merge fragments into query (Shift-Ctrl-M)"},ce.createElement(Zre,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),ce.createElement(Z0,{onClick:g,label:"Copy query (Shift-Ctrl-C)"},ce.createElement(jre,{className:"graphiql-toolbar-icon","aria-hidden":"true"})),((r=e.toolbar)===null||r===void 0?void 0:r.additionalContent)&&e.toolbar.additionalContent,((o=e.toolbar)===null||o===void 0?void 0:o.additionalComponent)&&ce.createElement(e.toolbar.additionalComponent,null)),Y=B.find(function(Oe){return HT(Oe,Qa.Footer)}),Q=k.useCallback(function(){x.hiddenElement==="first"&&x.setHiddenElement(null)},[x]),K=k.useCallback(function(){try{f==null||f.clear(),z("success")}catch{z("error")}},[f]),Z=k.useCallback(function(Oe){s.setShouldPersistHeaders(Oe.currentTarget.dataset.value==="true")},[s]),re=k.useCallback(function(Oe){var it=Oe.currentTarget.dataset.theme;N(it||null)},[N]),J=s.addTab,ie=c.introspect,ne=s.moveTab,ae=k.useCallback(function(Oe){$(Oe.currentTarget.dataset.value)},[]),le=k.useCallback(function(Oe){var it=d,Ot=Number(Oe.currentTarget.dataset.index),je=it.plugins.find(function(Nr,$t){return Ot===$t}),Dt=je===it.visiblePlugin;Dt?(it.setVisiblePlugin(null),x.setHiddenElement("first")):(it.setVisiblePlugin(je),x.setHiddenElement(null))},[d,x]),de=k.useCallback(function(Oe){E.hiddenElement==="second"&&E.setHiddenElement(null),D(Oe.currentTarget.dataset.name)},[E]),xe=k.useCallback(function(){E.setHiddenElement(E.hiddenElement==="second"?null:"second")},[E]),ve=k.useCallback(function(Oe){Oe||$(null)},[]),qe=k.useCallback(function(Oe){Oe||($(null),z(null))},[]),Ie=ce.createElement(Tr,{label:"Add tab"},ce.createElement(jn,{type:"button",className:"graphiql-tab-add",onClick:J,"aria-label":"Add tab"},ce.createElement(noe,{"aria-hidden":"true"})));return ce.createElement(Tr.Provider,null,ce.createElement("div",{"data-testid":"graphiql-container",className:"graphiql-container"},ce.createElement("div",{className:"graphiql-sidebar"},ce.createElement("div",{className:"graphiql-sidebar-section"},d==null?void 0:d.plugins.map(function(Oe,it){var Ot=Oe===d.visiblePlugin,je="".concat(Ot?"Hide":"Show"," ").concat(Oe.title),Dt=Oe.icon;return ce.createElement(Tr,{key:Oe.title,label:je},ce.createElement(jn,{type:"button",className:Ot?"active":"",onClick:le,"data-index":it,"aria-label":je},ce.createElement(Dt,{"aria-hidden":"true"})))})),ce.createElement("div",{className:"graphiql-sidebar-section"},ce.createElement(Tr,{label:"Re-fetch GraphQL schema"},ce.createElement(jn,{type:"button",disabled:c.isFetching,onClick:ie,"aria-label":"Re-fetch GraphQL schema"},ce.createElement(ooe,{className:c.isFetching?"graphiql-spin":"","aria-hidden":"true"}))),ce.createElement(Tr,{label:"Open short keys dialog"},ce.createElement(jn,{type:"button","data-value":"short-keys",onClick:ae,"aria-label":"Open short keys dialog"},ce.createElement(Jre,{"aria-hidden":"true"}))),ce.createElement(Tr,{label:"Open settings dialog"},ce.createElement(jn,{type:"button","data-value":"settings",onClick:ae,"aria-label":"Open settings dialog"},ce.createElement(soe,{"aria-hidden":"true"}))))),ce.createElement("div",{className:"graphiql-main"},ce.createElement("div",{ref:x.firstRef,style:{minWidth:"200px"}},ce.createElement("div",{className:"graphiql-plugin"},S?ce.createElement(S,null):null)),(d==null?void 0:d.visiblePlugin)&&ce.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:x.dragBarRef}),ce.createElement("div",{ref:x.secondRef,className:"graphiql-sessions"},ce.createElement("div",{className:"graphiql-session-header"},e.disableTabs?null:ce.createElement(t5,{values:s.tabs,onReorder:ne,"aria-label":"Select active operation"},s.tabs.length>1&&ce.createElement(ce.Fragment,null,s.tabs.map(function(Oe,it){return ce.createElement(gT,{key:Oe.id,value:Oe,isActive:it===s.activeTabIndex},ce.createElement(gT.Button,{"aria-controls":"graphiql-session",id:"graphiql-session-tab-".concat(it),onClick:function(){l.stop(),s.changeTab(it)}},Oe.title),ce.createElement(gT.Close,{onClick:function(){s.activeTabIndex===it&&l.stop(),s.closeTab(it)}}))}),Ie)),ce.createElement("div",{className:"graphiql-session-header-right"},s.tabs.length===1&&Ie,R)),ce.createElement("div",{role:"tabpanel",id:"graphiql-session",className:"graphiql-session","aria-labelledby":"graphiql-session-tab-".concat(s.activeTabIndex)},ce.createElement("div",{ref:C.firstRef},ce.createElement("div",{className:"graphiql-editors".concat(s.tabs.length===1?" full-height":"")},ce.createElement("div",{ref:E.firstRef},ce.createElement("section",{className:"graphiql-query-editor","aria-label":"Query Editor"},ce.createElement(MT,{editorTheme:e.editorTheme,keyMap:e.keyMap,onClickReference:Q,onCopyQuery:e.onCopyQuery,onEdit:e.onEditQuery,readOnly:e.readOnly}),ce.createElement("div",{className:"graphiql-toolbar",role:"toolbar","aria-label":"Editor Commands"},ce.createElement(ey,null),te))),ce.createElement("div",{ref:E.dragBarRef},ce.createElement("div",{className:"graphiql-editor-tools"},ce.createElement(jn,{type:"button",className:I==="variables"&&E.hiddenElement!=="second"?"active":"",onClick:de,"data-name":"variables"},"Variables"),i&&ce.createElement(jn,{type:"button",className:I==="headers"&&E.hiddenElement!=="second"?"active":"",onClick:de,"data-name":"headers"},"Headers"),ce.createElement(Tr,{label:E.hiddenElement==="second"?"Show editor tools":"Hide editor tools"},ce.createElement(jn,{type:"button",onClick:xe,"aria-label":E.hiddenElement==="second"?"Show editor tools":"Hide editor tools",className:"graphiql-toggle-editor-tools"},E.hiddenElement==="second"?ce.createElement(Vre,{className:"graphiql-chevron-icon","aria-hidden":"true"}):ce.createElement(Pre,{className:"graphiql-chevron-icon","aria-hidden":"true"}))))),ce.createElement("div",{ref:E.secondRef},ce.createElement("section",{className:"graphiql-editor-tool","aria-label":I==="variables"?"Variables":"Headers"},ce.createElement(Q0,{editorTheme:e.editorTheme,isHidden:I!=="variables",keyMap:e.keyMap,onEdit:e.onEditVariables,onClickReference:Q,readOnly:e.readOnly}),i&&ce.createElement(W0,{editorTheme:e.editorTheme,isHidden:I!=="headers",keyMap:e.keyMap,onEdit:e.onEditHeaders,readOnly:e.readOnly}))))),ce.createElement("div",{className:"graphiql-horizontal-drag-bar",ref:C.dragBarRef}),ce.createElement("div",{ref:C.secondRef},ce.createElement("div",{className:"graphiql-response"},l.isFetching?ce.createElement(mT,null):null,ce.createElement(PT,{editorTheme:e.editorTheme,responseTooltip:e.responseTooltip,keyMap:e.keyMap}),Y))))),ce.createElement(Gu,{open:F==="short-keys",onOpenChange:ve},ce.createElement("div",{className:"graphiql-dialog-header"},ce.createElement(Gu.Title,{className:"graphiql-dialog-title"},"Short Keys"),ce.createElement(Gu.Close,null)),ce.createElement("div",{className:"graphiql-dialog-section"},ce.createElement(iie,{keyMap:e.keyMap||"sublime"}))),ce.createElement(Gu,{open:F==="settings",onOpenChange:qe},ce.createElement("div",{className:"graphiql-dialog-header"},ce.createElement(Gu.Title,{className:"graphiql-dialog-title"},"Settings"),ce.createElement(Gu.Close,null)),e.showPersistHeadersSettings?ce.createElement("div",{className:"graphiql-dialog-section"},ce.createElement("div",null,ce.createElement("div",{className:"graphiql-dialog-section-title"},"Persist headers"),ce.createElement("div",{className:"graphiql-dialog-section-caption"},"Save headers upon reloading."," ",ce.createElement("span",{className:"graphiql-warning-text"},"Only enable if you trust this device."))),ce.createElement(hT,null,ce.createElement(_i,{type:"button",id:"enable-persist-headers",className:s.shouldPersistHeaders?"active":"","data-value":"true",onClick:Z},"On"),ce.createElement(_i,{type:"button",id:"disable-persist-headers",className:s.shouldPersistHeaders?"":"active",onClick:Z},"Off"))):null,ce.createElement("div",{className:"graphiql-dialog-section"},ce.createElement("div",null,ce.createElement("div",{className:"graphiql-dialog-section-title"},"Theme"),ce.createElement("div",{className:"graphiql-dialog-section-caption"},"Adjust how the interface looks like.")),ce.createElement(hT,null,ce.createElement(_i,{type:"button",className:w===null?"active":"",onClick:re},"System"),ce.createElement(_i,{type:"button",className:w==="light"?"active":"","data-theme":"light",onClick:re},"Light"),ce.createElement(_i,{type:"button",className:w==="dark"?"active":"","data-theme":"dark",onClick:re},"Dark"))),f?ce.createElement("div",{className:"graphiql-dialog-section"},ce.createElement("div",null,ce.createElement("div",{className:"graphiql-dialog-section-title"},"Clear storage"),ce.createElement("div",{className:"graphiql-dialog-section-caption"},"Remove all locally stored data and start fresh.")),ce.createElement(_i,{type:"button",state:H||void 0,disabled:H==="success",onClick:K},{success:"Cleared data",error:"Failed"}[H]||"Clear data")):null)))}var zT=typeof window<"u"&&window.navigator.platform.toLowerCase().indexOf("mac")===0?"Cmd":"Ctrl",oie=Object.entries({"Search in editor":[zT,"F"],"Search in documentation":[zT,"K"],"Execute query":[zT,"Enter"],"Prettify editors":["Ctrl","Shift","P"],"Merge fragments definitions into operation definition":["Ctrl","Shift","M"],"Copy query":["Ctrl","Shift","C"],"Re-fetch schema using introspection":["Ctrl","Shift","R"]});function iie(e){var t=e.keyMap;return ce.createElement("div",null,ce.createElement("table",{className:"graphiql-table"},ce.createElement("thead",null,ce.createElement("tr",null,ce.createElement("th",null,"Short Key"),ce.createElement("th",null,"Function"))),ce.createElement("tbody",null,oie.map(function(n){var r=sy(n,2),o=r[0],i=r[1];return ce.createElement("tr",{key:o},ce.createElement("td",null,i.map(function(s,l,c){return ce.createElement(k.Fragment,{key:s},ce.createElement("code",{className:"graphiql-key"},s),l!==c.length-1&&" + ")})),ce.createElement("td",null,o))}))),ce.createElement("p",null,"The editors use"," ",ce.createElement("a",{href:"https://codemirror.net/5/doc/manual.html#keymaps",target:"_blank",rel:"noopener noreferrer"},"CodeMirror Key Maps")," ","that add more short keys. This instance of Graph",ce.createElement("em",null,"i"),"QL uses"," ",ce.createElement("code",null,t),"."))}function a$(e){return ce.createElement("div",{className:"graphiql-logo"},e.children||ce.createElement("a",{className:"graphiql-logo-link",href:"https://github.com/graphql/graphiql",target:"_blank",rel:"noreferrer"},"Graph",ce.createElement("em",null,"i"),"QL"))}a$.displayName="GraphiQLLogo";function l$(e){return ce.createElement(ce.Fragment,null,e.children)}l$.displayName="GraphiQLToolbar";function c$(e){return ce.createElement("div",{className:"graphiql-footer"},e.children)}c$.displayName="GraphiQLFooter";function HT(e,t){var n;return!((n=e==null?void 0:e.type)===null||n===void 0)&&n.displayName&&e.type.displayName===t.displayName?!0:e.type===t}var ef=null;typeof WebSocket<"u"?ef=WebSocket:typeof MozWebSocket<"u"?ef=MozWebSocket:typeof global<"u"?ef=global.WebSocket||global.MozWebSocket:typeof window<"u"?ef=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(ef=self.WebSocket||self.MozWebSocket);const u$=ef;function sie(e){return e!=null&&typeof e.then=="function"}const aie=e=>{throw e};class zt{constructor(t){H8(this,"state");let n;try{n=t()}catch(r){this.state={status:"rejected",value:r};return}if(sie(n)){this.state={status:"pending",value:n};return}this.state={status:"fulfilled",value:n}}then(t,n){const r=this.state;if(r.status==="pending")return new zt(()=>r.value.then(t,n));const o=typeof n=="function"?n:aie;if(r.status==="rejected")return new zt(()=>o(r.value));try{const i=typeof t=="function"?t:void 0;return i===void 0?new zt(()=>r.value):new zt(()=>i(r.value))}catch(i){return new zt(()=>o(i))}}catch(t){return this.then(void 0,t)}resolve(){const t=this.state;if(t.status==="pending")return Promise.resolve(t.value);if(t.status==="rejected")throw t.value;return t.value}static all(t){let n=!1,r,o=!1;const i=[];for(const s of t){const l=s.state;if(l.status==="rejected"){if(n)continue;n=!0,r=l.value;continue}l.status==="pending"&&(o=!0),i.push(l.value)}return o?n?(Promise.all(i).catch(()=>{}),new zt(()=>{throw r})):new zt(()=>Promise.all(i)):new zt(()=>i)}}function no(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function uc(e){return no(e)==="object"}function lie(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function f$(e,t){return e.length<124?e:t}const cie="graphql-transport-ws";var No;(function(e){e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(No||(No={}));var bn;(function(e){e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete"})(bn||(bn={}));function d$(e){if(!uc(e))throw new Error(`Message is expected to be an object, but got ${no(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${no(e.type)}`);switch(e.type){case bn.ConnectionInit:case bn.ConnectionAck:case bn.Ping:case bn.Pong:{if(e.payload!=null&&!uc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case bn.Subscribe:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${no(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!uc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${no(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${no(e.payload.query)}`);if(e.payload.variables!=null&&!uc(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${no(e.payload.variables)}`);if(e.payload.operationName!=null&&no(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${no(e.payload.operationName)}`);if(e.payload.extensions!=null&&!uc(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${no(e.payload.extensions)}`);break}case bn.Next:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${no(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!uc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${no(e.payload)}`);break}case bn.Error:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${no(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!lie(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case bn.Complete:{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${no(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function uie(e,t){return d$(typeof e=="string"?JSON.parse(e,t):e)}function eh(e,t){return d$(e),JSON.stringify(e,t)}var tf=function(e){return this instanceof tf?(this.v=e,this):new tf(e)},fie=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){r[m]&&(o[m]=function(v){return new Promise(function(b,w){i.push([m,v,b,w])>1||l(m,v)})})}function l(m,v){try{c(r[m](v))}catch(b){g(i[0][3],b)}}function c(m){m.value instanceof tf?Promise.resolve(m.value.v).then(f,d):g(i[0][2],m)}function f(m){l("next",m)}function d(m){l("throw",m)}function g(m,v){m(v),i.shift(),i.length&&l(i[0][0],i[0][1])}};function die(e){const{url:t,connectionParams:n,lazy:r=!0,onNonLazyError:o=console.error,lazyCloseTimeout:i=0,keepAlive:s=0,disablePong:l,connectionAckWaitTimeout:c=0,retryAttempts:f=5,retryWait:d=async function(te){let Y=1e3;for(let Q=0;Q<te;Q++)Y*=2;await new Promise(Q=>setTimeout(Q,Y+Math.floor(Math.random()*2700+300)))},shouldRetry:g=WT,isFatalConnectionProblem:m,on:v,webSocketImpl:b,generateID:w=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,te=>{const Y=Math.random()*16|0;return(te=="x"?Y:Y&3|8).toString(16)})},jsonMessageReplacer:N,jsonMessageReviver:S}=e;let x;if(b){if(!hie(b))throw new Error("Invalid WebSocket implementation provided");x=b}else typeof WebSocket<"u"?x=WebSocket:typeof global<"u"?x=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(x=window.WebSocket||window.MozWebSocket);if(!x)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const C=x,E=(()=>{const R=(()=>{const Y={};return{on(Q,K){return Y[Q]=K,()=>{delete Y[Q]}},emit(Q){var K;"id"in Q&&((K=Y[Q.id])===null||K===void 0||K.call(Y,Q))}}})(),te={connecting:v!=null&&v.connecting?[v.connecting]:[],opened:v!=null&&v.opened?[v.opened]:[],connected:v!=null&&v.connected?[v.connected]:[],ping:v!=null&&v.ping?[v.ping]:[],pong:v!=null&&v.pong?[v.pong]:[],message:v!=null&&v.message?[R.emit,v.message]:[R.emit],closed:v!=null&&v.closed?[v.closed]:[],error:v!=null&&v.error?[v.error]:[]};return{onMessage:R.on,on(Y,Q){const K=te[Y];return K.push(Q),()=>{K.splice(K.indexOf(Q),1)}},emit(Y,...Q){for(const K of[...te[Y]])K(...Q)}}})();function _(R){const te=[E.on("error",Y=>{te.forEach(Q=>Q()),R(Y)}),E.on("closed",Y=>{te.forEach(Q=>Q()),R(Y)})]}let I,D=0,A,F=!1,$=0,q=!1;async function H(){clearTimeout(A);const[R,te]=await(I??(I=new Promise((K,Z)=>(async()=>{if(F){if(await d($),!D)return I=void 0,Z({code:1e3,reason:"All Subscriptions Gone"});$++}E.emit("connecting",F);const re=new C(typeof t=="function"?await t():t,cie);let J,ie;function ne(){isFinite(s)&&s>0&&(clearTimeout(ie),ie=setTimeout(()=>{re.readyState===C.OPEN&&(re.send(eh({type:bn.Ping})),E.emit("ping",!1,void 0))},s))}_(le=>{I=void 0,clearTimeout(J),clearTimeout(ie),Z(le),le instanceof p$&&(re.close(4499,"Terminated"),re.onerror=null,re.onclose=null)}),re.onerror=le=>E.emit("error",le),re.onclose=le=>E.emit("closed",le),re.onopen=async()=>{try{E.emit("opened",re);const le=typeof n=="function"?await n():n;if(re.readyState!==C.OPEN)return;re.send(eh(le?{type:bn.ConnectionInit,payload:le}:{type:bn.ConnectionInit},N)),isFinite(c)&&c>0&&(J=setTimeout(()=>{re.close(No.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},c)),ne()}catch(le){E.emit("error",le),re.close(No.InternalClientError,f$(le instanceof Error?le.message:new Error(le).message,"Internal client error"))}};let ae=!1;re.onmessage=({data:le})=>{try{const de=uie(le,S);if(E.emit("message",de),de.type==="ping"||de.type==="pong"){E.emit(de.type,!0,de.payload),de.type==="pong"?ne():l||(re.send(eh(de.payload?{type:bn.Pong,payload:de.payload}:{type:bn.Pong})),E.emit("pong",!1,de.payload));return}if(ae)return;if(de.type!==bn.ConnectionAck)throw new Error(`First message cannot be of type ${de.type}`);clearTimeout(J),ae=!0,E.emit("connected",re,de.payload,F),F=!1,$=0,K([re,new Promise((xe,ve)=>_(ve))])}catch(de){re.onmessage=null,E.emit("error",de),re.close(No.BadResponse,f$(de instanceof Error?de.message:new Error(de).message,"Bad response"))}}})())));R.readyState===C.CLOSING&&await te;let Y=()=>{};const Q=new Promise(K=>Y=K);return[R,Y,Promise.race([Q.then(()=>{if(!D){const K=()=>R.close(1e3,"Normal Closure");isFinite(i)&&i>0?A=setTimeout(()=>{R.readyState===C.OPEN&&K()},i):K()}}),te])]}function z(R){if(WT(R)&&(pie(R.code)||[No.InternalServerError,No.InternalClientError,No.BadRequest,No.BadResponse,No.Unauthorized,No.SubprotocolNotAcceptable,No.SubscriberAlreadyExists,No.TooManyInitialisationRequests].includes(R.code)))throw R;if(q)return!1;if(WT(R)&&R.code===1e3)return D>0;if(!f||$>=f||!g(R)||m!=null&&m(R))throw R;return F=!0}r||(async()=>{for(D++;;)try{const[,,R]=await H();await R}catch(R){try{if(!z(R))return}catch(te){return o==null?void 0:o(te)}}})();function B(R,te){const Y=w(R);let Q=!1,K=!1,Z=()=>{D--,Q=!0};return(async()=>{for(D++;;)try{const[re,J,ie]=await H();if(Q)return J();const ne=E.onMessage(Y,ae=>{switch(ae.type){case bn.Next:{te.next(ae.payload);return}case bn.Error:{K=!0,Q=!0,te.error(ae.payload),Z();return}case bn.Complete:{Q=!0,Z();return}}});re.send(eh({id:Y,type:bn.Subscribe,payload:R},N)),Z=()=>{!Q&&re.readyState===C.OPEN&&re.send(eh({id:Y,type:bn.Complete},N)),D--,Q=!0,J()},await ie.finally(ne);return}catch(re){if(!z(re))return}})().then(()=>{K||te.complete()}).catch(re=>{te.error(re)}),()=>{Q||Z()}}return{on:E.on,subscribe:B,iterate(R){const te=[],Y={done:!1,error:null,resolve:()=>{}},Q=B(R,{next(Z){te.push(Z),Y.resolve()},error(Z){Y.done=!0,Y.error=Z,Y.resolve()},complete(){Y.done=!0,Y.resolve()}}),K=function(){return fie(this,arguments,function*(){for(;;){for(te.length||(yield tf(new Promise(J=>Y.resolve=J)));te.length;)yield yield tf(te.shift());if(Y.error)throw Y.error;if(Y.done)return yield tf(void 0)}})}();return K.throw=async Z=>(Y.done||(Y.done=!0,Y.error=Z,Y.resolve()),{done:!0,value:void 0}),K.return=async()=>(Q(),{done:!0,value:void 0}),K},async dispose(){if(q=!0,I){const[R]=await I;R.close(1e3,"Normal Closure")}},terminate(){I&&E.emit("closed",new p$)}}}class p$ extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function WT(e){return uc(e)&&"code"in e&&"reason"in e}function pie(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function hie(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}const mie=e=>Array.isArray(e)?e:e?[e]:[],h$=3;function Kn(e){return ay(e,[])}function ay(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return gie(e,t);default:return String(e)}}function m$(e){return(e.name="GraphQLError")?e.toString():`${e.name}: ${e.message};
${e.stack}`}function gie(e,t){if(e===null)return"null";if(e instanceof Error)return e.name==="AggregateError"?m$(e)+`
`+g$(e.errors,t):m$(e);if(t.includes(e))return"[Circular]";const n=[...t,e];if(vie(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:ay(r,n)}else if(Array.isArray(e))return g$(e,n);return yie(e,n)}function vie(e){return typeof e.toJSON=="function"}function yie(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>h$?"["+bie(e)+"]":"{ "+n.map(([o,i])=>o+": "+ay(i,t)).join(", ")+" }"}function g$(e,t){if(e.length===0)return"[]";if(t.length>h$)return"[Array]";const n=e.length,r=[];for(let o=0;o<n;++o)r.push(ay(e[o],t));return"["+r.join(", ")+"]"}function bie(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const Eie=["message","locations","path","nodes","source","positions","originalError","name","stack","extensions"];function wie(e){return e!=null&&typeof e=="object"&&Object.keys(e).every(t=>Eie.includes(t))}function ut(e,t){return t!=null&&t.originalError&&!(t.originalError instanceof Error)&&wie(t.originalError)&&(t.originalError=ut(t.originalError.message,t.originalError)),UE.major>=17?new he(e,t):new he(e,t==null?void 0:t.nodes,t==null?void 0:t.source,t==null?void 0:t.positions,t==null?void 0:t.path,t==null?void 0:t.originalError,t==null?void 0:t.extensions)}function GT(e,t){return ut(e.message,{nodes:e.nodes,source:e.source,positions:e.positions,path:t??e.path,originalError:e,extensions:e.extensions})}function xie(e){return e!=null&&typeof e=="object"&&Symbol.iterator in e}function v$(e){return typeof e=="object"&&e!==null}function Zt(e){return(e==null?void 0:e.then)!=null}function Sie(e,t,n){let r=n;for(const o of e)r=Zt(r)?r.then(i=>t(i,o)):t(r,o);return r}function y$(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b$(e,t,n={}){const r={},i=(t.arguments??[]).reduce((s,l)=>({...s,[l.name.value]:l}),{});for(const{name:s,type:l,defaultValue:c}of e.args){const f=i[s];if(!f){if(c!==void 0)r[s]=c;else if(He(l))throw ut(`Argument "${s}" of required type "${Kn(l)}" was not provided.`,{nodes:[t]});continue}const d=f.value;let g=d.kind===U.NULL;if(d.kind===U.VARIABLE){const v=d.name.value;if(n==null||!y$(n,v)){if(c!==void 0)r[s]=c;else if(He(l))throw ut(`Argument "${s}" of required type "${Kn(l)}" was provided the variable "$${v}" which was not provided a runtime value.`,{nodes:[d]});continue}g=n[v]==null}if(g&&He(l))throw ut(`Argument "${s}" of non-null type "${Kn(l)}" must not be null.`,{nodes:[d]});const m=Ho(d,l,n);if(m===void 0)throw ut(`Argument "${s}" has invalid value ${ft(d)}.`,{nodes:[d]});r[s]=m}return r}function YT(e){if(He(e)){const t=YT(e.ofType);if(t.kind===U.NON_NULL_TYPE)throw new Error(`Invalid type node ${Kn(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:U.NON_NULL_TYPE,type:t}}else if(vt(e))return{kind:U.LIST_TYPE,type:YT(e.ofType)};return{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:e.name}}}function js(e){const t=new WeakMap;return function(r){const o=t.get(r);if(o===void 0){const i=e(r);return t.set(r,i),i}return o}}function QT(e){const t=new WeakMap;return function(r,o){let i=t.get(r);if(!i){i=new WeakMap,t.set(r,i);const l=e(r,o);return i.set(o,l),l}const s=i.get(o);if(s===void 0){const l=e(r,o);return i.set(o,l),l}return s}}function Tie(e){const t=new WeakMap;return function(r,o,i){let s=t.get(r);if(!s){s=new WeakMap,t.set(r,s);const f=new WeakMap;s.set(o,f);const d=e(r,o,i);return f.set(i,d),d}let l=s.get(o);if(!l){l=new WeakMap,s.set(o,l);const f=e(r,o,i);return l.set(i,f),f}const c=l.get(i);if(c===void 0){const f=e(r,o,i);return l.set(i,f),f}return c}}function Cie(e){const t=new WeakMap;return function(r,o,i,s,l){let c=t.get(r);if(!c){c=new WeakMap,t.set(r,c);const v=new WeakMap;c.set(o,v);const b=new WeakMap;v.set(i,b);const w=new WeakMap;b.set(s,w);const N=e(r,o,i,s,l);return w.set(l,N),N}let f=c.get(o);if(!f){f=new WeakMap,c.set(o,f);const v=new WeakMap;f.set(i,v);const b=new WeakMap;v.set(s,b);const w=e(r,o,i,s,l);return b.set(l,w),w}let d=f.get(i);if(!d){d=new WeakMap,f.set(i,d);const v=new WeakMap;d.set(s,v);const b=e(r,o,i,s,l);return v.set(l,b),b}let g=d.get(s);if(!g){g=new WeakMap,d.set(s,g);const v=e(r,o,i,s,l);return g.set(l,v),v}const m=g.get(l);if(m===void 0){const v=e(r,o,i,s,l);return g.set(l,v),v}return m}}function kie(e){const t=new WeakMap;return function(r,o,i,s){let l=t.get(r);if(!l){l=new WeakMap,t.set(r,l);const f=e(r,o,i,s);return l.set(o,f),f}const c=l.get(o);if(c===void 0){const f=e(r,o,i,s);return l.set(o,f),f}return c}}function ly(e,t,n){const o=KT(e).get(t);if(o==null)throw ut(`Schema is not configured to execute ${t} operation.`,{nodes:n});return o}const Nie=js(function(t){const n=_ie(t);return new Set([...n].map(r=>r.name))}),_ie=js(function(t){const n=KT(t);return new Set(n.values())}),KT=js(function(t){const n=new Map,r=t.getQueryType();r&&n.set("query",r);const o=t.getMutationType();o&&n.set("mutation",o);const i=t.getSubscriptionType();return i&&n.set("subscription",i),n}),Oie=80;let E$={};function Aie(e){return`
# `+e.replace(/\n/g,`
# `)}function Ue(e,t){return e?e.filter(n=>n).join(t||""):""}function w$(e){return(e==null?void 0:e.some(t=>t.includes(`
`)))??!1}function Die(e){return(t,n,r,o,i)=>{var d;const s=[],l=o.reduce((g,m)=>(["fields","arguments","values"].includes(m)&&g.name&&s.push(g.name.value),g[m]),i[0]),c=[...s,(d=l==null?void 0:l.name)==null?void 0:d.value].filter(Boolean).join("."),f=[];return t.kind.includes("Definition")&&E$[c]&&f.push(...E$[c]),Ue([...f.map(Aie),t.description,e(t,n,r,o,i)],`
`)}}function th(e){return e&&` ${e.replace(/\n/g,`
`)}`}function Fi(e){return e&&e.length!==0?`{
${th(Ue(e,`
`))}
}`:""}function an(e,t,n){return t?e+t+(n||""):""}function Iie(e,t=!1){const n=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(`
`)===-1?`"""${n.replace(/"$/,`"
`)}"""`:`"""
${t?n:th(n)}
"""`}const x$={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Ue(e.definitions,`
`)},OperationDefinition:{leave:e=>{const t=an("(",Ue(e.variableDefinitions,", "),")");return Ue([e.operation,Ue([e.name,t]),Ue(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+an(" = ",n)+an(" ",Ue(r," "))},SelectionSet:{leave:({selections:e})=>Fi(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:o}){const i=an("",e,": ")+t;let s=i+an("(",Ue(n,", "),")");return s.length>Oie&&(s=i+an(`(
`,th(Ue(n,`
`)),`
)`)),Ue([s,Ue(r," "),o]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+an(" ",Ue(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>Ue(["...",an("on ",e),Ue(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:o})=>`fragment ${e}${an("(",Ue(n,", "),")")} on ${t} ${an("",Ue(r," ")," ")}`+o},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Iie(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Ue(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Ue(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+an("(",Ue(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>Ue(["schema",Ue(e," "),Fi(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>Ue(["scalar",e,Ue(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["type",e,an("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:n,directives:r})=>e+(w$(t)?an(`(
`,th(Ue(t,`
`)),`
)`):an("(",Ue(t,", "),")"))+": "+n+an(" ",Ue(r," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:n,directives:r})=>Ue([e+": "+t,an("= ",n),Ue(r," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["interface",e,an("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:n})=>Ue(["union",e,Ue(t," "),an("= ",Ue(n," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:n})=>Ue(["enum",e,Ue(t," "),Fi(n)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>Ue([e,Ue(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:n})=>Ue(["input",e,Ue(t," "),Fi(n)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:n,locations:r})=>"directive @"+e+(w$(t)?an(`(
`,th(Ue(t,`
`)),`
)`):an("(",Ue(t,", "),")"))+(n?" repeatable":"")+" on "+Ue(r," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Ue(["extend schema",Ue(e," "),Fi(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Ue(["extend scalar",e,Ue(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["extend type",e,an("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>Ue(["extend interface",e,an("implements ",Ue(t," & ")),Ue(n," "),Fi(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>Ue(["extend union",e,Ue(t," "),an("= ",Ue(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>Ue(["extend enum",e,Ue(t," "),Fi(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>Ue(["extend input",e,Ue(t," "),Fi(n)]," ")}};Object.keys(x$).reduce((e,t)=>({...e,[t]:{leave:Die(x$[t].leave)}}),{});function Lie(e){const t=e.loc;if(!t)return;const n=[];let r=t.startToken.prev;for(;r!=null&&r.kind===ge.COMMENT&&r.next!=null&&r.prev!=null&&r.line+1===r.next.line&&r.line!==r.prev.line;){const o=String(r.value);n.push(o),r=r.prev}return n.length>0?n.reverse().join(`
`):void 0}function Rie(e){const t=e.split(/\r\n|[\n\r]/g),n=Fie(t);if(n!==0)for(let r=1;r<t.length;r++)t[r]=t[r].slice(n);for(;t.length>0&&T$(t[0]);)t.shift();for(;t.length>0&&T$(t[t.length-1]);)t.pop();return t.join(`
`)}function Fie(e){let t=null;for(let n=1;n<e.length;n++){const r=e[n],o=S$(r);if(o!==r.length&&(t===null||o<t)&&(t=o,t===0))break}return t===null?0:t}function S$(e){let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" ");)t++;return t}function T$(e){return S$(e)===e.length}function Mie(e,t,n={}){let r;try{n.commentDescriptions&&t.includes("#")?(r=Pie(t,n),n.noLocation&&(r=rr(ft(r),n))):r=rr(new jd(t,e),n)}catch(o){if(o.message.includes("EOF")&&t.replace(/(\#[^*]*)/g,"").trim()==="")r={kind:U.DOCUMENT,definitions:[]};else throw o}return{location:e,document:r}}function Pie(e,t={}){const n=rr(e,{...t,noLocation:!1});return fn(n,{leave:o=>{if($ie(o)){const i=Lie(o);if(i!==void 0){const s=Rie(`
`+i),l=s.includes(`
`);return o.description?{...o,description:{...o.description,value:o.description.value+`
`+s,block:!0}}:{...o,description:{kind:U.STRING,value:s,block:l}}}}}})}function $ie(e){return Fg(e)||e.kind===U.FIELD_DEFINITION||e.kind===U.INPUT_VALUE_DEFINITION||e.kind===U.ENUM_VALUE_DEFINITION}var ot;(function(e){e.TYPE="MapperKind.TYPE",e.SCALAR_TYPE="MapperKind.SCALAR_TYPE",e.ENUM_TYPE="MapperKind.ENUM_TYPE",e.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",e.OBJECT_TYPE="MapperKind.OBJECT_TYPE",e.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",e.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",e.UNION_TYPE="MapperKind.UNION_TYPE",e.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",e.ROOT_OBJECT="MapperKind.ROOT_OBJECT",e.QUERY="MapperKind.QUERY",e.MUTATION="MapperKind.MUTATION",e.SUBSCRIPTION="MapperKind.SUBSCRIPTION",e.DIRECTIVE="MapperKind.DIRECTIVE",e.FIELD="MapperKind.FIELD",e.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",e.OBJECT_FIELD="MapperKind.OBJECT_FIELD",e.ROOT_FIELD="MapperKind.ROOT_FIELD",e.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",e.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",e.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",e.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",e.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",e.ARGUMENT="MapperKind.ARGUMENT",e.ENUM_VALUE="MapperKind.ENUM_VALUE"})(ot||(ot={}));function nf(e,t){if(t){const n=e[t.name];if(Qe(n))return n}}function Vie(e){if("getFields"in e){const t=e.getFields();for(const n in t)return t[n].name==="_fake"}return!1}function jie(e){switch(e.name){case zd.name:return zd;case Hd.name:return Hd;case Ft.name:return Ft;case qt.name:return qt;case Wd.name:return Wd;default:return e}}function Uie(e,t){const n=Object.create(null);for(const m in e)n[m]=e[m];const r=Object.create(null);for(const m in n){const v=n[m];if(v==null||m.startsWith("__"))continue;const b=v.name;if(!b.startsWith("__")){if(r[b]!=null){console.warn(`Duplicate schema type name ${b} found; keeping the existing one found in the schema`);continue}r[b]=v}}for(const m in r)r[m]=l(r[m]);const o=t.map(m=>i(m));return{typeMap:r,directives:o};function i(m){if(Ag(m))return m;const v=m.toConfig();return v.args=s(v.args),new Eo(v)}function s(m){const v={};for(const b in m){const w=m[b],N=g(w.type);N!=null&&(w.type=N,v[b]=w)}return v}function l(m){if(Qe(m)){const v=m.toConfig(),b={...v,fields:()=>c(v.fields),interfaces:()=>d(v.interfaces)};return new $n(b)}else if(Xe(m)){const v=m.toConfig(),b={...v,fields:()=>c(v.fields)};return"interfaces"in b&&(b.interfaces=()=>d(v.interfaces)),new Pr(b)}else if(Qt(m)){const v=m.toConfig(),b={...v,types:()=>d(v.types)};return new Na(b)}else if(gt(m)){const v=m.toConfig(),b={...v,fields:()=>f(v.fields)};return new $r(b)}else if(Lt(m)){const v=m.toConfig();return new Er(v)}else if(or(m)){if(Yd(m))return m;const v=m.toConfig();return new Uo(v)}throw new Error(`Unexpected schema type: ${m}`)}function c(m){const v={};for(const b in m){const w=m[b],N=g(w.type);N!=null&&w.args&&(w.type=N,w.args=s(w.args),v[b]=w)}return v}function f(m){const v={};for(const b in m){const w=m[b],N=g(w.type);N!=null&&(w.type=N,v[b]=w)}return v}function d(m){const v=[];for(const b of m){const w=g(b);w!=null&&v.push(w)}return v}function g(m){if(vt(m)){const v=g(m.ofType);return v!=null?new Bt(v):null}else if(He(m)){const v=g(m.ofType);return v!=null?new tt(v):null}else if(ks(m)){let v=n[m.name];return v===void 0&&(v=Vie(m)?jie(m):l(m),r[v.name]=n[m.name]=v),v!=null?r[v.name]:null}return null}}function cy(e,t,n=null,r=null){if(t==null)return t;const o=Ca(e);if(br(o))return n!=null?n(o,t):t;if(vt(o))return mie(t).map(i=>cy(o.ofType,i,n,r));if(gt(o)){const i=o.getFields(),s={};for(const l in t){const c=i[l];c!=null&&(s[l]=cy(c.type,t[l],n,r))}return r!=null?r(o,s):s}}function uy(e,t){return cy(e,t,(n,r)=>{try{return n.serialize(r)}catch{return r}})}function Bie(e,t){return cy(e,t,(n,r)=>{try{return n.parseValue(r)}catch{return r}})}function qie(e,t={}){const n=N$(k$(JT(C$(zie(JT(C$(e.getTypeMap(),e,uy),e,t,l=>br(l)),e,t),e,Bie),e,t,l=>!br(l)),e,t),e,t),r=e.getDirectives(),o=Hie(r,e,t),{typeMap:i,directives:s}=Uie(n,o);return new Ml({...e.toConfig(),query:nf(i,nf(n,e.getQueryType())),mutation:nf(i,nf(n,e.getMutationType())),subscription:nf(i,nf(n,e.getSubscriptionType())),types:Object.values(i),directives:s})}function JT(e,t,n,r=()=>!0){const o={};for(const i in e)if(!i.startsWith("__")){const s=e[i];if(s==null||!r(s)){o[i]=s;continue}const l=Gie(t,n,i);if(l==null){o[i]=s;continue}const c=l(s,t);if(c===void 0){o[i]=s;continue}o[i]=c}return o}function zie(e,t,n){const r=Xie(n);return r?JT(e,t,{[ot.ENUM_TYPE]:o=>{const i=o.toConfig(),s=i.values,l={};for(const c in s){const f=s[c],d=r(f,o.name,t,c);if(d===void 0)l[c]=f;else if(Array.isArray(d)){const[g,m]=d;l[g]=m===void 0?f:m}else d!==null&&(l[c]=d)}return dy(new Er({...i,values:l}))}},o=>Lt(o)):e}function C$(e,t,n){const r=N$(e,t,{[ot.ARGUMENT]:o=>{if(o.defaultValue===void 0)return o;const i=fy(e,o.type);if(i!=null)return{...o,defaultValue:n(i,o.defaultValue)}}});return k$(r,t,{[ot.INPUT_OBJECT_FIELD]:o=>{if(o.defaultValue===void 0)return o;const i=fy(r,o.type);if(i!=null)return{...o,defaultValue:n(i,o.defaultValue)}}})}function fy(e,t){if(vt(t)){const n=fy(e,t.ofType);return n!=null?new Bt(n):null}else if(He(t)){const n=fy(e,t.ofType);return n!=null?new tt(n):null}else if(ks(t)){const n=e[t.name];return n??null}return null}function k$(e,t,n){const r={};for(const o in e)if(!o.startsWith("__")){const i=e[o];if(!Qe(i)&&!Xe(i)&&!gt(i)){r[o]=i;continue}const s=Qie(t,n,o);if(s==null){r[o]=i;continue}const l=i.toConfig(),c=l.fields,f={};for(const d in c){const g=c[d],m=s(g,d,o,t);if(m===void 0)f[d]=g;else if(Array.isArray(m)){const[v,b]=m;b.astNode!=null&&(b.astNode={...b.astNode,name:{...b.astNode.name,value:v}}),f[v]=b===void 0?g:b}else m!==null&&(f[d]=m)}Qe(i)?r[o]=dy(new $n({...l,fields:f})):Xe(i)?r[o]=dy(new Pr({...l,fields:f})):r[o]=dy(new $r({...l,fields:f}))}return r}function N$(e,t,n){const r={};for(const o in e)if(!o.startsWith("__")){const i=e[o];if(!Qe(i)&&!Xe(i)){r[o]=i;continue}const s=Kie(n);if(s==null){r[o]=i;continue}const l=i.toConfig(),c=l.fields,f={};for(const d in c){const g=c[d],m=g.args;if(m==null){f[d]=g;continue}const v=Object.keys(m);if(!v.length){f[d]=g;continue}const b={};for(const w of v){const N=m[w],S=s(N,d,o,t);if(S===void 0)b[w]=N;else if(Array.isArray(S)){const[x,C]=S;b[x]=C}else S!==null&&(b[w]=S)}f[d]={...g,args:b}}Qe(i)?r[o]=new $n({...l,fields:f}):Xe(i)?r[o]=new Pr({...l,fields:f}):r[o]=new $r({...l,fields:f})}return r}function Hie(e,t,n){const r=Jie(n);if(r==null)return e.slice();const o=[];for(const i of e){const s=r(i,t);s===void 0?o.push(i):s!==null&&o.push(s)}return o}function Wie(e,t){var o,i,s;const n=e.getType(t),r=[ot.TYPE];return Qe(n)?(r.push(ot.COMPOSITE_TYPE,ot.OBJECT_TYPE),t===((o=e.getQueryType())==null?void 0:o.name)?r.push(ot.ROOT_OBJECT,ot.QUERY):t===((i=e.getMutationType())==null?void 0:i.name)?r.push(ot.ROOT_OBJECT,ot.MUTATION):t===((s=e.getSubscriptionType())==null?void 0:s.name)&&r.push(ot.ROOT_OBJECT,ot.SUBSCRIPTION)):gt(n)?r.push(ot.INPUT_OBJECT_TYPE):Xe(n)?r.push(ot.COMPOSITE_TYPE,ot.ABSTRACT_TYPE,ot.INTERFACE_TYPE):Qt(n)?r.push(ot.COMPOSITE_TYPE,ot.ABSTRACT_TYPE,ot.UNION_TYPE):Lt(n)?r.push(ot.ENUM_TYPE):or(n)&&r.push(ot.SCALAR_TYPE),r}function Gie(e,t,n){const r=Wie(e,n);let o;const i=[...r];for(;!o&&i.length>0;){const s=i.pop();o=t[s]}return o??null}function Yie(e,t){var o,i,s;const n=e.getType(t),r=[ot.FIELD];return Qe(n)?(r.push(ot.COMPOSITE_FIELD,ot.OBJECT_FIELD),t===((o=e.getQueryType())==null?void 0:o.name)?r.push(ot.ROOT_FIELD,ot.QUERY_ROOT_FIELD):t===((i=e.getMutationType())==null?void 0:i.name)?r.push(ot.ROOT_FIELD,ot.MUTATION_ROOT_FIELD):t===((s=e.getSubscriptionType())==null?void 0:s.name)&&r.push(ot.ROOT_FIELD,ot.SUBSCRIPTION_ROOT_FIELD)):Xe(n)?r.push(ot.COMPOSITE_FIELD,ot.INTERFACE_FIELD):gt(n)&&r.push(ot.INPUT_OBJECT_FIELD),r}function Qie(e,t,n){const r=Yie(e,n);let o;const i=[...r];for(;!o&&i.length>0;){const s=i.pop();o=t[s]}return o??null}function Kie(e){const t=e[ot.ARGUMENT];return t??null}function Jie(e){const t=e[ot.DIRECTIVE];return t??null}function Xie(e){const t=e[ot.ENUM_VALUE];return t??null}function dy(e){if(Qe(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const o=t.fields[r];o.astNode!=null&&n.push(o.astNode)}t.astNode={...t.astNode,kind:U.OBJECT_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:U.OBJECT_TYPE_EXTENSION,fields:void 0}))),new $n(t)}else if(Xe(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const o=t.fields[r];o.astNode!=null&&n.push(o.astNode)}t.astNode={...t.astNode,kind:U.INTERFACE_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:U.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new Pr(t)}else if(gt(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.fields){const o=t.fields[r];o.astNode!=null&&n.push(o.astNode)}t.astNode={...t.astNode,kind:U.INPUT_OBJECT_TYPE_DEFINITION,fields:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,kind:U.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new $r(t)}else if(Lt(e)){const t=e.toConfig();if(t.astNode!=null){const n=[];for(const r in t.values){const o=t.values[r];o.astNode!=null&&n.push(o.astNode)}t.astNode={...t.astNode,values:n}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(n=>({...n,values:void 0}))),new Er(t)}else return e}function XT(e){return e.fieldNodes[0].alias!=null?e.fieldNodes[0].alias.value:e.fieldName}function ZT(e,t,n,r){let o,i,s;r&&(s=f=>{const d=r();return Zt(d)?d.then(()=>f):f}),typeof e.return=="function"&&(o=e.return,i=f=>{const d=()=>Promise.reject(f);return o.call(e).then(d,d)});function l(f){return f.done?s?s(f):f:_$(f.value,t).then(O$,i)}let c;if(n){const f=n;c=d=>_$(d,f).then(O$,i)}return{next(){return e.next().then(l,c)},return(){const f=o?o.call(e).then(l,c):Promise.resolve({value:void 0,done:!0});return s?f.then(s):f},throw(f){return typeof e.throw=="function"?e.throw(f).then(l,c):Promise.reject(f).catch(i)},[Symbol.asyncIterator](){return this}}}function _$(e,t){return new Promise(n=>n(t(e)))}function O$(e){return{value:e,done:!1}}function A$(e,t,n,r,o,i,s){if(e[r]={kind:U.ARGUMENT,name:{kind:U.NAME,value:r},value:{kind:U.VARIABLE,name:{kind:U.NAME,value:o}}},t[o]={kind:U.VARIABLE_DEFINITION,variable:{kind:U.VARIABLE,name:{kind:U.NAME,value:o}},type:YT(i)},s!==void 0){n[o]=s;return}o in n&&delete n[o]}function D$(e){let t=0;return n=>{let r;do r=`_v${(t++).toString()}_${n}`;while(r in e);return r}}function py(e,t,n){return n==null||t==null?!1:t===n?!0:Kt(t)&&Kt(n)?qd(e,t,n):!1}function Zie(e){const t=[],n=[];let r=!0;const o=d=>{t.length!==0?t.shift()({value:d,done:!1}):n.push({value:d,done:!1})},i=d=>{t.length!==0?t.shift()({value:{errors:[d]},done:!1}):n.push({value:{errors:[d]},done:!1})},s=()=>{t.length!==0?t.shift()({done:!0}):n.push({done:!0})},l=()=>new Promise(d=>{if(n.length!==0){const g=n.shift();d(g)}else t.push(d)}),c=e.subscribe({next(d){o(d)},error(d){i(d)},complete(){s()}}),f=()=>{if(r){r=!1,c.unsubscribe();for(const d of t)d({value:void 0,done:!0});t.length=0,n.length=0}};return{next(){return r?l():this.return()},return(){return f(),Promise.resolve({value:void 0,done:!0})},throw(d){return f(),Promise.reject(d)},[Symbol.asyncIterator](){return this}}}class hy extends Map{get[Symbol.toStringTag](){return"AccumulatorMap"}add(t,n){const r=this.get(t);r===void 0?this.set(t,[n]):r.push(n)}}const ese=new Eo({name:"defer",description:"Directs the executor to defer this fragment when the `if` argument is true or undefined.",locations:[Fe.FRAGMENT_SPREAD,Fe.INLINE_FRAGMENT],args:{if:{type:new tt(qt),description:"Deferred when true or undefined.",defaultValue:!0},label:{type:Ft,description:"Unique name"}}}),tse=new Eo({name:"stream",description:"Directs the executor to stream plural fields when the `if` argument is true or undefined.",locations:[Fe.FIELD],args:{if:{type:new tt(qt),description:"Stream when true or undefined.",defaultValue:!0},label:{type:Ft,description:"Unique name"},initialCount:{defaultValue:0,type:zd,description:"Number of items to return immediately"}}});function rf(e,t,n,r,o,i,s,l){for(const c of o.selections)switch(c.kind){case U.FIELD:{if(!tC(n,c))continue;i.add(nse(c),c);break}case U.INLINE_FRAGMENT:{if(!tC(n,c)||!I$(e,c,r))continue;const f=L$(n,c);if(f){const d=new hy;rf(e,t,n,r,c.selectionSet,d,s,l),s.push({label:f.label,fields:d})}else rf(e,t,n,r,c.selectionSet,i,s,l);break}case U.FRAGMENT_SPREAD:{const f=c.name.value;if(!tC(n,c))continue;const d=L$(n,c);if(l.has(f)&&!d)continue;const g=t[f];if(!g||!I$(e,g,r))continue;if(d||l.add(f),d){const m=new hy;rf(e,t,n,r,g.selectionSet,m,s,l),s.push({label:d.label,fields:m})}else rf(e,t,n,r,g.selectionSet,i,s,l);break}}}function eC(e,t,n,r,o){const i=new hy,s=[];return rf(e,t,n,r,o,i,s,new Set),{fields:i,patches:s}}function tC(e,t){const n=Os(_g,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=Os(Ng,t,e);return(r==null?void 0:r.if)!==!1}function I$(e,t,n){const r=t.typeCondition;if(!r)return!0;const o=Yn(e,r);return o===n?!0:Pn(o)?e.getPossibleTypes(o).includes(n):!1}function nse(e){return e.alias?e.alias.value:e.name.value}function L$(e,t){const n=Os(ese,t,e);if(n&&n.if!==!1)return{label:typeof n.label=="string"?n.label:void 0}}const rse=Cie(function(t,n,r,o,i){const s=new hy,l=new Set,c=[],f={fields:s,patches:c};for(const d of i)d.selectionSet&&rf(t,n,r,o,d.selectionSet,s,c,l);return f});function ose(e,t){const n=Lw(e,t);if(!n)throw new Error(`Cannot infer operation ${t||""}`);return n}const fc=js(function(t){return ose(t.document,t.operationName)});function Ka(e){return(e==null?void 0:e[Symbol.asyncIterator])!=null}async function ise(e){return{value:e,done:!0}}const R$=QT(function(t,n){return function(...o){return Reflect.apply(n,t,o)}});function sse(e,t){return new Proxy(e,{has(n,r){return r==="return"?!0:Reflect.has(n,r)},get(n,r,o){const i=Reflect.get(n,r,o);if(r==="return"){const s=i||ise;return async function(c){const f=await t(c);return Reflect.apply(s,n,[f])}}else if(typeof i=="function")return R$(n,i);return i}})}function ase(e,t){return new Proxy(e,{get(n,r,o){const i=Reflect.get(n,r,o);return Symbol.asyncIterator===r?function(){const l=Reflect.apply(i,n,[]);return sse(l,t)}:typeof i=="function"?R$(n,i):i}})}function of(e,t,n){return{prev:e,key:t,typename:n}}function Br(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function lse(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function nC(e,t,n){if(typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t))for(n=0;n<t.length;n++)e[n]=nC(e[n],t[n]);else for(n in t){if(n==="__proto__"||n==="constructor"||n==="prototype")break;e[n]=nC(e[n],t[n])}return e}return t}function rC(e,t,n){t.split&&(t=t.split("."));for(var r=0,o=t.length,i=e,s,l;r<o&&(l=t[r++],!(l==="__proto__"||l==="constructor"||l==="prototype"));)i=i[l]=r===o?nC(i[l],n):typeof(s=i[l])==typeof t?s:t[r]*0!==0||~(""+t[r]).indexOf(".")?{}:[]}function F$({incrementalResult:e,executionResult:t}){const n=["data",...e.path??[]];if(e.items)for(const r of e.items)rC(t,n,r),n[n.length-1]++;e.data&&rC(t,n,e.data),e.errors&&(t.errors=t.errors||[],t.errors.push(...e.errors)),e.extensions&&rC(t,"extensions",e.extensions),e.incremental&&e.incremental.forEach(r=>{F$({incrementalResult:r,executionResult:t})})}function cse(e){return"subscribe"in e}function use(e){let t,n={};return cse(e)?t=e:(t=die({...e,webSocketImpl:u$,lazy:!0,connectionParams:()=>{const r=(typeof e.connectionParams=="function"?e.connectionParams():e.connectionParams)||{};return Object.assign(r,n)}}),e.onClient&&e.onClient(t)),function(o){const{document:i,variables:s,operationName:l,extensions:c,operationType:f=fc(o).operation}=o;c!=null&&c.connectionParams&&typeof(c==null?void 0:c.connectionParams)=="object"&&(n=Object.assign(n,c.connectionParams));const d=ft(i),g=t.iterate({query:d,variables:s,operationName:l,extensions:c});return f==="subscription"?g:g.next().then(({value:m})=>m)}}var M$=globalThis.fetch,fse=globalThis.FormData,dse=globalThis.File,P$=globalThis.TextDecoder,pse=class{constructor({uri:t,name:n,type:r}){this.uri=t,this.name=n,this.type=r}};const hse=pse;var $$=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof hse};const mse=Ui($$),gse=$$;var vse=function(t,n="",r=gse){const o=new Map,i=new Map;function s(l,c,f){let d=l;if(r(l)){d=null;const g=o.get(l);g?g.push(c):o.set(l,[c])}else{const g=Array.isArray(l)||typeof FileList<"u"&&l instanceof FileList,m=l&&l.constructor===Object;if(g||m){const v=i.has(l);if(v?d=i.get(l):(d=g?[]:{},i.set(l,d)),!f.has(l)){const b=c?`${c}.`:"",w=new Set(f).add(l);if(g){let N=0;for(const S of l){const x=s(S,b+N++,w);v||d.push(x)}}else for(const N in l){const S=s(l[N],b+N,w);v||(d[N]=S)}}}}return d}return{clone:s(t,n,new Set),files:o}};const yse=Ui(vse);function bse(e){return typeof e.createReadStream=="function"}function Ese({query:e,variables:t,operationName:n,extensions:r},{File:o=dse,FormData:i=fse}){const s=Object.assign({},t),{clone:l,files:c}=yse(s,"variables",b=>mse(b)||(b==null?void 0:b.promise)||Ka(b)||(b==null?void 0:b.then)||typeof(b==null?void 0:b.arrayBuffer)=="function");if(c.size===0)return JSON.stringify({query:e,variables:t,operationName:n,extensions:r});const f={},d=[];let g=0;for(const[b,w]of c)f[g]=w,d[g]=b,g++;const m=new i;m.append("operations",JSON.stringify({query:e,variables:l,operationName:n,extensions:r})),m.append("map",JSON.stringify(f));function v(b,w){const N=w.toString();if(b!=null){const S=b.filename||b.name||b.path||`blob-${N}`;if(Zt(b))return b.then(x=>v(x,w));if(wse(b))m.append(N,b,S);else if(bse(b)){const x=b.createReadStream(),C=[];return Promise.resolve().then(async()=>{for await(const _ of x)_&&C.push(..._);const E=new Uint8Array(C);m.append(N,new o([E],S,{type:b.mimetype}),S)})}else m.append(N,new o([b],S),S)}}return zt.all(d.map((b,w)=>new zt(()=>v(b,w)))).then(()=>m).resolve()}function wse(e){return typeof e.arrayBuffer=="function"}const V$=new WeakMap;function xse(e){let t=V$.get(e);return t||(t=ft(e),V$.set(e,t)),t}function j$(e,t){return ase(e,()=>{t.signal.aborted||t.abort()})}const U$=`
`;async function*Sse(e){var r,o;const t=new P$;let n="";e:for await(const i of e)for(n+=typeof i=="string"?i:t.decode(i);;){const s=n.indexOf(U$);if(s===-1)continue e;const l=n.slice(0,s);n=n.slice(s+U$.length);const c=(r=l.split("data:")[1])==null?void 0:r.trim();if(c){const d=JSON.parse(c);yield d.payload||d}if(((o=l.split("event:")[1])==null?void 0:o.trim())==="complete")break e}}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var oC=function(e,t){return oC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},oC(e,t)};function Tse(e,t){oC(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function sf(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function l(d){try{f(r.next(d))}catch(g){s(g)}}function c(d){try{f(r.throw(d))}catch(g){s(g)}}function f(d){d.done?i(d.value):o(d.value).then(l,c)}f((r=r.apply(e,t||[])).next())})}function Ja(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(f){return function(d){return c([f,d])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=f[0]&2?o.return:f[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,f[1])).done)return i;switch(o=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){n.label=f[1];break}if(f[0]===6&&n.label<i[1]){n.label=i[1],i=f;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(f);break}i[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(d){f=[6,d],o=0}finally{r=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function af(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function nh(e){return this instanceof nh?(this.v=e,this):new nh(e)}function Cse(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){r[m]&&(o[m]=function(v){return new Promise(function(b,w){i.push([m,v,b,w])>1||l(m,v)})})}function l(m,v){try{c(r[m](v))}catch(b){g(i[0][3],b)}}function c(m){m.value instanceof nh?Promise.resolve(m.value.v).then(f,d):g(i[0][2],m)}function f(m){l("next",m)}function d(m){l("throw",m)}function g(m,v){m(v),i.shift(),i.length&&l(i[0][0],i[0][1])}}var B$=function(e){Tse(t,e);function t(n){var r=e.call(this,n)||this;return Object.defineProperty(r,"name",{value:"RepeaterOverflowError",enumerable:!1}),typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(r,r.constructor.prototype):r.__proto__=r.constructor.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(r,r.constructor),r}return t}(Error);(function(){function e(t){if(t<0)throw new RangeError("Capacity may not be less than 0");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),e.prototype.add=function(t){if(this.full)throw new Error("Buffer full");this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e})(),function(){function e(t){if(t<1)throw new RangeError("Capacity may not be less than 1");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(t){for(;this._q.length>=this._c;)this._q.shift();this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}(),function(){function e(t){if(t<1)throw new RangeError("Capacity may not be less than 1");this._c=t,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return this._q.length===0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(t){this._q.length<this._c&&this._q.push(t)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}();function iC(e){e!=null&&typeof e.then=="function"&&e.then(vy,vy)}var sC=0,q$=1,dc=2,my=3,aC=4,gy=1024,vy=function(){};function lf(e){var t=e.err,n=Promise.resolve(e.execution).then(function(r){if(t!=null)throw t;return r});return e.err=void 0,e.execution=n.then(function(){},function(){}),e.pending===void 0?n:e.pending.then(function(){return n})}function pc(e,t){var n=e.state>=my;return Promise.resolve(t).then(function(r){return!n&&e.state>=aC?lf(e).then(function(o){return{value:o,done:!0}}):{value:r,done:n}})}function lC(e,t){var n,r;if(!(e.state>=dc))if(e.state=dc,e.onnext(),e.onstop(),e.err==null&&(e.err=t),e.pushes.length===0&&(typeof e.buffer>"u"||e.buffer.empty))rh(e);else try{for(var o=af(e.pushes),i=o.next();!i.done;i=o.next()){var s=i.value;s.resolve()}}catch(l){n={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function rh(e){var t,n;if(!(e.state>=my)){e.state<dc&&lC(e),e.state=my,e.buffer=void 0;try{for(var r=af(e.nexts),o=r.next();!o.done;o=r.next()){var i=o.value,s=e.pending===void 0?lf(e):e.pending.then(function(){return lf(e)});i.resolve(pc(e,s))}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.pushes=[],e.nexts=[]}}function z$(e){e.state>=aC||(e.state<my&&rh(e),e.state=aC)}function kse(e,t){if(iC(t),e.pushes.length>=gy)throw new B$("No more than "+gy+" pending calls to push are allowed on a single repeater.");if(e.state>=dc)return Promise.resolve(void 0);var n=e.pending===void 0?Promise.resolve(t):e.pending.then(function(){return t});n=n.catch(function(c){e.state<dc&&(e.err=c),z$(e)});var r;if(e.nexts.length){var o=e.nexts.shift();o.resolve(pc(e,n)),e.nexts.length?r=Promise.resolve(e.nexts[0].value):r=new Promise(function(c){return e.onnext=c})}else typeof e.buffer<"u"&&!e.buffer.full?(e.buffer.add(n),r=Promise.resolve(void 0)):r=new Promise(function(c){return e.pushes.push({resolve:c,value:n})});var i=!0,s={},l=r.catch(function(c){if(i)throw c});return s.then=function(c,f){return i=!1,Promise.prototype.then.call(r,c,f)},s.catch=function(c){return i=!1,Promise.prototype.catch.call(r,c)},s.finally=r.finally.bind(r),e.pending=n.then(function(){return l}).catch(function(c){e.err=c,z$(e)}),s}function Nse(e){var t=lC.bind(null,e),n=new Promise(function(r){return e.onstop=r});return t.then=n.then.bind(n),t.catch=n.catch.bind(n),t.finally=n.finally.bind(n),t}function _se(e){if(!(e.state>=q$)){e.state=q$;var t=kse.bind(null,e),n=Nse(e);e.execution=new Promise(function(r){return r(e.executor(t,n))}),e.execution.catch(function(){return lC(e)})}}var yy=new WeakMap,oh=function(){function e(t,n){yy.set(this,{executor:t,buffer:n,err:void 0,state:sC,pushes:[],nexts:[],pending:void 0,execution:void 0,onnext:vy,onstop:vy})}return e.prototype.next=function(t){iC(t);var n=yy.get(this);if(n===void 0)throw new Error("WeakMap error");if(n.nexts.length>=gy)throw new B$("No more than "+gy+" pending calls to next are allowed on a single repeater.");if(n.state<=sC&&_se(n),n.onnext(t),typeof n.buffer<"u"&&!n.buffer.empty){var r=pc(n,n.buffer.remove());if(n.pushes.length){var o=n.pushes.shift();n.buffer.add(o.value),n.onnext=o.resolve}return r}else if(n.pushes.length){var i=n.pushes.shift();return n.onnext=i.resolve,pc(n,i.value)}else if(n.state>=dc)return rh(n),pc(n,lf(n));return new Promise(function(s){return n.nexts.push({resolve:s,value:t})})},e.prototype.return=function(t){iC(t);var n=yy.get(this);if(n===void 0)throw new Error("WeakMap error");return rh(n),n.execution=Promise.resolve(n.execution).then(function(){return t}),pc(n,lf(n))},e.prototype.throw=function(t){var n=yy.get(this);if(n===void 0)throw new Error("WeakMap error");return n.state<=sC||n.state>=dc||typeof n.buffer<"u"&&!n.buffer.empty?(rh(n),n.err==null&&(n.err=t),pc(n,lf(n))):this.next(Promise.reject(t))},e.prototype[Symbol.asyncIterator]=function(){return this},e.race=Ose,e.merge=Ase,e.zip=Dse,e.latest=Ise,e}();function by(e,t){var n,r,o=[],i=function(f){f!=null&&typeof f[Symbol.asyncIterator]=="function"?o.push(f[Symbol.asyncIterator]()):f!=null&&typeof f[Symbol.iterator]=="function"?o.push(f[Symbol.iterator]()):o.push(function(){return Cse(this,arguments,function(){return Ja(this,function(m){switch(m.label){case 0:return t.yieldValues?[4,nh(f)]:[3,3];case 1:return[4,m.sent()];case 2:m.sent(),m.label=3;case 3:return t.returnValues?[4,nh(f)]:[3,5];case 4:return[2,m.sent()];case 5:return[2]}})})}())};try{for(var s=af(e),l=s.next();!l.done;l=s.next()){var c=l.value;i(c)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}function Ose(e){var t=this,n=by(e,{returnValues:!0});return new oh(function(r,o){return sf(t,void 0,void 0,function(){var i,s,l,c,f,d;return Ja(this,function(g){switch(g.label){case 0:if(!n.length)return o(),[2];s=!1,o.then(function(){i(),s=!0}),g.label=1;case 1:g.trys.push([1,,5,7]),c=void 0,f=0,d=function(){var m,v,b,w,N,S;return Ja(this,function(x){switch(x.label){case 0:m=f;try{for(v=(N=void 0,af(n)),b=v.next();!b.done;b=v.next())w=b.value,Promise.resolve(w.next()).then(function(C){C.done?(o(),l===void 0&&(l=C)):f===m&&(f++,i(C))},function(C){return o(C)})}catch(C){N={error:C}}finally{try{b&&!b.done&&(S=v.return)&&S.call(v)}finally{if(N)throw N.error}}return[4,new Promise(function(C){return i=C})];case 1:return c=x.sent(),c===void 0?[3,3]:[4,r(c.value)];case 2:x.sent(),x.label=3;case 3:return[2]}})},g.label=2;case 2:return s?[3,4]:[5,d()];case 3:return g.sent(),[3,2];case 4:return[2,l&&l.value];case 5:return o(),[4,Promise.race(n.map(function(m){return m.return&&m.return()}))];case 6:return g.sent(),[7];case 7:return[2]}})})})}function Ase(e){var t=this,n=by(e,{yieldValues:!0});return new oh(function(r,o){return sf(t,void 0,void 0,function(){var i,s,l,c=this;return Ja(this,function(f){switch(f.label){case 0:if(!n.length)return o(),[2];i=[],s=!1,o.then(function(){var d,g;s=!0;try{for(var m=af(i),v=m.next();!v.done;v=m.next()){var b=v.value;b()}}catch(w){d={error:w}}finally{try{v&&!v.done&&(g=m.return)&&g.call(m)}finally{if(d)throw d.error}}}),f.label=1;case 1:return f.trys.push([1,,3,4]),[4,Promise.all(n.map(function(d,g){return sf(c,void 0,void 0,function(){var m,v;return Ja(this,function(b){switch(b.label){case 0:b.trys.push([0,,6,9]),b.label=1;case 1:return s?[3,5]:(Promise.resolve(d.next()).then(function(w){return i[g](w)},function(w){return o(w)}),[4,new Promise(function(w){i[g]=w})]);case 2:return m=b.sent(),m===void 0?[3,4]:m.done?(l=m,[2]):[4,r(m.value)];case 3:b.sent(),b.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return v=d.return,v?[4,d.return()]:[3,8];case 7:v=b.sent(),b.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return f.sent(),[2,l&&l.value];case 3:return o(),[7];case 4:return[2]}})})})}function Dse(e){var t=this,n=by(e,{returnValues:!0});return new oh(function(r,o){return sf(t,void 0,void 0,function(){var i,s,l,c;return Ja(this,function(f){switch(f.label){case 0:if(!n.length)return o(),[2,[]];s=!1,o.then(function(){i(),s=!0}),f.label=1;case 1:f.trys.push([1,,6,8]),f.label=2;case 2:return s?[3,5]:(Promise.all(n.map(function(d){return d.next()})).then(function(d){return i(d)},function(d){return o(d)}),[4,new Promise(function(d){return i=d})]);case 3:return l=f.sent(),l===void 0?[2]:(c=l.map(function(d){return d.value}),l.some(function(d){return d.done})?[2,c]:[4,r(c)]);case 4:return f.sent(),[3,2];case 5:return[3,8];case 6:return o(),[4,Promise.all(n.map(function(d){return d.return&&d.return()}))];case 7:return f.sent(),[7];case 8:return[2]}})})})}function Ise(e){var t=this,n=by(e,{yieldValues:!0,returnValues:!0});return new oh(function(r,o){return sf(t,void 0,void 0,function(){var i,s,l,c,f,d=this;return Ja(this,function(g){switch(g.label){case 0:if(!n.length)return o(),[2,[]];s=[],l=!1,o.then(function(){var m,v;i();try{for(var b=af(s),w=b.next();!w.done;w=b.next()){var N=w.value;N()}}catch(S){m={error:S}}finally{try{w&&!w.done&&(v=b.return)&&v.call(b)}finally{if(m)throw m.error}}l=!0}),g.label=1;case 1:return g.trys.push([1,,5,7]),Promise.all(n.map(function(m){return m.next()})).then(function(m){return i(m)},function(m){return o(m)}),[4,new Promise(function(m){return i=m})];case 2:return c=g.sent(),c===void 0?[2]:(f=c.map(function(m){return m.value}),c.every(function(m){return m.done})?[2,f]:[4,r(f.slice())]);case 3:return g.sent(),[4,Promise.all(n.map(function(m,v){return sf(d,void 0,void 0,function(){var b;return Ja(this,function(w){switch(w.label){case 0:if(c[v].done)return[2,c[v].value];w.label=1;case 1:return l?[3,4]:(Promise.resolve(m.next()).then(function(N){return s[v](N)},function(N){return o(N)}),[4,new Promise(function(N){return s[v]=N})]);case 2:return b=w.sent(),b===void 0?[2,c[v].value]:b.done?[2,b.value]:(f[v]=b.value,[4,r(f.slice())]);case 3:return w.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,g.sent()];case 5:return o(),[4,Promise.all(n.map(function(m){return m.return&&m.return()}))];case 6:return g.sent(),[7];case 7:return[2]}})})})}function Lse(e){const t=new P$;return new oh(function(r,o){const i=e.getReader();async function s(){const{done:l,value:c}=await i.read();if(l)return o();if(c){const f=typeof c=="string"?c:t.decode(c,{stream:!0});for(const d of f.split(`
`))if(d){const g=d.split("event: ")[1],m=d.split("data: ")[1];if(g==="complete")return o();if(m){const v=JSON.parse(m);await r(v.payload||v)}}}return s()}return o.finally(()=>i.cancel()),s()})}function Rse(e){return e&&typeof e.getReader=="function"}function Fse(e,t){const n=e.body;if(n){if(Ka(n)){const r=Sse(n);return t?j$(r,t):r}if(Rse(n))return Lse(n)}throw new Error("Response body is expected to be a readable stream but got; "+Kn(n))}async function Mse(e,t){const n=e.headers["content-type"];if(!n||!~n.indexOf("multipart/mixed"))return e;const r=n.indexOf("boundary="),o=r+9,i=n.indexOf(";",o);return async function*(s,l,c){const f=!c||!c.multiple;let d=Buffer.byteLength(l),g=Buffer.alloc(0),m=!0,v=[];e:for await(const b of s){const w=b.indexOf(l);let N=g.byteLength;for(g=Buffer.concat([g,b]),~w?N+=w:N=g.indexOf(l),v=[];~N;){const S=g.slice(0,N),x=g.slice(N+d);if(m)m=!1,l=`\r
`+l,d+=2;else{const C={},E=S.indexOf(`\r
\r
`)+4,_=String(g.slice(0,E)).trim().split(`\r
`);let I;for(;I=_.shift();)I=I.split(": "),C[I.shift().toLowerCase()]=I.join(": ");const D=S.lastIndexOf(`\r
`,E);let A=S.slice(E,D>-1?void 0:D),F=!1;if(I=C["content-type"],I&&~I.indexOf("application/json"))try{A=JSON.parse(String(A)),F=!0}catch{}if(I={headers:C,body:A,json:F},f?yield I:v.push(I),x[0]===45&&x[1]===45)break e}g=x,N=g.indexOf(l)}v.length&&(yield v)}v.length&&(yield v)}(e,`--${~r?n.substring(o,i>-1?i:void 0).replace(/['"]/g,"").trim():"-"}`,t)}function Pse(e){return e!=null&&typeof e=="object"&&"pipe"in e}async function $se(e,t){const n=e.body,r=e.headers.get("content-type")||"";let o;if(Pse(n)){n.headers={"content-type":r};const l=await Mse(n);"next"in l&&(o=l)}else{const l=await ZB(e);"next"in l&&(o=l)}const i={};if(o==null)return i;const s=ZT(o,l=>{if(l.json){const c=l.body;return F$({incrementalResult:c,executionResult:i}),i}});return t?j$(s,t):s}const H$=js(function(t){var n;return t.operation==="query"&&((n=t.directives)==null?void 0:n.some(r=>r.name.value==="live"))});function Vse({baseUrl:e="",query:t,variables:n,operationName:r,extensions:o}){const i="https://dummyhostname.com",s=e.startsWith("http")?e:e!=null&&e.startsWith("/")?`${i}${e}`:`${i}/${e}`,l=new URL(s);return l.searchParams.set("query",H2(t)),n&&Object.keys(n).length>0&&l.searchParams.set("variables",JSON.stringify(n)),r&&l.searchParams.set("operationName",r),o&&l.searchParams.set("extensions",JSON.stringify(o)),l.toString().replace(i,"")}function jse(e){const t=(e==null?void 0:e.print)??xse,n=r=>{var w,N,S,x,C;const o=((w=r.extensions)==null?void 0:w.fetch)??(e==null?void 0:e.fetch)??M$;let i,s=((N=r.extensions)==null?void 0:N.method)||(e==null?void 0:e.method);const l=fc(r),c=l.operation;(e!=null&&e.useGETForQueries||(S=r.extensions)!=null&&S.useGETForQueries)&&c==="query"&&(s="GET");let f="application/graphql-response+json, application/json, multipart/mixed";c==="subscription"||H$(l)?(s||(s="GET"),f="text/event-stream"):s||(s="POST");const d=((x=r.extensions)==null?void 0:x.endpoint)||(e==null?void 0:e.endpoint)||"/graphql",g={accept:f};if(e!=null&&e.headers&&Object.assign(g,typeof(e==null?void 0:e.headers)=="function"?e.headers(r):e==null?void 0:e.headers),(C=r.extensions)!=null&&C.headers){const{headers:E,..._}=r.extensions;Object.assign(g,E),r.extensions=_}const m=t(r.document);let v;e!=null&&e.timeout&&(i=new AbortController,v=setTimeout(()=>{i!=null&&i.signal.aborted||i==null||i.abort("timeout")},e.timeout));const b={};return new zt(()=>{switch(s){case"GET":{const E=Vse({baseUrl:d,query:m,variables:r.variables,operationName:r.operationName,extensions:r.extensions}),_={method:"GET",headers:g,signal:i==null?void 0:i.signal};return(e==null?void 0:e.credentials)!=null&&(_.credentials=e.credentials),o(E,_,r.context,r.info)}case"POST":return new zt(()=>Ese({query:m,variables:r.variables,operationName:r.operationName,extensions:r.extensions},{File:e==null?void 0:e.File,FormData:e==null?void 0:e.FormData})).then(E=>{typeof E=="string"&&!g["content-type"]&&(g["content-type"]="application/json");const _={method:"POST",body:E,headers:g,signal:i==null?void 0:i.signal};return(e==null?void 0:e.credentials)!=null&&(_.credentials=e.credentials),o(d,_,r.context,r.info)}).resolve()}}).then(E=>{if(b.status=E.status,b.statusText=E.statusText,v!=null&&clearTimeout(v),(e==null?void 0:e.retry)!=null&&!E.status.toString().startsWith("2"))throw new Error(E.statusText||`HTTP Error: ${E.status}`);const _=E.headers.get("content-type");return _!=null&&_.includes("text/event-stream")?Fse(E,i):_!=null&&_.includes("multipart/mixed")?$se(E,i):E.text()}).then(E=>{if(typeof E=="string"){if(E)try{const _=JSON.parse(E);return _.data==null&&(_.errors==null||_.errors.length===0)?{errors:[ut('Unexpected empty "data" and "errors" fields',{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b}})]}:_}catch(_){return{errors:[ut(`Unexpected response: ${JSON.stringify(E)}`,{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b},originalError:_})]}}}else return E}).catch(E=>{var _;return typeof E=="string"?{errors:[ut(E,{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b}})]}:E.name==="GraphQLError"?{errors:[E]}:E.name==="TypeError"&&E.message==="fetch failed"?{errors:[ut(`fetch failed to ${d}`,{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b},originalError:E})]}:E.name==="AbortError"&&((_=i==null?void 0:i.signal)!=null&&_.reason)?{errors:[ut("The operation was aborted. reason: "+i.signal.reason,{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b},originalError:E})]}:E.message?{errors:[ut(E.message,{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b},originalError:E})]}:{errors:[ut("Unknown error",{extensions:{requestBody:{query:m,operationName:r.operationName},responseDetails:b},originalError:E})]}}).resolve()};return(e==null?void 0:e.retry)!=null?function(o){let i,s=0;function l(){return s++,s>e.retry?i??{errors:[ut("No response returned from fetch")]}:new zt(()=>n(o)).then(c=>{var f;return i=c,(f=i==null?void 0:i.errors)!=null&&f.length?l():i}).resolve()}return l()}:n}var cf=null;typeof WebSocket<"u"?cf=WebSocket:typeof MozWebSocket<"u"?cf=MozWebSocket:typeof global<"u"?cf=global.WebSocket||global.MozWebSocket:typeof window<"u"?cf=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(cf=self.WebSocket||self.MozWebSocket);const W$=cf;var Jo;(function(e){e.CONNECTION_INIT="connection_init",e.CONNECTION_ACK="connection_ack",e.CONNECTION_ERROR="connection_error",e.CONNECTION_KEEP_ALIVE="ka",e.START="start",e.STOP="stop",e.CONNECTION_TERMINATE="connection_terminate",e.DATA="data",e.ERROR="error",e.COMPLETE="complete"})(Jo||(Jo={}));function Use(e,t,n){let r={},o=null;const i=(l=c=>console.error(c))=>{(o==null||o.readyState!==W$.OPEN)&&(o=new t(e,"graphql-ws",{followRedirects:!0,headers:n==null?void 0:n.headers,rejectUnauthorized:!1,skipUTF8Validation:!0}),o.onopen=()=>{let c={};switch(typeof(n==null?void 0:n.connectionParams)){case"function":c=n==null?void 0:n.connectionParams();break;case"object":c=n==null?void 0:n.connectionParams;break}c=Object.assign(c,r),o.send(JSON.stringify({type:Jo.CONNECTION_INIT,payload:c}),f=>{f&&l(f)})},o.onerror=c=>{l(c.error)},o.onclose=()=>{o=null})},s=()=>{o!=null&&(o.send(JSON.stringify({type:Jo.CONNECTION_TERMINATE})),o.terminate(),o=null)};return function(c){var d,g;(d=c.extensions)!=null&&d.connectionParams&&typeof((g=c.extensions)==null?void 0:g.connectionParams)=="object"&&(r=Object.assign(r,c.extensions.connectionParams));const f=Date.now().toString();return Zie({subscribe(m){function v(b){m.error(b)}if(i(),o==null)throw new Error("WebSocket connection is not found!");return o.onmessage=b=>{const w=JSON.parse(b.data.toString("utf-8"));switch(w.type){case Jo.CONNECTION_ACK:{if(o==null)throw new Error("WebSocket connection is not found!");o.send(JSON.stringify({type:Jo.START,id:f,payload:{query:ft(c.document),variables:c.variables,operationName:c.operationName}}),N=>{N&&v(N)});break}case Jo.CONNECTION_ERROR:{m.error(w.payload);break}case Jo.CONNECTION_KEEP_ALIVE:break;case Jo.DATA:{m.next(w.payload);break}case Jo.COMPLETE:{o!=null&&o.send(JSON.stringify({type:Jo.CONNECTION_TERMINATE}),N=>{N&&v(N)}),m.complete(),s();break}}},{unsubscribe:()=>{(o==null?void 0:o.readyState)===W$.OPEN&&(o==null||o.send(JSON.stringify({type:Jo.STOP,id:f}))),s()}}}})}}const cC=QT(function(t,n){const r=n.transforms;return r==null?t:r.reduce((o,i)=>{var s;return((s=i.transformSchema)==null?void 0:s.call(i,o,n))||o},t)});class Bse{constructor(t){this.schema=t.schema,this.executor=t.executor,this.batch=t.batch,this.batchingOptions=t.batchingOptions,this.createProxyingResolver=t.createProxyingResolver,this.transforms=t.transforms??[],this.merge=t.merge}get transformedSchema(){var t,n;return this._transformedSchema||(((n=(t=globalThis.process)==null?void 0:t.env)==null?void 0:n.DEBUG)!=null&&console.warn("Transformed schema is not set yet. Returning a dummy one."),this._transformedSchema=cC(this.schema,this)),this._transformedSchema}set transformedSchema(t){this._transformedSchema=t}}const uf=Symbol.for("subschemaErrors"),uC=Symbol.for("initialSubschema"),Ey=Symbol.for("subschemaMap");function fC(e){return e[uf]!==void 0}function qse(e,t,n,r){return Object.defineProperties(e,{[uC]:{value:n},[Ey]:{value:r},[uf]:{value:t}}),e}function G$(e,t){return e[Ey][t]??e[uC]}function Y$(e){return e[uf]}const zse=[],wy=Object.create(null),Hse=js(function(e){return[e]});function Wse(e,t,n,r,o){var l;const s=e.delegationPlanBuilder(o.schema,n,o.variableValues!=null&&Object.keys(o.variableValues).length>0?o.variableValues:wy,o.fragments!=null&&Object.keys(o.fragments).length>0?o.fragments:wy,(l=o.fieldNodes)!=null&&l.length?o.fieldNodes.length===1?Hse(o.fieldNodes[0]):o.fieldNodes:zse).reduce((c,f)=>{function d(){return Gse(e,f,t,r,o)}return Zt(c)?c.then(d):d()},void 0);return Zt(s)?s.then(()=>t):t}function xy(e,t,n,r,o,i,s,l){if(e instanceof Error||e==null){const d=t.transformedSchema||i.schema,g=d.getType(r.__typename),{fields:m}=eC(d,wy,wy,g,n),v={};for(const[b,w]of m){const N=[...s,b];e instanceof he?v[b]=GT(e,N):e instanceof Error?v[b]=gn(e,w,N):v[b]=null}e=v}else e[uf]&&l.push(...e[uf]);const c=e[uC],f=e[Ey];for(const d in e){if(d==="__proto__")continue;const g=r[d],m=e[d];(m!=null||g==null)&&(r[d]=m),o[d]=(f==null?void 0:f[d])??c}}function Gse(e,t,n,r,o){const i=n[uf],s=Vr(o.path),l=n[Ey],c=[];for(const[f,d]of t){const m=(f.transformedSchema||o.schema).getType(n.__typename),v=e.resolvers.get(f);if(v)try{const b=v(n,r,o,f,d,void 0,m);Zt(b)?c.push(b.then(w=>xy(w,f,d,n,l,o,s,i)).catch(w=>xy(w,f,d,n,l,o,s,i))):xy(b,f,d,n,l,o,s,i)}catch(b){xy(b,f,d,n,l,o,s,i)}}if(c.length)return c.length===1?c[0]:Promise.all(c)}function ih(e,t,n,r,o,i=Jse(o),s){const l=Ca(i);if(e instanceof Error)return e;if(e==null)return Kse(t);if("parseValue"in l)return l.parseValue(e);if(Kt(l))return Yse(l,e,t,n,r,o,s);if(vt(l))return Array.isArray(e)?Qse(l,e,t,n,r,o,s):ih(e,t,n,r,o,l.ofType,s)}function Yse(e,t,n,r,o,i,s){var g;if(fC(t)||qse(t,n,r,Object.create(null)),s||i==null)return t;const l=(g=i.schema.extensions)==null?void 0:g.stitchingInfo;if(l==null)return t;const c=Pn(e)?t.__typename:e.name,f=l.mergedTypes[c];let d;return f!=null&&(d=f.targetSubschemas.get(r)),!d||!d.length?t:Wse(f,t,r,o,i)}function Qse(e,t,n,r,o,i,s){return t.map(l=>ih(l,n,r,o,i,e.ofType,s))}const Q$=new WeakMap;function Kse(e){if(e.length){const t=[];for(const n of e)Q$.has(n)||(t.push(n),Q$.set(n,!0));if(t.length){if(t.length===1)return t[0];const n=new AggregateError(t,t.map(r=>r.message).join(`,
`));return gn(n,void 0,t[0].path)}}return null}function Jse(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function Xse(e={data:null,errors:[]},t){const{context:n,info:r,fieldName:o=Zse(r),subschema:i,returnType:s=eae(r),skipTypeMerging:l,onLocatedError:c}=t,{data:f,unpathedErrors:d}=K$(e.data==null?void 0:e.data[o],e.errors==null?[]:e.errors,r!=null&&r.path?Vr(r.path):void 0,c);return ih(f,d,i,n,r,s,l)}function K$(e,t,n,r,o=1){var l;if(e==null){if(!t.length)return{data:null,unpathedErrors:[]};if(t.length===1){const d=r?r(t[0]):t[0],g=n===void 0?d.path:d.path?n.concat(d.path.slice(1)):n;return{data:GT(t[0],g),unpathedErrors:[]}}const c=new AggregateError(t,t.map(d=>d.message).join(`,
`));return{data:gn(c,void 0,n),unpathedErrors:[]}}if(!t.length)return{data:e,unpathedErrors:[]};const i=[],s=new Map;for(const c of t){const f=(l=c.path)==null?void 0:l[o];if(f!=null){let d=s.get(f);d===void 0?(d=[c],s.set(f,d)):d.push(c)}else i.push(c)}for(const[c,f]of s)if(e[c]!==void 0){const{data:d,unpathedErrors:g}=K$(e[c],f,n,r,o+1);e[c]=d,i.push(...g)}else i.push(...f);return{data:e,unpathedErrors:i}}function Zse(e){if(e==null)throw new Error("Data cannot be extracted from result without an explicit key or source schema.");return XT(e)}function eae(e){if(e==null)throw new Error("Return type cannot be inferred without a source schema.");return e.returnType}function J$(e){const t=[],n=[],r=new Set;for(let o=0;o<e.definitions.length;o++){const i=e.definitions[o];i.kind===U.FRAGMENT_DEFINITION?(n.push(i),r.add(i.name.value)):i.kind===U.OPERATION_DEFINITION&&t.push(i)}return{operations:t,fragments:n,fragmentNames:r}}function tae(e,t,n){let r=[],o=[];const i=[];let s=[];const l=[],c=Object.create(null);for(const g of t){const m=g.typeCondition.name.value,v=e.getType(m);v!=null&&(l.push(g),c[g.name.value]=v)}let f=Object.create(null);for(const g of n){const m=ly(e,g.operation),{selectionSet:v,usedFragments:b,usedVariables:w}=X$(e,m,c,g.selectionSet);o=sh(o,b);const{usedVariables:N,newFragments:S,fragmentSet:x}=iae(e,f,l,c,o),C=sh(w,N);r=sh(r,C),s=S,f=x;const E=(g.variableDefinitions??[]).filter(_=>C.indexOf(_.variable.name.value)!==-1);g.operation==="subscription"&&(v.selections=v.selections.filter(_=>_.kind!==U.FIELD||_.name.value!=="__typename")),i.push({kind:U.OPERATION_DEFINITION,operation:g.operation,name:g.name,directives:g.directives,variableDefinitions:E,selectionSet:v})}const d={kind:U.DOCUMENT,definitions:[...i,...s]};return{usedVariables:r,newDocument:d}}function nae(e,t){let{document:n,variables:r}=e,{operations:o,fragments:i}=J$(n);const{targetSchema:s,args:l}=t;if(l){const g=rae(s,o,l);o=g.newOperations,r=Object.assign({},r??{},g.newVariables)}const{usedVariables:c,newDocument:f}=tae(s,i,o),d={};if(r!=null)for(const g of c){const m=r[g];m!==void 0&&(d[g]=m)}return{...e,document:f,variables:d}}function rae(e,t,n){const r=Object.create(null);return{newOperations:t.map(i=>{const s=(i.variableDefinitions??[]).reduce((d,g)=>({...d,[g.variable.name.value]:g}),{}),l=ly(e,i.operation),c=[];for(const d of i.selectionSet.selections)if(d.kind===U.FIELD){const m=(d.arguments??[]).reduce((b,w)=>({...b,[w.name.value]:w}),{}),v=l.getFields()[d.name.value];v!=null&&oae(v,m,s,r,n),c.push({...d,arguments:Object.values(m)})}else c.push(d);const f={kind:U.SELECTION_SET,selections:c};return{...i,variableDefinitions:Object.values(s),selectionSet:f}}),newVariables:r}}function oae(e,t,n,r,o){const i=D$(n);for(const s of e.args){const l=s.name,c=s.type;l in o&&A$(t,n,r,l,i(l),c,uy(c,o[l]))}}function iae(e,t,n,r,o){let i=o.slice(),s=[];const l=[];for(;i.length!==0;){const c=i.pop(),f=n.find(d=>d.name.value===c);if(f!=null){const d=c,g=f.typeCondition.name.value,m=e.getType(g);if(m==null)throw new Error(`Fragment reference type "${g}", but the type is not contained within the target schema.`);const{selectionSet:v,usedFragments:b,usedVariables:w}=X$(e,m,r,f.selectionSet);i=sh(i,b),s=sh(s,w),d&&!(d in t)&&(t[d]=!0,l.push({kind:U.FRAGMENT_DEFINITION,name:{kind:U.NAME,value:d},typeCondition:f.typeCondition,selectionSet:v}))}}return{usedVariables:s,newFragments:l,fragmentSet:t}}const sae={SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]},aae={SelectionSet:["selections"],Field:["arguments","directives","selectionSet"],Argument:["value"],InlineFragment:["directives","selectionSet"],FragmentSpread:["directives"],FragmentDefinition:["selectionSet"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["arguments"],ListValue:["values"]};function X$(e,t,n,r){const o=[],i=[],s=UE.major<16?new _s(e,void 0,t):new _s(e,t),l=fn(r,$l(s,{[U.FIELD]:{enter:c=>{const f=s.getParentType();if(Qe(f)||Xe(f)){const d=f.getFields(),g=c.name.value==="__typename"?wo:d[c.name.value];if(!g)return null;const m=g.args!=null?g.args:[],v=Object.create(null);for(const b of m)v[b.name]=b;if(c.arguments!=null){const b=[];for(const w of c.arguments)w.name.value in v&&b.push(w);if(b.length!==c.arguments.length)return{...c,arguments:b}}}},leave:c=>{const f=s.getType();if(f==null)throw new Error(`No type was found for field node ${Kn(c)}.`);const d=Et(f);if(!e.getType(d.name)==null)return null;if(Qe(d)||Xe(d)){const g=c.selectionSet!=null?c.selectionSet.selections:null;if(g==null||g.length===0)return null}}},[U.FRAGMENT_SPREAD]:{enter:c=>{if(!(c.name.value in n))return null;const f=s.getParentType(),d=n[c.name.value];if(!py(e,f,d))return null;o.push(c.name.value)}},[U.INLINE_FRAGMENT]:{enter:c=>{if(c.typeCondition!=null){const f=s.getParentType(),d=e.getType(c.typeCondition.name.value);if(!py(e,f,d))return null}}},[U.SELECTION_SET]:{leave:c=>{const f=s.getParentType();if(f!=null&&Pn(f)){const d=c.selections.concat([{kind:U.FIELD,name:{kind:U.NAME,value:"__typename"}}]);return{...c,selections:d}}}}}),sae);return fn(l,{[U.VARIABLE]:c=>{i.push(c.name.value)}},aae),{selectionSet:l,usedFragments:o,usedVariables:i}}function sh(...e){const t=Object.create(null),n=[];for(const r of e)for(const o of r)o in t||(t[o]=!0,n.push(o));return n}function lae(e,t,n,r){const o=pae(n,t,e);if(r==null)return o;const{possibleTypesMap:i,reversePossibleTypesMap:s,interfaceExtensionsMap:l,fieldNodesByType:c,fieldNodesByField:f,dynamicSelectionSetsByField:d}=uae(r,t),{operations:g,fragments:m,fragmentNames:v}=J$(o),{expandedFragments:b,fragmentReplacements:w}=dae(m,v,i),N=new _s(t),S={kind:U.DOCUMENT,definitions:[...g,...m,...b]},x={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],Field:["selectionSet"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return fn(S,$l(N,{[U.SELECTION_SET]:C=>cae(C,w,t,N,i,s,l,c,f,d)}),x)}function cae(e,t,n,r,o,i,s,l,c,f){var m,v;const d=new Set,g=r.getParentType();if(g!=null){const b=Et(g),w=b.name,N=l[w];if(N)for(const C of N)d.add(C);const S=s[b.name],x=[];for(const C of e.selections)if(C.kind===U.INLINE_FRAGMENT){if(C.typeCondition!=null){const E=o[C.typeCondition.name.value];if(E==null){d.add(C);continue}for(const _ of E){const I=n.getType(_);I!=null&&py(n,b,I)&&d.add(Z$(_,C.selectionSet))}}}else if(C.kind===U.FRAGMENT_SPREAD){const E=C.name.value;if(!t[E]){d.add(C);continue}for(const _ of t[E]){const I=_.typeName;n.getType(I)!=null&&py(n,b,g)&&d.add({kind:U.FRAGMENT_SPREAD,name:{kind:U.NAME,value:_.fragmentName}})}}else{const E=C.name.value,_=(m=c[w])==null?void 0:m[E];if(_!=null)for(const D of _)d.add(D);const I=(v=f[w])==null?void 0:v[E];if(I!=null)for(const D of I){const A=D(C);if(A!=null)for(const F of A.selections)d.add(F)}S!=null&&S[E]?x.push(C):d.add(C)}if(i[b.name]&&d.add({kind:U.FIELD,name:{kind:U.NAME,value:"__typename"}}),x.length){const C=o[b.name];if(C!=null)for(const E of C)d.add(Z$(E,{kind:U.SELECTION_SET,selections:x}))}return{...e,selections:Array.from(d)}}return e}function Z$(e,t){return{kind:U.INLINE_FRAGMENT,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:e}},selectionSet:t}}const uae=QT((e,t)=>{var l;const n=e.getTypeMap(),r=t.getTypeMap(),o=Object.create(null),i=Object.create(null);for(const c in n){const f=n[c];if(Pn(f)){const d=r[c];if(Xe(f)&&Xe(d)){const g=d.getFields(),m=f.getFields(),v=Object.create(null);let b=!0;for(const w in m)g[w]||(v[w]=!0,b=!1);b||(i[c]=v)}if(i[c]||!Pn(d)){const g=e.getPossibleTypes(f);o[c]=[];for(const m of g)r[m.name]&&o[c].push(m.name)}}}const s=(l=e.extensions)==null?void 0:l.stitchingInfo;return{possibleTypesMap:o,reversePossibleTypesMap:fae(o),interfaceExtensionsMap:i,fieldNodesByType:(s==null?void 0:s.fieldNodesByType)??{},fieldNodesByField:(s==null?void 0:s.fieldNodesByField)??{},dynamicSelectionSetsByField:(s==null?void 0:s.dynamicSelectionSetsByField)??{}}});function fae(e){const t=Object.create(null);for(const n in e){const r=e[n];for(const o of r)t[o]||(t[o]=[]),t[o].push(n)}return t}function dae(e,t,n){let r=0;function o(l){let c;do c=`_${l}_Fragment${r.toString()}`,r++;while(t.has(c));return c}const i=[],s=Object.create(null);for(const l of e){const c=n[l.typeCondition.name.value];if(c!=null){const f=l.name.value;s[f]=[];for(const d of c){const g=o(d);t.add(g),i.push({kind:U.FRAGMENT_DEFINITION,name:{kind:U.NAME,value:g},typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:d}},selectionSet:l.selectionSet}),s[f].push({fragmentName:g,typeName:d})}}}return{expandedFragments:i,fragmentReplacements:s}}function pae(e,t,n){const r=Et(e);if(!Kt(r))return n;const o=Nie(t),i=new _s(t),s={Document:["definitions"],OperationDefinition:["selectionSet"],SelectionSet:["selections"],InlineFragment:["selectionSet"],FragmentDefinition:["selectionSet"]};return fn(n,$l(i,{[U.FRAGMENT_DEFINITION]:l=>{const c=l.typeCondition.name.value;if(!o.has(c))return!1},[U.FIELD]:l=>{let c=i.getType();if(c=He(c)?c.ofType:c,c!=null&&Pn(Et(c))&&(!Qt(c)||c.name==="_Entity"))return{...l,selectionSet:{kind:U.SELECTION_SET,selections:[{kind:U.INLINE_FRAGMENT,typeCondition:{kind:U.NAMED_TYPE,name:{kind:U.NAME,value:r.name}},selectionSet:l.selectionSet}]}}}}),s)}class hae{constructor(t){this.transformations=[],this.delegationContext=t;const r=t.transforms.slice().reverse();for(const o of r)this.addTransform(o,{})}addTransform(t,n={}){this.transformations.push({transform:t,context:n})}transformRequest(t){var r;let n={...t,document:lae(t.document,this.delegationContext.transformedSchema,this.delegationContext.returnType,(r=this.delegationContext.info)==null?void 0:r.schema)};for(const o of this.transformations)o.transform.transformRequest&&(n=o.transform.transformRequest(n,this.delegationContext,o.context));return nae(n,this.delegationContext)}transformResult(t){let n=t;for(let r=this.transformations.length-1;r>=0;r--){const o=this.transformations[r];o.transform.transformResult&&(n=o.transform.transformResult(n,this.delegationContext,o.context))}return Xse(n,this.delegationContext)}}function mae(e,t){return e===t.getMutationType()?"mutation":e===t.getSubscriptionType()?"subscription":"query"}function gae({sourceSchema:e,sourceParentType:t,sourceFieldName:n,fragments:r,variableDefinitions:o,variableValues:i,targetRootValue:s,targetOperationName:l,targetOperation:c,targetFieldName:f,selectionSet:d,fieldNodes:g,context:m,info:v}){var A,F;let b;const w=Object.create(null);if(d!=null)b=d;else{const $=[];for(const H of g||[])if(H.selectionSet)for(const z of H.selectionSet.selections)$.push(z);b=$.length?{kind:U.SELECTION_SET,selections:$}:void 0;const q=(A=g==null?void 0:g[0])==null?void 0:A.arguments;if(q)for(const H of q)w[H.name.value]=H}const N=Object.create(null),S=Object.create(null);if(e!=null&&o!=null)for(const $ of o){const q=$.variable.name.value;S[q]=$;const H=Yn(e,$.type),z=uy(H,i==null?void 0:i[q]);z!==void 0&&(N[q]=z)}t!=null&&n!=null&&vae(t,n,w,S,N);const x=f??((F=g==null?void 0:g[0])==null?void 0:F.name.value);if(x===void 0)throw new Error('Either "targetFieldName" or a non empty "fieldNodes" array must be provided.');const C={kind:U.FIELD,arguments:Object.values(w),name:{kind:U.NAME,value:x},selectionSet:b},E=l?{kind:U.NAME,value:l}:void 0,I=[{kind:U.OPERATION_DEFINITION,name:E,operation:c,variableDefinitions:Object.values(S),selectionSet:{kind:U.SELECTION_SET,selections:[C]}}];if(r!=null)for(const $ in r){const q=r[$];I.push(q)}return{document:{kind:U.DOCUMENT,definitions:I},variables:N,rootValue:s,operationName:l,context:m,info:v,operationType:c}}function vae(e,t,n,r,o){const i=D$(r),s=e.getFields()[t];if(!s)throw new Error(`Field "${t}" was not found in type "${e}".`);for(const l of s.args){const c=l.name,f=l.type;if(n[c]===void 0){const d=l.defaultValue;d!==void 0&&A$(n,r,o,c,i(c),f,uy(f,d))}}}function yae(e,t,n,r){if(!e)return null;const o=XT(r);if(!fC(e))return Xg(e,t,n,r);const i=e[o],s=Y$(e),l=G$(e,o);return ih(i,s,l,n,r)}var bae=function(){function e(n,r){if(typeof n!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array<key> and returns Promise<Array<value>>, but got: "+n+"."));this._batchLoadFn=n,this._maxBatchSize=Sae(r),this._batchScheduleFn=Tae(r),this._cacheKeyFn=Cae(r),this._cacheMap=kae(r),this._batch=null,this.name=Nae(r)}var t=e.prototype;return t.load=function(r){if(r==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(r)+"."));var o=wae(this),i=this._cacheMap,s=this._cacheKeyFn(r);if(i){var l=i.get(s);if(l){var c=o.cacheHits||(o.cacheHits=[]);return new Promise(function(d){c.push(function(){d(l)})})}}o.keys.push(r);var f=new Promise(function(d,g){o.callbacks.push({resolve:d,reject:g})});return i&&i.set(s,f),f},t.loadMany=function(r){if(!e4(r))throw new TypeError("The loader.loadMany() function must be called with Array<key> "+("but got: "+r+"."));for(var o=[],i=0;i<r.length;i++)o.push(this.load(r[i]).catch(function(s){return s}));return Promise.all(o)},t.clear=function(r){var o=this._cacheMap;if(o){var i=this._cacheKeyFn(r);o.delete(i)}return this},t.clearAll=function(){var r=this._cacheMap;return r&&r.clear(),this},t.prime=function(r,o){var i=this._cacheMap;if(i){var s=this._cacheKeyFn(r);if(i.get(s)===void 0){var l;o instanceof Error?(l=Promise.reject(o),l.catch(function(){})):l=Promise.resolve(o),i.set(s,l)}}return this},e}(),Eae=typeof process=="object"&&typeof process.nextTick=="function"?function(e){dC||(dC=Promise.resolve()),dC.then(function(){process.nextTick(e)})}:typeof setImmediate=="function"?function(e){setImmediate(e)}:function(e){setTimeout(e)},dC;function wae(e){var t=e._batch;if(t!==null&&!t.hasDispatched&&t.keys.length<e._maxBatchSize)return t;var n={hasDispatched:!1,keys:[],callbacks:[]};return e._batch=n,e._batchScheduleFn(function(){xae(e,n)}),n}function xae(e,t){if(t.hasDispatched=!0,t.keys.length===0){hC(t);return}var n;try{n=e._batchLoadFn(t.keys)}catch(r){return pC(e,t,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function "+("errored synchronously: "+String(r)+".")))}if(!n||typeof n.then!="function")return pC(e,t,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise: "+String(n)+".")));n.then(function(r){if(!e4(r))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise of an Array: "+String(r)+"."));if(r.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(`
Keys:
`+String(t.keys))+(`
Values:
`+String(r)));hC(t);for(var o=0;o<t.callbacks.length;o++){var i=r[o];i instanceof Error?t.callbacks[o].reject(i):t.callbacks[o].resolve(i)}}).catch(function(r){pC(e,t,r)})}function pC(e,t,n){hC(t);for(var r=0;r<t.keys.length;r++)e.clear(t.keys[r]),t.callbacks[r].reject(n)}function hC(e){if(e.cacheHits)for(var t=0;t<e.cacheHits.length;t++)e.cacheHits[t]()}function Sae(e){var t=!e||e.batch!==!1;if(!t)return 1;var n=e&&e.maxBatchSize;if(n===void 0)return 1/0;if(typeof n!="number"||n<1)throw new TypeError("maxBatchSize must be a positive number: "+n);return n}function Tae(e){var t=e&&e.batchScheduleFn;if(t===void 0)return Eae;if(typeof t!="function")throw new TypeError("batchScheduleFn must be a function: "+t);return t}function Cae(e){var t=e&&e.cacheKeyFn;if(t===void 0)return function(n){return n};if(typeof t!="function")throw new TypeError("cacheKeyFn must be a function: "+t);return t}function kae(e){var t=!e||e.cache!==!1;if(!t)return null;var n=e&&e.cacheMap;if(n===void 0)return new Map;if(n!==null){var r=["get","set","delete","clear"],o=r.filter(function(i){return n&&typeof n[i]!="function"});if(o.length!==0)throw new TypeError("Custom cacheMap missing methods: "+o.join(", "))}return n}function Nae(e){return e&&e.name?e.name:null}function e4(e){return typeof e=="object"&&e!==null&&typeof e.length=="number"&&(e.length===0||e.length>0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}var _ae=bae;const t4=Ui(_ae);function Oae(e){return`_${e}_`}function n4(e){const t=/^_(\d+)_(.*)$/.exec(e);return t&&t.length===3&&!isNaN(Number(t[1]))&&t[2]?{index:Number(t[1]),originalKey:t[2]}:null}function Aae(e){const t=n4(e);if(!t)throw new Error(`Key ${e} is not correctly prefixed`);return t}function Dae(e){let t=0,n=null;for(;!n&&t<e.length;t++){const r=e[t];typeof r=="string"&&(n=n4(r))}if(!n)throw new Error(`Path ${e.join(".")} does not contain correctly prefixed key`);return{...n,keyOffset:t}}function Iae(e,t){var g,m,v;const n=Object.create(null),r=[],o=[],i=[];let s=Object.create(null);for(let b=0;b<e.length;b++){const w=e[b],N=Lae(Oae(b),w);for(const S of N.document.definitions)Pae(S)&&(o.push(...S.selectionSet.selections),S.variableDefinitions&&r.push(...S.variableDefinitions)),Sy(S)&&i.push(S);Object.assign(n,N.variables),s=t(s,w)}const l=e[0],c=l.operationType??fc(l).operation,f={kind:U.OPERATION_DEFINITION,operation:c,variableDefinitions:r,selectionSet:{kind:U.SELECTION_SET,selections:o}},d=l.operationName??((v=(m=(g=l.info)==null?void 0:g.operation)==null?void 0:m.name)==null?void 0:v.value);return d&&(f.name={kind:U.NAME,value:d}),{document:{kind:U.DOCUMENT,definitions:[f,...i]},variables:n,extensions:s,context:e[0].context,info:e[0].info,operationType:c,rootValue:e[0].rootValue}}function Lae(e,t){const n=t.variables??{};function r(f){return i4(f,e)}let o=Rae(e,t.document);const i=Object.keys(n),s=t.document.definitions.some(f=>Sy(f)),l={};(i.length>0||s)&&(o=fn(o,{[U.VARIABLE]:r,[U.FRAGMENT_DEFINITION]:r,[U.FRAGMENT_SPREAD]:f=>(f=i4(f,e),l[f.name.value]=!0,f)}));const c={};for(const f of i)c[e+f]=n[f];return s&&(o={...o,definitions:o.definitions.filter(f=>!Sy(f)||l[f.name.value])}),{document:o,variables:c}}function Rae(e,t){const n={[U.OPERATION_DEFINITION]:r=>{const{selections:o}=r.selectionSet;return{...r,selectionSet:{...r.selectionSet,selections:r4(e,o,t)}}}};return fn(t,n,{[U.DOCUMENT]:["definitions"]})}function r4(e,t,n){return t.map(r=>{switch(r.kind){case U.INLINE_FRAGMENT:return o4(e,r,n);case U.FRAGMENT_SPREAD:{const o=Fae(r,n);return o4(e,o,n)}case U.FIELD:default:return Mae(r,e)}})}function o4(e,t,n){const{selections:r}=t.selectionSet;return{...t,selectionSet:{...t.selectionSet,selections:r4(e,r,n)}}}function Fae(e,t){const n=t.definitions.find(i=>Sy(i)&&i.name.value===e.name.value);if(!n)throw new Error(`Fragment ${e.name.value} does not exist`);const{typeCondition:r,selectionSet:o}=n;return{kind:U.INLINE_FRAGMENT,typeCondition:r,selectionSet:o,directives:e.directives}}function i4(e,t){return{...e,name:{...e.name,value:t+e.name.value}}}function Mae(e,t){const n=e.alias?e.alias:e.name;return{...e,alias:{...n,value:t+n.value}}}function Pae(e){return e.kind===U.OPERATION_DEFINITION}function Sy(e){return e.kind===U.FRAGMENT_DEFINITION}function $ae({data:e,errors:t},n){const r=[];for(let o=0;o<n;o++)r.push({});if(e)for(const o in e){const{index:i,originalKey:s}=Aae(o),l=r[i];l!=null&&(l.data==null?l.data={[s]:e[o]}:l.data[s]=e[o])}if(t)for(const o of t)if(o.path){const{index:i,originalKey:s,keyOffset:l}=Dae(o.path),c=GT(o,[s,...o.path.slice(l)]);(r[i].errors=r[i].errors||[]).push(c)}else r.forEach(i=>{(i.errors=i.errors||[]).push(o)});return r}function Vae(e,t,n=Uae){const r=jae(e,n),o=new t4(r,t),i=new t4(r,t);return function(l){var f;const c=l.operationType??((f=fc(l))==null?void 0:f.operation);switch(c){case"query":return o.load(l);case"mutation":return i.load(l);case"subscription":return e(l);default:throw new Error(`Invalid operation type "${c}"`)}}}function jae(e,t){return function(r){if(r.length===1)return new zt(()=>e(r[0])).then(i=>[i]).catch(i=>[i]);const o=Iae(r,t);return new zt(()=>e(o)).then(i=>{if(Ka(i))throw new Error("Executor must not return incremental results for batching");return $ae(i,r.length)})}}function Uae(e,t){const n=t.extensions;return n!=null&&Object.assign(e,n),e}const Bae=kie(function(t,n,r,o){return Vae(n,r,o)});function qae(e){const t=e[Symbol.asyncIterator]();let n,r,o=!1;async function i(){if(o)return{value:void 0,done:!0};try{if(!n){if(r)return await r,await i();let c;r=new Promise(d=>{c=d});const f=await t.next();return f.done?(o=!0,await i()):(n=f.value[Symbol.asyncIterator](),r=void 0,c(),await i())}const s=n,l=await n.next();return l.done?(n===s&&(n=void 0),await i()):l}catch(s){throw o=!0,s}}return{next:i,async return(){var s,l;return o=!0,await Promise.all([(s=n==null?void 0:n.return)==null?void 0:s.call(n),(l=t.return)==null?void 0:l.call(t)]),{value:void 0,done:!0}},async throw(s){var l,c;throw o=!0,await Promise.all([(l=n==null?void 0:n.throw)==null?void 0:l.call(n,s),(c=t.throw)==null?void 0:c.call(t,s)]),s},[Symbol.asyncIterator](){return this}}}function s4(e,t){if(!e)throw new Error(t??"Unexpected invariant triggered.")}async function a4(e,t){const n=Object.create(null);return await new Promise((r,o)=>{t==null||t.addEventListener("abort",()=>{o(t.reason)}),Promise.all(Object.entries(e).map(async([i,s])=>{n[i]=await s})).then(()=>r(),o)}),n}function zae(e,t,n,r){const o=[],i=r==null?void 0:r.maxErrors;try{const s=Hae(e,t,n,l=>{if(i!=null&&o.length>=i)throw ut("Too many errors processing variables, error limit reached. Execution aborted.");o.push(l)});if(o.length===0)return{coerced:s}}catch(s){o.push(s)}return{errors:o}}function Hae(e,t,n,r){const o={};for(const i of t){const s=i.variable.name.value,l=Yn(e,i.type);if(!ir(l)){const f=ft(i.type);r(ut(`Variable "$${s}" expected value of type "${f}" which cannot be used as an input type.`,{nodes:i.type}));continue}if(!y$(n,s)){if(i.defaultValue)o[s]=Ho(i.defaultValue,l);else if(He(l)){const f=Kn(l);r(ut(`Variable "$${s}" of required type "${f}" was not provided.`,{nodes:i}))}continue}const c=n[s];if(c===null&&He(l)){const f=Kn(l);r(ut(`Variable "$${s}" of non-null type "${f}" must not be null.`,{nodes:i}));continue}o[s]=xw(c,l,(f,d,g)=>{let m=`Variable "$${s}" got invalid value `+Kn(d);f.length>0&&(m+=` at "${s}${lse(f)}"`),r(ut(m+"; "+g.message,{nodes:i,originalError:g.originalError}))})}return o}const Wae=Tie((e,t,n)=>rse(e.schema,e.fragments,e.variableValues,t,n));function Gae(e){const t=u4(e);return"schema"in t?l4(t):{errors:t.map(n=>{var r;return Object.defineProperty(n,"extensions",{value:{...n.extensions,http:{...(r=n.extensions)==null?void 0:r.http,status:400}}}),n})}}function l4(e){var n;if((n=e.signal)!=null&&n.aborted)throw e.signal.reason;return new zt(()=>Kae(e)).then(r=>{const o=c4(r,e.errors);return e.subsequentPayloads.size>0?{initialResult:{...o,hasNext:!0},subsequentResults:fle(e)}:o},r=>{var o;if((o=e.signal)!=null&&o.aborted)throw e.signal.reason;return e.errors.push(r),c4(null,e.errors)}).resolve()}function c4(e,t){return t.length===0?{data:e}:{errors:t,data:e}}const Yae=js(function(t){const n=Object.create(null);for(const r of t.definitions)r.kind===U.FRAGMENT_DEFINITION&&(n[r.name.value]=r);return n});function u4(e){var w;const{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:l,typeResolver:c,subscribeFieldResolver:f,signal:d}=e;Rg(t);const g=Yae(n);let m;for(const N of n.definitions)switch(N.kind){case U.OPERATION_DEFINITION:if(s==null){if(m!==void 0)return[ut("Must provide operation name if query contains multiple operations.")];m=N}else((w=N.name)==null?void 0:w.value)===s&&(m=N);break}if(m==null)return s!=null?[ut(`Unknown operation named "${s}".`)]:[ut("Must provide an operation.")];const v=m.variableDefinitions??[],b=zae(t,v,i??{},{maxErrors:50});return b.errors?b.errors:{schema:t,fragments:g,rootValue:r,contextValue:o,operation:m,variableValues:b.coerced,fieldResolver:l??y4,typeResolver:c??nle,subscribeFieldResolver:f??y4,subsequentPayloads:new Set,errors:[],signal:d}}function Qae(e,t){return{...e,rootValue:t,subsequentPayloads:new Set,errors:[]}}function Kae(e){const{operation:t,schema:n,fragments:r,variableValues:o,rootValue:i}=e,s=ly(n,t.operation,[t]);s==null&&ut(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const{fields:l,patches:c}=eC(n,r,o,s,t.selectionSet),f=void 0;let d;t.operation==="mutation"?d=Jae(e,s,i,f,l):d=mC(e,s,i,f,l);for(const g of c){const{label:m,fields:v}=g;x4(e,s,i,v,m,f)}return d}function Jae(e,t,n,r,o){return Sie(o,(i,[s,l])=>{var f;const c=of(r,s,t.name);if((f=e.signal)!=null&&f.aborted)throw e.signal.reason;return new zt(()=>f4(e,t,n,l,c)).then(d=>(d===void 0||(i[s]=d),i))},Object.create(null)).resolve()}function mC(e,t,n,r,o,i){var c;const s=Object.create(null);let l=!1;try{for(const[f,d]of o){if((c=e.signal)!=null&&c.aborted)throw e.signal.reason;const g=of(r,f,t.name),m=f4(e,t,n,d,g,i);m!==void 0&&(s[f]=m,Zt(m)&&(l=!0))}}catch(f){if(l)return a4(s,e.signal).finally(()=>{throw f});throw f}return l?a4(s,e.signal):s}function f4(e,t,n,r,o,i){const s=(i==null?void 0:i.errors)??e.errors,l=T4(e.schema,t,r[0]);if(!l)return;const c=l.type,f=l.resolve??e.fieldResolver,d=d4(e,l,r,t,o);try{const g=b$(l,r[0],e.variableValues),m=e.contextValue,v=f(n,g,m,d);let b;return Zt(v)?b=v.then(w=>Xa(e,c,r,d,o,w,i)):b=Xa(e,c,r,d,o,v,i),Zt(b)?b.then(void 0,w=>{const N=gn(w,r,Br(o)),S=ts(N,c,s);return Xo(e,o,i),S}):b}catch(g){const m=gn(g,r,Br(o)),v=ts(m,c,s);return Xo(e,o,i),v}}function d4(e,t,n,r,o){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:o,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function ts(e,t,n){if(He(t))throw e;return n.push(e),null}function Xa(e,t,n,r,o,i,s){if(i instanceof Error)throw i;if(He(t)){const l=Xa(e,t.ofType,n,r,o,i,s);if(l===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return l}if(i==null)return null;if(vt(t))return Zae(e,t,n,r,o,i,s);if(br(t))return ele(t,i);if(Pn(t))return tle(e,t,n,r,o,i,s);if(Qe(t))return gC(e,t,n,r,o,i,s);console.assert(!1,"Cannot complete value of unexpected output type: "+Kn(t))}function p4(e,t,n){if(typeof n.key=="number")return;const r=Os(tse,t[0],e.variableValues);if(r&&r.if!==!1)return s4(typeof r.initialCount=="number","initialCount must be a number"),s4(r.initialCount>=0,"initialCount must be a positive integer"),{initialCount:r.initialCount,label:typeof r.label=="string"?r.label:void 0}}async function Xae(e,t,n,r,o,i,s){var m;(m=e.signal)==null||m.addEventListener("abort",()=>{var v;(v=i.return)==null||v.call(i)});const l=(s==null?void 0:s.errors)??e.errors,c=p4(e,n,o);let f=!1;const d=[];let g=0;for(;;){if(c&&typeof c.initialCount=="number"&&g>=c.initialCount){cle(g,i,e,n,r,t,o,c.label,s);break}const v=of(o,g,void 0);let b;try{if(b=await i.next(),b.done)break}catch(w){const N=gn(w,n,Br(v));d.push(ts(N,t,l));break}h4(b.value,d,l,e,t,n,r,v,s)&&(f=!0),g+=1}return f?Promise.all(d):d}function Zae(e,t,n,r,o,i,s){const l=t.ofType,c=(s==null?void 0:s.errors)??e.errors;if(Ka(i)){const b=i[Symbol.asyncIterator]();return Xae(e,l,n,r,o,b,s)}if(!xie(i))throw ut(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const f=p4(e,n,o);let d=!1,g=s;const m=[];let v=0;for(const b of i){const w=of(o,v,void 0);if(f&&typeof f.initialCount=="number"&&v>=f.initialCount){g=ale(o,w,b,e,n,r,l,f.label,g),v++;continue}h4(b,m,c,e,l,n,r,w,s)&&(d=!0),v++}return d?Promise.all(m):m}function h4(e,t,n,r,o,i,s,l,c){try{let f;if(Zt(e)?f=e.then(d=>Xa(r,o,i,s,l,d,c)):f=Xa(r,o,i,s,l,e,c),Zt(f))return t.push(f.then(void 0,d=>{const g=gn(d,i,Br(l)),m=ts(g,o,n);return Xo(r,l,c),m})),!0;t.push(f)}catch(f){const d=gn(f,i,Br(l)),g=ts(d,o,n);Xo(r,l,c),t.push(g)}return!1}function ele(e,t){let n;try{n=e.serialize(t)}catch(r){throw r instanceof he?new Error(r.message):r}if(n==null)throw new Error(`Expected \`${Kn(e)}.serialize(${Kn(t)})\` to return non-nullable value, returned: ${Kn(n)}`);return n}function tle(e,t,n,r,o,i,s){const l=t.resolveType??e.typeResolver,c=e.contextValue,f=l(i,c,r,t);return Zt(f)?f.then(d=>gC(e,m4(d,e,t,n,r,i),n,r,o,i,s)):gC(e,m4(f,e,t,n,r,i),n,r,o,i,s)}function m4(e,t,n,r,o,i){if(e==null)throw ut(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,{nodes:r});if(Qe(e))throw ut("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw ut(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${o.parentType.name}.${o.fieldName}" with value ${Kn(i)}, received "${Kn(e)}".`);const s=t.schema.getType(e);if(s==null)throw ut(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!Qe(s))throw ut(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,s))throw ut(`Runtime Object type "${s.name}" is not a possible type for "${n.name}".`,{nodes:r});return s}function gC(e,t,n,r,o,i,s){if(t.isTypeOf){const l=t.isTypeOf(i,e.contextValue,r);if(Zt(l))return l.then(c=>{if(!c)throw g4(t,i,n);return v4(e,t,n,o,i,s)});if(!l)throw g4(t,i,n)}return v4(e,t,n,o,i,s)}function g4(e,t,n){return ut(`Expected value of type "${e.name}" but got: ${Kn(t)}.`,{nodes:n})}function v4(e,t,n,r,o,i){const{fields:s,patches:l}=Wae(e,t,n),c=mC(e,t,o,r,s,i);for(const f of l){const{label:d,fields:g}=f;x4(e,t,o,g,d,r,i)}return c}const nle=function(e,t,n,r){if(v$(e)&&typeof e.__typename=="string")return e.__typename;const o=n.schema.getPossibleTypes(r),i=[];for(let s=0;s<o.length;s++){const l=o[s];if(l.isTypeOf){const c=l.isTypeOf(e,t,n);if(Zt(c))i[s]=c;else if(c)return l.name}}if(i.length)return Promise.all(i).then(s=>{for(let l=0;l<s.length;l++)if(s[l])return o[l].name})},y4=function(e,t,n,r){if(v$(e)||typeof e=="function"){const o=e[r.fieldName];return typeof o=="function"?e[r.fieldName](t,n,r):o}};function rle(e){const t=u4(e);if(!("schema"in t))return{errors:t.map(r=>{var o;return Object.defineProperty(r,"extensions",{value:{...r.extensions,http:{...(o=r.extensions)==null?void 0:o.http,status:400}}}),r})};const n=ile(t);return Zt(n)?n.then(r=>E4(t,r)):E4(t,n)}function b4(e){const t=e.subsequentResults;let n=!1,r=!1;return{[Symbol.asyncIterator](){return this},next(){return r?Promise.resolve({value:void 0,done:r}):n?t.next():(n=!0,Promise.resolve({value:e.initialResult,done:r}))},return(){return r=!0,t.return()},throw(o){return r=!0,t.throw(o)}}}async function*ole(e){"initialResult"in e?yield*b4(e):yield e}function E4(e,t){return Ka(t)?qae(ZT(t[Symbol.asyncIterator](),async n=>ole(await l4(Qae(e,n))),n=>{throw ut(n.message,{originalError:n,nodes:[e.operation]})})):t}function ile(e){try{const t=sle(e);return Zt(t)?t.then(void 0,n=>({errors:[n]})):t}catch(t){return{errors:[t]}}}function sle(e){const{schema:t,fragments:n,operation:r,variableValues:o,rootValue:i}=e,s=t.getSubscriptionType();if(s==null)throw ut("Schema is not configured to execute subscription operation.",{nodes:r});const{fields:l}=eC(t,n,o,s,r.selectionSet),[c,f]=[...l.entries()][0],d=f[0].name.value,g=T4(t,s,f[0]);if(!g)throw ut(`The subscription field "${d}" is not defined.`,{nodes:f});const m=of(void 0,c,s.name),v=d4(e,g,f,s,m);try{const b=b$(g,f[0],o),w=e.contextValue,S=(g.subscribe??e.subscribeFieldResolver)(i,b,w,v);return Zt(S)?S.then(w4).then(void 0,x=>{throw gn(x,f,Br(m))}):w4(S,e.signal)}catch(b){throw gn(b,f,Br(m))}}function w4(e,t){if(e instanceof Error)throw e;if(!Ka(e))throw ut(`Subscription field must return Async Iterable. Received: ${Kn(e)}.`);return{[Symbol.asyncIterator](){const n=e[Symbol.asyncIterator]();return t==null||t.addEventListener("abort",()=>{var r;(r=n.return)==null||r.call(n)}),n}}}function x4(e,t,n,r,o,i,s){const l=new dle({label:o,path:i,parentContext:s,exeContext:e});let c;try{c=mC(e,t,n,i,r,l),Zt(c)&&(c=c.then(null,f=>(l.errors.push(f),null)))}catch(f){l.errors.push(f),c=null}l.addData(c)}function ale(e,t,n,r,o,i,s,l,c){const f=new S4({label:l,path:t,parentContext:c,exeContext:r});let d;try{try{Zt(n)?d=n.then(m=>Xa(r,s,o,i,t,m,f)):d=Xa(r,s,o,i,t,n,f),Zt(d)&&(d=d.then(void 0,m=>{const v=gn(m,o,Br(t)),b=ts(v,s,f.errors);return Xo(r,t,f),b}))}catch(m){const v=gn(m,o,Br(t));d=ts(v,s,f.errors),Xo(r,t,f)}}catch(m){return f.errors.push(m),Xo(r,e,f),f.addItems(null),f}let g;return Zt(d)?g=d.then(m=>[m],m=>(f.errors.push(m),Xo(r,e,f),null)):g=[d],f.addItems(g),f}async function lle(e,t,n,r,o,i,s){let l;try{const{value:f,done:d}=await e.next();if(d)return i.setIsCompletedIterator(),{done:d,value:void 0};l=f}catch(f){const d=gn(f,n,Br(s));return{done:!0,value:ts(d,o,i.errors)}}let c;try{return c=Xa(t,o,n,r,s,l,i),Zt(c)&&(c=c.then(void 0,f=>{const d=gn(f,n,Br(s)),g=ts(d,o,i.errors);return Xo(t,s,i),g})),{done:!1,value:c}}catch(f){const d=gn(f,n,Br(s)),g=ts(d,o,i.errors);return Xo(t,s,i),{done:!1,value:g}}}async function cle(e,t,n,r,o,i,s,l,c){let f=e,d=c??void 0;for(;;){const g=of(s,f,void 0),m=new S4({label:l,path:g,parentContext:d,iterator:t,exeContext:n});let v;try{v=await lle(t,n,r,o,i,m,g)}catch(S){m.errors.push(S),Xo(n,s,m),m.addItems(null),t!=null&&t.return&&t.return().catch(()=>{});return}const{done:b,value:w}=v;let N;if(Zt(w)?N=w.then(S=>[S],S=>(m.errors.push(S),Xo(n,s,m),null)):N=[w],m.addItems(N),b)break;d=m,f++}}function Xo(e,t,n){const r=Br(t);e.subsequentPayloads.forEach(o=>{var i;if(o!==n){for(let s=0;s<r.length;s++)if(o.path[s]!==r[s])return;vC(o)&&((i=o.iterator)!=null&&i.return)&&o.iterator.return().catch(()=>{}),e.subsequentPayloads.delete(o)}})}function ule(e){const t=[];for(const n of e.subsequentPayloads){const r={};if(n.isCompleted){if(e.subsequentPayloads.delete(n),vC(n)){const o=n.items;if(n.isCompletedIterator)continue;r.items=o}else{const o=n.data;r.data=o??null}r.path=n.path,n.label&&(r.label=n.label),n.errors.length>0&&(r.errors=n.errors),t.push(r)}}return t}function fle(e){let t=!1;const n=new Promise((i,s)=>{var l;(l=e.signal)==null||l.addEventListener("abort",()=>{var c;t=!0,s((c=e.signal)==null?void 0:c.reason)})});async function r(){if(t)return{value:void 0,done:!0};if(await Promise.race([n,...Array.from(e.subsequentPayloads).map(l=>l.promise)]),t)return{value:void 0,done:!0};const i=ule(e),s=e.subsequentPayloads.size>0;return!i.length&&s?r():(s||(t=!0),{value:i.length?{incremental:i,hasNext:s}:{hasNext:s},done:!1})}function o(){const i=[];return e.subsequentPayloads.forEach(s=>{var l;vC(s)&&((l=s.iterator)!=null&&l.return)&&i.push(s.iterator.return())}),Promise.all(i)}return{[Symbol.asyncIterator](){return this},next:r,async return(){return await o(),t=!0,{value:void 0,done:!0}},async throw(i){return await o(),t=!0,Promise.reject(i)}}}class dle{constructor(t){this.type="defer",this.label=t.label,this.path=Br(t.path),this.parentContext=t.parentContext,this.errors=[],this._exeContext=t.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.data=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.data=n,this.isCompleted=!0})}addData(t){var r,o,i;const n=(r=this.parentContext)==null?void 0:r.promise;if(n){(o=this._resolve)==null||o.call(this,n.then(()=>t));return}(i=this._resolve)==null||i.call(this,t)}}class S4{constructor(t){this.type="stream",this.items=null,this.label=t.label,this.path=Br(t.path),this.parentContext=t.parentContext,this.iterator=t.iterator,this.errors=[],this._exeContext=t.exeContext,this._exeContext.subsequentPayloads.add(this),this.isCompleted=!1,this.items=null,this.promise=new Promise(n=>{this._resolve=r=>{n(r)}}).then(n=>{this.items=n,this.isCompleted=!0})}addItems(t){var r,o,i;const n=(r=this.parentContext)==null?void 0:r.promise;if(n){(o=this._resolve)==null||o.call(this,n.then(()=>t));return}(i=this._resolve)==null||i.call(this,t)}setIsCompletedIterator(){this.isCompletedIterator=!0}}function vC(e){return e.type==="stream"}function T4(e,t,n){const r=n.name.value;return r===qo.name&&e.getQueryType()===t?qo:r===zo.name&&e.getQueryType()===t?zo:r===wo.name?wo:t.getFields()[r]}function ple(e){const t=Lw(e.document,e.operationName);if(t==null)throw new Error("Must provide an operation.");return t.operation==="subscription"?rle(e):new zt(()=>Gae(e)).then(n=>"initialResult"in n?b4(n):n).resolve()}function hle(e){return!!(e!=null&&e.schema)}function mle(e){var g;const{info:t,schema:n,rootValue:r=n.rootValue??t.rootValue,operationName:o=(g=t.operation.name)==null?void 0:g.value,operation:i=mae(t.parentType,t.schema),fieldName:s=t.fieldName,selectionSet:l,fieldNodes:c=t.fieldNodes,context:f}=e,d=gae({sourceSchema:t.schema,sourceParentType:t.parentType,sourceFieldName:t.fieldName,fragments:t.fragments,variableDefinitions:t.operation.variableDefinitions,variableValues:t.variableValues,targetRootValue:r,targetOperationName:o,targetOperation:i,targetFieldName:s,selectionSet:l,fieldNodes:c,context:f,info:t});return gle({...e,request:d})}function C4(e,t,n){const r=ly(e,t),o=r.getFields()[n];if(!o)throw new Error(`Unable to find field '${n}' in type '${r}'.`);return o.type}function gle(e){const t=vle(e),n=new hae(t),r=n.transformRequest(e.request);e.validateRequest&&yle(t,r.document);const i=Ele(t)(r);function s(l){if(Ka(l)){const c=l[Symbol.asyncIterator]();return ZT(c,f=>n.transformResult(f))}return n.transformResult(l)}return Zt(i)?i.then(s):s(i)}function vle({request:e,schema:t,fieldName:n,returnType:r,args:o,info:i,transforms:s=[],transformedSchema:l,skipTypeMerging:c=!1}){var b;const f=fc(e);let d;n==null?d=f.selectionSet.selections[0].name.value:d=n;const g=(b=i==null?void 0:i.schema.extensions)==null?void 0:b.stitchingInfo,m=(g==null?void 0:g.subschemaMap.get(t))??t,v=f.operation;if(hle(m)){const w=m.schema;return{subschema:t,subschemaConfig:m,targetSchema:w,operation:v,fieldName:d,args:o,context:e.context,info:i,returnType:r??(i==null?void 0:i.returnType)??C4(w,v,d),transforms:m.transforms!=null?m.transforms.concat(s):s,transformedSchema:l??(m instanceof Bse?m.transformedSchema:cC(w,m)),skipTypeMerging:c}}return{subschema:t,subschemaConfig:void 0,targetSchema:m,operation:v,fieldName:d,args:o,context:e.context,info:i,returnType:r??(i==null?void 0:i.returnType)??C4(m,v,d),transforms:s,transformedSchema:l??m,skipTypeMerging:c}}function yle(e,t){const n=ep(e.targetSchema,t);if(n.length>0){if(n.length>1)throw new AggregateError(n,n.map(i=>i.message).join(`,
`));const r=n[0];throw r.originalError||r}}const ble={};function Ele(e){const{subschemaConfig:t,targetSchema:n,context:r}=e;let o=(t==null?void 0:t.executor)||wle(n);if(t!=null&&t.batch){const i=t==null?void 0:t.batchingOptions;o=Bae(r??ble,o,i==null?void 0:i.dataLoaderOptions,i==null?void 0:i.extensionsReducer)}return o}const wle=js(function(t){return function(r){return ple({schema:t,document:r.document,rootValue:r.rootValue,contextValue:r.context,variableValues:r.variables,operationName:r.operationName})}});function xle(e){const t=e.schema,n=e.createProxyingResolver??Cle,r=KT(t),o={};for(const[i,s]of r.entries()){const l=s.name,c=s.getFields();o[l]={};for(const f in c){const d=n({subschemaConfig:e,operation:i,fieldName:f}),g=Tle(e,d);i==="subscription"?o[l][f]={subscribe:g,resolve:Sle}:o[l][f]={resolve:g}}}return o}function Sle(e){return e}function Tle(e,t){return function(r,o,i,s){if(r!=null){const l=XT(s);if(fC(r)){const c=Y$(r),f=G$(r,l);if(e===f&&r[l]!==void 0)return ih(r[l],c,f,i,s)}}return t(r,o,i,s)}}function Cle({subschemaConfig:e,operation:t}){return function(r,o,i,s){return mle({schema:e,operation:t,context:i,info:s})}}const k4=js(function(t){const n=t.schema,r=xle(t),o=kle(n,r);return cC(o,t)});function kle(e,t){return qie(e,{[ot.ROOT_FIELD]:(n,r,o)=>{var i;return{...n,...(i=t[o])==null?void 0:i[r]}},[ot.OBJECT_FIELD]:n=>({...n,resolve:yae,subscribe:void 0}),[ot.OBJECT_TYPE]:n=>{const r=n.toConfig();return new $n({...r,isTypeOf:void 0})},[ot.INTERFACE_TYPE]:n=>{const r=n.toConfig();return new Pr({...r,resolveType:void 0})},[ot.UNION_TYPE]:n=>{const r=n.toConfig();return new Na({...r,resolveType:void 0})},[ot.ENUM_VALUE]:n=>({...n,value:void 0})})}function Nle(e,t){var n;if((n=e==null?void 0:e.data)!=null&&n.__schema)return Rw(e.data,t);if(e!=null&&e.errors){const r=e.errors.map(o=>ut(o.message,o));throw e.errors.length===1?r[0]:new AggregateError(r,"Could not obtain introspection result")}throw ut(`Could not obtain introspection result, received the following as response;
${Kn(e)}`)}function N4(e,t,n){const r=rr(Zg(n),n);return new zt(()=>e({document:r,context:t})).then(o=>Ka(o)?o[Symbol.asyncIterator]().next().then(({value:s})=>s):o).then(o=>Nle(o,n)).resolve()}const _le=async(e,t)=>M$(e,t),yC=new TextEncoder;function Us(...e){const t=new Us.Request(...e),n=new XMLHttpRequest;n.withCredentials=t.credentials==="include",n.timeout=t[Ge].timeout,n.open(t.method,t.url,!1);try{n.responseType="arraybuffer"}catch{}for(const i of t.headers)n.setRequestHeader(...i);n.send(t.body||null);let r=n.getAllResponseHeaders();r=r&&r.split(`\r
`).filter(Boolean).map(i=>i.split(": ",2));const o=new Us.Response(n.response,{headers:r,status:n.status,statusText:n.statusText});return o[Ge].url=n.responseURL,o[Ge].redirected=n.responseURL!==t.url,o}const Ge=Symbol("SyncFetch Internals"),Ole=["mode","cache","redirect","referrer","integrity"],Ale={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",426:"Upgrade Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};class ah{constructor(t,n={}){for(const r of Ole)if(r in n)throw new TypeError(`option ${r} not supported`);if(n.credentials==="same-origin")throw new TypeError("option credentials with value 'same-origin' not supported");if(this[Ge]={method:n.method||"GET",headers:new Us.Headers(n.headers),body:n.body?yC.encode(n.body):null,credentials:n.credentials||"omit",timeout:n.timeout||0},typeof t=="string")this[Ge].url=t;else if(t instanceof ah)this[Ge].url=t.url,n.method||(this[Ge].method=t.method),n.headers||(this[Ge].headers=t.headers),n.body||(this[Ge].body=t[Ge].body),n.credentials||(this[Ge].credentials=t.credentials);else throw new TypeError("Request input should be a URL string or a Request object")}get cache(){return"default"}get credentials(){return this[Ge].credentials}get destination(){return""}get headers(){return this[Ge].headers}get integrity(){return""}get method(){return this[Ge].method}get mode(){return"cors"}get priority(){return"auto"}get redirect(){return"follow"}get referrer(){return"about:client"}get referrerPolicy(){return""}get url(){return this[Ge].url}clone(){return bC(this),new ah(this.url,this[Ge])}}class Ty{constructor(t,n={}){this[Ge]={body:t?yC.encode(t):null,bodyUsed:!1,headers:new Us.Headers(n.headers),status:n.status,statusText:n.statusText}}get headers(){return this[Ge].headers}get ok(){const t=this[Ge].status;return t>=200&&t<300}get redirected(){return this[Ge].redirected}get status(){return this[Ge].status}get statusText(){return this[Ge].statusText}get url(){return this[Ge].url}clone(){return this.redirect(this[Ge].url,this[Ge].status)}redirect(t,n){bC(this);const r=new Ty(this[Ge].body,{headers:this[Ge].headers,status:n||this[Ge].status,statusText:Ale[n]||this[Ge].statusText});return r[Ge].url=t||this[Ge].url,r[Ge].redirected=this[Ge].redirected,r}}class lh{constructor(t){this[Ge]={body:yC.encode(t),bodyUsed:!1}}get bodyUsed(){return this[Ge].bodyUsed}static mixin(t){for(const n of Object.getOwnPropertyNames(lh.prototype)){if(n==="constructor")continue;const r=Object.getOwnPropertyDescriptor(lh.prototype,n);Object.defineProperty(t,n,{...r,enumerable:!0})}}arrayBuffer(){const t=ch(this);return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}blob(){const t=this.headers&&this.headers.get("content-type");return new Blob([ch(this)],t&&{type:t})}text(){return ch(this).toString()}json(){try{return JSON.parse(ch(this).toString())}catch(t){throw new TypeError(`invalid json response body at ${this.url} reason: ${t.message}`,"invalid-json")}}buffer(){return ch(this).clone()}}function bC(e){if(e.bodyUsed)throw new TypeError(`body used already for: ${e.url}`)}function ch(e){return bC(e),e[Ge].bodyUsed=!0,e[Ge].body||Buffer.alloc(0)}lh.mixin(ah.prototype),lh.mixin(Ty.prototype);class Dle{constructor(t){if(t instanceof Us.Headers)this[Ge]={...t[Ge]};else if(this[Ge]={},Array.isArray(t))for(const[n,r]of t)this.append(n,r);else if(typeof t=="object")for(const n in t)this.set(n,t[n])}append(t,n){t=t.toLowerCase(),this[Ge][t]||(this[Ge][t]=[]),this[Ge][t].push(n)}delete(t){delete this[Ge][t.toLowerCase()]}set(t,n){this[Ge][t.toLowerCase()]=[n]}entries(){const t=[];for(const n in this[Ge])for(const r of this[Ge][n])t.push([n,r]);return t}get(t){return t=t.toLowerCase(),t in this[Ge]?this[Ge][t].join(", "):null}keys(){return Object.keys(this[Ge])}has(t){return t.toLowerCase()in this[Ge]}values(){const t=[];for(const n in this[Ge])for(const r of this[Ge][n])t.push(r);return t}*[Symbol.iterator](){for(const t in this[Ge])for(const n of this[Ge][t])yield[t,n]}}Us.Headers=Dle,Us.Request=ah,Us.Response=Ty;var Ile=Us;const Lle=Ui(Ile),Rle=(e,t)=>(typeof e=="string"?t==null||delete t.signal:delete e.signal,Lle(e,t)),EC=e=>import(`${e}`),_4=e=>require(`${e}`);var hc;(function(e){e.WS="WS",e.LEGACY_WS="LEGACY_WS",e.SSE="SSE",e.GRAPHQL_SSE="GRAPHQL_SSE"})(hc||(hc={}));const Fle=["http:","https:","ws:","wss:"];function O4(e){try{const t=new URL(e);return Fle.includes(t.protocol)}catch{return!1}}class Mle{buildHTTPExecutor(t,n,r){const o=wC(t,{wss:"https",ws:"http"});return jse({endpoint:o,fetch:n,...r})}buildWSExecutor(t,n,r){const o=wC(t,{https:"wss",http:"ws"});return use({url:o,webSocketImpl:n,connectionParams:r})}buildWSLegacyExecutor(t,n,r){const o=wC(t,{https:"wss",http:"ws"});return Use(o,n,r)}getFetch(t,n){if(t){if(typeof t=="string"){const[r,o]=t.split("#");return new zt(()=>n(r)).then(i=>o?i[o]:i).resolve()}else if(typeof t=="function")return t}return n===EC?_le:Rle}getDefaultMethodFromOptions(t,n){return t&&(n=t),n}getWebSocketImpl(t,n){if(typeof(n==null?void 0:n.webSocketImpl)=="string"){const[r,o]=n.webSocketImpl.split("#");return new zt(()=>t(r)).then(i=>o?i[o]:i).resolve()}else return(n==null?void 0:n.webSocketImpl)||u$}buildSubscriptionExecutor(t,n,r,o){if((o==null?void 0:o.subscriptionsProtocol)===hc.SSE)return this.buildHTTPExecutor(t,n,o);if((o==null?void 0:o.subscriptionsProtocol)===hc.GRAPHQL_SSE)return o!=null&&o.subscriptionsEndpoint||(t+="/stream"),this.buildHTTPExecutor(t,n,o);{const s=new zt(()=>this.getWebSocketImpl(r,o)).then(l=>(o==null?void 0:o.subscriptionsProtocol)===hc.LEGACY_WS?this.buildWSLegacyExecutor(t,l,o):this.buildWSExecutor(t,l,o==null?void 0:o.connectionParams));return l=>s.then(c=>c(l)).resolve()}}getExecutor(t,n,r){const o=new zt(()=>this.getFetch(r==null?void 0:r.customFetch,n)),i=o.then(s=>this.buildHTTPExecutor(t,s,r));if((r==null?void 0:r.subscriptionsEndpoint)!=null||(r==null?void 0:r.subscriptionsProtocol)!==hc.SSE){let l=function(c){var f;return c.operationType=c.operationType||((f=fc(c))==null?void 0:f.operation),c.operationType==="subscription"&&H$(fc(c))&&(c.operationType="subscription"),c.operationType==="subscription"?s:i};const s=o.then(c=>{const f=(r==null?void 0:r.subscriptionsEndpoint)||t;return this.buildSubscriptionExecutor(f,c,n,r)});return c=>l(c).then(f=>f(c)).resolve()}else return s=>i.then(l=>l(s)).resolve()}getExecutorAsync(t,n){return this.getExecutor(t,EC,n)}getExecutorSync(t,n){return this.getExecutor(t,_4,n)}handleSDL(t,n,r){const o=this.getDefaultMethodFromOptions(r==null?void 0:r.method,"GET");return new zt(()=>n(t,{method:o,headers:typeof(r==null?void 0:r.headers)=="function"?r.headers():r==null?void 0:r.headers})).then(i=>i.text()).then(i=>Mie(t,i,r)).resolve()}async load(t,n){if(!O4(t))return[];let r={location:t},o;if(n!=null&&n.handleAsSDL||t.endsWith(".graphql")||t.endsWith(".graphqls")){const i=await this.getFetch(n==null?void 0:n.customFetch,EC);if(r=await this.handleSDL(t,i,n),!r.schema&&!r.document&&!r.rawSDL)throw new Error("Invalid SDL response");r.schema=r.schema||(r.document?tv(r.document,n):r.rawSDL?Fw(r.rawSDL,n):void 0)}else o=this.getExecutorAsync(t,n),r.schema=await N4(o,{},n);if(!r.schema)throw new Error("Invalid introspected schema");return n!=null&&n.endpoint&&(o=this.getExecutorAsync(n.endpoint,n)),o&&(r.schema=k4({schema:r.schema,executor:o,batch:n==null?void 0:n.batch})),[r]}loadSync(t,n){if(!O4(t))return[];let r={location:t},o;if(n!=null&&n.handleAsSDL||t.endsWith(".graphql")||t.endsWith(".graphqls")){const i=this.getFetch(n==null?void 0:n.customFetch,_4);if(r=this.handleSDL(t,i,n),!r.schema&&!r.document&&!r.rawSDL)throw new Error("Invalid SDL response");r.schema=r.schema||(r.document?tv(r.document,n):r.rawSDL?Fw(r.rawSDL,n):void 0)}else o=this.getExecutorSync(t,n),r.schema=N4(o,{},n);if(!r.schema)throw new Error("Invalid introspected schema");return n!=null&&n.endpoint&&(o=this.getExecutorSync(n.endpoint,n)),o&&(r.schema=k4({schema:r.schema,executor:o})),[r]}}function wC(e,t){return Object.entries(t).reduce((n,[r,o])=>n.replace(`${r}://`,`${o}://`).replace(`${r}:\\`,`${o}:\\`),e)}var xC={};const Ple=(...e)=>xC.stringify(...e);(function(){var e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,t,n,r={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},o;function i(l){return e.lastIndex=0,e.test(l)?'"'+l.replace(e,function(c){var f=r[c];return typeof f=="string"?f:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+l+'"'}function s(l,c){var f,d,g,m,v=t,b,w=c[l];switch(w&&typeof w=="object"&&typeof w.toJSON=="function"&&(w=w.toJSON(l)),typeof o=="function"&&(w=o.call(c,l,w)),typeof w){case"string":return i(w);case"number":return isFinite(w)?String(w):"null";case"bigint":case"boolean":case"null":return String(w);case"object":if(!w)return"null";if(t+=n,b=[],Object.prototype.toString.apply(w)==="[object Array]"){for(m=w.length,f=0;f<m;f+=1)b[f]=s(f,w)||"null";return g=b.length===0?"[]":t?`[
`+t+b.join(`,
`+t)+`
`+v+"]":"["+b.join(",")+"]",t=v,g}if(o&&typeof o=="object")for(m=o.length,f=0;f<m;f+=1)typeof o[f]=="string"&&(d=o[f],g=s(d,w),g&&b.push(i(d)+(t?": ":":")+g));else Object.keys(w).forEach(function(N){var S=s(N,w);S&&b.push(i(N)+(t?": ":":")+S)});return g=b.length===0?"{}":t?`{
`+t+b.join(`,
`+t)+`
`+v+"}":"{"+b.join(",")+"}",t=v,g}}typeof xC.stringify!="function"&&(xC.stringify=function(l,c,f){var d;if(t="",n="",typeof f=="number")for(d=0;d<f;d+=1)n+=" ";else typeof f=="string"&&(n=f);if(o=c,c&&typeof c!="function"&&(typeof c!="object"||typeof c.length!="number"))throw new Error("JSON.stringify");return s("",{"":l})})})();function $le(e){var t={strict:!1,storeAsString:!1};e!=null&&(e.strict===!0&&(t.strict=!0),e.storeAsString===!0&&(t.storeAsString=!0));var n,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:" "},i,s=function(w){throw{name:"SyntaxError",message:w,at:n,text:i}},l=function(w){return w&&w!==r&&s("Expected '"+w+"' instead of '"+r+"'"),r=i.charAt(n),n+=1,r},c=function(){var w="";for(r==="-"&&(w="-",l("-"));r>="0"&&r<="9";)w+=r,l();if(r===".")for(w+=".";l()&&r>="0"&&r<="9";)w+=r;if(r==="e"||r==="E")for(w+=r,l(),(r==="-"||r==="+")&&(w+=r,l());r>="0"&&r<="9";)w+=r,l();if(!isFinite(Number(w)))s("Bad number");else{const N=Number(w);return Number.isInteger(N)&&!Number.isSafeInteger(N)?t.storeAsString===!0?w:BigInt(w):N}},f=function(){var w,N,S="",x;if(r==='"')for(;l();){if(r==='"')return l(),S;if(r==="\\")if(l(),r==="u"){for(x=0,N=0;N<4&&(w=parseInt(l(),16),!!isFinite(w));N+=1)x=x*16+w;S+=String.fromCharCode(x)}else if(typeof o[r]=="string")S+=o[r];else break;else S+=r}s("Bad string")},d=function(){for(;r&&r<=" ";)l()},g=function(){switch(r){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}s("Unexpected '"+r+"'")},m,v=function(){var w=[];if(r==="["){if(l("["),d(),r==="]")return l("]"),w;for(;r;){if(w.push(m()),d(),r==="]")return l("]"),w;l(","),d()}}s("Bad array")},b=function(){var w,N={};if(r==="{"){if(l("{"),d(),r==="}")return l("}"),N;for(;r;){if(w=f(),d(),l(":"),t.strict===!0&&Object.hasOwnProperty.call(N,w)&&s('Duplicate key "'+w+'"'),N[w]=m(),d(),r==="}")return l("}"),N;l(","),d()}}s("Bad object")};return m=function(){switch(d(),r){case"{":return b();case"[":return v();case'"':return f();case"-":return c();default:return r>="0"&&r<="9"?c():g()}},function(w,N){var S;return i=w+"",n=0,r=" ",S=m(),d(),r&&s("Syntax error"),typeof N=="function"?function x(C,E){var _,I=C[E];return I&&typeof I=="object"&&Object.keys(I).forEach(function(D){_=x(I,D),_!==void 0?I[D]=_:delete I[D]}),N.call(C,E,I)}({"":S},""):S}}let mc;typeof globalThis<"u"?mc=globalThis:typeof self<"u"?mc=self:typeof window<"u"?mc=window:typeof ci<"u"&&(mc=ci),mc.BigInt.prototype.toJSON=function(){return this},mc.JSON.parse=$le(),mc.JSON.stringify=Ple;const Cy=function(){},SC={popstate:[]};let Vle={URL:function(){return{searchParams:{set:Cy,append:Cy,delete:Cy}}},location:{href:"",search:""},history:{pushState:Cy},fireEvent:function(e){SC[e].forEach(t=>{t()})},addEventListener:function(e,t){SC[e].push(t)},removeEventListener:function(e,t){const n=SC[e],r=n.findIndex(o=>o===t);n.splice(r,1)}};function Za(){return typeof window<"u"?window:Vle}const A4=[Number,String,Boolean,Date];function jle(e){const{URL:t}=Za(),n=new t(Za().location.href);return Object.keys(e).forEach(r=>{const o=e[r];o!=null?Array.isArray(o)?(n.searchParams.delete(r),o.forEach(i=>{n.searchParams.append(r,i)})):o instanceof Date?isNaN(o.getTime())||n.searchParams.set(r,o.toISOString()):typeof o=="object"?n.searchParams.set(r,JSON.stringify(o)):n.searchParams.set(r,o):n.searchParams.delete(r)}),n}function Ule(e){return Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="number"||typeof t=="string"||typeof t=="boolean")}function Ble(e={}){if(!Object.values(e).every(n=>A4.includes(n)||Ule(n)||typeof n=="function"))throw new Error(`Unsupported param types. Must be one of [${A4.map(n=>n.name).join(", ")}]`)}function qle(e={},t={},n=!1){t&&Ble(t);const[,r]=k.useState(),o=Za().location.search,i=k.useMemo(()=>new URLSearchParams(o),[o]),s=k.useMemo(()=>{let f=[];i.forEach((g,m)=>{f.push({key:m,value:g})}),f=f.reduce((g,m)=>((g[m.key]=g[m.key]||[]).push(m),g),{}),f=Object.keys(f).map(g=>{const m=f[g];return m.length===1?[g,m[0].value]:[g,m.map(({value:v})=>v)]});const d=Object.assign({},e);return f.forEach(([g,m])=>{d[g]=Hle(g,m,t,e)}),d},[i]);function l(f){const d=jle(f);Za().location.search!==d.search&&(n?Za().history.replaceState({},"",d.toString()):Za().history.pushState({},"",d.toString())),i.toString()!==d.searchParams.toString()&&r({})}k.useEffect(()=>{l(Object.assign(Object.assign({},e),s))},[s]);const c=f=>{l(f)};return k.useEffect(()=>{const f=()=>{r({})};return Za().addEventListener("popstate",f),()=>{Za().removeEventListener("popstate",f)}},[]),[s,c]}const zle={true:!0,false:!1};function Hle(e,t,n,r){if(!n)return t;const o=n[e],i=t===void 0?r[e]:t;return o===Number?Number(i):o===Boolean?zle[i]:o===Date?new Date(i):Array.isArray(o)?o.find(s=>s==i)||r[e]:typeof o=="function"?o(i):i}const Wle=()=>W.jsxs("svg",{viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[W.jsx("path",{d:"M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",fill:"url(#a)"}),W.jsx("path",{d:"M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",fill:"url(#b)"}),W.jsx("path",{d:"M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",fill:"url(#c)"}),W.jsxs("mask",{id:"g",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:16,y:14,width:58,height:62,children:[W.jsx("path",{d:"M21 25.35c.728 0 1.42.156 2.043.435l19.1-10.985c.9-.5 2-.8 3-.8 1.1 0 2.1.3 3 .8l16.4 9.5c-1.2.8-2.1 2-2.7 3.4l-15.9-9.2c-.3-.2-.599-.2-.899-.2-.3 0-.6.1-.9.2L25.823 29.025A5.005 5.005 0 0 1 21 35.35a5 5 0 0 1 0-10Z",fill:"url(#d)"}),W.jsx("path",{d:"M67.244 35.033A5.002 5.002 0 0 1 69 25.35a5 5 0 0 1 2.544 9.305V55.2c0 2.2-1.2 4.2-3 5.3l-16.4 9.4c0-1.5-.5-3-1.4-4.1l15.6-9c.6-.3.9-.9.9-1.6V35.033Z",fill:"url(#e)"}),W.jsx("path",{d:"M49.844 69.106a5 5 0 1 1-9.78 2.043L21.843 60.6c-1.9-1.1-3-3.1-3-5.3V36.8c.7.2 1.5.4 2.2.4.7 0 1.4-.1 2-.3v18.4c0 .7.4 1.3.9 1.6l17.382 10.058a5.002 5.002 0 0 1 8.516 2.14l.002.002v.006Z",fill:"url(#f)"})]}),W.jsxs("g",{mask:"url(#g)",children:[W.jsx("g",{filter:"url(#h)",children:W.jsx("circle",{cx:73,cy:25,r:26,fill:"#ED2E7E"})}),W.jsx("g",{filter:"url(#i)",children:W.jsx("circle",{cx:26,cy:69,r:26,fill:"#1CC8EE"})})]}),W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",fill:"url(#j)"}),W.jsx("mask",{id:"k",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:30,y:28,width:30,height:30,children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.395 32.395c0 2.314-1.815 6.152-4.395 6.152-2.573 0-4.395-3.836-4.395-6.152A4.4 4.4 0 0 1 45 28a4.4 4.4 0 0 1 4.395 4.395ZM35.331 49.043v-.828c0-5.403 2.521-7.215 4.548-8.67.513-.368.98-.705 1.369-1.07 1.08 1.19 2.377 1.83 3.751 1.83 1.375 0 2.672-.64 3.753-1.83.388.366.855.702 1.367 1.07 2.027 1.455 4.548 3.267 4.548 8.67v.828l-.827.049c-3.856.227-6.976-2.192-8.841-5.514-1.884 3.357-5.015 5.74-8.84 5.514l-.828-.049Zm22.814 2.032c-1.128-.184-8.133-1.324-13.145 4.618-4.99-5.938-11.804-4.834-13.091-4.625a1.74 1.74 0 0 1-.21.028l.002.023c.024.281.266 3.156 2.355 5.123L30 58h30l-4.104-1.758c1.958-1.766 2.244-3.973 2.355-4.833.019-.146.033-.253.049-.313a1.388 1.388 0 0 1-.154-.021Zm-17.662-.971c1.912-.783 3.19-1.93 4.516-3.494 1.332 1.574 2.616 2.716 4.516 3.494l.06.114.01.021c-1.495.574-3.16 1.586-4.581 2.905-1.414-1.322-3.038-2.324-4.58-2.929l.059-.111Z",fill:"#000"})}),W.jsxs("g",{mask:"url(#k)",children:[W.jsx("g",{filter:"url(#l)",children:W.jsx("circle",{cx:38,cy:6,r:26,fill:"#ED2E7E"})}),W.jsx("g",{filter:"url(#m)",children:W.jsx("circle",{cx:63,cy:69,r:26,fill:"#1CC8EE"})})]}),W.jsxs("defs",{children:[W.jsxs("linearGradient",{id:"a",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"b",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"c",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"d",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"e",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"f",x1:16,y1:14,x2:87.213,y2:44.598,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("linearGradient",{id:"j",x1:30,y1:28,x2:66.165,y2:44.436,gradientUnits:"userSpaceOnUse",children:[W.jsx("stop",{stopColor:"#7433FF"}),W.jsx("stop",{offset:1,stopColor:"#FFA3FD"})]}),W.jsxs("filter",{id:"h",x:23,y:-25,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),W.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),W.jsxs("filter",{id:"i",x:-24,y:19,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),W.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),W.jsxs("filter",{id:"l",x:-12,y:-44,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),W.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]}),W.jsxs("filter",{id:"m",x:13,y:19,width:100,height:100,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),W.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:12,result:"effect1_foregroundBlur_1677_11483"})]})]})]}),Gle=(e,t)=>{const n=e.definitions.filter(r=>{var o;return!(r.kind===U.OPERATION_DEFINITION&&t&&((o=r.name)==null?void 0:o.value)!==t)});return{kind:U.DOCUMENT,definitions:n}};function Yle(e){var g;const t=`#
# Welcome to ${e.title||"Yoga GraphiQL"}
#
# ${e.title||"Yoga GraphiQL"} is an in-browser tool for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will see intelligent
# typeaheads aware of the current GraphQL type schema and live syntax and
# validation errors highlighted within the text.
#
# GraphQL queries typically start with a "{" character. Lines that start
# with a # are ignored.
#
# An example GraphQL query might look like:
#
# {
# field(arg: "value") {
# subField
# }
# }
#
# Keyboard shortcuts:
#
# Prettify Query: Shift-Ctrl-P (or press the prettify button above)
#
# Merge Query: Shift-Ctrl-M (or press the merge button above)
#
# Run Query: Ctrl-Enter (or press the play button above)
#
# Auto Complete: Ctrl-Space (or just start typing)
#
`,n=new URL(e.endpoint??location.pathname,location.href).toString(),r={query:String},o=k.useMemo(()=>new Mle,[]),i=k.useMemo(()=>{if(e.fetcher)return e.endpoint&&console.warn("You are using a custom fetcher and an endpoint. The endpoint will be ignored."),e.fetcher;const m=o.getExecutorAsync(n,{subscriptionsProtocol:hc.GRAPHQL_SSE,subscriptionsEndpoint:n,credentials:"same-origin",specifiedByUrl:!0,directiveIsRepeatable:!0,...e,headers:e.additionalHeaders||{}});return function(b,w){const N=Gle(rr(b.query),b.operationName??void 0);return m({document:N,operationName:b.operationName??void 0,variables:b.variables,extensions:{headers:w==null?void 0:w.headers}})}},[o,n,e.fetcher]),[s,l]=qle({query:e.defaultQuery||t},r,!1),[c,f]=k.useState((g=s.query)==null?void 0:g.toString()),d=tie({showAttribution:!0});return e.query&&!e.onEditQuery&&console.warn("If you provide `query` prop, you should also provide `onEditQuery` prop to handle query changes."),W.jsx("div",{className:"graphiql-container",children:W.jsx($T,{shouldPersistHeaders:!0,plugins:[d],schemaDescription:!0,query:c,...e,fetcher:i,children:W.jsx(s$,{isHeadersEditorEnabled:!0,defaultEditorToolsVisibility:!0,...e,onEditQuery:(m,v)=>{var b;l({query:m}),f(m),(b=e.onEditQuery)==null||b.call(e,m,v)},children:W.jsx(Qa.Logo,{children:W.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[W.jsx("div",{style:{width:40,display:"flex"},children:(e==null?void 0:e.logo)||W.jsx(Wle,{})}),W.jsx("span",{children:(e==null?void 0:e.title)||W.jsxs(W.Fragment,{children:["Yoga Graph",W.jsx("em",{children:"i"}),"QL"]})})]})})})})})}function Qle(e,t){dg.render(W.jsx(Yle,{...t}),e)}globalThis.React=ce;var Kle=Object.defineProperty,P=(e,t)=>Kle(e,"name",{value:t,configurable:!0}),Jle=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}P(qr,"getDefaultExportFromCjs");var D4={exports:{}},I4;function Cr(){return I4||(I4=1,function(e,t){(function(n,r){e.exports=r()})(Jle,function(){var n=navigator.userAgent,r=navigator.platform,o=/gecko\/\d/i.test(n),i=/MSIE \d/.test(n),s=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),l=/Edge\/(\d+)/.exec(n),c=i||s||l,f=c&&(i?document.documentMode||6:+(l||s)[1]),d=!l&&/WebKit\//.test(n),g=d&&/Qt\/\d+\.\d+/.test(n),m=!l&&/Chrome\//.test(n),v=/Opera\//.test(n),b=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),N=/PhantomJS/.test(n),S=b&&(/Mobile\/\w+/.test(n)||navigator.maxTouchPoints>2),x=/Android/.test(n),C=S||x||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),E=S||/Mac/.test(r),_=/\bCrOS\b/.test(n),I=/win/i.test(r),D=v&&n.match(/Version\/(\d*\.\d*)/);D&&(D=Number(D[1])),D&&D>=15&&(v=!1,d=!0);var A=E&&(g||v&&(D==null||D<12.11)),F=o||c&&f>=9;function $(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}P($,"classTest");var q=P(function(a,u){var h=a.className,p=$(u).exec(h);if(p){var y=h.slice(p.index+p[0].length);a.className=h.slice(0,p.index)+(y?p[1]+y:"")}},"rmClass");function H(a){for(var u=a.childNodes.length;u>0;--u)a.removeChild(a.firstChild);return a}P(H,"removeChildren");function z(a,u){return H(a).appendChild(u)}P(z,"removeChildrenAndAdd");function B(a,u,h,p){var y=document.createElement(a);if(h&&(y.className=h),p&&(y.style.cssText=p),typeof u=="string")y.appendChild(document.createTextNode(u));else if(u)for(var T=0;T<u.length;++T)y.appendChild(u[T]);return y}P(B,"elt");function R(a,u,h,p){var y=B(a,u,h,p);return y.setAttribute("role","presentation"),y}P(R,"eltP");var te;document.createRange?te=P(function(a,u,h,p){var y=document.createRange();return y.setEnd(p||a,h),y.setStart(a,u),y},"range"):te=P(function(a,u,h){var p=document.body.createTextRange();try{p.moveToElementText(a.parentNode)}catch{return p}return p.collapse(!0),p.moveEnd("character",h),p.moveStart("character",u),p},"range");function Y(a,u){if(u.nodeType==3&&(u=u.parentNode),a.contains)return a.contains(u);do if(u.nodeType==11&&(u=u.host),u==a)return!0;while(u=u.parentNode)}P(Y,"contains");function Q(){var a;try{a=document.activeElement}catch{a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}P(Q,"activeElt");function K(a,u){var h=a.className;$(u).test(h)||(a.className+=(h?" ":"")+u)}P(K,"addClass");function Z(a,u){for(var h=a.split(" "),p=0;p<h.length;p++)h[p]&&!$(h[p]).test(u)&&(u+=" "+h[p]);return u}P(Z,"joinClasses");var re=P(function(a){a.select()},"selectInput");S?re=P(function(a){a.selectionStart=0,a.selectionEnd=a.value.length},"selectInput"):c&&(re=P(function(a){try{a.select()}catch{}},"selectInput"));function J(a){var u=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,u)}}P(J,"bind");function ie(a,u,h){u||(u={});for(var p in a)a.hasOwnProperty(p)&&(h!==!1||!u.hasOwnProperty(p))&&(u[p]=a[p]);return u}P(ie,"copyObj");function ne(a,u,h,p,y){u==null&&(u=a.search(/[^\s\u00a0]/),u==-1&&(u=a.length));for(var T=p||0,O=y||0;;){var L=a.indexOf(" ",T);if(L<0||L>=u)return O+(u-T);O+=L-T,O+=h-O%h,T=L+1}}P(ne,"countColumn");var ae=P(function(){this.id=null,this.f=null,this.time=0,this.handler=J(this.onTimeout,this)},"Delayed");ae.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ae.prototype.set=function(a,u){this.f=u;var h=+new Date+a;(!this.id||h<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=h)};function le(a,u){for(var h=0;h<a.length;++h)if(a[h]==u)return h;return-1}P(le,"indexOf");var de=50,xe={toString:function(){return"CodeMirror.Pass"}},ve={scroll:!1},qe={origin:"*mouse"},Ie={origin:"+move"};function Oe(a,u,h){for(var p=0,y=0;;){var T=a.indexOf(" ",p);T==-1&&(T=a.length);var O=T-p;if(T==a.length||y+O>=u)return p+Math.min(O,u-y);if(y+=T-p,y+=h-y%h,p=T+1,y>=u)return p}}P(Oe,"findColumn");var it=[""];function Ot(a){for(;it.length<=a;)it.push(je(it)+" ");return it[a]}P(Ot,"spaceStr");function je(a){return a[a.length-1]}P(je,"lst");function Dt(a,u){for(var h=[],p=0;p<a.length;p++)h[p]=u(a[p],p);return h}P(Dt,"map");function Nr(a,u,h){for(var p=0,y=h(u);p<a.length&&h(a[p])<=y;)p++;a.splice(p,0,u)}P(Nr,"insertSorted");function $t(){}P($t,"nothing");function xn(a,u){var h;return Object.create?h=Object.create(a):($t.prototype=a,h=new $t),u&&ie(u,h),h}P(xn,"createObj");var os=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function fr(a){return/\w/.test(a)||a>""&&(a.toUpperCase()!=a.toLowerCase()||os.test(a))}P(fr,"isWordCharBasic");function nl(a,u){return u?u.source.indexOf("\\w")>-1&&fr(a)?!0:u.test(a):fr(a)}P(nl,"isWordChar");function mf(a){for(var u in a)if(a.hasOwnProperty(u)&&a[u])return!1;return!0}P(mf,"isEmpty");var Fy=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function bc(a){return a.charCodeAt(0)>=768&&Fy.test(a)}P(bc,"isExtendingChar");function gf(a,u,h){for(;(h<0?u>0:u<a.length)&&bc(a.charAt(u));)u+=h;return u}P(gf,"skipExtendingChars");function ei(a,u,h){for(var p=u>h?-1:1;;){if(u==h)return u;var y=(u+h)/2,T=p<0?Math.ceil(y):Math.floor(y);if(T==u)return a(T)?u:h;a(T)?h=T:u=T+p}}P(ei,"findFirst");function mh(a,u,h,p){if(!a)return p(u,h,"ltr",0);for(var y=!1,T=0;T<a.length;++T){var O=a[T];(O.from<h&&O.to>u||u==h&&O.to==u)&&(p(Math.max(O.from,u),Math.min(O.to,h),O.level==1?"rtl":"ltr",T),y=!0)}y||p(u,h,"ltr")}P(mh,"iterateBidiSections");var io=null;function Wt(a,u,h){var p;io=null;for(var y=0;y<a.length;++y){var T=a[y];if(T.from<u&&T.to>u)return y;T.to==u&&(T.from!=T.to&&h=="before"?p=y:io=y),T.from==u&&(T.from!=T.to&&h!="before"?p=y:io=y)}return p??io}P(Wt,"getBidiPartAt");var rl=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",u="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function h(V){return V<=247?a.charAt(V):1424<=V&&V<=1524?"R":1536<=V&&V<=1785?u.charAt(V-1536):1774<=V&&V<=2220?"r":8192<=V&&V<=8203?"w":V==8204?"b":"L"}P(h,"charType");var p=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,y=/[stwN]/,T=/[LRr]/,O=/[Lb1n]/,L=/[1n]/;function M(V,G,X){this.level=V,this.from=G,this.to=X}return P(M,"BidiSpan"),function(V,G){var X=G=="ltr"?"L":"R";if(V.length==0||G=="ltr"&&!p.test(V))return!1;for(var se=V.length,oe=[],pe=0;pe<se;++pe)oe.push(h(V.charCodeAt(pe)));for(var be=0,ke=X;be<se;++be){var Ae=oe[be];Ae=="m"?oe[be]=ke:ke=Ae}for(var Le=0,De=X;Le<se;++Le){var Me=oe[Le];Me=="1"&&De=="r"?oe[Le]="n":T.test(Me)&&(De=Me,Me=="r"&&(oe[Le]="R"))}for(var Ye=1,ze=oe[0];Ye<se-1;++Ye){var at=oe[Ye];at=="+"&&ze=="1"&&oe[Ye+1]=="1"?oe[Ye]="1":at==","&&ze==oe[Ye+1]&&(ze=="1"||ze=="n")&&(oe[Ye]=ze),ze=at}for(var It=0;It<se;++It){var qn=oe[It];if(qn==",")oe[It]="N";else if(qn=="%"){var Gt=void 0;for(Gt=It+1;Gt<se&&oe[Gt]=="%";++Gt);for(var Gr=It&&oe[It-1]=="!"||Gt<se&&oe[Gt]=="1"?"1":"N",Yr=It;Yr<Gt;++Yr)oe[Yr]=Gr;It=Gt-1}}for(var Sn=0,Qr=X;Sn<se;++Sn){var Zn=oe[Sn];Qr=="L"&&Zn=="1"?oe[Sn]="L":T.test(Zn)&&(Qr=Zn)}for(var In=0;In<se;++In)if(y.test(oe[In])){var Tn=void 0;for(Tn=In+1;Tn<se&&y.test(oe[Tn]);++Tn);for(var cn=(In?oe[In-1]:X)=="L",Kr=(Tn<se?oe[Tn]:X)=="L",Wf=cn==Kr?cn?"L":"R":X,vl=In;vl<Tn;++vl)oe[vl]=Wf;In=Tn-1}for(var hr=[],fs,zn=0;zn<se;)if(O.test(oe[zn])){var MN=zn;for(++zn;zn<se&&O.test(oe[zn]);++zn);hr.push(new M(0,MN,zn))}else{var na=zn,jc=hr.length,Uc=G=="rtl"?1:0;for(++zn;zn<se&&oe[zn]!="L";++zn);for(var Ir=na;Ir<zn;)if(L.test(oe[Ir])){na<Ir&&(hr.splice(jc,0,new M(1,na,Ir)),jc+=Uc);var Gf=Ir;for(++Ir;Ir<zn&&L.test(oe[Ir]);++Ir);hr.splice(jc,0,new M(2,Gf,Ir)),jc+=Uc,na=Ir}else++Ir;na<zn&&hr.splice(jc,0,new M(1,na,zn))}return G=="ltr"&&(hr[0].level==1&&(fs=V.match(/^\s+/))&&(hr[0].from=fs[0].length,hr.unshift(new M(0,0,fs[0].length))),je(hr).level==1&&(fs=V.match(/\s+$/))&&(je(hr).to-=fs[0].length,hr.push(new M(0,se-fs[0].length,se)))),G=="rtl"?hr.reverse():hr}}();function _r(a,u){var h=a.order;return h==null&&(h=a.order=rl(a.text,u)),h}P(_r,"getOrder");var is=[],We=P(function(a,u,h){if(a.addEventListener)a.addEventListener(u,h,!1);else if(a.attachEvent)a.attachEvent("on"+u,h);else{var p=a._handlers||(a._handlers={});p[u]=(p[u]||is).concat(h)}},"on");function ol(a,u){return a._handlers&&a._handlers[u]||is}P(ol,"getHandlers");function dr(a,u,h){if(a.removeEventListener)a.removeEventListener(u,h,!1);else if(a.detachEvent)a.detachEvent("on"+u,h);else{var p=a._handlers,y=p&&p[u];if(y){var T=le(y,h);T>-1&&(p[u]=y.slice(0,T).concat(y.slice(T+1)))}}}P(dr,"off");function Ke(a,u){var h=ol(a,u);if(h.length)for(var p=Array.prototype.slice.call(arguments,2),y=0;y<h.length;++y)h[y].apply(null,p)}P(Ke,"signal");function ln(a,u,h){return typeof u=="string"&&(u={type:u,preventDefault:function(){this.defaultPrevented=!0}}),Ke(a,h||u.type,a,u),zr(u)||u.codemirrorIgnore}P(ln,"signalDOMEvent");function il(a){var u=a._handlers&&a._handlers.cursorActivity;if(u)for(var h=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),p=0;p<u.length;++p)le(h,u[p])==-1&&h.push(u[p])}P(il,"signalCursorActivity");function _n(a,u){return ol(a,u).length>0}P(_n,"hasHandler");function ti(a){a.prototype.on=function(u,h){We(this,u,h)},a.prototype.off=function(u,h){dr(this,u,h)}}P(ti,"eventMixin");function Bn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}P(Bn,"e_preventDefault");function sl(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}P(sl,"e_stopPropagation");function zr(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}P(zr,"e_defaultPrevented");function Hs(a){Bn(a),sl(a)}P(Hs,"e_stop");function ss(a){return a.target||a.srcElement}P(ss,"e_target");function vf(a){var u=a.which;return u==null&&(a.button&1?u=1:a.button&2?u=3:a.button&4&&(u=2)),E&&a.ctrlKey&&u==1&&(u=3),u}P(vf,"e_button");var yf=function(){if(c&&f<9)return!1;var a=B("div");return"draggable"in a||"dragDrop"in a}(),Or;function bf(a){if(Or==null){var u=B("span","");z(a,B("span",[u,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(Or=u.offsetWidth<=1&&u.offsetHeight>2&&!(c&&f<8))}var h=Or?B("span",""):B("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return h.setAttribute("cm-text",""),h}P(bf,"zeroWidthElement");var Ef;function ni(a){if(Ef!=null)return Ef;var u=z(a,document.createTextNode("AخA")),h=te(u,0,1).getBoundingClientRect(),p=te(u,1,2).getBoundingClientRect();return H(a),!h||h.left==h.right?!1:Ef=p.right-h.right<3}P(ni,"hasBadBidiRects");var wf=`
b`.split(/\n/).length!=3?function(a){for(var u=0,h=[],p=a.length;u<=p;){var y=a.indexOf(`
`,u);y==-1&&(y=a.length);var T=a.slice(u,a.charAt(y-1)=="\r"?y-1:y),O=T.indexOf("\r");O!=-1?(h.push(T.slice(0,O)),u+=O+1):(h.push(T),u=y+1)}return h}:function(a){return a.split(/\r\n?|\n/)},gh=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch{return!1}}:function(a){var u;try{u=a.ownerDocument.selection.createRange()}catch{}return!u||u.parentElement()!=a?!1:u.compareEndPoints("StartToEnd",u)!=0},vh=function(){var a=B("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),xf=null;function as(a){if(xf!=null)return xf;var u=z(a,B("span","x")),h=u.getBoundingClientRect(),p=te(u,0,1).getBoundingClientRect();return xf=Math.abs(h.left-p.left)>1}P(as,"hasBadZoomedRects");var Ao={},so={};function Sf(a,u){arguments.length>2&&(u.dependencies=Array.prototype.slice.call(arguments,2)),Ao[a]=u}P(Sf,"defineMode");function Pi(a,u){so[a]=u}P(Pi,"defineMIME");function al(a){if(typeof a=="string"&&so.hasOwnProperty(a))a=so[a];else if(a&&typeof a.name=="string"&&so.hasOwnProperty(a.name)){var u=so[a.name];typeof u=="string"&&(u={name:u}),a=xn(u,a),a.name=u.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return al("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return al("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}P(al,"resolveMode");function ll(a,u){u=al(u);var h=Ao[u.name];if(!h)return ll(a,"text/plain");var p=h(a,u);if(ri.hasOwnProperty(u.name)){var y=ri[u.name];for(var T in y)y.hasOwnProperty(T)&&(p.hasOwnProperty(T)&&(p["_"+T]=p[T]),p[T]=y[T])}if(p.name=u.name,u.helperType&&(p.helperType=u.helperType),u.modeProps)for(var O in u.modeProps)p[O]=u.modeProps[O];return p}P(ll,"getMode");var ri={};function Do(a,u){var h=ri.hasOwnProperty(a)?ri[a]:ri[a]={};ie(u,h)}P(Do,"extendMode");function ao(a,u){if(u===!0)return u;if(a.copyState)return a.copyState(u);var h={};for(var p in u){var y=u[p];y instanceof Array&&(y=y.concat([])),h[p]=y}return h}P(ao,"copyState");function Ec(a,u){for(var h;a.innerMode&&(h=a.innerMode(u),!(!h||h.mode==a));)u=h.state,a=h.mode;return h||{mode:a,state:u}}P(Ec,"innerMode");function wc(a,u,h){return a.startState?a.startState(u,h):!0}P(wc,"startState");var en=P(function(a,u,h){this.pos=this.start=0,this.string=a,this.tabSize=u||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=h},"StringStream");en.prototype.eol=function(){return this.pos>=this.string.length},en.prototype.sol=function(){return this.pos==this.lineStart},en.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},en.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},en.prototype.eat=function(a){var u=this.string.charAt(this.pos),h;if(typeof a=="string"?h=u==a:h=u&&(a.test?a.test(u):a(u)),h)return++this.pos,u},en.prototype.eatWhile=function(a){for(var u=this.pos;this.eat(a););return this.pos>u},en.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},en.prototype.skipToEnd=function(){this.pos=this.string.length},en.prototype.skipTo=function(a){var u=this.string.indexOf(a,this.pos);if(u>-1)return this.pos=u,!0},en.prototype.backUp=function(a){this.pos-=a},en.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ne(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ne(this.string,this.lineStart,this.tabSize):0)},en.prototype.indentation=function(){return ne(this.string,null,this.tabSize)-(this.lineStart?ne(this.string,this.lineStart,this.tabSize):0)},en.prototype.match=function(a,u,h){if(typeof a=="string"){var p=P(function(O){return h?O.toLowerCase():O},"cased"),y=this.string.substr(this.pos,a.length);if(p(y)==p(a))return u!==!1&&(this.pos+=a.length),!0}else{var T=this.string.slice(this.pos).match(a);return T&&T.index>0?null:(T&&u!==!1&&(this.pos+=T[0].length),T)}},en.prototype.current=function(){return this.string.slice(this.start,this.pos)},en.prototype.hideFirstChars=function(a,u){this.lineStart+=a;try{return u()}finally{this.lineStart-=a}},en.prototype.lookAhead=function(a){var u=this.lineOracle;return u&&u.lookAhead(a)},en.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Pe(a,u){if(u-=a.first,u<0||u>=a.size)throw new Error("There is no line "+(u+a.first)+" in the document.");for(var h=a;!h.lines;)for(var p=0;;++p){var y=h.children[p],T=y.chunkSize();if(u<T){h=y;break}u-=T}return h.lines[u]}P(Pe,"getLine");function oi(a,u,h){var p=[],y=u.line;return a.iter(u.line,h.line+1,function(T){var O=T.text;y==h.line&&(O=O.slice(0,h.ch)),y==u.line&&(O=O.slice(u.ch)),p.push(O),++y}),p}P(oi,"getBetween");function xc(a,u,h){var p=[];return a.iter(u,h,function(y){p.push(y.text)}),p}P(xc,"getLines");function Ar(a,u){var h=u-a.height;if(h)for(var p=a;p;p=p.parent)p.height+=h}P(Ar,"updateLineHeight");function yt(a){if(a.parent==null)return null;for(var u=a.parent,h=le(u.lines,a),p=u.parent;p;u=p,p=p.parent)for(var y=0;p.children[y]!=u;++y)h+=p.children[y].chunkSize();return h+u.first}P(yt,"lineNo");function ii(a,u){var h=a.first;e:do{for(var p=0;p<a.children.length;++p){var y=a.children[p],T=y.height;if(u<T){a=y;continue e}u-=T,h+=y.chunkSize()}return h}while(!a.lines);for(var O=0;O<a.lines.length;++O){var L=a.lines[O],M=L.height;if(u<M)break;u-=M}return h+O}P(ii,"lineAtHeight");function Ws(a,u){return u>=a.first&&u<a.first+a.size}P(Ws,"isLine");function Sc(a,u){return String(a.lineNumberFormatter(u+a.firstLineNumber))}P(Sc,"lineNumberFor");function we(a,u,h){if(h===void 0&&(h=null),!(this instanceof we))return new we(a,u,h);this.line=a,this.ch=u,this.sticky=h}P(we,"Pos");function j(a,u){return a.line-u.line||a.ch-u.ch}P(j,"cmp");function ee(a,u){return a.sticky==u.sticky&&j(a,u)==0}P(ee,"equalCursorPos");function me(a){return we(a.line,a.ch)}P(me,"copyPos");function Te(a,u){return j(a,u)<0?u:a}P(Te,"maxPos");function Je(a,u){return j(a,u)<0?a:u}P(Je,"minPos");function pt(a,u){return Math.max(a.first,Math.min(u,a.first+a.size-1))}P(pt,"clipLine");function Re(a,u){if(u.line<a.first)return we(a.first,0);var h=a.first+a.size-1;return u.line>h?we(h,Pe(a,h).text.length):Jn(u,Pe(a,u.line).text.length)}P(Re,"clipPos");function Jn(a,u){var h=a.ch;return h==null||h>u?we(a.line,u):h<0?we(a.line,0):a}P(Jn,"clipToLen");function lo(a,u){for(var h=[],p=0;p<u.length;p++)h[p]=Re(a,u[p]);return h}P(lo,"clipPosArray");var Tf=P(function(a,u){this.state=a,this.lookAhead=u},"SavedContext"),ls=P(function(a,u,h,p){this.state=u,this.doc=a,this.line=h,this.maxLookAhead=p||0,this.baseTokens=null,this.baseTokenPos=1},"Context");ls.prototype.lookAhead=function(a){var u=this.doc.getLine(this.line+a);return u!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),u},ls.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var u=this.baseTokens[this.baseTokenPos+1];return{type:u&&u.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},ls.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ls.fromSaved=function(a,u,h){return u instanceof Tf?new ls(a,ao(a.mode,u.state),h,u.lookAhead):new ls(a,ao(a.mode,u),h)},ls.prototype.save=function(a){var u=a!==!1?ao(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tf(u,this.maxLookAhead):u};function qC(a,u,h,p){var y=[a.state.modeGen],T={};YC(a,u.text,a.doc.mode,h,function(V,G){return y.push(V,G)},T,p);for(var O=h.state,L=P(function(V){h.baseTokens=y;var G=a.state.overlays[V],X=1,se=0;h.state=!0,YC(a,u.text,G.mode,h,function(oe,pe){for(var be=X;se<oe;){var ke=y[X];ke>oe&&y.splice(X,1,oe,y[X+1],ke),X+=2,se=Math.min(oe,ke)}if(pe)if(G.opaque)y.splice(be,X-be,oe,"overlay "+pe),X=be+2;else for(;be<X;be+=2){var Ae=y[be+1];y[be+1]=(Ae?Ae+" ":"")+"overlay "+pe}},T),h.state=O,h.baseTokens=null,h.baseTokenPos=1},"loop"),M=0;M<a.state.overlays.length;++M)L(M);return{styles:y,classes:T.bgClass||T.textClass?T:null}}P(qC,"highlightLine");function zC(a,u,h){if(!u.styles||u.styles[0]!=a.state.modeGen){var p=Cf(a,yt(u)),y=u.text.length>a.options.maxHighlightLength&&ao(a.doc.mode,p.state),T=qC(a,u,p);y&&(p.state=y),u.stateAfter=p.save(!y),u.styles=T.styles,T.classes?u.styleClasses=T.classes:u.styleClasses&&(u.styleClasses=null),h===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return u.styles}P(zC,"getLineStyles");function Cf(a,u,h){var p=a.doc,y=a.display;if(!p.mode.startState)return new ls(p,!0,u);var T=G6(a,u,h),O=T>p.first&&Pe(p,T-1).stateAfter,L=O?ls.fromSaved(p,O,T):new ls(p,wc(p.mode),T);return p.iter(T,u,function(M){My(a,M.text,L);var V=L.line;M.stateAfter=V==u-1||V%5==0||V>=y.viewFrom&&V<y.viewTo?L.save():null,L.nextLine()}),h&&(p.modeFrontier=L.line),L}P(Cf,"getContextBefore");function My(a,u,h,p){var y=a.doc.mode,T=new en(u,a.options.tabSize,h);for(T.start=T.pos=p||0,u==""&&HC(y,h.state);!T.eol();)Py(y,T,h.state),T.start=T.pos}P(My,"processLine");function HC(a,u){if(a.blankLine)return a.blankLine(u);if(a.innerMode){var h=Ec(a,u);if(h.mode.blankLine)return h.mode.blankLine(h.state)}}P(HC,"callBlankLine");function Py(a,u,h,p){for(var y=0;y<10;y++){p&&(p[0]=Ec(a,h).mode);var T=a.token(u,h);if(u.pos>u.start)return T}throw new Error("Mode "+a.name+" failed to advance stream.")}P(Py,"readToken");var W6=P(function(a,u,h){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=u||null,this.state=h},"Token");function WC(a,u,h,p){var y=a.doc,T=y.mode,O;u=Re(y,u);var L=Pe(y,u.line),M=Cf(a,u.line,h),V=new en(L.text,a.options.tabSize,M),G;for(p&&(G=[]);(p||V.pos<u.ch)&&!V.eol();)V.start=V.pos,O=Py(T,V,M.state),p&&G.push(new W6(V,O,ao(y.mode,M.state)));return p?G:new W6(V,O,M.state)}P(WC,"takeToken");function GC(a,u){if(a)for(;;){var h=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!h)break;a=a.slice(0,h.index)+a.slice(h.index+h[0].length);var p=h[1]?"bgClass":"textClass";u[p]==null?u[p]=h[2]:new RegExp("(?:^|\\s)"+h[2]+"(?:$|\\s)").test(u[p])||(u[p]+=" "+h[2])}return a}P(GC,"extractLineClasses");function YC(a,u,h,p,y,T,O){var L=h.flattenSpans;L==null&&(L=a.options.flattenSpans);var M=0,V=null,G=new en(u,a.options.tabSize,p),X,se=a.options.addModeClass&&[null];for(u==""&&GC(HC(h,p.state),T);!G.eol();){if(G.pos>a.options.maxHighlightLength?(L=!1,O&&My(a,u,p,G.pos),G.pos=u.length,X=null):X=GC(Py(h,G,p.state,se),T),se){var oe=se[0].name;oe&&(X="m-"+(X?oe+" "+X:oe))}if(!L||V!=X){for(;M<G.start;)M=Math.min(G.start,M+5e3),y(M,V);V=X}G.start=G.pos}for(;M<G.pos;){var pe=Math.min(G.pos,M+5e3);y(pe,V),M=pe}}P(YC,"runMode");function G6(a,u,h){for(var p,y,T=a.doc,O=h?-1:u-(a.doc.mode.innerMode?1e3:100),L=u;L>O;--L){if(L<=T.first)return T.first;var M=Pe(T,L-1),V=M.stateAfter;if(V&&(!h||L+(V instanceof Tf?V.lookAhead:0)<=T.modeFrontier))return L;var G=ne(M.text,null,a.options.tabSize);(y==null||p>G)&&(y=L-1,p=G)}return y}P(G6,"findStartLine");function Y6(a,u){if(a.modeFrontier=Math.min(a.modeFrontier,u),!(a.highlightFrontier<u-10)){for(var h=a.first,p=u-1;p>h;p--){var y=Pe(a,p).stateAfter;if(y&&(!(y instanceof Tf)||p+y.lookAhead<u)){h=p+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,h)}}P(Y6,"retreatFrontier");var Q6=!1,Gs=!1;function K6(){Q6=!0}P(K6,"seeReadOnlySpans");function J6(){Gs=!0}P(J6,"seeCollapsedSpans");function yh(a,u,h){this.marker=a,this.from=u,this.to=h}P(yh,"MarkedSpan");function kf(a,u){if(a)for(var h=0;h<a.length;++h){var p=a[h];if(p.marker==u)return p}}P(kf,"getMarkedSpanFor");function X6(a,u){for(var h,p=0;p<a.length;++p)a[p]!=u&&(h||(h=[])).push(a[p]);return h}P(X6,"removeMarkedSpan");function Z6(a,u,h){var p=h&&window.WeakSet&&(h.markedSpans||(h.markedSpans=new WeakSet));p&&a.markedSpans&&p.has(a.markedSpans)?a.markedSpans.push(u):(a.markedSpans=a.markedSpans?a.markedSpans.concat([u]):[u],p&&p.add(a.markedSpans)),u.marker.attachLine(a)}P(Z6,"addMarkedSpan");function eV(a,u,h){var p;if(a)for(var y=0;y<a.length;++y){var T=a[y],O=T.marker,L=T.from==null||(O.inclusiveLeft?T.from<=u:T.from<u);if(L||T.from==u&&O.type=="bookmark"&&(!h||!T.marker.insertLeft)){var M=T.to==null||(O.inclusiveRight?T.to>=u:T.to>u);(p||(p=[])).push(new yh(O,T.from,M?null:T.to))}}return p}P(eV,"markedSpansBefore");function tV(a,u,h){var p;if(a)for(var y=0;y<a.length;++y){var T=a[y],O=T.marker,L=T.to==null||(O.inclusiveRight?T.to>=u:T.to>u);if(L||T.from==u&&O.type=="bookmark"&&(!h||T.marker.insertLeft)){var M=T.from==null||(O.inclusiveLeft?T.from<=u:T.from<u);(p||(p=[])).push(new yh(O,M?null:T.from-u,T.to==null?null:T.to-u))}}return p}P(tV,"markedSpansAfter");function $y(a,u){if(u.full)return null;var h=Ws(a,u.from.line)&&Pe(a,u.from.line).markedSpans,p=Ws(a,u.to.line)&&Pe(a,u.to.line).markedSpans;if(!h&&!p)return null;var y=u.from.ch,T=u.to.ch,O=j(u.from,u.to)==0,L=eV(h,y,O),M=tV(p,T,O),V=u.text.length==1,G=je(u.text).length+(V?y:0);if(L)for(var X=0;X<L.length;++X){var se=L[X];if(se.to==null){var oe=kf(M,se.marker);oe?V&&(se.to=oe.to==null?null:oe.to+G):se.to=y}}if(M)for(var pe=0;pe<M.length;++pe){var be=M[pe];if(be.to!=null&&(be.to+=G),be.from==null){var ke=kf(L,be.marker);ke||(be.from=G,V&&(L||(L=[])).push(be))}else be.from+=G,V&&(L||(L=[])).push(be)}L&&(L=QC(L)),M&&M!=L&&(M=QC(M));var Ae=[L];if(!V){var Le=u.text.length-2,De;if(Le>0&&L)for(var Me=0;Me<L.length;++Me)L[Me].to==null&&(De||(De=[])).push(new yh(L[Me].marker,null,null));for(var Ye=0;Ye<Le;++Ye)Ae.push(De);Ae.push(M)}return Ae}P($y,"stretchSpansOverChange");function QC(a){for(var u=0;u<a.length;++u){var h=a[u];h.from!=null&&h.from==h.to&&h.marker.clearWhenEmpty!==!1&&a.splice(u--,1)}return a.length?a:null}P(QC,"clearEmptySpans");function nV(a,u,h){var p=null;if(a.iter(u.line,h.line+1,function(oe){if(oe.markedSpans)for(var pe=0;pe<oe.markedSpans.length;++pe){var be=oe.markedSpans[pe].marker;be.readOnly&&(!p||le(p,be)==-1)&&(p||(p=[])).push(be)}}),!p)return null;for(var y=[{from:u,to:h}],T=0;T<p.length;++T)for(var O=p[T],L=O.find(0),M=0;M<y.length;++M){var V=y[M];if(!(j(V.to,L.from)<0||j(V.from,L.to)>0)){var G=[M,1],X=j(V.from,L.from),se=j(V.to,L.to);(X<0||!O.inclusiveLeft&&!X)&&G.push({from:V.from,to:L.from}),(se>0||!O.inclusiveRight&&!se)&&G.push({from:L.to,to:V.to}),y.splice.apply(y,G),M+=G.length-3}}return y}P(nV,"removeReadOnlyRanges");function KC(a){var u=a.markedSpans;if(u){for(var h=0;h<u.length;++h)u[h].marker.detachLine(a);a.markedSpans=null}}P(KC,"detachMarkedSpans");function JC(a,u){if(u){for(var h=0;h<u.length;++h)u[h].marker.attachLine(a);a.markedSpans=u}}P(JC,"attachMarkedSpans");function bh(a){return a.inclusiveLeft?-1:0}P(bh,"extraLeft");function Eh(a){return a.inclusiveRight?1:0}P(Eh,"extraRight");function Vy(a,u){var h=a.lines.length-u.lines.length;if(h!=0)return h;var p=a.find(),y=u.find(),T=j(p.from,y.from)||bh(a)-bh(u);if(T)return-T;var O=j(p.to,y.to)||Eh(a)-Eh(u);return O||u.id-a.id}P(Vy,"compareCollapsedMarkers");function XC(a,u){var h=Gs&&a.markedSpans,p;if(h)for(var y=void 0,T=0;T<h.length;++T)y=h[T],y.marker.collapsed&&(u?y.from:y.to)==null&&(!p||Vy(p,y.marker)<0)&&(p=y.marker);return p}P(XC,"collapsedSpanAtSide");function ZC(a){return XC(a,!0)}P(ZC,"collapsedSpanAtStart");function wh(a){return XC(a,!1)}P(wh,"collapsedSpanAtEnd");function rV(a,u){var h=Gs&&a.markedSpans,p;if(h)for(var y=0;y<h.length;++y){var T=h[y];T.marker.collapsed&&(T.from==null||T.from<u)&&(T.to==null||T.to>u)&&(!p||Vy(p,T.marker)<0)&&(p=T.marker)}return p}P(rV,"collapsedSpanAround");function ek(a,u,h,p,y){var T=Pe(a,u),O=Gs&&T.markedSpans;if(O)for(var L=0;L<O.length;++L){var M=O[L];if(M.marker.collapsed){var V=M.marker.find(0),G=j(V.from,h)||bh(M.marker)-bh(y),X=j(V.to,p)||Eh(M.marker)-Eh(y);if(!(G>=0&&X<=0||G<=0&&X>=0)&&(G<=0&&(M.marker.inclusiveRight&&y.inclusiveLeft?j(V.to,h)>=0:j(V.to,h)>0)||G>=0&&(M.marker.inclusiveRight&&y.inclusiveLeft?j(V.from,p)<=0:j(V.from,p)<0)))return!0}}}P(ek,"conflictingCollapsedRange");function si(a){for(var u;u=ZC(a);)a=u.find(-1,!0).line;return a}P(si,"visualLine");function oV(a){for(var u;u=wh(a);)a=u.find(1,!0).line;return a}P(oV,"visualLineEnd");function iV(a){for(var u,h;u=wh(a);)a=u.find(1,!0).line,(h||(h=[])).push(a);return h}P(iV,"visualLineContinued");function jy(a,u){var h=Pe(a,u),p=si(h);return h==p?u:yt(p)}P(jy,"visualLineNo");function tk(a,u){if(u>a.lastLine())return u;var h=Pe(a,u),p;if(!Ys(a,h))return u;for(;p=wh(h);)h=p.find(1,!0).line;return yt(h)+1}P(tk,"visualLineEndNo");function Ys(a,u){var h=Gs&&u.markedSpans;if(h){for(var p=void 0,y=0;y<h.length;++y)if(p=h[y],!!p.marker.collapsed&&(p.from==null||!p.marker.widgetNode&&p.from==0&&p.marker.inclusiveLeft&&Uy(a,u,p)))return!0}}P(Ys,"lineIsHidden");function Uy(a,u,h){if(h.to==null){var p=h.marker.find(1,!0);return Uy(a,p.line,kf(p.line.markedSpans,h.marker))}if(h.marker.inclusiveRight&&h.to==u.text.length)return!0;for(var y=void 0,T=0;T<u.markedSpans.length;++T)if(y=u.markedSpans[T],y.marker.collapsed&&!y.marker.widgetNode&&y.from==h.to&&(y.to==null||y.to!=h.from)&&(y.marker.inclusiveLeft||h.marker.inclusiveRight)&&Uy(a,u,y))return!0}P(Uy,"lineIsHiddenInner");function cs(a){a=si(a);for(var u=0,h=a.parent,p=0;p<h.lines.length;++p){var y=h.lines[p];if(y==a)break;u+=y.height}for(var T=h.parent;T;h=T,T=h.parent)for(var O=0;O<T.children.length;++O){var L=T.children[O];if(L==h)break;u+=L.height}return u}P(cs,"heightAtLine");function xh(a){if(a.height==0)return 0;for(var u=a.text.length,h,p=a;h=ZC(p);){var y=h.find(0,!0);p=y.from.line,u+=y.from.ch-y.to.ch}for(p=a;h=wh(p);){var T=h.find(0,!0);u-=p.text.length-T.from.ch,p=T.to.line,u+=p.text.length-T.to.ch}return u}P(xh,"lineLength");function By(a){var u=a.display,h=a.doc;u.maxLine=Pe(h,h.first),u.maxLineLength=xh(u.maxLine),u.maxLineChanged=!0,h.iter(function(p){var y=xh(p);y>u.maxLineLength&&(u.maxLineLength=y,u.maxLine=p)})}P(By,"findMaxLine");var Nf=P(function(a,u,h){this.text=a,JC(this,u),this.height=h?h(this):1},"Line");Nf.prototype.lineNo=function(){return yt(this)},ti(Nf);function sV(a,u,h,p){a.text=u,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),KC(a),JC(a,h);var y=p?p(a):1;y!=a.height&&Ar(a,y)}P(sV,"updateLine");function aV(a){a.parent=null,KC(a)}P(aV,"cleanUpLine");var mue={},gue={};function nk(a,u){if(!a||/^\s*$/.test(a))return null;var h=u.addModeClass?gue:mue;return h[a]||(h[a]=a.replace(/\S+/g,"cm-$&"))}P(nk,"interpretTokenStyle");function rk(a,u){var h=R("span",null,null,d?"padding-right: .1px":null),p={pre:R("pre",[h],"CodeMirror-line"),content:h,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};u.measure={};for(var y=0;y<=(u.rest?u.rest.length:0);y++){var T=y?u.rest[y-1]:u.line,O=void 0;p.pos=0,p.addToken=cV,ni(a.display.measure)&&(O=_r(T,a.doc.direction))&&(p.addToken=fV(p.addToken,O)),p.map=[];var L=u!=a.display.externalMeasured&&yt(T);dV(T,p,zC(a,T,L)),T.styleClasses&&(T.styleClasses.bgClass&&(p.bgClass=Z(T.styleClasses.bgClass,p.bgClass||"")),T.styleClasses.textClass&&(p.textClass=Z(T.styleClasses.textClass,p.textClass||""))),p.map.length==0&&p.map.push(0,0,p.content.appendChild(bf(a.display.measure))),y==0?(u.measure.map=p.map,u.measure.cache={}):((u.measure.maps||(u.measure.maps=[])).push(p.map),(u.measure.caches||(u.measure.caches=[])).push({}))}if(d){var M=p.content.lastChild;(/\bcm-tab\b/.test(M.className)||M.querySelector&&M.querySelector(".cm-tab"))&&(p.content.className="cm-tab-wrap-hack")}return Ke(a,"renderLine",a,u.line,p.pre),p.pre.className&&(p.textClass=Z(p.pre.className,p.textClass||"")),p}P(rk,"buildLineContent");function lV(a){var u=B("span","•","cm-invalidchar");return u.title="\\u"+a.charCodeAt(0).toString(16),u.setAttribute("aria-label",u.title),u}P(lV,"defaultSpecialCharPlaceholder");function cV(a,u,h,p,y,T,O){if(u){var L=a.splitSpaces?uV(u,a.trailingSpace):u,M=a.cm.state.specialChars,V=!1,G;if(!M.test(u))a.col+=u.length,G=document.createTextNode(L),a.map.push(a.pos,a.pos+u.length,G),c&&f<9&&(V=!0),a.pos+=u.length;else{G=document.createDocumentFragment();for(var X=0;;){M.lastIndex=X;var se=M.exec(u),oe=se?se.index-X:u.length-X;if(oe){var pe=document.createTextNode(L.slice(X,X+oe));c&&f<9?G.appendChild(B("span",[pe])):G.appendChild(pe),a.map.push(a.pos,a.pos+oe,pe),a.col+=oe,a.pos+=oe}if(!se)break;X+=oe+1;var be=void 0;if(se[0]==" "){var ke=a.cm.options.tabSize,Ae=ke-a.col%ke;be=G.appendChild(B("span",Ot(Ae),"cm-tab")),be.setAttribute("role","presentation"),be.setAttribute("cm-text"," "),a.col+=Ae}else se[0]=="\r"||se[0]==`
`?(be=G.appendChild(B("span",se[0]=="\r"?"␍":"","cm-invalidchar")),be.setAttribute("cm-text",se[0]),a.col+=1):(be=a.cm.options.specialCharPlaceholder(se[0]),be.setAttribute("cm-text",se[0]),c&&f<9?G.appendChild(B("span",[be])):G.appendChild(be),a.col+=1);a.map.push(a.pos,a.pos+1,be),a.pos++}}if(a.trailingSpace=L.charCodeAt(u.length-1)==32,h||p||y||V||T||O){var Le=h||"";p&&(Le+=p),y&&(Le+=y);var De=B("span",[G],Le,T);if(O)for(var Me in O)O.hasOwnProperty(Me)&&Me!="style"&&Me!="class"&&De.setAttribute(Me,O[Me]);return a.content.appendChild(De)}a.content.appendChild(G)}}P(cV,"buildToken");function uV(a,u){if(a.length>1&&!/ /.test(a))return a;for(var h=u,p="",y=0;y<a.length;y++){var T=a.charAt(y);T==" "&&h&&(y==a.length-1||a.charCodeAt(y+1)==32)&&(T=" "),p+=T,h=T==" "}return p}P(uV,"splitSpaces");function fV(a,u){return function(h,p,y,T,O,L,M){y=y?y+" cm-force-border":"cm-force-border";for(var V=h.pos,G=V+p.length;;){for(var X=void 0,se=0;se<u.length&&(X=u[se],!(X.to>V&&X.from<=V));se++);if(X.to>=G)return a(h,p,y,T,O,L,M);a(h,p.slice(0,X.to-V),y,T,null,L,M),T=null,p=p.slice(X.to-V),V=X.to}}}P(fV,"buildTokenBadBidi");function ok(a,u,h,p){var y=!p&&h.widgetNode;y&&a.map.push(a.pos,a.pos+u,y),!p&&a.cm.display.input.needsContentAttribute&&(y||(y=a.content.appendChild(document.createElement("span"))),y.setAttribute("cm-marker",h.id)),y&&(a.cm.display.input.setUneditable(y),a.content.appendChild(y)),a.pos+=u,a.trailingSpace=!1}P(ok,"buildCollapsedSpan");function dV(a,u,h){var p=a.markedSpans,y=a.text,T=0;if(!p){for(var O=1;O<h.length;O+=2)u.addToken(u,y.slice(T,T=h[O]),nk(h[O+1],u.cm.options));return}for(var L=y.length,M=0,V=1,G="",X,se,oe=0,pe,be,ke,Ae,Le;;){if(oe==M){pe=be=ke=se="",Le=null,Ae=null,oe=1/0;for(var De=[],Me=void 0,Ye=0;Ye<p.length;++Ye){var ze=p[Ye],at=ze.marker;if(at.type=="bookmark"&&ze.from==M&&at.widgetNode)De.push(at);else if(ze.from<=M&&(ze.to==null||ze.to>M||at.collapsed&&ze.to==M&&ze.from==M)){if(ze.to!=null&&ze.to!=M&&oe>ze.to&&(oe=ze.to,be=""),at.className&&(pe+=" "+at.className),at.css&&(se=(se?se+";":"")+at.css),at.startStyle&&ze.from==M&&(ke+=" "+at.startStyle),at.endStyle&&ze.to==oe&&(Me||(Me=[])).push(at.endStyle,ze.to),at.title&&((Le||(Le={})).title=at.title),at.attributes)for(var It in at.attributes)(Le||(Le={}))[It]=at.attributes[It];at.collapsed&&(!Ae||Vy(Ae.marker,at)<0)&&(Ae=ze)}else ze.from>M&&oe>ze.from&&(oe=ze.from)}if(Me)for(var qn=0;qn<Me.length;qn+=2)Me[qn+1]==oe&&(be+=" "+Me[qn]);if(!Ae||Ae.from==M)for(var Gt=0;Gt<De.length;++Gt)ok(u,0,De[Gt]);if(Ae&&(Ae.from||0)==M){if(ok(u,(Ae.to==null?L+1:Ae.to)-M,Ae.marker,Ae.from==null),Ae.to==null)return;Ae.to==M&&(Ae=!1)}}if(M>=L)break;for(var Gr=Math.min(L,oe);;){if(G){var Yr=M+G.length;if(!Ae){var Sn=Yr>Gr?G.slice(0,Gr-M):G;u.addToken(u,Sn,X?X+pe:pe,ke,M+Sn.length==oe?be:"",se,Le)}if(Yr>=Gr){G=G.slice(Gr-M),M=Gr;break}M=Yr,ke=""}G=y.slice(T,T=h[V++]),X=nk(h[V++],u.cm.options)}}}P(dV,"insertLineContent");function ik(a,u,h){this.line=u,this.rest=iV(u),this.size=this.rest?yt(je(this.rest))-h+1:1,this.node=this.text=null,this.hidden=Ys(a,u)}P(ik,"LineView");function Sh(a,u,h){for(var p=[],y,T=u;T<h;T=y){var O=new ik(a.doc,Pe(a.doc,T),T);y=T+O.size,p.push(O)}return p}P(Sh,"buildViewArray");var _f=null;function pV(a){_f?_f.ops.push(a):a.ownsGroup=_f={ops:[a],delayedCallbacks:[]}}P(pV,"pushOperation");function hV(a){var u=a.delayedCallbacks,h=0;do{for(;h<u.length;h++)u[h].call(null);for(var p=0;p<a.ops.length;p++){var y=a.ops[p];if(y.cursorActivityHandlers)for(;y.cursorActivityCalled<y.cursorActivityHandlers.length;)y.cursorActivityHandlers[y.cursorActivityCalled++].call(null,y.cm)}}while(h<u.length)}P(hV,"fireCallbacksForOps");function mV(a,u){var h=a.ownsGroup;if(h)try{hV(h)}finally{_f=null,u(h)}}P(mV,"finishOperation");var Th=null;function On(a,u){var h=ol(a,u);if(h.length){var p=Array.prototype.slice.call(arguments,2),y;_f?y=_f.delayedCallbacks:Th?y=Th:(y=Th=[],setTimeout(gV,0));for(var T=P(function(L){y.push(function(){return h[L].apply(null,p)})},"loop"),O=0;O<h.length;++O)T(O)}}P(On,"signalLater");function gV(){var a=Th;Th=null;for(var u=0;u<a.length;++u)a[u]()}P(gV,"fireOrphanDelayed");function sk(a,u,h,p){for(var y=0;y<u.changes.length;y++){var T=u.changes[y];T=="text"?yV(a,u):T=="gutter"?lk(a,u,h,p):T=="class"?qy(a,u):T=="widget"&&bV(a,u,p)}u.changes=null}P(sk,"updateLineForChanges");function Of(a){return a.node==a.text&&(a.node=B("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),c&&f<8&&(a.node.style.zIndex=2)),a.node}P(Of,"ensureLineWrapped");function vV(a,u){var h=u.bgClass?u.bgClass+" "+(u.line.bgClass||""):u.line.bgClass;if(h&&(h+=" CodeMirror-linebackground"),u.background)h?u.background.className=h:(u.background.parentNode.removeChild(u.background),u.background=null);else if(h){var p=Of(u);u.background=p.insertBefore(B("div",null,h),p.firstChild),a.display.input.setUneditable(u.background)}}P(vV,"updateLineBackground");function ak(a,u){var h=a.display.externalMeasured;return h&&h.line==u.line?(a.display.externalMeasured=null,u.measure=h.measure,h.built):rk(a,u)}P(ak,"getLineContent");function yV(a,u){var h=u.text.className,p=ak(a,u);u.text==u.node&&(u.node=p.pre),u.text.parentNode.replaceChild(p.pre,u.text),u.text=p.pre,p.bgClass!=u.bgClass||p.textClass!=u.textClass?(u.bgClass=p.bgClass,u.textClass=p.textClass,qy(a,u)):h&&(u.text.className=h)}P(yV,"updateLineText");function qy(a,u){vV(a,u),u.line.wrapClass?Of(u).className=u.line.wrapClass:u.node!=u.text&&(u.node.className="");var h=u.textClass?u.textClass+" "+(u.line.textClass||""):u.line.textClass;u.text.className=h||""}P(qy,"updateLineClasses");function lk(a,u,h,p){if(u.gutter&&(u.node.removeChild(u.gutter),u.gutter=null),u.gutterBackground&&(u.node.removeChild(u.gutterBackground),u.gutterBackground=null),u.line.gutterClass){var y=Of(u);u.gutterBackground=B("div",null,"CodeMirror-gutter-background "+u.line.gutterClass,"left: "+(a.options.fixedGutter?p.fixedPos:-p.gutterTotalWidth)+"px; width: "+p.gutterTotalWidth+"px"),a.display.input.setUneditable(u.gutterBackground),y.insertBefore(u.gutterBackground,u.text)}var T=u.line.gutterMarkers;if(a.options.lineNumbers||T){var O=Of(u),L=u.gutter=B("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?p.fixedPos:-p.gutterTotalWidth)+"px");if(L.setAttribute("aria-hidden","true"),a.display.input.setUneditable(L),O.insertBefore(L,u.text),u.line.gutterClass&&(L.className+=" "+u.line.gutterClass),a.options.lineNumbers&&(!T||!T["CodeMirror-linenumbers"])&&(u.lineNumber=L.appendChild(B("div",Sc(a.options,h),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+p.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),T)for(var M=0;M<a.display.gutterSpecs.length;++M){var V=a.display.gutterSpecs[M].className,G=T.hasOwnProperty(V)&&T[V];G&&L.appendChild(B("div",[G],"CodeMirror-gutter-elt","left: "+p.gutterLeft[V]+"px; width: "+p.gutterWidth[V]+"px"))}}}P(lk,"updateLineGutter");function bV(a,u,h){u.alignable&&(u.alignable=null);for(var p=$("CodeMirror-linewidget"),y=u.node.firstChild,T=void 0;y;y=T)T=y.nextSibling,p.test(y.className)&&u.node.removeChild(y);ck(a,u,h)}P(bV,"updateLineWidgets");function EV(a,u,h,p){var y=ak(a,u);return u.text=u.node=y.pre,y.bgClass&&(u.bgClass=y.bgClass),y.textClass&&(u.textClass=y.textClass),qy(a,u),lk(a,u,h,p),ck(a,u,p),u.node}P(EV,"buildLineElement");function ck(a,u,h){if(uk(a,u.line,u,h,!0),u.rest)for(var p=0;p<u.rest.length;p++)uk(a,u.rest[p],u,h,!1)}P(ck,"insertLineWidgets");function uk(a,u,h,p,y){if(u.widgets)for(var T=Of(h),O=0,L=u.widgets;O<L.length;++O){var M=L[O],V=B("div",[M.node],"CodeMirror-linewidget"+(M.className?" "+M.className:""));M.handleMouseEvents||V.setAttribute("cm-ignore-events","true"),wV(M,V,h,p),a.display.input.setUneditable(V),y&&M.above?T.insertBefore(V,h.gutter||h.text):T.appendChild(V),On(M,"redraw")}}P(uk,"insertLineWidgetsFor");function wV(a,u,h,p){if(a.noHScroll){(h.alignable||(h.alignable=[])).push(u);var y=p.wrapperWidth;u.style.left=p.fixedPos+"px",a.coverGutter||(y-=p.gutterTotalWidth,u.style.paddingLeft=p.gutterTotalWidth+"px"),u.style.width=y+"px"}a.coverGutter&&(u.style.zIndex=5,u.style.position="relative",a.noHScroll||(u.style.marginLeft=-p.gutterTotalWidth+"px"))}P(wV,"positionLineWidget");function Af(a){if(a.height!=null)return a.height;var u=a.doc.cm;if(!u)return 0;if(!Y(document.body,a.node)){var h="position: relative;";a.coverGutter&&(h+="margin-left: -"+u.display.gutters.offsetWidth+"px;"),a.noHScroll&&(h+="width: "+u.display.wrapper.clientWidth+"px;"),z(u.display.measure,B("div",[a.node],null,h))}return a.height=a.node.parentNode.offsetHeight}P(Af,"widgetHeight");function us(a,u){for(var h=ss(u);h!=a.wrapper;h=h.parentNode)if(!h||h.nodeType==1&&h.getAttribute("cm-ignore-events")=="true"||h.parentNode==a.sizer&&h!=a.mover)return!0}P(us,"eventInWidget");function Ch(a){return a.lineSpace.offsetTop}P(Ch,"paddingTop");function zy(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}P(zy,"paddingVert");function fk(a){if(a.cachedPaddingH)return a.cachedPaddingH;var u=z(a.measure,B("pre","x","CodeMirror-line-like")),h=window.getComputedStyle?window.getComputedStyle(u):u.currentStyle,p={left:parseInt(h.paddingLeft),right:parseInt(h.paddingRight)};return!isNaN(p.left)&&!isNaN(p.right)&&(a.cachedPaddingH=p),p}P(fk,"paddingH");function $i(a){return de-a.display.nativeBarWidth}P($i,"scrollGap");function cl(a){return a.display.scroller.clientWidth-$i(a)-a.display.barWidth}P(cl,"displayWidth");function Hy(a){return a.display.scroller.clientHeight-$i(a)-a.display.barHeight}P(Hy,"displayHeight");function xV(a,u,h){var p=a.options.lineWrapping,y=p&&cl(a);if(!u.measure.heights||p&&u.measure.width!=y){var T=u.measure.heights=[];if(p){u.measure.width=y;for(var O=u.text.firstChild.getClientRects(),L=0;L<O.length-1;L++){var M=O[L],V=O[L+1];Math.abs(M.bottom-V.bottom)>2&&T.push((M.bottom+V.top)/2-h.top)}}T.push(h.bottom-h.top)}}P(xV,"ensureLineHeights");function dk(a,u,h){if(a.line==u)return{map:a.measure.map,cache:a.measure.cache};if(a.rest){for(var p=0;p<a.rest.length;p++)if(a.rest[p]==u)return{map:a.measure.maps[p],cache:a.measure.caches[p]};for(var y=0;y<a.rest.length;y++)if(yt(a.rest[y])>h)return{map:a.measure.maps[y],cache:a.measure.caches[y],before:!0}}}P(dk,"mapFromLineView");function SV(a,u){u=si(u);var h=yt(u),p=a.display.externalMeasured=new ik(a.doc,u,h);p.lineN=h;var y=p.built=rk(a,p);return p.text=y.pre,z(a.display.lineMeasure,y.pre),p}P(SV,"updateExternalMeasurement");function pk(a,u,h,p){return Vi(a,Tc(a,u),h,p)}P(pk,"measureChar");function Wy(a,u){if(u>=a.display.viewFrom&&u<a.display.viewTo)return a.display.view[fl(a,u)];var h=a.display.externalMeasured;if(h&&u>=h.lineN&&u<h.lineN+h.size)return h}P(Wy,"findViewForLine");function Tc(a,u){var h=yt(u),p=Wy(a,h);p&&!p.text?p=null:p&&p.changes&&(sk(a,p,h,Jy(a)),a.curOp.forceUpdate=!0),p||(p=SV(a,u));var y=dk(p,u,h);return{line:u,view:p,rect:null,map:y.map,cache:y.cache,before:y.before,hasHeights:!1}}P(Tc,"prepareMeasureForLine");function Vi(a,u,h,p,y){u.before&&(h=-1);var T=h+(p||""),O;return u.cache.hasOwnProperty(T)?O=u.cache[T]:(u.rect||(u.rect=u.view.text.getBoundingClientRect()),u.hasHeights||(xV(a,u.view,u.rect),u.hasHeights=!0),O=kV(a,u,h,p),O.bogus||(u.cache[T]=O)),{left:O.left,right:O.right,top:y?O.rtop:O.top,bottom:y?O.rbottom:O.bottom}}P(Vi,"measureCharPrepared");var TV={left:0,right:0,top:0,bottom:0};function hk(a,u,h){for(var p,y,T,O,L,M,V=0;V<a.length;V+=3)if(L=a[V],M=a[V+1],u<L?(y=0,T=1,O="left"):u<M?(y=u-L,T=y+1):(V==a.length-3||u==M&&a[V+3]>u)&&(T=M-L,y=T-1,u>=M&&(O="right")),y!=null){if(p=a[V+2],L==M&&h==(p.insertLeft?"left":"right")&&(O=h),h=="left"&&y==0)for(;V&&a[V-2]==a[V-3]&&a[V-1].insertLeft;)p=a[(V-=3)+2],O="left";if(h=="right"&&y==M-L)for(;V<a.length-3&&a[V+3]==a[V+4]&&!a[V+5].insertLeft;)p=a[(V+=3)+2],O="right";break}return{node:p,start:y,end:T,collapse:O,coverStart:L,coverEnd:M}}P(hk,"nodeAndOffsetInLineMap");function CV(a,u){var h=TV;if(u=="left")for(var p=0;p<a.length&&(h=a[p]).left==h.right;p++);else for(var y=a.length-1;y>=0&&(h=a[y]).left==h.right;y--);return h}P(CV,"getUsefulRect");function kV(a,u,h,p){var y=hk(u.map,h,p),T=y.node,O=y.start,L=y.end,M=y.collapse,V;if(T.nodeType==3){for(var G=0;G<4;G++){for(;O&&bc(u.line.text.charAt(y.coverStart+O));)--O;for(;y.coverStart+L<y.coverEnd&&bc(u.line.text.charAt(y.coverStart+L));)++L;if(c&&f<9&&O==0&&L==y.coverEnd-y.coverStart?V=T.parentNode.getBoundingClientRect():V=CV(te(T,O,L).getClientRects(),p),V.left||V.right||O==0)break;L=O,O=O-1,M="right"}c&&f<11&&(V=NV(a.display.measure,V))}else{O>0&&(M=p="right");var X;a.options.lineWrapping&&(X=T.getClientRects()).length>1?V=X[p=="right"?X.length-1:0]:V=T.getBoundingClientRect()}if(c&&f<9&&!O&&(!V||!V.left&&!V.right)){var se=T.parentNode.getClientRects()[0];se?V={left:se.left,right:se.left+Nc(a.display),top:se.top,bottom:se.bottom}:V=TV}for(var oe=V.top-u.rect.top,pe=V.bottom-u.rect.top,be=(oe+pe)/2,ke=u.view.measure.heights,Ae=0;Ae<ke.length-1&&!(be<ke[Ae]);Ae++);var Le=Ae?ke[Ae-1]:0,De=ke[Ae],Me={left:(M=="right"?V.right:V.left)-u.rect.left,right:(M=="left"?V.left:V.right)-u.rect.left,top:Le,bottom:De};return!V.left&&!V.right&&(Me.bogus=!0),a.options.singleCursorHeightPerLine||(Me.rtop=oe,Me.rbottom=pe),Me}P(kV,"measureCharInner");function NV(a,u){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!as(a))return u;var h=screen.logicalXDPI/screen.deviceXDPI,p=screen.logicalYDPI/screen.deviceYDPI;return{left:u.left*h,right:u.right*h,top:u.top*p,bottom:u.bottom*p}}P(NV,"maybeUpdateRectForZooming");function mk(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var u=0;u<a.rest.length;u++)a.measure.caches[u]={}}P(mk,"clearLineMeasurementCacheFor");function gk(a){a.display.externalMeasure=null,H(a.display.lineMeasure);for(var u=0;u<a.display.view.length;u++)mk(a.display.view[u])}P(gk,"clearLineMeasurementCache");function Df(a){gk(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}P(Df,"clearCaches");function vk(){return m&&x?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}P(vk,"pageScrollX");function yk(){return m&&x?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}P(yk,"pageScrollY");function Gy(a){var u=si(a),h=u.widgets,p=0;if(h)for(var y=0;y<h.length;++y)h[y].above&&(p+=Af(h[y]));return p}P(Gy,"widgetTopHeight");function kh(a,u,h,p,y){if(!y){var T=Gy(u);h.top+=T,h.bottom+=T}if(p=="line")return h;p||(p="local");var O=cs(u);if(p=="local"?O+=Ch(a.display):O-=a.display.viewOffset,p=="page"||p=="window"){var L=a.display.lineSpace.getBoundingClientRect();O+=L.top+(p=="window"?0:yk());var M=L.left+(p=="window"?0:vk());h.left+=M,h.right+=M}return h.top+=O,h.bottom+=O,h}P(kh,"intoCoordSystem");function bk(a,u,h){if(h=="div")return u;var p=u.left,y=u.top;if(h=="page")p-=vk(),y-=yk();else if(h=="local"||!h){var T=a.display.sizer.getBoundingClientRect();p+=T.left,y+=T.top}var O=a.display.lineSpace.getBoundingClientRect();return{left:p-O.left,top:y-O.top}}P(bk,"fromCoordSystem");function Nh(a,u,h,p,y){return p||(p=Pe(a.doc,u.line)),kh(a,p,pk(a,p,u.ch,y),h)}P(Nh,"charCoords");function ai(a,u,h,p,y,T){p=p||Pe(a.doc,u.line),y||(y=Tc(a,p));function O(pe,be){var ke=Vi(a,y,pe,be?"right":"left",T);return be?ke.left=ke.right:ke.right=ke.left,kh(a,p,ke,h)}P(O,"get");var L=_r(p,a.doc.direction),M=u.ch,V=u.sticky;if(M>=p.text.length?(M=p.text.length,V="before"):M<=0&&(M=0,V="after"),!L)return O(V=="before"?M-1:M,V=="before");function G(pe,be,ke){var Ae=L[be],Le=Ae.level==1;return O(ke?pe-1:pe,Le!=ke)}P(G,"getBidi");var X=Wt(L,M,V),se=io,oe=G(M,X,V=="before");return se!=null&&(oe.other=G(M,se,V!="before")),oe}P(ai,"cursorCoords");function Ek(a,u){var h=0;u=Re(a.doc,u),a.options.lineWrapping||(h=Nc(a.display)*u.ch);var p=Pe(a.doc,u.line),y=cs(p)+Ch(a.display);return{left:h,right:h,top:y,bottom:y+p.height}}P(Ek,"estimateCoords");function Yy(a,u,h,p,y){var T=we(a,u,h);return T.xRel=y,p&&(T.outside=p),T}P(Yy,"PosWithInfo");function Qy(a,u,h){var p=a.doc;if(h+=a.display.viewOffset,h<0)return Yy(p.first,0,null,-1,-1);var y=ii(p,h),T=p.first+p.size-1;if(y>T)return Yy(p.first+p.size-1,Pe(p,T).text.length,null,1,1);u<0&&(u=0);for(var O=Pe(p,y);;){var L=_V(a,O,y,u,h),M=rV(O,L.ch+(L.xRel>0||L.outside>0?1:0));if(!M)return L;var V=M.find(1);if(V.line==y)return V;O=Pe(p,y=V.line)}}P(Qy,"coordsChar");function wk(a,u,h,p){p-=Gy(u);var y=u.text.length,T=ei(function(O){return Vi(a,h,O-1).bottom<=p},y,0);return y=ei(function(O){return Vi(a,h,O).top>p},T,y),{begin:T,end:y}}P(wk,"wrappedLineExtent");function xk(a,u,h,p){h||(h=Tc(a,u));var y=kh(a,u,Vi(a,h,p),"line").top;return wk(a,u,h,y)}P(xk,"wrappedLineExtentChar");function Ky(a,u,h,p){return a.bottom<=h?!1:a.top>h?!0:(p?a.left:a.right)>u}P(Ky,"boxIsAfter");function _V(a,u,h,p,y){y-=cs(u);var T=Tc(a,u),O=Gy(u),L=0,M=u.text.length,V=!0,G=_r(u,a.doc.direction);if(G){var X=(a.options.lineWrapping?AV:OV)(a,u,h,T,G,p,y);V=X.level!=1,L=V?X.from:X.to-1,M=V?X.to:X.from-1}var se=null,oe=null,pe=ei(function(Ye){var ze=Vi(a,T,Ye);return ze.top+=O,ze.bottom+=O,Ky(ze,p,y,!1)?(ze.top<=y&&ze.left<=p&&(se=Ye,oe=ze),!0):!1},L,M),be,ke,Ae=!1;if(oe){var Le=p-oe.left<oe.right-p,De=Le==V;pe=se+(De?0:1),ke=De?"after":"before",be=Le?oe.left:oe.right}else{!V&&(pe==M||pe==L)&&pe++,ke=pe==0?"after":pe==u.text.length?"before":Vi(a,T,pe-(V?1:0)).bottom+O<=y==V?"after":"before";var Me=ai(a,we(h,pe,ke),"line",u,T);be=Me.left,Ae=y<Me.top?-1:y>=Me.bottom?1:0}return pe=gf(u.text,pe,1),Yy(h,pe,ke,Ae,p-be)}P(_V,"coordsCharInner");function OV(a,u,h,p,y,T,O){var L=ei(function(X){var se=y[X],oe=se.level!=1;return Ky(ai(a,we(h,oe?se.to:se.from,oe?"before":"after"),"line",u,p),T,O,!0)},0,y.length-1),M=y[L];if(L>0){var V=M.level!=1,G=ai(a,we(h,V?M.from:M.to,V?"after":"before"),"line",u,p);Ky(G,T,O,!0)&&G.top>O&&(M=y[L-1])}return M}P(OV,"coordsBidiPart");function AV(a,u,h,p,y,T,O){var L=wk(a,u,p,O),M=L.begin,V=L.end;/\s/.test(u.text.charAt(V-1))&&V--;for(var G=null,X=null,se=0;se<y.length;se++){var oe=y[se];if(!(oe.from>=V||oe.to<=M)){var pe=oe.level!=1,be=Vi(a,p,pe?Math.min(V,oe.to)-1:Math.max(M,oe.from)).right,ke=be<T?T-be+1e9:be-T;(!G||X>ke)&&(G=oe,X=ke)}}return G||(G=y[y.length-1]),G.from<M&&(G={from:M,to:G.to,level:G.level}),G.to>V&&(G={from:G.from,to:V,level:G.level}),G}P(AV,"coordsBidiPartWrapped");var Cc;function kc(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Cc==null){Cc=B("pre",null,"CodeMirror-line-like");for(var u=0;u<49;++u)Cc.appendChild(document.createTextNode("x")),Cc.appendChild(B("br"));Cc.appendChild(document.createTextNode("x"))}z(a.measure,Cc);var h=Cc.offsetHeight/50;return h>3&&(a.cachedTextHeight=h),H(a.measure),h||1}P(kc,"textHeight");function Nc(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var u=B("span","xxxxxxxxxx"),h=B("pre",[u],"CodeMirror-line-like");z(a.measure,h);var p=u.getBoundingClientRect(),y=(p.right-p.left)/10;return y>2&&(a.cachedCharWidth=y),y||10}P(Nc,"charWidth");function Jy(a){for(var u=a.display,h={},p={},y=u.gutters.clientLeft,T=u.gutters.firstChild,O=0;T;T=T.nextSibling,++O){var L=a.display.gutterSpecs[O].className;h[L]=T.offsetLeft+T.clientLeft+y,p[L]=T.clientWidth}return{fixedPos:Xy(u),gutterTotalWidth:u.gutters.offsetWidth,gutterLeft:h,gutterWidth:p,wrapperWidth:u.wrapper.clientWidth}}P(Jy,"getDimensions");function Xy(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}P(Xy,"compensateForHScroll");function Sk(a){var u=kc(a.display),h=a.options.lineWrapping,p=h&&Math.max(5,a.display.scroller.clientWidth/Nc(a.display)-3);return function(y){if(Ys(a.doc,y))return 0;var T=0;if(y.widgets)for(var O=0;O<y.widgets.length;O++)y.widgets[O].height&&(T+=y.widgets[O].height);return h?T+(Math.ceil(y.text.length/p)||1)*u:T+u}}P(Sk,"estimateHeight");function Zy(a){var u=a.doc,h=Sk(a);u.iter(function(p){var y=h(p);y!=p.height&&Ar(p,y)})}P(Zy,"estimateLineHeights");function ul(a,u,h,p){var y=a.display;if(!h&&ss(u).getAttribute("cm-not-content")=="true")return null;var T,O,L=y.lineSpace.getBoundingClientRect();try{T=u.clientX-L.left,O=u.clientY-L.top}catch{return null}var M=Qy(a,T,O),V;if(p&&M.xRel>0&&(V=Pe(a.doc,M.line).text).length==M.ch){var G=ne(V,V.length,a.options.tabSize)-V.length;M=we(M.line,Math.max(0,Math.round((T-fk(a.display).left)/Nc(a.display))-G))}return M}P(ul,"posFromMouse");function fl(a,u){if(u>=a.display.viewTo||(u-=a.display.viewFrom,u<0))return null;for(var h=a.display.view,p=0;p<h.length;p++)if(u-=h[p].size,u<0)return p}P(fl,"findViewIndex");function Dr(a,u,h,p){u==null&&(u=a.doc.first),h==null&&(h=a.doc.first+a.doc.size),p||(p=0);var y=a.display;if(p&&h<y.viewTo&&(y.updateLineNumbers==null||y.updateLineNumbers>u)&&(y.updateLineNumbers=u),a.curOp.viewChanged=!0,u>=y.viewTo)Gs&&jy(a.doc,u)<y.viewTo&&Ks(a);else if(h<=y.viewFrom)Gs&&tk(a.doc,h+p)>y.viewFrom?Ks(a):(y.viewFrom+=p,y.viewTo+=p);else if(u<=y.viewFrom&&h>=y.viewTo)Ks(a);else if(u<=y.viewFrom){var T=_h(a,h,h+p,1);T?(y.view=y.view.slice(T.index),y.viewFrom=T.lineN,y.viewTo+=p):Ks(a)}else if(h>=y.viewTo){var O=_h(a,u,u,-1);O?(y.view=y.view.slice(0,O.index),y.viewTo=O.lineN):Ks(a)}else{var L=_h(a,u,u,-1),M=_h(a,h,h+p,1);L&&M?(y.view=y.view.slice(0,L.index).concat(Sh(a,L.lineN,M.lineN)).concat(y.view.slice(M.index)),y.viewTo+=p):Ks(a)}var V=y.externalMeasured;V&&(h<V.lineN?V.lineN+=p:u<V.lineN+V.size&&(y.externalMeasured=null))}P(Dr,"regChange");function Qs(a,u,h){a.curOp.viewChanged=!0;var p=a.display,y=a.display.externalMeasured;if(y&&u>=y.lineN&&u<y.lineN+y.size&&(p.externalMeasured=null),!(u<p.viewFrom||u>=p.viewTo)){var T=p.view[fl(a,u)];if(T.node!=null){var O=T.changes||(T.changes=[]);le(O,h)==-1&&O.push(h)}}}P(Qs,"regLineChange");function Ks(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}P(Ks,"resetView");function _h(a,u,h,p){var y=fl(a,u),T,O=a.display.view;if(!Gs||h==a.doc.first+a.doc.size)return{index:y,lineN:h};for(var L=a.display.viewFrom,M=0;M<y;M++)L+=O[M].size;if(L!=u){if(p>0){if(y==O.length-1)return null;T=L+O[y].size-u,y++}else T=L-u;u+=T,h+=T}for(;jy(a.doc,h)!=h;){if(y==(p<0?0:O.length-1))return null;h+=p*O[y-(p<0?1:0)].size,y+=p}return{index:y,lineN:h}}P(_h,"viewCuttingPoint");function DV(a,u,h){var p=a.display,y=p.view;y.length==0||u>=p.viewTo||h<=p.viewFrom?(p.view=Sh(a,u,h),p.viewFrom=u):(p.viewFrom>u?p.view=Sh(a,u,p.viewFrom).concat(p.view):p.viewFrom<u&&(p.view=p.view.slice(fl(a,u))),p.viewFrom=u,p.viewTo<h?p.view=p.view.concat(Sh(a,p.viewTo,h)):p.viewTo>h&&(p.view=p.view.slice(0,fl(a,h)))),p.viewTo=h}P(DV,"adjustView");function Tk(a){for(var u=a.display.view,h=0,p=0;p<u.length;p++){var y=u[p];!y.hidden&&(!y.node||y.changes)&&++h}return h}P(Tk,"countDirtyView");function If(a){a.display.input.showSelection(a.display.input.prepareSelection())}P(If,"updateSelection");function Ck(a,u){u===void 0&&(u=!0);var h=a.doc,p={},y=p.cursors=document.createDocumentFragment(),T=p.selection=document.createDocumentFragment(),O=a.options.$customCursor;O&&(u=!0);for(var L=0;L<h.sel.ranges.length;L++)if(!(!u&&L==h.sel.primIndex)){var M=h.sel.ranges[L];if(!(M.from().line>=a.display.viewTo||M.to().line<a.display.viewFrom)){var V=M.empty();if(O){var G=O(a,M);G&&e1(a,G,y)}else(V||a.options.showCursorWhenSelecting)&&e1(a,M.head,y);V||IV(a,M,T)}}return p}P(Ck,"prepareSelection");function e1(a,u,h){var p=ai(a,u,"div",null,null,!a.options.singleCursorHeightPerLine),y=h.appendChild(B("div"," ","CodeMirror-cursor"));if(y.style.left=p.left+"px",y.style.top=p.top+"px",y.style.height=Math.max(0,p.bottom-p.top)*a.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(a.getWrapperElement().className)){var T=Nh(a,u,"div",null,null),O=T.right-T.left;y.style.width=(O>0?O:a.defaultCharWidth())+"px"}if(p.other){var L=h.appendChild(B("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));L.style.display="",L.style.left=p.other.left+"px",L.style.top=p.other.top+"px",L.style.height=(p.other.bottom-p.other.top)*.85+"px"}}P(e1,"drawSelectionCursor");function Oh(a,u){return a.top-u.top||a.left-u.left}P(Oh,"cmpCoords");function IV(a,u,h){var p=a.display,y=a.doc,T=document.createDocumentFragment(),O=fk(a.display),L=O.left,M=Math.max(p.sizerWidth,cl(a)-p.sizer.offsetLeft)-O.right,V=y.direction=="ltr";function G(De,Me,Ye,ze){Me<0&&(Me=0),Me=Math.round(Me),ze=Math.round(ze),T.appendChild(B("div",null,"CodeMirror-selected","position: absolute; left: "+De+`px;
top: `+Me+"px; width: "+(Ye??M-De)+`px;
height: `+(ze-Me)+"px"))}P(G,"add");function X(De,Me,Ye){var ze=Pe(y,De),at=ze.text.length,It,qn;function Gt(Sn,Qr){return Nh(a,we(De,Sn),"div",ze,Qr)}P(Gt,"coords");function Gr(Sn,Qr,Zn){var In=xk(a,ze,null,Sn),Tn=Qr=="ltr"==(Zn=="after")?"left":"right",cn=Zn=="after"?In.begin:In.end-(/\s/.test(ze.text.charAt(In.end-1))?2:1);return Gt(cn,Tn)[Tn]}P(Gr,"wrapX");var Yr=_r(ze,y.direction);return mh(Yr,Me||0,Ye??at,function(Sn,Qr,Zn,In){var Tn=Zn=="ltr",cn=Gt(Sn,Tn?"left":"right"),Kr=Gt(Qr-1,Tn?"right":"left"),Wf=Me==null&&Sn==0,vl=Ye==null&&Qr==at,hr=In==0,fs=!Yr||In==Yr.length-1;if(Kr.top-cn.top<=3){var zn=(V?Wf:vl)&&hr,MN=(V?vl:Wf)&&fs,na=zn?L:(Tn?cn:Kr).left,jc=MN?M:(Tn?Kr:cn).right;G(na,cn.top,jc-na,cn.bottom)}else{var Uc,Ir,Gf,PN;Tn?(Uc=V&&Wf&&hr?L:cn.left,Ir=V?M:Gr(Sn,Zn,"before"),Gf=V?L:Gr(Qr,Zn,"after"),PN=V&&vl&&fs?M:Kr.right):(Uc=V?Gr(Sn,Zn,"before"):L,Ir=!V&&Wf&&hr?M:cn.right,Gf=!V&&vl&&fs?L:Kr.left,PN=V?Gr(Qr,Zn,"after"):M),G(Uc,cn.top,Ir-Uc,cn.bottom),cn.bottom<Kr.top&&G(L,cn.bottom,null,Kr.top),G(Gf,Kr.top,PN-Gf,Kr.bottom)}(!It||Oh(cn,It)<0)&&(It=cn),Oh(Kr,It)<0&&(It=Kr),(!qn||Oh(cn,qn)<0)&&(qn=cn),Oh(Kr,qn)<0&&(qn=Kr)}),{start:It,end:qn}}P(X,"drawForLine");var se=u.from(),oe=u.to();if(se.line==oe.line)X(se.line,se.ch,oe.ch);else{var pe=Pe(y,se.line),be=Pe(y,oe.line),ke=si(pe)==si(be),Ae=X(se.line,se.ch,ke?pe.text.length+1:null).end,Le=X(oe.line,ke?0:null,oe.ch).start;ke&&(Ae.top<Le.top-2?(G(Ae.right,Ae.top,null,Ae.bottom),G(L,Le.top,Le.left,Le.bottom)):G(Ae.right,Ae.top,Le.left-Ae.right,Ae.bottom)),Ae.bottom<Le.top&&G(L,Ae.bottom,null,Le.top)}h.appendChild(T)}P(IV,"drawSelectionRange");function t1(a){if(a.state.focused){var u=a.display;clearInterval(u.blinker);var h=!0;u.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?u.blinker=setInterval(function(){a.hasFocus()||_c(a),u.cursorDiv.style.visibility=(h=!h)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(u.cursorDiv.style.visibility="hidden")}}P(t1,"restartBlink");function kk(a){a.hasFocus()||(a.display.input.focus(),a.state.focused||r1(a))}P(kk,"ensureFocus");function n1(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,a.state.focused&&_c(a))},100)}P(n1,"delayBlurEvent");function r1(a,u){a.state.delayingBlurEvent&&!a.state.draggingText&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ke(a,"focus",a,u),a.state.focused=!0,K(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),d&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),t1(a))}P(r1,"onFocus");function _c(a,u){a.state.delayingBlurEvent||(a.state.focused&&(Ke(a,"blur",a,u),a.state.focused=!1,q(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}P(_c,"onBlur");function Ah(a){for(var u=a.display,h=u.lineDiv.offsetTop,p=Math.max(0,u.scroller.getBoundingClientRect().top),y=u.lineDiv.getBoundingClientRect().top,T=0,O=0;O<u.view.length;O++){var L=u.view[O],M=a.options.lineWrapping,V=void 0,G=0;if(!L.hidden){if(y+=L.line.height,c&&f<8){var X=L.node.offsetTop+L.node.offsetHeight;V=X-h,h=X}else{var se=L.node.getBoundingClientRect();V=se.bottom-se.top,!M&&L.text.firstChild&&(G=L.text.firstChild.getBoundingClientRect().right-se.left-1)}var oe=L.line.height-V;if((oe>.005||oe<-.005)&&(y<p&&(T-=oe),Ar(L.line,V),Nk(L.line),L.rest))for(var pe=0;pe<L.rest.length;pe++)Nk(L.rest[pe]);if(G>a.display.sizerWidth){var be=Math.ceil(G/Nc(a.display));be>a.display.maxLineLength&&(a.display.maxLineLength=be,a.display.maxLine=L.line,a.display.maxLineChanged=!0)}}}Math.abs(T)>2&&(u.scroller.scrollTop+=T)}P(Ah,"updateHeightsInViewport");function Nk(a){if(a.widgets)for(var u=0;u<a.widgets.length;++u){var h=a.widgets[u],p=h.node.parentNode;p&&(h.height=p.offsetHeight)}}P(Nk,"updateWidgetHeight");function Dh(a,u,h){var p=h&&h.top!=null?Math.max(0,h.top):a.scroller.scrollTop;p=Math.floor(p-Ch(a));var y=h&&h.bottom!=null?h.bottom:p+a.wrapper.clientHeight,T=ii(u,p),O=ii(u,y);if(h&&h.ensure){var L=h.ensure.from.line,M=h.ensure.to.line;L<T?(T=L,O=ii(u,cs(Pe(u,L))+a.wrapper.clientHeight)):Math.min(M,u.lastLine())>=O&&(T=ii(u,cs(Pe(u,M))-a.wrapper.clientHeight),O=M)}return{from:T,to:Math.max(O,T+1)}}P(Dh,"visibleLines");function LV(a,u){if(!ln(a,"scrollCursorIntoView")){var h=a.display,p=h.sizer.getBoundingClientRect(),y=null;if(u.top+p.top<0?y=!0:u.bottom+p.top>(window.innerHeight||document.documentElement.clientHeight)&&(y=!1),y!=null&&!N){var T=B("div","",null,`position: absolute;
top: `+(u.top-h.viewOffset-Ch(a.display))+`px;
height: `+(u.bottom-u.top+$i(a)+h.barHeight)+`px;
left: `+u.left+"px; width: "+Math.max(2,u.right-u.left)+"px;");a.display.lineSpace.appendChild(T),T.scrollIntoView(y),a.display.lineSpace.removeChild(T)}}}P(LV,"maybeScrollWindow");function RV(a,u,h,p){p==null&&(p=0);var y;!a.options.lineWrapping&&u==h&&(h=u.sticky=="before"?we(u.line,u.ch+1,"before"):u,u=u.ch?we(u.line,u.sticky=="before"?u.ch-1:u.ch,"after"):u);for(var T=0;T<5;T++){var O=!1,L=ai(a,u),M=!h||h==u?L:ai(a,h);y={left:Math.min(L.left,M.left),top:Math.min(L.top,M.top)-p,right:Math.max(L.left,M.left),bottom:Math.max(L.bottom,M.bottom)+p};var V=o1(a,y),G=a.doc.scrollTop,X=a.doc.scrollLeft;if(V.scrollTop!=null&&(Rf(a,V.scrollTop),Math.abs(a.doc.scrollTop-G)>1&&(O=!0)),V.scrollLeft!=null&&(dl(a,V.scrollLeft),Math.abs(a.doc.scrollLeft-X)>1&&(O=!0)),!O)break}return y}P(RV,"scrollPosIntoView");function FV(a,u){var h=o1(a,u);h.scrollTop!=null&&Rf(a,h.scrollTop),h.scrollLeft!=null&&dl(a,h.scrollLeft)}P(FV,"scrollIntoView");function o1(a,u){var h=a.display,p=kc(a.display);u.top<0&&(u.top=0);var y=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:h.scroller.scrollTop,T=Hy(a),O={};u.bottom-u.top>T&&(u.bottom=u.top+T);var L=a.doc.height+zy(h),M=u.top<p,V=u.bottom>L-p;if(u.top<y)O.scrollTop=M?0:u.top;else if(u.bottom>y+T){var G=Math.min(u.top,(V?L:u.bottom)-T);G!=y&&(O.scrollTop=G)}var X=a.options.fixedGutter?0:h.gutters.offsetWidth,se=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:h.scroller.scrollLeft-X,oe=cl(a)-h.gutters.offsetWidth,pe=u.right-u.left>oe;return pe&&(u.right=u.left+oe),u.left<10?O.scrollLeft=0:u.left<se?O.scrollLeft=Math.max(0,u.left+X-(pe?0:10)):u.right>oe+se-3&&(O.scrollLeft=u.right+(pe?0:10)-oe),O}P(o1,"calculateScrollPos");function i1(a,u){u!=null&&(Ih(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+u)}P(i1,"addToScrollTop");function Oc(a){Ih(a);var u=a.getCursor();a.curOp.scrollToPos={from:u,to:u,margin:a.options.cursorScrollMargin}}P(Oc,"ensureCursorVisible");function Lf(a,u,h){(u!=null||h!=null)&&Ih(a),u!=null&&(a.curOp.scrollLeft=u),h!=null&&(a.curOp.scrollTop=h)}P(Lf,"scrollToCoords");function MV(a,u){Ih(a),a.curOp.scrollToPos=u}P(MV,"scrollToRange");function Ih(a){var u=a.curOp.scrollToPos;if(u){a.curOp.scrollToPos=null;var h=Ek(a,u.from),p=Ek(a,u.to);_k(a,h,p,u.margin)}}P(Ih,"resolveScrollToPos");function _k(a,u,h,p){var y=o1(a,{left:Math.min(u.left,h.left),top:Math.min(u.top,h.top)-p,right:Math.max(u.right,h.right),bottom:Math.max(u.bottom,h.bottom)+p});Lf(a,y.scrollLeft,y.scrollTop)}P(_k,"scrollToCoordsRange");function Rf(a,u){Math.abs(a.doc.scrollTop-u)<2||(o||l1(a,{top:u}),Ok(a,u,!0),o&&l1(a),Mf(a,100))}P(Rf,"updateScrollTop");function Ok(a,u,h){u=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,u)),!(a.display.scroller.scrollTop==u&&!h)&&(a.doc.scrollTop=u,a.display.scrollbars.setScrollTop(u),a.display.scroller.scrollTop!=u&&(a.display.scroller.scrollTop=u))}P(Ok,"setScrollTop");function dl(a,u,h,p){u=Math.max(0,Math.min(u,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((h?u==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-u)<2)&&!p)&&(a.doc.scrollLeft=u,Lk(a),a.display.scroller.scrollLeft!=u&&(a.display.scroller.scrollLeft=u),a.display.scrollbars.setScrollLeft(u))}P(dl,"setScrollLeft");function Ff(a){var u=a.display,h=u.gutters.offsetWidth,p=Math.round(a.doc.height+zy(a.display));return{clientHeight:u.scroller.clientHeight,viewHeight:u.wrapper.clientHeight,scrollWidth:u.scroller.scrollWidth,clientWidth:u.scroller.clientWidth,viewWidth:u.wrapper.clientWidth,barLeft:a.options.fixedGutter?h:0,docHeight:p,scrollHeight:p+$i(a)+u.barHeight,nativeBarWidth:u.nativeBarWidth,gutterWidth:h}}P(Ff,"measureForScrollbars");var Ac=P(function(a,u,h){this.cm=h;var p=this.vert=B("div",[B("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),y=this.horiz=B("div",[B("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");p.tabIndex=y.tabIndex=-1,a(p),a(y),We(p,"scroll",function(){p.clientHeight&&u(p.scrollTop,"vertical")}),We(y,"scroll",function(){y.clientWidth&&u(y.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,c&&f<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")},"NativeScrollbars");Ac.prototype.update=function(a){var u=a.scrollWidth>a.clientWidth+1,h=a.scrollHeight>a.clientHeight+1,p=a.nativeBarWidth;if(h){this.vert.style.display="block",this.vert.style.bottom=u?p+"px":"0";var y=a.viewHeight-(u?p:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+y)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(u){this.horiz.style.display="block",this.horiz.style.right=h?p+"px":"0",this.horiz.style.left=a.barLeft+"px";var T=a.viewWidth-a.barLeft-(h?p:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+T)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(p==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:h?p:0,bottom:u?p:0}},Ac.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ac.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ac.prototype.zeroWidthHack=function(){var a=E&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ae,this.disableVert=new ae},Ac.prototype.enableZeroWidthBar=function(a,u,h){a.style.pointerEvents="auto";function p(){var y=a.getBoundingClientRect(),T=h=="vert"?document.elementFromPoint(y.right-1,(y.top+y.bottom)/2):document.elementFromPoint((y.right+y.left)/2,y.bottom-1);T!=a?a.style.pointerEvents="none":u.set(1e3,p)}P(p,"maybeDisable"),u.set(1e3,p)},Ac.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Lh=P(function(){},"NullScrollbars");Lh.prototype.update=function(){return{bottom:0,right:0}},Lh.prototype.setScrollLeft=function(){},Lh.prototype.setScrollTop=function(){},Lh.prototype.clear=function(){};function Dc(a,u){u||(u=Ff(a));var h=a.display.barWidth,p=a.display.barHeight;Ak(a,u);for(var y=0;y<4&&h!=a.display.barWidth||p!=a.display.barHeight;y++)h!=a.display.barWidth&&a.options.lineWrapping&&Ah(a),Ak(a,Ff(a)),h=a.display.barWidth,p=a.display.barHeight}P(Dc,"updateScrollbars");function Ak(a,u){var h=a.display,p=h.scrollbars.update(u);h.sizer.style.paddingRight=(h.barWidth=p.right)+"px",h.sizer.style.paddingBottom=(h.barHeight=p.bottom)+"px",h.heightForcer.style.borderBottom=p.bottom+"px solid transparent",p.right&&p.bottom?(h.scrollbarFiller.style.display="block",h.scrollbarFiller.style.height=p.bottom+"px",h.scrollbarFiller.style.width=p.right+"px"):h.scrollbarFiller.style.display="",p.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(h.gutterFiller.style.display="block",h.gutterFiller.style.height=p.bottom+"px",h.gutterFiller.style.width=u.gutterWidth+"px"):h.gutterFiller.style.display=""}P(Ak,"updateScrollbarsInner");var PV={native:Ac,null:Lh};function Dk(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&q(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new PV[a.options.scrollbarStyle](function(u){a.display.wrapper.insertBefore(u,a.display.scrollbarFiller),We(u,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),u.setAttribute("cm-not-content","true")},function(u,h){h=="horizontal"?dl(a,u):Rf(a,u)},a),a.display.scrollbars.addClass&&K(a.display.wrapper,a.display.scrollbars.addClass)}P(Dk,"initScrollbars");var vue=0;function pl(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++vue,markArrays:null},pV(a.curOp)}P(pl,"startOperation");function hl(a){var u=a.curOp;u&&mV(u,function(h){for(var p=0;p<h.ops.length;p++)h.ops[p].cm.curOp=null;$V(h)})}P(hl,"endOperation");function $V(a){for(var u=a.ops,h=0;h<u.length;h++)VV(u[h]);for(var p=0;p<u.length;p++)jV(u[p]);for(var y=0;y<u.length;y++)UV(u[y]);for(var T=0;T<u.length;T++)BV(u[T]);for(var O=0;O<u.length;O++)qV(u[O])}P($V,"endOperations");function VV(a){var u=a.cm,h=u.display;HV(u),a.updateMaxLine&&By(u),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<h.viewFrom||a.scrollToPos.to.line>=h.viewTo)||h.maxLineChanged&&u.options.lineWrapping,a.update=a.mustUpdate&&new s1(u,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}P(VV,"endOperation_R1");function jV(a){a.updatedDisplay=a.mustUpdate&&a1(a.cm,a.update)}P(jV,"endOperation_W1");function UV(a){var u=a.cm,h=u.display;a.updatedDisplay&&Ah(u),a.barMeasure=Ff(u),h.maxLineChanged&&!u.options.lineWrapping&&(a.adjustWidthTo=pk(u,h.maxLine,h.maxLine.text.length).left+3,u.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(h.scroller.clientWidth,h.sizer.offsetLeft+a.adjustWidthTo+$i(u)+u.display.barWidth),a.maxScrollLeft=Math.max(0,h.sizer.offsetLeft+a.adjustWidthTo-cl(u))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=h.input.prepareSelection())}P(UV,"endOperation_R2");function BV(a){var u=a.cm;a.adjustWidthTo!=null&&(u.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<u.doc.scrollLeft&&dl(u,Math.min(u.display.scroller.scrollLeft,a.maxScrollLeft),!0),u.display.maxLineChanged=!1);var h=a.focus&&a.focus==Q();a.preparedSelection&&u.display.input.showSelection(a.preparedSelection,h),(a.updatedDisplay||a.startHeight!=u.doc.height)&&Dc(u,a.barMeasure),a.updatedDisplay&&u1(u,a.barMeasure),a.selectionChanged&&t1(u),u.state.focused&&a.updateInput&&u.display.input.reset(a.typing),h&&kk(a.cm)}P(BV,"endOperation_W2");function qV(a){var u=a.cm,h=u.display,p=u.doc;if(a.updatedDisplay&&Ik(u,a.update),h.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(h.wheelStartX=h.wheelStartY=null),a.scrollTop!=null&&Ok(u,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&dl(u,a.scrollLeft,!0,!0),a.scrollToPos){var y=RV(u,Re(p,a.scrollToPos.from),Re(p,a.scrollToPos.to),a.scrollToPos.margin);LV(u,y)}var T=a.maybeHiddenMarkers,O=a.maybeUnhiddenMarkers;if(T)for(var L=0;L<T.length;++L)T[L].lines.length||Ke(T[L],"hide");if(O)for(var M=0;M<O.length;++M)O[M].lines.length&&Ke(O[M],"unhide");h.wrapper.offsetHeight&&(p.scrollTop=u.display.scroller.scrollTop),a.changeObjs&&Ke(u,"changes",u,a.changeObjs),a.update&&a.update.finish()}P(qV,"endOperation_finish");function Hr(a,u){if(a.curOp)return u();pl(a);try{return u()}finally{hl(a)}}P(Hr,"runInOp");function An(a,u){return function(){if(a.curOp)return u.apply(a,arguments);pl(a);try{return u.apply(a,arguments)}finally{hl(a)}}}P(An,"operation");function pr(a){return function(){if(this.curOp)return a.apply(this,arguments);pl(this);try{return a.apply(this,arguments)}finally{hl(this)}}}P(pr,"methodOp");function Dn(a){return function(){var u=this.cm;if(!u||u.curOp)return a.apply(this,arguments);pl(u);try{return a.apply(this,arguments)}finally{hl(u)}}}P(Dn,"docMethodOp");function Mf(a,u){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(u,J(zV,a))}P(Mf,"startWorker");function zV(a){var u=a.doc;if(!(u.highlightFrontier>=a.display.viewTo)){var h=+new Date+a.options.workTime,p=Cf(a,u.highlightFrontier),y=[];u.iter(p.line,Math.min(u.first+u.size,a.display.viewTo+500),function(T){if(p.line>=a.display.viewFrom){var O=T.styles,L=T.text.length>a.options.maxHighlightLength?ao(u.mode,p.state):null,M=qC(a,T,p,!0);L&&(p.state=L),T.styles=M.styles;var V=T.styleClasses,G=M.classes;G?T.styleClasses=G:V&&(T.styleClasses=null);for(var X=!O||O.length!=T.styles.length||V!=G&&(!V||!G||V.bgClass!=G.bgClass||V.textClass!=G.textClass),se=0;!X&&se<O.length;++se)X=O[se]!=T.styles[se];X&&y.push(p.line),T.stateAfter=p.save(),p.nextLine()}else T.text.length<=a.options.maxHighlightLength&&My(a,T.text,p),T.stateAfter=p.line%5==0?p.save():null,p.nextLine();if(+new Date>h)return Mf(a,a.options.workDelay),!0}),u.highlightFrontier=p.line,u.modeFrontier=Math.max(u.modeFrontier,p.line),y.length&&Hr(a,function(){for(var T=0;T<y.length;T++)Qs(a,y[T],"text")})}}P(zV,"highlightWorker");var s1=P(function(a,u,h){var p=a.display;this.viewport=u,this.visible=Dh(p,a.doc,u),this.editorIsHidden=!p.wrapper.offsetWidth,this.wrapperHeight=p.wrapper.clientHeight,this.wrapperWidth=p.wrapper.clientWidth,this.oldDisplayWidth=cl(a),this.force=h,this.dims=Jy(a),this.events=[]},"DisplayUpdate");s1.prototype.signal=function(a,u){_n(a,u)&&this.events.push(arguments)},s1.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ke.apply(null,this.events[a])};function HV(a){var u=a.display;!u.scrollbarsClipped&&u.scroller.offsetWidth&&(u.nativeBarWidth=u.scroller.offsetWidth-u.scroller.clientWidth,u.heightForcer.style.height=$i(a)+"px",u.sizer.style.marginBottom=-u.nativeBarWidth+"px",u.sizer.style.borderRightWidth=$i(a)+"px",u.scrollbarsClipped=!0)}P(HV,"maybeClipScrollbars");function WV(a){if(a.hasFocus())return null;var u=Q();if(!u||!Y(a.display.lineDiv,u))return null;var h={activeElt:u};if(window.getSelection){var p=window.getSelection();p.anchorNode&&p.extend&&Y(a.display.lineDiv,p.anchorNode)&&(h.anchorNode=p.anchorNode,h.anchorOffset=p.anchorOffset,h.focusNode=p.focusNode,h.focusOffset=p.focusOffset)}return h}P(WV,"selectionSnapshot");function GV(a){if(!(!a||!a.activeElt||a.activeElt==Q())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Y(document.body,a.anchorNode)&&Y(document.body,a.focusNode))){var u=window.getSelection(),h=document.createRange();h.setEnd(a.anchorNode,a.anchorOffset),h.collapse(!1),u.removeAllRanges(),u.addRange(h),u.extend(a.focusNode,a.focusOffset)}}P(GV,"restoreSelection");function a1(a,u){var h=a.display,p=a.doc;if(u.editorIsHidden)return Ks(a),!1;if(!u.force&&u.visible.from>=h.viewFrom&&u.visible.to<=h.viewTo&&(h.updateLineNumbers==null||h.updateLineNumbers>=h.viewTo)&&h.renderedView==h.view&&Tk(a)==0)return!1;Rk(a)&&(Ks(a),u.dims=Jy(a));var y=p.first+p.size,T=Math.max(u.visible.from-a.options.viewportMargin,p.first),O=Math.min(y,u.visible.to+a.options.viewportMargin);h.viewFrom<T&&T-h.viewFrom<20&&(T=Math.max(p.first,h.viewFrom)),h.viewTo>O&&h.viewTo-O<20&&(O=Math.min(y,h.viewTo)),Gs&&(T=jy(a.doc,T),O=tk(a.doc,O));var L=T!=h.viewFrom||O!=h.viewTo||h.lastWrapHeight!=u.wrapperHeight||h.lastWrapWidth!=u.wrapperWidth;DV(a,T,O),h.viewOffset=cs(Pe(a.doc,h.viewFrom)),a.display.mover.style.top=h.viewOffset+"px";var M=Tk(a);if(!L&&M==0&&!u.force&&h.renderedView==h.view&&(h.updateLineNumbers==null||h.updateLineNumbers>=h.viewTo))return!1;var V=WV(a);return M>4&&(h.lineDiv.style.display="none"),YV(a,h.updateLineNumbers,u.dims),M>4&&(h.lineDiv.style.display=""),h.renderedView=h.view,GV(V),H(h.cursorDiv),H(h.selectionDiv),h.gutters.style.height=h.sizer.style.minHeight=0,L&&(h.lastWrapHeight=u.wrapperHeight,h.lastWrapWidth=u.wrapperWidth,Mf(a,400)),h.updateLineNumbers=null,!0}P(a1,"updateDisplayIfNeeded");function Ik(a,u){for(var h=u.viewport,p=!0;;p=!1){if(!p||!a.options.lineWrapping||u.oldDisplayWidth==cl(a)){if(h&&h.top!=null&&(h={top:Math.min(a.doc.height+zy(a.display)-Hy(a),h.top)}),u.visible=Dh(a.display,a.doc,h),u.visible.from>=a.display.viewFrom&&u.visible.to<=a.display.viewTo)break}else p&&(u.visible=Dh(a.display,a.doc,h));if(!a1(a,u))break;Ah(a);var y=Ff(a);If(a),Dc(a,y),u1(a,y),u.force=!1}u.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(u.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}P(Ik,"postUpdateDisplay");function l1(a,u){var h=new s1(a,u);if(a1(a,h)){Ah(a),Ik(a,h);var p=Ff(a);If(a),Dc(a,p),u1(a,p),h.finish()}}P(l1,"updateDisplaySimple");function YV(a,u,h){var p=a.display,y=a.options.lineNumbers,T=p.lineDiv,O=T.firstChild;function L(pe){var be=pe.nextSibling;return d&&E&&a.display.currentWheelTarget==pe?pe.style.display="none":pe.parentNode.removeChild(pe),be}P(L,"rm");for(var M=p.view,V=p.viewFrom,G=0;G<M.length;G++){var X=M[G];if(!X.hidden)if(!X.node||X.node.parentNode!=T){var se=EV(a,X,V,h);T.insertBefore(se,O)}else{for(;O!=X.node;)O=L(O);var oe=y&&u!=null&&u<=V&&X.lineNumber;X.changes&&(le(X.changes,"gutter")>-1&&(oe=!1),sk(a,X,V,h)),oe&&(H(X.lineNumber),X.lineNumber.appendChild(document.createTextNode(Sc(a.options,V)))),O=X.node.nextSibling}V+=X.size}for(;O;)O=L(O)}P(YV,"patchDisplay");function c1(a){var u=a.gutters.offsetWidth;a.sizer.style.marginLeft=u+"px",On(a,"gutterChanged",a)}P(c1,"updateGutterSpace");function u1(a,u){a.display.sizer.style.minHeight=u.docHeight+"px",a.display.heightForcer.style.top=u.docHeight+"px",a.display.gutters.style.height=u.docHeight+a.display.barHeight+$i(a)+"px"}P(u1,"setDocumentHeight");function Lk(a){var u=a.display,h=u.view;if(!(!u.alignWidgets&&(!u.gutters.firstChild||!a.options.fixedGutter))){for(var p=Xy(u)-u.scroller.scrollLeft+a.doc.scrollLeft,y=u.gutters.offsetWidth,T=p+"px",O=0;O<h.length;O++)if(!h[O].hidden){a.options.fixedGutter&&(h[O].gutter&&(h[O].gutter.style.left=T),h[O].gutterBackground&&(h[O].gutterBackground.style.left=T));var L=h[O].alignable;if(L)for(var M=0;M<L.length;M++)L[M].style.left=T}a.options.fixedGutter&&(u.gutters.style.left=p+y+"px")}}P(Lk,"alignHorizontally");function Rk(a){if(!a.options.lineNumbers)return!1;var u=a.doc,h=Sc(a.options,u.first+u.size-1),p=a.display;if(h.length!=p.lineNumChars){var y=p.measure.appendChild(B("div",[B("div",h)],"CodeMirror-linenumber CodeMirror-gutter-elt")),T=y.firstChild.offsetWidth,O=y.offsetWidth-T;return p.lineGutter.style.width="",p.lineNumInnerWidth=Math.max(T,p.lineGutter.offsetWidth-O)+1,p.lineNumWidth=p.lineNumInnerWidth+O,p.lineNumChars=p.lineNumInnerWidth?h.length:-1,p.lineGutter.style.width=p.lineNumWidth+"px",c1(a.display),!0}return!1}P(Rk,"maybeUpdateLineNumberWidth");function f1(a,u){for(var h=[],p=!1,y=0;y<a.length;y++){var T=a[y],O=null;if(typeof T!="string"&&(O=T.style,T=T.className),T=="CodeMirror-linenumbers")if(u)p=!0;else continue;h.push({className:T,style:O})}return u&&!p&&h.push({className:"CodeMirror-linenumbers",style:null}),h}P(f1,"getGutters");function Fk(a){var u=a.gutters,h=a.gutterSpecs;H(u),a.lineGutter=null;for(var p=0;p<h.length;++p){var y=h[p],T=y.className,O=y.style,L=u.appendChild(B("div",null,"CodeMirror-gutter "+T));O&&(L.style.cssText=O),T=="CodeMirror-linenumbers"&&(a.lineGutter=L,L.style.width=(a.lineNumWidth||1)+"px")}u.style.display=h.length?"":"none",c1(a)}P(Fk,"renderGutters");function Pf(a){Fk(a.display),Dr(a),Lk(a)}P(Pf,"updateGutters");function QV(a,u,h,p){var y=this;this.input=h,y.scrollbarFiller=B("div",null,"CodeMirror-scrollbar-filler"),y.scrollbarFiller.setAttribute("cm-not-content","true"),y.gutterFiller=B("div",null,"CodeMirror-gutter-filler"),y.gutterFiller.setAttribute("cm-not-content","true"),y.lineDiv=R("div",null,"CodeMirror-code"),y.selectionDiv=B("div",null,null,"position: relative; z-index: 1"),y.cursorDiv=B("div",null,"CodeMirror-cursors"),y.measure=B("div",null,"CodeMirror-measure"),y.lineMeasure=B("div",null,"CodeMirror-measure"),y.lineSpace=R("div",[y.measure,y.lineMeasure,y.selectionDiv,y.cursorDiv,y.lineDiv],null,"position: relative; outline: none");var T=R("div",[y.lineSpace],"CodeMirror-lines");y.mover=B("div",[T],null,"position: relative"),y.sizer=B("div",[y.mover],"CodeMirror-sizer"),y.sizerWidth=null,y.heightForcer=B("div",null,null,"position: absolute; height: "+de+"px; width: 1px;"),y.gutters=B("div",null,"CodeMirror-gutters"),y.lineGutter=null,y.scroller=B("div",[y.sizer,y.heightForcer,y.gutters],"CodeMirror-scroll"),y.scroller.setAttribute("tabIndex","-1"),y.wrapper=B("div",[y.scrollbarFiller,y.gutterFiller,y.scroller],"CodeMirror"),y.wrapper.setAttribute("translate","no"),c&&f<8&&(y.gutters.style.zIndex=-1,y.scroller.style.paddingRight=0),!d&&!(o&&C)&&(y.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(y.wrapper):a(y.wrapper)),y.viewFrom=y.viewTo=u.first,y.reportedViewFrom=y.reportedViewTo=u.first,y.view=[],y.renderedView=null,y.externalMeasured=null,y.viewOffset=0,y.lastWrapHeight=y.lastWrapWidth=0,y.updateLineNumbers=null,y.nativeBarWidth=y.barHeight=y.barWidth=0,y.scrollbarsClipped=!1,y.lineNumWidth=y.lineNumInnerWidth=y.lineNumChars=null,y.alignWidgets=!1,y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.maxLine=null,y.maxLineLength=0,y.maxLineChanged=!1,y.wheelDX=y.wheelDY=y.wheelStartX=y.wheelStartY=null,y.shift=!1,y.selForContextMenu=null,y.activeTouch=null,y.gutterSpecs=f1(p.gutters,p.lineNumbers),Fk(y),h.init(y)}P(QV,"Display");var d1=0,Js=null;c?Js=-.53:o?Js=15:m?Js=-.7:b&&(Js=-1/3);function Mk(a){var u=a.wheelDeltaX,h=a.wheelDeltaY;return u==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(u=a.detail),h==null&&a.detail&&a.axis==a.VERTICAL_AXIS?h=a.detail:h==null&&(h=a.wheelDelta),{x:u,y:h}}P(Mk,"wheelEventDelta");function KV(a){var u=Mk(a);return u.x*=Js,u.y*=Js,u}P(KV,"wheelEventPixels");function Pk(a,u){var h=Mk(u),p=h.x,y=h.y,T=Js;u.deltaMode===0&&(p=u.deltaX,y=u.deltaY,T=1);var O=a.display,L=O.scroller,M=L.scrollWidth>L.clientWidth,V=L.scrollHeight>L.clientHeight;if(p&&M||y&&V){if(y&&E&&d){e:for(var G=u.target,X=O.view;G!=L;G=G.parentNode)for(var se=0;se<X.length;se++)if(X[se].node==G){a.display.currentWheelTarget=G;break e}}if(p&&!o&&!v&&T!=null){y&&V&&Rf(a,Math.max(0,L.scrollTop+y*T)),dl(a,Math.max(0,L.scrollLeft+p*T)),(!y||y&&V)&&Bn(u),O.wheelStartX=null;return}if(y&&T!=null){var oe=y*T,pe=a.doc.scrollTop,be=pe+O.wrapper.clientHeight;oe<0?pe=Math.max(0,pe+oe-50):be=Math.min(a.doc.height,be+oe+50),l1(a,{top:pe,bottom:be})}d1<20&&u.deltaMode!==0&&(O.wheelStartX==null?(O.wheelStartX=L.scrollLeft,O.wheelStartY=L.scrollTop,O.wheelDX=p,O.wheelDY=y,setTimeout(function(){if(O.wheelStartX!=null){var ke=L.scrollLeft-O.wheelStartX,Ae=L.scrollTop-O.wheelStartY,Le=Ae&&O.wheelDY&&Ae/O.wheelDY||ke&&O.wheelDX&&ke/O.wheelDX;O.wheelStartX=O.wheelStartY=null,Le&&(Js=(Js*d1+Le)/(d1+1),++d1)}},200)):(O.wheelDX+=p,O.wheelDY+=y))}}P(Pk,"onScrollWheel");var Io=P(function(a,u){this.ranges=a,this.primIndex=u},"Selection");Io.prototype.primary=function(){return this.ranges[this.primIndex]},Io.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var u=0;u<this.ranges.length;u++){var h=this.ranges[u],p=a.ranges[u];if(!ee(h.anchor,p.anchor)||!ee(h.head,p.head))return!1}return!0},Io.prototype.deepCopy=function(){for(var a=[],u=0;u<this.ranges.length;u++)a[u]=new St(me(this.ranges[u].anchor),me(this.ranges[u].head));return new Io(a,this.primIndex)},Io.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},Io.prototype.contains=function(a,u){u||(u=a);for(var h=0;h<this.ranges.length;h++){var p=this.ranges[h];if(j(u,p.from())>=0&&j(a,p.to())<=0)return h}return-1};var St=P(function(a,u){this.anchor=a,this.head=u},"Range");St.prototype.from=function(){return Je(this.anchor,this.head)},St.prototype.to=function(){return Te(this.anchor,this.head)},St.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function li(a,u,h){var p=a&&a.options.selectionsMayTouch,y=u[h];u.sort(function(se,oe){return j(se.from(),oe.from())}),h=le(u,y);for(var T=1;T<u.length;T++){var O=u[T],L=u[T-1],M=j(L.to(),O.from());if(p&&!O.empty()?M>0:M>=0){var V=Je(L.from(),O.from()),G=Te(L.to(),O.to()),X=L.empty()?O.from()==O.head:L.from()==L.head;T<=h&&--h,u.splice(--T,2,new St(X?G:V,X?V:G))}}return new Io(u,h)}P(li,"normalizeSelection");function Xs(a,u){return new Io([new St(a,u||a)],0)}P(Xs,"simpleSelection");function Zs(a){return a.text?we(a.from.line+a.text.length-1,je(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}P(Zs,"changeEnd");function $k(a,u){if(j(a,u.from)<0)return a;if(j(a,u.to)<=0)return Zs(u);var h=a.line+u.text.length-(u.to.line-u.from.line)-1,p=a.ch;return a.line==u.to.line&&(p+=Zs(u).ch-u.to.ch),we(h,p)}P($k,"adjustForChange");function p1(a,u){for(var h=[],p=0;p<a.sel.ranges.length;p++){var y=a.sel.ranges[p];h.push(new St($k(y.anchor,u),$k(y.head,u)))}return li(a.cm,h,a.sel.primIndex)}P(p1,"computeSelAfterChange");function Vk(a,u,h){return a.line==u.line?we(h.line,a.ch-u.ch+h.ch):we(h.line+(a.line-u.line),a.ch)}P(Vk,"offsetPos");function JV(a,u,h){for(var p=[],y=we(a.first,0),T=y,O=0;O<u.length;O++){var L=u[O],M=Vk(L.from,y,T),V=Vk(Zs(L),y,T);if(y=L.to,T=V,h=="around"){var G=a.sel.ranges[O],X=j(G.head,G.anchor)<0;p[O]=new St(X?V:M,X?M:V)}else p[O]=new St(M,M)}return new Io(p,a.sel.primIndex)}P(JV,"computeReplacedSel");function h1(a){a.doc.mode=ll(a.options,a.doc.modeOption),$f(a)}P(h1,"loadMode");function $f(a){a.doc.iter(function(u){u.stateAfter&&(u.stateAfter=null),u.styles&&(u.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,Mf(a,100),a.state.modeGen++,a.curOp&&Dr(a)}P($f,"resetModeState");function jk(a,u){return u.from.ch==0&&u.to.ch==0&&je(u.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}P(jk,"isWholeLineUpdate");function m1(a,u,h,p){function y(Le){return h?h[Le]:null}P(y,"spansFor");function T(Le,De,Me){sV(Le,De,Me,p),On(Le,"change",Le,u)}P(T,"update");function O(Le,De){for(var Me=[],Ye=Le;Ye<De;++Ye)Me.push(new Nf(V[Ye],y(Ye),p));return Me}P(O,"linesFor");var L=u.from,M=u.to,V=u.text,G=Pe(a,L.line),X=Pe(a,M.line),se=je(V),oe=y(V.length-1),pe=M.line-L.line;if(u.full)a.insert(0,O(0,V.length)),a.remove(V.length,a.size-V.length);else if(jk(a,u)){var be=O(0,V.length-1);T(X,X.text,oe),pe&&a.remove(L.line,pe),be.length&&a.insert(L.line,be)}else if(G==X)if(V.length==1)T(G,G.text.slice(0,L.ch)+se+G.text.slice(M.ch),oe);else{var ke=O(1,V.length-1);ke.push(new Nf(se+G.text.slice(M.ch),oe,p)),T(G,G.text.slice(0,L.ch)+V[0],y(0)),a.insert(L.line+1,ke)}else if(V.length==1)T(G,G.text.slice(0,L.ch)+V[0]+X.text.slice(M.ch),y(0)),a.remove(L.line+1,pe);else{T(G,G.text.slice(0,L.ch)+V[0],y(0)),T(X,se+X.text.slice(M.ch),oe);var Ae=O(1,V.length-1);pe>1&&a.remove(L.line+1,pe-1),a.insert(L.line+1,Ae)}On(a,"change",a,u)}P(m1,"updateDoc");function ea(a,u,h){function p(y,T,O){if(y.linked)for(var L=0;L<y.linked.length;++L){var M=y.linked[L];if(M.doc!=T){var V=O&&M.sharedHist;h&&!V||(u(M.doc,V),p(M.doc,y,V))}}}P(p,"propagate"),p(a,null,!0)}P(ea,"linkedDocs");function Uk(a,u){if(u.cm)throw new Error("This document is already in use.");a.doc=u,u.cm=a,Zy(a),h1(a),Bk(a),a.options.direction=u.direction,a.options.lineWrapping||By(a),a.options.mode=u.modeOption,Dr(a)}P(Uk,"attachDoc");function Bk(a){(a.doc.direction=="rtl"?K:q)(a.display.lineDiv,"CodeMirror-rtl")}P(Bk,"setDirectionClass");function XV(a){Hr(a,function(){Bk(a),Dr(a)})}P(XV,"directionChanged");function Rh(a){this.done=[],this.undone=[],this.undoDepth=a?a.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a?a.maxGeneration:1}P(Rh,"History");function g1(a,u){var h={from:me(u.from),to:Zs(u),text:oi(a,u.from,u.to)};return Hk(a,h,u.from.line,u.to.line+1),ea(a,function(p){return Hk(p,h,u.from.line,u.to.line+1)},!0),h}P(g1,"historyChangeFromChange");function qk(a){for(;a.length;){var u=je(a);if(u.ranges)a.pop();else break}}P(qk,"clearSelectionEvents");function ZV(a,u){if(u)return qk(a.done),je(a.done);if(a.done.length&&!je(a.done).ranges)return je(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),je(a.done)}P(ZV,"lastChangeEvent");function zk(a,u,h,p){var y=a.history;y.undone.length=0;var T=+new Date,O,L;if((y.lastOp==p||y.lastOrigin==u.origin&&u.origin&&(u.origin.charAt(0)=="+"&&y.lastModTime>T-(a.cm?a.cm.options.historyEventDelay:500)||u.origin.charAt(0)=="*"))&&(O=ZV(y,y.lastOp==p)))L=je(O.changes),j(u.from,u.to)==0&&j(u.from,L.to)==0?L.to=Zs(u):O.changes.push(g1(a,u));else{var M=je(y.done);for((!M||!M.ranges)&&Fh(a.sel,y.done),O={changes:[g1(a,u)],generation:y.generation},y.done.push(O);y.done.length>y.undoDepth;)y.done.shift(),y.done[0].ranges||y.done.shift()}y.done.push(h),y.generation=++y.maxGeneration,y.lastModTime=y.lastSelTime=T,y.lastOp=y.lastSelOp=p,y.lastOrigin=y.lastSelOrigin=u.origin,L||Ke(a,"historyAdded")}P(zk,"addChangeToHistory");function e8(a,u,h,p){var y=u.charAt(0);return y=="*"||y=="+"&&h.ranges.length==p.ranges.length&&h.somethingSelected()==p.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}P(e8,"selectionEventCanBeMerged");function t8(a,u,h,p){var y=a.history,T=p&&p.origin;h==y.lastSelOp||T&&y.lastSelOrigin==T&&(y.lastModTime==y.lastSelTime&&y.lastOrigin==T||e8(a,T,je(y.done),u))?y.done[y.done.length-1]=u:Fh(u,y.done),y.lastSelTime=+new Date,y.lastSelOrigin=T,y.lastSelOp=h,p&&p.clearRedo!==!1&&qk(y.undone)}P(t8,"addSelectionToHistory");function Fh(a,u){var h=je(u);h&&h.ranges&&h.equals(a)||u.push(a)}P(Fh,"pushSelectionToHistory");function Hk(a,u,h,p){var y=u["spans_"+a.id],T=0;a.iter(Math.max(a.first,h),Math.min(a.first+a.size,p),function(O){O.markedSpans&&((y||(y=u["spans_"+a.id]={}))[T]=O.markedSpans),++T})}P(Hk,"attachLocalSpans");function n8(a){if(!a)return null;for(var u,h=0;h<a.length;++h)a[h].marker.explicitlyCleared?u||(u=a.slice(0,h)):u&&u.push(a[h]);return u?u.length?u:null:a}P(n8,"removeClearedSpans");function r8(a,u){var h=u["spans_"+a.id];if(!h)return null;for(var p=[],y=0;y<u.text.length;++y)p.push(n8(h[y]));return p}P(r8,"getOldSpans");function Wk(a,u){var h=r8(a,u),p=$y(a,u);if(!h)return p;if(!p)return h;for(var y=0;y<h.length;++y){var T=h[y],O=p[y];if(T&&O)e:for(var L=0;L<O.length;++L){for(var M=O[L],V=0;V<T.length;++V)if(T[V].marker==M.marker)continue e;T.push(M)}else O&&(h[y]=O)}return h}P(Wk,"mergeOldSpans");function Ic(a,u,h){for(var p=[],y=0;y<a.length;++y){var T=a[y];if(T.ranges){p.push(h?Io.prototype.deepCopy.call(T):T);continue}var O=T.changes,L=[];p.push({changes:L});for(var M=0;M<O.length;++M){var V=O[M],G=void 0;if(L.push({from:V.from,to:V.to,text:V.text}),u)for(var X in V)(G=X.match(/^spans_(\d+)$/))&&le(u,Number(G[1]))>-1&&(je(L)[X]=V[X],delete V[X])}}return p}P(Ic,"copyHistoryArray");function v1(a,u,h,p){if(p){var y=a.anchor;if(h){var T=j(u,y)<0;T!=j(h,y)<0?(y=u,u=h):T!=j(u,h)<0&&(u=h)}return new St(y,u)}else return new St(h||u,u)}P(v1,"extendRange");function Mh(a,u,h,p,y){y==null&&(y=a.cm&&(a.cm.display.shift||a.extend)),Xn(a,new Io([v1(a.sel.primary(),u,h,y)],0),p)}P(Mh,"extendSelection");function Gk(a,u,h){for(var p=[],y=a.cm&&(a.cm.display.shift||a.extend),T=0;T<a.sel.ranges.length;T++)p[T]=v1(a.sel.ranges[T],u[T],null,y);var O=li(a.cm,p,a.sel.primIndex);Xn(a,O,h)}P(Gk,"extendSelections");function y1(a,u,h,p){var y=a.sel.ranges.slice(0);y[u]=h,Xn(a,li(a.cm,y,a.sel.primIndex),p)}P(y1,"replaceOneSelection");function Yk(a,u,h,p){Xn(a,Xs(u,h),p)}P(Yk,"setSimpleSelection");function o8(a,u,h){var p={ranges:u.ranges,update:function(y){this.ranges=[];for(var T=0;T<y.length;T++)this.ranges[T]=new St(Re(a,y[T].anchor),Re(a,y[T].head))},origin:h&&h.origin};return Ke(a,"beforeSelectionChange",a,p),a.cm&&Ke(a.cm,"beforeSelectionChange",a.cm,p),p.ranges!=u.ranges?li(a.cm,p.ranges,p.ranges.length-1):u}P(o8,"filterSelectionChange");function Qk(a,u,h){var p=a.history.done,y=je(p);y&&y.ranges?(p[p.length-1]=u,Ph(a,u,h)):Xn(a,u,h)}P(Qk,"setSelectionReplaceHistory");function Xn(a,u,h){Ph(a,u,h),t8(a,a.sel,a.cm?a.cm.curOp.id:NaN,h)}P(Xn,"setSelection");function Ph(a,u,h){(_n(a,"beforeSelectionChange")||a.cm&&_n(a.cm,"beforeSelectionChange"))&&(u=o8(a,u,h));var p=h&&h.bias||(j(u.primary().head,a.sel.primary().head)<0?-1:1);Kk(a,Xk(a,u,p,!0)),!(h&&h.scroll===!1)&&a.cm&&a.cm.getOption("readOnly")!="nocursor"&&Oc(a.cm)}P(Ph,"setSelectionNoUndo");function Kk(a,u){u.equals(a.sel)||(a.sel=u,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,il(a.cm)),On(a,"cursorActivity",a))}P(Kk,"setSelectionInner");function Jk(a){Kk(a,Xk(a,a.sel,null,!1))}P(Jk,"reCheckSelection");function Xk(a,u,h,p){for(var y,T=0;T<u.ranges.length;T++){var O=u.ranges[T],L=u.ranges.length==a.sel.ranges.length&&a.sel.ranges[T],M=$h(a,O.anchor,L&&L.anchor,h,p),V=$h(a,O.head,L&&L.head,h,p);(y||M!=O.anchor||V!=O.head)&&(y||(y=u.ranges.slice(0,T)),y[T]=new St(M,V))}return y?li(a.cm,y,u.primIndex):u}P(Xk,"skipAtomicInSelection");function Lc(a,u,h,p,y){var T=Pe(a,u.line);if(T.markedSpans)for(var O=0;O<T.markedSpans.length;++O){var L=T.markedSpans[O],M=L.marker,V="selectLeft"in M?!M.selectLeft:M.inclusiveLeft,G="selectRight"in M?!M.selectRight:M.inclusiveRight;if((L.from==null||(V?L.from<=u.ch:L.from<u.ch))&&(L.to==null||(G?L.to>=u.ch:L.to>u.ch))){if(y&&(Ke(M,"beforeCursorEnter"),M.explicitlyCleared))if(T.markedSpans){--O;continue}else break;if(!M.atomic)continue;if(h){var X=M.find(p<0?1:-1),se=void 0;if((p<0?G:V)&&(X=Zk(a,X,-p,X&&X.line==u.line?T:null)),X&&X.line==u.line&&(se=j(X,h))&&(p<0?se<0:se>0))return Lc(a,X,u,p,y)}var oe=M.find(p<0?-1:1);return(p<0?V:G)&&(oe=Zk(a,oe,p,oe.line==u.line?T:null)),oe?Lc(a,oe,u,p,y):null}}return u}P(Lc,"skipAtomicInner");function $h(a,u,h,p,y){var T=p||1,O=Lc(a,u,h,T,y)||!y&&Lc(a,u,h,T,!0)||Lc(a,u,h,-T,y)||!y&&Lc(a,u,h,-T,!0);return O||(a.cantEdit=!0,we(a.first,0))}P($h,"skipAtomic");function Zk(a,u,h,p){return h<0&&u.ch==0?u.line>a.first?Re(a,we(u.line-1)):null:h>0&&u.ch==(p||Pe(a,u.line)).text.length?u.line<a.first+a.size-1?we(u.line+1,0):null:new we(u.line,u.ch+h)}P(Zk,"movePos");function eN(a){a.setSelection(we(a.firstLine(),0),we(a.lastLine()),ve)}P(eN,"selectAll");function tN(a,u,h){var p={canceled:!1,from:u.from,to:u.to,text:u.text,origin:u.origin,cancel:function(){return p.canceled=!0}};return h&&(p.update=function(y,T,O,L){y&&(p.from=Re(a,y)),T&&(p.to=Re(a,T)),O&&(p.text=O),L!==void 0&&(p.origin=L)}),Ke(a,"beforeChange",a,p),a.cm&&Ke(a.cm,"beforeChange",a.cm,p),p.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:p.from,to:p.to,text:p.text,origin:p.origin}}P(tN,"filterChange");function Rc(a,u,h){if(a.cm){if(!a.cm.curOp)return An(a.cm,Rc)(a,u,h);if(a.cm.state.suppressEdits)return}if(!((_n(a,"beforeChange")||a.cm&&_n(a.cm,"beforeChange"))&&(u=tN(a,u,!0),!u))){var p=Q6&&!h&&nV(a,u.from,u.to);if(p)for(var y=p.length-1;y>=0;--y)nN(a,{from:p[y].from,to:p[y].to,text:y?[""]:u.text,origin:u.origin});else nN(a,u)}}P(Rc,"makeChange");function nN(a,u){if(!(u.text.length==1&&u.text[0]==""&&j(u.from,u.to)==0)){var h=p1(a,u);zk(a,u,h,a.cm?a.cm.curOp.id:NaN),Vf(a,u,h,$y(a,u));var p=[];ea(a,function(y,T){!T&&le(p,y.history)==-1&&(sN(y.history,u),p.push(y.history)),Vf(y,u,null,$y(y,u))})}}P(nN,"makeChangeInner");function Vh(a,u,h){var p=a.cm&&a.cm.state.suppressEdits;if(!(p&&!h)){for(var y=a.history,T,O=a.sel,L=u=="undo"?y.done:y.undone,M=u=="undo"?y.undone:y.done,V=0;V<L.length&&(T=L[V],!(h?T.ranges&&!T.equals(a.sel):!T.ranges));V++);if(V!=L.length){for(y.lastOrigin=y.lastSelOrigin=null;;)if(T=L.pop(),T.ranges){if(Fh(T,M),h&&!T.equals(a.sel)){Xn(a,T,{clearRedo:!1});return}O=T}else if(p){L.push(T);return}else break;var G=[];Fh(O,M),M.push({changes:G,generation:y.generation}),y.generation=T.generation||++y.maxGeneration;for(var X=_n(a,"beforeChange")||a.cm&&_n(a.cm,"beforeChange"),se=P(function(be){var ke=T.changes[be];if(ke.origin=u,X&&!tN(a,ke,!1))return L.length=0,{};G.push(g1(a,ke));var Ae=be?p1(a,ke):je(L);Vf(a,ke,Ae,Wk(a,ke)),!be&&a.cm&&a.cm.scrollIntoView({from:ke.from,to:Zs(ke)});var Le=[];ea(a,function(De,Me){!Me&&le(Le,De.history)==-1&&(sN(De.history,ke),Le.push(De.history)),Vf(De,ke,null,Wk(De,ke))})},"loop"),oe=T.changes.length-1;oe>=0;--oe){var pe=se(oe);if(pe)return pe.v}}}}P(Vh,"makeChangeFromHistory");function rN(a,u){if(u!=0&&(a.first+=u,a.sel=new Io(Dt(a.sel.ranges,function(y){return new St(we(y.anchor.line+u,y.anchor.ch),we(y.head.line+u,y.head.ch))}),a.sel.primIndex),a.cm)){Dr(a.cm,a.first,a.first-u,u);for(var h=a.cm.display,p=h.viewFrom;p<h.viewTo;p++)Qs(a.cm,p,"gutter")}}P(rN,"shiftDoc");function Vf(a,u,h,p){if(a.cm&&!a.cm.curOp)return An(a.cm,Vf)(a,u,h,p);if(u.to.line<a.first){rN(a,u.text.length-1-(u.to.line-u.from.line));return}if(!(u.from.line>a.lastLine())){if(u.from.line<a.first){var y=u.text.length-1-(a.first-u.from.line);rN(a,y),u={from:we(a.first,0),to:we(u.to.line+y,u.to.ch),text:[je(u.text)],origin:u.origin}}var T=a.lastLine();u.to.line>T&&(u={from:u.from,to:we(T,Pe(a,T).text.length),text:[u.text[0]],origin:u.origin}),u.removed=oi(a,u.from,u.to),h||(h=p1(a,u)),a.cm?i8(a.cm,u,p):m1(a,u,p),Ph(a,h,ve),a.cantEdit&&$h(a,we(a.firstLine(),0))&&(a.cantEdit=!1)}}P(Vf,"makeChangeSingleDoc");function i8(a,u,h){var p=a.doc,y=a.display,T=u.from,O=u.to,L=!1,M=T.line;a.options.lineWrapping||(M=yt(si(Pe(p,T.line))),p.iter(M,O.line+1,function(oe){if(oe==y.maxLine)return L=!0,!0})),p.sel.contains(u.from,u.to)>-1&&il(a),m1(p,u,h,Sk(a)),a.options.lineWrapping||(p.iter(M,T.line+u.text.length,function(oe){var pe=xh(oe);pe>y.maxLineLength&&(y.maxLine=oe,y.maxLineLength=pe,y.maxLineChanged=!0,L=!1)}),L&&(a.curOp.updateMaxLine=!0)),Y6(p,T.line),Mf(a,400);var V=u.text.length-(O.line-T.line)-1;u.full?Dr(a):T.line==O.line&&u.text.length==1&&!jk(a.doc,u)?Qs(a,T.line,"text"):Dr(a,T.line,O.line+1,V);var G=_n(a,"changes"),X=_n(a,"change");if(X||G){var se={from:T,to:O,text:u.text,removed:u.removed,origin:u.origin};X&&On(a,"change",a,se),G&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(se)}a.display.selForContextMenu=null}P(i8,"makeChangeSingleDocInEditor");function Fc(a,u,h,p,y){var T;p||(p=h),j(p,h)<0&&(T=[p,h],h=T[0],p=T[1]),typeof u=="string"&&(u=a.splitLines(u)),Rc(a,{from:h,to:p,text:u,origin:y})}P(Fc,"replaceRange");function oN(a,u,h,p){h<a.line?a.line+=p:u<a.line&&(a.line=u,a.ch=0)}P(oN,"rebaseHistSelSingle");function iN(a,u,h,p){for(var y=0;y<a.length;++y){var T=a[y],O=!0;if(T.ranges){T.copied||(T=a[y]=T.deepCopy(),T.copied=!0);for(var L=0;L<T.ranges.length;L++)oN(T.ranges[L].anchor,u,h,p),oN(T.ranges[L].head,u,h,p);continue}for(var M=0;M<T.changes.length;++M){var V=T.changes[M];if(h<V.from.line)V.from=we(V.from.line+p,V.from.ch),V.to=we(V.to.line+p,V.to.ch);else if(u<=V.to.line){O=!1;break}}O||(a.splice(0,y+1),y=0)}}P(iN,"rebaseHistArray");function sN(a,u){var h=u.from.line,p=u.to.line,y=u.text.length-(p-h)-1;iN(a.done,h,p,y),iN(a.undone,h,p,y)}P(sN,"rebaseHist");function jf(a,u,h,p){var y=u,T=u;return typeof u=="number"?T=Pe(a,pt(a,u)):y=yt(u),y==null?null:(p(T,y)&&a.cm&&Qs(a.cm,y,h),T)}P(jf,"changeLine");function Uf(a){this.lines=a,this.parent=null;for(var u=0,h=0;h<a.length;++h)a[h].parent=this,u+=a[h].height;this.height=u}P(Uf,"LeafChunk"),Uf.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,u){for(var h=a,p=a+u;h<p;++h){var y=this.lines[h];this.height-=y.height,aV(y),On(y,"delete")}this.lines.splice(a,u)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,u,h){this.height+=h,this.lines=this.lines.slice(0,a).concat(u).concat(this.lines.slice(a));for(var p=0;p<u.length;++p)u[p].parent=this},iterN:function(a,u,h){for(var p=a+u;a<p;++a)if(h(this.lines[a]))return!0}};function Bf(a){this.children=a;for(var u=0,h=0,p=0;p<a.length;++p){var y=a[p];u+=y.chunkSize(),h+=y.height,y.parent=this}this.size=u,this.height=h,this.parent=null}P(Bf,"BranchChunk"),Bf.prototype={chunkSize:function(){return this.size},removeInner:function(a,u){this.size-=u;for(var h=0;h<this.children.length;++h){var p=this.children[h],y=p.chunkSize();if(a<y){var T=Math.min(u,y-a),O=p.height;if(p.removeInner(a,T),this.height-=O-p.height,y==T&&(this.children.splice(h--,1),p.parent=null),(u-=T)==0)break;a=0}else a-=y}if(this.size-u<25&&(this.children.length>1||!(this.children[0]instanceof Uf))){var L=[];this.collapse(L),this.children=[new Uf(L)],this.children[0].parent=this}},collapse:function(a){for(var u=0;u<this.children.length;++u)this.children[u].collapse(a)},insertInner:function(a,u,h){this.size+=u.length,this.height+=h;for(var p=0;p<this.children.length;++p){var y=this.children[p],T=y.chunkSize();if(a<=T){if(y.insertInner(a,u,h),y.lines&&y.lines.length>50){for(var O=y.lines.length%25+25,L=O;L<y.lines.length;){var M=new Uf(y.lines.slice(L,L+=25));y.height-=M.height,this.children.splice(++p,0,M),M.parent=this}y.lines=y.lines.slice(0,O),this.maybeSpill()}break}a-=T}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var u=a.children.splice(a.children.length-5,5),h=new Bf(u);if(a.parent){a.size-=h.size,a.height-=h.height;var p=le(a.parent.children,a);a.parent.children.splice(p+1,0,h)}else{var y=new Bf(a.children);y.parent=a,a.children=[y,h],a=y}h.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,u,h){for(var p=0;p<this.children.length;++p){var y=this.children[p],T=y.chunkSize();if(a<T){var O=Math.min(u,T-a);if(y.iterN(a,O,h))return!0;if((u-=O)==0)break;a=0}else a-=T}}};var jh=P(function(a,u,h){if(h)for(var p in h)h.hasOwnProperty(p)&&(this[p]=h[p]);this.doc=a,this.node=u},"LineWidget");jh.prototype.clear=function(){var a=this.doc.cm,u=this.line.widgets,h=this.line,p=yt(h);if(!(p==null||!u)){for(var y=0;y<u.length;++y)u[y]==this&&u.splice(y--,1);u.length||(h.widgets=null);var T=Af(this);Ar(h,Math.max(0,h.height-T)),a&&(Hr(a,function(){aN(a,h,-T),Qs(a,p,"widget")}),On(a,"lineWidgetCleared",a,this,p))}},jh.prototype.changed=function(){var a=this,u=this.height,h=this.doc.cm,p=this.line;this.height=null;var y=Af(this)-u;y&&(Ys(this.doc,p)||Ar(p,p.height+y),h&&Hr(h,function(){h.curOp.forceUpdate=!0,aN(h,p,y),On(h,"lineWidgetChanged",h,a,yt(p))}))},ti(jh);function aN(a,u,h){cs(u)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&i1(a,h)}P(aN,"adjustScrollWhenAboveVisible");function s8(a,u,h,p){var y=new jh(a,h,p),T=a.cm;return T&&y.noHScroll&&(T.display.alignWidgets=!0),jf(a,u,"widget",function(O){var L=O.widgets||(O.widgets=[]);if(y.insertAt==null?L.push(y):L.splice(Math.min(L.length,Math.max(0,y.insertAt)),0,y),y.line=O,T&&!Ys(a,O)){var M=cs(O)<a.scrollTop;Ar(O,O.height+Af(y)),M&&i1(T,y.height),T.curOp.forceUpdate=!0}return!0}),T&&On(T,"lineWidgetAdded",T,y,typeof u=="number"?u:yt(u)),y}P(s8,"addLineWidget");var a8=0,ml=P(function(a,u){this.lines=[],this.type=u,this.doc=a,this.id=++a8},"TextMarker");ml.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,u=a&&!a.curOp;if(u&&pl(a),_n(this,"clear")){var h=this.find();h&&On(this,"clear",h.from,h.to)}for(var p=null,y=null,T=0;T<this.lines.length;++T){var O=this.lines[T],L=kf(O.markedSpans,this);a&&!this.collapsed?Qs(a,yt(O),"text"):a&&(L.to!=null&&(y=yt(O)),L.from!=null&&(p=yt(O))),O.markedSpans=X6(O.markedSpans,L),L.from==null&&this.collapsed&&!Ys(this.doc,O)&&a&&Ar(O,kc(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var M=0;M<this.lines.length;++M){var V=si(this.lines[M]),G=xh(V);G>a.display.maxLineLength&&(a.display.maxLine=V,a.display.maxLineLength=G,a.display.maxLineChanged=!0)}p!=null&&a&&this.collapsed&&Dr(a,p,y+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Jk(a.doc)),a&&On(a,"markerCleared",a,this,p,y),u&&hl(a),this.parent&&this.parent.clear()}},ml.prototype.find=function(a,u){a==null&&this.type=="bookmark"&&(a=1);for(var h,p,y=0;y<this.lines.length;++y){var T=this.lines[y],O=kf(T.markedSpans,this);if(O.from!=null&&(h=we(u?T:yt(T),O.from),a==-1))return h;if(O.to!=null&&(p=we(u?T:yt(T),O.to),a==1))return p}return h&&{from:h,to:p}},ml.prototype.changed=function(){var a=this,u=this.find(-1,!0),h=this,p=this.doc.cm;!u||!p||Hr(p,function(){var y=u.line,T=yt(u.line),O=Wy(p,T);if(O&&(mk(O),p.curOp.selectionChanged=p.curOp.forceUpdate=!0),p.curOp.updateMaxLine=!0,!Ys(h.doc,y)&&h.height!=null){var L=h.height;h.height=null;var M=Af(h)-L;M&&Ar(y,y.height+M)}On(p,"markerChanged",p,a)})},ml.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(!u.maybeHiddenMarkers||le(u.maybeHiddenMarkers,this)==-1)&&(u.maybeUnhiddenMarkers||(u.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ml.prototype.detachLine=function(a){if(this.lines.splice(le(this.lines,a),1),!this.lines.length&&this.doc.cm){var u=this.doc.cm.curOp;(u.maybeHiddenMarkers||(u.maybeHiddenMarkers=[])).push(this)}},ti(ml);function Mc(a,u,h,p,y){if(p&&p.shared)return l8(a,u,h,p,y);if(a.cm&&!a.cm.curOp)return An(a.cm,Mc)(a,u,h,p,y);var T=new ml(a,y),O=j(u,h);if(p&&ie(p,T,!1),O>0||O==0&&T.clearWhenEmpty!==!1)return T;if(T.replacedWith&&(T.collapsed=!0,T.widgetNode=R("span",[T.replacedWith],"CodeMirror-widget"),p.handleMouseEvents||T.widgetNode.setAttribute("cm-ignore-events","true"),p.insertLeft&&(T.widgetNode.insertLeft=!0)),T.collapsed){if(ek(a,u.line,u,h,T)||u.line!=h.line&&ek(a,h.line,u,h,T))throw new Error("Inserting collapsed marker partially overlapping an existing one");J6()}T.addToHistory&&zk(a,{from:u,to:h,origin:"markText"},a.sel,NaN);var L=u.line,M=a.cm,V;if(a.iter(L,h.line+1,function(X){M&&T.collapsed&&!M.options.lineWrapping&&si(X)==M.display.maxLine&&(V=!0),T.collapsed&&L!=u.line&&Ar(X,0),Z6(X,new yh(T,L==u.line?u.ch:null,L==h.line?h.ch:null),a.cm&&a.cm.curOp),++L}),T.collapsed&&a.iter(u.line,h.line+1,function(X){Ys(a,X)&&Ar(X,0)}),T.clearOnEnter&&We(T,"beforeCursorEnter",function(){return T.clear()}),T.readOnly&&(K6(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),T.collapsed&&(T.id=++a8,T.atomic=!0),M){if(V&&(M.curOp.updateMaxLine=!0),T.collapsed)Dr(M,u.line,h.line+1);else if(T.className||T.startStyle||T.endStyle||T.css||T.attributes||T.title)for(var G=u.line;G<=h.line;G++)Qs(M,G,"text");T.atomic&&Jk(M.doc),On(M,"markerAdded",M,T)}return T}P(Mc,"markText");var Uh=P(function(a,u){this.markers=a,this.primary=u;for(var h=0;h<a.length;++h)a[h].parent=this},"SharedTextMarker");Uh.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();On(this,"clear")}},Uh.prototype.find=function(a,u){return this.primary.find(a,u)},ti(Uh);function l8(a,u,h,p,y){p=ie(p),p.shared=!1;var T=[Mc(a,u,h,p,y)],O=T[0],L=p.widgetNode;return ea(a,function(M){L&&(p.widgetNode=L.cloneNode(!0)),T.push(Mc(M,Re(M,u),Re(M,h),p,y));for(var V=0;V<M.linked.length;++V)if(M.linked[V].isParent)return;O=je(T)}),new Uh(T,O)}P(l8,"markTextShared");function lN(a){return a.findMarks(we(a.first,0),a.clipPos(we(a.lastLine())),function(u){return u.parent})}P(lN,"findSharedMarkers");function c8(a,u){for(var h=0;h<u.length;h++){var p=u[h],y=p.find(),T=a.clipPos(y.from),O=a.clipPos(y.to);if(j(T,O)){var L=Mc(a,T,O,p.primary,p.primary.type);p.markers.push(L),L.parent=p}}}P(c8,"copySharedMarkers");function u8(a){for(var u=P(function(p){var y=a[p],T=[y.primary.doc];ea(y.primary.doc,function(M){return T.push(M)});for(var O=0;O<y.markers.length;O++){var L=y.markers[O];le(T,L.doc)==-1&&(L.parent=null,y.markers.splice(O--,1))}},"loop"),h=0;h<a.length;h++)u(h)}P(u8,"detachSharedMarkers");var yue=0,Wr=P(function(a,u,h,p,y){if(!(this instanceof Wr))return new Wr(a,u,h,p,y);h==null&&(h=0),Bf.call(this,[new Uf([new Nf("",null)])]),this.first=h,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=h;var T=we(h,0);this.sel=Xs(T),this.history=new Rh(null),this.id=++yue,this.modeOption=u,this.lineSep=p,this.direction=y=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),m1(this,{from:T,to:T,text:a}),Xn(this,Xs(T),ve)},"Doc");Wr.prototype=xn(Bf.prototype,{constructor:Wr,iter:function(a,u,h){h?this.iterN(a-this.first,u-a,h):this.iterN(this.first,this.first+this.size,a)},insert:function(a,u){for(var h=0,p=0;p<u.length;++p)h+=u[p].height;this.insertInner(a-this.first,u,h)},remove:function(a,u){this.removeInner(a-this.first,u)},getValue:function(a){var u=xc(this,this.first,this.first+this.size);return a===!1?u:u.join(a||this.lineSeparator())},setValue:Dn(function(a){var u=we(this.first,0),h=this.first+this.size-1;Rc(this,{from:u,to:we(h,Pe(this,h).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Lf(this.cm,0,0),Xn(this,Xs(u),ve)}),replaceRange:function(a,u,h,p){u=Re(this,u),h=h?Re(this,h):u,Fc(this,a,u,h,p)},getRange:function(a,u,h){var p=oi(this,Re(this,a),Re(this,u));return h===!1?p:h===""?p.join(""):p.join(h||this.lineSeparator())},getLine:function(a){var u=this.getLineHandle(a);return u&&u.text},getLineHandle:function(a){if(Ws(this,a))return Pe(this,a)},getLineNumber:function(a){return yt(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Pe(this,a)),si(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Re(this,a)},getCursor:function(a){var u=this.sel.primary(),h;return a==null||a=="head"?h=u.head:a=="anchor"?h=u.anchor:a=="end"||a=="to"||a===!1?h=u.to():h=u.from(),h},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Dn(function(a,u,h){Yk(this,Re(this,typeof a=="number"?we(a,u||0):a),null,h)}),setSelection:Dn(function(a,u,h){Yk(this,Re(this,a),Re(this,u||a),h)}),extendSelection:Dn(function(a,u,h){Mh(this,Re(this,a),u&&Re(this,u),h)}),extendSelections:Dn(function(a,u){Gk(this,lo(this,a),u)}),extendSelectionsBy:Dn(function(a,u){var h=Dt(this.sel.ranges,a);Gk(this,lo(this,h),u)}),setSelections:Dn(function(a,u,h){if(a.length){for(var p=[],y=0;y<a.length;y++)p[y]=new St(Re(this,a[y].anchor),Re(this,a[y].head||a[y].anchor));u==null&&(u=Math.min(a.length-1,this.sel.primIndex)),Xn(this,li(this.cm,p,u),h)}}),addSelection:Dn(function(a,u,h){var p=this.sel.ranges.slice(0);p.push(new St(Re(this,a),Re(this,u||a))),Xn(this,li(this.cm,p,p.length-1),h)}),getSelection:function(a){for(var u=this.sel.ranges,h,p=0;p<u.length;p++){var y=oi(this,u[p].from(),u[p].to());h=h?h.concat(y):y}return a===!1?h:h.join(a||this.lineSeparator())},getSelections:function(a){for(var u=[],h=this.sel.ranges,p=0;p<h.length;p++){var y=oi(this,h[p].from(),h[p].to());a!==!1&&(y=y.join(a||this.lineSeparator())),u[p]=y}return u},replaceSelection:function(a,u,h){for(var p=[],y=0;y<this.sel.ranges.length;y++)p[y]=a;this.replaceSelections(p,u,h||"+input")},replaceSelections:Dn(function(a,u,h){for(var p=[],y=this.sel,T=0;T<y.ranges.length;T++){var O=y.ranges[T];p[T]={from:O.from(),to:O.to(),text:this.splitLines(a[T]),origin:h}}for(var L=u&&u!="end"&&JV(this,p,u),M=p.length-1;M>=0;M--)Rc(this,p[M]);L?Qk(this,L):this.cm&&Oc(this.cm)}),undo:Dn(function(){Vh(this,"undo")}),redo:Dn(function(){Vh(this,"redo")}),undoSelection:Dn(function(){Vh(this,"undo",!0)}),redoSelection:Dn(function(){Vh(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,u=0,h=0,p=0;p<a.done.length;p++)a.done[p].ranges||++u;for(var y=0;y<a.undone.length;y++)a.undone[y].ranges||++h;return{undo:u,redo:h}},clearHistory:function(){var a=this;this.history=new Rh(this.history),ea(this,function(u){return u.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Ic(this.history.done),undone:Ic(this.history.undone)}},setHistory:function(a){var u=this.history=new Rh(this.history);u.done=Ic(a.done.slice(0),null,!0),u.undone=Ic(a.undone.slice(0),null,!0)},setGutterMarker:Dn(function(a,u,h){return jf(this,a,"gutter",function(p){var y=p.gutterMarkers||(p.gutterMarkers={});return y[u]=h,!h&&mf(y)&&(p.gutterMarkers=null),!0})}),clearGutter:Dn(function(a){var u=this;this.iter(function(h){h.gutterMarkers&&h.gutterMarkers[a]&&jf(u,h,"gutter",function(){return h.gutterMarkers[a]=null,mf(h.gutterMarkers)&&(h.gutterMarkers=null),!0})})}),lineInfo:function(a){var u;if(typeof a=="number"){if(!Ws(this,a)||(u=a,a=Pe(this,a),!a))return null}else if(u=yt(a),u==null)return null;return{line:u,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:Dn(function(a,u,h){return jf(this,a,u=="gutter"?"gutter":"class",function(p){var y=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass";if(!p[y])p[y]=h;else{if($(h).test(p[y]))return!1;p[y]+=" "+h}return!0})}),removeLineClass:Dn(function(a,u,h){return jf(this,a,u=="gutter"?"gutter":"class",function(p){var y=u=="text"?"textClass":u=="background"?"bgClass":u=="gutter"?"gutterClass":"wrapClass",T=p[y];if(T)if(h==null)p[y]=null;else{var O=T.match($(h));if(!O)return!1;var L=O.index+O[0].length;p[y]=T.slice(0,O.index)+(!O.index||L==T.length?"":" ")+T.slice(L)||null}else return!1;return!0})}),addLineWidget:Dn(function(a,u,h){return s8(this,a,u,h)}),removeLineWidget:function(a){a.clear()},markText:function(a,u,h){return Mc(this,Re(this,a),Re(this,u),h,h&&h.type||"range")},setBookmark:function(a,u){var h={replacedWith:u&&(u.nodeType==null?u.widget:u),insertLeft:u&&u.insertLeft,clearWhenEmpty:!1,shared:u&&u.shared,handleMouseEvents:u&&u.handleMouseEvents};return a=Re(this,a),Mc(this,a,a,h,"bookmark")},findMarksAt:function(a){a=Re(this,a);var u=[],h=Pe(this,a.line).markedSpans;if(h)for(var p=0;p<h.length;++p){var y=h[p];(y.from==null||y.from<=a.ch)&&(y.to==null||y.to>=a.ch)&&u.push(y.marker.parent||y.marker)}return u},findMarks:function(a,u,h){a=Re(this,a),u=Re(this,u);var p=[],y=a.line;return this.iter(a.line,u.line+1,function(T){var O=T.markedSpans;if(O)for(var L=0;L<O.length;L++){var M=O[L];!(M.to!=null&&y==a.line&&a.ch>=M.to||M.from==null&&y!=a.line||M.from!=null&&y==u.line&&M.from>=u.ch)&&(!h||h(M.marker))&&p.push(M.marker.parent||M.marker)}++y}),p},getAllMarks:function(){var a=[];return this.iter(function(u){var h=u.markedSpans;if(h)for(var p=0;p<h.length;++p)h[p].from!=null&&a.push(h[p].marker)}),a},posFromIndex:function(a){var u,h=this.first,p=this.lineSeparator().length;return this.iter(function(y){var T=y.text.length+p;if(T>a)return u=a,!0;a-=T,++h}),Re(this,we(h,u))},indexFromPos:function(a){a=Re(this,a);var u=a.ch;if(a.line<this.first||a.ch<0)return 0;var h=this.lineSeparator().length;return this.iter(this.first,a.line,function(p){u+=p.text.length+h}),u},copy:function(a){var u=new Wr(xc(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return u.scrollTop=this.scrollTop,u.scrollLeft=this.scrollLeft,u.sel=this.sel,u.extend=!1,a&&(u.history.undoDepth=this.history.undoDepth,u.setHistory(this.getHistory())),u},linkedDoc:function(a){a||(a={});var u=this.first,h=this.first+this.size;a.from!=null&&a.from>u&&(u=a.from),a.to!=null&&a.to<h&&(h=a.to);var p=new Wr(xc(this,u,h),a.mode||this.modeOption,u,this.lineSep,this.direction);return a.sharedHist&&(p.history=this.history),(this.linked||(this.linked=[])).push({doc:p,sharedHist:a.sharedHist}),p.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],c8(p,lN(this)),p},unlinkDoc:function(a){if(a instanceof Vt&&(a=a.doc),this.linked)for(var u=0;u<this.linked.length;++u){var h=this.linked[u];if(h.doc==a){this.linked.splice(u,1),a.unlinkDoc(this),u8(lN(this));break}}if(a.history==this.history){var p=[a.id];ea(a,function(y){return p.push(y.id)},!0),a.history=new Rh(null),a.history.done=Ic(this.history.done,p),a.history.undone=Ic(this.history.undone,p)}},iterLinkedDocs:function(a){ea(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):wf(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Dn(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(u){return u.order=null}),this.cm&&XV(this.cm))})}),Wr.prototype.eachLine=Wr.prototype.iter;var f8=0;function d8(a){var u=this;if(cN(u),!(ln(u,a)||us(u.display,a))){Bn(a),c&&(f8=+new Date);var h=ul(u,a,!0),p=a.dataTransfer.files;if(!(!h||u.isReadOnly()))if(p&&p.length&&window.FileReader&&window.File)for(var y=p.length,T=Array(y),O=0,L=P(function(){++O==y&&An(u,function(){h=Re(u.doc,h);var oe={from:h,to:h,text:u.doc.splitLines(T.filter(function(pe){return pe!=null}).join(u.doc.lineSeparator())),origin:"paste"};Rc(u.doc,oe),Qk(u.doc,Xs(Re(u.doc,h),Re(u.doc,Zs(oe))))})()},"markAsReadAndPasteIfAllFilesAreRead"),M=P(function(oe,pe){if(u.options.allowDropFileTypes&&le(u.options.allowDropFileTypes,oe.type)==-1){L();return}var be=new FileReader;be.onerror=function(){return L()},be.onload=function(){var ke=be.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ke)){L();return}T[pe]=ke,L()},be.readAsText(oe)},"readTextFromFile"),V=0;V<p.length;V++)M(p[V],V);else{if(u.state.draggingText&&u.doc.sel.contains(h)>-1){u.state.draggingText(a),setTimeout(function(){return u.display.input.focus()},20);return}try{var G=a.dataTransfer.getData("Text");if(G){var X;if(u.state.draggingText&&!u.state.draggingText.copy&&(X=u.listSelections()),Ph(u.doc,Xs(h,h)),X)for(var se=0;se<X.length;++se)Fc(u.doc,"",X[se].anchor,X[se].head,"drag");u.replaceSelection(G,"around","paste"),u.display.input.focus()}}catch{}}}}P(d8,"onDrop");function p8(a,u){if(c&&(!a.state.draggingText||+new Date-f8<100)){Hs(u);return}if(!(ln(a,u)||us(a.display,u))&&(u.dataTransfer.setData("Text",a.getSelection()),u.dataTransfer.effectAllowed="copyMove",u.dataTransfer.setDragImage&&!b)){var h=B("img",null,null,"position: fixed; left: 0; top: 0;");h.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",v&&(h.width=h.height=1,a.display.wrapper.appendChild(h),h._top=h.offsetTop),u.dataTransfer.setDragImage(h,0,0),v&&h.parentNode.removeChild(h)}}P(p8,"onDragStart");function h8(a,u){var h=ul(a,u);if(h){var p=document.createDocumentFragment();e1(a,h,p),a.display.dragCursor||(a.display.dragCursor=B("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),z(a.display.dragCursor,p)}}P(h8,"onDragOver");function cN(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}P(cN,"clearDragCursor");function uN(a){if(document.getElementsByClassName){for(var u=document.getElementsByClassName("CodeMirror"),h=[],p=0;p<u.length;p++){var y=u[p].CodeMirror;y&&h.push(y)}h.length&&h[0].operation(function(){for(var T=0;T<h.length;T++)a(h[T])})}}P(uN,"forEachCodeMirror");var m8=!1;function g8(){m8||(v8(),m8=!0)}P(g8,"ensureGlobalHandlers");function v8(){var a;We(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,uN(y8)},100))}),We(window,"blur",function(){return uN(_c)})}P(v8,"registerGlobalHandlers");function y8(a){var u=a.display;u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.scrollbarsClipped=!1,a.setSize()}P(y8,"onResize");for(var gl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bh=0;Bh<10;Bh++)gl[Bh+48]=gl[Bh+96]=String(Bh);for(var b1=65;b1<=90;b1++)gl[b1]=String.fromCharCode(b1);for(var qh=1;qh<=12;qh++)gl[qh+111]=gl[qh+63235]="F"+qh;var ta={};ta.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ta.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ta.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ta.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ta.default=E?ta.macDefault:ta.pcDefault;function b8(a){var u=a.split(/-(?!$)/);a=u[u.length-1];for(var h,p,y,T,O=0;O<u.length-1;O++){var L=u[O];if(/^(cmd|meta|m)$/i.test(L))T=!0;else if(/^a(lt)?$/i.test(L))h=!0;else if(/^(c|ctrl|control)$/i.test(L))p=!0;else if(/^s(hift)?$/i.test(L))y=!0;else throw new Error("Unrecognized modifier name: "+L)}return h&&(a="Alt-"+a),p&&(a="Ctrl-"+a),T&&(a="Cmd-"+a),y&&(a="Shift-"+a),a}P(b8,"normalizeKeyName");function E8(a){var u={};for(var h in a)if(a.hasOwnProperty(h)){var p=a[h];if(/^(name|fallthrough|(de|at)tach)$/.test(h))continue;if(p=="..."){delete a[h];continue}for(var y=Dt(h.split(" "),b8),T=0;T<y.length;T++){var O=void 0,L=void 0;T==y.length-1?(L=y.join(" "),O=p):(L=y.slice(0,T+1).join(" "),O="...");var M=u[L];if(!M)u[L]=O;else if(M!=O)throw new Error("Inconsistent bindings for "+L)}delete a[h]}for(var V in u)a[V]=u[V];return a}P(E8,"normalizeKeyMap");function Pc(a,u,h,p){u=zh(u);var y=u.call?u.call(a,p):u[a];if(y===!1)return"nothing";if(y==="...")return"multi";if(y!=null&&h(y))return"handled";if(u.fallthrough){if(Object.prototype.toString.call(u.fallthrough)!="[object Array]")return Pc(a,u.fallthrough,h,p);for(var T=0;T<u.fallthrough.length;T++){var O=Pc(a,u.fallthrough[T],h,p);if(O)return O}}}P(Pc,"lookupKey");function fN(a){var u=typeof a=="string"?a:gl[a.keyCode];return u=="Ctrl"||u=="Alt"||u=="Shift"||u=="Mod"}P(fN,"isModifierKey");function dN(a,u,h){var p=a;return u.altKey&&p!="Alt"&&(a="Alt-"+a),(A?u.metaKey:u.ctrlKey)&&p!="Ctrl"&&(a="Ctrl-"+a),(A?u.ctrlKey:u.metaKey)&&p!="Mod"&&(a="Cmd-"+a),!h&&u.shiftKey&&p!="Shift"&&(a="Shift-"+a),a}P(dN,"addModifierNames");function pN(a,u){if(v&&a.keyCode==34&&a.char)return!1;var h=gl[a.keyCode];return h==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(h=a.code),dN(h,a,u))}P(pN,"keyName");function zh(a){return typeof a=="string"?ta[a]:a}P(zh,"getKeyMap");function $c(a,u){for(var h=a.doc.sel.ranges,p=[],y=0;y<h.length;y++){for(var T=u(h[y]);p.length&&j(T.from,je(p).to)<=0;){var O=p.pop();if(j(O.from,T.from)<0){T.from=O.from;break}}p.push(T)}Hr(a,function(){for(var L=p.length-1;L>=0;L--)Fc(a.doc,"",p[L].from,p[L].to,"+delete");Oc(a)})}P($c,"deleteNearSelection");function E1(a,u,h){var p=gf(a.text,u+h,h);return p<0||p>a.text.length?null:p}P(E1,"moveCharLogically");function w1(a,u,h){var p=E1(a,u.ch,h);return p==null?null:new we(u.line,p,h<0?"after":"before")}P(w1,"moveLogically");function x1(a,u,h,p,y){if(a){u.doc.direction=="rtl"&&(y=-y);var T=_r(h,u.doc.direction);if(T){var O=y<0?je(T):T[0],L=y<0==(O.level==1),M=L?"after":"before",V;if(O.level>0||u.doc.direction=="rtl"){var G=Tc(u,h);V=y<0?h.text.length-1:0;var X=Vi(u,G,V).top;V=ei(function(se){return Vi(u,G,se).top==X},y<0==(O.level==1)?O.from:O.to-1,V),M=="before"&&(V=E1(h,V,1))}else V=y<0?O.to:O.from;return new we(p,V,M)}}return new we(p,y<0?h.text.length:0,y<0?"before":"after")}P(x1,"endOfLine");function w8(a,u,h,p){var y=_r(u,a.doc.direction);if(!y)return w1(u,h,p);h.ch>=u.text.length?(h.ch=u.text.length,h.sticky="before"):h.ch<=0&&(h.ch=0,h.sticky="after");var T=Wt(y,h.ch,h.sticky),O=y[T];if(a.doc.direction=="ltr"&&O.level%2==0&&(p>0?O.to>h.ch:O.from<h.ch))return w1(u,h,p);var L=P(function(Ae,Le){return E1(u,Ae instanceof we?Ae.ch:Ae,Le)},"mv"),M,V=P(function(Ae){return a.options.lineWrapping?(M=M||Tc(a,u),xk(a,u,M,Ae)):{begin:0,end:u.text.length}},"getWrappedLineExtent"),G=V(h.sticky=="before"?L(h,-1):h.ch);if(a.doc.direction=="rtl"||O.level==1){var X=O.level==1==p<0,se=L(h,X?1:-1);if(se!=null&&(X?se<=O.to&&se<=G.end:se>=O.from&&se>=G.begin)){var oe=X?"before":"after";return new we(h.line,se,oe)}}var pe=P(function(Ae,Le,De){for(var Me=P(function(It,qn){return qn?new we(h.line,L(It,1),"before"):new we(h.line,It,"after")},"getRes");Ae>=0&&Ae<y.length;Ae+=Le){var Ye=y[Ae],ze=Le>0==(Ye.level!=1),at=ze?De.begin:L(De.end,-1);if(Ye.from<=at&&at<Ye.to||(at=ze?Ye.from:L(Ye.to,-1),De.begin<=at&&at<De.end))return Me(at,ze)}},"searchInVisualLine"),be=pe(T+p,p,G);if(be)return be;var ke=p>0?G.end:L(G.begin,-1);return ke!=null&&!(p>0&&ke==u.text.length)&&(be=pe(p>0?0:y.length-1,p,V(ke)),be)?be:null}P(w8,"moveVisually");var Hh={selectAll:eN,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ve)},killLine:function(a){return $c(a,function(u){if(u.empty()){var h=Pe(a.doc,u.head.line).text.length;return u.head.ch==h&&u.head.line<a.lastLine()?{from:u.head,to:we(u.head.line+1,0)}:{from:u.head,to:we(u.head.line,h)}}else return{from:u.from(),to:u.to()}})},deleteLine:function(a){return $c(a,function(u){return{from:we(u.from().line,0),to:Re(a.doc,we(u.to().line+1,0))}})},delLineLeft:function(a){return $c(a,function(u){return{from:we(u.from().line,0),to:u.from()}})},delWrappedLineLeft:function(a){return $c(a,function(u){var h=a.charCoords(u.head,"div").top+5,p=a.coordsChar({left:0,top:h},"div");return{from:p,to:u.from()}})},delWrappedLineRight:function(a){return $c(a,function(u){var h=a.charCoords(u.head,"div").top+5,p=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:h},"div");return{from:u.from(),to:p}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(we(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(we(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(u){return hN(a,u.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(u){return mN(a,u.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(u){return x8(a,u.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(u){var h=a.cursorCoords(u.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:h},"div")},Ie)},goLineLeft:function(a){return a.extendSelectionsBy(function(u){var h=a.cursorCoords(u.head,"div").top+5;return a.coordsChar({left:0,top:h},"div")},Ie)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(u){var h=a.cursorCoords(u.head,"div").top+5,p=a.coordsChar({left:0,top:h},"div");return p.ch<a.getLine(p.line).search(/\S/)?mN(a,u.head):p},Ie)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var u=[],h=a.listSelections(),p=a.options.tabSize,y=0;y<h.length;y++){var T=h[y].from(),O=ne(a.getLine(T.line),T.ch,p);u.push(Ot(p-O%p))}a.replaceSelections(u)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Hr(a,function(){for(var u=a.listSelections(),h=[],p=0;p<u.length;p++)if(u[p].empty()){var y=u[p].head,T=Pe(a.doc,y.line).text;if(T){if(y.ch==T.length&&(y=new we(y.line,y.ch-1)),y.ch>0)y=new we(y.line,y.ch+1),a.replaceRange(T.charAt(y.ch-1)+T.charAt(y.ch-2),we(y.line,y.ch-2),y,"+transpose");else if(y.line>a.doc.first){var O=Pe(a.doc,y.line-1).text;O&&(y=new we(y.line,1),a.replaceRange(T.charAt(0)+a.doc.lineSeparator()+O.charAt(O.length-1),we(y.line-1,O.length-1),y,"+transpose"))}}h.push(new St(y,y))}a.setSelections(h)})},newlineAndIndent:function(a){return Hr(a,function(){for(var u=a.listSelections(),h=u.length-1;h>=0;h--)a.replaceRange(a.doc.lineSeparator(),u[h].anchor,u[h].head,"+input");u=a.listSelections();for(var p=0;p<u.length;p++)a.indentLine(u[p].from().line,null,!0);Oc(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function hN(a,u){var h=Pe(a.doc,u),p=si(h);return p!=h&&(u=yt(p)),x1(!0,a,p,u,1)}P(hN,"lineStart");function x8(a,u){var h=Pe(a.doc,u),p=oV(h);return p!=h&&(u=yt(p)),x1(!0,a,h,u,-1)}P(x8,"lineEnd");function mN(a,u){var h=hN(a,u.line),p=Pe(a.doc,h.line),y=_r(p,a.doc.direction);if(!y||y[0].level==0){var T=Math.max(h.ch,p.text.search(/\S/)),O=u.line==h.line&&u.ch<=T&&u.ch;return we(h.line,O?0:T,h.sticky)}return h}P(mN,"lineStartSmart");function Wh(a,u,h){if(typeof u=="string"&&(u=Hh[u],!u))return!1;a.display.input.ensurePolled();var p=a.display.shift,y=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),h&&(a.display.shift=!1),y=u(a)!=xe}finally{a.display.shift=p,a.state.suppressEdits=!1}return y}P(Wh,"doHandleBinding");function S8(a,u,h){for(var p=0;p<a.state.keyMaps.length;p++){var y=Pc(u,a.state.keyMaps[p],h,a);if(y)return y}return a.options.extraKeys&&Pc(u,a.options.extraKeys,h,a)||Pc(u,a.options.keyMap,h,a)}P(S8,"lookupKeyForEditor");var bue=new ae;function qf(a,u,h,p){var y=a.state.keySeq;if(y){if(fN(u))return"handled";if(/\'$/.test(u)?a.state.keySeq=null:bue.set(50,function(){a.state.keySeq==y&&(a.state.keySeq=null,a.display.input.reset())}),gN(a,y+" "+u,h,p))return!0}return gN(a,u,h,p)}P(qf,"dispatchKey");function gN(a,u,h,p){var y=S8(a,u,p);return y=="multi"&&(a.state.keySeq=u),y=="handled"&&On(a,"keyHandled",a,u,h),(y=="handled"||y=="multi")&&(Bn(h),t1(a)),!!y}P(gN,"dispatchKeyInner");function vN(a,u){var h=pN(u,!0);return h?u.shiftKey&&!a.state.keySeq?qf(a,"Shift-"+h,u,function(p){return Wh(a,p,!0)})||qf(a,h,u,function(p){if(typeof p=="string"?/^go[A-Z]/.test(p):p.motion)return Wh(a,p)}):qf(a,h,u,function(p){return Wh(a,p)}):!1}P(vN,"handleKeyBinding");function T8(a,u,h){return qf(a,"'"+h+"'",u,function(p){return Wh(a,p,!0)})}P(T8,"handleCharBinding");var yN=null;function bN(a){var u=this;if(!(a.target&&a.target!=u.display.input.getField())&&(u.curOp.focus=Q(),!ln(u,a))){c&&f<11&&a.keyCode==27&&(a.returnValue=!1);var h=a.keyCode;u.display.shift=h==16||a.shiftKey;var p=vN(u,a);v&&(yN=p?h:null,!p&&h==88&&!vh&&(E?a.metaKey:a.ctrlKey)&&u.replaceSelection("",null,"cut")),o&&!E&&!p&&h==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),h==18&&!/\bCodeMirror-crosshair\b/.test(u.display.lineDiv.className)&&C8(u)}}P(bN,"onKeyDown");function C8(a){var u=a.display.lineDiv;K(u,"CodeMirror-crosshair");function h(p){(p.keyCode==18||!p.altKey)&&(q(u,"CodeMirror-crosshair"),dr(document,"keyup",h),dr(document,"mouseover",h))}P(h,"up"),We(document,"keyup",h),We(document,"mouseover",h)}P(C8,"showCrossHair");function EN(a){a.keyCode==16&&(this.doc.sel.shift=!1),ln(this,a)}P(EN,"onKeyUp");function wN(a){var u=this;if(!(a.target&&a.target!=u.display.input.getField())&&!(us(u.display,a)||ln(u,a)||a.ctrlKey&&!a.altKey||E&&a.metaKey)){var h=a.keyCode,p=a.charCode;if(v&&h==yN){yN=null,Bn(a);return}if(!(v&&(!a.which||a.which<10)&&vN(u,a))){var y=String.fromCharCode(p??h);y!="\b"&&(T8(u,a,y)||u.display.input.onKeyPress(a))}}}P(wN,"onKeyPress");var Eue=400,xN=P(function(a,u,h){this.time=a,this.pos=u,this.button=h},"PastClick");xN.prototype.compare=function(a,u,h){return this.time+Eue>a&&j(u,this.pos)==0&&h==this.button};var Gh,Yh;function k8(a,u){var h=+new Date;return Yh&&Yh.compare(h,a,u)?(Gh=Yh=null,"triple"):Gh&&Gh.compare(h,a,u)?(Yh=new xN(h,a,u),Gh=null,"double"):(Gh=new xN(h,a,u),Yh=null,"single")}P(k8,"clickRepeat");function SN(a){var u=this,h=u.display;if(!(ln(u,a)||h.activeTouch&&h.input.supportsTouch())){if(h.input.ensurePolled(),h.shift=a.shiftKey,us(h,a)){d||(h.scroller.draggable=!1,setTimeout(function(){return h.scroller.draggable=!0},100));return}if(!S1(u,a)){var p=ul(u,a),y=vf(a),T=p?k8(p,y):"single";window.focus(),y==1&&u.state.selectingText&&u.state.selectingText(a),!(p&&N8(u,y,p,T,a))&&(y==1?p?O8(u,p,T,a):ss(a)==h.scroller&&Bn(a):y==2?(p&&Mh(u.doc,p),setTimeout(function(){return h.input.focus()},20)):y==3&&(F?u.display.input.onContextMenu(a):n1(u)))}}}P(SN,"onMouseDown");function N8(a,u,h,p,y){var T="Click";return p=="double"?T="Double"+T:p=="triple"&&(T="Triple"+T),T=(u==1?"Left":u==2?"Middle":"Right")+T,qf(a,dN(T,y),y,function(O){if(typeof O=="string"&&(O=Hh[O]),!O)return!1;var L=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),L=O(a,h)!=xe}finally{a.state.suppressEdits=!1}return L})}P(N8,"handleMappedButton");function _8(a,u,h){var p=a.getOption("configureMouse"),y=p?p(a,u,h):{};if(y.unit==null){var T=_?h.shiftKey&&h.metaKey:h.altKey;y.unit=T?"rectangle":u=="single"?"char":u=="double"?"word":"line"}return(y.extend==null||a.doc.extend)&&(y.extend=a.doc.extend||h.shiftKey),y.addNew==null&&(y.addNew=E?h.metaKey:h.ctrlKey),y.moveOnDrag==null&&(y.moveOnDrag=!(E?h.altKey:h.ctrlKey)),y}P(_8,"configureMouse");function O8(a,u,h,p){c?setTimeout(J(kk,a),0):a.curOp.focus=Q();var y=_8(a,h,p),T=a.doc.sel,O;a.options.dragDrop&&yf&&!a.isReadOnly()&&h=="single"&&(O=T.contains(u))>-1&&(j((O=T.ranges[O]).from(),u)<0||u.xRel>0)&&(j(O.to(),u)>0||u.xRel<0)?A8(a,p,u,y):D8(a,p,u,y)}P(O8,"leftButtonDown");function A8(a,u,h,p){var y=a.display,T=!1,O=An(a,function(V){d&&(y.scroller.draggable=!1),a.state.draggingText=!1,a.state.delayingBlurEvent&&(a.hasFocus()?a.state.delayingBlurEvent=!1:n1(a)),dr(y.wrapper.ownerDocument,"mouseup",O),dr(y.wrapper.ownerDocument,"mousemove",L),dr(y.scroller,"dragstart",M),dr(y.scroller,"drop",O),T||(Bn(V),p.addNew||Mh(a.doc,h,null,null,p.extend),d&&!b||c&&f==9?setTimeout(function(){y.wrapper.ownerDocument.body.focus({preventScroll:!0}),y.input.focus()},20):y.input.focus())}),L=P(function(V){T=T||Math.abs(u.clientX-V.clientX)+Math.abs(u.clientY-V.clientY)>=10},"mouseMove"),M=P(function(){return T=!0},"dragStart");d&&(y.scroller.draggable=!0),a.state.draggingText=O,O.copy=!p.moveOnDrag,We(y.wrapper.ownerDocument,"mouseup",O),We(y.wrapper.ownerDocument,"mousemove",L),We(y.scroller,"dragstart",M),We(y.scroller,"drop",O),a.state.delayingBlurEvent=!0,setTimeout(function(){return y.input.focus()},20),y.scroller.dragDrop&&y.scroller.dragDrop()}P(A8,"leftButtonStartDrag");function TN(a,u,h){if(h=="char")return new St(u,u);if(h=="word")return a.findWordAt(u);if(h=="line")return new St(we(u.line,0),Re(a.doc,we(u.line+1,0)));var p=h(a,u);return new St(p.from,p.to)}P(TN,"rangeForUnit");function D8(a,u,h,p){c&&n1(a);var y=a.display,T=a.doc;Bn(u);var O,L,M=T.sel,V=M.ranges;if(p.addNew&&!p.extend?(L=T.sel.contains(h),L>-1?O=V[L]:O=new St(h,h)):(O=T.sel.primary(),L=T.sel.primIndex),p.unit=="rectangle")p.addNew||(O=new St(h,h)),h=ul(a,u,!0,!0),L=-1;else{var G=TN(a,h,p.unit);p.extend?O=v1(O,G.anchor,G.head,p.extend):O=G}p.addNew?L==-1?(L=V.length,Xn(T,li(a,V.concat([O]),L),{scroll:!1,origin:"*mouse"})):V.length>1&&V[L].empty()&&p.unit=="char"&&!p.extend?(Xn(T,li(a,V.slice(0,L).concat(V.slice(L+1)),0),{scroll:!1,origin:"*mouse"}),M=T.sel):y1(T,L,O,qe):(L=0,Xn(T,new Io([O],0),qe),M=T.sel);var X=h;function se(De){if(j(X,De)!=0)if(X=De,p.unit=="rectangle"){for(var Me=[],Ye=a.options.tabSize,ze=ne(Pe(T,h.line).text,h.ch,Ye),at=ne(Pe(T,De.line).text,De.ch,Ye),It=Math.min(ze,at),qn=Math.max(ze,at),Gt=Math.min(h.line,De.line),Gr=Math.min(a.lastLine(),Math.max(h.line,De.line));Gt<=Gr;Gt++){var Yr=Pe(T,Gt).text,Sn=Oe(Yr,It,Ye);It==qn?Me.push(new St(we(Gt,Sn),we(Gt,Sn))):Yr.length>Sn&&Me.push(new St(we(Gt,Sn),we(Gt,Oe(Yr,qn,Ye))))}Me.length||Me.push(new St(h,h)),Xn(T,li(a,M.ranges.slice(0,L).concat(Me),L),{origin:"*mouse",scroll:!1}),a.scrollIntoView(De)}else{var Qr=O,Zn=TN(a,De,p.unit),In=Qr.anchor,Tn;j(Zn.anchor,In)>0?(Tn=Zn.head,In=Je(Qr.from(),Zn.anchor)):(Tn=Zn.anchor,In=Te(Qr.to(),Zn.head));var cn=M.ranges.slice(0);cn[L]=I8(a,new St(Re(T,In),Tn)),Xn(T,li(a,cn,L),qe)}}P(se,"extendTo");var oe=y.wrapper.getBoundingClientRect(),pe=0;function be(De){var Me=++pe,Ye=ul(a,De,!0,p.unit=="rectangle");if(Ye)if(j(Ye,X)!=0){a.curOp.focus=Q(),se(Ye);var ze=Dh(y,T);(Ye.line>=ze.to||Ye.line<ze.from)&&setTimeout(An(a,function(){pe==Me&&be(De)}),150)}else{var at=De.clientY<oe.top?-20:De.clientY>oe.bottom?20:0;at&&setTimeout(An(a,function(){pe==Me&&(y.scroller.scrollTop+=at,be(De))}),50)}}P(be,"extend");function ke(De){a.state.selectingText=!1,pe=1/0,De&&(Bn(De),y.input.focus()),dr(y.wrapper.ownerDocument,"mousemove",Ae),dr(y.wrapper.ownerDocument,"mouseup",Le),T.history.lastSelOrigin=null}P(ke,"done");var Ae=An(a,function(De){De.buttons===0||!vf(De)?ke(De):be(De)}),Le=An(a,ke);a.state.selectingText=Le,We(y.wrapper.ownerDocument,"mousemove",Ae),We(y.wrapper.ownerDocument,"mouseup",Le)}P(D8,"leftButtonSelect");function I8(a,u){var h=u.anchor,p=u.head,y=Pe(a.doc,h.line);if(j(h,p)==0&&h.sticky==p.sticky)return u;var T=_r(y);if(!T)return u;var O=Wt(T,h.ch,h.sticky),L=T[O];if(L.from!=h.ch&&L.to!=h.ch)return u;var M=O+(L.from==h.ch==(L.level!=1)?0:1);if(M==0||M==T.length)return u;var V;if(p.line!=h.line)V=(p.line-h.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var G=Wt(T,p.ch,p.sticky),X=G-O||(p.ch-h.ch)*(L.level==1?-1:1);G==M-1||G==M?V=X<0:V=X>0}var se=T[M+(V?-1:0)],oe=V==(se.level==1),pe=oe?se.from:se.to,be=oe?"after":"before";return h.ch==pe&&h.sticky==be?u:new St(new we(h.line,pe,be),p)}P(I8,"bidiSimplify");function CN(a,u,h,p){var y,T;if(u.touches)y=u.touches[0].clientX,T=u.touches[0].clientY;else try{y=u.clientX,T=u.clientY}catch{return!1}if(y>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;p&&Bn(u);var O=a.display,L=O.lineDiv.getBoundingClientRect();if(T>L.bottom||!_n(a,h))return zr(u);T-=L.top-O.viewOffset;for(var M=0;M<a.display.gutterSpecs.length;++M){var V=O.gutters.childNodes[M];if(V&&V.getBoundingClientRect().right>=y){var G=ii(a.doc,T),X=a.display.gutterSpecs[M];return Ke(a,h,a,G,X.className,u),zr(u)}}}P(CN,"gutterEvent");function S1(a,u){return CN(a,u,"gutterClick",!0)}P(S1,"clickInGutter");function kN(a,u){us(a.display,u)||L8(a,u)||ln(a,u,"contextmenu")||F||a.display.input.onContextMenu(u)}P(kN,"onContextMenu");function L8(a,u){return _n(a,"gutterContextMenu")?CN(a,u,"gutterContextMenu",!1):!1}P(L8,"contextMenuInGutter");function NN(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Df(a)}P(NN,"themeChanged");var zf={toString:function(){return"CodeMirror.Init"}},R8={},T1={};function F8(a){var u=a.optionHandlers;function h(p,y,T,O){a.defaults[p]=y,T&&(u[p]=O?function(L,M,V){V!=zf&&T(L,M,V)}:T)}P(h,"option"),a.defineOption=h,a.Init=zf,h("value","",function(p,y){return p.setValue(y)},!0),h("mode",null,function(p,y){p.doc.modeOption=y,h1(p)},!0),h("indentUnit",2,h1,!0),h("indentWithTabs",!1),h("smartIndent",!0),h("tabSize",4,function(p){$f(p),Df(p),Dr(p)},!0),h("lineSeparator",null,function(p,y){if(p.doc.lineSep=y,!!y){var T=[],O=p.doc.first;p.doc.iter(function(M){for(var V=0;;){var G=M.text.indexOf(y,V);if(G==-1)break;V=G+y.length,T.push(we(O,G))}O++});for(var L=T.length-1;L>=0;L--)Fc(p.doc,y,T[L],we(T[L].line,T[L].ch+y.length))}}),h("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(p,y,T){p.state.specialChars=new RegExp(y.source+(y.test(" ")?"":"| "),"g"),T!=zf&&p.refresh()}),h("specialCharPlaceholder",lV,function(p){return p.refresh()},!0),h("electricChars",!0),h("inputStyle",C?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),h("spellcheck",!1,function(p,y){return p.getInputField().spellcheck=y},!0),h("autocorrect",!1,function(p,y){return p.getInputField().autocorrect=y},!0),h("autocapitalize",!1,function(p,y){return p.getInputField().autocapitalize=y},!0),h("rtlMoveVisually",!I),h("wholeLineUpdateBefore",!0),h("theme","default",function(p){NN(p),Pf(p)},!0),h("keyMap","default",function(p,y,T){var O=zh(y),L=T!=zf&&zh(T);L&&L.detach&&L.detach(p,O),O.attach&&O.attach(p,L||null)}),h("extraKeys",null),h("configureMouse",null),h("lineWrapping",!1,P8,!0),h("gutters",[],function(p,y){p.display.gutterSpecs=f1(y,p.options.lineNumbers),Pf(p)},!0),h("fixedGutter",!0,function(p,y){p.display.gutters.style.left=y?Xy(p.display)+"px":"0",p.refresh()},!0),h("coverGutterNextToScrollbar",!1,function(p){return Dc(p)},!0),h("scrollbarStyle","native",function(p){Dk(p),Dc(p),p.display.scrollbars.setScrollTop(p.doc.scrollTop),p.display.scrollbars.setScrollLeft(p.doc.scrollLeft)},!0),h("lineNumbers",!1,function(p,y){p.display.gutterSpecs=f1(p.options.gutters,y),Pf(p)},!0),h("firstLineNumber",1,Pf,!0),h("lineNumberFormatter",function(p){return p},Pf,!0),h("showCursorWhenSelecting",!1,If,!0),h("resetSelectionOnContextMenu",!0),h("lineWiseCopyCut",!0),h("pasteLinesPerSelection",!0),h("selectionsMayTouch",!1),h("readOnly",!1,function(p,y){y=="nocursor"&&(_c(p),p.display.input.blur()),p.display.input.readOnlyChanged(y)}),h("screenReaderLabel",null,function(p,y){y=y===""?null:y,p.display.input.screenReaderLabelChanged(y)}),h("disableInput",!1,function(p,y){y||p.display.input.reset()},!0),h("dragDrop",!0,M8),h("allowDropFileTypes",null),h("cursorBlinkRate",530),h("cursorScrollMargin",0),h("cursorHeight",1,If,!0),h("singleCursorHeightPerLine",!0,If,!0),h("workTime",100),h("workDelay",100),h("flattenSpans",!0,$f,!0),h("addModeClass",!1,$f,!0),h("pollInterval",100),h("undoDepth",200,function(p,y){return p.doc.history.undoDepth=y}),h("historyEventDelay",1250),h("viewportMargin",10,function(p){return p.refresh()},!0),h("maxHighlightLength",1e4,$f,!0),h("moveInputWithCursor",!0,function(p,y){y||p.display.input.resetPosition()}),h("tabindex",null,function(p,y){return p.display.input.getField().tabIndex=y||""}),h("autofocus",null),h("direction","ltr",function(p,y){return p.doc.setDirection(y)},!0),h("phrases",null)}P(F8,"defineOptions");function M8(a,u,h){var p=h&&h!=zf;if(!u!=!p){var y=a.display.dragFunctions,T=u?We:dr;T(a.display.scroller,"dragstart",y.start),T(a.display.scroller,"dragenter",y.enter),T(a.display.scroller,"dragover",y.over),T(a.display.scroller,"dragleave",y.leave),T(a.display.scroller,"drop",y.drop)}}P(M8,"dragDropChanged");function P8(a){a.options.lineWrapping?(K(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(q(a.display.wrapper,"CodeMirror-wrap"),By(a)),Zy(a),Dr(a),Df(a),setTimeout(function(){return Dc(a)},100)}P(P8,"wrappingChanged");function Vt(a,u){var h=this;if(!(this instanceof Vt))return new Vt(a,u);this.options=u=u?ie(u):{},ie(R8,u,!1);var p=u.value;typeof p=="string"?p=new Wr(p,u.mode,null,u.lineSeparator,u.direction):u.mode&&(p.modeOption=u.mode),this.doc=p;var y=new Vt.inputStyles[u.inputStyle](this),T=this.display=new QV(a,p,y,u);T.wrapper.CodeMirror=this,NN(this),u.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Dk(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ae,keySeq:null,specialChars:null},u.autofocus&&!C&&T.input.focus(),c&&f<11&&setTimeout(function(){return h.display.input.reset(!0)},20),$8(this),g8(),pl(this),this.curOp.forceUpdate=!0,Uk(this,p),u.autofocus&&!C||this.hasFocus()?setTimeout(function(){h.hasFocus()&&!h.state.focused&&r1(h)},20):_c(this);for(var O in T1)T1.hasOwnProperty(O)&&T1[O](this,u[O],zf);Rk(this),u.finishInit&&u.finishInit(this);for(var L=0;L<_N.length;++L)_N[L](this);hl(this),d&&u.lineWrapping&&getComputedStyle(T.lineDiv).textRendering=="optimizelegibility"&&(T.lineDiv.style.textRendering="auto")}P(Vt,"CodeMirror"),Vt.defaults=R8,Vt.optionHandlers=T1;function $8(a){var u=a.display;We(u.scroller,"mousedown",An(a,SN)),c&&f<11?We(u.scroller,"dblclick",An(a,function(M){if(!ln(a,M)){var V=ul(a,M);if(!(!V||S1(a,M)||us(a.display,M))){Bn(M);var G=a.findWordAt(V);Mh(a.doc,G.anchor,G.head)}}})):We(u.scroller,"dblclick",function(M){return ln(a,M)||Bn(M)}),We(u.scroller,"contextmenu",function(M){return kN(a,M)}),We(u.input.getField(),"contextmenu",function(M){u.scroller.contains(M.target)||kN(a,M)});var h,p={end:0};function y(){u.activeTouch&&(h=setTimeout(function(){return u.activeTouch=null},1e3),p=u.activeTouch,p.end=+new Date)}P(y,"finishTouch");function T(M){if(M.touches.length!=1)return!1;var V=M.touches[0];return V.radiusX<=1&&V.radiusY<=1}P(T,"isMouseLikeTouchEvent");function O(M,V){if(V.left==null)return!0;var G=V.left-M.left,X=V.top-M.top;return G*G+X*X>20*20}P(O,"farAway"),We(u.scroller,"touchstart",function(M){if(!ln(a,M)&&!T(M)&&!S1(a,M)){u.input.ensurePolled(),clearTimeout(h);var V=+new Date;u.activeTouch={start:V,moved:!1,prev:V-p.end<=300?p:null},M.touches.length==1&&(u.activeTouch.left=M.touches[0].pageX,u.activeTouch.top=M.touches[0].pageY)}}),We(u.scroller,"touchmove",function(){u.activeTouch&&(u.activeTouch.moved=!0)}),We(u.scroller,"touchend",function(M){var V=u.activeTouch;if(V&&!us(u,M)&&V.left!=null&&!V.moved&&new Date-V.start<300){var G=a.coordsChar(u.activeTouch,"page"),X;!V.prev||O(V,V.prev)?X=new St(G,G):!V.prev.prev||O(V,V.prev.prev)?X=a.findWordAt(G):X=new St(we(G.line,0),Re(a.doc,we(G.line+1,0))),a.setSelection(X.anchor,X.head),a.focus(),Bn(M)}y()}),We(u.scroller,"touchcancel",y),We(u.scroller,"scroll",function(){u.scroller.clientHeight&&(Rf(a,u.scroller.scrollTop),dl(a,u.scroller.scrollLeft,!0),Ke(a,"scroll",a))}),We(u.scroller,"mousewheel",function(M){return Pk(a,M)}),We(u.scroller,"DOMMouseScroll",function(M){return Pk(a,M)}),We(u.wrapper,"scroll",function(){return u.wrapper.scrollTop=u.wrapper.scrollLeft=0}),u.dragFunctions={enter:function(M){ln(a,M)||Hs(M)},over:function(M){ln(a,M)||(h8(a,M),Hs(M))},start:function(M){return p8(a,M)},drop:An(a,d8),leave:function(M){ln(a,M)||cN(a)}};var L=u.input.getField();We(L,"keyup",function(M){return EN.call(a,M)}),We(L,"keydown",An(a,bN)),We(L,"keypress",An(a,wN)),We(L,"focus",function(M){return r1(a,M)}),We(L,"blur",function(M){return _c(a,M)})}P($8,"registerEventHandlers");var _N=[];Vt.defineInitHook=function(a){return _N.push(a)};function Hf(a,u,h,p){var y=a.doc,T;h==null&&(h="add"),h=="smart"&&(y.mode.indent?T=Cf(a,u).state:h="prev");var O=a.options.tabSize,L=Pe(y,u),M=ne(L.text,null,O);L.stateAfter&&(L.stateAfter=null);var V=L.text.match(/^\s*/)[0],G;if(!p&&!/\S/.test(L.text))G=0,h="not";else if(h=="smart"&&(G=y.mode.indent(T,L.text.slice(V.length),L.text),G==xe||G>150)){if(!p)return;h="prev"}h=="prev"?u>y.first?G=ne(Pe(y,u-1).text,null,O):G=0:h=="add"?G=M+a.options.indentUnit:h=="subtract"?G=M-a.options.indentUnit:typeof h=="number"&&(G=M+h),G=Math.max(0,G);var X="",se=0;if(a.options.indentWithTabs)for(var oe=Math.floor(G/O);oe;--oe)se+=O,X+=" ";if(se<G&&(X+=Ot(G-se)),X!=V)return Fc(y,X,we(u,0),we(u,V.length),"+input"),L.stateAfter=null,!0;for(var pe=0;pe<y.sel.ranges.length;pe++){var be=y.sel.ranges[pe];if(be.head.line==u&&be.head.ch<V.length){var ke=we(u,V.length);y1(y,pe,new St(ke,ke));break}}}P(Hf,"indentLine");var ji=null;function Qh(a){ji=a}P(Qh,"setLastCopied");function C1(a,u,h,p,y){var T=a.doc;a.display.shift=!1,p||(p=T.sel);var O=+new Date-200,L=y=="paste"||a.state.pasteIncoming>O,M=wf(u),V=null;if(L&&p.ranges.length>1)if(ji&&ji.text.join(`
`)==u){if(p.ranges.length%ji.text.length==0){V=[];for(var G=0;G<ji.text.length;G++)V.push(T.splitLines(ji.text[G]))}}else M.length==p.ranges.length&&a.options.pasteLinesPerSelection&&(V=Dt(M,function(Ae){return[Ae]}));for(var X=a.curOp.updateInput,se=p.ranges.length-1;se>=0;se--){var oe=p.ranges[se],pe=oe.from(),be=oe.to();oe.empty()&&(h&&h>0?pe=we(pe.line,pe.ch-h):a.state.overwrite&&!L?be=we(be.line,Math.min(Pe(T,be.line).text.length,be.ch+je(M).length)):L&&ji&&ji.lineWise&&ji.text.join(`
`)==M.join(`
`)&&(pe=be=we(pe.line,0)));var ke={from:pe,to:be,text:V?V[se%V.length]:M,origin:y||(L?"paste":a.state.cutIncoming>O?"cut":"+input")};Rc(a.doc,ke),On(a,"inputRead",a,ke)}u&&!L&&AN(a,u),Oc(a),a.curOp.updateInput<2&&(a.curOp.updateInput=X),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}P(C1,"applyTextInput");function ON(a,u){var h=a.clipboardData&&a.clipboardData.getData("Text");if(h)return a.preventDefault(),!u.isReadOnly()&&!u.options.disableInput&&Hr(u,function(){return C1(u,h,0,null,"paste")}),!0}P(ON,"handlePaste");function AN(a,u){if(!(!a.options.electricChars||!a.options.smartIndent))for(var h=a.doc.sel,p=h.ranges.length-1;p>=0;p--){var y=h.ranges[p];if(!(y.head.ch>100||p&&h.ranges[p-1].head.line==y.head.line)){var T=a.getModeAt(y.head),O=!1;if(T.electricChars){for(var L=0;L<T.electricChars.length;L++)if(u.indexOf(T.electricChars.charAt(L))>-1){O=Hf(a,y.head.line,"smart");break}}else T.electricInput&&T.electricInput.test(Pe(a.doc,y.head.line).text.slice(0,y.head.ch))&&(O=Hf(a,y.head.line,"smart"));O&&On(a,"electricInput",a,y.head.line)}}}P(AN,"triggerElectric");function DN(a){for(var u=[],h=[],p=0;p<a.doc.sel.ranges.length;p++){var y=a.doc.sel.ranges[p].head.line,T={anchor:we(y,0),head:we(y+1,0)};h.push(T),u.push(a.getRange(T.anchor,T.head))}return{text:u,ranges:h}}P(DN,"copyableRanges");function IN(a,u,h,p){a.setAttribute("autocorrect",h?"":"off"),a.setAttribute("autocapitalize",p?"":"off"),a.setAttribute("spellcheck",!!u)}P(IN,"disableBrowserMagic");function LN(){var a=B("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),u=B("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return d?a.style.width="1000px":a.setAttribute("wrap","off"),S&&(a.style.border="1px solid black"),IN(a),u}P(LN,"hiddenTextarea");function V8(a){var u=a.optionHandlers,h=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(p,y){var T=this.options,O=T[p];T[p]==y&&p!="mode"||(T[p]=y,u.hasOwnProperty(p)&&An(this,u[p])(this,y,O),Ke(this,"optionChange",this,p))},getOption:function(p){return this.options[p]},getDoc:function(){return this.doc},addKeyMap:function(p,y){this.state.keyMaps[y?"push":"unshift"](zh(p))},removeKeyMap:function(p){for(var y=this.state.keyMaps,T=0;T<y.length;++T)if(y[T]==p||y[T].name==p)return y.splice(T,1),!0},addOverlay:pr(function(p,y){var T=p.token?p:a.getMode(this.options,p);if(T.startState)throw new Error("Overlays may not be stateful.");Nr(this.state.overlays,{mode:T,modeSpec:p,opaque:y&&y.opaque,priority:y&&y.priority||0},function(O){return O.priority}),this.state.modeGen++,Dr(this)}),removeOverlay:pr(function(p){for(var y=this.state.overlays,T=0;T<y.length;++T){var O=y[T].modeSpec;if(O==p||typeof p=="string"&&O.name==p){y.splice(T,1),this.state.modeGen++,Dr(this);return}}}),indentLine:pr(function(p,y,T){typeof y!="string"&&typeof y!="number"&&(y==null?y=this.options.smartIndent?"smart":"prev":y=y?"add":"subtract"),Ws(this.doc,p)&&Hf(this,p,y,T)}),indentSelection:pr(function(p){for(var y=this.doc.sel.ranges,T=-1,O=0;O<y.length;O++){var L=y[O];if(L.empty())L.head.line>T&&(Hf(this,L.head.line,p,!0),T=L.head.line,O==this.doc.sel.primIndex&&Oc(this));else{var M=L.from(),V=L.to(),G=Math.max(T,M.line);T=Math.min(this.lastLine(),V.line-(V.ch?0:1))+1;for(var X=G;X<T;++X)Hf(this,X,p);var se=this.doc.sel.ranges;M.ch==0&&y.length==se.length&&se[O].from().ch>0&&y1(this.doc,O,new St(M,se[O].to()),ve)}}}),getTokenAt:function(p,y){return WC(this,p,y)},getLineTokens:function(p,y){return WC(this,we(p),y,!0)},getTokenTypeAt:function(p){p=Re(this.doc,p);var y=zC(this,Pe(this.doc,p.line)),T=0,O=(y.length-1)/2,L=p.ch,M;if(L==0)M=y[2];else for(;;){var V=T+O>>1;if((V?y[V*2-1]:0)>=L)O=V;else if(y[V*2+1]<L)T=V+1;else{M=y[V*2+2];break}}var G=M?M.indexOf("overlay "):-1;return G<0?M:G==0?null:M.slice(0,G-1)},getModeAt:function(p){var y=this.doc.mode;return y.innerMode?a.innerMode(y,this.getTokenAt(p).state).mode:y},getHelper:function(p,y){return this.getHelpers(p,y)[0]},getHelpers:function(p,y){var T=[];if(!h.hasOwnProperty(y))return T;var O=h[y],L=this.getModeAt(p);if(typeof L[y]=="string")O[L[y]]&&T.push(O[L[y]]);else if(L[y])for(var M=0;M<L[y].length;M++){var V=O[L[y][M]];V&&T.push(V)}else L.helperType&&O[L.helperType]?T.push(O[L.helperType]):O[L.name]&&T.push(O[L.name]);for(var G=0;G<O._global.length;G++){var X=O._global[G];X.pred(L,this)&&le(T,X.val)==-1&&T.push(X.val)}return T},getStateAfter:function(p,y){var T=this.doc;return p=pt(T,p??T.first+T.size-1),Cf(this,p+1,y).state},cursorCoords:function(p,y){var T,O=this.doc.sel.primary();return p==null?T=O.head:typeof p=="object"?T=Re(this.doc,p):T=p?O.from():O.to(),ai(this,T,y||"page")},charCoords:function(p,y){return Nh(this,Re(this.doc,p),y||"page")},coordsChar:function(p,y){return p=bk(this,p,y||"page"),Qy(this,p.left,p.top)},lineAtHeight:function(p,y){return p=bk(this,{top:p,left:0},y||"page").top,ii(this.doc,p+this.display.viewOffset)},heightAtLine:function(p,y,T){var O=!1,L;if(typeof p=="number"){var M=this.doc.first+this.doc.size-1;p<this.doc.first?p=this.doc.first:p>M&&(p=M,O=!0),L=Pe(this.doc,p)}else L=p;return kh(this,L,{top:0,left:0},y||"page",T||O).top+(O?this.doc.height-cs(L):0)},defaultTextHeight:function(){return kc(this.display)},defaultCharWidth:function(){return Nc(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(p,y,T,O,L){var M=this.display;p=ai(this,Re(this.doc,p));var V=p.bottom,G=p.left;if(y.style.position="absolute",y.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(y),M.sizer.appendChild(y),O=="over")V=p.top;else if(O=="above"||O=="near"){var X=Math.max(M.wrapper.clientHeight,this.doc.height),se=Math.max(M.sizer.clientWidth,M.lineSpace.clientWidth);(O=="above"||p.bottom+y.offsetHeight>X)&&p.top>y.offsetHeight?V=p.top-y.offsetHeight:p.bottom+y.offsetHeight<=X&&(V=p.bottom),G+y.offsetWidth>se&&(G=se-y.offsetWidth)}y.style.top=V+"px",y.style.left=y.style.right="",L=="right"?(G=M.sizer.clientWidth-y.offsetWidth,y.style.right="0px"):(L=="left"?G=0:L=="middle"&&(G=(M.sizer.clientWidth-y.offsetWidth)/2),y.style.left=G+"px"),T&&FV(this,{left:G,top:V,right:G+y.offsetWidth,bottom:V+y.offsetHeight})},triggerOnKeyDown:pr(bN),triggerOnKeyPress:pr(wN),triggerOnKeyUp:EN,triggerOnMouseDown:pr(SN),execCommand:function(p){if(Hh.hasOwnProperty(p))return Hh[p].call(null,this)},triggerElectric:pr(function(p){AN(this,p)}),findPosH:function(p,y,T,O){var L=1;y<0&&(L=-1,y=-y);for(var M=Re(this.doc,p),V=0;V<y&&(M=k1(this.doc,M,L,T,O),!M.hitSide);++V);return M},moveH:pr(function(p,y){var T=this;this.extendSelectionsBy(function(O){return T.display.shift||T.doc.extend||O.empty()?k1(T.doc,O.head,p,y,T.options.rtlMoveVisually):p<0?O.from():O.to()},Ie)}),deleteH:pr(function(p,y){var T=this.doc.sel,O=this.doc;T.somethingSelected()?O.replaceSelection("",null,"+delete"):$c(this,function(L){var M=k1(O,L.head,p,y,!1);return p<0?{from:M,to:L.head}:{from:L.head,to:M}})}),findPosV:function(p,y,T,O){var L=1,M=O;y<0&&(L=-1,y=-y);for(var V=Re(this.doc,p),G=0;G<y;++G){var X=ai(this,V,"div");if(M==null?M=X.left:X.left=M,V=RN(this,X,L,T),V.hitSide)break}return V},moveV:pr(function(p,y){var T=this,O=this.doc,L=[],M=!this.display.shift&&!O.extend&&O.sel.somethingSelected();if(O.extendSelectionsBy(function(G){if(M)return p<0?G.from():G.to();var X=ai(T,G.head,"div");G.goalColumn!=null&&(X.left=G.goalColumn),L.push(X.left);var se=RN(T,X,p,y);return y=="page"&&G==O.sel.primary()&&i1(T,Nh(T,se,"div").top-X.top),se},Ie),L.length)for(var V=0;V<O.sel.ranges.length;V++)O.sel.ranges[V].goalColumn=L[V]}),findWordAt:function(p){var y=this.doc,T=Pe(y,p.line).text,O=p.ch,L=p.ch;if(T){var M=this.getHelper(p,"wordChars");(p.sticky=="before"||L==T.length)&&O?--O:++L;for(var V=T.charAt(O),G=nl(V,M)?function(X){return nl(X,M)}:/\s/.test(V)?function(X){return/\s/.test(X)}:function(X){return!/\s/.test(X)&&!nl(X)};O>0&&G(T.charAt(O-1));)--O;for(;L<T.length&&G(T.charAt(L));)++L}return new St(we(p.line,O),we(p.line,L))},toggleOverwrite:function(p){p!=null&&p==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?K(this.display.cursorDiv,"CodeMirror-overwrite"):q(this.display.cursorDiv,"CodeMirror-overwrite"),Ke(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Q()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:pr(function(p,y){Lf(this,p,y)}),getScrollInfo:function(){var p=this.display.scroller;return{left:p.scrollLeft,top:p.scrollTop,height:p.scrollHeight-$i(this)-this.display.barHeight,width:p.scrollWidth-$i(this)-this.display.barWidth,clientHeight:Hy(this),clientWidth:cl(this)}},scrollIntoView:pr(function(p,y){p==null?(p={from:this.doc.sel.primary().head,to:null},y==null&&(y=this.options.cursorScrollMargin)):typeof p=="number"?p={from:we(p,0),to:null}:p.from==null&&(p={from:p,to:null}),p.to||(p.to=p.from),p.margin=y||0,p.from.line!=null?MV(this,p):_k(this,p.from,p.to,p.margin)}),setSize:pr(function(p,y){var T=this,O=P(function(M){return typeof M=="number"||/^\d+$/.test(String(M))?M+"px":M},"interpret");p!=null&&(this.display.wrapper.style.width=O(p)),y!=null&&(this.display.wrapper.style.height=O(y)),this.options.lineWrapping&&gk(this);var L=this.display.viewFrom;this.doc.iter(L,this.display.viewTo,function(M){if(M.widgets){for(var V=0;V<M.widgets.length;V++)if(M.widgets[V].noHScroll){Qs(T,L,"widget");break}}++L}),this.curOp.forceUpdate=!0,Ke(this,"refresh",this)}),operation:function(p){return Hr(this,p)},startOperation:function(){return pl(this)},endOperation:function(){return hl(this)},refresh:pr(function(){var p=this.display.cachedTextHeight;Dr(this),this.curOp.forceUpdate=!0,Df(this),Lf(this,this.doc.scrollLeft,this.doc.scrollTop),c1(this.display),(p==null||Math.abs(p-kc(this.display))>.5||this.options.lineWrapping)&&Zy(this),Ke(this,"refresh",this)}),swapDoc:pr(function(p){var y=this.doc;return y.cm=null,this.state.selectingText&&this.state.selectingText(),Uk(this,p),Df(this),this.display.input.reset(),Lf(this,p.scrollLeft,p.scrollTop),this.curOp.forceScroll=!0,On(this,"swapDoc",this,y),y}),phrase:function(p){var y=this.options.phrases;return y&&Object.prototype.hasOwnProperty.call(y,p)?y[p]:p},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ti(a),a.registerHelper=function(p,y,T){h.hasOwnProperty(p)||(h[p]=a[p]={_global:[]}),h[p][y]=T},a.registerGlobalHelper=function(p,y,T,O){a.registerHelper(p,y,O),h[p]._global.push({pred:T,val:O})}}P(V8,"addEditorMethods");function k1(a,u,h,p,y){var T=u,O=h,L=Pe(a,u.line),M=y&&a.direction=="rtl"?-h:h;function V(){var Le=u.line+M;return Le<a.first||Le>=a.first+a.size?!1:(u=new we(Le,u.ch,u.sticky),L=Pe(a,Le))}P(V,"findNextLine");function G(Le){var De;if(p=="codepoint"){var Me=L.text.charCodeAt(u.ch+(h>0?0:-1));if(isNaN(Me))De=null;else{var Ye=h>0?Me>=55296&&Me<56320:Me>=56320&&Me<57343;De=new we(u.line,Math.max(0,Math.min(L.text.length,u.ch+h*(Ye?2:1))),-h)}}else y?De=w8(a.cm,L,u,h):De=w1(L,u,h);if(De==null)if(!Le&&V())u=x1(y,a.cm,L,u.line,M);else return!1;else u=De;return!0}if(P(G,"moveOnce"),p=="char"||p=="codepoint")G();else if(p=="column")G(!0);else if(p=="word"||p=="group")for(var X=null,se=p=="group",oe=a.cm&&a.cm.getHelper(u,"wordChars"),pe=!0;!(h<0&&!G(!pe));pe=!1){var be=L.text.charAt(u.ch)||`
`,ke=nl(be,oe)?"w":se&&be==`
`?"n":!se||/\s/.test(be)?null:"p";if(se&&!pe&&!ke&&(ke="s"),X&&X!=ke){h<0&&(h=1,G(),u.sticky="after");break}if(ke&&(X=ke),h>0&&!G(!pe))break}var Ae=$h(a,u,T,O,!0);return ee(T,Ae)&&(Ae.hitSide=!0),Ae}P(k1,"findPosH");function RN(a,u,h,p){var y=a.doc,T=u.left,O;if(p=="page"){var L=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),M=Math.max(L-.5*kc(a.display),3);O=(h>0?u.bottom:u.top)+h*M}else p=="line"&&(O=h>0?u.bottom+3:u.top-3);for(var V;V=Qy(a,T,O),!!V.outside;){if(h<0?O<=0:O>=y.height){V.hitSide=!0;break}O+=h*5}return V}P(RN,"findPosV");var Nt=P(function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ae,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null},"ContentEditableInput");Nt.prototype.init=function(a){var u=this,h=this,p=h.cm,y=h.div=a.lineDiv;y.contentEditable=!0,IN(y,p.options.spellcheck,p.options.autocorrect,p.options.autocapitalize);function T(L){for(var M=L.target;M;M=M.parentNode){if(M==y)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(M.className))break}return!1}P(T,"belongsToInput"),We(y,"paste",function(L){!T(L)||ln(p,L)||ON(L,p)||f<=11&&setTimeout(An(p,function(){return u.updateFromDOM()}),20)}),We(y,"compositionstart",function(L){u.composing={data:L.data,done:!1}}),We(y,"compositionupdate",function(L){u.composing||(u.composing={data:L.data,done:!1})}),We(y,"compositionend",function(L){u.composing&&(L.data!=u.composing.data&&u.readFromDOMSoon(),u.composing.done=!0)}),We(y,"touchstart",function(){return h.forceCompositionEnd()}),We(y,"input",function(){u.composing||u.readFromDOMSoon()});function O(L){if(!(!T(L)||ln(p,L))){if(p.somethingSelected())Qh({lineWise:!1,text:p.getSelections()}),L.type=="cut"&&p.replaceSelection("",null,"cut");else if(p.options.lineWiseCopyCut){var M=DN(p);Qh({lineWise:!0,text:M.text}),L.type=="cut"&&p.operation(function(){p.setSelections(M.ranges,0,ve),p.replaceSelection("",null,"cut")})}else return;if(L.clipboardData){L.clipboardData.clearData();var V=ji.text.join(`
`);if(L.clipboardData.setData("Text",V),L.clipboardData.getData("Text")==V){L.preventDefault();return}}var G=LN(),X=G.firstChild;p.display.lineSpace.insertBefore(G,p.display.lineSpace.firstChild),X.value=ji.text.join(`
`);var se=Q();re(X),setTimeout(function(){p.display.lineSpace.removeChild(G),se.focus(),se==y&&h.showPrimarySelection()},50)}}P(O,"onCopyCut"),We(y,"copy",O),We(y,"cut",O)},Nt.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Nt.prototype.prepareSelection=function(){var a=Ck(this.cm,!1);return a.focus=Q()==this.div,a},Nt.prototype.showSelection=function(a,u){!a||!this.cm.display.view.length||((a.focus||u)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Nt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Nt.prototype.showPrimarySelection=function(){var a=this.getSelection(),u=this.cm,h=u.doc.sel.primary(),p=h.from(),y=h.to();if(u.display.viewTo==u.display.viewFrom||p.line>=u.display.viewTo||y.line<u.display.viewFrom){a.removeAllRanges();return}var T=Kh(u,a.anchorNode,a.anchorOffset),O=Kh(u,a.focusNode,a.focusOffset);if(!(T&&!T.bad&&O&&!O.bad&&j(Je(T,O),p)==0&&j(Te(T,O),y)==0)){var L=u.display.view,M=p.line>=u.display.viewFrom&&FN(u,p)||{node:L[0].measure.map[2],offset:0},V=y.line<u.display.viewTo&&FN(u,y);if(!V){var G=L[L.length-1].measure,X=G.maps?G.maps[G.maps.length-1]:G.map;V={node:X[X.length-1],offset:X[X.length-2]-X[X.length-3]}}if(!M||!V){a.removeAllRanges();return}var se=a.rangeCount&&a.getRangeAt(0),oe;try{oe=te(M.node,M.offset,V.offset,V.node)}catch{}oe&&(!o&&u.state.focused?(a.collapse(M.node,M.offset),oe.collapsed||(a.removeAllRanges(),a.addRange(oe))):(a.removeAllRanges(),a.addRange(oe)),se&&a.anchorNode==null?a.addRange(se):o&&this.startGracePeriod()),this.rememberSelection()}},Nt.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Nt.prototype.showMultipleSelections=function(a){z(this.cm.display.cursorDiv,a.cursors),z(this.cm.display.selectionDiv,a.selection)},Nt.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Nt.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var u=a.getRangeAt(0).commonAncestorContainer;return Y(this.div,u)},Nt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Q()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Nt.prototype.blur=function(){this.div.blur()},Nt.prototype.getField=function(){return this.div},Nt.prototype.supportsTouch=function(){return!0},Nt.prototype.receivedFocus=function(){var a=this,u=this;this.selectionInEditor()?setTimeout(function(){return a.pollSelection()},20):Hr(this.cm,function(){return u.cm.curOp.selectionChanged=!0});function h(){u.cm.state.focused&&(u.pollSelection(),u.polling.set(u.cm.options.pollInterval,h))}P(h,"poll"),this.polling.set(this.cm.options.pollInterval,h)},Nt.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Nt.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),u=this.cm;if(x&&m&&this.cm.display.gutterSpecs.length&&j8(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var h=Kh(u,a.anchorNode,a.anchorOffset),p=Kh(u,a.focusNode,a.focusOffset);h&&p&&Hr(u,function(){Xn(u.doc,Xs(h,p),ve),(h.bad||p.bad)&&(u.curOp.selectionChanged=!0)})}}},Nt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,u=a.display,h=a.doc.sel.primary(),p=h.from(),y=h.to();if(p.ch==0&&p.line>a.firstLine()&&(p=we(p.line-1,Pe(a.doc,p.line-1).length)),y.ch==Pe(a.doc,y.line).text.length&&y.line<a.lastLine()&&(y=we(y.line+1,0)),p.line<u.viewFrom||y.line>u.viewTo-1)return!1;var T,O,L;p.line==u.viewFrom||(T=fl(a,p.line))==0?(O=yt(u.view[0].line),L=u.view[0].node):(O=yt(u.view[T].line),L=u.view[T-1].node.nextSibling);var M=fl(a,y.line),V,G;if(M==u.view.length-1?(V=u.viewTo-1,G=u.lineDiv.lastChild):(V=yt(u.view[M+1].line)-1,G=u.view[M+1].node.previousSibling),!L)return!1;for(var X=a.doc.splitLines(U8(a,L,G,O,V)),se=oi(a.doc,we(O,0),we(V,Pe(a.doc,V).text.length));X.length>1&&se.length>1;)if(je(X)==je(se))X.pop(),se.pop(),V--;else if(X[0]==se[0])X.shift(),se.shift(),O++;else break;for(var oe=0,pe=0,be=X[0],ke=se[0],Ae=Math.min(be.length,ke.length);oe<Ae&&be.charCodeAt(oe)==ke.charCodeAt(oe);)++oe;for(var Le=je(X),De=je(se),Me=Math.min(Le.length-(X.length==1?oe:0),De.length-(se.length==1?oe:0));pe<Me&&Le.charCodeAt(Le.length-pe-1)==De.charCodeAt(De.length-pe-1);)++pe;if(X.length==1&&se.length==1&&O==p.line)for(;oe&&oe>p.ch&&Le.charCodeAt(Le.length-pe-1)==De.charCodeAt(De.length-pe-1);)oe--,pe++;X[X.length-1]=Le.slice(0,Le.length-pe).replace(/^\u200b+/,""),X[0]=X[0].slice(oe).replace(/\u200b+$/,"");var Ye=we(O,oe),ze=we(V,se.length?je(se).length-pe:0);if(X.length>1||X[0]||j(Ye,ze))return Fc(a.doc,X,Ye,ze,"+input"),!0},Nt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Nt.prototype.reset=function(){this.forceCompositionEnd()},Nt.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Nt.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Nt.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Hr(this.cm,function(){return Dr(a.cm)})},Nt.prototype.setUneditable=function(a){a.contentEditable="false"},Nt.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||An(this.cm,C1)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Nt.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Nt.prototype.onContextMenu=function(){},Nt.prototype.resetPosition=function(){},Nt.prototype.needsContentAttribute=!0;function FN(a,u){var h=Wy(a,u.line);if(!h||h.hidden)return null;var p=Pe(a.doc,u.line),y=dk(h,p,u.line),T=_r(p,a.doc.direction),O="left";if(T){var L=Wt(T,u.ch);O=L%2?"right":"left"}var M=hk(y.map,u.ch,O);return M.offset=M.collapse=="right"?M.end:M.start,M}P(FN,"posToDOM");function j8(a){for(var u=a;u;u=u.parentNode)if(/CodeMirror-gutter-wrapper/.test(u.className))return!0;return!1}P(j8,"isInGutter");function Vc(a,u){return u&&(a.bad=!0),a}P(Vc,"badPos");function U8(a,u,h,p,y){var T="",O=!1,L=a.doc.lineSeparator(),M=!1;function V(oe){return function(pe){return pe.id==oe}}P(V,"recognizeMarker");function G(){O&&(T+=L,M&&(T+=L),O=M=!1)}P(G,"close");function X(oe){oe&&(G(),T+=oe)}P(X,"addText");function se(oe){if(oe.nodeType==1){var pe=oe.getAttribute("cm-text");if(pe){X(pe);return}var be=oe.getAttribute("cm-marker"),ke;if(be){var Ae=a.findMarks(we(p,0),we(y+1,0),V(+be));Ae.length&&(ke=Ae[0].find(0))&&X(oi(a.doc,ke.from,ke.to).join(L));return}if(oe.getAttribute("contenteditable")=="false")return;var Le=/^(pre|div|p|li|table|br)$/i.test(oe.nodeName);if(!/^br$/i.test(oe.nodeName)&&oe.textContent.length==0)return;Le&&G();for(var De=0;De<oe.childNodes.length;De++)se(oe.childNodes[De]);/^(pre|p)$/i.test(oe.nodeName)&&(M=!0),Le&&(O=!0)}else oe.nodeType==3&&X(oe.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(P(se,"walk");se(u),u!=h;)u=u.nextSibling,M=!1;return T}P(U8,"domTextBetween");function Kh(a,u,h){var p;if(u==a.display.lineDiv){if(p=a.display.lineDiv.childNodes[h],!p)return Vc(a.clipPos(we(a.display.viewTo-1)),!0);u=null,h=0}else for(p=u;;p=p.parentNode){if(!p||p==a.display.lineDiv)return null;if(p.parentNode&&p.parentNode==a.display.lineDiv)break}for(var y=0;y<a.display.view.length;y++){var T=a.display.view[y];if(T.node==p)return B8(T,u,h)}}P(Kh,"domToPos");function B8(a,u,h){var p=a.text.firstChild,y=!1;if(!u||!Y(p,u))return Vc(we(yt(a.line),0),!0);if(u==p&&(y=!0,u=p.childNodes[h],h=0,!u)){var T=a.rest?je(a.rest):a.line;return Vc(we(yt(T),T.text.length),y)}var O=u.nodeType==3?u:null,L=u;for(!O&&u.childNodes.length==1&&u.firstChild.nodeType==3&&(O=u.firstChild,h&&(h=O.nodeValue.length));L.parentNode!=p;)L=L.parentNode;var M=a.measure,V=M.maps;function G(ke,Ae,Le){for(var De=-1;De<(V?V.length:0);De++)for(var Me=De<0?M.map:V[De],Ye=0;Ye<Me.length;Ye+=3){var ze=Me[Ye+2];if(ze==ke||ze==Ae){var at=yt(De<0?a.line:a.rest[De]),It=Me[Ye]+Le;return(Le<0||ze!=ke)&&(It=Me[Ye+(Le?1:0)]),we(at,It)}}}P(G,"find");var X=G(O,L,h);if(X)return Vc(X,y);for(var se=L.nextSibling,oe=O?O.nodeValue.length-h:0;se;se=se.nextSibling){if(X=G(se,se.firstChild,0),X)return Vc(we(X.line,X.ch-oe),y);oe+=se.textContent.length}for(var pe=L.previousSibling,be=h;pe;pe=pe.previousSibling){if(X=G(pe,pe.firstChild,-1),X)return Vc(we(X.line,X.ch+be),y);be+=pe.textContent.length}}P(B8,"locateNodeInLineView");var pn=P(function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ae,this.hasSelection=!1,this.composing=null},"TextareaInput");pn.prototype.init=function(a){var u=this,h=this,p=this.cm;this.createField(a);var y=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),S&&(y.style.width="0px"),We(y,"input",function(){c&&f>=9&&u.hasSelection&&(u.hasSelection=null),h.poll()}),We(y,"paste",function(O){ln(p,O)||ON(O,p)||(p.state.pasteIncoming=+new Date,h.fastPoll())});function T(O){if(!ln(p,O)){if(p.somethingSelected())Qh({lineWise:!1,text:p.getSelections()});else if(p.options.lineWiseCopyCut){var L=DN(p);Qh({lineWise:!0,text:L.text}),O.type=="cut"?p.setSelections(L.ranges,null,ve):(h.prevInput="",y.value=L.text.join(`
`),re(y))}else return;O.type=="cut"&&(p.state.cutIncoming=+new Date)}}P(T,"prepareCopyCut"),We(y,"cut",T),We(y,"copy",T),We(a.scroller,"paste",function(O){if(!(us(a,O)||ln(p,O))){if(!y.dispatchEvent){p.state.pasteIncoming=+new Date,h.focus();return}var L=new Event("paste");L.clipboardData=O.clipboardData,y.dispatchEvent(L)}}),We(a.lineSpace,"selectstart",function(O){us(a,O)||Bn(O)}),We(y,"compositionstart",function(){var O=p.getCursor("from");h.composing&&h.composing.range.clear(),h.composing={start:O,range:p.markText(O,p.getCursor("to"),{className:"CodeMirror-composing"})}}),We(y,"compositionend",function(){h.composing&&(h.poll(),h.composing.range.clear(),h.composing=null)})},pn.prototype.createField=function(a){this.wrapper=LN(),this.textarea=this.wrapper.firstChild},pn.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},pn.prototype.prepareSelection=function(){var a=this.cm,u=a.display,h=a.doc,p=Ck(a);if(a.options.moveInputWithCursor){var y=ai(a,h.sel.primary().head,"div"),T=u.wrapper.getBoundingClientRect(),O=u.lineDiv.getBoundingClientRect();p.teTop=Math.max(0,Math.min(u.wrapper.clientHeight-10,y.top+O.top-T.top)),p.teLeft=Math.max(0,Math.min(u.wrapper.clientWidth-10,y.left+O.left-T.left))}return p},pn.prototype.showSelection=function(a){var u=this.cm,h=u.display;z(h.cursorDiv,a.cursors),z(h.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},pn.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var u=this.cm;if(u.somethingSelected()){this.prevInput="";var h=u.getSelection();this.textarea.value=h,u.state.focused&&re(this.textarea),c&&f>=9&&(this.hasSelection=h)}else a||(this.prevInput=this.textarea.value="",c&&f>=9&&(this.hasSelection=null))}},pn.prototype.getField=function(){return this.textarea},pn.prototype.supportsTouch=function(){return!1},pn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!C||Q()!=this.textarea))try{this.textarea.focus()}catch{}},pn.prototype.blur=function(){this.textarea.blur()},pn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},pn.prototype.receivedFocus=function(){this.slowPoll()},pn.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},pn.prototype.fastPoll=function(){var a=!1,u=this;u.pollingFast=!0;function h(){var p=u.poll();!p&&!a?(a=!0,u.polling.set(60,h)):(u.pollingFast=!1,u.slowPoll())}P(h,"p"),u.polling.set(20,h)},pn.prototype.poll=function(){var a=this,u=this.cm,h=this.textarea,p=this.prevInput;if(this.contextMenuPending||!u.state.focused||gh(h)&&!p&&!this.composing||u.isReadOnly()||u.options.disableInput||u.state.keySeq)return!1;var y=h.value;if(y==p&&!u.somethingSelected())return!1;if(c&&f>=9&&this.hasSelection===y||E&&/[\uf700-\uf7ff]/.test(y))return u.display.input.reset(),!1;if(u.doc.sel==u.display.selForContextMenu){var T=y.charCodeAt(0);if(T==8203&&!p&&(p=""),T==8666)return this.reset(),this.cm.execCommand("undo")}for(var O=0,L=Math.min(p.length,y.length);O<L&&p.charCodeAt(O)==y.charCodeAt(O);)++O;return Hr(u,function(){C1(u,y.slice(O),p.length-O,null,a.composing?"*compose":null),y.length>1e3||y.indexOf(`
`)>-1?h.value=a.prevInput="":a.prevInput=y,a.composing&&(a.composing.range.clear(),a.composing.range=u.markText(a.composing.start,u.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},pn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},pn.prototype.onKeyPress=function(){c&&f>=9&&(this.hasSelection=null),this.fastPoll()},pn.prototype.onContextMenu=function(a){var u=this,h=u.cm,p=h.display,y=u.textarea;u.contextMenuPending&&u.contextMenuPending();var T=ul(h,a),O=p.scroller.scrollTop;if(!T||v)return;var L=h.options.resetSelectionOnContextMenu;L&&h.doc.sel.contains(T)==-1&&An(h,Xn)(h.doc,Xs(T),ve);var M=y.style.cssText,V=u.wrapper.style.cssText,G=u.wrapper.offsetParent.getBoundingClientRect();u.wrapper.style.cssText="position: static",y.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-G.top-5)+"px; left: "+(a.clientX-G.left-5)+`px;
z-index: 1000; background: `+(c?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var X;d&&(X=window.scrollY),p.input.focus(),d&&window.scrollTo(null,X),p.input.reset(),h.somethingSelected()||(y.value=u.prevInput=" "),u.contextMenuPending=oe,p.selForContextMenu=h.doc.sel,clearTimeout(p.detectingSelectAll);function se(){if(y.selectionStart!=null){var be=h.somethingSelected(),ke=""+(be?y.value:"");y.value="⇚",y.value=ke,u.prevInput=be?"":"",y.selectionStart=1,y.selectionEnd=ke.length,p.selForContextMenu=h.doc.sel}}P(se,"prepareSelectAllHack");function oe(){if(u.contextMenuPending==oe&&(u.contextMenuPending=!1,u.wrapper.style.cssText=V,y.style.cssText=M,c&&f<9&&p.scrollbars.setScrollTop(p.scroller.scrollTop=O),y.selectionStart!=null)){(!c||c&&f<9)&&se();var be=0,ke=P(function(){p.selForContextMenu==h.doc.sel&&y.selectionStart==0&&y.selectionEnd>0&&u.prevInput==""?An(h,eN)(h):be++<10?p.detectingSelectAll=setTimeout(ke,500):(p.selForContextMenu=null,p.input.reset())},"poll");p.detectingSelectAll=setTimeout(ke,200)}}if(P(oe,"rehide"),c&&f>=9&&se(),F){Hs(a);var pe=P(function(){dr(window,"mouseup",pe),setTimeout(oe,20)},"mouseup");We(window,"mouseup",pe)}else setTimeout(oe,50)},pn.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},pn.prototype.setUneditable=function(){},pn.prototype.needsContentAttribute=!1;function q8(a,u){if(u=u?ie(u):{},u.value=a.value,!u.tabindex&&a.tabIndex&&(u.tabindex=a.tabIndex),!u.placeholder&&a.placeholder&&(u.placeholder=a.placeholder),u.autofocus==null){var h=Q();u.autofocus=h==a||a.getAttribute("autofocus")!=null&&h==document.body}function p(){a.value=L.getValue()}P(p,"save");var y;if(a.form&&(We(a.form,"submit",p),!u.leaveSubmitMethodAlone)){var T=a.form;y=T.submit;try{var O=T.submit=function(){p(),T.submit=y,T.submit(),T.submit=O}}catch{}}u.finishInit=function(M){M.save=p,M.getTextArea=function(){return a},M.toTextArea=function(){M.toTextArea=isNaN,p(),a.parentNode.removeChild(M.getWrapperElement()),a.style.display="",a.form&&(dr(a.form,"submit",p),!u.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=y))}},a.style.display="none";var L=Vt(function(M){return a.parentNode.insertBefore(M,a.nextSibling)},u);return L}P(q8,"fromTextArea");function z8(a){a.off=dr,a.on=We,a.wheelEventPixels=KV,a.Doc=Wr,a.splitLines=wf,a.countColumn=ne,a.findColumn=Oe,a.isWordChar=fr,a.Pass=xe,a.signal=Ke,a.Line=Nf,a.changeEnd=Zs,a.scrollbarModel=PV,a.Pos=we,a.cmpPos=j,a.modes=Ao,a.mimeModes=so,a.resolveMode=al,a.getMode=ll,a.modeExtensions=ri,a.extendMode=Do,a.copyState=ao,a.startState=wc,a.innerMode=Ec,a.commands=Hh,a.keyMap=ta,a.keyName=pN,a.isModifierKey=fN,a.lookupKey=Pc,a.normalizeKeyMap=E8,a.StringStream=en,a.SharedTextMarker=Uh,a.TextMarker=ml,a.LineWidget=jh,a.e_preventDefault=Bn,a.e_stopPropagation=sl,a.e_stop=Hs,a.addClass=K,a.contains=Y,a.rmClass=q,a.keyNames=gl}P(z8,"addLegacyProps"),F8(Vt),V8(Vt);var wue="iter insert remove copy getEditor constructor".split(" ");for(var N1 in Wr.prototype)Wr.prototype.hasOwnProperty(N1)&&le(wue,N1)<0&&(Vt.prototype[N1]=function(a){return function(){return a.apply(this.doc,arguments)}}(Wr.prototype[N1]));return ti(Wr),Vt.inputStyles={textarea:pn,contenteditable:Nt},Vt.defineMode=function(a){!Vt.defaults.mode&&a!="null"&&(Vt.defaults.mode=a),Sf.apply(this,arguments)},Vt.defineMIME=Pi,Vt.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Vt.defineMIME("text/plain","null"),Vt.defineExtension=function(a,u){Vt.prototype[a]=u},Vt.defineDocExtension=function(a,u){Wr.prototype[a]=u},Vt.fromTextArea=q8,z8(Vt),Vt.version="5.65.3",Vt})}(D4)),D4.exports}P(Cr,"requireCodemirror");var Xle=Object.defineProperty,Zle=(e,t)=>Xle(e,"name",{value:t,configurable:!0});function L4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Zle(L4,"_mergeNamespaces");var R4=Cr();const nt=qr(R4),ece=Object.freeze(Object.defineProperty({__proto__:null,C:nt,c:L4({__proto__:null,default:nt},[R4])},Symbol.toStringTag,{value:"Module"}));var tce=Object.defineProperty,ro=(e,t)=>tce(e,"name",{value:t,configurable:!0});function F4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}ro(F4,"_mergeNamespaces");var nce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){var r="CodeMirror-hint",o="CodeMirror-hint-active";n.showHint=function(S,x,C){if(!x)return S.showHint(C);C&&C.async&&(x.async=!0);var E={hint:x};if(C)for(var _ in C)E[_]=C[_];return S.showHint(E)},n.defineExtension("showHint",function(S){S=c(this,this.getCursor("start"),S);var x=this.listSelections();if(!(x.length>1)){if(this.somethingSelected()){if(!S.hint.supportsSelection)return;for(var C=0;C<x.length;C++)if(x[C].head.line!=x[C].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var E=this.state.completionActive=new i(this,S);E.options.hint&&(n.signal(this,"startCompletion",this),E.update(!0))}}),n.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function i(S,x){if(this.cm=S,this.options=x,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var C=this;S.on("cursorActivity",this.activityFunc=function(){C.cursorActivity()})}}ro(i,"Completion");var s=window.requestAnimationFrame||function(S){return setTimeout(S,1e3/60)},l=window.cancelAnimationFrame||clearTimeout;i.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&n.signal(this.data,"close"),this.widget&&this.widget.close(),n.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(S,x){var C=S.list[x],E=this;this.cm.operation(function(){C.hint?C.hint(E.cm,S,C):E.cm.replaceRange(f(C),C.from||S.from,C.to||S.to,"complete"),n.signal(S,"pick",C),E.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(l(this.debounce),this.debounce=0);var S=this.startPos;this.data&&(S=this.data.from);var x=this.cm.getCursor(),C=this.cm.getLine(x.line);if(x.line!=this.startPos.line||C.length-x.ch!=this.startLen-this.startPos.ch||x.ch<S.ch||this.cm.somethingSelected()||!x.ch||this.options.closeCharacters.test(C.charAt(x.ch-1)))this.close();else{var E=this;this.debounce=s(function(){E.update()}),this.widget&&this.widget.disable()}},update:function(S){if(this.tick!=null){var x=this,C=++this.tick;b(this.options.hint,this.cm,this.options,function(E){x.tick==C&&x.finishUpdate(E,S)})}},finishUpdate:function(S,x){this.data&&n.signal(this.data,"update");var C=this.widget&&this.widget.picked||x&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=S,S&&S.list.length&&(C&&S.list.length==1?this.pick(S,0):(this.widget=new m(this,S),n.signal(S,"shown")))}};function c(S,x,C){var E=S.options.hintOptions,_={};for(var I in N)_[I]=N[I];if(E)for(var I in E)E[I]!==void 0&&(_[I]=E[I]);if(C)for(var I in C)C[I]!==void 0&&(_[I]=C[I]);return _.hint.resolve&&(_.hint=_.hint.resolve(S,x)),_}ro(c,"parseOptions");function f(S){return typeof S=="string"?S:S.text}ro(f,"getText");function d(S,x){var C={Up:function(){x.moveFocus(-1)},Down:function(){x.moveFocus(1)},PageUp:function(){x.moveFocus(-x.menuSize()+1,!0)},PageDown:function(){x.moveFocus(x.menuSize()-1,!0)},Home:function(){x.setFocus(0)},End:function(){x.setFocus(x.length-1)},Enter:x.pick,Tab:x.pick,Esc:x.close},E=/Mac/.test(navigator.platform);E&&(C["Ctrl-P"]=function(){x.moveFocus(-1)},C["Ctrl-N"]=function(){x.moveFocus(1)});var _=S.options.customKeys,I=_?{}:C;function D($,q){var H;typeof q!="string"?H=ro(function(z){return q(z,x)},"bound"):C.hasOwnProperty(q)?H=C[q]:H=q,I[$]=H}if(ro(D,"addBinding"),_)for(var A in _)_.hasOwnProperty(A)&&D(A,_[A]);var F=S.options.extraKeys;if(F)for(var A in F)F.hasOwnProperty(A)&&D(A,F[A]);return I}ro(d,"buildKeyMap");function g(S,x){for(;x&&x!=S;){if(x.nodeName.toUpperCase()==="LI"&&x.parentNode==S)return x;x=x.parentNode}}ro(g,"getHintElement");function m(S,x){this.id="cm-complete-"+Math.floor(Math.random(1e6)),this.completion=S,this.data=x,this.picked=!1;var C=this,E=S.cm,_=E.getInputField().ownerDocument,I=_.defaultView||_.parentWindow,D=this.hints=_.createElement("ul");D.setAttribute("role","listbox"),D.setAttribute("aria-expanded","true"),D.id=this.id;var A=S.cm.options.theme;D.className="CodeMirror-hints "+A,this.selectedHint=x.selectedHint||0;for(var F=x.list,$=0;$<F.length;++$){var q=D.appendChild(_.createElement("li")),H=F[$],z=r+($!=this.selectedHint?"":" "+o);H.className!=null&&(z=H.className+" "+z),q.className=z,$==this.selectedHint&&q.setAttribute("aria-selected","true"),q.id=this.id+"-"+$,q.setAttribute("role","option"),H.render?H.render(q,x,H):q.appendChild(_.createTextNode(H.displayText||f(H))),q.hintId=$}var B=S.options.container||_.body,R=E.cursorCoords(S.options.alignWithWord?x.from:null),te=R.left,Y=R.bottom,Q=!0,K=0,Z=0;if(B!==_.body){var re=["absolute","relative","fixed"].indexOf(I.getComputedStyle(B).position)!==-1,J=re?B:B.offsetParent,ie=J.getBoundingClientRect(),ne=_.body.getBoundingClientRect();K=ie.left-ne.left-J.scrollLeft,Z=ie.top-ne.top-J.scrollTop}D.style.left=te-K+"px",D.style.top=Y-Z+"px";var ae=I.innerWidth||Math.max(_.body.offsetWidth,_.documentElement.offsetWidth),le=I.innerHeight||Math.max(_.body.offsetHeight,_.documentElement.offsetHeight);B.appendChild(D),E.getInputField().setAttribute("aria-autocomplete","list"),E.getInputField().setAttribute("aria-owns",this.id),E.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);var de=S.options.moveOnOverlap?D.getBoundingClientRect():new DOMRect,xe=S.options.paddingForScrollbar?D.scrollHeight>D.clientHeight+1:!1,ve;setTimeout(function(){ve=E.getScrollInfo()});var qe=de.bottom-le;if(qe>0){var Ie=de.bottom-de.top,Oe=R.top-(R.bottom-de.top);if(Oe-Ie>0)D.style.top=(Y=R.top-Ie-Z)+"px",Q=!1;else if(Ie>le){D.style.height=le-5+"px",D.style.top=(Y=R.bottom-de.top-Z)+"px";var it=E.getCursor();x.from.ch!=it.ch&&(R=E.cursorCoords(it),D.style.left=(te=R.left-K)+"px",de=D.getBoundingClientRect())}}var Ot=de.right-ae;if(xe&&(Ot+=E.display.nativeBarWidth),Ot>0&&(de.right-de.left>ae&&(D.style.width=ae-5+"px",Ot-=de.right-de.left-ae),D.style.left=(te=R.left-Ot-K)+"px"),xe)for(var je=D.firstChild;je;je=je.nextSibling)je.style.paddingRight=E.display.nativeBarWidth+"px";if(E.addKeyMap(this.keyMap=d(S,{moveFocus:function($t,xn){C.changeActive(C.selectedHint+$t,xn)},setFocus:function($t){C.changeActive($t)},menuSize:function(){return C.screenAmount()},length:F.length,close:function(){S.close()},pick:function(){C.pick()},data:x})),S.options.closeOnUnfocus){var Dt;E.on("blur",this.onBlur=function(){Dt=setTimeout(function(){S.close()},100)}),E.on("focus",this.onFocus=function(){clearTimeout(Dt)})}E.on("scroll",this.onScroll=function(){var $t=E.getScrollInfo(),xn=E.getWrapperElement().getBoundingClientRect();ve||(ve=E.getScrollInfo());var os=Y+ve.top-$t.top,fr=os-(I.pageYOffset||(_.documentElement||_.body).scrollTop);if(Q||(fr+=D.offsetHeight),fr<=xn.top||fr>=xn.bottom)return S.close();D.style.top=os+"px",D.style.left=te+ve.left-$t.left+"px"}),n.on(D,"dblclick",function($t){var xn=g(D,$t.target||$t.srcElement);xn&&xn.hintId!=null&&(C.changeActive(xn.hintId),C.pick())}),n.on(D,"click",function($t){var xn=g(D,$t.target||$t.srcElement);xn&&xn.hintId!=null&&(C.changeActive(xn.hintId),S.options.completeOnSingleClick&&C.pick())}),n.on(D,"mousedown",function(){setTimeout(function(){E.focus()},20)});var Nr=this.getSelectedHintRange();return(Nr.from!==0||Nr.to!==0)&&this.scrollToActive(),n.signal(x,"select",F[this.selectedHint],D.childNodes[this.selectedHint]),!0}ro(m,"Widget"),m.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var S=this.completion.cm.getInputField();S.removeAttribute("aria-activedescendant"),S.removeAttribute("aria-owns");var x=this.completion.cm;this.completion.options.closeOnUnfocus&&(x.off("blur",this.onBlur),x.off("focus",this.onFocus)),x.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var S=this;this.keyMap={Enter:function(){S.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(S,x){if(S>=this.data.list.length?S=x?this.data.list.length-1:0:S<0&&(S=x?0:this.data.list.length-1),this.selectedHint!=S){var C=this.hints.childNodes[this.selectedHint];C&&(C.className=C.className.replace(" "+o,""),C.removeAttribute("aria-selected")),C=this.hints.childNodes[this.selectedHint=S],C.className+=" "+o,C.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",C.id),this.scrollToActive(),n.signal(this.data,"select",this.data.list[this.selectedHint],C)}},scrollToActive:function(){var S=this.getSelectedHintRange(),x=this.hints.childNodes[S.from],C=this.hints.childNodes[S.to],E=this.hints.firstChild;x.offsetTop<this.hints.scrollTop?this.hints.scrollTop=x.offsetTop-E.offsetTop:C.offsetTop+C.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=C.offsetTop+C.offsetHeight-this.hints.clientHeight+E.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var S=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-S),to:Math.min(this.data.list.length-1,this.selectedHint+S)}}};function v(S,x){if(!S.somethingSelected())return x;for(var C=[],E=0;E<x.length;E++)x[E].supportsSelection&&C.push(x[E]);return C}ro(v,"applicableHelpers");function b(S,x,C,E){if(S.async)S(x,E,C);else{var _=S(x,C);_&&_.then?_.then(E):E(_)}}ro(b,"fetchHints");function w(S,x){var C=S.getHelpers(x,"hint"),E;if(C.length){var _=ro(function(I,D,A){var F=v(I,C);function $(q){if(q==F.length)return D(null);b(F[q],I,A,function(H){H&&H.list.length>0?D(H):$(q+1)})}ro($,"run"),$(0)},"resolved");return _.async=!0,_.supportsSelection=!0,_}else return(E=S.getHelper(S.getCursor(),"hintWords"))?function(I){return n.hint.fromList(I,{words:E})}:n.hint.anyword?function(I,D){return n.hint.anyword(I,D)}:function(){}}ro(w,"resolveAutoHints"),n.registerHelper("hint","auto",{resolve:w}),n.registerHelper("hint","fromList",function(S,x){var C=S.getCursor(),E=S.getTokenAt(C),_,I=n.Pos(C.line,E.start),D=C;E.start<C.ch&&/\w/.test(E.string.charAt(C.ch-E.start-1))?_=E.string.substr(0,C.ch-E.start):(_="",I=C);for(var A=[],F=0;F<x.words.length;F++){var $=x.words[F];$.slice(0,_.length)==_&&A.push($)}if(A.length)return{list:A,from:I,to:D}}),n.commands.autocomplete=n.showHint;var N={hint:n.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};n.defineOption("hintOptions",null)})})();var M4=nce.exports;const rce=Object.freeze(Object.defineProperty({__proto__:null,s:F4({__proto__:null,default:qr(M4)},[M4])},Symbol.toStringTag,{value:"Module"}));var oce=Object.defineProperty,el=(e,t)=>oce(e,"name",{value:t,configurable:!0}),ice={exports:{}},P4;function TC(){return P4||(P4=1,function(e,t){(function(n){n(Cr())})(function(n){var r=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),o=n.Pos,i={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function s(m){return m&&m.bracketRegex||/[(){}[\]]/}el(s,"bracketRegex");function l(m,v,b){var w=m.getLineHandle(v.line),N=v.ch-1,S=b&&b.afterCursor;S==null&&(S=/(^| )cm-fat-cursor($| )/.test(m.getWrapperElement().className));var x=s(b),C=!S&&N>=0&&x.test(w.text.charAt(N))&&i[w.text.charAt(N)]||x.test(w.text.charAt(N+1))&&i[w.text.charAt(++N)];if(!C)return null;var E=C.charAt(1)==">"?1:-1;if(b&&b.strict&&E>0!=(N==v.ch))return null;var _=m.getTokenTypeAt(o(v.line,N+1)),I=c(m,o(v.line,N+(E>0?1:0)),E,_,b);return I==null?null:{from:o(v.line,N),to:I&&I.pos,match:I&&I.ch==C.charAt(0),forward:E>0}}el(l,"findMatchingBracket");function c(m,v,b,w,N){for(var S=N&&N.maxScanLineLength||1e4,x=N&&N.maxScanLines||1e3,C=[],E=s(N),_=b>0?Math.min(v.line+x,m.lastLine()+1):Math.max(m.firstLine()-1,v.line-x),I=v.line;I!=_;I+=b){var D=m.getLine(I);if(D){var A=b>0?0:D.length-1,F=b>0?D.length:-1;if(!(D.length>S))for(I==v.line&&(A=v.ch-(b<0?1:0));A!=F;A+=b){var $=D.charAt(A);if(E.test($)&&(w===void 0||(m.getTokenTypeAt(o(I,A+1))||"")==(w||""))){var q=i[$];if(q&&q.charAt(1)==">"==b>0)C.push($);else if(C.length)C.pop();else return{pos:o(I,A),ch:$}}}}}return I-b==(b>0?m.lastLine():m.firstLine())?!1:null}el(c,"scanForBracket");function f(m,v,b){for(var w=m.state.matchBrackets.maxHighlightLineLength||1e3,N=b&&b.highlightNonMatching,S=[],x=m.listSelections(),C=0;C<x.length;C++){var E=x[C].empty()&&l(m,x[C].head,b);if(E&&(E.match||N!==!1)&&m.getLine(E.from.line).length<=w){var _=E.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";S.push(m.markText(E.from,o(E.from.line,E.from.ch+1),{className:_})),E.to&&m.getLine(E.to.line).length<=w&&S.push(m.markText(E.to,o(E.to.line,E.to.ch+1),{className:_}))}}if(S.length){r&&m.state.focused&&m.focus();var I=el(function(){m.operation(function(){for(var D=0;D<S.length;D++)S[D].clear()})},"clear");if(v)setTimeout(I,800);else return I}}el(f,"matchBrackets");function d(m){m.operation(function(){m.state.matchBrackets.currentlyHighlighted&&(m.state.matchBrackets.currentlyHighlighted(),m.state.matchBrackets.currentlyHighlighted=null),m.state.matchBrackets.currentlyHighlighted=f(m,!1,m.state.matchBrackets)})}el(d,"doMatchBrackets");function g(m){m.state.matchBrackets&&m.state.matchBrackets.currentlyHighlighted&&(m.state.matchBrackets.currentlyHighlighted(),m.state.matchBrackets.currentlyHighlighted=null)}el(g,"clearHighlighted"),n.defineOption("matchBrackets",!1,function(m,v,b){b&&b!=n.Init&&(m.off("cursorActivity",d),m.off("focus",d),m.off("blur",g),g(m)),v&&(m.state.matchBrackets=typeof v=="object"?v:{},m.on("cursorActivity",d),m.on("focus",d),m.on("blur",g))}),n.defineExtension("matchBrackets",function(){f(this,!0)}),n.defineExtension("findMatchingBracket",function(m,v,b){return(b||typeof v=="boolean")&&(b?(b.strict=v,v=b):v=v?{strict:!0}:null),l(this,m,v)}),n.defineExtension("scanForBracket",function(m,v,b,w){return c(this,m,v,b,w)})})}()),ice.exports}el(TC,"requireMatchbrackets");var sce=Object.defineProperty,ace=(e,t)=>sce(e,"name",{value:t,configurable:!0});function $4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}ace($4,"_mergeNamespaces");var V4=TC();const lce=Object.freeze(Object.defineProperty({__proto__:null,m:$4({__proto__:null,default:qr(V4)},[V4])},Symbol.toStringTag,{value:"Module"}));var cce=Object.defineProperty,Zo=(e,t)=>cce(e,"name",{value:t,configurable:!0});function j4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Zo(j4,"_mergeNamespaces");var uce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){var r={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},o=n.Pos;n.defineOption("autoCloseBrackets",!1,function(S,x,C){C&&C!=n.Init&&(S.removeKeyMap(s),S.state.closeBrackets=null),x&&(l(i(x,"pairs")),S.state.closeBrackets=x,S.addKeyMap(s))});function i(S,x){return x=="pairs"&&typeof S=="string"?S:typeof S=="object"&&S[x]!=null?S[x]:r[x]}Zo(i,"getOption");var s={Backspace:d,Enter:g};function l(S){for(var x=0;x<S.length;x++){var C=S.charAt(x),E="'"+C+"'";s[E]||(s[E]=c(C))}}Zo(l,"ensureBound"),l(r.pairs+"`");function c(S){return function(x){return b(x,S)}}Zo(c,"handler");function f(S){var x=S.state.closeBrackets;if(!x||x.override)return x;var C=S.getModeAt(S.getCursor());return C.closeBrackets||x}Zo(f,"getConfig");function d(S){var x=f(S);if(!x||S.getOption("disableInput"))return n.Pass;for(var C=i(x,"pairs"),E=S.listSelections(),_=0;_<E.length;_++){if(!E[_].empty())return n.Pass;var I=w(S,E[_].head);if(!I||C.indexOf(I)%2!=0)return n.Pass}for(var _=E.length-1;_>=0;_--){var D=E[_].head;S.replaceRange("",o(D.line,D.ch-1),o(D.line,D.ch+1),"+delete")}}Zo(d,"handleBackspace");function g(S){var x=f(S),C=x&&i(x,"explode");if(!C||S.getOption("disableInput"))return n.Pass;for(var E=S.listSelections(),_=0;_<E.length;_++){if(!E[_].empty())return n.Pass;var I=w(S,E[_].head);if(!I||C.indexOf(I)%2!=0)return n.Pass}S.operation(function(){var D=S.lineSeparator()||`
`;S.replaceSelection(D+D,null),m(S,-1),E=S.listSelections();for(var A=0;A<E.length;A++){var F=E[A].head.line;S.indentLine(F,null,!0),S.indentLine(F+1,null,!0)}})}Zo(g,"handleEnter");function m(S,x){for(var C=[],E=S.listSelections(),_=0,I=0;I<E.length;I++){var D=E[I];D.head==S.getCursor()&&(_=I);var A=D.head.ch||x>0?{line:D.head.line,ch:D.head.ch+x}:{line:D.head.line-1};C.push({anchor:A,head:A})}S.setSelections(C,_)}Zo(m,"moveSel");function v(S){var x=n.cmpPos(S.anchor,S.head)>0;return{anchor:new o(S.anchor.line,S.anchor.ch+(x?-1:1)),head:new o(S.head.line,S.head.ch+(x?1:-1))}}Zo(v,"contractSelection");function b(S,x){var C=f(S);if(!C||S.getOption("disableInput"))return n.Pass;var E=i(C,"pairs"),_=E.indexOf(x);if(_==-1)return n.Pass;for(var I=i(C,"closeBefore"),D=i(C,"triples"),A=E.charAt(_+1)==x,F=S.listSelections(),$=_%2==0,q,H=0;H<F.length;H++){var z=F[H],B=z.head,R,te=S.getRange(B,o(B.line,B.ch+1));if($&&!z.empty())R="surround";else if((A||!$)&&te==x)A&&N(S,B)?R="both":D.indexOf(x)>=0&&S.getRange(B,o(B.line,B.ch+3))==x+x+x?R="skipThree":R="skip";else if(A&&B.ch>1&&D.indexOf(x)>=0&&S.getRange(o(B.line,B.ch-2),B)==x+x){if(B.ch>2&&/\bstring/.test(S.getTokenTypeAt(o(B.line,B.ch-2))))return n.Pass;R="addFour"}else if(A){var Y=B.ch==0?" ":S.getRange(o(B.line,B.ch-1),B);if(!n.isWordChar(te)&&Y!=x&&!n.isWordChar(Y))R="both";else return n.Pass}else if($&&(te.length===0||/\s/.test(te)||I.indexOf(te)>-1))R="both";else return n.Pass;if(!q)q=R;else if(q!=R)return n.Pass}var Q=_%2?E.charAt(_-1):x,K=_%2?x:E.charAt(_+1);S.operation(function(){if(q=="skip")m(S,1);else if(q=="skipThree")m(S,3);else if(q=="surround"){for(var Z=S.getSelections(),re=0;re<Z.length;re++)Z[re]=Q+Z[re]+K;S.replaceSelections(Z,"around"),Z=S.listSelections().slice();for(var re=0;re<Z.length;re++)Z[re]=v(Z[re]);S.setSelections(Z)}else q=="both"?(S.replaceSelection(Q+K,null),S.triggerElectric(Q+K),m(S,-1)):q=="addFour"&&(S.replaceSelection(Q+Q+Q+Q,"before"),m(S,1))})}Zo(b,"handleChar");function w(S,x){var C=S.getRange(o(x.line,x.ch-1),o(x.line,x.ch+1));return C.length==2?C:null}Zo(w,"charsAround");function N(S,x){var C=S.getTokenAt(o(x.line,x.ch+1));return/\bstring/.test(C.type)&&C.start==x.ch&&(x.ch==0||!/\bstring/.test(S.getTokenTypeAt(x)))}Zo(N,"stringStartsAfter")})})();var U4=uce.exports;const fce=Object.freeze(Object.defineProperty({__proto__:null,c:j4({__proto__:null,default:qr(U4)},[U4])},Symbol.toStringTag,{value:"Module"}));var dce=Object.defineProperty,ff=(e,t)=>dce(e,"name",{value:t,configurable:!0});function B4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}ff(B4,"_mergeNamespaces");var pce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){function r(o){return function(i,s){var l=s.line,c=i.getLine(l);function f(w){for(var N,S=s.ch,x=0;;){var C=S<=0?-1:c.lastIndexOf(w[0],S-1);if(C==-1){if(x==1)break;x=1,S=c.length;continue}if(x==1&&C<s.ch)break;if(N=i.getTokenTypeAt(n.Pos(l,C+1)),!/^(comment|string)/.test(N))return{ch:C+1,tokenType:N,pair:w};S=C-1}}ff(f,"findOpening");function d(w){var N=1,S=i.lastLine(),x,C=w.ch,E;e:for(var _=l;_<=S;++_)for(var I=i.getLine(_),D=_==l?C:0;;){var A=I.indexOf(w.pair[0],D),F=I.indexOf(w.pair[1],D);if(A<0&&(A=I.length),F<0&&(F=I.length),D=Math.min(A,F),D==I.length)break;if(i.getTokenTypeAt(n.Pos(_,D+1))==w.tokenType){if(D==A)++N;else if(!--N){x=_,E=D;break e}}++D}return x==null||l==x?null:{from:n.Pos(l,C),to:n.Pos(x,E)}}ff(d,"findRange");for(var g=[],m=0;m<o.length;m++){var v=f(o[m]);v&&g.push(v)}g.sort(function(w,N){return w.ch-N.ch});for(var m=0;m<g.length;m++){var b=d(g[m]);if(b)return b}return null}}ff(r,"bracketFolding"),n.registerHelper("fold","brace",r([["{","}"],["[","]"]])),n.registerHelper("fold","brace-paren",r([["{","}"],["[","]"],["(",")"]])),n.registerHelper("fold","import",function(o,i){function s(m){if(m<o.firstLine()||m>o.lastLine())return null;var v=o.getTokenAt(n.Pos(m,1));if(/\S/.test(v.string)||(v=o.getTokenAt(n.Pos(m,v.end+1))),v.type!="keyword"||v.string!="import")return null;for(var b=m,w=Math.min(o.lastLine(),m+10);b<=w;++b){var N=o.getLine(b),S=N.indexOf(";");if(S!=-1)return{startCh:v.end,end:n.Pos(b,S)}}}ff(s,"hasImport");var l=i.line,c=s(l),f;if(!c||s(l-1)||(f=s(l-2))&&f.end.line==l-1)return null;for(var d=c.end;;){var g=s(d.line+1);if(g==null)break;d=g.end}return{from:o.clipPos(n.Pos(l,c.startCh+1)),to:d}}),n.registerHelper("fold","include",function(o,i){function s(g){if(g<o.firstLine()||g>o.lastLine())return null;var m=o.getTokenAt(n.Pos(g,1));if(/\S/.test(m.string)||(m=o.getTokenAt(n.Pos(g,m.end+1))),m.type=="meta"&&m.string.slice(0,8)=="#include")return m.start+8}ff(s,"hasInclude");var l=i.line,c=s(l);if(c==null||s(l-1)!=null)return null;for(var f=l;;){var d=s(f+1);if(d==null)break;++f}return{from:n.Pos(l,c+1),to:o.clipPos(n.Pos(f))}})})})();var q4=pce.exports;const z4=Object.freeze(Object.defineProperty({__proto__:null,b:B4({__proto__:null,default:qr(q4)},[q4])},Symbol.toStringTag,{value:"Module"}));var hce=Object.defineProperty,cr=(e,t)=>hce(e,"name",{value:t,configurable:!0});function H4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}cr(H4,"_mergeNamespaces");var mce={exports:{}},gce={exports:{}},W4;function G4(){return W4||(W4=1,function(e,t){(function(n){n(Cr())})(function(n){function r(l,c,f,d){if(f&&f.call){var g=f;f=null}else var g=s(l,f,"rangeFinder");typeof c=="number"&&(c=n.Pos(c,0));var m=s(l,f,"minFoldSize");function v(S){var x=g(l,c);if(!x||x.to.line-x.from.line<m)return null;if(d==="fold")return x;for(var C=l.findMarksAt(x.from),E=0;E<C.length;++E)if(C[E].__isFold){if(!S)return null;x.cleared=!0,C[E].clear()}return x}cr(v,"getRange");var b=v(!0);if(s(l,f,"scanUp"))for(;!b&&c.line>l.firstLine();)c=n.Pos(c.line-1,0),b=v(!1);if(!(!b||b.cleared||d==="unfold")){var w=o(l,f,b);n.on(w,"mousedown",function(S){N.clear(),n.e_preventDefault(S)});var N=l.markText(b.from,b.to,{replacedWith:w,clearOnEnter:s(l,f,"clearOnEnter"),__isFold:!0});N.on("clear",function(S,x){n.signal(l,"unfold",l,S,x)}),n.signal(l,"fold",l,b.from,b.to)}}cr(r,"doFold");function o(l,c,f){var d=s(l,c,"widget");if(typeof d=="function"&&(d=d(f.from,f.to)),typeof d=="string"){var g=document.createTextNode(d);d=document.createElement("span"),d.appendChild(g),d.className="CodeMirror-foldmarker"}else d&&(d=d.cloneNode(!0));return d}cr(o,"makeWidget"),n.newFoldFunction=function(l,c){return function(f,d){r(f,d,{rangeFinder:l,widget:c})}},n.defineExtension("foldCode",function(l,c,f){r(this,l,c,f)}),n.defineExtension("isFolded",function(l){for(var c=this.findMarksAt(l),f=0;f<c.length;++f)if(c[f].__isFold)return!0}),n.commands.toggleFold=function(l){l.foldCode(l.getCursor())},n.commands.fold=function(l){l.foldCode(l.getCursor(),null,"fold")},n.commands.unfold=function(l){l.foldCode(l.getCursor(),{scanUp:!1},"unfold")},n.commands.foldAll=function(l){l.operation(function(){for(var c=l.firstLine(),f=l.lastLine();c<=f;c++)l.foldCode(n.Pos(c,0),{scanUp:!1},"fold")})},n.commands.unfoldAll=function(l){l.operation(function(){for(var c=l.firstLine(),f=l.lastLine();c<=f;c++)l.foldCode(n.Pos(c,0),{scanUp:!1},"unfold")})},n.registerHelper("fold","combine",function(){var l=Array.prototype.slice.call(arguments,0);return function(c,f){for(var d=0;d<l.length;++d){var g=l[d](c,f);if(g)return g}}}),n.registerHelper("fold","auto",function(l,c){for(var f=l.getHelpers(c,"fold"),d=0;d<f.length;d++){var g=f[d](l,c);if(g)return g}});var i={rangeFinder:n.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};n.defineOption("foldOptions",null);function s(l,c,f){if(c&&c[f]!==void 0)return c[f];var d=l.options.foldOptions;return d&&d[f]!==void 0?d[f]:i[f]}cr(s,"getOption"),n.defineExtension("foldOption",function(l,c){return s(this,l,c)})})}()),gce.exports}cr(G4,"requireFoldcode"),function(e,t){(function(n){n(Cr(),G4())})(function(n){n.defineOption("foldGutter",!1,function(w,N,S){S&&S!=n.Init&&(w.clearGutter(w.state.foldGutter.options.gutter),w.state.foldGutter=null,w.off("gutterClick",g),w.off("changes",m),w.off("viewportChange",v),w.off("fold",b),w.off("unfold",b),w.off("swapDoc",m)),N&&(w.state.foldGutter=new o(i(N)),d(w),w.on("gutterClick",g),w.on("changes",m),w.on("viewportChange",v),w.on("fold",b),w.on("unfold",b),w.on("swapDoc",m))});var r=n.Pos;function o(w){this.options=w,this.from=this.to=0}cr(o,"State");function i(w){return w===!0&&(w={}),w.gutter==null&&(w.gutter="CodeMirror-foldgutter"),w.indicatorOpen==null&&(w.indicatorOpen="CodeMirror-foldgutter-open"),w.indicatorFolded==null&&(w.indicatorFolded="CodeMirror-foldgutter-folded"),w}cr(i,"parseOptions");function s(w,N){for(var S=w.findMarks(r(N,0),r(N+1,0)),x=0;x<S.length;++x)if(S[x].__isFold){var C=S[x].find(-1);if(C&&C.line===N)return S[x]}}cr(s,"isFolded");function l(w){if(typeof w=="string"){var N=document.createElement("div");return N.className=w+" CodeMirror-guttermarker-subtle",N}else return w.cloneNode(!0)}cr(l,"marker");function c(w,N,S){var x=w.state.foldGutter.options,C=N-1,E=w.foldOption(x,"minFoldSize"),_=w.foldOption(x,"rangeFinder"),I=typeof x.indicatorFolded=="string"&&f(x.indicatorFolded),D=typeof x.indicatorOpen=="string"&&f(x.indicatorOpen);w.eachLine(N,S,function(A){++C;var F=null,$=A.gutterMarkers;if($&&($=$[x.gutter]),s(w,C)){if(I&&$&&I.test($.className))return;F=l(x.indicatorFolded)}else{var q=r(C,0),H=_&&_(w,q);if(H&&H.to.line-H.from.line>=E){if(D&&$&&D.test($.className))return;F=l(x.indicatorOpen)}}!F&&!$||w.setGutterMarker(A,x.gutter,F)})}cr(c,"updateFoldInfo");function f(w){return new RegExp("(^|\\s)"+w+"(?:$|\\s)\\s*")}cr(f,"classTest");function d(w){var N=w.getViewport(),S=w.state.foldGutter;S&&(w.operation(function(){c(w,N.from,N.to)}),S.from=N.from,S.to=N.to)}cr(d,"updateInViewport");function g(w,N,S){var x=w.state.foldGutter;if(x){var C=x.options;if(S==C.gutter){var E=s(w,N);E?E.clear():w.foldCode(r(N,0),C)}}}cr(g,"onGutterClick");function m(w){var N=w.state.foldGutter;if(N){var S=N.options;N.from=N.to=0,clearTimeout(N.changeUpdate),N.changeUpdate=setTimeout(function(){d(w)},S.foldOnChangeTimeSpan||600)}}cr(m,"onChange");function v(w){var N=w.state.foldGutter;if(N){var S=N.options;clearTimeout(N.changeUpdate),N.changeUpdate=setTimeout(function(){var x=w.getViewport();N.from==N.to||x.from-N.to>20||N.from-x.to>20?d(w):w.operation(function(){x.from<N.from&&(c(w,x.from,N.from),N.from=x.from),x.to>N.to&&(c(w,N.to,x.to),N.to=x.to)})},S.updateViewportTimeSpan||400)}}cr(v,"onViewportChange");function b(w,N){var S=w.state.foldGutter;if(S){var x=N.line;x>=S.from&&x<S.to&&c(w,x,x+1)}}cr(b,"onFold")})}();var Y4=mce.exports;const Q4=Object.freeze(Object.defineProperty({__proto__:null,f:H4({__proto__:null,default:qr(Y4)},[Y4])},Symbol.toStringTag,{value:"Module"}));var vce=Object.defineProperty,En=(e,t)=>vce(e,"name",{value:t,configurable:!0});function K4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}En(K4,"_mergeNamespaces");var yce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){var r="CodeMirror-lint-markers",o="CodeMirror-lint-line-";function i(D,A,F){var $=document.createElement("div");$.className="CodeMirror-lint-tooltip cm-s-"+D.options.theme,$.appendChild(F.cloneNode(!0)),D.state.lint.options.selfContain?D.getWrapperElement().appendChild($):document.body.appendChild($);function q(H){if(!$.parentNode)return n.off(document,"mousemove",q);$.style.top=Math.max(0,H.clientY-$.offsetHeight-5)+"px",$.style.left=H.clientX+5+"px"}return En(q,"position"),n.on(document,"mousemove",q),q(A),$.style.opacity!=null&&($.style.opacity=1),$}En(i,"showTooltip");function s(D){D.parentNode&&D.parentNode.removeChild(D)}En(s,"rm");function l(D){D.parentNode&&(D.style.opacity==null&&s(D),D.style.opacity=0,setTimeout(function(){s(D)},600))}En(l,"hideTooltip");function c(D,A,F,$){var q=i(D,A,F);function H(){n.off($,"mouseout",H),q&&(l(q),q=null)}En(H,"hide");var z=setInterval(function(){if(q)for(var B=$;;B=B.parentNode){if(B&&B.nodeType==11&&(B=B.host),B==document.body)return;if(!B){H();break}}if(!q)return clearInterval(z)},400);n.on($,"mouseout",H)}En(c,"showTooltipFor");function f(D,A,F){this.marked=[],A instanceof Function&&(A={getAnnotations:A}),(!A||A===!0)&&(A={}),this.options={},this.linterOptions=A.options||{};for(var $ in d)this.options[$]=d[$];for(var $ in A)d.hasOwnProperty($)?A[$]!=null&&(this.options[$]=A[$]):A.options||(this.linterOptions[$]=A[$]);this.timeout=null,this.hasGutter=F,this.onMouseOver=function(q){I(D,q)},this.waitingFor=0}En(f,"LintState");var d={highlightLines:!1,tooltips:!0,delay:500,lintOnChange:!0,getAnnotations:null,async:!1,selfContain:null,formatAnnotation:null,onUpdateLinting:null};function g(D){var A=D.state.lint;A.hasGutter&&D.clearGutter(r),A.options.highlightLines&&m(D);for(var F=0;F<A.marked.length;++F)A.marked[F].clear();A.marked.length=0}En(g,"clearMarks");function m(D){D.eachLine(function(A){var F=A.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(A.wrapClass);F&&D.removeLineClass(A,"wrap",F[0])})}En(m,"clearErrorLines");function v(D,A,F,$,q){var H=document.createElement("div"),z=H;return H.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+F,$&&(z=H.appendChild(document.createElement("div")),z.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),q!=!1&&n.on(z,"mouseover",function(B){c(D,B,A,z)}),H}En(v,"makeMarker");function b(D,A){return D=="error"?D:A}En(b,"getMaxSeverity");function w(D){for(var A=[],F=0;F<D.length;++F){var $=D[F],q=$.from.line;(A[q]||(A[q]=[])).push($)}return A}En(w,"groupByLine");function N(D){var A=D.severity;A||(A="error");var F=document.createElement("div");return F.className="CodeMirror-lint-message CodeMirror-lint-message-"+A,typeof D.messageHTML<"u"?F.innerHTML=D.messageHTML:F.appendChild(document.createTextNode(D.message)),F}En(N,"annotationTooltip");function S(D,A){var F=D.state.lint,$=++F.waitingFor;function q(){$=-1,D.off("change",q)}En(q,"abort"),D.on("change",q),A(D.getValue(),function(H,z){D.off("change",q),F.waitingFor==$&&(z&&H instanceof n&&(H=z),D.operation(function(){C(D,H)}))},F.linterOptions,D)}En(S,"lintAsync");function x(D){var A=D.state.lint;if(A){var F=A.options,$=F.getAnnotations||D.getHelper(n.Pos(0,0),"lint");if($)if(F.async||$.async)S(D,$);else{var q=$(D.getValue(),A.linterOptions,D);if(!q)return;q.then?q.then(function(H){D.operation(function(){C(D,H)})}):D.operation(function(){C(D,q)})}}}En(x,"startLinting");function C(D,A){var F=D.state.lint;if(F){var $=F.options;g(D);for(var q=w(A),H=0;H<q.length;++H){var z=q[H];if(z){var B=[];z=z.filter(function(Z){return B.indexOf(Z.message)>-1?!1:B.push(Z.message)});for(var R=null,te=F.hasGutter&&document.createDocumentFragment(),Y=0;Y<z.length;++Y){var Q=z[Y],K=Q.severity;K||(K="error"),R=b(R,K),$.formatAnnotation&&(Q=$.formatAnnotation(Q)),F.hasGutter&&te.appendChild(N(Q)),Q.to&&F.marked.push(D.markText(Q.from,Q.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+K,__annotation:Q}))}F.hasGutter&&D.setGutterMarker(H,r,v(D,te,R,q[H].length>1,$.tooltips)),$.highlightLines&&D.addLineClass(H,"wrap",o+R)}}$.onUpdateLinting&&$.onUpdateLinting(A,q,D)}}En(C,"updateLinting");function E(D){var A=D.state.lint;A&&(clearTimeout(A.timeout),A.timeout=setTimeout(function(){x(D)},A.options.delay))}En(E,"onChange");function _(D,A,F){for(var $=F.target||F.srcElement,q=document.createDocumentFragment(),H=0;H<A.length;H++){var z=A[H];q.appendChild(N(z))}c(D,F,q,$)}En(_,"popupTooltips");function I(D,A){var F=A.target||A.srcElement;if(/\bCodeMirror-lint-mark-/.test(F.className)){for(var $=F.getBoundingClientRect(),q=($.left+$.right)/2,H=($.top+$.bottom)/2,z=D.findMarksAt(D.coordsChar({left:q,top:H},"client")),B=[],R=0;R<z.length;++R){var te=z[R].__annotation;te&&B.push(te)}B.length&&_(D,B,A)}}En(I,"onMouseOver"),n.defineOption("lint",!1,function(D,A,F){if(F&&F!=n.Init&&(g(D),D.state.lint.options.lintOnChange!==!1&&D.off("change",E),n.off(D.getWrapperElement(),"mouseover",D.state.lint.onMouseOver),clearTimeout(D.state.lint.timeout),delete D.state.lint),A){for(var $=D.getOption("gutters"),q=!1,H=0;H<$.length;++H)$[H]==r&&(q=!0);var z=D.state.lint=new f(D,A,q);z.options.lintOnChange&&D.on("change",E),z.options.tooltips!=!1&&z.options.tooltips!="gutter"&&n.on(D.getWrapperElement(),"mouseover",z.onMouseOver),x(D)}}),n.defineExtension("performLint",function(){x(this)})})})();var J4=yce.exports;const bce=Object.freeze(Object.defineProperty({__proto__:null,l:K4({__proto__:null,default:qr(J4)},[J4])},Symbol.toStringTag,{value:"Module"}));var Ece=Object.defineProperty,ur=(e,t)=>Ece(e,"name",{value:t,configurable:!0}),wce={exports:{}},X4;function ky(){return X4||(X4=1,function(e,t){(function(n){n(Cr())})(function(n){var r=n.Pos;function o(x){var C=x.flags;return C??(x.ignoreCase?"i":"")+(x.global?"g":"")+(x.multiline?"m":"")}ur(o,"regexpFlags");function i(x,C){for(var E=o(x),_=E,I=0;I<C.length;I++)_.indexOf(C.charAt(I))==-1&&(_+=C.charAt(I));return E==_?x:new RegExp(x.source,_)}ur(i,"ensureFlags");function s(x){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(x.source)}ur(s,"maybeMultiline");function l(x,C,E){C=i(C,"g");for(var _=E.line,I=E.ch,D=x.lastLine();_<=D;_++,I=0){C.lastIndex=I;var A=x.getLine(_),F=C.exec(A);if(F)return{from:r(_,F.index),to:r(_,F.index+F[0].length),match:F}}}ur(l,"searchRegexpForward");function c(x,C,E){if(!s(C))return l(x,C,E);C=i(C,"gm");for(var _,I=1,D=E.line,A=x.lastLine();D<=A;){for(var F=0;F<I&&!(D>A);F++){var $=x.getLine(D++);_=_==null?$:_+`
`+$}I=I*2,C.lastIndex=E.ch;var q=C.exec(_);if(q){var H=_.slice(0,q.index).split(`
`),z=q[0].split(`
`),B=E.line+H.length-1,R=H[H.length-1].length;return{from:r(B,R),to:r(B+z.length-1,z.length==1?R+z[0].length:z[z.length-1].length),match:q}}}}ur(c,"searchRegexpForwardMultiline");function f(x,C,E){for(var _,I=0;I<=x.length;){C.lastIndex=I;var D=C.exec(x);if(!D)break;var A=D.index+D[0].length;if(A>x.length-E)break;(!_||A>_.index+_[0].length)&&(_=D),I=D.index+1}return _}ur(f,"lastMatchIn");function d(x,C,E){C=i(C,"g");for(var _=E.line,I=E.ch,D=x.firstLine();_>=D;_--,I=-1){var A=x.getLine(_),F=f(A,C,I<0?0:A.length-I);if(F)return{from:r(_,F.index),to:r(_,F.index+F[0].length),match:F}}}ur(d,"searchRegexpBackward");function g(x,C,E){if(!s(C))return d(x,C,E);C=i(C,"gm");for(var _,I=1,D=x.getLine(E.line).length-E.ch,A=E.line,F=x.firstLine();A>=F;){for(var $=0;$<I&&A>=F;$++){var q=x.getLine(A--);_=_==null?q:q+`
`+_}I*=2;var H=f(_,C,D);if(H){var z=_.slice(0,H.index).split(`
`),B=H[0].split(`
`),R=A+z.length,te=z[z.length-1].length;return{from:r(R,te),to:r(R+B.length-1,B.length==1?te+B[0].length:B[B.length-1].length),match:H}}}}ur(g,"searchRegexpBackwardMultiline");var m,v;String.prototype.normalize?(m=ur(function(x){return x.normalize("NFD").toLowerCase()},"doFold"),v=ur(function(x){return x.normalize("NFD")},"noFold")):(m=ur(function(x){return x.toLowerCase()},"doFold"),v=ur(function(x){return x},"noFold"));function b(x,C,E,_){if(x.length==C.length)return E;for(var I=0,D=E+Math.max(0,x.length-C.length);;){if(I==D)return I;var A=I+D>>1,F=_(x.slice(0,A)).length;if(F==E)return A;F>E?D=A:I=A+1}}ur(b,"adjustPos");function w(x,C,E,_){if(!C.length)return null;var I=_?m:v,D=I(C).split(/\r|\n\r?/);e:for(var A=E.line,F=E.ch,$=x.lastLine()+1-D.length;A<=$;A++,F=0){var q=x.getLine(A).slice(F),H=I(q);if(D.length==1){var z=H.indexOf(D[0]);if(z==-1)continue e;var E=b(q,H,z,I)+F;return{from:r(A,b(q,H,z,I)+F),to:r(A,b(q,H,z+D[0].length,I)+F)}}else{var B=H.length-D[0].length;if(H.slice(B)!=D[0])continue e;for(var R=1;R<D.length-1;R++)if(I(x.getLine(A+R))!=D[R])continue e;var te=x.getLine(A+D.length-1),Y=I(te),Q=D[D.length-1];if(Y.slice(0,Q.length)!=Q)continue e;return{from:r(A,b(q,H,B,I)+F),to:r(A+D.length-1,b(te,Y,Q.length,I))}}}}ur(w,"searchStringForward");function N(x,C,E,_){if(!C.length)return null;var I=_?m:v,D=I(C).split(/\r|\n\r?/);e:for(var A=E.line,F=E.ch,$=x.firstLine()-1+D.length;A>=$;A--,F=-1){var q=x.getLine(A);F>-1&&(q=q.slice(0,F));var H=I(q);if(D.length==1){var z=H.lastIndexOf(D[0]);if(z==-1)continue e;return{from:r(A,b(q,H,z,I)),to:r(A,b(q,H,z+D[0].length,I))}}else{var B=D[D.length-1];if(H.slice(0,B.length)!=B)continue e;for(var R=1,E=A-D.length+1;R<D.length-1;R++)if(I(x.getLine(E+R))!=D[R])continue e;var te=x.getLine(A+1-D.length),Y=I(te);if(Y.slice(Y.length-D[0].length)!=D[0])continue e;return{from:r(A+1-D.length,b(te,Y,te.length-D[0].length,I)),to:r(A,b(q,H,B.length,I))}}}}ur(N,"searchStringBackward");function S(x,C,E,_){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=x,E=E?x.clipPos(E):r(0,0),this.pos={from:E,to:E};var I;typeof _=="object"?I=_.caseFold:(I=_,_=null),typeof C=="string"?(I==null&&(I=!1),this.matches=function(D,A){return(D?N:w)(x,C,A,I)}):(C=i(C,"gm"),!_||_.multiline!==!1?this.matches=function(D,A){return(D?g:c)(x,C,A)}:this.matches=function(D,A){return(D?d:l)(x,C,A)})}ur(S,"SearchCursor"),S.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(x){var C=this.doc.clipPos(x?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(C=r(C.line,C.ch),x?(C.ch--,C.ch<0&&(C.line--,C.ch=(this.doc.getLine(C.line)||"").length)):(C.ch++,C.ch>(this.doc.getLine(C.line)||"").length&&(C.ch=0,C.line++)),n.cmpPos(C,this.doc.clipPos(C))!=0))return this.atOccurrence=!1;var E=this.matches(x,C);if(this.afterEmptyMatch=E&&n.cmpPos(E.from,E.to)==0,E)return this.pos=E,this.atOccurrence=!0,this.pos.match||!0;var _=r(x?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:_,to:_},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(x,C){if(this.atOccurrence){var E=n.splitLines(x);this.doc.replaceRange(E,this.pos.from,this.pos.to,C),this.pos.to=r(this.pos.from.line+E.length-1,E[E.length-1].length+(E.length==1?this.pos.from.ch:0))}}},n.defineExtension("getSearchCursor",function(x,C,E){return new S(this.doc,x,C,E)}),n.defineDocExtension("getSearchCursor",function(x,C,E){return new S(this,x,C,E)}),n.defineExtension("selectMatches",function(x,C){for(var E=[],_=this.getSearchCursor(x,this.getCursor("from"),C);_.findNext()&&!(n.cmpPos(_.to(),this.getCursor("to"))>0);)E.push({anchor:_.from(),head:_.to()});E.length&&this.setSelections(E,0)})})}()),wce.exports}ur(ky,"requireSearchcursor");var xce=Object.defineProperty,Sce=(e,t)=>xce(e,"name",{value:t,configurable:!0});function Z4(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Sce(Z4,"_mergeNamespaces");var e6=ky();const t6=Object.freeze(Object.defineProperty({__proto__:null,s:Z4({__proto__:null,default:qr(e6)},[e6])},Symbol.toStringTag,{value:"Module"}));var Tce=Object.defineProperty,df=(e,t)=>Tce(e,"name",{value:t,configurable:!0});function n6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}df(n6,"_mergeNamespaces");var Cce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){function r(i,s,l){var c=i.getWrapperElement(),f;return f=c.appendChild(document.createElement("div")),l?f.className="CodeMirror-dialog CodeMirror-dialog-bottom":f.className="CodeMirror-dialog CodeMirror-dialog-top",typeof s=="string"?f.innerHTML=s:f.appendChild(s),n.addClass(c,"dialog-opened"),f}df(r,"dialogDiv");function o(i,s){i.state.currentNotificationClose&&i.state.currentNotificationClose(),i.state.currentNotificationClose=s}df(o,"closeNotification"),n.defineExtension("openDialog",function(i,s,l){l||(l={}),o(this,null);var c=r(this,i,l.bottom),f=!1,d=this;function g(b){if(typeof b=="string")m.value=b;else{if(f)return;f=!0,n.rmClass(c.parentNode,"dialog-opened"),c.parentNode.removeChild(c),d.focus(),l.onClose&&l.onClose(c)}}df(g,"close");var m=c.getElementsByTagName("input")[0],v;return m?(m.focus(),l.value&&(m.value=l.value,l.selectValueOnOpen!==!1&&m.select()),l.onInput&&n.on(m,"input",function(b){l.onInput(b,m.value,g)}),l.onKeyUp&&n.on(m,"keyup",function(b){l.onKeyUp(b,m.value,g)}),n.on(m,"keydown",function(b){l&&l.onKeyDown&&l.onKeyDown(b,m.value,g)||((b.keyCode==27||l.closeOnEnter!==!1&&b.keyCode==13)&&(m.blur(),n.e_stop(b),g()),b.keyCode==13&&s(m.value,b))}),l.closeOnBlur!==!1&&n.on(c,"focusout",function(b){b.relatedTarget!==null&&g()})):(v=c.getElementsByTagName("button")[0])&&(n.on(v,"click",function(){g(),d.focus()}),l.closeOnBlur!==!1&&n.on(v,"blur",g),v.focus()),g}),n.defineExtension("openConfirm",function(i,s,l){o(this,null);var c=r(this,i,l&&l.bottom),f=c.getElementsByTagName("button"),d=!1,g=this,m=1;function v(){d||(d=!0,n.rmClass(c.parentNode,"dialog-opened"),c.parentNode.removeChild(c),g.focus())}df(v,"close"),f[0].focus();for(var b=0;b<f.length;++b){var w=f[b];(function(N){n.on(w,"click",function(S){n.e_preventDefault(S),v(),N&&N(g)})})(s[b]),n.on(w,"blur",function(){--m,setTimeout(function(){m<=0&&v()},200)}),n.on(w,"focus",function(){++m})}}),n.defineExtension("openNotification",function(i,s){o(this,g);var l=r(this,i,s&&s.bottom),c=!1,f,d=s&&typeof s.duration<"u"?s.duration:5e3;function g(){c||(c=!0,clearTimeout(f),n.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}return df(g,"close"),n.on(l,"click",function(m){n.e_preventDefault(m),g()}),d&&(f=setTimeout(g,d)),g})})})();var uh=Cce.exports;const r6=Object.freeze(Object.defineProperty({__proto__:null,a:uh,d:n6({__proto__:null,default:qr(uh)},[uh])},Symbol.toStringTag,{value:"Module"}));var kce=Object.defineProperty,Ny=(e,t)=>kce(e,"name",{value:t,configurable:!0});function o6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Ny(o6,"_mergeNamespaces");var Nce={exports:{}};(function(e,t){(function(n){n(Cr(),uh)})(function(n){n.defineOption("search",{bottom:!1});function r(s,l,c,f,d){s.openDialog?s.openDialog(l,d,{value:f,selectValueOnOpen:!0,bottom:s.options.search.bottom}):d(prompt(c,f))}Ny(r,"dialog");function o(s){return s.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+s.phrase("(Use line:column or scroll% syntax)")+"</span>"}Ny(o,"getJumpDialog");function i(s,l){var c=Number(l);return/^[-+]/.test(l)?s.getCursor().line+c:c-1}Ny(i,"interpretLine"),n.commands.jumpToLine=function(s){var l=s.getCursor();r(s,o(s),s.phrase("Jump to line:"),l.line+1+":"+l.ch,function(c){if(c){var f;if(f=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(c))s.setCursor(i(s,f[1]),Number(f[2]));else if(f=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(c)){var d=Math.round(s.lineCount()*Number(f[1])/100);/^[-+]/.test(f[1])&&(d=l.line+d+1),s.setCursor(d-1,l.ch)}else(f=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(c))&&s.setCursor(i(s,f[1]),l.ch)}})},n.keyMap.default["Alt-G"]="jumpToLine"})})();var i6=Nce.exports;const s6=Object.freeze(Object.defineProperty({__proto__:null,j:o6({__proto__:null,default:qr(i6)},[i6])},Symbol.toStringTag,{value:"Module"}));var _ce=Object.defineProperty,_o=(e,t)=>_ce(e,"name",{value:t,configurable:!0});function a6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}_o(a6,"_mergeNamespaces");var Oce={exports:{}};(function(e,t){(function(n){n(Cr(),ky(),TC())})(function(n){var r=n.commands,o=n.Pos;function i(E,_,I){if(I<0&&_.ch==0)return E.clipPos(o(_.line-1));var D=E.getLine(_.line);if(I>0&&_.ch>=D.length)return E.clipPos(o(_.line+1,0));for(var A="start",F,$=_.ch,q=$,H=I<0?0:D.length,z=0;q!=H;q+=I,z++){var B=D.charAt(I<0?q-1:q),R=B!="_"&&n.isWordChar(B)?"w":"o";if(R=="w"&&B.toUpperCase()==B&&(R="W"),A=="start")R!="o"?(A="in",F=R):$=q+I;else if(A=="in"&&F!=R){if(F=="w"&&R=="W"&&I<0&&q--,F=="W"&&R=="w"&&I>0)if(q==$+1){F="w";continue}else q--;break}}return o(_.line,q)}_o(i,"findPosSubword");function s(E,_){E.extendSelectionsBy(function(I){return E.display.shift||E.doc.extend||I.empty()?i(E.doc,I.head,_):_<0?I.from():I.to()})}_o(s,"moveSubword"),r.goSubwordLeft=function(E){s(E,-1)},r.goSubwordRight=function(E){s(E,1)},r.scrollLineUp=function(E){var _=E.getScrollInfo();if(!E.somethingSelected()){var I=E.lineAtHeight(_.top+_.clientHeight,"local");E.getCursor().line>=I&&E.execCommand("goLineUp")}E.scrollTo(null,_.top-E.defaultTextHeight())},r.scrollLineDown=function(E){var _=E.getScrollInfo();if(!E.somethingSelected()){var I=E.lineAtHeight(_.top,"local")+1;E.getCursor().line<=I&&E.execCommand("goLineDown")}E.scrollTo(null,_.top+E.defaultTextHeight())},r.splitSelectionByLine=function(E){for(var _=E.listSelections(),I=[],D=0;D<_.length;D++)for(var A=_[D].from(),F=_[D].to(),$=A.line;$<=F.line;++$)F.line>A.line&&$==F.line&&F.ch==0||I.push({anchor:$==A.line?A:o($,0),head:$==F.line?F:o($)});E.setSelections(I,0)},r.singleSelectionTop=function(E){var _=E.listSelections()[0];E.setSelection(_.anchor,_.head,{scroll:!1})},r.selectLine=function(E){for(var _=E.listSelections(),I=[],D=0;D<_.length;D++){var A=_[D];I.push({anchor:o(A.from().line,0),head:o(A.to().line+1,0)})}E.setSelections(I)};function l(E,_){if(E.isReadOnly())return n.Pass;E.operation(function(){for(var I=E.listSelections().length,D=[],A=-1,F=0;F<I;F++){var $=E.listSelections()[F].head;if(!($.line<=A)){var q=o($.line+(_?0:1),0);E.replaceRange(`
`,q,null,"+insertLine"),E.indentLine(q.line,null,!0),D.push({head:q,anchor:q}),A=$.line+1}}E.setSelections(D)}),E.execCommand("indentAuto")}_o(l,"insertLine"),r.insertLineAfter=function(E){return l(E,!1)},r.insertLineBefore=function(E){return l(E,!0)};function c(E,_){for(var I=_.ch,D=I,A=E.getLine(_.line);I&&n.isWordChar(A.charAt(I-1));)--I;for(;D<A.length&&n.isWordChar(A.charAt(D));)++D;return{from:o(_.line,I),to:o(_.line,D),word:A.slice(I,D)}}_o(c,"wordAt"),r.selectNextOccurrence=function(E){var _=E.getCursor("from"),I=E.getCursor("to"),D=E.state.sublimeFindFullWord==E.doc.sel;if(n.cmpPos(_,I)==0){var A=c(E,_);if(!A.word)return;E.setSelection(A.from,A.to),D=!0}else{var F=E.getRange(_,I),$=D?new RegExp("\\b"+F+"\\b"):F,q=E.getSearchCursor($,I),H=q.findNext();if(H||(q=E.getSearchCursor($,o(E.firstLine(),0)),H=q.findNext()),!H||d(E.listSelections(),q.from(),q.to()))return;E.addSelection(q.from(),q.to())}D&&(E.state.sublimeFindFullWord=E.doc.sel)},r.skipAndSelectNextOccurrence=function(E){var _=E.getCursor("anchor"),I=E.getCursor("head");r.selectNextOccurrence(E),n.cmpPos(_,I)!=0&&E.doc.setSelections(E.doc.listSelections().filter(function(D){return D.anchor!=_||D.head!=I}))};function f(E,_){for(var I=E.listSelections(),D=[],A=0;A<I.length;A++){var F=I[A],$=E.findPosV(F.anchor,_,"line",F.anchor.goalColumn),q=E.findPosV(F.head,_,"line",F.head.goalColumn);$.goalColumn=F.anchor.goalColumn!=null?F.anchor.goalColumn:E.cursorCoords(F.anchor,"div").left,q.goalColumn=F.head.goalColumn!=null?F.head.goalColumn:E.cursorCoords(F.head,"div").left;var H={anchor:$,head:q};D.push(F),D.push(H)}E.setSelections(D)}_o(f,"addCursorToSelection"),r.addCursorToPrevLine=function(E){f(E,-1)},r.addCursorToNextLine=function(E){f(E,1)};function d(E,_,I){for(var D=0;D<E.length;D++)if(n.cmpPos(E[D].from(),_)==0&&n.cmpPos(E[D].to(),I)==0)return!0;return!1}_o(d,"isSelectedRange");var g="(){}[]";function m(E){for(var _=E.listSelections(),I=[],D=0;D<_.length;D++){var A=_[D],F=A.head,$=E.scanForBracket(F,-1);if(!$)return!1;for(;;){var q=E.scanForBracket(F,1);if(!q)return!1;if(q.ch==g.charAt(g.indexOf($.ch)+1)){var H=o($.pos.line,$.pos.ch+1);if(n.cmpPos(H,A.from())==0&&n.cmpPos(q.pos,A.to())==0){if($=E.scanForBracket($.pos,-1),!$)return!1}else{I.push({anchor:H,head:q.pos});break}}F=o(q.pos.line,q.pos.ch+1)}}return E.setSelections(I),!0}_o(m,"selectBetweenBrackets"),r.selectScope=function(E){m(E)||E.execCommand("selectAll")},r.selectBetweenBrackets=function(E){if(!m(E))return n.Pass};function v(E){return E?/\bpunctuation\b/.test(E)?E:void 0:null}_o(v,"puncType"),r.goToBracket=function(E){E.extendSelectionsBy(function(_){var I=E.scanForBracket(_.head,1,v(E.getTokenTypeAt(_.head)));if(I&&n.cmpPos(I.pos,_.head)!=0)return I.pos;var D=E.scanForBracket(_.head,-1,v(E.getTokenTypeAt(o(_.head.line,_.head.ch+1))));return D&&o(D.pos.line,D.pos.ch+1)||_.head})},r.swapLineUp=function(E){if(E.isReadOnly())return n.Pass;for(var _=E.listSelections(),I=[],D=E.firstLine()-1,A=[],F=0;F<_.length;F++){var $=_[F],q=$.from().line-1,H=$.to().line;A.push({anchor:o($.anchor.line-1,$.anchor.ch),head:o($.head.line-1,$.head.ch)}),$.to().ch==0&&!$.empty()&&--H,q>D?I.push(q,H):I.length&&(I[I.length-1]=H),D=H}E.operation(function(){for(var z=0;z<I.length;z+=2){var B=I[z],R=I[z+1],te=E.getLine(B);E.replaceRange("",o(B,0),o(B+1,0),"+swapLine"),R>E.lastLine()?E.replaceRange(`
`+te,o(E.lastLine()),null,"+swapLine"):E.replaceRange(te+`
`,o(R,0),null,"+swapLine")}E.setSelections(A),E.scrollIntoView()})},r.swapLineDown=function(E){if(E.isReadOnly())return n.Pass;for(var _=E.listSelections(),I=[],D=E.lastLine()+1,A=_.length-1;A>=0;A--){var F=_[A],$=F.to().line+1,q=F.from().line;F.to().ch==0&&!F.empty()&&$--,$<D?I.push($,q):I.length&&(I[I.length-1]=q),D=q}E.operation(function(){for(var H=I.length-2;H>=0;H-=2){var z=I[H],B=I[H+1],R=E.getLine(z);z==E.lastLine()?E.replaceRange("",o(z-1),o(z),"+swapLine"):E.replaceRange("",o(z,0),o(z+1,0),"+swapLine"),E.replaceRange(R+`
`,o(B,0),null,"+swapLine")}E.scrollIntoView()})},r.toggleCommentIndented=function(E){E.toggleComment({indent:!0})},r.joinLines=function(E){for(var _=E.listSelections(),I=[],D=0;D<_.length;D++){for(var A=_[D],F=A.from(),$=F.line,q=A.to().line;D<_.length-1&&_[D+1].from().line==q;)q=_[++D].to().line;I.push({start:$,end:q,anchor:!A.empty()&&F})}E.operation(function(){for(var H=0,z=[],B=0;B<I.length;B++){for(var R=I[B],te=R.anchor&&o(R.anchor.line-H,R.anchor.ch),Y,Q=R.start;Q<=R.end;Q++){var K=Q-H;Q==R.end&&(Y=o(K,E.getLine(K).length+1)),K<E.lastLine()&&(E.replaceRange(" ",o(K),o(K+1,/^\s*/.exec(E.getLine(K+1))[0].length)),++H)}z.push({anchor:te||Y,head:Y})}E.setSelections(z,0)})},r.duplicateLine=function(E){E.operation(function(){for(var _=E.listSelections().length,I=0;I<_;I++){var D=E.listSelections()[I];D.empty()?E.replaceRange(E.getLine(D.head.line)+`
`,o(D.head.line,0)):E.replaceRange(E.getRange(D.from(),D.to()),D.from())}E.scrollIntoView()})};function b(E,_,I){if(E.isReadOnly())return n.Pass;for(var D=E.listSelections(),A=[],F,$=0;$<D.length;$++){var q=D[$];if(!q.empty()){for(var H=q.from().line,z=q.to().line;$<D.length-1&&D[$+1].from().line==z;)z=D[++$].to().line;D[$].to().ch||z--,A.push(H,z)}}A.length?F=!0:A.push(E.firstLine(),E.lastLine()),E.operation(function(){for(var B=[],R=0;R<A.length;R+=2){var te=A[R],Y=A[R+1],Q=o(te,0),K=o(Y),Z=E.getRange(Q,K,!1);_?Z.sort(function(re,J){return re<J?-I:re==J?0:I}):Z.sort(function(re,J){var ie=re.toUpperCase(),ne=J.toUpperCase();return ie!=ne&&(re=ie,J=ne),re<J?-I:re==J?0:I}),E.replaceRange(Z,Q,K),F&&B.push({anchor:Q,head:o(Y+1,0)})}F&&E.setSelections(B,0)})}_o(b,"sortLines"),r.sortLines=function(E){b(E,!0,1)},r.reverseSortLines=function(E){b(E,!0,-1)},r.sortLinesInsensitive=function(E){b(E,!1,1)},r.reverseSortLinesInsensitive=function(E){b(E,!1,-1)},r.nextBookmark=function(E){var _=E.state.sublimeBookmarks;if(_)for(;_.length;){var I=_.shift(),D=I.find();if(D)return _.push(I),E.setSelection(D.from,D.to)}},r.prevBookmark=function(E){var _=E.state.sublimeBookmarks;if(_)for(;_.length;){_.unshift(_.pop());var I=_[_.length-1].find();if(!I)_.pop();else return E.setSelection(I.from,I.to)}},r.toggleBookmark=function(E){for(var _=E.listSelections(),I=E.state.sublimeBookmarks||(E.state.sublimeBookmarks=[]),D=0;D<_.length;D++){for(var A=_[D].from(),F=_[D].to(),$=_[D].empty()?E.findMarksAt(A):E.findMarks(A,F),q=0;q<$.length;q++)if($[q].sublimeBookmark){$[q].clear();for(var H=0;H<I.length;H++)I[H]==$[q]&&I.splice(H--,1);break}q==$.length&&I.push(E.markText(A,F,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},r.clearBookmarks=function(E){var _=E.state.sublimeBookmarks;if(_)for(var I=0;I<_.length;I++)_[I].clear();_.length=0},r.selectBookmarks=function(E){var _=E.state.sublimeBookmarks,I=[];if(_)for(var D=0;D<_.length;D++){var A=_[D].find();A?I.push({anchor:A.from,head:A.to}):_.splice(D--,0)}I.length&&E.setSelections(I,0)};function w(E,_){E.operation(function(){for(var I=E.listSelections(),D=[],A=[],F=0;F<I.length;F++){var $=I[F];$.empty()?(D.push(F),A.push("")):A.push(_(E.getRange($.from(),$.to())))}E.replaceSelections(A,"around","case");for(var F=D.length-1,q;F>=0;F--){var $=I[D[F]];if(!(q&&n.cmpPos($.head,q)>0)){var H=c(E,$.head);q=H.from,E.replaceRange(_(H.word),H.from,H.to)}}})}_o(w,"modifyWordOrSelection"),r.smartBackspace=function(E){if(E.somethingSelected())return n.Pass;E.operation(function(){for(var _=E.listSelections(),I=E.getOption("indentUnit"),D=_.length-1;D>=0;D--){var A=_[D].head,F=E.getRange({line:A.line,ch:0},A),$=n.countColumn(F,null,E.getOption("tabSize")),q=E.findPosH(A,-1,"char",!1);if(F&&!/\S/.test(F)&&$%I==0){var H=new o(A.line,n.findColumn(F,$-I,I));H.ch!=A.ch&&(q=H)}E.replaceRange("",q,A,"+delete")}})},r.delLineRight=function(E){E.operation(function(){for(var _=E.listSelections(),I=_.length-1;I>=0;I--)E.replaceRange("",_[I].anchor,o(_[I].to().line),"+delete");E.scrollIntoView()})},r.upcaseAtCursor=function(E){w(E,function(_){return _.toUpperCase()})},r.downcaseAtCursor=function(E){w(E,function(_){return _.toLowerCase()})},r.setSublimeMark=function(E){E.state.sublimeMark&&E.state.sublimeMark.clear(),E.state.sublimeMark=E.setBookmark(E.getCursor())},r.selectToSublimeMark=function(E){var _=E.state.sublimeMark&&E.state.sublimeMark.find();_&&E.setSelection(E.getCursor(),_)},r.deleteToSublimeMark=function(E){var _=E.state.sublimeMark&&E.state.sublimeMark.find();if(_){var I=E.getCursor(),D=_;if(n.cmpPos(I,D)>0){var A=D;D=I,I=A}E.state.sublimeKilled=E.getRange(I,D),E.replaceRange("",I,D)}},r.swapWithSublimeMark=function(E){var _=E.state.sublimeMark&&E.state.sublimeMark.find();_&&(E.state.sublimeMark.clear(),E.state.sublimeMark=E.setBookmark(E.getCursor()),E.setCursor(_))},r.sublimeYank=function(E){E.state.sublimeKilled!=null&&E.replaceSelection(E.state.sublimeKilled,null,"paste")},r.showInCenter=function(E){var _=E.cursorCoords(null,"local");E.scrollTo(null,(_.top+_.bottom)/2-E.getScrollInfo().clientHeight/2)};function N(E){var _=E.getCursor("from"),I=E.getCursor("to");if(n.cmpPos(_,I)==0){var D=c(E,_);if(!D.word)return;_=D.from,I=D.to}return{from:_,to:I,query:E.getRange(_,I),word:D}}_o(N,"getTarget");function S(E,_){var I=N(E);if(I){var D=I.query,A=E.getSearchCursor(D,_?I.to:I.from);(_?A.findNext():A.findPrevious())?E.setSelection(A.from(),A.to()):(A=E.getSearchCursor(D,_?o(E.firstLine(),0):E.clipPos(o(E.lastLine()))),(_?A.findNext():A.findPrevious())?E.setSelection(A.from(),A.to()):I.word&&E.setSelection(I.from,I.to))}}_o(S,"findAndGoTo"),r.findUnder=function(E){S(E,!0)},r.findUnderPrevious=function(E){S(E,!1)},r.findAllUnder=function(E){var _=N(E);if(_){for(var I=E.getSearchCursor(_.query),D=[],A=-1;I.findNext();)D.push({anchor:I.from(),head:I.to()}),I.from().line<=_.from.line&&I.from().ch<=_.from.ch&&A++;E.setSelections(D,A)}};var x=n.keyMap;x.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},n.normalizeKeyMap(x.macSublime),x.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},n.normalizeKeyMap(x.pcSublime);var C=x.default==x.macDefault;x.sublime=C?x.macSublime:x.pcSublime})})();var l6=Oce.exports;const c6=Object.freeze(Object.defineProperty({__proto__:null,s:a6({__proto__:null,default:qr(l6)},[l6])},Symbol.toStringTag,{value:"Module"}));var Ace=Object.defineProperty,Ce=(e,t)=>Ace(e,"name",{value:t,configurable:!0});function u6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Ce(u6,"_mergeNamespaces");var Dce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){n.defineMode("javascript",function(r,o){var i=r.indentUnit,s=o.statementIndent,l=o.jsonld,c=o.json||l,f=o.trackScope!==!1,d=o.typescript,g=o.wordCharacters||/[\w$\xa1-\uffff]/,m=function(){function j(Jn){return{type:Jn,style:"keyword"}}Ce(j,"kw");var ee=j("keyword a"),me=j("keyword b"),Te=j("keyword c"),Je=j("keyword d"),pt=j("operator"),Re={type:"atom",style:"atom"};return{if:j("if"),while:ee,with:ee,else:me,do:me,try:me,finally:me,return:Je,break:Je,continue:Je,new:j("new"),delete:Te,void:Te,throw:Te,debugger:j("debugger"),var:j("var"),const:j("var"),let:j("var"),function:j("function"),catch:j("catch"),for:j("for"),switch:j("switch"),case:j("case"),default:j("default"),in:pt,typeof:pt,instanceof:pt,true:Re,false:Re,null:Re,undefined:Re,NaN:Re,Infinity:Re,this:j("this"),class:j("class"),super:j("atom"),yield:Te,export:j("export"),import:j("import"),extends:Te,await:Te}}(),v=/[+\-*&%=<>!?|~^@]/,b=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function w(j){for(var ee=!1,me,Te=!1;(me=j.next())!=null;){if(!ee){if(me=="/"&&!Te)return;me=="["?Te=!0:Te&&me=="]"&&(Te=!1)}ee=!ee&&me=="\\"}}Ce(w,"readRegexp");var N,S;function x(j,ee,me){return N=j,S=me,ee}Ce(x,"ret");function C(j,ee){var me=j.next();if(me=='"'||me=="'")return ee.tokenize=E(me),ee.tokenize(j,ee);if(me=="."&&j.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return x("number","number");if(me=="."&&j.match(".."))return x("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(me))return x(me);if(me=="="&&j.eat(">"))return x("=>","operator");if(me=="0"&&j.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return x("number","number");if(/\d/.test(me))return j.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),x("number","number");if(me=="/")return j.eat("*")?(ee.tokenize=_,_(j,ee)):j.eat("/")?(j.skipToEnd(),x("comment","comment")):we(j,ee,1)?(w(j),j.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),x("regexp","string-2")):(j.eat("="),x("operator","operator",j.current()));if(me=="`")return ee.tokenize=I,I(j,ee);if(me=="#"&&j.peek()=="!")return j.skipToEnd(),x("meta","meta");if(me=="#"&&j.eatWhile(g))return x("variable","property");if(me=="<"&&j.match("!--")||me=="-"&&j.match("->")&&!/\S/.test(j.string.slice(0,j.start)))return j.skipToEnd(),x("comment","comment");if(v.test(me))return(me!=">"||!ee.lexical||ee.lexical.type!=">")&&(j.eat("=")?(me=="!"||me=="=")&&j.eat("="):/[<>*+\-|&?]/.test(me)&&(j.eat(me),me==">"&&j.eat(me))),me=="?"&&j.eat(".")?x("."):x("operator","operator",j.current());if(g.test(me)){j.eatWhile(g);var Te=j.current();if(ee.lastType!="."){if(m.propertyIsEnumerable(Te)){var Je=m[Te];return x(Je.type,Je.style,Te)}if(Te=="async"&&j.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return x("async","keyword",Te)}return x("variable","variable",Te)}}Ce(C,"tokenBase");function E(j){return function(ee,me){var Te=!1,Je;if(l&&ee.peek()=="@"&&ee.match(b))return me.tokenize=C,x("jsonld-keyword","meta");for(;(Je=ee.next())!=null&&!(Je==j&&!Te);)Te=!Te&&Je=="\\";return Te||(me.tokenize=C),x("string","string")}}Ce(E,"tokenString");function _(j,ee){for(var me=!1,Te;Te=j.next();){if(Te=="/"&&me){ee.tokenize=C;break}me=Te=="*"}return x("comment","comment")}Ce(_,"tokenComment");function I(j,ee){for(var me=!1,Te;(Te=j.next())!=null;){if(!me&&(Te=="`"||Te=="$"&&j.eat("{"))){ee.tokenize=C;break}me=!me&&Te=="\\"}return x("quasi","string-2",j.current())}Ce(I,"tokenQuasi");var D="([{}])";function A(j,ee){ee.fatArrowAt&&(ee.fatArrowAt=null);var me=j.string.indexOf("=>",j.start);if(!(me<0)){if(d){var Te=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(j.string.slice(j.start,me));Te&&(me=Te.index)}for(var Je=0,pt=!1,Re=me-1;Re>=0;--Re){var Jn=j.string.charAt(Re),lo=D.indexOf(Jn);if(lo>=0&&lo<3){if(!Je){++Re;break}if(--Je==0){Jn=="("&&(pt=!0);break}}else if(lo>=3&&lo<6)++Je;else if(g.test(Jn))pt=!0;else if(/["'\/`]/.test(Jn))for(;;--Re){if(Re==0)return;var Tf=j.string.charAt(Re-1);if(Tf==Jn&&j.string.charAt(Re-2)!="\\"){Re--;break}}else if(pt&&!Je){++Re;break}}pt&&!Je&&(ee.fatArrowAt=Re)}}Ce(A,"findFatArrow");var F={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function $(j,ee,me,Te,Je,pt){this.indented=j,this.column=ee,this.type=me,this.prev=Je,this.info=pt,Te!=null&&(this.align=Te)}Ce($,"JSLexical");function q(j,ee){if(!f)return!1;for(var me=j.localVars;me;me=me.next)if(me.name==ee)return!0;for(var Te=j.context;Te;Te=Te.prev)for(var me=Te.vars;me;me=me.next)if(me.name==ee)return!0}Ce(q,"inScope");function H(j,ee,me,Te,Je){var pt=j.cc;for(z.state=j,z.stream=Je,z.marked=null,z.cc=pt,z.style=ee,j.lexical.hasOwnProperty("align")||(j.lexical.align=!0);;){var Re=pt.length?pt.pop():c?Ie:ve;if(Re(me,Te)){for(;pt.length&&pt[pt.length-1].lex;)pt.pop()();return z.marked?z.marked:me=="variable"&&q(j,Te)?"variable-2":ee}}}Ce(H,"parseJS");var z={state:null,column:null,marked:null,cc:null};function B(){for(var j=arguments.length-1;j>=0;j--)z.cc.push(arguments[j])}Ce(B,"pass");function R(){return B.apply(null,arguments),!0}Ce(R,"cont");function te(j,ee){for(var me=ee;me;me=me.next)if(me.name==j)return!0;return!1}Ce(te,"inList");function Y(j){var ee=z.state;if(z.marked="def",!!f){if(ee.context){if(ee.lexical.info=="var"&&ee.context&&ee.context.block){var me=Q(j,ee.context);if(me!=null){ee.context=me;return}}else if(!te(j,ee.localVars)){ee.localVars=new re(j,ee.localVars);return}}o.globalVars&&!te(j,ee.globalVars)&&(ee.globalVars=new re(j,ee.globalVars))}}Ce(Y,"register");function Q(j,ee){if(ee)if(ee.block){var me=Q(j,ee.prev);return me?me==ee.prev?ee:new Z(me,ee.vars,!0):null}else return te(j,ee.vars)?ee:new Z(ee.prev,new re(j,ee.vars),!1);else return null}Ce(Q,"registerVarScoped");function K(j){return j=="public"||j=="private"||j=="protected"||j=="abstract"||j=="readonly"}Ce(K,"isModifier");function Z(j,ee,me){this.prev=j,this.vars=ee,this.block=me}Ce(Z,"Context");function re(j,ee){this.name=j,this.next=ee}Ce(re,"Var");var J=new re("this",new re("arguments",null));function ie(){z.state.context=new Z(z.state.context,z.state.localVars,!1),z.state.localVars=J}Ce(ie,"pushcontext");function ne(){z.state.context=new Z(z.state.context,z.state.localVars,!0),z.state.localVars=null}Ce(ne,"pushblockcontext"),ie.lex=ne.lex=!0;function ae(){z.state.localVars=z.state.context.vars,z.state.context=z.state.context.prev}Ce(ae,"popcontext"),ae.lex=!0;function le(j,ee){var me=Ce(function(){var Te=z.state,Je=Te.indented;if(Te.lexical.type=="stat")Je=Te.lexical.indented;else for(var pt=Te.lexical;pt&&pt.type==")"&&pt.align;pt=pt.prev)Je=pt.indented;Te.lexical=new $(Je,z.stream.column(),j,null,Te.lexical,ee)},"result");return me.lex=!0,me}Ce(le,"pushlex");function de(){var j=z.state;j.lexical.prev&&(j.lexical.type==")"&&(j.indented=j.lexical.indented),j.lexical=j.lexical.prev)}Ce(de,"poplex"),de.lex=!0;function xe(j){function ee(me){return me==j?R():j==";"||me=="}"||me==")"||me=="]"?B():R(ee)}return Ce(ee,"exp"),ee}Ce(xe,"expect");function ve(j,ee){return j=="var"?R(le("vardef",ee),yf,xe(";"),de):j=="keyword a"?R(le("form"),it,ve,de):j=="keyword b"?R(le("form"),ve,de):j=="keyword d"?z.stream.match(/^\s*$/,!1)?R():R(le("stat"),je,xe(";"),de):j=="debugger"?R(xe(";")):j=="{"?R(le("}"),ne,_r,de,ae):j==";"?R():j=="if"?(z.state.lexical.info=="else"&&z.state.cc[z.state.cc.length-1]==de&&z.state.cc.pop()(),R(le("form"),it,ve,de,gh)):j=="function"?R(Ao):j=="for"?R(le("form"),ne,vh,ve,ae,de):j=="class"||d&&ee=="interface"?(z.marked="keyword",R(le("form",j=="class"?j:ee),ll,de)):j=="variable"?d&&ee=="declare"?(z.marked="keyword",R(ve)):d&&(ee=="module"||ee=="enum"||ee=="type")&&z.stream.match(/^\s*\w/,!1)?(z.marked="keyword",ee=="enum"?R(ii):ee=="type"?R(Sf,xe("operator"),Ke,xe(";")):R(le("form"),Or,xe("{"),le("}"),_r,de,de)):d&&ee=="namespace"?(z.marked="keyword",R(le("form"),Ie,ve,de)):d&&ee=="abstract"?(z.marked="keyword",R(ve)):R(le("stat"),bc):j=="switch"?R(le("form"),it,xe("{"),le("}","switch"),ne,_r,de,de,ae):j=="case"?R(Ie,xe(":")):j=="default"?R(xe(":")):j=="catch"?R(le("form"),ie,qe,ve,de,ae):j=="export"?R(le("stat"),Ec,de):j=="import"?R(le("stat"),en,de):j=="async"?R(ve):ee=="@"?R(Ie,ve):B(le("stat"),Ie,xe(";"),de)}Ce(ve,"statement");function qe(j){if(j=="(")return R(Pi,xe(")"))}Ce(qe,"maybeCatchBinding");function Ie(j,ee){return Ot(j,ee,!1)}Ce(Ie,"expression");function Oe(j,ee){return Ot(j,ee,!0)}Ce(Oe,"expressionNoComma");function it(j){return j!="("?B():R(le(")"),je,xe(")"),de)}Ce(it,"parenExpr");function Ot(j,ee,me){if(z.state.fatArrowAt==z.stream.start){var Te=me?fr:os;if(j=="(")return R(ie,le(")"),Wt(Pi,")"),de,xe("=>"),Te,ae);if(j=="variable")return B(ie,Or,xe("=>"),Te,ae)}var Je=me?Nr:Dt;return F.hasOwnProperty(j)?R(Je):j=="function"?R(Ao,Je):j=="class"||d&&ee=="interface"?(z.marked="keyword",R(le("form"),al,de)):j=="keyword c"||j=="async"?R(me?Oe:Ie):j=="("?R(le(")"),je,xe(")"),de,Je):j=="operator"||j=="spread"?R(me?Oe:Ie):j=="["?R(le("]"),yt,de,Je):j=="{"?rl(ei,"}",null,Je):j=="quasi"?B($t,Je):j=="new"?R(nl(me)):R()}Ce(Ot,"expressionInner");function je(j){return j.match(/[;\}\)\],]/)?B():B(Ie)}Ce(je,"maybeexpression");function Dt(j,ee){return j==","?R(je):Nr(j,ee,!1)}Ce(Dt,"maybeoperatorComma");function Nr(j,ee,me){var Te=me==!1?Dt:Nr,Je=me==!1?Ie:Oe;if(j=="=>")return R(ie,me?fr:os,ae);if(j=="operator")return/\+\+|--/.test(ee)||d&&ee=="!"?R(Te):d&&ee=="<"&&z.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?R(le(">"),Wt(Ke,">"),de,Te):ee=="?"?R(Ie,xe(":"),Je):R(Je);if(j=="quasi")return B($t,Te);if(j!=";"){if(j=="(")return rl(Oe,")","call",Te);if(j==".")return R(gf,Te);if(j=="[")return R(le("]"),je,xe("]"),de,Te);if(d&&ee=="as")return z.marked="keyword",R(Ke,Te);if(j=="regexp")return z.state.lastType=z.marked="operator",z.stream.backUp(z.stream.pos-z.stream.start-1),R(Je)}}Ce(Nr,"maybeoperatorNoComma");function $t(j,ee){return j!="quasi"?B():ee.slice(ee.length-2)!="${"?R($t):R(je,xn)}Ce($t,"quasi");function xn(j){if(j=="}")return z.marked="string-2",z.state.tokenize=I,R($t)}Ce(xn,"continueQuasi");function os(j){return A(z.stream,z.state),B(j=="{"?ve:Ie)}Ce(os,"arrowBody");function fr(j){return A(z.stream,z.state),B(j=="{"?ve:Oe)}Ce(fr,"arrowBodyNoComma");function nl(j){return function(ee){return ee=="."?R(j?Fy:mf):ee=="variable"&&d?R(Hs,j?Nr:Dt):B(j?Oe:Ie)}}Ce(nl,"maybeTarget");function mf(j,ee){if(ee=="target")return z.marked="keyword",R(Dt)}Ce(mf,"target");function Fy(j,ee){if(ee=="target")return z.marked="keyword",R(Nr)}Ce(Fy,"targetNoComma");function bc(j){return j==":"?R(de,ve):B(Dt,xe(";"),de)}Ce(bc,"maybelabel");function gf(j){if(j=="variable")return z.marked="property",R()}Ce(gf,"property");function ei(j,ee){if(j=="async")return z.marked="property",R(ei);if(j=="variable"||z.style=="keyword"){if(z.marked="property",ee=="get"||ee=="set")return R(mh);var me;return d&&z.state.fatArrowAt==z.stream.start&&(me=z.stream.match(/^\s*:\s*/,!1))&&(z.state.fatArrowAt=z.stream.pos+me[0].length),R(io)}else{if(j=="number"||j=="string")return z.marked=l?"property":z.style+" property",R(io);if(j=="jsonld-keyword")return R(io);if(d&&K(ee))return z.marked="keyword",R(ei);if(j=="[")return R(Ie,is,xe("]"),io);if(j=="spread")return R(Oe,io);if(ee=="*")return z.marked="keyword",R(ei);if(j==":")return B(io)}}Ce(ei,"objprop");function mh(j){return j!="variable"?B(io):(z.marked="property",R(Ao))}Ce(mh,"getterSetter");function io(j){if(j==":")return R(Oe);if(j=="(")return B(Ao)}Ce(io,"afterprop");function Wt(j,ee,me){function Te(Je,pt){if(me?me.indexOf(Je)>-1:Je==","){var Re=z.state.lexical;return Re.info=="call"&&(Re.pos=(Re.pos||0)+1),R(function(Jn,lo){return Jn==ee||lo==ee?B():B(j)},Te)}return Je==ee||pt==ee?R():me&&me.indexOf(";")>-1?B(j):R(xe(ee))}return Ce(Te,"proceed"),function(Je,pt){return Je==ee||pt==ee?R():B(j,Te)}}Ce(Wt,"commasep");function rl(j,ee,me){for(var Te=3;Te<arguments.length;Te++)z.cc.push(arguments[Te]);return R(le(ee,me),Wt(j,ee),de)}Ce(rl,"contCommasep");function _r(j){return j=="}"?R():B(ve,_r)}Ce(_r,"block");function is(j,ee){if(d){if(j==":")return R(Ke);if(ee=="?")return R(is)}}Ce(is,"maybetype");function We(j,ee){if(d&&(j==":"||ee=="in"))return R(Ke)}Ce(We,"maybetypeOrIn");function ol(j){if(d&&j==":")return z.stream.match(/^\s*\w+\s+is\b/,!1)?R(Ie,dr,Ke):R(Ke)}Ce(ol,"mayberettype");function dr(j,ee){if(ee=="is")return z.marked="keyword",R()}Ce(dr,"isKW");function Ke(j,ee){if(ee=="keyof"||ee=="typeof"||ee=="infer"||ee=="readonly")return z.marked="keyword",R(ee=="typeof"?Oe:Ke);if(j=="variable"||ee=="void")return z.marked="type",R(zr);if(ee=="|"||ee=="&")return R(Ke);if(j=="string"||j=="number"||j=="atom")return R(zr);if(j=="[")return R(le("]"),Wt(Ke,"]",","),de,zr);if(j=="{")return R(le("}"),il,de,zr);if(j=="(")return R(Wt(sl,")"),ln,zr);if(j=="<")return R(Wt(Ke,">"),Ke);if(j=="quasi")return B(ti,zr)}Ce(Ke,"typeexpr");function ln(j){if(j=="=>")return R(Ke)}Ce(ln,"maybeReturnType");function il(j){return j.match(/[\}\)\]]/)?R():j==","||j==";"?R(il):B(_n,il)}Ce(il,"typeprops");function _n(j,ee){if(j=="variable"||z.style=="keyword")return z.marked="property",R(_n);if(ee=="?"||j=="number"||j=="string")return R(_n);if(j==":")return R(Ke);if(j=="[")return R(xe("variable"),We,xe("]"),_n);if(j=="(")return B(so,_n);if(!j.match(/[;\}\)\],]/))return R()}Ce(_n,"typeprop");function ti(j,ee){return j!="quasi"?B():ee.slice(ee.length-2)!="${"?R(ti):R(Ke,Bn)}Ce(ti,"quasiType");function Bn(j){if(j=="}")return z.marked="string-2",z.state.tokenize=I,R(ti)}Ce(Bn,"continueQuasiType");function sl(j,ee){return j=="variable"&&z.stream.match(/^\s*[?:]/,!1)||ee=="?"?R(sl):j==":"?R(Ke):j=="spread"?R(sl):B(Ke)}Ce(sl,"typearg");function zr(j,ee){if(ee=="<")return R(le(">"),Wt(Ke,">"),de,zr);if(ee=="|"||j=="."||ee=="&")return R(Ke);if(j=="[")return R(Ke,xe("]"),zr);if(ee=="extends"||ee=="implements")return z.marked="keyword",R(Ke);if(ee=="?")return R(Ke,xe(":"),Ke)}Ce(zr,"afterType");function Hs(j,ee){if(ee=="<")return R(le(">"),Wt(Ke,">"),de,zr)}Ce(Hs,"maybeTypeArgs");function ss(){return B(Ke,vf)}Ce(ss,"typeparam");function vf(j,ee){if(ee=="=")return R(Ke)}Ce(vf,"maybeTypeDefault");function yf(j,ee){return ee=="enum"?(z.marked="keyword",R(ii)):B(Or,is,ni,wf)}Ce(yf,"vardef");function Or(j,ee){if(d&&K(ee))return z.marked="keyword",R(Or);if(j=="variable")return Y(ee),R();if(j=="spread")return R(Or);if(j=="[")return rl(Ef,"]");if(j=="{")return rl(bf,"}")}Ce(Or,"pattern");function bf(j,ee){return j=="variable"&&!z.stream.match(/^\s*:/,!1)?(Y(ee),R(ni)):(j=="variable"&&(z.marked="property"),j=="spread"?R(Or):j=="}"?B():j=="["?R(Ie,xe("]"),xe(":"),bf):R(xe(":"),Or,ni))}Ce(bf,"proppattern");function Ef(){return B(Or,ni)}Ce(Ef,"eltpattern");function ni(j,ee){if(ee=="=")return R(Oe)}Ce(ni,"maybeAssign");function wf(j){if(j==",")return R(yf)}Ce(wf,"vardefCont");function gh(j,ee){if(j=="keyword b"&&ee=="else")return R(le("form","else"),ve,de)}Ce(gh,"maybeelse");function vh(j,ee){if(ee=="await")return R(vh);if(j=="(")return R(le(")"),xf,de)}Ce(vh,"forspec");function xf(j){return j=="var"?R(yf,as):j=="variable"?R(as):B(as)}Ce(xf,"forspec1");function as(j,ee){return j==")"?R():j==";"?R(as):ee=="in"||ee=="of"?(z.marked="keyword",R(Ie,as)):B(Ie,as)}Ce(as,"forspec2");function Ao(j,ee){if(ee=="*")return z.marked="keyword",R(Ao);if(j=="variable")return Y(ee),R(Ao);if(j=="(")return R(ie,le(")"),Wt(Pi,")"),de,ol,ve,ae);if(d&&ee=="<")return R(le(">"),Wt(ss,">"),de,Ao)}Ce(Ao,"functiondef");function so(j,ee){if(ee=="*")return z.marked="keyword",R(so);if(j=="variable")return Y(ee),R(so);if(j=="(")return R(ie,le(")"),Wt(Pi,")"),de,ol,ae);if(d&&ee=="<")return R(le(">"),Wt(ss,">"),de,so)}Ce(so,"functiondecl");function Sf(j,ee){if(j=="keyword"||j=="variable")return z.marked="type",R(Sf);if(ee=="<")return R(le(">"),Wt(ss,">"),de)}Ce(Sf,"typename");function Pi(j,ee){return ee=="@"&&R(Ie,Pi),j=="spread"?R(Pi):d&&K(ee)?(z.marked="keyword",R(Pi)):d&&j=="this"?R(is,ni):B(Or,is,ni)}Ce(Pi,"funarg");function al(j,ee){return j=="variable"?ll(j,ee):ri(j,ee)}Ce(al,"classExpression");function ll(j,ee){if(j=="variable")return Y(ee),R(ri)}Ce(ll,"className");function ri(j,ee){if(ee=="<")return R(le(">"),Wt(ss,">"),de,ri);if(ee=="extends"||ee=="implements"||d&&j==",")return ee=="implements"&&(z.marked="keyword"),R(d?Ke:Ie,ri);if(j=="{")return R(le("}"),Do,de)}Ce(ri,"classNameAfter");function Do(j,ee){if(j=="async"||j=="variable"&&(ee=="static"||ee=="get"||ee=="set"||d&&K(ee))&&z.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return z.marked="keyword",R(Do);if(j=="variable"||z.style=="keyword")return z.marked="property",R(ao,Do);if(j=="number"||j=="string")return R(ao,Do);if(j=="[")return R(Ie,is,xe("]"),ao,Do);if(ee=="*")return z.marked="keyword",R(Do);if(d&&j=="(")return B(so,Do);if(j==";"||j==",")return R(Do);if(j=="}")return R();if(ee=="@")return R(Ie,Do)}Ce(Do,"classBody");function ao(j,ee){if(ee=="!"||ee=="?")return R(ao);if(j==":")return R(Ke,ni);if(ee=="=")return R(Oe);var me=z.state.lexical.prev,Te=me&&me.info=="interface";return B(Te?so:Ao)}Ce(ao,"classfield");function Ec(j,ee){return ee=="*"?(z.marked="keyword",R(Ar,xe(";"))):ee=="default"?(z.marked="keyword",R(Ie,xe(";"))):j=="{"?R(Wt(wc,"}"),Ar,xe(";")):B(ve)}Ce(Ec,"afterExport");function wc(j,ee){if(ee=="as")return z.marked="keyword",R(xe("variable"));if(j=="variable")return B(Oe,wc)}Ce(wc,"exportField");function en(j){return j=="string"?R():j=="("?B(Ie):j=="."?B(Dt):B(Pe,oi,Ar)}Ce(en,"afterImport");function Pe(j,ee){return j=="{"?rl(Pe,"}"):(j=="variable"&&Y(ee),ee=="*"&&(z.marked="keyword"),R(xc))}Ce(Pe,"importSpec");function oi(j){if(j==",")return R(Pe,oi)}Ce(oi,"maybeMoreImports");function xc(j,ee){if(ee=="as")return z.marked="keyword",R(Pe)}Ce(xc,"maybeAs");function Ar(j,ee){if(ee=="from")return z.marked="keyword",R(Ie)}Ce(Ar,"maybeFrom");function yt(j){return j=="]"?R():B(Wt(Oe,"]"))}Ce(yt,"arrayLiteral");function ii(){return B(le("form"),Or,xe("{"),le("}"),Wt(Ws,"}"),de,de)}Ce(ii,"enumdef");function Ws(){return B(Or,ni)}Ce(Ws,"enummember");function Sc(j,ee){return j.lastType=="operator"||j.lastType==","||v.test(ee.charAt(0))||/[,.]/.test(ee.charAt(0))}Ce(Sc,"isContinuedStatement");function we(j,ee,me){return ee.tokenize==C&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(ee.lastType)||ee.lastType=="quasi"&&/\{\s*$/.test(j.string.slice(0,j.pos-(me||0)))}return Ce(we,"expressionAllowed"),{startState:function(j){var ee={tokenize:C,lastType:"sof",cc:[],lexical:new $((j||0)-i,0,"block",!1),localVars:o.localVars,context:o.localVars&&new Z(null,null,!1),indented:j||0};return o.globalVars&&typeof o.globalVars=="object"&&(ee.globalVars=o.globalVars),ee},token:function(j,ee){if(j.sol()&&(ee.lexical.hasOwnProperty("align")||(ee.lexical.align=!1),ee.indented=j.indentation(),A(j,ee)),ee.tokenize!=_&&j.eatSpace())return null;var me=ee.tokenize(j,ee);return N=="comment"?me:(ee.lastType=N=="operator"&&(S=="++"||S=="--")?"incdec":N,H(ee,me,N,S,j))},indent:function(j,ee){if(j.tokenize==_||j.tokenize==I)return n.Pass;if(j.tokenize!=C)return 0;var me=ee&&ee.charAt(0),Te=j.lexical,Je;if(!/^\s*else\b/.test(ee))for(var pt=j.cc.length-1;pt>=0;--pt){var Re=j.cc[pt];if(Re==de)Te=Te.prev;else if(Re!=gh&&Re!=ae)break}for(;(Te.type=="stat"||Te.type=="form")&&(me=="}"||(Je=j.cc[j.cc.length-1])&&(Je==Dt||Je==Nr)&&!/^[,\.=+\-*:?[\(]/.test(ee));)Te=Te.prev;s&&Te.type==")"&&Te.prev.type=="stat"&&(Te=Te.prev);var Jn=Te.type,lo=me==Jn;return Jn=="vardef"?Te.indented+(j.lastType=="operator"||j.lastType==","?Te.info.length+1:0):Jn=="form"&&me=="{"?Te.indented:Jn=="form"?Te.indented+i:Jn=="stat"?Te.indented+(Sc(j,ee)?s||i:0):Te.info=="switch"&&!lo&&o.doubleIndentSwitch!=!1?Te.indented+(/^(?:case|default)\b/.test(ee)?i:2*i):Te.align?Te.column+(lo?0:1):Te.indented+(lo?0:i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:c?null:"/*",blockCommentEnd:c?null:"*/",blockCommentContinue:c?null:" * ",lineComment:c?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:c?"json":"javascript",jsonldMode:l,jsonMode:c,expressionAllowed:we,skipExpression:function(j){H(j,"atom","atom","true",new n.StringStream("",2,null))}}}),n.registerHelper("wordChars","javascript",/[\w$]/),n.defineMIME("text/javascript","javascript"),n.defineMIME("text/ecmascript","javascript"),n.defineMIME("application/javascript","javascript"),n.defineMIME("application/x-javascript","javascript"),n.defineMIME("application/ecmascript","javascript"),n.defineMIME("application/json",{name:"javascript",json:!0}),n.defineMIME("application/x-json",{name:"javascript",json:!0}),n.defineMIME("application/manifest+json",{name:"javascript",json:!0}),n.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),n.defineMIME("text/typescript",{name:"javascript",typescript:!0}),n.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var f6=Dce.exports;const Ice=Object.freeze(Object.defineProperty({__proto__:null,j:u6({__proto__:null,default:qr(f6)},[f6])},Symbol.toStringTag,{value:"Module"}));var Lce=Object.defineProperty,_y=(e,t)=>Lce(e,"name",{value:t,configurable:!0});function d6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}_y(d6,"_mergeNamespaces");var Rce={exports:{}};(function(e,t){(function(n){n(Cr())})(function(n){var r={},o=/[^\s\u00a0]/,i=n.Pos,s=n.cmpPos;function l(d){var g=d.search(o);return g==-1?0:g}_y(l,"firstNonWS"),n.commands.toggleComment=function(d){d.toggleComment()},n.defineExtension("toggleComment",function(d){d||(d=r);for(var g=this,m=1/0,v=this.listSelections(),b=null,w=v.length-1;w>=0;w--){var N=v[w].from(),S=v[w].to();N.line>=m||(S.line>=m&&(S=i(m,0)),m=N.line,b==null?g.uncomment(N,S,d)?b="un":(g.lineComment(N,S,d),b="line"):b=="un"?g.uncomment(N,S,d):g.lineComment(N,S,d))}});function c(d,g,m){return/\bstring\b/.test(d.getTokenTypeAt(i(g.line,0)))&&!/^[\'\"\`]/.test(m)}_y(c,"probablyInsideString");function f(d,g){var m=d.getMode();return m.useInnerComments===!1||!m.innerMode?m:d.getModeAt(g)}_y(f,"getMode"),n.defineExtension("lineComment",function(d,g,m){m||(m=r);var v=this,b=f(v,d),w=v.getLine(d.line);if(!(w==null||c(v,d,w))){var N=m.lineComment||b.lineComment;if(!N){(m.blockCommentStart||b.blockCommentStart)&&(m.fullLines=!0,v.blockComment(d,g,m));return}var S=Math.min(g.ch!=0||g.line==d.line?g.line+1:g.line,v.lastLine()+1),x=m.padding==null?" ":m.padding,C=m.commentBlankLines||d.line==g.line;v.operation(function(){if(m.indent){for(var E=null,_=d.line;_<S;++_){var I=v.getLine(_),D=I.slice(0,l(I));(E==null||E.length>D.length)&&(E=D)}for(var _=d.line;_<S;++_){var I=v.getLine(_),A=E.length;!C&&!o.test(I)||(I.slice(0,A)!=E&&(A=l(I)),v.replaceRange(E+N+x,i(_,0),i(_,A)))}}else for(var _=d.line;_<S;++_)(C||o.test(v.getLine(_)))&&v.replaceRange(N+x,i(_,0))})}}),n.defineExtension("blockComment",function(d,g,m){m||(m=r);var v=this,b=f(v,d),w=m.blockCommentStart||b.blockCommentStart,N=m.blockCommentEnd||b.blockCommentEnd;if(!w||!N){(m.lineComment||b.lineComment)&&m.fullLines!=!1&&v.lineComment(d,g,m);return}if(!/\bcomment\b/.test(v.getTokenTypeAt(i(d.line,0)))){var S=Math.min(g.line,v.lastLine());S!=d.line&&g.ch==0&&o.test(v.getLine(S))&&--S;var x=m.padding==null?" ":m.padding;d.line>S||v.operation(function(){if(m.fullLines!=!1){var C=o.test(v.getLine(S));v.replaceRange(x+N,i(S)),v.replaceRange(w+x,i(d.line,0));var E=m.blockCommentLead||b.blockCommentLead;if(E!=null)for(var _=d.line+1;_<=S;++_)(_!=S||C)&&v.replaceRange(E+x,i(_,0))}else{var I=s(v.getCursor("to"),g)==0,D=!v.somethingSelected();v.replaceRange(N,g),I&&v.setSelection(D?g:v.getCursor("from"),g),v.replaceRange(w,d)}})}}),n.defineExtension("uncomment",function(d,g,m){m||(m=r);var v=this,b=f(v,d),w=Math.min(g.ch!=0||g.line==d.line?g.line:g.line-1,v.lastLine()),N=Math.min(d.line,w),S=m.lineComment||b.lineComment,x=[],C=m.padding==null?" ":m.padding,E;e:{if(!S)break e;for(var _=N;_<=w;++_){var I=v.getLine(_),D=I.indexOf(S);if(D>-1&&!/comment/.test(v.getTokenTypeAt(i(_,D+1)))&&(D=-1),D==-1&&o.test(I)||D>-1&&o.test(I.slice(0,D)))break e;x.push(I)}if(v.operation(function(){for(var Z=N;Z<=w;++Z){var re=x[Z-N],J=re.indexOf(S),ie=J+S.length;J<0||(re.slice(ie,ie+C.length)==C&&(ie+=C.length),E=!0,v.replaceRange("",i(Z,J),i(Z,ie)))}}),E)return!0}var A=m.blockCommentStart||b.blockCommentStart,F=m.blockCommentEnd||b.blockCommentEnd;if(!A||!F)return!1;var $=m.blockCommentLead||b.blockCommentLead,q=v.getLine(N),H=q.indexOf(A);if(H==-1)return!1;var z=w==N?q:v.getLine(w),B=z.indexOf(F,w==N?H+A.length:0),R=i(N,H+1),te=i(w,B+1);if(B==-1||!/comment/.test(v.getTokenTypeAt(R))||!/comment/.test(v.getTokenTypeAt(te))||v.getRange(R,te,`
`).indexOf(F)>-1)return!1;var Y=q.lastIndexOf(A,d.ch),Q=Y==-1?-1:q.slice(0,d.ch).indexOf(F,Y+A.length);if(Y!=-1&&Q!=-1&&Q+F.length!=d.ch)return!1;Q=z.indexOf(F,g.ch);var K=z.slice(g.ch).lastIndexOf(A,Q-g.ch);return Y=Q==-1||K==-1?-1:g.ch+K,Q!=-1&&Y!=-1&&Y!=g.ch?!1:(v.operation(function(){v.replaceRange("",i(w,B-(C&&z.slice(B-C.length,B)==C?C.length:0)),i(w,B+F.length));var Z=H+A.length;if(C&&q.slice(Z,Z+C.length)==C&&(Z+=C.length),v.replaceRange("",i(N,H),i(N,Z)),$)for(var re=N+1;re<=w;++re){var J=v.getLine(re),ie=J.indexOf($);if(!(ie==-1||o.test(J.slice(0,ie)))){var ne=ie+$.length;C&&J.slice(ne,ne+C.length)==C&&(ne+=C.length),v.replaceRange("",i(re,ie),i(re,ne))}}}),!0)})})})();var p6=Rce.exports;const Fce=Object.freeze(Object.defineProperty({__proto__:null,c:d6({__proto__:null,default:qr(p6)},[p6])},Symbol.toStringTag,{value:"Module"}));var Mce=Object.defineProperty,Ht=(e,t)=>Mce(e,"name",{value:t,configurable:!0});function h6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}Ht(h6,"_mergeNamespaces");var Pce={exports:{}};(function(e,t){(function(n){n(Cr(),ky(),uh)})(function(n){n.defineOption("search",{bottom:!1});function r(A,F){return typeof A=="string"?A=new RegExp(A.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),F?"gi":"g"):A.global||(A=new RegExp(A.source,A.ignoreCase?"gi":"g")),{token:function($){A.lastIndex=$.pos;var q=A.exec($.string);if(q&&q.index==$.pos)return $.pos+=q[0].length||1,"searching";q?$.pos=q.index:$.skipToEnd()}}}Ht(r,"searchOverlay");function o(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}Ht(o,"SearchState");function i(A){return A.state.search||(A.state.search=new o)}Ht(i,"getSearchState");function s(A){return typeof A=="string"&&A==A.toLowerCase()}Ht(s,"queryCaseInsensitive");function l(A,F,$){return A.getSearchCursor(F,$,{caseFold:s(F),multiline:!0})}Ht(l,"getSearchCursor");function c(A,F,$,q,H){A.openDialog(F,q,{value:$,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){N(A)},onKeyDown:H,bottom:A.options.search.bottom})}Ht(c,"persistentDialog");function f(A,F,$,q,H){A.openDialog?A.openDialog(F,H,{value:q,selectValueOnOpen:!0,bottom:A.options.search.bottom}):H(prompt($,q))}Ht(f,"dialog");function d(A,F,$,q){A.openConfirm?A.openConfirm(F,q):confirm($)&&q[0]()}Ht(d,"confirmDialog");function g(A){return A.replace(/\\([nrt\\])/g,function(F,$){return $=="n"?`
`:$=="r"?"\r":$=="t"?" ":$=="\\"?"\\":F})}Ht(g,"parseString");function m(A){var F=A.match(/^\/(.*)\/([a-z]*)$/);if(F)try{A=new RegExp(F[1],F[2].indexOf("i")==-1?"":"i")}catch{}else A=g(A);return(typeof A=="string"?A=="":A.test(""))&&(A=/x^/),A}Ht(m,"parseQuery");function v(A,F,$){F.queryText=$,F.query=m($),A.removeOverlay(F.overlay,s(F.query)),F.overlay=r(F.query,s(F.query)),A.addOverlay(F.overlay),A.showMatchesOnScrollbar&&(F.annotate&&(F.annotate.clear(),F.annotate=null),F.annotate=A.showMatchesOnScrollbar(F.query,s(F.query)))}Ht(v,"startSearch");function b(A,F,$,q){var H=i(A);if(H.query)return w(A,F);var z=A.getSelection()||H.lastQuery;if(z instanceof RegExp&&z.source=="x^"&&(z=null),$&&A.openDialog){var B=null,R=Ht(function(te,Y){n.e_stop(Y),te&&(te!=H.queryText&&(v(A,H,te),H.posFrom=H.posTo=A.getCursor()),B&&(B.style.opacity=1),w(A,Y.shiftKey,function(Q,K){var Z;K.line<3&&document.querySelector&&(Z=A.display.wrapper.querySelector(".CodeMirror-dialog"))&&Z.getBoundingClientRect().bottom-4>A.cursorCoords(K,"window").top&&((B=Z).style.opacity=.4)}))},"searchNext");c(A,x(A),z,R,function(te,Y){var Q=n.keyName(te),K=A.getOption("extraKeys"),Z=K&&K[Q]||n.keyMap[A.getOption("keyMap")][Q];Z=="findNext"||Z=="findPrev"||Z=="findPersistentNext"||Z=="findPersistentPrev"?(n.e_stop(te),v(A,i(A),Y),A.execCommand(Z)):(Z=="find"||Z=="findPersistent")&&(n.e_stop(te),R(Y,te))}),q&&z&&(v(A,H,z),w(A,F))}else f(A,x(A),"Search for:",z,function(te){te&&!H.query&&A.operation(function(){v(A,H,te),H.posFrom=H.posTo=A.getCursor(),w(A,F)})})}Ht(b,"doSearch");function w(A,F,$){A.operation(function(){var q=i(A),H=l(A,q.query,F?q.posFrom:q.posTo);!H.find(F)&&(H=l(A,q.query,F?n.Pos(A.lastLine()):n.Pos(A.firstLine(),0)),!H.find(F))||(A.setSelection(H.from(),H.to()),A.scrollIntoView({from:H.from(),to:H.to()},20),q.posFrom=H.from(),q.posTo=H.to(),$&&$(H.from(),H.to()))})}Ht(w,"findNext");function N(A){A.operation(function(){var F=i(A);F.lastQuery=F.query,F.query&&(F.query=F.queryText=null,A.removeOverlay(F.overlay),F.annotate&&(F.annotate.clear(),F.annotate=null))})}Ht(N,"clearSearch");function S(A,F){var $=A?document.createElement(A):document.createDocumentFragment();for(var q in F)$[q]=F[q];for(var H=2;H<arguments.length;H++){var z=arguments[H];$.appendChild(typeof z=="string"?document.createTextNode(z):z)}return $}Ht(S,"el");function x(A){return S("",null,S("span",{className:"CodeMirror-search-label"},A.phrase("Search:"))," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",S("span",{style:"color: #888",className:"CodeMirror-search-hint"},A.phrase("(Use /re/ syntax for regexp search)")))}Ht(x,"getQueryDialog");function C(A){return S("",null," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",S("span",{style:"color: #888",className:"CodeMirror-search-hint"},A.phrase("(Use /re/ syntax for regexp search)")))}Ht(C,"getReplaceQueryDialog");function E(A){return S("",null,S("span",{className:"CodeMirror-search-label"},A.phrase("With:"))," ",S("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}Ht(E,"getReplacementQueryDialog");function _(A){return S("",null,S("span",{className:"CodeMirror-search-label"},A.phrase("Replace?"))," ",S("button",{},A.phrase("Yes"))," ",S("button",{},A.phrase("No"))," ",S("button",{},A.phrase("All"))," ",S("button",{},A.phrase("Stop")))}Ht(_,"getDoReplaceConfirm");function I(A,F,$){A.operation(function(){for(var q=l(A,F);q.findNext();)if(typeof F!="string"){var H=A.getRange(q.from(),q.to()).match(F);q.replace($.replace(/\$(\d)/g,function(z,B){return H[B]}))}else q.replace($)})}Ht(I,"replaceAll");function D(A,F){if(!A.getOption("readOnly")){var $=A.getSelection()||i(A).lastQuery,q=F?A.phrase("Replace all:"):A.phrase("Replace:"),H=S("",null,S("span",{className:"CodeMirror-search-label"},q),C(A));f(A,H,q,$,function(z){z&&(z=m(z),f(A,E(A),A.phrase("Replace with:"),"",function(B){if(B=g(B),F)I(A,z,B);else{N(A);var R=l(A,z,A.getCursor("from")),te=Ht(function(){var Q=R.from(),K;!(K=R.findNext())&&(R=l(A,z),!(K=R.findNext())||Q&&R.from().line==Q.line&&R.from().ch==Q.ch)||(A.setSelection(R.from(),R.to()),A.scrollIntoView({from:R.from(),to:R.to()}),d(A,_(A),A.phrase("Replace?"),[function(){Y(K)},te,function(){I(A,z,B)}]))},"advance"),Y=Ht(function(Q){R.replace(typeof z=="string"?B:B.replace(/\$(\d)/g,function(K,Z){return Q[Z]})),te()},"doReplace");te()}}))})}}Ht(D,"replace"),n.commands.find=function(A){N(A),b(A)},n.commands.findPersistent=function(A){N(A),b(A,!1,!0)},n.commands.findPersistentNext=function(A){b(A,!1,!0,!0)},n.commands.findPersistentPrev=function(A){b(A,!0,!0,!0)},n.commands.findNext=b,n.commands.findPrev=function(A){b(A,!0)},n.commands.clearSearch=N,n.commands.replace=D,n.commands.replaceAll=function(A){D(A,!0)}})})();var m6=Pce.exports;const g6=Object.freeze(Object.defineProperty({__proto__:null,s:h6({__proto__:null,default:qr(m6)},[m6])},Symbol.toStringTag,{value:"Module"}));nt.registerHelper("hint","graphql",(e,t)=>{const{schema:n,externalFragments:r}=t;if(!n)return;const o=e.getCursor(),i=e.getTokenAt(o),s=i.type!==null&&/"|\w/.test(i.string[0])?i.start:i.end,l=new Bl(o.line,s),c={list:kq(n,e.getValue(),l,i,r).map(f=>({text:f.label,type:f.type,description:f.documentation,isDeprecated:f.isDeprecated,deprecationReason:f.deprecationReason})),from:{line:o.line,ch:s},to:{line:o.line,ch:i.end}};return c!=null&&c.list&&c.list.length>0&&(c.from=nt.Pos(c.from.line,c.from.ch),c.to=nt.Pos(c.to.line,c.to.ch),nt.signal(e,"hasCompletion",e,c,i)),c});const $ce=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),v6=["error","warning","information","hint"],Vce={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};nt.registerHelper("lint","graphql",(e,t)=>{const{schema:n,validationRules:r,externalFragments:o}=t;return Jq(e,n,r,void 0,o).map(i=>({message:i.message,severity:i.severity?v6[i.severity-1]:v6[0],type:i.source?Vce[i.source]:void 0,from:nt.Pos(i.range.start.line,i.range.start.character),to:nt.Pos(i.range.end.line,i.range.end.character)}))});const jce=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Uce=Object.defineProperty,Bce=(e,t)=>Uce(e,"name",{value:t,configurable:!0});function CC(e,t){const n=[];let r=e;for(;r!=null&&r.kind;)n.push(r),r=r.prevState;for(let o=n.length-1;o>=0;o--)t(n[o])}Bce(CC,"forEachState");var qce=Object.defineProperty,Bs=(e,t)=>qce(e,"name",{value:t,configurable:!0});function kC(e,t){const n={schema:e,type:null,parentType:null,inputType:null,directiveDef:null,fieldDef:null,argDef:null,argDefs:null,objectFieldDefs:null};return CC(t,r=>{var o,i;switch(r.kind){case"Query":case"ShortQuery":n.type=e.getQueryType();break;case"Mutation":n.type=e.getMutationType();break;case"Subscription":n.type=e.getSubscriptionType();break;case"InlineFragment":case"FragmentDefinition":r.type&&(n.type=e.getType(r.type));break;case"Field":case"AliasedField":n.fieldDef=n.type&&r.name?NC(e,n.parentType,r.name):null,n.type=(o=n.fieldDef)===null||o===void 0?void 0:o.type;break;case"SelectionSet":n.parentType=n.type?Et(n.type):null;break;case"Directive":n.directiveDef=r.name?e.getDirective(r.name):null;break;case"Arguments":const s=r.prevState?r.prevState.kind==="Field"?n.fieldDef:r.prevState.kind==="Directive"?n.directiveDef:r.prevState.kind==="AliasedField"?r.prevState.name&&NC(e,n.parentType,r.prevState.name):null:null;n.argDefs=s?s.args:null;break;case"Argument":if(n.argDef=null,n.argDefs){for(let g=0;g<n.argDefs.length;g++)if(n.argDefs[g].name===r.name){n.argDef=n.argDefs[g];break}}n.inputType=(i=n.argDef)===null||i===void 0?void 0:i.type;break;case"EnumValue":const l=n.inputType?Et(n.inputType):null;n.enumValue=l instanceof Er?y6(l.getValues(),g=>g.value===r.name):null;break;case"ListValue":const c=n.inputType?Ca(n.inputType):null;n.inputType=c instanceof Bt?c.ofType:null;break;case"ObjectValue":const f=n.inputType?Et(n.inputType):null;n.objectFieldDefs=f instanceof $r?f.getFields():null;break;case"ObjectField":const d=r.name&&n.objectFieldDefs?n.objectFieldDefs[r.name]:null;n.inputType=d==null?void 0:d.type;break;case"NamedType":n.type=r.name?e.getType(r.name):null;break}}),n}Bs(kC,"getTypeInfo");function NC(e,t,n){if(n===qo.name&&e.getQueryType()===t)return qo;if(n===zo.name&&e.getQueryType()===t)return zo;if(n===wo.name&&Kt(t))return wo;if(t&&t.getFields)return t.getFields()[n]}Bs(NC,"getFieldDef");function y6(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n]}Bs(y6,"find");function _C(e){return{kind:"Field",schema:e.schema,field:e.fieldDef,type:IC(e.fieldDef)?null:e.parentType}}Bs(_C,"getFieldReference");function OC(e){return{kind:"Directive",schema:e.schema,directive:e.directiveDef}}Bs(OC,"getDirectiveReference");function AC(e){return e.directiveDef?{kind:"Argument",schema:e.schema,argument:e.argDef,directive:e.directiveDef}:{kind:"Argument",schema:e.schema,argument:e.argDef,field:e.fieldDef,type:IC(e.fieldDef)?null:e.parentType}}Bs(AC,"getArgumentReference");function DC(e){return{kind:"EnumValue",value:e.enumValue||void 0,type:e.inputType?Et(e.inputType):void 0}}Bs(DC,"getEnumValueReference");function Oy(e,t){return{kind:"Type",schema:e.schema,type:t||e.type}}Bs(Oy,"getTypeReference");function IC(e){return e.name.slice(0,2)==="__"}Bs(IC,"isMetaField");var zce=Object.defineProperty,Mi=(e,t)=>zce(e,"name",{value:t,configurable:!0});nt.defineOption("info",!1,(e,t,n)=>{if(n&&n!==nt.Init){const r=e.state.info.onMouseOver;nt.off(e.getWrapperElement(),"mouseover",r),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const r=e.state.info=b6(t);r.onMouseOver=w6.bind(null,e),nt.on(e.getWrapperElement(),"mouseover",r.onMouseOver)}});function b6(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}Mi(b6,"createState");function E6(e){const{options:t}=e.state.info;return(t==null?void 0:t.hoverTime)||500}Mi(E6,"getHoverTime");function w6(e,t){const n=e.state.info,r=t.target||t.srcElement;if(!(r instanceof HTMLElement)||r.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const o=r.getBoundingClientRect(),i=Mi(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(l,c)},"onMouseMove"),s=Mi(function(){nt.off(document,"mousemove",i),nt.off(e.getWrapperElement(),"mouseout",s),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),l=Mi(function(){nt.off(document,"mousemove",i),nt.off(e.getWrapperElement(),"mouseout",s),n.hoverTimeout=void 0,x6(e,o)},"onHover"),c=E6(e);n.hoverTimeout=setTimeout(l,c),nt.on(document,"mousemove",i),nt.on(e.getWrapperElement(),"mouseout",s)}Mi(w6,"onMouseOver");function x6(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2},"window"),r=e.state.info,{options:o}=r,i=o.render||e.getHelper(n,"info");if(i){const s=e.getTokenAt(n,!0);if(s){const l=i(s,o,e,n);l&&S6(e,t,l)}}}Mi(x6,"onMouseHover");function S6(e,t,n){const r=document.createElement("div");r.className="CodeMirror-info",r.append(n),document.body.append(r);const o=r.getBoundingClientRect(),i=window.getComputedStyle(r),s=o.right-o.left+parseFloat(i.marginLeft)+parseFloat(i.marginRight),l=o.bottom-o.top+parseFloat(i.marginTop)+parseFloat(i.marginBottom);let c=t.bottom;l>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(c=t.top-l),c<0&&(c=t.bottom);let f=Math.max(0,window.innerWidth-s-15);f>t.left&&(f=t.left),r.style.opacity="1",r.style.top=c+"px",r.style.left=f+"px";let d;const g=Mi(function(){clearTimeout(d)},"onMouseOverPopup"),m=Mi(function(){clearTimeout(d),d=setTimeout(v,200)},"onMouseOut"),v=Mi(function(){nt.off(r,"mouseover",g),nt.off(r,"mouseout",m),nt.off(e.getWrapperElement(),"mouseout",m),r.style.opacity?(r.style.opacity="0",setTimeout(()=>{r.parentNode&&r.remove()},600)):r.parentNode&&r.remove()},"hidePopup");nt.on(r,"mouseover",g),nt.on(r,"mouseout",m),nt.on(e.getWrapperElement(),"mouseout",m)}Mi(S6,"showPopup");const Hce=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Wce=Object.defineProperty,ns=(e,t)=>Wce(e,"name",{value:t,configurable:!0});nt.registerHelper("info","graphql",(e,t)=>{if(!t.schema||!e.state)return;const{kind:n,step:r}=e.state,o=kC(t.schema,e.state);if(n==="Field"&&r===0&&o.fieldDef||n==="AliasedField"&&r===2&&o.fieldDef){const i=document.createElement("div");i.className="CodeMirror-info-header",T6(i,o,t);const s=document.createElement("div");return s.append(i),pf(s,t,o.fieldDef),s}if(n==="Directive"&&r===1&&o.directiveDef){const i=document.createElement("div");i.className="CodeMirror-info-header",k6(i,o,t);const s=document.createElement("div");return s.append(i),pf(s,t,o.directiveDef),s}if(n==="Argument"&&r===0&&o.argDef){const i=document.createElement("div");i.className="CodeMirror-info-header",N6(i,o,t);const s=document.createElement("div");return s.append(i),pf(s,t,o.argDef),s}if(n==="EnumValue"&&o.enumValue&&o.enumValue.description){const i=document.createElement("div");i.className="CodeMirror-info-header",_6(i,o,t);const s=document.createElement("div");return s.append(i),pf(s,t,o.enumValue),s}if(n==="NamedType"&&o.type&&o.type.description){const i=document.createElement("div");i.className="CodeMirror-info-header",gc(i,o,t,o.type);const s=document.createElement("div");return s.append(i),pf(s,t,o.type),s}});function T6(e,t,n){C6(e,t,n),LC(e,t,n,t.type)}ns(T6,"renderField");function C6(e,t,n){var r;const o=((r=t.fieldDef)===null||r===void 0?void 0:r.name)||"";oo(e,o,"field-name",n,_C(t))}ns(C6,"renderQualifiedField");function k6(e,t,n){var r;const o="@"+(((r=t.directiveDef)===null||r===void 0?void 0:r.name)||"");oo(e,o,"directive-name",n,OC(t))}ns(k6,"renderDirective");function N6(e,t,n){var r;const o=((r=t.argDef)===null||r===void 0?void 0:r.name)||"";oo(e,o,"arg-name",n,AC(t)),LC(e,t,n,t.inputType)}ns(N6,"renderArg");function _6(e,t,n){var r;const o=((r=t.enumValue)===null||r===void 0?void 0:r.name)||"";gc(e,t,n,t.inputType),oo(e,"."),oo(e,o,"enum-value",n,DC(t))}ns(_6,"renderEnumValue");function LC(e,t,n,r){const o=document.createElement("span");o.className="type-name-pill",r instanceof tt?(gc(o,t,n,r.ofType),oo(o,"!")):r instanceof Bt?(oo(o,"["),gc(o,t,n,r.ofType),oo(o,"]")):oo(o,(r==null?void 0:r.name)||"","type-name",n,Oy(t,r)),e.append(o)}ns(LC,"renderTypeAnnotation");function gc(e,t,n,r){r instanceof tt?(gc(e,t,n,r.ofType),oo(e,"!")):r instanceof Bt?(oo(e,"["),gc(e,t,n,r.ofType),oo(e,"]")):oo(e,(r==null?void 0:r.name)||"","type-name",n,Oy(t,r))}ns(gc,"renderType");function pf(e,t,n){const{description:r}=n;if(r){const o=document.createElement("div");o.className="info-description",t.renderDescription?o.innerHTML=t.renderDescription(r):o.append(document.createTextNode(r)),e.append(o)}O6(e,t,n)}ns(pf,"renderDescription");function O6(e,t,n){const r=n.deprecationReason;if(r){const o=document.createElement("div");o.className="info-deprecation",e.append(o);const i=document.createElement("span");i.className="info-deprecation-label",i.append(document.createTextNode("Deprecated")),o.append(i);const s=document.createElement("div");s.className="info-deprecation-reason",t.renderDescription?s.innerHTML=t.renderDescription(r):s.append(document.createTextNode(r)),o.append(s)}}ns(O6,"renderDeprecation");function oo(e,t,n="",r={onClick:null},o=null){if(n){const{onClick:i}=r;let s;i?(s=document.createElement("a"),s.href="javascript:void 0",s.addEventListener("click",l=>{l.preventDefault(),i(o,l)})):s=document.createElement("span"),s.className=n,s.append(document.createTextNode(t)),e.append(s)}else e.append(document.createTextNode(t))}ns(oo,"text");const Gce=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Yce=Object.defineProperty,qs=(e,t)=>Yce(e,"name",{value:t,configurable:!0});nt.defineOption("jump",!1,(e,t,n)=>{if(n&&n!==nt.Init){const r=e.state.jump.onMouseOver;nt.off(e.getWrapperElement(),"mouseover",r);const o=e.state.jump.onMouseOut;nt.off(e.getWrapperElement(),"mouseout",o),nt.off(document,"keydown",e.state.jump.onKeyDown),delete e.state.jump}if(t){const r=e.state.jump={options:t,onMouseOver:A6.bind(null,e),onMouseOut:D6.bind(null,e),onKeyDown:I6.bind(null,e)};nt.on(e.getWrapperElement(),"mouseover",r.onMouseOver),nt.on(e.getWrapperElement(),"mouseout",r.onMouseOut),nt.on(document,"keydown",r.onKeyDown)}});function A6(e,t){const n=t.target||t.srcElement;if(!(n instanceof HTMLElement)||(n==null?void 0:n.nodeName)!=="SPAN")return;const r=n.getBoundingClientRect(),o={left:(r.left+r.right)/2,top:(r.top+r.bottom)/2};e.state.jump.cursor=o,e.state.jump.isHoldingModifier&&RC(e)}qs(A6,"onMouseOver");function D6(e){if(!e.state.jump.isHoldingModifier&&e.state.jump.cursor){e.state.jump.cursor=null;return}e.state.jump.isHoldingModifier&&e.state.jump.marker&&FC(e)}qs(D6,"onMouseOut");function I6(e,t){if(e.state.jump.isHoldingModifier||!L6(t.key))return;e.state.jump.isHoldingModifier=!0,e.state.jump.cursor&&RC(e);const n=qs(i=>{i.code===t.code&&(e.state.jump.isHoldingModifier=!1,e.state.jump.marker&&FC(e),nt.off(document,"keyup",n),nt.off(document,"click",r),e.off("mousedown",o))},"onKeyUp"),r=qs(i=>{const{destination:s,options:l}=e.state.jump;s&&l.onClick(s,i)},"onClick"),o=qs((i,s)=>{e.state.jump.destination&&(s.codemirrorIgnore=!0)},"onMouseDown");nt.on(document,"keyup",n),nt.on(document,"click",r),e.on("mousedown",o)}qs(I6,"onKeyDown");const Qce=typeof navigator<"u"&&navigator&&navigator.appVersion.includes("Mac");function L6(e){return e===(Qce?"Meta":"Control")}qs(L6,"isJumpModifier");function RC(e){if(e.state.jump.marker)return;const{cursor:t,options:n}=e.state.jump,r=e.coordsChar(t),o=e.getTokenAt(r,!0),i=n.getDestination||e.getHelper(r,"jump");if(i){const s=i(o,n,e);if(s){const l=e.markText({line:r.line,ch:o.start},{line:r.line,ch:o.end},{className:"CodeMirror-jump-token"});e.state.jump.marker=l,e.state.jump.destination=s}}}qs(RC,"enableJumpMode");function FC(e){const{marker:t}=e.state.jump;e.state.jump.marker=null,e.state.jump.destination=null,t.clear()}qs(FC,"disableJumpMode"),nt.registerHelper("jump","graphql",(e,t)=>{if(!t.schema||!t.onClick||!e.state)return;const{state:n}=e,{kind:r,step:o}=n,i=kC(t.schema,n);if(r==="Field"&&o===0&&i.fieldDef||r==="AliasedField"&&o===2&&i.fieldDef)return _C(i);if(r==="Directive"&&o===1&&i.directiveDef)return OC(i);if(r==="Argument"&&o===0&&i.argDef)return AC(i);if(r==="EnumValue"&&i.enumValue)return DC(i);if(r==="NamedType"&&i.type)return Oy(i)});const Kce=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Jce=Object.defineProperty,Xce=(e,t)=>Jce(e,"name",{value:t,configurable:!0});function Ay(e,t){var n,r;const{levels:o,indentLevel:i}=e;return((!o||o.length===0?i:o.at(-1)-(!((n=this.electricInput)===null||n===void 0)&&n.test(t)?1:0))||0)*(((r=this.config)===null||r===void 0?void 0:r.indentUnit)||0)}Xce(Ay,"indent");var Zce=Object.defineProperty,eue=(e,t)=>Zce(e,"name",{value:t,configurable:!0});const tue=eue(e=>{const t=cp({eatWhitespace:n=>n.eatWhile(oL),lexRules:iL,parseRules:sL,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:Ay,electricInput:/^\s*[})\]]/,fold:"brace",lineComment:"#",closeBrackets:{pairs:'()[]{}""',explode:"()[]{}"}}},"graphqlModeFactory");nt.defineMode("graphql",tue);const nue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var rue=Object.defineProperty,tl=(e,t)=>rue(e,"name",{value:t,configurable:!0});function vc(e,t,n){const r=R6(n,MC(t.string));if(!r)return;const o=t.type!==null&&/"|\w/.test(t.string[0])?t.start:t.end;return{list:r,from:{line:e.line,ch:o},to:{line:e.line,ch:t.end}}}tl(vc,"hintList");function R6(e,t){if(!t)return Dy(e,r=>!r.isDeprecated);const n=e.map(r=>({proximity:F6(MC(r.text),t),entry:r}));return Dy(Dy(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,o)=>(r.entry.isDeprecated?1:0)-(o.entry.isDeprecated?1:0)||r.proximity-o.proximity||r.entry.text.length-o.entry.text.length).map(r=>r.entry)}tl(R6,"filterAndSortList");function Dy(e,t){const n=e.filter(t);return n.length===0?e:n}tl(Dy,"filterNonEmpty");function MC(e){return e.toLowerCase().replaceAll(/\W/g,"")}tl(MC,"normalizeText");function F6(e,t){let n=M6(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}tl(F6,"getProximity");function M6(e,t){let n,r;const o=[],i=e.length,s=t.length;for(n=0;n<=i;n++)o[n]=[n];for(r=1;r<=s;r++)o[0][r]=r;for(n=1;n<=i;n++)for(r=1;r<=s;r++){const l=e[n-1]===t[r-1]?0:1;o[n][r]=Math.min(o[n-1][r]+1,o[n][r-1]+1,o[n-1][r-1]+l),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(o[n][r]=Math.min(o[n][r],o[n-2][r-2]+l))}return o[i][s]}tl(M6,"lexicalDistance"),nt.registerHelper("hint","graphql-variables",(e,t)=>{const n=e.getCursor(),r=e.getTokenAt(n),o=P6(n,r,t);return o!=null&&o.list&&o.list.length>0&&(o.from=nt.Pos(o.from.line,o.from.ch),o.to=nt.Pos(o.to.line,o.to.ch),nt.signal(e,"hasCompletion",e,o,r)),o});function P6(e,t,n){const r=t.state.kind==="Invalid"?t.state.prevState:t.state,{kind:o,step:i}=r;if(o==="Document"&&i===0)return vc(e,t,[{text:"{"}]);const{variableToType:s}=n;if(!s)return;const l=$6(s,t.state);if(o==="Document"||o==="Variable"&&i===0){const c=Object.keys(s);return vc(e,t,c.map(f=>({text:`"${f}": `,type:s[f]})))}if((o==="ObjectValue"||o==="ObjectField"&&i===0)&&l.fields){const c=Object.keys(l.fields).map(f=>l.fields[f]);return vc(e,t,c.map(f=>({text:`"${f.name}": `,type:f.type,description:f.description})))}if(o==="StringValue"||o==="NumberValue"||o==="BooleanValue"||o==="NullValue"||o==="ListValue"&&i===1||o==="ObjectField"&&i===2||o==="Variable"&&i===2){const c=l.type?Et(l.type):void 0;if(c instanceof $r)return vc(e,t,[{text:"{"}]);if(c instanceof Er){const f=c.getValues();return vc(e,t,f.map(d=>({text:`"${d.name}"`,type:c,description:d.description})))}if(c===qt)return vc(e,t,[{text:"true",type:qt,description:"Not false."},{text:"false",type:qt,description:"Not true."}])}}tl(P6,"getVariablesHint");function $6(e,t){const n={type:null,fields:null};return CC(t,r=>{switch(r.kind){case"Variable":{n.type=e[r.name];break}case"ListValue":{const o=n.type?Ca(n.type):void 0;n.type=o instanceof Bt?o.ofType:null;break}case"ObjectValue":{const o=n.type?Et(n.type):void 0;n.fields=o instanceof $r?o.getFields():null;break}case"ObjectField":{const o=r.name&&n.fields?n.fields[r.name]:null;n.type=o==null?void 0:o.type;break}}}),n}tl($6,"getTypeInfo");const oue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var iue=Object.defineProperty,wn=(e,t)=>iue(e,"name",{value:t,configurable:!0});function V6(e){rs=e,Iy=e.length,Un=kr=fh=-1,Nn(),ph();const t=PC();return zs("EOF"),t}wn(V6,"jsonParse");let rs,Iy,Un,kr,fh,xt,Oo;function PC(){const e=Un,t=[];if(zs("{"),!dh("}")){do t.push(j6());while(dh(","));zs("}")}return{kind:"Object",start:e,end:fh,members:t}}wn(PC,"parseObj");function j6(){const e=Un,t=Oo==="String"?VC():null;zs("String"),zs(":");const n=$C();return{kind:"Member",start:e,end:fh,key:t,value:n}}wn(j6,"parseMember");function U6(){const e=Un,t=[];if(zs("["),!dh("]")){do t.push($C());while(dh(","));zs("]")}return{kind:"Array",start:e,end:fh,values:t}}wn(U6,"parseArr");function $C(){switch(Oo){case"[":return U6();case"{":return PC();case"String":case"Number":case"Boolean":case"Null":const e=VC();return ph(),e}zs("Value")}wn($C,"parseVal");function VC(){return{kind:Oo,start:Un,end:kr,value:JSON.parse(rs.slice(Un,kr))}}wn(VC,"curToken");function zs(e){if(Oo===e){ph();return}let t;if(Oo==="EOF")t="[end of file]";else if(kr-Un>1)t="`"+rs.slice(Un,kr)+"`";else{const n=rs.slice(Un).match(/^.+?\b/);t="`"+(n?n[0]:rs[Un])+"`"}throw yc(`Expected ${e} but found ${t}.`)}wn(zs,"expect");class jC extends Error{constructor(t,n){super(t),this.position=n}}wn(jC,"JSONSyntaxError");function yc(e){return new jC(e,{start:Un,end:kr})}wn(yc,"syntaxError");function dh(e){if(Oo===e)return ph(),!0}wn(dh,"skip");function Nn(){return kr<Iy&&(kr++,xt=kr===Iy?0:rs.charCodeAt(kr)),xt}wn(Nn,"ch");function ph(){for(fh=kr;xt===9||xt===10||xt===13||xt===32;)Nn();if(xt===0){Oo="EOF";return}switch(Un=kr,xt){case 34:return Oo="String",B6();case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Oo="Number",q6();case 102:if(rs.slice(Un,Un+5)!=="false")break;kr+=4,Nn(),Oo="Boolean";return;case 110:if(rs.slice(Un,Un+4)!=="null")break;kr+=3,Nn(),Oo="Null";return;case 116:if(rs.slice(Un,Un+4)!=="true")break;kr+=3,Nn(),Oo="Boolean";return}Oo=rs[Un],Nn()}wn(ph,"lex");function B6(){for(Nn();xt!==34&&xt>31;)if(xt===92)switch(xt=Nn(),xt){case 34:case 47:case 92:case 98:case 102:case 110:case 114:case 116:Nn();break;case 117:Nn(),hh(),hh(),hh(),hh();break;default:throw yc("Bad character escape sequence.")}else{if(kr===Iy)throw yc("Unterminated string.");Nn()}if(xt===34){Nn();return}throw yc("Unterminated string.")}wn(B6,"readString");function hh(){if(xt>=48&&xt<=57||xt>=65&&xt<=70||xt>=97&&xt<=102)return Nn();throw yc("Expected hexadecimal digit.")}wn(hh,"readHex");function q6(){xt===45&&Nn(),xt===48?Nn():Ly(),xt===46&&(Nn(),Ly()),(xt===69||xt===101)&&(xt=Nn(),(xt===43||xt===45)&&Nn(),Ly())}wn(q6,"readNumber");function Ly(){if(xt<48||xt>57)throw yc("Expected decimal digit.");do Nn();while(xt>=48&&xt<=57)}wn(Ly,"readDigits"),nt.registerHelper("lint","graphql-variables",(e,t,n)=>{if(!e)return[];let r;try{r=V6(e)}catch(i){if(i instanceof jC)return[Ry(n,i.position,i.message)];throw i}const{variableToType:o}=t;return o?z6(n,o,r):[]});function z6(e,t,n){var r;const o=[];for(const i of n.members)if(i){const s=(r=i.key)===null||r===void 0?void 0:r.value,l=t[s];if(l)for(const[c,f]of hf(l,i.value))o.push(Ry(e,c,f));else o.push(Ry(e,i.key,`Variable "$${s}" does not appear in any GraphQL query.`))}return o}wn(z6,"validateVariables");function hf(e,t){if(!e||!t)return[];if(e instanceof tt)return t.kind==="Null"?[[t,`Type "${e}" is non-nullable and cannot be null.`]]:hf(e.ofType,t);if(t.kind==="Null")return[];if(e instanceof Bt){const n=e.ofType;if(t.kind==="Array"){const r=t.values||[];return UC(r,o=>hf(n,o))}return hf(n,t)}if(e instanceof $r){if(t.kind!=="Object")return[[t,`Type "${e}" must be an Object.`]];const n=Object.create(null),r=UC(t.members,o=>{var i;const s=(i=o==null?void 0:o.key)===null||i===void 0?void 0:i.value;n[s]=!0;const l=e.getFields()[s];if(!l)return[[o.key,`Type "${e}" does not have a field "${s}".`]];const c=l?l.type:void 0;return hf(c,o.value)});for(const o of Object.keys(e.getFields())){const i=e.getFields()[o];!n[o]&&i.type instanceof tt&&!i.defaultValue&&r.push([t,`Object of type "${e}" is missing required field "${o}".`])}return r}return e.name==="Boolean"&&t.kind!=="Boolean"||e.name==="String"&&t.kind!=="String"||e.name==="ID"&&t.kind!=="Number"&&t.kind!=="String"||e.name==="Float"&&t.kind!=="Number"||e.name==="Int"&&(t.kind!=="Number"||(t.value|0)!==t.value)?[[t,`Expected value of type "${e}".`]]:(e instanceof Er||e instanceof Uo)&&(t.kind!=="String"&&t.kind!=="Number"&&t.kind!=="Boolean"&&t.kind!=="Null"||H6(e.parseValue(t.value)))?[[t,`Expected value of type "${e}".`]]:[]}wn(hf,"validateValue");function Ry(e,t,n){return{message:n,severity:"error",type:"validation",from:e.posFromIndex(t.start),to:e.posFromIndex(t.end)}}wn(Ry,"lintError");function H6(e){return e==null||e!==e}wn(H6,"isNullish");function UC(e,t){return Array.prototype.concat.apply([],e.map(t))}wn(UC,"mapCat");const sue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var aue=Object.defineProperty,lue=(e,t)=>aue(e,"name",{value:t,configurable:!0});nt.defineMode("graphql-variables",e=>{const t=cp({eatWhitespace:n=>n.eatSpace(),lexRules:cue,parseRules:uue,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:Ay,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const cue={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},uue={Document:[Ve("{"),ct("Variable",Jt(Ve(","))),Ve("}")],Variable:[BC("variable"),Ve(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[xo("Number","number")],StringValue:[xo("String","string")],BooleanValue:[xo("Keyword","builtin")],NullValue:[xo("Keyword","keyword")],ListValue:[Ve("["),ct("Value",Jt(Ve(","))),Ve("]")],ObjectValue:[Ve("{"),ct("ObjectField",Jt(Ve(","))),Ve("}")],ObjectField:[BC("attribute"),Ve(":"),"Value"]};function BC(e){return{style:e,match:t=>t.kind==="String",update(t,n){t.name=n.value.slice(1,-1)}}}lue(BC,"namedKey");const fue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));nt.defineMode("graphql-results",e=>{const t=cp({eatWhitespace:n=>n.eatSpace(),lexRules:due,parseRules:pue,editorConfig:{tabSize:e.tabSize}});return{config:e,startState:t.startState,token:t.token,indent:Ay,electricInput:/^\s*[}\]]/,fold:"brace",closeBrackets:{pairs:'[]{}""',explode:"[]{}"}}});const due={Punctuation:/^\[|]|\{|\}|:|,/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?/,Keyword:/^true|false|null/},pue={Document:[Ve("{"),ct("Entry",Ve(",")),Ve("}")],Entry:[xo("String","def"),Ve(":"),"Value"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue"}return null;case"Keyword":switch(e.value){case"true":case"false":return"BooleanValue";case"null":return"NullValue"}return null}},NumberValue:[xo("Number","number")],StringValue:[xo("String","string")],BooleanValue:[xo("Keyword","builtin")],NullValue:[xo("Keyword","keyword")],ListValue:[Ve("["),ct("Value",Ve(",")),Ve("]")],ObjectValue:[Ve("{"),ct("ObjectField",Ve(",")),Ve("}")],ObjectField:[xo("String","property"),Ve(":"),"Value"]},hue=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));Lo.renderYogaGraphiQL=Qle,Object.defineProperty(Lo,Symbol.toStringTag,{value:"Module"})});